toku-ui 5.1.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","names":["isTypedArray","cloneDeepWith","isTypedArray","isTypedArray","setPrototypeOf","isNativeReflectConstruct","setPrototypeOf","isNativeFunction","construct","getPrototypeOf","setPrototypeOf","css","darken","lighten","computed","useTheme","toCamelCase","useStyles","color","theme","variant","value","hover","colors","primary","toku","main","light1","light2","light3","baseClass","margin","padding","boxSizing","cursor","display","flexDirection","alignItems","justifyContent","gap","fontWeight","typography","semibold","borderRadius","button","backgroundColor","boxShadow","border","buttonTextColor","gray","medium2","background","medium1","height","lineHeight","fontSize","width","position","top","left","transform","Icon","merge","computed","defineComponent","useTheme","useStyles","defaultProps","variant","size","type","color","TButton","name","props","String","disabled","Boolean","leftIcon","rightIcon","fullWidth","loading","emits","setup","_props","attrs","slots","emit","value","baseClass","theme","classes","handleClick","_createVNode","_mergeProps","iconSet","default","Icon","get","merge","computed","defineComponent","useTheme","defaultProps","color","size","variant","TIcon","name","props","icon","type","String","required","setup","_props","attrs","theme","value","colors","iconSet","sizeMapping","miniature","small","medium","large","huge","_createVNode","_mergeProps","merge","computed","defineComponent","useStyles","defaultProps","size","variant","TTag","name","props","String","setup","_props","slots","baseClass","classes","value","_createVNode","default","$slots","css","computed","useTheme","useStyles","theme","disabledColor","value","colors","gray","light1","checkSVG","stroke","size","encodeURIComponent","baseClass","margin","padding","boxSizing","color","typography","fontFamily","fontWeight","fontStyle","whiteSpace","cursor","display","justifyContent","alignItems","gap","appearance","WebkitAppearance","font","primary","main","border","borderRadius","placeContent","transform","backgroundColor","light3","transition","boxShadow","lineHeight","fontSize","width","height","content","merge","computed","defineComponent","ref","watch","useStyles","generateUniqueId","Math","random","toString","substring","Date","now","defaultProps","size","value","TCheckbox","name","props","labelPosition","String","Boolean","modelValue","disabled","id","emits","setup","_props","attrs","slots","emit","localId","baseClass","classes","textClass","isChecked","handleClick","_createVNode","map","class_","default","_mergeProps","merge","computed","defineComponent","onMounted","onUnmounted","ref","Teleport","watch","useMenuStyles","useStyles","getVisibleElements","_isSlot","s","Object","prototype","toString","call","_isVNode","defaultProps","size","position","TDropdown","name","props","open","Boolean","String","fullWidth","attachToBody","emits","setup","_props","slots","attrs","emit","container","trigger","menu","menuPosition","top","left","calculateMenuPosition","value","rect","getBoundingClientRect","baseTop","bottom","baseLeft","clientWidth","clientHeight","menuBaseClass","menuClasses","menuStyles","width","undefined","menuHeight","baseClass","classes","handleClickOutside","event","contains","target","closest","handleKeydown","key","handleMenuInitialFocus","preventDefault","firstMenuItem","querySelector","focus","addEventListener","removeEventListener","immediate","window","document","visibleElements","default","renderMenu","_createVNode","map","element","index","array","length","_slot","merge","computed","defineComponent","useStyles","TDropdownItem","name","emits","props","disabled","Boolean","setup","_props","slots","emit","attrs","baseClass","classes","value","handleClick","handleKeydown","event","key","preventDefault","_createVNode","default","Icon","merge","computed","defineComponent","ref","useTheme","useStyles","defaultProps","type","TTextInput","name","emits","props","error","Boolean","disabled","leftIcon","String","rightIcon","label","placeholder","helperText","value","Number","Date","modelValue","fullWidth","id","maxlength","min","max","step","setup","_props","attrs","emit","slots","expose","baseClass","theme","internalValue","get","undefined","set","newValue","handleInput","event","target","handleFocus","handleBlur","input","focus","blur","_createVNode","multiline","iconSet","_mergeProps","computed","defineComponent","onMounted","onUnmounted","ref","watch","createVNode","_createVNode","TDropdown","TDropdownItem","TTextInput","normalizeString","TCombobox","name","emits","props","modelValue","String","options","type","Array","required","placeholder","default","label","helperText","disabled","Boolean","setup","emit","expose","text","selectedOption","isDropdownOpen","container","textInputRef","isDisabled","openDropdown","value","closeDropdown","unfocus","blur","resetTextValue","resetSelectedOption","handleFocus","handleTextChange","handleClickOutside","event","isClickOutside","contains","target","handleSelection","option","handleKeydown","key","filteredOptions","filter","normalizedLabel","normalizedFilterText","includes","document","addEventListener","removeEventListener","DropdownTrigger","trigger","map","onClick","merge","computed","defineComponent","onMounted","onUnmounted","ref","watch","TIcon","useStyles","defaultProps","size","TModal","name","props","open","Boolean","featured","String","destroyOnClose","nonBlocking","emits","setup","_props","slots","attrs","emit","expose","isActive","value","baseClass","classes","modal","showModal","show","close","immediate","handleCancel","event","preventDefault","addEventListener","removeEventListener","handleClose","handleClickOutside","target","trigger","ModalComponent","_createVNode","header","body","default","footer","get","merge","computed","defineComponent","h","useTheme","useStyles","defaultMapping","parseAllMarkdown","defaultProps","fontStyle","fontWeight","variant","color","TTypography","name","props","String","as","parseMarkdown","type","Boolean","default","undefined","setup","_props","attrs","slots","theme","value","colors","typography","baseClass","classes","tag","slotContent","class","processedContent","merge","computed","defineComponent","h","toCamelCase","TButton","TIcon","TModal","TTypography","useStyles","defaultProps","cancelText","confirmText","TDialog","name","components","props","title","type","String","required","message","color","icon","cancellable","Boolean","size","emits","setup","_props","emit","baseClass","iconColor","value","undefined","onClose","onCancel","onConfirm","class","open","header","variant","fontWeight","default","innerHTML","footer","onClick","$slots","css","darken","lighten","computed","useTheme","toCamelCase","useStyles","color","theme","variant","value","hover","colors","primary","toku","main","light1","light2","light3","baseClass","margin","padding","boxSizing","display","justifyContent","alignItems","cursor","borderRadius","button","backgroundColor","boxShadow","border","gray","medium2","background","medium1","height","width","lineHeight","fontSize","iconClass","Icon","merge","computed","defineComponent","useTheme","useStyles","defaultProps","variant","size","icon","type","color","TIconButton","name","props","String","disabled","Boolean","rounded","loading","emits","setup","_props","attrs","emit","value","baseClass","iconClass","theme","classes","iconClasses","handleClick","_createVNode","_mergeProps","iconSet","css","computed","useTheme","useStyles","theme","baseClass","margin","padding","width","cursor","display","flexDirection","alignItems","justifyContent","gap","color","value","colors","primary","main","toku","light1","textDecoration","fontWeight","lineHeight","fontSize","Icon","merge","computed","defineComponent","useTheme","useStyles","defaultProps","variant","size","TLink","name","props","String","href","leftIcon","rightIcon","setup","_props","attrs","slots","baseClass","theme","classes","value","_createVNode","_mergeProps","iconSet","default","css","computed","useTheme","useStyles","props","color","theme","baseClass","margin","padding","width","height","boxSizing","background","borderRadius","border","value","colors","borderBottomColor","primary","main","animation","breakpoints","desktop","transform","get","merge","computed","defineComponent","useTheme","useStyles","defaultProps","size","color","TSpinner","name","props","String","setup","_props","attrs","theme","value","colors","baseClass","classes","_createVNode","merge","computed","defineComponent","TSpinner","useStyles","defaultProps","size","TLoading","name","props","active","Boolean","fullPage","String","setup","_props","attrs","baseClass","classes","value","_createVNode","css","computed","useTheme","useStyles","theme","baseClass","margin","padding","boxSizing","display","alignItems","justifyContent","gap","width","appearance","MozAppearance","WebkitAppearance","height","borderRadius","border","value","colors","primary","main","position","cursor","borderColor","light1","content","top","left","transform","background","order","fontFamily","typography","color","fontSize","fontWeight","regular","lineHeight","gray","medium2","merge","computed","defineComponent","ref","watch","useStyles","defaultProps","labelPosition","TRadio","name","props","id","String","label","value","type","Number","Boolean","Object","Array","Function","Date","default","modelValue","disabled","emits","setup","_props","emit","attrs","checked","baseClass","classes","handleInput","handleClick","handleKeydown","event","key","_createVNode","css","computed","useTheme","useStyles","theme","baseClass","margin","padding","boxSizing","color","fontFamily","value","typography","gap","spacing","display","flexDirection","width","fontSize","fontStyle","fontWeight","semibold","lineHeight","position","alignItems","justifyContent","background","border","colors","gray","light2","borderRadius","input","height","regular","MozAppearance","WebkitAppearance","appearance","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","borderColor","medium2","primary","light1","outline","backgroundColor","light3","cursor","borderBottomLeftRadius","borderBottomRightRadius","paddingLeft","overflow","whiteSpace","maxWidth","top","left","borderTopRightRadius","borderTopLeftRadius","boxShadow","zIndex","listStyle","maxHeight","overflowY","scrollbarWidth","bottom","right","light4","opacity","transition","pointerEvents","transform","medium1","error","css","computed","useTheme","useStyles","theme","baseClass","boxSizing","listStyle","padding","fontFamily","value","typography","fontSize","fontWeight","lineHeight","color","colors","gray","main","cursor","transition","borderBottom","light3","backgroundColor","borderRadius","boxShadow","primary","light5","semibold","medium2","pointerEvents","computed","defineComponent","createVNode","_createVNode","useStyles","TSelectOption","name","emits","props","label","String","selected","Boolean","highlighted","disabled","withSeparator","setup","slots","emit","baseClass","classes","value","handleHover","handleMouseDown","event","preventDefault","default","Icon","merge","computed","defineComponent","ref","watch","useScrollbarThumb","useTheme","useStyles","buildSelectOptions","getLeftIconName","isOptionValueEqual","resolveLeftIcon","TSelectOption","useSelectDropdown","TSelect","name","emits","props","error","Boolean","disabled","leftIcon","String","label","placeholder","helperText","value","type","Number","Object","Array","Function","Date","default","modelValue","fullWidth","id","setup","_props","attrs","emit","slots","expose","theme","localValue","baseClass","containerClasses","immediate","internalValue","get","set","newValue","options","selectedOption","find","opt","hasSelectedValue","selectedLabel","resolvedLeftIcon","leftIconName","iconSet","dropdown","scrollbar","menuRef","onDragStart","isInteractingWithMenu","onDragEnd","requestAnimationFrame","menuOpen","length","isOpen","update","focus","triggerRef","_createVNode","wrapperRef","_mergeProps","handleClickTrigger","e","handleBlur","handleKeydown","handleMenuInteractionStart","onMouseup","isDragging","onMouseenter","menuHovered","onMouseleave","map","option","index","highlightedIndex","onHover","onSelect","selectOption","isScrollable","onThumbMouseDown","height","thumbHeight","transform","thumbOffset","merge","computed","defineComponent","onMounted","onUnmounted","ref","useStyles","getVisibleElements","TSelectDropdown","name","props","open","Boolean","label","String","selectedValue","disabled","helperText","placeholder","error","fullWidth","emits","setup","_props","slots","attrs","emit","baseClass","classes","value","containerClasses","container","handleClickOutside","event","contains","target","handleKeydown","key","document","addEventListener","removeEventListener","visibleElements","default","handleClick","_createVNode","map","element","index","array","length","merge","computed","defineComponent","useStyles","TSelectDropdownItem","name","emits","props","label","String","setup","_props","slots","emit","attrs","baseClass","handleClick","handleKeydown","event","key","value","disabled","preventDefault","_createVNode","default","$slots","merge","computed","defineComponent","ref","watch","useStyles","TTabBar","name","emits","props","labels","Array","value","String","modelValue","setup","_props","attrs","emit","baseClass","selected","undefined","handleOnClick","label","_createVNode","map","onClick","computed","defineComponent","inject","createVNode","_createVNode","useStyles","TTab","name","props","id","type","String","required","selected","Boolean","default","value","Number","Object","Array","setup","slots","baseClass","provider","Error","selectTab","handleClick","handleKeydown","event","key","preventDefault","ariaLabel","computed","defineComponent","provide","ref","createTextVNode","_createTextVNode","createVNode","_createVNode","TDropdown","TDropdownItem","TTab","useStyles","useTTabStyles","TTabBarExtended","name","emits","props","tabs","type","Array","required","maxTabs","Number","initialLabel","String","selectedValue","Object","setup","emit","baseClass","tTabBaseClass","identifiedTabs","map","tab","index","id","label","value","initialTab","find","selectedTab","isControlled","undefined","effectiveSelectedTab","found","isDropdownOpen","selectTab","newSelectedTab","Error","amountOfTabs","length","maxAmountOfTabs","Math","min","Infinity","visibleTabs","slice","selectedTabIsAlreadyVisible","some","push","shouldDropdownExist","toggleIsDropdownOpen","closeDropdown","handleClickInDropdownTrigger","handleOnKeyPressInDropdownTrigger","event","preventDefault","key","handleClickInDropdownItem","Dropdown","trigger","default","onClick","merge","computed","defineComponent","nextTick","ref","watch","useStyles","DEFAULT_AUTO_RESIZE_ROWS","TTextArea","name","emits","props","id","String","value","modelValue","label","error","Boolean","disabled","placeholder","helperText","fullWidth","maxlength","Number","autoResize","maxRows","type","default","undefined","setup","_props","attrs","emit","slots","expose","baseClass","internalValue","get","set","newValue","resizeTextarea","el","textarea","style","height","styles","getComputedStyle","borderTop","parseFloat","borderTopWidth","borderBottom","borderBottomWidth","lineHeight","paddingTop","paddingBottom","maxHeight","scrollHeight","handleInput","event","target","handleFocus","handleBlur","focus","_createVNode","multiline","_mergeProps","computed","defineComponent","h","provide","injectionKey","createTheme","TThemeProvider","name","inheritAttrs","props","theme","type","Object","default","setup","slots","attrs","cssVars","value","class","style","useTooltip","merge","computed","defineComponent","useStyles","defaultProps","position","size","trigger","TTooltip","name","props","label","String","multilined","Boolean","setup","_props","slots","attrs","value","isVisible","wrapperRef","triggerHandler","baseClass","classes","_createVNode","_mergeProps","default","merge","computed","defineComponent","TIcon","TTypography","useStyles","defaultProps","variant","TWarning","name","props","fullWidth","Boolean","icon","String","setup","_props","slots","baseClass","classes","value","colorMap","default","success","warning","error","info","iconColor","_createVNode","content"],"sources":["../src/theme/base.ts","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isLength.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toString.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toPath.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/get.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/tags.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/_internal/globalThis.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isBuffer.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/function/noop.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/clone.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/merge.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/capitalize.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/words.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/camelCase.mjs","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/construct.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/.pnpm/polished@4.3.1/node_modules/polished/dist/polished.esm.js","../src/theme/utils.ts","../src/composables/theme.ts","../src/components/TChip/TChip.vue","../src/components/TChip/TChip.vue","../src/utils/index.ts","../src/components/TButton/TButton.styles.tsx","../src/components/TButton/TButton.tsx","../src/components/TIcon/TIcon.tsx","../src/components/TTag/TTag.styles.ts","../src/components/TTag/TTag.tsx","../src/components/TCardButton/TCardButton.vue","../src/components/TCardButton/TCardButton.vue","../src/components/TCheckbox/TCheckbox.styles.tsx","../src/components/TCheckbox/TCheckbox.tsx","../src/components/TDropdown/TDropdown.styles.ts","../src/components/TDropdown/TDropdown.utils.ts","../src/components/TDropdown/TDropdown.tsx","../src/components/TDropdown/TDropdownItem/TDropdownItem.styles.ts","../src/components/TDropdown/TDropdownItem/TDropdownItem.tsx","../src/components/TTextInput/TTextInput.styles.ts","../src/components/TTextInput/TTextInput.tsx","../src/components/TCombobox/TCombobox.utils.ts","../src/components/TCombobox/TCombobox.tsx","../src/components/TModal/TModal.styles.ts","../src/components/TModal/TModal.tsx","../src/components/TTypography/TTypography.styles.ts","../src/components/TTypography/TTypography.utils.ts","../src/components/TTypography/utils/markdown/parseAllMarkdown.ts","../src/components/TTypography/TTypography.tsx","../src/components/TDialog/TDialog.styles.ts","../src/components/TDialog/TDialog.tsx","../src/composables/forwardedAttrs.ts","../src/components/TFileUpload/TFileUpload.vue","../src/components/TFileUpload/TFileUpload.vue","../src/components/TIconButton/TIconButton.styles.tsx","../src/components/TIconButton/TIconButton.tsx","../src/components/TLink/TLink.styles.tsx","../src/components/TLink/TLink.tsx","../src/components/TSpinner/TSpinner.styles.tsx","../src/components/TSpinner/TSpinner.tsx","../src/components/TLoading/TLoading.styles.ts","../src/components/TLoading/TLoading.tsx","../src/components/TLoadingDots/TLoadingDots.vue","../src/components/TLoadingDots/TLoadingDots.vue","../src/components/TRadio/TRadio.styles.tsx","../src/components/TRadio/TRadio.tsx","../src/composables/scrollbarThumb.ts","../src/components/TSelect/TSelect.styles.tsx","../src/components/TSelect/TSelect.utils.ts","../src/components/TSelect/TSelectOption/TSelectOption.styles.tsx","../src/components/TSelect/TSelectOption/TSelectOption.tsx","../src/components/TSelect/useSelectDropdown.ts","../src/components/TSelect/TSelect.tsx","../src/components/TSelectDropdown/TSelectDropdown.styles.ts","../src/components/TSelectDropdown/TSelectDropdown.utils.ts","../src/components/TSelectDropdown/TSelectDropdown.tsx","../src/components/TSelectDropdown/TSelectDropdownItem/TSelectDropdownItem.styles.ts","../src/components/TSelectDropdown/TSelectDropdownItem/TSelectDropdownItem.tsx","../src/components/TSwitch/TSwitch.vue","../src/components/TSwitch/TSwitch.vue","../src/components/TTabBar/TTabBar.styles.ts","../src/components/TTabBar/TTabBar.tsx","../src/components/TTabBarExtended/TTab/TTab.styles.ts","../src/components/TTabBarExtended/TTab/TTab.tsx","../src/components/TTabBarExtended/TTabBarExtended.styles.ts","../src/components/TTabBarExtended/TTabBarExtended.tsx","../src/components/TTextArea/TTextArea.styles.ts","../src/components/TTextArea/TTextArea.tsx","../src/components/TThemeProvider/TThemeProvider.tsx","../src/composables/click.ts","../src/composables/tooltip.ts","../src/components/TTooltip/TTooltip.styles.ts","../src/components/TTooltip/TTooltip.tsx","../src/components/TWarning/TWarning.styles.ts","../src/components/TWarning/TWarning.tsx","../src/composables/dialog.ts"],"sourcesContent":["export const baseTheme = {\n colors: {\n primary: {\n main: '#3C1053',\n ultraDark: '#461B5E',\n dark: '#3C1053',\n toku: '#51276A',\n light1: '#C59FDF',\n light2: '#E5D5F0',\n light3: '#EBE1F2',\n light4: '#F0ECF3',\n light5: '#F3F1F4',\n },\n gray: {\n main: '#373737',\n dark2: '#545454',\n dark3: '#707070',\n medium1: '#8D8D8D',\n medium2: '#A9A9A9',\n light1: '#C6C6C6',\n light2: '#E2E2E2',\n light3: '#F2F2F2',\n light4: '#FAFAFA',\n },\n error: '#B72E29',\n success: '#408645',\n warning: '#D06B35',\n inProcess: '#FFB038',\n inProcessDark: '#A37500',\n info: '#3070DD',\n background: '#F5F5F5',\n },\n typography: {\n color: '#373737',\n fontFamily: '\"Manrope\", sans-serif',\n buttonTextColor: '#FFFFFF',\n fontWeight: {\n bold: 700,\n semibold: 600,\n medium: 500,\n regular: 400,\n },\n },\n button: {\n borderRadius: '0.5rem',\n },\n input: {\n borderRadius: '0.375rem',\n },\n spacing: '4px',\n breakpoints: {\n mobile: 0,\n desktop: 769,\n },\n iconSet: 'heroicons',\n parseMarkdown: false,\n};\n","function isLength(value) {\n return Number.isSafeInteger(value) && value >= 0;\n}\n\nexport { isLength };\n","import { isLength } from '../../predicate/isLength.mjs';\n\nfunction isArrayLike(value) {\n return value != null && typeof value !== 'function' && isLength(value.length);\n}\n\nexport { isArrayLike };\n","function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","function isDeepKey(key) {\n switch (typeof key) {\n case 'number':\n case 'symbol': {\n return false;\n }\n case 'string': {\n return key.includes('.') || key.includes('[') || key.includes(']');\n }\n }\n}\n\nexport { isDeepKey };\n","function toKey(value) {\n if (typeof value === 'string' || typeof value === 'symbol') {\n return value;\n }\n if (Object.is(value?.valueOf?.(), -0)) {\n return '-0';\n }\n return String(value);\n}\n\nexport { toKey };\n","function toString(value) {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(toString).join(',');\n }\n const result = String(value);\n if (result === '0' && Object.is(Number(value), -0)) {\n return '-0';\n }\n return result;\n}\n\nexport { toString };\n","import { toString } from './toString.mjs';\nimport { toKey } from '../_internal/toKey.mjs';\n\nfunction toPath(deepKey) {\n if (Array.isArray(deepKey)) {\n return deepKey.map(toKey);\n }\n if (typeof deepKey === 'symbol') {\n return [deepKey];\n }\n deepKey = toString(deepKey);\n const result = [];\n const length = deepKey.length;\n if (length === 0) {\n return result;\n }\n let index = 0;\n let key = '';\n let quoteChar = '';\n let bracket = false;\n if (deepKey.charCodeAt(0) === 46) {\n result.push('');\n index++;\n }\n while (index < length) {\n const char = deepKey[index];\n if (quoteChar) {\n if (char === '\\\\' && index + 1 < length) {\n index++;\n key += deepKey[index];\n }\n else if (char === quoteChar) {\n quoteChar = '';\n }\n else {\n key += char;\n }\n }\n else if (bracket) {\n if (char === '\"' || char === \"'\") {\n quoteChar = char;\n }\n else if (char === ']') {\n bracket = false;\n result.push(key);\n key = '';\n }\n else {\n key += char;\n }\n }\n else {\n if (char === '[') {\n bracket = true;\n if (key) {\n result.push(key);\n key = '';\n }\n }\n else if (char === '.') {\n if (key) {\n result.push(key);\n key = '';\n }\n }\n else {\n key += char;\n }\n }\n index++;\n }\n if (key) {\n result.push(key);\n }\n return result;\n}\n\nexport { toPath };\n","import { isUnsafeProperty } from '../../_internal/isUnsafeProperty.mjs';\nimport { isDeepKey } from '../_internal/isDeepKey.mjs';\nimport { toKey } from '../_internal/toKey.mjs';\nimport { toPath } from '../util/toPath.mjs';\n\nfunction get(object, path, defaultValue) {\n if (object == null) {\n return defaultValue;\n }\n switch (typeof path) {\n case 'string': {\n if (isUnsafeProperty(path)) {\n return defaultValue;\n }\n const result = object[path];\n if (result === undefined) {\n if (isDeepKey(path)) {\n return get(object, toPath(path), defaultValue);\n }\n else {\n return defaultValue;\n }\n }\n return result;\n }\n case 'number':\n case 'symbol': {\n if (typeof path === 'number') {\n path = toKey(path);\n }\n const result = object[path];\n if (result === undefined) {\n return defaultValue;\n }\n return result;\n }\n default: {\n if (Array.isArray(path)) {\n return getWithPath(object, path, defaultValue);\n }\n if (Object.is(path?.valueOf(), -0)) {\n path = '-0';\n }\n else {\n path = String(path);\n }\n if (isUnsafeProperty(path)) {\n return defaultValue;\n }\n const result = object[path];\n if (result === undefined) {\n return defaultValue;\n }\n return result;\n }\n }\n}\nfunction getWithPath(object, path, defaultValue) {\n if (path.length === 0) {\n return defaultValue;\n }\n let current = object;\n for (let index = 0; index < path.length; index++) {\n if (current == null) {\n return defaultValue;\n }\n if (isUnsafeProperty(path[index])) {\n return defaultValue;\n }\n current = current[path[index]];\n }\n if (current === undefined) {\n return defaultValue;\n }\n return current;\n}\n\nexport { get };\n","function isPrimitive(value) {\n return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n\nexport { isPrimitive };\n","function getSymbols(object) {\n return Object.getOwnPropertySymbols(object).filter(symbol => Object.prototype.propertyIsEnumerable.call(object, symbol));\n}\n\nexport { getSymbols };\n","function getTag(value) {\n if (value == null) {\n return value === undefined ? '[object Undefined]' : '[object Null]';\n }\n return Object.prototype.toString.call(value);\n}\n\nexport { getTag };\n","const regexpTag = '[object RegExp]';\nconst stringTag = '[object String]';\nconst numberTag = '[object Number]';\nconst booleanTag = '[object Boolean]';\nconst argumentsTag = '[object Arguments]';\nconst symbolTag = '[object Symbol]';\nconst dateTag = '[object Date]';\nconst mapTag = '[object Map]';\nconst setTag = '[object Set]';\nconst arrayTag = '[object Array]';\nconst functionTag = '[object Function]';\nconst arrayBufferTag = '[object ArrayBuffer]';\nconst objectTag = '[object Object]';\nconst errorTag = '[object Error]';\nconst dataViewTag = '[object DataView]';\nconst uint8ArrayTag = '[object Uint8Array]';\nconst uint8ClampedArrayTag = '[object Uint8ClampedArray]';\nconst uint16ArrayTag = '[object Uint16Array]';\nconst uint32ArrayTag = '[object Uint32Array]';\nconst bigUint64ArrayTag = '[object BigUint64Array]';\nconst int8ArrayTag = '[object Int8Array]';\nconst int16ArrayTag = '[object Int16Array]';\nconst int32ArrayTag = '[object Int32Array]';\nconst bigInt64ArrayTag = '[object BigInt64Array]';\nconst float32ArrayTag = '[object Float32Array]';\nconst float64ArrayTag = '[object Float64Array]';\n\nexport { argumentsTag, arrayBufferTag, arrayTag, bigInt64ArrayTag, bigUint64ArrayTag, booleanTag, dataViewTag, dateTag, errorTag, float32ArrayTag, float64ArrayTag, functionTag, int16ArrayTag, int32ArrayTag, int8ArrayTag, mapTag, numberTag, objectTag, regexpTag, setTag, stringTag, symbolTag, uint16ArrayTag, uint32ArrayTag, uint8ArrayTag, uint8ClampedArrayTag };\n","const globalThis_ = (typeof globalThis === 'object' && globalThis) ||\n (typeof window === 'object' && window) ||\n (typeof self === 'object' && self) ||\n (typeof global === 'object' && global) ||\n (function () {\n return this;\n })() ||\n Function('return this')();\n\nexport { globalThis_ as globalThis };\n","import { globalThis as globalThis_ } from '../_internal/globalThis.mjs';\n\nfunction isBuffer(x) {\n return typeof globalThis_.Buffer !== 'undefined' && globalThis_.Buffer.isBuffer(x);\n}\n\nexport { isBuffer };\n","function isTypedArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\nexport { isTypedArray };\n","import { getSymbols } from '../compat/_internal/getSymbols.mjs';\nimport { getTag } from '../compat/_internal/getTag.mjs';\nimport { uint32ArrayTag, uint16ArrayTag, uint8ClampedArrayTag, uint8ArrayTag, symbolTag, stringTag, setTag, regexpTag, objectTag, numberTag, mapTag, int32ArrayTag, int16ArrayTag, int8ArrayTag, float64ArrayTag, float32ArrayTag, dateTag, booleanTag, dataViewTag, arrayBufferTag, arrayTag, argumentsTag } from '../compat/_internal/tags.mjs';\nimport { isBuffer } from '../predicate/isBuffer.mjs';\nimport { isPrimitive } from '../predicate/isPrimitive.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction cloneDeepWith(obj, cloneValue) {\n return cloneDeepWithImpl(obj, undefined, obj, new Map(), cloneValue);\n}\nfunction cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = new Map(), cloneValue = undefined) {\n const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);\n if (cloned !== undefined) {\n return cloned;\n }\n if (isPrimitive(valueToClone)) {\n return valueToClone;\n }\n if (stack.has(valueToClone)) {\n return stack.get(valueToClone);\n }\n if (Array.isArray(valueToClone)) {\n const result = new Array(valueToClone.length);\n stack.set(valueToClone, result);\n for (let i = 0; i < valueToClone.length; i++) {\n result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n }\n if (Object.hasOwn(valueToClone, 'index')) {\n result.index = valueToClone.index;\n }\n if (Object.hasOwn(valueToClone, 'input')) {\n result.input = valueToClone.input;\n }\n return result;\n }\n if (valueToClone instanceof Date) {\n return new Date(valueToClone.getTime());\n }\n if (valueToClone instanceof RegExp) {\n const result = new RegExp(valueToClone.source, valueToClone.flags);\n result.lastIndex = valueToClone.lastIndex;\n return result;\n }\n if (valueToClone instanceof Map) {\n const result = new Map();\n stack.set(valueToClone, result);\n for (const [key, value] of valueToClone) {\n result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));\n }\n return result;\n }\n if (valueToClone instanceof Set) {\n const result = new Set();\n stack.set(valueToClone, result);\n for (const value of valueToClone) {\n result.add(cloneDeepWithImpl(value, undefined, objectToClone, stack, cloneValue));\n }\n return result;\n }\n if (isBuffer(valueToClone)) {\n return valueToClone.subarray();\n }\n if (isTypedArray(valueToClone)) {\n const result = new (Object.getPrototypeOf(valueToClone).constructor)(valueToClone.length);\n stack.set(valueToClone, result);\n for (let i = 0; i < valueToClone.length; i++) {\n result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n }\n return result;\n }\n if (valueToClone instanceof ArrayBuffer ||\n (typeof SharedArrayBuffer !== 'undefined' && valueToClone instanceof SharedArrayBuffer)) {\n return valueToClone.slice(0);\n }\n if (valueToClone instanceof DataView) {\n const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (typeof File !== 'undefined' && valueToClone instanceof File) {\n const result = new File([valueToClone], valueToClone.name, {\n type: valueToClone.type,\n });\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (typeof Blob !== 'undefined' && valueToClone instanceof Blob) {\n const result = new Blob([valueToClone], { type: valueToClone.type });\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof Error) {\n const result = structuredClone(valueToClone);\n stack.set(valueToClone, result);\n result.message = valueToClone.message;\n result.name = valueToClone.name;\n result.stack = valueToClone.stack;\n result.cause = valueToClone.cause;\n result.constructor = valueToClone.constructor;\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof Boolean) {\n const result = new Boolean(valueToClone.valueOf());\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof Number) {\n const result = new Number(valueToClone.valueOf());\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof String) {\n const result = new String(valueToClone.valueOf());\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (typeof valueToClone === 'object' && isCloneableObject(valueToClone)) {\n const result = Object.create(Object.getPrototypeOf(valueToClone));\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n return valueToClone;\n}\nfunction copyProperties(target, source, objectToClone = target, stack, cloneValue) {\n const keys = [...Object.keys(source), ...getSymbols(source)];\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const descriptor = Object.getOwnPropertyDescriptor(target, key);\n if (descriptor == null || descriptor.writable) {\n target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);\n }\n }\n}\nfunction isCloneableObject(object) {\n switch (getTag(object)) {\n case argumentsTag:\n case arrayTag:\n case arrayBufferTag:\n case dataViewTag:\n case booleanTag:\n case dateTag:\n case float32ArrayTag:\n case float64ArrayTag:\n case int8ArrayTag:\n case int16ArrayTag:\n case int32ArrayTag:\n case mapTag:\n case numberTag:\n case objectTag:\n case regexpTag:\n case setTag:\n case stringTag:\n case symbolTag:\n case uint8ArrayTag:\n case uint8ClampedArrayTag:\n case uint16ArrayTag:\n case uint32ArrayTag: {\n return true;\n }\n default: {\n return false;\n }\n }\n}\n\nexport { cloneDeepWith, cloneDeepWithImpl, copyProperties };\n","import { cloneDeepWith as cloneDeepWith$1, copyProperties } from '../../object/cloneDeepWith.mjs';\nimport { getTag } from '../_internal/getTag.mjs';\nimport { objectTag, argumentsTag, booleanTag, stringTag, numberTag } from '../_internal/tags.mjs';\n\nfunction cloneDeepWith(obj, customizer) {\n return cloneDeepWith$1(obj, (value, key, object, stack) => {\n const cloned = customizer?.(value, key, object, stack);\n if (cloned !== undefined) {\n return cloned;\n }\n if (typeof obj !== 'object') {\n return undefined;\n }\n if (getTag(obj) === objectTag && typeof obj.constructor !== 'function') {\n const result = {};\n stack.set(obj, result);\n copyProperties(result, obj, object, stack);\n return result;\n }\n switch (Object.prototype.toString.call(obj)) {\n case numberTag:\n case stringTag:\n case booleanTag: {\n const result = new obj.constructor(obj?.valueOf());\n copyProperties(result, obj);\n return result;\n }\n case argumentsTag: {\n const result = {};\n copyProperties(result, obj);\n result.length = obj.length;\n result[Symbol.iterator] = obj[Symbol.iterator];\n return result;\n }\n default: {\n return undefined;\n }\n }\n });\n}\n\nexport { cloneDeepWith };\n","import { cloneDeepWith } from './cloneDeepWith.mjs';\n\nfunction cloneDeep(obj) {\n return cloneDeepWith(obj);\n}\n\nexport { cloneDeep };\n","import { getTag } from '../_internal/getTag.mjs';\n\nfunction isArguments(value) {\n return value !== null && typeof value === 'object' && getTag(value) === '[object Arguments]';\n}\n\nexport { isArguments };\n","function isObjectLike(value) {\n return typeof value === 'object' && value !== null;\n}\n\nexport { isObjectLike };\n","import { isArrayLike } from './isArrayLike.mjs';\nimport { isObjectLike } from './isObjectLike.mjs';\n\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport { isArrayLikeObject };\n","function noop() { }\n\nexport { noop };\n","import { isTypedArray as isTypedArray$1 } from '../../predicate/isTypedArray.mjs';\n\nfunction isTypedArray(x) {\n return isTypedArray$1(x);\n}\n\nexport { isTypedArray };\n","function isPlainObject(object) {\n if (typeof object !== 'object') {\n return false;\n }\n if (object == null) {\n return false;\n }\n if (Object.getPrototypeOf(object) === null) {\n return true;\n }\n if (Object.prototype.toString.call(object) !== '[object Object]') {\n const tag = object[Symbol.toStringTag];\n if (tag == null) {\n return false;\n }\n const isTagReadonly = !Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable;\n if (isTagReadonly) {\n return false;\n }\n return object.toString() === `[object ${tag}]`;\n }\n let proto = object;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(object) === proto;\n}\n\nexport { isPlainObject };\n","import { isPrimitive } from '../predicate/isPrimitive.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction clone(obj) {\n if (isPrimitive(obj)) {\n return obj;\n }\n if (Array.isArray(obj) ||\n isTypedArray(obj) ||\n obj instanceof ArrayBuffer ||\n (typeof SharedArrayBuffer !== 'undefined' && obj instanceof SharedArrayBuffer)) {\n return obj.slice(0);\n }\n const prototype = Object.getPrototypeOf(obj);\n if (prototype == null) {\n return Object.assign(Object.create(prototype), obj);\n }\n const Constructor = prototype.constructor;\n if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {\n return new Constructor(obj);\n }\n if (obj instanceof RegExp) {\n const newRegExp = new Constructor(obj);\n newRegExp.lastIndex = obj.lastIndex;\n return newRegExp;\n }\n if (obj instanceof DataView) {\n return new Constructor(obj.buffer.slice(0));\n }\n if (obj instanceof Error) {\n let newError;\n if (obj instanceof AggregateError) {\n newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });\n }\n else {\n newError = new Constructor(obj.message, { cause: obj.cause });\n }\n newError.stack = obj.stack;\n Object.assign(newError, obj);\n return newError;\n }\n if (typeof File !== 'undefined' && obj instanceof File) {\n const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });\n return newFile;\n }\n if (typeof obj === 'object') {\n const newObject = Object.create(prototype);\n return Object.assign(newObject, obj);\n }\n return obj;\n}\n\nexport { clone };\n","import { cloneDeep } from './cloneDeep.mjs';\nimport { isUnsafeProperty } from '../../_internal/isUnsafeProperty.mjs';\nimport { clone } from '../../object/clone.mjs';\nimport { isBuffer } from '../../predicate/isBuffer.mjs';\nimport { isPrimitive } from '../../predicate/isPrimitive.mjs';\nimport { getSymbols } from '../_internal/getSymbols.mjs';\nimport { isArguments } from '../predicate/isArguments.mjs';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.mjs';\nimport { isObjectLike } from '../predicate/isObjectLike.mjs';\nimport { isPlainObject } from '../predicate/isPlainObject.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction mergeWith(object, ...otherArgs) {\n const sources = otherArgs.slice(0, -1);\n const merge = otherArgs[otherArgs.length - 1];\n let result = object;\n for (let i = 0; i < sources.length; i++) {\n const source = sources[i];\n result = mergeWithDeep(result, source, merge, new Map());\n }\n return result;\n}\nfunction mergeWithDeep(target, source, merge, stack) {\n if (isPrimitive(target)) {\n target = Object(target);\n }\n if (source == null || typeof source !== 'object') {\n return target;\n }\n if (stack.has(source)) {\n return clone(stack.get(source));\n }\n stack.set(source, target);\n if (Array.isArray(source)) {\n source = source.slice();\n for (let i = 0; i < source.length; i++) {\n source[i] = source[i] ?? undefined;\n }\n }\n const sourceKeys = [...Object.keys(source), ...getSymbols(source)];\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n let sourceValue = source[key];\n let targetValue = target[key];\n if (isArguments(sourceValue)) {\n sourceValue = { ...sourceValue };\n }\n if (isArguments(targetValue)) {\n targetValue = { ...targetValue };\n }\n if (isBuffer(sourceValue)) {\n sourceValue = cloneDeep(sourceValue);\n }\n if (Array.isArray(sourceValue)) {\n if (Array.isArray(targetValue)) {\n const cloned = [];\n const targetKeys = Reflect.ownKeys(targetValue);\n for (let i = 0; i < targetKeys.length; i++) {\n const targetKey = targetKeys[i];\n cloned[targetKey] = targetValue[targetKey];\n }\n targetValue = cloned;\n }\n else if (isArrayLikeObject(targetValue)) {\n const cloned = [];\n for (let i = 0; i < targetValue.length; i++) {\n cloned[i] = targetValue[i];\n }\n targetValue = cloned;\n }\n else {\n targetValue = [];\n }\n }\n const merged = merge(targetValue, sourceValue, key, target, source, stack);\n if (merged !== undefined) {\n target[key] = merged;\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n }\n else if (isObjectLike(targetValue) &&\n isObjectLike(sourceValue) &&\n (isPlainObject(targetValue) ||\n isPlainObject(sourceValue) ||\n isTypedArray(targetValue) ||\n isTypedArray(sourceValue))) {\n target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n }\n else if (targetValue == null && isPlainObject(sourceValue)) {\n target[key] = mergeWithDeep({}, sourceValue, merge, stack);\n }\n else if (targetValue == null && isTypedArray(sourceValue)) {\n target[key] = cloneDeep(sourceValue);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { mergeWith };\n","import { mergeWith } from './mergeWith.mjs';\nimport { noop } from '../../function/noop.mjs';\n\nfunction merge(object, ...sources) {\n return mergeWith(object, ...sources, noop);\n}\n\nexport { merge };\n","function capitalize(str) {\n return (str.charAt(0).toUpperCase() + str.slice(1).toLowerCase());\n}\n\nexport { capitalize };\n","const CASE_SPLIT_PATTERN = /\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+/gu;\nfunction words(str) {\n return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);\n}\n\nexport { CASE_SPLIT_PATTERN, words };\n","import { capitalize } from './capitalize.mjs';\nimport { words } from './words.mjs';\n\nfunction camelCase(str) {\n const words$1 = words(str);\n if (words$1.length === 0) {\n return '';\n }\n const [first, ...rest] = words$1;\n return `${first.toLowerCase()}${rest.map(word => capitalize(word)).join('')}`;\n}\n\nexport { camelCase };\n","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","function _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nexport { _getPrototypeOf as default };","function _isNativeFunction(t) {\n try {\n return -1 !== Function.toString.call(t).indexOf(\"[native code]\");\n } catch (n) {\n return \"function\" == typeof t;\n }\n}\nexport { _isNativeFunction as default };","function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}\nexport { _isNativeReflectConstruct as default };","import isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}\nexport { _construct as default };","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nfunction _wrapNativeSuper(t) {\n var r = \"function\" == typeof Map ? new Map() : void 0;\n return _wrapNativeSuper = function _wrapNativeSuper(t) {\n if (null === t || !isNativeFunction(t)) return t;\n if (\"function\" != typeof t) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== r) {\n if (r.has(t)) return r.get(t);\n r.set(t, Wrapper);\n }\n function Wrapper() {\n return construct(t, arguments, getPrototypeOf(this).constructor);\n }\n return Wrapper.prototype = Object.create(t.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }), setPrototypeOf(Wrapper, t);\n }, _wrapNativeSuper(t);\n}\nexport { _wrapNativeSuper as default };","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _wrapNativeSuper from '@babel/runtime/helpers/esm/wrapNativeSuper';\nimport _taggedTemplateLiteralLoose from '@babel/runtime/helpers/esm/taggedTemplateLiteralLoose';\n\nfunction last() {\n var _ref;\n return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];\n}\nfunction negation(a) {\n return -a;\n}\nfunction addition(a, b) {\n return a + b;\n}\nfunction subtraction(a, b) {\n return a - b;\n}\nfunction multiplication(a, b) {\n return a * b;\n}\nfunction division(a, b) {\n return a / b;\n}\nfunction max() {\n return Math.max.apply(Math, arguments);\n}\nfunction min() {\n return Math.min.apply(Math, arguments);\n}\nfunction comma() {\n return Array.of.apply(Array, arguments);\n}\nvar defaultSymbols = {\n symbols: {\n '*': {\n infix: {\n symbol: '*',\n f: multiplication,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '*',\n regSymbol: '\\\\*'\n },\n '/': {\n infix: {\n symbol: '/',\n f: division,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '/',\n regSymbol: '/'\n },\n '+': {\n infix: {\n symbol: '+',\n f: addition,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '+',\n f: last,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '+',\n regSymbol: '\\\\+'\n },\n '-': {\n infix: {\n symbol: '-',\n f: subtraction,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '-',\n f: negation,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '-',\n regSymbol: '-'\n },\n ',': {\n infix: {\n symbol: ',',\n f: comma,\n notation: 'infix',\n precedence: 1,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: ',',\n regSymbol: ','\n },\n '(': {\n prefix: {\n symbol: '(',\n f: last,\n notation: 'prefix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '(',\n regSymbol: '\\\\('\n },\n ')': {\n postfix: {\n symbol: ')',\n f: undefined,\n notation: 'postfix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: ')',\n regSymbol: '\\\\)'\n },\n min: {\n func: {\n symbol: 'min',\n f: min,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'min',\n regSymbol: 'min\\\\b'\n },\n max: {\n func: {\n symbol: 'max',\n f: max,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'max',\n regSymbol: 'max\\\\b'\n }\n }\n};\nvar defaultSymbolMap = defaultSymbols;\n\n// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found and no default was provided.\\n\\n\",\n \"75\": \"important requires a valid style object, got a %s instead.\\n\\n\",\n \"76\": \"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\\n\\n\",\n \"77\": \"remToPx expects a value in \\\"rem\\\" but you provided it in \\\"%s\\\".\\n\\n\",\n \"78\": \"base must be set in \\\"px\\\" or \\\"%\\\" but you set it in \\\"%s\\\".\\n\"\n};\n\n/**\n * super basic version of sprintf\n * @private\n */\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var a = args[0];\n var b = [];\n var c;\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n function PolishedError(code) {\n var _this;\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n return _assertThisInitialized(_this);\n }\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar unitRegExp = /((?!\\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\\D|$)|ged|darg?|nrut)/g;\n\n// Merges additional math functionality into the defaults.\nfunction mergeSymbolMaps(additionalSymbols) {\n var symbolMap = {};\n symbolMap.symbols = additionalSymbols ? _extends({}, defaultSymbolMap.symbols, additionalSymbols.symbols) : _extends({}, defaultSymbolMap.symbols);\n return symbolMap;\n}\nfunction exec(operators, values) {\n var _ref;\n var op = operators.pop();\n values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));\n return op.precedence;\n}\nfunction calculate(expression, additionalSymbols) {\n var symbolMap = mergeSymbolMaps(additionalSymbols);\n var match;\n var operators = [symbolMap.symbols['('].prefix];\n var values = [];\n var pattern = new RegExp( // Pattern for numbers\n \"\\\\d+(?:\\\\.\\\\d+)?|\" +\n // ...and patterns for individual operators/function names\n Object.keys(symbolMap.symbols).map(function (key) {\n return symbolMap.symbols[key];\n })\n // longer symbols should be listed first\n // $FlowFixMe\n .sort(function (a, b) {\n return b.symbol.length - a.symbol.length;\n })\n // $FlowFixMe\n .map(function (val) {\n return val.regSymbol;\n }).join('|') + \"|(\\\\S)\", 'g');\n pattern.lastIndex = 0; // Reset regular expression object\n\n var afterValue = false;\n do {\n match = pattern.exec(expression);\n var _ref2 = match || [')', undefined],\n token = _ref2[0],\n bad = _ref2[1];\n var notNumber = symbolMap.symbols[token];\n var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;\n var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix;\n\n // Check for syntax errors:\n if (bad || (afterValue ? notAfterValue : notNewValue)) {\n throw new PolishedError(37, match ? match.index : expression.length, expression);\n }\n if (afterValue) {\n // We either have an infix or postfix operator (they should be mutually exclusive)\n var curr = notNumber.postfix || notNumber.infix;\n do {\n var prev = operators[operators.length - 1];\n if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break;\n // Apply previous operator, since it has precedence over current one\n } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function\n afterValue = curr.notation === 'postfix';\n if (curr.symbol !== ')') {\n operators.push(curr);\n // Postfix always has precedence over any operator that follows after it\n if (afterValue) exec(operators, values);\n }\n } else if (notNumber) {\n // prefix operator or function\n operators.push(notNumber.prefix || notNumber.func);\n if (notNumber.func) {\n // Require an opening parenthesis\n match = pattern.exec(expression);\n if (!match || match[0] !== '(') {\n throw new PolishedError(38, match ? match.index : expression.length, expression);\n }\n }\n } else {\n // number\n values.push(+token);\n afterValue = true;\n }\n } while (match && operators.length);\n if (operators.length) {\n throw new PolishedError(39, match ? match.index : expression.length, expression);\n } else if (match) {\n throw new PolishedError(40, match ? match.index : expression.length, expression);\n } else {\n return values.pop();\n }\n}\nfunction reverseString(str) {\n return str.split('').reverse().join('');\n}\n\n/**\n * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.\n *\n *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).\n *\n * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: math('12rem + 8rem'),\n * fontSize: math('(12px + 2px) * 3'),\n * fontSize: math('3px^2 + sqrt(4)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${math('12rem + 8rem')};\n * fontSize: ${math('(12px + 2px) * 3')};\n * fontSize: ${math('3px^2 + sqrt(4)')};\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * fontSize: '20rem',\n * fontSize: '42px',\n * fontSize: '11px',\n * }\n */\nfunction math(formula, additionalSymbols) {\n var reversedFormula = reverseString(formula);\n var formulaMatch = reversedFormula.match(unitRegExp);\n\n // Check that all units are the same\n if (formulaMatch && !formulaMatch.every(function (unit) {\n return unit === formulaMatch[0];\n })) {\n throw new PolishedError(41);\n }\n var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));\n return \"\" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');\n}\n\nvar cssVariableRegex = /--[\\S]*/g;\n\n/**\n * Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'background': cssVar('--background-color'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${cssVar('--background-color')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'background': 'red'\n * }\n */\nfunction cssVar(cssVariable, defaultValue) {\n if (!cssVariable || !cssVariable.match(cssVariableRegex)) {\n throw new PolishedError(73);\n }\n var variableValue;\n\n /* eslint-disable */\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);\n }\n /* eslint-enable */\n\n if (variableValue) {\n return variableValue.trim();\n } else if (defaultValue) {\n return defaultValue;\n }\n throw new PolishedError(74);\n}\n\n// @private\nfunction capitalizeString(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar positionMap$1 = ['Top', 'Right', 'Bottom', 'Left'];\nfunction generateProperty(property, position) {\n if (!property) return position.toLowerCase();\n var splitProperty = property.split('-');\n if (splitProperty.length > 1) {\n splitProperty.splice(1, 0, position);\n return splitProperty.reduce(function (acc, val) {\n return \"\" + acc + capitalizeString(val);\n });\n }\n var joinedProperty = property.replace(/([a-z])([A-Z])/g, \"$1\" + position + \"$2\");\n return property === joinedProperty ? \"\" + property + position : joinedProperty;\n}\nfunction generateStyles(property, valuesWithDefaults) {\n var styles = {};\n for (var i = 0; i < valuesWithDefaults.length; i += 1) {\n if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {\n styles[generateProperty(property, positionMap$1[i])] = valuesWithDefaults[i];\n }\n }\n return styles;\n}\n\n/**\n * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...directionalProperty('padding', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction directionalProperty(property) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n // prettier-ignore\n var firstValue = values[0],\n _values$ = values[1],\n secondValue = _values$ === void 0 ? firstValue : _values$,\n _values$2 = values[2],\n thirdValue = _values$2 === void 0 ? firstValue : _values$2,\n _values$3 = values[3],\n fourthValue = _values$3 === void 0 ? secondValue : _values$3;\n var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];\n return generateStyles(property, valuesWithDefaults);\n}\n\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith(string, suffix) {\n return string.substr(-suffix.length) === suffix;\n}\n\nvar cssRegex$1 = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\nfunction stripUnit(value) {\n if (typeof value !== 'string') return value;\n var matchedValue = value.match(cssRegex$1);\n return matchedValue ? parseFloat(value) : value;\n}\n\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\nvar pxtoFactory = function pxtoFactory(to) {\n return function (pxval, base) {\n if (base === void 0) {\n base = '16px';\n }\n var newPxval = pxval;\n var newBase = base;\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n newPxval = stripUnit(pxval);\n }\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n newBase = stripUnit(base);\n }\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n return \"\" + newPxval / newBase + to;\n };\n};\nvar pixelsto = pxtoFactory;\n\n/**\n * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': em('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${em('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1em'\n * }\n */\nvar em = pixelsto('em');\nvar em$1 = em;\n\nvar cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n\n/**\n * Returns a given CSS value and its unit as elements of an array.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': getValueAndUnit('100px')[0],\n * '--unit': getValueAndUnit('100px')[1],\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${getValueAndUnit('100px')[0]};\n * --unit: ${getValueAndUnit('100px')[1]};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100,\n * '--unit': 'px',\n * }\n */\nfunction getValueAndUnit(value) {\n if (typeof value !== 'string') return [value, ''];\n var matchedValue = value.match(cssRegex);\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n}\n\n/**\n * Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...important(cover())\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${important(cover())}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute !important',\n * 'top': '0 !important',\n * 'right: '0 !important',\n * 'bottom': '0 !important',\n * 'left: '0 !important'\n * }\n */\nfunction important(styleBlock, rules) {\n if (typeof styleBlock !== 'object' || styleBlock === null) {\n throw new PolishedError(75, typeof styleBlock);\n }\n var newStyleBlock = {};\n Object.keys(styleBlock).forEach(function (key) {\n if (typeof styleBlock[key] === 'object' && styleBlock[key] !== null) {\n newStyleBlock[key] = important(styleBlock[key], rules);\n } else if (!rules || rules && (rules === key || rules.indexOf(key) >= 0)) {\n newStyleBlock[key] = styleBlock[key] + \" !important\";\n } else {\n newStyleBlock[key] = styleBlock[key];\n }\n });\n return newStyleBlock;\n}\n\nvar ratioNames = {\n minorSecond: 1.067,\n majorSecond: 1.125,\n minorThird: 1.2,\n majorThird: 1.25,\n perfectFourth: 1.333,\n augFourth: 1.414,\n perfectFifth: 1.5,\n minorSixth: 1.6,\n goldenSection: 1.618,\n majorSixth: 1.667,\n minorSeventh: 1.778,\n majorSeventh: 1.875,\n octave: 2,\n majorTenth: 2.5,\n majorEleventh: 2.667,\n majorTwelfth: 3,\n doubleOctave: 4\n};\nfunction getRatio(ratioName) {\n return ratioNames[ratioName];\n}\n\n/**\n * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.\n * @example\n * // Styles as object usage\n * const styles = {\n * // Increment two steps up the default scale\n * 'fontSize': modularScale(2)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * // Increment two steps up the default scale\n * fontSize: ${modularScale(2)}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'fontSize': '1.77689em'\n * }\n */\nfunction modularScale(steps, base, ratio) {\n if (base === void 0) {\n base = '1em';\n }\n if (ratio === void 0) {\n ratio = 1.333;\n }\n if (typeof steps !== 'number') {\n throw new PolishedError(42);\n }\n if (typeof ratio === 'string' && !ratioNames[ratio]) {\n throw new PolishedError(43);\n }\n var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],\n realBase = _ref[0],\n unit = _ref[1];\n var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;\n if (typeof realBase === 'string') {\n throw new PolishedError(44, base);\n }\n return \"\" + realBase * Math.pow(realRatio, steps) + (unit || '');\n}\n\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\nvar rem = pixelsto('rem');\nvar rem$1 = rem;\n\nvar defaultFontSize = 16;\nfunction convertBase(base) {\n var deconstructedValue = getValueAndUnit(base);\n if (deconstructedValue[1] === 'px') {\n return parseFloat(base);\n }\n if (deconstructedValue[1] === '%') {\n return parseFloat(base) / 100 * defaultFontSize;\n }\n throw new PolishedError(78, deconstructedValue[1]);\n}\nfunction getBaseFromDoc() {\n /* eslint-disable */\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n var rootFontSize = getComputedStyle(document.documentElement).fontSize;\n return rootFontSize ? convertBase(rootFontSize) : defaultFontSize;\n }\n /* eslint-enable */\n /* istanbul ignore next */\n return defaultFontSize;\n}\n\n/**\n * Convert rem values to px. By default, the base value is pulled from the font-size property on the root element (if it is set in % or px). It defaults to 16px if not found on the root. You can also override the base value by providing your own base in % or px.\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': remToPx('1.6rem')\n * 'height': remToPx('1.6rem', '10px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${remToPx('1.6rem')}\n * height: ${remToPx('1.6rem', '10px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '25.6px',\n * 'height': '16px',\n * }\n */\nfunction remToPx(value, base) {\n var deconstructedValue = getValueAndUnit(value);\n if (deconstructedValue[1] !== 'rem' && deconstructedValue[1] !== '') {\n throw new PolishedError(77, deconstructedValue[1]);\n }\n var newBase = base ? convertBase(base) : getBaseFromDoc();\n return deconstructedValue[0] * newBase + \"px\";\n}\n\nvar functionsMap$3 = {\n back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'\n};\n\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeIn('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeIn('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\nfunction easeIn(functionName) {\n return functionsMap$3[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$2 = {\n back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeInOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeInOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n * }\n */\nfunction easeInOut(functionName) {\n return functionsMap$2[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$1 = {\n back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'\n};\n\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n * }\n */\nfunction easeOut(functionName) {\n return functionsMap$1[functionName.toLowerCase().trim()];\n}\n\n/**\n * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: between('20px', '100px', '400px', '1000px'),\n * fontSize: between('20px', '100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${between('20px', '100px', '400px', '1000px')};\n * fontSize: ${between('20px', '100px')}\n * `\n *\n * // CSS as JS Output\n *\n * h1: {\n * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',\n * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'\n * }\n */\nfunction between(fromSize, toSize, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n var _getValueAndUnit = getValueAndUnit(fromSize),\n unitlessFromSize = _getValueAndUnit[0],\n fromSizeUnit = _getValueAndUnit[1];\n var _getValueAndUnit2 = getValueAndUnit(toSize),\n unitlessToSize = _getValueAndUnit2[0],\n toSizeUnit = _getValueAndUnit2[1];\n var _getValueAndUnit3 = getValueAndUnit(minScreen),\n unitlessMinScreen = _getValueAndUnit3[0],\n minScreenUnit = _getValueAndUnit3[1];\n var _getValueAndUnit4 = getValueAndUnit(maxScreen),\n unitlessMaxScreen = _getValueAndUnit4[0],\n maxScreenUnit = _getValueAndUnit4[1];\n if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {\n throw new PolishedError(47);\n }\n if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {\n throw new PolishedError(48);\n }\n if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {\n throw new PolishedError(76);\n }\n var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);\n var base = unitlessToSize - slope * unitlessMaxScreen;\n return \"calc(\" + base.toFixed(2) + (fromSizeUnit || '') + \" + \" + (100 * slope).toFixed(2) + \"vw)\";\n}\n\n/**\n * CSS to contain a float (credit to CSSMojo).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...clearFix(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${clearFix()}\n * `\n *\n * // CSS as JS Output\n *\n * '&::after': {\n * 'clear': 'both',\n * 'content': '\"\"',\n * 'display': 'table'\n * }\n */\nfunction clearFix(parent) {\n var _ref;\n if (parent === void 0) {\n parent = '&';\n }\n var pseudoSelector = parent + \"::after\";\n return _ref = {}, _ref[pseudoSelector] = {\n clear: 'both',\n content: '\"\"',\n display: 'table'\n }, _ref;\n}\n\n/**\n * CSS to fully cover an area. Can optionally be passed an offset to act as a \"padding\".\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...cover()\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${cover()}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute',\n * 'top': '0',\n * 'right: '0',\n * 'bottom': '0',\n * 'left: '0'\n * }\n */\nfunction cover(offset) {\n if (offset === void 0) {\n offset = 0;\n }\n return {\n position: 'absolute',\n top: offset,\n right: offset,\n bottom: offset,\n left: offset\n };\n}\n\n/**\n * CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...ellipsis('250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${ellipsis('250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'display': 'inline-block',\n * 'maxWidth': '250px',\n * 'overflow': 'hidden',\n * 'textOverflow': 'ellipsis',\n * 'whiteSpace': 'nowrap',\n * 'wordWrap': 'normal'\n * }\n */\nfunction ellipsis(width, lines) {\n if (lines === void 0) {\n lines = 1;\n }\n var styles = {\n display: 'inline-block',\n maxWidth: width || '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n };\n return lines > 1 ? _extends({}, styles, {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lines,\n display: '-webkit-box',\n whiteSpace: 'normal'\n }) : styles;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n/**\n * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * \"@media (min-width: 1000px)\": Object {\n * \"padding\": \"100px\",\n * },\n * \"@media (min-width: 400px)\": Object {\n * \"padding\": \"calc(-33.33333333333334px + 13.333333333333334vw)\",\n * },\n * \"padding\": \"20px\",\n * }\n */\nfunction fluidRange(cssProp, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {\n throw new PolishedError(49);\n }\n if (Array.isArray(cssProp)) {\n var mediaQueries = {};\n var fallbacks = {};\n for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {\n var _extends2, _extends3;\n var obj = _step.value;\n if (!obj.prop || !obj.fromSize || !obj.toSize) {\n throw new PolishedError(50);\n }\n fallbacks[obj.prop] = obj.fromSize;\n mediaQueries[\"@media (min-width: \" + minScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + minScreen + \")\"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));\n mediaQueries[\"@media (min-width: \" + maxScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + maxScreen + \")\"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));\n }\n return _extends({}, fallbacks, mediaQueries);\n } else {\n var _ref, _ref2, _ref3;\n if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {\n throw new PolishedError(51);\n }\n return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3[\"@media (min-width: \" + minScreen + \")\"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3[\"@media (min-width: \" + maxScreen + \")\"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;\n }\n}\n\nvar dataURIRegex = /^\\s*data:([a-z]+\\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\\-._~:@/?%\\s]*\\s*$/i;\nvar formatHintMap = {\n woff: 'woff',\n woff2: 'woff2',\n ttf: 'truetype',\n otf: 'opentype',\n eot: 'embedded-opentype',\n svg: 'svg',\n svgz: 'svg'\n};\nfunction generateFormatHint(format, formatHint) {\n if (!formatHint) return '';\n return \" format(\\\"\" + formatHintMap[format] + \"\\\")\";\n}\nfunction isDataURI(fontFilePath) {\n return !!fontFilePath.replace(/\\s+/g, ' ').match(dataURIRegex);\n}\nfunction generateFileReferences(fontFilePath, fileFormats, formatHint) {\n if (isDataURI(fontFilePath)) {\n return \"url(\\\"\" + fontFilePath + \"\\\")\" + generateFormatHint(fileFormats[0], formatHint);\n }\n var fileFontReferences = fileFormats.map(function (format) {\n return \"url(\\\"\" + fontFilePath + \".\" + format + \"\\\")\" + generateFormatHint(format, formatHint);\n });\n return fileFontReferences.join(', ');\n}\nfunction generateLocalReferences(localFonts) {\n var localFontReferences = localFonts.map(function (font) {\n return \"local(\\\"\" + font + \"\\\")\";\n });\n return localFontReferences.join(', ');\n}\nfunction generateSources(fontFilePath, localFonts, fileFormats, formatHint) {\n var fontReferences = [];\n if (localFonts) fontReferences.push(generateLocalReferences(localFonts));\n if (fontFilePath) {\n fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));\n }\n return fontReferences.join(', ');\n}\n\n/**\n * CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.\n *\n * @example\n * // Styles as object basic usage\n * const styles = {\n * ...fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * })\n * }\n *\n * // styled-components basic usage\n * const GlobalStyle = createGlobalStyle`${\n * fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * }\n * )}`\n *\n * // CSS as JS Output\n *\n * '@font-face': {\n * 'fontFamily': 'Sans-Pro',\n * 'src': 'url(\"path/to/file.eot\"), url(\"path/to/file.woff2\"), url(\"path/to/file.woff\"), url(\"path/to/file.ttf\"), url(\"path/to/file.svg\")',\n * }\n */\n\nfunction fontFace(_ref) {\n var fontFamily = _ref.fontFamily,\n fontFilePath = _ref.fontFilePath,\n fontStretch = _ref.fontStretch,\n fontStyle = _ref.fontStyle,\n fontVariant = _ref.fontVariant,\n fontWeight = _ref.fontWeight,\n _ref$fileFormats = _ref.fileFormats,\n fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,\n _ref$formatHint = _ref.formatHint,\n formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,\n _ref$localFonts = _ref.localFonts,\n localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,\n unicodeRange = _ref.unicodeRange,\n fontDisplay = _ref.fontDisplay,\n fontVariationSettings = _ref.fontVariationSettings,\n fontFeatureSettings = _ref.fontFeatureSettings;\n // Error Handling\n if (!fontFamily) throw new PolishedError(55);\n if (!fontFilePath && !localFonts) {\n throw new PolishedError(52);\n }\n if (localFonts && !Array.isArray(localFonts)) {\n throw new PolishedError(53);\n }\n if (!Array.isArray(fileFormats)) {\n throw new PolishedError(54);\n }\n var fontFaceDeclaration = {\n '@font-face': {\n fontFamily: fontFamily,\n src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),\n unicodeRange: unicodeRange,\n fontStretch: fontStretch,\n fontStyle: fontStyle,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n fontDisplay: fontDisplay,\n fontVariationSettings: fontVariationSettings,\n fontFeatureSettings: fontFeatureSettings\n }\n };\n\n // Removes undefined fields for cleaner css object.\n return JSON.parse(JSON.stringify(fontFaceDeclaration));\n}\n\n/**\n * CSS to hide text to show a background image in a SEO-friendly way.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'backgroundImage': 'url(logo.png)',\n * ...hideText(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * backgroundImage: url(logo.png);\n * ${hideText()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'backgroundImage': 'url(logo.png)',\n * 'textIndent': '101%',\n * 'overflow': 'hidden',\n * 'whiteSpace': 'nowrap',\n * }\n */\nfunction hideText() {\n return {\n textIndent: '101%',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n };\n}\n\n/**\n * CSS to hide content visually but remain accessible to screen readers.\n * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...hideVisually(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hideVisually()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'border': '0',\n * 'clip': 'rect(0 0 0 0)',\n * 'height': '1px',\n * 'margin': '-1px',\n * 'overflow': 'hidden',\n * 'padding': '0',\n * 'position': 'absolute',\n * 'whiteSpace': 'nowrap',\n * 'width': '1px',\n * }\n */\nfunction hideVisually() {\n return {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n };\n}\n\n/**\n * Generates a media query to target HiDPI devices.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * [hiDPI(1.5)]: {\n * width: 200px;\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hiDPI(1.5)} {\n * width: 200px;\n * }\n * `\n *\n * // CSS as JS Output\n *\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\n * only screen and (min--moz-device-pixel-ratio: 1.5),\n * only screen and (-o-min-device-pixel-ratio: 1.5/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * 'width': '200px',\n * }\n */\nfunction hiDPI(ratio) {\n if (ratio === void 0) {\n ratio = 1.3;\n }\n return \"\\n @media only screen and (-webkit-min-device-pixel-ratio: \" + ratio + \"),\\n only screen and (min--moz-device-pixel-ratio: \" + ratio + \"),\\n only screen and (-o-min-device-pixel-ratio: \" + ratio + \"/1),\\n only screen and (min-resolution: \" + Math.round(ratio * 96) + \"dpi),\\n only screen and (min-resolution: \" + ratio + \"dppx)\\n \";\n}\n\nfunction constructGradientValue(literals) {\n var template = '';\n for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n substitutions[_key - 1] = arguments[_key];\n }\n for (var i = 0; i < literals.length; i += 1) {\n template += literals[i];\n if (i === substitutions.length - 1 && substitutions[i]) {\n var definedValues = substitutions.filter(function (substitute) {\n return !!substitute;\n });\n // Adds leading coma if properties preceed color-stops\n if (definedValues.length > 1) {\n template = template.slice(0, -1);\n template += \", \" + substitutions[i];\n // No trailing space if color-stops is the only param provided\n } else if (definedValues.length === 1) {\n template += \"\" + substitutions[i];\n }\n } else if (substitutions[i]) {\n template += substitutions[i] + \" \";\n }\n }\n return template.trim();\n}\n\nvar _templateObject$1;\n/**\n * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#FFF',\n * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction linearGradient(_ref) {\n var colorStops = _ref.colorStops,\n fallback = _ref.fallback,\n _ref$toDirection = _ref.toDirection,\n toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(56);\n }\n return {\n backgroundColor: fallback || colorStops[0].replace(/,\\s+/g, ',').split(' ')[0].replace(/,(?=\\S)/g, ', '),\n backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose([\"linear-gradient(\", \"\", \")\"])), toDirection, colorStops.join(', ').replace(/,(?=\\S)/g, ', '))\n };\n}\n\n/**\n * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...normalize(),\n * }\n *\n * // styled-components usage\n * const GlobalStyle = createGlobalStyle`${normalize()}`\n *\n * // CSS as JS Output\n *\n * html {\n * lineHeight: 1.15,\n * textSizeAdjust: 100%,\n * } ...\n */\nfunction normalize() {\n var _ref;\n return [(_ref = {\n html: {\n lineHeight: '1.15',\n textSizeAdjust: '100%'\n },\n body: {\n margin: '0'\n },\n main: {\n display: 'block'\n },\n h1: {\n fontSize: '2em',\n margin: '0.67em 0'\n },\n hr: {\n boxSizing: 'content-box',\n height: '0',\n overflow: 'visible'\n },\n pre: {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n },\n a: {\n backgroundColor: 'transparent'\n },\n 'abbr[title]': {\n borderBottom: 'none',\n textDecoration: 'underline'\n }\n }, _ref[\"b,\\n strong\"] = {\n fontWeight: 'bolder'\n }, _ref[\"code,\\n kbd,\\n samp\"] = {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n }, _ref.small = {\n fontSize: '80%'\n }, _ref[\"sub,\\n sup\"] = {\n fontSize: '75%',\n lineHeight: '0',\n position: 'relative',\n verticalAlign: 'baseline'\n }, _ref.sub = {\n bottom: '-0.25em'\n }, _ref.sup = {\n top: '-0.5em'\n }, _ref.img = {\n borderStyle: 'none'\n }, _ref[\"button,\\n input,\\n optgroup,\\n select,\\n textarea\"] = {\n fontFamily: 'inherit',\n fontSize: '100%',\n lineHeight: '1.15',\n margin: '0'\n }, _ref[\"button,\\n input\"] = {\n overflow: 'visible'\n }, _ref[\"button,\\n select\"] = {\n textTransform: 'none'\n }, _ref[\"button,\\n html [type=\\\"button\\\"],\\n [type=\\\"reset\\\"],\\n [type=\\\"submit\\\"]\"] = {\n WebkitAppearance: 'button'\n }, _ref[\"button::-moz-focus-inner,\\n [type=\\\"button\\\"]::-moz-focus-inner,\\n [type=\\\"reset\\\"]::-moz-focus-inner,\\n [type=\\\"submit\\\"]::-moz-focus-inner\"] = {\n borderStyle: 'none',\n padding: '0'\n }, _ref[\"button:-moz-focusring,\\n [type=\\\"button\\\"]:-moz-focusring,\\n [type=\\\"reset\\\"]:-moz-focusring,\\n [type=\\\"submit\\\"]:-moz-focusring\"] = {\n outline: '1px dotted ButtonText'\n }, _ref.fieldset = {\n padding: '0.35em 0.625em 0.75em'\n }, _ref.legend = {\n boxSizing: 'border-box',\n color: 'inherit',\n display: 'table',\n maxWidth: '100%',\n padding: '0',\n whiteSpace: 'normal'\n }, _ref.progress = {\n verticalAlign: 'baseline'\n }, _ref.textarea = {\n overflow: 'auto'\n }, _ref[\"[type=\\\"checkbox\\\"],\\n [type=\\\"radio\\\"]\"] = {\n boxSizing: 'border-box',\n padding: '0'\n }, _ref[\"[type=\\\"number\\\"]::-webkit-inner-spin-button,\\n [type=\\\"number\\\"]::-webkit-outer-spin-button\"] = {\n height: 'auto'\n }, _ref['[type=\"search\"]'] = {\n WebkitAppearance: 'textfield',\n outlineOffset: '-2px'\n }, _ref['[type=\"search\"]::-webkit-search-decoration'] = {\n WebkitAppearance: 'none'\n }, _ref['::-webkit-file-upload-button'] = {\n WebkitAppearance: 'button',\n font: 'inherit'\n }, _ref.details = {\n display: 'block'\n }, _ref.summary = {\n display: 'list-item'\n }, _ref.template = {\n display: 'none'\n }, _ref['[hidden]'] = {\n display: 'none'\n }, _ref), {\n 'abbr[title]': {\n textDecoration: 'underline dotted'\n }\n }];\n}\n\nvar _templateObject;\n/**\n * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#00FFFF',\n * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction radialGradient(_ref) {\n var colorStops = _ref.colorStops,\n _ref$extent = _ref.extent,\n extent = _ref$extent === void 0 ? '' : _ref$extent,\n fallback = _ref.fallback,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? '' : _ref$position,\n _ref$shape = _ref.shape,\n shape = _ref$shape === void 0 ? '' : _ref$shape;\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(57);\n }\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"radial-gradient(\", \"\", \"\", \"\", \")\"])), position, shape, extent, colorStops.join(', '))\n };\n}\n\n/**\n * A helper to generate a retina background image and non-retina\n * background image. The retina background image will output to a HiDPI media query. The mixin uses\n * a _2x.png filename suffix by default.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...retinaImage('my-img')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${retinaImage('my-img')}\n * `\n *\n * // CSS as JS Output\n * div {\n * backgroundImage: 'url(my-img.png)',\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),\n * only screen and (min--moz-device-pixel-ratio: 1.3),\n * only screen and (-o-min-device-pixel-ratio: 1.3/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * backgroundImage: 'url(my-img_2x.png)',\n * }\n * }\n */\nfunction retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {\n var _ref;\n if (extension === void 0) {\n extension = 'png';\n }\n if (retinaSuffix === void 0) {\n retinaSuffix = '_2x';\n }\n if (!filename) {\n throw new PolishedError(58);\n }\n // Replace the dot at the beginning of the passed extension if one exists\n var ext = extension.replace(/^\\./, '');\n var rFilename = retinaFilename ? retinaFilename + \".\" + ext : \"\" + filename + retinaSuffix + \".\" + ext;\n return _ref = {\n backgroundImage: \"url(\" + filename + \".\" + ext + \")\"\n }, _ref[hiDPI()] = _extends({\n backgroundImage: \"url(\" + rFilename + \")\"\n }, backgroundSize ? {\n backgroundSize: backgroundSize\n } : {}), _ref;\n}\n\n/* eslint-disable key-spacing */\nvar functionsMap = {\n easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/* eslint-enable key-spacing */\n\nfunction getTimingFunction(functionName) {\n return functionsMap[functionName];\n}\n\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': timingFunctions('easeInQuad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${timingFunctions('easeInQuad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\nfunction timingFunctions(timingFunction) {\n return getTimingFunction(timingFunction);\n}\n\nvar getBorderWidth = function getBorderWidth(pointingDirection, height, width) {\n var fullWidth = \"\" + width[0] + (width[1] || '');\n var halfWidth = \"\" + width[0] / 2 + (width[1] || '');\n var fullHeight = \"\" + height[0] + (height[1] || '');\n var halfHeight = \"\" + height[0] / 2 + (height[1] || '');\n switch (pointingDirection) {\n case 'top':\n return \"0 \" + halfWidth + \" \" + fullHeight + \" \" + halfWidth;\n case 'topLeft':\n return fullWidth + \" \" + fullHeight + \" 0 0\";\n case 'left':\n return halfHeight + \" \" + fullWidth + \" \" + halfHeight + \" 0\";\n case 'bottomLeft':\n return fullWidth + \" 0 0 \" + fullHeight;\n case 'bottom':\n return fullHeight + \" \" + halfWidth + \" 0 \" + halfWidth;\n case 'bottomRight':\n return \"0 0 \" + fullWidth + \" \" + fullHeight;\n case 'right':\n return halfHeight + \" 0 \" + halfHeight + \" \" + fullWidth;\n case 'topRight':\n default:\n return \"0 \" + fullWidth + \" \" + fullHeight + \" 0\";\n }\n};\nvar getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {\n switch (pointingDirection) {\n case 'top':\n case 'bottomRight':\n return {\n borderBottomColor: foregroundColor\n };\n case 'right':\n case 'bottomLeft':\n return {\n borderLeftColor: foregroundColor\n };\n case 'bottom':\n case 'topLeft':\n return {\n borderTopColor: foregroundColor\n };\n case 'left':\n case 'topRight':\n return {\n borderRightColor: foregroundColor\n };\n default:\n throw new PolishedError(59);\n }\n};\n\n/**\n * CSS to represent triangle with any pointing direction with an optional background color.\n *\n * @example\n * // Styles as object usage\n *\n * const styles = {\n * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })\n * }\n *\n *\n * // styled-components usage\n * const div = styled.div`\n * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}\n *\n *\n * // CSS as JS Output\n *\n * div: {\n * 'borderColor': 'transparent transparent transparent red',\n * 'borderStyle': 'solid',\n * 'borderWidth': '50px 0 50px 100px',\n * 'height': '0',\n * 'width': '0',\n * }\n */\nfunction triangle(_ref) {\n var pointingDirection = _ref.pointingDirection,\n height = _ref.height,\n width = _ref.width,\n foregroundColor = _ref.foregroundColor,\n _ref$backgroundColor = _ref.backgroundColor,\n backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;\n var widthAndUnit = getValueAndUnit(width);\n var heightAndUnit = getValueAndUnit(height);\n if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {\n throw new PolishedError(60);\n }\n return _extends({\n width: '0',\n height: '0',\n borderColor: backgroundColor\n }, getBorderColor(pointingDirection, foregroundColor), {\n borderStyle: 'solid',\n borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)\n });\n}\n\n/**\n * Provides an easy way to change the `wordWrap` property.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...wordWrap('break-word')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${wordWrap('break-word')}\n * `\n *\n * // CSS as JS Output\n *\n * const styles = {\n * overflowWrap: 'break-word',\n * wordWrap: 'break-word',\n * wordBreak: 'break-all',\n * }\n */\nfunction wordWrap(wrap) {\n if (wrap === void 0) {\n wrap = 'break-word';\n }\n var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;\n return {\n overflowWrap: wrap,\n wordWrap: wrap,\n wordBreak: wordBreak\n };\n}\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgb(?:a)?\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^hsl(?:a)?\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;\n\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n var normalizedColor = nameToHex(color);\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n var rgbMatched = rgbRegex.exec(normalizedColor);\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4]) > 1 ? parseFloat(\"\" + rgbaMatched[4]) / 100 : parseFloat(\"\" + rgbaMatched[4])\n };\n }\n var hslMatched = hslRegex.exec(normalizedColor);\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4]) > 1 ? parseFloat(\"\" + hslaMatched[4]) / 100 : parseFloat(\"\" + hslaMatched[4])\n };\n }\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / delta + 2;\n break;\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n hue *= 60;\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n return value;\n};\nvar reduceHexValue$1 = reduceHexValue;\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\nfunction convertToHex(red, green, blue) {\n return reduceHexValue$1(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n throw new PolishedError(1);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n throw new PolishedError(2);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue$1(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue$1(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n throw new PolishedError(6);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n}\n\n// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n}\n\n// eslint-disable-next-line no-redeclare\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\n/**\n * Changes the hue of the color. Hue is a number between 0 to 360. The first\n * argument for adjustHue is the amount of degrees the color is rotated around\n * the color wheel, always producing a positive hue value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: adjustHue(180, '#448'),\n * background: adjustHue('180', 'rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${adjustHue(180, '#448')};\n * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#888844\";\n * background: \"rgba(136,136,68,0.7)\";\n * }\n */\nfunction adjustHue(degree, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: hslColor.hue + parseFloat(degree)\n }));\n}\n\n// prettier-ignore\nvar curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);\nvar curriedAdjustHue$1 = curriedAdjustHue;\n\n/**\n * Returns the complement of the provided color. This is identical to adjustHue(180, <color>).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: complement('#448'),\n * background: complement('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${complement('#448')};\n * background: ${complement('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#884\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\nfunction complement(color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: (hslColor.hue + 180) % 360\n }));\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n}\n\n// prettier-ignore\nvar curriedDarken = curry /* ::<number | string, string, string> */(darken);\nvar curriedDarken$1 = curriedDarken;\n\n/**\n * Decreases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the desaturate function is the amount by how much the color\n * intensity should be decreased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: desaturate(0.2, '#CCCD64'),\n * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${desaturate(0.2, '#CCCD64')};\n * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#b8b979\";\n * background: \"rgba(184,185,121,0.7)\";\n * }\n */\nfunction desaturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))\n }));\n}\n\n// prettier-ignore\nvar curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);\nvar curriedDesaturate$1 = curriedDesaturate;\n\n/**\n * Returns a number (float) representing the luminance of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',\n * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)',\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};\n * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)'};\n *\n * // CSS in JS Output\n *\n * div {\n * background: \"#CCCD64\";\n * background: \"rgba(58, 133, 255, 1)\";\n * }\n */\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n var rgbColor = parseToRgb(color);\n var _Object$keys$map = Object.keys(rgbColor).map(function (key) {\n var channel = rgbColor[key] / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }),\n r = _Object$keys$map[0],\n g = _Object$keys$map[1],\n b = _Object$keys$map[2];\n return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));\n}\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n *\n * @example\n * const contrastRatio = getContrast('#444', '#fff');\n */\nfunction getContrast(color1, color2) {\n var luminance1 = getLuminance(color1);\n var luminance2 = getLuminance(color2);\n return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));\n}\n\n/**\n * Converts the color to a grayscale, by reducing its saturation to 0.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: grayscale('#CCCD64'),\n * background: grayscale('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${grayscale('#CCCD64')};\n * background: ${grayscale('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#999\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\nfunction grayscale(color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: 0\n }));\n}\n\n/**\n * Converts a HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\nfunction hslToColorString(color) {\n if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {\n if (color.alpha && typeof color.alpha === 'number') {\n return hsla({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness,\n alpha: color.alpha\n });\n }\n return hsl({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness\n });\n }\n throw new PolishedError(45);\n}\n\n/**\n * Inverts the red, green and blue values of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: invert('#CCCD64'),\n * background: invert('rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${invert('#CCCD64')};\n * background: ${invert('rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#33329b\";\n * background: \"rgba(154,155,50,0.7)\";\n * }\n */\nfunction invert(color) {\n if (color === 'transparent') return color;\n // parse color string to rgb\n var value = parseToRgb(color);\n return toColorString(_extends({}, value, {\n red: 255 - value.red,\n green: 255 - value.green,\n blue: 255 - value.blue\n }));\n}\n\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n}\n\n// prettier-ignore\nvar curriedLighten = curry /* ::<number | string, string, string> */(lighten);\nvar curriedLighten$1 = curriedLighten;\n\n/**\n * Determines which contrast guidelines have been met for two colors.\n * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).\n *\n * @example\n * const scores = meetsContrastGuidelines('#444', '#fff');\n */\nfunction meetsContrastGuidelines(color1, color2) {\n var contrastRatio = getContrast(color1, color2);\n return {\n AA: contrastRatio >= 4.5,\n AALarge: contrastRatio >= 3,\n AAA: contrastRatio >= 7,\n AAALarge: contrastRatio >= 4.5\n };\n}\n\n/**\n * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: mix(0.5, '#f00', '#00f')\n * background: mix(0.25, '#f00', '#00f')\n * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${mix(0.5, '#f00', '#00f')};\n * background: ${mix(0.25, '#f00', '#00f')};\n * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#7f007f\";\n * background: \"#3f00bf\";\n * background: \"rgba(63, 0, 191, 0.75)\";\n * }\n */\nfunction mix(weight, color, otherColor) {\n if (color === 'transparent') return otherColor;\n if (otherColor === 'transparent') return color;\n if (weight === 0) return otherColor;\n var parsedColor1 = parseToRgb(color);\n var color1 = _extends({}, parsedColor1, {\n alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1\n });\n var parsedColor2 = parseToRgb(otherColor);\n var color2 = _extends({}, parsedColor2, {\n alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1\n });\n\n // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n var alphaDelta = color1.alpha - color2.alpha;\n var x = parseFloat(weight) * 2 - 1;\n var y = x * alphaDelta === -1 ? x : x + alphaDelta;\n var z = 1 + x * alphaDelta;\n var weight1 = (y / z + 1) / 2.0;\n var weight2 = 1 - weight1;\n var mixedColor = {\n red: Math.floor(color1.red * weight1 + color2.red * weight2),\n green: Math.floor(color1.green * weight1 + color2.green * weight2),\n blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),\n alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))\n };\n return rgba(mixedColor);\n}\n\n// prettier-ignore\nvar curriedMix = curry /* ::<number | string, string, string, string> */(mix);\nvar mix$1 = curriedMix;\n\n/**\n * Increases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');\n * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),\n * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};\n * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},\n * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#fff\";\n * background: \"rgba(255,255,255,0.7)\";\n * background: \"rgba(255,0,0,0.7)\";\n * }\n */\nfunction opacify(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)\n });\n return rgba(colorWithAlpha);\n}\n\n// prettier-ignore\nvar curriedOpacify = curry /* ::<number | string, string, string> */(opacify);\nvar curriedOpacify$1 = curriedOpacify;\n\nvar defaultReturnIfLightColor = '#000';\nvar defaultReturnIfDarkColor = '#fff';\n\n/**\n * Returns black or white (or optional passed colors) for best\n * contrast depending on the luminosity of the given color.\n * When passing custom return colors, strict mode ensures that the\n * return color always meets or exceeds WCAG level AA or greater. If this test\n * fails, the default return color (black or white) is returned in place of the\n * custom return color. You can optionally turn off strict mode.\n *\n * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * color: readableColor('#000'),\n * color: readableColor('black', '#001', '#ff8'),\n * color: readableColor('white', '#001', '#ff8'),\n * color: readableColor('red', '#333', '#ddd', true)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * color: ${readableColor('#000')};\n * color: ${readableColor('black', '#001', '#ff8')};\n * color: ${readableColor('white', '#001', '#ff8')};\n * color: ${readableColor('red', '#333', '#ddd', true)};\n * `\n *\n * // CSS in JS Output\n * element {\n * color: \"#fff\";\n * color: \"#ff8\";\n * color: \"#001\";\n * color: \"#000\";\n * }\n */\nfunction readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {\n if (returnIfLightColor === void 0) {\n returnIfLightColor = defaultReturnIfLightColor;\n }\n if (returnIfDarkColor === void 0) {\n returnIfDarkColor = defaultReturnIfDarkColor;\n }\n if (strict === void 0) {\n strict = true;\n }\n var isColorLight = getLuminance(color) > 0.179;\n var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;\n if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {\n return preferredReturnColor;\n }\n return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;\n}\n\n/**\n * Converts a RgbColor or RgbaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb` or `rgba`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),\n * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * }\n */\nfunction rgbToColorString(color) {\n if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {\n if (typeof color.alpha === 'number') {\n return rgba({\n red: color.red,\n green: color.green,\n blue: color.blue,\n alpha: color.alpha\n });\n }\n return rgb({\n red: color.red,\n green: color.green,\n blue: color.blue\n });\n }\n throw new PolishedError(46);\n}\n\n/**\n * Increases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the saturate function is the amount by how much the color\n * intensity should be increased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: saturate(0.2, '#CCCD64'),\n * background: saturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${saturate(0.2, '#FFCD64')};\n * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e0e250\";\n * background: \"rgba(224,226,80,0.7)\";\n * }\n */\nfunction saturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))\n }));\n}\n\n// prettier-ignore\nvar curriedSaturate = curry /* ::<number | string, string, string> */(saturate);\nvar curriedSaturate$1 = curriedSaturate;\n\n/**\n * Sets the hue of a color to the provided value. The hue range can be\n * from 0 and 359.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setHue(42, '#CCCD64'),\n * background: setHue('244', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setHue(42, '#CCCD64')};\n * background: ${setHue('244', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#cdae64\";\n * background: \"rgba(107,100,205,0.7)\";\n * }\n */\nfunction setHue(hue, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n hue: parseFloat(hue)\n }));\n}\n\n// prettier-ignore\nvar curriedSetHue = curry /* ::<number | string, string, string> */(setHue);\nvar curriedSetHue$1 = curriedSetHue;\n\n/**\n * Sets the lightness of a color to the provided value. The lightness range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setLightness(0.2, '#CCCD64'),\n * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setLightness(0.2, '#CCCD64')};\n * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#4d4d19\";\n * background: \"rgba(223,224,159,0.7)\";\n * }\n */\nfunction setLightness(lightness, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n lightness: parseFloat(lightness)\n }));\n}\n\n// prettier-ignore\nvar curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);\nvar curriedSetLightness$1 = curriedSetLightness;\n\n/**\n * Sets the saturation of a color to the provided value. The saturation range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setSaturation(0.2, '#CCCD64'),\n * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setSaturation(0.2, '#CCCD64')};\n * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#adad84\";\n * background: \"rgba(228,229,76,0.7)\";\n * }\n */\nfunction setSaturation(saturation, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: parseFloat(saturation)\n }));\n}\n\n// prettier-ignore\nvar curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);\nvar curriedSetSaturation$1 = curriedSetSaturation;\n\n/**\n * Shades a color by mixing it with black. `shade` can produce\n * hue shifts, where as `darken` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: shade(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${shade(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#00003f\";\n * }\n */\n\nfunction shade(percentage, color) {\n if (color === 'transparent') return color;\n return mix$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);\n}\n\n// prettier-ignore\nvar curriedShade = curry /* ::<number | string, string, string> */(shade);\nvar curriedShade$1 = curriedShade;\n\n/**\n * Tints a color by mixing it with white. `tint` can produce\n * hue shifts, where as `lighten` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: tint(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${tint(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#bfbfff\";\n * }\n */\n\nfunction tint(percentage, color) {\n if (color === 'transparent') return color;\n return mix$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);\n}\n\n// prettier-ignore\nvar curriedTint = curry /* ::<number | string, string, string> */(tint);\nvar curriedTint$1 = curriedTint;\n\n/**\n * Decreases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: transparentize(0.1, '#fff'),\n * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),\n * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${transparentize(0.1, '#fff')};\n * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};\n * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,255,255,0.9)\";\n * background: \"rgba(255,255,255,0.8)\";\n * background: \"rgba(255,0,0,0.3)\";\n * }\n */\nfunction transparentize(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)\n });\n return rgba(colorWithAlpha);\n}\n\n// prettier-ignore\nvar curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);\nvar curriedTransparentize$1 = curriedTransparentize;\n\n/**\n * Shorthand for easily setting the animation property. Allows either multiple arrays with animations\n * or a single animation spread over the arguments.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out, colorchange 2s'\n * }\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation('rotate', '1s', 'ease-in-out')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation('rotate', '1s', 'ease-in-out')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out'\n * }\n */\nfunction animation() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // Allow single or multiple animations passed\n var multiMode = Array.isArray(args[0]);\n if (!multiMode && args.length > 8) {\n throw new PolishedError(64);\n }\n var code = args.map(function (arg) {\n if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {\n throw new PolishedError(65);\n }\n if (Array.isArray(arg) && arg.length > 8) {\n throw new PolishedError(66);\n }\n return Array.isArray(arg) ? arg.join(' ') : arg;\n }).join(', ');\n return {\n animation: code\n };\n}\n\n/**\n * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'backgroundImage': 'url(\"/image/background.jpg\"), linear-gradient(red, green)'\n * }\n */\nfunction backgroundImages() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n return {\n backgroundImage: properties.join(', ')\n };\n}\n\n/**\n * Shorthand that accepts any number of background values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'background': 'url(\"/image/background.jpg\"), linear-gradient(red, green), center no-repeat'\n * }\n */\nfunction backgrounds() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n return {\n background: properties.join(', ')\n };\n}\n\nvar sideMap = ['top', 'right', 'bottom', 'left'];\n\n/**\n * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...border('1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderColor': 'red',\n * 'borderStyle': 'solid',\n * 'borderWidth': `1px`,\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...border('top', '1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('top', '1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderTopStyle': 'solid',\n * 'borderTopWidth': `1px`,\n * }\n */\n\nfunction border(sideKeyword) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {\n var _ref;\n return _ref = {}, _ref[\"border\" + capitalizeString(sideKeyword) + \"Width\"] = values[0], _ref[\"border\" + capitalizeString(sideKeyword) + \"Style\"] = values[1], _ref[\"border\" + capitalizeString(sideKeyword) + \"Color\"] = values[2], _ref;\n } else {\n values.unshift(sideKeyword);\n return {\n borderWidth: values[0],\n borderStyle: values[1],\n borderColor: values[2]\n };\n }\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderColor('red', 'green', 'blue', 'yellow')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderColor('red', 'green', 'blue', 'yellow')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderRightColor': 'green',\n * 'borderBottomColor': 'blue',\n * 'borderLeftColor': 'yellow'\n * }\n */\nfunction borderColor() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['borderColor'].concat(values));\n}\n\n/**\n * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderRadius('top', '5px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderRadius('top', '5px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopRightRadius': '5px',\n * 'borderTopLeftRadius': '5px',\n * }\n */\nfunction borderRadius(side, radius) {\n var uppercaseSide = capitalizeString(side);\n if (!radius && radius !== 0) {\n throw new PolishedError(62);\n }\n if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {\n var _ref;\n return _ref = {}, _ref[\"border\" + uppercaseSide + \"RightRadius\"] = radius, _ref[\"border\" + uppercaseSide + \"LeftRadius\"] = radius, _ref;\n }\n if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {\n var _ref2;\n return _ref2 = {}, _ref2[\"borderTop\" + uppercaseSide + \"Radius\"] = radius, _ref2[\"borderBottom\" + uppercaseSide + \"Radius\"] = radius, _ref2;\n }\n throw new PolishedError(63);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderStyle('solid', 'dashed', 'dotted', 'double')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderStyle('solid', 'dashed', 'dotted', 'double')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopStyle': 'solid',\n * 'borderRightStyle': 'dashed',\n * 'borderBottomStyle': 'dotted',\n * 'borderLeftStyle': 'double'\n * }\n */\nfunction borderStyle() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['borderStyle'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderWidth('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderWidth('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopWidth': '12px',\n * 'borderRightWidth': '24px',\n * 'borderBottomWidth': '36px',\n * 'borderLeftWidth': '48px'\n * }\n */\nfunction borderWidth() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['borderWidth'].concat(values));\n}\n\nfunction generateSelectors(template, state) {\n var stateSuffix = state ? \":\" + state : '';\n return template(stateSuffix);\n}\n\n/**\n * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.\n * @private\n */\nfunction statefulSelectors(states, template, stateMap) {\n if (!template) throw new PolishedError(67);\n if (states.length === 0) return generateSelectors(template, null);\n var selectors = [];\n for (var i = 0; i < states.length; i += 1) {\n if (stateMap && stateMap.indexOf(states[i]) < 0) {\n throw new PolishedError(68);\n }\n selectors.push(generateSelectors(template, states[i]));\n }\n selectors = selectors.join(',');\n return selectors;\n}\n\nvar stateMap$1 = [undefined, null, 'active', 'focus', 'hover'];\nfunction template$1(state) {\n return \"button\" + state + \",\\n input[type=\\\"button\\\"]\" + state + \",\\n input[type=\\\"reset\\\"]\" + state + \",\\n input[type=\\\"submit\\\"]\" + state;\n}\n\n/**\n * Populates selectors that target all buttons. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [buttons('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${buttons('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'button:active,\n * 'input[type=\"button\"]:active,\n * 'input[type=\\\"reset\\\"]:active,\n * 'input[type=\\\"submit\\\"]:active: {\n * 'border': 'none'\n * }\n */\nfunction buttons() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n return statefulSelectors(states, template$1, stateMap$1);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...margin('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${margin('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'marginTop': '12px',\n * 'marginRight': '24px',\n * 'marginBottom': '36px',\n * 'marginLeft': '48px'\n * }\n */\nfunction margin() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['margin'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...padding('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${padding('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction padding() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['padding'].concat(values));\n}\n\nvar positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];\n\n/**\n * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...position('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...position('absolute', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('absolute', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'position': 'absolute',\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n */\nfunction position(firstValue) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n if (positionMap.indexOf(firstValue) >= 0 && firstValue) {\n return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {\n position: firstValue\n });\n } else {\n return directionalProperty.apply(void 0, ['', firstValue].concat(values));\n }\n}\n\n/**\n * Shorthand to set the height and width properties in a single statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...size('300px', '250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${size('300px', '250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'height': '300px',\n * 'width': '250px',\n * }\n */\nfunction size(height, width) {\n if (width === void 0) {\n width = height;\n }\n return {\n height: height,\n width: width\n };\n}\n\nvar stateMap = [undefined, null, 'active', 'focus', 'hover'];\nfunction template(state) {\n return \"input[type=\\\"color\\\"]\" + state + \",\\n input[type=\\\"date\\\"]\" + state + \",\\n input[type=\\\"datetime\\\"]\" + state + \",\\n input[type=\\\"datetime-local\\\"]\" + state + \",\\n input[type=\\\"email\\\"]\" + state + \",\\n input[type=\\\"month\\\"]\" + state + \",\\n input[type=\\\"number\\\"]\" + state + \",\\n input[type=\\\"password\\\"]\" + state + \",\\n input[type=\\\"search\\\"]\" + state + \",\\n input[type=\\\"tel\\\"]\" + state + \",\\n input[type=\\\"text\\\"]\" + state + \",\\n input[type=\\\"time\\\"]\" + state + \",\\n input[type=\\\"url\\\"]\" + state + \",\\n input[type=\\\"week\\\"]\" + state + \",\\n input:not([type])\" + state + \",\\n textarea\" + state;\n}\n\n/**\n * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [textInputs('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${textInputs('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'input[type=\"color\"]:active,\n * input[type=\"date\"]:active,\n * input[type=\"datetime\"]:active,\n * input[type=\"datetime-local\"]:active,\n * input[type=\"email\"]:active,\n * input[type=\"month\"]:active,\n * input[type=\"number\"]:active,\n * input[type=\"password\"]:active,\n * input[type=\"search\"]:active,\n * input[type=\"tel\"]:active,\n * input[type=\"text\"]:active,\n * input[type=\"time\"]:active,\n * input[type=\"url\"]:active,\n * input[type=\"week\"]:active,\n * input:not([type]):active,\n * textarea:active': {\n * 'border': 'none'\n * }\n */\nfunction textInputs() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n return statefulSelectors(states, template, stateMap);\n}\n\n/**\n * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).\n * @example\n * // Styles as object usage\n * const styles = {\n * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),\n * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};\n * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'\n * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',\n * }\n */\nfunction transitions() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n if (Array.isArray(properties[0]) && properties.length === 2) {\n var value = properties[1];\n if (typeof value !== 'string') {\n throw new PolishedError(61);\n }\n var transitionsString = properties[0].map(function (property) {\n return property + \" \" + value;\n }).join(', ');\n return {\n transition: transitionsString\n };\n } else {\n return {\n transition: properties.join(', ')\n };\n }\n}\n\nexport { curriedAdjustHue$1 as adjustHue, animation, backgroundImages, backgrounds, between, border, borderColor, borderRadius, borderStyle, borderWidth, buttons, clearFix, complement, cover, cssVar, curriedDarken$1 as darken, curriedDesaturate$1 as desaturate, directionalProperty, easeIn, easeInOut, easeOut, ellipsis, em$1 as em, fluidRange, fontFace, getContrast, getLuminance, getValueAndUnit, grayscale, hiDPI, hideText, hideVisually, hsl, hslToColorString, hsla, important, invert, curriedLighten$1 as lighten, linearGradient, margin, math, meetsContrastGuidelines, mix$1 as mix, modularScale, normalize, curriedOpacify$1 as opacify, padding, parseToHsl, parseToRgb, position, radialGradient, readableColor, rem$1 as rem, remToPx, retinaImage, rgb, rgbToColorString, rgba, curriedSaturate$1 as saturate, curriedSetHue$1 as setHue, curriedSetLightness$1 as setLightness, curriedSetSaturation$1 as setSaturation, curriedShade$1 as shade, size, stripUnit, textInputs, timingFunctions, curriedTint$1 as tint, toColorString, transitions, curriedTransparentize$1 as transparentize, triangle, wordWrap };\n","import type { DeepPartial } from '../types';\nimport { merge } from 'es-toolkit/compat';\nimport { darken, lighten, transparentize } from 'polished';\nimport { baseTheme } from './base';\n\n/**\n * Theme override accepted by `createTheme` and `<TThemeProvider>`.\n *\n * Provide a partial theme — only the keys you want to change. The brand color seed\n * regenerates the full 12-step ramp (plus the 12-step alpha twin) automatically.\n *\n * ## Two accepted shapes\n *\n * ```ts\n * // Canonical — matches the `color.brand.*` token vocabulary:\n * createTheme({ colors: { brand: { base: '#FF6600' } } });\n *\n * // Legacy — kept working for drop-in compatibility with pre-migration consumers:\n * createTheme({ colors: { primary: { main: '#FF6600' } } });\n * ```\n *\n * When both are passed, `colors.brand.base` wins. Prefer the canonical shape in new code.\n *\n * ## Multi-tenant usage\n *\n * Pass the tenant's brand hex per request to retheme an entire subtree. The brand ramp\n * regenerates from the hex; every semantic token that references `color.brand.*` re-resolves\n * via CSS-variable cascade — no Vue re-renders.\n *\n * ```vue\n * <TThemeProvider :theme=\"{ colors: { brand: { base: tenantBrandHex } } }\">\n * <App />\n * </TThemeProvider>\n * ```\n */\nexport type TThemeOverride = DeepPartial<typeof baseTheme> & {\n colors?: {\n /**\n * The tenant brand color seed.\n *\n * Pass a single hex string — `createTheme` derives the 12-step ramp\n * (`--color-primary-1` through `--color-primary-12`) plus the 12-step alpha twin\n * (`--color-primary-alpha-1` through `--color-primary-alpha-12`) automatically. The\n * deprecated `--color-brand-*` twins are emitted alongside them.\n *\n * Step 9 anchors to the input exact, so primary buttons and headers render the\n * tenant color literally — the rest of the ramp is derived around it for hover\n * states, subtle backgrounds, focus rings, etc.\n */\n brand?: { base?: string };\n };\n};\n\nfunction generateBrandRamp(main: string): Record<number, string> {\n return {\n 1: lighten(0.35, main),\n 2: lighten(0.30, main),\n 3: lighten(0.25, main),\n 4: lighten(0.20, main),\n 5: lighten(0.15, main),\n 6: lighten(0.12, main),\n 7: lighten(0.08, main),\n 8: lighten(0.04, main), // Per Radix: border-strong, lighter than the anchor.\n 9: main,\n 10: darken(0.08, main), // Legacy `primary.toku` — solid hover; darkens for parity with other button variants.\n 11: darken(0.10, main),\n 12: darken(0.15, main),\n };\n}\n\n// Step 1 (faintest) → step 12 (strongest). Stored as target opacity; transparentize takes the inverse.\nconst BRAND_ALPHA_OPACITIES = [0.03, 0.05, 0.10, 0.15, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90];\n\n/**\n * Builds a theme object from a partial override.\n *\n * Returns the merged theme (drop-in compatible with the legacy theme shape via\n * `useTheme()`) plus a `cssVars` record suitable for inline `style` injection by\n * `<TThemeProvider>`. The cssVars contain the 12-step primary ramp + 12-step alpha twin\n * regenerated from the seed hex; they only exist when a brand override was provided.\n *\n * Typically you don't call this directly — pass the override prop to `<TThemeProvider>`\n * which calls `createTheme` internally. Call it directly only when you need the resolved\n * theme object outside the Vue component tree (e.g. for SSR or for non-Vue consumers).\n *\n * @example\n * ```ts\n * const theme = createTheme({ colors: { brand: { base: '#FF6600' } } });\n *\n * theme.colors.primary.main; // '#FF6600' (legacy key, still populated)\n * theme.cssVars; // { '--color-primary-9': '#FF6600', ... }\n * ```\n */\nexport function createTheme(theme: TThemeOverride = {}) {\n // Clone into a fresh object — `merge` mutates its first arg, which would otherwise\n // corrupt the baseTheme singleton across providers.\n const mergedTheme = merge({}, baseTheme, theme) as typeof baseTheme;\n const main = theme.colors?.brand?.base ?? theme.colors?.primary?.main;\n\n let cssVars: Record<string, string> | undefined;\n\n if (main) {\n const ramp = generateBrandRamp(main);\n\n // Mirror seed into legacy `primary.main` for consumers reading the old shape.\n mergedTheme.colors.primary.main = main;\n mergedTheme.colors.primary.ultraDark = ramp[12];\n mergedTheme.colors.primary.dark = main;\n mergedTheme.colors.primary.toku = ramp[10];\n mergedTheme.colors.primary.light1 = ramp[7];\n mergedTheme.colors.primary.light2 = ramp[4];\n mergedTheme.colors.primary.light3 = ramp[3];\n mergedTheme.colors.primary.light4 = ramp[2];\n mergedTheme.colors.primary.light5 = ramp[1];\n\n // Both names: semantic tokens alias primary, and consumer CSS still targets brand.\n cssVars = {};\n for (const [step, hex] of Object.entries(ramp)) {\n cssVars[`--color-primary-${step}`] = hex;\n cssVars[`--color-brand-${step}`] = hex;\n }\n for (let i = 1; i <= 12; i++) {\n const alpha = transparentize(1 - BRAND_ALPHA_OPACITIES[i - 1], main);\n cssVars[`--color-primary-alpha-${i}`] = alpha;\n cssVars[`--color-brand-a-${i}`] = alpha;\n }\n }\n\n return Object.assign(mergedTheme, { cssVars });\n}\n","import type { ComputedRef } from 'vue';\nimport { computed, inject } from 'vue';\nimport { baseTheme } from '../theme';\n\nexport const injectionKey = Symbol('theme');\n\nexport const useTheme = () => {\n const injectedTheme = inject<ComputedRef<typeof baseTheme> | undefined>(\n injectionKey,\n undefined,\n );\n const theme = computed(() => injectedTheme?.value ?? baseTheme);\n return theme;\n};\n","<script setup lang=\"ts\">\nimport { useTheme } from '@composables/theme';\n\nconst props = withDefaults(defineProps<{\n variant?: 'default' | 'active';\n}>(), {\n variant: 'default',\n});\n\ndefineSlots<{\n default: void;\n}>();\n\nconst theme = useTheme();\n</script>\n\n<template>\n <div class=\"t-chip\" :class=\"[`t-chip--${props.variant}`]\">\n <slot />\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n* {\n margin: 0;\n box-sizing: border-box;\n}\n\n.t-chip {\n display: inline-flex;\n align-items: center;\n border-radius: 32px;\n border: 0.5px solid v-bind('theme.colors.gray.dark3');\n padding: 4px 8px;\n gap: 4px;\n background-color: v-bind('theme.colors.background');\n\n :deep(*) {\n font-size: 0.75rem;\n line-height: 18px;\n color: v-bind('theme.colors.gray.dark3');\n }\n\n &--active {\n border: 0.5px solid v-bind('theme.colors.primary.main');\n background-color: v-bind('theme.colors.primary.light5');\n\n :deep(*) {\n color: v-bind('theme.colors.primary.main');\n }\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useTheme } from '@composables/theme';\n\nconst props = withDefaults(defineProps<{\n variant?: 'default' | 'active';\n}>(), {\n variant: 'default',\n});\n\ndefineSlots<{\n default: void;\n}>();\n\nconst theme = useTheme();\n</script>\n\n<template>\n <div class=\"t-chip\" :class=\"[`t-chip--${props.variant}`]\">\n <slot />\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n* {\n margin: 0;\n box-sizing: border-box;\n}\n\n.t-chip {\n display: inline-flex;\n align-items: center;\n border-radius: 32px;\n border: 0.5px solid v-bind('theme.colors.gray.dark3');\n padding: 4px 8px;\n gap: 4px;\n background-color: v-bind('theme.colors.background');\n\n :deep(*) {\n font-size: 0.75rem;\n line-height: 18px;\n color: v-bind('theme.colors.gray.dark3');\n }\n\n &--active {\n border: 0.5px solid v-bind('theme.colors.primary.main');\n background-color: v-bind('theme.colors.primary.light5');\n\n :deep(*) {\n color: v-bind('theme.colors.primary.main');\n }\n }\n}\n</style>\n","import { camelCase } from 'es-toolkit';\n\ntype ToCamelCase<S extends string> = S extends `${infer First}-${infer Rest}`\n ? `${First}${ToCamelCase<Capitalize<Rest>>}`\n : S;\n\nexport const toCamelCase = <S extends string>(input: S): ToCamelCase<S> => camelCase(input) as ToCamelCase<S>;\n","import type { ComputedRef, Ref } from 'vue';\nimport type { TButtonProps } from './TButton.types';\nimport { css } from '@emotion/css';\nimport { darken, lighten } from 'polished';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { toCamelCase } from '../../utils';\n\nexport const useStyles = (color:\n | Ref<NonNullable<TButtonProps['color']>>\n | ComputedRef<NonNullable<TButtonProps['color']>>) => {\n const theme = useTheme();\n const variant = computed(() => toCamelCase(color.value));\n const hover = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.toku\n : darken(0.15, theme.value.colors[variant.value])));\n const main = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.main\n : theme.value.colors[variant.value]));\n const light1 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light1\n : lighten(0.15, theme.value.colors[variant.value])));\n const light2 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light2\n : lighten(0.2, theme.value.colors[variant.value])));\n const light3 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light3\n : lighten(0.25, theme.value.colors[variant.value])));\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n },\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '0.625rem',\n fontWeight: theme.value.typography.fontWeight.semibold,\n '&--primary': {\n borderRadius: theme.value.button.borderRadius,\n backgroundColor: main.value,\n boxShadow: '0px 0px 8px 0px rgba(0, 0, 0, 0.1)',\n border: `1px solid ${main.value}`,\n color: theme.value.typography.buttonTextColor,\n '&:hover:not(&:disabled)': {\n backgroundColor: hover.value,\n color: theme.value.typography.buttonTextColor,\n },\n '&:focus': {\n border: `1px solid ${light1.value}`,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n backgroundColor: theme.value.colors.gray.light2,\n color: theme.value.colors.gray.medium2,\n },\n },\n '&--secondary': {\n borderRadius: theme.value.button.borderRadius,\n backgroundColor: '#FFFFFF',\n border: `1px solid ${main.value}`,\n boxShadow: '0px 0px 8px 0px rgba(0, 0, 0, 0.1)',\n color: main.value,\n '&:hover:not(&:disabled)': {\n backgroundColor: light3.value,\n },\n '&:focus': {\n border: `1px solid ${light1.value}`,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n backgroundColor: theme.value.colors.gray.light2,\n color: theme.value.colors.gray.medium2,\n },\n },\n '&--tertiary': {\n background: 'none',\n border: 'none',\n margin: 0,\n padding: 0,\n color: main.value,\n '&:hover:not(&:disabled)': {\n color: light2.value,\n },\n '&:focus': {\n color: light1.value,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n color: theme.value.colors.gray.medium1,\n },\n },\n '&--large': {\n height: '3rem',\n padding: '0.5rem 1rem',\n lineHeight: '1.5rem',\n fontSize: '1.125rem',\n },\n '&--medium': {\n height: '2.5rem',\n padding: '0.5rem 1rem',\n lineHeight: '1.375rem',\n fontSize: '1rem',\n },\n '&--small': {\n height: '2rem',\n padding: '0.5rem 0.75rem',\n lineHeight: '1.25rem',\n fontSize: '0.875rem',\n },\n '&--full-width': {\n width: '100%',\n },\n '&--loading, &--loading:disabled, &--loading:hover:not(&:disabled), &--loading:focus':\n {\n color: 'transparent',\n position: 'relative',\n },\n '&__spinner': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n '&--primary &__spinner': {\n color: '#fff',\n },\n '&--loading:disabled &__spinner': {\n color: theme.value.colors.gray.medium1,\n },\n '&--tertiary:disabled &__spinner': {\n color: theme.value.colors.gray.medium1,\n },\n '&--secondary &__spinner, &--tertiary &__spinner': {\n color: main.value,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TButtonProps } from './TButton.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TButton.styles';\n\nconst defaultProps = {\n variant: 'primary',\n size: 'medium',\n type: 'button',\n color: 'primary',\n};\n\nexport const TButton = defineComponent({\n name: 'TButton',\n props: {\n variant: String as PropType<TButtonProps['variant']>,\n size: String as PropType<TButtonProps['size']>,\n disabled: Boolean as PropType<TButtonProps['disabled']>,\n leftIcon: String as PropType<TButtonProps['leftIcon']>,\n rightIcon: String as PropType<TButtonProps['rightIcon']>,\n type: String as PropType<TButtonProps['type']>,\n fullWidth: Boolean as PropType<TButtonProps['fullWidth']>,\n loading: Boolean as PropType<TButtonProps['loading']>,\n color: String as PropType<TButtonProps['color']>,\n },\n emits: ['click'],\n setup(_props, { attrs, slots, emit }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const color = computed(() => props.value.color);\n const baseClass = useStyles(color);\n const theme = useTheme();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.size}`,\n {\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n [`${baseClass.value}--loading`]: props.value.loading,\n },\n ]);\n\n const handleClick = () => {\n if (!props.value.loading) {\n emit('click');\n }\n };\n\n return () => (\n <button\n class={classes.value}\n type={props.value.type}\n disabled={props.value.disabled}\n onClick={handleClick}\n {...attrs}\n >\n {props.value.leftIcon && (\n <Icon icon={`${theme.value.iconSet}:${props.value.leftIcon}`} />\n )}\n {slots.default?.()}\n {props.value.rightIcon && (\n <Icon icon={`${theme.value.iconSet}:${props.value.rightIcon}`} />\n )}\n {props.value.loading && (\n <Icon\n class={`${baseClass.value}__spinner`}\n icon=\"svg-spinners:90-ring-with-bg\"\n />\n )}\n </button>\n );\n },\n});\n","import type { PropType } from 'vue';\nimport type { TIconProps } from './TIcon.types';\nimport { Icon } from '@iconify/vue';\nimport { get, merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nconst defaultProps = {\n color: '#000',\n size: 'medium',\n variant: 'outline',\n};\n\nexport const TIcon = defineComponent({\n name: 'TIcon',\n props: {\n icon: {\n type: String as PropType<TIconProps['icon']>,\n required: true,\n },\n color: String as PropType<TIconProps['color']>,\n size: String as PropType<TIconProps['size']>,\n variant: String as PropType<TIconProps['variant']>,\n },\n setup(_props, { attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const theme = useTheme();\n const color = computed(() => (get(theme.value.colors, props.value.color) as string)\n || props.value.color);\n const icon = computed(() => `${theme.value.iconSet}:${props.value.icon}${\n props.value.variant === 'solid' ? '-solid' : ''\n }`);\n\n const sizeMapping = {\n miniature: '6px',\n 'extra-small': '10px',\n small: '16px',\n medium: '19px',\n large: '24px',\n 'extra-large': '28px',\n huge: '44px',\n };\n const size = computed(() => sizeMapping[props.value.size]);\n\n return () => (\n <Icon\n icon={icon.value}\n color={color.value}\n height={size.value}\n width={size.value}\n {...attrs}\n />\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { rgba } from 'polished';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n borderRadius: '0.25rem',\n padding: '0.125rem 0.5rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n position: 'relative',\n '&--large': { maxWidth: '9.5rem', width: '100%' },\n '&--medium': { maxWidth: '8rem', width: '100%' },\n '&--small': {\n maxWidth: '6.813rem',\n width: '100%',\n padding: '0rem 0.5rem',\n },\n '&--miniature': {\n width: '1rem',\n height: '1rem',\n },\n '&__text': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n fontSize: '1rem',\n },\n '&__text--large': {\n fontSize: '0.75rem',\n lineHeight: '1.125rem',\n },\n '&__text--medium': {\n fontSize: '0.75rem',\n lineHeight: '1.125rem',\n },\n '&__text--small': {\n fontSize: '0.625rem',\n lineHeight: '1rem',\n },\n '&__status-indicator': {\n width: '0.625rem',\n height: '0.625rem',\n position: 'absolute',\n borderRadius: '0.125rem',\n },\n '&--default': {\n color: theme.value.colors.gray.medium1,\n background: theme.value.colors.gray.light3,\n },\n '&--default > &__text': {\n color: theme.value.colors.gray.medium1,\n },\n '&--default > &__status-indicator': {\n background: theme.value.colors.gray.medium1,\n },\n '&--success': {\n color: theme.value.colors.success,\n background: rgba(theme.value.colors.success, 0.1),\n },\n '&--success > &__text': {\n color: theme.value.colors.success,\n },\n '&--success > &__status-indicator': {\n background: theme.value.colors.success,\n },\n '&--in-process': {\n background: rgba(theme.value.colors.inProcess, 0.1),\n },\n '&--in-process > &__text': {\n color: theme.value.colors.inProcessDark,\n },\n '&--in-process > &__status-indicator': {\n background: theme.value.colors.inProcessDark,\n },\n '&--pending': {\n background: rgba(theme.value.colors.info, 0.1),\n },\n '&--pending > &__text': {\n color: theme.value.colors.info,\n },\n '&--pending > &__status-indicator': {\n background: theme.value.colors.info,\n },\n '&--toku': {\n background: rgba(theme.value.colors.primary.light4, 1),\n },\n '&--toku > &__text': {\n color: theme.value.colors.primary.main,\n },\n '&--toku > &__status-indicator': {\n background: theme.value.colors.primary.main,\n },\n '&--error': {\n color: theme.value.colors.error,\n background: rgba(theme.value.colors.error, 0.1),\n },\n '&--error > &__text': {\n color: theme.value.colors.error,\n },\n '&--error > &__status-indicator': {\n background: theme.value.colors.error,\n },\n }));\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TTagProps } from './TTag.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TTag.styles';\n\nconst defaultProps = {\n size: 'medium',\n variant: 'default',\n};\n\nexport const TTag = defineComponent({\n name: 'TTag',\n props: {\n size: String as PropType<TTagProps['size']>,\n variant: String as PropType<TTagProps['variant']>,\n },\n setup(_props, { slots }) {\n const props = computed(() => merge({}, defaultProps, _props));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.size}`,\n ]);\n\n return () => (\n <div class={classes.value}>\n {\n props.value.size === 'miniature'\n ? (<div data-testid=\"t-tag-status-indicator\" class={`${baseClass.value}__status-indicator`} />\n )\n : (\n <p data-testid=\"t-tag-text\" class={`${baseClass.value}__text ${baseClass.value}__text--${props.value.size}`}>\n {slots.default?.()}\n </p>\n )\n }\n </div>\n );\n },\n});\n","<script lang=\"ts\">\nimport type { TTagProps } from '../TTag';\n\n/**\n * Props for the `TCardButton` component.\n *\n * `TCardButton` is a card-shaped button for choosing an option from a list\n * (e.g. a payment method). It is action-agnostic: it renders a native\n * `<button>` and exposes no custom events — attach a plain `@click` (it falls\n * through to the root) and handle navigation, tracking or selection on the\n * consumer side.\n *\n * Height is content-driven: with only `title` the card compacts naturally.\n */\nexport interface TCardButtonProps {\n /** Main label. Replace its rendering via the `title` slot when richer content is needed (e.g. a logo image). */\n title: string;\n /** Supporting text under the title. */\n subtitle?: string;\n /**\n * Text for the `TTag` badge. Position depends on `borderless`: floating on\n * the top-right corner on the default bordered card, inline before the\n * trailing icon when borderless.\n */\n tag?: string;\n /**\n * Variant forwarded to the internal `TTag`.\n * @defaultValue 'default'\n */\n tagVariant?: TTagProps['variant'];\n /** Removes the card border. Also decides the `tag` position (see `tag`). */\n borderless?: boolean;\n /** Disables the underlying `<button>`, blocking clicks natively. */\n disabled?: boolean;\n}\n\n/**\n * Slots exposed by `TCardButton`. `icon` and `image` are mutually exclusive\n * treatments of the 36×36 media square; when both are provided, `icon` wins.\n */\nexport interface TCardButtonSlots {\n /** Rendered 16×16, centered inside the media square over its subtle background. Has priority over `image`. */\n icon?: () => unknown;\n /** Fills the whole media square, clipped by its border radius. Ignored when `icon` is provided. */\n image?: () => unknown;\n /** Overrides the `title` prop rendering. */\n title?: () => unknown;\n /** Overrides the internally rendered `TTag`. */\n tag?: () => unknown;\n /** Overrides the default chevron-right icon on the right edge. */\n trailing?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { TIcon } from '../TIcon';\nimport { TTag } from '../TTag';\n\ndefineOptions({ name: 'TCardButton' });\n\nconst {\n title,\n subtitle,\n tag,\n tagVariant = 'default',\n borderless,\n disabled,\n} = defineProps<TCardButtonProps>();\n\ndefineSlots<TCardButtonSlots>();\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"t-card-button\"\n :data-borderless=\"borderless || undefined\"\n :disabled=\"disabled\"\n >\n <div\n v-if=\"$slots.icon || $slots.image\"\n class=\"t-card-button__media\"\n :data-media=\"$slots.icon ? 'icon' : 'image'\"\n >\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n <slot v-else name=\"image\" />\n </div>\n\n <!-- TODO: replace the <p> elements with TTypography once it consumes semantic tokens (--color-text-*, --font-*) -->\n <div class=\"t-card-button__text\">\n <slot name=\"title\">\n <p class=\"t-card-button__title\">\n {{ title }}\n </p>\n </slot>\n <p v-if=\"subtitle\" class=\"t-card-button__subtitle\">\n {{ subtitle }}\n </p>\n </div>\n\n <span\n v-if=\"tag || $slots.tag\"\n class=\"t-card-button__tag\"\n >\n <slot name=\"tag\">\n <TTag size=\"small\" :variant=\"tagVariant\">{{ tag }}</TTag>\n </slot>\n </span>\n\n <span class=\"t-card-button__trailing\">\n <slot name=\"trailing\">\n <TIcon icon=\"chevron-right\" size=\"small\" color=\"currentColor\" />\n </slot>\n </span>\n </button>\n</template>\n\n<style scoped lang=\"scss\">\n.t-card-button {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--gap-group);\n width: 100%;\n padding: var(--inset-group);\n border: var(--border-width-1) solid var(--neutral-border);\n border-radius: var(--radius-surface);\n background-color: var(--color-base-white);\n font-family: var(--font-family-base);\n text-align: left;\n cursor: pointer;\n transition: background-color var(--motion-duration-fast) ease;\n\n &[data-borderless] {\n border-color: transparent;\n }\n\n &:hover:not(:disabled) {\n background-color: var(--neutral-base);\n }\n\n &:focus-visible {\n outline: var(--focus-ring-width) solid var(--primary-border);\n outline-offset: var(--focus-ring-offset);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: var(--opacity-50);\n }\n\n &__media {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n\n // The --space-* scale has no 36px step.\n width: 36px;\n height: 36px;\n overflow: hidden;\n border-radius: var(--radius-control);\n background-color: var(--color-base-background);\n color: var(--neutral-text-contrast);\n\n :deep(svg),\n :deep(img) {\n width: var(--space-16);\n height: var(--space-16);\n }\n\n &[data-media='image'] {\n background-color: transparent;\n\n :deep(svg),\n :deep(img) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n }\n }\n\n &__text {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n }\n\n &__title {\n margin: 0;\n font-size: var(--font-b3-font-size);\n line-height: var(--font-b3-line-height);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text-contrast);\n }\n\n &__subtitle {\n margin: 0;\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n font-weight: var(--font-weight-regular);\n color: var(--neutral-text);\n }\n\n &__tag {\n display: flex;\n flex-shrink: 0;\n position: absolute;\n top: 0;\n right: 0;\n overflow: hidden;\n border-radius: 0 calc(var(--radius-surface) - var(--border-width-1)) 0 var(--radius-2);\n }\n\n &[data-borderless] &__tag {\n position: static;\n overflow: visible;\n border-radius: 0;\n }\n\n &__trailing {\n display: flex;\n flex-shrink: 0;\n color: var(--neutral-text);\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { TTagProps } from '../TTag';\n\n/**\n * Props for the `TCardButton` component.\n *\n * `TCardButton` is a card-shaped button for choosing an option from a list\n * (e.g. a payment method). It is action-agnostic: it renders a native\n * `<button>` and exposes no custom events — attach a plain `@click` (it falls\n * through to the root) and handle navigation, tracking or selection on the\n * consumer side.\n *\n * Height is content-driven: with only `title` the card compacts naturally.\n */\nexport interface TCardButtonProps {\n /** Main label. Replace its rendering via the `title` slot when richer content is needed (e.g. a logo image). */\n title: string;\n /** Supporting text under the title. */\n subtitle?: string;\n /**\n * Text for the `TTag` badge. Position depends on `borderless`: floating on\n * the top-right corner on the default bordered card, inline before the\n * trailing icon when borderless.\n */\n tag?: string;\n /**\n * Variant forwarded to the internal `TTag`.\n * @defaultValue 'default'\n */\n tagVariant?: TTagProps['variant'];\n /** Removes the card border. Also decides the `tag` position (see `tag`). */\n borderless?: boolean;\n /** Disables the underlying `<button>`, blocking clicks natively. */\n disabled?: boolean;\n}\n\n/**\n * Slots exposed by `TCardButton`. `icon` and `image` are mutually exclusive\n * treatments of the 36×36 media square; when both are provided, `icon` wins.\n */\nexport interface TCardButtonSlots {\n /** Rendered 16×16, centered inside the media square over its subtle background. Has priority over `image`. */\n icon?: () => unknown;\n /** Fills the whole media square, clipped by its border radius. Ignored when `icon` is provided. */\n image?: () => unknown;\n /** Overrides the `title` prop rendering. */\n title?: () => unknown;\n /** Overrides the internally rendered `TTag`. */\n tag?: () => unknown;\n /** Overrides the default chevron-right icon on the right edge. */\n trailing?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { TIcon } from '../TIcon';\nimport { TTag } from '../TTag';\n\ndefineOptions({ name: 'TCardButton' });\n\nconst {\n title,\n subtitle,\n tag,\n tagVariant = 'default',\n borderless,\n disabled,\n} = defineProps<TCardButtonProps>();\n\ndefineSlots<TCardButtonSlots>();\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"t-card-button\"\n :data-borderless=\"borderless || undefined\"\n :disabled=\"disabled\"\n >\n <div\n v-if=\"$slots.icon || $slots.image\"\n class=\"t-card-button__media\"\n :data-media=\"$slots.icon ? 'icon' : 'image'\"\n >\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n <slot v-else name=\"image\" />\n </div>\n\n <!-- TODO: replace the <p> elements with TTypography once it consumes semantic tokens (--color-text-*, --font-*) -->\n <div class=\"t-card-button__text\">\n <slot name=\"title\">\n <p class=\"t-card-button__title\">\n {{ title }}\n </p>\n </slot>\n <p v-if=\"subtitle\" class=\"t-card-button__subtitle\">\n {{ subtitle }}\n </p>\n </div>\n\n <span\n v-if=\"tag || $slots.tag\"\n class=\"t-card-button__tag\"\n >\n <slot name=\"tag\">\n <TTag size=\"small\" :variant=\"tagVariant\">{{ tag }}</TTag>\n </slot>\n </span>\n\n <span class=\"t-card-button__trailing\">\n <slot name=\"trailing\">\n <TIcon icon=\"chevron-right\" size=\"small\" color=\"currentColor\" />\n </slot>\n </span>\n </button>\n</template>\n\n<style scoped lang=\"scss\">\n.t-card-button {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--gap-group);\n width: 100%;\n padding: var(--inset-group);\n border: var(--border-width-1) solid var(--neutral-border);\n border-radius: var(--radius-surface);\n background-color: var(--color-base-white);\n font-family: var(--font-family-base);\n text-align: left;\n cursor: pointer;\n transition: background-color var(--motion-duration-fast) ease;\n\n &[data-borderless] {\n border-color: transparent;\n }\n\n &:hover:not(:disabled) {\n background-color: var(--neutral-base);\n }\n\n &:focus-visible {\n outline: var(--focus-ring-width) solid var(--primary-border);\n outline-offset: var(--focus-ring-offset);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: var(--opacity-50);\n }\n\n &__media {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n\n // The --space-* scale has no 36px step.\n width: 36px;\n height: 36px;\n overflow: hidden;\n border-radius: var(--radius-control);\n background-color: var(--color-base-background);\n color: var(--neutral-text-contrast);\n\n :deep(svg),\n :deep(img) {\n width: var(--space-16);\n height: var(--space-16);\n }\n\n &[data-media='image'] {\n background-color: transparent;\n\n :deep(svg),\n :deep(img) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n }\n }\n\n &__text {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n }\n\n &__title {\n margin: 0;\n font-size: var(--font-b3-font-size);\n line-height: var(--font-b3-line-height);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text-contrast);\n }\n\n &__subtitle {\n margin: 0;\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n font-weight: var(--font-weight-regular);\n color: var(--neutral-text);\n }\n\n &__tag {\n display: flex;\n flex-shrink: 0;\n position: absolute;\n top: 0;\n right: 0;\n overflow: hidden;\n border-radius: 0 calc(var(--radius-surface) - var(--border-width-1)) 0 var(--radius-2);\n }\n\n &[data-borderless] &__tag {\n position: static;\n overflow: visible;\n border-radius: 0;\n }\n\n &__trailing {\n display: flex;\n flex-shrink: 0;\n color: var(--neutral-text);\n }\n}\n</style>\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n const disabledColor = theme.value.colors.gray.light1;\n const checkSVG = (stroke: string, size: 'small' | 'large') => {\n switch (size) {\n case 'large':\n return encodeURIComponent(`<svg width=\"10\" height=\"9.5\" viewBox=\"0 0 10 9.5\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0.833344 3.79167L3.75001 6.70834L9.16668 1.29167\" stroke=\"${stroke}\" stroke-width=\"1.66667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>`);\n case 'small':\n return encodeURIComponent(`<svg width=\"10\" height=\"8.25\" viewBox=\"0 0 10 8.25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1.6 2.82999L3.98 5.20999L8.4 0.789993\" stroke=\"${stroke}\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>`);\n default:\n return '';\n }\n };\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color: theme.value.typography.color,\n fontFamily: theme.value.typography.fontFamily,\n fontWeight: '400',\n fontStyle: 'normal',\n whiteSpace: 'nowrap',\n cursor: 'pointer',\n },\n '&__wrapper': {\n display: 'inline-flex',\n justifyContent: 'center',\n alignItems: 'center',\n gap: '0.1875rem',\n },\n '&__input': {\n appearance: 'none',\n WebkitAppearance: 'none',\n font: 'inherit',\n color: theme.value.colors.primary.main,\n border: `1px solid ${theme.value.colors.primary.main}`,\n borderRadius: '0.125rem',\n display: 'grid',\n placeContent: 'center',\n cursor: 'pointer',\n transform: 'translateY(-0.5px)',\n '&:hover:enabled': {\n backgroundColor: theme.value.colors.primary.light3,\n },\n '&:focus': {\n border: `1px solid ${theme.value.colors.primary.light1}`,\n },\n '&::before': {\n display: 'grid',\n placeContent: 'center',\n borderRadius: '0.125rem',\n transform: 'scale(0)',\n transition: '120ms transform ease-in-out',\n backgroundColor: 'CanvasText',\n },\n '&:checked::before': {\n transform: 'scale(1)',\n },\n '&:checked:disabled::before': {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n },\n '&:disabled': {\n color: disabledColor,\n border: `1px solid ${disabledColor}`,\n cursor: 'not-allowed',\n },\n },\n '&--disabled': {\n color: disabledColor,\n cursor: 'not-allowed',\n },\n '&--large': {\n lineHeight: '1.375rem',\n fontSize: '1rem',\n '&__input': {\n width: '1.125rem',\n height: '1.125rem',\n '&::before': {\n boxShadow: `inset 0 0 0 1.125rem ${theme.value.colors.primary.main}`,\n content: `url('data:image/svg+xml,${checkSVG('white', 'large')}')`,\n width: '1.125rem',\n height: '1.125rem',\n },\n '&:checked:disabled::before': {\n content: `url('data:image/svg+xml,${checkSVG(\n disabledColor,\n 'large',\n )}')`,\n },\n },\n },\n '&--small': {\n lineHeight: '1.25rem',\n fontSize: '0.875rem',\n '&__input': {\n width: '1rem',\n height: '1rem',\n '&::before': {\n boxShadow: `inset 0 0 0 1rem ${theme.value.colors.primary.main}`,\n content: `url('data:image/svg+xml,${checkSVG('white', 'small')}')`,\n width: '1rem',\n height: '1rem',\n },\n '&:checked:disabled::before': {\n content: `url('data:image/svg+xml,${checkSVG(\n disabledColor,\n 'small',\n )}')`,\n },\n },\n },\n }));\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TCheckboxProps } from './TCheckbox.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport { useStyles } from './TCheckbox.styles';\n\nconst generateUniqueId = () => `checkbox-${\n Math.random()\n .toString(36)\n .substring(2, 9)\n}-${Date.now()}`;\n\nconst defaultProps = {\n size: 'large',\n value: false,\n};\n\nexport const TCheckbox = defineComponent({\n name: 'TCheckbox',\n props: {\n labelPosition: String as PropType<TCheckboxProps['labelPosition']>,\n size: String as PropType<TCheckboxProps['size']>,\n value: Boolean as PropType<TCheckboxProps['value']>,\n modelValue: Boolean as PropType<TCheckboxProps['modelValue']>,\n disabled: Boolean as PropType<TCheckboxProps['disabled']>,\n id: String as PropType<TCheckboxProps['id']>,\n },\n emits: ['input', 'change', 'update:modelValue'],\n setup(_props, { attrs, slots, emit }) {\n const localId = generateUniqueId();\n\n const props = computed(() => merge({}, defaultProps, _props, attrs, {\n id: _props.id ?? (attrs as any).id ?? localId,\n }));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n ]);\n const textClass = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n { [`${baseClass.value}--disabled`]: props.value.disabled },\n ]);\n\n const isChecked = ref(props.value.modelValue || props.value.value);\n watch([() => props.value.modelValue, () => props.value.value], () => {\n isChecked.value = props.value.modelValue || props.value.value;\n });\n\n const handleClick = () => {\n emit('update:modelValue', !isChecked.value);\n emit('input', !isChecked.value);\n emit('change', !isChecked.value);\n isChecked.value = !isChecked.value;\n };\n return () => (\n <div class={classes.value.map((class_) => `${class_}__wrapper`)}>\n {slots.default?.() && props.value.labelPosition === 'left' && (\n <label for={props.value.id} class={textClass.value}>\n {slots.default()}\n </label>\n )}\n <input\n id={props.value.id}\n type=\"checkbox\"\n class={classes.value.map((class_) => `${class_}__input`)}\n checked={isChecked.value}\n disabled={props.value.disabled}\n onClick={handleClick}\n {...attrs}\n />\n {slots.default?.() && props.value.labelPosition === 'right' && (\n <label for={props.value.id} class={textClass.value}>\n {slots.default()}\n </label>\n )}\n </div>\n );\n },\n});\n","import type { Ref } from 'vue';\nimport { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = (menuHeight: Ref<number>) => {\n const theme = useTheme();\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n position: 'relative',\n width: 'fit-content',\n '&__menu': {\n position: 'absolute',\n display: 'none',\n padding: '0.625rem',\n background: '#fff',\n boxShadow: '0px 6px 30px 0px rgba(0, 0, 0, 0.10)',\n borderBottomLeftRadius: '0.5rem',\n borderBottomRightRadius: '0.5rem',\n marginTop: '0.5rem',\n zIndex: 20,\n },\n '&--active &__menu': {\n display: 'block',\n },\n '&--center &__menu': {\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n },\n '&--top-center &__menu': {\n borderRadius: '0.5rem',\n },\n '&--top-left &__menu': {\n right: '100%',\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n borderBottomRightRadius: '0',\n },\n '&--top-right &__menu': {\n left: '100%',\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n borderBottomLeftRadius: '0',\n },\n '&--left &__menu': {\n right: '100%',\n borderTopLeftRadius: '0.5rem',\n },\n '&--right &__menu': {\n left: '100%',\n borderTopRightRadius: '0.5rem',\n },\n '&--middle-left &__menu': {\n left: '-100%',\n },\n '&--middle-right &__menu': {\n right: 'unset',\n },\n '&--small &__menu': {\n width: '240px',\n },\n '&--large &__menu': {\n width: '340px',\n },\n '&--full-width &__menu': {\n width: '100%',\n },\n '[class*=\"--center\"][class*=\"--small\"]:not(&--full-width) &__menu': {\n left: 'calc(-120px + 50%)',\n },\n '[class*=\"--center\"][class*=\"--large\"]:not(&--full-width) &__menu': {\n left: 'calc(-170px + 50%)',\n },\n '[class*=\"--top\"] &__menu': {\n top: `calc(-${menuHeight.value}px - 16px)`,\n },\n '[class*=\"--top-center\"][class*=\"--small\"]:not(&--full-width) &__menu': {\n left: 'calc(-120px + 50%)',\n },\n '[class*=\"--top-center\"][class*=\"--large\"]:not(&--full-width) &__menu': {\n left: 'calc(-170px + 50%)',\n },\n '&__divider': {\n width: '100%',\n height: '1px',\n background: theme.value.colors.gray.light3,\n marginBlock: '0.5rem',\n },\n }));\n\n return baseClass;\n};\n\nexport const useMenuStyles = () => {\n const menuStyles = computed(() => css({\n position: 'fixed',\n display: 'none',\n padding: '0.625rem',\n background: '#fff',\n boxShadow: '0px 6px 30px 0px rgba(0, 0, 0, 0.10)',\n borderBottomLeftRadius: '0.5rem',\n borderBottomRightRadius: '0.5rem',\n zIndex: 30,\n\n '&--open': {\n display: 'block',\n },\n\n '&--small': {\n width: '240px',\n },\n\n '&--large': {\n width: '340px',\n },\n\n '&--center': {\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n },\n\n '&--left': {\n borderTopLeftRadius: '0.5rem',\n },\n\n '&--right': {\n borderTopRightRadius: '0.5rem',\n },\n\n '&--top-center': {\n borderRadius: '0.5rem',\n },\n\n '&--top-left': {\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n borderBottomRightRadius: '0',\n },\n\n '&--top-right': {\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n borderBottomLeftRadius: '0',\n },\n }));\n\n return menuStyles;\n};\n","import type { RendererElement, RendererNode, VNode } from 'vue';\n\ntype Slot = VNode<\n RendererNode,\n RendererElement,\n {\n [key: string]: any;\n }\n>;\n\nexport const getVisibleElements = (slots: Slot[]): Slot[] => {\n const results: Slot[] = [];\n slots?.forEach((slot) => {\n // @ts-expect-error type is missing some properties\n if (slot.type?.name === 'TDropdownItem') {\n results.push(slot);\n } else if (Array.isArray(slot.children)) {\n results.push(...getVisibleElements(slot.children as Slot[]));\n }\n });\n\n return results;\n};\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { TDropdownProps } from './TDropdown.types';\nimport { merge } from 'es-toolkit/compat';\nimport {\n computed,\n defineComponent,\n onMounted,\n onUnmounted,\n ref,\n Teleport,\n watch,\n} from 'vue';\nimport { useMenuStyles, useStyles } from './TDropdown.styles';\nimport { getVisibleElements } from './TDropdown.utils';\n\nconst defaultProps = {\n size: 'small',\n position: 'center',\n};\n\nexport const TDropdown = defineComponent({\n name: 'TDropdown',\n props: {\n open: Boolean as PropType<TDropdownProps['open']>,\n size: String as PropType<TDropdownProps['size']>,\n position: String as PropType<TDropdownProps['position']>,\n fullWidth: Boolean as PropType<TDropdownProps['fullWidth']>,\n attachToBody: Boolean as PropType<TDropdownProps['attachToBody']>,\n },\n emits: ['cancel'],\n setup(_props, { slots, attrs, emit }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const container = ref<Nullable<HTMLDivElement>>(null);\n const trigger = ref<Nullable<HTMLDivElement>>(null);\n const menu = ref<Nullable<HTMLDivElement>>(null);\n const menuPosition = ref<{\n top: number;\n left: number;\n }>({ top: 0, left: 0 });\n\n const calculateMenuPosition = () => {\n if (!trigger.value || !menu.value) {\n return;\n }\n const rect = trigger.value.getBoundingClientRect();\n\n const baseTop = rect.bottom + 8;\n const baseLeft = rect.left;\n\n let top = baseTop;\n let left = baseLeft;\n\n switch (props.value.position) {\n case 'center':\n left\n = baseLeft\n - menu.value.clientWidth / 2\n + trigger.value.clientWidth / 2;\n break;\n case 'right':\n left = baseLeft + trigger.value.clientWidth;\n break;\n case 'left':\n left = baseLeft - menu.value.clientWidth;\n break;\n case 'middle-left':\n left = baseLeft - menu.value.clientWidth + trigger.value.clientWidth;\n break;\n case 'middle-right':\n left = baseLeft;\n break;\n case 'top-center':\n top = rect.top - menu.value.clientHeight - 8;\n left\n = baseLeft\n - menu.value.clientWidth / 2\n + trigger.value.clientWidth / 2;\n break;\n case 'top-left':\n top = rect.top - menu.value.clientHeight - 8;\n left = baseLeft - menu.value.clientWidth;\n break;\n case 'top-right':\n top = rect.top - menu.value.clientHeight - 8;\n left = baseLeft + trigger.value.clientWidth;\n break;\n }\n\n menuPosition.value = { top, left };\n };\n\n const menuBaseClass = useMenuStyles();\n const menuClasses = computed(() => [\n menuBaseClass.value,\n `${menuBaseClass.value}--${props.value.size}`,\n `${menuBaseClass.value}--${props.value.position}`,\n {\n [`${menuBaseClass.value}--open`]: props.value.open,\n },\n ]);\n const menuStyles = computed(() => ({\n top: `${menuPosition.value.top}px`,\n left: `${menuPosition.value.left}px`,\n width: props.value.fullWidth\n ? `${trigger.value?.clientWidth}px`\n : undefined,\n }));\n\n const menuHeight = computed(() => menu.value?.clientHeight ?? 0);\n const baseClass = useStyles(menuHeight);\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n `${baseClass.value}--${props.value.position}`,\n {\n [`${baseClass.value}--active`]: props.value.open,\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n },\n ]);\n\n const handleClickOutside = (event: Event) => {\n if (\n props.value.open\n && container.value\n && !container.value.contains(event.target as Node)\n && !(event.target as Element)?.closest(`.${menuBaseClass.value}`)\n ) {\n emit('cancel');\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n emit('cancel');\n }\n };\n\n const handleMenuInitialFocus = (event: KeyboardEvent) => {\n if (props.value.attachToBody && event.key === 'Tab') {\n event.preventDefault();\n const firstMenuItem = menu.value?.querySelector('[role=\"menuitem\"]');\n if (firstMenuItem) {\n (firstMenuItem as HTMLElement).focus();\n }\n }\n };\n\n if (props.value.attachToBody) {\n watch(\n [\n () => props.value.open,\n () => props.value.position,\n () => props.value.size,\n trigger,\n menu,\n ],\n () => {\n calculateMenuPosition();\n if (props.value.open && menu.value) {\n trigger.value?.addEventListener('keydown', handleMenuInitialFocus);\n } else {\n trigger.value?.removeEventListener(\n 'keydown',\n handleMenuInitialFocus,\n );\n }\n },\n { immediate: true },\n );\n }\n\n onMounted(() => {\n if (props.value.attachToBody) {\n window.addEventListener('scroll', calculateMenuPosition);\n window.addEventListener('resize', calculateMenuPosition);\n }\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('keydown', handleKeydown);\n });\n\n onUnmounted(() => {\n if (props.value.attachToBody) {\n window.removeEventListener('scroll', calculateMenuPosition);\n window.removeEventListener('resize', calculateMenuPosition);\n }\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('keydown', handleKeydown);\n });\n\n const visibleElements = computed(() => getVisibleElements(slots.default?.() || []));\n\n const renderMenu = () => (\n <div\n ref={menu}\n class={\n props.value.attachToBody\n ? menuClasses.value\n : `${baseClass.value}__menu`\n }\n style={props.value.attachToBody ? menuStyles.value : undefined}\n role=\"menu\"\n tabindex={props.value.attachToBody ? 0 : undefined}\n >\n {visibleElements.value.map((element, index, array) => (\n <div key={index}>\n {element}\n {index < array.length - 1 && (\n <div class={`${baseClass.value}__divider`} />\n )}\n </div>\n ))}\n </div>\n );\n\n return () => (\n <div ref={container} class={classes.value}>\n <div ref={trigger}>{slots.trigger?.()}</div>\n {props.value.open\n && (props.value.attachToBody\n ? (\n <Teleport to=\"body\">{renderMenu()}</Teleport>\n )\n : (\n renderMenu()\n ))}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n '*': {\n padding: 0,\n },\n background: '#fff',\n padding: '0.25rem 0.5rem',\n cursor: 'pointer',\n borderRadius: '0.25rem',\n fontFamily: theme.value.typography.fontFamily,\n fontSize: '0.875rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.25rem',\n color: theme.value.colors.gray.main,\n '&:not(&--disabled):hover': {\n background: theme.value.colors.gray.light3,\n },\n '&--disabled': {\n color: theme.value.colors.gray.light2,\n cursor: 'not-allowed',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TDropdownItemprops } from './TDropdown.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TDropdownItem.styles';\n\nexport const TDropdownItem = defineComponent({\n name: 'TDropdownItem',\n emits: ['click'],\n props: {\n disabled: Boolean as PropType<TDropdownItemprops['disabled']>,\n },\n setup(_props, { slots, emit, attrs }) {\n const props = computed(() => merge({}, _props, attrs));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n {\n [`${baseClass.value}--disabled`]: props.value.disabled,\n },\n ]);\n\n const handleClick = () => {\n if (!props.value.disabled) {\n emit('click');\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' && !props.value.disabled) {\n emit('click');\n event.preventDefault();\n }\n };\n\n return () => (\n <div\n class={classes.value}\n onClick={handleClick}\n role=\"menuitem\"\n tabindex={0}\n onKeydown={handleKeydown}\n aria-disabled={props.value.disabled}\n >\n {slots.default?.()}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n fontFamily: theme.value.typography.fontFamily,\n },\n '&__container': {\n gap: theme.value.spacing,\n display: 'flex',\n flexDirection: 'column',\n width: '358px',\n },\n '&__label': {\n color: theme.value.typography.color,\n display: 'block',\n fontSize: '13px',\n fontStyle: 'normal',\n fontWeight: 600,\n lineHeight: '20px',\n },\n '&__input-wrapper': {\n position: 'relative',\n },\n '&__input': {\n color: '#373737',\n display: 'flex',\n width: '100%',\n background: '#FFF',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderRadius: theme.value.input.borderRadius,\n padding: '6px 8px',\n gap: '8px',\n fontSize: '13px',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: '9px',\n '&::placeholder': {\n color: theme.value.colors.gray.medium2,\n },\n '&:hover': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&:focus': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&:disabled': {\n background: theme.value.colors.gray.light3,\n borderColor: theme.value.colors.gray.light3,\n },\n '&--left-icon': {\n paddingLeft: '32px',\n },\n '&--right-icon': {\n paddingRight: '32px',\n },\n },\n '&__icon': {\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n fontSize: '12px',\n '&--left': {\n left: '8px',\n },\n '&--right': {\n right: '8px',\n },\n },\n '&__helper-text': {\n fontSize: '12px',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: '18px',\n color: theme.value.colors.gray.medium1,\n },\n '&--error &__input, &error &__input:focus': {\n borderColor: theme.value.colors.error,\n },\n '&--error &__helper-text': {\n color: theme.value.colors.error,\n },\n '&--full-width': {\n width: '100%',\n },\n '&--multiline &__input': {\n height: '80px',\n overflow: 'auto',\n resize: 'none',\n },\n '&--multiline &__icon': {\n top: 0,\n transform: 'translateY(50%)',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { TTextInputProps } from './TTextInput.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TTextInput.styles';\n\nconst defaultProps = {\n type: 'text',\n};\n\nexport const TTextInput = defineComponent({\n name: 'TTextInput',\n emits: ['input', 'change', 'update:modelValue', 'focus', 'blur'],\n props: {\n error: Boolean as PropType<TTextInputProps['error']>,\n disabled: Boolean as PropType<TTextInputProps['disabled']>,\n leftIcon: String as PropType<TTextInputProps['leftIcon']>,\n rightIcon: String as PropType<TTextInputProps['rightIcon']>,\n label: String as PropType<TTextInputProps['label']>,\n placeholder: String as PropType<TTextInputProps['placeholder']>,\n helperText: String as PropType<TTextInputProps['helperText']>,\n value: [Number, String, Date] as PropType<TTextInputProps['value']>,\n modelValue: [Number, String, Date] as PropType<\n TTextInputProps['modelValue']\n >,\n fullWidth: Boolean as PropType<TTextInputProps['fullWidth']>,\n id: String as PropType<TTextInputProps['id']>,\n type: String as PropType<TTextInputProps['type']>,\n maxlength: [String, Number] as PropType<TTextInputProps['maxlength']>,\n min: [String, Number] as PropType<TTextInputProps['min']>,\n max: [String, Number] as PropType<TTextInputProps['max']>,\n step: [String, Number] as PropType<TTextInputProps['step']>,\n },\n setup(_props, { attrs, emit, slots, expose }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const baseClass = useStyles();\n const theme = useTheme();\n\n const internalValue = computed({\n get: () => (props.value.modelValue !== undefined\n ? props.value.modelValue\n : props.value.value),\n set: (newValue) => {\n emit('update:modelValue', newValue);\n emit('input', newValue);\n emit('change', newValue);\n },\n });\n\n const handleInput = (event: Event) => {\n internalValue.value = (event.target as HTMLInputElement).value;\n };\n\n const handleFocus = (event: Event) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: Event) => {\n emit('blur', event);\n };\n\n const input = ref<Nullable<HTMLInputElement>>(null);\n const focus = () => {\n input.value?.focus();\n };\n const blur = () => {\n input.value?.blur();\n };\n expose({ focus, blur });\n\n return () => (\n <div\n class={[\n baseClass.value,\n `${baseClass.value}__container`,\n {\n [`${baseClass.value}--error`]: props.value.error,\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n [`${baseClass.value}--multiline`]: props.value.multiline,\n },\n ]}\n >\n {slots.label?.()\n || (props.value.label && (\n <label class={[`${baseClass.value}__label`]} for={props.value.id}>\n {props.value.label}\n </label>\n ))}\n <div class={`${baseClass.value}__input-wrapper`}>\n {slots.leftIcon?.()\n || (props.value.leftIcon && (\n <Icon\n icon={`${theme.value.iconSet}:${props.value.leftIcon}`}\n class={[\n `${baseClass.value}__icon`,\n `${baseClass.value}__icon--left`,\n ]}\n />\n ))}\n <input\n {...attrs}\n id={props.value.id}\n type={props.value.multiline ? undefined : props.value.type}\n class={[\n `${baseClass.value}__input`,\n {\n [`${baseClass.value}__input--left-icon`]: slots.leftIcon?.() || props.value.leftIcon,\n [`${baseClass.value}__input--right-icon`]: slots.rightIcon?.() || props.value.rightIcon,\n },\n ]}\n placeholder={props.value.placeholder}\n value={internalValue.value}\n onInput={handleInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n disabled={props.value.disabled}\n maxlength={props.value.maxlength}\n min={props.value.min}\n max={props.value.max}\n ref={input}\n step={props.value.step}\n />\n {slots.rightIcon?.()\n || (props.value.rightIcon && (\n <Icon\n icon={`${theme.value.iconSet}:${props.value.rightIcon}`}\n class={[\n `${baseClass.value}__icon`,\n `${baseClass.value}__icon--right`,\n ]}\n />\n ))}\n </div>\n {slots.helperText?.()\n || (props.value.helperText && (\n <p class={`${baseClass.value}__helper-text`}>\n {props.value.helperText}\n </p>\n ))}\n </div>\n );\n },\n});\n","export const normalizeString = (str: string) => str\n .toLowerCase()\n .normalize('NFD')\n .replace(/\\p{Diacritic}/gu, '');\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { Option, TComboboxProps } from './TCombobox.types';\nimport {\n computed,\n defineComponent,\n onMounted,\n onUnmounted,\n ref,\n watch,\n} from 'vue';\nimport { TDropdown, TDropdownItem } from '../TDropdown';\nimport { TTextInput } from '../TTextInput';\nimport { normalizeString } from './TCombobox.utils';\n\nexport const TCombobox = defineComponent({\n name: 'TCombobox',\n emits: ['input', 'select', 'update:modelValue'],\n props: {\n modelValue: String as PropType<TComboboxProps['modelValue']>,\n options: {\n type: Array as PropType<TComboboxProps['options']>,\n required: true,\n },\n placeholder: {\n type: String as PropType<TComboboxProps['placeholder']>,\n default: '',\n },\n label: String as PropType<TComboboxProps['label']>,\n helperText: String as PropType<TComboboxProps['helperText']>,\n disabled: Boolean as PropType<TComboboxProps['disabled']>,\n },\n setup(props, { emit, expose }) {\n const text = ref(props.modelValue ?? '');\n const selectedOption = ref<Nullable<Option>>(null);\n const isDropdownOpen = ref(false);\n const container = ref<Nullable<HTMLDivElement>>(null);\n const textInputRef = ref<Nullable<HTMLInputElement>>(null);\n\n const isDisabled = computed(() => props.disabled);\n\n const openDropdown = () => {\n isDropdownOpen.value = true;\n };\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const unfocus = () => {\n textInputRef.value?.blur();\n };\n const resetTextValue = () => {\n if (selectedOption.value !== null) {\n text.value = selectedOption.value.label;\n } else {\n text.value = '';\n }\n };\n const resetSelectedOption = () => {\n selectedOption.value = null;\n };\n expose({ resetTextValue, resetSelectedOption });\n\n const handleFocus = () => {\n openDropdown();\n };\n const handleTextChange = (value: string) => {\n text.value = value;\n\n emit('input', value);\n };\n const handleClickOutside = (event: Event) => {\n if (!container.value) {\n return;\n }\n if (!isDropdownOpen.value) {\n return;\n }\n\n const isClickOutside = !container.value.contains(event.target as Node);\n if (isClickOutside) {\n closeDropdown();\n resetTextValue();\n unfocus();\n }\n };\n const handleSelection = (option: Option) => {\n text.value = option.label;\n selectedOption.value = option;\n\n emit('select', option.value);\n emit('update:modelValue', option.label);\n\n closeDropdown();\n };\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n closeDropdown();\n resetTextValue();\n unfocus();\n }\n };\n\n const filteredOptions = computed(() => {\n if (text.value === '') {\n return props.options;\n }\n\n return props.options.filter((option) => {\n const normalizedLabel = normalizeString(option.label);\n const normalizedFilterText = normalizeString(text.value);\n\n return normalizedLabel.includes(normalizedFilterText);\n });\n });\n\n onMounted(() => {\n document.addEventListener('click', handleClickOutside);\n container.value?.addEventListener('keydown', handleKeydown);\n });\n onUnmounted(() => {\n document.removeEventListener('click', handleClickOutside);\n container.value?.removeEventListener('keydown', handleKeydown);\n });\n\n const DropdownTrigger = () => (\n <TTextInput\n ref={textInputRef}\n modelValue={text.value}\n label={props.label}\n helperText={props.helperText}\n placeholder={props.placeholder}\n onFocus={handleFocus}\n onChange={handleTextChange}\n disabled={isDisabled.value}\n />\n );\n\n watch(\n () => props.modelValue,\n () => {\n text.value = props.modelValue ?? '';\n },\n );\n\n return () => (\n <div\n ref={container}\n role=\"combobox\"\n aria-controls=\"menu\"\n aria-expanded={isDropdownOpen.value}\n >\n <TDropdown open={isDropdownOpen.value} full-width>\n {{\n trigger: () => <DropdownTrigger />,\n default: () => filteredOptions.value.map((option) => (\n <TDropdownItem onClick={() => handleSelection(option)}>\n {option.label}\n </TDropdownItem>\n )),\n }}\n </TDropdown>\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, & > *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n },\n opacity: 0,\n borderRadius: '10px',\n overflow: 'hidden',\n border: `1px solid ${theme.value.colors.gray.light3}`,\n background: '#fff',\n boxShadow: '4px 4px 30px 0px rgba(0, 0, 0, 0.10)',\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n transition: 'opacity 0.3s ease-in-out',\n '&--non-blocking': {\n zIndex: 50,\n },\n '&--small': {\n width: '22.5rem',\n },\n '&--medium': {\n width: '35rem',\n },\n '&--large': {\n width: '40rem',\n },\n '&--extra-large': {\n width: '56rem',\n },\n '&--active': {\n opacity: 1,\n },\n '&:focus': {\n outline: 'none',\n },\n '&::backdrop': {\n background: 'rgba(226, 226, 226, 0.80)',\n transition: 'all 0.3s ease-in-out',\n },\n '> *': {\n width: '100%',\n paddingInline: '2.5rem',\n },\n '&__header': {\n paddingBlock: '1rem',\n background: '#fff',\n },\n '&__close-button': {\n cursor: 'pointer',\n border: 'none',\n background: 'transparent',\n },\n '&--featured > &__header': {\n background: theme.value.colors.gray.light3,\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n '&__body': {\n paddingTop: '1.5rem',\n paddingBottom: '1.5rem',\n background: '#fff',\n overflow: 'auto',\n },\n '&__footer': {\n paddingTop: '1rem',\n paddingBottom: '1.5rem',\n background: '#fff',\n display: 'flex',\n justifyContent: 'flex-end',\n gap: '1rem',\n },\n '&__backdrop': {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: 'rgba(226, 226, 226, 0.80)',\n zIndex: 45,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TModalProps } from './TModal.types';\nimport { merge } from 'es-toolkit/compat';\nimport {\n computed,\n defineComponent,\n onMounted,\n onUnmounted,\n ref,\n watch,\n} from 'vue';\nimport { TIcon } from '../TIcon';\nimport { useStyles } from './TModal.styles';\n\nconst defaultProps = {\n size: 'medium',\n};\n\nexport const TModal = defineComponent({\n name: 'TModal',\n props: {\n open: Boolean as PropType<TModalProps['open']>,\n featured: Boolean as PropType<TModalProps['featured']>,\n size: String as PropType<TModalProps['size']>,\n destroyOnClose: Boolean as PropType<TModalProps['destroyOnClose']>,\n nonBlocking: Boolean as PropType<TModalProps['nonBlocking']>,\n },\n emits: ['close', 'cancel'],\n setup(_props, { slots, attrs, emit, expose }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const isActive = ref(props.value.open);\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n {\n [`${baseClass.value}--featured`]: props.value.featured,\n [`${baseClass.value}--active`]: isActive.value,\n [`${baseClass.value}--non-blocking`]: props.value.nonBlocking,\n },\n ]);\n\n const modal = ref<HTMLDialogElement | null>(null);\n const showModal = () => {\n isActive.value = true;\n if (props.value.nonBlocking) {\n modal.value?.show();\n } else {\n modal.value?.showModal();\n }\n };\n const close = () => {\n isActive.value = false;\n modal.value?.close();\n };\n watch(\n [() => props.value.open, modal],\n () => {\n if (modal.value && props.value.open) {\n showModal();\n } else {\n close();\n }\n },\n {\n immediate: true,\n },\n );\n\n const handleCancel = (event: Event) => {\n if (props.value.open) {\n event.preventDefault();\n } else {\n isActive.value = false;\n }\n emit('cancel');\n };\n onMounted(() => {\n if (modal.value) {\n modal.value.addEventListener('cancel', handleCancel);\n }\n });\n onUnmounted(() => {\n if (modal.value) {\n modal.value.removeEventListener('cancel', handleCancel);\n }\n });\n\n const handleClose = () => {\n if (!props.value.open) {\n close();\n }\n emit('close');\n };\n\n const handleClickOutside = (event: Event) => {\n if (event.target === modal.value) {\n if (!props.value.open) {\n close();\n }\n emit('close');\n }\n };\n\n expose({\n showModal,\n close,\n });\n\n const trigger = ref(0);\n watch(isActive, () => {\n if (!isActive.value && props.value.destroyOnClose) {\n trigger.value += 1;\n }\n });\n\n const ModalComponent = () => (\n <dialog\n ref={modal}\n class={classes.value}\n aria-labelledby=\"modal-header\"\n aria-describedby=\"modal-body\"\n aria-modal=\"true\"\n onClick={handleClickOutside}\n key={trigger.value}\n >\n {slots.header && (\n <div id=\"modal-header\" class={`${baseClass.value}__header`}>\n {slots.header()}\n {props.value.featured && (\n <button\n class={`${baseClass.value}__close-button`}\n onClick={handleClose}\n aria-label=\"Close\"\n >\n <TIcon icon=\"x-mark\" />\n </button>\n )}\n </div>\n )}\n {(slots.body || slots.default) && (\n <div id=\"modal-body\" class={`${baseClass.value}__body`}>\n {(slots.body ?? slots.default)?.()}\n </div>\n )}\n {slots.footer && (\n <div class={`${baseClass.value}__footer`}>{slots.footer()}</div>\n )}\n </dialog>\n );\n\n if (props.value.nonBlocking) {\n return () => (\n <div>\n {props.value.nonBlocking && isActive.value && (\n <div class={`${baseClass.value}__backdrop`} />\n )}\n <ModalComponent />\n </div>\n );\n }\n return () => <ModalComponent />;\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = (color: string) => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color,\n fontFamily: theme.value.typography.fontFamily,\n '&--h1': {\n fontSize: '3.25rem',\n linehHeight: '3.75rem',\n },\n '&--h2': {\n fontSize: '3rem',\n lineHeight: '3.5rem',\n },\n '&--h3': {\n fontSize: '2.5rem',\n lineHeight: '3rem',\n },\n '&--h4': {\n fontSize: '2rem',\n lineHeight: '2.5rem',\n },\n '&--s1': {\n fontSize: '1.75rem',\n lineHeight: '2.25rem',\n },\n '&--s2': {\n fontSize: '1.5rem',\n lineHeight: '2rem',\n },\n '&--s3': {\n fontSize: '1.125rem',\n lineHeight: '1.625rem',\n },\n '&--s4': {\n fontSize: '1rem',\n lineHeight: '1.5rem',\n },\n '&--b0': {\n fontSize: '1.25rem',\n lineHeight: '1.625rem',\n },\n '&--b1': {\n fontSize: '1.125rem',\n lineHeight: '1.5rem',\n },\n '&--b2': {\n fontSize: '1rem',\n lineHeight: '1.375rem',\n },\n '&--b3': {\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n },\n '&--b4': {\n fontSize: '0.75rem',\n lineHeight: '1.125rem',\n },\n '&--b5': {\n fontSize: '0.625rem',\n lineHeight: '1rem',\n },\n '&--b6': {\n fontSize: '0.5rem',\n lineHeight: '0.875rem',\n },\n '&--bold': {\n fontWeight: theme.value.typography.fontWeight.bold,\n },\n\n '&--semibold': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n },\n '&--medium': {\n fontWeight: theme.value.typography.fontWeight.medium,\n },\n\n '&--regular': {\n fontWeight: theme.value.typography.fontWeight.regular,\n },\n '&--normal': {\n fontStyle: 'normal',\n },\n '&--italic': {\n fontStyle: 'italic',\n },\n }));\n\n return baseClass;\n};\n","export const defaultMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n s1: 'h5',\n s2: 'h5',\n s3: 'h6',\n s4: 'h6',\n b0: 'p',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n b4: 'p',\n b5: 'p',\n b6: 'p',\n};\n","import type { VNode } from 'vue';\nimport { h, Text } from 'vue';\n\nconst ALLOWED_SCHEMES = ['http:', 'https:', 'mailto:', 'tel:', 'ftp:'] as const;\n\nconst isValidUrlScheme = (url: string): boolean => ALLOWED_SCHEMES.some((scheme) => url\n .trim()\n .toLowerCase()\n .startsWith(scheme));\n\ninterface MarkdownMatch {\n start: number;\n end: number;\n tag: string;\n content: string;\n url?: string;\n}\n\nconst findAllMatches = (text: string): MarkdownMatch[] => {\n const patterns: { regex: RegExp; tag: string; isLink?: boolean }[] = [\n { regex: /\\*\\*([\\s\\S]+?)\\*\\*/g, tag: 'strong' },\n { regex: /~~([\\s\\S]+?)~~/g, tag: 's' },\n { regex: /\\[([^\\]]+)\\]\\(([^)]+)\\)/g, tag: 'a', isLink: true },\n ];\n\n const matches: MarkdownMatch[] = [];\n\n for (const { regex, tag, isLink } of patterns) {\n for (const match of text.matchAll(regex)) {\n matches.push({\n start: match.index ?? 0,\n end: (match.index ?? 0) + match[0].length,\n tag,\n content: match[1],\n url: isLink ? match[2]?.trim() : undefined,\n });\n }\n }\n\n return matches;\n};\n\nconst filterNonOverlapping = (matches: MarkdownMatch[]): MarkdownMatch[] => {\n const sorted = [...matches].sort((a, b) => a.start - b.start || b.end - a.end);\n const result: MarkdownMatch[] = [];\n let lastEnd = 0;\n\n for (const match of sorted) {\n if (match.start >= lastEnd) {\n result.push(match);\n lastEnd = match.end;\n }\n }\n\n return result;\n};\n\nconst parseMarkdownString = (text: string): (string | VNode)[] => {\n if (!text) {\n return [text];\n }\n\n const allMatches = findAllMatches(text);\n if (allMatches.length === 0) {\n return [text];\n }\n\n const matches = filterNonOverlapping(allMatches);\n const result: (string | VNode)[] = [];\n let pos = 0;\n\n for (const match of matches) {\n if (match.start > pos) {\n result.push(text.substring(pos, match.start));\n }\n\n const parsedContent = parseMarkdownString(match.content);\n\n if (match.tag === 'a') {\n if (match.url && isValidUrlScheme(match.url)) {\n result.push(h('a', { href: match.url, target: '_blank', rel: 'noopener noreferrer' }, parsedContent));\n } else {\n result.push(...parsedContent);\n }\n } else {\n result.push(h(match.tag, parsedContent));\n }\n\n pos = match.end;\n }\n\n if (pos < text.length) {\n result.push(text.substring(pos));\n }\n\n return result.length > 0 ? result : [text];\n};\n\nconst isVNodeLike = (value: unknown): value is VNode => value !== null\n && typeof value === 'object'\n && 'type' in value\n && (value as any).type !== undefined;\n\nconst parseMarkdownInVNode = (node: VNode): VNode | (string | VNode)[] => {\n if (node.type === Text) {\n const text = typeof node.children === 'string' ? node.children : '';\n return parseMarkdownString(text);\n }\n\n if (!node.children) {\n return node;\n }\n\n let processedChildren: (string | VNode)[];\n\n if (Array.isArray(node.children)) {\n processedChildren = node.children.flatMap((child) => {\n if (typeof child === 'string') {\n return parseMarkdownString(child);\n }\n if (isVNodeLike(child)) {\n const result = parseMarkdownInVNode(child);\n return Array.isArray(result) ? result : [result];\n }\n return [];\n });\n } else if (typeof node.children === 'string') {\n processedChildren = parseMarkdownString(node.children);\n } else if (isVNodeLike(node.children)) {\n const result = parseMarkdownInVNode(node.children);\n processedChildren = Array.isArray(result) ? result : [result];\n } else {\n return node;\n }\n\n return h(node.type as any, { ...node.props }, processedChildren);\n};\n\nexport const parseAllMarkdown = (content: string | VNode | (string | VNode)[]): (string | VNode)[] => {\n if (typeof content === 'string') {\n return parseMarkdownString(content);\n }\n\n if (Array.isArray(content)) {\n return content.flatMap((item) => {\n if (typeof item === 'string') {\n return parseMarkdownString(item);\n }\n if (isVNodeLike(item)) {\n const result = parseMarkdownInVNode(item);\n return Array.isArray(result) ? result : [result];\n }\n return [item];\n });\n }\n\n if (isVNodeLike(content)) {\n const result = parseMarkdownInVNode(content);\n return Array.isArray(result) ? result : [result];\n }\n\n return [content];\n};\n","import type { PropType } from 'vue';\nimport type { TTypographyProps } from './TTypography.types';\nimport { get, merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, h } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TTypography.styles';\nimport { defaultMapping } from './TTypography.utils';\nimport { parseAllMarkdown } from './utils/markdown/parseAllMarkdown';\n\nconst defaultProps = {\n fontStyle: 'normal',\n fontWeight: 'regular',\n variant: 'b0',\n color: '#373737',\n};\n\nexport const TTypography = defineComponent({\n name: 'TTypography',\n props: {\n fontStyle: String as PropType<TTypographyProps['fontStyle']>,\n fontWeight: String as PropType<TTypographyProps['fontWeight']>,\n variant: String as PropType<TTypographyProps['variant']>,\n as: String as PropType<TTypographyProps['as']>,\n color: String as PropType<TTypographyProps['color']>,\n // `default: undefined` keeps the three states apart: a declared Boolean prop would arrive as\n // `false` when omitted and silence the theme for every consumer that never passes it.\n parseMarkdown: { type: Boolean as PropType<TTypographyProps['parseMarkdown']>, default: undefined },\n },\n setup(_props, { attrs, slots }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const theme = useTheme();\n const color = computed(() => (get(theme.value.colors, props.value.color) as string)\n || theme.value.typography.color);\n const baseClass = useStyles(color.value);\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.fontWeight}`,\n `${baseClass.value}--${props.value.fontStyle}`,\n ]);\n\n const tag = computed(() => props.value.as || defaultMapping[props.value.variant]);\n\n // `??`, not `||`: an explicit `false` has to win over a theme that turns markdown on, which is\n // the whole point of the prop — content that is data, not copy, must never be parsed.\n const parseMarkdown = computed(() => props.value.parseMarkdown ?? theme.value.parseMarkdown);\n\n return () => {\n const slotContent = slots.default?.();\n if (!slotContent) {\n return h(tag.value, { class: classes.value });\n }\n\n if (!parseMarkdown.value) {\n return h(tag.value, { class: classes.value }, slotContent);\n }\n\n const processedContent = parseAllMarkdown(slotContent);\n return h(tag.value, { class: classes.value }, processedContent);\n };\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\n\nexport const useStyles = () => {\n const baseClass = computed(() => css({\n '& > [class$=\"__body\"]': {\n paddingBlock: 0,\n },\n '&__body': {\n display: 'flex',\n alignItems: 'center',\n gap: '2.5rem',\n },\n '&__body-text': {\n flex: 1,\n },\n '&__body-icon': {\n aspectRatio: '1 / 1',\n width: '3.5rem',\n height: 'auto',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TDialogProps } from './TDialog.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, h } from 'vue';\nimport { toCamelCase } from '../../utils';\nimport { TButton } from '../TButton';\nimport { TIcon } from '../TIcon';\nimport { TModal } from '../TModal';\nimport { TTypography } from '../TTypography';\nimport { useStyles } from './TDialog.styles';\n\nconst defaultProps = {\n cancelText: 'Cancel',\n confirmText: 'OK',\n};\n\nexport const TDialog = defineComponent({\n name: 'TDialog',\n components: {\n TTypography,\n TModal,\n TButton,\n TIcon,\n },\n props: {\n title: {\n type: String as PropType<TDialogProps['title']>,\n required: true,\n },\n message: {\n type: String as PropType<TDialogProps['message']>,\n required: true,\n },\n color: String as PropType<TDialogProps['color']>,\n icon: String as PropType<TDialogProps['icon']>,\n cancellable: Boolean as PropType<TDialogProps['cancellable']>,\n cancelText: String as PropType<TDialogProps['cancelText']>,\n confirmText: String as PropType<TDialogProps['confirmText']>,\n size: String as PropType<TDialogProps['size']>,\n },\n emits: ['confirm', 'cancel', 'close'],\n setup(_props, { emit }) {\n const props = computed(() => merge({}, defaultProps, _props));\n\n const baseClass = useStyles();\n\n const iconColor = computed(() => {\n if (props.value.color) {\n return props.value.color === 'primary'\n ? 'primary.main'\n : toCamelCase(props.value.color);\n }\n return undefined;\n });\n\n return () => h(\n TModal,\n {\n onClose: () => props.value.cancellable && emit('close'),\n onCancel: () => props.value.cancellable && emit('cancel'),\n onConfirm: () => emit('confirm'),\n class: baseClass.value,\n open: true,\n size: props.value.size,\n },\n {\n header: () => h(\n TTypography,\n { variant: 's2', fontWeight: 'semibold' },\n () => props.value.title,\n ),\n default: () => h('div', { class: `${baseClass.value}__body` }, [\n props.value.icon\n ? h(TIcon, {\n class: `${baseClass.value}__body-icon`,\n variant: 'solid',\n color: iconColor.value,\n icon: props.value.icon,\n })\n : undefined,\n h(TTypography, {\n class: `${baseClass.value}__body-text`,\n variant: 'b1',\n innerHTML: props.value.message,\n }),\n ]),\n footer: () => [\n props.value.cancellable\n ? h(\n TButton,\n {\n onClick: () => emit('cancel'),\n color: props.value.color,\n variant: 'secondary',\n },\n () => props.value.cancelText,\n )\n : undefined,\n h(\n TButton,\n {\n onClick: () => emit('confirm'),\n color: props.value.color,\n },\n () => props.value.confirmText,\n ),\n ],\n },\n );\n },\n});\n","import { computed, useAttrs } from 'vue';\n\nexport const useForwardedAttrs = () => {\n const LAYOUT_ATTRS = new Set(['class', 'style']);\n const isLayout = ([key]: [string, unknown]) => LAYOUT_ATTRS.has(key);\n const isListener = ([key]: [string, unknown]) => /^on[A-Z]/.test(key);\n\n const attrs = useAttrs();\n const entries = computed(() => Object.entries(attrs).filter(([key]) => key !== 'data-state'));\n\n const wrapperAttrs = computed(() => Object.fromEntries(entries.value.filter(isLayout)));\n const listenerAttrs = computed(() => Object.fromEntries(entries.value.filter(isListener)));\n const staticAttrs = computed(() => Object.fromEntries(entries.value.filter((e) => !isLayout(e) && !isListener(e))));\n const controlAttrs = computed(() => Object.fromEntries(entries.value.filter((e) => !isLayout(e))));\n\n return { wrapperAttrs, controlAttrs, staticAttrs, listenerAttrs };\n};\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Reason emitted with the `'error'` event when an uploaded file fails internal\n * validation against the `accept` extension list or `maxSizeBytes` size cap.\n *\n * - `'bad-format'`: the file's extension is not in the `accept` list.\n * - `'too-large'`: the file's size exceeds `maxSizeBytes`.\n */\nexport type TFileUploadErrorReason = 'bad-format' | 'too-large';\n\n/**\n * Props for the `TFileUpload` component.\n *\n * `TFileUpload` is a single-file upload control with three visual states\n * (empty / loading / loaded) and built-in validation against an allow-list of\n * extensions and an optional maximum size in bytes. The selected `File` (or\n * `null`) is exposed via `v-model`; validation failures emit `'error'`\n * **instead of** updating the model.\n *\n * All user-facing strings are passed in as props so the consumer owns i18n;\n * the component does not import a translation function.\n */\nexport interface TFileUploadProps {\n /**\n * Label shown above the upload box (e.g. `\"Adjuntar archivo\"`).\n * When omitted, the label slot/element is not rendered.\n */\n label?: string;\n /**\n * Call-to-action text rendered inside the box while no file is attached\n * (e.g. `\"Subir archivo\"`).\n * @defaultValue 'Subir archivo'\n */\n ctaText?: string;\n /**\n * Text rendered inside the box while `loading` is `true`\n * (e.g. `\"Cargando archivo\"`).\n * @defaultValue 'Cargando archivo'\n */\n loadingText?: string;\n /**\n * Accessible label for the remove button shown in the loaded state.\n * @defaultValue 'Quitar archivo'\n */\n removeLabel?: string;\n /**\n * Hint displayed beneath the box (bottom-left) listing accepted formats.\n * Hidden in the loaded state.\n */\n formatsHint?: string;\n /**\n * Hint displayed beneath the box (bottom-right) describing the size limit.\n * Hidden in the loaded state.\n */\n maxSizeHint?: string;\n /**\n * Accepted file extensions without the leading dot (e.g. `['csv', 'pdf']`).\n * Used to build the native `accept` attribute and to validate the selected\n * file. When omitted, no extension validation runs.\n */\n accept?: string[];\n /**\n * Maximum file size in bytes. Files larger than this emit\n * `'error'` with reason `'too-large'` and the model is not updated.\n * When omitted, no size validation runs.\n */\n maxSizeBytes?: number;\n /**\n * Controlled loading flag. When `true` the box renders the loading visual\n * and the underlying `<input type=\"file\">` is disabled so the user cannot\n * pick another file mid-upload.\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * Optional id forwarded to the underlying `<input type=\"file\">`. When\n * omitted a stable auto-generated id is used.\n */\n id?: string;\n /**\n * Form field name forwarded to the underlying `<input type=\"file\">`.\n * Required for native form submission (the file is sent under this key).\n */\n name?: string;\n /**\n * Marks the input as required for native HTML5 form validation.\n * @defaultValue false\n */\n required?: boolean;\n /**\n * Disables the picker. The native `<input>` is disabled and the box\n * renders in a non-interactive visual state.\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * `id` of the `<form>` this input belongs to. Use when the component\n * lives outside the target form in the DOM.\n */\n form?: string;\n /**\n * Element the outer wrapper renders as. Useful for semantic nesting\n * (e.g. `'li'` inside a `<ul>`).\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\n/**\n * Events emitted by `TFileUpload`.\n */\nexport interface TFileUploadEmits {\n /**\n * Fired when the selected file fails internal validation. The model is\n * **not** updated in this case — consumers can surface the reason as they\n * wish.\n */\n error: [reason: TFileUploadErrorReason];\n}\n\n/**\n * Slots exposed by `TFileUpload`. Each slot defaults to rendering its\n * matching text prop, so most consumers will not need them; provide a slot\n * only when richer content (icons, formatting) is required.\n */\nexport interface TFileUploadSlots {\n /** Overrides the `label` prop. */\n label: () => unknown;\n /** Overrides the `ctaText` prop in the empty state. */\n cta: () => unknown;\n /** Overrides the `loadingText` prop in the loading state. */\n loading: () => unknown;\n /** Overrides the filename rendering in the loaded state. */\n file: (props: { file: File }) => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { Primitive } from 'reka-ui';\nimport { computed, onMounted, ref, useId, watch } from 'vue';\nimport { TIcon } from '../TIcon';\nimport { TTypography } from '../TTypography';\n\ndefineOptions({\n name: 'TFileUpload',\n inheritAttrs: false,\n});\n\nconst {\n ctaText = 'Subir archivo',\n loadingText = 'Cargando archivo',\n removeLabel = 'Quitar archivo',\n label,\n formatsHint,\n maxSizeHint,\n accept,\n maxSizeBytes,\n loading,\n id,\n name,\n required,\n disabled,\n form,\n as = 'div',\n} = defineProps<TFileUploadProps>();\n\nconst emit = defineEmits<TFileUploadEmits>();\ndefineSlots<TFileUploadSlots>();\n\nconst model = defineModel<File | null>({ default: null });\n\nconst inputRef = ref<HTMLInputElement | null>(null);\nconst generatedId = useId();\nconst inputId = computed(() => id ?? generatedId);\n\nconst { wrapperAttrs, staticAttrs, listenerAttrs } = useForwardedAttrs();\n\nconst state = computed<'empty' | 'loading' | 'loaded'>(() => {\n if (loading) {\n return 'loading';\n }\n if (model.value) {\n return 'loaded';\n }\n return 'empty';\n});\n\nconst acceptAttribute = computed(() => {\n if (!accept || accept.length === 0) {\n return undefined;\n }\n return accept.map((ext) => `.${ext}`).join(',');\n});\n\nconst showHints = computed(() => state.value === 'empty' && (Boolean(formatsHint) || Boolean(maxSizeHint)));\n\nconst syncInputToModel = () => {\n const input = inputRef.value;\n if (!input) {\n return;\n }\n const file = model.value;\n const currentFile = input.files?.[0] ?? null;\n if (file === currentFile) {\n return;\n }\n if (!file) {\n input.value = '';\n return;\n }\n try {\n const dt = new DataTransfer();\n dt.items.add(file);\n input.files = dt.files;\n } catch {}\n};\n\nconst handleFileChange = () => {\n const input = inputRef.value;\n if (!input) {\n return;\n }\n const file = input.files?.[0];\n if (!file) {\n return;\n }\n\n if (accept?.length) {\n const filename = file.name.toLowerCase();\n const allowed = accept.some((ext) => filename.endsWith(`.${ext.toLowerCase()}`));\n if (!allowed) {\n syncInputToModel();\n emit('error', 'bad-format');\n return;\n }\n }\n\n if (maxSizeBytes !== undefined && file.size > maxSizeBytes) {\n syncInputToModel();\n emit('error', 'too-large');\n return;\n }\n\n model.value = file;\n};\n\nconst handleRemove = () => {\n if (disabled) {\n return;\n }\n model.value = null;\n};\n\nonMounted(syncInputToModel);\nwatch(model, syncInputToModel);\n\ndefineExpose({ inputRef });\n</script>\n\n<template>\n <Primitive\n v-bind=\"wrapperAttrs\"\n :as=\"as\"\n class=\"t-file-upload\"\n :data-state=\"state\"\n :data-disabled=\"disabled || undefined\"\n >\n <div v-if=\"label || $slots.label\" class=\"t-file-upload__label\">\n <slot name=\"label\">\n <TTypography variant=\"b3\" font-weight=\"semibold\">\n {{ label }}\n </TTypography>\n </slot>\n </div>\n\n <label\n v-if=\"state === 'empty'\"\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"empty\"\n :for=\"inputId\"\n >\n <TIcon icon=\"paper-clip\" size=\"small\" color=\"gray.main\" />\n <TTypography variant=\"b3\" class=\"t-file-upload__cta-text\">\n <slot name=\"cta\">{{ ctaText }}</slot>\n </TTypography>\n </label>\n\n <div\n v-else-if=\"state === 'loading'\"\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"loading\"\n >\n <TIcon icon=\"arrow-path\" size=\"small\" color=\"primary.main\" />\n <TTypography variant=\"b3\" class=\"t-file-upload__cta-text\" color=\"primary.main\">\n <slot name=\"loading\">\n {{ loadingText }}\n </slot>\n </TTypography>\n </div>\n\n <div\n v-else\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"loaded\"\n >\n <TIcon icon=\"document\" size=\"small\" color=\"primary.main\" />\n <div class=\"t-file-upload__filename\">\n <slot name=\"file\" :file=\"model as File\">\n <TTypography variant=\"b3\" color=\"primary.main\" class=\"t-file-upload__filename-text\">\n {{ (model as File).name }}\n </TTypography>\n </slot>\n </div>\n <button\n type=\"button\"\n class=\"t-file-upload__remove\"\n :aria-label=\"removeLabel\"\n :disabled=\"disabled\"\n @click=\"handleRemove\"\n >\n <TIcon icon=\"x-circle\" color=\"#FFFFFF\" :width=\"18\" :height=\"18\" />\n </button>\n </div>\n\n <input\n :id=\"inputId\"\n ref=\"inputRef\"\n v-bind=\"staticAttrs\"\n class=\"t-file-upload__input\"\n type=\"file\"\n title=\"\"\n :name=\"name\"\n :required=\"required\"\n :disabled=\"disabled || loading\"\n :form=\"form\"\n :accept=\"acceptAttribute\"\n @change=\"handleFileChange\"\n >\n\n <div v-if=\"showHints\" class=\"t-file-upload__hints\">\n <TTypography v-if=\"formatsHint\" variant=\"b4\" color=\"gray.medium1\">\n {{ formatsHint }}\n </TTypography>\n <span v-else />\n <TTypography v-if=\"maxSizeHint\" variant=\"b4\" color=\"gray.medium1\">\n {{ maxSizeHint }}\n </TTypography>\n </div>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n.t-file-upload {\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n width: 100%;\n\n &[data-disabled] &__box[data-state='empty'] {\n cursor: not-allowed;\n opacity: 0.5;\n\n &:hover {\n background-color: transparent;\n }\n }\n\n &[data-disabled] &__remove {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &:focus-within &__box[data-state='empty'] {\n border: 1px dashed var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n outline: none;\n }\n\n &__label {\n display: flex;\n }\n\n &__box {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--space-8);\n\n // The --space-* scale has no 20px step.\n padding: 20px var(--inset-group);\n border-radius: var(--radius-control);\n position: relative;\n transition: background-color 150ms ease, border-color 150ms ease;\n\n &[data-state='empty'] {\n border: 1px dashed var(--neutral-bg-hover);\n background-color: transparent;\n cursor: pointer;\n\n &:hover {\n background-color: var(--neutral-base);\n }\n }\n\n &[data-state='loading'] {\n border: 1px dashed var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n }\n\n &[data-state='loaded'] {\n border: 1px solid var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n padding: var(--inset-item) var(--inset-group);\n }\n }\n\n &__input {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n &__cta-text {\n text-decoration: underline;\n }\n\n &__filename {\n min-width: 0;\n overflow: hidden;\n }\n\n &__filename-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-decoration: underline;\n }\n\n &__remove {\n position: absolute;\n top: calc(-1 * var(--space-8));\n right: -2px;\n width: 18px;\n height: 18px;\n background: radial-gradient(\n circle,\n var(--primary-solid) 0,\n var(--primary-solid) 6px,\n transparent 7.5px\n );\n border: none;\n border-radius: var(--radius-full);\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n }\n\n &__hints {\n display: flex;\n justify-content: space-between;\n gap: var(--gap-group);\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Reason emitted with the `'error'` event when an uploaded file fails internal\n * validation against the `accept` extension list or `maxSizeBytes` size cap.\n *\n * - `'bad-format'`: the file's extension is not in the `accept` list.\n * - `'too-large'`: the file's size exceeds `maxSizeBytes`.\n */\nexport type TFileUploadErrorReason = 'bad-format' | 'too-large';\n\n/**\n * Props for the `TFileUpload` component.\n *\n * `TFileUpload` is a single-file upload control with three visual states\n * (empty / loading / loaded) and built-in validation against an allow-list of\n * extensions and an optional maximum size in bytes. The selected `File` (or\n * `null`) is exposed via `v-model`; validation failures emit `'error'`\n * **instead of** updating the model.\n *\n * All user-facing strings are passed in as props so the consumer owns i18n;\n * the component does not import a translation function.\n */\nexport interface TFileUploadProps {\n /**\n * Label shown above the upload box (e.g. `\"Adjuntar archivo\"`).\n * When omitted, the label slot/element is not rendered.\n */\n label?: string;\n /**\n * Call-to-action text rendered inside the box while no file is attached\n * (e.g. `\"Subir archivo\"`).\n * @defaultValue 'Subir archivo'\n */\n ctaText?: string;\n /**\n * Text rendered inside the box while `loading` is `true`\n * (e.g. `\"Cargando archivo\"`).\n * @defaultValue 'Cargando archivo'\n */\n loadingText?: string;\n /**\n * Accessible label for the remove button shown in the loaded state.\n * @defaultValue 'Quitar archivo'\n */\n removeLabel?: string;\n /**\n * Hint displayed beneath the box (bottom-left) listing accepted formats.\n * Hidden in the loaded state.\n */\n formatsHint?: string;\n /**\n * Hint displayed beneath the box (bottom-right) describing the size limit.\n * Hidden in the loaded state.\n */\n maxSizeHint?: string;\n /**\n * Accepted file extensions without the leading dot (e.g. `['csv', 'pdf']`).\n * Used to build the native `accept` attribute and to validate the selected\n * file. When omitted, no extension validation runs.\n */\n accept?: string[];\n /**\n * Maximum file size in bytes. Files larger than this emit\n * `'error'` with reason `'too-large'` and the model is not updated.\n * When omitted, no size validation runs.\n */\n maxSizeBytes?: number;\n /**\n * Controlled loading flag. When `true` the box renders the loading visual\n * and the underlying `<input type=\"file\">` is disabled so the user cannot\n * pick another file mid-upload.\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * Optional id forwarded to the underlying `<input type=\"file\">`. When\n * omitted a stable auto-generated id is used.\n */\n id?: string;\n /**\n * Form field name forwarded to the underlying `<input type=\"file\">`.\n * Required for native form submission (the file is sent under this key).\n */\n name?: string;\n /**\n * Marks the input as required for native HTML5 form validation.\n * @defaultValue false\n */\n required?: boolean;\n /**\n * Disables the picker. The native `<input>` is disabled and the box\n * renders in a non-interactive visual state.\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * `id` of the `<form>` this input belongs to. Use when the component\n * lives outside the target form in the DOM.\n */\n form?: string;\n /**\n * Element the outer wrapper renders as. Useful for semantic nesting\n * (e.g. `'li'` inside a `<ul>`).\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\n/**\n * Events emitted by `TFileUpload`.\n */\nexport interface TFileUploadEmits {\n /**\n * Fired when the selected file fails internal validation. The model is\n * **not** updated in this case — consumers can surface the reason as they\n * wish.\n */\n error: [reason: TFileUploadErrorReason];\n}\n\n/**\n * Slots exposed by `TFileUpload`. Each slot defaults to rendering its\n * matching text prop, so most consumers will not need them; provide a slot\n * only when richer content (icons, formatting) is required.\n */\nexport interface TFileUploadSlots {\n /** Overrides the `label` prop. */\n label: () => unknown;\n /** Overrides the `ctaText` prop in the empty state. */\n cta: () => unknown;\n /** Overrides the `loadingText` prop in the loading state. */\n loading: () => unknown;\n /** Overrides the filename rendering in the loaded state. */\n file: (props: { file: File }) => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { Primitive } from 'reka-ui';\nimport { computed, onMounted, ref, useId, watch } from 'vue';\nimport { TIcon } from '../TIcon';\nimport { TTypography } from '../TTypography';\n\ndefineOptions({\n name: 'TFileUpload',\n inheritAttrs: false,\n});\n\nconst {\n ctaText = 'Subir archivo',\n loadingText = 'Cargando archivo',\n removeLabel = 'Quitar archivo',\n label,\n formatsHint,\n maxSizeHint,\n accept,\n maxSizeBytes,\n loading,\n id,\n name,\n required,\n disabled,\n form,\n as = 'div',\n} = defineProps<TFileUploadProps>();\n\nconst emit = defineEmits<TFileUploadEmits>();\ndefineSlots<TFileUploadSlots>();\n\nconst model = defineModel<File | null>({ default: null });\n\nconst inputRef = ref<HTMLInputElement | null>(null);\nconst generatedId = useId();\nconst inputId = computed(() => id ?? generatedId);\n\nconst { wrapperAttrs, staticAttrs, listenerAttrs } = useForwardedAttrs();\n\nconst state = computed<'empty' | 'loading' | 'loaded'>(() => {\n if (loading) {\n return 'loading';\n }\n if (model.value) {\n return 'loaded';\n }\n return 'empty';\n});\n\nconst acceptAttribute = computed(() => {\n if (!accept || accept.length === 0) {\n return undefined;\n }\n return accept.map((ext) => `.${ext}`).join(',');\n});\n\nconst showHints = computed(() => state.value === 'empty' && (Boolean(formatsHint) || Boolean(maxSizeHint)));\n\nconst syncInputToModel = () => {\n const input = inputRef.value;\n if (!input) {\n return;\n }\n const file = model.value;\n const currentFile = input.files?.[0] ?? null;\n if (file === currentFile) {\n return;\n }\n if (!file) {\n input.value = '';\n return;\n }\n try {\n const dt = new DataTransfer();\n dt.items.add(file);\n input.files = dt.files;\n } catch {}\n};\n\nconst handleFileChange = () => {\n const input = inputRef.value;\n if (!input) {\n return;\n }\n const file = input.files?.[0];\n if (!file) {\n return;\n }\n\n if (accept?.length) {\n const filename = file.name.toLowerCase();\n const allowed = accept.some((ext) => filename.endsWith(`.${ext.toLowerCase()}`));\n if (!allowed) {\n syncInputToModel();\n emit('error', 'bad-format');\n return;\n }\n }\n\n if (maxSizeBytes !== undefined && file.size > maxSizeBytes) {\n syncInputToModel();\n emit('error', 'too-large');\n return;\n }\n\n model.value = file;\n};\n\nconst handleRemove = () => {\n if (disabled) {\n return;\n }\n model.value = null;\n};\n\nonMounted(syncInputToModel);\nwatch(model, syncInputToModel);\n\ndefineExpose({ inputRef });\n</script>\n\n<template>\n <Primitive\n v-bind=\"wrapperAttrs\"\n :as=\"as\"\n class=\"t-file-upload\"\n :data-state=\"state\"\n :data-disabled=\"disabled || undefined\"\n >\n <div v-if=\"label || $slots.label\" class=\"t-file-upload__label\">\n <slot name=\"label\">\n <TTypography variant=\"b3\" font-weight=\"semibold\">\n {{ label }}\n </TTypography>\n </slot>\n </div>\n\n <label\n v-if=\"state === 'empty'\"\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"empty\"\n :for=\"inputId\"\n >\n <TIcon icon=\"paper-clip\" size=\"small\" color=\"gray.main\" />\n <TTypography variant=\"b3\" class=\"t-file-upload__cta-text\">\n <slot name=\"cta\">{{ ctaText }}</slot>\n </TTypography>\n </label>\n\n <div\n v-else-if=\"state === 'loading'\"\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"loading\"\n >\n <TIcon icon=\"arrow-path\" size=\"small\" color=\"primary.main\" />\n <TTypography variant=\"b3\" class=\"t-file-upload__cta-text\" color=\"primary.main\">\n <slot name=\"loading\">\n {{ loadingText }}\n </slot>\n </TTypography>\n </div>\n\n <div\n v-else\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"loaded\"\n >\n <TIcon icon=\"document\" size=\"small\" color=\"primary.main\" />\n <div class=\"t-file-upload__filename\">\n <slot name=\"file\" :file=\"model as File\">\n <TTypography variant=\"b3\" color=\"primary.main\" class=\"t-file-upload__filename-text\">\n {{ (model as File).name }}\n </TTypography>\n </slot>\n </div>\n <button\n type=\"button\"\n class=\"t-file-upload__remove\"\n :aria-label=\"removeLabel\"\n :disabled=\"disabled\"\n @click=\"handleRemove\"\n >\n <TIcon icon=\"x-circle\" color=\"#FFFFFF\" :width=\"18\" :height=\"18\" />\n </button>\n </div>\n\n <input\n :id=\"inputId\"\n ref=\"inputRef\"\n v-bind=\"staticAttrs\"\n class=\"t-file-upload__input\"\n type=\"file\"\n title=\"\"\n :name=\"name\"\n :required=\"required\"\n :disabled=\"disabled || loading\"\n :form=\"form\"\n :accept=\"acceptAttribute\"\n @change=\"handleFileChange\"\n >\n\n <div v-if=\"showHints\" class=\"t-file-upload__hints\">\n <TTypography v-if=\"formatsHint\" variant=\"b4\" color=\"gray.medium1\">\n {{ formatsHint }}\n </TTypography>\n <span v-else />\n <TTypography v-if=\"maxSizeHint\" variant=\"b4\" color=\"gray.medium1\">\n {{ maxSizeHint }}\n </TTypography>\n </div>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n.t-file-upload {\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n width: 100%;\n\n &[data-disabled] &__box[data-state='empty'] {\n cursor: not-allowed;\n opacity: 0.5;\n\n &:hover {\n background-color: transparent;\n }\n }\n\n &[data-disabled] &__remove {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &:focus-within &__box[data-state='empty'] {\n border: 1px dashed var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n outline: none;\n }\n\n &__label {\n display: flex;\n }\n\n &__box {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--space-8);\n\n // The --space-* scale has no 20px step.\n padding: 20px var(--inset-group);\n border-radius: var(--radius-control);\n position: relative;\n transition: background-color 150ms ease, border-color 150ms ease;\n\n &[data-state='empty'] {\n border: 1px dashed var(--neutral-bg-hover);\n background-color: transparent;\n cursor: pointer;\n\n &:hover {\n background-color: var(--neutral-base);\n }\n }\n\n &[data-state='loading'] {\n border: 1px dashed var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n }\n\n &[data-state='loaded'] {\n border: 1px solid var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n padding: var(--inset-item) var(--inset-group);\n }\n }\n\n &__input {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n &__cta-text {\n text-decoration: underline;\n }\n\n &__filename {\n min-width: 0;\n overflow: hidden;\n }\n\n &__filename-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-decoration: underline;\n }\n\n &__remove {\n position: absolute;\n top: calc(-1 * var(--space-8));\n right: -2px;\n width: 18px;\n height: 18px;\n background: radial-gradient(\n circle,\n var(--primary-solid) 0,\n var(--primary-solid) 6px,\n transparent 7.5px\n );\n border: none;\n border-radius: var(--radius-full);\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n }\n\n &__hints {\n display: flex;\n justify-content: space-between;\n gap: var(--gap-group);\n }\n}\n</style>\n","import type { ComputedRef, Ref } from 'vue';\nimport type { TIconButtonProps } from './TIconButton.types';\nimport { css } from '@emotion/css';\nimport { darken, lighten } from 'polished';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { toCamelCase } from '../../utils';\n\nexport const useStyles = (color:\n | Ref<NonNullable<TIconButtonProps['color']>>\n | ComputedRef<NonNullable<TIconButtonProps['color']>>) => {\n const theme = useTheme();\n const variant = computed(() => toCamelCase(color.value));\n const hover = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.toku\n : darken(0.15, theme.value.colors[variant.value])));\n const main = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.main\n : theme.value.colors[variant.value]));\n const light1 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light1\n : lighten(0.15, theme.value.colors[variant.value])));\n const light2 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light2\n : lighten(0.2, theme.value.colors[variant.value])));\n const light3 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light3\n : lighten(0.25, theme.value.colors[variant.value])));\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n },\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'pointer',\n '&--primary': {\n borderRadius: theme.value.button.borderRadius,\n backgroundColor: main.value,\n boxShadow: '0px 0px 8px 0px rgba(0, 0, 0, 0.1)',\n border: `1px solid ${main.value}`,\n color: '#FFFFFF',\n '&:hover:not(&:disabled)': {\n backgroundColor: hover.value,\n },\n '&:focus': {\n border: `1px solid ${light1.value}`,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n backgroundColor: theme.value.colors.gray.light2,\n color: theme.value.colors.gray.medium2,\n },\n },\n '&--secondary': {\n borderRadius: theme.value.button.borderRadius,\n backgroundColor: '#FFFFFF',\n border: `1px solid ${main.value}`,\n boxShadow: '0px 0px 8px 0px rgba(0, 0, 0, 0.1)',\n color: main.value,\n '&:hover:not(&:disabled)': {\n backgroundColor: light3.value,\n },\n '&:focus': {\n border: `1px solid ${light1.value}`,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n backgroundColor: theme.value.colors.gray.light2,\n color: theme.value.colors.gray.medium2,\n },\n },\n '&--tertiary': {\n background: 'none',\n border: 'none',\n margin: 0,\n padding: 0,\n color: main.value,\n '&:hover:not(&:disabled)': {\n color: light2.value,\n },\n '&:focus': {\n color: light1.value,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n color: theme.value.colors.gray.medium1,\n },\n },\n '&--large': {\n height: '3rem',\n width: '3rem',\n lineHeight: '1.5rem',\n fontSize: '1.125rem',\n },\n '&--medium': {\n height: '2.5rem',\n width: '2.5rem',\n lineHeight: '1.375rem',\n fontSize: '1rem',\n },\n '&--small': {\n height: '2rem',\n width: '2rem',\n lineHeight: '1.25rem',\n fontSize: '0.875rem',\n },\n '&--rounded': {\n borderRadius: '50%',\n },\n }));\n\n const iconClass = computed(() => css({\n margin: 0,\n padding: 0,\n '&--large': {\n height: '1.25rem',\n },\n '&--medium': {\n height: '1.25rem',\n },\n '&--small': {\n height: '1rem',\n },\n }));\n\n return { baseClass, iconClass };\n};\n","import type { PropType } from 'vue';\nimport type { TIconButtonProps } from './TIconButton.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TIconButton.styles';\n\nconst defaultProps = {\n variant: 'primary',\n size: 'medium',\n icon: 'academic-cap',\n type: 'button',\n color: 'primary',\n};\n\nexport const TIconButton = defineComponent({\n name: 'TIconButton',\n props: {\n variant: String as PropType<TIconButtonProps['variant']>,\n size: String as PropType<TIconButtonProps['size']>,\n disabled: Boolean as PropType<TIconButtonProps['disabled']>,\n icon: String as PropType<TIconButtonProps['icon']>,\n type: String as PropType<TIconButtonProps['type']>,\n rounded: Boolean as PropType<TIconButtonProps['rounded']>,\n loading: Boolean as PropType<TIconButtonProps['loading']>,\n color: String as PropType<TIconButtonProps['color']>,\n },\n emits: ['click'],\n setup(_props, { attrs, emit }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const color = computed(() => props.value.color);\n const { baseClass, iconClass } = useStyles(color);\n\n const theme = useTheme();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.size}`,\n {\n [`${baseClass.value}--rounded`]: props.value.rounded,\n },\n ]);\n const iconClasses = computed(() => [\n iconClass.value,\n `${iconClass.value}--${props.value.variant}`,\n `${iconClass.value}--${props.value.size}`,\n {\n [`${baseClass.value}--loading`]: props.value.loading,\n },\n ]);\n\n const handleClick = () => {\n if (!props.value.loading) {\n emit('click');\n }\n };\n\n return () => (\n <button\n class={classes.value}\n type={props.value.type}\n disabled={props.value.disabled}\n onClick={handleClick}\n {...attrs}\n >\n {props.value.loading\n ? (\n <Icon\n class={`${baseClass.value}__spinner`}\n icon=\"svg-spinners:90-ring-with-bg\"\n />\n )\n : (\n <Icon\n icon={`${theme.value.iconSet}:${props.value.icon}`}\n class={iconClasses.value}\n />\n )}\n </button>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n const baseClass = computed(() => css({\n margin: 0,\n padding: 0,\n width: 'fit-content',\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '0.625rem',\n color: theme.value.colors.primary.main,\n '&:hover:not(&:disabled)': {\n color: theme.value.colors.primary.toku,\n },\n '&:focus': {\n color: theme.value.colors.primary.light1,\n },\n textDecoration: 'underline',\n fontWeight: 600,\n '&--large': {\n lineHeight: '1.5rem',\n fontSize: '1.125rem',\n },\n '&--medium': {\n lineHeight: '1.375rem',\n fontSize: '1rem',\n },\n '&--small': {\n lineHeight: '1.25rem',\n fontSize: '0.875rem',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TLinkProps } from './TLink.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TLink.styles';\n\nconst defaultProps = {\n variant: 'primary',\n size: 'medium',\n};\n\nexport const TLink = defineComponent({\n name: 'TButton',\n props: {\n variant: String as PropType<TLinkProps['variant']>,\n size: String as PropType<TLinkProps['size']>,\n href: String as PropType<TLinkProps['href']>,\n leftIcon: String as PropType<TLinkProps['leftIcon']>,\n rightIcon: String as PropType<TLinkProps['leftIcon']>,\n },\n setup(_props, { attrs, slots }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const baseClass = useStyles();\n const theme = useTheme();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.size}`,\n ]);\n return () => (\n <a class={classes.value} href={props.value.href} {...attrs}>\n {props.value.leftIcon\n ? (\n <Icon icon={`${theme.value.iconSet}:${props.value.leftIcon}`} />\n )\n : null}\n {slots.default ? slots.default() : null}\n {props.value.rightIcon\n ? (\n <Icon icon={`${theme.value.iconSet}:${props.value.rightIcon}`} />\n )\n : null}\n </a>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\ninterface TSpinnerStylesProps {\n color?: string;\n}\n\nexport const useStyles = (props: TSpinnerStylesProps) => {\n const color = computed(() => props.color);\n\n const theme = useTheme();\n const baseClass = computed(() => css({\n margin: 0,\n padding: 0,\n width: '3.5rem',\n height: '3.5rem',\n boxSizing: 'border-box',\n background: 'transparent',\n borderRadius: '50%',\n border: `0.5rem solid ${theme.value.colors.background}`,\n borderBottomColor: color.value ?? theme.value.colors.primary.main,\n animation: 'rotate 0.75s linear infinite',\n '&--medium': {\n width: '4.5rem',\n height: '4.5rem',\n },\n '&--auto': {\n [`@media (min-width: ${theme.value.breakpoints.desktop}px)`]: {\n width: '4.5rem',\n height: '4.5rem',\n },\n },\n '@keyframes rotate': {\n '0%': {\n transform: 'rotate(0deg)',\n },\n '100%': {\n transform: 'rotate(360deg)',\n },\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TSpinnerProps } from './TSpinner.types';\nimport { get, merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TSpinner.styles';\n\nconst defaultProps = {\n size: 'auto',\n color: '#3C1053',\n};\n\nexport const TSpinner = defineComponent({\n name: 'TSpinner',\n props: {\n size: String as PropType<TSpinnerProps['size']>,\n color: String as PropType<TSpinnerProps['color']>,\n },\n setup(_props, { attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const theme = useTheme();\n const color = computed(() => (get(theme.value.colors, props.value.color) as string)\n || props.value.color);\n\n const baseClass = useStyles({ color: color.value });\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n ]);\n\n return () => <div class={classes.value} />;\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\n\nexport const useStyles = () => {\n const baseClass = computed(() => css({\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n zIndex: 29,\n display: 'none',\n background: 'hsla(0,0%,100%,.5)',\n '&--active': {\n display: 'flex',\n },\n '&--full-page': {\n position: 'fixed',\n zIndex: 999,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TLoadingProps } from './TLoading.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { TSpinner } from '../TSpinner';\nimport { useStyles } from './TLoading.styles';\n\nconst defaultProps = {\n size: 'auto',\n};\n\nexport const TLoading = defineComponent({\n name: 'TLoading',\n props: {\n active: Boolean as PropType<TLoadingProps['active']>,\n fullPage: Boolean as PropType<TLoadingProps['fullPage']>,\n size: String as PropType<TLoadingProps['size']>,\n },\n setup(_props, { attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n {\n [`${baseClass.value}--active`]: props.value.active,\n [`${baseClass.value}--full-page`]: props.value.fullPage,\n },\n ]);\n\n return () => (\n <div class={classes.value}>\n <TSpinner size={props.value.size} />\n </div>\n );\n },\n});\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Three pulsing dots over a status message, with a secondary line that appears\n * only once the wait has gone on long enough to be worth explaining.\n *\n * Use it for waits the user is actively staring at — a payment being processed,\n * a bank redirect being prepared. For a plain indeterminate spinner with no\n * message, use `TSpinner`; for the legacy full-page overlay, `TLoading`.\n *\n * ## Layout is the consumer's job\n *\n * The component paints dots and centered text and nothing else — no backdrop, no\n * `position`, no `z-index`. Center it in a card or stretch it over a screen from\n * the outside. That is deliberate: the design renders identically inside a\n * desktop card and on a full-screen phone, so the surface belongs to whoever\n * mounts it.\n *\n * ## Announcements\n *\n * The root is a `role='status'` live region, so `message` is announced politely\n * and the dots are hidden from assistive tech.\n *\n * `hint` is deliberately announced too — \"this is taking a while\" is information a\n * screen reader user cannot get from watching the dots. Getting that *and* a\n * shift-free reveal takes some care: the line is in the DOM from mount so its box is\n * reserved, but while pending it is `aria-hidden` and `visibility: hidden`, so it is\n * silent and invisible. On reveal it is re-inserted as a fresh node (hence the `key`),\n * because a DOM insertion into a live region is the announcement trigger that\n * assistive tech supports most consistently — a visibility-only flip is not.\n *\n * Used bare, with no `message`, the region has nothing to announce: the dots are\n * decoration and hidden from assistive tech, so the loader is silent. That is fine\n * when something nearby already says what is happening; when it does not, pass an\n * `aria-label` — it falls through to the element carrying the role.\n */\nexport interface TLoadingDotsProps {\n /** Primary line under the dots. Also what the live region announces. */\n message?: string;\n\n /**\n * Secondary line, revealed after `hintDelay`. Meant for reassurance on a slow\n * wait (\"Esto puede tardar unos segundos…\"), not for status that must be read\n * immediately — anything urgent belongs in `message`.\n */\n hint?: string;\n\n /**\n * Milliseconds to wait before revealing `hint`. `0` shows it right away;\n * `false` never reveals it, which keeps `hint` addressable by a parent that\n * decides on its own when the wait became long.\n * @defaultValue 5000\n */\n hintDelay?: number | false;\n\n /**\n * Element the wrapper renders as. `'div'` suits a block of page; `'output'`\n * is worth considering when the loader reports the result of a form the user\n * just submitted. Every element this component renders inside the wrapper is\n * phrasing content, so `'output'` and other phrasing-only tags stay valid —\n * keep that in mind before swapping one for a block element in the slots.\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\nexport interface TLoadingDotsSlots {\n /** Replaces the `message` line — for rich content such as an inline amount. */\n message?: () => unknown;\n /** Replaces the `hint` line. Still governed by `hintDelay`. */\n hint?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from 'reka-ui';\nimport { computed, onUnmounted, ref, watch } from 'vue';\n\ndefineOptions({ name: 'TLoadingDots' });\n\nconst {\n message,\n hint,\n hintDelay = 5000,\n as = 'div',\n} = defineProps<TLoadingDotsProps>();\n\nconst slots = defineSlots<TLoadingDotsSlots>();\n\nconst hintElapsed = ref(false);\n\n// A bare timeout rather than VueUse's useTimeoutFn: one setTimeout does not justify\n// a utility library in the runtime dependencies of a published package, and ADR 006\n// leaves that trade to the caller.\nlet timer: ReturnType<typeof setTimeout> | undefined;\n\nconst stop = () => {\n clearTimeout(timer);\n timer = undefined;\n};\n\nconst start = (delay: number) => {\n timer = setTimeout(() => {\n hintElapsed.value = true;\n }, delay);\n};\n\nonUnmounted(stop);\n\n// Re-arm on every `hintDelay` change so a parent can restart the reveal, and so\n// switching to `false` retracts a hint that is already on screen.\nwatch(\n () => hintDelay,\n (delay) => {\n stop();\n hintElapsed.value = false;\n if (delay !== false) {\n start(delay);\n }\n },\n { immediate: true },\n);\n\n// The hint is in the DOM from mount and only *hidden* until the delay elapses, so\n// revealing it cannot shift the block: its exact box, wrapping included, is reserved\n// up front. Skipped entirely when `hintDelay` is false, where the line is never going\n// to appear and reserving space for it would be dead air.\nconst hintReserved = computed(() => Boolean(hint || slots.hint) && hintDelay !== false);\nconst messageShown = computed(() => Boolean(message || slots.message));\n</script>\n\n<template>\n <Primitive\n :as\n class=\"t-loading-dots\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <!-- Everything below is phrasing content so a phrasing-only `as` (e.g. `output`) stays valid HTML. -->\n <span class=\"t-loading-dots__dots\" aria-hidden=\"true\">\n <span class=\"t-loading-dots__dot\" />\n <span class=\"t-loading-dots__dot\" />\n <span class=\"t-loading-dots__dot\" />\n </span>\n\n <span v-if=\"messageShown || hintReserved\" class=\"t-loading-dots__text\">\n <span v-if=\"messageShown\" class=\"t-loading-dots__message\">\n <slot name=\"message\">\n {{ message }}\n </slot>\n </span>\n <span\n v-if=\"hintReserved\"\n :key=\"hintElapsed ? 'shown' : 'pending'\"\n class=\"t-loading-dots__hint\"\n :data-pending=\"!hintElapsed || undefined\"\n :aria-hidden=\"!hintElapsed || undefined\"\n >\n <slot name=\"hint\">\n {{ hint }}\n </slot>\n </span>\n </span>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n// px, not rem: the dots are a fixed graphic, 10px in Figma at every breakpoint, and\n// should not grow with the root font size the way the copy below them should.\n$dot-size: 10px;\n\n// Matches the dot. Deliberately off the --space-* scale, which has no 10px step;\n// Figma measures 12px here and this is a considered override of it.\n$dot-gap: 10px;\n$dot-rest-scale: 0.6;\n\n// The cycle is split into 7 so consecutive dots start 200ms apart at the default\n// 1400ms period, and stays proportional if the period is retuned.\n$stagger-steps: 7;\n\n// Figma wraps both lines somewhere between 276px and 308px, identically on mobile\n// and inside the desktop card. 288px sits in that band; `min()` keeps it from\n// overflowing a narrow phone once the consumer adds its own padding.\n$text-max-width: 18rem;\n\n.t-loading-dots {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-item);\n font-family: var(--font-family-base);\n text-align: center;\n\n &__dots {\n display: flex;\n align-items: center;\n gap: $dot-gap;\n }\n\n &__dot {\n display: block;\n width: $dot-size;\n height: $dot-size;\n border-radius: var(--radius-full);\n\n // The pulse swaps between two steps of the gray alpha ramp rather than dialling\n // `opacity` on a solid colour: an opacity multiplier invents shades that are not in\n // the palette, whereas both ends here are named tokens. gray-a-11 is the alpha twin\n // of gray-11, so the lit dot is the same colour it always was.\n background-color: var(--color-gray-alpha-11);\n\n // Base style is the lit dot, so anything that suppresses the animation leaves three\n // solid dots rather than a dimmed, shrunken row.\n transform: scale(1);\n animation: t-loading-dots-pulse var(--motion-loading-duration) var(--motion-loading-easing) infinite;\n\n // Negative delays start the row mid-cycle, so it mounts already in motion.\n &:nth-child(1) {\n animation-delay: calc(var(--motion-loading-duration) / #{$stagger-steps} * -2);\n }\n\n &:nth-child(2) {\n animation-delay: calc(var(--motion-loading-duration) / #{$stagger-steps} * -1);\n }\n\n // Collapsing the cycle to zero stops the pulse and, with no fill mode, leaves\n // the dots on their visible base style instead of a dimmed keyframe — verified\n // in-browser. The message keeps announcing, so the loader still reads as active.\n @media (prefers-reduced-motion: reduce) {\n animation-duration: var(--motion-duration-instant);\n animation-iteration-count: 1;\n }\n }\n\n &__text {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-unit);\n max-width: min(#{$text-max-width}, 100%);\n\n // max-width alone caps the box but creates no break opportunity, so a single\n // unbroken run (a URL, an id) would spill past it. Inherited by both lines.\n overflow-wrap: anywhere;\n }\n\n &__message {\n font-size: var(--font-b3-font-size);\n line-height: var(--font-b3-line-height);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text-contrast);\n }\n\n &__hint {\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n font-weight: var(--font-weight-regular);\n\n // Figma binds both lines to neutral/text-contrast — the hint reads lighter\n // because it is 12px regular, not because it is a muted color.\n color: var(--neutral-text-contrast);\n\n // An animation, not a transition: on reveal this is a freshly inserted node, and a\n // new node has no previous state to transition from — an animation still runs.\n &:not([data-pending]) {\n animation: t-loading-dots-hint-in var(--motion-enter-duration) var(--motion-enter-easing);\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: var(--motion-duration-instant);\n }\n }\n\n // Holds the line's box before the delay elapses so the reveal costs no layout\n // shift, while staying invisible and out of the accessibility tree.\n &[data-pending] {\n opacity: 0;\n visibility: hidden;\n }\n }\n}\n\n@keyframes t-loading-dots-pulse {\n 0%,\n 80%,\n 100% {\n background-color: var(--color-gray-alpha-7);\n transform: scale($dot-rest-scale);\n }\n\n 40% {\n background-color: var(--color-gray-alpha-11);\n transform: scale(1);\n }\n}\n\n@keyframes t-loading-dots-hint-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Three pulsing dots over a status message, with a secondary line that appears\n * only once the wait has gone on long enough to be worth explaining.\n *\n * Use it for waits the user is actively staring at — a payment being processed,\n * a bank redirect being prepared. For a plain indeterminate spinner with no\n * message, use `TSpinner`; for the legacy full-page overlay, `TLoading`.\n *\n * ## Layout is the consumer's job\n *\n * The component paints dots and centered text and nothing else — no backdrop, no\n * `position`, no `z-index`. Center it in a card or stretch it over a screen from\n * the outside. That is deliberate: the design renders identically inside a\n * desktop card and on a full-screen phone, so the surface belongs to whoever\n * mounts it.\n *\n * ## Announcements\n *\n * The root is a `role='status'` live region, so `message` is announced politely\n * and the dots are hidden from assistive tech.\n *\n * `hint` is deliberately announced too — \"this is taking a while\" is information a\n * screen reader user cannot get from watching the dots. Getting that *and* a\n * shift-free reveal takes some care: the line is in the DOM from mount so its box is\n * reserved, but while pending it is `aria-hidden` and `visibility: hidden`, so it is\n * silent and invisible. On reveal it is re-inserted as a fresh node (hence the `key`),\n * because a DOM insertion into a live region is the announcement trigger that\n * assistive tech supports most consistently — a visibility-only flip is not.\n *\n * Used bare, with no `message`, the region has nothing to announce: the dots are\n * decoration and hidden from assistive tech, so the loader is silent. That is fine\n * when something nearby already says what is happening; when it does not, pass an\n * `aria-label` — it falls through to the element carrying the role.\n */\nexport interface TLoadingDotsProps {\n /** Primary line under the dots. Also what the live region announces. */\n message?: string;\n\n /**\n * Secondary line, revealed after `hintDelay`. Meant for reassurance on a slow\n * wait (\"Esto puede tardar unos segundos…\"), not for status that must be read\n * immediately — anything urgent belongs in `message`.\n */\n hint?: string;\n\n /**\n * Milliseconds to wait before revealing `hint`. `0` shows it right away;\n * `false` never reveals it, which keeps `hint` addressable by a parent that\n * decides on its own when the wait became long.\n * @defaultValue 5000\n */\n hintDelay?: number | false;\n\n /**\n * Element the wrapper renders as. `'div'` suits a block of page; `'output'`\n * is worth considering when the loader reports the result of a form the user\n * just submitted. Every element this component renders inside the wrapper is\n * phrasing content, so `'output'` and other phrasing-only tags stay valid —\n * keep that in mind before swapping one for a block element in the slots.\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\nexport interface TLoadingDotsSlots {\n /** Replaces the `message` line — for rich content such as an inline amount. */\n message?: () => unknown;\n /** Replaces the `hint` line. Still governed by `hintDelay`. */\n hint?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from 'reka-ui';\nimport { computed, onUnmounted, ref, watch } from 'vue';\n\ndefineOptions({ name: 'TLoadingDots' });\n\nconst {\n message,\n hint,\n hintDelay = 5000,\n as = 'div',\n} = defineProps<TLoadingDotsProps>();\n\nconst slots = defineSlots<TLoadingDotsSlots>();\n\nconst hintElapsed = ref(false);\n\n// A bare timeout rather than VueUse's useTimeoutFn: one setTimeout does not justify\n// a utility library in the runtime dependencies of a published package, and ADR 006\n// leaves that trade to the caller.\nlet timer: ReturnType<typeof setTimeout> | undefined;\n\nconst stop = () => {\n clearTimeout(timer);\n timer = undefined;\n};\n\nconst start = (delay: number) => {\n timer = setTimeout(() => {\n hintElapsed.value = true;\n }, delay);\n};\n\nonUnmounted(stop);\n\n// Re-arm on every `hintDelay` change so a parent can restart the reveal, and so\n// switching to `false` retracts a hint that is already on screen.\nwatch(\n () => hintDelay,\n (delay) => {\n stop();\n hintElapsed.value = false;\n if (delay !== false) {\n start(delay);\n }\n },\n { immediate: true },\n);\n\n// The hint is in the DOM from mount and only *hidden* until the delay elapses, so\n// revealing it cannot shift the block: its exact box, wrapping included, is reserved\n// up front. Skipped entirely when `hintDelay` is false, where the line is never going\n// to appear and reserving space for it would be dead air.\nconst hintReserved = computed(() => Boolean(hint || slots.hint) && hintDelay !== false);\nconst messageShown = computed(() => Boolean(message || slots.message));\n</script>\n\n<template>\n <Primitive\n :as\n class=\"t-loading-dots\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <!-- Everything below is phrasing content so a phrasing-only `as` (e.g. `output`) stays valid HTML. -->\n <span class=\"t-loading-dots__dots\" aria-hidden=\"true\">\n <span class=\"t-loading-dots__dot\" />\n <span class=\"t-loading-dots__dot\" />\n <span class=\"t-loading-dots__dot\" />\n </span>\n\n <span v-if=\"messageShown || hintReserved\" class=\"t-loading-dots__text\">\n <span v-if=\"messageShown\" class=\"t-loading-dots__message\">\n <slot name=\"message\">\n {{ message }}\n </slot>\n </span>\n <span\n v-if=\"hintReserved\"\n :key=\"hintElapsed ? 'shown' : 'pending'\"\n class=\"t-loading-dots__hint\"\n :data-pending=\"!hintElapsed || undefined\"\n :aria-hidden=\"!hintElapsed || undefined\"\n >\n <slot name=\"hint\">\n {{ hint }}\n </slot>\n </span>\n </span>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n// px, not rem: the dots are a fixed graphic, 10px in Figma at every breakpoint, and\n// should not grow with the root font size the way the copy below them should.\n$dot-size: 10px;\n\n// Matches the dot. Deliberately off the --space-* scale, which has no 10px step;\n// Figma measures 12px here and this is a considered override of it.\n$dot-gap: 10px;\n$dot-rest-scale: 0.6;\n\n// The cycle is split into 7 so consecutive dots start 200ms apart at the default\n// 1400ms period, and stays proportional if the period is retuned.\n$stagger-steps: 7;\n\n// Figma wraps both lines somewhere between 276px and 308px, identically on mobile\n// and inside the desktop card. 288px sits in that band; `min()` keeps it from\n// overflowing a narrow phone once the consumer adds its own padding.\n$text-max-width: 18rem;\n\n.t-loading-dots {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-item);\n font-family: var(--font-family-base);\n text-align: center;\n\n &__dots {\n display: flex;\n align-items: center;\n gap: $dot-gap;\n }\n\n &__dot {\n display: block;\n width: $dot-size;\n height: $dot-size;\n border-radius: var(--radius-full);\n\n // The pulse swaps between two steps of the gray alpha ramp rather than dialling\n // `opacity` on a solid colour: an opacity multiplier invents shades that are not in\n // the palette, whereas both ends here are named tokens. gray-a-11 is the alpha twin\n // of gray-11, so the lit dot is the same colour it always was.\n background-color: var(--color-gray-alpha-11);\n\n // Base style is the lit dot, so anything that suppresses the animation leaves three\n // solid dots rather than a dimmed, shrunken row.\n transform: scale(1);\n animation: t-loading-dots-pulse var(--motion-loading-duration) var(--motion-loading-easing) infinite;\n\n // Negative delays start the row mid-cycle, so it mounts already in motion.\n &:nth-child(1) {\n animation-delay: calc(var(--motion-loading-duration) / #{$stagger-steps} * -2);\n }\n\n &:nth-child(2) {\n animation-delay: calc(var(--motion-loading-duration) / #{$stagger-steps} * -1);\n }\n\n // Collapsing the cycle to zero stops the pulse and, with no fill mode, leaves\n // the dots on their visible base style instead of a dimmed keyframe — verified\n // in-browser. The message keeps announcing, so the loader still reads as active.\n @media (prefers-reduced-motion: reduce) {\n animation-duration: var(--motion-duration-instant);\n animation-iteration-count: 1;\n }\n }\n\n &__text {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-unit);\n max-width: min(#{$text-max-width}, 100%);\n\n // max-width alone caps the box but creates no break opportunity, so a single\n // unbroken run (a URL, an id) would spill past it. Inherited by both lines.\n overflow-wrap: anywhere;\n }\n\n &__message {\n font-size: var(--font-b3-font-size);\n line-height: var(--font-b3-line-height);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text-contrast);\n }\n\n &__hint {\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n font-weight: var(--font-weight-regular);\n\n // Figma binds both lines to neutral/text-contrast — the hint reads lighter\n // because it is 12px regular, not because it is a muted color.\n color: var(--neutral-text-contrast);\n\n // An animation, not a transition: on reveal this is a freshly inserted node, and a\n // new node has no previous state to transition from — an animation still runs.\n &:not([data-pending]) {\n animation: t-loading-dots-hint-in var(--motion-enter-duration) var(--motion-enter-easing);\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: var(--motion-duration-instant);\n }\n }\n\n // Holds the line's box before the delay elapses so the reveal costs no layout\n // shift, while staying invisible and out of the accessibility tree.\n &[data-pending] {\n opacity: 0;\n visibility: hidden;\n }\n }\n}\n\n@keyframes t-loading-dots-pulse {\n 0%,\n 80%,\n 100% {\n background-color: var(--color-gray-alpha-7);\n transform: scale($dot-rest-scale);\n }\n\n 40% {\n background-color: var(--color-gray-alpha-11);\n transform: scale(1);\n }\n}\n\n@keyframes t-loading-dots-hint-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n</style>\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n },\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n gap: '0.375rem',\n width: 'fit-content',\n '&__radio': {\n appearance: 'none',\n MozAppearance: 'none',\n WebkitAppearance: 'none',\n width: '18px',\n height: '18px',\n borderRadius: '50%',\n border: `1px solid ${theme.value.colors.primary.main}`,\n position: 'relative',\n cursor: 'pointer',\n },\n '&:not(&--checked) &__radio:hover': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&--checked &__radio::after': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '10px',\n height: '10px',\n background: theme.value.colors.primary.main,\n borderRadius: '50%',\n },\n '&--label-left &__radio': {\n order: 1,\n },\n '&__label': {\n fontFamily: theme.value.typography.fontFamily,\n color: theme.value.typography.color,\n fontSize: '1rem',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.375rem',\n },\n '&--disabled &__radio': {\n cursor: 'not-allowed',\n },\n '&--disabled &__radio, &--disabled:not(&--checked):hover &__radio': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&--disabled &__radio::after': {\n background: theme.value.colors.gray.medium2,\n },\n '&--disabled &__label': {\n color: theme.value.colors.gray.medium2,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TRadioProps } from './TRadio.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport { useStyles } from './TRadio.styles';\n\nconst defaultProps = {\n labelPosition: 'right',\n};\n\nexport const TRadio = defineComponent({\n name: 'TRadio',\n props: {\n id: String as PropType<TRadioProps['id']>,\n label: String as PropType<TRadioProps['label']>,\n value: {\n type: [\n String,\n Number,\n Boolean,\n Object,\n Array,\n Function,\n Date,\n ] as PropType<TRadioProps['value']>,\n default: null,\n },\n modelValue: {\n type: [\n String,\n Number,\n Boolean,\n Object,\n Array,\n Function,\n Date,\n ] as PropType<TRadioProps['modelValue']>,\n default: null,\n },\n disabled: Boolean as PropType<TRadioProps['disabled']>,\n labelPosition: String as PropType<TRadioProps['labelPosition']>,\n },\n emits: ['input', 'change', 'update:modelValue'],\n setup(_props, { emit, attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const checked = ref(props.value.modelValue === props.value.value);\n watch(\n () => [props.value.modelValue, props.value.value],\n () => {\n checked.value = props.value.modelValue === props.value.value;\n },\n );\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--label-${props.value.labelPosition}`,\n {\n [`${baseClass.value}--checked`]: checked.value,\n [`${baseClass.value}--disabled`]: props.value.disabled,\n },\n ]);\n\n const handleInput = () => {\n emit('update:modelValue', props.value.value);\n emit('change', props.value.value);\n emit('input', props.value.value);\n checked.value = true;\n };\n const handleClick = () => {\n if (!props.value.disabled) {\n handleInput();\n }\n };\n const handleKeydown = (event: KeyboardEvent) => {\n if (\n (event.key === 'Enter' || event.key === ' ')\n && !props.value.disabled\n ) {\n handleInput();\n }\n };\n\n return () => (\n <div class={classes.value}>\n <input\n id={props.value.id}\n type=\"radio\"\n class={`${baseClass.value}__radio`}\n onClick={handleClick}\n onKeydown={handleKeydown}\n disabled={props.value.disabled}\n />\n {props.value.label && (\n <label class={`${baseClass.value}__label`} for={props.value.id}>\n {props.value.label}\n </label>\n )}\n </div>\n );\n },\n});\n","import type { Ref } from 'vue';\nimport { computed, onUnmounted, ref } from 'vue';\n\nexport interface UseScrollbarThumbOptions {\n railTopInset?: number;\n railBottomInset?: number;\n minThumbHeight?: number;\n thumbHeightFactor?: number;\n onDragStart?: () => void;\n onDragEnd?: () => void;\n}\n\nconst DEFAULT_OPTIONS: Required<Omit<UseScrollbarThumbOptions, 'onDragStart' | 'onDragEnd'>> = {\n railTopInset: 3,\n railBottomInset: 8,\n minThumbHeight: 6,\n thumbHeightFactor: 0.65,\n};\n\nexport function useScrollbarThumb(\n containerRef: Ref<HTMLElement | null>,\n options: UseScrollbarThumbOptions = {},\n) {\n const {\n railTopInset,\n railBottomInset,\n minThumbHeight,\n thumbHeightFactor,\n onDragStart,\n onDragEnd,\n } = { ...DEFAULT_OPTIONS, ...options };\n\n const thumbHeight = ref(0);\n const thumbOffset = ref(0);\n const isDragging = ref(false);\n const dragStartY = ref(0);\n const dragStartScrollTop = ref(0);\n\n const isScrollable = computed(() => thumbHeight.value > 0);\n\n function update() {\n const el = containerRef.value;\n if (!el) {\n return;\n }\n\n const { scrollTop, scrollHeight, clientHeight } = el;\n if (scrollHeight <= clientHeight) {\n thumbHeight.value = 0;\n thumbOffset.value = 0;\n return;\n }\n\n const railHeight = Math.max(\n clientHeight - railTopInset - railBottomInset,\n 0,\n );\n const proportionalThumbHeight = (clientHeight / scrollHeight) * railHeight;\n const height = Math.max(\n proportionalThumbHeight * thumbHeightFactor,\n minThumbHeight,\n );\n const maxThumbOffset = Math.max(railHeight - height, 0);\n const maxScrollTop = scrollHeight - clientHeight;\n const scrollProgress = maxScrollTop > 0 ? scrollTop / maxScrollTop : 0;\n\n thumbHeight.value = height;\n thumbOffset.value = railTopInset + maxThumbOffset * scrollProgress;\n }\n\n function handleDragMove(event: MouseEvent) {\n if (!isDragging.value || !containerRef.value) {\n return;\n }\n\n const el = containerRef.value;\n const { scrollHeight, clientHeight } = el;\n const maxScrollTop = Math.max(scrollHeight - clientHeight, 0);\n if (maxScrollTop === 0) {\n return;\n }\n\n const railHeight = Math.max(\n clientHeight - railTopInset - railBottomInset,\n 0,\n );\n const maxThumbOffset = Math.max(railHeight - thumbHeight.value, 0);\n if (maxThumbOffset === 0) {\n return;\n }\n\n const deltaY = event.clientY - dragStartY.value;\n const scrollRatio = maxScrollTop / maxThumbOffset;\n el.scrollTop = Math.min(\n Math.max(dragStartScrollTop.value + deltaY * scrollRatio, 0),\n maxScrollTop,\n );\n update();\n }\n\n function handleDragEnd() {\n if (!isDragging.value) {\n return;\n }\n isDragging.value = false;\n window.removeEventListener('mousemove', handleDragMove);\n window.removeEventListener('mouseup', handleDragEnd);\n onDragEnd?.();\n }\n\n function onThumbMouseDown(event: MouseEvent) {\n if (!containerRef.value || !isScrollable.value) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n onDragStart?.();\n isDragging.value = true;\n dragStartY.value = event.clientY;\n dragStartScrollTop.value = containerRef.value.scrollTop;\n window.addEventListener('mousemove', handleDragMove);\n window.addEventListener('mouseup', handleDragEnd);\n }\n\n onUnmounted(() => {\n window.removeEventListener('mousemove', handleDragMove);\n window.removeEventListener('mouseup', handleDragEnd);\n });\n\n return {\n thumbHeight,\n thumbOffset,\n isScrollable,\n isDragging,\n update,\n onThumbMouseDown,\n };\n}\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color: '#373737',\n fontFamily: theme.value.typography.fontFamily,\n },\n '&__container': {\n gap: theme.value.spacing,\n display: 'flex',\n flexDirection: 'column',\n width: '358px',\n },\n '&__label': {\n display: 'block',\n fontSize: '0.875rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.semibold,\n lineHeight: '1.25rem',\n },\n '&__wrapper': {\n position: 'relative',\n },\n '&__dropdown': {\n position: 'relative',\n },\n '&__select': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n background: '#fff',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderRadius: theme.value.input.borderRadius,\n padding: '0.25rem 0.5rem',\n gap: '0.5rem',\n height: '32px',\n fontSize: '0.8125rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.375rem',\n MozAppearance: 'none',\n WebkitAppearance: 'none',\n appearance: 'none',\n backgroundImage:\n \"url(\\\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path fill-rule='evenodd' d='M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z' clip-rule='evenodd' stroke='black' stroke-width='1'/></svg>\\\")\",\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'right 0.7rem top 50%',\n backgroundSize: '0.65rem auto',\n '&:hover': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&:focus': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&:disabled': {\n backgroundColor: theme.value.colors.gray.light3,\n borderColor: theme.value.colors.gray.light3,\n cursor: 'not-allowed',\n },\n '&--placeholder': {\n color: theme.value.colors.gray.medium2,\n },\n '&--open': {\n borderBottomLeftRadius: '4px',\n borderBottomRightRadius: '4px',\n },\n '&--left-icon': {\n paddingLeft: '2rem',\n },\n },\n '&__selected-value': {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n maxWidth: '100%',\n },\n '&__menu-wrapper': {\n position: 'absolute',\n top: '100%',\n left: 0,\n width: '100%',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderTopRightRadius: '4px',\n borderTopLeftRadius: '4px',\n borderBottomLeftRadius: '8px',\n borderBottomRightRadius: '8px',\n backgroundColor: '#fff',\n boxShadow: '0 6px 20px rgba(0, 0, 0, 0.08)',\n overflow: 'hidden',\n zIndex: 1000,\n },\n '&__menu': {\n margin: 0,\n padding: '0.125rem 0.75rem 0.125rem 0.375rem',\n listStyle: 'none',\n maxHeight: '14.25rem',\n overflowY: 'auto',\n scrollbarWidth: 'none',\n },\n '&__menu-scrollbar': {\n position: 'absolute',\n top: '0.1875rem',\n bottom: '0.5rem',\n right: '0.25rem',\n width: '4px',\n borderRadius: '999px',\n backgroundColor: theme.value.colors.gray.light4,\n opacity: 0,\n transition: 'opacity 120ms ease',\n pointerEvents: 'auto',\n '&--visible': {\n opacity: 1,\n },\n },\n '&__menu-scrollbar-thumb': {\n width: '100%',\n borderRadius: '999px',\n backgroundColor: theme.value.typography.color,\n transition: 'transform 120ms ease',\n cursor: 'grab',\n },\n '&__icon': {\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n fontSize: '1rem',\n zIndex: 1,\n pointerEvents: 'none',\n '&--left': {\n left: '0.5rem',\n },\n },\n '&__helper-text': {\n fontSize: '0.75rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.125rem',\n color: theme.value.colors.gray.medium1,\n },\n '&--error &__select, &--error &__select:focus': {\n borderColor: theme.value.colors.error,\n },\n '&--error &__helper-text': {\n color: theme.value.colors.error,\n },\n '&--full-width': {\n width: '100%',\n },\n }));\n\n return baseClass;\n};\n","import type { RendererElement, RendererNode, VNode } from 'vue';\nimport type { TSelectProps } from './TSelect.types';\n\nexport interface SelectOption {\n value: TSelectProps['value'];\n label: string;\n disabled: boolean;\n}\n\ntype Slot = VNode<\n RendererNode,\n RendererElement,\n {\n [key: string]: any;\n }\n>;\n\nconst getTextFromSlotChildren = (children: unknown): string => {\n if (typeof children === 'string' || typeof children === 'number') {\n return String(children);\n }\n\n if (Array.isArray(children)) {\n return children\n .map((child) => getTextFromSlotChildren(child))\n .join('')\n .trim();\n }\n\n if (children && typeof children === 'object' && 'children' in children) {\n return getTextFromSlotChildren((children as { children?: unknown }).children);\n }\n\n return '';\n};\n\nconst getOptionsFromSlots = (slots: Slot[], results: Slot[] = []) => {\n slots?.forEach((slot) => {\n if (slot.type === 'option') {\n results.push(slot);\n } else if (Array.isArray(slot.children)) {\n getOptionsFromSlots(slot.children as Slot[], results);\n }\n });\n\n return results;\n};\n\nexport const buildSelectOptions = (slotVNodes: Slot[]): SelectOption[] => {\n const slots = getOptionsFromSlots(slotVNodes);\n return slots.map((option) => ({\n value: option.props?.value,\n disabled: Boolean(option.props?.disabled),\n label: getTextFromSlotChildren(option.children),\n }));\n};\n\nexport const isOptionValueEqual = (a: unknown, b: unknown): boolean => {\n if (a === b) {\n return true;\n }\n if (a == null || b == null) {\n return false;\n }\n if (typeof a !== 'object' || typeof b !== 'object') {\n return false;\n }\n const proto = Object.getPrototypeOf(a);\n if (proto !== Object.prototype || Object.getPrototypeOf(b) !== proto) {\n return false;\n }\n const keysA = Object.keys(a as object);\n const keysB = Object.keys(b as object);\n if (keysA.length !== keysB.length) {\n return false;\n }\n return keysA.every((k) => (a as Record<string, unknown>)[k] === (b as Record<string, unknown>)[k]);\n};\n\nexport const getInitialHighlightedIndex = (\n options: SelectOption[],\n currentValue: unknown,\n): number => {\n const selectedIndex = options.findIndex((opt) => isOptionValueEqual(opt.value, currentValue) && !opt.disabled);\n if (selectedIndex >= 0) {\n return selectedIndex;\n }\n const firstEnabled = options.findIndex((opt) => !opt.disabled);\n return firstEnabled >= 0 ? firstEnabled : -1;\n};\n\nexport const resolveLeftIcon = (props: Record<string, unknown>): string => {\n if (typeof props.leftIcon === 'string') {\n return props.leftIcon;\n }\n const attr = props['left-icon'];\n return typeof attr === 'string' ? attr : '';\n};\n\nexport const getLeftIconName = (icon: string, iconSet: string): string => {\n if (!icon) {\n return '';\n }\n return icon.includes(':') ? icon : `${iconSet}:${icon}`;\n};\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n boxSizing: 'border-box',\n },\n listStyle: 'none',\n padding: '0.5rem 0.625rem',\n fontFamily: theme.value.typography.fontFamily,\n fontSize: '0.875rem',\n fontWeight: '400',\n lineHeight: '1.25rem',\n color: theme.value.colors.gray.main,\n cursor: 'pointer',\n transition: 'background-color 120ms ease, color 120ms ease',\n '&--with-separator': {\n borderBottom: `1px solid ${theme.value.colors.gray.light3}`,\n },\n '&--highlighted': {\n backgroundColor: theme.value.colors.gray.light3,\n borderRadius: '4px',\n boxShadow: 'inset 0 3px #fff, inset 0 -3px #fff',\n },\n '&--selected': {\n backgroundColor: theme.value.colors.primary.light5,\n borderRadius: '4px',\n boxShadow: 'inset 0 3px #fff, inset 0 -3px #fff',\n color: theme.value.colors.primary.main,\n fontWeight: theme.value.typography.fontWeight.semibold,\n },\n '&--disabled': {\n color: theme.value.colors.gray.medium2,\n cursor: 'not-allowed',\n pointerEvents: 'none',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TSelectOptionProps } from './TSelectOption.types';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TSelectOption.styles';\n\nexport const TSelectOption = defineComponent({\n name: 'TSelectOption',\n emits: ['select', 'hover'],\n props: {\n label: String as PropType<TSelectOptionProps['label']>,\n selected: Boolean as PropType<TSelectOptionProps['selected']>,\n highlighted: Boolean as PropType<TSelectOptionProps['highlighted']>,\n disabled: Boolean as PropType<TSelectOptionProps['disabled']>,\n withSeparator: Boolean as PropType<TSelectOptionProps['withSeparator']>,\n },\n setup(props, { slots, emit }) {\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n {\n [`${baseClass.value}--selected`]: props.selected,\n [`${baseClass.value}--highlighted`]: props.highlighted,\n [`${baseClass.value}--disabled`]: props.disabled,\n [`${baseClass.value}--with-separator`]: props.withSeparator,\n },\n ]);\n\n const handleHover = () => {\n if (!props.disabled) {\n emit('hover');\n }\n };\n\n const handleMouseDown = (event: MouseEvent) => {\n event.preventDefault();\n if (!props.disabled) {\n emit('select');\n }\n };\n\n return () => (\n <li\n class={classes.value}\n role=\"option\"\n aria-selected={Boolean(props.selected)}\n onMousedown={handleMouseDown}\n onMouseenter={handleHover}\n >\n {slots.default?.() || props.label}\n </li>\n );\n },\n});\n","import type { ComputedRef, WritableComputedRef } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { SelectOption } from './TSelect.utils';\nimport { ref } from 'vue';\nimport { getInitialHighlightedIndex } from './TSelect.utils';\n\nconst SCROLL_STEP_PX = 36;\n\nexport function useSelectDropdown(\n options: ComputedRef<SelectOption[]>,\n internalValue: WritableComputedRef<SelectOption['value']>,\n disabled: ComputedRef<boolean>,\n) {\n const menuOpen = ref(false);\n const highlightedIndex = ref(-1);\n const wrapperRef = ref<Nullable<HTMLDivElement>>(null);\n const triggerRef = ref<Nullable<HTMLButtonElement>>(null);\n const menuRef = ref<Nullable<HTMLUListElement>>(null);\n const menuHovered = ref(false);\n const isInteractingWithMenu = ref(false);\n\n const openMenu = () => {\n if (disabled.value || !options.value.length) {\n return;\n }\n menuOpen.value = true;\n highlightedIndex.value = getInitialHighlightedIndex(\n options.value,\n internalValue.value,\n );\n };\n\n const closeMenu = () => {\n menuOpen.value = false;\n highlightedIndex.value = -1;\n menuHovered.value = false;\n isInteractingWithMenu.value = false;\n };\n\n const scrollMenuBy = (direction: 1 | -1) => {\n const el = menuRef.value;\n if (!el) {\n return;\n }\n el.scrollBy({ top: direction * SCROLL_STEP_PX, behavior: 'smooth' });\n };\n\n const selectOption = (option: SelectOption) => {\n if (option.disabled) {\n return;\n }\n internalValue.value = option.value;\n closeMenu();\n };\n\n const handleClickTrigger = () => {\n if (menuOpen.value) {\n closeMenu();\n } else {\n openMenu();\n }\n };\n\n const handleBlur = () => {\n requestAnimationFrame(() => {\n if (isInteractingWithMenu.value) {\n return;\n }\n const activeElement = document.activeElement;\n if (!wrapperRef.value?.contains(activeElement)) {\n closeMenu();\n }\n });\n };\n\n const handleMenuInteractionStart = () => {\n isInteractingWithMenu.value = true;\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (disabled.value) {\n return;\n }\n\n if (\n !menuOpen.value\n && ['ArrowDown', 'ArrowUp', 'Enter', ' '].includes(event.key)\n ) {\n event.preventDefault();\n openMenu();\n return;\n }\n\n if (!menuOpen.value) {\n return;\n }\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n scrollMenuBy(1);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n scrollMenuBy(-1);\n } else if (event.key === 'Enter') {\n event.preventDefault();\n const option = options.value[highlightedIndex.value];\n if (option) {\n selectOption(option);\n }\n } else if (event.key === 'Escape' || event.key === 'Tab') {\n closeMenu();\n }\n };\n\n return {\n menuOpen,\n highlightedIndex,\n wrapperRef,\n triggerRef,\n menuRef,\n menuHovered,\n isInteractingWithMenu,\n openMenu,\n closeMenu,\n selectOption,\n handleClickTrigger,\n handleBlur,\n handleMenuInteractionStart,\n handleKeydown,\n scrollMenuBy,\n };\n}\n","import type { PropType } from 'vue';\nimport type { TSelectProps } from './TSelect.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport { useScrollbarThumb } from '../../composables/scrollbarThumb';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TSelect.styles';\nimport {\n buildSelectOptions,\n getLeftIconName,\n isOptionValueEqual,\n resolveLeftIcon,\n} from './TSelect.utils';\nimport { TSelectOption } from './TSelectOption';\nimport { useSelectDropdown } from './useSelectDropdown';\n\nexport const TSelect = defineComponent({\n name: 'TSelect',\n emits: ['input', 'change', 'update:modelValue', 'focus', 'blur'],\n props: {\n error: Boolean as PropType<TSelectProps['error']>,\n disabled: Boolean as PropType<TSelectProps['disabled']>,\n leftIcon: String as PropType<TSelectProps['leftIcon']>,\n label: String as PropType<TSelectProps['label']>,\n placeholder: String as PropType<TSelectProps['placeholder']>,\n helperText: String as PropType<TSelectProps['helperText']>,\n value: {\n type: [\n String,\n Number,\n Boolean,\n Object,\n Array,\n Function,\n Date,\n ] as PropType<TSelectProps['value']>,\n default: null,\n },\n modelValue: {\n type: [\n String,\n Number,\n Boolean,\n Object,\n Array,\n Function,\n Date,\n ] as PropType<TSelectProps['modelValue']>,\n default: null,\n },\n fullWidth: Boolean as PropType<TSelectProps['fullWidth']>,\n id: String as PropType<TSelectProps['id']>,\n },\n setup(_props, { attrs, emit, slots, expose }) {\n const props = computed(() => merge({}, _props, attrs));\n const theme = useTheme();\n const localValue = ref<TSelectProps['value']>(null);\n\n const baseClass = useStyles();\n const containerClasses = computed(() => [\n baseClass.value,\n `${baseClass.value}__container`,\n {\n [`${baseClass.value}--error`]: props.value.error,\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n },\n ]);\n\n watch(\n () => [props.value.modelValue, props.value.value],\n ([modelValue, value]) => {\n localValue.value = modelValue !== null ? modelValue : value;\n },\n { immediate: true },\n );\n\n const internalValue = computed({\n get: () => {\n if (props.value.modelValue !== null) {\n return props.value.modelValue;\n }\n if (props.value.value !== null) {\n return props.value.value;\n }\n return localValue.value;\n },\n set: (newValue) => {\n localValue.value = newValue;\n emit('update:modelValue', newValue);\n emit('input', newValue);\n emit('change', newValue);\n },\n });\n\n const options = computed(() => buildSelectOptions(slots.default?.() ?? []));\n\n const selectedOption = computed(() => options.value.find((opt) => isOptionValueEqual(opt.value, internalValue.value)));\n const hasSelectedValue = computed(() => Boolean(selectedOption.value));\n const selectedLabel = computed(() => {\n if (selectedOption.value) {\n return selectedOption.value.label;\n }\n if (props.value.placeholder) {\n return props.value.placeholder;\n }\n return '';\n });\n\n const resolvedLeftIcon = computed(() => resolveLeftIcon(props.value as Record<string, unknown>));\n const leftIconName = computed(() => getLeftIconName(resolvedLeftIcon.value, theme.value.iconSet));\n\n const dropdown = useSelectDropdown(\n options,\n internalValue,\n computed(() => Boolean(props.value.disabled)),\n );\n\n const scrollbar = useScrollbarThumb(dropdown.menuRef, {\n onDragStart: () => {\n dropdown.isInteractingWithMenu.value = true;\n },\n onDragEnd: () => {\n requestAnimationFrame(() => {\n dropdown.isInteractingWithMenu.value = false;\n });\n },\n });\n\n watch(\n () => [dropdown.menuOpen.value, options.value.length] as const,\n ([isOpen]) => {\n if (isOpen) {\n requestAnimationFrame(() => scrollbar.update());\n }\n },\n );\n\n const focus = () => dropdown.triggerRef.value?.focus();\n expose({ focus });\n\n return () => (\n <div class={containerClasses.value}>\n {slots.label?.()\n || (props.value.label && (\n <label class={`${baseClass.value}__label`} for={props.value.id}>\n {props.value.label}\n </label>\n ))}\n <div class={`${baseClass.value}__wrapper`}>\n {resolvedLeftIcon.value && (\n <Icon\n icon={leftIconName.value}\n class={[\n `${baseClass.value}__icon`,\n `${baseClass.value}__icon--left`,\n ]}\n />\n )}\n <div\n class={[\n `${baseClass.value}__dropdown`,\n {\n [`${baseClass.value}__dropdown--open`]: dropdown.menuOpen.value,\n },\n ]}\n ref={dropdown.wrapperRef}\n >\n <button\n class={[\n `${baseClass.value}__select`,\n {\n [`${baseClass.value}__select--left-icon`]:\n resolvedLeftIcon.value,\n [`${baseClass.value}__select--placeholder`]:\n !hasSelectedValue.value,\n [`${baseClass.value}__select--open`]: dropdown.menuOpen.value,\n },\n ]}\n disabled={props.value.disabled}\n id={props.value.id}\n onClick={dropdown.handleClickTrigger}\n onFocus={(e: Event) => emit('focus', e)}\n onBlur={(e: Event) => {\n dropdown.handleBlur();\n emit('blur', e);\n }}\n onKeydown={dropdown.handleKeydown}\n ref={dropdown.triggerRef}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={dropdown.menuOpen.value}\n type=\"button\"\n {...attrs}\n >\n <div class={`${baseClass.value}__selected-value`}>\n {selectedLabel.value}\n </div>\n </button>\n\n {dropdown.menuOpen.value && (\n <div\n class={`${baseClass.value}__menu-wrapper`}\n onMousedown={dropdown.handleMenuInteractionStart}\n onMouseup={() => {\n if (!scrollbar.isDragging.value) {\n dropdown.isInteractingWithMenu.value = false;\n }\n }}\n onMouseenter={() => (dropdown.menuHovered.value = true)}\n onMouseleave={() => {\n dropdown.menuHovered.value = false;\n if (!scrollbar.isDragging.value) {\n dropdown.isInteractingWithMenu.value = false;\n }\n }}\n >\n <ul\n class={`${baseClass.value}__menu`}\n role=\"listbox\"\n ref={dropdown.menuRef}\n onScroll={scrollbar.update}\n >\n {options.value.map((option, index) => (\n <TSelectOption\n key={`${String(option.value)}-${index}`}\n label={option.label}\n selected={isOptionValueEqual(option.value, internalValue.value)}\n highlighted={index === dropdown.highlightedIndex.value}\n disabled={option.disabled}\n withSeparator={index < options.value.length - 1}\n onHover={() => (dropdown.highlightedIndex.value = index)}\n onSelect={() => dropdown.selectOption(option)}\n />\n ))}\n </ul>\n <div\n class={[\n `${baseClass.value}__menu-scrollbar`,\n {\n [`${baseClass.value}__menu-scrollbar--visible`]:\n dropdown.menuHovered.value\n && scrollbar.isScrollable.value,\n },\n ]}\n aria-hidden=\"true\"\n >\n <div\n class={`${baseClass.value}__menu-scrollbar-thumb`}\n onMousedown={scrollbar.onThumbMouseDown}\n style={{\n height: `${scrollbar.thumbHeight.value}px`,\n transform: `translateY(${scrollbar.thumbOffset.value}px)`,\n }}\n />\n </div>\n </div>\n )}\n </div>\n </div>\n {slots.helperText?.()\n || (props.value.helperText && (\n <p class={`${baseClass.value}__helper-text`}>\n {props.value.helperText}\n </p>\n ))}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n '&__menu_container': {\n gap: theme.value.spacing,\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n '&__container': {\n width: '358px',\n },\n '&--full-width': {\n width: '100%',\n },\n position: 'relative',\n width: 'fit-content',\n '&__menu': {\n position: 'absolute',\n display: 'none',\n padding: '0.625rem',\n width: '100%',\n background: '#fff',\n boxShadow: '0px 6px 30px 0px rgba(0, 0, 0, 0.10)',\n borderBottomLeftRadius: '0.5rem',\n borderBottomRightRadius: '0.5rem',\n marginTop: '40px',\n zIndex: 20,\n },\n '&--active &__menu': {\n display: 'block',\n },\n '&__divider': {\n width: '100%',\n height: '1px',\n background: theme.value.colors.gray.light3,\n marginBlock: '0.5rem',\n },\n '&__label': {\n display: 'block',\n fontSize: '0.875rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.semibold,\n lineHeight: '1.25rem',\n },\n '&__helper-text': {\n fontSize: '0.75rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.125rem',\n color: theme.value.colors.gray.medium1,\n marginTop: '0.125rem',\n },\n '&__select': {\n display: 'flex',\n width: '100%',\n background: '#fff',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderRadius: theme.value.input.borderRadius,\n padding: '0.25rem 0.5rem',\n gap: '0.5rem',\n height: '32px',\n fontSize: '0.813rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '20px',\n MozAppearance: 'none',\n WebkitAppearance: 'none',\n appearance: 'none',\n backgroundImage:\n \"url(\\\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path fill-rule='evenodd' d='M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z' clip-rule='evenodd' stroke='black' stroke-width='1'/></svg>\\\")\",\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'right 0.7rem top 50%',\n backgroundSize: '0.65rem auto',\n '&:hover': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&:focus': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&:disabled': {\n backgroundColor: theme.value.colors.gray.light3,\n borderColor: theme.value.colors.gray.light3,\n cursor: 'not-allowed',\n },\n },\n '&--error &__select:not(:disabled), &--error &__select:focus': {\n borderColor: theme.value.colors.error,\n },\n '&--error + &__helper-text': {\n color: theme.value.colors.error,\n },\n }));\n\n return baseClass;\n};\n","import type { RendererElement, RendererNode, VNode } from 'vue';\n\ntype Slot = VNode<\n RendererNode,\n RendererElement,\n {\n [key: string]: any;\n }\n>;\n\nexport const getVisibleElements = (slots: Slot[]): Slot[] => {\n const results: Slot[] = [];\n slots?.forEach((slot) => {\n // @ts-expect-error type is missing some properties\n if (slot.type?.name === 'TSelectDropdownItem') {\n results.push(slot);\n } else if (Array.isArray(slot.children)) {\n results.push(...getVisibleElements(slot.children as Slot[]));\n }\n });\n\n return results;\n};\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { TDropdownSelectProps } from './TSelectDropdown.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, onMounted, onUnmounted, ref } from 'vue';\nimport { useStyles } from './TSelectDropdown.styles';\nimport { getVisibleElements } from './TSelectDropdown.utils';\n\nexport const TSelectDropdown = defineComponent({\n name: 'TSelectDropdown',\n props: {\n open: Boolean as PropType<TDropdownSelectProps['open']>,\n label: String as PropType<TDropdownSelectProps['label']>,\n selectedValue: String as PropType<TDropdownSelectProps['selectedValue']>,\n disabled: Boolean as PropType<TDropdownSelectProps['disabled']>,\n helperText: String as PropType<TDropdownSelectProps['helperText']>,\n placeholder: String as PropType<TDropdownSelectProps['placeholder']>,\n error: Boolean as PropType<TDropdownSelectProps['error']>,\n fullWidth: Boolean as PropType<TDropdownSelectProps['fullWidth']>,\n },\n emits: ['cancel', 'click'],\n setup(_props, { slots, attrs, emit }) {\n const props = computed(() => merge({}, _props, attrs));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}__menu_container`,\n {\n [`${baseClass.value}--active`]: props.value.open,\n [`${baseClass.value}--error`]: props.value.error,\n },\n ]);\n const containerClasses = computed(() => [\n baseClass.value,\n `${baseClass.value}__container`,\n {\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n },\n ]);\n\n const container = ref<Nullable<HTMLDivElement>>(null);\n const handleClickOutside = (event: Event) => {\n if (\n props.value.open\n && container.value\n && !container.value.contains(event.target as Node)\n ) {\n emit('cancel');\n }\n };\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n emit('cancel');\n }\n };\n onMounted(() => {\n document.addEventListener('click', handleClickOutside);\n container.value?.addEventListener('keydown', handleKeydown);\n });\n onUnmounted(() => {\n document.removeEventListener('click', handleClickOutside);\n container.value?.removeEventListener('keydown', handleKeydown);\n });\n\n const visibleElements = computed(() => getVisibleElements(slots.default?.() || []));\n\n const handleClick = () => {\n emit('click');\n };\n\n return () => (\n <div class={containerClasses.value}>\n {slots.label?.()\n || (props.value.label && (\n <label class={`${baseClass.value}__label`}>\n {props.value.label}\n </label>\n ))}\n <div ref={container} role=\"menu\" class={classes.value}>\n <button\n class={`${baseClass.value}__select`}\n onClick={handleClick}\n disabled={props.value.disabled}\n type=\"button\"\n >\n {props.value.selectedValue}\n {props.value.placeholder && !props.value.selectedValue && (\n <option\n value=\"\"\n disabled\n selected\n class={`${baseClass.value}__placeholder`}\n >\n {props.value.placeholder}\n </option>\n )}\n </button>\n <div class={`${baseClass.value}__menu`}>\n {visibleElements.value.map((element, index, array) => (\n <div>\n {element}\n {index < array.length - 1 && (\n <div class={`${baseClass.value}__divider`} />\n )}\n </div>\n ))}\n </div>\n </div>\n {slots.helperText?.()\n || (props.value.helperText && (\n <p class={`${baseClass.value}__helper-text`}>\n {props.value.helperText}\n </p>\n ))}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n '*': {\n padding: 0,\n },\n background: '#fff',\n padding: '0.25rem 0.5rem',\n cursor: 'pointer',\n borderRadius: '0.25rem',\n fontFamily: theme.value.typography.fontFamily,\n fontSize: '0.813rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1rem',\n color: '#373737',\n marginRight: '2rem',\n '&:hover': {\n background: theme.value.colors.gray.light3,\n },\n '&__label': {\n fontSize: '0.75rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n color: theme.value.colors.info,\n display: 'inline-block',\n float: 'right',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TSelectDropdownItemprops } from './TSelectDropdownItem.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TSelectDropdownItem.styles';\n\nexport const TSelectDropdownItem = defineComponent({\n name: 'TSelectDropdownItem',\n emits: ['click'],\n props: {\n label: String as PropType<TSelectDropdownItemprops['label']>,\n },\n setup(_props, { slots, emit, attrs }) {\n const props = computed(() => merge({}, _props, attrs));\n\n const baseClass = useStyles();\n\n const handleClick = () => {\n emit('click');\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' && !props.value.disabled) {\n emit('click');\n event.preventDefault();\n }\n };\n\n return () => (\n <div\n class={baseClass.value}\n onClick={handleClick}\n role=\"menuitem\"\n onKeydown={handleKeydown}\n tabindex={0}\n >\n {slots.default?.()}\n {slots.label?.()\n || (props.value.label && (\n <label class={`${baseClass.value}__label`}>\n {props.value.label}\n </label>\n ))}\n </div>\n );\n },\n});\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Accessible toggle switch for binary settings that take effect immediately.\n *\n * Use for \"notifications on/off\", \"dark mode\", \"auto-save\" — anything where the\n * change commits the instant the user toggles it. For form state held until submit,\n * use a checkbox instead; the visual difference signals when the change applies.\n *\n * ## Custom value types\n *\n * Generic over `T` (default `boolean`). To bind v-model to a non-boolean state,\n * declare `trueValue` and `falseValue` together:\n *\n * const status = ref<'active' | 'paused'>('paused')\n * // template: TSwitch v-model=\"status\" :true-value=\"'active'\" :false-value=\"'paused'\"\n *\n * The \"on\" position emits `trueValue`; the \"off\" position emits `falseValue`. Useful\n * for state machines, form payloads with string enums, or anywhere boolean coercion\n * would lose semantic meaning. Reach for it when v-model would otherwise need a\n * derived boolean adapter — not for simple on/off, which is the 95% case.\n *\n * The legacy `value` prop is `boolean`-only; don't mix it with non-boolean generic mode.\n *\n * ## Theming\n *\n * The \"on\" track resolves to `var(--primary-solid)` — the tenant brand.\n * Wrap a subtree in `TThemeProvider` with a brand override to retheme at runtime\n * (no re-renders; CSS variable cascade only).\n */\nexport interface TSwitchProps<T = boolean> {\n /** Visible label rendered next to the switch. Also serves as the accessible name. */\n label?: string;\n\n /** Disables interaction. @defaultValue false */\n disabled?: boolean;\n\n /**\n * Initial / fallback checked state. **Deprecated — prefer `v-model`** (`modelValue`).\n * Kept for the pre-migration `:value` + `@input` API; removal in a future major.\n * Boolean-only — don't mix with non-boolean generic mode.\n */\n value?: boolean;\n\n /** Two-way bound state. Idiomatic usage: `v-model=\"enabled\"`. */\n modelValue?: T;\n\n /** Value emitted when the switch is \"on\". Default: `true` (when T = boolean). */\n trueValue?: T;\n\n /** Value emitted when the switch is \"off\". Default: `false` (when T = boolean). */\n falseValue?: T;\n\n /** Position of the label relative to the switch. @defaultValue 'right' */\n labelPosition?: 'left' | 'right';\n\n /** Explicit id for the underlying control. Auto-generated via `useId()` if omitted. */\n id?: string;\n\n /**\n * Element the outer wrapper renders as. Use `'label'` to make the entire row\n * clickable (native `label for=...` toggles the switch), `'li'` when placing\n * switches inside a `ul`, or a component for polymorphic rendering.\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\nexport interface TSwitchEmits<T = boolean> {\n /** Fires on every toggle (mouse, Space, Enter). Payload is the new value. */\n change: [value: T];\n /** Mirrors `change`. **Deprecated** — use `@change` or `v-model`. */\n input: [value: T];\n}\n\nexport interface TSwitchSlots {\n /** Override the default label rendering. Receives the resolved `label` prop. */\n label?: (props: { label: string | undefined }) => unknown;\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T = boolean\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { Label, Primitive, SwitchRoot, SwitchThumb } from 'reka-ui';\nimport { computed, useId } from 'vue';\n\ndefineOptions({\n name: 'TSwitch',\n inheritAttrs: false,\n});\n\nconst {\n modelValue,\n value,\n trueValue,\n falseValue,\n label,\n labelPosition = 'right',\n disabled,\n id,\n as = 'div',\n} = defineProps<TSwitchProps<T>>();\n\nconst emit = defineEmits<TSwitchEmits<T>>();\ndefineSlots<TSwitchSlots>();\n\nconst model = defineModel<T>();\n// LEGACY COMPAT: folds the deprecated `value` prop into the model so pre-v-model\n// consumers using `:value` + `@input` keep working (still live in webapp-frontend\n// HorizontalToggle / PortalHorizontalField and frontend AtoaSteps). Drop this — with\n// the `value` prop and `input` emit — once those migrate to v-model.\nconst forwardedModelValue = computed<T | undefined>(() => modelValue ?? (value as T | undefined));\n\nconst generatedId = useId();\nconst switchId = computed(() => id ?? generatedId);\n\nconst { wrapperAttrs, controlAttrs } = useForwardedAttrs();\n\nconst onUpdate = (next: T) => {\n model.value = next;\n emit('change', next);\n emit('input', next); // LEGACY COMPAT: alias of `change` for pre-v-model `@input` consumers.\n};\n</script>\n\n<template>\n <Primitive\n v-bind=\"wrapperAttrs\"\n :as\n class=\"t-switch\"\n :data-label-position=\"labelPosition\"\n :data-disabled=\"disabled || undefined\"\n >\n <SwitchRoot\n :id=\"switchId\"\n v-bind=\"controlAttrs\"\n :model-value=\"forwardedModelValue\"\n :true-value\n :false-value\n :disabled\n class=\"t-switch-track\"\n @update:model-value=\"onUpdate\"\n >\n <SwitchThumb class=\"t-switch-thumb\" />\n </SwitchRoot>\n\n <Label\n v-if=\"label || $slots.label\"\n :as=\"as === 'label' ? 'span' : 'label'\"\n :for=\"as === 'label' ? undefined : switchId\"\n class=\"t-switch-label\"\n >\n <slot name=\"label\" :label>\n {{ label }}\n </slot>\n </Label>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n$track-width: 2.5rem;\n$track-height: 1.25rem;\n$thumb-size: 1rem;\n$thumb-inset: 2px;\n$thumb-translate: calc(#{$track-width} - #{$thumb-size} - #{$thumb-inset} - #{$thumb-inset});\n\n.t-switch {\n display: inline-flex;\n align-items: center;\n gap: var(--space-8);\n\n &[data-label-position='left'] {\n flex-direction: row-reverse;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: var(--opacity-50);\n }\n}\n\n.t-switch-track {\n position: relative;\n display: inline-flex;\n flex-shrink: 0;\n width: $track-width;\n height: $track-height;\n padding: 0;\n border: 0;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n cursor: pointer;\n outline: var(--focus-ring-width) solid transparent;\n outline-offset: var(--focus-ring-offset);\n transition:\n background-color var(--motion-control-duration) var(--motion-control-easing),\n outline-color var(--motion-control-duration) var(--motion-control-easing),\n box-shadow var(--motion-control-duration) var(--motion-control-easing);\n\n &[data-state='checked'] {\n background: var(--primary-solid);\n }\n\n &:not([data-disabled]):hover {\n background: var(--neutral-bg-hover);\n\n &[data-state='checked'] {\n background: var(--primary-solid-hover);\n }\n }\n\n &[data-disabled]:not([data-state='checked']) {\n background: var(--neutral-bg-subtle);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline-color: var(--primary-border);\n box-shadow: 0 0 0 var(--focus-ring-halo-width) var(--color-primary-alpha-5);\n }\n}\n\n.t-switch-thumb {\n display: block;\n width: $thumb-size;\n height: $thumb-size;\n margin: $thumb-inset;\n border-radius: var(--radius-full);\n background: var(--color-base-white);\n box-shadow: var(--shadow-sm);\n transition:\n transform var(--motion-control-duration) var(--motion-control-easing),\n box-shadow var(--motion-control-duration) var(--motion-control-easing);\n will-change: transform;\n\n &[data-state='checked'] {\n transform: translateX($thumb-translate);\n }\n\n .t-switch-track:not([data-disabled]):active & {\n box-shadow: none;\n }\n\n .t-switch-track[data-disabled] & {\n box-shadow: none;\n }\n}\n\n.t-switch-label {\n font-family: var(--font-family-base);\n font-size: var(--font-b2-font-size);\n line-height: var(--font-b2-line-height);\n font-weight: var(--font-weight-regular);\n color: var(--neutral-text-contrast);\n cursor: pointer;\n user-select: none;\n\n .t-switch[data-disabled] & {\n cursor: not-allowed;\n color: var(--neutral-solid);\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Accessible toggle switch for binary settings that take effect immediately.\n *\n * Use for \"notifications on/off\", \"dark mode\", \"auto-save\" — anything where the\n * change commits the instant the user toggles it. For form state held until submit,\n * use a checkbox instead; the visual difference signals when the change applies.\n *\n * ## Custom value types\n *\n * Generic over `T` (default `boolean`). To bind v-model to a non-boolean state,\n * declare `trueValue` and `falseValue` together:\n *\n * const status = ref<'active' | 'paused'>('paused')\n * // template: TSwitch v-model=\"status\" :true-value=\"'active'\" :false-value=\"'paused'\"\n *\n * The \"on\" position emits `trueValue`; the \"off\" position emits `falseValue`. Useful\n * for state machines, form payloads with string enums, or anywhere boolean coercion\n * would lose semantic meaning. Reach for it when v-model would otherwise need a\n * derived boolean adapter — not for simple on/off, which is the 95% case.\n *\n * The legacy `value` prop is `boolean`-only; don't mix it with non-boolean generic mode.\n *\n * ## Theming\n *\n * The \"on\" track resolves to `var(--primary-solid)` — the tenant brand.\n * Wrap a subtree in `TThemeProvider` with a brand override to retheme at runtime\n * (no re-renders; CSS variable cascade only).\n */\nexport interface TSwitchProps<T = boolean> {\n /** Visible label rendered next to the switch. Also serves as the accessible name. */\n label?: string;\n\n /** Disables interaction. @defaultValue false */\n disabled?: boolean;\n\n /**\n * Initial / fallback checked state. **Deprecated — prefer `v-model`** (`modelValue`).\n * Kept for the pre-migration `:value` + `@input` API; removal in a future major.\n * Boolean-only — don't mix with non-boolean generic mode.\n */\n value?: boolean;\n\n /** Two-way bound state. Idiomatic usage: `v-model=\"enabled\"`. */\n modelValue?: T;\n\n /** Value emitted when the switch is \"on\". Default: `true` (when T = boolean). */\n trueValue?: T;\n\n /** Value emitted when the switch is \"off\". Default: `false` (when T = boolean). */\n falseValue?: T;\n\n /** Position of the label relative to the switch. @defaultValue 'right' */\n labelPosition?: 'left' | 'right';\n\n /** Explicit id for the underlying control. Auto-generated via `useId()` if omitted. */\n id?: string;\n\n /**\n * Element the outer wrapper renders as. Use `'label'` to make the entire row\n * clickable (native `label for=...` toggles the switch), `'li'` when placing\n * switches inside a `ul`, or a component for polymorphic rendering.\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\nexport interface TSwitchEmits<T = boolean> {\n /** Fires on every toggle (mouse, Space, Enter). Payload is the new value. */\n change: [value: T];\n /** Mirrors `change`. **Deprecated** — use `@change` or `v-model`. */\n input: [value: T];\n}\n\nexport interface TSwitchSlots {\n /** Override the default label rendering. Receives the resolved `label` prop. */\n label?: (props: { label: string | undefined }) => unknown;\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T = boolean\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { Label, Primitive, SwitchRoot, SwitchThumb } from 'reka-ui';\nimport { computed, useId } from 'vue';\n\ndefineOptions({\n name: 'TSwitch',\n inheritAttrs: false,\n});\n\nconst {\n modelValue,\n value,\n trueValue,\n falseValue,\n label,\n labelPosition = 'right',\n disabled,\n id,\n as = 'div',\n} = defineProps<TSwitchProps<T>>();\n\nconst emit = defineEmits<TSwitchEmits<T>>();\ndefineSlots<TSwitchSlots>();\n\nconst model = defineModel<T>();\n// LEGACY COMPAT: folds the deprecated `value` prop into the model so pre-v-model\n// consumers using `:value` + `@input` keep working (still live in webapp-frontend\n// HorizontalToggle / PortalHorizontalField and frontend AtoaSteps). Drop this — with\n// the `value` prop and `input` emit — once those migrate to v-model.\nconst forwardedModelValue = computed<T | undefined>(() => modelValue ?? (value as T | undefined));\n\nconst generatedId = useId();\nconst switchId = computed(() => id ?? generatedId);\n\nconst { wrapperAttrs, controlAttrs } = useForwardedAttrs();\n\nconst onUpdate = (next: T) => {\n model.value = next;\n emit('change', next);\n emit('input', next); // LEGACY COMPAT: alias of `change` for pre-v-model `@input` consumers.\n};\n</script>\n\n<template>\n <Primitive\n v-bind=\"wrapperAttrs\"\n :as\n class=\"t-switch\"\n :data-label-position=\"labelPosition\"\n :data-disabled=\"disabled || undefined\"\n >\n <SwitchRoot\n :id=\"switchId\"\n v-bind=\"controlAttrs\"\n :model-value=\"forwardedModelValue\"\n :true-value\n :false-value\n :disabled\n class=\"t-switch-track\"\n @update:model-value=\"onUpdate\"\n >\n <SwitchThumb class=\"t-switch-thumb\" />\n </SwitchRoot>\n\n <Label\n v-if=\"label || $slots.label\"\n :as=\"as === 'label' ? 'span' : 'label'\"\n :for=\"as === 'label' ? undefined : switchId\"\n class=\"t-switch-label\"\n >\n <slot name=\"label\" :label>\n {{ label }}\n </slot>\n </Label>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n$track-width: 2.5rem;\n$track-height: 1.25rem;\n$thumb-size: 1rem;\n$thumb-inset: 2px;\n$thumb-translate: calc(#{$track-width} - #{$thumb-size} - #{$thumb-inset} - #{$thumb-inset});\n\n.t-switch {\n display: inline-flex;\n align-items: center;\n gap: var(--space-8);\n\n &[data-label-position='left'] {\n flex-direction: row-reverse;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: var(--opacity-50);\n }\n}\n\n.t-switch-track {\n position: relative;\n display: inline-flex;\n flex-shrink: 0;\n width: $track-width;\n height: $track-height;\n padding: 0;\n border: 0;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n cursor: pointer;\n outline: var(--focus-ring-width) solid transparent;\n outline-offset: var(--focus-ring-offset);\n transition:\n background-color var(--motion-control-duration) var(--motion-control-easing),\n outline-color var(--motion-control-duration) var(--motion-control-easing),\n box-shadow var(--motion-control-duration) var(--motion-control-easing);\n\n &[data-state='checked'] {\n background: var(--primary-solid);\n }\n\n &:not([data-disabled]):hover {\n background: var(--neutral-bg-hover);\n\n &[data-state='checked'] {\n background: var(--primary-solid-hover);\n }\n }\n\n &[data-disabled]:not([data-state='checked']) {\n background: var(--neutral-bg-subtle);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline-color: var(--primary-border);\n box-shadow: 0 0 0 var(--focus-ring-halo-width) var(--color-primary-alpha-5);\n }\n}\n\n.t-switch-thumb {\n display: block;\n width: $thumb-size;\n height: $thumb-size;\n margin: $thumb-inset;\n border-radius: var(--radius-full);\n background: var(--color-base-white);\n box-shadow: var(--shadow-sm);\n transition:\n transform var(--motion-control-duration) var(--motion-control-easing),\n box-shadow var(--motion-control-duration) var(--motion-control-easing);\n will-change: transform;\n\n &[data-state='checked'] {\n transform: translateX($thumb-translate);\n }\n\n .t-switch-track:not([data-disabled]):active & {\n box-shadow: none;\n }\n\n .t-switch-track[data-disabled] & {\n box-shadow: none;\n }\n}\n\n.t-switch-label {\n font-family: var(--font-family-base);\n font-size: var(--font-b2-font-size);\n line-height: var(--font-b2-line-height);\n font-weight: var(--font-weight-regular);\n color: var(--neutral-text-contrast);\n cursor: pointer;\n user-select: none;\n\n .t-switch[data-disabled] & {\n cursor: not-allowed;\n color: var(--neutral-solid);\n }\n}\n</style>\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color: theme.value.typography.color,\n fontFamily: theme.value.typography.fontFamily,\n },\n '&__ul': {\n display: 'flex',\n listStyleType: 'none',\n gap: '1.5rem',\n },\n '&__button': {\n backgroundColor: 'transparent',\n border: '0',\n outline: 'none',\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n textAlign: 'center',\n '&:hover': {\n cursor: 'pointer',\n fontWeight: theme.value.typography.fontWeight.semibold,\n },\n },\n '&__not-selected': {\n '&:hover': {\n '&:after': {\n content: '\"\"',\n float: 'left',\n background: theme.value.colors.primary.light1,\n width: '100%',\n height: '0.25rem',\n borderRadius: '0.5rem',\n },\n },\n },\n '&__selected': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n '&:after': {\n content: '\"\"',\n float: 'left',\n background: theme.value.colors.primary.main,\n width: '100%',\n height: '0.25rem',\n borderRadius: '0.5rem',\n },\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TTabBarProps } from './TTabBar.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport { useStyles } from './TTabBar.styles';\n\nexport const TTabBar = defineComponent({\n name: 'TTabBar',\n emits: ['input', 'change', 'update:modelValue'],\n props: {\n labels: Array as PropType<TTabBarProps['labels']>,\n value: String as PropType<TTabBarProps['value']>,\n modelValue: String as PropType<TTabBarProps['modelValue']>,\n },\n setup(_props, { attrs, emit }) {\n const props = computed(() => merge({}, _props, attrs));\n const baseClass = useStyles();\n\n const selected = ref(props.value.modelValue !== undefined\n ? props.value.modelValue\n : props.value.value);\n watch([() => props.value.modelValue, () => props.value.value], () => {\n selected.value\n = props.value.modelValue !== undefined\n ? props.value.modelValue\n : props.value.value;\n });\n\n const handleOnClick = (label: string) => {\n emit('update:modelValue', label);\n emit('input', label);\n emit('change', label);\n selected.value = label;\n };\n\n return () => (\n <nav class={[baseClass.value]}>\n <ul\n class={[`${baseClass.value}__ul`, `${baseClass.value}`]}\n role=\"tablist\"\n >\n {props.value.labels?.map((label) => (\n <li role=\"tab\" aria-selected={selected.value === label} key={label}>\n <button\n class={[\n `${baseClass.value}__button`,\n {\n [`${baseClass.value}__selected`]: selected.value === label,\n [`${baseClass.value}__not-selected`]:\n selected.value !== label,\n },\n ]}\n onClick={() => handleOnClick(label)}\n >\n {label}\n </button>\n </li>\n ))}\n </ul>\n </nav>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n paddingBottom: '0.625rem',\n color: theme.value.colors.gray.main,\n alignItems: 'center',\n whiteSpace: 'nowrap',\n cursor: 'pointer',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '14rem',\n textWrap: 'nowrap',\n WebkitLineClamp: 1,\n WebkitBoxOrient: 'vertical',\n '&--selected': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n borderBottom: `0.125rem solid ${theme.value.colors.primary.dark}`,\n marginBottom: '-0.125rem',\n },\n '&__dropdown-trigger': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n color: theme.value.colors.primary.dark,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TabSelectionProvider } from '../TTabBarExtended.types';\nimport type { TTabProps } from './TTab.types';\nimport { computed, defineComponent, inject } from 'vue';\nimport { useStyles } from './TTab.styles';\n\nexport const TTab = defineComponent({\n name: 'TTab',\n props: {\n id: {\n type: String as PropType<TTabProps['id']>,\n required: true,\n },\n selected: {\n type: Boolean as PropType<TTabProps['selected']>,\n default: false,\n },\n value: {\n type: [String, Number, Boolean, Object, Array] as PropType<\n TTabProps['value']\n >,\n required: true,\n },\n },\n setup(props, { slots }) {\n const baseClass = useStyles();\n\n const provider = inject<TabSelectionProvider>('tabSelection');\n if (!provider) {\n throw new Error('tabSelection provider missing.');\n }\n const { selectTab } = provider;\n\n const handleClick = () => {\n selectTab(props.id);\n };\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Enter') {\n return;\n }\n\n event.preventDefault();\n selectTab(props.id);\n };\n\n const ariaLabel = computed(() => (props.selected ? 'selected' : ''));\n\n return () => (\n <div\n class={[\n baseClass.value,\n ariaLabel.value === 'selected' ? `${baseClass.value}--selected` : '',\n ]}\n aria-label={ariaLabel.value}\n onClick={handleClick}\n onKeydown={handleKeydown}\n role=\"tab\"\n tabindex={0}\n >\n {slots.default?.()}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n width: '100%',\n borderBottom: `0.125rem solid ${theme.value.colors.gray.medium2}`,\n display: 'flex',\n gap: '2.5rem',\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type {\n IdentifiedTab,\n TTabBarExtendedProps,\n} from './TTabBarExtended.types';\nimport { computed, defineComponent, provide, ref } from 'vue';\nimport { TDropdown, TDropdownItem } from '../TDropdown';\nimport { TTab } from './TTab';\nimport { useStyles as useTTabStyles } from './TTab/TTab.styles';\nimport { useStyles } from './TTabBarExtended.styles';\n\nexport const TTabBarExtended = defineComponent({\n name: 'TTabBarExtended',\n emits: ['select'],\n props: {\n tabs: {\n type: Array as PropType<TTabBarExtendedProps['tabs']>,\n required: true,\n },\n maxTabs: {\n type: Number as PropType<TTabBarExtendedProps['maxTabs']>,\n },\n initialLabel: {\n type: String as PropType<TTabBarExtendedProps['initialLabel']>,\n },\n selectedValue: {\n type: [String, Number, Object] as PropType<TTabBarExtendedProps['selectedValue']>,\n },\n },\n setup(props, { emit }) {\n const baseClass = useStyles();\n const tTabBaseClass = useTTabStyles();\n\n const identifiedTabs = computed(() => props.tabs.map((tab, index): IdentifiedTab => ({\n id: `${index}`,\n label: tab.label,\n value: tab.value,\n })));\n\n const initialTab = computed(() => {\n if (!props.initialLabel) {\n return identifiedTabs.value[0];\n }\n\n return (\n identifiedTabs.value.find((tab) => tab.label === props.initialLabel)\n ?? identifiedTabs.value[0]\n );\n });\n const selectedTab = ref(initialTab.value);\n\n const isControlled = computed(() => props.selectedValue !== undefined);\n const effectiveSelectedTab = computed(() => {\n if (isControlled.value) {\n const found = identifiedTabs.value.find((tab) => tab.value === props.selectedValue);\n return found ?? identifiedTabs.value[0];\n }\n return selectedTab.value;\n });\n\n const isDropdownOpen = ref(false);\n\n const selectTab = (index: string) => {\n const newSelectedTab = identifiedTabs.value.find((tab) => tab.id === index);\n if (!newSelectedTab) {\n throw new Error('No tab was found.');\n }\n if (effectiveSelectedTab.value.id === index) {\n return;\n }\n\n if (!isControlled.value) {\n selectedTab.value = newSelectedTab;\n }\n\n emit('select', newSelectedTab.value);\n };\n provide('tabSelection', { selectTab });\n\n const amountOfTabs = computed(() => identifiedTabs.value.length);\n const maxAmountOfTabs = computed(() => Math.min(amountOfTabs.value, props.maxTabs || Infinity));\n const visibleTabs = computed(() => {\n if (amountOfTabs.value === maxAmountOfTabs.value) {\n return identifiedTabs.value;\n }\n\n const tabs = identifiedTabs.value.slice(0, maxAmountOfTabs.value - 1);\n const selectedTabIsAlreadyVisible = tabs.some(({ id }) => id === effectiveSelectedTab.value.id);\n if (selectedTabIsAlreadyVisible) {\n tabs.push(identifiedTabs.value[maxAmountOfTabs.value - 1]);\n } else {\n tabs.push(effectiveSelectedTab.value);\n }\n\n return tabs;\n });\n\n const shouldDropdownExist = computed(() => visibleTabs.value.length < identifiedTabs.value.length);\n\n const toggleIsDropdownOpen = () => {\n isDropdownOpen.value = !isDropdownOpen.value;\n };\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const handleClickInDropdownTrigger = () => {\n toggleIsDropdownOpen();\n };\n const handleOnKeyPressInDropdownTrigger = (event: KeyboardEvent) => {\n event.preventDefault();\n\n if (event.key === 'Enter') {\n toggleIsDropdownOpen();\n }\n };\n\n const handleClickInDropdownItem = (index: string) => {\n selectTab(index);\n closeDropdown();\n };\n\n const Dropdown = () => (\n <TDropdown\n open={isDropdownOpen.value}\n position=\"center\"\n onCancel={toggleIsDropdownOpen}\n >\n {{\n trigger: () => (\n <div\n class={[\n tTabBaseClass.value,\n `${tTabBaseClass.value}__dropdown-trigger`,\n ]}\n onClick={handleClickInDropdownTrigger}\n onKeypress={handleOnKeyPressInDropdownTrigger}\n tabindex={0}\n role=\"button\"\n >\n . . .\n </div>\n ),\n default: () => identifiedTabs.value.map((tab) => (\n <TDropdownItem\n disabled={effectiveSelectedTab.value.id === tab.id}\n onClick={() => handleClickInDropdownItem(tab.id)}\n >\n {tab.label}\n </TDropdownItem>\n )),\n }}\n </TDropdown>\n );\n\n return () => (\n <nav role=\"navigation\" class={[baseClass.value]}>\n {visibleTabs.value.map((tab) => (\n <TTab\n key={`${tab.label}-${tab.id}`}\n id={tab.id}\n selected={effectiveSelectedTab.value.id === tab.id}\n value={tab.value}\n >\n {tab.label}\n </TTab>\n ))}\n {shouldDropdownExist.value ? <Dropdown /> : null}\n </nav>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color: theme.value.typography.color,\n fontFamily: theme.value.typography.fontFamily,\n },\n '&__container': {\n gap: theme.value.spacing,\n display: 'flex',\n flexDirection: 'column',\n width: '358px',\n },\n '&__label': {\n display: 'block',\n fontSize: '14px',\n fontStyle: 'normal',\n fontWeight: 600,\n lineHeight: '20px',\n },\n '&__textarea-wrapper': {\n position: 'relative',\n },\n '&__textarea': {\n display: 'flex',\n width: '100%',\n height: '80px',\n overflow: 'auto',\n resize: 'none',\n background: '#FFF',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderRadius: theme.value.input.borderRadius,\n padding: '6px 8px',\n gap: '8px',\n fontSize: '13px',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: '22px',\n '&::placeholder': {\n color: theme.value.colors.gray.medium2,\n },\n '&:hover': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&:focus': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&:disabled': {\n background: theme.value.colors.gray.light3,\n borderColor: theme.value.colors.gray.light3,\n },\n },\n '&__textarea--auto-resize': {\n overflowY: 'auto',\n },\n '&__helper-text': {\n fontSize: '12px',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: '18px',\n color: theme.value.colors.gray.medium1,\n },\n '&--error &__textarea, &error &__textarea:focus': {\n borderColor: theme.value.colors.error,\n },\n '&--error &__helper-text': {\n color: theme.value.colors.error,\n },\n '&--full-width': {\n width: '100%',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { TTextAreaProps } from './TTextArea.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, nextTick, ref, watch } from 'vue';\nimport { useStyles } from './TTextArea.styles';\n\nconst DEFAULT_AUTO_RESIZE_ROWS = 1;\n\nexport const TTextArea = defineComponent({\n name: 'TTextArea',\n emits: ['input', 'change', 'update:modelValue', 'focus', 'blur'],\n props: {\n id: String as PropType<TTextAreaProps['id']>,\n value: String as PropType<TTextAreaProps['value']>,\n modelValue: String as PropType<TTextAreaProps['modelValue']>,\n label: String as PropType<TTextAreaProps['label']>,\n error: Boolean as PropType<TTextAreaProps['error']>,\n disabled: Boolean as PropType<TTextAreaProps['disabled']>,\n placeholder: String as PropType<TTextAreaProps['placeholder']>,\n helperText: String as PropType<TTextAreaProps['helperText']>,\n fullWidth: Boolean as PropType<TTextAreaProps['fullWidth']>,\n maxlength: Number as PropType<TTextAreaProps['maxlength']>,\n autoResize: Boolean as PropType<TTextAreaProps['autoResize']>,\n maxRows: {\n type: Number as PropType<TTextAreaProps['maxRows']>,\n default: undefined,\n },\n },\n setup(_props, { attrs, emit, slots, expose }) {\n const props = computed(() => merge({}, _props, attrs));\n const baseClass = useStyles();\n\n const internalValue = computed({\n get: () => (props.value.modelValue !== undefined\n ? props.value.modelValue\n : props.value.value),\n set: (newValue) => {\n emit('update:modelValue', newValue);\n emit('input', newValue);\n emit('change', newValue);\n },\n });\n\n const resizeTextarea = () => {\n const el = textarea.value;\n if (!el || !props.value.autoResize) {\n return;\n }\n el.style.height = 'auto';\n const styles = getComputedStyle(el);\n const borderTop = Number.parseFloat(styles.borderTopWidth);\n const borderBottom = Number.parseFloat(styles.borderBottomWidth);\n const maxRows = props.value.maxRows;\n if (maxRows) {\n const lineHeight = Number.parseFloat(styles.lineHeight);\n const paddingTop = Number.parseFloat(styles.paddingTop);\n const paddingBottom = Number.parseFloat(styles.paddingBottom);\n const maxHeight\n = lineHeight * maxRows + paddingTop + paddingBottom + borderTop + borderBottom;\n el.style.maxHeight = `${maxHeight}px`;\n }\n el.style.height = `${el.scrollHeight + borderTop + borderBottom}px`;\n };\n\n const handleInput = (event: Event) => {\n internalValue.value = (event.target as HTMLTextAreaElement).value;\n resizeTextarea();\n };\n\n const handleFocus = (event: Event) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: Event) => {\n emit('blur', event);\n };\n\n const textarea = ref<Nullable<HTMLTextAreaElement>>(null);\n const focus = () => {\n textarea.value?.focus();\n };\n expose({ focus });\n\n watch(\n () => internalValue.value,\n async () => {\n if (!props.value.autoResize) {\n return;\n }\n await nextTick();\n resizeTextarea();\n },\n );\n\n return () => (\n <div\n class={[\n baseClass.value,\n `${baseClass.value}__container`,\n {\n [`${baseClass.value}--error`]: props.value.error,\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n [`${baseClass.value}--multiline`]: props.value.multiline,\n },\n ]}\n >\n {slots.label?.()\n || (props.value.label && (\n <label class={[`${baseClass.value}__label`]} for={props.value.id}>\n {props.value.label}\n </label>\n ))}\n <div class={`${baseClass.value}__textarea-wrapper`}>\n <textarea\n {...attrs}\n id={props.value.id}\n class={[\n `${baseClass.value}__textarea`,\n { [`${baseClass.value}__textarea--auto-resize`]: props.value.autoResize },\n ]}\n style={props.value.autoResize ? { height: 'auto' } : undefined}\n rows={props.value.autoResize ? DEFAULT_AUTO_RESIZE_ROWS : undefined}\n placeholder={props.value.placeholder}\n value={internalValue.value}\n onInput={handleInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n disabled={props.value.disabled}\n maxlength={props.value.maxlength}\n ref={textarea}\n />\n </div>\n {slots.helperText?.()\n || (props.value.helperText && (\n <p class={`${baseClass.value}__helper-text`}>\n {props.value.helperText}\n </p>\n ))}\n </div>\n );\n },\n});\n","import type { PropType } from 'vue';\nimport type { TThemeOverride } from '../../theme/utils';\nimport { computed, defineComponent, h, provide } from 'vue';\nimport { injectionKey } from '../../composables/theme';\nimport { createTheme } from '../../theme/utils';\n\n/**\n * Props for `<TThemeProvider>` — root component that injects design tokens for a subtree.\n *\n * ## When to use\n *\n * Wrap any subtree that needs a different brand color than the library default\n * (Toku purple). Typical placements:\n *\n * - **App root**: matches one brand for the entire app (e.g. Toku's webapp uses defaults).\n * - **Per-tenant subtree**: multi-tenant white-label apps inject the tenant's brand\n * per request (e.g. payment-portal-frontend wraps each tenant's view).\n *\n * Without a `<TThemeProvider>`, components render with the default brand from\n * `toku-ui/tokens.css`. With one, the wrapped subtree gets a regenerated brand ramp.\n *\n * ## Basic usage\n *\n * ```vue\n * <script setup>\n * import { TThemeProvider } from 'toku-ui';\n * </script>\n *\n * <template>\n * <TThemeProvider :theme=\"{ colors: { brand: { base: '#FF6600' } } }\">\n * <App />\n * </TThemeProvider>\n * </template>\n * ```\n *\n * ## How it works\n *\n * The provider renders a `<div class=\"toku-theme\">` wrapper with the brand-derived CSS\n * variables set inline. Descendant components reading `var(--color-bg-primary-default)`\n * (and every other brand-derived semantic) resolve to the new brand color via standard\n * CSS-variable cascade. **Zero Vue re-renders** — only browser CSS recalc.\n */\nexport interface TThemeProviderProps {\n /**\n * Theme override. Pass `{ colors: { brand: { base: '#hex' } } }` (canonical) or the\n * legacy `{ colors: { primary: { main: '#hex' } } }` shape. Both regenerate the\n * 12-step brand ramp + alpha twin and propagate via CSS variables to descendants.\n *\n * Omit the prop entirely to use the library defaults (Toku purple).\n *\n * @example\n * ```vue\n * <!-- Tenant-specific brand -->\n * <TThemeProvider :theme=\"{ colors: { brand: { base: '#FF6600' } } }\">\n * <PaymentForm />\n * </TThemeProvider>\n * ```\n */\n theme?: TThemeOverride;\n}\n\nexport const TThemeProvider = defineComponent({\n name: 'TThemeProvider',\n inheritAttrs: false,\n props: {\n theme: {\n type: Object as PropType<TThemeProviderProps['theme']>,\n default: () => ({}),\n },\n },\n setup(props, { slots, attrs }) {\n const theme = computed(() => createTheme(props.theme ?? {}));\n\n provide(injectionKey, theme);\n\n return () => {\n const { cssVars } = theme.value;\n // Pass class + style as arrays so Vue normalizes every supported binding\n // shape (string, array, or object). Spreading attrs.style would break when\n // it's a string ('display:flex' → { 0: 'd', 1: 'i', ... }); same risk for class.\n return h(\n 'div',\n {\n ...attrs,\n class: ['toku-theme', attrs.class],\n style: cssVars ? [attrs.style, cssVars] : attrs.style,\n },\n slots.default?.(),\n );\n };\n },\n});\n","import { onBeforeUnmount, onMounted } from 'vue';\n\nexport function useClickOutside(\n target: () => HTMLElement | null,\n callback: () => void,\n) {\n const handleClick = (event: MouseEvent) => {\n const el = target();\n if (el && !el.contains(event.target as Node)) {\n callback();\n }\n };\n\n onMounted(() => {\n document.addEventListener('click', handleClick);\n });\n\n onBeforeUnmount(() => {\n document.removeEventListener('click', handleClick);\n });\n}\n","import type { ComputedRef } from 'vue';\nimport type { TTooltipProps } from '../components/TTooltip/TTooltip.types';\nimport { useClickOutside } from '@/composables/click';\nimport { computed, ref } from 'vue';\n\nexport const useTooltip = (trigger: ComputedRef<TTooltipProps['trigger']>) => {\n const isVisible = ref(false);\n let hideTimeout: ReturnType<typeof setTimeout> | null = null;\n\n const show = () => {\n isVisible.value = true;\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n }\n };\n const hide = () => (isVisible.value = false);\n const enqueueHide = () => {\n const HIDE_DELAY_IN_SECONDS = 0.1;\n hideTimeout = setTimeout(hide, HIDE_DELAY_IN_SECONDS * 1000);\n };\n\n const triggerHandlers = {\n hover: {\n onMouseenter: show,\n onMouseleave: enqueueHide,\n },\n click: {\n onClick: () => (isVisible.value ? hide() : show()),\n },\n };\n const triggerHandler = computed(() => triggerHandlers[trigger.value ?? 'hover']);\n\n const wrapperRef = ref<HTMLElement | null>(null);\n useClickOutside(() => wrapperRef.value, hide);\n\n return {\n isVisible,\n triggerHandler,\n wrapperRef,\n };\n};\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n position: 'relative',\n width: 'fit-content',\n '&, *': {\n padding: 0,\n margin: 0,\n boxSizing: 'border-box',\n },\n '&__tooltip': {\n display: 'none',\n position: 'absolute',\n width: 'fit-content',\n background: '#fff',\n boxShadow: '3px 4px 25px 0px #26323826',\n borderRadius: '1rem',\n padding: '0.75rem 1rem',\n whiteSpace: 'nowrap',\n fontSize: '0.75rem',\n weight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.125rem',\n '&:before': {\n content: '\"\"',\n width: 0,\n height: 0,\n position: 'absolute',\n borderStyle: 'solid',\n },\n },\n '&--visible &__tooltip': {\n display: 'block',\n },\n '&--top &__tooltip': {\n marginBottom: '1.5rem',\n left: '50%',\n bottom: '100%',\n transform: 'translateX(-50%)',\n background: '#fff',\n '&:before': {\n left: '50%',\n top: '99%',\n transform: 'translateX(-50%)',\n borderWidth: '15px 7.5px 0px 7.5px',\n borderColor: '#fff transparent transparent transparent',\n },\n },\n '&--right &__tooltip': {\n marginLeft: '1.5rem',\n top: '50%',\n left: '100%',\n transform: 'translateY(-50%)',\n '&:before': {\n top: '50%',\n right: '99%',\n transform: 'translateY(-50%)',\n borderWidth: '7.5px 15px 7.5px 0',\n borderColor: 'transparent #fff transparent transparent',\n },\n },\n '&--bottom &__tooltip': {\n marginTop: '1.5rem',\n left: '50%',\n top: '100%',\n transform: 'translateX(-50%)',\n '&:before': {\n left: '50%',\n bottom: '99%',\n transform: 'translateX(-50%)',\n borderWidth: '0 7.5px 15px 7.5px',\n borderColor: 'transparent transparent #fff transparent',\n },\n },\n '&--left &__tooltip': {\n marginRight: '1.5rem',\n top: '50%',\n right: '100%',\n transform: 'translateY(-50%)',\n '&:before': {\n top: '50%',\n left: '99%',\n transform: 'translateY(-50%)',\n borderWidth: '7.5px 0px 7.5px 15px',\n borderColor: 'transparent transparent transparent #fff',\n },\n },\n '&--multilined &__tooltip': {\n whiteSpace: 'normal',\n width: 'max-content',\n },\n '&--small &__tooltip': {\n maxWidth: '25ch',\n },\n '&--medium &__tooltip': {\n maxWidth: '30ch',\n },\n '&--large &__tooltip': {\n maxWidth: '35ch',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TTooltipProps } from './TTooltip.types';\nimport { useTooltip } from '@/composables/tooltip';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TTooltip.styles';\n\nconst defaultProps = {\n position: 'right',\n size: 'medium',\n trigger: 'hover',\n};\n\nexport const TTooltip = defineComponent({\n name: 'TTooltip',\n props: {\n label: String as PropType<TTooltipProps['label']>,\n position: String as PropType<TTooltipProps['position']>,\n multilined: Boolean as PropType<TTooltipProps['multilined']>,\n size: String as PropType<TTooltipProps['size']>,\n trigger: String as PropType<TTooltipProps['trigger']>,\n },\n setup(_props, { slots, attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const trigger = computed(() => props.value.trigger);\n\n const { isVisible, wrapperRef, triggerHandler } = useTooltip(trigger);\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.position}`,\n `${baseClass.value}--${props.value.trigger}`,\n {\n [`${baseClass.value}--visible`]: isVisible.value,\n [`${baseClass.value}--multilined`]: props.value.multilined,\n [`${baseClass.value}--${props.value.size}`]: props.value.multilined,\n },\n ]);\n\n return () => (\n <div ref={wrapperRef} class={classes.value} {...triggerHandler.value}>\n {slots.default?.()}\n <div role=\"tooltip\" class={`${baseClass.value}__tooltip`}>\n {slots.label?.() || props.value.label}\n </div>\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { rgba } from 'polished';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n cursor: 'default',\n },\n borderRadius: '0.625rem',\n padding: '0.5rem',\n borderWidth: '1px',\n borderStyle: 'solid',\n width: '25rem',\n gap: '0.5rem',\n display: 'flex',\n alignItems: 'center',\n textAlign: 'left',\n '&--full-width': {\n width: '100%',\n },\n '&--default': {\n borderColor: theme.value.colors.gray.medium1,\n color: theme.value.colors.gray.medium1,\n background: theme.value.colors.gray.light3,\n },\n '&--default > &__text': {\n color: theme.value.colors.gray.medium1,\n },\n '&--success': {\n borderColor: theme.value.colors.success,\n color: theme.value.colors.success,\n background: rgba(theme.value.colors.success, 0.2),\n },\n '&--success > &__text': {\n color: theme.value.colors.success,\n },\n '&--in-process': {\n borderColor: theme.value.colors.inProcess,\n color: theme.value.colors.inProcess,\n background: rgba(theme.value.colors.inProcess, 0.2),\n },\n '&--in-process > &__text': {\n color: theme.value.colors.inProcessDark,\n },\n '&--warning': {\n borderColor: theme.value.colors.warning,\n color: theme.value.colors.warning,\n background: rgba(theme.value.colors.warning, 0.2),\n },\n '&--warning > &__text': {\n color: theme.value.colors.warning,\n },\n '&--error': {\n borderColor: theme.value.colors.error,\n color: theme.value.colors.error,\n background: rgba(theme.value.colors.error, 0.2),\n },\n '&--error > &__text': {\n color: theme.value.colors.error,\n },\n '&--info': {\n borderColor: theme.value.colors.info,\n color: theme.value.colors.info,\n background: rgba(theme.value.colors.info, 0.2),\n },\n '&--info > &__text': {\n color: theme.value.colors.info,\n },\n '&__icon': {\n minWidth: '1.5rem',\n width: '1.5rem',\n maxWidth: '1.5rem',\n aspectRatio: '1 / 1',\n height: 'auto',\n },\n [`@media (max-width: ${theme.value.breakpoints.desktop}px)`]: {\n alignItems: 'flex-start',\n\n '&__icon': {\n minWidth: '1rem',\n width: '1rem',\n maxWidth: '1rem',\n },\n\n '&__text': {\n fontWeight: '400',\n fontSize: '0.75rem',\n lineHeight: '1.125rem',\n },\n },\n }));\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TWarningProps } from './TWarning.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { TIcon } from '../TIcon';\nimport { TTypography } from '../TTypography';\nimport { useStyles } from './TWarning.styles';\n\nconst defaultProps = {\n variant: 'default',\n};\n\nexport const TWarning = defineComponent({\n name: 'TWarning',\n props: {\n fullWidth: Boolean as PropType<TWarningProps['fullWidth']>,\n icon: String as PropType<TWarningProps['icon']>,\n variant: String as PropType<TWarningProps['variant']>,\n },\n setup(_props, { slots }) {\n const props = computed(() => merge({}, defaultProps, _props));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n {\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n },\n ]);\n\n const colorMap = {\n default: 'gray.medium1',\n success: 'success',\n 'in-process': 'inProcessDark',\n warning: 'warning',\n error: 'error',\n info: 'info',\n };\n const iconColor = computed(() => colorMap[props.value.variant]);\n\n return () => (\n <div class={classes.value} role=\"alert\">\n {props.value.icon && (\n <TIcon\n icon={props.value.icon}\n class={`${baseClass.value}__icon`}\n color={iconColor.value}\n />\n )}\n {' '}\n {\n slots.content?.()\n ? slots.content?.()\n : (\n <TTypography variant=\"b3\" class={`${baseClass.value}__text`}>\n {slots.default?.()}\n </TTypography>\n )\n }\n </div>\n );\n },\n});\n","import type { TDialogProps } from '../components/TDialog/TDialog.types';\nimport { createApp, h } from 'vue';\nimport { TDialog } from '../components/TDialog';\n\ninterface DialogOptions extends TDialogProps {\n onCancel?: () => void;\n onConfirm?: () => void;\n}\n\nexport const useDialog = () => {\n const open = ({ onCancel, onConfirm, ...props }: DialogOptions) => {\n const modalContainer = document.createElement('div');\n document.body.appendChild(modalContainer);\n const app = createApp({\n render() {\n return h(TDialog, {\n ...props,\n onConfirm: () => {\n onConfirm?.();\n app.unmount();\n modalContainer.remove();\n },\n onCancel: () => {\n onCancel?.();\n app.unmount();\n modalContainer.remove();\n },\n onClose: () => {\n onCancel?.();\n app.unmount();\n modalContainer.remove();\n },\n });\n },\n });\n app.mount(modalContainer);\n };\n\n return {\n open,\n };\n};\n"],"x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"mappings":";;;;;AAAA,IAAa,KAAY;CACvB,QAAQ;EACN,SAAS;GACP,MAAM;GACN,WAAW;GACX,MAAM;GACN,MAAM;GACN,QAAQ;GACR,QAAQ;GACR,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,OAAO;GACP,OAAO;GACP,SAAS;GACT,SAAS;GACT,QAAQ;GACR,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACA,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,eAAe;EACf,MAAM;EACN,YAAY;CACd;CACA,YAAY;EACV,OAAO;EACP,YAAY;EACZ,iBAAiB;EACjB,YAAY;GACV,MAAM;GACN,UAAU;GACV,QAAQ;GACR,SAAS;EACX;CACF;CACA,QAAQ,EACN,cAAc,SAChB;CACA,OAAO,EACL,cAAc,WAChB;CACA,SAAS;CACT,aAAa;EACX,QAAQ;EACR,SAAS;CACX;CACA,SAAS;CACT,eAAe;AACjB;;;ACxDA,SAAS,GAAS,GAAO;CACrB,OAAO,OAAO,cAAc,CAAK,KAAK,KAAS;AACnD;;;ACAA,SAAS,GAAY,GAAO;CACxB,OAAO,KAAS,QAAQ,OAAO,KAAU,cAAc,GAAS,EAAM,MAAM;AAChF;;;ACJA,SAAS,GAAiB,GAAK;CAC3B,OAAO,MAAQ;AACnB;;;ACFA,SAAS,GAAU,GAAK;CACpB,QAAQ,OAAO,GAAf;EACI,KAAK;EACL,KAAK,UACD,OAAO;EAEX,KAAK,UACD,OAAO,EAAI,SAAS,GAAG,KAAK,EAAI,SAAS,GAAG,KAAK,EAAI,SAAS,GAAG;CAEzE;AACJ;;;ACVA,SAAS,GAAM,GAAO;CAOlB,OANI,OAAO,KAAU,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B,EAAA,OAAA;GAAA,OACOT,EAAQC;GAAK,MAAA;EAAA,GAAA;GACtBV,EAAMU,MAAMP,QAAIe,EAAAzB,GAAA;IAAA,MAEPO,EAAMU,MAAMP;IAAI,OACf,GAAGK,EAAUE,MAAK;IAAQ,OAC1BO,EAAUP;GAAK,GAAA,IAAA;GAGzB;GAECH,EAAMY,UAAU,IACZZ,EAAMY,UAAU,IAACD,EAAAxB,GAAA;IAAA,SAAA;IAAA,OAEkB,GAAGc,EAAUE,MAAK;GAAQ,GAAA,EAAAE,eAAA,CACxDL,EAAMK,UAAU,CAAC,EAAA,CAAA;EAErB,CAAA;CAIb;AACF,CAAC,GCtDY,YA6BJ,EACL,OA7BY,EAAE,aAAU,cAAW,GAAG,QAA2B;CACjE,IAAM,IAAiB,SAAS,cAAc,KAAK;CACnD,SAAS,KAAK,YAAY,CAAc;CACxC,IAAM,IAAM,EAAU,EACpB,SAAS;EACP,OAAO,EAAE,IAAS;GAChB,GAAG;GACH,iBAAiB;IAGf,AAFA,IAAY,GACZ,EAAI,QAAQ,GACZ,EAAe,OAAO;GACxB;GACA,gBAAgB;IAGd,AAFA,IAAW,GACX,EAAI,QAAQ,GACZ,EAAe,OAAO;GACxB;GACA,eAAe;IAGb,AAFA,IAAW,GACX,EAAI,QAAQ,GACZ,EAAe,OAAO;GACxB;EACF,CAAC;CACH,EACF,CAAC;CACD,EAAI,MAAM,CAAc;AAC1B,EAIA"}
1
+ {"version":3,"file":"index.es.js","names":["isTypedArray","cloneDeepWith","isTypedArray","isTypedArray","setPrototypeOf","isNativeReflectConstruct","setPrototypeOf","isNativeFunction","construct","getPrototypeOf","setPrototypeOf","css","darken","lighten","computed","useTheme","toCamelCase","useStyles","color","theme","variant","value","hover","colors","primary","toku","main","light1","light2","light3","baseClass","margin","padding","boxSizing","cursor","display","flexDirection","alignItems","justifyContent","gap","fontWeight","typography","semibold","borderRadius","button","backgroundColor","boxShadow","border","buttonTextColor","gray","medium2","background","medium1","height","lineHeight","fontSize","width","position","top","left","transform","Icon","merge","computed","defineComponent","useTheme","useStyles","defaultProps","variant","size","type","color","TButton","name","props","String","disabled","Boolean","leftIcon","rightIcon","fullWidth","loading","emits","setup","_props","attrs","slots","emit","value","baseClass","theme","classes","handleClick","_createVNode","_mergeProps","iconSet","default","Icon","get","merge","computed","defineComponent","useTheme","defaultProps","color","size","variant","TIcon","name","props","icon","type","String","required","setup","_props","attrs","theme","value","colors","iconSet","sizeMapping","miniature","small","medium","large","huge","_createVNode","_mergeProps","merge","computed","defineComponent","useStyles","defaultProps","size","variant","TTag","name","props","String","setup","_props","slots","baseClass","classes","value","_createVNode","default","$slots","css","computed","useTheme","useStyles","theme","disabledColor","value","colors","gray","light1","checkSVG","stroke","size","encodeURIComponent","baseClass","margin","padding","boxSizing","color","typography","fontFamily","fontWeight","fontStyle","whiteSpace","cursor","display","justifyContent","alignItems","gap","appearance","WebkitAppearance","font","primary","main","border","borderRadius","placeContent","transform","backgroundColor","light3","transition","boxShadow","lineHeight","fontSize","width","height","content","merge","computed","defineComponent","ref","watch","useStyles","generateUniqueId","Math","random","toString","substring","Date","now","defaultProps","size","value","TCheckbox","name","props","labelPosition","String","Boolean","modelValue","disabled","id","emits","setup","_props","attrs","slots","emit","localId","baseClass","classes","textClass","isChecked","handleClick","_createVNode","map","class_","default","_mergeProps","merge","computed","defineComponent","onMounted","onUnmounted","ref","Teleport","watch","useMenuStyles","useStyles","getVisibleElements","_isSlot","s","Object","prototype","toString","call","_isVNode","defaultProps","size","position","TDropdown","name","props","open","Boolean","String","fullWidth","attachToBody","emits","setup","_props","slots","attrs","emit","container","trigger","menu","menuPosition","top","left","calculateMenuPosition","value","rect","getBoundingClientRect","baseTop","bottom","baseLeft","clientWidth","clientHeight","menuBaseClass","menuClasses","menuStyles","width","undefined","menuHeight","baseClass","classes","handleClickOutside","event","contains","target","closest","handleKeydown","key","handleMenuInitialFocus","preventDefault","firstMenuItem","querySelector","focus","addEventListener","removeEventListener","immediate","window","document","visibleElements","default","renderMenu","_createVNode","map","element","index","array","length","_slot","merge","computed","defineComponent","useStyles","TDropdownItem","name","emits","props","disabled","Boolean","setup","_props","slots","emit","attrs","baseClass","classes","value","handleClick","handleKeydown","event","key","preventDefault","_createVNode","default","Icon","merge","computed","defineComponent","ref","useTheme","useStyles","defaultProps","type","TTextInput","name","emits","props","error","Boolean","disabled","leftIcon","String","rightIcon","label","placeholder","helperText","value","Number","Date","modelValue","fullWidth","id","maxlength","min","max","step","setup","_props","attrs","emit","slots","expose","baseClass","theme","internalValue","get","undefined","set","newValue","handleInput","event","target","handleFocus","handleBlur","input","focus","blur","_createVNode","multiline","iconSet","_mergeProps","computed","defineComponent","onMounted","onUnmounted","ref","watch","createVNode","_createVNode","TDropdown","TDropdownItem","TTextInput","normalizeString","TCombobox","name","emits","props","modelValue","String","options","type","Array","required","placeholder","default","label","helperText","disabled","Boolean","setup","emit","expose","text","selectedOption","isDropdownOpen","container","textInputRef","isDisabled","openDropdown","value","closeDropdown","unfocus","blur","resetTextValue","resetSelectedOption","handleFocus","handleTextChange","handleClickOutside","event","isClickOutside","contains","target","handleSelection","option","handleKeydown","key","filteredOptions","filter","normalizedLabel","normalizedFilterText","includes","document","addEventListener","removeEventListener","DropdownTrigger","trigger","map","onClick","$attrs","$slots","merge","computed","defineComponent","onMounted","onUnmounted","ref","watch","TIcon","useStyles","defaultProps","size","TModal","name","props","open","Boolean","featured","String","destroyOnClose","nonBlocking","emits","setup","_props","slots","attrs","emit","expose","isActive","value","baseClass","classes","modal","showModal","show","close","immediate","handleCancel","event","preventDefault","addEventListener","removeEventListener","handleClose","handleClickOutside","target","trigger","ModalComponent","_createVNode","header","body","default","footer","get","merge","computed","defineComponent","h","useTheme","useStyles","defaultMapping","parseAllMarkdown","defaultProps","fontStyle","fontWeight","variant","color","TTypography","name","props","String","as","parseMarkdown","type","Boolean","default","undefined","setup","_props","attrs","slots","theme","value","colors","typography","baseClass","classes","tag","slotContent","class","processedContent","merge","computed","defineComponent","h","toCamelCase","TButton","TIcon","TModal","TTypography","useStyles","defaultProps","cancelText","confirmText","TDialog","name","components","props","title","type","String","required","message","color","icon","cancellable","Boolean","size","emits","setup","_props","emit","baseClass","iconColor","value","undefined","onClose","onCancel","onConfirm","class","open","header","variant","fontWeight","default","innerHTML","footer","onClick","$slots","css","darken","lighten","computed","useTheme","toCamelCase","useStyles","color","theme","variant","value","hover","colors","primary","toku","main","light1","light2","light3","baseClass","margin","padding","boxSizing","display","justifyContent","alignItems","cursor","borderRadius","button","backgroundColor","boxShadow","border","gray","medium2","background","medium1","height","width","lineHeight","fontSize","iconClass","Icon","merge","computed","defineComponent","useTheme","useStyles","defaultProps","variant","size","icon","type","color","TIconButton","name","props","String","disabled","Boolean","rounded","loading","emits","setup","_props","attrs","emit","value","baseClass","iconClass","theme","classes","iconClasses","handleClick","_createVNode","_mergeProps","iconSet","css","computed","useTheme","useStyles","theme","baseClass","margin","padding","width","cursor","display","flexDirection","alignItems","justifyContent","gap","color","value","colors","primary","main","toku","light1","textDecoration","fontWeight","lineHeight","fontSize","Icon","merge","computed","defineComponent","useTheme","useStyles","defaultProps","variant","size","TLink","name","props","String","href","leftIcon","rightIcon","setup","_props","attrs","slots","baseClass","theme","classes","value","_createVNode","_mergeProps","iconSet","default","css","computed","useTheme","useStyles","props","color","theme","baseClass","margin","padding","width","height","boxSizing","background","borderRadius","border","value","colors","borderBottomColor","primary","main","animation","breakpoints","desktop","transform","get","merge","computed","defineComponent","useTheme","useStyles","defaultProps","size","color","TSpinner","name","props","String","setup","_props","attrs","theme","value","colors","baseClass","classes","_createVNode","merge","computed","defineComponent","TSpinner","useStyles","defaultProps","size","TLoading","name","props","active","Boolean","fullPage","String","setup","_props","attrs","baseClass","classes","value","_createVNode","css","computed","useTheme","useStyles","theme","baseClass","margin","padding","boxSizing","display","alignItems","justifyContent","gap","width","appearance","MozAppearance","WebkitAppearance","height","borderRadius","border","value","colors","primary","main","position","cursor","borderColor","light1","content","top","left","transform","background","order","fontFamily","typography","color","fontSize","fontWeight","regular","lineHeight","gray","medium2","merge","computed","defineComponent","ref","watch","useStyles","defaultProps","labelPosition","TRadio","name","props","id","String","label","value","type","Number","Boolean","Object","Array","Function","Date","default","modelValue","disabled","emits","setup","_props","emit","attrs","checked","baseClass","classes","handleInput","handleClick","handleKeydown","event","key","_createVNode","css","computed","useTheme","useStyles","theme","baseClass","margin","padding","boxSizing","color","fontFamily","value","typography","gap","spacing","display","flexDirection","width","fontSize","fontStyle","fontWeight","semibold","lineHeight","position","alignItems","justifyContent","background","border","colors","gray","light2","borderRadius","input","height","regular","MozAppearance","WebkitAppearance","appearance","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","borderColor","medium2","primary","light1","outline","backgroundColor","light3","cursor","borderBottomLeftRadius","borderBottomRightRadius","paddingLeft","overflow","whiteSpace","maxWidth","top","left","borderTopRightRadius","borderTopLeftRadius","boxShadow","zIndex","listStyle","maxHeight","overflowY","scrollbarWidth","bottom","right","light4","opacity","transition","pointerEvents","transform","medium1","error","css","computed","useTheme","useStyles","theme","baseClass","boxSizing","listStyle","padding","fontFamily","value","typography","fontSize","fontWeight","lineHeight","color","colors","gray","main","cursor","transition","borderBottom","light3","backgroundColor","borderRadius","boxShadow","primary","light5","semibold","medium2","pointerEvents","computed","defineComponent","createVNode","_createVNode","useStyles","TSelectOption","name","emits","props","label","String","selected","Boolean","highlighted","disabled","withSeparator","setup","slots","emit","baseClass","classes","value","handleHover","handleMouseDown","event","preventDefault","default","Icon","merge","computed","defineComponent","ref","watch","useScrollbarThumb","useTheme","useStyles","buildSelectOptions","getLeftIconName","isOptionValueEqual","resolveLeftIcon","TSelectOption","useSelectDropdown","TSelect","name","emits","props","error","Boolean","disabled","leftIcon","String","label","placeholder","helperText","value","type","Number","Object","Array","Function","Date","default","modelValue","fullWidth","id","setup","_props","attrs","emit","slots","expose","theme","localValue","baseClass","containerClasses","immediate","internalValue","get","set","newValue","options","selectedOption","find","opt","hasSelectedValue","selectedLabel","resolvedLeftIcon","leftIconName","iconSet","dropdown","scrollbar","menuRef","onDragStart","isInteractingWithMenu","onDragEnd","requestAnimationFrame","menuOpen","length","isOpen","update","focus","triggerRef","_createVNode","wrapperRef","_mergeProps","handleClickTrigger","e","handleBlur","handleKeydown","handleMenuInteractionStart","onMouseup","isDragging","onMouseenter","menuHovered","onMouseleave","map","option","index","highlightedIndex","onHover","onSelect","selectOption","isScrollable","onThumbMouseDown","height","thumbHeight","transform","thumbOffset","merge","computed","defineComponent","onMounted","onUnmounted","ref","useStyles","getVisibleElements","TSelectDropdown","name","props","open","Boolean","label","String","selectedValue","disabled","helperText","placeholder","error","fullWidth","emits","setup","_props","slots","attrs","emit","baseClass","classes","value","containerClasses","container","handleClickOutside","event","contains","target","handleKeydown","key","document","addEventListener","removeEventListener","visibleElements","default","handleClick","_createVNode","map","element","index","array","length","merge","computed","defineComponent","useStyles","TSelectDropdownItem","name","emits","props","label","String","setup","_props","slots","emit","attrs","baseClass","handleClick","handleKeydown","event","key","value","disabled","preventDefault","_createVNode","default","$slots","merge","computed","defineComponent","ref","watch","useStyles","TTabBar","name","emits","props","labels","Array","value","String","modelValue","setup","_props","attrs","emit","baseClass","selected","undefined","handleOnClick","label","_createVNode","map","onClick","computed","defineComponent","inject","createVNode","_createVNode","useStyles","TTab","name","props","id","type","String","required","selected","Boolean","default","value","Number","Object","Array","setup","slots","baseClass","provider","Error","selectTab","handleClick","handleKeydown","event","key","preventDefault","ariaLabel","computed","defineComponent","provide","ref","createTextVNode","_createTextVNode","createVNode","_createVNode","TDropdown","TDropdownItem","TTab","useStyles","useTTabStyles","TTabBarExtended","name","emits","props","tabs","type","Array","required","maxTabs","Number","initialLabel","String","selectedValue","Object","setup","emit","baseClass","tTabBaseClass","identifiedTabs","map","tab","index","id","label","value","initialTab","find","selectedTab","isControlled","undefined","effectiveSelectedTab","found","isDropdownOpen","selectTab","newSelectedTab","Error","amountOfTabs","length","maxAmountOfTabs","Math","min","Infinity","visibleTabs","slice","selectedTabIsAlreadyVisible","some","push","shouldDropdownExist","toggleIsDropdownOpen","closeDropdown","handleClickInDropdownTrigger","handleOnKeyPressInDropdownTrigger","event","preventDefault","key","handleClickInDropdownItem","Dropdown","trigger","default","onClick","merge","computed","defineComponent","nextTick","ref","watch","useStyles","DEFAULT_AUTO_RESIZE_ROWS","TTextArea","name","emits","props","id","String","value","modelValue","label","error","Boolean","disabled","placeholder","helperText","fullWidth","maxlength","Number","autoResize","maxRows","type","default","undefined","setup","_props","attrs","emit","slots","expose","baseClass","internalValue","get","set","newValue","resizeTextarea","el","textarea","style","height","styles","getComputedStyle","borderTop","parseFloat","borderTopWidth","borderBottom","borderBottomWidth","lineHeight","paddingTop","paddingBottom","maxHeight","scrollHeight","handleInput","event","target","handleFocus","handleBlur","focus","_createVNode","multiline","_mergeProps","computed","defineComponent","h","provide","injectionKey","createTheme","TThemeProvider","name","inheritAttrs","props","theme","type","Object","default","setup","slots","attrs","cssVars","value","class","style","useTooltip","merge","computed","defineComponent","useStyles","defaultProps","position","size","trigger","TTooltip","name","props","label","String","multilined","Boolean","setup","_props","slots","attrs","value","isVisible","wrapperRef","triggerHandler","baseClass","classes","_createVNode","_mergeProps","default","merge","computed","defineComponent","TIcon","TTypography","useStyles","defaultProps","variant","TWarning","name","props","fullWidth","Boolean","icon","String","setup","_props","slots","baseClass","classes","value","colorMap","default","success","warning","error","info","iconColor","_createVNode","content"],"sources":["../src/theme/base.ts","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isLength.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toString.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/util/toPath.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/get.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/_internal/tags.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/_internal/globalThis.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isBuffer.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/function/noop.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/clone.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/merge.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/capitalize.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/words.mjs","../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/camelCase.mjs","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/construct.js","../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/.pnpm/polished@4.3.1/node_modules/polished/dist/polished.esm.js","../src/theme/utils.ts","../src/composables/theme.ts","../src/components/TChip/TChip.vue","../src/components/TChip/TChip.vue","../src/utils/index.ts","../src/components/TButton/TButton.styles.tsx","../src/components/TButton/TButton.tsx","../src/components/TIcon/TIcon.tsx","../src/components/TTag/TTag.styles.ts","../src/components/TTag/TTag.tsx","../src/components/TCardButton/TCardButton.vue","../src/components/TCardButton/TCardButton.vue","../src/components/TCheckbox/TCheckbox.styles.tsx","../src/components/TCheckbox/TCheckbox.tsx","../src/components/TDropdown/TDropdown.styles.ts","../src/components/TDropdown/TDropdown.utils.ts","../src/components/TDropdown/TDropdown.tsx","../src/components/TDropdown/TDropdownItem/TDropdownItem.styles.ts","../src/components/TDropdown/TDropdownItem/TDropdownItem.tsx","../src/components/TTextInput/TTextInput.styles.ts","../src/components/TTextInput/TTextInput.tsx","../src/components/TCombobox/TCombobox.utils.ts","../src/components/TCombobox/TCombobox.tsx","../src/composables/forwardedAttrs.ts","../src/components/TCommandPalette/TCommandPalette.vue","../src/components/TCommandPalette/TCommandPalette.vue","../src/components/TModal/TModal.styles.ts","../src/components/TModal/TModal.tsx","../src/components/TTypography/TTypography.styles.ts","../src/components/TTypography/TTypography.utils.ts","../src/components/TTypography/utils/markdown/parseAllMarkdown.ts","../src/components/TTypography/TTypography.tsx","../src/components/TDialog/TDialog.styles.ts","../src/components/TDialog/TDialog.tsx","../src/components/TFileUpload/TFileUpload.vue","../src/components/TFileUpload/TFileUpload.vue","../src/components/TIconButton/TIconButton.styles.tsx","../src/components/TIconButton/TIconButton.tsx","../src/components/TLink/TLink.styles.tsx","../src/components/TLink/TLink.tsx","../src/components/TSpinner/TSpinner.styles.tsx","../src/components/TSpinner/TSpinner.tsx","../src/components/TLoading/TLoading.styles.ts","../src/components/TLoading/TLoading.tsx","../src/components/TLoadingDots/TLoadingDots.vue","../src/components/TLoadingDots/TLoadingDots.vue","../src/components/TRadio/TRadio.styles.tsx","../src/components/TRadio/TRadio.tsx","../src/composables/scrollbarThumb.ts","../src/components/TSelect/TSelect.styles.tsx","../src/components/TSelect/TSelect.utils.ts","../src/components/TSelect/TSelectOption/TSelectOption.styles.tsx","../src/components/TSelect/TSelectOption/TSelectOption.tsx","../src/components/TSelect/useSelectDropdown.ts","../src/components/TSelect/TSelect.tsx","../src/components/TSelectDropdown/TSelectDropdown.styles.ts","../src/components/TSelectDropdown/TSelectDropdown.utils.ts","../src/components/TSelectDropdown/TSelectDropdown.tsx","../src/components/TSelectDropdown/TSelectDropdownItem/TSelectDropdownItem.styles.ts","../src/components/TSelectDropdown/TSelectDropdownItem/TSelectDropdownItem.tsx","../src/components/TSwitch/TSwitch.vue","../src/components/TSwitch/TSwitch.vue","../src/components/TTabBar/TTabBar.styles.ts","../src/components/TTabBar/TTabBar.tsx","../src/components/TTabBarExtended/TTab/TTab.styles.ts","../src/components/TTabBarExtended/TTab/TTab.tsx","../src/components/TTabBarExtended/TTabBarExtended.styles.ts","../src/components/TTabBarExtended/TTabBarExtended.tsx","../src/components/TTextArea/TTextArea.styles.ts","../src/components/TTextArea/TTextArea.tsx","../src/components/TThemeProvider/TThemeProvider.tsx","../src/composables/click.ts","../src/composables/tooltip.ts","../src/components/TTooltip/TTooltip.styles.ts","../src/components/TTooltip/TTooltip.tsx","../src/components/TWarning/TWarning.styles.ts","../src/components/TWarning/TWarning.tsx","../src/composables/dialog.ts"],"sourcesContent":["export const baseTheme = {\n colors: {\n primary: {\n main: '#3C1053',\n ultraDark: '#461B5E',\n dark: '#3C1053',\n toku: '#51276A',\n light1: '#C59FDF',\n light2: '#E5D5F0',\n light3: '#EBE1F2',\n light4: '#F0ECF3',\n light5: '#F3F1F4',\n },\n gray: {\n main: '#373737',\n dark2: '#545454',\n dark3: '#707070',\n medium1: '#8D8D8D',\n medium2: '#A9A9A9',\n light1: '#C6C6C6',\n light2: '#E2E2E2',\n light3: '#F2F2F2',\n light4: '#FAFAFA',\n },\n error: '#B72E29',\n success: '#408645',\n warning: '#D06B35',\n inProcess: '#FFB038',\n inProcessDark: '#A37500',\n info: '#3070DD',\n background: '#F5F5F5',\n },\n typography: {\n color: '#373737',\n fontFamily: '\"Manrope\", sans-serif',\n buttonTextColor: '#FFFFFF',\n fontWeight: {\n bold: 700,\n semibold: 600,\n medium: 500,\n regular: 400,\n },\n },\n button: {\n borderRadius: '0.5rem',\n },\n input: {\n borderRadius: '0.375rem',\n },\n spacing: '4px',\n breakpoints: {\n mobile: 0,\n desktop: 769,\n },\n iconSet: 'heroicons',\n parseMarkdown: false,\n};\n","function isLength(value) {\n return Number.isSafeInteger(value) && value >= 0;\n}\n\nexport { isLength };\n","import { isLength } from '../../predicate/isLength.mjs';\n\nfunction isArrayLike(value) {\n return value != null && typeof value !== 'function' && isLength(value.length);\n}\n\nexport { isArrayLike };\n","function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","function isDeepKey(key) {\n switch (typeof key) {\n case 'number':\n case 'symbol': {\n return false;\n }\n case 'string': {\n return key.includes('.') || key.includes('[') || key.includes(']');\n }\n }\n}\n\nexport { isDeepKey };\n","function toKey(value) {\n if (typeof value === 'string' || typeof value === 'symbol') {\n return value;\n }\n if (Object.is(value?.valueOf?.(), -0)) {\n return '-0';\n }\n return String(value);\n}\n\nexport { toKey };\n","function toString(value) {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(toString).join(',');\n }\n const result = String(value);\n if (result === '0' && Object.is(Number(value), -0)) {\n return '-0';\n }\n return result;\n}\n\nexport { toString };\n","import { toString } from './toString.mjs';\nimport { toKey } from '../_internal/toKey.mjs';\n\nfunction toPath(deepKey) {\n if (Array.isArray(deepKey)) {\n return deepKey.map(toKey);\n }\n if (typeof deepKey === 'symbol') {\n return [deepKey];\n }\n deepKey = toString(deepKey);\n const result = [];\n const length = deepKey.length;\n if (length === 0) {\n return result;\n }\n let index = 0;\n let key = '';\n let quoteChar = '';\n let bracket = false;\n if (deepKey.charCodeAt(0) === 46) {\n result.push('');\n index++;\n }\n while (index < length) {\n const char = deepKey[index];\n if (quoteChar) {\n if (char === '\\\\' && index + 1 < length) {\n index++;\n key += deepKey[index];\n }\n else if (char === quoteChar) {\n quoteChar = '';\n }\n else {\n key += char;\n }\n }\n else if (bracket) {\n if (char === '\"' || char === \"'\") {\n quoteChar = char;\n }\n else if (char === ']') {\n bracket = false;\n result.push(key);\n key = '';\n }\n else {\n key += char;\n }\n }\n else {\n if (char === '[') {\n bracket = true;\n if (key) {\n result.push(key);\n key = '';\n }\n }\n else if (char === '.') {\n if (key) {\n result.push(key);\n key = '';\n }\n }\n else {\n key += char;\n }\n }\n index++;\n }\n if (key) {\n result.push(key);\n }\n return result;\n}\n\nexport { toPath };\n","import { isUnsafeProperty } from '../../_internal/isUnsafeProperty.mjs';\nimport { isDeepKey } from '../_internal/isDeepKey.mjs';\nimport { toKey } from '../_internal/toKey.mjs';\nimport { toPath } from '../util/toPath.mjs';\n\nfunction get(object, path, defaultValue) {\n if (object == null) {\n return defaultValue;\n }\n switch (typeof path) {\n case 'string': {\n if (isUnsafeProperty(path)) {\n return defaultValue;\n }\n const result = object[path];\n if (result === undefined) {\n if (isDeepKey(path)) {\n return get(object, toPath(path), defaultValue);\n }\n else {\n return defaultValue;\n }\n }\n return result;\n }\n case 'number':\n case 'symbol': {\n if (typeof path === 'number') {\n path = toKey(path);\n }\n const result = object[path];\n if (result === undefined) {\n return defaultValue;\n }\n return result;\n }\n default: {\n if (Array.isArray(path)) {\n return getWithPath(object, path, defaultValue);\n }\n if (Object.is(path?.valueOf(), -0)) {\n path = '-0';\n }\n else {\n path = String(path);\n }\n if (isUnsafeProperty(path)) {\n return defaultValue;\n }\n const result = object[path];\n if (result === undefined) {\n return defaultValue;\n }\n return result;\n }\n }\n}\nfunction getWithPath(object, path, defaultValue) {\n if (path.length === 0) {\n return defaultValue;\n }\n let current = object;\n for (let index = 0; index < path.length; index++) {\n if (current == null) {\n return defaultValue;\n }\n if (isUnsafeProperty(path[index])) {\n return defaultValue;\n }\n current = current[path[index]];\n }\n if (current === undefined) {\n return defaultValue;\n }\n return current;\n}\n\nexport { get };\n","function isPrimitive(value) {\n return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n\nexport { isPrimitive };\n","function getSymbols(object) {\n return Object.getOwnPropertySymbols(object).filter(symbol => Object.prototype.propertyIsEnumerable.call(object, symbol));\n}\n\nexport { getSymbols };\n","function getTag(value) {\n if (value == null) {\n return value === undefined ? '[object Undefined]' : '[object Null]';\n }\n return Object.prototype.toString.call(value);\n}\n\nexport { getTag };\n","const regexpTag = '[object RegExp]';\nconst stringTag = '[object String]';\nconst numberTag = '[object Number]';\nconst booleanTag = '[object Boolean]';\nconst argumentsTag = '[object Arguments]';\nconst symbolTag = '[object Symbol]';\nconst dateTag = '[object Date]';\nconst mapTag = '[object Map]';\nconst setTag = '[object Set]';\nconst arrayTag = '[object Array]';\nconst functionTag = '[object Function]';\nconst arrayBufferTag = '[object ArrayBuffer]';\nconst objectTag = '[object Object]';\nconst errorTag = '[object Error]';\nconst dataViewTag = '[object DataView]';\nconst uint8ArrayTag = '[object Uint8Array]';\nconst uint8ClampedArrayTag = '[object Uint8ClampedArray]';\nconst uint16ArrayTag = '[object Uint16Array]';\nconst uint32ArrayTag = '[object Uint32Array]';\nconst bigUint64ArrayTag = '[object BigUint64Array]';\nconst int8ArrayTag = '[object Int8Array]';\nconst int16ArrayTag = '[object Int16Array]';\nconst int32ArrayTag = '[object Int32Array]';\nconst bigInt64ArrayTag = '[object BigInt64Array]';\nconst float32ArrayTag = '[object Float32Array]';\nconst float64ArrayTag = '[object Float64Array]';\n\nexport { argumentsTag, arrayBufferTag, arrayTag, bigInt64ArrayTag, bigUint64ArrayTag, booleanTag, dataViewTag, dateTag, errorTag, float32ArrayTag, float64ArrayTag, functionTag, int16ArrayTag, int32ArrayTag, int8ArrayTag, mapTag, numberTag, objectTag, regexpTag, setTag, stringTag, symbolTag, uint16ArrayTag, uint32ArrayTag, uint8ArrayTag, uint8ClampedArrayTag };\n","const globalThis_ = (typeof globalThis === 'object' && globalThis) ||\n (typeof window === 'object' && window) ||\n (typeof self === 'object' && self) ||\n (typeof global === 'object' && global) ||\n (function () {\n return this;\n })() ||\n Function('return this')();\n\nexport { globalThis_ as globalThis };\n","import { globalThis as globalThis_ } from '../_internal/globalThis.mjs';\n\nfunction isBuffer(x) {\n return typeof globalThis_.Buffer !== 'undefined' && globalThis_.Buffer.isBuffer(x);\n}\n\nexport { isBuffer };\n","function isTypedArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\nexport { isTypedArray };\n","import { getSymbols } from '../compat/_internal/getSymbols.mjs';\nimport { getTag } from '../compat/_internal/getTag.mjs';\nimport { uint32ArrayTag, uint16ArrayTag, uint8ClampedArrayTag, uint8ArrayTag, symbolTag, stringTag, setTag, regexpTag, objectTag, numberTag, mapTag, int32ArrayTag, int16ArrayTag, int8ArrayTag, float64ArrayTag, float32ArrayTag, dateTag, booleanTag, dataViewTag, arrayBufferTag, arrayTag, argumentsTag } from '../compat/_internal/tags.mjs';\nimport { isBuffer } from '../predicate/isBuffer.mjs';\nimport { isPrimitive } from '../predicate/isPrimitive.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction cloneDeepWith(obj, cloneValue) {\n return cloneDeepWithImpl(obj, undefined, obj, new Map(), cloneValue);\n}\nfunction cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = new Map(), cloneValue = undefined) {\n const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);\n if (cloned !== undefined) {\n return cloned;\n }\n if (isPrimitive(valueToClone)) {\n return valueToClone;\n }\n if (stack.has(valueToClone)) {\n return stack.get(valueToClone);\n }\n if (Array.isArray(valueToClone)) {\n const result = new Array(valueToClone.length);\n stack.set(valueToClone, result);\n for (let i = 0; i < valueToClone.length; i++) {\n result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n }\n if (Object.hasOwn(valueToClone, 'index')) {\n result.index = valueToClone.index;\n }\n if (Object.hasOwn(valueToClone, 'input')) {\n result.input = valueToClone.input;\n }\n return result;\n }\n if (valueToClone instanceof Date) {\n return new Date(valueToClone.getTime());\n }\n if (valueToClone instanceof RegExp) {\n const result = new RegExp(valueToClone.source, valueToClone.flags);\n result.lastIndex = valueToClone.lastIndex;\n return result;\n }\n if (valueToClone instanceof Map) {\n const result = new Map();\n stack.set(valueToClone, result);\n for (const [key, value] of valueToClone) {\n result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));\n }\n return result;\n }\n if (valueToClone instanceof Set) {\n const result = new Set();\n stack.set(valueToClone, result);\n for (const value of valueToClone) {\n result.add(cloneDeepWithImpl(value, undefined, objectToClone, stack, cloneValue));\n }\n return result;\n }\n if (isBuffer(valueToClone)) {\n return valueToClone.subarray();\n }\n if (isTypedArray(valueToClone)) {\n const result = new (Object.getPrototypeOf(valueToClone).constructor)(valueToClone.length);\n stack.set(valueToClone, result);\n for (let i = 0; i < valueToClone.length; i++) {\n result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n }\n return result;\n }\n if (valueToClone instanceof ArrayBuffer ||\n (typeof SharedArrayBuffer !== 'undefined' && valueToClone instanceof SharedArrayBuffer)) {\n return valueToClone.slice(0);\n }\n if (valueToClone instanceof DataView) {\n const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (typeof File !== 'undefined' && valueToClone instanceof File) {\n const result = new File([valueToClone], valueToClone.name, {\n type: valueToClone.type,\n });\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (typeof Blob !== 'undefined' && valueToClone instanceof Blob) {\n const result = new Blob([valueToClone], { type: valueToClone.type });\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof Error) {\n const result = structuredClone(valueToClone);\n stack.set(valueToClone, result);\n result.message = valueToClone.message;\n result.name = valueToClone.name;\n result.stack = valueToClone.stack;\n result.cause = valueToClone.cause;\n result.constructor = valueToClone.constructor;\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof Boolean) {\n const result = new Boolean(valueToClone.valueOf());\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof Number) {\n const result = new Number(valueToClone.valueOf());\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof String) {\n const result = new String(valueToClone.valueOf());\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (typeof valueToClone === 'object' && isCloneableObject(valueToClone)) {\n const result = Object.create(Object.getPrototypeOf(valueToClone));\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n return valueToClone;\n}\nfunction copyProperties(target, source, objectToClone = target, stack, cloneValue) {\n const keys = [...Object.keys(source), ...getSymbols(source)];\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const descriptor = Object.getOwnPropertyDescriptor(target, key);\n if (descriptor == null || descriptor.writable) {\n target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);\n }\n }\n}\nfunction isCloneableObject(object) {\n switch (getTag(object)) {\n case argumentsTag:\n case arrayTag:\n case arrayBufferTag:\n case dataViewTag:\n case booleanTag:\n case dateTag:\n case float32ArrayTag:\n case float64ArrayTag:\n case int8ArrayTag:\n case int16ArrayTag:\n case int32ArrayTag:\n case mapTag:\n case numberTag:\n case objectTag:\n case regexpTag:\n case setTag:\n case stringTag:\n case symbolTag:\n case uint8ArrayTag:\n case uint8ClampedArrayTag:\n case uint16ArrayTag:\n case uint32ArrayTag: {\n return true;\n }\n default: {\n return false;\n }\n }\n}\n\nexport { cloneDeepWith, cloneDeepWithImpl, copyProperties };\n","import { cloneDeepWith as cloneDeepWith$1, copyProperties } from '../../object/cloneDeepWith.mjs';\nimport { getTag } from '../_internal/getTag.mjs';\nimport { objectTag, argumentsTag, booleanTag, stringTag, numberTag } from '../_internal/tags.mjs';\n\nfunction cloneDeepWith(obj, customizer) {\n return cloneDeepWith$1(obj, (value, key, object, stack) => {\n const cloned = customizer?.(value, key, object, stack);\n if (cloned !== undefined) {\n return cloned;\n }\n if (typeof obj !== 'object') {\n return undefined;\n }\n if (getTag(obj) === objectTag && typeof obj.constructor !== 'function') {\n const result = {};\n stack.set(obj, result);\n copyProperties(result, obj, object, stack);\n return result;\n }\n switch (Object.prototype.toString.call(obj)) {\n case numberTag:\n case stringTag:\n case booleanTag: {\n const result = new obj.constructor(obj?.valueOf());\n copyProperties(result, obj);\n return result;\n }\n case argumentsTag: {\n const result = {};\n copyProperties(result, obj);\n result.length = obj.length;\n result[Symbol.iterator] = obj[Symbol.iterator];\n return result;\n }\n default: {\n return undefined;\n }\n }\n });\n}\n\nexport { cloneDeepWith };\n","import { cloneDeepWith } from './cloneDeepWith.mjs';\n\nfunction cloneDeep(obj) {\n return cloneDeepWith(obj);\n}\n\nexport { cloneDeep };\n","import { getTag } from '../_internal/getTag.mjs';\n\nfunction isArguments(value) {\n return value !== null && typeof value === 'object' && getTag(value) === '[object Arguments]';\n}\n\nexport { isArguments };\n","function isObjectLike(value) {\n return typeof value === 'object' && value !== null;\n}\n\nexport { isObjectLike };\n","import { isArrayLike } from './isArrayLike.mjs';\nimport { isObjectLike } from './isObjectLike.mjs';\n\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport { isArrayLikeObject };\n","function noop() { }\n\nexport { noop };\n","import { isTypedArray as isTypedArray$1 } from '../../predicate/isTypedArray.mjs';\n\nfunction isTypedArray(x) {\n return isTypedArray$1(x);\n}\n\nexport { isTypedArray };\n","function isPlainObject(object) {\n if (typeof object !== 'object') {\n return false;\n }\n if (object == null) {\n return false;\n }\n if (Object.getPrototypeOf(object) === null) {\n return true;\n }\n if (Object.prototype.toString.call(object) !== '[object Object]') {\n const tag = object[Symbol.toStringTag];\n if (tag == null) {\n return false;\n }\n const isTagReadonly = !Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable;\n if (isTagReadonly) {\n return false;\n }\n return object.toString() === `[object ${tag}]`;\n }\n let proto = object;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(object) === proto;\n}\n\nexport { isPlainObject };\n","import { isPrimitive } from '../predicate/isPrimitive.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction clone(obj) {\n if (isPrimitive(obj)) {\n return obj;\n }\n if (Array.isArray(obj) ||\n isTypedArray(obj) ||\n obj instanceof ArrayBuffer ||\n (typeof SharedArrayBuffer !== 'undefined' && obj instanceof SharedArrayBuffer)) {\n return obj.slice(0);\n }\n const prototype = Object.getPrototypeOf(obj);\n if (prototype == null) {\n return Object.assign(Object.create(prototype), obj);\n }\n const Constructor = prototype.constructor;\n if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {\n return new Constructor(obj);\n }\n if (obj instanceof RegExp) {\n const newRegExp = new Constructor(obj);\n newRegExp.lastIndex = obj.lastIndex;\n return newRegExp;\n }\n if (obj instanceof DataView) {\n return new Constructor(obj.buffer.slice(0));\n }\n if (obj instanceof Error) {\n let newError;\n if (obj instanceof AggregateError) {\n newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });\n }\n else {\n newError = new Constructor(obj.message, { cause: obj.cause });\n }\n newError.stack = obj.stack;\n Object.assign(newError, obj);\n return newError;\n }\n if (typeof File !== 'undefined' && obj instanceof File) {\n const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });\n return newFile;\n }\n if (typeof obj === 'object') {\n const newObject = Object.create(prototype);\n return Object.assign(newObject, obj);\n }\n return obj;\n}\n\nexport { clone };\n","import { cloneDeep } from './cloneDeep.mjs';\nimport { isUnsafeProperty } from '../../_internal/isUnsafeProperty.mjs';\nimport { clone } from '../../object/clone.mjs';\nimport { isBuffer } from '../../predicate/isBuffer.mjs';\nimport { isPrimitive } from '../../predicate/isPrimitive.mjs';\nimport { getSymbols } from '../_internal/getSymbols.mjs';\nimport { isArguments } from '../predicate/isArguments.mjs';\nimport { isArrayLikeObject } from '../predicate/isArrayLikeObject.mjs';\nimport { isObjectLike } from '../predicate/isObjectLike.mjs';\nimport { isPlainObject } from '../predicate/isPlainObject.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction mergeWith(object, ...otherArgs) {\n const sources = otherArgs.slice(0, -1);\n const merge = otherArgs[otherArgs.length - 1];\n let result = object;\n for (let i = 0; i < sources.length; i++) {\n const source = sources[i];\n result = mergeWithDeep(result, source, merge, new Map());\n }\n return result;\n}\nfunction mergeWithDeep(target, source, merge, stack) {\n if (isPrimitive(target)) {\n target = Object(target);\n }\n if (source == null || typeof source !== 'object') {\n return target;\n }\n if (stack.has(source)) {\n return clone(stack.get(source));\n }\n stack.set(source, target);\n if (Array.isArray(source)) {\n source = source.slice();\n for (let i = 0; i < source.length; i++) {\n source[i] = source[i] ?? undefined;\n }\n }\n const sourceKeys = [...Object.keys(source), ...getSymbols(source)];\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n let sourceValue = source[key];\n let targetValue = target[key];\n if (isArguments(sourceValue)) {\n sourceValue = { ...sourceValue };\n }\n if (isArguments(targetValue)) {\n targetValue = { ...targetValue };\n }\n if (isBuffer(sourceValue)) {\n sourceValue = cloneDeep(sourceValue);\n }\n if (Array.isArray(sourceValue)) {\n if (Array.isArray(targetValue)) {\n const cloned = [];\n const targetKeys = Reflect.ownKeys(targetValue);\n for (let i = 0; i < targetKeys.length; i++) {\n const targetKey = targetKeys[i];\n cloned[targetKey] = targetValue[targetKey];\n }\n targetValue = cloned;\n }\n else if (isArrayLikeObject(targetValue)) {\n const cloned = [];\n for (let i = 0; i < targetValue.length; i++) {\n cloned[i] = targetValue[i];\n }\n targetValue = cloned;\n }\n else {\n targetValue = [];\n }\n }\n const merged = merge(targetValue, sourceValue, key, target, source, stack);\n if (merged !== undefined) {\n target[key] = merged;\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n }\n else if (isObjectLike(targetValue) &&\n isObjectLike(sourceValue) &&\n (isPlainObject(targetValue) ||\n isPlainObject(sourceValue) ||\n isTypedArray(targetValue) ||\n isTypedArray(sourceValue))) {\n target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n }\n else if (targetValue == null && isPlainObject(sourceValue)) {\n target[key] = mergeWithDeep({}, sourceValue, merge, stack);\n }\n else if (targetValue == null && isTypedArray(sourceValue)) {\n target[key] = cloneDeep(sourceValue);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { mergeWith };\n","import { mergeWith } from './mergeWith.mjs';\nimport { noop } from '../../function/noop.mjs';\n\nfunction merge(object, ...sources) {\n return mergeWith(object, ...sources, noop);\n}\n\nexport { merge };\n","function capitalize(str) {\n return (str.charAt(0).toUpperCase() + str.slice(1).toLowerCase());\n}\n\nexport { capitalize };\n","const CASE_SPLIT_PATTERN = /\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+/gu;\nfunction words(str) {\n return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);\n}\n\nexport { CASE_SPLIT_PATTERN, words };\n","import { capitalize } from './capitalize.mjs';\nimport { words } from './words.mjs';\n\nfunction camelCase(str) {\n const words$1 = words(str);\n if (words$1.length === 0) {\n return '';\n }\n const [first, ...rest] = words$1;\n return `${first.toLowerCase()}${rest.map(word => capitalize(word)).join('')}`;\n}\n\nexport { camelCase };\n","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","function _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nexport { _getPrototypeOf as default };","function _isNativeFunction(t) {\n try {\n return -1 !== Function.toString.call(t).indexOf(\"[native code]\");\n } catch (n) {\n return \"function\" == typeof t;\n }\n}\nexport { _isNativeFunction as default };","function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}\nexport { _isNativeReflectConstruct as default };","import isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}\nexport { _construct as default };","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nfunction _wrapNativeSuper(t) {\n var r = \"function\" == typeof Map ? new Map() : void 0;\n return _wrapNativeSuper = function _wrapNativeSuper(t) {\n if (null === t || !isNativeFunction(t)) return t;\n if (\"function\" != typeof t) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== r) {\n if (r.has(t)) return r.get(t);\n r.set(t, Wrapper);\n }\n function Wrapper() {\n return construct(t, arguments, getPrototypeOf(this).constructor);\n }\n return Wrapper.prototype = Object.create(t.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }), setPrototypeOf(Wrapper, t);\n }, _wrapNativeSuper(t);\n}\nexport { _wrapNativeSuper as default };","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _wrapNativeSuper from '@babel/runtime/helpers/esm/wrapNativeSuper';\nimport _taggedTemplateLiteralLoose from '@babel/runtime/helpers/esm/taggedTemplateLiteralLoose';\n\nfunction last() {\n var _ref;\n return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];\n}\nfunction negation(a) {\n return -a;\n}\nfunction addition(a, b) {\n return a + b;\n}\nfunction subtraction(a, b) {\n return a - b;\n}\nfunction multiplication(a, b) {\n return a * b;\n}\nfunction division(a, b) {\n return a / b;\n}\nfunction max() {\n return Math.max.apply(Math, arguments);\n}\nfunction min() {\n return Math.min.apply(Math, arguments);\n}\nfunction comma() {\n return Array.of.apply(Array, arguments);\n}\nvar defaultSymbols = {\n symbols: {\n '*': {\n infix: {\n symbol: '*',\n f: multiplication,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '*',\n regSymbol: '\\\\*'\n },\n '/': {\n infix: {\n symbol: '/',\n f: division,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '/',\n regSymbol: '/'\n },\n '+': {\n infix: {\n symbol: '+',\n f: addition,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '+',\n f: last,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '+',\n regSymbol: '\\\\+'\n },\n '-': {\n infix: {\n symbol: '-',\n f: subtraction,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '-',\n f: negation,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '-',\n regSymbol: '-'\n },\n ',': {\n infix: {\n symbol: ',',\n f: comma,\n notation: 'infix',\n precedence: 1,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: ',',\n regSymbol: ','\n },\n '(': {\n prefix: {\n symbol: '(',\n f: last,\n notation: 'prefix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '(',\n regSymbol: '\\\\('\n },\n ')': {\n postfix: {\n symbol: ')',\n f: undefined,\n notation: 'postfix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: ')',\n regSymbol: '\\\\)'\n },\n min: {\n func: {\n symbol: 'min',\n f: min,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'min',\n regSymbol: 'min\\\\b'\n },\n max: {\n func: {\n symbol: 'max',\n f: max,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'max',\n regSymbol: 'max\\\\b'\n }\n }\n};\nvar defaultSymbolMap = defaultSymbols;\n\n// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found and no default was provided.\\n\\n\",\n \"75\": \"important requires a valid style object, got a %s instead.\\n\\n\",\n \"76\": \"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\\n\\n\",\n \"77\": \"remToPx expects a value in \\\"rem\\\" but you provided it in \\\"%s\\\".\\n\\n\",\n \"78\": \"base must be set in \\\"px\\\" or \\\"%\\\" but you set it in \\\"%s\\\".\\n\"\n};\n\n/**\n * super basic version of sprintf\n * @private\n */\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var a = args[0];\n var b = [];\n var c;\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n function PolishedError(code) {\n var _this;\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n return _assertThisInitialized(_this);\n }\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar unitRegExp = /((?!\\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\\D|$)|ged|darg?|nrut)/g;\n\n// Merges additional math functionality into the defaults.\nfunction mergeSymbolMaps(additionalSymbols) {\n var symbolMap = {};\n symbolMap.symbols = additionalSymbols ? _extends({}, defaultSymbolMap.symbols, additionalSymbols.symbols) : _extends({}, defaultSymbolMap.symbols);\n return symbolMap;\n}\nfunction exec(operators, values) {\n var _ref;\n var op = operators.pop();\n values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));\n return op.precedence;\n}\nfunction calculate(expression, additionalSymbols) {\n var symbolMap = mergeSymbolMaps(additionalSymbols);\n var match;\n var operators = [symbolMap.symbols['('].prefix];\n var values = [];\n var pattern = new RegExp( // Pattern for numbers\n \"\\\\d+(?:\\\\.\\\\d+)?|\" +\n // ...and patterns for individual operators/function names\n Object.keys(symbolMap.symbols).map(function (key) {\n return symbolMap.symbols[key];\n })\n // longer symbols should be listed first\n // $FlowFixMe\n .sort(function (a, b) {\n return b.symbol.length - a.symbol.length;\n })\n // $FlowFixMe\n .map(function (val) {\n return val.regSymbol;\n }).join('|') + \"|(\\\\S)\", 'g');\n pattern.lastIndex = 0; // Reset regular expression object\n\n var afterValue = false;\n do {\n match = pattern.exec(expression);\n var _ref2 = match || [')', undefined],\n token = _ref2[0],\n bad = _ref2[1];\n var notNumber = symbolMap.symbols[token];\n var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;\n var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix;\n\n // Check for syntax errors:\n if (bad || (afterValue ? notAfterValue : notNewValue)) {\n throw new PolishedError(37, match ? match.index : expression.length, expression);\n }\n if (afterValue) {\n // We either have an infix or postfix operator (they should be mutually exclusive)\n var curr = notNumber.postfix || notNumber.infix;\n do {\n var prev = operators[operators.length - 1];\n if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break;\n // Apply previous operator, since it has precedence over current one\n } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function\n afterValue = curr.notation === 'postfix';\n if (curr.symbol !== ')') {\n operators.push(curr);\n // Postfix always has precedence over any operator that follows after it\n if (afterValue) exec(operators, values);\n }\n } else if (notNumber) {\n // prefix operator or function\n operators.push(notNumber.prefix || notNumber.func);\n if (notNumber.func) {\n // Require an opening parenthesis\n match = pattern.exec(expression);\n if (!match || match[0] !== '(') {\n throw new PolishedError(38, match ? match.index : expression.length, expression);\n }\n }\n } else {\n // number\n values.push(+token);\n afterValue = true;\n }\n } while (match && operators.length);\n if (operators.length) {\n throw new PolishedError(39, match ? match.index : expression.length, expression);\n } else if (match) {\n throw new PolishedError(40, match ? match.index : expression.length, expression);\n } else {\n return values.pop();\n }\n}\nfunction reverseString(str) {\n return str.split('').reverse().join('');\n}\n\n/**\n * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.\n *\n *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).\n *\n * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: math('12rem + 8rem'),\n * fontSize: math('(12px + 2px) * 3'),\n * fontSize: math('3px^2 + sqrt(4)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${math('12rem + 8rem')};\n * fontSize: ${math('(12px + 2px) * 3')};\n * fontSize: ${math('3px^2 + sqrt(4)')};\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * fontSize: '20rem',\n * fontSize: '42px',\n * fontSize: '11px',\n * }\n */\nfunction math(formula, additionalSymbols) {\n var reversedFormula = reverseString(formula);\n var formulaMatch = reversedFormula.match(unitRegExp);\n\n // Check that all units are the same\n if (formulaMatch && !formulaMatch.every(function (unit) {\n return unit === formulaMatch[0];\n })) {\n throw new PolishedError(41);\n }\n var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));\n return \"\" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');\n}\n\nvar cssVariableRegex = /--[\\S]*/g;\n\n/**\n * Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'background': cssVar('--background-color'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${cssVar('--background-color')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'background': 'red'\n * }\n */\nfunction cssVar(cssVariable, defaultValue) {\n if (!cssVariable || !cssVariable.match(cssVariableRegex)) {\n throw new PolishedError(73);\n }\n var variableValue;\n\n /* eslint-disable */\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);\n }\n /* eslint-enable */\n\n if (variableValue) {\n return variableValue.trim();\n } else if (defaultValue) {\n return defaultValue;\n }\n throw new PolishedError(74);\n}\n\n// @private\nfunction capitalizeString(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar positionMap$1 = ['Top', 'Right', 'Bottom', 'Left'];\nfunction generateProperty(property, position) {\n if (!property) return position.toLowerCase();\n var splitProperty = property.split('-');\n if (splitProperty.length > 1) {\n splitProperty.splice(1, 0, position);\n return splitProperty.reduce(function (acc, val) {\n return \"\" + acc + capitalizeString(val);\n });\n }\n var joinedProperty = property.replace(/([a-z])([A-Z])/g, \"$1\" + position + \"$2\");\n return property === joinedProperty ? \"\" + property + position : joinedProperty;\n}\nfunction generateStyles(property, valuesWithDefaults) {\n var styles = {};\n for (var i = 0; i < valuesWithDefaults.length; i += 1) {\n if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {\n styles[generateProperty(property, positionMap$1[i])] = valuesWithDefaults[i];\n }\n }\n return styles;\n}\n\n/**\n * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...directionalProperty('padding', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction directionalProperty(property) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n // prettier-ignore\n var firstValue = values[0],\n _values$ = values[1],\n secondValue = _values$ === void 0 ? firstValue : _values$,\n _values$2 = values[2],\n thirdValue = _values$2 === void 0 ? firstValue : _values$2,\n _values$3 = values[3],\n fourthValue = _values$3 === void 0 ? secondValue : _values$3;\n var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];\n return generateStyles(property, valuesWithDefaults);\n}\n\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith(string, suffix) {\n return string.substr(-suffix.length) === suffix;\n}\n\nvar cssRegex$1 = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\nfunction stripUnit(value) {\n if (typeof value !== 'string') return value;\n var matchedValue = value.match(cssRegex$1);\n return matchedValue ? parseFloat(value) : value;\n}\n\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\nvar pxtoFactory = function pxtoFactory(to) {\n return function (pxval, base) {\n if (base === void 0) {\n base = '16px';\n }\n var newPxval = pxval;\n var newBase = base;\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n newPxval = stripUnit(pxval);\n }\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n newBase = stripUnit(base);\n }\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n return \"\" + newPxval / newBase + to;\n };\n};\nvar pixelsto = pxtoFactory;\n\n/**\n * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': em('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${em('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1em'\n * }\n */\nvar em = pixelsto('em');\nvar em$1 = em;\n\nvar cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n\n/**\n * Returns a given CSS value and its unit as elements of an array.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': getValueAndUnit('100px')[0],\n * '--unit': getValueAndUnit('100px')[1],\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${getValueAndUnit('100px')[0]};\n * --unit: ${getValueAndUnit('100px')[1]};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100,\n * '--unit': 'px',\n * }\n */\nfunction getValueAndUnit(value) {\n if (typeof value !== 'string') return [value, ''];\n var matchedValue = value.match(cssRegex);\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n}\n\n/**\n * Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...important(cover())\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${important(cover())}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute !important',\n * 'top': '0 !important',\n * 'right: '0 !important',\n * 'bottom': '0 !important',\n * 'left: '0 !important'\n * }\n */\nfunction important(styleBlock, rules) {\n if (typeof styleBlock !== 'object' || styleBlock === null) {\n throw new PolishedError(75, typeof styleBlock);\n }\n var newStyleBlock = {};\n Object.keys(styleBlock).forEach(function (key) {\n if (typeof styleBlock[key] === 'object' && styleBlock[key] !== null) {\n newStyleBlock[key] = important(styleBlock[key], rules);\n } else if (!rules || rules && (rules === key || rules.indexOf(key) >= 0)) {\n newStyleBlock[key] = styleBlock[key] + \" !important\";\n } else {\n newStyleBlock[key] = styleBlock[key];\n }\n });\n return newStyleBlock;\n}\n\nvar ratioNames = {\n minorSecond: 1.067,\n majorSecond: 1.125,\n minorThird: 1.2,\n majorThird: 1.25,\n perfectFourth: 1.333,\n augFourth: 1.414,\n perfectFifth: 1.5,\n minorSixth: 1.6,\n goldenSection: 1.618,\n majorSixth: 1.667,\n minorSeventh: 1.778,\n majorSeventh: 1.875,\n octave: 2,\n majorTenth: 2.5,\n majorEleventh: 2.667,\n majorTwelfth: 3,\n doubleOctave: 4\n};\nfunction getRatio(ratioName) {\n return ratioNames[ratioName];\n}\n\n/**\n * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.\n * @example\n * // Styles as object usage\n * const styles = {\n * // Increment two steps up the default scale\n * 'fontSize': modularScale(2)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * // Increment two steps up the default scale\n * fontSize: ${modularScale(2)}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'fontSize': '1.77689em'\n * }\n */\nfunction modularScale(steps, base, ratio) {\n if (base === void 0) {\n base = '1em';\n }\n if (ratio === void 0) {\n ratio = 1.333;\n }\n if (typeof steps !== 'number') {\n throw new PolishedError(42);\n }\n if (typeof ratio === 'string' && !ratioNames[ratio]) {\n throw new PolishedError(43);\n }\n var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],\n realBase = _ref[0],\n unit = _ref[1];\n var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;\n if (typeof realBase === 'string') {\n throw new PolishedError(44, base);\n }\n return \"\" + realBase * Math.pow(realRatio, steps) + (unit || '');\n}\n\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\nvar rem = pixelsto('rem');\nvar rem$1 = rem;\n\nvar defaultFontSize = 16;\nfunction convertBase(base) {\n var deconstructedValue = getValueAndUnit(base);\n if (deconstructedValue[1] === 'px') {\n return parseFloat(base);\n }\n if (deconstructedValue[1] === '%') {\n return parseFloat(base) / 100 * defaultFontSize;\n }\n throw new PolishedError(78, deconstructedValue[1]);\n}\nfunction getBaseFromDoc() {\n /* eslint-disable */\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n var rootFontSize = getComputedStyle(document.documentElement).fontSize;\n return rootFontSize ? convertBase(rootFontSize) : defaultFontSize;\n }\n /* eslint-enable */\n /* istanbul ignore next */\n return defaultFontSize;\n}\n\n/**\n * Convert rem values to px. By default, the base value is pulled from the font-size property on the root element (if it is set in % or px). It defaults to 16px if not found on the root. You can also override the base value by providing your own base in % or px.\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': remToPx('1.6rem')\n * 'height': remToPx('1.6rem', '10px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${remToPx('1.6rem')}\n * height: ${remToPx('1.6rem', '10px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '25.6px',\n * 'height': '16px',\n * }\n */\nfunction remToPx(value, base) {\n var deconstructedValue = getValueAndUnit(value);\n if (deconstructedValue[1] !== 'rem' && deconstructedValue[1] !== '') {\n throw new PolishedError(77, deconstructedValue[1]);\n }\n var newBase = base ? convertBase(base) : getBaseFromDoc();\n return deconstructedValue[0] * newBase + \"px\";\n}\n\nvar functionsMap$3 = {\n back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'\n};\n\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeIn('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeIn('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\nfunction easeIn(functionName) {\n return functionsMap$3[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$2 = {\n back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeInOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeInOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n * }\n */\nfunction easeInOut(functionName) {\n return functionsMap$2[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$1 = {\n back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'\n};\n\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n * }\n */\nfunction easeOut(functionName) {\n return functionsMap$1[functionName.toLowerCase().trim()];\n}\n\n/**\n * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: between('20px', '100px', '400px', '1000px'),\n * fontSize: between('20px', '100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${between('20px', '100px', '400px', '1000px')};\n * fontSize: ${between('20px', '100px')}\n * `\n *\n * // CSS as JS Output\n *\n * h1: {\n * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',\n * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'\n * }\n */\nfunction between(fromSize, toSize, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n var _getValueAndUnit = getValueAndUnit(fromSize),\n unitlessFromSize = _getValueAndUnit[0],\n fromSizeUnit = _getValueAndUnit[1];\n var _getValueAndUnit2 = getValueAndUnit(toSize),\n unitlessToSize = _getValueAndUnit2[0],\n toSizeUnit = _getValueAndUnit2[1];\n var _getValueAndUnit3 = getValueAndUnit(minScreen),\n unitlessMinScreen = _getValueAndUnit3[0],\n minScreenUnit = _getValueAndUnit3[1];\n var _getValueAndUnit4 = getValueAndUnit(maxScreen),\n unitlessMaxScreen = _getValueAndUnit4[0],\n maxScreenUnit = _getValueAndUnit4[1];\n if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {\n throw new PolishedError(47);\n }\n if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {\n throw new PolishedError(48);\n }\n if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {\n throw new PolishedError(76);\n }\n var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);\n var base = unitlessToSize - slope * unitlessMaxScreen;\n return \"calc(\" + base.toFixed(2) + (fromSizeUnit || '') + \" + \" + (100 * slope).toFixed(2) + \"vw)\";\n}\n\n/**\n * CSS to contain a float (credit to CSSMojo).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...clearFix(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${clearFix()}\n * `\n *\n * // CSS as JS Output\n *\n * '&::after': {\n * 'clear': 'both',\n * 'content': '\"\"',\n * 'display': 'table'\n * }\n */\nfunction clearFix(parent) {\n var _ref;\n if (parent === void 0) {\n parent = '&';\n }\n var pseudoSelector = parent + \"::after\";\n return _ref = {}, _ref[pseudoSelector] = {\n clear: 'both',\n content: '\"\"',\n display: 'table'\n }, _ref;\n}\n\n/**\n * CSS to fully cover an area. Can optionally be passed an offset to act as a \"padding\".\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...cover()\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${cover()}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute',\n * 'top': '0',\n * 'right: '0',\n * 'bottom': '0',\n * 'left: '0'\n * }\n */\nfunction cover(offset) {\n if (offset === void 0) {\n offset = 0;\n }\n return {\n position: 'absolute',\n top: offset,\n right: offset,\n bottom: offset,\n left: offset\n };\n}\n\n/**\n * CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...ellipsis('250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${ellipsis('250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'display': 'inline-block',\n * 'maxWidth': '250px',\n * 'overflow': 'hidden',\n * 'textOverflow': 'ellipsis',\n * 'whiteSpace': 'nowrap',\n * 'wordWrap': 'normal'\n * }\n */\nfunction ellipsis(width, lines) {\n if (lines === void 0) {\n lines = 1;\n }\n var styles = {\n display: 'inline-block',\n maxWidth: width || '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n };\n return lines > 1 ? _extends({}, styles, {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lines,\n display: '-webkit-box',\n whiteSpace: 'normal'\n }) : styles;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n/**\n * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * \"@media (min-width: 1000px)\": Object {\n * \"padding\": \"100px\",\n * },\n * \"@media (min-width: 400px)\": Object {\n * \"padding\": \"calc(-33.33333333333334px + 13.333333333333334vw)\",\n * },\n * \"padding\": \"20px\",\n * }\n */\nfunction fluidRange(cssProp, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {\n throw new PolishedError(49);\n }\n if (Array.isArray(cssProp)) {\n var mediaQueries = {};\n var fallbacks = {};\n for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {\n var _extends2, _extends3;\n var obj = _step.value;\n if (!obj.prop || !obj.fromSize || !obj.toSize) {\n throw new PolishedError(50);\n }\n fallbacks[obj.prop] = obj.fromSize;\n mediaQueries[\"@media (min-width: \" + minScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + minScreen + \")\"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));\n mediaQueries[\"@media (min-width: \" + maxScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + maxScreen + \")\"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));\n }\n return _extends({}, fallbacks, mediaQueries);\n } else {\n var _ref, _ref2, _ref3;\n if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {\n throw new PolishedError(51);\n }\n return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3[\"@media (min-width: \" + minScreen + \")\"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3[\"@media (min-width: \" + maxScreen + \")\"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;\n }\n}\n\nvar dataURIRegex = /^\\s*data:([a-z]+\\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\\-._~:@/?%\\s]*\\s*$/i;\nvar formatHintMap = {\n woff: 'woff',\n woff2: 'woff2',\n ttf: 'truetype',\n otf: 'opentype',\n eot: 'embedded-opentype',\n svg: 'svg',\n svgz: 'svg'\n};\nfunction generateFormatHint(format, formatHint) {\n if (!formatHint) return '';\n return \" format(\\\"\" + formatHintMap[format] + \"\\\")\";\n}\nfunction isDataURI(fontFilePath) {\n return !!fontFilePath.replace(/\\s+/g, ' ').match(dataURIRegex);\n}\nfunction generateFileReferences(fontFilePath, fileFormats, formatHint) {\n if (isDataURI(fontFilePath)) {\n return \"url(\\\"\" + fontFilePath + \"\\\")\" + generateFormatHint(fileFormats[0], formatHint);\n }\n var fileFontReferences = fileFormats.map(function (format) {\n return \"url(\\\"\" + fontFilePath + \".\" + format + \"\\\")\" + generateFormatHint(format, formatHint);\n });\n return fileFontReferences.join(', ');\n}\nfunction generateLocalReferences(localFonts) {\n var localFontReferences = localFonts.map(function (font) {\n return \"local(\\\"\" + font + \"\\\")\";\n });\n return localFontReferences.join(', ');\n}\nfunction generateSources(fontFilePath, localFonts, fileFormats, formatHint) {\n var fontReferences = [];\n if (localFonts) fontReferences.push(generateLocalReferences(localFonts));\n if (fontFilePath) {\n fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));\n }\n return fontReferences.join(', ');\n}\n\n/**\n * CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.\n *\n * @example\n * // Styles as object basic usage\n * const styles = {\n * ...fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * })\n * }\n *\n * // styled-components basic usage\n * const GlobalStyle = createGlobalStyle`${\n * fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * }\n * )}`\n *\n * // CSS as JS Output\n *\n * '@font-face': {\n * 'fontFamily': 'Sans-Pro',\n * 'src': 'url(\"path/to/file.eot\"), url(\"path/to/file.woff2\"), url(\"path/to/file.woff\"), url(\"path/to/file.ttf\"), url(\"path/to/file.svg\")',\n * }\n */\n\nfunction fontFace(_ref) {\n var fontFamily = _ref.fontFamily,\n fontFilePath = _ref.fontFilePath,\n fontStretch = _ref.fontStretch,\n fontStyle = _ref.fontStyle,\n fontVariant = _ref.fontVariant,\n fontWeight = _ref.fontWeight,\n _ref$fileFormats = _ref.fileFormats,\n fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,\n _ref$formatHint = _ref.formatHint,\n formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,\n _ref$localFonts = _ref.localFonts,\n localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,\n unicodeRange = _ref.unicodeRange,\n fontDisplay = _ref.fontDisplay,\n fontVariationSettings = _ref.fontVariationSettings,\n fontFeatureSettings = _ref.fontFeatureSettings;\n // Error Handling\n if (!fontFamily) throw new PolishedError(55);\n if (!fontFilePath && !localFonts) {\n throw new PolishedError(52);\n }\n if (localFonts && !Array.isArray(localFonts)) {\n throw new PolishedError(53);\n }\n if (!Array.isArray(fileFormats)) {\n throw new PolishedError(54);\n }\n var fontFaceDeclaration = {\n '@font-face': {\n fontFamily: fontFamily,\n src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),\n unicodeRange: unicodeRange,\n fontStretch: fontStretch,\n fontStyle: fontStyle,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n fontDisplay: fontDisplay,\n fontVariationSettings: fontVariationSettings,\n fontFeatureSettings: fontFeatureSettings\n }\n };\n\n // Removes undefined fields for cleaner css object.\n return JSON.parse(JSON.stringify(fontFaceDeclaration));\n}\n\n/**\n * CSS to hide text to show a background image in a SEO-friendly way.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'backgroundImage': 'url(logo.png)',\n * ...hideText(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * backgroundImage: url(logo.png);\n * ${hideText()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'backgroundImage': 'url(logo.png)',\n * 'textIndent': '101%',\n * 'overflow': 'hidden',\n * 'whiteSpace': 'nowrap',\n * }\n */\nfunction hideText() {\n return {\n textIndent: '101%',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n };\n}\n\n/**\n * CSS to hide content visually but remain accessible to screen readers.\n * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...hideVisually(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hideVisually()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'border': '0',\n * 'clip': 'rect(0 0 0 0)',\n * 'height': '1px',\n * 'margin': '-1px',\n * 'overflow': 'hidden',\n * 'padding': '0',\n * 'position': 'absolute',\n * 'whiteSpace': 'nowrap',\n * 'width': '1px',\n * }\n */\nfunction hideVisually() {\n return {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n };\n}\n\n/**\n * Generates a media query to target HiDPI devices.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * [hiDPI(1.5)]: {\n * width: 200px;\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hiDPI(1.5)} {\n * width: 200px;\n * }\n * `\n *\n * // CSS as JS Output\n *\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\n * only screen and (min--moz-device-pixel-ratio: 1.5),\n * only screen and (-o-min-device-pixel-ratio: 1.5/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * 'width': '200px',\n * }\n */\nfunction hiDPI(ratio) {\n if (ratio === void 0) {\n ratio = 1.3;\n }\n return \"\\n @media only screen and (-webkit-min-device-pixel-ratio: \" + ratio + \"),\\n only screen and (min--moz-device-pixel-ratio: \" + ratio + \"),\\n only screen and (-o-min-device-pixel-ratio: \" + ratio + \"/1),\\n only screen and (min-resolution: \" + Math.round(ratio * 96) + \"dpi),\\n only screen and (min-resolution: \" + ratio + \"dppx)\\n \";\n}\n\nfunction constructGradientValue(literals) {\n var template = '';\n for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n substitutions[_key - 1] = arguments[_key];\n }\n for (var i = 0; i < literals.length; i += 1) {\n template += literals[i];\n if (i === substitutions.length - 1 && substitutions[i]) {\n var definedValues = substitutions.filter(function (substitute) {\n return !!substitute;\n });\n // Adds leading coma if properties preceed color-stops\n if (definedValues.length > 1) {\n template = template.slice(0, -1);\n template += \", \" + substitutions[i];\n // No trailing space if color-stops is the only param provided\n } else if (definedValues.length === 1) {\n template += \"\" + substitutions[i];\n }\n } else if (substitutions[i]) {\n template += substitutions[i] + \" \";\n }\n }\n return template.trim();\n}\n\nvar _templateObject$1;\n/**\n * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#FFF',\n * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction linearGradient(_ref) {\n var colorStops = _ref.colorStops,\n fallback = _ref.fallback,\n _ref$toDirection = _ref.toDirection,\n toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(56);\n }\n return {\n backgroundColor: fallback || colorStops[0].replace(/,\\s+/g, ',').split(' ')[0].replace(/,(?=\\S)/g, ', '),\n backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose([\"linear-gradient(\", \"\", \")\"])), toDirection, colorStops.join(', ').replace(/,(?=\\S)/g, ', '))\n };\n}\n\n/**\n * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...normalize(),\n * }\n *\n * // styled-components usage\n * const GlobalStyle = createGlobalStyle`${normalize()}`\n *\n * // CSS as JS Output\n *\n * html {\n * lineHeight: 1.15,\n * textSizeAdjust: 100%,\n * } ...\n */\nfunction normalize() {\n var _ref;\n return [(_ref = {\n html: {\n lineHeight: '1.15',\n textSizeAdjust: '100%'\n },\n body: {\n margin: '0'\n },\n main: {\n display: 'block'\n },\n h1: {\n fontSize: '2em',\n margin: '0.67em 0'\n },\n hr: {\n boxSizing: 'content-box',\n height: '0',\n overflow: 'visible'\n },\n pre: {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n },\n a: {\n backgroundColor: 'transparent'\n },\n 'abbr[title]': {\n borderBottom: 'none',\n textDecoration: 'underline'\n }\n }, _ref[\"b,\\n strong\"] = {\n fontWeight: 'bolder'\n }, _ref[\"code,\\n kbd,\\n samp\"] = {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n }, _ref.small = {\n fontSize: '80%'\n }, _ref[\"sub,\\n sup\"] = {\n fontSize: '75%',\n lineHeight: '0',\n position: 'relative',\n verticalAlign: 'baseline'\n }, _ref.sub = {\n bottom: '-0.25em'\n }, _ref.sup = {\n top: '-0.5em'\n }, _ref.img = {\n borderStyle: 'none'\n }, _ref[\"button,\\n input,\\n optgroup,\\n select,\\n textarea\"] = {\n fontFamily: 'inherit',\n fontSize: '100%',\n lineHeight: '1.15',\n margin: '0'\n }, _ref[\"button,\\n input\"] = {\n overflow: 'visible'\n }, _ref[\"button,\\n select\"] = {\n textTransform: 'none'\n }, _ref[\"button,\\n html [type=\\\"button\\\"],\\n [type=\\\"reset\\\"],\\n [type=\\\"submit\\\"]\"] = {\n WebkitAppearance: 'button'\n }, _ref[\"button::-moz-focus-inner,\\n [type=\\\"button\\\"]::-moz-focus-inner,\\n [type=\\\"reset\\\"]::-moz-focus-inner,\\n [type=\\\"submit\\\"]::-moz-focus-inner\"] = {\n borderStyle: 'none',\n padding: '0'\n }, _ref[\"button:-moz-focusring,\\n [type=\\\"button\\\"]:-moz-focusring,\\n [type=\\\"reset\\\"]:-moz-focusring,\\n [type=\\\"submit\\\"]:-moz-focusring\"] = {\n outline: '1px dotted ButtonText'\n }, _ref.fieldset = {\n padding: '0.35em 0.625em 0.75em'\n }, _ref.legend = {\n boxSizing: 'border-box',\n color: 'inherit',\n display: 'table',\n maxWidth: '100%',\n padding: '0',\n whiteSpace: 'normal'\n }, _ref.progress = {\n verticalAlign: 'baseline'\n }, _ref.textarea = {\n overflow: 'auto'\n }, _ref[\"[type=\\\"checkbox\\\"],\\n [type=\\\"radio\\\"]\"] = {\n boxSizing: 'border-box',\n padding: '0'\n }, _ref[\"[type=\\\"number\\\"]::-webkit-inner-spin-button,\\n [type=\\\"number\\\"]::-webkit-outer-spin-button\"] = {\n height: 'auto'\n }, _ref['[type=\"search\"]'] = {\n WebkitAppearance: 'textfield',\n outlineOffset: '-2px'\n }, _ref['[type=\"search\"]::-webkit-search-decoration'] = {\n WebkitAppearance: 'none'\n }, _ref['::-webkit-file-upload-button'] = {\n WebkitAppearance: 'button',\n font: 'inherit'\n }, _ref.details = {\n display: 'block'\n }, _ref.summary = {\n display: 'list-item'\n }, _ref.template = {\n display: 'none'\n }, _ref['[hidden]'] = {\n display: 'none'\n }, _ref), {\n 'abbr[title]': {\n textDecoration: 'underline dotted'\n }\n }];\n}\n\nvar _templateObject;\n/**\n * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#00FFFF',\n * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction radialGradient(_ref) {\n var colorStops = _ref.colorStops,\n _ref$extent = _ref.extent,\n extent = _ref$extent === void 0 ? '' : _ref$extent,\n fallback = _ref.fallback,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? '' : _ref$position,\n _ref$shape = _ref.shape,\n shape = _ref$shape === void 0 ? '' : _ref$shape;\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(57);\n }\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"radial-gradient(\", \"\", \"\", \"\", \")\"])), position, shape, extent, colorStops.join(', '))\n };\n}\n\n/**\n * A helper to generate a retina background image and non-retina\n * background image. The retina background image will output to a HiDPI media query. The mixin uses\n * a _2x.png filename suffix by default.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...retinaImage('my-img')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${retinaImage('my-img')}\n * `\n *\n * // CSS as JS Output\n * div {\n * backgroundImage: 'url(my-img.png)',\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),\n * only screen and (min--moz-device-pixel-ratio: 1.3),\n * only screen and (-o-min-device-pixel-ratio: 1.3/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * backgroundImage: 'url(my-img_2x.png)',\n * }\n * }\n */\nfunction retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {\n var _ref;\n if (extension === void 0) {\n extension = 'png';\n }\n if (retinaSuffix === void 0) {\n retinaSuffix = '_2x';\n }\n if (!filename) {\n throw new PolishedError(58);\n }\n // Replace the dot at the beginning of the passed extension if one exists\n var ext = extension.replace(/^\\./, '');\n var rFilename = retinaFilename ? retinaFilename + \".\" + ext : \"\" + filename + retinaSuffix + \".\" + ext;\n return _ref = {\n backgroundImage: \"url(\" + filename + \".\" + ext + \")\"\n }, _ref[hiDPI()] = _extends({\n backgroundImage: \"url(\" + rFilename + \")\"\n }, backgroundSize ? {\n backgroundSize: backgroundSize\n } : {}), _ref;\n}\n\n/* eslint-disable key-spacing */\nvar functionsMap = {\n easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/* eslint-enable key-spacing */\n\nfunction getTimingFunction(functionName) {\n return functionsMap[functionName];\n}\n\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': timingFunctions('easeInQuad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${timingFunctions('easeInQuad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\nfunction timingFunctions(timingFunction) {\n return getTimingFunction(timingFunction);\n}\n\nvar getBorderWidth = function getBorderWidth(pointingDirection, height, width) {\n var fullWidth = \"\" + width[0] + (width[1] || '');\n var halfWidth = \"\" + width[0] / 2 + (width[1] || '');\n var fullHeight = \"\" + height[0] + (height[1] || '');\n var halfHeight = \"\" + height[0] / 2 + (height[1] || '');\n switch (pointingDirection) {\n case 'top':\n return \"0 \" + halfWidth + \" \" + fullHeight + \" \" + halfWidth;\n case 'topLeft':\n return fullWidth + \" \" + fullHeight + \" 0 0\";\n case 'left':\n return halfHeight + \" \" + fullWidth + \" \" + halfHeight + \" 0\";\n case 'bottomLeft':\n return fullWidth + \" 0 0 \" + fullHeight;\n case 'bottom':\n return fullHeight + \" \" + halfWidth + \" 0 \" + halfWidth;\n case 'bottomRight':\n return \"0 0 \" + fullWidth + \" \" + fullHeight;\n case 'right':\n return halfHeight + \" 0 \" + halfHeight + \" \" + fullWidth;\n case 'topRight':\n default:\n return \"0 \" + fullWidth + \" \" + fullHeight + \" 0\";\n }\n};\nvar getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {\n switch (pointingDirection) {\n case 'top':\n case 'bottomRight':\n return {\n borderBottomColor: foregroundColor\n };\n case 'right':\n case 'bottomLeft':\n return {\n borderLeftColor: foregroundColor\n };\n case 'bottom':\n case 'topLeft':\n return {\n borderTopColor: foregroundColor\n };\n case 'left':\n case 'topRight':\n return {\n borderRightColor: foregroundColor\n };\n default:\n throw new PolishedError(59);\n }\n};\n\n/**\n * CSS to represent triangle with any pointing direction with an optional background color.\n *\n * @example\n * // Styles as object usage\n *\n * const styles = {\n * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })\n * }\n *\n *\n * // styled-components usage\n * const div = styled.div`\n * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}\n *\n *\n * // CSS as JS Output\n *\n * div: {\n * 'borderColor': 'transparent transparent transparent red',\n * 'borderStyle': 'solid',\n * 'borderWidth': '50px 0 50px 100px',\n * 'height': '0',\n * 'width': '0',\n * }\n */\nfunction triangle(_ref) {\n var pointingDirection = _ref.pointingDirection,\n height = _ref.height,\n width = _ref.width,\n foregroundColor = _ref.foregroundColor,\n _ref$backgroundColor = _ref.backgroundColor,\n backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;\n var widthAndUnit = getValueAndUnit(width);\n var heightAndUnit = getValueAndUnit(height);\n if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {\n throw new PolishedError(60);\n }\n return _extends({\n width: '0',\n height: '0',\n borderColor: backgroundColor\n }, getBorderColor(pointingDirection, foregroundColor), {\n borderStyle: 'solid',\n borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)\n });\n}\n\n/**\n * Provides an easy way to change the `wordWrap` property.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...wordWrap('break-word')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${wordWrap('break-word')}\n * `\n *\n * // CSS as JS Output\n *\n * const styles = {\n * overflowWrap: 'break-word',\n * wordWrap: 'break-word',\n * wordBreak: 'break-all',\n * }\n */\nfunction wordWrap(wrap) {\n if (wrap === void 0) {\n wrap = 'break-word';\n }\n var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;\n return {\n overflowWrap: wrap,\n wordWrap: wrap,\n wordBreak: wordBreak\n };\n}\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgb(?:a)?\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^hsl(?:a)?\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;\n\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n var normalizedColor = nameToHex(color);\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n var rgbMatched = rgbRegex.exec(normalizedColor);\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4]) > 1 ? parseFloat(\"\" + rgbaMatched[4]) / 100 : parseFloat(\"\" + rgbaMatched[4])\n };\n }\n var hslMatched = hslRegex.exec(normalizedColor);\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4]) > 1 ? parseFloat(\"\" + hslaMatched[4]) / 100 : parseFloat(\"\" + hslaMatched[4])\n };\n }\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / delta + 2;\n break;\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n hue *= 60;\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n return value;\n};\nvar reduceHexValue$1 = reduceHexValue;\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\nfunction convertToHex(red, green, blue) {\n return reduceHexValue$1(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n throw new PolishedError(1);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n throw new PolishedError(2);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue$1(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue$1(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n throw new PolishedError(6);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n}\n\n// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n}\n\n// eslint-disable-next-line no-redeclare\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\n/**\n * Changes the hue of the color. Hue is a number between 0 to 360. The first\n * argument for adjustHue is the amount of degrees the color is rotated around\n * the color wheel, always producing a positive hue value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: adjustHue(180, '#448'),\n * background: adjustHue('180', 'rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${adjustHue(180, '#448')};\n * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#888844\";\n * background: \"rgba(136,136,68,0.7)\";\n * }\n */\nfunction adjustHue(degree, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: hslColor.hue + parseFloat(degree)\n }));\n}\n\n// prettier-ignore\nvar curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);\nvar curriedAdjustHue$1 = curriedAdjustHue;\n\n/**\n * Returns the complement of the provided color. This is identical to adjustHue(180, <color>).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: complement('#448'),\n * background: complement('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${complement('#448')};\n * background: ${complement('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#884\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\nfunction complement(color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: (hslColor.hue + 180) % 360\n }));\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n}\n\n// prettier-ignore\nvar curriedDarken = curry /* ::<number | string, string, string> */(darken);\nvar curriedDarken$1 = curriedDarken;\n\n/**\n * Decreases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the desaturate function is the amount by how much the color\n * intensity should be decreased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: desaturate(0.2, '#CCCD64'),\n * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${desaturate(0.2, '#CCCD64')};\n * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#b8b979\";\n * background: \"rgba(184,185,121,0.7)\";\n * }\n */\nfunction desaturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))\n }));\n}\n\n// prettier-ignore\nvar curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);\nvar curriedDesaturate$1 = curriedDesaturate;\n\n/**\n * Returns a number (float) representing the luminance of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',\n * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)',\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};\n * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)'};\n *\n * // CSS in JS Output\n *\n * div {\n * background: \"#CCCD64\";\n * background: \"rgba(58, 133, 255, 1)\";\n * }\n */\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n var rgbColor = parseToRgb(color);\n var _Object$keys$map = Object.keys(rgbColor).map(function (key) {\n var channel = rgbColor[key] / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }),\n r = _Object$keys$map[0],\n g = _Object$keys$map[1],\n b = _Object$keys$map[2];\n return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));\n}\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n *\n * @example\n * const contrastRatio = getContrast('#444', '#fff');\n */\nfunction getContrast(color1, color2) {\n var luminance1 = getLuminance(color1);\n var luminance2 = getLuminance(color2);\n return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));\n}\n\n/**\n * Converts the color to a grayscale, by reducing its saturation to 0.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: grayscale('#CCCD64'),\n * background: grayscale('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${grayscale('#CCCD64')};\n * background: ${grayscale('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#999\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\nfunction grayscale(color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: 0\n }));\n}\n\n/**\n * Converts a HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\nfunction hslToColorString(color) {\n if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {\n if (color.alpha && typeof color.alpha === 'number') {\n return hsla({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness,\n alpha: color.alpha\n });\n }\n return hsl({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness\n });\n }\n throw new PolishedError(45);\n}\n\n/**\n * Inverts the red, green and blue values of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: invert('#CCCD64'),\n * background: invert('rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${invert('#CCCD64')};\n * background: ${invert('rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#33329b\";\n * background: \"rgba(154,155,50,0.7)\";\n * }\n */\nfunction invert(color) {\n if (color === 'transparent') return color;\n // parse color string to rgb\n var value = parseToRgb(color);\n return toColorString(_extends({}, value, {\n red: 255 - value.red,\n green: 255 - value.green,\n blue: 255 - value.blue\n }));\n}\n\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n}\n\n// prettier-ignore\nvar curriedLighten = curry /* ::<number | string, string, string> */(lighten);\nvar curriedLighten$1 = curriedLighten;\n\n/**\n * Determines which contrast guidelines have been met for two colors.\n * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).\n *\n * @example\n * const scores = meetsContrastGuidelines('#444', '#fff');\n */\nfunction meetsContrastGuidelines(color1, color2) {\n var contrastRatio = getContrast(color1, color2);\n return {\n AA: contrastRatio >= 4.5,\n AALarge: contrastRatio >= 3,\n AAA: contrastRatio >= 7,\n AAALarge: contrastRatio >= 4.5\n };\n}\n\n/**\n * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: mix(0.5, '#f00', '#00f')\n * background: mix(0.25, '#f00', '#00f')\n * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${mix(0.5, '#f00', '#00f')};\n * background: ${mix(0.25, '#f00', '#00f')};\n * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#7f007f\";\n * background: \"#3f00bf\";\n * background: \"rgba(63, 0, 191, 0.75)\";\n * }\n */\nfunction mix(weight, color, otherColor) {\n if (color === 'transparent') return otherColor;\n if (otherColor === 'transparent') return color;\n if (weight === 0) return otherColor;\n var parsedColor1 = parseToRgb(color);\n var color1 = _extends({}, parsedColor1, {\n alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1\n });\n var parsedColor2 = parseToRgb(otherColor);\n var color2 = _extends({}, parsedColor2, {\n alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1\n });\n\n // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n var alphaDelta = color1.alpha - color2.alpha;\n var x = parseFloat(weight) * 2 - 1;\n var y = x * alphaDelta === -1 ? x : x + alphaDelta;\n var z = 1 + x * alphaDelta;\n var weight1 = (y / z + 1) / 2.0;\n var weight2 = 1 - weight1;\n var mixedColor = {\n red: Math.floor(color1.red * weight1 + color2.red * weight2),\n green: Math.floor(color1.green * weight1 + color2.green * weight2),\n blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),\n alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))\n };\n return rgba(mixedColor);\n}\n\n// prettier-ignore\nvar curriedMix = curry /* ::<number | string, string, string, string> */(mix);\nvar mix$1 = curriedMix;\n\n/**\n * Increases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');\n * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),\n * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};\n * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},\n * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#fff\";\n * background: \"rgba(255,255,255,0.7)\";\n * background: \"rgba(255,0,0,0.7)\";\n * }\n */\nfunction opacify(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)\n });\n return rgba(colorWithAlpha);\n}\n\n// prettier-ignore\nvar curriedOpacify = curry /* ::<number | string, string, string> */(opacify);\nvar curriedOpacify$1 = curriedOpacify;\n\nvar defaultReturnIfLightColor = '#000';\nvar defaultReturnIfDarkColor = '#fff';\n\n/**\n * Returns black or white (or optional passed colors) for best\n * contrast depending on the luminosity of the given color.\n * When passing custom return colors, strict mode ensures that the\n * return color always meets or exceeds WCAG level AA or greater. If this test\n * fails, the default return color (black or white) is returned in place of the\n * custom return color. You can optionally turn off strict mode.\n *\n * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * color: readableColor('#000'),\n * color: readableColor('black', '#001', '#ff8'),\n * color: readableColor('white', '#001', '#ff8'),\n * color: readableColor('red', '#333', '#ddd', true)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * color: ${readableColor('#000')};\n * color: ${readableColor('black', '#001', '#ff8')};\n * color: ${readableColor('white', '#001', '#ff8')};\n * color: ${readableColor('red', '#333', '#ddd', true)};\n * `\n *\n * // CSS in JS Output\n * element {\n * color: \"#fff\";\n * color: \"#ff8\";\n * color: \"#001\";\n * color: \"#000\";\n * }\n */\nfunction readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {\n if (returnIfLightColor === void 0) {\n returnIfLightColor = defaultReturnIfLightColor;\n }\n if (returnIfDarkColor === void 0) {\n returnIfDarkColor = defaultReturnIfDarkColor;\n }\n if (strict === void 0) {\n strict = true;\n }\n var isColorLight = getLuminance(color) > 0.179;\n var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;\n if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {\n return preferredReturnColor;\n }\n return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;\n}\n\n/**\n * Converts a RgbColor or RgbaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb` or `rgba`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),\n * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * }\n */\nfunction rgbToColorString(color) {\n if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {\n if (typeof color.alpha === 'number') {\n return rgba({\n red: color.red,\n green: color.green,\n blue: color.blue,\n alpha: color.alpha\n });\n }\n return rgb({\n red: color.red,\n green: color.green,\n blue: color.blue\n });\n }\n throw new PolishedError(46);\n}\n\n/**\n * Increases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the saturate function is the amount by how much the color\n * intensity should be increased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: saturate(0.2, '#CCCD64'),\n * background: saturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${saturate(0.2, '#FFCD64')};\n * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e0e250\";\n * background: \"rgba(224,226,80,0.7)\";\n * }\n */\nfunction saturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))\n }));\n}\n\n// prettier-ignore\nvar curriedSaturate = curry /* ::<number | string, string, string> */(saturate);\nvar curriedSaturate$1 = curriedSaturate;\n\n/**\n * Sets the hue of a color to the provided value. The hue range can be\n * from 0 and 359.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setHue(42, '#CCCD64'),\n * background: setHue('244', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setHue(42, '#CCCD64')};\n * background: ${setHue('244', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#cdae64\";\n * background: \"rgba(107,100,205,0.7)\";\n * }\n */\nfunction setHue(hue, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n hue: parseFloat(hue)\n }));\n}\n\n// prettier-ignore\nvar curriedSetHue = curry /* ::<number | string, string, string> */(setHue);\nvar curriedSetHue$1 = curriedSetHue;\n\n/**\n * Sets the lightness of a color to the provided value. The lightness range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setLightness(0.2, '#CCCD64'),\n * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setLightness(0.2, '#CCCD64')};\n * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#4d4d19\";\n * background: \"rgba(223,224,159,0.7)\";\n * }\n */\nfunction setLightness(lightness, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n lightness: parseFloat(lightness)\n }));\n}\n\n// prettier-ignore\nvar curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);\nvar curriedSetLightness$1 = curriedSetLightness;\n\n/**\n * Sets the saturation of a color to the provided value. The saturation range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setSaturation(0.2, '#CCCD64'),\n * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setSaturation(0.2, '#CCCD64')};\n * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#adad84\";\n * background: \"rgba(228,229,76,0.7)\";\n * }\n */\nfunction setSaturation(saturation, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: parseFloat(saturation)\n }));\n}\n\n// prettier-ignore\nvar curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);\nvar curriedSetSaturation$1 = curriedSetSaturation;\n\n/**\n * Shades a color by mixing it with black. `shade` can produce\n * hue shifts, where as `darken` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: shade(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${shade(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#00003f\";\n * }\n */\n\nfunction shade(percentage, color) {\n if (color === 'transparent') return color;\n return mix$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);\n}\n\n// prettier-ignore\nvar curriedShade = curry /* ::<number | string, string, string> */(shade);\nvar curriedShade$1 = curriedShade;\n\n/**\n * Tints a color by mixing it with white. `tint` can produce\n * hue shifts, where as `lighten` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: tint(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${tint(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#bfbfff\";\n * }\n */\n\nfunction tint(percentage, color) {\n if (color === 'transparent') return color;\n return mix$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);\n}\n\n// prettier-ignore\nvar curriedTint = curry /* ::<number | string, string, string> */(tint);\nvar curriedTint$1 = curriedTint;\n\n/**\n * Decreases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: transparentize(0.1, '#fff'),\n * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),\n * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${transparentize(0.1, '#fff')};\n * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};\n * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,255,255,0.9)\";\n * background: \"rgba(255,255,255,0.8)\";\n * background: \"rgba(255,0,0,0.3)\";\n * }\n */\nfunction transparentize(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)\n });\n return rgba(colorWithAlpha);\n}\n\n// prettier-ignore\nvar curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);\nvar curriedTransparentize$1 = curriedTransparentize;\n\n/**\n * Shorthand for easily setting the animation property. Allows either multiple arrays with animations\n * or a single animation spread over the arguments.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out, colorchange 2s'\n * }\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation('rotate', '1s', 'ease-in-out')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation('rotate', '1s', 'ease-in-out')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out'\n * }\n */\nfunction animation() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // Allow single or multiple animations passed\n var multiMode = Array.isArray(args[0]);\n if (!multiMode && args.length > 8) {\n throw new PolishedError(64);\n }\n var code = args.map(function (arg) {\n if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {\n throw new PolishedError(65);\n }\n if (Array.isArray(arg) && arg.length > 8) {\n throw new PolishedError(66);\n }\n return Array.isArray(arg) ? arg.join(' ') : arg;\n }).join(', ');\n return {\n animation: code\n };\n}\n\n/**\n * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'backgroundImage': 'url(\"/image/background.jpg\"), linear-gradient(red, green)'\n * }\n */\nfunction backgroundImages() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n return {\n backgroundImage: properties.join(', ')\n };\n}\n\n/**\n * Shorthand that accepts any number of background values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'background': 'url(\"/image/background.jpg\"), linear-gradient(red, green), center no-repeat'\n * }\n */\nfunction backgrounds() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n return {\n background: properties.join(', ')\n };\n}\n\nvar sideMap = ['top', 'right', 'bottom', 'left'];\n\n/**\n * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...border('1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderColor': 'red',\n * 'borderStyle': 'solid',\n * 'borderWidth': `1px`,\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...border('top', '1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('top', '1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderTopStyle': 'solid',\n * 'borderTopWidth': `1px`,\n * }\n */\n\nfunction border(sideKeyword) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {\n var _ref;\n return _ref = {}, _ref[\"border\" + capitalizeString(sideKeyword) + \"Width\"] = values[0], _ref[\"border\" + capitalizeString(sideKeyword) + \"Style\"] = values[1], _ref[\"border\" + capitalizeString(sideKeyword) + \"Color\"] = values[2], _ref;\n } else {\n values.unshift(sideKeyword);\n return {\n borderWidth: values[0],\n borderStyle: values[1],\n borderColor: values[2]\n };\n }\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderColor('red', 'green', 'blue', 'yellow')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderColor('red', 'green', 'blue', 'yellow')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderRightColor': 'green',\n * 'borderBottomColor': 'blue',\n * 'borderLeftColor': 'yellow'\n * }\n */\nfunction borderColor() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['borderColor'].concat(values));\n}\n\n/**\n * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderRadius('top', '5px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderRadius('top', '5px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopRightRadius': '5px',\n * 'borderTopLeftRadius': '5px',\n * }\n */\nfunction borderRadius(side, radius) {\n var uppercaseSide = capitalizeString(side);\n if (!radius && radius !== 0) {\n throw new PolishedError(62);\n }\n if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {\n var _ref;\n return _ref = {}, _ref[\"border\" + uppercaseSide + \"RightRadius\"] = radius, _ref[\"border\" + uppercaseSide + \"LeftRadius\"] = radius, _ref;\n }\n if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {\n var _ref2;\n return _ref2 = {}, _ref2[\"borderTop\" + uppercaseSide + \"Radius\"] = radius, _ref2[\"borderBottom\" + uppercaseSide + \"Radius\"] = radius, _ref2;\n }\n throw new PolishedError(63);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderStyle('solid', 'dashed', 'dotted', 'double')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderStyle('solid', 'dashed', 'dotted', 'double')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopStyle': 'solid',\n * 'borderRightStyle': 'dashed',\n * 'borderBottomStyle': 'dotted',\n * 'borderLeftStyle': 'double'\n * }\n */\nfunction borderStyle() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['borderStyle'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderWidth('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderWidth('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopWidth': '12px',\n * 'borderRightWidth': '24px',\n * 'borderBottomWidth': '36px',\n * 'borderLeftWidth': '48px'\n * }\n */\nfunction borderWidth() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['borderWidth'].concat(values));\n}\n\nfunction generateSelectors(template, state) {\n var stateSuffix = state ? \":\" + state : '';\n return template(stateSuffix);\n}\n\n/**\n * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.\n * @private\n */\nfunction statefulSelectors(states, template, stateMap) {\n if (!template) throw new PolishedError(67);\n if (states.length === 0) return generateSelectors(template, null);\n var selectors = [];\n for (var i = 0; i < states.length; i += 1) {\n if (stateMap && stateMap.indexOf(states[i]) < 0) {\n throw new PolishedError(68);\n }\n selectors.push(generateSelectors(template, states[i]));\n }\n selectors = selectors.join(',');\n return selectors;\n}\n\nvar stateMap$1 = [undefined, null, 'active', 'focus', 'hover'];\nfunction template$1(state) {\n return \"button\" + state + \",\\n input[type=\\\"button\\\"]\" + state + \",\\n input[type=\\\"reset\\\"]\" + state + \",\\n input[type=\\\"submit\\\"]\" + state;\n}\n\n/**\n * Populates selectors that target all buttons. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [buttons('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${buttons('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'button:active,\n * 'input[type=\"button\"]:active,\n * 'input[type=\\\"reset\\\"]:active,\n * 'input[type=\\\"submit\\\"]:active: {\n * 'border': 'none'\n * }\n */\nfunction buttons() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n return statefulSelectors(states, template$1, stateMap$1);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...margin('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${margin('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'marginTop': '12px',\n * 'marginRight': '24px',\n * 'marginBottom': '36px',\n * 'marginLeft': '48px'\n * }\n */\nfunction margin() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['margin'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...padding('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${padding('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction padding() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n return directionalProperty.apply(void 0, ['padding'].concat(values));\n}\n\nvar positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];\n\n/**\n * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...position('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...position('absolute', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('absolute', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'position': 'absolute',\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n */\nfunction position(firstValue) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n if (positionMap.indexOf(firstValue) >= 0 && firstValue) {\n return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {\n position: firstValue\n });\n } else {\n return directionalProperty.apply(void 0, ['', firstValue].concat(values));\n }\n}\n\n/**\n * Shorthand to set the height and width properties in a single statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...size('300px', '250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${size('300px', '250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'height': '300px',\n * 'width': '250px',\n * }\n */\nfunction size(height, width) {\n if (width === void 0) {\n width = height;\n }\n return {\n height: height,\n width: width\n };\n}\n\nvar stateMap = [undefined, null, 'active', 'focus', 'hover'];\nfunction template(state) {\n return \"input[type=\\\"color\\\"]\" + state + \",\\n input[type=\\\"date\\\"]\" + state + \",\\n input[type=\\\"datetime\\\"]\" + state + \",\\n input[type=\\\"datetime-local\\\"]\" + state + \",\\n input[type=\\\"email\\\"]\" + state + \",\\n input[type=\\\"month\\\"]\" + state + \",\\n input[type=\\\"number\\\"]\" + state + \",\\n input[type=\\\"password\\\"]\" + state + \",\\n input[type=\\\"search\\\"]\" + state + \",\\n input[type=\\\"tel\\\"]\" + state + \",\\n input[type=\\\"text\\\"]\" + state + \",\\n input[type=\\\"time\\\"]\" + state + \",\\n input[type=\\\"url\\\"]\" + state + \",\\n input[type=\\\"week\\\"]\" + state + \",\\n input:not([type])\" + state + \",\\n textarea\" + state;\n}\n\n/**\n * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [textInputs('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${textInputs('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'input[type=\"color\"]:active,\n * input[type=\"date\"]:active,\n * input[type=\"datetime\"]:active,\n * input[type=\"datetime-local\"]:active,\n * input[type=\"email\"]:active,\n * input[type=\"month\"]:active,\n * input[type=\"number\"]:active,\n * input[type=\"password\"]:active,\n * input[type=\"search\"]:active,\n * input[type=\"tel\"]:active,\n * input[type=\"text\"]:active,\n * input[type=\"time\"]:active,\n * input[type=\"url\"]:active,\n * input[type=\"week\"]:active,\n * input:not([type]):active,\n * textarea:active': {\n * 'border': 'none'\n * }\n */\nfunction textInputs() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n return statefulSelectors(states, template, stateMap);\n}\n\n/**\n * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).\n * @example\n * // Styles as object usage\n * const styles = {\n * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),\n * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};\n * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'\n * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',\n * }\n */\nfunction transitions() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n if (Array.isArray(properties[0]) && properties.length === 2) {\n var value = properties[1];\n if (typeof value !== 'string') {\n throw new PolishedError(61);\n }\n var transitionsString = properties[0].map(function (property) {\n return property + \" \" + value;\n }).join(', ');\n return {\n transition: transitionsString\n };\n } else {\n return {\n transition: properties.join(', ')\n };\n }\n}\n\nexport { curriedAdjustHue$1 as adjustHue, animation, backgroundImages, backgrounds, between, border, borderColor, borderRadius, borderStyle, borderWidth, buttons, clearFix, complement, cover, cssVar, curriedDarken$1 as darken, curriedDesaturate$1 as desaturate, directionalProperty, easeIn, easeInOut, easeOut, ellipsis, em$1 as em, fluidRange, fontFace, getContrast, getLuminance, getValueAndUnit, grayscale, hiDPI, hideText, hideVisually, hsl, hslToColorString, hsla, important, invert, curriedLighten$1 as lighten, linearGradient, margin, math, meetsContrastGuidelines, mix$1 as mix, modularScale, normalize, curriedOpacify$1 as opacify, padding, parseToHsl, parseToRgb, position, radialGradient, readableColor, rem$1 as rem, remToPx, retinaImage, rgb, rgbToColorString, rgba, curriedSaturate$1 as saturate, curriedSetHue$1 as setHue, curriedSetLightness$1 as setLightness, curriedSetSaturation$1 as setSaturation, curriedShade$1 as shade, size, stripUnit, textInputs, timingFunctions, curriedTint$1 as tint, toColorString, transitions, curriedTransparentize$1 as transparentize, triangle, wordWrap };\n","import type { DeepPartial } from '../types';\nimport { merge } from 'es-toolkit/compat';\nimport { darken, lighten, transparentize } from 'polished';\nimport { baseTheme } from './base';\n\n/**\n * Theme override accepted by `createTheme` and `<TThemeProvider>`.\n *\n * Provide a partial theme — only the keys you want to change. The brand color seed\n * regenerates the full 12-step ramp (plus the 12-step alpha twin) automatically.\n *\n * ## Two accepted shapes\n *\n * ```ts\n * // Canonical — matches the `color.brand.*` token vocabulary:\n * createTheme({ colors: { brand: { base: '#FF6600' } } });\n *\n * // Legacy — kept working for drop-in compatibility with pre-migration consumers:\n * createTheme({ colors: { primary: { main: '#FF6600' } } });\n * ```\n *\n * When both are passed, `colors.brand.base` wins. Prefer the canonical shape in new code.\n *\n * ## Multi-tenant usage\n *\n * Pass the tenant's brand hex per request to retheme an entire subtree. The brand ramp\n * regenerates from the hex; every semantic token that references `color.brand.*` re-resolves\n * via CSS-variable cascade — no Vue re-renders.\n *\n * ```vue\n * <TThemeProvider :theme=\"{ colors: { brand: { base: tenantBrandHex } } }\">\n * <App />\n * </TThemeProvider>\n * ```\n */\nexport type TThemeOverride = DeepPartial<typeof baseTheme> & {\n colors?: {\n /**\n * The tenant brand color seed.\n *\n * Pass a single hex string — `createTheme` derives the 12-step ramp\n * (`--color-primary-1` through `--color-primary-12`) plus the 12-step alpha twin\n * (`--color-primary-alpha-1` through `--color-primary-alpha-12`) automatically. The\n * deprecated `--color-brand-*` twins are emitted alongside them.\n *\n * Step 9 anchors to the input exact, so primary buttons and headers render the\n * tenant color literally — the rest of the ramp is derived around it for hover\n * states, subtle backgrounds, focus rings, etc.\n */\n brand?: { base?: string };\n };\n};\n\nfunction generateBrandRamp(main: string): Record<number, string> {\n return {\n 1: lighten(0.35, main),\n 2: lighten(0.30, main),\n 3: lighten(0.25, main),\n 4: lighten(0.20, main),\n 5: lighten(0.15, main),\n 6: lighten(0.12, main),\n 7: lighten(0.08, main),\n 8: lighten(0.04, main), // Per Radix: border-strong, lighter than the anchor.\n 9: main,\n 10: darken(0.08, main), // Legacy `primary.toku` — solid hover; darkens for parity with other button variants.\n 11: darken(0.10, main),\n 12: darken(0.15, main),\n };\n}\n\n// Step 1 (faintest) → step 12 (strongest). Stored as target opacity; transparentize takes the inverse.\nconst BRAND_ALPHA_OPACITIES = [0.03, 0.05, 0.10, 0.15, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90];\n\n/**\n * Builds a theme object from a partial override.\n *\n * Returns the merged theme (drop-in compatible with the legacy theme shape via\n * `useTheme()`) plus a `cssVars` record suitable for inline `style` injection by\n * `<TThemeProvider>`. The cssVars contain the 12-step primary ramp + 12-step alpha twin\n * regenerated from the seed hex; they only exist when a brand override was provided.\n *\n * Typically you don't call this directly — pass the override prop to `<TThemeProvider>`\n * which calls `createTheme` internally. Call it directly only when you need the resolved\n * theme object outside the Vue component tree (e.g. for SSR or for non-Vue consumers).\n *\n * @example\n * ```ts\n * const theme = createTheme({ colors: { brand: { base: '#FF6600' } } });\n *\n * theme.colors.primary.main; // '#FF6600' (legacy key, still populated)\n * theme.cssVars; // { '--color-primary-9': '#FF6600', ... }\n * ```\n */\nexport function createTheme(theme: TThemeOverride = {}) {\n // Clone into a fresh object — `merge` mutates its first arg, which would otherwise\n // corrupt the baseTheme singleton across providers.\n const mergedTheme = merge({}, baseTheme, theme) as typeof baseTheme;\n const main = theme.colors?.brand?.base ?? theme.colors?.primary?.main;\n\n let cssVars: Record<string, string> | undefined;\n\n if (main) {\n const ramp = generateBrandRamp(main);\n\n // Mirror seed into legacy `primary.main` for consumers reading the old shape.\n mergedTheme.colors.primary.main = main;\n mergedTheme.colors.primary.ultraDark = ramp[12];\n mergedTheme.colors.primary.dark = main;\n mergedTheme.colors.primary.toku = ramp[10];\n mergedTheme.colors.primary.light1 = ramp[7];\n mergedTheme.colors.primary.light2 = ramp[4];\n mergedTheme.colors.primary.light3 = ramp[3];\n mergedTheme.colors.primary.light4 = ramp[2];\n mergedTheme.colors.primary.light5 = ramp[1];\n\n // Both names: semantic tokens alias primary, and consumer CSS still targets brand.\n cssVars = {};\n for (const [step, hex] of Object.entries(ramp)) {\n cssVars[`--color-primary-${step}`] = hex;\n cssVars[`--color-brand-${step}`] = hex;\n }\n for (let i = 1; i <= 12; i++) {\n const alpha = transparentize(1 - BRAND_ALPHA_OPACITIES[i - 1], main);\n cssVars[`--color-primary-alpha-${i}`] = alpha;\n cssVars[`--color-brand-a-${i}`] = alpha;\n }\n }\n\n return Object.assign(mergedTheme, { cssVars });\n}\n","import type { ComputedRef } from 'vue';\nimport { computed, inject } from 'vue';\nimport { baseTheme } from '../theme';\n\nexport const injectionKey = Symbol('theme');\n\nexport const useTheme = () => {\n const injectedTheme = inject<ComputedRef<typeof baseTheme> | undefined>(\n injectionKey,\n undefined,\n );\n const theme = computed(() => injectedTheme?.value ?? baseTheme);\n return theme;\n};\n","<script setup lang=\"ts\">\nimport { useTheme } from '@composables/theme';\n\nconst props = withDefaults(defineProps<{\n variant?: 'default' | 'active';\n}>(), {\n variant: 'default',\n});\n\ndefineSlots<{\n default: void;\n}>();\n\nconst theme = useTheme();\n</script>\n\n<template>\n <div class=\"t-chip\" :class=\"[`t-chip--${props.variant}`]\">\n <slot />\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n* {\n margin: 0;\n box-sizing: border-box;\n}\n\n.t-chip {\n display: inline-flex;\n align-items: center;\n border-radius: 32px;\n border: 0.5px solid v-bind('theme.colors.gray.dark3');\n padding: 4px 8px;\n gap: 4px;\n background-color: v-bind('theme.colors.background');\n\n :deep(*) {\n font-size: 0.75rem;\n line-height: 18px;\n color: v-bind('theme.colors.gray.dark3');\n }\n\n &--active {\n border: 0.5px solid v-bind('theme.colors.primary.main');\n background-color: v-bind('theme.colors.primary.light5');\n\n :deep(*) {\n color: v-bind('theme.colors.primary.main');\n }\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useTheme } from '@composables/theme';\n\nconst props = withDefaults(defineProps<{\n variant?: 'default' | 'active';\n}>(), {\n variant: 'default',\n});\n\ndefineSlots<{\n default: void;\n}>();\n\nconst theme = useTheme();\n</script>\n\n<template>\n <div class=\"t-chip\" :class=\"[`t-chip--${props.variant}`]\">\n <slot />\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n* {\n margin: 0;\n box-sizing: border-box;\n}\n\n.t-chip {\n display: inline-flex;\n align-items: center;\n border-radius: 32px;\n border: 0.5px solid v-bind('theme.colors.gray.dark3');\n padding: 4px 8px;\n gap: 4px;\n background-color: v-bind('theme.colors.background');\n\n :deep(*) {\n font-size: 0.75rem;\n line-height: 18px;\n color: v-bind('theme.colors.gray.dark3');\n }\n\n &--active {\n border: 0.5px solid v-bind('theme.colors.primary.main');\n background-color: v-bind('theme.colors.primary.light5');\n\n :deep(*) {\n color: v-bind('theme.colors.primary.main');\n }\n }\n}\n</style>\n","import { camelCase } from 'es-toolkit';\n\ntype ToCamelCase<S extends string> = S extends `${infer First}-${infer Rest}`\n ? `${First}${ToCamelCase<Capitalize<Rest>>}`\n : S;\n\nexport const toCamelCase = <S extends string>(input: S): ToCamelCase<S> => camelCase(input) as ToCamelCase<S>;\n","import type { ComputedRef, Ref } from 'vue';\nimport type { TButtonProps } from './TButton.types';\nimport { css } from '@emotion/css';\nimport { darken, lighten } from 'polished';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { toCamelCase } from '../../utils';\n\nexport const useStyles = (color:\n | Ref<NonNullable<TButtonProps['color']>>\n | ComputedRef<NonNullable<TButtonProps['color']>>) => {\n const theme = useTheme();\n const variant = computed(() => toCamelCase(color.value));\n const hover = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.toku\n : darken(0.15, theme.value.colors[variant.value])));\n const main = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.main\n : theme.value.colors[variant.value]));\n const light1 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light1\n : lighten(0.15, theme.value.colors[variant.value])));\n const light2 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light2\n : lighten(0.2, theme.value.colors[variant.value])));\n const light3 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light3\n : lighten(0.25, theme.value.colors[variant.value])));\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n },\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '0.625rem',\n fontWeight: theme.value.typography.fontWeight.semibold,\n '&--primary': {\n borderRadius: theme.value.button.borderRadius,\n backgroundColor: main.value,\n boxShadow: '0px 0px 8px 0px rgba(0, 0, 0, 0.1)',\n border: `1px solid ${main.value}`,\n color: theme.value.typography.buttonTextColor,\n '&:hover:not(&:disabled)': {\n backgroundColor: hover.value,\n color: theme.value.typography.buttonTextColor,\n },\n '&:focus': {\n border: `1px solid ${light1.value}`,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n backgroundColor: theme.value.colors.gray.light2,\n color: theme.value.colors.gray.medium2,\n },\n },\n '&--secondary': {\n borderRadius: theme.value.button.borderRadius,\n backgroundColor: '#FFFFFF',\n border: `1px solid ${main.value}`,\n boxShadow: '0px 0px 8px 0px rgba(0, 0, 0, 0.1)',\n color: main.value,\n '&:hover:not(&:disabled)': {\n backgroundColor: light3.value,\n },\n '&:focus': {\n border: `1px solid ${light1.value}`,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n backgroundColor: theme.value.colors.gray.light2,\n color: theme.value.colors.gray.medium2,\n },\n },\n '&--tertiary': {\n background: 'none',\n border: 'none',\n margin: 0,\n padding: 0,\n color: main.value,\n '&:hover:not(&:disabled)': {\n color: light2.value,\n },\n '&:focus': {\n color: light1.value,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n color: theme.value.colors.gray.medium1,\n },\n },\n '&--large': {\n height: '3rem',\n padding: '0.5rem 1rem',\n lineHeight: '1.5rem',\n fontSize: '1.125rem',\n },\n '&--medium': {\n height: '2.5rem',\n padding: '0.5rem 1rem',\n lineHeight: '1.375rem',\n fontSize: '1rem',\n },\n '&--small': {\n height: '2rem',\n padding: '0.5rem 0.75rem',\n lineHeight: '1.25rem',\n fontSize: '0.875rem',\n },\n '&--full-width': {\n width: '100%',\n },\n '&--loading, &--loading:disabled, &--loading:hover:not(&:disabled), &--loading:focus':\n {\n color: 'transparent',\n position: 'relative',\n },\n '&__spinner': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n '&--primary &__spinner': {\n color: '#fff',\n },\n '&--loading:disabled &__spinner': {\n color: theme.value.colors.gray.medium1,\n },\n '&--tertiary:disabled &__spinner': {\n color: theme.value.colors.gray.medium1,\n },\n '&--secondary &__spinner, &--tertiary &__spinner': {\n color: main.value,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TButtonProps } from './TButton.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TButton.styles';\n\nconst defaultProps = {\n variant: 'primary',\n size: 'medium',\n type: 'button',\n color: 'primary',\n};\n\nexport const TButton = defineComponent({\n name: 'TButton',\n props: {\n variant: String as PropType<TButtonProps['variant']>,\n size: String as PropType<TButtonProps['size']>,\n disabled: Boolean as PropType<TButtonProps['disabled']>,\n leftIcon: String as PropType<TButtonProps['leftIcon']>,\n rightIcon: String as PropType<TButtonProps['rightIcon']>,\n type: String as PropType<TButtonProps['type']>,\n fullWidth: Boolean as PropType<TButtonProps['fullWidth']>,\n loading: Boolean as PropType<TButtonProps['loading']>,\n color: String as PropType<TButtonProps['color']>,\n },\n emits: ['click'],\n setup(_props, { attrs, slots, emit }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const color = computed(() => props.value.color);\n const baseClass = useStyles(color);\n const theme = useTheme();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.size}`,\n {\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n [`${baseClass.value}--loading`]: props.value.loading,\n },\n ]);\n\n const handleClick = () => {\n if (!props.value.loading) {\n emit('click');\n }\n };\n\n return () => (\n <button\n class={classes.value}\n type={props.value.type}\n disabled={props.value.disabled}\n onClick={handleClick}\n {...attrs}\n >\n {props.value.leftIcon && (\n <Icon icon={`${theme.value.iconSet}:${props.value.leftIcon}`} />\n )}\n {slots.default?.()}\n {props.value.rightIcon && (\n <Icon icon={`${theme.value.iconSet}:${props.value.rightIcon}`} />\n )}\n {props.value.loading && (\n <Icon\n class={`${baseClass.value}__spinner`}\n icon=\"svg-spinners:90-ring-with-bg\"\n />\n )}\n </button>\n );\n },\n});\n","import type { PropType } from 'vue';\nimport type { TIconProps } from './TIcon.types';\nimport { Icon } from '@iconify/vue';\nimport { get, merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nconst defaultProps = {\n color: '#000',\n size: 'medium',\n variant: 'outline',\n};\n\nexport const TIcon = defineComponent({\n name: 'TIcon',\n props: {\n icon: {\n type: String as PropType<TIconProps['icon']>,\n required: true,\n },\n color: String as PropType<TIconProps['color']>,\n size: String as PropType<TIconProps['size']>,\n variant: String as PropType<TIconProps['variant']>,\n },\n setup(_props, { attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const theme = useTheme();\n const color = computed(() => (get(theme.value.colors, props.value.color) as string)\n || props.value.color);\n const icon = computed(() => `${theme.value.iconSet}:${props.value.icon}${\n props.value.variant === 'solid' ? '-solid' : ''\n }`);\n\n const sizeMapping = {\n miniature: '6px',\n 'extra-small': '10px',\n small: '16px',\n medium: '19px',\n large: '24px',\n 'extra-large': '28px',\n huge: '44px',\n };\n const size = computed(() => sizeMapping[props.value.size]);\n\n return () => (\n <Icon\n icon={icon.value}\n color={color.value}\n height={size.value}\n width={size.value}\n {...attrs}\n />\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { rgba } from 'polished';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n borderRadius: '0.25rem',\n padding: '0.125rem 0.5rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n position: 'relative',\n '&--large': { maxWidth: '9.5rem', width: '100%' },\n '&--medium': { maxWidth: '8rem', width: '100%' },\n '&--small': {\n maxWidth: '6.813rem',\n width: '100%',\n padding: '0rem 0.5rem',\n },\n '&--miniature': {\n width: '1rem',\n height: '1rem',\n },\n '&__text': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n fontSize: '1rem',\n },\n '&__text--large': {\n fontSize: '0.75rem',\n lineHeight: '1.125rem',\n },\n '&__text--medium': {\n fontSize: '0.75rem',\n lineHeight: '1.125rem',\n },\n '&__text--small': {\n fontSize: '0.625rem',\n lineHeight: '1rem',\n },\n '&__status-indicator': {\n width: '0.625rem',\n height: '0.625rem',\n position: 'absolute',\n borderRadius: '0.125rem',\n },\n '&--default': {\n color: theme.value.colors.gray.medium1,\n background: theme.value.colors.gray.light3,\n },\n '&--default > &__text': {\n color: theme.value.colors.gray.medium1,\n },\n '&--default > &__status-indicator': {\n background: theme.value.colors.gray.medium1,\n },\n '&--success': {\n color: theme.value.colors.success,\n background: rgba(theme.value.colors.success, 0.1),\n },\n '&--success > &__text': {\n color: theme.value.colors.success,\n },\n '&--success > &__status-indicator': {\n background: theme.value.colors.success,\n },\n '&--in-process': {\n background: rgba(theme.value.colors.inProcess, 0.1),\n },\n '&--in-process > &__text': {\n color: theme.value.colors.inProcessDark,\n },\n '&--in-process > &__status-indicator': {\n background: theme.value.colors.inProcessDark,\n },\n '&--pending': {\n background: rgba(theme.value.colors.info, 0.1),\n },\n '&--pending > &__text': {\n color: theme.value.colors.info,\n },\n '&--pending > &__status-indicator': {\n background: theme.value.colors.info,\n },\n '&--toku': {\n background: rgba(theme.value.colors.primary.light4, 1),\n },\n '&--toku > &__text': {\n color: theme.value.colors.primary.main,\n },\n '&--toku > &__status-indicator': {\n background: theme.value.colors.primary.main,\n },\n '&--error': {\n color: theme.value.colors.error,\n background: rgba(theme.value.colors.error, 0.1),\n },\n '&--error > &__text': {\n color: theme.value.colors.error,\n },\n '&--error > &__status-indicator': {\n background: theme.value.colors.error,\n },\n }));\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TTagProps } from './TTag.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TTag.styles';\n\nconst defaultProps = {\n size: 'medium',\n variant: 'default',\n};\n\nexport const TTag = defineComponent({\n name: 'TTag',\n props: {\n size: String as PropType<TTagProps['size']>,\n variant: String as PropType<TTagProps['variant']>,\n },\n setup(_props, { slots }) {\n const props = computed(() => merge({}, defaultProps, _props));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.size}`,\n ]);\n\n return () => (\n <div class={classes.value}>\n {\n props.value.size === 'miniature'\n ? (<div data-testid=\"t-tag-status-indicator\" class={`${baseClass.value}__status-indicator`} />\n )\n : (\n <p data-testid=\"t-tag-text\" class={`${baseClass.value}__text ${baseClass.value}__text--${props.value.size}`}>\n {slots.default?.()}\n </p>\n )\n }\n </div>\n );\n },\n});\n","<script lang=\"ts\">\nimport type { TTagProps } from '../TTag';\n\n/**\n * Props for the `TCardButton` component.\n *\n * `TCardButton` is a card-shaped button for choosing an option from a list\n * (e.g. a payment method). It is action-agnostic: it renders a native\n * `<button>` and exposes no custom events — attach a plain `@click` (it falls\n * through to the root) and handle navigation, tracking or selection on the\n * consumer side.\n *\n * Height is content-driven: with only `title` the card compacts naturally.\n */\nexport interface TCardButtonProps {\n /** Main label. Replace its rendering via the `title` slot when richer content is needed (e.g. a logo image). */\n title: string;\n /** Supporting text under the title. */\n subtitle?: string;\n /**\n * Text for the `TTag` badge. Position depends on `borderless`: floating on\n * the top-right corner on the default bordered card, inline before the\n * trailing icon when borderless.\n */\n tag?: string;\n /**\n * Variant forwarded to the internal `TTag`.\n * @defaultValue 'default'\n */\n tagVariant?: TTagProps['variant'];\n /** Removes the card border. Also decides the `tag` position (see `tag`). */\n borderless?: boolean;\n /** Disables the underlying `<button>`, blocking clicks natively. */\n disabled?: boolean;\n}\n\n/**\n * Slots exposed by `TCardButton`. `icon` and `image` are mutually exclusive\n * treatments of the 36×36 media square; when both are provided, `icon` wins.\n */\nexport interface TCardButtonSlots {\n /** Rendered 16×16, centered inside the media square over its subtle background. Has priority over `image`. */\n icon?: () => unknown;\n /** Fills the whole media square, clipped by its border radius. Ignored when `icon` is provided. */\n image?: () => unknown;\n /** Overrides the `title` prop rendering. */\n title?: () => unknown;\n /** Overrides the internally rendered `TTag`. */\n tag?: () => unknown;\n /** Overrides the default chevron-right icon on the right edge. */\n trailing?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { TIcon } from '../TIcon';\nimport { TTag } from '../TTag';\n\ndefineOptions({ name: 'TCardButton' });\n\nconst {\n title,\n subtitle,\n tag,\n tagVariant = 'default',\n borderless,\n disabled,\n} = defineProps<TCardButtonProps>();\n\ndefineSlots<TCardButtonSlots>();\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"t-card-button\"\n :data-borderless=\"borderless || undefined\"\n :disabled=\"disabled\"\n >\n <div\n v-if=\"$slots.icon || $slots.image\"\n class=\"t-card-button__media\"\n :data-media=\"$slots.icon ? 'icon' : 'image'\"\n >\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n <slot v-else name=\"image\" />\n </div>\n\n <!-- TODO: replace the <p> elements with TTypography once it consumes semantic tokens (--color-text-*, --font-*) -->\n <div class=\"t-card-button__text\">\n <slot name=\"title\">\n <p class=\"t-card-button__title\">\n {{ title }}\n </p>\n </slot>\n <p v-if=\"subtitle\" class=\"t-card-button__subtitle\">\n {{ subtitle }}\n </p>\n </div>\n\n <span\n v-if=\"tag || $slots.tag\"\n class=\"t-card-button__tag\"\n >\n <slot name=\"tag\">\n <TTag size=\"small\" :variant=\"tagVariant\">{{ tag }}</TTag>\n </slot>\n </span>\n\n <span class=\"t-card-button__trailing\">\n <slot name=\"trailing\">\n <TIcon icon=\"chevron-right\" size=\"small\" color=\"currentColor\" />\n </slot>\n </span>\n </button>\n</template>\n\n<style scoped lang=\"scss\">\n.t-card-button {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--gap-group);\n width: 100%;\n padding: var(--inset-group);\n border: var(--border-width-1) solid var(--neutral-border);\n border-radius: var(--radius-surface);\n background-color: var(--color-base-white);\n font-family: var(--font-family-base);\n text-align: left;\n cursor: pointer;\n transition: background-color var(--motion-duration-fast) ease;\n\n &[data-borderless] {\n border-color: transparent;\n }\n\n &:hover:not(:disabled) {\n background-color: var(--neutral-base);\n }\n\n &:focus-visible {\n outline: var(--focus-ring-width) solid var(--primary-border);\n outline-offset: var(--focus-ring-offset);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: var(--opacity-50);\n }\n\n &__media {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n\n // The --space-* scale has no 36px step.\n width: 36px;\n height: 36px;\n overflow: hidden;\n border-radius: var(--radius-control);\n background-color: var(--color-base-background);\n color: var(--neutral-text-contrast);\n\n :deep(svg),\n :deep(img) {\n width: var(--space-16);\n height: var(--space-16);\n }\n\n &[data-media='image'] {\n background-color: transparent;\n\n :deep(svg),\n :deep(img) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n }\n }\n\n &__text {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n }\n\n &__title {\n margin: 0;\n font-size: var(--font-b3-font-size);\n line-height: var(--font-b3-line-height);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text-contrast);\n }\n\n &__subtitle {\n margin: 0;\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n font-weight: var(--font-weight-regular);\n color: var(--neutral-text);\n }\n\n &__tag {\n display: flex;\n flex-shrink: 0;\n position: absolute;\n top: 0;\n right: 0;\n overflow: hidden;\n border-radius: 0 calc(var(--radius-surface) - var(--border-width-1)) 0 var(--radius-2);\n }\n\n &[data-borderless] &__tag {\n position: static;\n overflow: visible;\n border-radius: 0;\n }\n\n &__trailing {\n display: flex;\n flex-shrink: 0;\n color: var(--neutral-text);\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { TTagProps } from '../TTag';\n\n/**\n * Props for the `TCardButton` component.\n *\n * `TCardButton` is a card-shaped button for choosing an option from a list\n * (e.g. a payment method). It is action-agnostic: it renders a native\n * `<button>` and exposes no custom events — attach a plain `@click` (it falls\n * through to the root) and handle navigation, tracking or selection on the\n * consumer side.\n *\n * Height is content-driven: with only `title` the card compacts naturally.\n */\nexport interface TCardButtonProps {\n /** Main label. Replace its rendering via the `title` slot when richer content is needed (e.g. a logo image). */\n title: string;\n /** Supporting text under the title. */\n subtitle?: string;\n /**\n * Text for the `TTag` badge. Position depends on `borderless`: floating on\n * the top-right corner on the default bordered card, inline before the\n * trailing icon when borderless.\n */\n tag?: string;\n /**\n * Variant forwarded to the internal `TTag`.\n * @defaultValue 'default'\n */\n tagVariant?: TTagProps['variant'];\n /** Removes the card border. Also decides the `tag` position (see `tag`). */\n borderless?: boolean;\n /** Disables the underlying `<button>`, blocking clicks natively. */\n disabled?: boolean;\n}\n\n/**\n * Slots exposed by `TCardButton`. `icon` and `image` are mutually exclusive\n * treatments of the 36×36 media square; when both are provided, `icon` wins.\n */\nexport interface TCardButtonSlots {\n /** Rendered 16×16, centered inside the media square over its subtle background. Has priority over `image`. */\n icon?: () => unknown;\n /** Fills the whole media square, clipped by its border radius. Ignored when `icon` is provided. */\n image?: () => unknown;\n /** Overrides the `title` prop rendering. */\n title?: () => unknown;\n /** Overrides the internally rendered `TTag`. */\n tag?: () => unknown;\n /** Overrides the default chevron-right icon on the right edge. */\n trailing?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { TIcon } from '../TIcon';\nimport { TTag } from '../TTag';\n\ndefineOptions({ name: 'TCardButton' });\n\nconst {\n title,\n subtitle,\n tag,\n tagVariant = 'default',\n borderless,\n disabled,\n} = defineProps<TCardButtonProps>();\n\ndefineSlots<TCardButtonSlots>();\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"t-card-button\"\n :data-borderless=\"borderless || undefined\"\n :disabled=\"disabled\"\n >\n <div\n v-if=\"$slots.icon || $slots.image\"\n class=\"t-card-button__media\"\n :data-media=\"$slots.icon ? 'icon' : 'image'\"\n >\n <slot v-if=\"$slots.icon\" name=\"icon\" />\n <slot v-else name=\"image\" />\n </div>\n\n <!-- TODO: replace the <p> elements with TTypography once it consumes semantic tokens (--color-text-*, --font-*) -->\n <div class=\"t-card-button__text\">\n <slot name=\"title\">\n <p class=\"t-card-button__title\">\n {{ title }}\n </p>\n </slot>\n <p v-if=\"subtitle\" class=\"t-card-button__subtitle\">\n {{ subtitle }}\n </p>\n </div>\n\n <span\n v-if=\"tag || $slots.tag\"\n class=\"t-card-button__tag\"\n >\n <slot name=\"tag\">\n <TTag size=\"small\" :variant=\"tagVariant\">{{ tag }}</TTag>\n </slot>\n </span>\n\n <span class=\"t-card-button__trailing\">\n <slot name=\"trailing\">\n <TIcon icon=\"chevron-right\" size=\"small\" color=\"currentColor\" />\n </slot>\n </span>\n </button>\n</template>\n\n<style scoped lang=\"scss\">\n.t-card-button {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--gap-group);\n width: 100%;\n padding: var(--inset-group);\n border: var(--border-width-1) solid var(--neutral-border);\n border-radius: var(--radius-surface);\n background-color: var(--color-base-white);\n font-family: var(--font-family-base);\n text-align: left;\n cursor: pointer;\n transition: background-color var(--motion-duration-fast) ease;\n\n &[data-borderless] {\n border-color: transparent;\n }\n\n &:hover:not(:disabled) {\n background-color: var(--neutral-base);\n }\n\n &:focus-visible {\n outline: var(--focus-ring-width) solid var(--primary-border);\n outline-offset: var(--focus-ring-offset);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: var(--opacity-50);\n }\n\n &__media {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n\n // The --space-* scale has no 36px step.\n width: 36px;\n height: 36px;\n overflow: hidden;\n border-radius: var(--radius-control);\n background-color: var(--color-base-background);\n color: var(--neutral-text-contrast);\n\n :deep(svg),\n :deep(img) {\n width: var(--space-16);\n height: var(--space-16);\n }\n\n &[data-media='image'] {\n background-color: transparent;\n\n :deep(svg),\n :deep(img) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n }\n }\n\n &__text {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n }\n\n &__title {\n margin: 0;\n font-size: var(--font-b3-font-size);\n line-height: var(--font-b3-line-height);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text-contrast);\n }\n\n &__subtitle {\n margin: 0;\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n font-weight: var(--font-weight-regular);\n color: var(--neutral-text);\n }\n\n &__tag {\n display: flex;\n flex-shrink: 0;\n position: absolute;\n top: 0;\n right: 0;\n overflow: hidden;\n border-radius: 0 calc(var(--radius-surface) - var(--border-width-1)) 0 var(--radius-2);\n }\n\n &[data-borderless] &__tag {\n position: static;\n overflow: visible;\n border-radius: 0;\n }\n\n &__trailing {\n display: flex;\n flex-shrink: 0;\n color: var(--neutral-text);\n }\n}\n</style>\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n const disabledColor = theme.value.colors.gray.light1;\n const checkSVG = (stroke: string, size: 'small' | 'large') => {\n switch (size) {\n case 'large':\n return encodeURIComponent(`<svg width=\"10\" height=\"9.5\" viewBox=\"0 0 10 9.5\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0.833344 3.79167L3.75001 6.70834L9.16668 1.29167\" stroke=\"${stroke}\" stroke-width=\"1.66667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>`);\n case 'small':\n return encodeURIComponent(`<svg width=\"10\" height=\"8.25\" viewBox=\"0 0 10 8.25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1.6 2.82999L3.98 5.20999L8.4 0.789993\" stroke=\"${stroke}\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>`);\n default:\n return '';\n }\n };\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color: theme.value.typography.color,\n fontFamily: theme.value.typography.fontFamily,\n fontWeight: '400',\n fontStyle: 'normal',\n whiteSpace: 'nowrap',\n cursor: 'pointer',\n },\n '&__wrapper': {\n display: 'inline-flex',\n justifyContent: 'center',\n alignItems: 'center',\n gap: '0.1875rem',\n },\n '&__input': {\n appearance: 'none',\n WebkitAppearance: 'none',\n font: 'inherit',\n color: theme.value.colors.primary.main,\n border: `1px solid ${theme.value.colors.primary.main}`,\n borderRadius: '0.125rem',\n display: 'grid',\n placeContent: 'center',\n cursor: 'pointer',\n transform: 'translateY(-0.5px)',\n '&:hover:enabled': {\n backgroundColor: theme.value.colors.primary.light3,\n },\n '&:focus': {\n border: `1px solid ${theme.value.colors.primary.light1}`,\n },\n '&::before': {\n display: 'grid',\n placeContent: 'center',\n borderRadius: '0.125rem',\n transform: 'scale(0)',\n transition: '120ms transform ease-in-out',\n backgroundColor: 'CanvasText',\n },\n '&:checked::before': {\n transform: 'scale(1)',\n },\n '&:checked:disabled::before': {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n },\n '&:disabled': {\n color: disabledColor,\n border: `1px solid ${disabledColor}`,\n cursor: 'not-allowed',\n },\n },\n '&--disabled': {\n color: disabledColor,\n cursor: 'not-allowed',\n },\n '&--large': {\n lineHeight: '1.375rem',\n fontSize: '1rem',\n '&__input': {\n width: '1.125rem',\n height: '1.125rem',\n '&::before': {\n boxShadow: `inset 0 0 0 1.125rem ${theme.value.colors.primary.main}`,\n content: `url('data:image/svg+xml,${checkSVG('white', 'large')}')`,\n width: '1.125rem',\n height: '1.125rem',\n },\n '&:checked:disabled::before': {\n content: `url('data:image/svg+xml,${checkSVG(\n disabledColor,\n 'large',\n )}')`,\n },\n },\n },\n '&--small': {\n lineHeight: '1.25rem',\n fontSize: '0.875rem',\n '&__input': {\n width: '1rem',\n height: '1rem',\n '&::before': {\n boxShadow: `inset 0 0 0 1rem ${theme.value.colors.primary.main}`,\n content: `url('data:image/svg+xml,${checkSVG('white', 'small')}')`,\n width: '1rem',\n height: '1rem',\n },\n '&:checked:disabled::before': {\n content: `url('data:image/svg+xml,${checkSVG(\n disabledColor,\n 'small',\n )}')`,\n },\n },\n },\n }));\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TCheckboxProps } from './TCheckbox.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport { useStyles } from './TCheckbox.styles';\n\nconst generateUniqueId = () => `checkbox-${\n Math.random()\n .toString(36)\n .substring(2, 9)\n}-${Date.now()}`;\n\nconst defaultProps = {\n size: 'large',\n value: false,\n};\n\nexport const TCheckbox = defineComponent({\n name: 'TCheckbox',\n props: {\n labelPosition: String as PropType<TCheckboxProps['labelPosition']>,\n size: String as PropType<TCheckboxProps['size']>,\n value: Boolean as PropType<TCheckboxProps['value']>,\n modelValue: Boolean as PropType<TCheckboxProps['modelValue']>,\n disabled: Boolean as PropType<TCheckboxProps['disabled']>,\n id: String as PropType<TCheckboxProps['id']>,\n },\n emits: ['input', 'change', 'update:modelValue'],\n setup(_props, { attrs, slots, emit }) {\n const localId = generateUniqueId();\n\n const props = computed(() => merge({}, defaultProps, _props, attrs, {\n id: _props.id ?? (attrs as any).id ?? localId,\n }));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n ]);\n const textClass = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n { [`${baseClass.value}--disabled`]: props.value.disabled },\n ]);\n\n const isChecked = ref(props.value.modelValue || props.value.value);\n watch([() => props.value.modelValue, () => props.value.value], () => {\n isChecked.value = props.value.modelValue || props.value.value;\n });\n\n const handleClick = () => {\n emit('update:modelValue', !isChecked.value);\n emit('input', !isChecked.value);\n emit('change', !isChecked.value);\n isChecked.value = !isChecked.value;\n };\n return () => (\n <div class={classes.value.map((class_) => `${class_}__wrapper`)}>\n {slots.default?.() && props.value.labelPosition === 'left' && (\n <label for={props.value.id} class={textClass.value}>\n {slots.default()}\n </label>\n )}\n <input\n id={props.value.id}\n type=\"checkbox\"\n class={classes.value.map((class_) => `${class_}__input`)}\n checked={isChecked.value}\n disabled={props.value.disabled}\n onClick={handleClick}\n {...attrs}\n />\n {slots.default?.() && props.value.labelPosition === 'right' && (\n <label for={props.value.id} class={textClass.value}>\n {slots.default()}\n </label>\n )}\n </div>\n );\n },\n});\n","import type { Ref } from 'vue';\nimport { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = (menuHeight: Ref<number>) => {\n const theme = useTheme();\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n position: 'relative',\n width: 'fit-content',\n '&__menu': {\n position: 'absolute',\n display: 'none',\n padding: '0.625rem',\n background: '#fff',\n boxShadow: '0px 6px 30px 0px rgba(0, 0, 0, 0.10)',\n borderBottomLeftRadius: '0.5rem',\n borderBottomRightRadius: '0.5rem',\n marginTop: '0.5rem',\n zIndex: 20,\n },\n '&--active &__menu': {\n display: 'block',\n },\n '&--center &__menu': {\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n },\n '&--top-center &__menu': {\n borderRadius: '0.5rem',\n },\n '&--top-left &__menu': {\n right: '100%',\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n borderBottomRightRadius: '0',\n },\n '&--top-right &__menu': {\n left: '100%',\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n borderBottomLeftRadius: '0',\n },\n '&--left &__menu': {\n right: '100%',\n borderTopLeftRadius: '0.5rem',\n },\n '&--right &__menu': {\n left: '100%',\n borderTopRightRadius: '0.5rem',\n },\n '&--middle-left &__menu': {\n left: '-100%',\n },\n '&--middle-right &__menu': {\n right: 'unset',\n },\n '&--small &__menu': {\n width: '240px',\n },\n '&--large &__menu': {\n width: '340px',\n },\n '&--full-width &__menu': {\n width: '100%',\n },\n '[class*=\"--center\"][class*=\"--small\"]:not(&--full-width) &__menu': {\n left: 'calc(-120px + 50%)',\n },\n '[class*=\"--center\"][class*=\"--large\"]:not(&--full-width) &__menu': {\n left: 'calc(-170px + 50%)',\n },\n '[class*=\"--top\"] &__menu': {\n top: `calc(-${menuHeight.value}px - 16px)`,\n },\n '[class*=\"--top-center\"][class*=\"--small\"]:not(&--full-width) &__menu': {\n left: 'calc(-120px + 50%)',\n },\n '[class*=\"--top-center\"][class*=\"--large\"]:not(&--full-width) &__menu': {\n left: 'calc(-170px + 50%)',\n },\n '&__divider': {\n width: '100%',\n height: '1px',\n background: theme.value.colors.gray.light3,\n marginBlock: '0.5rem',\n },\n }));\n\n return baseClass;\n};\n\nexport const useMenuStyles = () => {\n const menuStyles = computed(() => css({\n position: 'fixed',\n display: 'none',\n padding: '0.625rem',\n background: '#fff',\n boxShadow: '0px 6px 30px 0px rgba(0, 0, 0, 0.10)',\n borderBottomLeftRadius: '0.5rem',\n borderBottomRightRadius: '0.5rem',\n zIndex: 30,\n\n '&--open': {\n display: 'block',\n },\n\n '&--small': {\n width: '240px',\n },\n\n '&--large': {\n width: '340px',\n },\n\n '&--center': {\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n },\n\n '&--left': {\n borderTopLeftRadius: '0.5rem',\n },\n\n '&--right': {\n borderTopRightRadius: '0.5rem',\n },\n\n '&--top-center': {\n borderRadius: '0.5rem',\n },\n\n '&--top-left': {\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n borderBottomRightRadius: '0',\n },\n\n '&--top-right': {\n borderTopLeftRadius: '0.5rem',\n borderTopRightRadius: '0.5rem',\n borderBottomLeftRadius: '0',\n },\n }));\n\n return menuStyles;\n};\n","import type { RendererElement, RendererNode, VNode } from 'vue';\n\ntype Slot = VNode<\n RendererNode,\n RendererElement,\n {\n [key: string]: any;\n }\n>;\n\nexport const getVisibleElements = (slots: Slot[]): Slot[] => {\n const results: Slot[] = [];\n slots?.forEach((slot) => {\n // @ts-expect-error type is missing some properties\n if (slot.type?.name === 'TDropdownItem') {\n results.push(slot);\n } else if (Array.isArray(slot.children)) {\n results.push(...getVisibleElements(slot.children as Slot[]));\n }\n });\n\n return results;\n};\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { TDropdownProps } from './TDropdown.types';\nimport { merge } from 'es-toolkit/compat';\nimport {\n computed,\n defineComponent,\n onMounted,\n onUnmounted,\n ref,\n Teleport,\n watch,\n} from 'vue';\nimport { useMenuStyles, useStyles } from './TDropdown.styles';\nimport { getVisibleElements } from './TDropdown.utils';\n\nconst defaultProps = {\n size: 'small',\n position: 'center',\n};\n\nexport const TDropdown = defineComponent({\n name: 'TDropdown',\n props: {\n open: Boolean as PropType<TDropdownProps['open']>,\n size: String as PropType<TDropdownProps['size']>,\n position: String as PropType<TDropdownProps['position']>,\n fullWidth: Boolean as PropType<TDropdownProps['fullWidth']>,\n attachToBody: Boolean as PropType<TDropdownProps['attachToBody']>,\n },\n emits: ['cancel'],\n setup(_props, { slots, attrs, emit }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const container = ref<Nullable<HTMLDivElement>>(null);\n const trigger = ref<Nullable<HTMLDivElement>>(null);\n const menu = ref<Nullable<HTMLDivElement>>(null);\n const menuPosition = ref<{\n top: number;\n left: number;\n }>({ top: 0, left: 0 });\n\n const calculateMenuPosition = () => {\n if (!trigger.value || !menu.value) {\n return;\n }\n const rect = trigger.value.getBoundingClientRect();\n\n const baseTop = rect.bottom + 8;\n const baseLeft = rect.left;\n\n let top = baseTop;\n let left = baseLeft;\n\n switch (props.value.position) {\n case 'center':\n left\n = baseLeft\n - menu.value.clientWidth / 2\n + trigger.value.clientWidth / 2;\n break;\n case 'right':\n left = baseLeft + trigger.value.clientWidth;\n break;\n case 'left':\n left = baseLeft - menu.value.clientWidth;\n break;\n case 'middle-left':\n left = baseLeft - menu.value.clientWidth + trigger.value.clientWidth;\n break;\n case 'middle-right':\n left = baseLeft;\n break;\n case 'top-center':\n top = rect.top - menu.value.clientHeight - 8;\n left\n = baseLeft\n - menu.value.clientWidth / 2\n + trigger.value.clientWidth / 2;\n break;\n case 'top-left':\n top = rect.top - menu.value.clientHeight - 8;\n left = baseLeft - menu.value.clientWidth;\n break;\n case 'top-right':\n top = rect.top - menu.value.clientHeight - 8;\n left = baseLeft + trigger.value.clientWidth;\n break;\n }\n\n menuPosition.value = { top, left };\n };\n\n const menuBaseClass = useMenuStyles();\n const menuClasses = computed(() => [\n menuBaseClass.value,\n `${menuBaseClass.value}--${props.value.size}`,\n `${menuBaseClass.value}--${props.value.position}`,\n {\n [`${menuBaseClass.value}--open`]: props.value.open,\n },\n ]);\n const menuStyles = computed(() => ({\n top: `${menuPosition.value.top}px`,\n left: `${menuPosition.value.left}px`,\n width: props.value.fullWidth\n ? `${trigger.value?.clientWidth}px`\n : undefined,\n }));\n\n const menuHeight = computed(() => menu.value?.clientHeight ?? 0);\n const baseClass = useStyles(menuHeight);\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n `${baseClass.value}--${props.value.position}`,\n {\n [`${baseClass.value}--active`]: props.value.open,\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n },\n ]);\n\n const handleClickOutside = (event: Event) => {\n if (\n props.value.open\n && container.value\n && !container.value.contains(event.target as Node)\n && !(event.target as Element)?.closest(`.${menuBaseClass.value}`)\n ) {\n emit('cancel');\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n emit('cancel');\n }\n };\n\n const handleMenuInitialFocus = (event: KeyboardEvent) => {\n if (props.value.attachToBody && event.key === 'Tab') {\n event.preventDefault();\n const firstMenuItem = menu.value?.querySelector('[role=\"menuitem\"]');\n if (firstMenuItem) {\n (firstMenuItem as HTMLElement).focus();\n }\n }\n };\n\n if (props.value.attachToBody) {\n watch(\n [\n () => props.value.open,\n () => props.value.position,\n () => props.value.size,\n trigger,\n menu,\n ],\n () => {\n calculateMenuPosition();\n if (props.value.open && menu.value) {\n trigger.value?.addEventListener('keydown', handleMenuInitialFocus);\n } else {\n trigger.value?.removeEventListener(\n 'keydown',\n handleMenuInitialFocus,\n );\n }\n },\n { immediate: true },\n );\n }\n\n onMounted(() => {\n if (props.value.attachToBody) {\n window.addEventListener('scroll', calculateMenuPosition);\n window.addEventListener('resize', calculateMenuPosition);\n }\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('keydown', handleKeydown);\n });\n\n onUnmounted(() => {\n if (props.value.attachToBody) {\n window.removeEventListener('scroll', calculateMenuPosition);\n window.removeEventListener('resize', calculateMenuPosition);\n }\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('keydown', handleKeydown);\n });\n\n const visibleElements = computed(() => getVisibleElements(slots.default?.() || []));\n\n const renderMenu = () => (\n <div\n ref={menu}\n class={\n props.value.attachToBody\n ? menuClasses.value\n : `${baseClass.value}__menu`\n }\n style={props.value.attachToBody ? menuStyles.value : undefined}\n role=\"menu\"\n tabindex={props.value.attachToBody ? 0 : undefined}\n >\n {visibleElements.value.map((element, index, array) => (\n <div key={index}>\n {element}\n {index < array.length - 1 && (\n <div class={`${baseClass.value}__divider`} />\n )}\n </div>\n ))}\n </div>\n );\n\n return () => (\n <div ref={container} class={classes.value}>\n <div ref={trigger}>{slots.trigger?.()}</div>\n {props.value.open\n && (props.value.attachToBody\n ? (\n <Teleport to=\"body\">{renderMenu()}</Teleport>\n )\n : (\n renderMenu()\n ))}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n '*': {\n padding: 0,\n },\n background: '#fff',\n padding: '0.25rem 0.5rem',\n cursor: 'pointer',\n borderRadius: '0.25rem',\n fontFamily: theme.value.typography.fontFamily,\n fontSize: '0.875rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.25rem',\n color: theme.value.colors.gray.main,\n '&:not(&--disabled):hover': {\n background: theme.value.colors.gray.light3,\n },\n '&--disabled': {\n color: theme.value.colors.gray.light2,\n cursor: 'not-allowed',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TDropdownItemprops } from './TDropdown.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TDropdownItem.styles';\n\nexport const TDropdownItem = defineComponent({\n name: 'TDropdownItem',\n emits: ['click'],\n props: {\n disabled: Boolean as PropType<TDropdownItemprops['disabled']>,\n },\n setup(_props, { slots, emit, attrs }) {\n const props = computed(() => merge({}, _props, attrs));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n {\n [`${baseClass.value}--disabled`]: props.value.disabled,\n },\n ]);\n\n const handleClick = () => {\n if (!props.value.disabled) {\n emit('click');\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' && !props.value.disabled) {\n emit('click');\n event.preventDefault();\n }\n };\n\n return () => (\n <div\n class={classes.value}\n onClick={handleClick}\n role=\"menuitem\"\n tabindex={0}\n onKeydown={handleKeydown}\n aria-disabled={props.value.disabled}\n >\n {slots.default?.()}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n fontFamily: theme.value.typography.fontFamily,\n },\n '&__container': {\n gap: theme.value.spacing,\n display: 'flex',\n flexDirection: 'column',\n width: '358px',\n },\n '&__label': {\n color: theme.value.typography.color,\n display: 'block',\n fontSize: '13px',\n fontStyle: 'normal',\n fontWeight: 600,\n lineHeight: '20px',\n },\n '&__input-wrapper': {\n position: 'relative',\n },\n '&__input': {\n color: '#373737',\n display: 'flex',\n width: '100%',\n background: '#FFF',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderRadius: theme.value.input.borderRadius,\n padding: '6px 8px',\n gap: '8px',\n fontSize: '13px',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: '9px',\n '&::placeholder': {\n color: theme.value.colors.gray.medium2,\n },\n '&:hover': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&:focus': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&:disabled': {\n background: theme.value.colors.gray.light3,\n borderColor: theme.value.colors.gray.light3,\n },\n '&--left-icon': {\n paddingLeft: '32px',\n },\n '&--right-icon': {\n paddingRight: '32px',\n },\n },\n '&__icon': {\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n fontSize: '12px',\n '&--left': {\n left: '8px',\n },\n '&--right': {\n right: '8px',\n },\n },\n '&__helper-text': {\n fontSize: '12px',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: '18px',\n color: theme.value.colors.gray.medium1,\n },\n '&--error &__input, &error &__input:focus': {\n borderColor: theme.value.colors.error,\n },\n '&--error &__helper-text': {\n color: theme.value.colors.error,\n },\n '&--full-width': {\n width: '100%',\n },\n '&--multiline &__input': {\n height: '80px',\n overflow: 'auto',\n resize: 'none',\n },\n '&--multiline &__icon': {\n top: 0,\n transform: 'translateY(50%)',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { TTextInputProps } from './TTextInput.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TTextInput.styles';\n\nconst defaultProps = {\n type: 'text',\n};\n\nexport const TTextInput = defineComponent({\n name: 'TTextInput',\n emits: ['input', 'change', 'update:modelValue', 'focus', 'blur'],\n props: {\n error: Boolean as PropType<TTextInputProps['error']>,\n disabled: Boolean as PropType<TTextInputProps['disabled']>,\n leftIcon: String as PropType<TTextInputProps['leftIcon']>,\n rightIcon: String as PropType<TTextInputProps['rightIcon']>,\n label: String as PropType<TTextInputProps['label']>,\n placeholder: String as PropType<TTextInputProps['placeholder']>,\n helperText: String as PropType<TTextInputProps['helperText']>,\n value: [Number, String, Date] as PropType<TTextInputProps['value']>,\n modelValue: [Number, String, Date] as PropType<\n TTextInputProps['modelValue']\n >,\n fullWidth: Boolean as PropType<TTextInputProps['fullWidth']>,\n id: String as PropType<TTextInputProps['id']>,\n type: String as PropType<TTextInputProps['type']>,\n maxlength: [String, Number] as PropType<TTextInputProps['maxlength']>,\n min: [String, Number] as PropType<TTextInputProps['min']>,\n max: [String, Number] as PropType<TTextInputProps['max']>,\n step: [String, Number] as PropType<TTextInputProps['step']>,\n },\n setup(_props, { attrs, emit, slots, expose }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const baseClass = useStyles();\n const theme = useTheme();\n\n const internalValue = computed({\n get: () => (props.value.modelValue !== undefined\n ? props.value.modelValue\n : props.value.value),\n set: (newValue) => {\n emit('update:modelValue', newValue);\n emit('input', newValue);\n emit('change', newValue);\n },\n });\n\n const handleInput = (event: Event) => {\n internalValue.value = (event.target as HTMLInputElement).value;\n };\n\n const handleFocus = (event: Event) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: Event) => {\n emit('blur', event);\n };\n\n const input = ref<Nullable<HTMLInputElement>>(null);\n const focus = () => {\n input.value?.focus();\n };\n const blur = () => {\n input.value?.blur();\n };\n expose({ focus, blur });\n\n return () => (\n <div\n class={[\n baseClass.value,\n `${baseClass.value}__container`,\n {\n [`${baseClass.value}--error`]: props.value.error,\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n [`${baseClass.value}--multiline`]: props.value.multiline,\n },\n ]}\n >\n {slots.label?.()\n || (props.value.label && (\n <label class={[`${baseClass.value}__label`]} for={props.value.id}>\n {props.value.label}\n </label>\n ))}\n <div class={`${baseClass.value}__input-wrapper`}>\n {slots.leftIcon?.()\n || (props.value.leftIcon && (\n <Icon\n icon={`${theme.value.iconSet}:${props.value.leftIcon}`}\n class={[\n `${baseClass.value}__icon`,\n `${baseClass.value}__icon--left`,\n ]}\n />\n ))}\n <input\n {...attrs}\n id={props.value.id}\n type={props.value.multiline ? undefined : props.value.type}\n class={[\n `${baseClass.value}__input`,\n {\n [`${baseClass.value}__input--left-icon`]: slots.leftIcon?.() || props.value.leftIcon,\n [`${baseClass.value}__input--right-icon`]: slots.rightIcon?.() || props.value.rightIcon,\n },\n ]}\n placeholder={props.value.placeholder}\n value={internalValue.value}\n onInput={handleInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n disabled={props.value.disabled}\n maxlength={props.value.maxlength}\n min={props.value.min}\n max={props.value.max}\n ref={input}\n step={props.value.step}\n />\n {slots.rightIcon?.()\n || (props.value.rightIcon && (\n <Icon\n icon={`${theme.value.iconSet}:${props.value.rightIcon}`}\n class={[\n `${baseClass.value}__icon`,\n `${baseClass.value}__icon--right`,\n ]}\n />\n ))}\n </div>\n {slots.helperText?.()\n || (props.value.helperText && (\n <p class={`${baseClass.value}__helper-text`}>\n {props.value.helperText}\n </p>\n ))}\n </div>\n );\n },\n});\n","export const normalizeString = (str: string) => str\n .toLowerCase()\n .normalize('NFD')\n .replace(/\\p{Diacritic}/gu, '');\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { Option, TComboboxProps } from './TCombobox.types';\nimport {\n computed,\n defineComponent,\n onMounted,\n onUnmounted,\n ref,\n watch,\n} from 'vue';\nimport { TDropdown, TDropdownItem } from '../TDropdown';\nimport { TTextInput } from '../TTextInput';\nimport { normalizeString } from './TCombobox.utils';\n\nexport const TCombobox = defineComponent({\n name: 'TCombobox',\n emits: ['input', 'select', 'update:modelValue'],\n props: {\n modelValue: String as PropType<TComboboxProps['modelValue']>,\n options: {\n type: Array as PropType<TComboboxProps['options']>,\n required: true,\n },\n placeholder: {\n type: String as PropType<TComboboxProps['placeholder']>,\n default: '',\n },\n label: String as PropType<TComboboxProps['label']>,\n helperText: String as PropType<TComboboxProps['helperText']>,\n disabled: Boolean as PropType<TComboboxProps['disabled']>,\n },\n setup(props, { emit, expose }) {\n const text = ref(props.modelValue ?? '');\n const selectedOption = ref<Nullable<Option>>(null);\n const isDropdownOpen = ref(false);\n const container = ref<Nullable<HTMLDivElement>>(null);\n const textInputRef = ref<Nullable<HTMLInputElement>>(null);\n\n const isDisabled = computed(() => props.disabled);\n\n const openDropdown = () => {\n isDropdownOpen.value = true;\n };\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const unfocus = () => {\n textInputRef.value?.blur();\n };\n const resetTextValue = () => {\n if (selectedOption.value !== null) {\n text.value = selectedOption.value.label;\n } else {\n text.value = '';\n }\n };\n const resetSelectedOption = () => {\n selectedOption.value = null;\n };\n expose({ resetTextValue, resetSelectedOption });\n\n const handleFocus = () => {\n openDropdown();\n };\n const handleTextChange = (value: string) => {\n text.value = value;\n\n emit('input', value);\n };\n const handleClickOutside = (event: Event) => {\n if (!container.value) {\n return;\n }\n if (!isDropdownOpen.value) {\n return;\n }\n\n const isClickOutside = !container.value.contains(event.target as Node);\n if (isClickOutside) {\n closeDropdown();\n resetTextValue();\n unfocus();\n }\n };\n const handleSelection = (option: Option) => {\n text.value = option.label;\n selectedOption.value = option;\n\n emit('select', option.value);\n emit('update:modelValue', option.label);\n\n closeDropdown();\n };\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n closeDropdown();\n resetTextValue();\n unfocus();\n }\n };\n\n const filteredOptions = computed(() => {\n if (text.value === '') {\n return props.options;\n }\n\n return props.options.filter((option) => {\n const normalizedLabel = normalizeString(option.label);\n const normalizedFilterText = normalizeString(text.value);\n\n return normalizedLabel.includes(normalizedFilterText);\n });\n });\n\n onMounted(() => {\n document.addEventListener('click', handleClickOutside);\n container.value?.addEventListener('keydown', handleKeydown);\n });\n onUnmounted(() => {\n document.removeEventListener('click', handleClickOutside);\n container.value?.removeEventListener('keydown', handleKeydown);\n });\n\n const DropdownTrigger = () => (\n <TTextInput\n ref={textInputRef}\n modelValue={text.value}\n label={props.label}\n helperText={props.helperText}\n placeholder={props.placeholder}\n onFocus={handleFocus}\n onChange={handleTextChange}\n disabled={isDisabled.value}\n />\n );\n\n watch(\n () => props.modelValue,\n () => {\n text.value = props.modelValue ?? '';\n },\n );\n\n return () => (\n <div\n ref={container}\n role=\"combobox\"\n aria-controls=\"menu\"\n aria-expanded={isDropdownOpen.value}\n >\n <TDropdown open={isDropdownOpen.value} full-width>\n {{\n trigger: () => <DropdownTrigger />,\n default: () => filteredOptions.value.map((option) => (\n <TDropdownItem onClick={() => handleSelection(option)}>\n {option.label}\n </TDropdownItem>\n )),\n }}\n </TDropdown>\n </div>\n );\n },\n});\n","import { computed, useAttrs } from 'vue';\n\nexport const useForwardedAttrs = () => {\n const LAYOUT_ATTRS = new Set(['class', 'style']);\n const isLayout = ([key]: [string, unknown]) => LAYOUT_ATTRS.has(key);\n const isListener = ([key]: [string, unknown]) => /^on[A-Z]/.test(key);\n\n const attrs = useAttrs();\n const entries = computed(() => Object.entries(attrs).filter(([key]) => key !== 'data-state'));\n\n const wrapperAttrs = computed(() => Object.fromEntries(entries.value.filter(isLayout)));\n const listenerAttrs = computed(() => Object.fromEntries(entries.value.filter(isListener)));\n const staticAttrs = computed(() => Object.fromEntries(entries.value.filter((e) => !isLayout(e) && !isListener(e))));\n const controlAttrs = computed(() => Object.fromEntries(entries.value.filter((e) => !isLayout(e))));\n\n return { wrapperAttrs, controlAttrs, staticAttrs, listenerAttrs };\n};\n","<script lang=\"ts\">\nimport type { HeroIcon } from '@/types/heroicons';\n\n/**\n * A single row of the palette.\n *\n * Every field is presentational except `onSelect`. The component owns the\n * mechanics (focus, keyboard, ARIA, scroll) and stays agnostic about what a\n * result *means* — richer rendering goes through the `item` slot.\n */\nexport interface TCommandPaletteItem {\n /** Primary text. Also the fallback accessible name of the option. */\n label: string;\n\n /** Text rendered before `label` — e.g. the entity the result belongs to. */\n prefix?: string;\n\n /** Secondary text rendered after `label` — subtitle or contextual datum. */\n suffix?: string;\n\n /** Heroicon name rendered as the leading adornment. */\n icon?: HeroIcon;\n\n /**\n * How the leading adornment is drawn. `tile` (the default) is the neutral box;\n * `plain` is a bare icon with no box, for rows that are records; `accent` is a brand\n * tile, for rows that are commands. The `item-leading` slot cannot express this — it\n * fills the box rather than replacing it, and the box is styled in scoped CSS a\n * consumer cannot reach.\n */\n iconVariant?: 'tile' | 'plain' | 'accent';\n\n /**\n * Entity badge. Rendered by the default template only when it is a string;\n * any other shape is the `item` slot's business.\n */\n chip?: unknown;\n\n /** Keyboard shortcut hint, one `<kbd>` per entry. */\n kbds?: string[];\n\n /** Skipped by arrow navigation and not selectable. */\n disabled?: boolean;\n\n /** Marks the item as the currently applied one. Independent of the keyboard cursor. */\n active?: boolean;\n\n /** Invoked before `select` is emitted. */\n onSelect?: () => void;\n}\n\n/**\n * A band of consecutive groups drawn as one block — the \"related to X\" tier of a result\n * list, say. Purely a rendering device: the groups inside stay ordinary groups, so arrow\n * navigation, `highlight` and `select` do not know sections exist.\n */\nexport interface TCommandPaletteSection {\n /** Consecutive groups sharing this id render inside one element. */\n id: string;\n\n /**\n * Heading rendered once above the run, taken from whichever group declares one first.\n * The rest can carry `{ id }` alone.\n */\n label?: string;\n}\n\n/**\n * A labelled run of items. Groups are a rendering and grouping device — arrow\n * navigation crosses them as if the palette were one flat list.\n */\nexport interface TCommandPaletteGroup {\n /** Stable identity of the group. Used as the Vue list key, never as a DOM id. */\n id: string;\n\n /** Optional heading rendered above the group's items. */\n label?: string;\n\n /** The group's rows, already resolved by the consumer. */\n items: TCommandPaletteItem[];\n\n /**\n * Keeps the palette open when one of this group's rows is chosen. Default is to close, which is\n * right for a row that navigates somewhere.\n *\n * It exists for rows whose whole purpose is to change what the palette is showing — a recent\n * search that has to be run again, a group that expands — where closing throws away the result the\n * user asked for. It is per group rather than per component because the same palette usually mixes\n * both kinds.\n */\n keepOpenOnSelect?: boolean;\n\n /**\n * Reorders the group's items for the current term. It MUST NOT drop items —\n * the palette never filters (see the component docs); this is a ranking hook\n * so relevance scoring can live in the consumer instead of pulling a fuzzy\n * search dependency into `toku-ui`.\n */\n postFilter?: (searchTerm: string, items: TCommandPaletteItem[]) => TCommandPaletteItem[];\n\n /**\n * Draws this group inside a section block shared with the adjacent groups that declare\n * the same `section.id`. Lets a consumer put one border, background or inset around a\n * run of groups — which is impossible from outside, since groups render as siblings.\n */\n section?: TCommandPaletteSection;\n}\n\nexport interface TCommandPaletteProps {\n /** Result groups, already resolved. The palette does not filter them. */\n groups?: TCommandPaletteGroup[];\n\n /** Whether the dialog is shown. Use `v-model:open`. */\n open?: boolean;\n\n /** Current query. Use `v-model:search-term`. */\n searchTerm?: string;\n\n /** Debounce in ms applied to `update:searchTerm`. The input stays immediate. */\n searchDelay?: number;\n\n /** Shows the loading indicator and marks the listbox busy. */\n loading?: boolean;\n\n /** Input placeholder. Doubles as the input's accessible name when no `aria-label` is forwarded. */\n placeholder?: string;\n\n /**\n * Accessible name of the clear-query button, which appears once the input has text.\n * A prop rather than a literal because it is prose the palette itself renders.\n */\n clearLabel?: string;\n\n /**\n * Announced while `loading`. The skeleton is decorative, so without this the state\n * is silent to assistive tech — an empty list has no role to carry `aria-busy`.\n */\n loadingLabel?: string;\n\n /** Focuses the input when the palette opens. */\n autofocus?: boolean;\n}\n\nexport interface TCommandPaletteEmits {\n /** The active item changed, by keyboard or pointer. */\n highlight: [item: TCommandPaletteItem | undefined, group: TCommandPaletteGroup | undefined];\n\n /** An item was chosen with `Enter` or a click. */\n select: [item: TCommandPaletteItem, group: TCommandPaletteGroup];\n}\n\nexport interface TCommandPaletteItemSlotProps {\n item: TCommandPaletteItem;\n group: TCommandPaletteGroup;\n /** True when the item carries the keyboard cursor. */\n active: boolean;\n}\n\nexport interface TCommandPaletteGroupSlotProps {\n group: TCommandPaletteGroup;\n /** Position of the group in `groups`, after `postFilter`. */\n index: number;\n}\n\nexport interface TCommandPaletteSectionSlotProps {\n section: TCommandPaletteSection;\n /** The groups drawn inside this section, in order. */\n groups: TCommandPaletteGroup[];\n}\n\nexport interface TCommandPaletteSlots {\n /**\n * Replaces a section's heading. Same contract as `group-label`: whatever this renders\n * becomes the section's accessible name, and interactive controls do not belong here.\n */\n 'section-label'?: (props: TCommandPaletteSectionSlotProps) => unknown;\n\n /**\n * Replaces a group's heading. The palette still owns the heading element and its\n * `aria-labelledby` wiring — this only fills it, so a consumer can add an icon or a\n * count alongside the name.\n *\n * Whatever this renders **becomes the group's accessible name**, so it must always\n * render the name: a branch that renders nothing for some groups leaves those groups\n * with an empty one. Interactive controls do not belong here: a listbox may only own\n * `option` and `group`, so a control inside one is invalid ARIA and degrades how the\n * surrounding options are announced — a screen reader can miscount or skip them. It is\n * not a reachability problem; the dialog does cycle focus through such a control. The\n * fix is placement, not `tabindex`: use `footer`, or a real row with `onSelect`.\n */\n 'group-label'?: (props: TCommandPaletteGroupSlotProps) => unknown;\n\n /** Replaces a whole row. */\n item?: (props: TCommandPaletteItemSlotProps) => unknown;\n /** Replaces the leading adornment of a row. */\n 'item-leading'?: (props: TCommandPaletteItemSlotProps) => unknown;\n /** Replaces the label block of a row. */\n 'item-label'?: (props: TCommandPaletteItemSlotProps) => unknown;\n\n /**\n * Replaces only the label **text**, inside the span that already carries the title\n * typography and the truncation. Use it to decorate the label — wrapping matched\n * ranges in `<mark>`, say — without re-implementing the row's type or its ellipsis.\n *\n * Nested inside `item-label`'s default content, so a consumer that overrides\n * `item-label` replaces this too. Whatever it renders becomes part of the option's\n * accessible name, so it must still render the label.\n */\n 'item-text'?: (props: TCommandPaletteItemSlotProps) => unknown;\n\n /**\n * The same for the subtitle. It exists because the label is not where the match\n * necessarily is: a row surfaced by email or RUT carries the matched field here, so\n * decorating only the label would mark nothing on exactly those rows.\n *\n * Renders when the item has a `suffix` or this slot is filled, and carries the same\n * contract as `item-text`.\n */\n 'item-suffix'?: (props: TCommandPaletteItemSlotProps) => unknown;\n /** Replaces the trailing adornment of a row. */\n 'item-trailing'?: (props: TCommandPaletteItemSlotProps) => unknown;\n /** Shown when no group has items. */\n empty?: (props: { searchTerm: string }) => unknown;\n /** Persistent bar under the list — shortcut legends, counts. */\n footer?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { useTheme } from '@composables/theme';\nimport { Icon } from '@iconify/vue';\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, useId, watch } from 'vue';\n\ndefineOptions({\n name: 'TCommandPalette',\n inheritAttrs: false,\n});\n\nconst {\n groups = [],\n searchDelay = 0,\n loading,\n placeholder = '',\n clearLabel = 'Clear search',\n loadingLabel = 'Loading results',\n autofocus,\n} = defineProps<TCommandPaletteProps>();\n\nconst emit = defineEmits<TCommandPaletteEmits>();\ndefineSlots<TCommandPaletteSlots>();\n\nconst open = defineModel<boolean>('open', { default: false });\nconst searchTerm = defineModel<string>('searchTerm', { default: '' });\n\n// `autofocus` defaults to true, which a prop default cannot express: Vue coerces an\n// absent boolean prop to false (hence `vue/no-boolean-default`). Resolving it here keeps\n// \"omitted means focus the input\" without lying about the prop's declared default.\nconst shouldAutofocus = computed(() => autofocus ?? true);\n\nconst theme = useTheme();\nconst { wrapperAttrs, controlAttrs } = useForwardedAttrs();\n\n/*\n * The listbox role is dropped while there is nothing to list. `role=\"listbox\"` is\n * required to own `option`/`group` children, so an empty one is invalid ARIA — and\n * `aria-expanded` already reports the popup as collapsed in exactly that state.\n */\n\n/**\n * Every DOM id is derived from this one, so two palettes on the same page never\n * collide and nothing ships a literal id.\n */\nconst baseId = useId();\nconst inputId = `${baseId}-input`;\nconst listboxId = `${baseId}-listbox`;\nconst groupLabelId = (groupIndex: number) => `${baseId}-group-${groupIndex}`;\nconst optionId = (groupIndex: number, itemIndex: number) => `${baseId}-option-${groupIndex}-${itemIndex}`;\n\nconst dialogRef = ref<HTMLDialogElement>();\nconst inputRef = ref<HTMLInputElement>();\nconst listRef = ref<HTMLElement>();\n\n/** Mirrors the input so typing stays immediate while `update:searchTerm` is debounced. */\nconst inputValue = ref('');\nwatch(searchTerm, (next) => {\n if (next !== inputValue.value) {\n inputValue.value = next;\n }\n}, { immediate: true });\n\nconst commitSearchTerm = (value: string) => {\n searchTerm.value = value;\n};\n/**\n * Commits whatever the input currently shows rather than a captured value, so a debounce\n * still in flight when the query is cleared lands on the cleared value instead of\n * resurrecting the old term.\n */\nlet debounceTimer: ReturnType<typeof setTimeout> | undefined;\n\nconst debouncedCommit = () => {\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(() => commitSearchTerm(inputValue.value), searchDelay);\n};\n\nonBeforeUnmount(() => clearTimeout(debounceTimer));\n\nconst onInput = (event: Event) => {\n inputValue.value = (event.target as HTMLInputElement).value;\n if (searchDelay > 0) {\n debouncedCommit();\n } else {\n commitSearchTerm(inputValue.value);\n }\n};\n\n/**\n * Groups as rendered. `postFilter` may only reorder, so the rendered count per\n * group always matches the count the consumer supplied.\n */\nconst resolvedGroups = computed(() => groups.map((group) => ({\n ...group,\n items: group.postFilter ? group.postFilter(searchTerm.value, group.items) : group.items,\n})));\n\n/** Groups actually rendered as options. While loading, the skeleton stands in for them. */\nconst visibleGroups = computed(() => (loading ? [] : resolvedGroups.value));\n\ntype ResolvedGroup = (typeof resolvedGroups.value)[number];\n\ninterface GroupRun {\n key: string;\n section?: TCommandPaletteSection;\n /** Each group with its index in `visibleGroups`, which is what every id is derived from. */\n entries: Array<{ group: ResolvedGroup; index: number }>;\n}\n\n/**\n * Consecutive groups sharing a `section.id` collapse into one run, so the template can\n * wrap them in a single element. Groups without a section are runs of one, rendered\n * transparently — the wrapper is `display: contents` there and adds nothing to the tree.\n */\nconst groupRuns = computed<GroupRun[]>(() => {\n const runs: GroupRun[] = [];\n\n visibleGroups.value.forEach((group, index) => {\n const previous = runs.at(-1);\n if (group.section && previous?.section?.id === group.section.id) {\n previous.entries.push({ group, index });\n // The heading comes from whichever group in the run declares one first, so the\n // consumer can put it on any of them rather than only the first.\n previous.section.label ??= group.section.label;\n return;\n }\n runs.push({\n key: `${group.section?.id ?? group.id}-${index}`,\n section: group.section ? { ...group.section } : undefined,\n entries: [{ group, index }],\n });\n });\n\n return runs;\n});\n\nconst sectionLabelId = (index: number) => `${baseId}-section-${index}`;\n\n/**\n * Shape of the loading skeleton: uneven group sizes read as \"results\", where a uniform\n * block reads as a table. Static because it is decoration, not data.\n */\nconst SKELETON_GROUPS = [\n { id: 'a', rows: [0, 1, 2] },\n { id: 'b', rows: [0, 1] },\n { id: 'c', rows: [0, 1] },\n] as const;\n\n/** Staggered bar widths, so the placeholder doesn't read as a grid. */\nconst TITLE_WIDTHS: [number, number, number] = [42, 56, 68];\nconst SUFFIX_WIDTHS: [number, number, number] = [24, 32, 38];\nconst titleWidth = (row: number) => TITLE_WIDTHS[row % 3 as 0 | 1 | 2];\nconst suffixWidth = (row: number) => SUFFIX_WIDTHS[row % 3 as 0 | 1 | 2];\n\ninterface FlatEntry {\n item: TCommandPaletteItem;\n group: TCommandPaletteGroup;\n groupIndex: number;\n itemIndex: number;\n}\n\n/** Arrow navigation runs over this flattened view, which is what makes it cross groups. */\nconst flatItems = computed<FlatEntry[]>(() => visibleGroups.value.flatMap((group, groupIndex) => group.items.map((item, itemIndex) => ({ item, group, groupIndex, itemIndex }))));\n\nconst isEmpty = computed(() => flatItems.value.length === 0);\n\nconst activeIndex = ref(-1);\nconst activeEntry = computed<FlatEntry | undefined>(() => flatItems.value[activeIndex.value]);\nconst activeDescendantId = computed(() => (activeEntry.value\n ? optionId(activeEntry.value.groupIndex, activeEntry.value.itemIndex)\n : undefined));\n\nconst isSelectable = (entry: FlatEntry | undefined) => Boolean(entry) && !entry!.item.disabled;\n\n/** First selectable index at or after `from`, walking `step`. Returns -1 when the list has none. */\nconst findSelectable = (from: number, step: number) => {\n const total = flatItems.value.length;\n if (total === 0) {\n return -1;\n }\n\n for (let offset = 0; offset < total; offset += 1) {\n const index = (((from + step * offset) % total) + total) % total;\n if (isSelectable(flatItems.value[index])) {\n return index;\n }\n }\n return -1;\n};\n\nconst scrollActiveIntoView = async () => {\n await nextTick();\n if (!activeDescendantId.value) {\n return;\n }\n listRef.value\n ?.querySelector(`[id=\"${activeDescendantId.value}\"]`)\n ?.scrollIntoView({ block: 'nearest' });\n};\n\nconst setActiveIndex = (index: number) => {\n if (index === activeIndex.value) {\n return;\n }\n // Pointer navigation follows the same rule as the arrow keys: a disabled row never becomes the\n // active descendant. Otherwise hovering one and pressing Enter swallows the keystroke silently.\n if (index !== -1 && !isSelectable(flatItems.value[index])) {\n return;\n }\n activeIndex.value = index;\n emit('highlight', activeEntry.value?.item, activeEntry.value?.group);\n void scrollActiveIntoView();\n};\n\nconst move = (step: number) => {\n const from = activeIndex.value === -1 ? (step > 0 ? 0 : flatItems.value.length - 1) : activeIndex.value + step;\n const next = findSelectable(from, step);\n if (next !== -1) {\n setActiveIndex(next);\n }\n};\n\nconst selectEntry = (entry: FlatEntry) => {\n if (entry.item.disabled) {\n return;\n }\n entry.item.onSelect?.();\n emit('select', entry.item, entry.group);\n if (!entry.group?.keepOpenOnSelect) {\n open.value = false;\n }\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n move(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n move(-1);\n break;\n case 'Home':\n event.preventDefault();\n setActiveIndex(findSelectable(0, 1));\n break;\n case 'End':\n event.preventDefault();\n setActiveIndex(findSelectable(flatItems.value.length - 1, -1));\n break;\n case 'Enter':\n if (activeEntry.value) {\n event.preventDefault();\n selectEntry(activeEntry.value);\n }\n break;\n // The native <dialog> also dismisses on Escape, but only for a trusted keypress.\n // Closing here too makes the contract the component's own rather than the UA's, and\n // both paths converge on `open = false` — `syncDialog` no-ops on an already-closed dialog.\n case 'Escape':\n open.value = false;\n break;\n default:\n break;\n }\n};\n\n/** Keeps the cursor on the first selectable row whenever the result set changes. */\nwatch(flatItems, () => {\n const next = findSelectable(0, 1);\n activeIndex.value = next;\n emit('highlight', activeEntry.value?.item, activeEntry.value?.group);\n void scrollActiveIntoView();\n});\n\n/** Drives the native dialog from `open`. Separate from the watcher so mount can reuse it. */\nconst syncDialog = async () => {\n const dialog = dialogRef.value;\n if (!dialog) {\n return;\n }\n\n if (open.value) {\n if (!dialog.open) {\n dialog.showModal();\n }\n await nextTick();\n if (shouldAutofocus.value) {\n inputRef.value?.focus();\n }\n void scrollActiveIntoView();\n } else if (dialog.open) {\n dialog.close();\n }\n};\n\nwatch(open, (isOpen) => {\n if (isOpen) {\n activeIndex.value = findSelectable(0, 1);\n }\n void syncDialog();\n}, { immediate: true });\n\n// The immediate watcher above runs before the template refs exist, so an\n// already-open palette needs `showModal()` once the dialog is in the DOM.\nonMounted(syncDialog);\n\n/** Native `close` covers `Esc` and form-method dismissal, which bypass the watcher. */\nconst onDialogClose = () => {\n open.value = false;\n};\n\n/** The backdrop is the dialog's own box; a click landing on it is a click outside the panel. */\nconst onDialogClick = (event: MouseEvent) => {\n if (event.target === dialogRef.value) {\n open.value = false;\n }\n};\n\n// Keycap legends, not prose — the physical keys read the same in every locale. Bound from\n// script rather than inlined so they don't trip the bare-string i18n rule.\nconst ESC_LEGEND = 'ESC';\nconst ENTER_GLYPH = '↵';\n\n/** Resets the query and hands focus back, so the palette stays usable from the keyboard. */\nconst onClear = () => {\n inputValue.value = '';\n commitSearchTerm('');\n inputRef.value?.focus();\n};\n\nconst iconName = (icon: HeroIcon) => `${theme.value.iconSet}:${icon}`;\nconst chipText = (chip: unknown) => (typeof chip === 'string' ? chip : undefined);\n</script>\n\n<template>\n <dialog\n ref=\"dialogRef\"\n v-bind=\"wrapperAttrs\"\n class=\"t-command-palette\"\n :data-loading=\"loading || undefined\"\n :data-empty=\"isEmpty && !loading || undefined\"\n @close=\"onDialogClose\"\n @click=\"onDialogClick\"\n >\n <div class=\"t-command-palette__panel\">\n <div class=\"t-command-palette__search\">\n <Icon :icon=\"iconName('magnifying-glass')\" class=\"t-command-palette__search-icon\" aria-hidden=\"true\" />\n\n <input\n :id=\"inputId\"\n ref=\"inputRef\"\n v-bind=\"controlAttrs\"\n class=\"t-command-palette__input\"\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n :aria-label=\"($attrs['aria-label'] as string) ?? placeholder ?? undefined\"\n :aria-expanded=\"open && !isEmpty\"\n :aria-controls=\"listboxId\"\n :aria-activedescendant=\"activeDescendantId\"\n :placeholder=\"placeholder\"\n :value=\"inputValue\"\n @input=\"onInput\"\n @keydown=\"onKeydown\"\n >\n\n <!--\n Always rendered, hidden with `visibility` rather than `v-if`: mounting it on the\n first keystroke took 34px off the input mid-type, which reflowed the field under\n the caret. `visibility: hidden` keeps the box but drops it from the a11y tree and\n the tab order, so an empty query still offers nothing to clear.\n -->\n <button\n type=\"button\"\n class=\"t-command-palette__clear\"\n :data-hidden=\"!inputValue || undefined\"\n :aria-label=\"clearLabel\"\n @click=\"onClear\"\n >\n <Icon :icon=\"iconName('x-mark')\" aria-hidden=\"true\" />\n </button>\n\n <kbd class=\"t-command-palette__esc\" aria-hidden=\"true\">{{ ESC_LEGEND }}</kbd>\n </div>\n\n <p v-if=\"loading\" role=\"status\" class=\"t-command-palette__status\">\n {{ loadingLabel }}\n </p>\n\n <div\n :id=\"listboxId\"\n ref=\"listRef\"\n class=\"t-command-palette__list\"\n :role=\"isEmpty ? undefined : 'listbox'\"\n :aria-labelledby=\"isEmpty ? undefined : inputId\"\n :aria-busy=\"loading || undefined\"\n >\n <!--\n Loading replaces the list rather than overlaying it: the rows that are coming\n are unknown, so a skeleton of the real row geometry is the honest placeholder.\n It is aria-hidden — `aria-busy` on the listbox is what assistive tech reads.\n -->\n <div v-if=\"loading\" class=\"t-command-palette__skeleton\" aria-hidden=\"true\">\n <div v-for=\"group in SKELETON_GROUPS\" :key=\"group.id\" class=\"t-command-palette__group\">\n <div class=\"t-command-palette__skeleton-label\" />\n <div v-for=\"row in group.rows\" :key=\"row\" class=\"t-command-palette__skeleton-row\">\n <span class=\"t-command-palette__skeleton-box\" />\n <span class=\"t-command-palette__skeleton-lines\">\n <span class=\"t-command-palette__skeleton-title\" :style=\"{ width: `${titleWidth(row)}%` }\" />\n <span class=\"t-command-palette__skeleton-suffix\" :style=\"{ width: `${suffixWidth(row)}%` }\" />\n </span>\n </div>\n </div>\n </div>\n\n <!--\n One element per run of groups. Unsectioned runs are `display: contents`, so the\n wrapper is invisible to both layout and the accessibility tree; a sectioned run\n becomes a real box a consumer can put one border or inset around.\n -->\n <div\n v-for=\"run in groupRuns\"\n :key=\"run.key\"\n class=\"t-command-palette__section\"\n :role=\"run.section ? 'group' : 'presentation'\"\n :data-section=\"run.section?.id\"\n :aria-labelledby=\"\n run.section && (run.section.label || $slots['section-label'])\n ? sectionLabelId(run.entries[0].index)\n : undefined\n \"\n >\n <div\n v-if=\"run.section && (run.section.label || $slots['section-label'])\"\n :id=\"sectionLabelId(run.entries[0].index)\"\n class=\"t-command-palette__section-label\"\n >\n <slot\n name=\"section-label\"\n :section=\"run.section\"\n :groups=\"run.entries.map((entry) => entry.group)\"\n >\n {{ run.section.label }}\n </slot>\n </div>\n\n <div\n v-for=\"{ group, index: groupIndex } in run.entries\"\n :key=\"group.id\"\n class=\"t-command-palette__group\"\n role=\"group\"\n :data-group=\"group.id\"\n :aria-labelledby=\"group.label || $slots['group-label'] ? groupLabelId(groupIndex) : undefined\"\n >\n <div\n v-if=\"group.label || $slots['group-label']\"\n :id=\"groupLabelId(groupIndex)\"\n class=\"t-command-palette__group-label\"\n >\n <slot name=\"group-label\" :group=\"group\" :index=\"groupIndex\">\n {{ group.label }}\n </slot>\n </div>\n\n <div\n v-for=\"(item, itemIndex) in group.items\"\n :id=\"optionId(groupIndex, itemIndex)\"\n :key=\"optionId(groupIndex, itemIndex)\"\n class=\"t-command-palette__item\"\n role=\"option\"\n :aria-label=\"item.label\"\n :aria-selected=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n :aria-disabled=\"item.disabled || undefined\"\n :data-highlighted=\"optionId(groupIndex, itemIndex) === activeDescendantId || undefined\"\n :data-active=\"item.active || undefined\"\n :data-disabled=\"item.disabled || undefined\"\n @click=\"selectEntry({ item, group, groupIndex, itemIndex })\"\n @pointermove=\"setActiveIndex(\n flatItems.findIndex((entry) => entry.groupIndex === groupIndex && entry.itemIndex === itemIndex)\n )\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >\n <span\n class=\"t-command-palette__item-leading\"\n :data-icon-variant=\"item.iconVariant ?? 'tile'\"\n >\n <slot\n name=\"item-leading\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >\n <Icon v-if=\"item.icon\" :icon=\"iconName(item.icon)\" aria-hidden=\"true\" />\n </slot>\n </span>\n\n <span class=\"t-command-palette__item-label\">\n <slot\n name=\"item-label\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >\n <span class=\"t-command-palette__item-title\">\n <span v-if=\"item.prefix\" class=\"t-command-palette__item-prefix\">{{ item.prefix }}</span>\n <span class=\"t-command-palette__item-text\">\n <slot\n name=\"item-text\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >{{ item.label }}</slot>\n </span>\n </span>\n <span\n v-if=\"item.suffix || $slots['item-suffix']\"\n class=\"t-command-palette__item-suffix\"\n >\n <slot\n name=\"item-suffix\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >{{ item.suffix }}</slot>\n </span>\n </slot>\n </span>\n\n <span class=\"t-command-palette__item-trailing\">\n <slot\n name=\"item-trailing\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >\n <span v-if=\"chipText(item.chip)\" class=\"t-command-palette__item-chip\">\n {{ chipText(item.chip) }}\n </span>\n <kbd v-for=\"kbd in item.kbds\" :key=\"kbd\" class=\"t-command-palette__item-kbd\">{{ kbd }}</kbd>\n <span\n v-if=\"optionId(groupIndex, itemIndex) === activeDescendantId && !item.kbds?.length\"\n class=\"t-command-palette__item-enter\"\n aria-hidden=\"true\"\n >{{ ENTER_GLYPH }}</span>\n </slot>\n </span>\n </slot>\n </div>\n </div>\n </div>\n\n <div v-if=\"isEmpty && !loading\" class=\"t-command-palette__empty\">\n <slot name=\"empty\" :search-term=\"searchTerm\" />\n </div>\n </div>\n\n <div v-if=\"$slots.footer\" class=\"t-command-palette__footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </dialog>\n</template>\n\n<style scoped lang=\"scss\">\n/*\n * Spacing geometry is transcribed from the Global Search design prototype. Values the\n * scale can express use the token (`--gap-item` is 12px, `--gap-unit` 4px, `--inset-item`\n * 8px); the rest stay literal px because the scale steps 4/8/12/16/24 and the design uses\n * 2/6/7/10/14/18. See `.agents/decisions/012-design-geometry-literals.md`.\n *\n * Colour, radius, shadow and type resolve through tokens regardless of what the prototype\n * says — its greys are framework defaults and the token layer was synced from Figma, so\n * matching its literals would mean opting out of tenant theming. Type therefore lands\n * within 1px of the design, and its #8d8d8d secondary text failed WCAG AA outright.\n */\n.t-command-palette {\n /*\n * Padded boxes here are sized by their border box. Without this, a row's `width: 100%`\n * plus its 36px of inset overflows the list and produces a horizontal scrollbar.\n */\n &,\n & :deep(*) {\n box-sizing: border-box;\n }\n\n /* Anchored near the top rather than centered — a palette is reached for, not read. */\n width: min(640px, 92vw);\n max-width: none;\n max-height: 70vh;\n margin: 12vh auto auto;\n padding: 0;\n border: none;\n border-radius: var(--radius-overlay);\n background: var(--neutral-base);\n box-shadow: var(--shadow-dialog-default);\n overflow: hidden;\n\n /*\n * The dialog is never unmounted — `showModal()` / `close()` toggle it — so ADR 008\n * puts the enter/exit animation in CSS. `allow-discrete` + `@starting-style` are what\n * let `display` and the top layer participate, which is the part a JS library would\n * otherwise be needed for.\n */\n opacity: var(--opacity-0);\n translate: 0 calc(-1 * var(--space-8));\n transition:\n opacity var(--motion-exit-duration) var(--motion-exit-easing),\n translate var(--motion-exit-duration) var(--motion-exit-easing),\n display var(--motion-exit-duration) allow-discrete,\n overlay var(--motion-exit-duration) allow-discrete;\n\n &[open] {\n opacity: var(--opacity-100);\n translate: 0 0;\n transition:\n opacity var(--motion-enter-duration) var(--motion-enter-easing),\n translate var(--motion-enter-duration) var(--motion-enter-easing),\n display var(--motion-enter-duration) allow-discrete,\n overlay var(--motion-enter-duration) allow-discrete;\n\n @starting-style {\n opacity: var(--opacity-0);\n translate: 0 calc(-1 * var(--space-8));\n }\n }\n\n &::backdrop {\n background: var(--color-base-black);\n backdrop-filter: blur(4px);\n opacity: var(--opacity-0);\n transition:\n opacity var(--motion-exit-duration) var(--motion-exit-easing),\n display var(--motion-exit-duration) allow-discrete,\n overlay var(--motion-exit-duration) allow-discrete;\n }\n\n &[open]::backdrop {\n opacity: var(--opacity-50);\n transition:\n opacity var(--motion-enter-duration) var(--motion-enter-easing),\n display var(--motion-enter-duration) allow-discrete,\n overlay var(--motion-enter-duration) allow-discrete;\n\n @starting-style {\n opacity: var(--opacity-0);\n }\n }\n\n &__status {\n position: absolute;\n overflow: hidden;\n clip-path: inset(50%);\n width: 1px;\n height: 1px;\n white-space: nowrap;\n }\n\n &__panel {\n display: flex;\n flex-direction: column;\n max-height: 70vh;\n }\n\n /*\n * Secondary text uses `--neutral-text`, not `--neutral-solid`. The design's #8d8d8d\n * is ~2.9:1 on the panel and fails WCAG AA for body text; the axe gate on these\n * stories catches it. `solid` is the token role for fills, `text` for type.\n */\n &__search {\n display: flex;\n align-items: center;\n gap: var(--gap-item);\n padding: 14px 18px;\n border-bottom: var(--border-width-1) solid var(--neutral-line);\n }\n\n &__search-icon {\n flex-shrink: 0;\n width: 18px;\n height: 18px;\n color: var(--neutral-text);\n }\n\n &__input {\n flex: 1;\n min-width: 0;\n padding: 0;\n border: none;\n outline: none;\n background: transparent;\n font-family: var(--font-family-base);\n font-size: var(--font-b2-font-size);\n\n // 24px against a 16px font. An input clips to its line box, so the 18px that pairs with b4 cuts\n // the descenders off `j`, `g` and `y` in anything the user types.\n line-height: var(--line-height-24);\n color: var(--neutral-text-contrast);\n\n &::placeholder {\n color: var(--neutral-text);\n }\n }\n\n &__clear {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n border: none;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n font-size: var(--font-b4-font-size);\n color: var(--neutral-text);\n cursor: pointer;\n outline: var(--focus-ring-width) solid transparent;\n outline-offset: var(--focus-ring-offset);\n opacity: var(--opacity-100);\n scale: 1;\n transition:\n background-color var(--motion-control-duration) var(--motion-control-easing),\n color var(--motion-control-duration) var(--motion-control-easing),\n outline-color var(--motion-control-duration) var(--motion-control-easing),\n opacity var(--motion-control-duration) var(--motion-control-easing),\n scale var(--motion-control-duration) var(--motion-control-easing),\n visibility var(--motion-control-duration) allow-discrete;\n\n &:hover {\n background: var(--neutral-bg-active);\n color: var(--neutral-text-contrast);\n }\n\n &:focus-visible {\n outline-color: var(--primary-border);\n }\n\n &[data-hidden] {\n visibility: hidden;\n opacity: var(--opacity-0);\n scale: 0.8;\n }\n }\n\n &__esc {\n flex-shrink: 0;\n padding: 2px 7px;\n border-radius: var(--radius-4);\n background: var(--neutral-bg-subtle);\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text);\n }\n\n &__list {\n flex: 1;\n overflow: hidden auto;\n padding: var(--inset-item) 0;\n scroll-padding: var(--inset-item);\n }\n\n /*\n * A run with no section generates no box: `display: contents` keeps the wrapper out of\n * layout, so unsectioned groups lay out exactly as if it were not there. The element\n * still exists in the DOM; `role=\"presentation\"` is what keeps it out of the a11y tree.\n * A sectioned run becomes a real box, which is the point — one border or inset can\n * then wrap the whole run instead of being repeated per group and breaking up.\n */\n &__section {\n display: contents;\n\n &[data-section] {\n display: block;\n }\n }\n\n &__section-label {\n padding: 10px 18px 4px;\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-bold);\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--neutral-text);\n }\n\n &__group {\n /*\n * `padding-block`, not the `padding` shorthand: the shorthand would also set\n * padding-inline to 0, and a scoped rule out-specifies a consumer's plain\n * `[data-group=...]` selector — which would make that hook unusable for indenting\n * a group. ADR 011 only means something if consumers can actually reach it.\n */\n padding-block: 6px;\n }\n\n /*\n * The skeleton reuses the real row metrics — 32px box, 12px gap, 10px/18px inset — so\n * results land exactly where the placeholder sat and the list doesn't jump on resolve.\n */\n &__skeleton-label {\n width: 70px;\n height: 8px;\n margin: 6px 18px;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n }\n\n &__skeleton-row {\n display: flex;\n align-items: center;\n gap: var(--gap-item);\n padding: 10px 18px;\n }\n\n &__skeleton-box {\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n border-radius: var(--radius-control);\n background: var(--neutral-bg);\n }\n\n &__skeleton-lines {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 6px;\n min-width: 0;\n }\n\n &__skeleton-title,\n &__skeleton-suffix {\n height: 8px;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n }\n\n &__skeleton-suffix {\n height: 7px;\n }\n\n /* ADR 008 keeps a looping shimmer in CSS: nothing unmounts and there is no physics. */\n &__skeleton {\n animation: t-command-palette-pulse var(--motion-loading-duration) var(--motion-easing-standard) infinite;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n\n &__group-label {\n padding: 6px 18px;\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-bold);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--neutral-text);\n }\n\n &__item {\n display: flex;\n align-items: center;\n gap: var(--gap-item);\n padding: 10px 18px;\n cursor: pointer;\n font-family: var(--font-family-base);\n color: var(--neutral-text-contrast);\n text-align: left;\n transition: background-color var(--motion-control-duration) var(--motion-control-easing);\n\n /*\n * Highlight follows `aria-activedescendant`, never focus — the input keeps it.\n * On the Radix ramp this row is the *selected* UI element, not a hovered one\n * (`aria-selected=\"true\"`, and pointer hover moves the same cursor), so it takes\n * step 5. `--neutral-bg-subtle` (step 2) was a subtle *background*, never a\n * component surface, which is why it read as no highlight at all.\n *\n * The band stays neutral, as the design has it — step 5 is the selected-surface step\n * on the same ramp, so this is a step change, not a hue change. Neutral cannot be\n * pushed past it either: the token file is explicit that step 7 \"is a BORDER, not a\n * fill\".\n *\n * Step 11 is specified as low-contrast text for steps 1-3, so on a step-5 surface\n * the muted line moves to step 12 — measured, step 11 is 4.48:1 there and fails AA.\n * The title/subtitle hierarchy is carried by size and weight, not colour alone.\n */\n &[data-highlighted] {\n background: var(--neutral-bg-active);\n }\n\n /* The item's own `active` flag tints the title, which inherits this colour. */\n &[data-active] {\n color: var(--primary-text);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: var(--opacity-disabled);\n }\n }\n\n &__item-leading {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: var(--radius-control);\n background: var(--neutral-bg);\n font-size: var(--font-b2-font-size);\n color: var(--neutral-text);\n scale: 1;\n transition:\n scale var(--motion-control-duration) var(--motion-easing-decelerated),\n background-color var(--motion-control-duration) var(--motion-control-easing);\n\n /* A record: the icon carries the meaning, the box would only add noise. */\n &[data-icon-variant='plain'] {\n border-radius: var(--radius-0);\n background: transparent;\n font-size: var(--font-b0-font-size);\n }\n\n /* A command rather than a record, so it reads as an affordance. */\n &[data-icon-variant='accent'] {\n background: var(--primary-bg);\n font-size: var(--font-b1-font-size);\n color: var(--primary-text);\n }\n }\n\n &__item[data-highlighted] &__item-leading {\n scale: 1.06;\n }\n\n &__item-label {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n }\n\n &__item-title {\n display: flex;\n align-items: baseline;\n gap: var(--gap-unit);\n min-width: 0;\n font-size: var(--font-b3-font-size);\n line-height: var(--line-height-16);\n font-weight: var(--font-weight-semibold);\n color: inherit;\n }\n\n /*\n * Both lines clip for the ellipsis, and their line boxes (16px and 14px) are shorter than\n * the font's descenders: `g`, `j` and `p` lost their tails. The padding gives the glyphs\n * room inside the clip and the negative margin hands it back, so no row moves.\n */\n &__item-text,\n &__item-suffix {\n padding-block: 2px;\n margin-block: -2px;\n }\n\n &__item-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__item-prefix {\n flex-shrink: 0;\n color: var(--neutral-text);\n }\n\n &__item-suffix {\n overflow: hidden;\n font-size: var(--font-b4-font-size);\n line-height: var(--line-height-14);\n color: var(--neutral-text);\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /*\n * Step 11 is specified as low-contrast text for steps 1-3; on the step-5 selection band\n * it measures 4.48:1 and fails AA, so the muted line steps up to 12 there. Written as\n * `&[state] &__child` per ADR 011 rather than threading a class binding through.\n */\n &__item[data-highlighted] &__item-prefix,\n &__item[data-highlighted] &__item-suffix {\n color: var(--neutral-text-contrast);\n }\n\n &__item-trailing {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n gap: var(--gap-unit);\n }\n\n &__item-chip {\n padding: 2px 7px;\n border-radius: var(--radius-4);\n background: var(--neutral-bg-subtle);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text);\n }\n\n &__item-kbd {\n padding: 2px 7px;\n border-radius: var(--radius-4);\n background: var(--neutral-bg-subtle);\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text);\n }\n\n &__item-enter {\n animation: t-command-palette-hint-in var(--motion-control-duration) var(--motion-easing-decelerated);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text);\n }\n\n &__empty {\n padding: 40px 24px;\n font-family: var(--font-family-base);\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n color: var(--neutral-text);\n text-align: center;\n }\n\n &__footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 18px;\n border-top: var(--border-width-1) solid var(--neutral-line);\n background: var(--neutral-bg-subtle);\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n color: var(--neutral-text);\n }\n\n /*\n * Last in the block on purpose: a media query adds no specificity, so these\n * overrides only win the cascade by coming after the rules they switch off.\n */\n @media (prefers-reduced-motion: reduce) {\n &,\n &[open],\n &::backdrop,\n &[open]::backdrop {\n transition-duration: var(--motion-duration-instant);\n }\n\n &,\n &[open] {\n translate: 0 0;\n }\n\n /* The micro-interactions are decoration; state still reads from colour and layout. */\n &__clear,\n &__item-leading {\n transition-duration: var(--motion-duration-instant);\n }\n\n &__item[data-highlighted] &__item-leading {\n scale: 1;\n }\n\n &__item-enter {\n animation: none;\n }\n }\n\n}\n\n@keyframes t-command-palette-hint-in {\n from {\n opacity: var(--opacity-0);\n translate: 4px 0;\n }\n}\n\n@keyframes t-command-palette-pulse {\n 50% {\n opacity: var(--opacity-50);\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { HeroIcon } from '@/types/heroicons';\n\n/**\n * A single row of the palette.\n *\n * Every field is presentational except `onSelect`. The component owns the\n * mechanics (focus, keyboard, ARIA, scroll) and stays agnostic about what a\n * result *means* — richer rendering goes through the `item` slot.\n */\nexport interface TCommandPaletteItem {\n /** Primary text. Also the fallback accessible name of the option. */\n label: string;\n\n /** Text rendered before `label` — e.g. the entity the result belongs to. */\n prefix?: string;\n\n /** Secondary text rendered after `label` — subtitle or contextual datum. */\n suffix?: string;\n\n /** Heroicon name rendered as the leading adornment. */\n icon?: HeroIcon;\n\n /**\n * How the leading adornment is drawn. `tile` (the default) is the neutral box;\n * `plain` is a bare icon with no box, for rows that are records; `accent` is a brand\n * tile, for rows that are commands. The `item-leading` slot cannot express this — it\n * fills the box rather than replacing it, and the box is styled in scoped CSS a\n * consumer cannot reach.\n */\n iconVariant?: 'tile' | 'plain' | 'accent';\n\n /**\n * Entity badge. Rendered by the default template only when it is a string;\n * any other shape is the `item` slot's business.\n */\n chip?: unknown;\n\n /** Keyboard shortcut hint, one `<kbd>` per entry. */\n kbds?: string[];\n\n /** Skipped by arrow navigation and not selectable. */\n disabled?: boolean;\n\n /** Marks the item as the currently applied one. Independent of the keyboard cursor. */\n active?: boolean;\n\n /** Invoked before `select` is emitted. */\n onSelect?: () => void;\n}\n\n/**\n * A band of consecutive groups drawn as one block — the \"related to X\" tier of a result\n * list, say. Purely a rendering device: the groups inside stay ordinary groups, so arrow\n * navigation, `highlight` and `select` do not know sections exist.\n */\nexport interface TCommandPaletteSection {\n /** Consecutive groups sharing this id render inside one element. */\n id: string;\n\n /**\n * Heading rendered once above the run, taken from whichever group declares one first.\n * The rest can carry `{ id }` alone.\n */\n label?: string;\n}\n\n/**\n * A labelled run of items. Groups are a rendering and grouping device — arrow\n * navigation crosses them as if the palette were one flat list.\n */\nexport interface TCommandPaletteGroup {\n /** Stable identity of the group. Used as the Vue list key, never as a DOM id. */\n id: string;\n\n /** Optional heading rendered above the group's items. */\n label?: string;\n\n /** The group's rows, already resolved by the consumer. */\n items: TCommandPaletteItem[];\n\n /**\n * Keeps the palette open when one of this group's rows is chosen. Default is to close, which is\n * right for a row that navigates somewhere.\n *\n * It exists for rows whose whole purpose is to change what the palette is showing — a recent\n * search that has to be run again, a group that expands — where closing throws away the result the\n * user asked for. It is per group rather than per component because the same palette usually mixes\n * both kinds.\n */\n keepOpenOnSelect?: boolean;\n\n /**\n * Reorders the group's items for the current term. It MUST NOT drop items —\n * the palette never filters (see the component docs); this is a ranking hook\n * so relevance scoring can live in the consumer instead of pulling a fuzzy\n * search dependency into `toku-ui`.\n */\n postFilter?: (searchTerm: string, items: TCommandPaletteItem[]) => TCommandPaletteItem[];\n\n /**\n * Draws this group inside a section block shared with the adjacent groups that declare\n * the same `section.id`. Lets a consumer put one border, background or inset around a\n * run of groups — which is impossible from outside, since groups render as siblings.\n */\n section?: TCommandPaletteSection;\n}\n\nexport interface TCommandPaletteProps {\n /** Result groups, already resolved. The palette does not filter them. */\n groups?: TCommandPaletteGroup[];\n\n /** Whether the dialog is shown. Use `v-model:open`. */\n open?: boolean;\n\n /** Current query. Use `v-model:search-term`. */\n searchTerm?: string;\n\n /** Debounce in ms applied to `update:searchTerm`. The input stays immediate. */\n searchDelay?: number;\n\n /** Shows the loading indicator and marks the listbox busy. */\n loading?: boolean;\n\n /** Input placeholder. Doubles as the input's accessible name when no `aria-label` is forwarded. */\n placeholder?: string;\n\n /**\n * Accessible name of the clear-query button, which appears once the input has text.\n * A prop rather than a literal because it is prose the palette itself renders.\n */\n clearLabel?: string;\n\n /**\n * Announced while `loading`. The skeleton is decorative, so without this the state\n * is silent to assistive tech — an empty list has no role to carry `aria-busy`.\n */\n loadingLabel?: string;\n\n /** Focuses the input when the palette opens. */\n autofocus?: boolean;\n}\n\nexport interface TCommandPaletteEmits {\n /** The active item changed, by keyboard or pointer. */\n highlight: [item: TCommandPaletteItem | undefined, group: TCommandPaletteGroup | undefined];\n\n /** An item was chosen with `Enter` or a click. */\n select: [item: TCommandPaletteItem, group: TCommandPaletteGroup];\n}\n\nexport interface TCommandPaletteItemSlotProps {\n item: TCommandPaletteItem;\n group: TCommandPaletteGroup;\n /** True when the item carries the keyboard cursor. */\n active: boolean;\n}\n\nexport interface TCommandPaletteGroupSlotProps {\n group: TCommandPaletteGroup;\n /** Position of the group in `groups`, after `postFilter`. */\n index: number;\n}\n\nexport interface TCommandPaletteSectionSlotProps {\n section: TCommandPaletteSection;\n /** The groups drawn inside this section, in order. */\n groups: TCommandPaletteGroup[];\n}\n\nexport interface TCommandPaletteSlots {\n /**\n * Replaces a section's heading. Same contract as `group-label`: whatever this renders\n * becomes the section's accessible name, and interactive controls do not belong here.\n */\n 'section-label'?: (props: TCommandPaletteSectionSlotProps) => unknown;\n\n /**\n * Replaces a group's heading. The palette still owns the heading element and its\n * `aria-labelledby` wiring — this only fills it, so a consumer can add an icon or a\n * count alongside the name.\n *\n * Whatever this renders **becomes the group's accessible name**, so it must always\n * render the name: a branch that renders nothing for some groups leaves those groups\n * with an empty one. Interactive controls do not belong here: a listbox may only own\n * `option` and `group`, so a control inside one is invalid ARIA and degrades how the\n * surrounding options are announced — a screen reader can miscount or skip them. It is\n * not a reachability problem; the dialog does cycle focus through such a control. The\n * fix is placement, not `tabindex`: use `footer`, or a real row with `onSelect`.\n */\n 'group-label'?: (props: TCommandPaletteGroupSlotProps) => unknown;\n\n /** Replaces a whole row. */\n item?: (props: TCommandPaletteItemSlotProps) => unknown;\n /** Replaces the leading adornment of a row. */\n 'item-leading'?: (props: TCommandPaletteItemSlotProps) => unknown;\n /** Replaces the label block of a row. */\n 'item-label'?: (props: TCommandPaletteItemSlotProps) => unknown;\n\n /**\n * Replaces only the label **text**, inside the span that already carries the title\n * typography and the truncation. Use it to decorate the label — wrapping matched\n * ranges in `<mark>`, say — without re-implementing the row's type or its ellipsis.\n *\n * Nested inside `item-label`'s default content, so a consumer that overrides\n * `item-label` replaces this too. Whatever it renders becomes part of the option's\n * accessible name, so it must still render the label.\n */\n 'item-text'?: (props: TCommandPaletteItemSlotProps) => unknown;\n\n /**\n * The same for the subtitle. It exists because the label is not where the match\n * necessarily is: a row surfaced by email or RUT carries the matched field here, so\n * decorating only the label would mark nothing on exactly those rows.\n *\n * Renders when the item has a `suffix` or this slot is filled, and carries the same\n * contract as `item-text`.\n */\n 'item-suffix'?: (props: TCommandPaletteItemSlotProps) => unknown;\n /** Replaces the trailing adornment of a row. */\n 'item-trailing'?: (props: TCommandPaletteItemSlotProps) => unknown;\n /** Shown when no group has items. */\n empty?: (props: { searchTerm: string }) => unknown;\n /** Persistent bar under the list — shortcut legends, counts. */\n footer?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { useTheme } from '@composables/theme';\nimport { Icon } from '@iconify/vue';\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, useId, watch } from 'vue';\n\ndefineOptions({\n name: 'TCommandPalette',\n inheritAttrs: false,\n});\n\nconst {\n groups = [],\n searchDelay = 0,\n loading,\n placeholder = '',\n clearLabel = 'Clear search',\n loadingLabel = 'Loading results',\n autofocus,\n} = defineProps<TCommandPaletteProps>();\n\nconst emit = defineEmits<TCommandPaletteEmits>();\ndefineSlots<TCommandPaletteSlots>();\n\nconst open = defineModel<boolean>('open', { default: false });\nconst searchTerm = defineModel<string>('searchTerm', { default: '' });\n\n// `autofocus` defaults to true, which a prop default cannot express: Vue coerces an\n// absent boolean prop to false (hence `vue/no-boolean-default`). Resolving it here keeps\n// \"omitted means focus the input\" without lying about the prop's declared default.\nconst shouldAutofocus = computed(() => autofocus ?? true);\n\nconst theme = useTheme();\nconst { wrapperAttrs, controlAttrs } = useForwardedAttrs();\n\n/*\n * The listbox role is dropped while there is nothing to list. `role=\"listbox\"` is\n * required to own `option`/`group` children, so an empty one is invalid ARIA — and\n * `aria-expanded` already reports the popup as collapsed in exactly that state.\n */\n\n/**\n * Every DOM id is derived from this one, so two palettes on the same page never\n * collide and nothing ships a literal id.\n */\nconst baseId = useId();\nconst inputId = `${baseId}-input`;\nconst listboxId = `${baseId}-listbox`;\nconst groupLabelId = (groupIndex: number) => `${baseId}-group-${groupIndex}`;\nconst optionId = (groupIndex: number, itemIndex: number) => `${baseId}-option-${groupIndex}-${itemIndex}`;\n\nconst dialogRef = ref<HTMLDialogElement>();\nconst inputRef = ref<HTMLInputElement>();\nconst listRef = ref<HTMLElement>();\n\n/** Mirrors the input so typing stays immediate while `update:searchTerm` is debounced. */\nconst inputValue = ref('');\nwatch(searchTerm, (next) => {\n if (next !== inputValue.value) {\n inputValue.value = next;\n }\n}, { immediate: true });\n\nconst commitSearchTerm = (value: string) => {\n searchTerm.value = value;\n};\n/**\n * Commits whatever the input currently shows rather than a captured value, so a debounce\n * still in flight when the query is cleared lands on the cleared value instead of\n * resurrecting the old term.\n */\nlet debounceTimer: ReturnType<typeof setTimeout> | undefined;\n\nconst debouncedCommit = () => {\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(() => commitSearchTerm(inputValue.value), searchDelay);\n};\n\nonBeforeUnmount(() => clearTimeout(debounceTimer));\n\nconst onInput = (event: Event) => {\n inputValue.value = (event.target as HTMLInputElement).value;\n if (searchDelay > 0) {\n debouncedCommit();\n } else {\n commitSearchTerm(inputValue.value);\n }\n};\n\n/**\n * Groups as rendered. `postFilter` may only reorder, so the rendered count per\n * group always matches the count the consumer supplied.\n */\nconst resolvedGroups = computed(() => groups.map((group) => ({\n ...group,\n items: group.postFilter ? group.postFilter(searchTerm.value, group.items) : group.items,\n})));\n\n/** Groups actually rendered as options. While loading, the skeleton stands in for them. */\nconst visibleGroups = computed(() => (loading ? [] : resolvedGroups.value));\n\ntype ResolvedGroup = (typeof resolvedGroups.value)[number];\n\ninterface GroupRun {\n key: string;\n section?: TCommandPaletteSection;\n /** Each group with its index in `visibleGroups`, which is what every id is derived from. */\n entries: Array<{ group: ResolvedGroup; index: number }>;\n}\n\n/**\n * Consecutive groups sharing a `section.id` collapse into one run, so the template can\n * wrap them in a single element. Groups without a section are runs of one, rendered\n * transparently — the wrapper is `display: contents` there and adds nothing to the tree.\n */\nconst groupRuns = computed<GroupRun[]>(() => {\n const runs: GroupRun[] = [];\n\n visibleGroups.value.forEach((group, index) => {\n const previous = runs.at(-1);\n if (group.section && previous?.section?.id === group.section.id) {\n previous.entries.push({ group, index });\n // The heading comes from whichever group in the run declares one first, so the\n // consumer can put it on any of them rather than only the first.\n previous.section.label ??= group.section.label;\n return;\n }\n runs.push({\n key: `${group.section?.id ?? group.id}-${index}`,\n section: group.section ? { ...group.section } : undefined,\n entries: [{ group, index }],\n });\n });\n\n return runs;\n});\n\nconst sectionLabelId = (index: number) => `${baseId}-section-${index}`;\n\n/**\n * Shape of the loading skeleton: uneven group sizes read as \"results\", where a uniform\n * block reads as a table. Static because it is decoration, not data.\n */\nconst SKELETON_GROUPS = [\n { id: 'a', rows: [0, 1, 2] },\n { id: 'b', rows: [0, 1] },\n { id: 'c', rows: [0, 1] },\n] as const;\n\n/** Staggered bar widths, so the placeholder doesn't read as a grid. */\nconst TITLE_WIDTHS: [number, number, number] = [42, 56, 68];\nconst SUFFIX_WIDTHS: [number, number, number] = [24, 32, 38];\nconst titleWidth = (row: number) => TITLE_WIDTHS[row % 3 as 0 | 1 | 2];\nconst suffixWidth = (row: number) => SUFFIX_WIDTHS[row % 3 as 0 | 1 | 2];\n\ninterface FlatEntry {\n item: TCommandPaletteItem;\n group: TCommandPaletteGroup;\n groupIndex: number;\n itemIndex: number;\n}\n\n/** Arrow navigation runs over this flattened view, which is what makes it cross groups. */\nconst flatItems = computed<FlatEntry[]>(() => visibleGroups.value.flatMap((group, groupIndex) => group.items.map((item, itemIndex) => ({ item, group, groupIndex, itemIndex }))));\n\nconst isEmpty = computed(() => flatItems.value.length === 0);\n\nconst activeIndex = ref(-1);\nconst activeEntry = computed<FlatEntry | undefined>(() => flatItems.value[activeIndex.value]);\nconst activeDescendantId = computed(() => (activeEntry.value\n ? optionId(activeEntry.value.groupIndex, activeEntry.value.itemIndex)\n : undefined));\n\nconst isSelectable = (entry: FlatEntry | undefined) => Boolean(entry) && !entry!.item.disabled;\n\n/** First selectable index at or after `from`, walking `step`. Returns -1 when the list has none. */\nconst findSelectable = (from: number, step: number) => {\n const total = flatItems.value.length;\n if (total === 0) {\n return -1;\n }\n\n for (let offset = 0; offset < total; offset += 1) {\n const index = (((from + step * offset) % total) + total) % total;\n if (isSelectable(flatItems.value[index])) {\n return index;\n }\n }\n return -1;\n};\n\nconst scrollActiveIntoView = async () => {\n await nextTick();\n if (!activeDescendantId.value) {\n return;\n }\n listRef.value\n ?.querySelector(`[id=\"${activeDescendantId.value}\"]`)\n ?.scrollIntoView({ block: 'nearest' });\n};\n\nconst setActiveIndex = (index: number) => {\n if (index === activeIndex.value) {\n return;\n }\n // Pointer navigation follows the same rule as the arrow keys: a disabled row never becomes the\n // active descendant. Otherwise hovering one and pressing Enter swallows the keystroke silently.\n if (index !== -1 && !isSelectable(flatItems.value[index])) {\n return;\n }\n activeIndex.value = index;\n emit('highlight', activeEntry.value?.item, activeEntry.value?.group);\n void scrollActiveIntoView();\n};\n\nconst move = (step: number) => {\n const from = activeIndex.value === -1 ? (step > 0 ? 0 : flatItems.value.length - 1) : activeIndex.value + step;\n const next = findSelectable(from, step);\n if (next !== -1) {\n setActiveIndex(next);\n }\n};\n\nconst selectEntry = (entry: FlatEntry) => {\n if (entry.item.disabled) {\n return;\n }\n entry.item.onSelect?.();\n emit('select', entry.item, entry.group);\n if (!entry.group?.keepOpenOnSelect) {\n open.value = false;\n }\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n move(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n move(-1);\n break;\n case 'Home':\n event.preventDefault();\n setActiveIndex(findSelectable(0, 1));\n break;\n case 'End':\n event.preventDefault();\n setActiveIndex(findSelectable(flatItems.value.length - 1, -1));\n break;\n case 'Enter':\n if (activeEntry.value) {\n event.preventDefault();\n selectEntry(activeEntry.value);\n }\n break;\n // The native <dialog> also dismisses on Escape, but only for a trusted keypress.\n // Closing here too makes the contract the component's own rather than the UA's, and\n // both paths converge on `open = false` — `syncDialog` no-ops on an already-closed dialog.\n case 'Escape':\n open.value = false;\n break;\n default:\n break;\n }\n};\n\n/** Keeps the cursor on the first selectable row whenever the result set changes. */\nwatch(flatItems, () => {\n const next = findSelectable(0, 1);\n activeIndex.value = next;\n emit('highlight', activeEntry.value?.item, activeEntry.value?.group);\n void scrollActiveIntoView();\n});\n\n/** Drives the native dialog from `open`. Separate from the watcher so mount can reuse it. */\nconst syncDialog = async () => {\n const dialog = dialogRef.value;\n if (!dialog) {\n return;\n }\n\n if (open.value) {\n if (!dialog.open) {\n dialog.showModal();\n }\n await nextTick();\n if (shouldAutofocus.value) {\n inputRef.value?.focus();\n }\n void scrollActiveIntoView();\n } else if (dialog.open) {\n dialog.close();\n }\n};\n\nwatch(open, (isOpen) => {\n if (isOpen) {\n activeIndex.value = findSelectable(0, 1);\n }\n void syncDialog();\n}, { immediate: true });\n\n// The immediate watcher above runs before the template refs exist, so an\n// already-open palette needs `showModal()` once the dialog is in the DOM.\nonMounted(syncDialog);\n\n/** Native `close` covers `Esc` and form-method dismissal, which bypass the watcher. */\nconst onDialogClose = () => {\n open.value = false;\n};\n\n/** The backdrop is the dialog's own box; a click landing on it is a click outside the panel. */\nconst onDialogClick = (event: MouseEvent) => {\n if (event.target === dialogRef.value) {\n open.value = false;\n }\n};\n\n// Keycap legends, not prose — the physical keys read the same in every locale. Bound from\n// script rather than inlined so they don't trip the bare-string i18n rule.\nconst ESC_LEGEND = 'ESC';\nconst ENTER_GLYPH = '↵';\n\n/** Resets the query and hands focus back, so the palette stays usable from the keyboard. */\nconst onClear = () => {\n inputValue.value = '';\n commitSearchTerm('');\n inputRef.value?.focus();\n};\n\nconst iconName = (icon: HeroIcon) => `${theme.value.iconSet}:${icon}`;\nconst chipText = (chip: unknown) => (typeof chip === 'string' ? chip : undefined);\n</script>\n\n<template>\n <dialog\n ref=\"dialogRef\"\n v-bind=\"wrapperAttrs\"\n class=\"t-command-palette\"\n :data-loading=\"loading || undefined\"\n :data-empty=\"isEmpty && !loading || undefined\"\n @close=\"onDialogClose\"\n @click=\"onDialogClick\"\n >\n <div class=\"t-command-palette__panel\">\n <div class=\"t-command-palette__search\">\n <Icon :icon=\"iconName('magnifying-glass')\" class=\"t-command-palette__search-icon\" aria-hidden=\"true\" />\n\n <input\n :id=\"inputId\"\n ref=\"inputRef\"\n v-bind=\"controlAttrs\"\n class=\"t-command-palette__input\"\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n :aria-label=\"($attrs['aria-label'] as string) ?? placeholder ?? undefined\"\n :aria-expanded=\"open && !isEmpty\"\n :aria-controls=\"listboxId\"\n :aria-activedescendant=\"activeDescendantId\"\n :placeholder=\"placeholder\"\n :value=\"inputValue\"\n @input=\"onInput\"\n @keydown=\"onKeydown\"\n >\n\n <!--\n Always rendered, hidden with `visibility` rather than `v-if`: mounting it on the\n first keystroke took 34px off the input mid-type, which reflowed the field under\n the caret. `visibility: hidden` keeps the box but drops it from the a11y tree and\n the tab order, so an empty query still offers nothing to clear.\n -->\n <button\n type=\"button\"\n class=\"t-command-palette__clear\"\n :data-hidden=\"!inputValue || undefined\"\n :aria-label=\"clearLabel\"\n @click=\"onClear\"\n >\n <Icon :icon=\"iconName('x-mark')\" aria-hidden=\"true\" />\n </button>\n\n <kbd class=\"t-command-palette__esc\" aria-hidden=\"true\">{{ ESC_LEGEND }}</kbd>\n </div>\n\n <p v-if=\"loading\" role=\"status\" class=\"t-command-palette__status\">\n {{ loadingLabel }}\n </p>\n\n <div\n :id=\"listboxId\"\n ref=\"listRef\"\n class=\"t-command-palette__list\"\n :role=\"isEmpty ? undefined : 'listbox'\"\n :aria-labelledby=\"isEmpty ? undefined : inputId\"\n :aria-busy=\"loading || undefined\"\n >\n <!--\n Loading replaces the list rather than overlaying it: the rows that are coming\n are unknown, so a skeleton of the real row geometry is the honest placeholder.\n It is aria-hidden — `aria-busy` on the listbox is what assistive tech reads.\n -->\n <div v-if=\"loading\" class=\"t-command-palette__skeleton\" aria-hidden=\"true\">\n <div v-for=\"group in SKELETON_GROUPS\" :key=\"group.id\" class=\"t-command-palette__group\">\n <div class=\"t-command-palette__skeleton-label\" />\n <div v-for=\"row in group.rows\" :key=\"row\" class=\"t-command-palette__skeleton-row\">\n <span class=\"t-command-palette__skeleton-box\" />\n <span class=\"t-command-palette__skeleton-lines\">\n <span class=\"t-command-palette__skeleton-title\" :style=\"{ width: `${titleWidth(row)}%` }\" />\n <span class=\"t-command-palette__skeleton-suffix\" :style=\"{ width: `${suffixWidth(row)}%` }\" />\n </span>\n </div>\n </div>\n </div>\n\n <!--\n One element per run of groups. Unsectioned runs are `display: contents`, so the\n wrapper is invisible to both layout and the accessibility tree; a sectioned run\n becomes a real box a consumer can put one border or inset around.\n -->\n <div\n v-for=\"run in groupRuns\"\n :key=\"run.key\"\n class=\"t-command-palette__section\"\n :role=\"run.section ? 'group' : 'presentation'\"\n :data-section=\"run.section?.id\"\n :aria-labelledby=\"\n run.section && (run.section.label || $slots['section-label'])\n ? sectionLabelId(run.entries[0].index)\n : undefined\n \"\n >\n <div\n v-if=\"run.section && (run.section.label || $slots['section-label'])\"\n :id=\"sectionLabelId(run.entries[0].index)\"\n class=\"t-command-palette__section-label\"\n >\n <slot\n name=\"section-label\"\n :section=\"run.section\"\n :groups=\"run.entries.map((entry) => entry.group)\"\n >\n {{ run.section.label }}\n </slot>\n </div>\n\n <div\n v-for=\"{ group, index: groupIndex } in run.entries\"\n :key=\"group.id\"\n class=\"t-command-palette__group\"\n role=\"group\"\n :data-group=\"group.id\"\n :aria-labelledby=\"group.label || $slots['group-label'] ? groupLabelId(groupIndex) : undefined\"\n >\n <div\n v-if=\"group.label || $slots['group-label']\"\n :id=\"groupLabelId(groupIndex)\"\n class=\"t-command-palette__group-label\"\n >\n <slot name=\"group-label\" :group=\"group\" :index=\"groupIndex\">\n {{ group.label }}\n </slot>\n </div>\n\n <div\n v-for=\"(item, itemIndex) in group.items\"\n :id=\"optionId(groupIndex, itemIndex)\"\n :key=\"optionId(groupIndex, itemIndex)\"\n class=\"t-command-palette__item\"\n role=\"option\"\n :aria-label=\"item.label\"\n :aria-selected=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n :aria-disabled=\"item.disabled || undefined\"\n :data-highlighted=\"optionId(groupIndex, itemIndex) === activeDescendantId || undefined\"\n :data-active=\"item.active || undefined\"\n :data-disabled=\"item.disabled || undefined\"\n @click=\"selectEntry({ item, group, groupIndex, itemIndex })\"\n @pointermove=\"setActiveIndex(\n flatItems.findIndex((entry) => entry.groupIndex === groupIndex && entry.itemIndex === itemIndex)\n )\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >\n <span\n class=\"t-command-palette__item-leading\"\n :data-icon-variant=\"item.iconVariant ?? 'tile'\"\n >\n <slot\n name=\"item-leading\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >\n <Icon v-if=\"item.icon\" :icon=\"iconName(item.icon)\" aria-hidden=\"true\" />\n </slot>\n </span>\n\n <span class=\"t-command-palette__item-label\">\n <slot\n name=\"item-label\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >\n <span class=\"t-command-palette__item-title\">\n <span v-if=\"item.prefix\" class=\"t-command-palette__item-prefix\">{{ item.prefix }}</span>\n <span class=\"t-command-palette__item-text\">\n <slot\n name=\"item-text\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >{{ item.label }}</slot>\n </span>\n </span>\n <span\n v-if=\"item.suffix || $slots['item-suffix']\"\n class=\"t-command-palette__item-suffix\"\n >\n <slot\n name=\"item-suffix\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >{{ item.suffix }}</slot>\n </span>\n </slot>\n </span>\n\n <span class=\"t-command-palette__item-trailing\">\n <slot\n name=\"item-trailing\"\n :item=\"item\"\n :group=\"group\"\n :active=\"optionId(groupIndex, itemIndex) === activeDescendantId\"\n >\n <span v-if=\"chipText(item.chip)\" class=\"t-command-palette__item-chip\">\n {{ chipText(item.chip) }}\n </span>\n <kbd v-for=\"kbd in item.kbds\" :key=\"kbd\" class=\"t-command-palette__item-kbd\">{{ kbd }}</kbd>\n <span\n v-if=\"optionId(groupIndex, itemIndex) === activeDescendantId && !item.kbds?.length\"\n class=\"t-command-palette__item-enter\"\n aria-hidden=\"true\"\n >{{ ENTER_GLYPH }}</span>\n </slot>\n </span>\n </slot>\n </div>\n </div>\n </div>\n\n <div v-if=\"isEmpty && !loading\" class=\"t-command-palette__empty\">\n <slot name=\"empty\" :search-term=\"searchTerm\" />\n </div>\n </div>\n\n <div v-if=\"$slots.footer\" class=\"t-command-palette__footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </dialog>\n</template>\n\n<style scoped lang=\"scss\">\n/*\n * Spacing geometry is transcribed from the Global Search design prototype. Values the\n * scale can express use the token (`--gap-item` is 12px, `--gap-unit` 4px, `--inset-item`\n * 8px); the rest stay literal px because the scale steps 4/8/12/16/24 and the design uses\n * 2/6/7/10/14/18. See `.agents/decisions/012-design-geometry-literals.md`.\n *\n * Colour, radius, shadow and type resolve through tokens regardless of what the prototype\n * says — its greys are framework defaults and the token layer was synced from Figma, so\n * matching its literals would mean opting out of tenant theming. Type therefore lands\n * within 1px of the design, and its #8d8d8d secondary text failed WCAG AA outright.\n */\n.t-command-palette {\n /*\n * Padded boxes here are sized by their border box. Without this, a row's `width: 100%`\n * plus its 36px of inset overflows the list and produces a horizontal scrollbar.\n */\n &,\n & :deep(*) {\n box-sizing: border-box;\n }\n\n /* Anchored near the top rather than centered — a palette is reached for, not read. */\n width: min(640px, 92vw);\n max-width: none;\n max-height: 70vh;\n margin: 12vh auto auto;\n padding: 0;\n border: none;\n border-radius: var(--radius-overlay);\n background: var(--neutral-base);\n box-shadow: var(--shadow-dialog-default);\n overflow: hidden;\n\n /*\n * The dialog is never unmounted — `showModal()` / `close()` toggle it — so ADR 008\n * puts the enter/exit animation in CSS. `allow-discrete` + `@starting-style` are what\n * let `display` and the top layer participate, which is the part a JS library would\n * otherwise be needed for.\n */\n opacity: var(--opacity-0);\n translate: 0 calc(-1 * var(--space-8));\n transition:\n opacity var(--motion-exit-duration) var(--motion-exit-easing),\n translate var(--motion-exit-duration) var(--motion-exit-easing),\n display var(--motion-exit-duration) allow-discrete,\n overlay var(--motion-exit-duration) allow-discrete;\n\n &[open] {\n opacity: var(--opacity-100);\n translate: 0 0;\n transition:\n opacity var(--motion-enter-duration) var(--motion-enter-easing),\n translate var(--motion-enter-duration) var(--motion-enter-easing),\n display var(--motion-enter-duration) allow-discrete,\n overlay var(--motion-enter-duration) allow-discrete;\n\n @starting-style {\n opacity: var(--opacity-0);\n translate: 0 calc(-1 * var(--space-8));\n }\n }\n\n &::backdrop {\n background: var(--color-base-black);\n backdrop-filter: blur(4px);\n opacity: var(--opacity-0);\n transition:\n opacity var(--motion-exit-duration) var(--motion-exit-easing),\n display var(--motion-exit-duration) allow-discrete,\n overlay var(--motion-exit-duration) allow-discrete;\n }\n\n &[open]::backdrop {\n opacity: var(--opacity-50);\n transition:\n opacity var(--motion-enter-duration) var(--motion-enter-easing),\n display var(--motion-enter-duration) allow-discrete,\n overlay var(--motion-enter-duration) allow-discrete;\n\n @starting-style {\n opacity: var(--opacity-0);\n }\n }\n\n &__status {\n position: absolute;\n overflow: hidden;\n clip-path: inset(50%);\n width: 1px;\n height: 1px;\n white-space: nowrap;\n }\n\n &__panel {\n display: flex;\n flex-direction: column;\n max-height: 70vh;\n }\n\n /*\n * Secondary text uses `--neutral-text`, not `--neutral-solid`. The design's #8d8d8d\n * is ~2.9:1 on the panel and fails WCAG AA for body text; the axe gate on these\n * stories catches it. `solid` is the token role for fills, `text` for type.\n */\n &__search {\n display: flex;\n align-items: center;\n gap: var(--gap-item);\n padding: 14px 18px;\n border-bottom: var(--border-width-1) solid var(--neutral-line);\n }\n\n &__search-icon {\n flex-shrink: 0;\n width: 18px;\n height: 18px;\n color: var(--neutral-text);\n }\n\n &__input {\n flex: 1;\n min-width: 0;\n padding: 0;\n border: none;\n outline: none;\n background: transparent;\n font-family: var(--font-family-base);\n font-size: var(--font-b2-font-size);\n\n // 24px against a 16px font. An input clips to its line box, so the 18px that pairs with b4 cuts\n // the descenders off `j`, `g` and `y` in anything the user types.\n line-height: var(--line-height-24);\n color: var(--neutral-text-contrast);\n\n &::placeholder {\n color: var(--neutral-text);\n }\n }\n\n &__clear {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n border: none;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n font-size: var(--font-b4-font-size);\n color: var(--neutral-text);\n cursor: pointer;\n outline: var(--focus-ring-width) solid transparent;\n outline-offset: var(--focus-ring-offset);\n opacity: var(--opacity-100);\n scale: 1;\n transition:\n background-color var(--motion-control-duration) var(--motion-control-easing),\n color var(--motion-control-duration) var(--motion-control-easing),\n outline-color var(--motion-control-duration) var(--motion-control-easing),\n opacity var(--motion-control-duration) var(--motion-control-easing),\n scale var(--motion-control-duration) var(--motion-control-easing),\n visibility var(--motion-control-duration) allow-discrete;\n\n &:hover {\n background: var(--neutral-bg-active);\n color: var(--neutral-text-contrast);\n }\n\n &:focus-visible {\n outline-color: var(--primary-border);\n }\n\n &[data-hidden] {\n visibility: hidden;\n opacity: var(--opacity-0);\n scale: 0.8;\n }\n }\n\n &__esc {\n flex-shrink: 0;\n padding: 2px 7px;\n border-radius: var(--radius-4);\n background: var(--neutral-bg-subtle);\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text);\n }\n\n &__list {\n flex: 1;\n overflow: hidden auto;\n padding: var(--inset-item) 0;\n scroll-padding: var(--inset-item);\n }\n\n /*\n * A run with no section generates no box: `display: contents` keeps the wrapper out of\n * layout, so unsectioned groups lay out exactly as if it were not there. The element\n * still exists in the DOM; `role=\"presentation\"` is what keeps it out of the a11y tree.\n * A sectioned run becomes a real box, which is the point — one border or inset can\n * then wrap the whole run instead of being repeated per group and breaking up.\n */\n &__section {\n display: contents;\n\n &[data-section] {\n display: block;\n }\n }\n\n &__section-label {\n padding: 10px 18px 4px;\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-bold);\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--neutral-text);\n }\n\n &__group {\n /*\n * `padding-block`, not the `padding` shorthand: the shorthand would also set\n * padding-inline to 0, and a scoped rule out-specifies a consumer's plain\n * `[data-group=...]` selector — which would make that hook unusable for indenting\n * a group. ADR 011 only means something if consumers can actually reach it.\n */\n padding-block: 6px;\n }\n\n /*\n * The skeleton reuses the real row metrics — 32px box, 12px gap, 10px/18px inset — so\n * results land exactly where the placeholder sat and the list doesn't jump on resolve.\n */\n &__skeleton-label {\n width: 70px;\n height: 8px;\n margin: 6px 18px;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n }\n\n &__skeleton-row {\n display: flex;\n align-items: center;\n gap: var(--gap-item);\n padding: 10px 18px;\n }\n\n &__skeleton-box {\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n border-radius: var(--radius-control);\n background: var(--neutral-bg);\n }\n\n &__skeleton-lines {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 6px;\n min-width: 0;\n }\n\n &__skeleton-title,\n &__skeleton-suffix {\n height: 8px;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n }\n\n &__skeleton-suffix {\n height: 7px;\n }\n\n /* ADR 008 keeps a looping shimmer in CSS: nothing unmounts and there is no physics. */\n &__skeleton {\n animation: t-command-palette-pulse var(--motion-loading-duration) var(--motion-easing-standard) infinite;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n\n &__group-label {\n padding: 6px 18px;\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-bold);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--neutral-text);\n }\n\n &__item {\n display: flex;\n align-items: center;\n gap: var(--gap-item);\n padding: 10px 18px;\n cursor: pointer;\n font-family: var(--font-family-base);\n color: var(--neutral-text-contrast);\n text-align: left;\n transition: background-color var(--motion-control-duration) var(--motion-control-easing);\n\n /*\n * Highlight follows `aria-activedescendant`, never focus — the input keeps it.\n * On the Radix ramp this row is the *selected* UI element, not a hovered one\n * (`aria-selected=\"true\"`, and pointer hover moves the same cursor), so it takes\n * step 5. `--neutral-bg-subtle` (step 2) was a subtle *background*, never a\n * component surface, which is why it read as no highlight at all.\n *\n * The band stays neutral, as the design has it — step 5 is the selected-surface step\n * on the same ramp, so this is a step change, not a hue change. Neutral cannot be\n * pushed past it either: the token file is explicit that step 7 \"is a BORDER, not a\n * fill\".\n *\n * Step 11 is specified as low-contrast text for steps 1-3, so on a step-5 surface\n * the muted line moves to step 12 — measured, step 11 is 4.48:1 there and fails AA.\n * The title/subtitle hierarchy is carried by size and weight, not colour alone.\n */\n &[data-highlighted] {\n background: var(--neutral-bg-active);\n }\n\n /* The item's own `active` flag tints the title, which inherits this colour. */\n &[data-active] {\n color: var(--primary-text);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: var(--opacity-disabled);\n }\n }\n\n &__item-leading {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: var(--radius-control);\n background: var(--neutral-bg);\n font-size: var(--font-b2-font-size);\n color: var(--neutral-text);\n scale: 1;\n transition:\n scale var(--motion-control-duration) var(--motion-easing-decelerated),\n background-color var(--motion-control-duration) var(--motion-control-easing);\n\n /* A record: the icon carries the meaning, the box would only add noise. */\n &[data-icon-variant='plain'] {\n border-radius: var(--radius-0);\n background: transparent;\n font-size: var(--font-b0-font-size);\n }\n\n /* A command rather than a record, so it reads as an affordance. */\n &[data-icon-variant='accent'] {\n background: var(--primary-bg);\n font-size: var(--font-b1-font-size);\n color: var(--primary-text);\n }\n }\n\n &__item[data-highlighted] &__item-leading {\n scale: 1.06;\n }\n\n &__item-label {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n }\n\n &__item-title {\n display: flex;\n align-items: baseline;\n gap: var(--gap-unit);\n min-width: 0;\n font-size: var(--font-b3-font-size);\n line-height: var(--line-height-16);\n font-weight: var(--font-weight-semibold);\n color: inherit;\n }\n\n /*\n * Both lines clip for the ellipsis, and their line boxes (16px and 14px) are shorter than\n * the font's descenders: `g`, `j` and `p` lost their tails. The padding gives the glyphs\n * room inside the clip and the negative margin hands it back, so no row moves.\n */\n &__item-text,\n &__item-suffix {\n padding-block: 2px;\n margin-block: -2px;\n }\n\n &__item-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__item-prefix {\n flex-shrink: 0;\n color: var(--neutral-text);\n }\n\n &__item-suffix {\n overflow: hidden;\n font-size: var(--font-b4-font-size);\n line-height: var(--line-height-14);\n color: var(--neutral-text);\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /*\n * Step 11 is specified as low-contrast text for steps 1-3; on the step-5 selection band\n * it measures 4.48:1 and fails AA, so the muted line steps up to 12 there. Written as\n * `&[state] &__child` per ADR 011 rather than threading a class binding through.\n */\n &__item[data-highlighted] &__item-prefix,\n &__item[data-highlighted] &__item-suffix {\n color: var(--neutral-text-contrast);\n }\n\n &__item-trailing {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n gap: var(--gap-unit);\n }\n\n &__item-chip {\n padding: 2px 7px;\n border-radius: var(--radius-4);\n background: var(--neutral-bg-subtle);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text);\n }\n\n &__item-kbd {\n padding: 2px 7px;\n border-radius: var(--radius-4);\n background: var(--neutral-bg-subtle);\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text);\n }\n\n &__item-enter {\n animation: t-command-palette-hint-in var(--motion-control-duration) var(--motion-easing-decelerated);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text);\n }\n\n &__empty {\n padding: 40px 24px;\n font-family: var(--font-family-base);\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n color: var(--neutral-text);\n text-align: center;\n }\n\n &__footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 18px;\n border-top: var(--border-width-1) solid var(--neutral-line);\n background: var(--neutral-bg-subtle);\n font-family: var(--font-family-base);\n font-size: var(--font-b5-font-size);\n line-height: var(--line-height-12);\n color: var(--neutral-text);\n }\n\n /*\n * Last in the block on purpose: a media query adds no specificity, so these\n * overrides only win the cascade by coming after the rules they switch off.\n */\n @media (prefers-reduced-motion: reduce) {\n &,\n &[open],\n &::backdrop,\n &[open]::backdrop {\n transition-duration: var(--motion-duration-instant);\n }\n\n &,\n &[open] {\n translate: 0 0;\n }\n\n /* The micro-interactions are decoration; state still reads from colour and layout. */\n &__clear,\n &__item-leading {\n transition-duration: var(--motion-duration-instant);\n }\n\n &__item[data-highlighted] &__item-leading {\n scale: 1;\n }\n\n &__item-enter {\n animation: none;\n }\n }\n\n}\n\n@keyframes t-command-palette-hint-in {\n from {\n opacity: var(--opacity-0);\n translate: 4px 0;\n }\n}\n\n@keyframes t-command-palette-pulse {\n 50% {\n opacity: var(--opacity-50);\n }\n}\n</style>\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, & > *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n },\n opacity: 0,\n borderRadius: '10px',\n overflow: 'hidden',\n border: `1px solid ${theme.value.colors.gray.light3}`,\n background: '#fff',\n boxShadow: '4px 4px 30px 0px rgba(0, 0, 0, 0.10)',\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n transition: 'opacity 0.3s ease-in-out',\n '&--non-blocking': {\n zIndex: 50,\n },\n '&--small': {\n width: '22.5rem',\n },\n '&--medium': {\n width: '35rem',\n },\n '&--large': {\n width: '40rem',\n },\n '&--extra-large': {\n width: '56rem',\n },\n '&--active': {\n opacity: 1,\n },\n '&:focus': {\n outline: 'none',\n },\n '&::backdrop': {\n background: 'rgba(226, 226, 226, 0.80)',\n transition: 'all 0.3s ease-in-out',\n },\n '> *': {\n width: '100%',\n paddingInline: '2.5rem',\n },\n '&__header': {\n paddingBlock: '1rem',\n background: '#fff',\n },\n '&__close-button': {\n cursor: 'pointer',\n border: 'none',\n background: 'transparent',\n },\n '&--featured > &__header': {\n background: theme.value.colors.gray.light3,\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n '&__body': {\n paddingTop: '1.5rem',\n paddingBottom: '1.5rem',\n background: '#fff',\n overflow: 'auto',\n },\n '&__footer': {\n paddingTop: '1rem',\n paddingBottom: '1.5rem',\n background: '#fff',\n display: 'flex',\n justifyContent: 'flex-end',\n gap: '1rem',\n },\n '&__backdrop': {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: 'rgba(226, 226, 226, 0.80)',\n zIndex: 45,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TModalProps } from './TModal.types';\nimport { merge } from 'es-toolkit/compat';\nimport {\n computed,\n defineComponent,\n onMounted,\n onUnmounted,\n ref,\n watch,\n} from 'vue';\nimport { TIcon } from '../TIcon';\nimport { useStyles } from './TModal.styles';\n\nconst defaultProps = {\n size: 'medium',\n};\n\nexport const TModal = defineComponent({\n name: 'TModal',\n props: {\n open: Boolean as PropType<TModalProps['open']>,\n featured: Boolean as PropType<TModalProps['featured']>,\n size: String as PropType<TModalProps['size']>,\n destroyOnClose: Boolean as PropType<TModalProps['destroyOnClose']>,\n nonBlocking: Boolean as PropType<TModalProps['nonBlocking']>,\n },\n emits: ['close', 'cancel'],\n setup(_props, { slots, attrs, emit, expose }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const isActive = ref(props.value.open);\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n {\n [`${baseClass.value}--featured`]: props.value.featured,\n [`${baseClass.value}--active`]: isActive.value,\n [`${baseClass.value}--non-blocking`]: props.value.nonBlocking,\n },\n ]);\n\n const modal = ref<HTMLDialogElement | null>(null);\n const showModal = () => {\n isActive.value = true;\n if (props.value.nonBlocking) {\n modal.value?.show();\n } else {\n modal.value?.showModal();\n }\n };\n const close = () => {\n isActive.value = false;\n modal.value?.close();\n };\n watch(\n [() => props.value.open, modal],\n () => {\n if (modal.value && props.value.open) {\n showModal();\n } else {\n close();\n }\n },\n {\n immediate: true,\n },\n );\n\n const handleCancel = (event: Event) => {\n if (props.value.open) {\n event.preventDefault();\n } else {\n isActive.value = false;\n }\n emit('cancel');\n };\n onMounted(() => {\n if (modal.value) {\n modal.value.addEventListener('cancel', handleCancel);\n }\n });\n onUnmounted(() => {\n if (modal.value) {\n modal.value.removeEventListener('cancel', handleCancel);\n }\n });\n\n const handleClose = () => {\n if (!props.value.open) {\n close();\n }\n emit('close');\n };\n\n const handleClickOutside = (event: Event) => {\n if (event.target === modal.value) {\n if (!props.value.open) {\n close();\n }\n emit('close');\n }\n };\n\n expose({\n showModal,\n close,\n });\n\n const trigger = ref(0);\n watch(isActive, () => {\n if (!isActive.value && props.value.destroyOnClose) {\n trigger.value += 1;\n }\n });\n\n const ModalComponent = () => (\n <dialog\n ref={modal}\n class={classes.value}\n aria-labelledby=\"modal-header\"\n aria-describedby=\"modal-body\"\n aria-modal=\"true\"\n onClick={handleClickOutside}\n key={trigger.value}\n >\n {slots.header && (\n <div id=\"modal-header\" class={`${baseClass.value}__header`}>\n {slots.header()}\n {props.value.featured && (\n <button\n class={`${baseClass.value}__close-button`}\n onClick={handleClose}\n aria-label=\"Close\"\n >\n <TIcon icon=\"x-mark\" />\n </button>\n )}\n </div>\n )}\n {(slots.body || slots.default) && (\n <div id=\"modal-body\" class={`${baseClass.value}__body`}>\n {(slots.body ?? slots.default)?.()}\n </div>\n )}\n {slots.footer && (\n <div class={`${baseClass.value}__footer`}>{slots.footer()}</div>\n )}\n </dialog>\n );\n\n if (props.value.nonBlocking) {\n return () => (\n <div>\n {props.value.nonBlocking && isActive.value && (\n <div class={`${baseClass.value}__backdrop`} />\n )}\n <ModalComponent />\n </div>\n );\n }\n return () => <ModalComponent />;\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = (color: string) => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color,\n fontFamily: theme.value.typography.fontFamily,\n '&--h1': {\n fontSize: '3.25rem',\n linehHeight: '3.75rem',\n },\n '&--h2': {\n fontSize: '3rem',\n lineHeight: '3.5rem',\n },\n '&--h3': {\n fontSize: '2.5rem',\n lineHeight: '3rem',\n },\n '&--h4': {\n fontSize: '2rem',\n lineHeight: '2.5rem',\n },\n '&--s1': {\n fontSize: '1.75rem',\n lineHeight: '2.25rem',\n },\n '&--s2': {\n fontSize: '1.5rem',\n lineHeight: '2rem',\n },\n '&--s3': {\n fontSize: '1.125rem',\n lineHeight: '1.625rem',\n },\n '&--s4': {\n fontSize: '1rem',\n lineHeight: '1.5rem',\n },\n '&--b0': {\n fontSize: '1.25rem',\n lineHeight: '1.625rem',\n },\n '&--b1': {\n fontSize: '1.125rem',\n lineHeight: '1.5rem',\n },\n '&--b2': {\n fontSize: '1rem',\n lineHeight: '1.375rem',\n },\n '&--b3': {\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n },\n '&--b4': {\n fontSize: '0.75rem',\n lineHeight: '1.125rem',\n },\n '&--b5': {\n fontSize: '0.625rem',\n lineHeight: '1rem',\n },\n '&--b6': {\n fontSize: '0.5rem',\n lineHeight: '0.875rem',\n },\n '&--bold': {\n fontWeight: theme.value.typography.fontWeight.bold,\n },\n\n '&--semibold': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n },\n '&--medium': {\n fontWeight: theme.value.typography.fontWeight.medium,\n },\n\n '&--regular': {\n fontWeight: theme.value.typography.fontWeight.regular,\n },\n '&--normal': {\n fontStyle: 'normal',\n },\n '&--italic': {\n fontStyle: 'italic',\n },\n }));\n\n return baseClass;\n};\n","export const defaultMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n s1: 'h5',\n s2: 'h5',\n s3: 'h6',\n s4: 'h6',\n b0: 'p',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n b4: 'p',\n b5: 'p',\n b6: 'p',\n};\n","import type { VNode } from 'vue';\nimport { h, Text } from 'vue';\n\nconst ALLOWED_SCHEMES = ['http:', 'https:', 'mailto:', 'tel:', 'ftp:'] as const;\n\nconst isValidUrlScheme = (url: string): boolean => ALLOWED_SCHEMES.some((scheme) => url\n .trim()\n .toLowerCase()\n .startsWith(scheme));\n\ninterface MarkdownMatch {\n start: number;\n end: number;\n tag: string;\n content: string;\n url?: string;\n}\n\nconst findAllMatches = (text: string): MarkdownMatch[] => {\n const patterns: { regex: RegExp; tag: string; isLink?: boolean }[] = [\n { regex: /\\*\\*([\\s\\S]+?)\\*\\*/g, tag: 'strong' },\n { regex: /~~([\\s\\S]+?)~~/g, tag: 's' },\n { regex: /\\[([^\\]]+)\\]\\(([^)]+)\\)/g, tag: 'a', isLink: true },\n ];\n\n const matches: MarkdownMatch[] = [];\n\n for (const { regex, tag, isLink } of patterns) {\n for (const match of text.matchAll(regex)) {\n matches.push({\n start: match.index ?? 0,\n end: (match.index ?? 0) + match[0].length,\n tag,\n content: match[1],\n url: isLink ? match[2]?.trim() : undefined,\n });\n }\n }\n\n return matches;\n};\n\nconst filterNonOverlapping = (matches: MarkdownMatch[]): MarkdownMatch[] => {\n const sorted = [...matches].sort((a, b) => a.start - b.start || b.end - a.end);\n const result: MarkdownMatch[] = [];\n let lastEnd = 0;\n\n for (const match of sorted) {\n if (match.start >= lastEnd) {\n result.push(match);\n lastEnd = match.end;\n }\n }\n\n return result;\n};\n\nconst parseMarkdownString = (text: string): (string | VNode)[] => {\n if (!text) {\n return [text];\n }\n\n const allMatches = findAllMatches(text);\n if (allMatches.length === 0) {\n return [text];\n }\n\n const matches = filterNonOverlapping(allMatches);\n const result: (string | VNode)[] = [];\n let pos = 0;\n\n for (const match of matches) {\n if (match.start > pos) {\n result.push(text.substring(pos, match.start));\n }\n\n const parsedContent = parseMarkdownString(match.content);\n\n if (match.tag === 'a') {\n if (match.url && isValidUrlScheme(match.url)) {\n result.push(h('a', { href: match.url, target: '_blank', rel: 'noopener noreferrer' }, parsedContent));\n } else {\n result.push(...parsedContent);\n }\n } else {\n result.push(h(match.tag, parsedContent));\n }\n\n pos = match.end;\n }\n\n if (pos < text.length) {\n result.push(text.substring(pos));\n }\n\n return result.length > 0 ? result : [text];\n};\n\nconst isVNodeLike = (value: unknown): value is VNode => value !== null\n && typeof value === 'object'\n && 'type' in value\n && (value as any).type !== undefined;\n\nconst parseMarkdownInVNode = (node: VNode): VNode | (string | VNode)[] => {\n if (node.type === Text) {\n const text = typeof node.children === 'string' ? node.children : '';\n return parseMarkdownString(text);\n }\n\n if (!node.children) {\n return node;\n }\n\n let processedChildren: (string | VNode)[];\n\n if (Array.isArray(node.children)) {\n processedChildren = node.children.flatMap((child) => {\n if (typeof child === 'string') {\n return parseMarkdownString(child);\n }\n if (isVNodeLike(child)) {\n const result = parseMarkdownInVNode(child);\n return Array.isArray(result) ? result : [result];\n }\n return [];\n });\n } else if (typeof node.children === 'string') {\n processedChildren = parseMarkdownString(node.children);\n } else if (isVNodeLike(node.children)) {\n const result = parseMarkdownInVNode(node.children);\n processedChildren = Array.isArray(result) ? result : [result];\n } else {\n return node;\n }\n\n return h(node.type as any, { ...node.props }, processedChildren);\n};\n\nexport const parseAllMarkdown = (content: string | VNode | (string | VNode)[]): (string | VNode)[] => {\n if (typeof content === 'string') {\n return parseMarkdownString(content);\n }\n\n if (Array.isArray(content)) {\n return content.flatMap((item) => {\n if (typeof item === 'string') {\n return parseMarkdownString(item);\n }\n if (isVNodeLike(item)) {\n const result = parseMarkdownInVNode(item);\n return Array.isArray(result) ? result : [result];\n }\n return [item];\n });\n }\n\n if (isVNodeLike(content)) {\n const result = parseMarkdownInVNode(content);\n return Array.isArray(result) ? result : [result];\n }\n\n return [content];\n};\n","import type { PropType } from 'vue';\nimport type { TTypographyProps } from './TTypography.types';\nimport { get, merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, h } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TTypography.styles';\nimport { defaultMapping } from './TTypography.utils';\nimport { parseAllMarkdown } from './utils/markdown/parseAllMarkdown';\n\nconst defaultProps = {\n fontStyle: 'normal',\n fontWeight: 'regular',\n variant: 'b0',\n color: '#373737',\n};\n\nexport const TTypography = defineComponent({\n name: 'TTypography',\n props: {\n fontStyle: String as PropType<TTypographyProps['fontStyle']>,\n fontWeight: String as PropType<TTypographyProps['fontWeight']>,\n variant: String as PropType<TTypographyProps['variant']>,\n as: String as PropType<TTypographyProps['as']>,\n color: String as PropType<TTypographyProps['color']>,\n // `default: undefined` keeps the three states apart: a declared Boolean prop would arrive as\n // `false` when omitted and silence the theme for every consumer that never passes it.\n parseMarkdown: { type: Boolean as PropType<TTypographyProps['parseMarkdown']>, default: undefined },\n },\n setup(_props, { attrs, slots }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const theme = useTheme();\n const color = computed(() => (get(theme.value.colors, props.value.color) as string)\n || theme.value.typography.color);\n const baseClass = useStyles(color.value);\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.fontWeight}`,\n `${baseClass.value}--${props.value.fontStyle}`,\n ]);\n\n const tag = computed(() => props.value.as || defaultMapping[props.value.variant]);\n\n // `??`, not `||`: an explicit `false` has to win over a theme that turns markdown on, which is\n // the whole point of the prop — content that is data, not copy, must never be parsed.\n const parseMarkdown = computed(() => props.value.parseMarkdown ?? theme.value.parseMarkdown);\n\n return () => {\n const slotContent = slots.default?.();\n if (!slotContent) {\n return h(tag.value, { class: classes.value });\n }\n\n if (!parseMarkdown.value) {\n return h(tag.value, { class: classes.value }, slotContent);\n }\n\n const processedContent = parseAllMarkdown(slotContent);\n return h(tag.value, { class: classes.value }, processedContent);\n };\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\n\nexport const useStyles = () => {\n const baseClass = computed(() => css({\n '& > [class$=\"__body\"]': {\n paddingBlock: 0,\n },\n '&__body': {\n display: 'flex',\n alignItems: 'center',\n gap: '2.5rem',\n },\n '&__body-text': {\n flex: 1,\n },\n '&__body-icon': {\n aspectRatio: '1 / 1',\n width: '3.5rem',\n height: 'auto',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TDialogProps } from './TDialog.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, h } from 'vue';\nimport { toCamelCase } from '../../utils';\nimport { TButton } from '../TButton';\nimport { TIcon } from '../TIcon';\nimport { TModal } from '../TModal';\nimport { TTypography } from '../TTypography';\nimport { useStyles } from './TDialog.styles';\n\nconst defaultProps = {\n cancelText: 'Cancel',\n confirmText: 'OK',\n};\n\nexport const TDialog = defineComponent({\n name: 'TDialog',\n components: {\n TTypography,\n TModal,\n TButton,\n TIcon,\n },\n props: {\n title: {\n type: String as PropType<TDialogProps['title']>,\n required: true,\n },\n message: {\n type: String as PropType<TDialogProps['message']>,\n required: true,\n },\n color: String as PropType<TDialogProps['color']>,\n icon: String as PropType<TDialogProps['icon']>,\n cancellable: Boolean as PropType<TDialogProps['cancellable']>,\n cancelText: String as PropType<TDialogProps['cancelText']>,\n confirmText: String as PropType<TDialogProps['confirmText']>,\n size: String as PropType<TDialogProps['size']>,\n },\n emits: ['confirm', 'cancel', 'close'],\n setup(_props, { emit }) {\n const props = computed(() => merge({}, defaultProps, _props));\n\n const baseClass = useStyles();\n\n const iconColor = computed(() => {\n if (props.value.color) {\n return props.value.color === 'primary'\n ? 'primary.main'\n : toCamelCase(props.value.color);\n }\n return undefined;\n });\n\n return () => h(\n TModal,\n {\n onClose: () => props.value.cancellable && emit('close'),\n onCancel: () => props.value.cancellable && emit('cancel'),\n onConfirm: () => emit('confirm'),\n class: baseClass.value,\n open: true,\n size: props.value.size,\n },\n {\n header: () => h(\n TTypography,\n { variant: 's2', fontWeight: 'semibold' },\n () => props.value.title,\n ),\n default: () => h('div', { class: `${baseClass.value}__body` }, [\n props.value.icon\n ? h(TIcon, {\n class: `${baseClass.value}__body-icon`,\n variant: 'solid',\n color: iconColor.value,\n icon: props.value.icon,\n })\n : undefined,\n h(TTypography, {\n class: `${baseClass.value}__body-text`,\n variant: 'b1',\n innerHTML: props.value.message,\n }),\n ]),\n footer: () => [\n props.value.cancellable\n ? h(\n TButton,\n {\n onClick: () => emit('cancel'),\n color: props.value.color,\n variant: 'secondary',\n },\n () => props.value.cancelText,\n )\n : undefined,\n h(\n TButton,\n {\n onClick: () => emit('confirm'),\n color: props.value.color,\n },\n () => props.value.confirmText,\n ),\n ],\n },\n );\n },\n});\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Reason emitted with the `'error'` event when an uploaded file fails internal\n * validation against the `accept` extension list or `maxSizeBytes` size cap.\n *\n * - `'bad-format'`: the file's extension is not in the `accept` list.\n * - `'too-large'`: the file's size exceeds `maxSizeBytes`.\n */\nexport type TFileUploadErrorReason = 'bad-format' | 'too-large';\n\n/**\n * Props for the `TFileUpload` component.\n *\n * `TFileUpload` is a single-file upload control with three visual states\n * (empty / loading / loaded) and built-in validation against an allow-list of\n * extensions and an optional maximum size in bytes. The selected `File` (or\n * `null`) is exposed via `v-model`; validation failures emit `'error'`\n * **instead of** updating the model.\n *\n * All user-facing strings are passed in as props so the consumer owns i18n;\n * the component does not import a translation function.\n */\nexport interface TFileUploadProps {\n /**\n * Label shown above the upload box (e.g. `\"Adjuntar archivo\"`).\n * When omitted, the label slot/element is not rendered.\n */\n label?: string;\n /**\n * Call-to-action text rendered inside the box while no file is attached\n * (e.g. `\"Subir archivo\"`).\n * @defaultValue 'Subir archivo'\n */\n ctaText?: string;\n /**\n * Text rendered inside the box while `loading` is `true`\n * (e.g. `\"Cargando archivo\"`).\n * @defaultValue 'Cargando archivo'\n */\n loadingText?: string;\n /**\n * Accessible label for the remove button shown in the loaded state.\n * @defaultValue 'Quitar archivo'\n */\n removeLabel?: string;\n /**\n * Hint displayed beneath the box (bottom-left) listing accepted formats.\n * Hidden in the loaded state.\n */\n formatsHint?: string;\n /**\n * Hint displayed beneath the box (bottom-right) describing the size limit.\n * Hidden in the loaded state.\n */\n maxSizeHint?: string;\n /**\n * Accepted file extensions without the leading dot (e.g. `['csv', 'pdf']`).\n * Used to build the native `accept` attribute and to validate the selected\n * file. When omitted, no extension validation runs.\n */\n accept?: string[];\n /**\n * Maximum file size in bytes. Files larger than this emit\n * `'error'` with reason `'too-large'` and the model is not updated.\n * When omitted, no size validation runs.\n */\n maxSizeBytes?: number;\n /**\n * Controlled loading flag. When `true` the box renders the loading visual\n * and the underlying `<input type=\"file\">` is disabled so the user cannot\n * pick another file mid-upload.\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * Optional id forwarded to the underlying `<input type=\"file\">`. When\n * omitted a stable auto-generated id is used.\n */\n id?: string;\n /**\n * Form field name forwarded to the underlying `<input type=\"file\">`.\n * Required for native form submission (the file is sent under this key).\n */\n name?: string;\n /**\n * Marks the input as required for native HTML5 form validation.\n * @defaultValue false\n */\n required?: boolean;\n /**\n * Disables the picker. The native `<input>` is disabled and the box\n * renders in a non-interactive visual state.\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * `id` of the `<form>` this input belongs to. Use when the component\n * lives outside the target form in the DOM.\n */\n form?: string;\n /**\n * Element the outer wrapper renders as. Useful for semantic nesting\n * (e.g. `'li'` inside a `<ul>`).\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\n/**\n * Events emitted by `TFileUpload`.\n */\nexport interface TFileUploadEmits {\n /**\n * Fired when the selected file fails internal validation. The model is\n * **not** updated in this case — consumers can surface the reason as they\n * wish.\n */\n error: [reason: TFileUploadErrorReason];\n}\n\n/**\n * Slots exposed by `TFileUpload`. Each slot defaults to rendering its\n * matching text prop, so most consumers will not need them; provide a slot\n * only when richer content (icons, formatting) is required.\n */\nexport interface TFileUploadSlots {\n /** Overrides the `label` prop. */\n label: () => unknown;\n /** Overrides the `ctaText` prop in the empty state. */\n cta: () => unknown;\n /** Overrides the `loadingText` prop in the loading state. */\n loading: () => unknown;\n /** Overrides the filename rendering in the loaded state. */\n file: (props: { file: File }) => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { Primitive } from 'reka-ui';\nimport { computed, onMounted, ref, useId, watch } from 'vue';\nimport { TIcon } from '../TIcon';\nimport { TTypography } from '../TTypography';\n\ndefineOptions({\n name: 'TFileUpload',\n inheritAttrs: false,\n});\n\nconst {\n ctaText = 'Subir archivo',\n loadingText = 'Cargando archivo',\n removeLabel = 'Quitar archivo',\n label,\n formatsHint,\n maxSizeHint,\n accept,\n maxSizeBytes,\n loading,\n id,\n name,\n required,\n disabled,\n form,\n as = 'div',\n} = defineProps<TFileUploadProps>();\n\nconst emit = defineEmits<TFileUploadEmits>();\ndefineSlots<TFileUploadSlots>();\n\nconst model = defineModel<File | null>({ default: null });\n\nconst inputRef = ref<HTMLInputElement | null>(null);\nconst generatedId = useId();\nconst inputId = computed(() => id ?? generatedId);\n\nconst { wrapperAttrs, staticAttrs, listenerAttrs } = useForwardedAttrs();\n\nconst state = computed<'empty' | 'loading' | 'loaded'>(() => {\n if (loading) {\n return 'loading';\n }\n if (model.value) {\n return 'loaded';\n }\n return 'empty';\n});\n\nconst acceptAttribute = computed(() => {\n if (!accept || accept.length === 0) {\n return undefined;\n }\n return accept.map((ext) => `.${ext}`).join(',');\n});\n\nconst showHints = computed(() => state.value === 'empty' && (Boolean(formatsHint) || Boolean(maxSizeHint)));\n\nconst syncInputToModel = () => {\n const input = inputRef.value;\n if (!input) {\n return;\n }\n const file = model.value;\n const currentFile = input.files?.[0] ?? null;\n if (file === currentFile) {\n return;\n }\n if (!file) {\n input.value = '';\n return;\n }\n try {\n const dt = new DataTransfer();\n dt.items.add(file);\n input.files = dt.files;\n } catch {}\n};\n\nconst handleFileChange = () => {\n const input = inputRef.value;\n if (!input) {\n return;\n }\n const file = input.files?.[0];\n if (!file) {\n return;\n }\n\n if (accept?.length) {\n const filename = file.name.toLowerCase();\n const allowed = accept.some((ext) => filename.endsWith(`.${ext.toLowerCase()}`));\n if (!allowed) {\n syncInputToModel();\n emit('error', 'bad-format');\n return;\n }\n }\n\n if (maxSizeBytes !== undefined && file.size > maxSizeBytes) {\n syncInputToModel();\n emit('error', 'too-large');\n return;\n }\n\n model.value = file;\n};\n\nconst handleRemove = () => {\n if (disabled) {\n return;\n }\n model.value = null;\n};\n\nonMounted(syncInputToModel);\nwatch(model, syncInputToModel);\n\ndefineExpose({ inputRef });\n</script>\n\n<template>\n <Primitive\n v-bind=\"wrapperAttrs\"\n :as=\"as\"\n class=\"t-file-upload\"\n :data-state=\"state\"\n :data-disabled=\"disabled || undefined\"\n >\n <div v-if=\"label || $slots.label\" class=\"t-file-upload__label\">\n <slot name=\"label\">\n <TTypography variant=\"b3\" font-weight=\"semibold\">\n {{ label }}\n </TTypography>\n </slot>\n </div>\n\n <label\n v-if=\"state === 'empty'\"\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"empty\"\n :for=\"inputId\"\n >\n <TIcon icon=\"paper-clip\" size=\"small\" color=\"gray.main\" />\n <TTypography variant=\"b3\" class=\"t-file-upload__cta-text\">\n <slot name=\"cta\">{{ ctaText }}</slot>\n </TTypography>\n </label>\n\n <div\n v-else-if=\"state === 'loading'\"\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"loading\"\n >\n <TIcon icon=\"arrow-path\" size=\"small\" color=\"primary.main\" />\n <TTypography variant=\"b3\" class=\"t-file-upload__cta-text\" color=\"primary.main\">\n <slot name=\"loading\">\n {{ loadingText }}\n </slot>\n </TTypography>\n </div>\n\n <div\n v-else\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"loaded\"\n >\n <TIcon icon=\"document\" size=\"small\" color=\"primary.main\" />\n <div class=\"t-file-upload__filename\">\n <slot name=\"file\" :file=\"model as File\">\n <TTypography variant=\"b3\" color=\"primary.main\" class=\"t-file-upload__filename-text\">\n {{ (model as File).name }}\n </TTypography>\n </slot>\n </div>\n <button\n type=\"button\"\n class=\"t-file-upload__remove\"\n :aria-label=\"removeLabel\"\n :disabled=\"disabled\"\n @click=\"handleRemove\"\n >\n <TIcon icon=\"x-circle\" color=\"#FFFFFF\" :width=\"18\" :height=\"18\" />\n </button>\n </div>\n\n <input\n :id=\"inputId\"\n ref=\"inputRef\"\n v-bind=\"staticAttrs\"\n class=\"t-file-upload__input\"\n type=\"file\"\n title=\"\"\n :name=\"name\"\n :required=\"required\"\n :disabled=\"disabled || loading\"\n :form=\"form\"\n :accept=\"acceptAttribute\"\n @change=\"handleFileChange\"\n >\n\n <div v-if=\"showHints\" class=\"t-file-upload__hints\">\n <TTypography v-if=\"formatsHint\" variant=\"b4\" color=\"gray.medium1\">\n {{ formatsHint }}\n </TTypography>\n <span v-else />\n <TTypography v-if=\"maxSizeHint\" variant=\"b4\" color=\"gray.medium1\">\n {{ maxSizeHint }}\n </TTypography>\n </div>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n.t-file-upload {\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n width: 100%;\n\n &[data-disabled] &__box[data-state='empty'] {\n cursor: not-allowed;\n opacity: 0.5;\n\n &:hover {\n background-color: transparent;\n }\n }\n\n &[data-disabled] &__remove {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &:focus-within &__box[data-state='empty'] {\n border: 1px dashed var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n outline: none;\n }\n\n &__label {\n display: flex;\n }\n\n &__box {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--space-8);\n\n // The --space-* scale has no 20px step.\n padding: 20px var(--inset-group);\n border-radius: var(--radius-control);\n position: relative;\n transition: background-color 150ms ease, border-color 150ms ease;\n\n &[data-state='empty'] {\n border: 1px dashed var(--neutral-bg-hover);\n background-color: transparent;\n cursor: pointer;\n\n &:hover {\n background-color: var(--neutral-base);\n }\n }\n\n &[data-state='loading'] {\n border: 1px dashed var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n }\n\n &[data-state='loaded'] {\n border: 1px solid var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n padding: var(--inset-item) var(--inset-group);\n }\n }\n\n &__input {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n &__cta-text {\n text-decoration: underline;\n }\n\n &__filename {\n min-width: 0;\n overflow: hidden;\n }\n\n &__filename-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-decoration: underline;\n }\n\n &__remove {\n position: absolute;\n top: calc(-1 * var(--space-8));\n right: -2px;\n width: 18px;\n height: 18px;\n background: radial-gradient(\n circle,\n var(--primary-solid) 0,\n var(--primary-solid) 6px,\n transparent 7.5px\n );\n border: none;\n border-radius: var(--radius-full);\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n }\n\n &__hints {\n display: flex;\n justify-content: space-between;\n gap: var(--gap-group);\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Reason emitted with the `'error'` event when an uploaded file fails internal\n * validation against the `accept` extension list or `maxSizeBytes` size cap.\n *\n * - `'bad-format'`: the file's extension is not in the `accept` list.\n * - `'too-large'`: the file's size exceeds `maxSizeBytes`.\n */\nexport type TFileUploadErrorReason = 'bad-format' | 'too-large';\n\n/**\n * Props for the `TFileUpload` component.\n *\n * `TFileUpload` is a single-file upload control with three visual states\n * (empty / loading / loaded) and built-in validation against an allow-list of\n * extensions and an optional maximum size in bytes. The selected `File` (or\n * `null`) is exposed via `v-model`; validation failures emit `'error'`\n * **instead of** updating the model.\n *\n * All user-facing strings are passed in as props so the consumer owns i18n;\n * the component does not import a translation function.\n */\nexport interface TFileUploadProps {\n /**\n * Label shown above the upload box (e.g. `\"Adjuntar archivo\"`).\n * When omitted, the label slot/element is not rendered.\n */\n label?: string;\n /**\n * Call-to-action text rendered inside the box while no file is attached\n * (e.g. `\"Subir archivo\"`).\n * @defaultValue 'Subir archivo'\n */\n ctaText?: string;\n /**\n * Text rendered inside the box while `loading` is `true`\n * (e.g. `\"Cargando archivo\"`).\n * @defaultValue 'Cargando archivo'\n */\n loadingText?: string;\n /**\n * Accessible label for the remove button shown in the loaded state.\n * @defaultValue 'Quitar archivo'\n */\n removeLabel?: string;\n /**\n * Hint displayed beneath the box (bottom-left) listing accepted formats.\n * Hidden in the loaded state.\n */\n formatsHint?: string;\n /**\n * Hint displayed beneath the box (bottom-right) describing the size limit.\n * Hidden in the loaded state.\n */\n maxSizeHint?: string;\n /**\n * Accepted file extensions without the leading dot (e.g. `['csv', 'pdf']`).\n * Used to build the native `accept` attribute and to validate the selected\n * file. When omitted, no extension validation runs.\n */\n accept?: string[];\n /**\n * Maximum file size in bytes. Files larger than this emit\n * `'error'` with reason `'too-large'` and the model is not updated.\n * When omitted, no size validation runs.\n */\n maxSizeBytes?: number;\n /**\n * Controlled loading flag. When `true` the box renders the loading visual\n * and the underlying `<input type=\"file\">` is disabled so the user cannot\n * pick another file mid-upload.\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * Optional id forwarded to the underlying `<input type=\"file\">`. When\n * omitted a stable auto-generated id is used.\n */\n id?: string;\n /**\n * Form field name forwarded to the underlying `<input type=\"file\">`.\n * Required for native form submission (the file is sent under this key).\n */\n name?: string;\n /**\n * Marks the input as required for native HTML5 form validation.\n * @defaultValue false\n */\n required?: boolean;\n /**\n * Disables the picker. The native `<input>` is disabled and the box\n * renders in a non-interactive visual state.\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * `id` of the `<form>` this input belongs to. Use when the component\n * lives outside the target form in the DOM.\n */\n form?: string;\n /**\n * Element the outer wrapper renders as. Useful for semantic nesting\n * (e.g. `'li'` inside a `<ul>`).\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\n/**\n * Events emitted by `TFileUpload`.\n */\nexport interface TFileUploadEmits {\n /**\n * Fired when the selected file fails internal validation. The model is\n * **not** updated in this case — consumers can surface the reason as they\n * wish.\n */\n error: [reason: TFileUploadErrorReason];\n}\n\n/**\n * Slots exposed by `TFileUpload`. Each slot defaults to rendering its\n * matching text prop, so most consumers will not need them; provide a slot\n * only when richer content (icons, formatting) is required.\n */\nexport interface TFileUploadSlots {\n /** Overrides the `label` prop. */\n label: () => unknown;\n /** Overrides the `ctaText` prop in the empty state. */\n cta: () => unknown;\n /** Overrides the `loadingText` prop in the loading state. */\n loading: () => unknown;\n /** Overrides the filename rendering in the loaded state. */\n file: (props: { file: File }) => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { Primitive } from 'reka-ui';\nimport { computed, onMounted, ref, useId, watch } from 'vue';\nimport { TIcon } from '../TIcon';\nimport { TTypography } from '../TTypography';\n\ndefineOptions({\n name: 'TFileUpload',\n inheritAttrs: false,\n});\n\nconst {\n ctaText = 'Subir archivo',\n loadingText = 'Cargando archivo',\n removeLabel = 'Quitar archivo',\n label,\n formatsHint,\n maxSizeHint,\n accept,\n maxSizeBytes,\n loading,\n id,\n name,\n required,\n disabled,\n form,\n as = 'div',\n} = defineProps<TFileUploadProps>();\n\nconst emit = defineEmits<TFileUploadEmits>();\ndefineSlots<TFileUploadSlots>();\n\nconst model = defineModel<File | null>({ default: null });\n\nconst inputRef = ref<HTMLInputElement | null>(null);\nconst generatedId = useId();\nconst inputId = computed(() => id ?? generatedId);\n\nconst { wrapperAttrs, staticAttrs, listenerAttrs } = useForwardedAttrs();\n\nconst state = computed<'empty' | 'loading' | 'loaded'>(() => {\n if (loading) {\n return 'loading';\n }\n if (model.value) {\n return 'loaded';\n }\n return 'empty';\n});\n\nconst acceptAttribute = computed(() => {\n if (!accept || accept.length === 0) {\n return undefined;\n }\n return accept.map((ext) => `.${ext}`).join(',');\n});\n\nconst showHints = computed(() => state.value === 'empty' && (Boolean(formatsHint) || Boolean(maxSizeHint)));\n\nconst syncInputToModel = () => {\n const input = inputRef.value;\n if (!input) {\n return;\n }\n const file = model.value;\n const currentFile = input.files?.[0] ?? null;\n if (file === currentFile) {\n return;\n }\n if (!file) {\n input.value = '';\n return;\n }\n try {\n const dt = new DataTransfer();\n dt.items.add(file);\n input.files = dt.files;\n } catch {}\n};\n\nconst handleFileChange = () => {\n const input = inputRef.value;\n if (!input) {\n return;\n }\n const file = input.files?.[0];\n if (!file) {\n return;\n }\n\n if (accept?.length) {\n const filename = file.name.toLowerCase();\n const allowed = accept.some((ext) => filename.endsWith(`.${ext.toLowerCase()}`));\n if (!allowed) {\n syncInputToModel();\n emit('error', 'bad-format');\n return;\n }\n }\n\n if (maxSizeBytes !== undefined && file.size > maxSizeBytes) {\n syncInputToModel();\n emit('error', 'too-large');\n return;\n }\n\n model.value = file;\n};\n\nconst handleRemove = () => {\n if (disabled) {\n return;\n }\n model.value = null;\n};\n\nonMounted(syncInputToModel);\nwatch(model, syncInputToModel);\n\ndefineExpose({ inputRef });\n</script>\n\n<template>\n <Primitive\n v-bind=\"wrapperAttrs\"\n :as=\"as\"\n class=\"t-file-upload\"\n :data-state=\"state\"\n :data-disabled=\"disabled || undefined\"\n >\n <div v-if=\"label || $slots.label\" class=\"t-file-upload__label\">\n <slot name=\"label\">\n <TTypography variant=\"b3\" font-weight=\"semibold\">\n {{ label }}\n </TTypography>\n </slot>\n </div>\n\n <label\n v-if=\"state === 'empty'\"\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"empty\"\n :for=\"inputId\"\n >\n <TIcon icon=\"paper-clip\" size=\"small\" color=\"gray.main\" />\n <TTypography variant=\"b3\" class=\"t-file-upload__cta-text\">\n <slot name=\"cta\">{{ ctaText }}</slot>\n </TTypography>\n </label>\n\n <div\n v-else-if=\"state === 'loading'\"\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"loading\"\n >\n <TIcon icon=\"arrow-path\" size=\"small\" color=\"primary.main\" />\n <TTypography variant=\"b3\" class=\"t-file-upload__cta-text\" color=\"primary.main\">\n <slot name=\"loading\">\n {{ loadingText }}\n </slot>\n </TTypography>\n </div>\n\n <div\n v-else\n v-bind=\"listenerAttrs\"\n class=\"t-file-upload__box\"\n data-state=\"loaded\"\n >\n <TIcon icon=\"document\" size=\"small\" color=\"primary.main\" />\n <div class=\"t-file-upload__filename\">\n <slot name=\"file\" :file=\"model as File\">\n <TTypography variant=\"b3\" color=\"primary.main\" class=\"t-file-upload__filename-text\">\n {{ (model as File).name }}\n </TTypography>\n </slot>\n </div>\n <button\n type=\"button\"\n class=\"t-file-upload__remove\"\n :aria-label=\"removeLabel\"\n :disabled=\"disabled\"\n @click=\"handleRemove\"\n >\n <TIcon icon=\"x-circle\" color=\"#FFFFFF\" :width=\"18\" :height=\"18\" />\n </button>\n </div>\n\n <input\n :id=\"inputId\"\n ref=\"inputRef\"\n v-bind=\"staticAttrs\"\n class=\"t-file-upload__input\"\n type=\"file\"\n title=\"\"\n :name=\"name\"\n :required=\"required\"\n :disabled=\"disabled || loading\"\n :form=\"form\"\n :accept=\"acceptAttribute\"\n @change=\"handleFileChange\"\n >\n\n <div v-if=\"showHints\" class=\"t-file-upload__hints\">\n <TTypography v-if=\"formatsHint\" variant=\"b4\" color=\"gray.medium1\">\n {{ formatsHint }}\n </TTypography>\n <span v-else />\n <TTypography v-if=\"maxSizeHint\" variant=\"b4\" color=\"gray.medium1\">\n {{ maxSizeHint }}\n </TTypography>\n </div>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n.t-file-upload {\n display: flex;\n flex-direction: column;\n gap: var(--space-8);\n width: 100%;\n\n &[data-disabled] &__box[data-state='empty'] {\n cursor: not-allowed;\n opacity: 0.5;\n\n &:hover {\n background-color: transparent;\n }\n }\n\n &[data-disabled] &__remove {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &:focus-within &__box[data-state='empty'] {\n border: 1px dashed var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n outline: none;\n }\n\n &__label {\n display: flex;\n }\n\n &__box {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--space-8);\n\n // The --space-* scale has no 20px step.\n padding: 20px var(--inset-group);\n border-radius: var(--radius-control);\n position: relative;\n transition: background-color 150ms ease, border-color 150ms ease;\n\n &[data-state='empty'] {\n border: 1px dashed var(--neutral-bg-hover);\n background-color: transparent;\n cursor: pointer;\n\n &:hover {\n background-color: var(--neutral-base);\n }\n }\n\n &[data-state='loading'] {\n border: 1px dashed var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n }\n\n &[data-state='loaded'] {\n border: 1px solid var(--primary-solid);\n background-color: var(--color-primary-alpha-3);\n padding: var(--inset-item) var(--inset-group);\n }\n }\n\n &__input {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n &__cta-text {\n text-decoration: underline;\n }\n\n &__filename {\n min-width: 0;\n overflow: hidden;\n }\n\n &__filename-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-decoration: underline;\n }\n\n &__remove {\n position: absolute;\n top: calc(-1 * var(--space-8));\n right: -2px;\n width: 18px;\n height: 18px;\n background: radial-gradient(\n circle,\n var(--primary-solid) 0,\n var(--primary-solid) 6px,\n transparent 7.5px\n );\n border: none;\n border-radius: var(--radius-full);\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n }\n\n &__hints {\n display: flex;\n justify-content: space-between;\n gap: var(--gap-group);\n }\n}\n</style>\n","import type { ComputedRef, Ref } from 'vue';\nimport type { TIconButtonProps } from './TIconButton.types';\nimport { css } from '@emotion/css';\nimport { darken, lighten } from 'polished';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { toCamelCase } from '../../utils';\n\nexport const useStyles = (color:\n | Ref<NonNullable<TIconButtonProps['color']>>\n | ComputedRef<NonNullable<TIconButtonProps['color']>>) => {\n const theme = useTheme();\n const variant = computed(() => toCamelCase(color.value));\n const hover = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.toku\n : darken(0.15, theme.value.colors[variant.value])));\n const main = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.main\n : theme.value.colors[variant.value]));\n const light1 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light1\n : lighten(0.15, theme.value.colors[variant.value])));\n const light2 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light2\n : lighten(0.2, theme.value.colors[variant.value])));\n const light3 = computed(() => (variant.value === 'primary'\n ? theme.value.colors.primary.light3\n : lighten(0.25, theme.value.colors[variant.value])));\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n },\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'pointer',\n '&--primary': {\n borderRadius: theme.value.button.borderRadius,\n backgroundColor: main.value,\n boxShadow: '0px 0px 8px 0px rgba(0, 0, 0, 0.1)',\n border: `1px solid ${main.value}`,\n color: '#FFFFFF',\n '&:hover:not(&:disabled)': {\n backgroundColor: hover.value,\n },\n '&:focus': {\n border: `1px solid ${light1.value}`,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n backgroundColor: theme.value.colors.gray.light2,\n color: theme.value.colors.gray.medium2,\n },\n },\n '&--secondary': {\n borderRadius: theme.value.button.borderRadius,\n backgroundColor: '#FFFFFF',\n border: `1px solid ${main.value}`,\n boxShadow: '0px 0px 8px 0px rgba(0, 0, 0, 0.1)',\n color: main.value,\n '&:hover:not(&:disabled)': {\n backgroundColor: light3.value,\n },\n '&:focus': {\n border: `1px solid ${light1.value}`,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n backgroundColor: theme.value.colors.gray.light2,\n color: theme.value.colors.gray.medium2,\n },\n },\n '&--tertiary': {\n background: 'none',\n border: 'none',\n margin: 0,\n padding: 0,\n color: main.value,\n '&:hover:not(&:disabled)': {\n color: light2.value,\n },\n '&:focus': {\n color: light1.value,\n },\n '&:disabled': {\n cursor: 'not-allowed',\n color: theme.value.colors.gray.medium1,\n },\n },\n '&--large': {\n height: '3rem',\n width: '3rem',\n lineHeight: '1.5rem',\n fontSize: '1.125rem',\n },\n '&--medium': {\n height: '2.5rem',\n width: '2.5rem',\n lineHeight: '1.375rem',\n fontSize: '1rem',\n },\n '&--small': {\n height: '2rem',\n width: '2rem',\n lineHeight: '1.25rem',\n fontSize: '0.875rem',\n },\n '&--rounded': {\n borderRadius: '50%',\n },\n }));\n\n const iconClass = computed(() => css({\n margin: 0,\n padding: 0,\n '&--large': {\n height: '1.25rem',\n },\n '&--medium': {\n height: '1.25rem',\n },\n '&--small': {\n height: '1rem',\n },\n }));\n\n return { baseClass, iconClass };\n};\n","import type { PropType } from 'vue';\nimport type { TIconButtonProps } from './TIconButton.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TIconButton.styles';\n\nconst defaultProps = {\n variant: 'primary',\n size: 'medium',\n icon: 'academic-cap',\n type: 'button',\n color: 'primary',\n};\n\nexport const TIconButton = defineComponent({\n name: 'TIconButton',\n props: {\n variant: String as PropType<TIconButtonProps['variant']>,\n size: String as PropType<TIconButtonProps['size']>,\n disabled: Boolean as PropType<TIconButtonProps['disabled']>,\n icon: String as PropType<TIconButtonProps['icon']>,\n type: String as PropType<TIconButtonProps['type']>,\n rounded: Boolean as PropType<TIconButtonProps['rounded']>,\n loading: Boolean as PropType<TIconButtonProps['loading']>,\n color: String as PropType<TIconButtonProps['color']>,\n },\n emits: ['click'],\n setup(_props, { attrs, emit }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const color = computed(() => props.value.color);\n const { baseClass, iconClass } = useStyles(color);\n\n const theme = useTheme();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.size}`,\n {\n [`${baseClass.value}--rounded`]: props.value.rounded,\n },\n ]);\n const iconClasses = computed(() => [\n iconClass.value,\n `${iconClass.value}--${props.value.variant}`,\n `${iconClass.value}--${props.value.size}`,\n {\n [`${baseClass.value}--loading`]: props.value.loading,\n },\n ]);\n\n const handleClick = () => {\n if (!props.value.loading) {\n emit('click');\n }\n };\n\n return () => (\n <button\n class={classes.value}\n type={props.value.type}\n disabled={props.value.disabled}\n onClick={handleClick}\n {...attrs}\n >\n {props.value.loading\n ? (\n <Icon\n class={`${baseClass.value}__spinner`}\n icon=\"svg-spinners:90-ring-with-bg\"\n />\n )\n : (\n <Icon\n icon={`${theme.value.iconSet}:${props.value.icon}`}\n class={iconClasses.value}\n />\n )}\n </button>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n const baseClass = computed(() => css({\n margin: 0,\n padding: 0,\n width: 'fit-content',\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '0.625rem',\n color: theme.value.colors.primary.main,\n '&:hover:not(&:disabled)': {\n color: theme.value.colors.primary.toku,\n },\n '&:focus': {\n color: theme.value.colors.primary.light1,\n },\n textDecoration: 'underline',\n fontWeight: 600,\n '&--large': {\n lineHeight: '1.5rem',\n fontSize: '1.125rem',\n },\n '&--medium': {\n lineHeight: '1.375rem',\n fontSize: '1rem',\n },\n '&--small': {\n lineHeight: '1.25rem',\n fontSize: '0.875rem',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TLinkProps } from './TLink.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TLink.styles';\n\nconst defaultProps = {\n variant: 'primary',\n size: 'medium',\n};\n\nexport const TLink = defineComponent({\n name: 'TButton',\n props: {\n variant: String as PropType<TLinkProps['variant']>,\n size: String as PropType<TLinkProps['size']>,\n href: String as PropType<TLinkProps['href']>,\n leftIcon: String as PropType<TLinkProps['leftIcon']>,\n rightIcon: String as PropType<TLinkProps['leftIcon']>,\n },\n setup(_props, { attrs, slots }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const baseClass = useStyles();\n const theme = useTheme();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n `${baseClass.value}--${props.value.size}`,\n ]);\n return () => (\n <a class={classes.value} href={props.value.href} {...attrs}>\n {props.value.leftIcon\n ? (\n <Icon icon={`${theme.value.iconSet}:${props.value.leftIcon}`} />\n )\n : null}\n {slots.default ? slots.default() : null}\n {props.value.rightIcon\n ? (\n <Icon icon={`${theme.value.iconSet}:${props.value.rightIcon}`} />\n )\n : null}\n </a>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\ninterface TSpinnerStylesProps {\n color?: string;\n}\n\nexport const useStyles = (props: TSpinnerStylesProps) => {\n const color = computed(() => props.color);\n\n const theme = useTheme();\n const baseClass = computed(() => css({\n margin: 0,\n padding: 0,\n width: '3.5rem',\n height: '3.5rem',\n boxSizing: 'border-box',\n background: 'transparent',\n borderRadius: '50%',\n border: `0.5rem solid ${theme.value.colors.background}`,\n borderBottomColor: color.value ?? theme.value.colors.primary.main,\n animation: 'rotate 0.75s linear infinite',\n '&--medium': {\n width: '4.5rem',\n height: '4.5rem',\n },\n '&--auto': {\n [`@media (min-width: ${theme.value.breakpoints.desktop}px)`]: {\n width: '4.5rem',\n height: '4.5rem',\n },\n },\n '@keyframes rotate': {\n '0%': {\n transform: 'rotate(0deg)',\n },\n '100%': {\n transform: 'rotate(360deg)',\n },\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TSpinnerProps } from './TSpinner.types';\nimport { get, merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TSpinner.styles';\n\nconst defaultProps = {\n size: 'auto',\n color: '#3C1053',\n};\n\nexport const TSpinner = defineComponent({\n name: 'TSpinner',\n props: {\n size: String as PropType<TSpinnerProps['size']>,\n color: String as PropType<TSpinnerProps['color']>,\n },\n setup(_props, { attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const theme = useTheme();\n const color = computed(() => (get(theme.value.colors, props.value.color) as string)\n || props.value.color);\n\n const baseClass = useStyles({ color: color.value });\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.size}`,\n ]);\n\n return () => <div class={classes.value} />;\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\n\nexport const useStyles = () => {\n const baseClass = computed(() => css({\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n zIndex: 29,\n display: 'none',\n background: 'hsla(0,0%,100%,.5)',\n '&--active': {\n display: 'flex',\n },\n '&--full-page': {\n position: 'fixed',\n zIndex: 999,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TLoadingProps } from './TLoading.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { TSpinner } from '../TSpinner';\nimport { useStyles } from './TLoading.styles';\n\nconst defaultProps = {\n size: 'auto',\n};\n\nexport const TLoading = defineComponent({\n name: 'TLoading',\n props: {\n active: Boolean as PropType<TLoadingProps['active']>,\n fullPage: Boolean as PropType<TLoadingProps['fullPage']>,\n size: String as PropType<TLoadingProps['size']>,\n },\n setup(_props, { attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n {\n [`${baseClass.value}--active`]: props.value.active,\n [`${baseClass.value}--full-page`]: props.value.fullPage,\n },\n ]);\n\n return () => (\n <div class={classes.value}>\n <TSpinner size={props.value.size} />\n </div>\n );\n },\n});\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Three pulsing dots over a status message, with a secondary line that appears\n * only once the wait has gone on long enough to be worth explaining.\n *\n * Use it for waits the user is actively staring at — a payment being processed,\n * a bank redirect being prepared. For a plain indeterminate spinner with no\n * message, use `TSpinner`; for the legacy full-page overlay, `TLoading`.\n *\n * ## Layout is the consumer's job\n *\n * The component paints dots and centered text and nothing else — no backdrop, no\n * `position`, no `z-index`. Center it in a card or stretch it over a screen from\n * the outside. That is deliberate: the design renders identically inside a\n * desktop card and on a full-screen phone, so the surface belongs to whoever\n * mounts it.\n *\n * ## Announcements\n *\n * The root is a `role='status'` live region, so `message` is announced politely\n * and the dots are hidden from assistive tech.\n *\n * `hint` is deliberately announced too — \"this is taking a while\" is information a\n * screen reader user cannot get from watching the dots. Getting that *and* a\n * shift-free reveal takes some care: the line is in the DOM from mount so its box is\n * reserved, but while pending it is `aria-hidden` and `visibility: hidden`, so it is\n * silent and invisible. On reveal it is re-inserted as a fresh node (hence the `key`),\n * because a DOM insertion into a live region is the announcement trigger that\n * assistive tech supports most consistently — a visibility-only flip is not.\n *\n * Used bare, with no `message`, the region has nothing to announce: the dots are\n * decoration and hidden from assistive tech, so the loader is silent. That is fine\n * when something nearby already says what is happening; when it does not, pass an\n * `aria-label` — it falls through to the element carrying the role.\n */\nexport interface TLoadingDotsProps {\n /** Primary line under the dots. Also what the live region announces. */\n message?: string;\n\n /**\n * Secondary line, revealed after `hintDelay`. Meant for reassurance on a slow\n * wait (\"Esto puede tardar unos segundos…\"), not for status that must be read\n * immediately — anything urgent belongs in `message`.\n */\n hint?: string;\n\n /**\n * Milliseconds to wait before revealing `hint`. `0` shows it right away;\n * `false` never reveals it, which keeps `hint` addressable by a parent that\n * decides on its own when the wait became long.\n * @defaultValue 5000\n */\n hintDelay?: number | false;\n\n /**\n * Element the wrapper renders as. `'div'` suits a block of page; `'output'`\n * is worth considering when the loader reports the result of a form the user\n * just submitted. Every element this component renders inside the wrapper is\n * phrasing content, so `'output'` and other phrasing-only tags stay valid —\n * keep that in mind before swapping one for a block element in the slots.\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\nexport interface TLoadingDotsSlots {\n /** Replaces the `message` line — for rich content such as an inline amount. */\n message?: () => unknown;\n /** Replaces the `hint` line. Still governed by `hintDelay`. */\n hint?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from 'reka-ui';\nimport { computed, onUnmounted, ref, watch } from 'vue';\n\ndefineOptions({ name: 'TLoadingDots' });\n\nconst {\n message,\n hint,\n hintDelay = 5000,\n as = 'div',\n} = defineProps<TLoadingDotsProps>();\n\nconst slots = defineSlots<TLoadingDotsSlots>();\n\nconst hintElapsed = ref(false);\n\n// A bare timeout rather than VueUse's useTimeoutFn: one setTimeout does not justify\n// a utility library in the runtime dependencies of a published package, and ADR 006\n// leaves that trade to the caller.\nlet timer: ReturnType<typeof setTimeout> | undefined;\n\nconst stop = () => {\n clearTimeout(timer);\n timer = undefined;\n};\n\nconst start = (delay: number) => {\n timer = setTimeout(() => {\n hintElapsed.value = true;\n }, delay);\n};\n\nonUnmounted(stop);\n\n// Re-arm on every `hintDelay` change so a parent can restart the reveal, and so\n// switching to `false` retracts a hint that is already on screen.\nwatch(\n () => hintDelay,\n (delay) => {\n stop();\n hintElapsed.value = false;\n if (delay !== false) {\n start(delay);\n }\n },\n { immediate: true },\n);\n\n// The hint is in the DOM from mount and only *hidden* until the delay elapses, so\n// revealing it cannot shift the block: its exact box, wrapping included, is reserved\n// up front. Skipped entirely when `hintDelay` is false, where the line is never going\n// to appear and reserving space for it would be dead air.\nconst hintReserved = computed(() => Boolean(hint || slots.hint) && hintDelay !== false);\nconst messageShown = computed(() => Boolean(message || slots.message));\n</script>\n\n<template>\n <Primitive\n :as\n class=\"t-loading-dots\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <!-- Everything below is phrasing content so a phrasing-only `as` (e.g. `output`) stays valid HTML. -->\n <span class=\"t-loading-dots__dots\" aria-hidden=\"true\">\n <span class=\"t-loading-dots__dot\" />\n <span class=\"t-loading-dots__dot\" />\n <span class=\"t-loading-dots__dot\" />\n </span>\n\n <span v-if=\"messageShown || hintReserved\" class=\"t-loading-dots__text\">\n <span v-if=\"messageShown\" class=\"t-loading-dots__message\">\n <slot name=\"message\">\n {{ message }}\n </slot>\n </span>\n <span\n v-if=\"hintReserved\"\n :key=\"hintElapsed ? 'shown' : 'pending'\"\n class=\"t-loading-dots__hint\"\n :data-pending=\"!hintElapsed || undefined\"\n :aria-hidden=\"!hintElapsed || undefined\"\n >\n <slot name=\"hint\">\n {{ hint }}\n </slot>\n </span>\n </span>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n// px, not rem: the dots are a fixed graphic, 10px in Figma at every breakpoint, and\n// should not grow with the root font size the way the copy below them should.\n$dot-size: 10px;\n\n// Matches the dot. Deliberately off the --space-* scale, which has no 10px step;\n// Figma measures 12px here and this is a considered override of it.\n$dot-gap: 10px;\n$dot-rest-scale: 0.6;\n\n// The cycle is split into 7 so consecutive dots start 200ms apart at the default\n// 1400ms period, and stays proportional if the period is retuned.\n$stagger-steps: 7;\n\n// Figma wraps both lines somewhere between 276px and 308px, identically on mobile\n// and inside the desktop card. 288px sits in that band; `min()` keeps it from\n// overflowing a narrow phone once the consumer adds its own padding.\n$text-max-width: 18rem;\n\n.t-loading-dots {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-item);\n font-family: var(--font-family-base);\n text-align: center;\n\n &__dots {\n display: flex;\n align-items: center;\n gap: $dot-gap;\n }\n\n &__dot {\n display: block;\n width: $dot-size;\n height: $dot-size;\n border-radius: var(--radius-full);\n\n // The pulse swaps between two steps of the gray alpha ramp rather than dialling\n // `opacity` on a solid colour: an opacity multiplier invents shades that are not in\n // the palette, whereas both ends here are named tokens. gray-a-11 is the alpha twin\n // of gray-11, so the lit dot is the same colour it always was.\n background-color: var(--color-gray-alpha-11);\n\n // Base style is the lit dot, so anything that suppresses the animation leaves three\n // solid dots rather than a dimmed, shrunken row.\n transform: scale(1);\n animation: t-loading-dots-pulse var(--motion-loading-duration) var(--motion-loading-easing) infinite;\n\n // Negative delays start the row mid-cycle, so it mounts already in motion.\n &:nth-child(1) {\n animation-delay: calc(var(--motion-loading-duration) / #{$stagger-steps} * -2);\n }\n\n &:nth-child(2) {\n animation-delay: calc(var(--motion-loading-duration) / #{$stagger-steps} * -1);\n }\n\n // Collapsing the cycle to zero stops the pulse and, with no fill mode, leaves\n // the dots on their visible base style instead of a dimmed keyframe — verified\n // in-browser. The message keeps announcing, so the loader still reads as active.\n @media (prefers-reduced-motion: reduce) {\n animation-duration: var(--motion-duration-instant);\n animation-iteration-count: 1;\n }\n }\n\n &__text {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-unit);\n max-width: min(#{$text-max-width}, 100%);\n\n // max-width alone caps the box but creates no break opportunity, so a single\n // unbroken run (a URL, an id) would spill past it. Inherited by both lines.\n overflow-wrap: anywhere;\n }\n\n &__message {\n font-size: var(--font-b3-font-size);\n line-height: var(--font-b3-line-height);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text-contrast);\n }\n\n &__hint {\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n font-weight: var(--font-weight-regular);\n\n // Figma binds both lines to neutral/text-contrast — the hint reads lighter\n // because it is 12px regular, not because it is a muted color.\n color: var(--neutral-text-contrast);\n\n // An animation, not a transition: on reveal this is a freshly inserted node, and a\n // new node has no previous state to transition from — an animation still runs.\n &:not([data-pending]) {\n animation: t-loading-dots-hint-in var(--motion-enter-duration) var(--motion-enter-easing);\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: var(--motion-duration-instant);\n }\n }\n\n // Holds the line's box before the delay elapses so the reveal costs no layout\n // shift, while staying invisible and out of the accessibility tree.\n &[data-pending] {\n opacity: 0;\n visibility: hidden;\n }\n }\n}\n\n@keyframes t-loading-dots-pulse {\n 0%,\n 80%,\n 100% {\n background-color: var(--color-gray-alpha-7);\n transform: scale($dot-rest-scale);\n }\n\n 40% {\n background-color: var(--color-gray-alpha-11);\n transform: scale(1);\n }\n}\n\n@keyframes t-loading-dots-hint-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Three pulsing dots over a status message, with a secondary line that appears\n * only once the wait has gone on long enough to be worth explaining.\n *\n * Use it for waits the user is actively staring at — a payment being processed,\n * a bank redirect being prepared. For a plain indeterminate spinner with no\n * message, use `TSpinner`; for the legacy full-page overlay, `TLoading`.\n *\n * ## Layout is the consumer's job\n *\n * The component paints dots and centered text and nothing else — no backdrop, no\n * `position`, no `z-index`. Center it in a card or stretch it over a screen from\n * the outside. That is deliberate: the design renders identically inside a\n * desktop card and on a full-screen phone, so the surface belongs to whoever\n * mounts it.\n *\n * ## Announcements\n *\n * The root is a `role='status'` live region, so `message` is announced politely\n * and the dots are hidden from assistive tech.\n *\n * `hint` is deliberately announced too — \"this is taking a while\" is information a\n * screen reader user cannot get from watching the dots. Getting that *and* a\n * shift-free reveal takes some care: the line is in the DOM from mount so its box is\n * reserved, but while pending it is `aria-hidden` and `visibility: hidden`, so it is\n * silent and invisible. On reveal it is re-inserted as a fresh node (hence the `key`),\n * because a DOM insertion into a live region is the announcement trigger that\n * assistive tech supports most consistently — a visibility-only flip is not.\n *\n * Used bare, with no `message`, the region has nothing to announce: the dots are\n * decoration and hidden from assistive tech, so the loader is silent. That is fine\n * when something nearby already says what is happening; when it does not, pass an\n * `aria-label` — it falls through to the element carrying the role.\n */\nexport interface TLoadingDotsProps {\n /** Primary line under the dots. Also what the live region announces. */\n message?: string;\n\n /**\n * Secondary line, revealed after `hintDelay`. Meant for reassurance on a slow\n * wait (\"Esto puede tardar unos segundos…\"), not for status that must be read\n * immediately — anything urgent belongs in `message`.\n */\n hint?: string;\n\n /**\n * Milliseconds to wait before revealing `hint`. `0` shows it right away;\n * `false` never reveals it, which keeps `hint` addressable by a parent that\n * decides on its own when the wait became long.\n * @defaultValue 5000\n */\n hintDelay?: number | false;\n\n /**\n * Element the wrapper renders as. `'div'` suits a block of page; `'output'`\n * is worth considering when the loader reports the result of a form the user\n * just submitted. Every element this component renders inside the wrapper is\n * phrasing content, so `'output'` and other phrasing-only tags stay valid —\n * keep that in mind before swapping one for a block element in the slots.\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\nexport interface TLoadingDotsSlots {\n /** Replaces the `message` line — for rich content such as an inline amount. */\n message?: () => unknown;\n /** Replaces the `hint` line. Still governed by `hintDelay`. */\n hint?: () => unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from 'reka-ui';\nimport { computed, onUnmounted, ref, watch } from 'vue';\n\ndefineOptions({ name: 'TLoadingDots' });\n\nconst {\n message,\n hint,\n hintDelay = 5000,\n as = 'div',\n} = defineProps<TLoadingDotsProps>();\n\nconst slots = defineSlots<TLoadingDotsSlots>();\n\nconst hintElapsed = ref(false);\n\n// A bare timeout rather than VueUse's useTimeoutFn: one setTimeout does not justify\n// a utility library in the runtime dependencies of a published package, and ADR 006\n// leaves that trade to the caller.\nlet timer: ReturnType<typeof setTimeout> | undefined;\n\nconst stop = () => {\n clearTimeout(timer);\n timer = undefined;\n};\n\nconst start = (delay: number) => {\n timer = setTimeout(() => {\n hintElapsed.value = true;\n }, delay);\n};\n\nonUnmounted(stop);\n\n// Re-arm on every `hintDelay` change so a parent can restart the reveal, and so\n// switching to `false` retracts a hint that is already on screen.\nwatch(\n () => hintDelay,\n (delay) => {\n stop();\n hintElapsed.value = false;\n if (delay !== false) {\n start(delay);\n }\n },\n { immediate: true },\n);\n\n// The hint is in the DOM from mount and only *hidden* until the delay elapses, so\n// revealing it cannot shift the block: its exact box, wrapping included, is reserved\n// up front. Skipped entirely when `hintDelay` is false, where the line is never going\n// to appear and reserving space for it would be dead air.\nconst hintReserved = computed(() => Boolean(hint || slots.hint) && hintDelay !== false);\nconst messageShown = computed(() => Boolean(message || slots.message));\n</script>\n\n<template>\n <Primitive\n :as\n class=\"t-loading-dots\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <!-- Everything below is phrasing content so a phrasing-only `as` (e.g. `output`) stays valid HTML. -->\n <span class=\"t-loading-dots__dots\" aria-hidden=\"true\">\n <span class=\"t-loading-dots__dot\" />\n <span class=\"t-loading-dots__dot\" />\n <span class=\"t-loading-dots__dot\" />\n </span>\n\n <span v-if=\"messageShown || hintReserved\" class=\"t-loading-dots__text\">\n <span v-if=\"messageShown\" class=\"t-loading-dots__message\">\n <slot name=\"message\">\n {{ message }}\n </slot>\n </span>\n <span\n v-if=\"hintReserved\"\n :key=\"hintElapsed ? 'shown' : 'pending'\"\n class=\"t-loading-dots__hint\"\n :data-pending=\"!hintElapsed || undefined\"\n :aria-hidden=\"!hintElapsed || undefined\"\n >\n <slot name=\"hint\">\n {{ hint }}\n </slot>\n </span>\n </span>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n// px, not rem: the dots are a fixed graphic, 10px in Figma at every breakpoint, and\n// should not grow with the root font size the way the copy below them should.\n$dot-size: 10px;\n\n// Matches the dot. Deliberately off the --space-* scale, which has no 10px step;\n// Figma measures 12px here and this is a considered override of it.\n$dot-gap: 10px;\n$dot-rest-scale: 0.6;\n\n// The cycle is split into 7 so consecutive dots start 200ms apart at the default\n// 1400ms period, and stays proportional if the period is retuned.\n$stagger-steps: 7;\n\n// Figma wraps both lines somewhere between 276px and 308px, identically on mobile\n// and inside the desktop card. 288px sits in that band; `min()` keeps it from\n// overflowing a narrow phone once the consumer adds its own padding.\n$text-max-width: 18rem;\n\n.t-loading-dots {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-item);\n font-family: var(--font-family-base);\n text-align: center;\n\n &__dots {\n display: flex;\n align-items: center;\n gap: $dot-gap;\n }\n\n &__dot {\n display: block;\n width: $dot-size;\n height: $dot-size;\n border-radius: var(--radius-full);\n\n // The pulse swaps between two steps of the gray alpha ramp rather than dialling\n // `opacity` on a solid colour: an opacity multiplier invents shades that are not in\n // the palette, whereas both ends here are named tokens. gray-a-11 is the alpha twin\n // of gray-11, so the lit dot is the same colour it always was.\n background-color: var(--color-gray-alpha-11);\n\n // Base style is the lit dot, so anything that suppresses the animation leaves three\n // solid dots rather than a dimmed, shrunken row.\n transform: scale(1);\n animation: t-loading-dots-pulse var(--motion-loading-duration) var(--motion-loading-easing) infinite;\n\n // Negative delays start the row mid-cycle, so it mounts already in motion.\n &:nth-child(1) {\n animation-delay: calc(var(--motion-loading-duration) / #{$stagger-steps} * -2);\n }\n\n &:nth-child(2) {\n animation-delay: calc(var(--motion-loading-duration) / #{$stagger-steps} * -1);\n }\n\n // Collapsing the cycle to zero stops the pulse and, with no fill mode, leaves\n // the dots on their visible base style instead of a dimmed keyframe — verified\n // in-browser. The message keeps announcing, so the loader still reads as active.\n @media (prefers-reduced-motion: reduce) {\n animation-duration: var(--motion-duration-instant);\n animation-iteration-count: 1;\n }\n }\n\n &__text {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-unit);\n max-width: min(#{$text-max-width}, 100%);\n\n // max-width alone caps the box but creates no break opportunity, so a single\n // unbroken run (a URL, an id) would spill past it. Inherited by both lines.\n overflow-wrap: anywhere;\n }\n\n &__message {\n font-size: var(--font-b3-font-size);\n line-height: var(--font-b3-line-height);\n font-weight: var(--font-weight-semibold);\n color: var(--neutral-text-contrast);\n }\n\n &__hint {\n font-size: var(--font-b4-font-size);\n line-height: var(--font-b4-line-height);\n font-weight: var(--font-weight-regular);\n\n // Figma binds both lines to neutral/text-contrast — the hint reads lighter\n // because it is 12px regular, not because it is a muted color.\n color: var(--neutral-text-contrast);\n\n // An animation, not a transition: on reveal this is a freshly inserted node, and a\n // new node has no previous state to transition from — an animation still runs.\n &:not([data-pending]) {\n animation: t-loading-dots-hint-in var(--motion-enter-duration) var(--motion-enter-easing);\n\n @media (prefers-reduced-motion: reduce) {\n animation-duration: var(--motion-duration-instant);\n }\n }\n\n // Holds the line's box before the delay elapses so the reveal costs no layout\n // shift, while staying invisible and out of the accessibility tree.\n &[data-pending] {\n opacity: 0;\n visibility: hidden;\n }\n }\n}\n\n@keyframes t-loading-dots-pulse {\n 0%,\n 80%,\n 100% {\n background-color: var(--color-gray-alpha-7);\n transform: scale($dot-rest-scale);\n }\n\n 40% {\n background-color: var(--color-gray-alpha-11);\n transform: scale(1);\n }\n}\n\n@keyframes t-loading-dots-hint-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n</style>\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n },\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n gap: '0.375rem',\n width: 'fit-content',\n '&__radio': {\n appearance: 'none',\n MozAppearance: 'none',\n WebkitAppearance: 'none',\n width: '18px',\n height: '18px',\n borderRadius: '50%',\n border: `1px solid ${theme.value.colors.primary.main}`,\n position: 'relative',\n cursor: 'pointer',\n },\n '&:not(&--checked) &__radio:hover': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&--checked &__radio::after': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '10px',\n height: '10px',\n background: theme.value.colors.primary.main,\n borderRadius: '50%',\n },\n '&--label-left &__radio': {\n order: 1,\n },\n '&__label': {\n fontFamily: theme.value.typography.fontFamily,\n color: theme.value.typography.color,\n fontSize: '1rem',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.375rem',\n },\n '&--disabled &__radio': {\n cursor: 'not-allowed',\n },\n '&--disabled &__radio, &--disabled:not(&--checked):hover &__radio': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&--disabled &__radio::after': {\n background: theme.value.colors.gray.medium2,\n },\n '&--disabled &__label': {\n color: theme.value.colors.gray.medium2,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TRadioProps } from './TRadio.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport { useStyles } from './TRadio.styles';\n\nconst defaultProps = {\n labelPosition: 'right',\n};\n\nexport const TRadio = defineComponent({\n name: 'TRadio',\n props: {\n id: String as PropType<TRadioProps['id']>,\n label: String as PropType<TRadioProps['label']>,\n value: {\n type: [\n String,\n Number,\n Boolean,\n Object,\n Array,\n Function,\n Date,\n ] as PropType<TRadioProps['value']>,\n default: null,\n },\n modelValue: {\n type: [\n String,\n Number,\n Boolean,\n Object,\n Array,\n Function,\n Date,\n ] as PropType<TRadioProps['modelValue']>,\n default: null,\n },\n disabled: Boolean as PropType<TRadioProps['disabled']>,\n labelPosition: String as PropType<TRadioProps['labelPosition']>,\n },\n emits: ['input', 'change', 'update:modelValue'],\n setup(_props, { emit, attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n\n const checked = ref(props.value.modelValue === props.value.value);\n watch(\n () => [props.value.modelValue, props.value.value],\n () => {\n checked.value = props.value.modelValue === props.value.value;\n },\n );\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--label-${props.value.labelPosition}`,\n {\n [`${baseClass.value}--checked`]: checked.value,\n [`${baseClass.value}--disabled`]: props.value.disabled,\n },\n ]);\n\n const handleInput = () => {\n emit('update:modelValue', props.value.value);\n emit('change', props.value.value);\n emit('input', props.value.value);\n checked.value = true;\n };\n const handleClick = () => {\n if (!props.value.disabled) {\n handleInput();\n }\n };\n const handleKeydown = (event: KeyboardEvent) => {\n if (\n (event.key === 'Enter' || event.key === ' ')\n && !props.value.disabled\n ) {\n handleInput();\n }\n };\n\n return () => (\n <div class={classes.value}>\n <input\n id={props.value.id}\n type=\"radio\"\n class={`${baseClass.value}__radio`}\n onClick={handleClick}\n onKeydown={handleKeydown}\n disabled={props.value.disabled}\n />\n {props.value.label && (\n <label class={`${baseClass.value}__label`} for={props.value.id}>\n {props.value.label}\n </label>\n )}\n </div>\n );\n },\n});\n","import type { Ref } from 'vue';\nimport { computed, onUnmounted, ref } from 'vue';\n\nexport interface UseScrollbarThumbOptions {\n railTopInset?: number;\n railBottomInset?: number;\n minThumbHeight?: number;\n thumbHeightFactor?: number;\n onDragStart?: () => void;\n onDragEnd?: () => void;\n}\n\nconst DEFAULT_OPTIONS: Required<Omit<UseScrollbarThumbOptions, 'onDragStart' | 'onDragEnd'>> = {\n railTopInset: 3,\n railBottomInset: 8,\n minThumbHeight: 6,\n thumbHeightFactor: 0.65,\n};\n\nexport function useScrollbarThumb(\n containerRef: Ref<HTMLElement | null>,\n options: UseScrollbarThumbOptions = {},\n) {\n const {\n railTopInset,\n railBottomInset,\n minThumbHeight,\n thumbHeightFactor,\n onDragStart,\n onDragEnd,\n } = { ...DEFAULT_OPTIONS, ...options };\n\n const thumbHeight = ref(0);\n const thumbOffset = ref(0);\n const isDragging = ref(false);\n const dragStartY = ref(0);\n const dragStartScrollTop = ref(0);\n\n const isScrollable = computed(() => thumbHeight.value > 0);\n\n function update() {\n const el = containerRef.value;\n if (!el) {\n return;\n }\n\n const { scrollTop, scrollHeight, clientHeight } = el;\n if (scrollHeight <= clientHeight) {\n thumbHeight.value = 0;\n thumbOffset.value = 0;\n return;\n }\n\n const railHeight = Math.max(\n clientHeight - railTopInset - railBottomInset,\n 0,\n );\n const proportionalThumbHeight = (clientHeight / scrollHeight) * railHeight;\n const height = Math.max(\n proportionalThumbHeight * thumbHeightFactor,\n minThumbHeight,\n );\n const maxThumbOffset = Math.max(railHeight - height, 0);\n const maxScrollTop = scrollHeight - clientHeight;\n const scrollProgress = maxScrollTop > 0 ? scrollTop / maxScrollTop : 0;\n\n thumbHeight.value = height;\n thumbOffset.value = railTopInset + maxThumbOffset * scrollProgress;\n }\n\n function handleDragMove(event: MouseEvent) {\n if (!isDragging.value || !containerRef.value) {\n return;\n }\n\n const el = containerRef.value;\n const { scrollHeight, clientHeight } = el;\n const maxScrollTop = Math.max(scrollHeight - clientHeight, 0);\n if (maxScrollTop === 0) {\n return;\n }\n\n const railHeight = Math.max(\n clientHeight - railTopInset - railBottomInset,\n 0,\n );\n const maxThumbOffset = Math.max(railHeight - thumbHeight.value, 0);\n if (maxThumbOffset === 0) {\n return;\n }\n\n const deltaY = event.clientY - dragStartY.value;\n const scrollRatio = maxScrollTop / maxThumbOffset;\n el.scrollTop = Math.min(\n Math.max(dragStartScrollTop.value + deltaY * scrollRatio, 0),\n maxScrollTop,\n );\n update();\n }\n\n function handleDragEnd() {\n if (!isDragging.value) {\n return;\n }\n isDragging.value = false;\n window.removeEventListener('mousemove', handleDragMove);\n window.removeEventListener('mouseup', handleDragEnd);\n onDragEnd?.();\n }\n\n function onThumbMouseDown(event: MouseEvent) {\n if (!containerRef.value || !isScrollable.value) {\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n onDragStart?.();\n isDragging.value = true;\n dragStartY.value = event.clientY;\n dragStartScrollTop.value = containerRef.value.scrollTop;\n window.addEventListener('mousemove', handleDragMove);\n window.addEventListener('mouseup', handleDragEnd);\n }\n\n onUnmounted(() => {\n window.removeEventListener('mousemove', handleDragMove);\n window.removeEventListener('mouseup', handleDragEnd);\n });\n\n return {\n thumbHeight,\n thumbOffset,\n isScrollable,\n isDragging,\n update,\n onThumbMouseDown,\n };\n}\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color: '#373737',\n fontFamily: theme.value.typography.fontFamily,\n },\n '&__container': {\n gap: theme.value.spacing,\n display: 'flex',\n flexDirection: 'column',\n width: '358px',\n },\n '&__label': {\n display: 'block',\n fontSize: '0.875rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.semibold,\n lineHeight: '1.25rem',\n },\n '&__wrapper': {\n position: 'relative',\n },\n '&__dropdown': {\n position: 'relative',\n },\n '&__select': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n background: '#fff',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderRadius: theme.value.input.borderRadius,\n padding: '0.25rem 0.5rem',\n gap: '0.5rem',\n height: '32px',\n fontSize: '0.8125rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.375rem',\n MozAppearance: 'none',\n WebkitAppearance: 'none',\n appearance: 'none',\n backgroundImage:\n \"url(\\\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path fill-rule='evenodd' d='M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z' clip-rule='evenodd' stroke='black' stroke-width='1'/></svg>\\\")\",\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'right 0.7rem top 50%',\n backgroundSize: '0.65rem auto',\n '&:hover': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&:focus': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&:disabled': {\n backgroundColor: theme.value.colors.gray.light3,\n borderColor: theme.value.colors.gray.light3,\n cursor: 'not-allowed',\n },\n '&--placeholder': {\n color: theme.value.colors.gray.medium2,\n },\n '&--open': {\n borderBottomLeftRadius: '4px',\n borderBottomRightRadius: '4px',\n },\n '&--left-icon': {\n paddingLeft: '2rem',\n },\n },\n '&__selected-value': {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n maxWidth: '100%',\n },\n '&__menu-wrapper': {\n position: 'absolute',\n top: '100%',\n left: 0,\n width: '100%',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderTopRightRadius: '4px',\n borderTopLeftRadius: '4px',\n borderBottomLeftRadius: '8px',\n borderBottomRightRadius: '8px',\n backgroundColor: '#fff',\n boxShadow: '0 6px 20px rgba(0, 0, 0, 0.08)',\n overflow: 'hidden',\n zIndex: 1000,\n },\n '&__menu': {\n margin: 0,\n padding: '0.125rem 0.75rem 0.125rem 0.375rem',\n listStyle: 'none',\n maxHeight: '14.25rem',\n overflowY: 'auto',\n scrollbarWidth: 'none',\n },\n '&__menu-scrollbar': {\n position: 'absolute',\n top: '0.1875rem',\n bottom: '0.5rem',\n right: '0.25rem',\n width: '4px',\n borderRadius: '999px',\n backgroundColor: theme.value.colors.gray.light4,\n opacity: 0,\n transition: 'opacity 120ms ease',\n pointerEvents: 'auto',\n '&--visible': {\n opacity: 1,\n },\n },\n '&__menu-scrollbar-thumb': {\n width: '100%',\n borderRadius: '999px',\n backgroundColor: theme.value.typography.color,\n transition: 'transform 120ms ease',\n cursor: 'grab',\n },\n '&__icon': {\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n fontSize: '1rem',\n zIndex: 1,\n pointerEvents: 'none',\n '&--left': {\n left: '0.5rem',\n },\n },\n '&__helper-text': {\n fontSize: '0.75rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.125rem',\n color: theme.value.colors.gray.medium1,\n },\n '&--error &__select, &--error &__select:focus': {\n borderColor: theme.value.colors.error,\n },\n '&--error &__helper-text': {\n color: theme.value.colors.error,\n },\n '&--full-width': {\n width: '100%',\n },\n }));\n\n return baseClass;\n};\n","import type { RendererElement, RendererNode, VNode } from 'vue';\nimport type { TSelectProps } from './TSelect.types';\n\nexport interface SelectOption {\n value: TSelectProps['value'];\n label: string;\n disabled: boolean;\n}\n\ntype Slot = VNode<\n RendererNode,\n RendererElement,\n {\n [key: string]: any;\n }\n>;\n\nconst getTextFromSlotChildren = (children: unknown): string => {\n if (typeof children === 'string' || typeof children === 'number') {\n return String(children);\n }\n\n if (Array.isArray(children)) {\n return children\n .map((child) => getTextFromSlotChildren(child))\n .join('')\n .trim();\n }\n\n if (children && typeof children === 'object' && 'children' in children) {\n return getTextFromSlotChildren((children as { children?: unknown }).children);\n }\n\n return '';\n};\n\nconst getOptionsFromSlots = (slots: Slot[], results: Slot[] = []) => {\n slots?.forEach((slot) => {\n if (slot.type === 'option') {\n results.push(slot);\n } else if (Array.isArray(slot.children)) {\n getOptionsFromSlots(slot.children as Slot[], results);\n }\n });\n\n return results;\n};\n\nexport const buildSelectOptions = (slotVNodes: Slot[]): SelectOption[] => {\n const slots = getOptionsFromSlots(slotVNodes);\n return slots.map((option) => ({\n value: option.props?.value,\n disabled: Boolean(option.props?.disabled),\n label: getTextFromSlotChildren(option.children),\n }));\n};\n\nexport const isOptionValueEqual = (a: unknown, b: unknown): boolean => {\n if (a === b) {\n return true;\n }\n if (a == null || b == null) {\n return false;\n }\n if (typeof a !== 'object' || typeof b !== 'object') {\n return false;\n }\n const proto = Object.getPrototypeOf(a);\n if (proto !== Object.prototype || Object.getPrototypeOf(b) !== proto) {\n return false;\n }\n const keysA = Object.keys(a as object);\n const keysB = Object.keys(b as object);\n if (keysA.length !== keysB.length) {\n return false;\n }\n return keysA.every((k) => (a as Record<string, unknown>)[k] === (b as Record<string, unknown>)[k]);\n};\n\nexport const getInitialHighlightedIndex = (\n options: SelectOption[],\n currentValue: unknown,\n): number => {\n const selectedIndex = options.findIndex((opt) => isOptionValueEqual(opt.value, currentValue) && !opt.disabled);\n if (selectedIndex >= 0) {\n return selectedIndex;\n }\n const firstEnabled = options.findIndex((opt) => !opt.disabled);\n return firstEnabled >= 0 ? firstEnabled : -1;\n};\n\nexport const resolveLeftIcon = (props: Record<string, unknown>): string => {\n if (typeof props.leftIcon === 'string') {\n return props.leftIcon;\n }\n const attr = props['left-icon'];\n return typeof attr === 'string' ? attr : '';\n};\n\nexport const getLeftIconName = (icon: string, iconSet: string): string => {\n if (!icon) {\n return '';\n }\n return icon.includes(':') ? icon : `${iconSet}:${icon}`;\n};\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n boxSizing: 'border-box',\n },\n listStyle: 'none',\n padding: '0.5rem 0.625rem',\n fontFamily: theme.value.typography.fontFamily,\n fontSize: '0.875rem',\n fontWeight: '400',\n lineHeight: '1.25rem',\n color: theme.value.colors.gray.main,\n cursor: 'pointer',\n transition: 'background-color 120ms ease, color 120ms ease',\n '&--with-separator': {\n borderBottom: `1px solid ${theme.value.colors.gray.light3}`,\n },\n '&--highlighted': {\n backgroundColor: theme.value.colors.gray.light3,\n borderRadius: '4px',\n boxShadow: 'inset 0 3px #fff, inset 0 -3px #fff',\n },\n '&--selected': {\n backgroundColor: theme.value.colors.primary.light5,\n borderRadius: '4px',\n boxShadow: 'inset 0 3px #fff, inset 0 -3px #fff',\n color: theme.value.colors.primary.main,\n fontWeight: theme.value.typography.fontWeight.semibold,\n },\n '&--disabled': {\n color: theme.value.colors.gray.medium2,\n cursor: 'not-allowed',\n pointerEvents: 'none',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TSelectOptionProps } from './TSelectOption.types';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TSelectOption.styles';\n\nexport const TSelectOption = defineComponent({\n name: 'TSelectOption',\n emits: ['select', 'hover'],\n props: {\n label: String as PropType<TSelectOptionProps['label']>,\n selected: Boolean as PropType<TSelectOptionProps['selected']>,\n highlighted: Boolean as PropType<TSelectOptionProps['highlighted']>,\n disabled: Boolean as PropType<TSelectOptionProps['disabled']>,\n withSeparator: Boolean as PropType<TSelectOptionProps['withSeparator']>,\n },\n setup(props, { slots, emit }) {\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n {\n [`${baseClass.value}--selected`]: props.selected,\n [`${baseClass.value}--highlighted`]: props.highlighted,\n [`${baseClass.value}--disabled`]: props.disabled,\n [`${baseClass.value}--with-separator`]: props.withSeparator,\n },\n ]);\n\n const handleHover = () => {\n if (!props.disabled) {\n emit('hover');\n }\n };\n\n const handleMouseDown = (event: MouseEvent) => {\n event.preventDefault();\n if (!props.disabled) {\n emit('select');\n }\n };\n\n return () => (\n <li\n class={classes.value}\n role=\"option\"\n aria-selected={Boolean(props.selected)}\n onMousedown={handleMouseDown}\n onMouseenter={handleHover}\n >\n {slots.default?.() || props.label}\n </li>\n );\n },\n});\n","import type { ComputedRef, WritableComputedRef } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { SelectOption } from './TSelect.utils';\nimport { ref } from 'vue';\nimport { getInitialHighlightedIndex } from './TSelect.utils';\n\nconst SCROLL_STEP_PX = 36;\n\nexport function useSelectDropdown(\n options: ComputedRef<SelectOption[]>,\n internalValue: WritableComputedRef<SelectOption['value']>,\n disabled: ComputedRef<boolean>,\n) {\n const menuOpen = ref(false);\n const highlightedIndex = ref(-1);\n const wrapperRef = ref<Nullable<HTMLDivElement>>(null);\n const triggerRef = ref<Nullable<HTMLButtonElement>>(null);\n const menuRef = ref<Nullable<HTMLUListElement>>(null);\n const menuHovered = ref(false);\n const isInteractingWithMenu = ref(false);\n\n const openMenu = () => {\n if (disabled.value || !options.value.length) {\n return;\n }\n menuOpen.value = true;\n highlightedIndex.value = getInitialHighlightedIndex(\n options.value,\n internalValue.value,\n );\n };\n\n const closeMenu = () => {\n menuOpen.value = false;\n highlightedIndex.value = -1;\n menuHovered.value = false;\n isInteractingWithMenu.value = false;\n };\n\n const scrollMenuBy = (direction: 1 | -1) => {\n const el = menuRef.value;\n if (!el) {\n return;\n }\n el.scrollBy({ top: direction * SCROLL_STEP_PX, behavior: 'smooth' });\n };\n\n const selectOption = (option: SelectOption) => {\n if (option.disabled) {\n return;\n }\n internalValue.value = option.value;\n closeMenu();\n };\n\n const handleClickTrigger = () => {\n if (menuOpen.value) {\n closeMenu();\n } else {\n openMenu();\n }\n };\n\n const handleBlur = () => {\n requestAnimationFrame(() => {\n if (isInteractingWithMenu.value) {\n return;\n }\n const activeElement = document.activeElement;\n if (!wrapperRef.value?.contains(activeElement)) {\n closeMenu();\n }\n });\n };\n\n const handleMenuInteractionStart = () => {\n isInteractingWithMenu.value = true;\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (disabled.value) {\n return;\n }\n\n if (\n !menuOpen.value\n && ['ArrowDown', 'ArrowUp', 'Enter', ' '].includes(event.key)\n ) {\n event.preventDefault();\n openMenu();\n return;\n }\n\n if (!menuOpen.value) {\n return;\n }\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n scrollMenuBy(1);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n scrollMenuBy(-1);\n } else if (event.key === 'Enter') {\n event.preventDefault();\n const option = options.value[highlightedIndex.value];\n if (option) {\n selectOption(option);\n }\n } else if (event.key === 'Escape' || event.key === 'Tab') {\n closeMenu();\n }\n };\n\n return {\n menuOpen,\n highlightedIndex,\n wrapperRef,\n triggerRef,\n menuRef,\n menuHovered,\n isInteractingWithMenu,\n openMenu,\n closeMenu,\n selectOption,\n handleClickTrigger,\n handleBlur,\n handleMenuInteractionStart,\n handleKeydown,\n scrollMenuBy,\n };\n}\n","import type { PropType } from 'vue';\nimport type { TSelectProps } from './TSelect.types';\nimport { Icon } from '@iconify/vue';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport { useScrollbarThumb } from '../../composables/scrollbarThumb';\nimport { useTheme } from '../../composables/theme';\nimport { useStyles } from './TSelect.styles';\nimport {\n buildSelectOptions,\n getLeftIconName,\n isOptionValueEqual,\n resolveLeftIcon,\n} from './TSelect.utils';\nimport { TSelectOption } from './TSelectOption';\nimport { useSelectDropdown } from './useSelectDropdown';\n\nexport const TSelect = defineComponent({\n name: 'TSelect',\n emits: ['input', 'change', 'update:modelValue', 'focus', 'blur'],\n props: {\n error: Boolean as PropType<TSelectProps['error']>,\n disabled: Boolean as PropType<TSelectProps['disabled']>,\n leftIcon: String as PropType<TSelectProps['leftIcon']>,\n label: String as PropType<TSelectProps['label']>,\n placeholder: String as PropType<TSelectProps['placeholder']>,\n helperText: String as PropType<TSelectProps['helperText']>,\n value: {\n type: [\n String,\n Number,\n Boolean,\n Object,\n Array,\n Function,\n Date,\n ] as PropType<TSelectProps['value']>,\n default: null,\n },\n modelValue: {\n type: [\n String,\n Number,\n Boolean,\n Object,\n Array,\n Function,\n Date,\n ] as PropType<TSelectProps['modelValue']>,\n default: null,\n },\n fullWidth: Boolean as PropType<TSelectProps['fullWidth']>,\n id: String as PropType<TSelectProps['id']>,\n },\n setup(_props, { attrs, emit, slots, expose }) {\n const props = computed(() => merge({}, _props, attrs));\n const theme = useTheme();\n const localValue = ref<TSelectProps['value']>(null);\n\n const baseClass = useStyles();\n const containerClasses = computed(() => [\n baseClass.value,\n `${baseClass.value}__container`,\n {\n [`${baseClass.value}--error`]: props.value.error,\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n },\n ]);\n\n watch(\n () => [props.value.modelValue, props.value.value],\n ([modelValue, value]) => {\n localValue.value = modelValue !== null ? modelValue : value;\n },\n { immediate: true },\n );\n\n const internalValue = computed({\n get: () => {\n if (props.value.modelValue !== null) {\n return props.value.modelValue;\n }\n if (props.value.value !== null) {\n return props.value.value;\n }\n return localValue.value;\n },\n set: (newValue) => {\n localValue.value = newValue;\n emit('update:modelValue', newValue);\n emit('input', newValue);\n emit('change', newValue);\n },\n });\n\n const options = computed(() => buildSelectOptions(slots.default?.() ?? []));\n\n const selectedOption = computed(() => options.value.find((opt) => isOptionValueEqual(opt.value, internalValue.value)));\n const hasSelectedValue = computed(() => Boolean(selectedOption.value));\n const selectedLabel = computed(() => {\n if (selectedOption.value) {\n return selectedOption.value.label;\n }\n if (props.value.placeholder) {\n return props.value.placeholder;\n }\n return '';\n });\n\n const resolvedLeftIcon = computed(() => resolveLeftIcon(props.value as Record<string, unknown>));\n const leftIconName = computed(() => getLeftIconName(resolvedLeftIcon.value, theme.value.iconSet));\n\n const dropdown = useSelectDropdown(\n options,\n internalValue,\n computed(() => Boolean(props.value.disabled)),\n );\n\n const scrollbar = useScrollbarThumb(dropdown.menuRef, {\n onDragStart: () => {\n dropdown.isInteractingWithMenu.value = true;\n },\n onDragEnd: () => {\n requestAnimationFrame(() => {\n dropdown.isInteractingWithMenu.value = false;\n });\n },\n });\n\n watch(\n () => [dropdown.menuOpen.value, options.value.length] as const,\n ([isOpen]) => {\n if (isOpen) {\n requestAnimationFrame(() => scrollbar.update());\n }\n },\n );\n\n const focus = () => dropdown.triggerRef.value?.focus();\n expose({ focus });\n\n return () => (\n <div class={containerClasses.value}>\n {slots.label?.()\n || (props.value.label && (\n <label class={`${baseClass.value}__label`} for={props.value.id}>\n {props.value.label}\n </label>\n ))}\n <div class={`${baseClass.value}__wrapper`}>\n {resolvedLeftIcon.value && (\n <Icon\n icon={leftIconName.value}\n class={[\n `${baseClass.value}__icon`,\n `${baseClass.value}__icon--left`,\n ]}\n />\n )}\n <div\n class={[\n `${baseClass.value}__dropdown`,\n {\n [`${baseClass.value}__dropdown--open`]: dropdown.menuOpen.value,\n },\n ]}\n ref={dropdown.wrapperRef}\n >\n <button\n class={[\n `${baseClass.value}__select`,\n {\n [`${baseClass.value}__select--left-icon`]:\n resolvedLeftIcon.value,\n [`${baseClass.value}__select--placeholder`]:\n !hasSelectedValue.value,\n [`${baseClass.value}__select--open`]: dropdown.menuOpen.value,\n },\n ]}\n disabled={props.value.disabled}\n id={props.value.id}\n onClick={dropdown.handleClickTrigger}\n onFocus={(e: Event) => emit('focus', e)}\n onBlur={(e: Event) => {\n dropdown.handleBlur();\n emit('blur', e);\n }}\n onKeydown={dropdown.handleKeydown}\n ref={dropdown.triggerRef}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={dropdown.menuOpen.value}\n type=\"button\"\n {...attrs}\n >\n <div class={`${baseClass.value}__selected-value`}>\n {selectedLabel.value}\n </div>\n </button>\n\n {dropdown.menuOpen.value && (\n <div\n class={`${baseClass.value}__menu-wrapper`}\n onMousedown={dropdown.handleMenuInteractionStart}\n onMouseup={() => {\n if (!scrollbar.isDragging.value) {\n dropdown.isInteractingWithMenu.value = false;\n }\n }}\n onMouseenter={() => (dropdown.menuHovered.value = true)}\n onMouseleave={() => {\n dropdown.menuHovered.value = false;\n if (!scrollbar.isDragging.value) {\n dropdown.isInteractingWithMenu.value = false;\n }\n }}\n >\n <ul\n class={`${baseClass.value}__menu`}\n role=\"listbox\"\n ref={dropdown.menuRef}\n onScroll={scrollbar.update}\n >\n {options.value.map((option, index) => (\n <TSelectOption\n key={`${String(option.value)}-${index}`}\n label={option.label}\n selected={isOptionValueEqual(option.value, internalValue.value)}\n highlighted={index === dropdown.highlightedIndex.value}\n disabled={option.disabled}\n withSeparator={index < options.value.length - 1}\n onHover={() => (dropdown.highlightedIndex.value = index)}\n onSelect={() => dropdown.selectOption(option)}\n />\n ))}\n </ul>\n <div\n class={[\n `${baseClass.value}__menu-scrollbar`,\n {\n [`${baseClass.value}__menu-scrollbar--visible`]:\n dropdown.menuHovered.value\n && scrollbar.isScrollable.value,\n },\n ]}\n aria-hidden=\"true\"\n >\n <div\n class={`${baseClass.value}__menu-scrollbar-thumb`}\n onMousedown={scrollbar.onThumbMouseDown}\n style={{\n height: `${scrollbar.thumbHeight.value}px`,\n transform: `translateY(${scrollbar.thumbOffset.value}px)`,\n }}\n />\n </div>\n </div>\n )}\n </div>\n </div>\n {slots.helperText?.()\n || (props.value.helperText && (\n <p class={`${baseClass.value}__helper-text`}>\n {props.value.helperText}\n </p>\n ))}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n '&__menu_container': {\n gap: theme.value.spacing,\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n '&__container': {\n width: '358px',\n },\n '&--full-width': {\n width: '100%',\n },\n position: 'relative',\n width: 'fit-content',\n '&__menu': {\n position: 'absolute',\n display: 'none',\n padding: '0.625rem',\n width: '100%',\n background: '#fff',\n boxShadow: '0px 6px 30px 0px rgba(0, 0, 0, 0.10)',\n borderBottomLeftRadius: '0.5rem',\n borderBottomRightRadius: '0.5rem',\n marginTop: '40px',\n zIndex: 20,\n },\n '&--active &__menu': {\n display: 'block',\n },\n '&__divider': {\n width: '100%',\n height: '1px',\n background: theme.value.colors.gray.light3,\n marginBlock: '0.5rem',\n },\n '&__label': {\n display: 'block',\n fontSize: '0.875rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.semibold,\n lineHeight: '1.25rem',\n },\n '&__helper-text': {\n fontSize: '0.75rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.125rem',\n color: theme.value.colors.gray.medium1,\n marginTop: '0.125rem',\n },\n '&__select': {\n display: 'flex',\n width: '100%',\n background: '#fff',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderRadius: theme.value.input.borderRadius,\n padding: '0.25rem 0.5rem',\n gap: '0.5rem',\n height: '32px',\n fontSize: '0.813rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '20px',\n MozAppearance: 'none',\n WebkitAppearance: 'none',\n appearance: 'none',\n backgroundImage:\n \"url(\\\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path fill-rule='evenodd' d='M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z' clip-rule='evenodd' stroke='black' stroke-width='1'/></svg>\\\")\",\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'right 0.7rem top 50%',\n backgroundSize: '0.65rem auto',\n '&:hover': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&:focus': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&:disabled': {\n backgroundColor: theme.value.colors.gray.light3,\n borderColor: theme.value.colors.gray.light3,\n cursor: 'not-allowed',\n },\n },\n '&--error &__select:not(:disabled), &--error &__select:focus': {\n borderColor: theme.value.colors.error,\n },\n '&--error + &__helper-text': {\n color: theme.value.colors.error,\n },\n }));\n\n return baseClass;\n};\n","import type { RendererElement, RendererNode, VNode } from 'vue';\n\ntype Slot = VNode<\n RendererNode,\n RendererElement,\n {\n [key: string]: any;\n }\n>;\n\nexport const getVisibleElements = (slots: Slot[]): Slot[] => {\n const results: Slot[] = [];\n slots?.forEach((slot) => {\n // @ts-expect-error type is missing some properties\n if (slot.type?.name === 'TSelectDropdownItem') {\n results.push(slot);\n } else if (Array.isArray(slot.children)) {\n results.push(...getVisibleElements(slot.children as Slot[]));\n }\n });\n\n return results;\n};\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { TDropdownSelectProps } from './TSelectDropdown.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, onMounted, onUnmounted, ref } from 'vue';\nimport { useStyles } from './TSelectDropdown.styles';\nimport { getVisibleElements } from './TSelectDropdown.utils';\n\nexport const TSelectDropdown = defineComponent({\n name: 'TSelectDropdown',\n props: {\n open: Boolean as PropType<TDropdownSelectProps['open']>,\n label: String as PropType<TDropdownSelectProps['label']>,\n selectedValue: String as PropType<TDropdownSelectProps['selectedValue']>,\n disabled: Boolean as PropType<TDropdownSelectProps['disabled']>,\n helperText: String as PropType<TDropdownSelectProps['helperText']>,\n placeholder: String as PropType<TDropdownSelectProps['placeholder']>,\n error: Boolean as PropType<TDropdownSelectProps['error']>,\n fullWidth: Boolean as PropType<TDropdownSelectProps['fullWidth']>,\n },\n emits: ['cancel', 'click'],\n setup(_props, { slots, attrs, emit }) {\n const props = computed(() => merge({}, _props, attrs));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}__menu_container`,\n {\n [`${baseClass.value}--active`]: props.value.open,\n [`${baseClass.value}--error`]: props.value.error,\n },\n ]);\n const containerClasses = computed(() => [\n baseClass.value,\n `${baseClass.value}__container`,\n {\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n },\n ]);\n\n const container = ref<Nullable<HTMLDivElement>>(null);\n const handleClickOutside = (event: Event) => {\n if (\n props.value.open\n && container.value\n && !container.value.contains(event.target as Node)\n ) {\n emit('cancel');\n }\n };\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n emit('cancel');\n }\n };\n onMounted(() => {\n document.addEventListener('click', handleClickOutside);\n container.value?.addEventListener('keydown', handleKeydown);\n });\n onUnmounted(() => {\n document.removeEventListener('click', handleClickOutside);\n container.value?.removeEventListener('keydown', handleKeydown);\n });\n\n const visibleElements = computed(() => getVisibleElements(slots.default?.() || []));\n\n const handleClick = () => {\n emit('click');\n };\n\n return () => (\n <div class={containerClasses.value}>\n {slots.label?.()\n || (props.value.label && (\n <label class={`${baseClass.value}__label`}>\n {props.value.label}\n </label>\n ))}\n <div ref={container} role=\"menu\" class={classes.value}>\n <button\n class={`${baseClass.value}__select`}\n onClick={handleClick}\n disabled={props.value.disabled}\n type=\"button\"\n >\n {props.value.selectedValue}\n {props.value.placeholder && !props.value.selectedValue && (\n <option\n value=\"\"\n disabled\n selected\n class={`${baseClass.value}__placeholder`}\n >\n {props.value.placeholder}\n </option>\n )}\n </button>\n <div class={`${baseClass.value}__menu`}>\n {visibleElements.value.map((element, index, array) => (\n <div>\n {element}\n {index < array.length - 1 && (\n <div class={`${baseClass.value}__divider`} />\n )}\n </div>\n ))}\n </div>\n </div>\n {slots.helperText?.()\n || (props.value.helperText && (\n <p class={`${baseClass.value}__helper-text`}>\n {props.value.helperText}\n </p>\n ))}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n },\n '*': {\n padding: 0,\n },\n background: '#fff',\n padding: '0.25rem 0.5rem',\n cursor: 'pointer',\n borderRadius: '0.25rem',\n fontFamily: theme.value.typography.fontFamily,\n fontSize: '0.813rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n lineHeight: '1rem',\n color: '#373737',\n marginRight: '2rem',\n '&:hover': {\n background: theme.value.colors.gray.light3,\n },\n '&__label': {\n fontSize: '0.75rem',\n fontStyle: 'normal',\n fontWeight: theme.value.typography.fontWeight.regular,\n color: theme.value.colors.info,\n display: 'inline-block',\n float: 'right',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TSelectDropdownItemprops } from './TSelectDropdownItem.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TSelectDropdownItem.styles';\n\nexport const TSelectDropdownItem = defineComponent({\n name: 'TSelectDropdownItem',\n emits: ['click'],\n props: {\n label: String as PropType<TSelectDropdownItemprops['label']>,\n },\n setup(_props, { slots, emit, attrs }) {\n const props = computed(() => merge({}, _props, attrs));\n\n const baseClass = useStyles();\n\n const handleClick = () => {\n emit('click');\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' && !props.value.disabled) {\n emit('click');\n event.preventDefault();\n }\n };\n\n return () => (\n <div\n class={baseClass.value}\n onClick={handleClick}\n role=\"menuitem\"\n onKeydown={handleKeydown}\n tabindex={0}\n >\n {slots.default?.()}\n {slots.label?.()\n || (props.value.label && (\n <label class={`${baseClass.value}__label`}>\n {props.value.label}\n </label>\n ))}\n </div>\n );\n },\n});\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Accessible toggle switch for binary settings that take effect immediately.\n *\n * Use for \"notifications on/off\", \"dark mode\", \"auto-save\" — anything where the\n * change commits the instant the user toggles it. For form state held until submit,\n * use a checkbox instead; the visual difference signals when the change applies.\n *\n * ## Custom value types\n *\n * Generic over `T` (default `boolean`). To bind v-model to a non-boolean state,\n * declare `trueValue` and `falseValue` together:\n *\n * const status = ref<'active' | 'paused'>('paused')\n * // template: TSwitch v-model=\"status\" :true-value=\"'active'\" :false-value=\"'paused'\"\n *\n * The \"on\" position emits `trueValue`; the \"off\" position emits `falseValue`. Useful\n * for state machines, form payloads with string enums, or anywhere boolean coercion\n * would lose semantic meaning. Reach for it when v-model would otherwise need a\n * derived boolean adapter — not for simple on/off, which is the 95% case.\n *\n * The legacy `value` prop is `boolean`-only; don't mix it with non-boolean generic mode.\n *\n * ## Theming\n *\n * The \"on\" track resolves to `var(--primary-solid)` — the tenant brand.\n * Wrap a subtree in `TThemeProvider` with a brand override to retheme at runtime\n * (no re-renders; CSS variable cascade only).\n */\nexport interface TSwitchProps<T = boolean> {\n /** Visible label rendered next to the switch. Also serves as the accessible name. */\n label?: string;\n\n /** Disables interaction. @defaultValue false */\n disabled?: boolean;\n\n /**\n * Initial / fallback checked state. **Deprecated — prefer `v-model`** (`modelValue`).\n * Kept for the pre-migration `:value` + `@input` API; removal in a future major.\n * Boolean-only — don't mix with non-boolean generic mode.\n */\n value?: boolean;\n\n /** Two-way bound state. Idiomatic usage: `v-model=\"enabled\"`. */\n modelValue?: T;\n\n /** Value emitted when the switch is \"on\". Default: `true` (when T = boolean). */\n trueValue?: T;\n\n /** Value emitted when the switch is \"off\". Default: `false` (when T = boolean). */\n falseValue?: T;\n\n /** Position of the label relative to the switch. @defaultValue 'right' */\n labelPosition?: 'left' | 'right';\n\n /** Explicit id for the underlying control. Auto-generated via `useId()` if omitted. */\n id?: string;\n\n /**\n * Element the outer wrapper renders as. Use `'label'` to make the entire row\n * clickable (native `label for=...` toggles the switch), `'li'` when placing\n * switches inside a `ul`, or a component for polymorphic rendering.\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\nexport interface TSwitchEmits<T = boolean> {\n /** Fires on every toggle (mouse, Space, Enter). Payload is the new value. */\n change: [value: T];\n /** Mirrors `change`. **Deprecated** — use `@change` or `v-model`. */\n input: [value: T];\n}\n\nexport interface TSwitchSlots {\n /** Override the default label rendering. Receives the resolved `label` prop. */\n label?: (props: { label: string | undefined }) => unknown;\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T = boolean\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { Label, Primitive, SwitchRoot, SwitchThumb } from 'reka-ui';\nimport { computed, useId } from 'vue';\n\ndefineOptions({\n name: 'TSwitch',\n inheritAttrs: false,\n});\n\nconst {\n modelValue,\n value,\n trueValue,\n falseValue,\n label,\n labelPosition = 'right',\n disabled,\n id,\n as = 'div',\n} = defineProps<TSwitchProps<T>>();\n\nconst emit = defineEmits<TSwitchEmits<T>>();\ndefineSlots<TSwitchSlots>();\n\nconst model = defineModel<T>();\n// LEGACY COMPAT: folds the deprecated `value` prop into the model so pre-v-model\n// consumers using `:value` + `@input` keep working (still live in webapp-frontend\n// HorizontalToggle / PortalHorizontalField and frontend AtoaSteps). Drop this — with\n// the `value` prop and `input` emit — once those migrate to v-model.\nconst forwardedModelValue = computed<T | undefined>(() => modelValue ?? (value as T | undefined));\n\nconst generatedId = useId();\nconst switchId = computed(() => id ?? generatedId);\n\nconst { wrapperAttrs, controlAttrs } = useForwardedAttrs();\n\nconst onUpdate = (next: T) => {\n model.value = next;\n emit('change', next);\n emit('input', next); // LEGACY COMPAT: alias of `change` for pre-v-model `@input` consumers.\n};\n</script>\n\n<template>\n <Primitive\n v-bind=\"wrapperAttrs\"\n :as\n class=\"t-switch\"\n :data-label-position=\"labelPosition\"\n :data-disabled=\"disabled || undefined\"\n >\n <SwitchRoot\n :id=\"switchId\"\n v-bind=\"controlAttrs\"\n :model-value=\"forwardedModelValue\"\n :true-value\n :false-value\n :disabled\n class=\"t-switch-track\"\n @update:model-value=\"onUpdate\"\n >\n <SwitchThumb class=\"t-switch-thumb\" />\n </SwitchRoot>\n\n <Label\n v-if=\"label || $slots.label\"\n :as=\"as === 'label' ? 'span' : 'label'\"\n :for=\"as === 'label' ? undefined : switchId\"\n class=\"t-switch-label\"\n >\n <slot name=\"label\" :label>\n {{ label }}\n </slot>\n </Label>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n$track-width: 2.5rem;\n$track-height: 1.25rem;\n$thumb-size: 1rem;\n$thumb-inset: 2px;\n$thumb-translate: calc(#{$track-width} - #{$thumb-size} - #{$thumb-inset} - #{$thumb-inset});\n\n.t-switch {\n display: inline-flex;\n align-items: center;\n gap: var(--space-8);\n\n &[data-label-position='left'] {\n flex-direction: row-reverse;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: var(--opacity-50);\n }\n}\n\n.t-switch-track {\n position: relative;\n display: inline-flex;\n flex-shrink: 0;\n width: $track-width;\n height: $track-height;\n padding: 0;\n border: 0;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n cursor: pointer;\n outline: var(--focus-ring-width) solid transparent;\n outline-offset: var(--focus-ring-offset);\n transition:\n background-color var(--motion-control-duration) var(--motion-control-easing),\n outline-color var(--motion-control-duration) var(--motion-control-easing),\n box-shadow var(--motion-control-duration) var(--motion-control-easing);\n\n &[data-state='checked'] {\n background: var(--primary-solid);\n }\n\n &:not([data-disabled]):hover {\n background: var(--neutral-bg-hover);\n\n &[data-state='checked'] {\n background: var(--primary-solid-hover);\n }\n }\n\n &[data-disabled]:not([data-state='checked']) {\n background: var(--neutral-bg-subtle);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline-color: var(--primary-border);\n box-shadow: 0 0 0 var(--focus-ring-halo-width) var(--color-primary-alpha-5);\n }\n}\n\n.t-switch-thumb {\n display: block;\n width: $thumb-size;\n height: $thumb-size;\n margin: $thumb-inset;\n border-radius: var(--radius-full);\n background: var(--color-base-white);\n box-shadow: var(--shadow-sm);\n transition:\n transform var(--motion-control-duration) var(--motion-control-easing),\n box-shadow var(--motion-control-duration) var(--motion-control-easing);\n will-change: transform;\n\n &[data-state='checked'] {\n transform: translateX($thumb-translate);\n }\n\n .t-switch-track:not([data-disabled]):active & {\n box-shadow: none;\n }\n\n .t-switch-track[data-disabled] & {\n box-shadow: none;\n }\n}\n\n.t-switch-label {\n font-family: var(--font-family-base);\n font-size: var(--font-b2-font-size);\n line-height: var(--font-b2-line-height);\n font-weight: var(--font-weight-regular);\n color: var(--neutral-text-contrast);\n cursor: pointer;\n user-select: none;\n\n .t-switch[data-disabled] & {\n cursor: not-allowed;\n color: var(--neutral-solid);\n }\n}\n</style>\n","<script lang=\"ts\">\nimport type { AsTag } from 'reka-ui';\n\n/**\n * Accessible toggle switch for binary settings that take effect immediately.\n *\n * Use for \"notifications on/off\", \"dark mode\", \"auto-save\" — anything where the\n * change commits the instant the user toggles it. For form state held until submit,\n * use a checkbox instead; the visual difference signals when the change applies.\n *\n * ## Custom value types\n *\n * Generic over `T` (default `boolean`). To bind v-model to a non-boolean state,\n * declare `trueValue` and `falseValue` together:\n *\n * const status = ref<'active' | 'paused'>('paused')\n * // template: TSwitch v-model=\"status\" :true-value=\"'active'\" :false-value=\"'paused'\"\n *\n * The \"on\" position emits `trueValue`; the \"off\" position emits `falseValue`. Useful\n * for state machines, form payloads with string enums, or anywhere boolean coercion\n * would lose semantic meaning. Reach for it when v-model would otherwise need a\n * derived boolean adapter — not for simple on/off, which is the 95% case.\n *\n * The legacy `value` prop is `boolean`-only; don't mix it with non-boolean generic mode.\n *\n * ## Theming\n *\n * The \"on\" track resolves to `var(--primary-solid)` — the tenant brand.\n * Wrap a subtree in `TThemeProvider` with a brand override to retheme at runtime\n * (no re-renders; CSS variable cascade only).\n */\nexport interface TSwitchProps<T = boolean> {\n /** Visible label rendered next to the switch. Also serves as the accessible name. */\n label?: string;\n\n /** Disables interaction. @defaultValue false */\n disabled?: boolean;\n\n /**\n * Initial / fallback checked state. **Deprecated — prefer `v-model`** (`modelValue`).\n * Kept for the pre-migration `:value` + `@input` API; removal in a future major.\n * Boolean-only — don't mix with non-boolean generic mode.\n */\n value?: boolean;\n\n /** Two-way bound state. Idiomatic usage: `v-model=\"enabled\"`. */\n modelValue?: T;\n\n /** Value emitted when the switch is \"on\". Default: `true` (when T = boolean). */\n trueValue?: T;\n\n /** Value emitted when the switch is \"off\". Default: `false` (when T = boolean). */\n falseValue?: T;\n\n /** Position of the label relative to the switch. @defaultValue 'right' */\n labelPosition?: 'left' | 'right';\n\n /** Explicit id for the underlying control. Auto-generated via `useId()` if omitted. */\n id?: string;\n\n /**\n * Element the outer wrapper renders as. Use `'label'` to make the entire row\n * clickable (native `label for=...` toggles the switch), `'li'` when placing\n * switches inside a `ul`, or a component for polymorphic rendering.\n * @defaultValue 'div'\n */\n as?: AsTag;\n}\n\nexport interface TSwitchEmits<T = boolean> {\n /** Fires on every toggle (mouse, Space, Enter). Payload is the new value. */\n change: [value: T];\n /** Mirrors `change`. **Deprecated** — use `@change` or `v-model`. */\n input: [value: T];\n}\n\nexport interface TSwitchSlots {\n /** Override the default label rendering. Receives the resolved `label` prop. */\n label?: (props: { label: string | undefined }) => unknown;\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T = boolean\">\nimport { useForwardedAttrs } from '@composables/forwardedAttrs';\nimport { Label, Primitive, SwitchRoot, SwitchThumb } from 'reka-ui';\nimport { computed, useId } from 'vue';\n\ndefineOptions({\n name: 'TSwitch',\n inheritAttrs: false,\n});\n\nconst {\n modelValue,\n value,\n trueValue,\n falseValue,\n label,\n labelPosition = 'right',\n disabled,\n id,\n as = 'div',\n} = defineProps<TSwitchProps<T>>();\n\nconst emit = defineEmits<TSwitchEmits<T>>();\ndefineSlots<TSwitchSlots>();\n\nconst model = defineModel<T>();\n// LEGACY COMPAT: folds the deprecated `value` prop into the model so pre-v-model\n// consumers using `:value` + `@input` keep working (still live in webapp-frontend\n// HorizontalToggle / PortalHorizontalField and frontend AtoaSteps). Drop this — with\n// the `value` prop and `input` emit — once those migrate to v-model.\nconst forwardedModelValue = computed<T | undefined>(() => modelValue ?? (value as T | undefined));\n\nconst generatedId = useId();\nconst switchId = computed(() => id ?? generatedId);\n\nconst { wrapperAttrs, controlAttrs } = useForwardedAttrs();\n\nconst onUpdate = (next: T) => {\n model.value = next;\n emit('change', next);\n emit('input', next); // LEGACY COMPAT: alias of `change` for pre-v-model `@input` consumers.\n};\n</script>\n\n<template>\n <Primitive\n v-bind=\"wrapperAttrs\"\n :as\n class=\"t-switch\"\n :data-label-position=\"labelPosition\"\n :data-disabled=\"disabled || undefined\"\n >\n <SwitchRoot\n :id=\"switchId\"\n v-bind=\"controlAttrs\"\n :model-value=\"forwardedModelValue\"\n :true-value\n :false-value\n :disabled\n class=\"t-switch-track\"\n @update:model-value=\"onUpdate\"\n >\n <SwitchThumb class=\"t-switch-thumb\" />\n </SwitchRoot>\n\n <Label\n v-if=\"label || $slots.label\"\n :as=\"as === 'label' ? 'span' : 'label'\"\n :for=\"as === 'label' ? undefined : switchId\"\n class=\"t-switch-label\"\n >\n <slot name=\"label\" :label>\n {{ label }}\n </slot>\n </Label>\n </Primitive>\n</template>\n\n<style scoped lang=\"scss\">\n$track-width: 2.5rem;\n$track-height: 1.25rem;\n$thumb-size: 1rem;\n$thumb-inset: 2px;\n$thumb-translate: calc(#{$track-width} - #{$thumb-size} - #{$thumb-inset} - #{$thumb-inset});\n\n.t-switch {\n display: inline-flex;\n align-items: center;\n gap: var(--space-8);\n\n &[data-label-position='left'] {\n flex-direction: row-reverse;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: var(--opacity-50);\n }\n}\n\n.t-switch-track {\n position: relative;\n display: inline-flex;\n flex-shrink: 0;\n width: $track-width;\n height: $track-height;\n padding: 0;\n border: 0;\n border-radius: var(--radius-full);\n background: var(--neutral-bg);\n cursor: pointer;\n outline: var(--focus-ring-width) solid transparent;\n outline-offset: var(--focus-ring-offset);\n transition:\n background-color var(--motion-control-duration) var(--motion-control-easing),\n outline-color var(--motion-control-duration) var(--motion-control-easing),\n box-shadow var(--motion-control-duration) var(--motion-control-easing);\n\n &[data-state='checked'] {\n background: var(--primary-solid);\n }\n\n &:not([data-disabled]):hover {\n background: var(--neutral-bg-hover);\n\n &[data-state='checked'] {\n background: var(--primary-solid-hover);\n }\n }\n\n &[data-disabled]:not([data-state='checked']) {\n background: var(--neutral-bg-subtle);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline-color: var(--primary-border);\n box-shadow: 0 0 0 var(--focus-ring-halo-width) var(--color-primary-alpha-5);\n }\n}\n\n.t-switch-thumb {\n display: block;\n width: $thumb-size;\n height: $thumb-size;\n margin: $thumb-inset;\n border-radius: var(--radius-full);\n background: var(--color-base-white);\n box-shadow: var(--shadow-sm);\n transition:\n transform var(--motion-control-duration) var(--motion-control-easing),\n box-shadow var(--motion-control-duration) var(--motion-control-easing);\n will-change: transform;\n\n &[data-state='checked'] {\n transform: translateX($thumb-translate);\n }\n\n .t-switch-track:not([data-disabled]):active & {\n box-shadow: none;\n }\n\n .t-switch-track[data-disabled] & {\n box-shadow: none;\n }\n}\n\n.t-switch-label {\n font-family: var(--font-family-base);\n font-size: var(--font-b2-font-size);\n line-height: var(--font-b2-line-height);\n font-weight: var(--font-weight-regular);\n color: var(--neutral-text-contrast);\n cursor: pointer;\n user-select: none;\n\n .t-switch[data-disabled] & {\n cursor: not-allowed;\n color: var(--neutral-solid);\n }\n}\n</style>\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color: theme.value.typography.color,\n fontFamily: theme.value.typography.fontFamily,\n },\n '&__ul': {\n display: 'flex',\n listStyleType: 'none',\n gap: '1.5rem',\n },\n '&__button': {\n backgroundColor: 'transparent',\n border: '0',\n outline: 'none',\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n textAlign: 'center',\n '&:hover': {\n cursor: 'pointer',\n fontWeight: theme.value.typography.fontWeight.semibold,\n },\n },\n '&__not-selected': {\n '&:hover': {\n '&:after': {\n content: '\"\"',\n float: 'left',\n background: theme.value.colors.primary.light1,\n width: '100%',\n height: '0.25rem',\n borderRadius: '0.5rem',\n },\n },\n },\n '&__selected': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n '&:after': {\n content: '\"\"',\n float: 'left',\n background: theme.value.colors.primary.main,\n width: '100%',\n height: '0.25rem',\n borderRadius: '0.5rem',\n },\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TTabBarProps } from './TTabBar.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport { useStyles } from './TTabBar.styles';\n\nexport const TTabBar = defineComponent({\n name: 'TTabBar',\n emits: ['input', 'change', 'update:modelValue'],\n props: {\n labels: Array as PropType<TTabBarProps['labels']>,\n value: String as PropType<TTabBarProps['value']>,\n modelValue: String as PropType<TTabBarProps['modelValue']>,\n },\n setup(_props, { attrs, emit }) {\n const props = computed(() => merge({}, _props, attrs));\n const baseClass = useStyles();\n\n const selected = ref(props.value.modelValue !== undefined\n ? props.value.modelValue\n : props.value.value);\n watch([() => props.value.modelValue, () => props.value.value], () => {\n selected.value\n = props.value.modelValue !== undefined\n ? props.value.modelValue\n : props.value.value;\n });\n\n const handleOnClick = (label: string) => {\n emit('update:modelValue', label);\n emit('input', label);\n emit('change', label);\n selected.value = label;\n };\n\n return () => (\n <nav class={[baseClass.value]}>\n <ul\n class={[`${baseClass.value}__ul`, `${baseClass.value}`]}\n role=\"tablist\"\n >\n {props.value.labels?.map((label) => (\n <li role=\"tab\" aria-selected={selected.value === label} key={label}>\n <button\n class={[\n `${baseClass.value}__button`,\n {\n [`${baseClass.value}__selected`]: selected.value === label,\n [`${baseClass.value}__not-selected`]:\n selected.value !== label,\n },\n ]}\n onClick={() => handleOnClick(label)}\n >\n {label}\n </button>\n </li>\n ))}\n </ul>\n </nav>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n paddingBottom: '0.625rem',\n color: theme.value.colors.gray.main,\n alignItems: 'center',\n whiteSpace: 'nowrap',\n cursor: 'pointer',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '14rem',\n textWrap: 'nowrap',\n WebkitLineClamp: 1,\n WebkitBoxOrient: 'vertical',\n '&--selected': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n borderBottom: `0.125rem solid ${theme.value.colors.primary.dark}`,\n marginBottom: '-0.125rem',\n },\n '&__dropdown-trigger': {\n fontWeight: theme.value.typography.fontWeight.semibold,\n color: theme.value.colors.primary.dark,\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TabSelectionProvider } from '../TTabBarExtended.types';\nimport type { TTabProps } from './TTab.types';\nimport { computed, defineComponent, inject } from 'vue';\nimport { useStyles } from './TTab.styles';\n\nexport const TTab = defineComponent({\n name: 'TTab',\n props: {\n id: {\n type: String as PropType<TTabProps['id']>,\n required: true,\n },\n selected: {\n type: Boolean as PropType<TTabProps['selected']>,\n default: false,\n },\n value: {\n type: [String, Number, Boolean, Object, Array] as PropType<\n TTabProps['value']\n >,\n required: true,\n },\n },\n setup(props, { slots }) {\n const baseClass = useStyles();\n\n const provider = inject<TabSelectionProvider>('tabSelection');\n if (!provider) {\n throw new Error('tabSelection provider missing.');\n }\n const { selectTab } = provider;\n\n const handleClick = () => {\n selectTab(props.id);\n };\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Enter') {\n return;\n }\n\n event.preventDefault();\n selectTab(props.id);\n };\n\n const ariaLabel = computed(() => (props.selected ? 'selected' : ''));\n\n return () => (\n <div\n class={[\n baseClass.value,\n ariaLabel.value === 'selected' ? `${baseClass.value}--selected` : '',\n ]}\n aria-label={ariaLabel.value}\n onClick={handleClick}\n onKeydown={handleKeydown}\n role=\"tab\"\n tabindex={0}\n >\n {slots.default?.()}\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n width: '100%',\n borderBottom: `0.125rem solid ${theme.value.colors.gray.medium2}`,\n display: 'flex',\n gap: '2.5rem',\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type {\n IdentifiedTab,\n TTabBarExtendedProps,\n} from './TTabBarExtended.types';\nimport { computed, defineComponent, provide, ref } from 'vue';\nimport { TDropdown, TDropdownItem } from '../TDropdown';\nimport { TTab } from './TTab';\nimport { useStyles as useTTabStyles } from './TTab/TTab.styles';\nimport { useStyles } from './TTabBarExtended.styles';\n\nexport const TTabBarExtended = defineComponent({\n name: 'TTabBarExtended',\n emits: ['select'],\n props: {\n tabs: {\n type: Array as PropType<TTabBarExtendedProps['tabs']>,\n required: true,\n },\n maxTabs: {\n type: Number as PropType<TTabBarExtendedProps['maxTabs']>,\n },\n initialLabel: {\n type: String as PropType<TTabBarExtendedProps['initialLabel']>,\n },\n selectedValue: {\n type: [String, Number, Object] as PropType<TTabBarExtendedProps['selectedValue']>,\n },\n },\n setup(props, { emit }) {\n const baseClass = useStyles();\n const tTabBaseClass = useTTabStyles();\n\n const identifiedTabs = computed(() => props.tabs.map((tab, index): IdentifiedTab => ({\n id: `${index}`,\n label: tab.label,\n value: tab.value,\n })));\n\n const initialTab = computed(() => {\n if (!props.initialLabel) {\n return identifiedTabs.value[0];\n }\n\n return (\n identifiedTabs.value.find((tab) => tab.label === props.initialLabel)\n ?? identifiedTabs.value[0]\n );\n });\n const selectedTab = ref(initialTab.value);\n\n const isControlled = computed(() => props.selectedValue !== undefined);\n const effectiveSelectedTab = computed(() => {\n if (isControlled.value) {\n const found = identifiedTabs.value.find((tab) => tab.value === props.selectedValue);\n return found ?? identifiedTabs.value[0];\n }\n return selectedTab.value;\n });\n\n const isDropdownOpen = ref(false);\n\n const selectTab = (index: string) => {\n const newSelectedTab = identifiedTabs.value.find((tab) => tab.id === index);\n if (!newSelectedTab) {\n throw new Error('No tab was found.');\n }\n if (effectiveSelectedTab.value.id === index) {\n return;\n }\n\n if (!isControlled.value) {\n selectedTab.value = newSelectedTab;\n }\n\n emit('select', newSelectedTab.value);\n };\n provide('tabSelection', { selectTab });\n\n const amountOfTabs = computed(() => identifiedTabs.value.length);\n const maxAmountOfTabs = computed(() => Math.min(amountOfTabs.value, props.maxTabs || Infinity));\n const visibleTabs = computed(() => {\n if (amountOfTabs.value === maxAmountOfTabs.value) {\n return identifiedTabs.value;\n }\n\n const tabs = identifiedTabs.value.slice(0, maxAmountOfTabs.value - 1);\n const selectedTabIsAlreadyVisible = tabs.some(({ id }) => id === effectiveSelectedTab.value.id);\n if (selectedTabIsAlreadyVisible) {\n tabs.push(identifiedTabs.value[maxAmountOfTabs.value - 1]);\n } else {\n tabs.push(effectiveSelectedTab.value);\n }\n\n return tabs;\n });\n\n const shouldDropdownExist = computed(() => visibleTabs.value.length < identifiedTabs.value.length);\n\n const toggleIsDropdownOpen = () => {\n isDropdownOpen.value = !isDropdownOpen.value;\n };\n const closeDropdown = () => {\n isDropdownOpen.value = false;\n };\n\n const handleClickInDropdownTrigger = () => {\n toggleIsDropdownOpen();\n };\n const handleOnKeyPressInDropdownTrigger = (event: KeyboardEvent) => {\n event.preventDefault();\n\n if (event.key === 'Enter') {\n toggleIsDropdownOpen();\n }\n };\n\n const handleClickInDropdownItem = (index: string) => {\n selectTab(index);\n closeDropdown();\n };\n\n const Dropdown = () => (\n <TDropdown\n open={isDropdownOpen.value}\n position=\"center\"\n onCancel={toggleIsDropdownOpen}\n >\n {{\n trigger: () => (\n <div\n class={[\n tTabBaseClass.value,\n `${tTabBaseClass.value}__dropdown-trigger`,\n ]}\n onClick={handleClickInDropdownTrigger}\n onKeypress={handleOnKeyPressInDropdownTrigger}\n tabindex={0}\n role=\"button\"\n >\n . . .\n </div>\n ),\n default: () => identifiedTabs.value.map((tab) => (\n <TDropdownItem\n disabled={effectiveSelectedTab.value.id === tab.id}\n onClick={() => handleClickInDropdownItem(tab.id)}\n >\n {tab.label}\n </TDropdownItem>\n )),\n }}\n </TDropdown>\n );\n\n return () => (\n <nav role=\"navigation\" class={[baseClass.value]}>\n {visibleTabs.value.map((tab) => (\n <TTab\n key={`${tab.label}-${tab.id}`}\n id={tab.id}\n selected={effectiveSelectedTab.value.id === tab.id}\n value={tab.value}\n >\n {tab.label}\n </TTab>\n ))}\n {shouldDropdownExist.value ? <Dropdown /> : null}\n </nav>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n color: theme.value.typography.color,\n fontFamily: theme.value.typography.fontFamily,\n },\n '&__container': {\n gap: theme.value.spacing,\n display: 'flex',\n flexDirection: 'column',\n width: '358px',\n },\n '&__label': {\n display: 'block',\n fontSize: '14px',\n fontStyle: 'normal',\n fontWeight: 600,\n lineHeight: '20px',\n },\n '&__textarea-wrapper': {\n position: 'relative',\n },\n '&__textarea': {\n display: 'flex',\n width: '100%',\n height: '80px',\n overflow: 'auto',\n resize: 'none',\n background: '#FFF',\n border: `1px solid ${theme.value.colors.gray.light2}`,\n borderRadius: theme.value.input.borderRadius,\n padding: '6px 8px',\n gap: '8px',\n fontSize: '13px',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: '22px',\n '&::placeholder': {\n color: theme.value.colors.gray.medium2,\n },\n '&:hover': {\n borderColor: theme.value.colors.gray.medium2,\n },\n '&:focus': {\n borderColor: theme.value.colors.primary.light1,\n },\n '&:focus-visible': {\n outline: 'none',\n },\n '&:disabled': {\n background: theme.value.colors.gray.light3,\n borderColor: theme.value.colors.gray.light3,\n },\n },\n '&__textarea--auto-resize': {\n overflowY: 'auto',\n },\n '&__helper-text': {\n fontSize: '12px',\n fontStyle: 'normal',\n fontWeight: 400,\n lineHeight: '18px',\n color: theme.value.colors.gray.medium1,\n },\n '&--error &__textarea, &error &__textarea:focus': {\n borderColor: theme.value.colors.error,\n },\n '&--error &__helper-text': {\n color: theme.value.colors.error,\n },\n '&--full-width': {\n width: '100%',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { Nullable } from '../../types';\nimport type { TTextAreaProps } from './TTextArea.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent, nextTick, ref, watch } from 'vue';\nimport { useStyles } from './TTextArea.styles';\n\nconst DEFAULT_AUTO_RESIZE_ROWS = 1;\n\nexport const TTextArea = defineComponent({\n name: 'TTextArea',\n emits: ['input', 'change', 'update:modelValue', 'focus', 'blur'],\n props: {\n id: String as PropType<TTextAreaProps['id']>,\n value: String as PropType<TTextAreaProps['value']>,\n modelValue: String as PropType<TTextAreaProps['modelValue']>,\n label: String as PropType<TTextAreaProps['label']>,\n error: Boolean as PropType<TTextAreaProps['error']>,\n disabled: Boolean as PropType<TTextAreaProps['disabled']>,\n placeholder: String as PropType<TTextAreaProps['placeholder']>,\n helperText: String as PropType<TTextAreaProps['helperText']>,\n fullWidth: Boolean as PropType<TTextAreaProps['fullWidth']>,\n maxlength: Number as PropType<TTextAreaProps['maxlength']>,\n autoResize: Boolean as PropType<TTextAreaProps['autoResize']>,\n maxRows: {\n type: Number as PropType<TTextAreaProps['maxRows']>,\n default: undefined,\n },\n },\n setup(_props, { attrs, emit, slots, expose }) {\n const props = computed(() => merge({}, _props, attrs));\n const baseClass = useStyles();\n\n const internalValue = computed({\n get: () => (props.value.modelValue !== undefined\n ? props.value.modelValue\n : props.value.value),\n set: (newValue) => {\n emit('update:modelValue', newValue);\n emit('input', newValue);\n emit('change', newValue);\n },\n });\n\n const resizeTextarea = () => {\n const el = textarea.value;\n if (!el || !props.value.autoResize) {\n return;\n }\n el.style.height = 'auto';\n const styles = getComputedStyle(el);\n const borderTop = Number.parseFloat(styles.borderTopWidth);\n const borderBottom = Number.parseFloat(styles.borderBottomWidth);\n const maxRows = props.value.maxRows;\n if (maxRows) {\n const lineHeight = Number.parseFloat(styles.lineHeight);\n const paddingTop = Number.parseFloat(styles.paddingTop);\n const paddingBottom = Number.parseFloat(styles.paddingBottom);\n const maxHeight\n = lineHeight * maxRows + paddingTop + paddingBottom + borderTop + borderBottom;\n el.style.maxHeight = `${maxHeight}px`;\n }\n el.style.height = `${el.scrollHeight + borderTop + borderBottom}px`;\n };\n\n const handleInput = (event: Event) => {\n internalValue.value = (event.target as HTMLTextAreaElement).value;\n resizeTextarea();\n };\n\n const handleFocus = (event: Event) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: Event) => {\n emit('blur', event);\n };\n\n const textarea = ref<Nullable<HTMLTextAreaElement>>(null);\n const focus = () => {\n textarea.value?.focus();\n };\n expose({ focus });\n\n watch(\n () => internalValue.value,\n async () => {\n if (!props.value.autoResize) {\n return;\n }\n await nextTick();\n resizeTextarea();\n },\n );\n\n return () => (\n <div\n class={[\n baseClass.value,\n `${baseClass.value}__container`,\n {\n [`${baseClass.value}--error`]: props.value.error,\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n [`${baseClass.value}--multiline`]: props.value.multiline,\n },\n ]}\n >\n {slots.label?.()\n || (props.value.label && (\n <label class={[`${baseClass.value}__label`]} for={props.value.id}>\n {props.value.label}\n </label>\n ))}\n <div class={`${baseClass.value}__textarea-wrapper`}>\n <textarea\n {...attrs}\n id={props.value.id}\n class={[\n `${baseClass.value}__textarea`,\n { [`${baseClass.value}__textarea--auto-resize`]: props.value.autoResize },\n ]}\n style={props.value.autoResize ? { height: 'auto' } : undefined}\n rows={props.value.autoResize ? DEFAULT_AUTO_RESIZE_ROWS : undefined}\n placeholder={props.value.placeholder}\n value={internalValue.value}\n onInput={handleInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n disabled={props.value.disabled}\n maxlength={props.value.maxlength}\n ref={textarea}\n />\n </div>\n {slots.helperText?.()\n || (props.value.helperText && (\n <p class={`${baseClass.value}__helper-text`}>\n {props.value.helperText}\n </p>\n ))}\n </div>\n );\n },\n});\n","import type { PropType } from 'vue';\nimport type { TThemeOverride } from '../../theme/utils';\nimport { computed, defineComponent, h, provide } from 'vue';\nimport { injectionKey } from '../../composables/theme';\nimport { createTheme } from '../../theme/utils';\n\n/**\n * Props for `<TThemeProvider>` — root component that injects design tokens for a subtree.\n *\n * ## When to use\n *\n * Wrap any subtree that needs a different brand color than the library default\n * (Toku purple). Typical placements:\n *\n * - **App root**: matches one brand for the entire app (e.g. Toku's webapp uses defaults).\n * - **Per-tenant subtree**: multi-tenant white-label apps inject the tenant's brand\n * per request (e.g. payment-portal-frontend wraps each tenant's view).\n *\n * Without a `<TThemeProvider>`, components render with the default brand from\n * `toku-ui/tokens.css`. With one, the wrapped subtree gets a regenerated brand ramp.\n *\n * ## Basic usage\n *\n * ```vue\n * <script setup>\n * import { TThemeProvider } from 'toku-ui';\n * </script>\n *\n * <template>\n * <TThemeProvider :theme=\"{ colors: { brand: { base: '#FF6600' } } }\">\n * <App />\n * </TThemeProvider>\n * </template>\n * ```\n *\n * ## How it works\n *\n * The provider renders a `<div class=\"toku-theme\">` wrapper with the brand-derived CSS\n * variables set inline. Descendant components reading `var(--color-bg-primary-default)`\n * (and every other brand-derived semantic) resolve to the new brand color via standard\n * CSS-variable cascade. **Zero Vue re-renders** — only browser CSS recalc.\n */\nexport interface TThemeProviderProps {\n /**\n * Theme override. Pass `{ colors: { brand: { base: '#hex' } } }` (canonical) or the\n * legacy `{ colors: { primary: { main: '#hex' } } }` shape. Both regenerate the\n * 12-step brand ramp + alpha twin and propagate via CSS variables to descendants.\n *\n * Omit the prop entirely to use the library defaults (Toku purple).\n *\n * @example\n * ```vue\n * <!-- Tenant-specific brand -->\n * <TThemeProvider :theme=\"{ colors: { brand: { base: '#FF6600' } } }\">\n * <PaymentForm />\n * </TThemeProvider>\n * ```\n */\n theme?: TThemeOverride;\n}\n\nexport const TThemeProvider = defineComponent({\n name: 'TThemeProvider',\n inheritAttrs: false,\n props: {\n theme: {\n type: Object as PropType<TThemeProviderProps['theme']>,\n default: () => ({}),\n },\n },\n setup(props, { slots, attrs }) {\n const theme = computed(() => createTheme(props.theme ?? {}));\n\n provide(injectionKey, theme);\n\n return () => {\n const { cssVars } = theme.value;\n // Pass class + style as arrays so Vue normalizes every supported binding\n // shape (string, array, or object). Spreading attrs.style would break when\n // it's a string ('display:flex' → { 0: 'd', 1: 'i', ... }); same risk for class.\n return h(\n 'div',\n {\n ...attrs,\n class: ['toku-theme', attrs.class],\n style: cssVars ? [attrs.style, cssVars] : attrs.style,\n },\n slots.default?.(),\n );\n };\n },\n});\n","import { onBeforeUnmount, onMounted } from 'vue';\n\nexport function useClickOutside(\n target: () => HTMLElement | null,\n callback: () => void,\n) {\n const handleClick = (event: MouseEvent) => {\n const el = target();\n if (el && !el.contains(event.target as Node)) {\n callback();\n }\n };\n\n onMounted(() => {\n document.addEventListener('click', handleClick);\n });\n\n onBeforeUnmount(() => {\n document.removeEventListener('click', handleClick);\n });\n}\n","import type { ComputedRef } from 'vue';\nimport type { TTooltipProps } from '../components/TTooltip/TTooltip.types';\nimport { useClickOutside } from '@/composables/click';\nimport { computed, ref } from 'vue';\n\nexport const useTooltip = (trigger: ComputedRef<TTooltipProps['trigger']>) => {\n const isVisible = ref(false);\n let hideTimeout: ReturnType<typeof setTimeout> | null = null;\n\n const show = () => {\n isVisible.value = true;\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n }\n };\n const hide = () => (isVisible.value = false);\n const enqueueHide = () => {\n const HIDE_DELAY_IN_SECONDS = 0.1;\n hideTimeout = setTimeout(hide, HIDE_DELAY_IN_SECONDS * 1000);\n };\n\n const triggerHandlers = {\n hover: {\n onMouseenter: show,\n onMouseleave: enqueueHide,\n },\n click: {\n onClick: () => (isVisible.value ? hide() : show()),\n },\n };\n const triggerHandler = computed(() => triggerHandlers[trigger.value ?? 'hover']);\n\n const wrapperRef = ref<HTMLElement | null>(null);\n useClickOutside(() => wrapperRef.value, hide);\n\n return {\n isVisible,\n triggerHandler,\n wrapperRef,\n };\n};\n","import { css } from '@emotion/css';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n position: 'relative',\n width: 'fit-content',\n '&, *': {\n padding: 0,\n margin: 0,\n boxSizing: 'border-box',\n },\n '&__tooltip': {\n display: 'none',\n position: 'absolute',\n width: 'fit-content',\n background: '#fff',\n boxShadow: '3px 4px 25px 0px #26323826',\n borderRadius: '1rem',\n padding: '0.75rem 1rem',\n whiteSpace: 'nowrap',\n fontSize: '0.75rem',\n weight: theme.value.typography.fontWeight.regular,\n lineHeight: '1.125rem',\n '&:before': {\n content: '\"\"',\n width: 0,\n height: 0,\n position: 'absolute',\n borderStyle: 'solid',\n },\n },\n '&--visible &__tooltip': {\n display: 'block',\n },\n '&--top &__tooltip': {\n marginBottom: '1.5rem',\n left: '50%',\n bottom: '100%',\n transform: 'translateX(-50%)',\n background: '#fff',\n '&:before': {\n left: '50%',\n top: '99%',\n transform: 'translateX(-50%)',\n borderWidth: '15px 7.5px 0px 7.5px',\n borderColor: '#fff transparent transparent transparent',\n },\n },\n '&--right &__tooltip': {\n marginLeft: '1.5rem',\n top: '50%',\n left: '100%',\n transform: 'translateY(-50%)',\n '&:before': {\n top: '50%',\n right: '99%',\n transform: 'translateY(-50%)',\n borderWidth: '7.5px 15px 7.5px 0',\n borderColor: 'transparent #fff transparent transparent',\n },\n },\n '&--bottom &__tooltip': {\n marginTop: '1.5rem',\n left: '50%',\n top: '100%',\n transform: 'translateX(-50%)',\n '&:before': {\n left: '50%',\n bottom: '99%',\n transform: 'translateX(-50%)',\n borderWidth: '0 7.5px 15px 7.5px',\n borderColor: 'transparent transparent #fff transparent',\n },\n },\n '&--left &__tooltip': {\n marginRight: '1.5rem',\n top: '50%',\n right: '100%',\n transform: 'translateY(-50%)',\n '&:before': {\n top: '50%',\n left: '99%',\n transform: 'translateY(-50%)',\n borderWidth: '7.5px 0px 7.5px 15px',\n borderColor: 'transparent transparent transparent #fff',\n },\n },\n '&--multilined &__tooltip': {\n whiteSpace: 'normal',\n width: 'max-content',\n },\n '&--small &__tooltip': {\n maxWidth: '25ch',\n },\n '&--medium &__tooltip': {\n maxWidth: '30ch',\n },\n '&--large &__tooltip': {\n maxWidth: '35ch',\n },\n }));\n\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TTooltipProps } from './TTooltip.types';\nimport { useTooltip } from '@/composables/tooltip';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { useStyles } from './TTooltip.styles';\n\nconst defaultProps = {\n position: 'right',\n size: 'medium',\n trigger: 'hover',\n};\n\nexport const TTooltip = defineComponent({\n name: 'TTooltip',\n props: {\n label: String as PropType<TTooltipProps['label']>,\n position: String as PropType<TTooltipProps['position']>,\n multilined: Boolean as PropType<TTooltipProps['multilined']>,\n size: String as PropType<TTooltipProps['size']>,\n trigger: String as PropType<TTooltipProps['trigger']>,\n },\n setup(_props, { slots, attrs }) {\n const props = computed(() => merge({}, defaultProps, _props, attrs));\n const trigger = computed(() => props.value.trigger);\n\n const { isVisible, wrapperRef, triggerHandler } = useTooltip(trigger);\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.position}`,\n `${baseClass.value}--${props.value.trigger}`,\n {\n [`${baseClass.value}--visible`]: isVisible.value,\n [`${baseClass.value}--multilined`]: props.value.multilined,\n [`${baseClass.value}--${props.value.size}`]: props.value.multilined,\n },\n ]);\n\n return () => (\n <div ref={wrapperRef} class={classes.value} {...triggerHandler.value}>\n {slots.default?.()}\n <div role=\"tooltip\" class={`${baseClass.value}__tooltip`}>\n {slots.label?.() || props.value.label}\n </div>\n </div>\n );\n },\n});\n","import { css } from '@emotion/css';\nimport { rgba } from 'polished';\nimport { computed } from 'vue';\nimport { useTheme } from '../../composables/theme';\n\nexport const useStyles = () => {\n const theme = useTheme();\n\n const baseClass = computed(() => css({\n '&, *': {\n margin: 0,\n boxSizing: 'border-box',\n cursor: 'default',\n },\n borderRadius: '0.625rem',\n padding: '0.5rem',\n borderWidth: '1px',\n borderStyle: 'solid',\n width: '25rem',\n gap: '0.5rem',\n display: 'flex',\n alignItems: 'center',\n textAlign: 'left',\n '&--full-width': {\n width: '100%',\n },\n '&--default': {\n borderColor: theme.value.colors.gray.medium1,\n color: theme.value.colors.gray.medium1,\n background: theme.value.colors.gray.light3,\n },\n '&--default > &__text': {\n color: theme.value.colors.gray.medium1,\n },\n '&--success': {\n borderColor: theme.value.colors.success,\n color: theme.value.colors.success,\n background: rgba(theme.value.colors.success, 0.2),\n },\n '&--success > &__text': {\n color: theme.value.colors.success,\n },\n '&--in-process': {\n borderColor: theme.value.colors.inProcess,\n color: theme.value.colors.inProcess,\n background: rgba(theme.value.colors.inProcess, 0.2),\n },\n '&--in-process > &__text': {\n color: theme.value.colors.inProcessDark,\n },\n '&--warning': {\n borderColor: theme.value.colors.warning,\n color: theme.value.colors.warning,\n background: rgba(theme.value.colors.warning, 0.2),\n },\n '&--warning > &__text': {\n color: theme.value.colors.warning,\n },\n '&--error': {\n borderColor: theme.value.colors.error,\n color: theme.value.colors.error,\n background: rgba(theme.value.colors.error, 0.2),\n },\n '&--error > &__text': {\n color: theme.value.colors.error,\n },\n '&--info': {\n borderColor: theme.value.colors.info,\n color: theme.value.colors.info,\n background: rgba(theme.value.colors.info, 0.2),\n },\n '&--info > &__text': {\n color: theme.value.colors.info,\n },\n '&__icon': {\n minWidth: '1.5rem',\n width: '1.5rem',\n maxWidth: '1.5rem',\n aspectRatio: '1 / 1',\n height: 'auto',\n },\n [`@media (max-width: ${theme.value.breakpoints.desktop}px)`]: {\n alignItems: 'flex-start',\n\n '&__icon': {\n minWidth: '1rem',\n width: '1rem',\n maxWidth: '1rem',\n },\n\n '&__text': {\n fontWeight: '400',\n fontSize: '0.75rem',\n lineHeight: '1.125rem',\n },\n },\n }));\n return baseClass;\n};\n","import type { PropType } from 'vue';\nimport type { TWarningProps } from './TWarning.types';\nimport { merge } from 'es-toolkit/compat';\nimport { computed, defineComponent } from 'vue';\nimport { TIcon } from '../TIcon';\nimport { TTypography } from '../TTypography';\nimport { useStyles } from './TWarning.styles';\n\nconst defaultProps = {\n variant: 'default',\n};\n\nexport const TWarning = defineComponent({\n name: 'TWarning',\n props: {\n fullWidth: Boolean as PropType<TWarningProps['fullWidth']>,\n icon: String as PropType<TWarningProps['icon']>,\n variant: String as PropType<TWarningProps['variant']>,\n },\n setup(_props, { slots }) {\n const props = computed(() => merge({}, defaultProps, _props));\n\n const baseClass = useStyles();\n const classes = computed(() => [\n baseClass.value,\n `${baseClass.value}--${props.value.variant}`,\n {\n [`${baseClass.value}--full-width`]: props.value.fullWidth,\n },\n ]);\n\n const colorMap = {\n default: 'gray.medium1',\n success: 'success',\n 'in-process': 'inProcessDark',\n warning: 'warning',\n error: 'error',\n info: 'info',\n };\n const iconColor = computed(() => colorMap[props.value.variant]);\n\n return () => (\n <div class={classes.value} role=\"alert\">\n {props.value.icon && (\n <TIcon\n icon={props.value.icon}\n class={`${baseClass.value}__icon`}\n color={iconColor.value}\n />\n )}\n {' '}\n {\n slots.content?.()\n ? slots.content?.()\n : (\n <TTypography variant=\"b3\" class={`${baseClass.value}__text`}>\n {slots.default?.()}\n </TTypography>\n )\n }\n </div>\n );\n },\n});\n","import type { TDialogProps } from '../components/TDialog/TDialog.types';\nimport { createApp, h } from 'vue';\nimport { TDialog } from '../components/TDialog';\n\ninterface DialogOptions extends TDialogProps {\n onCancel?: () => void;\n onConfirm?: () => void;\n}\n\nexport const useDialog = () => {\n const open = ({ onCancel, onConfirm, ...props }: DialogOptions) => {\n const modalContainer = document.createElement('div');\n document.body.appendChild(modalContainer);\n const app = createApp({\n render() {\n return h(TDialog, {\n ...props,\n onConfirm: () => {\n onConfirm?.();\n app.unmount();\n modalContainer.remove();\n },\n onCancel: () => {\n onCancel?.();\n app.unmount();\n modalContainer.remove();\n },\n onClose: () => {\n onCancel?.();\n app.unmount();\n modalContainer.remove();\n },\n });\n },\n });\n app.mount(modalContainer);\n };\n\n return {\n open,\n };\n};\n"],"x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"mappings":";;;;;AAAA,IAAa,KAAY;CACvB,QAAQ;EACN,SAAS;GACP,MAAM;GACN,WAAW;GACX,MAAM;GACN,MAAM;GACN,QAAQ;GACR,QAAQ;GACR,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACA,MAAM;GACJ,MAAM;GACN,OAAO;GACP,OAAO;GACP,SAAS;GACT,SAAS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