{"version":3,"file":"class-variance-authority-DN3HG0m0.js","sources":["../../node_modules/class-variance-authority/dist/index.mjs"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","class","className","defaultVariants","getVariantClassNames","Object","keys","map","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","entries","reduce","acc","param","key","getCompoundVariantClassNames","compoundVariants","cvClass","cvClassName","compoundVariantOptions","every","Array","isArray","includes"],"mappings":"uCAeA,MAAMA,EAAiBC,GAAyB,kBAAVA,EAAsB,GAAGA,IAAoB,IAAVA,EAAc,IAAMA,EAChFC,EAAKC,EACLC,EAAM,CAACC,EAAMC,IAAUC,IACxB,IAAAC,EACJ,GAAyE,OAApEF,aAAuC,EAASA,EAAOG,UAAmB,OAAOP,EAAGG,EAAME,aAAqC,EAASA,EAAMG,MAAOH,aAAqC,EAASA,EAAMI,WACxM,MAAAF,SAAEA,EAAUG,gBAAAA,GAAoBN,EAChCO,EAAuBC,OAAOC,KAAKN,GAAUO,KAAKC,IACpD,MAAMC,EAAcX,aAAqC,EAASA,EAAMU,GAClEE,EAAqBP,aAAyD,EAASA,EAAgBK,GAC7G,GAAoB,OAAhBC,EAA6B,OAAA,KACjC,MAAME,EAAapB,EAAckB,IAAgBlB,EAAcmB,GACxD,OAAAV,EAASQ,GAASG,EAAU,IAEjCC,EAAwBd,GAASO,OAAOQ,QAAQf,GAAOgB,QAAO,CAACC,EAAKC,KAClE,IAACC,EAAKzB,GAASwB,EACnB,YAAc,IAAVxB,IAGJuB,EAAIE,GAAOzB,GAFAuB,CAGJ,GACR,CAAE,GACCG,EAA+BrB,SAAyG,QAAxDE,EAA2BF,EAAOsB,wBAA2D,IAA7BpB,OAA1E,EAAyHA,EAAyBe,QAAO,CAACC,EAAKC,KACvO,IAAMf,MAAOmB,EAASlB,UAAWmB,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