@saas-ui/storybook-addon 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/dist/ChakraProviderDecorator.cjs +5 -5
  2. package/dist/ChakraProviderDecorator.cjs.map +1 -1
  3. package/dist/ChakraProviderDecorator.js +5 -5
  4. package/dist/ChakraProviderDecorator.js.map +1 -1
  5. package/dist/arg-types.cjs +1 -1
  6. package/dist/arg-types.cjs.map +1 -1
  7. package/dist/arg-types.d.cts +1 -1
  8. package/dist/arg-types.d.ts +1 -1
  9. package/dist/arg-types.js +1 -1
  10. package/dist/arg-types.js.map +1 -1
  11. package/dist/color-mode/ColorModeSync.cjs +1 -1
  12. package/dist/color-mode/ColorModeSync.cjs.map +1 -1
  13. package/dist/color-mode/ColorModeSync.js +1 -1
  14. package/dist/color-mode/ColorModeSync.js.map +1 -1
  15. package/dist/color-mode/ColorModeTool.cjs +1 -1
  16. package/dist/color-mode/ColorModeTool.cjs.map +1 -1
  17. package/dist/color-mode/ColorModeTool.js +1 -1
  18. package/dist/color-mode/ColorModeTool.js.map +1 -1
  19. package/dist/constants.cjs +1 -1
  20. package/dist/constants.cjs.map +1 -1
  21. package/dist/constants.js +1 -1
  22. package/dist/constants.js.map +1 -1
  23. package/dist/direction/DirectionTool.cjs +1 -1
  24. package/dist/direction/DirectionTool.cjs.map +1 -1
  25. package/dist/direction/DirectionTool.js +1 -1
  26. package/dist/direction/DirectionTool.js.map +1 -1
  27. package/dist/direction/useDirection.cjs +1 -1
  28. package/dist/direction/useDirection.cjs.map +1 -1
  29. package/dist/direction/useDirection.js +1 -1
  30. package/dist/direction/useDirection.js.map +1 -1
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +1 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.js +1 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/manager.cjs +1 -1
  38. package/dist/manager.cjs.map +1 -1
  39. package/dist/manager.js +1 -1
  40. package/dist/manager.js.map +1 -1
  41. package/dist/preview.cjs +5 -5
  42. package/dist/preview.cjs.map +1 -1
  43. package/dist/preview.js +5 -5
  44. package/dist/preview.js.map +1 -1
  45. package/dist/theme/ThemeTool.cjs +1 -1
  46. package/dist/theme/ThemeTool.cjs.map +1 -1
  47. package/dist/theme/ThemeTool.js +1 -1
  48. package/dist/theme/ThemeTool.js.map +1 -1
  49. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/manager.ts","../src/constants.ts","../src/color-mode/ColorModeTool.tsx","../src/direction/DirectionTool.tsx","../src/theme/ThemeTool.tsx"],"names":["addons","types","ADDON_ID","COLOR_MODE_TOOL_ID","DIRECTION_TOOL_ID","THEME_TOOL_ID","EVENTS","React","IconButton","jsx","jsxs","MoonIcon","SunIcon","ColorModeTool","isDarkMode","darkMode","setDarkMode","channel","prev","useCallback","useEffect","useAddonState","useGlobals","LTRIcon","props","RTLIcon","DirectionTool","globals","setGlobals","direction","setDirection","targetDirection","toggleDirection","WithTooltip","TooltipLinkList","Icons","themes","ThemeTool","themeId","theme","setTheme","setActiveTheme","onHide","api","match","viewMode"],"mappings":"AAAA,OAAS,UAAAA,EAAQ,SAAAC,MAAa,yBCAvB,IAAMC,EAAW,4BACXC,EAAqB,GAAGD,CAAQ,mBAChCE,EAAoB,GAAGF,CAAQ,kBAC/BG,EAAgB,GAAGH,CAAQ,cAE3BI,EAAS,CACpB,kBAAmB,GAAGJ,CAAQ,mBAC9B,iBAAkB,GAAGA,CAAQ,mBAC7B,UAAW,GAAGA,CAAQ,WACxB,ECTA,UAAYK,MAAW,QACvB,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,UAAAR,MAAc,yBAMnB,cAAAS,EASA,QAAAC,MATA,oBAFJ,IAAMC,EAAW,IACfF,EAAC,OAAI,QAAQ,YAAY,UAAU,QACjC,SAAAA,EAAC,QACC,KAAK,eACL,EAAE,qOACH,EACH,EAGIG,EAAU,IACdH,EAAC,OAAI,QAAQ,YAAY,UA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oB,CAC1CrB,EAAQ,KAAKX,EAAO,UAAYgC,GAAU,GAAa,EACvDE,EAASF,CAAO,CAClB,EAEA,OACE7B,EAACwB,EAAA,CACC,UAAU,MACV,oBAAmB,GACnB,QAAQ,QACR,QAAS,CAAC,CAAE,OAAAS,CAAO,IACjBjC,EAACyB,EAAA,CACC,MAAO,CACL,CACE,GAAI,IACJ,MAAO,YACP,QAAS,IAAM,CACbO,EAAe,GAAG,EAClBC,EAAO,CACT,CACF,EACA,CACE,GAAI,IACJ,MAAO,UACP,QAAS,IAAM,CACbD,EAAe,GAAG,EAClBC,EAAO,CACT,CACF,EACA,CACE,GAAI,IACJ,MAAO,QACP,QAAS,IAAM,CACbD,EAAe,GAAG,EAClBC,EAAO,CACT,CACF,CACF,EACF,EAGF,SAAAhC,EAACF,EAAA,CAAW,MAAM,eAChB,UAAAC,EAAC0B,EAAA,CAAM,KAAK,MAAM,EAAE,IAAEC,EAAOG,GAAS,GAAG,GAC3C,EACF,CAEJ,EJ5DAvC,EAAO,SAASE,EAAWyC,GAAQ,CACjC,IAAMC,EAAQ,CAAC,CAAE,SAAAC,CAAS,IACxB,GAAQA,GAAYA,EAAS,MAAM,gBAAgB,GAErD7C,EAAO,IAAII,EAAmB,CAC5B,KAAMH,EAAM,KACZ,MAAO,YACP,OAAQyB,EACR,MAAAkB,CACF,CAAC,EAED5C,EAAO,IAAIG,EAAoB,CAC7B,KAAMF,EAAM,KACZ,MAAO,aACP,OAAQY,EACR,MAAA+B,CACF,CAAC,EAED5C,EAAO,IAAIK,EAAe,CACxB,KAAMJ,EAAM,KACZ,MAAO,QACP,OAAQoC,EACR,MAAAO,CACF,CAAC,CACH,CAAC","sourcesContent":["import { addons, types } from '@storybook/manager-api'\nimport {\n ADDON_ID,\n COLOR_MODE_TOOL_ID,\n DIRECTION_TOOL_ID,\n THEME_TOOL_ID,\n} from './constants'\nimport { ColorModeTool } from './color-mode/ColorModeTool'\nimport { DirectionTool } from './direction/DirectionTool'\nimport { ThemeTool } from './theme/ThemeTool'\n\naddons.register(ADDON_ID, (api) => {\n const match = ({ viewMode }: { viewMode?: string }) =>\n Boolean(viewMode && viewMode.match(/^(story|docs)$/))\n\n addons.add(DIRECTION_TOOL_ID, {\n type: types.TOOL,\n title: 'Direction',\n render: DirectionTool,\n match,\n })\n\n addons.add(COLOR_MODE_TOOL_ID, {\n type: types.TOOL,\n title: 'Color Mode',\n render: ColorModeTool,\n match,\n })\n\n addons.add(THEME_TOOL_ID, {\n type: types.TOOL,\n title: 'Theme',\n render: ThemeTool,\n match,\n })\n})\n","export const ADDON_ID = '@saas-ui/storybook-addon2'\nexport const COLOR_MODE_TOOL_ID = `${ADDON_ID}/color-mode-tool`\nexport const DIRECTION_TOOL_ID = `${ADDON_ID}/direction-tool`\nexport const THEME_TOOL_ID = `${ADDON_ID}/theme-tool`\n\nexport const EVENTS = {\n TOGGLE_COLOR_MODE: `${ADDON_ID}/toggleColorMode`,\n TOGGLE_DIRECTION: `${ADDON_ID}/toggleDirection`,\n SET_THEME: `${ADDON_ID}/setTheme`,\n}\n","import * as React from 'react'\nimport { IconButton } from '@storybook/components'\nimport { addons } from '@storybook/manager-api'\n\nimport { EVENTS } from '../constants'\n\nconst MoonIcon = () => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <path\n fill=\"currentColor\"\n d=\"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z\"\n ></path>\n </svg>\n)\n\nconst SunIcon = () => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <g\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeWidth=\"2\"\n fill=\"none\"\n stroke=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"5\"></circle>\n <path d=\"M12 1v2\"></path>\n <path d=\"M12 21v2\"></path>\n <path d=\"M4.22 4.22l1.42 1.42\"></path>\n <path d=\"M18.36 18.36l1.42 1.42\"></path>\n <path d=\"M1 12h2\"></path>\n <path d=\"M21 12h2\"></path>\n <path d=\"M4.22 19.78l1.42-1.42\"></path>\n <path d=\"M18.36 5.64l1.42-1.42\"></path>\n </g>\n </svg>\n)\n\nexport const ColorModeTool = () => {\n const isDarkMode = localStorage.getItem('chakra-ui-color-mode') === 'dark'\n\n const [darkMode, setDarkMode] = React.useState(isDarkMode)\n\n const channel = addons.getChannel()\n\n const handleToggle = () => {\n channel.emit(EVENTS.TOGGLE_COLOR_MODE, !darkMode ? 'dark' : 'light')\n setDarkMode((prev) => !prev)\n }\n\n return (\n <IconButton\n title={`Set color mode to ${darkMode ? 'light' : 'dark'}`}\n active={darkMode}\n onClick={handleToggle}\n >\n {darkMode ? <SunIcon /> : <MoonIcon />}\n </IconButton>\n )\n}\n","import { useCallback, useEffect } from 'react'\nimport { addons, useAddonState, useGlobals } from '@storybook/manager-api'\nimport { IconButton } from '@storybook/components'\nimport { DIRECTION_TOOL_ID, EVENTS } from '../constants'\n\nconst LTRIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n style={{\n transform: 'scale(1.2)',\n }}\n {...props}\n >\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n <path d=\"M9 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2H9C6.79 2 5 3.79 5 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zm0 12v3H5v2h12v3l4-4-4-4z\" />\n </svg>\n)\n\nconst RTLIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n style={{\n transform: 'scale(1.2)',\n }}\n {...props}\n >\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n <path d=\"M10 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zM8 14l-4 4 4 4v-3h12v-2H8v-3z\" />\n </svg>\n)\n\n/**\n * This component is rendered in the Storybook toolbar\n */\nexport const DirectionTool = () => {\n const [globals, setGlobals] = useGlobals()\n const [direction, setDirection] = useAddonState(\n DIRECTION_TOOL_ID,\n globals[DIRECTION_TOOL_ID] || 'ltr'\n )\n const targetDirection = direction !== 'ltr' ? 'ltr' : 'rtl'\n useEffect(() => {\n setGlobals({ [DIRECTION_TOOL_ID]: direction })\n }, [direction, setGlobals])\n\n const toggleDirection = useCallback(() => {\n const channel = addons.getChannel()\n channel.emit(EVENTS.TOGGLE_DIRECTION, targetDirection)\n setDirection(targetDirection)\n }, [setDirection, targetDirection])\n\n return (\n <IconButton\n active={direction === 'rtl'}\n title={`Set layout direction to ${targetDirection}`}\n onClick={toggleDirection}\n >\n {targetDirection === 'ltr' ? <LTRIcon /> : <RTLIcon />}\n </IconButton>\n )\n}\n","import {\n IconButton,\n WithTooltip,\n TooltipLinkList,\n Icons,\n} from '@storybook/components'\nimport { ADDON_ID, EVENTS } from '../constants'\nimport { addons } from '@storybook/preview-api'\nimport { useAddonState } from '@storybook/manager-api'\n\nconst themes: Record<string, string> = {\n 0: 'Chakra UI',\n 1: 'Saas UI',\n 2: 'Glass',\n}\n\n/**\n * This component is rendered in the Storybook toolbar\n */\nexport const ThemeTool = () => {\n const themeId = localStorage.getItem('saas-ui-theme')\n const [theme, setTheme] = useAddonState(`${ADDON_ID}/theme`, themeId)\n\n const channel = addons.getChannel()\n\n const setActiveTheme = (themeId: string) => {\n channel.emit(EVENTS.SET_THEME, !themeId ? '1' : themeId)\n setTheme(themeId)\n }\n\n return (\n <WithTooltip\n placement=\"top\"\n closeOnOutsideClick\n trigger=\"click\"\n tooltip={({ onHide }) => (\n <TooltipLinkList\n links={[\n {\n id: '0',\n title: 'Chakra UI',\n onClick: () => {\n setActiveTheme('0')\n onHide()\n },\n },\n {\n id: '1',\n title: 'Saas UI',\n onClick: () => {\n setActiveTheme('1')\n onHide()\n },\n },\n {\n id: '2',\n title: 'Glass',\n onClick: () => {\n setActiveTheme('2')\n onHide()\n },\n },\n ]}\n />\n )}\n >\n <IconButton title=\"Select theme\">\n <Icons icon=\"eye\" /> {themes[theme || '1']}\n </IconButton>\n </WithTooltip>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/constants.ts","../src/color-mode/ColorModeTool.tsx","../src/direction/DirectionTool.tsx","../src/theme/ThemeTool.tsx","../src/manager.ts"],"names":["ADDON_ID","COLOR_MODE_TOOL_ID","DIRECTION_TOOL_ID","THEME_TOOL_ID","EVENTS","MoonIcon","jsx","SunIcon","jsxs","ColorModeTool","isDarkMode","darkMode","setDarkMode","g","channel","addons","IconButton","prev","LTRIcon","props","RTLIcon","DirectionTool","globals","setGlobals","useGlobals","direction","setDirection","useAddonState","targetDirection","useEffect","toggleDirection","useCallback","themes","ThemeTool","themeId","theme","setTheme","setActiveTheme","WithTooltip","onHide","TooltipLinkList","Icons","api","match","viewMode","types"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,CAAAA,CAAW,2BACXC,CAAAA,CAAAA,CAAqB,GAAGD,CAAQ,CAAA,gBAAA,CAAA,CAChCE,CAAoB,CAAA,CAAA,EAAGF,CAAQ,CAC/BG,eAAAA,CAAAA,CAAAA,CAAAA,CAAgB,CAAGH,EAAAA,CAAQ,CAE3BI,WAAAA,CAAAA,CAAAA,CAAAA,CAAS,CACpB,iBAAA,CAAmB,GAAGJ,CAAQ,CAAA,gBAAA,CAAA,CAC9B,gBAAkB,CAAA,CAAA,EAAGA,CAAQ,CAC7B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ApB,CAAAA,iBAAAA,CAAO,QAASf,CAAAA,CAAAA,CAAW0C,GAAQ,CACjC,IAAMC,CAAQ,CAAA,CAAC,CAAE,QAAAC,CAAAA,CAAS,CACxB,GAAA,CAAA,EAAQA,GAAYA,CAAS,CAAA,KAAA,CAAM,gBAAgB,CAAA,CAAA,CAErD7B,kBAAO,GAAIb,CAAAA,CAAAA,CAAmB,CAC5B,IAAA,CAAM2C,iBAAM,IACZ,CAAA,KAAA,CAAO,WACP,CAAA,MAAA,CAAQxB,CACR,CAAA,KAAA,CAAAsB,CACF,CAAC,EAED5B,iBAAO,CAAA,GAAA,CAAId,CAAoB,CAAA,CAC7B,KAAM4C,gBAAM,CAAA,IAAA,CACZ,KAAO,CAAA,YAAA,CACP,OAAQpC,CACR,CAAA,KAAA,CAAAkC,CACF,CAAC,EAED5B,iBAAO,CAAA,GAAA,CAAIZ,CAAe,CAAA,CACxB,KAAM0C,gBAAM,CAAA,IAAA,CACZ,KAAO,CAAA,OAAA,CACP,OAAQZ,CACR,CAAA,KAAA,CAAAU,CACF,CAAC,EACH,CAAC,CAAA","file":"manager.cjs","sourcesContent":["export const ADDON_ID = '@saas-ui/storybook-addon2'\nexport const COLOR_MODE_TOOL_ID = `${ADDON_ID}/color-mode-tool`\nexport const DIRECTION_TOOL_ID = `${ADDON_ID}/direction-tool`\nexport const THEME_TOOL_ID = `${ADDON_ID}/theme-tool`\n\nexport const EVENTS = {\n TOGGLE_COLOR_MODE: `${ADDON_ID}/toggleColorMode`,\n TOGGLE_DIRECTION: `${ADDON_ID}/toggleDirection`,\n SET_THEME: `${ADDON_ID}/setTheme`,\n}\n","import * as React from 'react'\nimport { IconButton } from '@storybook/components'\nimport { addons } from '@storybook/manager-api'\n\nimport { EVENTS } from '../constants'\n\nconst MoonIcon = () => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <path\n fill=\"currentColor\"\n d=\"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z\"\n ></path>\n </svg>\n)\n\nconst SunIcon = () => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <g\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeWidth=\"2\"\n fill=\"none\"\n stroke=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"5\"></circle>\n <path d=\"M12 1v2\"></path>\n <path d=\"M12 21v2\"></path>\n <path d=\"M4.22 4.22l1.42 1.42\"></path>\n <path d=\"M18.36 18.36l1.42 1.42\"></path>\n <path d=\"M1 12h2\"></path>\n <path d=\"M21 12h2\"></path>\n <path d=\"M4.22 19.78l1.42-1.42\"></path>\n <path d=\"M18.36 5.64l1.42-1.42\"></path>\n </g>\n </svg>\n)\n\nexport const ColorModeTool = () => {\n const isDarkMode = localStorage.getItem('chakra-ui-color-mode') === 'dark'\n\n const [darkMode, setDarkMode] = React.useState(isDarkMode)\n\n const channel = addons.getChannel()\n\n const handleToggle = () => {\n channel.emit(EVENTS.TOGGLE_COLOR_MODE, !darkMode ? 'dark' : 'light')\n setDarkMode((prev) => !prev)\n }\n\n return (\n <IconButton\n title={`Set color mode to ${darkMode ? 'light' : 'dark'}`}\n active={darkMode}\n onClick={handleToggle}\n >\n {darkMode ? <SunIcon /> : <MoonIcon />}\n </IconButton>\n )\n}\n","import { useCallback, useEffect } from 'react'\nimport { addons, useAddonState, useGlobals } from '@storybook/manager-api'\nimport { IconButton } from '@storybook/components'\nimport { DIRECTION_TOOL_ID, EVENTS } from '../constants'\n\nconst LTRIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n style={{\n transform: 'scale(1.2)',\n }}\n {...props}\n >\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n <path d=\"M9 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2H9C6.79 2 5 3.79 5 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zm0 12v3H5v2h12v3l4-4-4-4z\" />\n </svg>\n)\n\nconst RTLIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n style={{\n transform: 'scale(1.2)',\n }}\n {...props}\n >\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n <path d=\"M10 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zM8 14l-4 4 4 4v-3h12v-2H8v-3z\" />\n </svg>\n)\n\n/**\n * This component is rendered in the Storybook toolbar\n */\nexport const DirectionTool = () => {\n const [globals, setGlobals] = useGlobals()\n const [direction, setDirection] = useAddonState(\n DIRECTION_TOOL_ID,\n globals[DIRECTION_TOOL_ID] || 'ltr'\n )\n const targetDirection = direction !== 'ltr' ? 'ltr' : 'rtl'\n useEffect(() => {\n setGlobals({ [DIRECTION_TOOL_ID]: direction })\n }, [direction, setGlobals])\n\n const toggleDirection = useCallback(() => {\n const channel = addons.getChannel()\n channel.emit(EVENTS.TOGGLE_DIRECTION, targetDirection)\n setDirection(targetDirection)\n }, [setDirection, targetDirection])\n\n return (\n <IconButton\n active={direction === 'rtl'}\n title={`Set layout direction to ${targetDirection}`}\n onClick={toggleDirection}\n >\n {targetDirection === 'ltr' ? <LTRIcon /> : <RTLIcon />}\n </IconButton>\n )\n}\n","import {\n IconButton,\n WithTooltip,\n TooltipLinkList,\n Icons,\n} from '@storybook/components'\nimport { ADDON_ID, EVENTS } from '../constants'\nimport { addons } from '@storybook/preview-api'\nimport { useAddonState } from '@storybook/manager-api'\n\nconst themes: Record<string, string> = {\n 0: 'Chakra UI',\n 1: 'Saas UI',\n 2: 'Glass',\n}\n\n/**\n * This component is rendered in the Storybook toolbar\n */\nexport const ThemeTool = () => {\n const themeId = localStorage.getItem('saas-ui-theme')\n const [theme, setTheme] = useAddonState(`${ADDON_ID}/theme`, themeId)\n\n const channel = addons.getChannel()\n\n const setActiveTheme = (themeId: string) => {\n channel.emit(EVENTS.SET_THEME, !themeId ? '1' : themeId)\n setTheme(themeId)\n }\n\n return (\n <WithTooltip\n placement=\"top\"\n closeOnOutsideClick\n trigger=\"click\"\n tooltip={({ onHide }) => (\n <TooltipLinkList\n links={[\n {\n id: '0',\n title: 'Chakra UI',\n onClick: () => {\n setActiveTheme('0')\n onHide()\n },\n },\n {\n id: '1',\n title: 'Saas UI',\n onClick: () => {\n setActiveTheme('1')\n onHide()\n },\n },\n {\n id: '2',\n title: 'Glass',\n onClick: () => {\n setActiveTheme('2')\n onHide()\n },\n },\n ]}\n />\n )}\n >\n <IconButton title=\"Select theme\">\n <Icons icon=\"eye\" /> {themes[theme || '1']}\n </IconButton>\n </WithTooltip>\n )\n}\n","import { addons, types } from '@storybook/manager-api'\nimport {\n ADDON_ID,\n COLOR_MODE_TOOL_ID,\n DIRECTION_TOOL_ID,\n THEME_TOOL_ID,\n} from './constants'\nimport { ColorModeTool } from './color-mode/ColorModeTool'\nimport { DirectionTool } from './direction/DirectionTool'\nimport { ThemeTool } from './theme/ThemeTool'\n\naddons.register(ADDON_ID, (api) => {\n const match = ({ viewMode }: { viewMode?: string }) =>\n Boolean(viewMode && viewMode.match(/^(story|docs)$/))\n\n addons.add(DIRECTION_TOOL_ID, {\n type: types.TOOL,\n title: 'Direction',\n render: DirectionTool,\n match,\n })\n\n addons.add(COLOR_MODE_TOOL_ID, {\n type: types.TOOL,\n title: 'Color Mode',\n render: ColorModeTool,\n match,\n })\n\n addons.add(THEME_TOOL_ID, {\n type: types.TOOL,\n title: 'Theme',\n render: ThemeTool,\n match,\n })\n})\n"]}
package/dist/manager.js CHANGED
@@ -6,5 +6,5 @@ import { jsx, jsxs } from 'react/jsx-runtime';
6
6
  import { addons as addons$1 } from '@storybook/preview-api';
7
7
 
8
8
  var c="@saas-ui/storybook-addon2",T=`${c}/color-mode-tool`,a=`${c}/direction-tool`,O=`${c}/theme-tool`,h={TOGGLE_COLOR_MODE:`${c}/toggleColorMode`,TOGGLE_DIRECTION:`${c}/toggleDirection`,SET_THEME:`${c}/setTheme`};var M=()=>jsx("svg",{viewBox:"0 0 24 24",focusable:"false",children:jsx("path",{fill:"currentColor",d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z"})}),k=()=>jsx("svg",{viewBox:"0 0 24 24",focusable:"false",children:jsxs("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[jsx("circle",{cx:"12",cy:"12",r:"5"}),jsx("path",{d:"M12 1v2"}),jsx("path",{d:"M12 21v2"}),jsx("path",{d:"M4.22 4.22l1.42 1.42"}),jsx("path",{d:"M18.36 18.36l1.42 1.42"}),jsx("path",{d:"M1 12h2"}),jsx("path",{d:"M21 12h2"}),jsx("path",{d:"M4.22 19.78l1.42-1.42"}),jsx("path",{d:"M18.36 5.64l1.42-1.42"})]})}),C=()=>{let n=localStorage.getItem("chakra-ui-color-mode")==="dark",[o,e]=g.useState(n),s=addons.getChannel();return jsx(IconButton,{title:`Set color mode to ${o?"light":"dark"}`,active:o,onClick:()=>{s.emit(h.TOGGLE_COLOR_MODE,o?"light":"dark"),e(r=>!r);},children:o?jsx(k,{}):jsx(M,{})})};var N=n=>jsxs("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",style:{transform:"scale(1.2)"},...n,children:[jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),jsx("path",{d:"M9 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2H9C6.79 2 5 3.79 5 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zm0 12v3H5v2h12v3l4-4-4-4z"})]}),y=n=>jsxs("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",style:{transform:"scale(1.2)"},...n,children:[jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),jsx("path",{d:"M10 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zM8 14l-4 4 4 4v-3h12v-2H8v-3z"})]}),I=()=>{let[n,o]=useGlobals(),[e,s]=useAddonState(a,n[a]||"ltr"),l=e!=="ltr"?"ltr":"rtl";useEffect(()=>{o({[a]:e});},[e,o]);let r=useCallback(()=>{addons.getChannel().emit(h.TOGGLE_DIRECTION,l),s(l);},[s,l]);return jsx(IconButton,{active:e==="rtl",title:`Set layout direction to ${l}`,onClick:r,children:l==="ltr"?jsx(N,{}):jsx(y,{})})};var w={0:"Chakra UI",1:"Saas UI",2:"Glass"},E=()=>{let n=localStorage.getItem("saas-ui-theme"),[o,e]=useAddonState(`${c}/theme`,n),s=addons$1.getChannel(),l=r=>{s.emit(h.SET_THEME,r||"1"),e(r);};return jsx(WithTooltip,{placement:"top",closeOnOutsideClick:!0,trigger:"click",tooltip:({onHide:r})=>jsx(TooltipLinkList,{links:[{id:"0",title:"Chakra UI",onClick:()=>{l("0"),r();}},{id:"1",title:"Saas UI",onClick:()=>{l("1"),r();}},{id:"2",title:"Glass",onClick:()=>{l("2"),r();}}]}),children:jsxs(IconButton,{title:"Select theme",children:[jsx(Icons,{icon:"eye"})," ",w[o||"1"]]})})};addons.register(c,n=>{let o=({viewMode:e})=>!!(e&&e.match(/^(story|docs)$/));addons.add(a,{type:types.TOOL,title:"Direction",render:I,match:o}),addons.add(T,{type:types.TOOL,title:"Color Mode",render:C,match:o}),addons.add(O,{type:types.TOOL,title:"Theme",render:E,match:o});});
9
- //# sourceMappingURL=out.js.map
9
+ //# sourceMappingURL=manager.js.map
10
10
  //# sourceMappingURL=manager.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/manager.ts","../src/constants.ts","../src/color-mode/ColorModeTool.tsx","../src/direction/DirectionTool.tsx","../src/theme/ThemeTool.tsx"],"names":["addons","types","ADDON_ID","COLOR_MODE_TOOL_ID","DIRECTION_TOOL_ID","THEME_TOOL_ID","EVENTS","React","IconButton","jsx","jsxs","MoonIcon","SunIcon","ColorModeTool","isDarkMode","darkMode","setDarkMode","channel","prev","useCallback","useEffect","useAddonState","useGlobals","LTRIcon","props","RTLIcon","DirectionTool","globals","setGlobals","direction","setDirection","targetDirection","toggleDirection","WithTooltip","TooltipLinkList","Icons","themes","ThemeTool","themeId","theme","setTheme","setActiveTheme","onHide","api","match","viewMode"],"mappings":"AAAA,OAAS,UAAAA,EAAQ,SAAAC,MAAa,yBCAvB,IAAMC,EAAW,4BACXC,EAAqB,GAAGD,CAAQ,mBAChCE,EAAoB,GAAGF,CAAQ,kBAC/BG,EAAgB,GAAGH,CAAQ,cAE3BI,EAAS,CACpB,kBAAmB,GAAGJ,CAAQ,mBAC9B,iBAAkB,GAAGA,CAAQ,mBAC7B,UAAW,GAAGA,CAAQ,WACxB,ECTA,UAAYK,MAAW,QACvB,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,UAAAR,MAAc,yBAMnB,cAAAS,EASA,QAAAC,MATA,oBAFJ,IAAMC,EAAW,IACfF,EAAC,OAAI,QAAQ,YAAY,UAAU,QACjC,SAAAA,EAAC,QACC,KAAK,e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,SAAUoC,CAAO,EAE9DrB,EAAUjB,EAAO,WAAW,EAE5ByC,EAAkBH,GAAoB,CAC1CrB,EAAQ,KAAKX,EAAO,UAAYgC,GAAU,GAAa,EACvDE,EAASF,CAAO,CAClB,EAEA,OACE7B,EAACwB,EAAA,CACC,UAAU,MACV,oBAAmB,GACnB,QAAQ,QACR,QAAS,CAAC,CAAE,OAAAS,CAAO,IACjBjC,EAACyB,EAAA,CACC,MAAO,CACL,CACE,GAAI,IACJ,MAAO,YACP,QAAS,IAAM,CACbO,EAAe,GAAG,EAClBC,EAAO,CACT,CACF,EACA,CACE,GAAI,IACJ,MAAO,UACP,QAAS,IAAM,CACbD,EAAe,GAAG,EAClBC,EAAO,CACT,CACF,EACA,CACE,GAAI,IACJ,MAAO,QACP,QAAS,IAAM,CACbD,EAAe,GAAG,EAClBC,EAAO,CACT,CACF,CACF,EACF,EAGF,SAAAhC,EAACF,EAAA,CAAW,MAAM,eAChB,UAAAC,EAAC0B,EAAA,CAAM,KAAK,MAAM,EAAE,IAAEC,EAAOG,GAAS,GAAG,GAC3C,EACF,CAEJ,EJ5DAvC,EAAO,SAASE,EAAWyC,GAAQ,CACjC,IAAMC,EAAQ,CAAC,CAAE,SAAAC,CAAS,IACxB,GAAQA,GAAYA,EAAS,MAAM,gBAAgB,GAErD7C,EAAO,IAAII,EAAmB,CAC5B,KAAMH,EAAM,KACZ,MAAO,YACP,OAAQyB,EACR,MAAAkB,CACF,CAAC,EAED5C,EAAO,IAAIG,EAAoB,CAC7B,KAAMF,EAAM,KACZ,MAAO,aACP,OAAQY,EACR,MAAA+B,CACF,CAAC,EAED5C,EAAO,IAAIK,EAAe,CACxB,KAAMJ,EAAM,KACZ,MAAO,QACP,OAAQoC,EACR,MAAAO,CACF,CAAC,CACH,CAAC","sourcesContent":["import { addons, types } from '@storybook/manager-api'\nimport {\n ADDON_ID,\n COLOR_MODE_TOOL_ID,\n DIRECTION_TOOL_ID,\n THEME_TOOL_ID,\n} from './constants'\nimport { ColorModeTool } from './color-mode/ColorModeTool'\nimport { DirectionTool } from './direction/DirectionTool'\nimport { ThemeTool } from './theme/ThemeTool'\n\naddons.register(ADDON_ID, (api) => {\n const match = ({ viewMode }: { viewMode?: string }) =>\n Boolean(viewMode && viewMode.match(/^(story|docs)$/))\n\n addons.add(DIRECTION_TOOL_ID, {\n type: types.TOOL,\n title: 'Direction',\n render: DirectionTool,\n match,\n })\n\n addons.add(COLOR_MODE_TOOL_ID, {\n type: types.TOOL,\n title: 'Color Mode',\n render: ColorModeTool,\n match,\n })\n\n addons.add(THEME_TOOL_ID, {\n type: types.TOOL,\n title: 'Theme',\n render: ThemeTool,\n match,\n })\n})\n","export const ADDON_ID = '@saas-ui/storybook-addon2'\nexport const COLOR_MODE_TOOL_ID = `${ADDON_ID}/color-mode-tool`\nexport const DIRECTION_TOOL_ID = `${ADDON_ID}/direction-tool`\nexport const THEME_TOOL_ID = `${ADDON_ID}/theme-tool`\n\nexport const EVENTS = {\n TOGGLE_COLOR_MODE: `${ADDON_ID}/toggleColorMode`,\n TOGGLE_DIRECTION: `${ADDON_ID}/toggleDirection`,\n SET_THEME: `${ADDON_ID}/setTheme`,\n}\n","import * as React from 'react'\nimport { IconButton } from '@storybook/components'\nimport { addons } from '@storybook/manager-api'\n\nimport { EVENTS } from '../constants'\n\nconst MoonIcon = () => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <path\n fill=\"currentColor\"\n d=\"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z\"\n ></path>\n </svg>\n)\n\nconst SunIcon = () => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <g\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeWidth=\"2\"\n fill=\"none\"\n stroke=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"5\"></circle>\n <path d=\"M12 1v2\"></path>\n <path d=\"M12 21v2\"></path>\n <path d=\"M4.22 4.22l1.42 1.42\"></path>\n <path d=\"M18.36 18.36l1.42 1.42\"></path>\n <path d=\"M1 12h2\"></path>\n <path d=\"M21 12h2\"></path>\n <path d=\"M4.22 19.78l1.42-1.42\"></path>\n <path d=\"M18.36 5.64l1.42-1.42\"></path>\n </g>\n </svg>\n)\n\nexport const ColorModeTool = () => {\n const isDarkMode = localStorage.getItem('chakra-ui-color-mode') === 'dark'\n\n const [darkMode, setDarkMode] = React.useState(isDarkMode)\n\n const channel = addons.getChannel()\n\n const handleToggle = () => {\n channel.emit(EVENTS.TOGGLE_COLOR_MODE, !darkMode ? 'dark' : 'light')\n setDarkMode((prev) => !prev)\n }\n\n return (\n <IconButton\n title={`Set color mode to ${darkMode ? 'light' : 'dark'}`}\n active={darkMode}\n onClick={handleToggle}\n >\n {darkMode ? <SunIcon /> : <MoonIcon />}\n </IconButton>\n )\n}\n","import { useCallback, useEffect } from 'react'\nimport { addons, useAddonState, useGlobals } from '@storybook/manager-api'\nimport { IconButton } from '@storybook/components'\nimport { DIRECTION_TOOL_ID, EVENTS } from '../constants'\n\nconst LTRIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n style={{\n transform: 'scale(1.2)',\n }}\n {...props}\n >\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n <path d=\"M9 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2H9C6.79 2 5 3.79 5 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zm0 12v3H5v2h12v3l4-4-4-4z\" />\n </svg>\n)\n\nconst RTLIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n style={{\n transform: 'scale(1.2)',\n }}\n {...props}\n >\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n <path d=\"M10 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zM8 14l-4 4 4 4v-3h12v-2H8v-3z\" />\n </svg>\n)\n\n/**\n * This component is rendered in the Storybook toolbar\n */\nexport const DirectionTool = () => {\n const [globals, setGlobals] = useGlobals()\n const [direction, setDirection] = useAddonState(\n DIRECTION_TOOL_ID,\n globals[DIRECTION_TOOL_ID] || 'ltr'\n )\n const targetDirection = direction !== 'ltr' ? 'ltr' : 'rtl'\n useEffect(() => {\n setGlobals({ [DIRECTION_TOOL_ID]: direction })\n }, [direction, setGlobals])\n\n const toggleDirection = useCallback(() => {\n const channel = addons.getChannel()\n channel.emit(EVENTS.TOGGLE_DIRECTION, targetDirection)\n setDirection(targetDirection)\n }, [setDirection, targetDirection])\n\n return (\n <IconButton\n active={direction === 'rtl'}\n title={`Set layout direction to ${targetDirection}`}\n onClick={toggleDirection}\n >\n {targetDirection === 'ltr' ? <LTRIcon /> : <RTLIcon />}\n </IconButton>\n )\n}\n","import {\n IconButton,\n WithTooltip,\n TooltipLinkList,\n Icons,\n} from '@storybook/components'\nimport { ADDON_ID, EVENTS } from '../constants'\nimport { addons } from '@storybook/preview-api'\nimport { useAddonState } from '@storybook/manager-api'\n\nconst themes: Record<string, string> = {\n 0: 'Chakra UI',\n 1: 'Saas UI',\n 2: 'Glass',\n}\n\n/**\n * This component is rendered in the Storybook toolbar\n */\nexport const ThemeTool = () => {\n const themeId = localStorage.getItem('saas-ui-theme')\n const [theme, setTheme] = useAddonState(`${ADDON_ID}/theme`, themeId)\n\n const channel = addons.getChannel()\n\n const setActiveTheme = (themeId: string) => {\n channel.emit(EVENTS.SET_THEME, !themeId ? '1' : themeId)\n setTheme(themeId)\n }\n\n return (\n <WithTooltip\n placement=\"top\"\n closeOnOutsideClick\n trigger=\"click\"\n tooltip={({ onHide }) => (\n <TooltipLinkList\n links={[\n {\n id: '0',\n title: 'Chakra UI',\n onClick: () => {\n setActiveTheme('0')\n onHide()\n },\n },\n {\n id: '1',\n title: 'Saas UI',\n onClick: () => {\n setActiveTheme('1')\n onHide()\n },\n },\n {\n id: '2',\n title: 'Glass',\n onClick: () => {\n setActiveTheme('2')\n onHide()\n },\n },\n ]}\n />\n )}\n >\n <IconButton title=\"Select theme\">\n <Icons icon=\"eye\" /> {themes[theme || '1']}\n </IconButton>\n </WithTooltip>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/constants.ts","../src/color-mode/ColorModeTool.tsx","../src/direction/DirectionTool.tsx","../src/theme/ThemeTool.tsx","../src/manager.ts"],"names":["ADDON_ID","COLOR_MODE_TOOL_ID","DIRECTION_TOOL_ID","THEME_TOOL_ID","EVENTS","MoonIcon","jsx","SunIcon","jsxs","ColorModeTool","isDarkMode","darkMode","setDarkMode","channel","addons","IconButton","prev","LTRIcon","props","RTLIcon","DirectionTool","globals","setGlobals","useGlobals","direction","setDirection","useAddonState","targetDirection","useEffect","toggleDirection","useCallback","themes","ThemeTool","themeId","theme","setTheme","setActiveTheme","WithTooltip","onHide","TooltipLinkList","Icons","api","match","viewMode","types"],"mappings":";;;;;;;AAAO,IAAMA,CAAAA,CAAW,2BACXC,CAAAA,CAAAA,CAAqB,GAAGD,CAAQ,CAAA,gBAAA,CAAA,CAChCE,CAAoB,CAAA,CAAA,EAAGF,CAAQ,CAC/BG,eAAAA,CAAAA,CAAAA,CAAAA,CAAgB,CAAGH,EAAAA,CAAQ,CAE3BI,WAAAA,CAAAA,CAAAA,CAAAA,CAAS,CACpB,iBAAA,CAAmB,GAAGJ,CAAQ,CAAA,gBAAA,CAAA,CAC9B,g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A,CAAA,CACF,CAEJ,CC5DApB,CAAAA,MAAAA,CAAO,QAASd,CAAAA,CAAAA,CAAWyC,GAAQ,CACjC,IAAMC,CAAQ,CAAA,CAAC,CAAE,QAAAC,CAAAA,CAAS,CACxB,GAAA,CAAA,EAAQA,GAAYA,CAAS,CAAA,KAAA,CAAM,gBAAgB,CAAA,CAAA,CAErD7B,OAAO,GAAIZ,CAAAA,CAAAA,CAAmB,CAC5B,IAAA,CAAM0C,MAAM,IACZ,CAAA,KAAA,CAAO,WACP,CAAA,MAAA,CAAQxB,CACR,CAAA,KAAA,CAAAsB,CACF,CAAC,EAED5B,MAAO,CAAA,GAAA,CAAIb,CAAoB,CAAA,CAC7B,KAAM2C,KAAM,CAAA,IAAA,CACZ,KAAO,CAAA,YAAA,CACP,OAAQnC,CACR,CAAA,KAAA,CAAAiC,CACF,CAAC,EAED5B,MAAO,CAAA,GAAA,CAAIX,CAAe,CAAA,CACxB,KAAMyC,KAAM,CAAA,IAAA,CACZ,KAAO,CAAA,OAAA,CACP,OAAQZ,CACR,CAAA,KAAA,CAAAU,CACF,CAAC,EACH,CAAC,CAAA","file":"manager.js","sourcesContent":["export const ADDON_ID = '@saas-ui/storybook-addon2'\nexport const COLOR_MODE_TOOL_ID = `${ADDON_ID}/color-mode-tool`\nexport const DIRECTION_TOOL_ID = `${ADDON_ID}/direction-tool`\nexport const THEME_TOOL_ID = `${ADDON_ID}/theme-tool`\n\nexport const EVENTS = {\n TOGGLE_COLOR_MODE: `${ADDON_ID}/toggleColorMode`,\n TOGGLE_DIRECTION: `${ADDON_ID}/toggleDirection`,\n SET_THEME: `${ADDON_ID}/setTheme`,\n}\n","import * as React from 'react'\nimport { IconButton } from '@storybook/components'\nimport { addons } from '@storybook/manager-api'\n\nimport { EVENTS } from '../constants'\n\nconst MoonIcon = () => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <path\n fill=\"currentColor\"\n d=\"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z\"\n ></path>\n </svg>\n)\n\nconst SunIcon = () => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <g\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeWidth=\"2\"\n fill=\"none\"\n stroke=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"5\"></circle>\n <path d=\"M12 1v2\"></path>\n <path d=\"M12 21v2\"></path>\n <path d=\"M4.22 4.22l1.42 1.42\"></path>\n <path d=\"M18.36 18.36l1.42 1.42\"></path>\n <path d=\"M1 12h2\"></path>\n <path d=\"M21 12h2\"></path>\n <path d=\"M4.22 19.78l1.42-1.42\"></path>\n <path d=\"M18.36 5.64l1.42-1.42\"></path>\n </g>\n </svg>\n)\n\nexport const ColorModeTool = () => {\n const isDarkMode = localStorage.getItem('chakra-ui-color-mode') === 'dark'\n\n const [darkMode, setDarkMode] = React.useState(isDarkMode)\n\n const channel = addons.getChannel()\n\n const handleToggle = () => {\n channel.emit(EVENTS.TOGGLE_COLOR_MODE, !darkMode ? 'dark' : 'light')\n setDarkMode((prev) => !prev)\n }\n\n return (\n <IconButton\n title={`Set color mode to ${darkMode ? 'light' : 'dark'}`}\n active={darkMode}\n onClick={handleToggle}\n >\n {darkMode ? <SunIcon /> : <MoonIcon />}\n </IconButton>\n )\n}\n","import { useCallback, useEffect } from 'react'\nimport { addons, useAddonState, useGlobals } from '@storybook/manager-api'\nimport { IconButton } from '@storybook/components'\nimport { DIRECTION_TOOL_ID, EVENTS } from '../constants'\n\nconst LTRIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n style={{\n transform: 'scale(1.2)',\n }}\n {...props}\n >\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n <path d=\"M9 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2H9C6.79 2 5 3.79 5 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zm0 12v3H5v2h12v3l4-4-4-4z\" />\n </svg>\n)\n\nconst RTLIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n style={{\n transform: 'scale(1.2)',\n }}\n {...props}\n >\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\" />\n <path d=\"M10 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zM8 14l-4 4 4 4v-3h12v-2H8v-3z\" />\n </svg>\n)\n\n/**\n * This component is rendered in the Storybook toolbar\n */\nexport const DirectionTool = () => {\n const [globals, setGlobals] = useGlobals()\n const [direction, setDirection] = useAddonState(\n DIRECTION_TOOL_ID,\n globals[DIRECTION_TOOL_ID] || 'ltr'\n )\n const targetDirection = direction !== 'ltr' ? 'ltr' : 'rtl'\n useEffect(() => {\n setGlobals({ [DIRECTION_TOOL_ID]: direction })\n }, [direction, setGlobals])\n\n const toggleDirection = useCallback(() => {\n const channel = addons.getChannel()\n channel.emit(EVENTS.TOGGLE_DIRECTION, targetDirection)\n setDirection(targetDirection)\n }, [setDirection, targetDirection])\n\n return (\n <IconButton\n active={direction === 'rtl'}\n title={`Set layout direction to ${targetDirection}`}\n onClick={toggleDirection}\n >\n {targetDirection === 'ltr' ? <LTRIcon /> : <RTLIcon />}\n </IconButton>\n )\n}\n","import {\n IconButton,\n WithTooltip,\n TooltipLinkList,\n Icons,\n} from '@storybook/components'\nimport { ADDON_ID, EVENTS } from '../constants'\nimport { addons } from '@storybook/preview-api'\nimport { useAddonState } from '@storybook/manager-api'\n\nconst themes: Record<string, string> = {\n 0: 'Chakra UI',\n 1: 'Saas UI',\n 2: 'Glass',\n}\n\n/**\n * This component is rendered in the Storybook toolbar\n */\nexport const ThemeTool = () => {\n const themeId = localStorage.getItem('saas-ui-theme')\n const [theme, setTheme] = useAddonState(`${ADDON_ID}/theme`, themeId)\n\n const channel = addons.getChannel()\n\n const setActiveTheme = (themeId: string) => {\n channel.emit(EVENTS.SET_THEME, !themeId ? '1' : themeId)\n setTheme(themeId)\n }\n\n return (\n <WithTooltip\n placement=\"top\"\n closeOnOutsideClick\n trigger=\"click\"\n tooltip={({ onHide }) => (\n <TooltipLinkList\n links={[\n {\n id: '0',\n title: 'Chakra UI',\n onClick: () => {\n setActiveTheme('0')\n onHide()\n },\n },\n {\n id: '1',\n title: 'Saas UI',\n onClick: () => {\n setActiveTheme('1')\n onHide()\n },\n },\n {\n id: '2',\n title: 'Glass',\n onClick: () => {\n setActiveTheme('2')\n onHide()\n },\n },\n ]}\n />\n )}\n >\n <IconButton title=\"Select theme\">\n <Icons icon=\"eye\" /> {themes[theme || '1']}\n </IconButton>\n </WithTooltip>\n )\n}\n","import { addons, types } from '@storybook/manager-api'\nimport {\n ADDON_ID,\n COLOR_MODE_TOOL_ID,\n DIRECTION_TOOL_ID,\n THEME_TOOL_ID,\n} from './constants'\nimport { ColorModeTool } from './color-mode/ColorModeTool'\nimport { DirectionTool } from './direction/DirectionTool'\nimport { ThemeTool } from './theme/ThemeTool'\n\naddons.register(ADDON_ID, (api) => {\n const match = ({ viewMode }: { viewMode?: string }) =>\n Boolean(viewMode && viewMode.match(/^(story|docs)$/))\n\n addons.add(DIRECTION_TOOL_ID, {\n type: types.TOOL,\n title: 'Direction',\n render: DirectionTool,\n match,\n })\n\n addons.add(COLOR_MODE_TOOL_ID, {\n type: types.TOOL,\n title: 'Color Mode',\n render: ColorModeTool,\n match,\n })\n\n addons.add(THEME_TOOL_ID, {\n type: types.TOOL,\n title: 'Theme',\n render: ThemeTool,\n match,\n })\n})\n"]}
package/dist/preview.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var q = require('react');
3
+ var j = require('react');
4
4
  var react = require('@chakra-ui/react');
5
5
  var previewApi = require('@storybook/preview-api');
6
6
  var react$1 = require('@saas-ui/react');
@@ -24,10 +24,10 @@ function _interopNamespace(e) {
24
24
  return Object.freeze(n);
25
25
  }
26
26
 
27
- var q__namespace = /*#__PURE__*/_interopNamespace(q);
27
+ var j__namespace = /*#__PURE__*/_interopNamespace(j);
28
28
 
29
- var Rt=Object.create;var le=Object.defineProperty;var It=Object.getOwnPropertyDescriptor;var $t=Object.getOwnPropertyNames;var zt=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty;var Ot=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Bt=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $t(e))!Et.call(r,n)&&n!==t&&le(r,n,{get:()=>e[n],enumerable:!(o=It(e,n))||o.enumerable});return r};var ir=(r,e,t)=>(t=r!=null?Rt(zt(r)):{},Bt(e||!r||!r.__esModule?le(t,"default",{value:r,enumerable:!0}):t,r));var Z=Ot((U,V)=>{var sa=200,ke="__lodash_hash_undefined__",la=800,ca=16,xe=9007199254740991,Te="[object Arguments]",da="[object Array]",ua="[object AsyncFunction]",fa="[object Boolean]",pa="[object Date]",ba="[object Error]",we="[object Function]",ga="[object GeneratorFunction]",ma="[object Map]",ha="[object Number]",ya="[object Null]",Ce="[object Object]",va="[object Proxy]",_a="[object RegExp]",Sa="[object Set]",ka="[object String]",xa="[object Undefined]",Ta="[object WeakMap]",wa="[object ArrayBuffer]",Ca="[object DataView]",Aa="[object Float32Array]",Ra="[object Float64Array]",Ia="[object Int8Array]",$a="[object Int16Array]",za="[object Int32Array]",Ea="[object Uint8Array]",Oa="[object Uint8ClampedArray]",Ba="[object Uint16Array]",ja="[object Uint32Array]",Ma=/[\\^$.*+?()[\]{}|]/g,Pa=/^\[object .+?Constructor\]$/,Wa=/^(?:0|[1-9]\d*)$/,m={};m[Aa]=m[Ra]=m[Ia]=m[$a]=m[za]=m[Ea]=m[Oa]=m[Ba]=m[ja]=!0;m[Te]=m[da]=m[wa]=m[fa]=m[Ca]=m[pa]=m[ba]=m[we]=m[ma]=m[ha]=m[Ce]=m[_a]=m[Sa]=m[ka]=m[Ta]=!1;var Ae=typeof global=="object"&&global&&global.Object===Object&&global,Fa=typeof self=="object"&&self&&self.Object===Object&&self,K=Ae||Fa||Function("return this")(),Re=typeof U=="object"&&U&&!U.nodeType&&U,X=Re&&typeof V=="object"&&V&&!V.nodeType&&V,Ie=X&&X.exports===Re,Br=Ie&&Ae.process,pe=function(){try{var r=X&&X.require&&X.require("util").types;return r||Br&&Br.binding&&Br.binding("util")}catch{}}(),be=pe&&pe.isTypedArray;function Da(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function Va(r,e){for(var t=-1,o=Array(r);++t<r;)o[t]=e(t);return o}function La(r){return function(e){return r(e)}}function Na(r,e){return r==null?void 0:r[e]}function Ha(r,e){return function(t){return r(e(t))}}var Ga=Array.prototype,qa=Function.prototype,dr=Object.prototype,jr=K["__core-js_shared__"],ur=qa.toString,R=dr.hasOwnProperty,ge=function(){var r=/[^.]+$/.exec(jr&&jr.keys&&jr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),$e=dr.toString,Ua=ur.call(Object),Xa=RegExp("^"+ur.call(R).replace(Ma,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lr=Ie?K.Buffer:void 0,me=K.Symbol,he=K.Uint8Array,ye=lr?lr.allocUnsafe:void 0,ze=Ha(Object.getPrototypeOf,Object),ve=Object.create,Ya=dr.propertyIsEnumerable,Ka=Ga.splice,O=me?me.toStringTag:void 0,cr=function(){try{var r=Vr(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Qa=lr?lr.isBuffer:void 0,_e=Math.max,Za=Date.now,Ee=Vr(K,"Map"),Y=Vr(Object,"create"),Ja=function(){function r(){}return function(e){if(!j(e))return {};if(ve)return ve(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function B(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var o=r[e];this.set(o[0],o[1]);}}function ro(){this.__data__=Y?Y(null):{},this.size=0;}function eo(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}function to(r){var e=this.__data__;if(Y){var t=e[r];return t===ke?void 0:t}return R.call(e,r)?e[r]:void 0}function ao(r){var e=this.__data__;return Y?e[r]!==void 0:R.call(e,r)}function oo(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Y&&e===void 0?ke:e,this}B.prototype.clear=ro;B.prototype.delete=eo;B.prototype.get=to;B.prototype.has=ao;B.prototype.set=oo;function I(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var o=r[e];this.set(o[0],o[1]);}}function no(){this.__data__=[],this.size=0;}function io(r){var e=this.__data__,t=fr(e,r);if(t<0)return !1;var o=e.length-1;return t==o?e.pop():Ka.call(e,t,1),--this.size,!0}function so(r){var e=this.__data__,t=fr(e,r);return t<0?void 0:e[t][1]}function lo(r){return fr(this.__data__,r)>-1}function co(r,e){var t=this.__data__,o=fr(t,r);return o<0?(++this.size,t.push([r,e])):t[o][1]=e,this}I.prototype.clear=no;I.prototype.delete=io;I.prototype.get=so;I.prototype.has=lo;I.prototype.set=co;function L(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var o=r[e];this.set(o[0],o[1]);}}function uo(){this.size=0,this.__data__={hash:new B,map:new(Ee||I),string:new B};}function fo(r){var e=br(this,r).delete(r);return this.size-=e?1:0,e}function po(r){return br(this,r).get(r)}function bo(r){return br(this,r).has(r)}function go(r,e){var t=br(this,r),o=t.size;return t.set(r,e),this.size+=t.size==o?0:1,this}L.prototype.clear=uo;L.prototype.delete=fo;L.prototype.get=po;L.prototype.has=bo;L.prototype.set=go;function N(r){var e=this.__data__=new I(r);this.size=e.size;}function mo(){this.__data__=new I,this.size=0;}function ho(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function yo(r){return this.__data__.get(r)}function vo(r){return this.__data__.has(r)}function _o(r,e){var t=this.__data__;if(t instanceof I){var o=t.__data__;if(!Ee||o.length<sa-1)return o.push([r,e]),this.size=++t.size,this;t=this.__data__=new L(o);}return t.set(r,e),this.size=t.size,this}N.prototype.clear=mo;N.prototype.delete=ho;N.prototype.get=yo;N.prototype.has=vo;N.prototype.set=_o;function So(r,e){var t=Fr(r),o=!t&&Wr(r),n=!t&&!o&&Me(r),i=!t&&!o&&!n&&We(r),l=t||o||n||i,s=l?Va(r.length,String):[],c=s.length;for(var d in r)(e||R.call(r,d))&&!(l&&(d=="length"||n&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Be(d,c)))&&s.push(d);return s}function Mr(r,e,t){(t!==void 0&&!gr(r[e],t)||t===void 0&&!(e in r))&&Dr(r,e,t);}function ko(r,e,t){var o=r[e];(!(R.call(r,e)&&gr(o,t))||t===void 0&&!(e in r))&&Dr(r,e,t);}function fr(r,e){for(var t=r.length;t--;)if(gr(r[t][0],e))return t;return -1}function Dr(r,e,t){e=="__proto__"&&cr?cr(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t;}var xo=Mo();function pr(r){return r==null?r===void 0?xa:ya:O&&O in Object(r)?Po(r):No(r)}function Se(r){return Q(r)&&pr(r)==Te}function To(r){if(!j(r)||Vo(r))return !1;var e=Nr(r)?Xa:Pa;return e.test(Uo(r))}function wo(r){return Q(r)&&Pe(r.length)&&!!m[pr(r)]}function Co(r){if(!j(r))return Lo(r);var e=je(r),t=[];for(var o in r)o=="constructor"&&(e||!R.call(r,o))||t.push(o);return t}function Oe(r,e,t,o,n){r!==e&&xo(e,function(i,l){if(n||(n=new N),j(i))Ao(r,e,l,t,Oe,o,n);else {var s=o?o(Pr(r,l),i,l+"",r,e,n):void 0;s===void 0&&(s=i),Mr(r,l,s);}},Fe);}function Ao(r,e,t,o,n,i,l){var s=Pr(r,t),c=Pr(e,t),d=l.get(c);if(d){Mr(r,t,d);return}var p=i?i(s,c,t+"",r,e,l):void 0,y=p===void 0;if(y){var _=Fr(c),k=!_&&Me(c),F=!_&&!k&&We(c);p=c,_||k||F?Fr(s)?p=s:Xo(s)?p=Oo(s):k?(y=!1,p=$o(c,!0)):F?(y=!1,p=Eo(c,!0)):p=[]:Yo(c)||Wr(c)?(p=s,Wr(s)?p=Ko(s):(!j(s)||Nr(s))&&(p=Wo(c))):y=!1;}y&&(l.set(c,p),n(p,c,o,i,l),l.delete(c)),Mr(r,t,p);}function Ro(r,e){return Go(Ho(r,e,De),r+"")}var Io=cr?function(r,e){return cr(r,"toString",{configurable:!0,enumerable:!1,value:Zo(e),writable:!0})}:De;function $o(r,e){if(e)return r.slice();var t=r.length,o=ye?ye(t):new r.constructor(t);return r.copy(o),o}function zo(r){var e=new r.constructor(r.byteLength);return new he(e).set(new he(r)),e}function Eo(r,e){var t=e?zo(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}function Oo(r,e){var t=-1,o=r.length;for(e||(e=Array(o));++t<o;)e[t]=r[t];return e}function Bo(r,e,t,o){var n=!t;t||(t={});for(var i=-1,l=e.length;++i<l;){var s=e[i],c=o?o(t[s],r[s],s,t,r):void 0;c===void 0&&(c=r[s]),n?Dr(t,s,c):ko(t,s,c);}return t}function jo(r){return Ro(function(e,t){var o=-1,n=t.length,i=n>1?t[n-1]:void 0,l=n>2?t[2]:void 0;for(i=r.length>3&&typeof i=="function"?(n--,i):void 0,l&&Fo(t[0],t[1],l)&&(i=n<3?void 0:i,n=1),e=Object(e);++o<n;){var s=t[o];s&&r(e,s,o,i);}return e})}function Mo(r){return function(e,t,o){for(var n=-1,i=Object(e),l=o(e),s=l.length;s--;){var c=l[r?s:++n];if(t(i[c],c,i)===!1)break}return e}}function br(r,e){var t=r.__data__;return Do(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Vr(r,e){var t=Na(r,e);return To(t)?t:void 0}function Po(r){var e=R.call(r,O),t=r[O];try{r[O]=void 0;var o=!0;}catch{}var n=$e.call(r);return o&&(e?r[O]=t:delete r[O]),n}function Wo(r){return typeof r.constructor=="function"&&!je(r)?Ja(ze(r)):{}}function Be(r,e){var t=typeof r;return e=e==null?xe:e,!!e&&(t=="number"||t!="symbol"&&Wa.test(r))&&r>-1&&r%1==0&&r<e}function Fo(r,e,t){if(!j(t))return !1;var o=typeof e;return (o=="number"?Lr(t)&&Be(e,t.length):o=="string"&&e in t)?gr(t[e],r):!1}function Do(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function Vo(r){return !!ge&&ge in r}function je(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||dr;return r===t}function Lo(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}function No(r){return $e.call(r)}function Ho(r,e,t){return e=_e(e===void 0?r.length-1:e,0),function(){for(var o=arguments,n=-1,i=_e(o.length-e,0),l=Array(i);++n<i;)l[n]=o[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=o[n];return s[e]=t(l),Da(r,this,s)}}function Pr(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}var Go=qo(Io);function qo(r){var e=0,t=0;return function(){var o=Za(),n=ca-(o-t);if(t=o,n>0){if(++e>=la)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function Uo(r){if(r!=null){try{return ur.call(r)}catch{}try{return r+""}catch{}}return ""}function gr(r,e){return r===e||r!==r&&e!==e}var Wr=Se(function(){return arguments}())?Se:function(r){return Q(r)&&R.call(r,"callee")&&!Ya.call(r,"callee")},Fr=Array.isArray;function Lr(r){return r!=null&&Pe(r.length)&&!Nr(r)}function Xo(r){return Q(r)&&Lr(r)}var Me=Qa||Jo;function Nr(r){if(!j(r))return !1;var e=pr(r);return e==we||e==ga||e==ua||e==va}function Pe(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=xe}function j(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function Q(r){return r!=null&&typeof r=="object"}function Yo(r){if(!Q(r)||pr(r)!=Ce)return !1;var e=ze(r);if(e===null)return !0;var t=R.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ur.call(t)==Ua}var We=be?La(be):wo;function Ko(r){return Bo(r,Fe(r))}function Fe(r){return Lr(r)?So(r,!0):Co(r)}var Qo=jo(function(r,e,t,o){Oe(r,e,t,o);});function Zo(r){return function(){return r}}function De(r){return r}function Jo(){return !1}V.exports=Qo;});var D="@saas-ui/storybook-addon2",ce=`${D}/direction-tool`,A={TOGGLE_COLOR_MODE:`${D}/toggleColorMode`,TOGGLE_DIRECTION:`${D}/toggleDirection`,SET_THEME:`${D}/setTheme`};function de(){let{setColorMode:r}=react.useColorMode();return q.useEffect(()=>{let e=previewApi.addons.getChannel(),t=o=>r(o);return e.on(A.TOGGLE_COLOR_MODE,t),()=>{e.removeListener(A.TOGGLE_COLOR_MODE,t);}},[r]),null}var fe=(r="ltr")=>{let[e,t]=q.useState(r.toLowerCase());return q.useEffect(()=>{document.documentElement.dir=e;},[e]),q.useEffect(()=>{let o=previewApi.addons.getChannel(),n=i=>t(i);return o.on(A.TOGGLE_DIRECTION,n),()=>{o.removeListener(A.TOGGLE_DIRECTION,n);}},[t]),e};function u(r,e={}){let t=!1;function o(){if(!t){t=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function n(...p){o();for(let y of p)e[y]=c(y);return u(r,e)}function i(...p){for(let y of p)y in e||(e[y]=c(y));return u(r,e)}function l(){return Object.fromEntries(Object.entries(e).map(([y,_])=>[y,_.selector]))}function s(){return Object.fromEntries(Object.entries(e).map(([y,_])=>[y,_.className]))}function c(p){let k=`chakra-${(["container","root"].includes(p!=null?p:"")?[r]:[r,p]).filter(Boolean).join("__")}`;return {className:k,selector:`.${k}`,toString:()=>p}}return {parts:n,toPart:c,extend:i,selectors:l,classnames:s,get keys(){return Object.keys(e)},__type:{}}}u("accordion").parts("root","container","button","panel").extend("icon");var Cr=u("alert").parts("title","description","container").extend("icon","spinner");u("avatar").parts("label","badge","container").extend("excessLabel","group");u("breadcrumb").parts("link","item","container").extend("separator");u("button").parts();u("checkbox").parts("control","icon","container").extend("label");u("progress").parts("track","filledTrack").extend("label");var Ar=u("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer");u("editable").parts("preview","input","textarea");u("form").parts("container","requiredIndicator","helperText");u("formError").parts("text","icon");var Rr=u("input").parts("addon","field","element","group");u("list").parts("container","item","icon");var Ir=u("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),$r=u("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer");u("numberinput").parts("root","field","stepperGroup","stepper");u("pininput").parts("field");var zr=u("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),Er=u("progress").parts("label","filledTrack","track");u("radio").parts("container","control","label");u("select").parts("field","icon");u("slider").parts("container","track","thumb","filledTrack","mark");u("stat").parts("container","label","helpText","number","icon");var Or=u("switch").parts("container","track","thumb","label");u("table").parts("table","thead","tbody","tr","th","td","tfoot","caption");u("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator");u("tag").parts("container","label","closeButton");u("card").parts("container","header","body","footer");u("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function sr(r){let e=typeof r;return r!=null&&(e==="object"||e==="function")&&!Array.isArray(r)}ir(Z(),1);ir(Z(),1);var Qe=ir(Z(),1);ir(Z(),1);var rn=r=>/!(important)?$/.test(r),Ve=r=>typeof r=="string"?r.replace(/!(important)?$/,"").trim():r,en=(r,e)=>t=>{let o=String(e),n=rn(o),i=Ve(o),l=r?`${r}.${i}`:i,s=sr(t.__cssMap)&&l in t.__cssMap?t.__cssMap[l].varRef:e;return s=Ve(s),n?`${s} !important`:s};function Kr(r){let{scale:e,transform:t,compose:o}=r;return (i,l)=>{var s;let c=en(e,i)(l),d=(s=t==null?void 0:t(c,l))!=null?s:c;return o&&(d=o(d,l)),d}}var mr=(...r)=>e=>r.reduce((t,o)=>o(t),e);function x(r,e){return t=>{let o={property:t,scale:r};return o.transform=Kr({scale:r,transform:e}),o}}var tn=({rtl:r,ltr:e})=>t=>t.direction==="rtl"?r:e;function an(r){let{property:e,scale:t,transform:o}=r;return {scale:t,property:tn(e),transform:t?Kr({scale:t,compose:o}):o}}var qe=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function on(){return ["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...qe].join(" ")}function nn(){return ["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...qe].join(" ")}var sn={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},ln={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function cn(r){return {"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":r,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var dn={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Gr={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},un=new Set(Object.values(Gr)),qr=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),fn=r=>r.trim();function pn(r,e){if(r==null||qr.has(r))return r;if(!(Ur(r)||qr.has(r)))return `url('${r}')`;let n=/(^[a-z-A-Z]+)\((.*)\)/g.exec(r),i=n==null?void 0:n[1],l=n==null?void 0:n[2];if(!i||!l)return r;let s=i.includes("-gradient")?i:`${i}-gradient`,[c,...d]=l.split(",").map(fn).filter(Boolean);if((d==null?void 0:d.length)===0)return r;let p=c in Gr?Gr[c]:c;d.unshift(p);let y=d.map(_=>{if(un.has(_))return _;let k=_.indexOf(" "),[F,or]=k!==-1?[_.substr(0,k),_.substr(k+1)]:[_],nr=Ur(or)?or:or&&or.split(" "),ie=`colors.${F}`,se=ie in e.__cssMap?e.__cssMap[ie].varRef:F;return nr?[se,...Array.isArray(nr)?nr:[nr]].join(" "):se});return `${s}(${y.join(", ")})`}var Ur=r=>typeof r=="string"&&r.includes("(")&&r.includes(")"),bn=(r,e)=>pn(r,e!=null?e:{});function gn(r){return /^var\(--.+\)$/.test(r)}var mn=r=>{let e=parseFloat(r.toString()),t=r.toString().replace(String(e),"");return {unitless:!t,value:e,unit:t}},C=r=>e=>`${r}(${e})`,f={filter(r){return r!=="auto"?r:sn},backdropFilter(r){return r!=="auto"?r:ln},ring(r){return cn(f.px(r))},bgClip(r){return r==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:r}},transform(r){return r==="auto"?on():r==="auto-gpu"?nn():r},vh(r){return r==="$100vh"?"var(--chakra-vh)":r},px(r){if(r==null)return r;let{unitless:e}=mn(r);return e||typeof r=="number"?`${r}px`:r},fraction(r){return typeof r!="number"||r>1?r:`${r*100}%`},float(r,e){let t={left:"right",right:"left"};return e.direction==="rtl"?t[r]:r},degree(r){if(gn(r)||r==null)return r;let e=typeof r=="string"&&!r.endsWith("deg");return typeof r=="number"||e?`${r}deg`:r},gradient:bn,blur:C("blur"),opacity:C("opacity"),brightness:C("brightness"),contrast:C("contrast"),dropShadow:C("drop-shadow"),grayscale:C("grayscale"),hueRotate:r=>C("hue-rotate")(f.degree(r)),invert:C("invert"),saturate:C("saturate"),sepia:C("sepia"),bgImage(r){return r==null||Ur(r)||qr.has(r)?r:`url(${r})`},outline(r){let e=String(r)==="0"||String(r)==="none";return r!==null&&e?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:r}},flexDirection(r){var e;let{space:t,divide:o}=(e=dn[r])!=null?e:{},n={flexDirection:r};return t&&(n[t]=1),o&&(n[o]=1),n}},a={borderWidths:x("borderWidths"),borderStyles:x("borderStyles"),colors:x("colors"),borders:x("borders"),gradients:x("gradients",f.gradient),radii:x("radii",f.px),space:x("space",mr(f.vh,f.px)),spaceT:x("space",mr(f.vh,f.px)),degreeT(r){return {property:r,transform:f.degree}},prop(r,e,t){return {property:r,scale:e,...e&&{transform:Kr({scale:e,transform:t})}}},propT(r,e){return {property:r,transform:e}},sizes:x("sizes",mr(f.vh,f.px)),sizesT:x("sizes",mr(f.vh,f.fraction)),shadows:x("shadows"),logical:an,blur:x("blur",f.blur)},hr={background:a.colors("background"),backgroundColor:a.colors("backgroundColor"),backgroundImage:a.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:f.bgClip},bgSize:a.prop("backgroundSize"),bgPosition:a.prop("backgroundPosition"),bg:a.colors("background"),bgColor:a.colors("backgroundColor"),bgPos:a.prop("backgroundPosition"),bgRepeat:a.prop("backgroundRepeat"),bgAttachment:a.prop("backgroundAttachment"),bgGradient:a.gradients("backgroundImage"),bgClip:{transform:f.bgClip}};Object.assign(hr,{bgImage:hr.backgroundImage,bgImg:hr.backgroundImage});var b={border:a.borders("border"),borderWidth:a.borderWidths("borderWidth"),borderStyle:a.borderStyles("borderStyle"),borderColor:a.colors("borderColor"),borderRadius:a.radii("borderRadius"),borderTop:a.borders("borderTop"),borderBlockStart:a.borders("borderBlockStart"),borderTopLeftRadius:a.radii("borderTopLeftRadius"),borderStartStartRadius:a.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:a.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:a.radii("borderTopRightRadius"),borderStartEndRadius:a.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:a.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:a.borders("borderRight"),borderInlineEnd:a.borders("borderInlineEnd"),borderBottom:a.borders("borderBottom"),borderBlockEnd:a.borders("borderBlockEnd"),borderBottomLeftRadius:a.radii("borderBottomLeftRadius"),borderBottomRightRadius:a.radii("borderBottomRightRadius"),borderLeft:a.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:a.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:a.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:a.borders(["borderLeft","borderRight"]),borderInline:a.borders("borderInline"),borderY:a.borders(["borderTop","borderBottom"]),borderBlock:a.borders("borderBlock"),borderTopWidth:a.borderWidths("borderTopWidth"),borderBlockStartWidth:a.borderWidths("borderBlockStartWidth"),borderTopColor:a.colors("borderTopColor"),borderBlockStartColor:a.colors("borderBlockStartColor"),borderTopStyle:a.borderStyles("borderTopStyle"),borderBlockStartStyle:a.borderStyles("borderBlockStartStyle"),borderBottomWidth:a.borderWidths("borderBottomWidth"),borderBlockEndWidth:a.borderWidths("borderBlockEndWidth"),borderBottomColor:a.colors("borderBottomColor"),borderBlockEndColor:a.colors("borderBlockEndColor"),borderBottomStyle:a.borderStyles("borderBottomStyle"),borderBlockEndStyle:a.borderStyles("borderBlockEndStyle"),borderLeftWidth:a.borderWidths("borderLeftWidth"),borderInlineStartWidth:a.borderWidths("borderInlineStartWidth"),borderLeftColor:a.colors("borderLeftColor"),borderInlineStartColor:a.colors("borderInlineStartColor"),borderLeftStyle:a.borderStyles("borderLeftStyle"),borderInlineStartStyle:a.borderStyles("borderInlineStartStyle"),borderRightWidth:a.borderWidths("borderRightWidth"),borderInlineEndWidth:a.borderWidths("borderInlineEndWidth"),borderRightColor:a.colors("borderRightColor"),borderInlineEndColor:a.colors("borderInlineEndColor"),borderRightStyle:a.borderStyles("borderRightStyle"),borderInlineEndStyle:a.borderStyles("borderInlineEndStyle"),borderTopRadius:a.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:a.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:a.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:a.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(b,{rounded:b.borderRadius,roundedTop:b.borderTopRadius,roundedTopLeft:b.borderTopLeftRadius,roundedTopRight:b.borderTopRightRadius,roundedTopStart:b.borderStartStartRadius,roundedTopEnd:b.borderStartEndRadius,roundedBottom:b.borderBottomRadius,roundedBottomLeft:b.borderBottomLeftRadius,roundedBottomRight:b.borderBottomRightRadius,roundedBottomStart:b.borderEndStartRadius,roundedBottomEnd:b.borderEndEndRadius,roundedLeft:b.borderLeftRadius,roundedRight:b.borderRightRadius,roundedStart:b.borderInlineStartRadius,roundedEnd:b.borderInlineEndRadius,borderStart:b.borderInlineStart,borderEnd:b.borderInlineEnd,borderTopStartRadius:b.borderStartStartRadius,borderTopEndRadius:b.borderStartEndRadius,borderBottomStartRadius:b.borderEndStartRadius,borderBottomEndRadius:b.borderEndEndRadius,borderStartRadius:b.borderInlineStartRadius,borderEndRadius:b.borderInlineEndRadius,borderStartWidth:b.borderInlineStartWidth,borderEndWidth:b.borderInlineEndWidth,borderStartColor:b.borderInlineStartColor,borderEndColor:b.borderInlineEndColor,borderStartStyle:b.borderInlineStartStyle,borderEndStyle:b.borderInlineEndStyle});var hn={color:a.colors("color"),textColor:a.colors("color"),fill:a.colors("fill"),stroke:a.colors("stroke")},Xr={boxShadow:a.shadows("boxShadow"),mixBlendMode:!0,blendMode:a.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:a.prop("backgroundBlendMode"),opacity:!0};Object.assign(Xr,{shadow:Xr.boxShadow});var yn={filter:{transform:f.filter},blur:a.blur("--chakra-blur"),brightness:a.propT("--chakra-brightness",f.brightness),contrast:a.propT("--chakra-contrast",f.contrast),hueRotate:a.propT("--chakra-hue-rotate",f.hueRotate),invert:a.propT("--chakra-invert",f.invert),saturate:a.propT("--chakra-saturate",f.saturate),dropShadow:a.propT("--chakra-drop-shadow",f.dropShadow),backdropFilter:{transform:f.backdropFilter},backdropBlur:a.blur("--chakra-backdrop-blur"),backdropBrightness:a.propT("--chakra-backdrop-brightness",f.brightness),backdropContrast:a.propT("--chakra-backdrop-contrast",f.contrast),backdropHueRotate:a.propT("--chakra-backdrop-hue-rotate",f.hueRotate),backdropInvert:a.propT("--chakra-backdrop-invert",f.invert),backdropSaturate:a.propT("--chakra-backdrop-saturate",f.saturate)},yr={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:f.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:a.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:a.space("gap"),rowGap:a.space("rowGap"),columnGap:a.space("columnGap")};Object.assign(yr,{flexDir:yr.flexDirection});var Ue={gridGap:a.space("gridGap"),gridColumnGap:a.space("gridColumnGap"),gridRowGap:a.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},vn={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:f.outline},outlineOffset:!0,outlineColor:a.colors("outlineColor")},T={width:a.sizesT("width"),inlineSize:a.sizesT("inlineSize"),height:a.sizes("height"),blockSize:a.sizes("blockSize"),boxSize:a.sizes(["width","height"]),minWidth:a.sizes("minWidth"),minInlineSize:a.sizes("minInlineSize"),minHeight:a.sizes("minHeight"),minBlockSize:a.sizes("minBlockSize"),maxWidth:a.sizes("maxWidth"),maxInlineSize:a.sizes("maxInlineSize"),maxHeight:a.sizes("maxHeight"),maxBlockSize:a.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(r,e)=>{var t,o,n;return {[`@media screen and (min-width: ${(n=(o=(t=e.__breakpoints)==null?void 0:t.get(r))==null?void 0:o.minW)!=null?n:r})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(r,e)=>{var t,o,n;return {[`@media screen and (max-width: ${(n=(o=(t=e.__breakpoints)==null?void 0:t.get(r))==null?void 0:o._minW)!=null?n:r})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:a.propT("float",f.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(T,{w:T.width,h:T.height,minW:T.minWidth,maxW:T.maxWidth,minH:T.minHeight,maxH:T.maxHeight,overscroll:T.overscrollBehavior,overscrollX:T.overscrollBehaviorX,overscrollY:T.overscrollBehaviorY});var _n={listStyleType:!0,listStylePosition:!0,listStylePos:a.prop("listStylePosition"),listStyleImage:!0,listStyleImg:a.prop("listStyleImage")};function Sn(r,e,t,o){let n=typeof e=="string"?e.split("."):[e];for(o=0;o<n.length&&r;o+=1)r=r[n[o]];return r===void 0?t:r}var kn=r=>{let e=new WeakMap;return (o,n,i,l)=>{if(typeof o=="undefined")return r(o,n,i);e.has(o)||e.set(o,new Map);let s=e.get(o);if(s.has(n))return s.get(n);let c=r(o,n,i,l);return s.set(n,c),c}},xn=kn(Sn),Tn={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},wn={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Hr=(r,e,t)=>{let o={},n=xn(r,e,{});for(let i in n)i in t&&t[i]!=null||(o[i]=n[i]);return o},Cn={srOnly:{transform(r){return r===!0?Tn:r==="focusable"?wn:{}}},layerStyle:{processResult:!0,transform:(r,e,t)=>Hr(e,`layerStyles.${r}`,t)},textStyle:{processResult:!0,transform:(r,e,t)=>Hr(e,`textStyles.${r}`,t)},apply:{processResult:!0,transform:(r,e,t)=>Hr(e,r,t)}},rr={position:!0,pos:a.prop("position"),zIndex:a.prop("zIndex","zIndices"),inset:a.spaceT("inset"),insetX:a.spaceT(["left","right"]),insetInline:a.spaceT("insetInline"),insetY:a.spaceT(["top","bottom"]),insetBlock:a.spaceT("insetBlock"),top:a.spaceT("top"),insetBlockStart:a.spaceT("insetBlockStart"),bottom:a.spaceT("bottom"),insetBlockEnd:a.spaceT("insetBlockEnd"),left:a.spaceT("left"),insetInlineStart:a.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:a.spaceT("right"),insetInlineEnd:a.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(rr,{insetStart:rr.insetInlineStart,insetEnd:rr.insetInlineEnd});var An={ring:{transform:f.ring},ringColor:a.colors("--chakra-ring-color"),ringOffset:a.prop("--chakra-ring-offset-width"),ringOffsetColor:a.colors("--chakra-ring-offset-color"),ringInset:a.prop("--chakra-ring-inset")},h={margin:a.spaceT("margin"),marginTop:a.spaceT("marginTop"),marginBlockStart:a.spaceT("marginBlockStart"),marginRight:a.spaceT("marginRight"),marginInlineEnd:a.spaceT("marginInlineEnd"),marginBottom:a.spaceT("marginBottom"),marginBlockEnd:a.spaceT("marginBlockEnd"),marginLeft:a.spaceT("marginLeft"),marginInlineStart:a.spaceT("marginInlineStart"),marginX:a.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:a.spaceT("marginInline"),marginY:a.spaceT(["marginTop","marginBottom"]),marginBlock:a.spaceT("marginBlock"),padding:a.space("padding"),paddingTop:a.space("paddingTop"),paddingBlockStart:a.space("paddingBlockStart"),paddingRight:a.space("paddingRight"),paddingBottom:a.space("paddingBottom"),paddingBlockEnd:a.space("paddingBlockEnd"),paddingLeft:a.space("paddingLeft"),paddingInlineStart:a.space("paddingInlineStart"),paddingInlineEnd:a.space("paddingInlineEnd"),paddingX:a.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:a.space("paddingInline"),paddingY:a.space(["paddingTop","paddingBottom"]),paddingBlock:a.space("paddingBlock")};Object.assign(h,{m:h.margin,mt:h.marginTop,mr:h.marginRight,me:h.marginInlineEnd,marginEnd:h.marginInlineEnd,mb:h.marginBottom,ml:h.marginLeft,ms:h.marginInlineStart,marginStart:h.marginInlineStart,mx:h.marginX,my:h.marginY,p:h.padding,pt:h.paddingTop,py:h.paddingY,px:h.paddingX,pb:h.paddingBottom,pl:h.paddingLeft,ps:h.paddingInlineStart,paddingStart:h.paddingInlineStart,pr:h.paddingRight,pe:h.paddingInlineEnd,paddingEnd:h.paddingInlineEnd});var Rn={textDecorationColor:a.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:a.shadows("textShadow")},In={clipPath:!0,transform:a.propT("transform",f.transform),transformOrigin:!0,translateX:a.spaceT("--chakra-translate-x"),translateY:a.spaceT("--chakra-translate-y"),skewX:a.degreeT("--chakra-skew-x"),skewY:a.degreeT("--chakra-skew-y"),scaleX:a.prop("--chakra-scale-x"),scaleY:a.prop("--chakra-scale-y"),scale:a.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:a.degreeT("--chakra-rotate")},$n={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:a.prop("transitionDuration","transition.duration"),transitionProperty:a.prop("transitionProperty","transition.property"),transitionTimingFunction:a.prop("transitionTimingFunction","transition.easing")},zn={fontFamily:a.prop("fontFamily","fonts"),fontSize:a.prop("fontSize","fontSizes",f.px),fontWeight:a.prop("fontWeight","fontWeights"),lineHeight:a.prop("lineHeight","lineHeights"),letterSpacing:a.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(r){if(r===!0)return {overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},En={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:a.spaceT("scrollMargin"),scrollMarginTop:a.spaceT("scrollMarginTop"),scrollMarginBottom:a.spaceT("scrollMarginBottom"),scrollMarginLeft:a.spaceT("scrollMarginLeft"),scrollMarginRight:a.spaceT("scrollMarginRight"),scrollMarginX:a.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:a.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:a.spaceT("scrollPadding"),scrollPaddingTop:a.spaceT("scrollPaddingTop"),scrollPaddingBottom:a.spaceT("scrollPaddingBottom"),scrollPaddingLeft:a.spaceT("scrollPaddingLeft"),scrollPaddingRight:a.spaceT("scrollPaddingRight"),scrollPaddingX:a.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:a.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Xe(r){return sr(r)&&r.reference?r.reference:String(r)}var vr=(r,...e)=>e.map(Xe).join(` ${r} `).replace(/calc/g,""),Le=(...r)=>`calc(${vr("+",...r)})`,Ne=(...r)=>`calc(${vr("-",...r)})`,Yr=(...r)=>`calc(${vr("*",...r)})`,He=(...r)=>`calc(${vr("/",...r)})`,Ge=r=>{let e=Xe(r);return e!=null&&!Number.isNaN(parseFloat(e))?String(e).startsWith("-")?String(e).slice(1):`-${e}`:Yr(e,-1)},J=Object.assign(r=>({add:(...e)=>J(Le(r,...e)),subtract:(...e)=>J(Ne(r,...e)),multiply:(...e)=>J(Yr(r,...e)),divide:(...e)=>J(He(r,...e)),negate:()=>J(Ge(r)),toString:()=>r.toString()}),{add:Le,subtract:Ne,multiply:Yr,divide:He,negate:Ge});function On(r,e="-"){return r.replace(/\s+/g,e)}function Bn(r){let e=On(r.toString());return Mn(jn(e))}function jn(r){return r.includes("\\.")?r:!Number.isInteger(parseFloat(r.toString()))?r.replace(".","\\."):r}function Mn(r){return r.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function Pn(r,e=""){return [e,r].filter(Boolean).join("-")}function Wn(r,e){return `var(${r}${e?`, ${e}`:""})`}function Fn(r,e=""){return Bn(`--${Pn(r,e)}`)}function g(r,e,t){let o=Fn(r,t);return {variable:o,reference:Wn(o,e)}}var S={hover:(r,e)=>`${r}:hover ${e}, ${r}[data-hover] ${e}`,focus:(r,e)=>`${r}:focus ${e}, ${r}[data-focus] ${e}`,focusVisible:(r,e)=>`${r}:focus-visible ${e}`,focusWithin:(r,e)=>`${r}:focus-within ${e}`,active:(r,e)=>`${r}:active ${e}, ${r}[data-active] ${e}`,disabled:(r,e)=>`${r}:disabled ${e}, ${r}[data-disabled] ${e}`,invalid:(r,e)=>`${r}:invalid ${e}, ${r}[data-invalid] ${e}`,checked:(r,e)=>`${r}:checked ${e}, ${r}[data-checked] ${e}`,indeterminate:(r,e)=>`${r}:indeterminate ${e}, ${r}[aria-checked=mixed] ${e}, ${r}[data-indeterminate] ${e}`,readOnly:(r,e)=>`${r}:read-only ${e}, ${r}[readonly] ${e}, ${r}[data-read-only] ${e}`,expanded:(r,e)=>`${r}:read-only ${e}, ${r}[aria-expanded=true] ${e}, ${r}[data-expanded] ${e}`,placeholderShown:(r,e)=>`${r}:placeholder-shown ${e}`},E=r=>Ye(e=>r(e,"&"),"[role=group]","[data-group]",".group"),$=r=>Ye(e=>r(e,"~ &"),"[data-peer]",".peer"),Ye=(r,...e)=>e.map(r).join(", "),Ke={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:E(S.hover),_peerHover:$(S.hover),_groupFocus:E(S.focus),_peerFocus:$(S.focus),_groupFocusVisible:E(S.focusVisible),_peerFocusVisible:$(S.focusVisible),_groupActive:E(S.active),_peerActive:$(S.active),_groupDisabled:E(S.disabled),_peerDisabled:$(S.disabled),_groupInvalid:E(S.invalid),_peerInvalid:$(S.invalid),_groupChecked:E(S.checked),_peerChecked:$(S.checked),_groupFocusWithin:E(S.focusWithin),_peerFocusWithin:$(S.focusWithin),_peerPlaceholderShown:$(S.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},Dn=Object.keys(Ke);var Ze=(0, Qe.default)({},hr,b,hn,yr,T,yn,An,vn,Ue,Cn,rr,Xr,h,En,zn,Rn,In,_n,$n);Object.assign({},h,T,yr,Ue,rr);[...Object.keys(Ze),...Dn];({...Ze,...Ke});function v(r){return {definePartsStyle(e){return e},defineMultiStyleConfig(e){return {parts:r,...e}}}}function M(r,e,t){return Math.min(Math.max(r,t),e)}var Qr=class extends Error{constructor(e){super(`Failed to parse color: "${e}"`);}},er=Qr;function Zr(r){if(typeof r!="string")throw new er(r);if(r.trim().toLowerCase()==="transparent")return [0,0,0,0];let e=r.trim();e=Zn.test(r)?Un(r):r;let t=Xn.exec(e);if(t){let l=Array.from(t).slice(1);return [...l.slice(0,3).map(s=>parseInt(tr(s,2),16)),parseInt(tr(l[3]||"f",2),16)/255]}let o=Yn.exec(e);if(o){let l=Array.from(o).slice(1);return [...l.slice(0,3).map(s=>parseInt(s,16)),parseInt(l[3]||"ff",16)/255]}let n=Kn.exec(e);if(n){let l=Array.from(n).slice(1);return [...l.slice(0,3).map(s=>parseInt(s,10)),parseFloat(l[3]||"1")]}let i=Qn.exec(e);if(i){let[l,s,c,d]=Array.from(i).slice(1).map(parseFloat);if(M(0,100,s)!==s)throw new er(r);if(M(0,100,c)!==c)throw new er(r);return [...Jn(l,s,c),Number.isNaN(d)?1:d]}throw new er(r)}function Gn(r){let e=5381,t=r.length;for(;t;)e=e*33^r.charCodeAt(--t);return (e>>>0)%2341}var Je=r=>parseInt(r.replace(/_/g,""),36),qn="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((r,e)=>{let t=Je(e.substring(0,3)),o=Je(e.substring(3)).toString(16),n="";for(let i=0;i<6-o.length;i++)n+="0";return r[t]=`${n}${o}`,r},{});function Un(r){let e=r.toLowerCase().trim(),t=qn[Gn(e)];if(!t)throw new er(r);return `#${t}`}var tr=(r,e)=>Array.from(Array(e)).map(()=>r).join(""),Xn=new RegExp(`^#${tr("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Yn=new RegExp(`^#${tr("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Kn=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${tr(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),Qn=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Zn=/^[a-z]+$/i,rt=r=>Math.round(r*255),Jn=(r,e,t)=>{let o=t/100;if(e===0)return [o,o,o].map(rt);let n=(r%360+360)%360/60,i=(1-Math.abs(2*o-1))*(e/100),l=i*(1-Math.abs(n%2-1)),s=0,c=0,d=0;n>=0&&n<1?(s=i,c=l):n>=1&&n<2?(s=l,c=i):n>=2&&n<3?(c=i,d=l):n>=3&&n<4?(c=l,d=i):n>=4&&n<5?(s=l,d=i):n>=5&&n<6&&(s=i,d=l);let p=o-i/2,y=s+p,_=c+p,k=d+p;return [y,_,k].map(rt)};function ri(r,e,t,o){return `rgba(${M(0,255,r).toFixed()}, ${M(0,255,e).toFixed()}, ${M(0,255,t).toFixed()}, ${parseFloat(M(0,1,o).toFixed(3))})`}function et(r,e){let[t,o,n,i]=Zr(r);return ri(t,o,n,i-e)}function tt(r){let[e,t,o,n]=Zr(r),i=l=>{let s=M(0,255,l).toString(16);return s.length===1?`0${s}`:s};return `#${i(e)}${i(t)}${i(o)}${n<1?i(Math.round(n*255)):""}`}function ei(r,e,t,o,n){for(e=e.split?e.split("."):e,o=0;o<e.length;o++)r=r?r[e[o]]:n;return r===n?t:r}var P=(r,e,t)=>{let o=ei(r,`colors.${e}`,e);try{return tt(o),o}catch{return t!=null?t:"#000000"}};var H=(r,e)=>t=>{let o=P(t,r);return et(o,1-e)};function _r(r,e){return t=>t.colorMode==="dark"?e:r}function at(r){return !Number.isInteger(parseFloat(r.toString()))}function ti(r,e="-"){return r.replace(/\s+/g,e)}function ot(r){let e=ti(r.toString());return e.includes("\\.")?r:at(r)?e.replace(".","\\."):r}function nt(r,e=""){return [e,ot(r)].filter(Boolean).join("-")}function it(r,e){return `var(${ot(r)}${e?`, ${e}`:""})`}function st(r,e=""){return `--${nt(r,e)}`}function W(r,e){let t=st(r,e==null?void 0:e.prefix);return {variable:t,reference:it(t,ai(e==null?void 0:e.fallback))}}function ai(r){return typeof r=="string"?r:r==null?void 0:r.reference}function lt(r){return typeof r=="function"}function z(r,...e){return lt(r)?r(...e):r}var{definePartsStyle:ht,defineMultiStyleConfig:ni}=v(Cr.keys),ct=g("alert-fg"),dt=g("alert-bg"),ae=g("alert-border");function ii(r){let{theme:e,colorScheme:t}=r,o=H(`${t}.600`,.16)(e);return {light:`colors.${t}.100`,dark:o}}function si(r){let{theme:e,colorScheme:t}=r,o=H(`${t}.300`,.16)(e);return {light:`colors.${t}.200`,dark:o}}var li=ht(r=>{let{colorScheme:e}=r,t=ii(r),o=si(r);return {container:{borderWidth:"1px",[ct.variable]:`colors.${e}.500`,[dt.variable]:t.light,[ae.variable]:o.light,_dark:{[ct.variable]:`colors.${e}.500`,[dt.variable]:t.dark,[ae.variable]:o.dark}}}}),ci=ht(()=>({container:{borderColor:ae.reference,borderRadius:"md",fontSize:"sm"},icon:{w:4,h:5},title:{fontSize:"sm",fontWeight:"medium"},description:{color:"muted"}})),di=ni({defaultProps:{size:"sm",colorScheme:"primary"},baseStyle:ci,variants:{subtle:li}}),yt=r=>{let{colorScheme:e,colorMode:t}=r,o=`${e}.500`,n=`${e}.600`;return e==="neutral"&&t==="dark"?(o="white",n="whiteAlpha.800"):e==="neutral"&&(o="black",n="blackAlpha.800"),{borderWidth:"1px",borderColor:o,boxShadow:"xs",bg:o,color:"white",fontWeight:"medium",_hover:{borderColor:n,bg:n},_dark:{boxShadow:"dark-xs"}}},ui=r=>({fontWeight:"medium",_checked:{bg:"blackAlpha.100"},_dark:{_checked:{bg:"whiteAlpha.100"}}}),fi=r=>{let{colorScheme:e}=r;return e==="gray"?{fontWeight:"medium"}:{fontWeight:"medium",color:`${e}.500`,_hover:{color:`${e}.400`,bg:"blackAlpha.50"},_dark:{color:`${e}.500`,_hover:{color:`${e}.400`,bg:"whiteAlpha.50"}}}},pi=r=>yt({...r,colorScheme:"primary"}),bi={borderWidth:"1px",borderColor:"gray.200",boxShadow:"xs",bg:"white",fontWeight:"medium",color:"inherit",_hover:{borderColor:"gray.300",bg:"gray.50"},_dark:{boxShadow:"dark-xs",borderColor:"gray.600",bg:"gray.700",_hover:{borderColor:"gray.500",bg:"gray.600"}}},gi={borderWidth:"1px",borderColor:"gray.200",bg:"gray.200",color:"black",fontWeight:"medium",_hover:{borderColor:"gray.300",bg:"gray.200"},_dark:{borderColor:"gray.700",bg:"gray.700",color:"white",_hover:{borderColor:"gray.600"}}},mi={lg:{h:"8",minW:"10",fontSize:"md",px:"4",rounded:"6"},md:{h:"7",minW:"8",fontSize:"sm",px:"3",rounded:"4"},sm:{h:"6",minW:"6",fontSize:"sm",px:"2",rounded:"3"},xs:{h:"5",minW:"4",fontSize:"xs",px:"1",rounded:"3"}},hi={defaultProps:{size:"md",variant:"secondary"},variants:{solid:yt,outline:fi,ghost:ui,primary:pi,secondary:bi,tertiary:gi},sizes:mi},vt=u("card").parts("container","header","title","subtitle","body","footer"),{definePartsStyle:wr}=v(vt.keys),yi=g("card-bg"),Jr=g("card-padding"),vi=g("card-shadow"),re=g("card-radius"),_i=g("card-border-width","0"),Sr=g("card-border-color"),Si={sm:wr({container:{[re.variable]:"radii.base",[Jr.variable]:"space.3"}}),md:wr({container:{[re.variable]:"radii.md",[Jr.variable]:"space.4"}}),lg:wr({container:{[re.variable]:"radii.xl",[Jr.variable]:"space.6"}})},ut=wr(r=>{let{isHoverable:e}=r;return {container:{[Sr.variable]:"colors.blackAlpha.200",[_i.variable]:"1px",[vi.variable]:"shadows.sm",_hover:e?{[Sr.variable]:"colors.blackAlpha.300"}:{},_dark:{[yi.variable]:"colors.gray.700",[Sr.variable]:"colors.whiteAlpha.50",_hover:e?{[Sr.variable]:"colors.whiteAlpha.300"}:{}}}}}),ki={parts:vt.keys,defaultProps:{variant:"elevated"},variants:{elevated:ut,shadow:ut},sizes:Si},xi={baseStyle:r=>{let{colorScheme:e}=r;return {control:{_checked:{borderColor:`${e}.500`,bg:`${e}.500`,color:"white"}}}}},Ti={size:"sm"},wi={defaultProps:Ti},{defineMultiStyleConfig:Ci,definePartsStyle:Ai}=v(Ar.keys),ft=g("drawer-bg"),Ri={bg:"blackAlpha.50"},Ii=r=>({borderRadius:"md",margin:"8px",borderWidth:"1px",borderColor:"chakra-border-color",backdropFilter:"blur(10px) contrast(100%) saturate(100%) brightness(200%)",[ft.variable]:"colors.whiteAlpha.800",fontSize:"md",_dark:{backdropFilter:"blur(10px) saturate(190%) contrast(70%) brightness(80%)",[ft.variable]:"colors.grayAlpha.700"}}),$i={px:"4",py:"3",fontSize:"md",fontWeight:"semibold"},zi={position:"absolute",top:"2",insetEnd:"3"},Ei=r=>({px:"4",py:"2"}),Oi={px:"3",py:"3"},Bi=Ai(r=>({overlay:Ri,dialog:z(Ii,r),header:$i,closeButton:zi,body:z(Ei,r),footer:Oi})),ji=Ci({baseStyle:Bi}),Mi=ji,Pi={defaultProps:{size:"lg"}},ee=g("kbd-bg"),Wi={[ee.variable]:"colors.blackAlpha.300",_dark:{[ee.variable]:"colors.whiteAlpha.300"},bg:ee.reference,borderRadius:"md",borderWidth:"0",borderBottomWidth:"0",padding:"1px",minW:"20px",textAlign:"center",":last-child":{mr:0}},Fi={defaultProps:{variant:"solid"},baseStyle:Wi},Di=Fi,{defineMultiStyleConfig:Vi,definePartsStyle:Li}=v(Ir.keys),w=g("menu-bg"),te=g("menu-shadow"),Ni={[w.variable]:"colors.whiteAlpha.500",[te.variable]:"shadows.lg",backdropFilter:"blur(10px) contrast(100%) saturate(190%)",_dark:{[w.variable]:"colors.grayAlpha.700",[te.variable]:"shadows.dark-lg",backdropFilter:"blur(10px) saturate(190%) contrast(70%) brightness(80%)"},py:"1",borderRadius:"md",borderWidth:"1px",bg:w.reference,boxShadow:te.reference},Hi={py:"1.5",px:"3",mx:"1",rounded:"md",fontSize:"sm",width:"calc(100% - 8px)",boxSizing:"border-box",bg:"transparent",_hover:{bg:w.reference,[w.variable]:"colors.grayAlpha.300"},_focus:{bg:w.reference,[w.variable]:"colors.grayAlpha.300"},_active:{bg:w.reference,[w.variable]:"colors.grayAlpha.300"},_expanded:{bg:w.reference,[w.variable]:"colors.grayAlpha.300"}},Gi={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},qi={transitionProperty:"common",transitionDuration:"normal"},Ui={my:"1"},Xi=Li({button:qi,list:Ni,item:Hi,groupTitle:Gi,divider:Ui}),Yi=Vi({baseStyle:Xi}),Ki=Yi,{defineMultiStyleConfig:Qi,definePartsStyle:Zi}=v($r.keys),Ji={bg:"blackAlpha.50"},rs=r=>({bg:"whiteAlpha.800",backdropFilter:"blur(10px) contrast(100%) saturate(100%) brightness(200%)",fontSize:"md",_dark:{bg:"grayAlpha.700",boxShadow:"dark-lg",backdropFilter:"blur(10px) saturate(190%) contrast(70%) brightness(80%)"}}),es={px:"4",py:"3",fontSize:"md",fontWeight:"semibold"},ts={position:"absolute",top:"2",insetEnd:"3"},as=r=>({px:"4",py:"2"}),os={px:"3",py:"3"},ns=Zi(r=>({overlay:Ji,dialog:z(rs,r),header:es,closeButton:ts,body:z(as,r),footer:os})),is=Qi({baseStyle:ns,defaultProps:{size:"md"}}),ss=is,{defineMultiStyleConfig:ls}=v(Er.keys),cs=ls({defaultProps:{colorScheme:"primary"},baseStyle:r=>{let{colorScheme:e}=r;return {track:{borderRadius:"md",bg:"gray.200",_dark:{bg:"gray.800"}},filledTrack:{bg:`${e}.500`}}}}),{defineMultiStyleConfig:ds,definePartsStyle:us}=v(zr.keys),kr=g("popper-bg"),fs=g("popper-arrow-bg"),pt=g("popper-arrow-shadow-color"),ps={[kr.variable]:"colors.whiteAlpha.800",bg:kr.reference,[fs.variable]:kr.reference,[pt.variable]:"colors.gray.200",backdropFilter:"blur(10px) contrast(100%) saturate(100%) brightness(200%)",_dark:{[kr.variable]:"colors.grayAlpha.700",[pt.variable]:"colors.whiteAlpha.300",backdropFilter:"blur(10px) saturate(190%) contrast(70%) brightness(80%)"}},bs=us(r=>({content:z(ps,r)})),gs=ds({baseStyle:bs,defaultProps:{size:"md"}}),ms=gs,hs={baseStyle:r=>{let{colorScheme:e}=r;return {control:{_checked:{borderColor:`${e}.500`,bg:`${e}.500`,color:"white"}}}}},ys={defaultProps:{colorScheme:"primary"},baseStyle:r=>{let{colorScheme:e}=r;return {filledTrack:{bg:`${e}.500`}}}},{defineMultiStyleConfig:vs,definePartsStyle:_s}=v(Or.keys),ar=W("switch-bg"),Ss=r=>{let{colorScheme:e}=r;return {[ar.variable]:"colors.gray.300",_dark:{[ar.variable]:"colors.whiteAlpha.300"},_checked:{[ar.variable]:`colors.${e}.500`,_dark:{[ar.variable]:`colors.${e}.500`}},bg:ar.reference}},ks={bg:"white",_dark:{bg:"blackAlpha.800",_checked:{bg:"white"}}},xs=_s(r=>({track:Ss(r),thumb:ks})),Ts=vs({baseStyle:xs,defaultProps:{size:"md",colorScheme:"primary"}}),ws=Ts,xr=W("tooltip-bg"),bt=W("tooltip-fg"),Cs=W("popper-arrow-bg"),As=r=>({display:"flex",[xr.variable]:"colors.white",[bt.variable]:"colors.blackAlpha.900",_dark:{[xr.variable]:"colors.gray.700",[bt.variable]:"colors.whiteAlpha.900"},px:"8px",py:"2px",bg:[xr.reference],[Cs.variable]:[xr.reference],borderRadius:"sm",fontWeight:"medium",fontSize:"xs",boxShadow:"md",maxW:"320px",zIndex:"tooltip",borderWidth:"1px"}),Rs={baseStyle:As},{definePartsStyle:Is}=v(Rr.keys);function $s(r){let{focusBorderColor:e,errorBorderColor:t}=r;return {focusBorderColor:e||_r("blue.500","blue.300")(r),errorBorderColor:t||_r("red.500","red.300")(r)}}var gt=g("input-border-radius"),Tr=g("input-height"),mt=g("input-padding"),_t=Is(r=>{let{theme:e}=r,{focusBorderColor:t,errorBorderColor:o}=$s(r);return {field:{border:"1px solid var(--chakra-colors-chakra-border-color)",bg:"inherit",_hover:{borderColor:"gray.300"},_invalid:{borderColor:P(e,o),boxShadow:"none"},_focusVisible:{zIndex:1,borderColor:P(e,t),boxShadow:"none"},_dark:{bg:"gray.900",borderColor:"chakra-border-color",_hover:{borderColor:"whiteAlpha.400"},_invalid:{borderColor:P(e,o)},_focusVisible:{borderColor:P(e,t)}}},addon:{borderColor:"inherit",bg:"gray.100",_dark:{borderColor:"whiteAlpha.50",bg:"whiteAlpha.300"}}}}),St={sm:{field:{[gt.variable]:"radii.sm",[Tr.variable]:"sizes.7"},addon:{[gt.variable]:"radii.sm",[Tr.variable]:"sizes.7"}},md:{field:{[mt.variable]:"space.3",[Tr.variable]:"sizes.9"},addon:{[mt.variable]:"space.3",[Tr.variable]:"sizes.9"}}},kt={defaultProps:{variant:"outline",size:"sm",focusBorderColor:"primary.500"},variants:{outline:_t},sizes:St},zs={baseStyle:{mb:1},variants:{horizontal:{mb:0,marginStart:"0.5rem"}}},oe=kt,Es=kt,Os={defaultProps:{focusBorderColor:"primary.500"},variants:{outline:_t},sizes:St},Bs={defaultProps:{focusBorderColor:"primary.500"},variants:{outline:r=>{var e,t;return (t=(e=oe.variants)==null?void 0:e.outline(r).field)!=null?t:{}}}},js=oe,xt={Alert:di,Button:hi,Card:ki,Checkbox:xi,CloseButton:wi,Drawer:Mi,Heading:Pi,Kbd:Di,Menu:Ki,Modal:ss,Progress:cs,Popover:ms,Radio:hs,Slider:ys,Switch:ws,Tooltip:Rs,Input:oe,PinInput:Os,FormLabel:zs,NumberInput:Es,Select:js,Textarea:Bs};var Ws={black:"#0e1012",primary:{50:"#f6f7fd",100:"#dcdff5",200:"#bec3ed",300:"#9aa1e2",400:"#858edd",500:"#6b75d0",600:"#5a63af",700:"#484f8d",800:"#3d4377",900:"#2c3056"},grayAlpha:{50:"rgba(249, 249, 250, 0.5)",100:"rgba(241, 241, 243, 0.5)",200:"rgba(231, 231, 234, 0.5)",300:"rgba(211, 212, 216, 0.5)",400:"rgba(171, 172, 181, 0.5)",500:"rgba(124, 126, 139, 0.5)",600:"rgba(81, 84, 101, 0.5)",700:"rgba(52, 54, 67, 0.5)",800:"rgba(30, 32, 39, 0.5)",900:"rgba(24, 25, 31, 0.5)"},gray:{50:"#f9f9fa",100:"#f1f1f3",200:"#e7e7ea",300:"#d3d4d8",400:"#abacb5",500:"#7c7e8b",600:"#515465",700:"#343643",800:"#1e2027",900:"#18191f"},purple:{50:"#f9f6fd",100:"#e5daf8",200:"#d3bef4",300:"#b795ec",400:"#a379e7",500:"#8952e0",600:"#7434db",700:"#6023c0",800:"#4f1d9e",900:"#3b1676"},pink:{50:"#fdf5f9",100:"#f8d9e7",200:"#f3b9d3",300:"#eb8db8",400:"#e56ba2",500:"#dc3882",600:"#c4246c",700:"#a01d58",800:"#7d1745",900:"#5d1133"},red:{50:"#fdf6f5",100:"#f8d9d8",200:"#f1b8b4",300:"#e98d87",400:"#e4726c",500:"#dc4a41",600:"#d2140a",700:"#ac0900",800:"#930800",900:"#6d0600"},orange:{50:"#fdfaf6",100:"#f9ebdb",200:"#f1d4b1",300:"#e6b273",400:"#dc9239",500:"#c37b24",600:"#a5681e",700:"#835318",800:"#674113",900:"#553610"},yellow:{50:"#fffefb",100:"#fff8e9",200:"#feecbd",300:"#fddc87",400:"#fbc434",500:"#d2a01e",600:"#a88018",700:"#836413",800:"#624b0e",900:"#513e0c"},green:{50:"#f7fdfb",100:"#d2f2e7",200:"#9fe3cd",300:"#64d2ad",400:"#1dbd88",500:"#0ea371",600:"#0c875e",700:"#096949",800:"#07563c",900:"#064731"},teal:{50:"#f1fcfc",100:"#c0f1f4",200:"#84e4e9",300:"#2dd1da",400:"#22b2ba",500:"#1d979e",600:"#187b80",700:"#125f64",800:"#0f5053",900:"#0d4244"},cyan:{50:"#f4fbfd",100:"#d0eef7",200:"#bae7f3",300:"#a2deee",400:"#53c2e1",500:"#2ab4d9",600:"#24a2c4",700:"#1e86a2",800:"#196e85",900:"#135567"},blue:{50:"#f1f6fd",100:"#cde0f6",200:"#a8c8f0",300:"#7fafe8",400:"#5896e1",500:"#347fdb",600:"#236abf",700:"#1b5192",800:"#164278",900:"#123662"},indigo:{50:"#f8f7fc",100:"#e1ddf5",200:"#c8c0ec",300:"#a89de2",400:"#9789dc",500:"#7f6ed4",600:"#6a58c9",700:"#5546a1",800:"#483c88",900:"#342b62"}},ne=Ws,Fs={heading:"InterVariable, sans-serif",body:"InterVariable, sans-serif"},Ds={xs:"0.75rem",sm:"0.8125rem",md:"0.875rem",lg:"1rem",xl:"1.125rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"},Vs={},Ls={container:{sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"}},Ns=Ls,Hs={xs:"rgb(0 0 0 / 7%) 0px 1px 1px","dark-xs":"rgb(0 0 0 / 7%) 0px 1px 1px",outline:`0 0 0 2px ${H(ne.primary[500],.6)({colors:ne})}`},Gs=Hs,qs={colors:{muted:{default:"gray.500",_dark:"gray.400"}}},Tt=react.extendTheme({colors:ne,fonts:Fs,fontSizes:Ds,textStyles:Vs,sizes:Ns,components:xt,shadows:Gs,semanticTokens:qs},react.withDefaultColorScheme({colorScheme:"primary",components:["Radio","Switch","Checkbox"]}));var Zs=react.extendTheme(Tt,react$1.theme),Js=()=>{let[r,e]=react$1.useLocalStorage("storybook.theme","1");return q__namespace.useEffect(()=>{let t=previewApi.addons.getChannel(),o=n=>{e(n);};return t.on(A.SET_THEME,o),()=>{t.removeListener(A.SET_THEME,o);}},[e]),r},At=previewApi.makeDecorator({name:"ChakraProviderDecorator",parameterName:"chakra",skipIfNoParametersOrOptions:!1,wrapper:(r,e,{parameters:t})=>{let {parameters:{saasui:o},globals:{[ce]:n}}=e,i=Js(),l=q__namespace.useCallback(()=>{switch(i){case"1":return react$1.theme;case"2":return Zs;default:return react$1.baseTheme}},[i]),s=(o==null?void 0:o.theme)||l();!!(o!=null&&o.theme);let d=o!=null&&o.theme?typeof o.theme=="function"?o.theme(e):o.theme:s,p=fe(n||(d==null?void 0:d.direction)),y=q__namespace.useMemo(()=>react.extendTheme({direction:p,styles:{global:{body:{minHeight:"var(--chakra-vh)"}}}},d),[d,p]);return jsxRuntime.jsxs(react$1.SaasProvider,{...o,theme:y,children:[jsxRuntime.jsx(de,{}),r(e)]})}});var tl={decorators:[At]},ud=tl;
29
+ var Wr=Object.create;var Ee=Object.defineProperty;var Gr=Object.getOwnPropertyDescriptor;var qr=Object.getOwnPropertyNames;var Ur=Object.getPrototypeOf,Kr=Object.prototype.hasOwnProperty;var Jr=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Qr=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of qr(r))!Kr.call(e,a)&&a!==t&&Ee(e,a,{get:()=>r[a],enumerable:!(o=Gr(r,a))||o.enumerable});return e};var Xr=(e,r,t)=>(t=e!=null?Wr(Ur(e)):{},Qr(Ee(t,"default",{value:e,enumerable:!0}),e));var dr=Jr((D,O)=>{var wt=200,qe="__lodash_hash_undefined__",Tt=800,kt=16,Ue=9007199254740991,Ke="[object Arguments]",zt="[object Array]",$t="[object AsyncFunction]",Mt="[object Boolean]",Ot="[object Date]",Et="[object Error]",Je="[object Function]",It="[object GeneratorFunction]",Pt="[object Map]",jt="[object Number]",Dt="[object Null]",Qe="[object Object]",Ft="[object Proxy]",Rt="[object RegExp]",Vt="[object Set]",Ht="[object String]",Bt="[object Undefined]",Nt="[object WeakMap]",Lt="[object ArrayBuffer]",Wt="[object DataView]",Gt="[object Float32Array]",qt="[object Float64Array]",Ut="[object Int8Array]",Kt="[object Int16Array]",Jt="[object Int32Array]",Qt="[object Uint8Array]",Xt="[object Uint8ClampedArray]",Yt="[object Uint16Array]",Zt="[object Uint32Array]",eo=/[\\^$.*+?()[\]{}|]/g,ro=/^\[object .+?Constructor\]$/,to=/^(?:0|[1-9]\d*)$/,p={};p[Gt]=p[qt]=p[Ut]=p[Kt]=p[Jt]=p[Qt]=p[Xt]=p[Yt]=p[Zt]=!0;p[Ke]=p[zt]=p[Lt]=p[Mt]=p[Wt]=p[Ot]=p[Et]=p[Je]=p[Pt]=p[jt]=p[Qe]=p[Rt]=p[Vt]=p[Ht]=p[Nt]=!1;var Xe=typeof global=="object"&&global&&global.Object===Object&&global,oo=typeof self=="object"&&self&&self.Object===Object&&self,V=Xe||oo||Function("return this")(),Ye=typeof D=="object"&&D&&!D.nodeType&&D,F=Ye&&typeof O=="object"&&O&&!O.nodeType&&O,Ze=F&&F.exports===Ye,pe=Ze&&Xe.process,Fe=function(){try{var e=F&&F.require&&F.require("util").types;return e||pe&&pe.binding&&pe.binding("util")}catch{}}(),Re=Fe&&Fe.isTypedArray;function ao(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function no(e,r){for(var t=-1,o=Array(e);++t<e;)o[t]=r(t);return o}function io(e){return function(r){return e(r)}}function so(e,r){return e==null?void 0:e[r]}function lo(e,r){return function(t){return e(r(t))}}var co=Array.prototype,fo=Function.prototype,q=Object.prototype,me=V["__core-js_shared__"],U=fo.toString,_=q.hasOwnProperty,Ve=function(){var e=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),er=q.toString,uo=U.call(Object),po=RegExp("^"+U.call(_).replace(eo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),W=Ze?V.Buffer:void 0,He=V.Symbol,Be=V.Uint8Array;W?W.allocUnsafe:void 0;var rr=lo(Object.getPrototypeOf,Object),Le=Object.create,mo=q.propertyIsEnumerable,bo=co.splice,A=He?He.toStringTag:void 0,G=function(){try{var e=_e(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ho=W?W.isBuffer:void 0,We=Math.max,go=Date.now,tr=_e(V,"Map"),R=_e(Object,"create"),yo=function(){function e(){}return function(r){if(!w(r))return {};if(Le)return Le(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();function C(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var o=e[r];this.set(o[0],o[1]);}}function vo(){this.__data__=R?R(null):{},this.size=0;}function _o(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function xo(e){var r=this.__data__;if(R){var t=r[e];return t===qe?void 0:t}return _.call(r,e)?r[e]:void 0}function So(e){var r=this.__data__;return R?r[e]!==void 0:_.call(r,e)}function Ao(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=R&&r===void 0?qe:r,this}C.prototype.clear=vo;C.prototype.delete=_o;C.prototype.get=xo;C.prototype.has=So;C.prototype.set=Ao;function x(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var o=e[r];this.set(o[0],o[1]);}}function Co(){this.__data__=[],this.size=0;}function wo(e){var r=this.__data__,t=K(r,e);if(t<0)return !1;var o=r.length-1;return t==o?r.pop():bo.call(r,t,1),--this.size,!0}function To(e){var r=this.__data__,t=K(r,e);return t<0?void 0:r[t][1]}function ko(e){return K(this.__data__,e)>-1}function zo(e,r){var t=this.__data__,o=K(t,e);return o<0?(++this.size,t.push([e,r])):t[o][1]=r,this}x.prototype.clear=Co;x.prototype.delete=wo;x.prototype.get=To;x.prototype.has=ko;x.prototype.set=zo;function E(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var o=e[r];this.set(o[0],o[1]);}}function $o(){this.size=0,this.__data__={hash:new C,map:new(tr||x),string:new C};}function Mo(e){var r=Q(this,e).delete(e);return this.size-=r?1:0,r}function Oo(e){return Q(this,e).get(e)}function Eo(e){return Q(this,e).has(e)}function Io(e,r){var t=Q(this,e),o=t.size;return t.set(e,r),this.size+=t.size==o?0:1,this}E.prototype.clear=$o;E.prototype.delete=Mo;E.prototype.get=Oo;E.prototype.has=Eo;E.prototype.set=Io;function I(e){var r=this.__data__=new x(e);this.size=r.size;}function Po(){this.__data__=new x,this.size=0;}function jo(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}function Do(e){return this.__data__.get(e)}function Fo(e){return this.__data__.has(e)}function Ro(e,r){var t=this.__data__;if(t instanceof x){var o=t.__data__;if(!tr||o.length<wt-1)return o.push([e,r]),this.size=++t.size,this;t=this.__data__=new E(o);}return t.set(e,r),this.size=t.size,this}I.prototype.clear=Po;I.prototype.delete=jo;I.prototype.get=Do;I.prototype.has=Fo;I.prototype.set=Ro;function Vo(e,r){var t=ye(e),o=!t&&ge(e),a=!t&&!o&&ir(e),i=!t&&!o&&!a&&lr(e),s=t||o||a||i,n=s?no(e.length,String):[],l=n.length;for(var d in e)!(s&&(d=="length"||a&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||ar(d,l)))&&n.push(d);return n}function be(e,r,t){(t!==void 0&&!X(e[r],t)||t===void 0&&!(r in e))&&ve(e,r,t);}function Ho(e,r,t){var o=e[r];(!(_.call(e,r)&&X(o,t))||t===void 0&&!(r in e))&&ve(e,r,t);}function K(e,r){for(var t=e.length;t--;)if(X(e[t][0],r))return t;return -1}function ve(e,r,t){r=="__proto__"&&G?G(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t;}var Bo=ea();function J(e){return e==null?e===void 0?Bt:Dt:A&&A in Object(e)?ra(e):sa(e)}function Ge(e){return H(e)&&J(e)==Ke}function No(e){if(!w(e)||na(e))return !1;var r=Se(e)?po:ro;return r.test(da(e))}function Lo(e){return H(e)&&sr(e.length)&&!!p[J(e)]}function Wo(e){if(!w(e))return ia(e);var r=nr(e),t=[];for(var o in e)o=="constructor"&&(r||!_.call(e,o))||t.push(o);return t}function or(e,r,t,o,a){e!==r&&Bo(r,function(i,s){if(a||(a=new I),w(i))Go(e,r,s,t,or,o,a);else {var n=o?o(he(e,s),i,s+"",e,r,a):void 0;n===void 0&&(n=i),be(e,s,n);}},cr);}function Go(e,r,t,o,a,i,s){var n=he(e,t),l=he(r,t),d=s.get(l);if(d){be(e,t,d);return}var f=i?i(n,l,t+"",e,r,s):void 0,m=f===void 0;if(m){var g=ye(l),S=!g&&ir(l),ae=!g&&!S&&lr(l);f=l,g||S||ae?ye(n)?f=n:ua(n)?f=Xo(n):S?(m=!1,f=Ko(l)):ae?(m=!1,f=Qo(l)):f=[]:pa(l)||ge(l)?(f=n,ge(n)?f=ma(n):(!w(n)||Se(n))&&(f=ta(l))):m=!1;}m&&(s.set(l,f),a(f,l,o,i,s),s.delete(l)),be(e,t,f);}function qo(e,r){return ca(la(e,r,fr),e+"")}var Uo=G?function(e,r){return G(e,"toString",{configurable:!0,enumerable:!1,value:ha(r),writable:!0})}:fr;function Ko(e,r){return e.slice();}function Jo(e){var r=new e.constructor(e.byteLength);return new Be(r).set(new Be(e)),r}function Qo(e,r){var t=Jo(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}function Xo(e,r){var t=-1,o=e.length;for(r||(r=Array(o));++t<o;)r[t]=e[t];return r}function Yo(e,r,t,o){var a=!t;t||(t={});for(var i=-1,s=r.length;++i<s;){var n=r[i],l=void 0;l===void 0&&(l=e[n]),a?ve(t,n,l):Ho(t,n,l);}return t}function Zo(e){return qo(function(r,t){var o=-1,a=t.length,i=a>1?t[a-1]:void 0,s=a>2?t[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,s&&oa(t[0],t[1],s)&&(i=a<3?void 0:i,a=1),r=Object(r);++o<a;){var n=t[o];n&&e(r,n,o,i);}return r})}function ea(e){return function(r,t,o){for(var a=-1,i=Object(r),s=o(r),n=s.length;n--;){var l=s[++a];if(t(i[l],l,i)===!1)break}return r}}function Q(e,r){var t=e.__data__;return aa(r)?t[typeof r=="string"?"string":"hash"]:t.map}function _e(e,r){var t=so(e,r);return No(t)?t:void 0}function ra(e){var r=_.call(e,A),t=e[A];try{e[A]=void 0;var o=!0;}catch{}var a=er.call(e);return o&&(r?e[A]=t:delete e[A]),a}function ta(e){return typeof e.constructor=="function"&&!nr(e)?yo(rr(e)):{}}function ar(e,r){var t=typeof e;return r=r==null?Ue:r,!!r&&(t=="number"||t!="symbol"&&to.test(e))&&e>-1&&e%1==0&&e<r}function oa(e,r,t){if(!w(t))return !1;var o=typeof r;return (o=="number"?xe(t)&&ar(r,t.length):o=="string"&&r in t)?X(t[r],e):!1}function aa(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function na(e){return !!Ve&&Ve in e}function nr(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||q;return e===t}function ia(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}function sa(e){return er.call(e)}function la(e,r,t){return r=We(r===void 0?e.length-1:r,0),function(){for(var o=arguments,a=-1,i=We(o.length-r,0),s=Array(i);++a<i;)s[a]=o[r+a];a=-1;for(var n=Array(r+1);++a<r;)n[a]=o[a];return n[r]=t(s),ao(e,this,n)}}function he(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var ca=fa(Uo);function fa(e){var r=0,t=0;return function(){var o=go(),a=kt-(o-t);if(t=o,a>0){if(++r>=Tt)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}function da(e){if(e!=null){try{return U.call(e)}catch{}try{return e+""}catch{}}return ""}function X(e,r){return e===r||e!==e&&r!==r}var ge=Ge(function(){return arguments}())?Ge:function(e){return H(e)&&_.call(e,"callee")&&!mo.call(e,"callee")},ye=Array.isArray;function xe(e){return e!=null&&sr(e.length)&&!Se(e)}function ua(e){return H(e)&&xe(e)}var ir=ho||ga;function Se(e){if(!w(e))return !1;var r=J(e);return r==Je||r==It||r==$t||r==Ft}function sr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ue}function w(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function H(e){return e!=null&&typeof e=="object"}function pa(e){if(!H(e)||J(e)!=Qe)return !1;var r=rr(e);if(r===null)return !0;var t=_.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&U.call(t)==uo}var lr=Re?io(Re):Lo;function ma(e){return Yo(e,cr(e))}function cr(e){return xe(e)?Vo(e):Wo(e)}var ba=Zo(function(e,r,t,o){or(e,r,t,o);});function ha(e){return function(){return e}}function fr(e){return e}function ga(){return !1}O.exports=ba;});var M="@saas-ui/storybook-addon2",Ie=`${M}/direction-tool`,y={TOGGLE_COLOR_MODE:`${M}/toggleColorMode`,TOGGLE_DIRECTION:`${M}/toggleDirection`,SET_THEME:`${M}/setTheme`};function Pe(){let{setColorMode:e}=react.useColorMode();return j.useEffect(()=>{let r=previewApi.addons.getChannel(),t=o=>e(o);return r.on(y.TOGGLE_COLOR_MODE,t),()=>{r.removeListener(y.TOGGLE_COLOR_MODE,t);}},[e]),null}var De=(e="ltr")=>{let[r,t]=j.useState(e.toLowerCase());return j.useEffect(()=>{document.documentElement.dir=r;},[r]),j.useEffect(()=>{let o=previewApi.addons.getChannel(),a=i=>t(i);return o.on(y.TOGGLE_DIRECTION,a),()=>{o.removeListener(y.TOGGLE_DIRECTION,a);}},[t]),r};function c(e,r={}){let t=!1;function o(){if(!t){t=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function a(...f){o();for(let m of f)r[m]=l(m);return c(e,r)}function i(...f){for(let m of f)m in r||(r[m]=l(m));return c(e,r)}function s(){return Object.fromEntries(Object.entries(r).map(([m,g])=>[m,g.selector]))}function n(){return Object.fromEntries(Object.entries(r).map(([m,g])=>[m,g.className]))}function l(f){let S=`chakra-${(["container","root"].includes(f!=null?f:"")?[e]:[e,f]).filter(Boolean).join("__")}`;return {className:S,selector:`.${S}`,toString:()=>f}}return {parts:a,toPart:l,extend:i,selectors:s,classnames:n,get keys(){return Object.keys(r)},__type:{}}}c("accordion").parts("root","container","button","panel","icon");var ne=c("alert").parts("title","description","container","icon","spinner");c("avatar").parts("label","badge","container","excessLabel","group");c("breadcrumb").parts("link","item","container","separator");c("button").parts();c("checkbox").parts("control","icon","container","label");c("progress").parts("track","filledTrack","label");var ie=c("drawer").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer");c("editable").parts("preview","input","textarea");c("form").parts("container","requiredIndicator","helperText");c("formError").parts("text","icon");var se=c("input").parts("addon","field","element","group");c("list").parts("container","item","icon");var le=c("menu").parts("button","list","item","groupTitle","icon","command","divider"),ce=c("modal").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer");c("numberinput").parts("root","field","stepperGroup","stepper");c("pininput").parts("field");var fe=c("popover").parts("content","header","body","footer","popper","arrow","closeButton"),de=c("progress").parts("label","filledTrack","track");c("radio").parts("container","control","label");c("select").parts("field","icon");c("slider").parts("container","track","thumb","filledTrack","mark");c("stat").parts("container","label","helpText","number","icon");var ue=c("switch").parts("container","track","thumb","label");c("table").parts("table","thead","tbody","tr","th","td","tfoot","caption");c("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator");c("tag").parts("container","label","closeButton");c("card").parts("container","header","body","footer");c("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");var Ct=e=>typeof e=="function";function v(e,...r){return Ct(e)?e(...r):e}Xr(dr());function b(e){return {definePartsStyle(r){return r},defineMultiStyleConfig(r){return {parts:e,...r}}}}function va(e,r="-"){return e.replace(/\s+/g,r)}function _a(e){let r=va(e.toString());return Sa(xa(r))}function xa(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function Sa(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function ur(e,r=""){return [r,e].filter(Boolean).join("-")}function pr(e,r){return `var(${e}${r?`, ${r}`:""})`}function mr(e,r=""){return _a(`--${ur(e,r)}`)}function u(e,r,t){let o=mr(e,t);return {variable:o,reference:pr(o,r)}}function k(e,r,t){return Math.min(Math.max(e,t),r)}var Ae=class extends Error{constructor(r){super(`Failed to parse color: "${r}"`);}},B=Ae;function Ce(e){if(typeof e!="string")throw new B(e);if(e.trim().toLowerCase()==="transparent")return [0,0,0,0];let r=e.trim();r=Ma.test(e)?wa(e):e;let t=Ta.exec(r);if(t){let s=Array.from(t).slice(1);return [...s.slice(0,3).map(n=>parseInt(N(n,2),16)),parseInt(N(s[3]||"f",2),16)/255]}let o=ka.exec(r);if(o){let s=Array.from(o).slice(1);return [...s.slice(0,3).map(n=>parseInt(n,16)),parseInt(s[3]||"ff",16)/255]}let a=za.exec(r);if(a){let s=Array.from(a).slice(1);return [...s.slice(0,3).map(n=>parseInt(n,10)),parseFloat(s[3]||"1")]}let i=$a.exec(r);if(i){let[s,n,l,d]=Array.from(i).slice(1).map(parseFloat);if(k(0,100,n)!==n)throw new B(e);if(k(0,100,l)!==l)throw new B(e);return [...Oa(s,n,l),Number.isNaN(d)?1:d]}throw new B(e)}function Aa(e){let r=5381,t=e.length;for(;t;)r=r*33^e.charCodeAt(--t);return (r>>>0)%2341}var hr=e=>parseInt(e.replace(/_/g,""),36),Ca="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,r)=>{let t=hr(r.substring(0,3)),o=hr(r.substring(3)).toString(16),a="";for(let i=0;i<6-o.length;i++)a+="0";return e[t]=`${a}${o}`,e},{});function wa(e){let r=e.toLowerCase().trim(),t=Ca[Aa(r)];if(!t)throw new B(e);return `#${t}`}var N=(e,r)=>Array.from(Array(r)).map(()=>e).join(""),Ta=new RegExp(`^#${N("([a-f0-9])",3)}([a-f0-9])?$`,"i"),ka=new RegExp(`^#${N("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),za=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${N(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),$a=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Ma=/^[a-z]+$/i,gr=e=>Math.round(e*255),Oa=(e,r,t)=>{let o=t/100;if(r===0)return [o,o,o].map(gr);let a=(e%360+360)%360/60,i=(1-Math.abs(2*o-1))*(r/100),s=i*(1-Math.abs(a%2-1)),n=0,l=0,d=0;a>=0&&a<1?(n=i,l=s):a>=1&&a<2?(n=s,l=i):a>=2&&a<3?(l=i,d=s):a>=3&&a<4?(l=s,d=i):a>=4&&a<5?(n=s,d=i):a>=5&&a<6&&(n=i,d=s);let f=o-i/2,m=n+f,g=l+f,S=d+f;return [m,g,S].map(gr)};function Ea(e,r,t,o){return `rgba(${k(0,255,e).toFixed()}, ${k(0,255,r).toFixed()}, ${k(0,255,t).toFixed()}, ${parseFloat(k(0,1,o).toFixed(3))})`}function yr(e,r){let[t,o,a,i]=Ce(e);return Ea(t,o,a,i-r)}function vr(e){let[r,t,o,a]=Ce(e),i=s=>{let n=k(0,255,s).toString(16);return n.length===1?`0${n}`:n};return `#${i(r)}${i(t)}${i(o)}${a<1?i(Math.round(a*255)):""}`}function Ia(e,r,t,o,a){for(r=r.split?r.split("."):r,o=0;o<r.length;o++)e=e?e[r[o]]:a;return e===a?t:e}var z=(e,r,t)=>{let o=Ia(e,`colors.${r}`,r);try{return vr(o),o}catch{return "#000000"}};var P=(e,r)=>t=>{let o=z(t,e);return yr(o,1-r)};function Y(e,r){return t=>t.colorMode==="dark"?r:e}function _r(e){return !Number.isInteger(parseFloat(e.toString()))}function Pa(e,r="-"){return e.replace(/\s+/g,r)}function xr(e){let r=Pa(e.toString());return r.includes("\\.")?e:_r(e)?r.replace(".","\\."):e}function Sr(e,r=""){return [r,xr(e)].filter(Boolean).join("-")}function Ar(e,r){return `var(${xr(e)}${r?`, ${r}`:""})`}function Cr(e,r=""){return `--${Sr(e,r)}`}function $(e,r){let t=Cr(e,void 0);return {variable:t,reference:Ar(t,ja(void 0))}}function ja(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{definePartsStyle:Ir,defineMultiStyleConfig:Da}=b(ne.keys),wr=u("alert-fg"),Tr=u("alert-bg"),$e=u("alert-border");function Fa(e){let{theme:r,colorScheme:t}=e,o=P(`${t}.600`,.16)(r);return {light:`colors.${t}.100`,dark:o}}function Ra(e){let{theme:r,colorScheme:t}=e,o=P(`${t}.300`,.16)(r);return {light:`colors.${t}.200`,dark:o}}var Va=Ir(e=>{let{colorScheme:r}=e,t=Fa(e),o=Ra(e);return {container:{borderWidth:"1px",[wr.variable]:`colors.${r}.500`,[Tr.variable]:t.light,[$e.variable]:o.light,_dark:{[wr.variable]:`colors.${r}.500`,[Tr.variable]:t.dark,[$e.variable]:o.dark}}}}),Ha=Ir(()=>({container:{borderColor:$e.reference,borderRadius:"md",fontSize:"sm"},icon:{w:4,h:5},title:{fontSize:"sm",fontWeight:"medium"},description:{color:"muted"}})),Ba=Da({defaultProps:{size:"sm",colorScheme:"primary"},baseStyle:Ha,variants:{subtle:Va}}),Pr=e=>{let{colorScheme:r,colorMode:t}=e,o=`${r}.500`,a=`${r}.600`;return r==="neutral"&&t==="dark"?(o="white",a="whiteAlpha.800"):r==="neutral"&&(o="black",a="blackAlpha.800"),{borderWidth:"1px",borderColor:o,boxShadow:"xs",bg:o,color:"white",fontWeight:"medium",_hover:{borderColor:a,bg:a},_dark:{boxShadow:"dark-xs"}}},Na=e=>({fontWeight:"medium",_checked:{bg:"blackAlpha.100"},_dark:{_checked:{bg:"whiteAlpha.100"}}}),La=e=>{let{colorScheme:r}=e;return r==="gray"?{fontWeight:"medium"}:{fontWeight:"medium",color:`${r}.500`,_hover:{color:`${r}.400`,bg:"blackAlpha.50"},_dark:{color:`${r}.500`,_hover:{color:`${r}.400`,bg:"whiteAlpha.50"}}}},Wa=e=>Pr({...e,colorScheme:"primary"}),Ga={borderWidth:"1px",borderColor:"gray.200",boxShadow:"xs",bg:"white",fontWeight:"medium",color:"inherit",_hover:{borderColor:"gray.300",bg:"gray.50"},_dark:{boxShadow:"dark-xs",borderColor:"gray.600",bg:"gray.700",_hover:{borderColor:"gray.500",bg:"gray.600"}}},qa={borderWidth:"1px",borderColor:"gray.200",bg:"gray.200",color:"black",fontWeight:"medium",_hover:{borderColor:"gray.300",bg:"gray.200"},_dark:{borderColor:"gray.700",bg:"gray.700",color:"white",_hover:{borderColor:"gray.600"}}},Ua={lg:{h:"8",minW:"10",fontSize:"md",px:"4",rounded:"6"},md:{h:"7",minW:"8",fontSize:"sm",px:"3",rounded:"4"},sm:{h:"6",minW:"6",fontSize:"sm",px:"2",rounded:"3"},xs:{h:"5",minW:"4",fontSize:"xs",px:"1",rounded:"3"}},Ka={defaultProps:{size:"md",variant:"secondary"},variants:{solid:Pr,outline:La,ghost:Na,primary:Wa,secondary:Ga,tertiary:qa},sizes:Ua},jr=c("card").parts("container","header","title","subtitle","body","footer"),{definePartsStyle:oe}=b(jr.keys),Ja=u("card-bg"),we=u("card-padding"),Qa=u("card-shadow"),Te=u("card-radius"),Xa=u("card-border-width","0"),Z=u("card-border-color"),Ya={sm:oe({container:{[Te.variable]:"radii.base",[we.variable]:"space.3"}}),md:oe({container:{[Te.variable]:"radii.md",[we.variable]:"space.4"}}),lg:oe({container:{[Te.variable]:"radii.xl",[we.variable]:"space.6"}})},kr=oe(e=>{let{isHoverable:r}=e;return {container:{[Z.variable]:"colors.blackAlpha.200",[Xa.variable]:"1px",[Qa.variable]:"shadows.sm",_hover:r?{[Z.variable]:"colors.blackAlpha.300"}:{},_dark:{[Ja.variable]:"colors.gray.700",[Z.variable]:"colors.whiteAlpha.50",_hover:r?{[Z.variable]:"colors.whiteAlpha.300"}:{}}}}}),Za={parts:jr.keys,defaultProps:{variant:"elevated"},variants:{elevated:kr,shadow:kr},sizes:Ya},en={baseStyle:e=>{let{colorScheme:r}=e;return {control:{_checked:{borderColor:`${r}.500`,bg:`${r}.500`,color:"white"}}}},defaultProps:{colorScheme:"primary"}},rn={size:"sm"},tn={defaultProps:rn},{defineMultiStyleConfig:on,definePartsStyle:an}=b(ie.keys),zr=u("drawer-bg"),nn={bg:"blackAlpha.50"},sn=e=>({borderRadius:"md",margin:"8px",borderWidth:"1px",borderColor:"chakra-border-color",backdropFilter:"blur(10px) contrast(100%) saturate(100%) brightness(200%)",[zr.variable]:"colors.whiteAlpha.800",fontSize:"md",_dark:{backdropFilter:"blur(10px) saturate(190%) contrast(70%) brightness(80%)",[zr.variable]:"colors.grayAlpha.700"}}),ln={px:"4",py:"3",fontSize:"md",fontWeight:"semibold"},cn={position:"absolute",top:"2",insetEnd:"3"},fn=e=>({px:"4",py:"2"}),dn={px:"3",py:"3"},un=an(e=>({overlay:nn,dialog:v(sn,e),header:ln,closeButton:cn,body:v(fn,e),footer:dn})),pn=on({baseStyle:un}),mn=pn,bn={defaultProps:{size:"lg"}},ke=u("kbd-bg"),hn={[ke.variable]:"colors.blackAlpha.300",_dark:{[ke.variable]:"colors.whiteAlpha.300"},bg:ke.reference,borderRadius:"md",borderWidth:"0",borderBottomWidth:"0",padding:"1px",minW:"20px",textAlign:"center",":last-child":{mr:0}},gn={defaultProps:{variant:"solid"},baseStyle:hn},yn=gn,{defineMultiStyleConfig:vn,definePartsStyle:_n}=b(le.keys),h=u("menu-bg"),ze=u("menu-shadow"),xn={[h.variable]:"colors.whiteAlpha.500",[ze.variable]:"shadows.lg",backdropFilter:"blur(10px) contrast(100%) saturate(190%)",_dark:{[h.variable]:"colors.grayAlpha.700",[ze.variable]:"shadows.dark-lg",backdropFilter:"blur(10px) saturate(190%) contrast(70%) brightness(80%)"},py:"1",borderRadius:"md",borderWidth:"1px",bg:h.reference,boxShadow:ze.reference},Sn={py:"1.5",px:"3",mx:"1",rounded:"md",fontSize:"sm",width:"calc(100% - 8px)",boxSizing:"border-box",bg:"transparent",_hover:{bg:h.reference,[h.variable]:"colors.grayAlpha.300"},_focus:{bg:h.reference,[h.variable]:"colors.grayAlpha.300"},_active:{bg:h.reference,[h.variable]:"colors.grayAlpha.300"},_expanded:{bg:h.reference,[h.variable]:"colors.grayAlpha.300"}},An={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Cn={transitionProperty:"common",transitionDuration:"normal"},wn={my:"1"},Tn=_n({button:Cn,list:xn,item:Sn,groupTitle:An,divider:wn}),kn=vn({baseStyle:Tn}),zn=kn,{defineMultiStyleConfig:$n,definePartsStyle:Mn}=b(ce.keys),On={bg:"blackAlpha.50"},En=e=>({bg:"whiteAlpha.800",backdropFilter:"blur(10px) contrast(100%) saturate(100%) brightness(200%)",fontSize:"md",_dark:{bg:"grayAlpha.700",boxShadow:"dark-lg",backdropFilter:"blur(10px) saturate(190%) contrast(70%) brightness(80%)"}}),In={px:"4",py:"3",fontSize:"md",fontWeight:"semibold"},Pn={position:"absolute",top:"2",insetEnd:"3"},jn=e=>({px:"4",py:"2"}),Dn={px:"3",py:"3"},Fn=Mn(e=>({overlay:On,dialog:v(En,e),header:In,closeButton:Pn,body:v(jn,e),footer:Dn})),Rn=$n({baseStyle:Fn,defaultProps:{size:"md"}}),Vn=Rn,{defineMultiStyleConfig:Hn}=b(de.keys),Bn=Hn({defaultProps:{colorScheme:"primary"},baseStyle:e=>{let{colorScheme:r}=e;return {track:{borderRadius:"md",bg:"gray.200",_dark:{bg:"gray.800"}},filledTrack:{bg:`${r}.500`}}}}),{defineMultiStyleConfig:Nn,definePartsStyle:Ln}=b(fe.keys),ee=u("popper-bg"),Wn=u("popper-arrow-bg"),$r=u("popper-arrow-shadow-color"),Gn={[ee.variable]:"colors.whiteAlpha.800",bg:ee.reference,[Wn.variable]:ee.reference,[$r.variable]:"colors.gray.200",backdropFilter:"blur(10px) contrast(100%) saturate(100%) brightness(200%)",_dark:{[ee.variable]:"colors.grayAlpha.700",[$r.variable]:"colors.whiteAlpha.300",backdropFilter:"blur(10px) saturate(190%) contrast(70%) brightness(80%)"}},qn=Ln(e=>({content:v(Gn,e)})),Un=Nn({baseStyle:qn,defaultProps:{size:"md"}}),Kn=Un,Jn={baseStyle:e=>{let{colorScheme:r}=e;return {control:{_checked:{borderColor:`${r}.500`,bg:`${r}.500`,color:"white"}}}},defaultProps:{colorScheme:"primary"}},Qn={defaultProps:{colorScheme:"primary"},baseStyle:e=>{let{colorScheme:r}=e;return {filledTrack:{bg:`${r}.500`}}}},{defineMultiStyleConfig:Xn,definePartsStyle:Yn}=b(ue.keys),L=$("switch-bg"),Zn=e=>{let{colorScheme:r}=e;return {[L.variable]:"colors.gray.300",_dark:{[L.variable]:"colors.whiteAlpha.300"},_checked:{[L.variable]:`colors.${r}.500`,_dark:{[L.variable]:`colors.${r}.500`}},bg:L.reference}},ei={bg:"white",_dark:{bg:"blackAlpha.800",_checked:{bg:"white"}}},ri=Yn(e=>({track:Zn(e),thumb:ei})),ti=Xn({baseStyle:ri,defaultProps:{size:"md",colorScheme:"primary"}}),oi=ti,re=$("tooltip-bg"),Mr=$("tooltip-fg"),ai=$("popper-arrow-bg"),ni=e=>({display:"flex",[re.variable]:"colors.white",[Mr.variable]:"colors.blackAlpha.900",_dark:{[re.variable]:"colors.gray.700",[Mr.variable]:"colors.whiteAlpha.900"},px:"8px",py:"2px",bg:[re.reference],[ai.variable]:[re.reference],borderRadius:"sm",fontWeight:"medium",fontSize:"xs",boxShadow:"md",maxW:"320px",zIndex:"tooltip",borderWidth:"1px"}),ii={baseStyle:ni},{definePartsStyle:si}=b(se.keys);function li(e){let{focusBorderColor:r,errorBorderColor:t}=e;return {focusBorderColor:r||Y("blue.500","blue.300")(e),errorBorderColor:t||Y("red.500","red.300")(e)}}var Or=u("input-border-radius"),te=u("input-height"),Er=u("input-padding"),Dr=si(e=>{let{theme:r}=e,{focusBorderColor:t,errorBorderColor:o}=li(e);return {field:{border:"1px solid var(--chakra-colors-chakra-border-color)",bg:"inherit",_hover:{borderColor:"gray.300"},_invalid:{borderColor:z(r,o),boxShadow:"none"},_focusVisible:{zIndex:1,borderColor:z(r,t),boxShadow:"none"},_dark:{bg:"gray.900",borderColor:"chakra-border-color",_hover:{borderColor:"whiteAlpha.400"},_invalid:{borderColor:z(r,o)},_focusVisible:{borderColor:z(r,t)}}},addon:{borderColor:"inherit",bg:"gray.100",_dark:{borderColor:"whiteAlpha.50",bg:"whiteAlpha.300"}}}}),Fr={sm:{field:{[Or.variable]:"radii.sm",[te.variable]:"sizes.7"},addon:{[Or.variable]:"radii.sm",[te.variable]:"sizes.7"}},md:{field:{[Er.variable]:"space.3",[te.variable]:"sizes.9"},addon:{[Er.variable]:"space.3",[te.variable]:"sizes.9"}}},Rr={defaultProps:{variant:"outline",size:"sm",focusBorderColor:"primary.500"},variants:{outline:Dr},sizes:Fr},ci={baseStyle:{mb:1},variants:{horizontal:{mb:0,marginStart:"0.5rem"}}},Me=Rr,fi=Rr,di={defaultProps:{focusBorderColor:"primary.500"},variants:{outline:Dr},sizes:Fr},ui={defaultProps:{focusBorderColor:"primary.500"},variants:{outline:e=>{var r,t;return (t=(r=Me.variants)==null?void 0:r.outline(e).field)!=null?t:{}}}},pi=Me,Vr={Alert:Ba,Button:Ka,Card:Za,Checkbox:en,CloseButton:tn,Drawer:mn,Heading:bn,Kbd:yn,Menu:zn,Modal:Vn,Progress:Bn,Popover:Kn,Radio:Jn,Slider:Qn,Switch:oi,Tooltip:ii,Input:Me,PinInput:di,FormLabel:ci,NumberInput:fi,Select:pi,Textarea:ui};var bi={black:"#0e1012",primary:{50:"#f6f7fd",100:"#dcdff5",200:"#bec3ed",300:"#9aa1e2",400:"#858edd",500:"#6b75d0",600:"#5a63af",700:"#484f8d",800:"#3d4377",900:"#2c3056"},grayAlpha:{50:"rgba(249, 249, 250, 0.5)",100:"rgba(241, 241, 243, 0.5)",200:"rgba(231, 231, 234, 0.5)",300:"rgba(211, 212, 216, 0.5)",400:"rgba(171, 172, 181, 0.5)",500:"rgba(124, 126, 139, 0.5)",600:"rgba(81, 84, 101, 0.5)",700:"rgba(52, 54, 67, 0.5)",800:"rgba(30, 32, 39, 0.5)",900:"rgba(24, 25, 31, 0.5)"},gray:{50:"#f9f9fa",100:"#f1f1f3",200:"#e7e7ea",300:"#d3d4d8",400:"#abacb5",500:"#7c7e8b",600:"#515465",700:"#343643",800:"#1e2027",900:"#18191f"},purple:{50:"#f9f6fd",100:"#e5daf8",200:"#d3bef4",300:"#b795ec",400:"#a379e7",500:"#8952e0",600:"#7434db",700:"#6023c0",800:"#4f1d9e",900:"#3b1676"},pink:{50:"#fdf5f9",100:"#f8d9e7",200:"#f3b9d3",300:"#eb8db8",400:"#e56ba2",500:"#dc3882",600:"#c4246c",700:"#a01d58",800:"#7d1745",900:"#5d1133"},red:{50:"#fdf6f5",100:"#f8d9d8",200:"#f1b8b4",300:"#e98d87",400:"#e4726c",500:"#dc4a41",600:"#d2140a",700:"#ac0900",800:"#930800",900:"#6d0600"},orange:{50:"#fdfaf6",100:"#f9ebdb",200:"#f1d4b1",300:"#e6b273",400:"#dc9239",500:"#c37b24",600:"#a5681e",700:"#835318",800:"#674113",900:"#553610"},yellow:{50:"#fffefb",100:"#fff8e9",200:"#feecbd",300:"#fddc87",400:"#fbc434",500:"#d2a01e",600:"#a88018",700:"#836413",800:"#624b0e",900:"#513e0c"},green:{50:"#f7fdfb",100:"#d2f2e7",200:"#9fe3cd",300:"#64d2ad",400:"#1dbd88",500:"#0ea371",600:"#0c875e",700:"#096949",800:"#07563c",900:"#064731"},teal:{50:"#f1fcfc",100:"#c0f1f4",200:"#84e4e9",300:"#2dd1da",400:"#22b2ba",500:"#1d979e",600:"#187b80",700:"#125f64",800:"#0f5053",900:"#0d4244"},cyan:{50:"#f4fbfd",100:"#d0eef7",200:"#bae7f3",300:"#a2deee",400:"#53c2e1",500:"#2ab4d9",600:"#24a2c4",700:"#1e86a2",800:"#196e85",900:"#135567"},blue:{50:"#f1f6fd",100:"#cde0f6",200:"#a8c8f0",300:"#7fafe8",400:"#5896e1",500:"#347fdb",600:"#236abf",700:"#1b5192",800:"#164278",900:"#123662"},indigo:{50:"#f8f7fc",100:"#e1ddf5",200:"#c8c0ec",300:"#a89de2",400:"#9789dc",500:"#7f6ed4",600:"#6a58c9",700:"#5546a1",800:"#483c88",900:"#342b62"}},Oe=bi,hi={heading:"InterVariable, sans-serif",body:"InterVariable, sans-serif"},gi={xs:"0.75rem",sm:"0.8125rem",md:"0.875rem",lg:"1rem",xl:"1.125rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"},yi={},vi={container:{sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"}},_i=vi,xi={xs:"rgb(0 0 0 / 7%) 0px 1px 1px","dark-xs":"rgb(0 0 0 / 7%) 0px 1px 1px",outline:`0 0 0 2px ${P(Oe.primary[500],.6)({colors:Oe})}`},Si=xi,Ai={colors:{muted:{default:"gray.500",_dark:"gray.400"}}},Hr=react.extendTheme({colors:Oe,fonts:hi,fontSizes:gi,textStyles:yi,sizes:_i,components:Vr,shadows:Si,semanticTokens:Ai});var $i=react.extendTheme(Hr,react$1.theme),Mi=()=>{let[e,r]=react$1.useLocalStorage("storybook.theme","1");return j__namespace.useEffect(()=>{let t=previewApi.addons.getChannel(),o=a=>{r(a);};return t.on(y.SET_THEME,o),()=>{t.removeListener(y.SET_THEME,o);}},[r]),e},Lr=previewApi.makeDecorator({name:"ChakraProviderDecorator",parameterName:"chakra",skipIfNoParametersOrOptions:!1,wrapper:(e,r,{parameters:t})=>{let {parameters:{saasui:o},globals:{[Ie]:a}}=r,i=Mi(),s=j__namespace.useCallback(()=>{switch(i){case"1":return react$1.theme;case"2":return $i;default:return react$1.baseTheme}},[i]),n=(o==null?void 0:o.theme)||s();!!(o!=null&&o.theme);let d=o!=null&&o.theme?typeof o.theme=="function"?o.theme(r):o.theme:n,f=De(a||(d==null?void 0:d.direction)),m=j__namespace.useMemo(()=>react.extendTheme({direction:f,styles:{global:{body:{minHeight:"var(--chakra-vh)"}}}},d),[d,f]);return jsxRuntime.jsxs(react$1.SaasProvider,{...o,theme:m,children:[jsxRuntime.jsx(Pe,{}),e(r)]})}});var Ii={decorators:[Lr]},kl=Ii;
30
30
 
31
- module.exports = ud;
32
- //# sourceMappingURL=out.js.map
31
+ module.exports = kl;
32
+ //# sourceMappingURL=preview.cjs.map
33
33
  //# sourceMappingURL=preview.cjs.map