1 line
2.9 KiB
JSON
1 line
2.9 KiB
JSON
{"ast":null,"code":"import merge from './merge';\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","map":{"version":3,"names":["merge","compose","styles","handlers","reduce","acc","style","filterProps","forEach","prop","fn","props","Object","keys","propTypes","process","env","NODE_ENV","assign","concat"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/system/esm/compose.js"],"sourcesContent":["import merge from './merge';\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;"],"mappings":"AAAA,OAAOA,KAAK,MAAM,SAAS;AAC3B,SAASC,OAAOA,CAAC,GAAGC,MAAM,EAAE;EAC1B,MAAMC,QAAQ,GAAGD,MAAM,CAACE,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAK;IAC7CA,KAAK,CAACC,WAAW,CAACC,OAAO,CAACC,IAAI,IAAI;MAChCJ,GAAG,CAACI,IAAI,CAAC,GAAGH,KAAK;IACnB,CAAC,CAAC;IACF,OAAOD,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAC;;EAEN;EACA;EACA,MAAMK,EAAE,GAAGC,KAAK,IAAI;IAClB,OAAOC,MAAM,CAACC,IAAI,CAACF,KAAK,CAAC,CAACP,MAAM,CAAC,CAACC,GAAG,EAAEI,IAAI,KAAK;MAC9C,IAAIN,QAAQ,CAACM,IAAI,CAAC,EAAE;QAClB,OAAOT,KAAK,CAACK,GAAG,EAAEF,QAAQ,CAACM,IAAI,CAAC,CAACE,KAAK,CAAC,CAAC;MAC1C;MACA,OAAON,GAAG;IACZ,CAAC,EAAE,CAAC,CAAC,CAAC;EACR,CAAC;EACDK,EAAE,CAACI,SAAS,GAAGC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGf,MAAM,CAACE,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAKM,MAAM,CAACM,MAAM,CAACb,GAAG,EAAEC,KAAK,CAACQ,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;EAClIJ,EAAE,CAACH,WAAW,GAAGL,MAAM,CAACE,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAKD,GAAG,CAACc,MAAM,CAACb,KAAK,CAACC,WAAW,CAAC,EAAE,EAAE,CAAC;EACjF,OAAOG,EAAE;AACX;AACA,eAAeT,OAAO","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |