{"version":3,"file":"ThemeProviderWithVars.mjs","sources":["../../../../../../../../node_modules/@mui/material/styles/ThemeProviderWithVars.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport styleFunctionSx from '@mui/system/styleFunctionSx';\nimport { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';\nimport createTheme from \"./createTheme.js\";\nimport createTypography from \"./createTypography.js\";\nimport THEME_ID from \"./identifier.js\";\nimport { defaultConfig } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst {\n  CssVarsProvider: InternalCssVarsProvider,\n  useColorScheme,\n  getInitColorSchemeScript: deprecatedGetInitColorSchemeScript\n} = createCssVarsProvider({\n  themeId: THEME_ID,\n  // @ts-ignore ignore module augmentation tests\n  theme: () => createTheme({\n    cssVariables: true\n  }),\n  colorSchemeStorageKey: defaultConfig.colorSchemeStorageKey,\n  modeStorageKey: defaultConfig.modeStorageKey,\n  defaultColorScheme: {\n    light: defaultConfig.defaultLightColorScheme,\n    dark: defaultConfig.defaultDarkColorScheme\n  },\n  resolveTheme: theme => {\n    const newTheme = {\n      ...theme,\n      typography: createTypography(theme.palette, theme.typography)\n    };\n    newTheme.unstable_sx = function sx(props) {\n      return styleFunctionSx({\n        sx: props,\n        theme: this\n      });\n    };\n    return newTheme;\n  }\n});\nlet warnedOnce = false;\n\n// TODO: remove in v7\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction Experimental_CssVarsProvider(props) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (!warnedOnce) {\n      console.warn(['MUI: The Experimental_CssVarsProvider component has been ported into ThemeProvider.', '', \"You should use `import { ThemeProvider } from '@mui/material/styles'` instead.\", 'For more details, check out https://mui.com/material-ui/customization/css-theme-variables/usage/'].join('\\n'));\n      warnedOnce = true;\n    }\n  }\n  return /*#__PURE__*/_jsx(InternalCssVarsProvider, {\n    ...props\n  });\n}\nlet warnedInitScriptOnce = false;\n\n// TODO: remove in v7\nconst getInitColorSchemeScript = params => {\n  if (!warnedInitScriptOnce) {\n    console.warn(['MUI: The getInitColorSchemeScript function has been deprecated.', '', \"You should use `import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'`\", 'and replace the function call with `<InitColorSchemeScript />` instead.'].join('\\n'));\n    warnedInitScriptOnce = true;\n  }\n  return deprecatedGetInitColorSchemeScript(params);\n};\n\n/**\n * TODO: remove this export in v7\n * @deprecated\n * The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.\n *\n * You should use `ThemeProvider` and `createTheme()` instead:\n *\n * ```diff\n * - import { CssVarsProvider, extendTheme } from '@mui/material/styles';\n * + import { ThemeProvider, createTheme } from '@mui/material/styles';\n *\n * - const theme = extendTheme();\n * + const theme = createTheme({\n * +   cssVariables: true,\n * +   colorSchemes: { light: true, dark: true },\n * + });\n *\n * - <CssVarsProvider theme={theme}>\n * + <ThemeProvider theme={theme}>\n * ```\n *\n * To see the full documentation, check out https://mui.com/material-ui/customization/css-theme-variables/usage/.\n */\nexport const CssVarsProvider = InternalCssVarsProvider;\nexport { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };"],"names":[],"mappings":";;;;;;;;;AAUA,MAAM;AACN,EAAE,eAAe,EAAE,uBAGnB,CAAC,GAAG,qBAAqB,CAAC;AAC1B,EAAE,OAAO,EAAE,QAAQ;AACnB;AACA,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAC3B,IAAI,YAAY,EAAE;AAClB,GAAG,CAAC;AACJ,EAAE,qBAAqB,EAAE,aAAa,CAAC,qBAAqB;AAC5D,EAAE,cAAc,EAAE,aAAa,CAAC,cAAc;AAC9C,EAAE,kBAAkB,EAAE;AACtB,IAAI,KAAK,EAAE,aAAa,CAAC,uBAAuB;AAChD,IAAI,IAAI,EAAE,aAAa,CAAC;AACxB,GAAG;AACH,EAAE,YAAY,EAAE,KAAK,IAAI;AACzB,IAAI,MAAM,QAAQ,GAAG;AACrB,MAAM,GAAG,KAAK;AACd,MAAM,UAAU,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU;AAClE,KAAK;AACL,IAAI,QAAQ,CAAC,WAAW,GAAG,SAAS,EAAE,CAAC,KAAK,EAAE;AAC9C,MAAM,OAAO,eAAe,CAAC;AAC7B,QAAQ,EAAE,EAAE,KAAK;AACjB,QAAQ,KAAK,EAAE;AACf,OAAO,CAAC;AACR,IAAI,CAAC;AACL,IAAI,OAAO,QAAQ;AACnB,EAAE;AACF,CAAC,CAAC;;AA2BF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG;;;;","x_google_ignoreList":[0]}