import type { ParsedUtil , RawUtil , StringifiedUtil , Variant , VariantObject } from '../types' ; export const attributifyRE = /^\[(.+?)~?="(.*)"\]$/ ; export const validateFilterRE = /(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/ ; export const CONTROL_SHORTCUT_NO_MERGE = '$$shortcut-no-merge' ; export function isAttributifySelector ( selector ) { return selector . match ( attributifyRE ) ; } export function isValidSelector ( selector = '' ) { return validateFilterRE . test ( selector ) ; } export function normalizeVariant ( variant ) { return typeof variant === 'function' ? { match : variant } : variant ; } export function isRawUtil ( util ) { return util . length === 3 ; } export function notNull < T > ( value ) { return value != null ; }