{"ast":null,"code":"import useMemo from \"rc-util/es/hooks/useMemo\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport { defaultConfig } from '../../theme/internal';\nexport default function useTheme(theme, parentTheme) {\n  const themeConfig = theme || {};\n  const parentThemeConfig = themeConfig.inherit === false || !parentTheme ? defaultConfig : parentTheme;\n  return useMemo(() => {\n    if (!theme) {\n      return parentTheme;\n    }\n    // Override\n    const mergedComponents = Object.assign({}, parentThemeConfig.components);\n    Object.keys(theme.components || {}).forEach(componentName => {\n      mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]), theme.components[componentName]);\n    });\n    // Base token\n    return Object.assign(Object.assign(Object.assign({}, parentThemeConfig), themeConfig), {\n      token: Object.assign(Object.assign({}, parentThemeConfig.token), themeConfig.token),\n      components: mergedComponents\n    });\n  }, [themeConfig, parentThemeConfig], (prev, next) => prev.some((prevTheme, index) => {\n    const nextTheme = next[index];\n    return !isEqual(prevTheme, nextTheme, true);\n  }));\n}","map":{"version":3,"names":["useMemo","isEqual","defaultConfig","useTheme","theme","parentTheme","themeConfig","parentThemeConfig","inherit","mergedComponents","Object","assign","components","keys","forEach","componentName","token","prev","next","some","prevTheme","index","nextTheme"],"sources":["/Users/chrishaack/UC_Trains_Voice/react-demo/node_modules/antd/es/config-provider/hooks/useTheme.js"],"sourcesContent":["import useMemo from \"rc-util/es/hooks/useMemo\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport { defaultConfig } from '../../theme/internal';\nexport default function useTheme(theme, parentTheme) {\n  const themeConfig = theme || {};\n  const parentThemeConfig = themeConfig.inherit === false || !parentTheme ? defaultConfig : parentTheme;\n  return useMemo(() => {\n    if (!theme) {\n      return parentTheme;\n    }\n    // Override\n    const mergedComponents = Object.assign({}, parentThemeConfig.components);\n    Object.keys(theme.components || {}).forEach(componentName => {\n      mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]), theme.components[componentName]);\n    });\n    // Base token\n    return Object.assign(Object.assign(Object.assign({}, parentThemeConfig), themeConfig), {\n      token: Object.assign(Object.assign({}, parentThemeConfig.token), themeConfig.token),\n      components: mergedComponents\n    });\n  }, [themeConfig, parentThemeConfig], (prev, next) => prev.some((prevTheme, index) => {\n    const nextTheme = next[index];\n    return !isEqual(prevTheme, nextTheme, true);\n  }));\n}"],"mappings":"AAAA,OAAOA,OAAO,MAAM,0BAA0B;AAC9C,OAAOC,OAAO,MAAM,oBAAoB;AACxC,SAASC,aAAa,QAAQ,sBAAsB;AACpD,eAAe,SAASC,QAAQA,CAACC,KAAK,EAAEC,WAAW,EAAE;EACnD,MAAMC,WAAW,GAAGF,KAAK,IAAI,CAAC,CAAC;EAC/B,MAAMG,iBAAiB,GAAGD,WAAW,CAACE,OAAO,KAAK,KAAK,IAAI,CAACH,WAAW,GAAGH,aAAa,GAAGG,WAAW;EACrG,OAAOL,OAAO,CAAC,MAAM;IACnB,IAAI,CAACI,KAAK,EAAE;MACV,OAAOC,WAAW;IACpB;IACA;IACA,MAAMI,gBAAgB,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEJ,iBAAiB,CAACK,UAAU,CAAC;IACxEF,MAAM,CAACG,IAAI,CAACT,KAAK,CAACQ,UAAU,IAAI,CAAC,CAAC,CAAC,CAACE,OAAO,CAACC,aAAa,IAAI;MAC3DN,gBAAgB,CAACM,aAAa,CAAC,GAAGL,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEF,gBAAgB,CAACM,aAAa,CAAC,CAAC,EAAEX,KAAK,CAACQ,UAAU,CAACG,aAAa,CAAC,CAAC;IACtI,CAAC,CAAC;IACF;IACA,OAAOL,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEJ,iBAAiB,CAAC,EAAED,WAAW,CAAC,EAAE;MACrFU,KAAK,EAAEN,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC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