{"version":3,"file":"createTypography.mjs","sources":["../../../../../../../../node_modules/@mui/material/styles/createTypography.js"],"sourcesContent":["import deepmerge from '@mui/utils/deepmerge';\nfunction round(value) {\n  return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n  textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n  const {\n    fontFamily = defaultFontFamily,\n    // The default font size of the Material Specification.\n    fontSize = 14,\n    // px\n    fontWeightLight = 300,\n    fontWeightRegular = 400,\n    fontWeightMedium = 500,\n    fontWeightBold = 700,\n    // Tell MUI what's the font-size on the html element.\n    // 16px is the default font-size used by browsers.\n    htmlFontSize = 16,\n    // Apply the CSS properties to all the variants.\n    allVariants,\n    pxToRem: pxToRem2,\n    ...other\n  } = typeof typography === 'function' ? typography(palette) : typography;\n  if (process.env.NODE_ENV !== 'production') {\n    if (typeof fontSize !== 'number') {\n      console.error('MUI: `fontSize` is required to be a number.');\n    }\n    if (typeof htmlFontSize !== 'number') {\n      console.error('MUI: `htmlFontSize` is required to be a number.');\n    }\n  }\n  const coef = fontSize / 14;\n  const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n  const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({\n    fontFamily,\n    fontWeight,\n    fontSize: pxToRem(size),\n    // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n    lineHeight,\n    // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing\n    // across font-families can cause issues with the kerning.\n    ...(fontFamily === defaultFontFamily ? {\n      letterSpacing: `${round(letterSpacing / size)}em`\n    } : {}),\n    ...casing,\n    ...allVariants\n  });\n  const variants = {\n    h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n    h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n    h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n    h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n    h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n    h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n    subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n    subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n    body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n    body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n    button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n    caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n    overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n    // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n    inherit: {\n      fontFamily: 'inherit',\n      fontWeight: 'inherit',\n      fontSize: 'inherit',\n      lineHeight: 'inherit',\n      letterSpacing: 'inherit'\n    }\n  };\n  return deepmerge({\n    htmlFontSize,\n    pxToRem,\n    fontFamily,\n    fontSize,\n    fontWeightLight,\n    fontWeightRegular,\n    fontWeightMedium,\n    fontWeightBold,\n    ...variants\n  }, other, {\n    clone: false // No need to clone deep\n  });\n}"],"names":["round"],"mappings":";;AACA,SAASA,OAAK,CAAC,KAAK,EAAE;AACtB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG;AACtC;AACA,MAAM,WAAW,GAAG;AACpB,EAAE,aAAa,EAAE;AACjB,CAAC;AACD,MAAM,iBAAiB,GAAG,4CAA4C;;AAEtE;AACA;AACA;AACA;AACe,SAAS,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE;AAC9D,EAAE,MAAM;AACR,IAAI,UAAU,GAAG,iBAAiB;AAClC;AACA,IAAI,QAAQ,GAAG,EAAE;AACjB;AACA,IAAI,eAAe,G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