'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const qwik = require('@builder.io/qwik'); const flowbiteQwikIcons = require('flowbite-qwik-icons'); const jsxRuntime = require('@builder.io/qwik/jsx-runtime'); const qwikCity = require('@builder.io/qwik-city'); const build = require('@builder.io/qwik/build'); const AccordionPanel = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { return /* @__PURE__ */ qwik._jsxQ("div", null, null, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "Jb_0"), 1, "Jb_1"); }, "AccordionPanel_component_PaANeDQx004")); const uuid = () => Math.random().toString(36).slice(4); const CLASS_PART_SEPARATOR = '-'; const createClassGroupUtils = config => { const classMap = createClassMap(config); const { conflictingClassGroups, conflictingClassGroupModifiers } = config; const getClassGroupId = className => { const classParts = className.split(CLASS_PART_SEPARATOR); // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts. if (classParts[0] === '' && classParts.length !== 1) { classParts.shift(); } return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className); }; const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => { const conflicts = conflictingClassGroups[classGroupId] || []; if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) { return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]]; } return conflicts; }; return { getClassGroupId, getConflictingClassGroupIds }; }; const getGroupRecursive = (classParts, classPartObject) => { if (classParts.length === 0) { return classPartObject.classGroupId; } const currentClassPart = classParts[0]; const nextClassPartObject = classPartObject.nextPart.get(currentClassPart); const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined; if (classGroupFromNextClassPart) { return classGroupFromNextClassPart; } if (classPartObject.validators.length === 0) { return undefined; } const classRest = classParts.join(CLASS_PART_SEPARATOR); return classPartObject.validators.find(({ validator }) => validator(classRest))?.classGroupId; }; const arbitraryPropertyRegex = /^\[(.+)\]$/; const getGroupIdForArbitraryProperty = className => { if (arbitraryPropertyRegex.test(className)) { const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1]; const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':')); if (property) { // I use two dots here because one dot is used as prefix for class groups in plugins return 'arbitrary..' + property; } } }; /** * Exported for testing only */ const createClassMap = config => { const { theme, prefix } = config; const classMap = { nextPart: new Map(), validators: [] }; const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix); prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => { processClassesRecursively(classGroup, classMap, classGroupId, theme); }); return classMap; }; const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => { classGroup.forEach(classDefinition => { if (typeof classDefinition === 'string') { const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition); classPartObjectToEdit.classGroupId = classGroupId; return; } if (typeof classDefinition === 'function') { if (isThemeGetter(classDefinition)) { processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme); return; } classPartObject.validators.push({ validator: classDefinition, classGroupId }); return; } Object.entries(classDefinition).forEach(([key, classGroup]) => { processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme); }); }); }; const getPart = (classPartObject, path) => { let currentClassPartObject = classPartObject; path.split(CLASS_PART_SEPARATOR).forEach(pathPart => { if (!currentClassPartObject.nextPart.has(pathPart)) { currentClassPartObject.nextPart.set(pathPart, { nextPart: new Map(), validators: [] }); } currentClassPartObject = currentClassPartObject.nextPart.get(pathPart); }); return currentClassPartObject; }; const isThemeGetter = func => func.isThemeGetter; const getPrefixedClassGroupEntries = (classGroupEntries, prefix) => { if (!prefix) { return classGroupEntries; } return classGroupEntries.map(([classGroupId, classGroup]) => { const prefixedClassGroup = classGroup.map(classDefinition => { if (typeof classDefinition === 'string') { return prefix + classDefinition; } if (typeof classDefinition === 'object') { return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value])); } return classDefinition; }); return [classGroupId, prefixedClassGroup]; }); }; // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance const createLruCache = maxCacheSize => { if (maxCacheSize < 1) { return { get: () => undefined, set: () => {} }; } let cacheSize = 0; let cache = new Map(); let previousCache = new Map(); const update = (key, value) => { cache.set(key, value); cacheSize++; if (cacheSize > maxCacheSize) { cacheSize = 0; previousCache = cache; cache = new Map(); } }; return { get(key) { let value = cache.get(key); if (value !== undefined) { return value; } if ((value = previousCache.get(key)) !== undefined) { update(key, value); return value; } }, set(key, value) { if (cache.has(key)) { cache.set(key, value); } else { update(key, value); } } }; }; const IMPORTANT_MODIFIER = '!'; const createParseClassName = config => { const { separator, experimentalParseClassName } = config; const isSeparatorSingleCharacter = separator.length === 1; const firstSeparatorCharacter = separator[0]; const separatorLength = separator.length; // parseClassName inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js const parseClassName = className => { const modifiers = []; let bracketDepth = 0; let modifierStart = 0; let postfixModifierPosition; for (let index = 0; index < className.length; index++) { let currentCharacter = className[index]; if (bracketDepth === 0) { if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) { modifiers.push(className.slice(modifierStart, index)); modifierStart = index + separatorLength; continue; } if (currentCharacter === '/') { postfixModifierPosition = index; continue; } } if (currentCharacter === '[') { bracketDepth++; } else if (currentCharacter === ']') { bracketDepth--; } } const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart); const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER); const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier; const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined; return { modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition }; }; if (experimentalParseClassName) { return className => experimentalParseClassName({ className, parseClassName }); } return parseClassName; }; /** * Sorts modifiers according to following schema: * - Predefined modifiers are sorted alphabetically * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it */ const sortModifiers = modifiers => { if (modifiers.length <= 1) { return modifiers; } const sortedModifiers = []; let unsortedModifiers = []; modifiers.forEach(modifier => { const isArbitraryVariant = modifier[0] === '['; if (isArbitraryVariant) { sortedModifiers.push(...unsortedModifiers.sort(), modifier); unsortedModifiers = []; } else { unsortedModifiers.push(modifier); } }); sortedModifiers.push(...unsortedModifiers.sort()); return sortedModifiers; }; const createConfigUtils = config => ({ cache: createLruCache(config.cacheSize), parseClassName: createParseClassName(config), ...createClassGroupUtils(config) }); const SPLIT_CLASSES_REGEX = /\s+/; const mergeClassList = (classList, configUtils) => { const { parseClassName, getClassGroupId, getConflictingClassGroupIds } = configUtils; /** * Set of classGroupIds in following format: * `{importantModifier}{variantModifiers}{classGroupId}` * @example 'float' * @example 'hover:focus:bg-color' * @example 'md:!pr' */ const classGroupsInConflict = []; const classNames = classList.trim().split(SPLIT_CLASSES_REGEX); let result = ''; for (let index = classNames.length - 1; index >= 0; index -= 1) { const originalClassName = classNames[index]; const { modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName); let hasPostfixModifier = Boolean(maybePostfixModifierPosition); let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName); if (!classGroupId) { if (!hasPostfixModifier) { // Not a Tailwind class result = originalClassName + (result.length > 0 ? ' ' + result : result); continue; } classGroupId = getClassGroupId(baseClassName); if (!classGroupId) { // Not a Tailwind class result = originalClassName + (result.length > 0 ? ' ' + result : result); continue; } hasPostfixModifier = false; } const variantModifier = sortModifiers(modifiers).join(':'); const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier; const classId = modifierId + classGroupId; if (classGroupsInConflict.includes(classId)) { // Tailwind class omitted due to conflict continue; } classGroupsInConflict.push(classId); const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier); for (let i = 0; i < conflictGroups.length; ++i) { const group = conflictGroups[i]; classGroupsInConflict.push(modifierId + group); } // Tailwind class not in conflict result = originalClassName + (result.length > 0 ? ' ' + result : result); } return result; }; /** * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better. * * Specifically: * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts * * Original code has MIT license: Copyright (c) Luke Edwards (lukeed.com) */ function twJoin() { let index = 0; let argument; let resolvedValue; let string = ''; while (index < arguments.length) { if (argument = arguments[index++]) { if (resolvedValue = toValue(argument)) { string && (string += ' '); string += resolvedValue; } } } return string; } const toValue = mix => { if (typeof mix === 'string') { return mix; } let resolvedValue; let string = ''; for (let k = 0; k < mix.length; k++) { if (mix[k]) { if (resolvedValue = toValue(mix[k])) { string && (string += ' '); string += resolvedValue; } } } return string; }; function createTailwindMerge(createConfigFirst, ...createConfigRest) { let configUtils; let cacheGet; let cacheSet; let functionToCall = initTailwindMerge; function initTailwindMerge(classList) { const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()); configUtils = createConfigUtils(config); cacheGet = configUtils.cache.get; cacheSet = configUtils.cache.set; functionToCall = tailwindMerge; return tailwindMerge(classList); } function tailwindMerge(classList) { const cachedResult = cacheGet(classList); if (cachedResult) { return cachedResult; } const result = mergeClassList(classList, configUtils); cacheSet(classList, result); return result; } return function callTailwindMerge() { return functionToCall(twJoin.apply(null, arguments)); }; } const fromTheme = key => { const themeGetter = theme => theme[key] || []; themeGetter.isThemeGetter = true; return themeGetter; }; const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i; const fractionRegex = /^\d+\/\d+$/; const stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']); const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/; const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/; const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/; // Shadow always begins with x and y offset separated by underscore optionally prepended by inset const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/; const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/; const isLength = value => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value); const isArbitraryLength = value => getIsArbitraryValue(value, 'length', isLengthOnly); const isNumber = value => Boolean(value) && !Number.isNaN(Number(value)); const isArbitraryNumber = value => getIsArbitraryValue(value, 'number', isNumber); const isInteger = value => Boolean(value) && Number.isInteger(Number(value)); const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1)); const isArbitraryValue = value => arbitraryValueRegex.test(value); const isTshirtSize = value => tshirtUnitRegex.test(value); const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']); const isArbitrarySize = value => getIsArbitraryValue(value, sizeLabels, isNever); const isArbitraryPosition = value => getIsArbitraryValue(value, 'position', isNever); const imageLabels = /*#__PURE__*/new Set(['image', 'url']); const isArbitraryImage = value => getIsArbitraryValue(value, imageLabels, isImage); const isArbitraryShadow = value => getIsArbitraryValue(value, '', isShadow); const isAny = () => true; const getIsArbitraryValue = (value, label, testValue) => { const result = arbitraryValueRegex.exec(value); if (result) { if (result[1]) { return typeof label === 'string' ? result[1] === label : label.has(result[1]); } return testValue(result[2]); } return false; }; const isLengthOnly = value => // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. // For example, `hsl(0 0% 0%)` would be classified as a length without this check. // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. lengthUnitRegex.test(value) && !colorFunctionRegex.test(value); const isNever = () => false; const isShadow = value => shadowRegex.test(value); const isImage = value => imageRegex.test(value); const getDefaultConfig = () => { const colors = fromTheme('colors'); const spacing = fromTheme('spacing'); const blur = fromTheme('blur'); const brightness = fromTheme('brightness'); const borderColor = fromTheme('borderColor'); const borderRadius = fromTheme('borderRadius'); const borderSpacing = fromTheme('borderSpacing'); const borderWidth = fromTheme('borderWidth'); const contrast = fromTheme('contrast'); const grayscale = fromTheme('grayscale'); const hueRotate = fromTheme('hueRotate'); const invert = fromTheme('invert'); const gap = fromTheme('gap'); const gradientColorStops = fromTheme('gradientColorStops'); const gradientColorStopPositions = fromTheme('gradientColorStopPositions'); const inset = fromTheme('inset'); const margin = fromTheme('margin'); const opacity = fromTheme('opacity'); const padding = fromTheme('padding'); const saturate = fromTheme('saturate'); const scale = fromTheme('scale'); const sepia = fromTheme('sepia'); const skew = fromTheme('skew'); const space = fromTheme('space'); const translate = fromTheme('translate'); const getOverscroll = () => ['auto', 'contain', 'none']; const getOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll']; const getSpacingWithAutoAndArbitrary = () => ['auto', isArbitraryValue, spacing]; const getSpacingWithArbitrary = () => [isArbitraryValue, spacing]; const getLengthWithEmptyAndArbitrary = () => ['', isLength, isArbitraryLength]; const getNumberWithAutoAndArbitrary = () => ['auto', isNumber, isArbitraryValue]; const getPositions = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top']; const getLineStyles = () => ['solid', 'dashed', 'dotted', 'double', 'none']; const getBlendModes = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']; const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch']; const getZeroAndEmpty = () => ['', '0', isArbitraryValue]; const getBreaks = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column']; const getNumberAndArbitrary = () => [isNumber, isArbitraryValue]; return { cacheSize: 500, separator: ':', theme: { colors: [isAny], spacing: [isLength, isArbitraryLength], blur: ['none', '', isTshirtSize, isArbitraryValue], brightness: getNumberAndArbitrary(), borderColor: [colors], borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryValue], borderSpacing: getSpacingWithArbitrary(), borderWidth: getLengthWithEmptyAndArbitrary(), contrast: getNumberAndArbitrary(), grayscale: getZeroAndEmpty(), hueRotate: getNumberAndArbitrary(), invert: getZeroAndEmpty(), gap: getSpacingWithArbitrary(), gradientColorStops: [colors], gradientColorStopPositions: [isPercent, isArbitraryLength], inset: getSpacingWithAutoAndArbitrary(), margin: getSpacingWithAutoAndArbitrary(), opacity: getNumberAndArbitrary(), padding: getSpacingWithArbitrary(), saturate: getNumberAndArbitrary(), scale: getNumberAndArbitrary(), sepia: getZeroAndEmpty(), skew: getNumberAndArbitrary(), space: getSpacingWithArbitrary(), translate: getSpacingWithArbitrary() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ['auto', 'square', 'video', isArbitraryValue] }], /** * Container * @see https://tailwindcss.com/docs/container */ container: ['container'], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [isTshirtSize] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ 'break-after': [{ 'break-after': getBreaks() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ 'break-before': [{ 'break-before': getBreaks() }], /** * Break Inside * @see https://tailwindcss.com/docs/break-inside */ 'break-inside': [{ 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column'] }], /** * Box Decoration Break * @see https://tailwindcss.com/docs/box-decoration-break */ 'box-decoration': [{ 'box-decoration': ['slice', 'clone'] }], /** * Box Sizing * @see https://tailwindcss.com/docs/box-sizing */ box: [{ box: ['border', 'content'] }], /** * Display * @see https://tailwindcss.com/docs/display */ display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'], /** * Floats * @see https://tailwindcss.com/docs/float */ float: [{ float: ['right', 'left', 'none', 'start', 'end'] }], /** * Clear * @see https://tailwindcss.com/docs/clear */ clear: [{ clear: ['left', 'right', 'both', 'none', 'start', 'end'] }], /** * Isolation * @see https://tailwindcss.com/docs/isolation */ isolation: ['isolate', 'isolation-auto'], /** * Object Fit * @see https://tailwindcss.com/docs/object-fit */ 'object-fit': [{ object: ['contain', 'cover', 'fill', 'none', 'scale-down'] }], /** * Object Position * @see https://tailwindcss.com/docs/object-position */ 'object-position': [{ object: [...getPositions(), isArbitraryValue] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: getOverflow() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ 'overflow-x': [{ 'overflow-x': getOverflow() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ 'overflow-y': [{ 'overflow-y': getOverflow() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: getOverscroll() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ 'overscroll-x': [{ 'overscroll-x': getOverscroll() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ 'overscroll-y': [{ 'overscroll-y': getOverscroll() }], /** * Position * @see https://tailwindcss.com/docs/position */ position: ['static', 'fixed', 'absolute', 'relative', 'sticky'], /** * Top / Right / Bottom / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ inset: [{ inset: [inset] }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'inset-x': [{ 'inset-x': [inset] }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'inset-y': [{ 'inset-y': [inset] }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: [inset] }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: [inset] }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: [inset] }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: [inset] }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: [inset] }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: [inset] }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ['visible', 'invisible', 'collapse'], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: ['auto', isInteger, isArbitraryValue] }], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: getSpacingWithAutoAndArbitrary() }], /** * Flex Direction * @see https://tailwindcss.com/docs/flex-direction */ 'flex-direction': [{ flex: ['row', 'row-reverse', 'col', 'col-reverse'] }], /** * Flex Wrap * @see https://tailwindcss.com/docs/flex-wrap */ 'flex-wrap': [{ flex: ['wrap', 'wrap-reverse', 'nowrap'] }], /** * Flex * @see https://tailwindcss.com/docs/flex */ flex: [{ flex: ['1', 'auto', 'initial', 'none', isArbitraryValue] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: getZeroAndEmpty() }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: getZeroAndEmpty() }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: ['first', 'last', 'none', isInteger, isArbitraryValue] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ 'grid-cols': [{ 'grid-cols': [isAny] }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ 'col-start-end': [{ col: ['auto', { span: ['full', isInteger, isArbitraryValue] }, isArbitraryValue] }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ 'col-start': [{ 'col-start': getNumberWithAutoAndArbitrary() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ 'col-end': [{ 'col-end': getNumberWithAutoAndArbitrary() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ 'grid-rows': [{ 'grid-rows': [isAny] }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ 'row-start-end': [{ row: ['auto', { span: [isInteger, isArbitraryValue] }, isArbitraryValue] }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ 'row-start': [{ 'row-start': getNumberWithAutoAndArbitrary() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ 'row-end': [{ 'row-end': getNumberWithAutoAndArbitrary() }], /** * Grid Auto Flow * @see https://tailwindcss.com/docs/grid-auto-flow */ 'grid-flow': [{ 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense'] }], /** * Grid Auto Columns * @see https://tailwindcss.com/docs/grid-auto-columns */ 'auto-cols': [{ 'auto-cols': ['auto', 'min', 'max', 'fr', isArbitraryValue] }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ 'auto-rows': [{ 'auto-rows': ['auto', 'min', 'max', 'fr', isArbitraryValue] }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: [gap] }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ 'gap-x': [{ 'gap-x': [gap] }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ 'gap-y': [{ 'gap-y': [gap] }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ 'justify-content': [{ justify: ['normal', ...getAlign()] }], /** * Justify Items * @see https://tailwindcss.com/docs/justify-items */ 'justify-items': [{ 'justify-items': ['start', 'end', 'center', 'stretch'] }], /** * Justify Self * @see https://tailwindcss.com/docs/justify-self */ 'justify-self': [{ 'justify-self': ['auto', 'start', 'end', 'center', 'stretch'] }], /** * Align Content * @see https://tailwindcss.com/docs/align-content */ 'align-content': [{ content: ['normal', ...getAlign(), 'baseline'] }], /** * Align Items * @see https://tailwindcss.com/docs/align-items */ 'align-items': [{ items: ['start', 'end', 'center', 'baseline', 'stretch'] }], /** * Align Self * @see https://tailwindcss.com/docs/align-self */ 'align-self': [{ self: ['auto', 'start', 'end', 'center', 'stretch', 'baseline'] }], /** * Place Content * @see https://tailwindcss.com/docs/place-content */ 'place-content': [{ 'place-content': [...getAlign(), 'baseline'] }], /** * Place Items * @see https://tailwindcss.com/docs/place-items */ 'place-items': [{ 'place-items': ['start', 'end', 'center', 'baseline', 'stretch'] }], /** * Place Self * @see https://tailwindcss.com/docs/place-self */ 'place-self': [{ 'place-self': ['auto', 'start', 'end', 'center', 'stretch'] }], // Spacing /** * Padding * @see https://tailwindcss.com/docs/padding */ p: [{ p: [padding] }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: [padding] }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: [padding] }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: [padding] }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: [padding] }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: [padding] }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: [padding] }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: [padding] }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: [padding] }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: [margin] }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: [margin] }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: [margin] }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: [margin] }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: [margin] }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: [margin] }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: [margin] }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: [margin] }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: [margin] }], /** * Space Between X * @see https://tailwindcss.com/docs/space */ 'space-x': [{ 'space-x': [space] }], /** * Space Between X Reverse * @see https://tailwindcss.com/docs/space */ 'space-x-reverse': ['space-x-reverse'], /** * Space Between Y * @see https://tailwindcss.com/docs/space */ 'space-y': [{ 'space-y': [space] }], /** * Space Between Y Reverse * @see https://tailwindcss.com/docs/space */ 'space-y-reverse': ['space-y-reverse'], // Sizing /** * Width * @see https://tailwindcss.com/docs/width */ w: [{ w: ['auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', isArbitraryValue, spacing] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ 'min-w': [{ 'min-w': [isArbitraryValue, spacing, 'min', 'max', 'fit'] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ 'max-w': [{ 'max-w': [isArbitraryValue, spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', { screen: [isTshirtSize] }, isTshirtSize] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh'] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ 'min-h': [{ 'min-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh'] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ 'max-h': [{ 'max-h': [isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh'] }], /** * Size * @see https://tailwindcss.com/docs/size */ size: [{ size: [isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit'] }], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ 'font-size': [{ text: ['base', isTshirtSize, isArbitraryLength] }], /** * Font Smoothing * @see https://tailwindcss.com/docs/font-smoothing */ 'font-smoothing': ['antialiased', 'subpixel-antialiased'], /** * Font Style * @see https://tailwindcss.com/docs/font-style */ 'font-style': ['italic', 'not-italic'], /** * Font Weight * @see https://tailwindcss.com/docs/font-weight */ 'font-weight': [{ font: ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', isArbitraryNumber] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ 'font-family': [{ font: [isAny] }], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-normal': ['normal-nums'], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-ordinal': ['ordinal'], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-slashed-zero': ['slashed-zero'], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-figure': ['lining-nums', 'oldstyle-nums'], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-spacing': ['proportional-nums', 'tabular-nums'], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-fraction': ['diagonal-fractions', 'stacked-fractons'], /** * Letter Spacing * @see https://tailwindcss.com/docs/letter-spacing */ tracking: [{ tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest', isArbitraryValue] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ 'line-clamp': [{ 'line-clamp': ['none', isNumber, isArbitraryNumber] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength, isArbitraryValue] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ 'list-image': [{ 'list-image': ['none', isArbitraryValue] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ 'list-style-type': [{ list: ['none', 'disc', 'decimal', isArbitraryValue] }], /** * List Style Position * @see https://tailwindcss.com/docs/list-style-position */ 'list-style-position': [{ list: ['inside', 'outside'] }], /** * Placeholder Color * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/placeholder-color */ 'placeholder-color': [{ placeholder: [colors] }], /** * Placeholder Opacity * @see https://tailwindcss.com/docs/placeholder-opacity */ 'placeholder-opacity': [{ 'placeholder-opacity': [opacity] }], /** * Text Alignment * @see https://tailwindcss.com/docs/text-align */ 'text-alignment': [{ text: ['left', 'center', 'right', 'justify', 'start', 'end'] }], /** * Text Color * @see https://tailwindcss.com/docs/text-color */ 'text-color': [{ text: [colors] }], /** * Text Opacity * @see https://tailwindcss.com/docs/text-opacity */ 'text-opacity': [{ 'text-opacity': [opacity] }], /** * Text Decoration * @see https://tailwindcss.com/docs/text-decoration */ 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'], /** * Text Decoration Style * @see https://tailwindcss.com/docs/text-decoration-style */ 'text-decoration-style': [{ decoration: [...getLineStyles(), 'wavy'] }], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ 'text-decoration-thickness': [{ decoration: ['auto', 'from-font', isLength, isArbitraryLength] }], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ 'underline-offset': [{ 'underline-offset': ['auto', isLength, isArbitraryValue] }], /** * Text Decoration Color * @see https://tailwindcss.com/docs/text-decoration-color */ 'text-decoration-color': [{ decoration: [colors] }], /** * Text Transform * @see https://tailwindcss.com/docs/text-transform */ 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'], /** * Text Overflow * @see https://tailwindcss.com/docs/text-overflow */ 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'], /** * Text Wrap * @see https://tailwindcss.com/docs/text-wrap */ 'text-wrap': [{ text: ['wrap', 'nowrap', 'balance', 'pretty'] }], /** * Text Indent * @see https://tailwindcss.com/docs/text-indent */ indent: [{ indent: getSpacingWithArbitrary() }], /** * Vertical Alignment * @see https://tailwindcss.com/docs/vertical-align */ 'vertical-align': [{ align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryValue] }], /** * Whitespace * @see https://tailwindcss.com/docs/whitespace */ whitespace: [{ whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'] }], /** * Word Break * @see https://tailwindcss.com/docs/word-break */ break: [{ break: ['normal', 'words', 'all', 'keep'] }], /** * Hyphens * @see https://tailwindcss.com/docs/hyphens */ hyphens: [{ hyphens: ['none', 'manual', 'auto'] }], /** * Content * @see https://tailwindcss.com/docs/content */ content: [{ content: ['none', isArbitraryValue] }], // Backgrounds /** * Background Attachment * @see https://tailwindcss.com/docs/background-attachment */ 'bg-attachment': [{ bg: ['fixed', 'local', 'scroll'] }], /** * Background Clip * @see https://tailwindcss.com/docs/background-clip */ 'bg-clip': [{ 'bg-clip': ['border', 'padding', 'content', 'text'] }], /** * Background Opacity * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/background-opacity */ 'bg-opacity': [{ 'bg-opacity': [opacity] }], /** * Background Origin * @see https://tailwindcss.com/docs/background-origin */ 'bg-origin': [{ 'bg-origin': ['border', 'padding', 'content'] }], /** * Background Position * @see https://tailwindcss.com/docs/background-position */ 'bg-position': [{ bg: [...getPositions(), isArbitraryPosition] }], /** * Background Repeat * @see https://tailwindcss.com/docs/background-repeat */ 'bg-repeat': [{ bg: ['no-repeat', { repeat: ['', 'x', 'y', 'round', 'space'] }] }], /** * Background Size * @see https://tailwindcss.com/docs/background-size */ 'bg-size': [{ bg: ['auto', 'cover', 'contain', isArbitrarySize] }], /** * Background Image * @see https://tailwindcss.com/docs/background-image */ 'bg-image': [{ bg: ['none', { 'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl'] }, isArbitraryImage] }], /** * Background Color * @see https://tailwindcss.com/docs/background-color */ 'bg-color': [{ bg: [colors] }], /** * Gradient Color Stops From Position * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-from-pos': [{ from: [gradientColorStopPositions] }], /** * Gradient Color Stops Via Position * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-via-pos': [{ via: [gradientColorStopPositions] }], /** * Gradient Color Stops To Position * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-to-pos': [{ to: [gradientColorStopPositions] }], /** * Gradient Color Stops From * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-from': [{ from: [gradientColorStops] }], /** * Gradient Color Stops Via * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-via': [{ via: [gradientColorStops] }], /** * Gradient Color Stops To * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-to': [{ to: [gradientColorStops] }], // Borders /** * Border Radius * @see https://tailwindcss.com/docs/border-radius */ rounded: [{ rounded: [borderRadius] }], /** * Border Radius Start * @see https://tailwindcss.com/docs/border-radius */ 'rounded-s': [{ 'rounded-s': [borderRadius] }], /** * Border Radius End * @see https://tailwindcss.com/docs/border-radius */ 'rounded-e': [{ 'rounded-e': [borderRadius] }], /** * Border Radius Top * @see https://tailwindcss.com/docs/border-radius */ 'rounded-t': [{ 'rounded-t': [borderRadius] }], /** * Border Radius Right * @see https://tailwindcss.com/docs/border-radius */ 'rounded-r': [{ 'rounded-r': [borderRadius] }], /** * Border Radius Bottom * @see https://tailwindcss.com/docs/border-radius */ 'rounded-b': [{ 'rounded-b': [borderRadius] }], /** * Border Radius Left * @see https://tailwindcss.com/docs/border-radius */ 'rounded-l': [{ 'rounded-l': [borderRadius] }], /** * Border Radius Start Start * @see https://tailwindcss.com/docs/border-radius */ 'rounded-ss': [{ 'rounded-ss': [borderRadius] }], /** * Border Radius Start End * @see https://tailwindcss.com/docs/border-radius */ 'rounded-se': [{ 'rounded-se': [borderRadius] }], /** * Border Radius End End * @see https://tailwindcss.com/docs/border-radius */ 'rounded-ee': [{ 'rounded-ee': [borderRadius] }], /** * Border Radius End Start * @see https://tailwindcss.com/docs/border-radius */ 'rounded-es': [{ 'rounded-es': [borderRadius] }], /** * Border Radius Top Left * @see https://tailwindcss.com/docs/border-radius */ 'rounded-tl': [{ 'rounded-tl': [borderRadius] }], /** * Border Radius Top Right * @see https://tailwindcss.com/docs/border-radius */ 'rounded-tr': [{ 'rounded-tr': [borderRadius] }], /** * Border Radius Bottom Right * @see https://tailwindcss.com/docs/border-radius */ 'rounded-br': [{ 'rounded-br': [borderRadius] }], /** * Border Radius Bottom Left * @see https://tailwindcss.com/docs/border-radius */ 'rounded-bl': [{ 'rounded-bl': [borderRadius] }], /** * Border Width * @see https://tailwindcss.com/docs/border-width */ 'border-w': [{ border: [borderWidth] }], /** * Border Width X * @see https://tailwindcss.com/docs/border-width */ 'border-w-x': [{ 'border-x': [borderWidth] }], /** * Border Width Y * @see https://tailwindcss.com/docs/border-width */ 'border-w-y': [{ 'border-y': [borderWidth] }], /** * Border Width Start * @see https://tailwindcss.com/docs/border-width */ 'border-w-s': [{ 'border-s': [borderWidth] }], /** * Border Width End * @see https://tailwindcss.com/docs/border-width */ 'border-w-e': [{ 'border-e': [borderWidth] }], /** * Border Width Top * @see https://tailwindcss.com/docs/border-width */ 'border-w-t': [{ 'border-t': [borderWidth] }], /** * Border Width Right * @see https://tailwindcss.com/docs/border-width */ 'border-w-r': [{ 'border-r': [borderWidth] }], /** * Border Width Bottom * @see https://tailwindcss.com/docs/border-width */ 'border-w-b': [{ 'border-b': [borderWidth] }], /** * Border Width Left * @see https://tailwindcss.com/docs/border-width */ 'border-w-l': [{ 'border-l': [borderWidth] }], /** * Border Opacity * @see https://tailwindcss.com/docs/border-opacity */ 'border-opacity': [{ 'border-opacity': [opacity] }], /** * Border Style * @see https://tailwindcss.com/docs/border-style */ 'border-style': [{ border: [...getLineStyles(), 'hidden'] }], /** * Divide Width X * @see https://tailwindcss.com/docs/divide-width */ 'divide-x': [{ 'divide-x': [borderWidth] }], /** * Divide Width X Reverse * @see https://tailwindcss.com/docs/divide-width */ 'divide-x-reverse': ['divide-x-reverse'], /** * Divide Width Y * @see https://tailwindcss.com/docs/divide-width */ 'divide-y': [{ 'divide-y': [borderWidth] }], /** * Divide Width Y Reverse * @see https://tailwindcss.com/docs/divide-width */ 'divide-y-reverse': ['divide-y-reverse'], /** * Divide Opacity * @see https://tailwindcss.com/docs/divide-opacity */ 'divide-opacity': [{ 'divide-opacity': [opacity] }], /** * Divide Style * @see https://tailwindcss.com/docs/divide-style */ 'divide-style': [{ divide: getLineStyles() }], /** * Border Color * @see https://tailwindcss.com/docs/border-color */ 'border-color': [{ border: [borderColor] }], /** * Border Color X * @see https://tailwindcss.com/docs/border-color */ 'border-color-x': [{ 'border-x': [borderColor] }], /** * Border Color Y * @see https://tailwindcss.com/docs/border-color */ 'border-color-y': [{ 'border-y': [borderColor] }], /** * Border Color S * @see https://tailwindcss.com/docs/border-color */ 'border-color-s': [{ 'border-s': [borderColor] }], /** * Border Color E * @see https://tailwindcss.com/docs/border-color */ 'border-color-e': [{ 'border-e': [borderColor] }], /** * Border Color Top * @see https://tailwindcss.com/docs/border-color */ 'border-color-t': [{ 'border-t': [borderColor] }], /** * Border Color Right * @see https://tailwindcss.com/docs/border-color */ 'border-color-r': [{ 'border-r': [borderColor] }], /** * Border Color Bottom * @see https://tailwindcss.com/docs/border-color */ 'border-color-b': [{ 'border-b': [borderColor] }], /** * Border Color Left * @see https://tailwindcss.com/docs/border-color */ 'border-color-l': [{ 'border-l': [borderColor] }], /** * Divide Color * @see https://tailwindcss.com/docs/divide-color */ 'divide-color': [{ divide: [borderColor] }], /** * Outline Style * @see https://tailwindcss.com/docs/outline-style */ 'outline-style': [{ outline: ['', ...getLineStyles()] }], /** * Outline Offset * @see https://tailwindcss.com/docs/outline-offset */ 'outline-offset': [{ 'outline-offset': [isLength, isArbitraryValue] }], /** * Outline Width * @see https://tailwindcss.com/docs/outline-width */ 'outline-w': [{ outline: [isLength, isArbitraryLength] }], /** * Outline Color * @see https://tailwindcss.com/docs/outline-color */ 'outline-color': [{ outline: [colors] }], /** * Ring Width * @see https://tailwindcss.com/docs/ring-width */ 'ring-w': [{ ring: getLengthWithEmptyAndArbitrary() }], /** * Ring Width Inset * @see https://tailwindcss.com/docs/ring-width */ 'ring-w-inset': ['ring-inset'], /** * Ring Color * @see https://tailwindcss.com/docs/ring-color */ 'ring-color': [{ ring: [colors] }], /** * Ring Opacity * @see https://tailwindcss.com/docs/ring-opacity */ 'ring-opacity': [{ 'ring-opacity': [opacity] }], /** * Ring Offset Width * @see https://tailwindcss.com/docs/ring-offset-width */ 'ring-offset-w': [{ 'ring-offset': [isLength, isArbitraryLength] }], /** * Ring Offset Color * @see https://tailwindcss.com/docs/ring-offset-color */ 'ring-offset-color': [{ 'ring-offset': [colors] }], // Effects /** * Box Shadow * @see https://tailwindcss.com/docs/box-shadow */ shadow: [{ shadow: ['', 'inner', 'none', isTshirtSize, isArbitraryShadow] }], /** * Box Shadow Color * @see https://tailwindcss.com/docs/box-shadow-color */ 'shadow-color': [{ shadow: [isAny] }], /** * Opacity * @see https://tailwindcss.com/docs/opacity */ opacity: [{ opacity: [opacity] }], /** * Mix Blend Mode * @see https://tailwindcss.com/docs/mix-blend-mode */ 'mix-blend': [{ 'mix-blend': [...getBlendModes(), 'plus-lighter', 'plus-darker'] }], /** * Background Blend Mode * @see https://tailwindcss.com/docs/background-blend-mode */ 'bg-blend': [{ 'bg-blend': getBlendModes() }], // Filters /** * Filter * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/filter */ filter: [{ filter: ['', 'none'] }], /** * Blur * @see https://tailwindcss.com/docs/blur */ blur: [{ blur: [blur] }], /** * Brightness * @see https://tailwindcss.com/docs/brightness */ brightness: [{ brightness: [brightness] }], /** * Contrast * @see https://tailwindcss.com/docs/contrast */ contrast: [{ contrast: [contrast] }], /** * Drop Shadow * @see https://tailwindcss.com/docs/drop-shadow */ 'drop-shadow': [{ 'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue] }], /** * Grayscale * @see https://tailwindcss.com/docs/grayscale */ grayscale: [{ grayscale: [grayscale] }], /** * Hue Rotate * @see https://tailwindcss.com/docs/hue-rotate */ 'hue-rotate': [{ 'hue-rotate': [hueRotate] }], /** * Invert * @see https://tailwindcss.com/docs/invert */ invert: [{ invert: [invert] }], /** * Saturate * @see https://tailwindcss.com/docs/saturate */ saturate: [{ saturate: [saturate] }], /** * Sepia * @see https://tailwindcss.com/docs/sepia */ sepia: [{ sepia: [sepia] }], /** * Backdrop Filter * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/backdrop-filter */ 'backdrop-filter': [{ 'backdrop-filter': ['', 'none'] }], /** * Backdrop Blur * @see https://tailwindcss.com/docs/backdrop-blur */ 'backdrop-blur': [{ 'backdrop-blur': [blur] }], /** * Backdrop Brightness * @see https://tailwindcss.com/docs/backdrop-brightness */ 'backdrop-brightness': [{ 'backdrop-brightness': [brightness] }], /** * Backdrop Contrast * @see https://tailwindcss.com/docs/backdrop-contrast */ 'backdrop-contrast': [{ 'backdrop-contrast': [contrast] }], /** * Backdrop Grayscale * @see https://tailwindcss.com/docs/backdrop-grayscale */ 'backdrop-grayscale': [{ 'backdrop-grayscale': [grayscale] }], /** * Backdrop Hue Rotate * @see https://tailwindcss.com/docs/backdrop-hue-rotate */ 'backdrop-hue-rotate': [{ 'backdrop-hue-rotate': [hueRotate] }], /** * Backdrop Invert * @see https://tailwindcss.com/docs/backdrop-invert */ 'backdrop-invert': [{ 'backdrop-invert': [invert] }], /** * Backdrop Opacity * @see https://tailwindcss.com/docs/backdrop-opacity */ 'backdrop-opacity': [{ 'backdrop-opacity': [opacity] }], /** * Backdrop Saturate * @see https://tailwindcss.com/docs/backdrop-saturate */ 'backdrop-saturate': [{ 'backdrop-saturate': [saturate] }], /** * Backdrop Sepia * @see https://tailwindcss.com/docs/backdrop-sepia */ 'backdrop-sepia': [{ 'backdrop-sepia': [sepia] }], // Tables /** * Border Collapse * @see https://tailwindcss.com/docs/border-collapse */ 'border-collapse': [{ border: ['collapse', 'separate'] }], /** * Border Spacing * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing': [{ 'border-spacing': [borderSpacing] }], /** * Border Spacing X * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing-x': [{ 'border-spacing-x': [borderSpacing] }], /** * Border Spacing Y * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing-y': [{ 'border-spacing-y': [borderSpacing] }], /** * Table Layout * @see https://tailwindcss.com/docs/table-layout */ 'table-layout': [{ table: ['auto', 'fixed'] }], /** * Caption Side * @see https://tailwindcss.com/docs/caption-side */ caption: [{ caption: ['top', 'bottom'] }], // Transitions and Animation /** * Tranisition Property * @see https://tailwindcss.com/docs/transition-property */ transition: [{ transition: ['none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', isArbitraryValue] }], /** * Transition Duration * @see https://tailwindcss.com/docs/transition-duration */ duration: [{ duration: getNumberAndArbitrary() }], /** * Transition Timing Function * @see https://tailwindcss.com/docs/transition-timing-function */ ease: [{ ease: ['linear', 'in', 'out', 'in-out', isArbitraryValue] }], /** * Transition Delay * @see https://tailwindcss.com/docs/transition-delay */ delay: [{ delay: getNumberAndArbitrary() }], /** * Animation * @see https://tailwindcss.com/docs/animation */ animate: [{ animate: ['none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue] }], // Transforms /** * Transform * @see https://tailwindcss.com/docs/transform */ transform: [{ transform: ['', 'gpu', 'none'] }], /** * Scale * @see https://tailwindcss.com/docs/scale */ scale: [{ scale: [scale] }], /** * Scale X * @see https://tailwindcss.com/docs/scale */ 'scale-x': [{ 'scale-x': [scale] }], /** * Scale Y * @see https://tailwindcss.com/docs/scale */ 'scale-y': [{ 'scale-y': [scale] }], /** * Rotate * @see https://tailwindcss.com/docs/rotate */ rotate: [{ rotate: [isInteger, isArbitraryValue] }], /** * Translate X * @see https://tailwindcss.com/docs/translate */ 'translate-x': [{ 'translate-x': [translate] }], /** * Translate Y * @see https://tailwindcss.com/docs/translate */ 'translate-y': [{ 'translate-y': [translate] }], /** * Skew X * @see https://tailwindcss.com/docs/skew */ 'skew-x': [{ 'skew-x': [skew] }], /** * Skew Y * @see https://tailwindcss.com/docs/skew */ 'skew-y': [{ 'skew-y': [skew] }], /** * Transform Origin * @see https://tailwindcss.com/docs/transform-origin */ 'transform-origin': [{ origin: ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryValue] }], // Interactivity /** * Accent Color * @see https://tailwindcss.com/docs/accent-color */ accent: [{ accent: ['auto', colors] }], /** * Appearance * @see https://tailwindcss.com/docs/appearance */ appearance: [{ appearance: ['none', 'auto'] }], /** * Cursor * @see https://tailwindcss.com/docs/cursor */ cursor: [{ cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryValue] }], /** * Caret Color * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities */ 'caret-color': [{ caret: [colors] }], /** * Pointer Events * @see https://tailwindcss.com/docs/pointer-events */ 'pointer-events': [{ 'pointer-events': ['none', 'auto'] }], /** * Resize * @see https://tailwindcss.com/docs/resize */ resize: [{ resize: ['none', 'y', 'x', ''] }], /** * Scroll Behavior * @see https://tailwindcss.com/docs/scroll-behavior */ 'scroll-behavior': [{ scroll: ['auto', 'smooth'] }], /** * Scroll Margin * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-m': [{ 'scroll-m': getSpacingWithArbitrary() }], /** * Scroll Margin X * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mx': [{ 'scroll-mx': getSpacingWithArbitrary() }], /** * Scroll Margin Y * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-my': [{ 'scroll-my': getSpacingWithArbitrary() }], /** * Scroll Margin Start * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-ms': [{ 'scroll-ms': getSpacingWithArbitrary() }], /** * Scroll Margin End * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-me': [{ 'scroll-me': getSpacingWithArbitrary() }], /** * Scroll Margin Top * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mt': [{ 'scroll-mt': getSpacingWithArbitrary() }], /** * Scroll Margin Right * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mr': [{ 'scroll-mr': getSpacingWithArbitrary() }], /** * Scroll Margin Bottom * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mb': [{ 'scroll-mb': getSpacingWithArbitrary() }], /** * Scroll Margin Left * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-ml': [{ 'scroll-ml': getSpacingWithArbitrary() }], /** * Scroll Padding * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-p': [{ 'scroll-p': getSpacingWithArbitrary() }], /** * Scroll Padding X * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-px': [{ 'scroll-px': getSpacingWithArbitrary() }], /** * Scroll Padding Y * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-py': [{ 'scroll-py': getSpacingWithArbitrary() }], /** * Scroll Padding Start * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-ps': [{ 'scroll-ps': getSpacingWithArbitrary() }], /** * Scroll Padding End * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pe': [{ 'scroll-pe': getSpacingWithArbitrary() }], /** * Scroll Padding Top * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pt': [{ 'scroll-pt': getSpacingWithArbitrary() }], /** * Scroll Padding Right * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pr': [{ 'scroll-pr': getSpacingWithArbitrary() }], /** * Scroll Padding Bottom * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pb': [{ 'scroll-pb': getSpacingWithArbitrary() }], /** * Scroll Padding Left * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pl': [{ 'scroll-pl': getSpacingWithArbitrary() }], /** * Scroll Snap Align * @see https://tailwindcss.com/docs/scroll-snap-align */ 'snap-align': [{ snap: ['start', 'end', 'center', 'align-none'] }], /** * Scroll Snap Stop * @see https://tailwindcss.com/docs/scroll-snap-stop */ 'snap-stop': [{ snap: ['normal', 'always'] }], /** * Scroll Snap Type * @see https://tailwindcss.com/docs/scroll-snap-type */ 'snap-type': [{ snap: ['none', 'x', 'y', 'both'] }], /** * Scroll Snap Type Strictness * @see https://tailwindcss.com/docs/scroll-snap-type */ 'snap-strictness': [{ snap: ['mandatory', 'proximity'] }], /** * Touch Action * @see https://tailwindcss.com/docs/touch-action */ touch: [{ touch: ['auto', 'none', 'manipulation'] }], /** * Touch Action X * @see https://tailwindcss.com/docs/touch-action */ 'touch-x': [{ 'touch-pan': ['x', 'left', 'right'] }], /** * Touch Action Y * @see https://tailwindcss.com/docs/touch-action */ 'touch-y': [{ 'touch-pan': ['y', 'up', 'down'] }], /** * Touch Action Pinch Zoom * @see https://tailwindcss.com/docs/touch-action */ 'touch-pz': ['touch-pinch-zoom'], /** * User Select * @see https://tailwindcss.com/docs/user-select */ select: [{ select: ['none', 'text', 'all', 'auto'] }], /** * Will Change * @see https://tailwindcss.com/docs/will-change */ 'will-change': [{ 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryValue] }], // SVG /** * Fill * @see https://tailwindcss.com/docs/fill */ fill: [{ fill: [colors, 'none'] }], /** * Stroke Width * @see https://tailwindcss.com/docs/stroke-width */ 'stroke-w': [{ stroke: [isLength, isArbitraryLength, isArbitraryNumber] }], /** * Stroke * @see https://tailwindcss.com/docs/stroke */ stroke: [{ stroke: [colors, 'none'] }], // Accessibility /** * Screen Readers * @see https://tailwindcss.com/docs/screen-readers */ sr: ['sr-only', 'not-sr-only'], /** * Forced Color Adjust * @see https://tailwindcss.com/docs/forced-color-adjust */ 'forced-color-adjust': [{ 'forced-color-adjust': ['auto', 'none'] }] }, conflictingClassGroups: { overflow: ['overflow-x', 'overflow-y'], overscroll: ['overscroll-x', 'overscroll-y'], inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'], 'inset-x': ['right', 'left'], 'inset-y': ['top', 'bottom'], flex: ['basis', 'grow', 'shrink'], gap: ['gap-x', 'gap-y'], p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'], px: ['pr', 'pl'], py: ['pt', 'pb'], m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'], mx: ['mr', 'ml'], my: ['mt', 'mb'], size: ['w', 'h'], 'font-size': ['leading'], 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'], 'fvn-ordinal': ['fvn-normal'], 'fvn-slashed-zero': ['fvn-normal'], 'fvn-figure': ['fvn-normal'], 'fvn-spacing': ['fvn-normal'], 'fvn-fraction': ['fvn-normal'], 'line-clamp': ['display', 'overflow'], rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'], 'rounded-s': ['rounded-ss', 'rounded-es'], 'rounded-e': ['rounded-se', 'rounded-ee'], 'rounded-t': ['rounded-tl', 'rounded-tr'], 'rounded-r': ['rounded-tr', 'rounded-br'], 'rounded-b': ['rounded-br', 'rounded-bl'], 'rounded-l': ['rounded-tl', 'rounded-bl'], 'border-spacing': ['border-spacing-x', 'border-spacing-y'], 'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'], 'border-w-x': ['border-w-r', 'border-w-l'], 'border-w-y': ['border-w-t', 'border-w-b'], 'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'], 'border-color-x': ['border-color-r', 'border-color-l'], 'border-color-y': ['border-color-t', 'border-color-b'], 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'], 'scroll-mx': ['scroll-mr', 'scroll-ml'], 'scroll-my': ['scroll-mt', 'scroll-mb'], 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'], 'scroll-px': ['scroll-pr', 'scroll-pl'], 'scroll-py': ['scroll-pt', 'scroll-pb'], touch: ['touch-x', 'touch-y', 'touch-pz'], 'touch-x': ['touch'], 'touch-y': ['touch'], 'touch-pz': ['touch'] }, conflictingClassGroupModifiers: { 'font-size': ['leading'] } }; }; const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig); const baseHeaderClasses = "flex items-center justify-between p-5 w-full font-medium text-left rtl:text-right border border-gray-200 dark:border-gray-700"; const nonFlushHeaderClasses = "hover:bg-gray-100 dark:hover:bg-gray-800 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800"; const baseArrowClasses = "w-4 h-4 shrink-0"; function useAccordionHeaderClasses(isVisible, flush, isFirstPanel, isLastPanel) { const headerClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [flush2, isFirstPanel2, isLastPanel2, isVisible2] = qwik.useLexicalScope(); return twMerge(baseHeaderClasses, isVisible2.value ? "text-gray-900 dark:text-white" : "text-gray-500 dark:text-gray-400", isVisible2.value && !flush2.value && "bg-gray-100 dark:bg-gray-800", isFirstPanel2.value && !flush2.value && "rounded-t-xl", isFirstPanel2.value && flush2.value && "border-t-0", flush2.value ? "border-x-0" : nonFlushHeaderClasses, !isLastPanel2.value && "border-b-0"); }, "useAccordionHeaderClasses_headerClasses_useComputed_iLMJniqwzy4", [ flush, isFirstPanel, isLastPanel, isVisible ])); const arrowClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [isVisible2] = qwik.useLexicalScope(); return twMerge(baseArrowClasses, isVisible2.value && "rotate-180"); }, "useAccordionHeaderClasses_arrowClasses_useComputed_8IJzpSl8Emc", [ isVisible ])); return { headerClasses, arrowClasses }; } const AccordionContext = qwik.createContextId("FLOWBITE_QWIK_ACCORDION_CONTEXT"); function useAccordionContext() { const accordionContext = qwik.useContext(AccordionContext); const theme = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [accordionContext2] = qwik.useLexicalScope(); return accordionContext2.theme; }, "useAccordionContext_theme_useComputed_lQrnXcA0f4I", [ accordionContext ])); return { theme }; } function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t { const attrs = qwik._restProps(props, [ "id", "openedPanels", "flush", "isLast", "isFirst", "onClick$" ]); const accordioncontext = useAccordionContext(); const internalVisible = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return Boolean(props2.id && props2.openedPanels?.includes(props2.id)) ?? false; }, "AccordionHeader_component_internalVisible_useComputed_kspzMT00nN4", [ props ])); const internalFlush = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.flush ?? false; }, "AccordionHeader_component_internalFlush_useComputed_vpwl0spCmxQ", [ props ])); const internalIsFirst = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.isFirst ?? false; }, "AccordionHeader_component_internalIsFirst_useComputed_LpXQMcG3EoQ", [ props ])); const internalIsLast = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.isLast ?? false; }, "AccordionHeader_component_internalIsLast_useComputed_svjVvdL0sTU", [ props ])); const accordionheaderclasses = useAccordionHeaderClasses(internalVisible, internalFlush, internalIsFirst, internalIsLast); return /* @__PURE__ */ qwik._jsxS("div", { ...attrs, children: /* @__PURE__ */ qwik._jsxQ("button", { class: twMerge(accordionheaderclasses.headerClasses.value, clsx(accordioncontext.theme.value?.header?.button)) }, { type: "button", onClick$: /* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.id && props2.onClick$?.(props2.id); }, "AccordionHeader_component_div_button_onClick_bJO1tzbaO68", [ props ]) }, [ /* @__PURE__ */ qwik._jsxQ("span", null, null, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "3E_0"), 1, null), /* @__PURE__ */ qwik._jsxC(flowbiteQwikIcons.IconAngleDownOutline, { get class() { return accordionheaderclasses.arrowClasses.value; }, [qwik._IMMUTABLE]: { class: qwik._fnSignal((p0) => p0.arrowClasses.value, [ accordionheaderclasses ], "p0.arrowClasses.value") } }, 3, "3E_1") ], 1, null) }, null, 0, "3E_2"); }, "AccordionHeader_component_83nGEBWE7PM")); const baseContentClasses = "p-5 border border-gray-200 dark:border-gray-700 dark:bg-gray-900"; function useAccordionContentClasses(isVisible, flush, isLastPanel) { const contentClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [flush2, isLastPanel2, isVisible2] = qwik.useLexicalScope(); return twMerge(baseContentClasses, !isVisible2.value && "hidden", (!isLastPanel2.value || flush2.value) && "border-b-0", isLastPanel2.value && "border-t-0", flush2.value && "border-x-0"); }, "useAccordionContentClasses_contentClasses_useComputed_D0f8W1pe8AU", [ flush, isLastPanel, isVisible ])); return { contentClasses }; } const AccordionContent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const internalVisible = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return Boolean(props2.id && props2.openedPanels?.includes(props2.id)) ?? false; }, "AccordionContent_component_internalVisible_useComputed_0L35mB6ZEYA", [ props ])); const internalFlush = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.flush ?? false; }, "AccordionContent_component_internalFlush_useComputed_kLHJRsR830A", [ props ])); const internalIsLast = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.isLast ?? false; }, "AccordionContent_component_internalIsLast_useComputed_Ook4uux8cL8", [ props ])); const accordioncontentclasses = useAccordionContentClasses(internalVisible, internalFlush, internalIsLast); return /* @__PURE__ */ qwik._jsxQ("div", null, { class: qwik._fnSignal((p0) => p0.contentClasses.value, [ accordioncontentclasses ], "p0.contentClasses.value") }, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "RN_0"), 1, "RN_1"); }, "AccordionContent_component_YN93gm900eM")); function useAccordionState(options, components) { const accordionState = qwik.useStore({ openedPanels: options.openFirstItem && components[0]?.id ? [ components[0].id ] : [] }); const toggle$ = /* @__PURE__ */ qwik.inlinedQrl((itemId) => { const [accordionState2, options2] = qwik.useLexicalScope(); const isAlreadyOpened = accordionState2.openedPanels.includes(itemId); if (isAlreadyOpened) accordionState2.openedPanels = accordionState2.openedPanels.filter((id) => id !== itemId); else if (options2?.alwaysOpen) accordionState2.openedPanels.push(itemId); else accordionState2.openedPanels = [ itemId ]; }, "useAccordionState_toggle_NJFEZU06edc", [ accordionState, options ]); const openedPanels = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [accordionState2] = qwik.useLexicalScope(); return accordionState2.openedPanels; }, "useAccordionState_openedPanels_useComputed_DD4iGVJKz3g", [ accordionState ])); return { toggle$, openedPanels }; } function getChild(children, components) { const childrenToProcess = Array.isArray(children) ? [ ...children ] : [ children ]; let index = 0; while (childrenToProcess.length) { index = index + 1; const child = childrenToProcess.shift(); if (!child) continue; if (Array.isArray(child)) { childrenToProcess.unshift(...child); continue; } const type = child.type; const foundComponent = components.find((comp) => comp.component === type); if (foundComponent) foundComponent.foundComponentCallback(child, index - 1); } } function getHeaderAndContentFromPanel({ children }) { const components = { header: { children: void 0 }, content: { children: void 0 } }; getChild(children, [ { component: AccordionHeader, foundComponentCallback: (child) => { components.header = { children: child.children, attrs: child.props }; } }, { component: AccordionContent, foundComponentCallback: (child) => { components.content = { children: child.children }; } } ]); return components; } const Accordion$1 = ({ children, alwaysOpen = false, openFirstItem = true, flush = false, ...attrs }) => { const components = []; getChild(children, [ { component: AccordionPanel, foundComponentCallback: (child) => { const { header, content } = getHeaderAndContentFromPanel(child); components.push({ id: uuid(), header, content }); } } ]); return /* @__PURE__ */ qwik._jsxC(InnerAccordion, { components, ...attrs, alwaysOpen, flush, openFirstItem }, 0, "Op_0"); }; const InnerAccordion = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const attrs = qwik._restProps(props, [ "components", "alwaysOpen", "openFirstItem", "flush", "theme" ]); qwik.useContextProvider(AccordionContext, qwik.useStore({ theme: props.theme })); const accordionstate = useAccordionState({ alwaysOpen: props.alwaysOpen ?? false, openFirstItem: props.openFirstItem ?? true, flush: props.flush ?? false }, props.components); return /* @__PURE__ */ qwik._jsxS("div", { ...attrs, children: props.components.map((component, i) => { return /* @__PURE__ */ qwik._jsxC(AccordionPanel, { children: [ /* @__PURE__ */ qwik._jsxC(AccordionHeader, { ...component.header.attrs, get id() { return component.id; }, get flush() { return props.flush ?? false; }, isFirst: i === 0, get openedPanels() { return accordionstate.openedPanels.value; }, isLast: i === props.components.length - 1, onClick$: accordionstate.toggle$, children: qwik._wrapSignal(component.header, "children"), [qwik._IMMUTABLE]: { id: qwik._wrapProp(component, "id"), flush: qwik._fnSignal((p0) => p0.flush ?? false, [ props ], "p0.flush??false"), openedPanels: qwik._fnSignal((p0) => p0.openedPanels.value, [ accordionstate ], "p0.openedPanels.value") } }, 0, "Op_1"), /* @__PURE__ */ qwik._jsxC(AccordionContent, { get id() { return component.id; }, isLast: i === props.components.length - 1, get openedPanels() { return accordionstate.openedPanels.value; }, get flush() { return props.flush ?? false; }, children: qwik._wrapSignal(component.content, "children"), [qwik._IMMUTABLE]: { id: qwik._wrapProp(component, "id"), openedPanels: qwik._fnSignal((p0) => p0.openedPanels.value, [ accordionstate ], "p0.openedPanels.value"), flush: qwik._fnSignal((p0) => p0.flush ?? false, [ props ], "p0.flush??false") } }, 1, "Op_2") ] }, 1, "Op_3"); }) }, null, 0, "Op_4"); }, "InnerAccordion_component_8gp7brKvEPY")); const Accordion = Object.assign(Accordion$1, { Content: AccordionContent, Header: AccordionHeader, Panel: AccordionPanel }); const flowbiteThemeClasses = { blue: { background: "bg-blue-700 dark:bg-blue-600", disabled: "", hover: "hover:bg-blue-800 dark:hover:bg-blue-700", text: "text-blue-600 dark:text-blue-500", border: "border-blue-600 dark:border-blue-500", focus: "focus:ring-blue-300 dark:focus:ring-blue-800", focusInput: "focus:border-blue-300 dark:focus:border-blue-900" }, green: { background: "bg-green-700 dark:bg-green-600", disabled: "", hover: "hover:bg-green-800 dark:hover:bg-green-700", text: "text-green-600 dark:text-green-500", border: "border-green-600 dark:border-green-500", focus: "focus:ring-green-300 dark:focus:ring-green-800", focusInput: "focus:border-green-300 dark:focus:border-green-900" }, pink: { background: "bg-pink-700 dark:bg-pink-600", disabled: "", hover: "hover:bg-pink-800 dark:hover:bg-pink-700", text: "text-pink-600 dark:text-pink-500", border: "border-pink-600 dark:border-pink-500", focus: "focus:ring-pink-300 dark:focus:ring-pink-900", focusInput: "focus:border-pink-300 dark:focus:border-pink-900" }, purple: { background: "bg-purple-700 dark:bg-purple-600", disabled: "", hover: "hover:bg-purple-800 dark:hover:bg-purple-700", text: "text-purple-600 dark:text-purple-500", border: "border-purple-600 dark:border-purple-500", focus: "focus:ring-purple-300 dark:focus:ring-purple-900", focusInput: "focus:border-purple-300 dark:focus:border-purple-900" }, red: { background: "bg-red-700 dark:bg-red-600", disabled: "", hover: "hover:bg-red-800 dark:hover:bg-red-700", text: "text-red-600 dark:text-red-500", border: "border-red-600 dark:border-red-500", focus: "focus:ring-red-300 dark:focus:ring-red-900", focusInput: "focus:border-red-300 dark:focus:border-red-900" } }; const THEME_CONTEXT = "FLOWBITE_QWIK_THEME_CONTEXT"; const themeContext = qwik.createContextId(THEME_CONTEXT); function useFlowbiteThemable() { const theme = qwik.useContext(themeContext); const setThemeName = /* @__PURE__ */ qwik.inlinedQrl((name) => { const [theme2] = qwik.useLexicalScope(); theme2.value = name; }, "useFlowbiteThemable_setThemeName_vDxXmfJbUEc", [ theme ]); const backgroundClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [theme2] = qwik.useLexicalScope(); return !theme2.value ? "" : flowbiteThemeClasses[theme2.value]?.background ?? ""; }, "useFlowbiteThemable_backgroundClasses_useComputed_cAY0Yfvt0AU", [ theme ])); const borderClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [theme2] = qwik.useLexicalScope(); return !theme2.value ? "" : flowbiteThemeClasses[theme2.value]?.border ?? ""; }, "useFlowbiteThemable_borderClasses_useComputed_VpiMLFISwGM", [ theme ])); const color = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [theme2] = qwik.useLexicalScope(); return theme2 || void 0; }, "useFlowbiteThemable_color_useComputed_KZmnkzXWmis", [ theme ])); const disabledClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [theme2] = qwik.useLexicalScope(); return !theme2.value ? "" : flowbiteThemeClasses[theme2.value]?.disabled ?? ""; }, "useFlowbiteThemable_disabledClasses_useComputed_QWMgzPWSyFc", [ theme ])); const focusClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [theme2] = qwik.useLexicalScope(); return !theme2.value ? "" : flowbiteThemeClasses[theme2.value]?.focus ?? ""; }, "useFlowbiteThemable_focusClasses_useComputed_f1TcxTQpoyM", [ theme ])); const focusInputClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [theme2] = qwik.useLexicalScope(); return !theme2.value ? "" : flowbiteThemeClasses[theme2.value]?.focusInput ?? ""; }, "useFlowbiteThemable_focusInputClasses_useComputed_OPSV7oxgu14", [ theme ])); const hoverClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [theme2] = qwik.useLexicalScope(); return !theme2.value ? "" : flowbiteThemeClasses[theme2.value]?.hover ?? ""; }, "useFlowbiteThemable_hoverClasses_useComputed_v2b28wERFGw", [ theme ])); const textClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [theme2] = qwik.useLexicalScope(); return !theme2.value ? "" : flowbiteThemeClasses[theme2.value]?.text ?? ""; }, "useFlowbiteThemable_textClasses_useComputed_HwBsPlxaCRA", [ theme ])); return { backgroundClasses, borderClasses, color, disabledClasses, focusClasses, focusInputClasses, hoverClasses, textClasses, themeName: theme, setThemeName }; } const AlertCloseButtonColorsClasses = { info: "bg-cyan-100 text-cyan-500 hover:bg-cyan-200 focus:ring-cyan-400 dark:bg-cyan-200 dark:text-cyan-600 dark:hover:bg-cyan-300", gray: "bg-gray-100 text-gray-500 hover:bg-gray-200 focus:ring-gray-400 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-white", failure: "bg-red-100 text-red-500 hover:bg-red-200 focus:ring-red-400 dark:bg-red-200 dark:text-red-600 dark:hover:bg-red-300", success: "bg-green-100 text-green-500 hover:bg-green-200 focus:ring-green-400 dark:bg-green-200 dark:text-green-600 dark:hover:bg-green-300", warning: "bg-yellow-100 text-yellow-500 hover:bg-yellow-200 focus:ring-yellow-400 dark:bg-yellow-200 dark:text-yellow-600 dark:hover:bg-yellow-300", red: "bg-red-100 text-red-500 hover:bg-red-200 focus:ring-red-400 dark:bg-red-200 dark:text-red-600 dark:hover:bg-red-300", green: "bg-green-100 text-green-500 hover:bg-green-200 focus:ring-green-400 dark:bg-green-200 dark:text-green-600 dark:hover:bg-green-300", yellow: "bg-yellow-100 text-yellow-500 hover:bg-yellow-200 focus:ring-yellow-400 dark:bg-yellow-200 dark:text-yellow-600 dark:hover:bg-yellow-300", blue: "bg-blue-100 text-blue-500 hover:bg-blue-200 focus:ring-blue-400 dark:bg-blue-200 dark:text-blue-600 dark:hover:bg-blue-300", cyan: "bg-cyan-100 text-cyan-500 hover:bg-cyan-200 focus:ring-cyan-400 dark:bg-cyan-200 dark:text-cyan-600 dark:hover:bg-cyan-300", pink: "bg-pink-100 text-pink-500 hover:bg-pink-200 focus:ring-pink-400 dark:bg-pink-200 dark:text-pink-600 dark:hover:bg-pink-300", lime: "bg-lime-100 text-lime-500 hover:bg-lime-200 focus:ring-lime-400 dark:bg-lime-200 dark:text-lime-600 dark:hover:bg-lime-300", dark: "bg-gray-100 text-gray-500 hover:bg-gray-200 focus:ring-gray-400 dark:bg-gray-200 dark:text-gray-600 dark:hover:bg-gray-300", indigo: "bg-indigo-100 text-indigo-500 hover:bg-indigo-200 focus:ring-indigo-400 dark:bg-indigo-200 dark:text-indigo-600 dark:hover:bg-indigo-300", purple: "bg-purple-100 text-purple-500 hover:bg-purple-200 focus:ring-purple-400 dark:bg-purple-200 dark:text-purple-600 dark:hover:bg-purple-300", teal: "bg-teal-100 text-teal-500 hover:bg-teal-200 focus:ring-teal-400 dark:bg-teal-200 dark:text-teal-600 dark:hover:bg-teal-300", light: "bg-gray-50 text-gray-500 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-600 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white" }; const AlertColorsClasses = { info: "border-cyan-500 bg-cyan-100 text-cyan-700 dark:bg-cyan-200 dark:text-cyan-800", gray: "border-gray-500 bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300", failure: "border-red-500 bg-red-100 text-red-700 dark:bg-red-200 dark:text-red-800", success: "border-green-500 bg-green-100 text-green-700 dark:bg-green-200 dark:text-green-800", warning: "border-yellow-500 bg-yellow-100 text-yellow-700 dark:bg-yellow-200 dark:text-yellow-800", red: "border-red-500 bg-red-100 text-red-700 dark:bg-red-200 dark:text-red-800", green: "border-green-500 bg-green-100 text-green-700 dark:bg-green-200 dark:text-green-800", yellow: "border-yellow-500 bg-yellow-100 text-yellow-700 dark:bg-yellow-200 dark:text-yellow-800", blue: "border-blue-500 bg-blue-100 text-blue-700 dark:bg-blue-200 dark:text-blue-800", cyan: "border-cyan-500 bg-cyan-100 text-cyan-700 dark:bg-cyan-200 dark:text-cyan-800", pink: "border-pink-500 bg-pink-100 text-pink-700 dark:bg-pink-200 dark:text-pink-800", lime: "border-lime-500 bg-lime-100 text-lime-700 dark:bg-lime-200 dark:text-lime-800", dark: "border-gray-600 bg-gray-800 text-gray-200 dark:bg-gray-900 dark:text-gray-300", indigo: "border-indigo-500 bg-indigo-100 text-indigo-700 dark:bg-indigo-200 dark:text-indigo-800", purple: "border-purple-500 bg-purple-100 text-purple-700 dark:bg-purple-200 dark:text-purple-800", teal: "border-teal-500 bg-teal-100 text-teal-700 dark:bg-teal-200 dark:text-teal-800", light: "border-gray-400 bg-gray-50 text-gray-600 dark:bg-gray-500 dark:text-gray-200" }; const Alert = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { qwik._jsxBranch(); const attrs = qwik._restProps(props, [ "additionalContent", "class", "color", "icon", "onDismiss$", "rounded", "withBorderAccent" ]); const flowbitethemable = useFlowbiteThemable(); const internalColor = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [flowbitethemable2, props2] = qwik.useLexicalScope(); return props2.color ?? (AlertColorsClasses.hasOwnProperty(flowbitethemable2.themeName.value) ? flowbitethemable2.themeName.value : "info"); }, "Alert_component_internalColor_useComputed_eGpzciknrLs", [ flowbitethemable, props ])); return /* @__PURE__ */ qwik._jsxS("div", { class: twMerge("flex flex-col gap-2 p-4 text-sm", AlertColorsClasses[internalColor.value], (props.rounded ?? true) && "rounded-lg", props.withBorderAccent && "border-t-4", clsx(props.class)), role: "alert", ...attrs, children: [ /* @__PURE__ */ qwik._jsxQ("div", null, { class: "flex items-center" }, [ props.icon && /* @__PURE__ */ qwik._jsxC(props.icon, { class: "mr-3 inline h-5 w-5 flex-shrink-0", [qwik._IMMUTABLE]: { class: qwik._IMMUTABLE } }, 3, "2v_0"), /* @__PURE__ */ qwik._jsxQ("div", null, null, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "2v_1"), 1, null), props.onDismiss$ && /* @__PURE__ */ qwik._jsxQ("button", { class: twMerge("-m-1.5 ml-auto inline-flex h-8 w-8 rounded-lg p-1.5 focus:ring-2", AlertCloseButtonColorsClasses[internalColor.value]), onClick$: props.onDismiss$ }, { "aria-label": "Dismiss", type: "button" }, /* @__PURE__ */ qwik._jsxC(flowbiteQwikIcons.IconCloseSolid, { "aria-hidden": true, class: "h-5 w-5", [qwik._IMMUTABLE]: { "aria-hidden": qwik._IMMUTABLE, class: qwik._IMMUTABLE } }, 3, "2v_2"), 0, "2v_3") ], 1, null), props.additionalContent && /* @__PURE__ */ qwik._jsxQ("div", null, null, qwik._fnSignal((p0) => p0.additionalContent, [ props ], "p0.additionalContent"), 3, "2v_4") ] }, { role: qwik._IMMUTABLE }, 0, "2v_5"); }, "Alert_component_nR11GPu63JA")); const AvatarImgColorsClasses = { dark: "ring-gray-800 dark:ring-gray-800", failure: "ring-red-500 dark:ring-red-700", gray: "ring-gray-500 dark:ring-gray-400", info: "ring-cyan-400 dark:ring-cyan-800", light: "ring-gray-300 dark:ring-gray-500", purple: "ring-purple-500 dark:ring-purple-600", success: "ring-green-500 dark:ring-green-500", warning: "ring-yellow-300 dark:ring-yellow-500", pink: "ring-pink-500 dark:ring-pink-500" }; const AvatarImgSizesClasses = { xs: "h-6 w-6", sm: "h-8 w-8", md: "h-10 w-10", lg: "h-20 w-20", xl: "h-36 w-36" }; const AvatarStatusClasses = { away: "bg-yellow-400", busy: "bg-red-400", offline: "bg-gray-400", online: "bg-green-400" }; const AvatarStatusPositionClasses = { "bottom-left": "-bottom-1 -left-1", "bottom-center": "-bottom-1", "bottom-right": "-bottom-1 -right-1", "top-left": "-left-1 -top-1", "top-center": "-top-1", "top-right": "-right-1 -top-1", "center-right": "-right-1", center: "", "center-left": "-left-1" }; const Avatar$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const attrs = qwik._restProps(props, [ "alt", "bordered", "class", "color", "img", "placeholderInitials", "rounded", "size", "stacked", "status", "statusPosition" ]); const imgClassName = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return twMerge("rounded", (props2.bordered ?? false) && "p-1 ring-2", (props2.bordered ?? false) && AvatarImgColorsClasses[props2.color ?? "light"], (props2.rounded ?? false) && "rounded-full", (props2.stacked ?? false) && "ring-2 ring-gray-300 dark:ring-gray-500", AvatarImgSizesClasses[props2.size ?? "md"]); }, "Avatar_component_imgClassName_useComputed_Vq9fpVz2b1w", [ props ])); return /* @__PURE__ */ qwik._jsxS("div", { class: twMerge("flex items-center justify-center space-x-4 rounded", clsx(props.class)), ...attrs, children: [ /* @__PURE__ */ qwik._jsxQ("div", null, { class: "relative" }, [ props.img ? typeof props.img === "string" ? /* @__PURE__ */ qwik._jsxQ("img", null, { alt: qwik._fnSignal((p0) => p0.alt ?? "", [ props ], 'p0.alt??""'), src: qwik._fnSignal((p0) => p0.img, [ props ], "p0.img"), class: qwik._fnSignal((p0) => p0.value, [ imgClassName ], "p0.value") }, null, 3, "1c_0") : /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, { children: qwik._fnSignal((p0) => p0.img, [ props ], "p0.img") }, 3, "1c_1") : props.placeholderInitials ?? "" ? /* @__PURE__ */ qwik._jsxQ("div", { class: twMerge("relative overflow-hidden bg-gray-100 dark:bg-gray-600", "relative inline-flex items-center justify-center overflow-hidden bg-gray-100 dark:bg-gray-600", (props.stacked ?? false) && "ring-2 ring-gray-300 dark:ring-gray-500", (props.bordered ?? false) && "p-1 ring-2", (props.bordered ?? false) && AvatarImgColorsClasses[props.color ?? "light"], AvatarImgSizesClasses[props.size ?? "md"], (props.rounded ?? false) && "rounded-full") }, null, /* @__PURE__ */ qwik._jsxQ("span", null, { class: "font-medium text-gray-600 dark:text-gray-300" }, qwik._fnSignal((p0) => p0.placeholderInitials ?? "", [ props ], 'p0.placeholderInitials??""'), 3, null), 3, "1c_2") : /* @__PURE__ */ qwik._jsxQ("div", { class: twMerge(imgClassName.value, "relative overflow-hidden bg-gray-100 dark:bg-gray-600") }, null, /* @__PURE__ */ qwik._jsxQ("svg", null, { class: "absolute -bottom-1 h-auto w-auto text-gray-400", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ qwik._jsxQ("path", null, { "fill-rule": "evenodd", d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z", "clip-rule": "evenodd" }, null, 3, null), 3, null), 3, null), props.status && /* @__PURE__ */ qwik._jsxQ("span", { class: twMerge("absolute h-3.5 w-3.5 rounded-full border-2 border-white dark:border-gray-800", AvatarStatusClasses[props.status], AvatarStatusPositionClasses[props.statusPosition ?? "top-left"]) }, null, null, 3, "1c_3") ], 1, null), /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "1c_4") ] }, null, 0, "1c_5"); }, "Avatar_component_SjWFueRJesw")); const AvatarGroup = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const attrs = qwik._restProps(props, [ "class" ]); return /* @__PURE__ */ qwik._jsxS("div", { class: twMerge("flex -space-x-4", clsx(props.class)), ...attrs, children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "5n_0") }, null, 0, "5n_1"); }, "AvatarGroup_component_Sp7eE5q1TkI")); const AvatarGroupCounter = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const attrs = qwik._restProps(props, [ "href", "class", "total" ]); return /* @__PURE__ */ qwik._jsxS("a", { get href() { return props.href; }, class: twMerge("relative flex h-10 w-10 items-center justify-center rounded-full bg-gray-700 text-xs font-medium text-white ring-2 ring-gray-300 hover:bg-gray-600 dark:ring-gray-500", clsx(props.class)), ...attrs, children: [ "+", qwik._fnSignal((p0) => p0.total, [ props ], "p0.total") ] }, { href: qwik._fnSignal((p0) => p0.href, [ props ], "p0.href") }, 0, "rn_0"); }, "AvatarGroupCounter_component_wo0uUIt4BFw")); const Avatar = Object.assign(Avatar$1, { Group: AvatarGroup, GroupCounter: AvatarGroupCounter }); const defaultBadgeClasses = "mr-2 px-2.5 py-0.5 rounded flex items-center justify-center gap-1"; const badgeLinkClasses = "bg-blue-100 hover:bg-blue-200 text-blue-800 dark:text-blue-800 dark:hover:bg-blue-300"; const onlyIconClasses = "p-2 rounded-full mr-2"; const badgeTextClasses = { default: "", blue: "text-blue-800 dark:text-blue-300", dark: "text-gray-800 dark:text-gray-300", red: "text-red-800 dark:text-red-300", green: "text-green-800 dark:text-green-300", yellow: "text-yellow-800 dark:text-yellow-300", indigo: "text-indigo-800 dark:text-indigo-300", purple: "text-purple-800 dark:text-purple-300", pink: "text-pink-800 dark:text-pink-300" }; const badgeBorderClasses = { default: "", blue: "border border-blue-400 dark:text-blue-400 dark:bg-gray-700", dark: "border border-gray-500 text-grey-400 dark:text-gray-400 dark:bg-gray-700", red: "border border-red-400 dark:text-red-400 dark:bg-gray-700", green: "border border-green-400 dark:text-green-400 dark:bg-gray-700", yellow: "border border-yellow-300 dark:text-yellow-400 dark:bg-gray-700", indigo: "border border-indigo-400 dark:text-indigo-400 dark:bg-gray-700", purple: "border border-purple-400 dark:text-purple-400 dark:bg-gray-700", pink: "border border-pink-400 dark:text-pink-400 dark:bg-gray-700" }; const badgeTypeClasses = { default: "", blue: "bg-blue-100 dark:bg-blue-900", dark: "bg-gray-100 dark:bg-gray-700", red: "bg-red-100 dark:bg-red-900", green: "bg-green-100 dark:bg-green-900", yellow: "bg-yellow-100 dark:bg-yellow-900", indigo: "bg-indigo-100 dark:bg-indigo-900", purple: "bg-purple-100 dark:bg-purple-900", pink: "bg-pink-100 dark:bg-pink-900" }; const badgeHoverChipsClasses = { default: "", blue: "hover:bg-blue-200 hover:text-blue-900 dark:hover:bg-blue-600 dark:hover:text-blue-300", dark: "hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-gray-300", red: "hover:bg-red-200 hover:text-red-900 dark:hover:bg-red-600 dark:hover:text-red-300", green: "hover:bg-green-200 hover:text-green-900 dark:hover:bg-green-600 dark:hover:text-green-300", yellow: "hover:bg-yellow-200 hover:text-yellow-900 dark:hover:bg-yellow-600 dark:hover:text-yellow-300", indigo: "hover:bg-indigo-200 hover:text-indigo-900 dark:hover:bg-indigo-600 dark:hover:text-indigo-300", purple: "hover:bg-purple-200 hover:text-purple-900 dark:hover:bg-purple-600 dark:hover:text-purple-300", pink: "hover:bg-pink-200 hover:text-pink-900 dark:hover:bg-pink-600 dark:hover:text-pink-300" }; const badgeSizeClasses = { xs: "text-xs font-semibold", sm: "text-sm font-medium" }; const pillsClasses = "rounded-full"; function useBadgeClasses({ content, size = "xs", href, type = "default", class: classNames, bordered, pills }) { const isContentEmpty = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [content2] = qwik.useLexicalScope(); return !content2; }, "useBadgeClasses_isContentEmpty_useComputed_YoFxmE0HA7w", [ content ])); const { themeName } = useFlowbiteThemable(); const internalType = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [themeName2, type2] = qwik.useLexicalScope(); return type2 === "default" ? themeName2.value : type2; }, "useBadgeClasses_internalType_useComputed_lEgXmpDkfts", [ themeName, type ])); const badgeClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [bordered2, classNames2, href2, internalType2, isContentEmpty2, pills2, size2] = qwik.useLexicalScope(); return twMerge(badgeSizeClasses[size2], href2 ? "" : badgeTypeClasses[internalType2.value], href2 ? "" : badgeTextClasses[internalType2.value], href2 ? badgeLinkClasses : "", bordered2 ? badgeBorderClasses[internalType2.value] : "", isContentEmpty2.value ? onlyIconClasses : defaultBadgeClasses, pills2 ? pillsClasses : "", clsx(classNames2)); }, "useBadgeClasses_badgeClasses_useComputed_2bbtqKGTnNk", [ bordered, classNames, href, internalType, isContentEmpty, pills, size ])); const badgeChipsClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [internalType2] = qwik.useLexicalScope(); return twMerge(badgeHoverChipsClasses[internalType2.value], "inline-flex items-center p-1 ms-2 text-sm bg-transparent rounded-sm"); }, "useBadgeClasses_badgeChipsClasses_useComputed_NDXKZ106ykk", [ internalType ])); return { badgeClasses, badgeChipsClasses }; } const Badge = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { qwik._jsxBranch(); const props1 = qwik._restProps(props, [ "icon", "tag", "onClose$" ]); const badgeclasses = useBadgeClasses(props1); const LinkComponent = (props.tag ?? "a") !== "a" ? props.tag ?? "a" : "a"; const BadgeComponent = props1.href ? LinkComponent : "span"; return /* @__PURE__ */ qwik._jsxC(BadgeComponent, { ...props1, get class() { return badgeclasses.badgeClasses.value; }, children: [ !!props.icon && /* @__PURE__ */ qwik._jsxC(props.icon, null, 3, "TX_0"), qwik._wrapSignal(props1, "content"), props1.chips && /* @__PURE__ */ qwik._jsxQ("button", { onClick$: props.onClose$ }, { type: "button", class: qwik._fnSignal((p0) => p0.badgeChipsClasses.value, [ badgeclasses ], "p0.badgeChipsClasses.value"), "aria-label": "Remove" }, [ /* @__PURE__ */ qwik._jsxC(flowbiteQwikIcons.IconCloseOutline, { class: "w-2 h-2", [qwik._IMMUTABLE]: { class: qwik._IMMUTABLE } }, 3, "TX_1"), /* @__PURE__ */ qwik._jsxQ("span", null, { class: "sr-only" }, "Remove badge", 3, null) ], 0, "TX_2") ], [qwik._IMMUTABLE]: { class: qwik._fnSignal((p0) => p0.badgeClasses.value, [ badgeclasses ], "p0.badgeClasses.value") } }, 0, "TX_3"); }, "Badge_component_f289FvykKcE")); const Banner$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const props1 = qwik._restProps(props, [ "sticky", "class" ]); return /* @__PURE__ */ qwik._jsxS("div", { role: "banner", tabIndex: -1, class: twMerge(props.sticky && "fixed left-0 z-50 w-full", props.sticky === "top" && "top-0", props.sticky === "bottom" && "bottom-0", clsx(props.class)), ...props1, children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "f0_0") }, { role: qwik._IMMUTABLE, tabIndex: qwik._IMMUTABLE }, 0, "f0_1"); }, "Banner_component_L7STdvMrR6I")); const buttonColorClasses = { default: { default: "", blue: "text-white bg-blue-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg dark:bg-blue-600 focus:outline-none dark:focus:ring-blue-800", alternative: "font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600", dark: "text-white bg-gray-800 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg dark:bg-gray-800 dark:focus:ring-gray-700 dark:border-gray-700", light: "text-gray-900 bg-white border border-gray-300 focus:outline-none focus:ring-4 focus:ring-gray-200 font-medium rounded-lg dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:focus:ring-gray-700", green: "focus:outline-none text-white bg-green-700 focus:ring-4 focus:ring-green-300 font-medium rounded-lg dark:bg-green-600 dark:focus:ring-green-800", red: "focus:outline-none text-white bg-red-700 focus:ring-4 focus:ring-red-300 font-medium rounded-lg dark:bg-red-600 dark:focus:ring-red-900", yellow: "focus:outline-none text-white bg-yellow-400 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg dark:focus:ring-yellow-900", purple: "focus:outline-none text-white bg-purple-700 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg dark:bg-purple-600 dark:focus:ring-purple-900", pink: "focus:outline-none text-white bg-pink-700 focus:ring-4 focus:ring-pink-300 font-medium rounded-lg dark:bg-pink-600 dark:focus:ring-pink-900" }, hover: { default: "", blue: "hover:bg-blue-800 dark:hover:bg-blue-700", alternative: "hover:bg-gray-100 hover:text-blue-700 dark:hover:text-white dark:hover:bg-gray-700", dark: "hover:bg-gray-900 dark:hover:bg-gray-700", light: "hover:bg-gray-100 dark:hover:border-gray-600", green: "hover:bg-green-800 dark:hover:bg-green-700", red: "hover:bg-red-800 dark:hover:bg-red-700", yellow: "hover:bg-yellow-500", purple: "hover:bg-purple-800 dark:hover:bg-purple-700", pink: "hover:bg-pink-800 dark:hover:bg-pink-700" } }; const buttonOutlineColorClasses = { default: { dark: "text-gray-900 border border-gray-800 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg text-sm text-center dark:border-gray-600 dark:text-gray-400 dark:focus:ring-gray-800", default: "text-blue-700 border border-blue-700 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm text-center dark:border-blue-500 dark:text-blue-500 dark:focus:ring-blue-800", blue: "text-blue-700 border border-blue-700 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm text-center dark:border-blue-500 dark:text-blue-500 dark:focus:ring-blue-800", green: "text-green-700 border border-green-700 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-lg text-sm text-center dark:border-green-500 dark:text-green-500 dark:focus:ring-green-800", purple: "text-purple-700 border border-purple-700 focus:ring-4 focus:outline-none focus:ring-purple-300 font-medium rounded-lg text-sm text-center dark:border-purple-400 dark:text-purple-400 dark:focus:ring-purple-900", pink: "text-pink-700 border border-pink-700 focus:ring-4 focus:outline-none focus:ring-pink-300 font-medium rounded-lg text-sm text-center dark:border-pink-400 dark:text-pink-400 dark:focus:ring-pink-900", red: "text-red-700 border border-red-700 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm text-center dark:border-red-500 dark:text-red-500 dark:focus:ring-red-900", yellow: "text-yellow-400 border border-yellow-400 focus:ring-4 focus:outline-none focus:ring-yellow-300 font-medium rounded-lg text-sm text-center dark:border-yellow-300 dark:text-yellow-300 dark:focus:ring-yellow-900" }, hover: { dark: "hover:text-white hover:bg-gray-900 dark:hover:text-white dark:hover:bg-gray-600", default: "hover:text-white hover:bg-blue-800 dark:hover:text-white dark:hover:bg-blue-600", blue: "hover:text-white hover:bg-blue-800 dark:hover:text-white dark:hover:bg-blue-600", green: "hover:text-white hover:bg-green-800 dark:hover:text-white dark:hover:bg-green-600", purple: "hover:text-white hover:bg-purple-800 dark:hover:text-white dark:hover:bg-purple-500", pink: "hover:text-white hover:bg-pink-800 dark:hover:text-white dark:hover:bg-pink-500", red: "hover:text-white hover:bg-red-800 dark:hover:text-white dark:hover:bg-red-600", yellow: "hover:text-white hover:bg-yellow-500 dark:hover:text-white dark:hover:bg-yellow-400" } }; const buttonGradientClasses = { hover: { "cyan-blue": "hover:bg-gradient-to-bl", "green-blue": "hover:bg-gradient-to-bl", "pink-orange": "hover:bg-gradient-to-bl", "purple-blue": "hover:bg-gradient-to-bl", "purple-pink": "hover:bg-gradient-to-l", "red-yellow": "hover:bg-gradient-to-bl", "teal-lime": "hover:bg-gradient-to-l hover:from-teal-200 hover:to-lime-200", blue: "hover:bg-gradient-to-br", cyan: "hover:bg-gradient-to-br", green: "hover:bg-gradient-to-br", lime: "hover:bg-gradient-to-br", pink: "hover:bg-gradient-to-br", purple: "hover:bg-gradient-to-br", red: "hover:bg-gradient-to-br", teal: "hover:bg-gradient-to-br" }, default: { "cyan-blue": "text-white bg-gradient-to-r from-cyan-500 to-blue-500 focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg", "green-blue": "text-white bg-gradient-to-br from-green-400 to-blue-600 focus:ring-4 focus:outline-none focus:ring-green-200 dark:focus:ring-green-800 font-medium rounded-lg", "pink-orange": "text-white bg-gradient-to-br from-pink-500 to-orange-400 focus:ring-4 focus:outline-none focus:ring-pink-200 dark:focus:ring-pink-800 font-medium rounded-lg", "purple-blue": "text-white bg-gradient-to-br from-purple-600 to-blue-500 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800 font-medium rounded-lg", "purple-pink": "text-white bg-gradient-to-r from-purple-500 to-pink-500 focus:ring-4 focus:outline-none focus:ring-purple-200 dark:focus:ring-purple-800 font-medium rounded-lg", "red-yellow": "text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 focus:ring-4 focus:outline-none focus:ring-red-100 dark:focus:ring-red-400 font-medium rounded-lg", "teal-lime": "text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 focus:ring-4 focus:outline-none focus:ring-lime-200 dark:focus:ring-teal-700 font-medium rounded-lg", blue: "text-white bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800 rounded-lg", cyan: "text-white bg-gradient-to-r from-cyan-500 via-cyan-600 to-cyan-700 focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 rounded-lg", green: "text-white bg-gradient-to-r from-green-500 via-green-600 to-green-700 focus:ring-4 focus:outline-none focus:ring-green-300 dark:focus:ring-green-800 rounded-lg", lime: "text-gray-900 bg-gradient-to-r from-lime-500 via-lime-600 to-lime-700 focus:ring-4 focus:outline-none focus:ring-lime-300 dark:focus:ring-lime-800 rounded-lg", pink: "text-white bg-gradient-to-r from-pink-500 via-pink-600 to-pink-700 focus:ring-4 focus:outline-none focus:ring-pink-300 dark:focus:ring-pink-800 rounded-lg", purple: "text-white bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 focus:ring-4 focus:outline-none focus:ring-purple-300 dark:focus:ring-purple-800 rounded-lg", red: "text-white bg-gradient-to-r from-red-500 via-red-600 to-red-700 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 rounded-lg", teal: "text-white bg-gradient-to-r from-teal-500 via-teal-600 to-teal-700 focus:ring-4 focus:outline-none focus:ring-teal-300 dark:focus:ring-teal-800 rounded-lg" } }; const buttonOutlineGradientClasses = { default: { "cyan-blue": "relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-cyan-500 to-blue-500 dark:text-white focus:ring-4 focus:outline-none focus:ring-cyan-200 dark:focus:ring-cyan-800", "green-blue": "relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-green-400 to-blue-600 dark:text-white focus:ring-4 focus:outline-none focus:ring-green-200 dark:focus:ring-green-800", "pink-orange": "relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-pink-500 to-orange-400 dark:text-white focus:ring-4 focus:outline-none focus:ring-pink-200 dark:focus:ring-pink-800", "purple-blue": "relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-purple-600 to-blue-500 dark:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800", "purple-pink": "relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-purple-500 to-pink-500 dark:text-white focus:ring-4 focus:outline-none focus:ring-purple-200 dark:focus:ring-purple-800", "red-yellow": "relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-red-200 via-red-300 to-yellow-200 dark:text-white focus:ring-4 focus:outline-none focus:ring-red-100 dark:focus:ring-red-400", "teal-lime": "relative inline-flex items-center justify-center overflow-hidden font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-teal-300 to-lime-300 dark:text-white focus:ring-4 focus:outline-none focus:ring-lime-200 dark:focus:ring-lime-800" }, hover: { "cyan-blue": "group-hover:from-cyan-500 group-hover:to-blue-500 hover:text-white", "green-blue": "group-hover:from-green-400 group-hover:to-blue-600 hover:text-white", "pink-orange": "group-hover:from-pink-500 group-hover:to-orange-400 hover:text-white", "purple-blue": "group-hover:from-purple-600 group-hover:to-blue-500 hover:text-white", "purple-pink": "group-hover:from-purple-500 group-hover:to-pink-500 hover:text-white", "red-yellow": "group-hover:from-red-200 group-hover:via-red-300 group-hover:to-yellow-200 dark:hover:text-gray-900", "teal-lime": "group-hover:from-teal-300 group-hover:to-lime-300 dark:hover:text-gray-900" } }; const buttonSizeClasses = { xs: "text-xs px-2 py-1", sm: "text-sm px-3 py-1.5", md: "text-sm px-4 py-2", lg: "text-base px-5 py-2.5", xl: "text-base px-6 py-3" }; const buttonSquareSizeClasses = { xs: "text-xs p-1", sm: "text-sm p-1.5", md: "text-sm p-2", lg: "text-base p-2.5", xl: "text-base p-3" }; const buttonShadowClasses = { blue: "shadow-lg shadow-blue-500/50 dark:shadow-lg dark:shadow-blue-800/80", cyan: "shadow-lg shadow-cyan-500/50 dark:shadow-lg dark:shadow-cyan-800/80", green: "shadow-lg shadow-green-500/50 dark:shadow-lg dark:shadow-green-800/80", lime: "shadow-lg shadow-lime-500/50 dark:shadow-lg dark:shadow-lime-800/80", pink: "shadow-lg shadow-pink-500/50 dark:shadow-lg dark:shadow-pink-800/80", purple: "shadow-lg shadow-purple-500/50 dark:shadow-lg dark:shadow-purple-800/80", red: "shadow-lg shadow-red-500/50 dark:shadow-lg dark:shadow-red-800/80", teal: "shadow-lg shadow-teal-500/50 dark:shadow-lg dark:shadow-teal-800/80" }; const simpleGradients = [ "blue", "green", "cyan", "teal", "lime", "red", "pink", "purple" ]; const alternativeColors = [ "alternative", "light" ]; function useButtonClasses(props) { const { themeName } = useFlowbiteThemable(); const sizeClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); if (props2.square.value) return buttonSquareSizeClasses[props2.size.value]; return buttonSizeClasses[props2.size.value]; }, "useButtonClasses_sizeClasses_useComputed_lUE2UErgfDY", [ props ])); const bindClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2, sizeClasses2, themeName2] = qwik.useLexicalScope(); const isGradient = !!props2.gradient?.value; const isColor = !!props2.color.value; const isOutline = props2.outline.value; let hoverClass = ""; let backgroundClass = ""; if (isGradient && isOutline) { if (!simpleGradients.includes(props2.gradient.value)) { backgroundClass = buttonOutlineGradientClasses.default[props2.gradient?.value]; if (!props2.disabled.value) hoverClass = buttonOutlineGradientClasses.hover[props2.gradient.value]; } else console.warn(`cannot use outline prop with "${props2.gradient.value}" gradient`); } else if (isGradient) { backgroundClass = buttonGradientClasses.default[props2.gradient.value]; if (!props2.disabled.value) hoverClass = buttonGradientClasses.hover[props2.gradient.value]; } else if (isColor && isOutline) { if (!alternativeColors.includes(props2.color.value)) { const color = props2.color.value === "default" ? themeName2.value : props2.color.value; backgroundClass = buttonOutlineColorClasses.default[color]; if (!props2.disabled.value) hoverClass = buttonOutlineColorClasses.hover[color]; } else console.warn(`cannot use outline prop with "${props2.color.value}" color`); } else { const color = props2.color.value === "default" ? themeName2.value : props2.color.value; backgroundClass = buttonColorClasses.default[color]; if (!props2.disabled.value) hoverClass = buttonColorClasses.hover[color]; } let shadowClass = ""; if (typeof props2.shadow?.value === "boolean" && Boolean(props2.shadow.value)) { if (props2.gradient?.value && simpleGradients.includes(props2.gradient.value)) shadowClass = buttonShadowClasses[props2.gradient.value]; } else if (typeof props2.shadow?.value === "string") { if (simpleGradients.includes(props2.shadow.value)) shadowClass = buttonShadowClasses[props2.shadow.value]; } return twMerge([ backgroundClass, hoverClass, shadowClass, props2.pill.value && "!rounded-full", props2.disabled.value ? "cursor-not-allowed opacity-50" : "cursor-pointer", isGradient && isOutline ? "p-0.5" : sizeClasses2.value, (props2.prefix || props2.suffix || props2.loading.value) && "inline-flex items-center", clsx(props2.class?.value), props2.target?.value, props2.full.value ? "w-full" : "w-fit", "justify-center" ]); }, "useButtonClasses_bindClasses_useComputed_A3q3KAWhkcU", [ props, sizeClasses, themeName ])); const spanClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2, sizeClasses2] = qwik.useLexicalScope(); let classes = []; if (!!props2.gradient?.value && props2.outline.value) classes = [ "relative bg-white dark:bg-gray-900 rounded-md inline-flex items-center", sizeClasses2.value, !props2.disabled.value ? "group-hover:bg-opacity-0 transition-all ease-in duration-75" : "" ]; return twMerge(classes); }, "useButtonClasses_spanClasses_useComputed_rB3mBGqDD70", [ props, sizeClasses ])); return { bindClasses, spanClasses }; } function useButtonSpinner(props) { const btnSizeSpinnerSizeMap = { xs: "2.5", sm: "3", md: "4", lg: "5", xl: "6" }; const size = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [btnSizeSpinnerSizeMap2, props2] = qwik.useLexicalScope(); return btnSizeSpinnerSizeMap2[props2.size]; }, "useButtonSpinner_size_useComputed_sPjxeHKGm9M", [ btnSizeSpinnerSizeMap, props ])); const color = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); if (!props2.outline) return "white"; if (props2.gradient) { if (props2.gradient.includes("purple")) return "purple"; else if (props2.gradient.includes("blue")) return "blue"; else if (props2.gradient.includes("pink")) return "pink"; else if (props2.gradient.includes("red")) return "red"; return "white"; } if ([ "alternative", "dark", "light" ].includes(props2.color)) return "white"; else if (props2.color === "default") return "blue"; return props2.color; }, "useButtonSpinner_color_useComputed_865nL1Rdldg", [ props ])); return { color, size }; } const sizes = { 0: "w-0 h-0", 0.5: "w-0.5 h-0.5", 1: "w-1 h-1", 1.5: "w-1.5 h-1.5", 10: "w-10 h-10", 11: "w-11 h-11", 12: "w-12 h-12", 2: "w-2 h-2", 2.5: "w-2.5 h-2.5", 3: "w-3 h-3", 4: "w-4 h-4", 5: "w-5 h-5", 6: "w-6 h-6", 7: "w-7 h-7", 8: "w-8 h-8", 9: "w-9 h-9" }; const colors = { blue: "fill-blue-600", gray: "fill-gray-600 dark:fill-gray-300", green: "fill-green-500", pink: "fill-pink-600", purple: "fill-purple-600", red: "fill-red-600", white: "fill-white", yellow: "fill-yellow-400" }; function useSpinnerClasses(props) { const { themeName } = useFlowbiteThemable(); const internalColor = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2, themeName2] = qwik.useLexicalScope(); return props2.color === "default" ? themeName2.value : props2.color; }, "useSpinnerClasses_internalColor_useComputed_Ct9n9L1zhVY", [ props, themeName ])); const sizeClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return sizes[props2.size]; }, "useSpinnerClasses_sizeClasses_useComputed_0ajEvnus5Vo", [ props ])); const colorClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [internalColor2] = qwik.useLexicalScope(); return colors[internalColor2.value]; }, "useSpinnerClasses_colorClasses_useComputed_hhk9Xjp58OA", [ internalColor ])); const bgColorClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => "text-gray-200 dark:text-gray-600", "useSpinnerClasses_bgColorClasses_useComputed_lus3SJZW4y8")); const animateClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => "animate-spin", "useSpinnerClasses_animateClasses_useComputed_e9vxxD80Rgo")); const spinnerClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [animateClasses2, bgColorClasses2, colorClasses2, sizeClasses2] = qwik.useLexicalScope(); return clsx(animateClasses2.value, bgColorClasses2.value, colorClasses2.value, sizeClasses2.value); }, "useSpinnerClasses_spinnerClasses_useComputed_pGgr0kBU2X8", [ animateClasses, bgColorClasses, colorClasses, sizeClasses ])); return { spinnerClasses }; } const Spinner = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const spinnerclasses = useSpinnerClasses({ color: props.color ?? "default", size: props.size ?? "4" }); return /* @__PURE__ */ qwik._jsxQ("svg", null, { class: qwik._fnSignal((p0) => p0.spinnerClasses.value, [ spinnerclasses ], "p0.spinnerClasses.value"), fill: "none", role: "status", viewBox: "0 0 100 101", xmlns: "http://www.w3.org/2000/svg" }, [ /* @__PURE__ */ qwik._jsxQ("path", null, { d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" }, null, 3, null), /* @__PURE__ */ qwik._jsxQ("path", null, { d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill" }, null, 3, null) ], 3, "S0_0"); }, "Spinner_component_0bH10HSwKSg")); const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { qwik._jsxBranch(); const attrs = qwik._restProps(props, [ "color", "gradient", "size", "shadow", "pill", "square", "outline", "loading", "loadingPosition", "disabled", "href", "tag", "prefix", "suffix", "full" ]); const buttonclasses = useButtonClasses({ color: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.color ?? "default"; }, "Button_component_buttonclasses_useButtonClasses_useComputed_kKRgQ94ADOY", [ props ])), gradient: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.gradient; }, "Button_component_buttonclasses_useButtonClasses_useComputed_1_ybgetmATlZg", [ props ])), size: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.size ?? "md"; }, "Button_component_buttonclasses_useButtonClasses_useComputed_2_ot2YxKTrP0c", [ props ])), loading: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.loading ?? false; }, "Button_component_buttonclasses_useButtonClasses_useComputed_3_Qn87fZza8No", [ props ])), disabled: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.disabled ?? false; }, "Button_component_buttonclasses_useButtonClasses_useComputed_4_jvrDh6Ln1Dk", [ props ])), pill: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.pill ?? false; }, "Button_component_buttonclasses_useButtonClasses_useComputed_5_Z037hAbrXGU", [ props ])), shadow: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.shadow ?? false; }, "Button_component_buttonclasses_useButtonClasses_useComputed_6_zsFnBVAY8DM", [ props ])), square: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.square ?? false; }, "Button_component_buttonclasses_useButtonClasses_useComputed_7_7ZoYjMgVUgU", [ props ])), outline: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.outline ?? false; }, "Button_component_buttonclasses_useButtonClasses_useComputed_8_yqwvb1085q4", [ props ])), prefix: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.prefix; }, "Button_component_buttonclasses_useButtonClasses_useComputed_9_mKGCoOgW8pk", [ props ])), suffix: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.suffix; }, "Button_component_buttonclasses_useButtonClasses_useComputed_10_D2W3qymDLjQ", [ props ])), class: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [attrs2] = qwik.useLexicalScope(); return attrs2.class; }, "Button_component_buttonclasses_useButtonClasses_useComputed_11_nUmBxnllS4U", [ attrs ])), target: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [attrs2] = qwik.useLexicalScope(); return attrs2.target; }, "Button_component_buttonclasses_useButtonClasses_useComputed_12_uA9fiu6XF0U", [ attrs ])), full: qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.full ?? false; }, "Button_component_buttonclasses_useButtonClasses_useComputed_13_oYFpbc03UNU", [ props ])) }); const isOutlineGradient = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return (props2.outline ?? false) && props2.gradient; }, "Button_component_isOutlineGradient_useComputed_QpaRMikUVc0", [ props ])); const loadingPrefix = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return (props2.loading ?? false) && (props2.loadingPosition ?? "prefix") === "prefix"; }, "Button_component_loadingPrefix_useComputed_B0Nz4QHXWwY", [ props ])); const loadingSuffix = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return (props2.loading ?? false) && (props2.loadingPosition ?? "prefix") === "suffix"; }, "Button_component_loadingSuffix_useComputed_EVerks9nmfA", [ props ])); const buttonspinner = useButtonSpinner({ color: props.color ?? "default", gradient: props.gradient, size: props.size ?? "md", outline: props.outline ?? false }); const isLinkTag = [ "a", qwikCity.Link ].includes(props.tag ?? "button"); const LinkComponent = isLinkTag ? props.tag ?? "button" : "a"; const staticComponent = isLinkTag ? "button" : props.tag ?? "button"; const ButtonComponent = props.href ? LinkComponent : staticComponent; return /* @__PURE__ */ qwik._jsxC(ButtonComponent, { get class() { return buttonclasses.bindClasses.value; }, get href() { return props.href; }, target: props.href ? attrs.target : void 0, //@ts-expect-error does not exist on other elements disabled: !props.href && ButtonComponent === "button" ? props.disabled ?? false : void 0, ...attrs, children: [ !isOutlineGradient.value && (props.prefix || loadingPrefix.value) && /* @__PURE__ */ qwik._jsxQ("div", null, { class: "mr-2" }, loadingPrefix.value ? /* @__PURE__ */ qwik._jsxC(Spinner, { get color() { return buttonspinner.color.value; }, get size() { return buttonspinner.size.value; }, [qwik._IMMUTABLE]: { color: qwik._fnSignal((p0) => p0.color.value, [ buttonspinner ], "p0.color.value"), size: qwik._fnSignal((p0) => p0.size.value, [ buttonspinner ], "p0.size.value") } }, 3, "PW_0") : props.prefix && /* @__PURE__ */ qwik._jsxC(props.prefix, null, 3, "PW_1"), 1, "PW_2"), /* @__PURE__ */ qwik._jsxQ("span", null, { class: qwik._fnSignal((p0) => p0.spanClasses.value, [ buttonclasses ], "p0.spanClasses.value") }, [ isOutlineGradient.value && (props.prefix || loadingPrefix.value) && /* @__PURE__ */ qwik._jsxQ("span", null, { class: "mr-2" }, loadingPrefix.value ? /* @__PURE__ */ qwik._jsxC(Spinner, { get color() { return buttonspinner.color.value; }, get size() { return buttonspinner.size.value; }, [qwik._IMMUTABLE]: { color: qwik._fnSignal((p0) => p0.color.value, [ buttonspinner ], "p0.color.value"), size: qwik._fnSignal((p0) => p0.size.value, [ buttonspinner ], "p0.size.value") } }, 3, "PW_3") : props.prefix && /* @__PURE__ */ qwik._jsxC(props.prefix, null, 3, "PW_4"), 1, "PW_5"), /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "PW_6"), isOutlineGradient.value && (props.suffix || loadingSuffix.value) && /* @__PURE__ */ qwik._jsxQ("span", null, { class: "ml-2" }, loadingSuffix.value ? /* @__PURE__ */ qwik._jsxC(Spinner, { get color() { return buttonspinner.color.value; }, get size() { return buttonspinner.size.value; }, [qwik._IMMUTABLE]: { color: qwik._fnSignal((p0) => p0.color.value, [ buttonspinner ], "p0.color.value"), size: qwik._fnSignal((p0) => p0.size.value, [ buttonspinner ], "p0.size.value") } }, 3, "PW_7") : props.suffix && /* @__PURE__ */ qwik._jsxC(props.suffix, null, 3, "PW_8"), 1, "PW_9") ], 1, null), !isOutlineGradient.value && (props.suffix || loadingSuffix.value) && /* @__PURE__ */ qwik._jsxQ("div", null, { class: "ml-2" }, loadingSuffix.value ? /* @__PURE__ */ qwik._jsxC(Spinner, { get color() { return buttonspinner.color.value; }, get size() { return buttonspinner.size.value; }, [qwik._IMMUTABLE]: { color: qwik._fnSignal((p0) => p0.color.value, [ buttonspinner ], "p0.color.value"), size: qwik._fnSignal((p0) => p0.size.value, [ buttonspinner ], "p0.size.value") } }, 3, "PW_10") : props.suffix && /* @__PURE__ */ qwik._jsxC(props.suffix, null, 3, "PW_11"), 1, "PW_12") ], [qwik._IMMUTABLE]: { class: qwik._fnSignal((p0) => p0.bindClasses.value, [ buttonclasses ], "p0.bindClasses.value"), href: qwik._fnSignal((p0) => p0.href, [ props ], "p0.href") } }, 0, "PW_13"); }, "Button_component_T02YwpQAy28")); const BannerCollapseButton = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const onClick = /* @__PURE__ */ qwik.inlinedQrl((event) => { const collapseButton = event.target; const parentBanner = collapseButton.closest('[role="banner"]'); parentBanner?.remove(); }, "BannerCollapseButton_component_onClick_WPZ2ij6Vu9g"); return /* @__PURE__ */ qwik._jsxC(Button, { onClick$: onClick, ...props, children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "5r_0"), [qwik._IMMUTABLE]: { onClick$: qwik._IMMUTABLE } }, 0, "5r_1"); }, "BannerCollapseButton_component_r6z4xfmSl2I")); const Banner = Object.assign(Banner$1, { CollapseButton: BannerCollapseButton }); const Blockquote = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const attrs = qwik._restProps(props, [ "class" ]); return /* @__PURE__ */ qwik._jsxS("blockquote", { class: twMerge("text-xl font-semibold italic text-gray-900 dark:text-white", clsx(props.class)), ...attrs, children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "La_0") }, null, 0, "La_1"); }, "Blockquote_component_0HJvE0vP0OM")); const breadcrumbDefaultClasses = "inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse"; const breadcrumbWrapperVariantClasses = { default: "flex", solid: "flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700" }; function useBreadcrumbClasses(solid) { const breadcrumbClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => clsx(breadcrumbDefaultClasses), "useBreadcrumbClasses_breadcrumbClasses_useComputed_4jmVtToVpvs")); const breadcrumbWrapperClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [solid2] = qwik.useLexicalScope(); return clsx(breadcrumbWrapperVariantClasses[solid2.value ? "solid" : "default"]); }, "useBreadcrumbClasses_breadcrumbWrapperClasses_useComputed_IvE0RABs5Uw", [ solid ])); return { breadcrumbClasses, breadcrumbWrapperClasses }; } const Breadcrumb$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const breadcrumbclasses = useBreadcrumbClasses(qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.solid ?? false; }, "Breadcrumb_component_breadcrumbclasses_useBreadcrumbClasses_useComputed_7F5WMgy0uk0", [ props ]))); return /* @__PURE__ */ qwik._jsxQ("nav", null, { "aria-label": "Breadcrumb", class: qwik._fnSignal((p0) => p0.breadcrumbWrapperClasses.value, [ breadcrumbclasses ], "p0.breadcrumbWrapperClasses.value") }, /* @__PURE__ */ qwik._jsxQ("ol", null, { class: qwik._fnSignal((p0) => p0.breadcrumbClasses.value, [ breadcrumbclasses ], "p0.breadcrumbClasses.value") }, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "Kr_0"), 1, null), 1, "Kr_1"); }, "Breadcrumb_component_Zrt5rIFiGPk")); const breadcrumbItemDefaultClasses = "ms-1 inline-flex items-center text-sm font-medium dark:text-gray-400"; const breadcrumbItemLinkClasses = "text-gray-700 hover:text-gray-900 dark:hover:text-white"; const breadcrumbSpanClasses = "text-gray-500"; function useBreadcrumbItemClasses(href) { const breadcrumbItemClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [href2] = qwik.useLexicalScope(); return clsx(breadcrumbItemDefaultClasses, href2.value ? breadcrumbItemLinkClasses : breadcrumbSpanClasses); }, "useBreadcrumbItemClasses_breadcrumbItemClasses_useComputed_pV40Ds0BLFo", [ href ])); return { breadcrumbItemClasses }; } const BreadcrumbItem = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { qwik._jsxBranch(); const LinkComponent = (props.tag ?? "a") !== "a" ? props.tag ?? "a" : "a"; const TagComponent = props.href ? LinkComponent : "span"; const breadcrumbitemclasses = useBreadcrumbItemClasses(qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.href; }, "BreadcrumbItem_component_breadcrumbitemclasses_useBreadcrumbItemClasses_useComputed_DtJCVeQnBYo", [ props ]))); return /* @__PURE__ */ qwik._jsxQ("li", null, { class: "inline-flex items-center" }, [ !(props.home ?? false) && (!!props.arrowIcon ? /* @__PURE__ */ qwik._jsxC(props.arrowIcon, { class: "mx-1 h-3 w-3 text-gray-400 rtl:rotate-180", [qwik._IMMUTABLE]: { class: qwik._IMMUTABLE } }, 3, "1E_0") : /* @__PURE__ */ qwik._jsxC(flowbiteQwikIcons.IconArrowRightOutline, { class: "ml-1 mr-2 h-3 w-3 text-gray-400 rtl:rotate-180", [qwik._IMMUTABLE]: { class: qwik._IMMUTABLE } }, 3, "1E_1")), /* @__PURE__ */ qwik._jsxC(TagComponent, { get href() { return props.href; }, get class() { return breadcrumbitemclasses.breadcrumbItemClasses.value; }, children: [ !!props.homeIcon && /* @__PURE__ */ qwik._jsxC(props.homeIcon, { class: "me-2.5 h-3 w-3 text-gray-400", [qwik._IMMUTABLE]: { class: qwik._IMMUTABLE } }, 3, "1E_2"), (props.home ?? false) && !Boolean(props.homeIcon) && /* @__PURE__ */ qwik._jsxC(flowbiteQwikIcons.IconHomeOutline, { class: "me-2.5 h-3 w-3", [qwik._IMMUTABLE]: { class: qwik._IMMUTABLE } }, 3, "1E_3"), /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "1E_4") ], [qwik._IMMUTABLE]: { href: qwik._fnSignal((p0) => p0.href, [ props ], "p0.href"), class: qwik._fnSignal((p0) => p0.breadcrumbItemClasses.value, [ breadcrumbitemclasses ], "p0.breadcrumbItemClasses.value") } }, 1, "1E_5") ], 1, "1E_6"); }, "BreadcrumbItem_component_rR9HhPdETVc")); const Breadcrumb = Object.assign(Breadcrumb$1, { Item: BreadcrumbItem }); const positionClass = { start: "rounded-r-none focus:ring-2", middle: "rounded-none border-l-0 focus:ring-2", end: "rounded-l-none border-l-0 focus:ring-2" }; const ButtonGroup = ({ children, ...props }) => { const childrenToProcess = Array.isArray(children) ? [ ...children ] : [ children ]; const components = []; getChild(children, [ { component: Button, foundComponentCallback: (child, index) => { const position = index === 0 ? "start" : index === childrenToProcess.length - 1 ? "end" : "middle"; if (props.outline) child.props["outline"] = true; child.props["class"] = child.immutableProps?.["class"] ? child.immutableProps["class"] + " " + positionClass[position] : positionClass[position]; components.push({ id: index, button: child }); } } ]); return /* @__PURE__ */ qwik._jsxC(InnerButtonGroup, { components, ...props }, 0, "UT_0"); }; const InnerButtonGroup = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const props1 = qwik._restProps(props, [ "components", "class" ]); return /* @__PURE__ */ qwik._jsxS("div", { class: twMerge("inline-flex", clsx(props.class)), role: "group", ...props1, children: props.components.map((comp) => /* @__PURE__ */ qwik._jsxC(qwik.Fragment, { children: qwik._wrapSignal(comp, "button") }, 1, comp.id)) }, { role: qwik._IMMUTABLE }, 0, "UT_1"); }, "InnerButtonGroup_component_FN28xaYzsVE")); const Card = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const attrs = qwik._restProps(props, [ "class", "tag", "theme", "imgSrc", "imgAlt", "imgAs", "horizontal", "href" ]); const LinkComponent = (props.tag ?? "a") !== "a" ? props.tag ?? "a" : "a"; const TagComponent = props.href ? LinkComponent : "div"; return ( // @ts-expect-error href does not exist on div /* @__PURE__ */ qwik._jsxC(TagComponent, { get href() { return props.href; }, class: twMerge("flex rounded-lg border border-gray-200 bg-white shadow-md dark:border-gray-700 dark:bg-gray-800", props.horizontal ?? false ? "flex-col md:max-w-xl md:flex-row" : "flex-col", props.href && "hover:bg-gray-100 dark:hover:bg-gray-700", clsx(props.theme?.root), clsx(props.class)), ...attrs, children: [ props.imgAs ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, { children: qwik._fnSignal((p0) => p0.imgAs, [ props ], "p0.imgAs") }, 3, "v3_0") : props.imgSrc ? /* @__PURE__ */ qwik._jsxQ("img", { class: twMerge(props.horizontal ?? false ? "h-96 w-full rounded-t-lg object-cover md:h-auto md:w-48 md:rounded-none md:rounded-l-lg" : "rounded-t-lg", clsx(props.theme?.image)) }, { alt: qwik._fnSignal((p0) => p0.imgAlt, [ props ], "p0.imgAlt"), src: qwik._fnSignal((p0) => p0.imgSrc, [ props ], "p0.imgSrc") }, null, 3, "v3_1") : /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, null, 3, "v3_2"), /* @__PURE__ */ qwik._jsxQ("div", { class: twMerge("flex h-full flex-col justify-center gap-4 p-6", clsx(props.theme?.content)) }, null, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "v3_3"), 1, null) ], [qwik._IMMUTABLE]: { href: qwik._fnSignal((p0) => p0.href, [ props ], "p0.href") } }, 0, "v3_4") ); }, "Card_component_c3ZzNvsoKWU")); const styles = "/* hidden */\n.carousel-scrollable {\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none\n }\n}\n\n/* width */\n.carousel-scrollable::-webkit-scrollbar {\n height: 0.25rem;\n width: 0.25rem\n}\n\n/* Track */\n.carousel-scrollable::-webkit-scrollbar-track {\n --tw-bg-opacity: 1;\n background-color: rgb(156 163 175 / var(--tw-bg-opacity))\n}\n\n/* Handle */\n.carousel-scrollable::-webkit-scrollbar-thumb {\n border-start-start-radius: 0.25rem;\n border-end-start-radius: 0.25rem;\n --tw-bg-opacity: 1;\n background-color: rgb(75 85 99 / var(--tw-bg-opacity))\n}\n\n/* Handle on hover */\n.carousel-scrollable::-webkit-scrollbar-thumb:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(31 41 55 / var(--tw-bg-opacity))\n}\n"; const Carousel$1 = ({ children, ...props }) => { const components = []; const classesToAdd = "absolute top-1/2 left-1/2 w-full -translate-x-1/2 -translate-y-1/2"; getChild(children, [ { component: CarouselSlide, foundComponentCallback: (child, index) => { const childrenIsArray = Array.isArray(child.children); let computedChildren; if (childrenIsArray) computedChildren = qwik.createElement("div", { key: uuid(), class: classesToAdd }, child.children); else { const cc = child.children; computedChildren = qwik.createElement(cc.type, { ...cc.immutableProps, class: cc.immutableProps?.["class"] ? twMerge(cc.immutableProps["class"], classesToAdd) : classesToAdd, key: cc.key }, cc.children); } components.push({ id: index, children: computedChildren }); } } ]); return /* @__PURE__ */ qwik._jsxC(InnerCarousel, { components, ...props }, 0, "Qf_0"); }; const CarouselSlide = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { return /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "Qf_1"); }, "CarouselSlide_component_zLPgqJOquMI")); const InnerCarousel = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { qwik._jsxBranch(); qwik.useStylesQrl(/* @__PURE__ */ qwik.inlinedQrl(styles, "InnerCarousel_component_useStyles_5UozdhQ05TE")); const carouselContainer = qwik.useSignal(); const state = qwik.useStore({ currentPicture: 0, direction: "", interval: void 0, automaticSlide: /* @__PURE__ */ qwik.inlinedQrl(function() { const [props2] = qwik.useLexicalScope(); if (!(props2.slideAuto ?? true)) return; this.interval = setInterval(this.nextPicture.bind(this), props2.slideInterval ?? 3e3); }, "InnerCarousel_component_state_useStore_vT4OScgR0HE", [ props ]), resetInterval: /* @__PURE__ */ qwik.inlinedQrl(function() { clearInterval(this.interval); this.automaticSlide(); }, "InnerCarousel_component_state_useStore_1_r46Qc0GqWBQ"), slideTo: /* @__PURE__ */ qwik.inlinedQrl(function(index) { this.currentPicture = index; this.goTo(); this.resetInterval(); }, "InnerCarousel_component_state_useStore_2_T55gNloxcXk"), nextPicture: /* @__PURE__ */ qwik.inlinedQrl(function() { const [props2] = qwik.useLexicalScope(); if (this.currentPicture !== props2.components.length - 1) this.currentPicture += 1; else this.currentPicture = 0; this.goTo(); this.direction = "right"; this.resetInterval(); }, "InnerCarousel_component_state_useStore_3_9h1cc8YnIUg", [ props ]), previousPicture: /* @__PURE__ */ qwik.inlinedQrl(function() { const [props2] = qwik.useLexicalScope(); if (this.currentPicture !== 0) this.currentPicture -= 1; else this.currentPicture = props2.components.length - 1; this.goTo(); this.direction = "left"; this.resetInterval(); }, "InnerCarousel_component_state_useStore_4_vFTMigJg10M", [ props ]), goTo: /* @__PURE__ */ qwik.inlinedQrl(function() { const [carouselContainer2, props2] = qwik.useLexicalScope(); props2.onSlideChanged$?.(); if (carouselContainer2.value) carouselContainer2.value.scrollLeft = carouselContainer2.value.clientWidth * this.currentPicture; }, "InnerCarousel_component_state_useStore_5_MsOn5ePwp7E", [ carouselContainer, props ]), mouseEnter: /* @__PURE__ */ qwik.inlinedQrl(function() { const [props2] = qwik.useLexicalScope(); if (!(props2.pauseOnHover ?? false)) return; clearInterval(this.interval); }, "InnerCarousel_component_state_useStore_6_itZkGXkOLlI", [ props ]), mouseLeave: /* @__PURE__ */ qwik.inlinedQrl(function() { const [props2] = qwik.useLexicalScope(); if (!(props2.pauseOnHover ?? false)) return; this.resetInterval(); }, "InnerCarousel_component_state_useStore_7_ejVPCH5LfD8", [ props ]) }); const onScroll = /* @__PURE__ */ qwik.inlinedQrl(() => { const [carouselContainer2, props2, state2] = qwik.useLexicalScope(); if (!(props2.scrollable ?? false)) return; if (carouselContainer2.value) state2.currentPicture = Math.round(carouselContainer2.value.scrollLeft / carouselContainer2.value.clientWidth); }, "InnerCarousel_component_onScroll_07zZKbNxOLI", [ carouselContainer, props, state ]); qwik.useVisibleTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2, state2] = qwik.useLexicalScope(); if (props2.slideAuto ?? true) state2.automaticSlide(); }, "InnerCarousel_component_useVisibleTask_rjh93tb46OA", [ props, state ])); return /* @__PURE__ */ qwik._jsxQ("div", { class: twMerge("relative h-56 w-full sm:h-64 xl:h-80 2xl:h-96", clsx(props.class)) }, null, [ /* @__PURE__ */ qwik._jsxQ("div", { ref: carouselContainer, class: [ "flex h-full snap-x snap-mandatory overflow-y-hidden overflow-x-scroll scroll-smooth rounded-lg", { "overflow-hidden !overflow-x-hidden [scrollbar-width:none]": !(props.scrollable ?? false), "[&::-webkit-scrollbar]:[-webkit-appearance:none !important] [&::-webkit-scrollbar]:!hidden [&::-webkit-scrollbar]:!h-0 [&::-webkit-scrollbar]:!w-0 [&::-webkit-scrollbar]:!bg-transparent": !(props.scrollable ?? false), "carousel-scrollable": props.scrollable ?? false } ] }, { onScroll$: onScroll, onMouseEnter$: /* @__PURE__ */ qwik.inlinedQrl(() => { const [state2] = qwik.useLexicalScope(); state2.mouseEnter(); }, "InnerCarousel_component_div_div_onMouseEnter_91ihDSv0kwI", [ state ]), onMouseLeave$: /* @__PURE__ */ qwik.inlinedQrl(() => { const [state2] = qwik.useLexicalScope(); state2.mouseLeave(); }, "InnerCarousel_component_div_div_onMouseLeave_J1huMZH0fd4", [ state ]) }, props.components.map((comp, i) => /* @__PURE__ */ qwik._jsxQ("div", null, { class: "w-full flex-shrink-0 transform cursor-default snap-center" }, /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, { children: qwik._wrapSignal(comp, "children") }, 1, "Qf_2"), 1, i)), 1, null), !(props.noIndicators ?? false) && /* @__PURE__ */ qwik._jsxQ("div", null, { class: "absolute bottom-5 left-1/2 z-30 flex -translate-x-1/2 space-x-3" }, props.components.map((comp, i) => /* @__PURE__ */ qwik._jsxQ("button", { "aria-label": "Slide " + comp.id, class: [ i === state.currentPicture ? "bg-white dark:bg-gray-800" : "bg-white/50 hover:bg-white dark:bg-gray-800/50 dark:hover:bg-gray-800", "h-3 w-3 rounded-full" ], onClick$: /* @__PURE__ */ qwik.inlinedQrl(() => { const [i2, state2] = qwik.useLexicalScope(); state2.slideTo(i2); }, "InnerCarousel_component_div_div_button_onClick_2P1IatVW2NU", [ i, state ]) }, { "aria-current": false, type: "button" }, null, 2, comp.id)), 1, "Qf_3"), !(props.noControls ?? false) && !(props.scrollable ?? false) && /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, { children: [ /* @__PURE__ */ qwik._jsxQ("button", null, { class: "group absolute left-0 top-0 z-30 flex h-full cursor-pointer items-center justify-center px-4 focus:outline-none", type: "button", onClick$: /* @__PURE__ */ qwik.inlinedQrl(() => { const [state2] = qwik.useLexicalScope(); state2.previousPicture(); }, "InnerCarousel_component_div__Fragment_button_onClick_7qLizUmOpLI", [ state ]) }, /* @__PURE__ */ qwik._jsxQ("span", null, { class: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/30 group-hover:bg-white/50 group-focus:outline-none group-focus:ring-4 group-focus:ring-white sm:h-10 sm:w-10 dark:bg-gray-800/30 dark:group-hover:bg-gray-800/60 dark:group-focus:ring-gray-800/70" }, [ /* @__PURE__ */ qwik._jsxC(flowbiteQwikIcons.IconAngleLeftSolid, { class: "h-4 w-4 text-white sm:h-5 sm:w-5 dark:text-gray-800", [qwik._IMMUTABLE]: { class: qwik._IMMUTABLE } }, 3, "Qf_4"), /* @__PURE__ */ qwik._jsxQ("span", null, { class: "sr-only" }, "Previous", 3, null) ], 1, null), 1, null), /* @__PURE__ */ qwik._jsxQ("button", null, { class: "group absolute right-0 top-0 z-30 flex h-full cursor-pointer items-center justify-center px-4 focus:outline-none", type: "button", onClick$: /* @__PURE__ */ qwik.inlinedQrl(() => { const [state2] = qwik.useLexicalScope(); state2.nextPicture(); }, "InnerCarousel_component_div__Fragment_button_onClick_1_dzpJHa2qb8Q", [ state ]) }, /* @__PURE__ */ qwik._jsxQ("span", null, { class: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/30 group-hover:bg-white/50 group-focus:outline-none group-focus:ring-4 group-focus:ring-white sm:h-10 sm:w-10 dark:bg-gray-800/30 dark:group-hover:bg-gray-800/60 dark:group-focus:ring-gray-800/70" }, [ /* @__PURE__ */ qwik._jsxC(flowbiteQwikIcons.IconAngleRightOutline, { class: "h-4 w-4 text-white sm:h-5 sm:w-5 dark:text-gray-800", [qwik._IMMUTABLE]: { class: qwik._IMMUTABLE } }, 3, "Qf_5"), /* @__PURE__ */ qwik._jsxQ("span", null, { class: "sr-only" }, "Next", 3, null) ], 1, null), 1, null) ] }, 1, "Qf_6") ], 1, "Qf_7"); }, "InnerCarousel_component_44W0xpxshZE")); const Carousel = Object.assign(Carousel$1, { Slide: CarouselSlide }); const defaultLabelClasses$2 = "block text-sm font-medium text-gray-900 dark:text-gray-300"; const defaultCheckboxClasses = "w-4 h-4 rounded focus:ring-2"; const checkboxClassesByTheme = { blue: "text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600", green: "text-green-600 bg-gray-100 border-gray-300 focus:ring-green-500 dark:focus:ring-green-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600", pink: "text-pink-600 bg-gray-100 border-gray-300 focus:ring-pink-500 dark:focus:ring-pink-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600", purple: "text-purple-600 bg-gray-100 border-gray-300 focus:ring-purple-500 dark:focus:ring-purple-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600", red: "text-red-600 bg-gray-100 border-gray-300 focus:ring-red-500 dark:focus:ring-red-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" }; function useCheckboxClasses(color) { const { themeName } = useFlowbiteThemable(); const checkboxClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [color2, themeName2] = qwik.useLexicalScope(); return twMerge(defaultCheckboxClasses, checkboxClassesByTheme[color2.value ?? themeName2.value]); }, "useCheckboxClasses_checkboxClasses_useComputed_quCmYUbVqjQ", [ color, themeName ])); const labelClasses = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => defaultLabelClasses$2, "useCheckboxClasses_labelClasses_useComputed_FC7AFrWAMIU")); return { checkboxClasses, labelClasses }; } const Checkbox = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const props1 = qwik._restProps(props, [ "color", "class", "onChange$", "children" ]); const internalColor = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => { const [props2] = qwik.useLexicalScope(); return props2.color; }, "Checkbox_component_internalColor_useComputed_p9NJmH6yGQo", [ props ])); const checkboxclasses = useCheckboxClasses(internalColor); const checked = qwik.useSignal(Boolean(props1.checked)); qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track }) => { const [checked2, props12] = qwik.useLexicalScope(); const innerChecked = track(() => props12.checked); checked2.value = Boolean(innerChecked); }, "Checkbox_component_useTask_o8XC6YwbOhc", [ checked, props1 ])); return /* @__PURE__ */ qwik._jsxQ("label", null, { class: qwik._fnSignal((p0) => [ "flex items-center justify-start gap-3", p0.labelClasses.value ], [ checkboxclasses ], '["flex items-center justify-start gap-3",p0.labelClasses.value]') }, [ /* @__PURE__ */ qwik._jsxS("input", { ...props1, type: "checkbox", class: twMerge(checkboxclasses.checkboxClasses.value, clsx(props.class)), "onInput$": /* @__PURE__ */ qwik.inlinedQrl((_, elm) => { const [checked2, props12] = qwik.useLexicalScope(); return (props12["bind:checked"] || checked2).value = elm.checked; }, "Checkbox_component_label_input_bind_checked_wpVXDfjaVB8", [ checked, props1 ]), onChange$: /* @__PURE__ */ qwik.inlinedQrl((_, elm) => { const [props2] = qwik.useLexicalScope(); props2.onChange$?.(elm.checked, elm.value); }, "Checkbox_component_label_input_onChange_5ts3Dqu4E94", [ props ]) }, { type: qwik._IMMUTABLE, "checked": props1["bind:checked"] || checked }, 0, null), /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "cI_0") ], 1, "cI_1"); }, "Checkbox_component_mQlGz8N16i0")); const RenderFloatingElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const props1 = qwik._restProps(props, [ "ref", "class", "isVisible" ]); return /* @__PURE__ */ qwik._jsxS("div", { ref: props.ref, get class() { return [ "absolute z-10 inline-block transition-opacity duration-300", props.isVisible ? "block opacity-100" : "pointer-events-none hidden opacity-0", props.class ]; }, ...props1, children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "k7_0") }, { class: qwik._fnSignal((p0) => [ "absolute z-10 inline-block transition-opacity duration-300", p0.isVisible ? "block opacity-100" : "pointer-events-none hidden opacity-0", p0.class ], [ props ], '["absolute z-10 inline-block transition-opacity duration-300",p0.isVisible?"block opacity-100":"pointer-events-none hidden opacity-0",p0.class]') }, 0, "k7_1"); }, "RenderFloatingElement_component_820xQE1Q1Zo")); const RenderFloatingArrow = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => { const props1 = qwik._restProps(props, [ "class" ]); return /* @__PURE__ */ qwik._jsxS("div", { get class() { return [ props.class, "absolute h-2 w-2 rotate-45" ]; }, ...props1 }, { class: qwik._fnSignal((p0) => [ p0.class, "absolute h-2 w-2 rotate-45" ], [ props ], '[p0.class,"absolute h-2 w-2 rotate-45"]') }, 0, "k7_2"); }, "RenderFloatingArrow_component_o0hXuzCXQ08")); const action = /* @__PURE__ */ qwik.inlinedQrl(async (event, targets, handler$, validCondition) => { if (!validCondition.value) return; const targetElements = targets.flatMap((selector) => { const element = qwik.isSignal(selector) ? selector.value : document.querySelector(selector); return element ? [ element ] : []; }); if (targetElements.some((element) => element === event.target || element.contains(event.target))) return; await handler$(); }, "action_GdnJE90AYtI"); function useComponentOuterClick(targets, handler$, validCondition) { qwik.useOn("click", /* @__PURE__ */ qwik.inlinedQrl((event) => { const [handler$2, targets2, validCondition2] = qwik.useLexicalScope(); return action(event, targets2, handler$2, validCondition2); }, "useComponentOuterClick_useOn_UOy8u4zO60k", [ handler$, targets, validCondition ])); } function useDocumentOuterClick(targets, handler$, validCondition) { qwik.useOnDocument("click", /* @__PURE__ */ qwik.inlinedQrl((event) => { const [handler$2, targets2, validCondition2] = qwik.useLexicalScope(); return action(event, targets2, handler$2, validCondition2); }, "useDocumentOuterClick_useOnDocument_EqcGGLmtJl8", [ handler$, targets, validCondition ])); } /** * Custom positioning reference element. * @see https://floating-ui.com/docs/virtual-elements */ const min = Math.min; const max = Math.max; const round = Math.round; const floor = Math.floor; const createCoords = v => ({ x: v, y: v }); const oppositeSideMap = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; const oppositeAlignmentMap = { start: 'end', end: 'start' }; function clamp(start, value, end) { return max(start, min(value, end)); } function evaluate(value, param) { return typeof value === 'function' ? value(param) : value; } function getSide(placement) { return placement.split('-')[0]; } function getAlignment(placement) { return placement.split('-')[1]; } function getOppositeAxis(axis) { return axis === 'x' ? 'y' : 'x'; } function getAxisLength(axis) { return axis === 'y' ? 'height' : 'width'; } function getSideAxis(placement) { return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x'; } function getAlignmentAxis(placement) { return getOppositeAxis(getSideAxis(placement)); } function getAlignmentSides(placement, rects, rtl) { if (rtl === void 0) { rtl = false; } const alignment = getAlignment(placement); const alignmentAxis = getAlignmentAxis(placement); const length = getAxisLength(alignmentAxis); let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top'; if (rects.reference[length] > rects.floating[length]) { mainAlignmentSide = getOppositePlacement(mainAlignmentSide); } return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; } function getExpandedPlacements(placement) { const oppositePlacement = getOppositePlacement(placement); return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; } function getOppositeAlignmentPlacement(placement) { return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]); } function getSideList(side, isStart, rtl) { const lr = ['left', 'right']; const rl = ['right', 'left']; const tb = ['top', 'bottom']; const bt = ['bottom', 'top']; switch (side) { case 'top': case 'bottom': if (rtl) return isStart ? rl : lr; return isStart ? lr : rl; case 'left': case 'right': return isStart ? tb : bt; default: return []; } } function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { const alignment = getAlignment(placement); let list = getSideList(getSide(placement), direction === 'start', rtl); if (alignment) { list = list.map(side => side + "-" + alignment); if (flipAlignment) { list = list.concat(list.map(getOppositeAlignmentPlacement)); } } return list; } function getOppositePlacement(placement) { return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]); } function expandPaddingObject(padding) { return { top: 0, right: 0, bottom: 0, left: 0, ...padding }; } function getPaddingObject(padding) { return typeof padding !== 'number' ? expandPaddingObject(padding) : { top: padding, right: padding, bottom: padding, left: padding }; } function rectToClientRect(rect) { const { x, y, width, height } = rect; return { width, height, top: y, left: x, right: x + width, bottom: y + height, x, y }; } function computeCoordsFromPlacement(_ref, placement, rtl) { let { reference, floating } = _ref; const sideAxis = getSideAxis(placement); const alignmentAxis = getAlignmentAxis(placement); const alignLength = getAxisLength(alignmentAxis); const side = getSide(placement); const isVertical = sideAxis === 'y'; const commonX = reference.x + reference.width / 2 - floating.width / 2; const commonY = reference.y + reference.height / 2 - floating.height / 2; const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; let coords; switch (side) { case 'top': coords = { x: commonX, y: reference.y - floating.height }; break; case 'bottom': coords = { x: commonX, y: reference.y + reference.height }; break; case 'right': coords = { x: reference.x + reference.width, y: commonY }; break; case 'left': coords = { x: reference.x - floating.width, y: commonY }; break; default: coords = { x: reference.x, y: reference.y }; } switch (getAlignment(placement)) { case 'start': coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); break; case 'end': coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); break; } return coords; } /** * Computes the `x` and `y` coordinates that will place the floating element * next to a given reference element. * * This export does not have any `platform` interface logic. You will need to * write one for the platform you are using Floating UI with. */ const computePosition$1 = async (reference, floating, config) => { const { placement = 'bottom', strategy = 'absolute', middleware = [], platform } = config; const validMiddleware = middleware.filter(Boolean); const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); let rects = await platform.getElementRects({ reference, floating, strategy }); let { x, y } = computeCoordsFromPlacement(rects, placement, rtl); let statefulPlacement = placement; let middlewareData = {}; let resetCount = 0; for (let i = 0; i < validMiddleware.length; i++) { const { name, fn } = validMiddleware[i]; const { x: nextX, y: nextY, data, reset } = await fn({ x, y, initialPlacement: placement, placement: statefulPlacement, strategy, middlewareData, rects, platform, elements: { reference, floating } }); x = nextX != null ? nextX : x; y = nextY != null ? nextY : y; middlewareData = { ...middlewareData, [name]: { ...middlewareData[name], ...data } }; if (reset && resetCount <= 50) { resetCount++; if (typeof reset === 'object') { if (reset.placement) { statefulPlacement = reset.placement; } if (reset.rects) { rects = reset.rects === true ? await platform.getElementRects({ reference, floating, strategy }) : reset.rects; } ({ x, y } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); } i = -1; } } return { x, y, placement: statefulPlacement, strategy, middlewareData }; }; /** * Resolves with an object of overflow side offsets that determine how much the * element is overflowing a given clipping boundary on each side. * - positive = overflowing the boundary by that number of pixels * - negative = how many pixels left before it will overflow * - 0 = lies flush with the boundary * @see https://floating-ui.com/docs/detectOverflow */ async function detectOverflow(state, options) { var _await$platform$isEle; if (options === void 0) { options = {}; } const { x, y, platform, rects, elements, strategy } = state; const { boundary = 'clippingAncestors', rootBoundary = 'viewport', elementContext = 'floating', altBoundary = false, padding = 0 } = evaluate(options, state); const paddingObject = getPaddingObject(padding); const altContext = elementContext === 'floating' ? 'reference' : 'floating'; const element = elements[altBoundary ? altContext : elementContext]; const clippingClientRect = rectToClientRect(await platform.getClippingRect({ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))), boundary, rootBoundary, strategy })); const rect = elementContext === 'floating' ? { x, y, width: rects.floating.width, height: rects.floating.height } : rects.reference; const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)); const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || { x: 1, y: 1 } : { x: 1, y: 1 }; const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({ elements, rect, offsetParent, strategy }) : rect); return { top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x }; } /** * Provides data to position an inner element of the floating element so that it * appears centered to the reference element. * @see https://floating-ui.com/docs/arrow */ const arrow$1 = options => ({ name: 'arrow', options, async fn(state) { const { x, y, placement, rects, platform, elements, middlewareData } = state; // Since `element` is required, we don't Partial<> the type. const { element, padding = 0 } = evaluate(options, state) || {}; if (element == null) { return {}; } const paddingObject = getPaddingObject(padding); const coords = { x, y }; const axis = getAlignmentAxis(placement); const length = getAxisLength(axis); const arrowDimensions = await platform.getDimensions(element); const isYAxis = axis === 'y'; const minProp = isYAxis ? 'top' : 'left'; const maxProp = isYAxis ? 'bottom' : 'right'; const clientProp = isYAxis ? 'clientHeight' : 'clientWidth'; const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; const startDiff = coords[axis] - rects.reference[axis]; const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element)); let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; // DOM platform can return `window` as the `offsetParent`. if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) { clientSize = elements.floating[clientProp] || rects.floating[length]; } const centerToReference = endDiff / 2 - startDiff / 2; // If the padding is large enough that it causes the arrow to no longer be // centered, modify the padding so that it is centered. const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; const minPadding = min(paddingObject[minProp], largestPossiblePadding); const maxPadding = min(paddingObject[maxProp], largestPossiblePadding); // Make sure the arrow doesn't overflow the floating element if the center // point is outside the floating element's bounds. const min$1 = minPadding; const max = clientSize - arrowDimensions[length] - maxPadding; const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; const offset = clamp(min$1, center, max); // If the reference is small enough that the arrow's padding causes it to // to point to nothing for an aligned placement, adjust the offset of the // floating element itself. To ensure `shift()` continues to take action, // a single reset is performed when this is true. const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0; return { [axis]: coords[axis] + alignmentOffset, data: { [axis]: offset, centerOffset: center - offset - alignmentOffset, ...(shouldAddOffset && { alignmentOffset }) }, reset: shouldAddOffset }; } }); /** * Optimizes the visibility of the floating element by flipping the `placement` * in order to keep it in view when the preferred placement(s) will overflow the * clipping boundary. Alternative to `autoPlacement`. * @see https://floating-ui.com/docs/flip */ const flip$1 = function (options) { if (options === void 0) { options = {}; } return { name: 'flip', options, async fn(state) { var _middlewareData$arrow, _middlewareData$flip; const { placement, middlewareData, rects, initialPlacement, platform, elements } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = 'bestFit', fallbackAxisSideDirection = 'none', flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state); // If a reset by the arrow was caused due to an alignment offset being // added, we should skip any logic now since `flip()` has already done its // work. // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643 if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } const side = getSide(placement); const initialSideAxis = getSideAxis(initialPlacement); const isBasePlacement = getSide(initialPlacement) === initialPlacement; const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none'; if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) { fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); } const placements = [initialPlacement, ...fallbackPlacements]; const overflow = await detectOverflow(state, detectOverflowOptions); const overflows = []; let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; if (checkMainAxis) { overflows.push(overflow[side]); } if (checkCrossAxis) { const sides = getAlignmentSides(placement, rects, rtl); overflows.push(overflow[sides[0]], overflow[sides[1]]); } overflowsData = [...overflowsData, { placement, overflows }]; // One or more sides is overflowing. if (!overflows.every(side => side <= 0)) { var _middlewareData$flip2, _overflowsData$filter; const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; const nextPlacement = placements[nextIndex]; if (nextPlacement) { // Try next placement and re-run the lifecycle. return { data: { index: nextIndex, overflows: overflowsData }, reset: { placement: nextPlacement } }; } // First, find the candidates that fit on the mainAxis side of overflow, // then find the placement that fits the best on the main crossAxis side. let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; // Otherwise fallback. if (!resetPlacement) { switch (fallbackStrategy) { case 'bestFit': { var _overflowsData$filter2; const placement = (_overflowsData$filter2 = overflowsData.filter(d => { if (hasFallbackAxisSideDirection) { const currentSideAxis = getSideAxis(d.placement); return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal // reading directions favoring greater width. currentSideAxis === 'y'; } return true; }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0]; if (placement) { resetPlacement = placement; } break; } case 'initialPlacement': resetPlacement = initialPlacement; break; } } if (placement !== resetPlacement) { return { reset: { placement: resetPlacement } }; } } return {}; } }; }; // For type backwards-compatibility, the `OffsetOptions` type was also // Derivable. async function convertValueToCoords(state, options) { const { placement, platform, elements } = state; const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); const side = getSide(placement); const alignment = getAlignment(placement); const isVertical = getSideAxis(placement) === 'y'; const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1; const crossAxisMulti = rtl && isVertical ? -1 : 1; const rawValue = evaluate(options, state); // eslint-disable-next-line prefer-const let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === 'number' ? { mainAxis: rawValue, crossAxis: 0, alignmentAxis: null } : { mainAxis: rawValue.mainAxis || 0, crossAxis: rawValue.crossAxis || 0, alignmentAxis: rawValue.alignmentAxis }; if (alignment && typeof alignmentAxis === 'number') { crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis; } return isVertical ? { x: crossAxis * crossAxisMulti, y: mainAxis * mainAxisMulti } : { x: mainAxis * mainAxisMulti, y: crossAxis * crossAxisMulti }; } /** * Modifies the placement by translating the floating element along the * specified axes. * A number (shorthand for `mainAxis` or distance), or an axes configuration * object may be passed. * @see https://floating-ui.com/docs/offset */ const offset$1 = function (options) { if (options === void 0) { options = 0; } return { name: 'offset', options, async fn(state) { var _middlewareData$offse, _middlewareData$arrow; const { x, y, placement, middlewareData } = state; const diffCoords = await convertValueToCoords(state, options); // If the placement is the same and the arrow caused an alignment offset // then we don't need to change the positioning coordinates. if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } return { x: x + diffCoords.x, y: y + diffCoords.y, data: { ...diffCoords, placement } }; } }; }; /** * Optimizes the visibility of the floating element by shifting it in order to * keep it in view when it will overflow the clipping boundary. * @see https://floating-ui.com/docs/shift */ const shift$1 = function (options) { if (options === void 0) { options = {}; } return { name: 'shift', options, async fn(state) { const { x, y, placement } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: _ref => { let { x, y } = _ref; return { x, y }; } }, ...detectOverflowOptions } = evaluate(options, state); const coords = { x, y }; const overflow = await detectOverflow(state, detectOverflowOptions); const crossAxis = getSideAxis(getSide(placement)); const mainAxis = getOppositeAxis(crossAxis); let mainAxisCoord = coords[mainAxis]; let crossAxisCoord = coords[crossAxis]; if (checkMainAxis) { const minSide = mainAxis === 'y' ? 'top' : 'left'; const maxSide = mainAxis === 'y' ? 'bottom' : 'right'; const min = mainAxisCoord + overflow[minSide]; const max = mainAxisCoord - overflow[maxSide]; mainAxisCoord = clamp(min, mainAxisCoord, max); } if (checkCrossAxis) { const minSide = crossAxis === 'y' ? 'top' : 'left'; const maxSide = crossAxis === 'y' ? 'bottom' : 'right'; const min = crossAxisCoord + overflow[minSide]; const max = crossAxisCoord - overflow[maxSide]; crossAxisCoord = clamp(min, crossAxisCoord, max); } const limitedCoords = limiter.fn({ ...state, [mainAxis]: mainAxisCoord, [crossAxis]: crossAxisCoord }); return { ...limitedCoords, data: { x: limitedCoords.x - x, y: limitedCoords.y - y, enabled: { [mainAxis]: checkMainAxis, [crossAxis]: checkCrossAxis } } }; } }; }; function hasWindow() { return typeof window !== 'undefined'; } function getNodeName(node) { if (isNode(node)) { return (node.nodeName || '').toLowerCase(); } // Mocked nodes in testing environments may not be instances of Node. By // returning `#document` an infinite loop won't occur. // https://github.com/floating-ui/floating-ui/issues/2317 return '#document'; } function getWindow(node) { var _node$ownerDocument; return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; } function getDocumentElement(node) { var _ref; return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; } function isNode(value) { if (!hasWindow()) { return false; } return value instanceof Node || value instanceof getWindow(value).Node; } function isElement(value) { if (!hasWindow()) { return false; } return value instanceof Element || value instanceof getWindow(value).Element; } function isHTMLElement(value) { if (!hasWindow()) { return false; } return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; } function isShadowRoot(value) { if (!hasWindow() || typeof ShadowRoot === 'undefined') { return false; } return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; } function isOverflowElement(element) { const { overflow, overflowX, overflowY, display } = getComputedStyle(element); return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display); } function isTableElement(element) { return ['table', 'td', 'th'].includes(getNodeName(element)); } function isTopLayer(element) { return [':popover-open', ':modal'].some(selector => { try { return element.matches(selector); } catch (e) { return false; } }); } function isContainingBlock(elementOrCss) { const webkit = isWebKit(); const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value)); } function getContainingBlock(element) { let currentNode = getParentNode(element); while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { if (isContainingBlock(currentNode)) { return currentNode; } else if (isTopLayer(currentNode)) { return null; } currentNode = getParentNode(currentNode); } return null; } function isWebKit() { if (typeof CSS === 'undefined' || !CSS.supports) return false; return CSS.supports('-webkit-backdrop-filter', 'none'); } function isLastTraversableNode(node) { return ['html', 'body', '#document'].includes(getNodeName(node)); } function getComputedStyle(element) { return getWindow(element).getComputedStyle(element); } function getNodeScroll(element) { if (isElement(element)) { return { scrollLeft: element.scrollLeft, scrollTop: element.scrollTop }; } return { scrollLeft: element.scrollX, scrollTop: element.scrollY }; } function getParentNode(node) { if (getNodeName(node) === 'html') { return node; } const result = // Step into the shadow DOM of the parent of a slotted node. node.assignedSlot || // DOM Element detected. node.parentNode || // ShadowRoot detected. isShadowRoot(node) && node.host || // Fallback. getDocumentElement(node); return isShadowRoot(result) ? result.host : result; } function getNearestOverflowAncestor(node) { const parentNode = getParentNode(node); if (isLastTraversableNode(parentNode)) { return node.ownerDocument ? node.ownerDocument.body : node.body; } if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { return parentNode; } return getNearestOverflowAncestor(parentNode); } function getOverflowAncestors(node, list, traverseIframes) { var _node$ownerDocument2; if (list === void 0) { list = []; } if (traverseIframes === void 0) { traverseIframes = true; } const scrollableAncestor = getNearestOverflowAncestor(node); const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); const win = getWindow(scrollableAncestor); if (isBody) { const frameElement = getFrameElement(win); return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []); } return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); } function getFrameElement(win) { return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null; } function getCssDimensions(element) { const css = getComputedStyle(element); // In testing environments, the `width` and `height` properties are empty // strings for SVG elements, returning NaN. Fallback to `0` in this case. let width = parseFloat(css.width) || 0; let height = parseFloat(css.height) || 0; const hasOffset = isHTMLElement(element); const offsetWidth = hasOffset ? element.offsetWidth : width; const offsetHeight = hasOffset ? element.offsetHeight : height; const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; if (shouldFallback) { width = offsetWidth; height = offsetHeight; } return { width, height, $: shouldFallback }; } function unwrapElement(element) { return !isElement(element) ? element.contextElement : element; } function getScale(element) { const domElement = unwrapElement(element); if (!isHTMLElement(domElement)) { return createCoords(1); } const rect = domElement.getBoundingClientRect(); const { width, height, $ } = getCssDimensions(domElement); let x = ($ ? round(rect.width) : rect.width) / width; let y = ($ ? round(rect.height) : rect.height) / height; // 0, NaN, or Infinity should always fallback to 1. if (!x || !Number.isFinite(x)) { x = 1; } if (!y || !Number.isFinite(y)) { y = 1; } return { x, y }; } const noOffsets = /*#__PURE__*/createCoords(0); function getVisualOffsets(element) { const win = getWindow(element); if (!isWebKit() || !win.visualViewport) { return noOffsets; } return { x: win.visualViewport.offsetLeft, y: win.visualViewport.offsetTop }; } function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { if (isFixed === void 0) { isFixed = false; } if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) { return false; } return isFixed; } function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { if (includeScale === void 0) { includeScale = false; } if (isFixedStrategy === void 0) { isFixedStrategy = false; } const clientRect = element.getBoundingClientRect(); const domElement = unwrapElement(element); let scale = createCoords(1); if (includeScale) { if (offsetParent) { if (isElement(offsetParent)) { scale = getScale(offsetParent); } } else { scale = getScale(element); } } const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); let x = (clientRect.left + visualOffsets.x) / scale.x; let y = (clientRect.top + visualOffsets.y) / scale.y; let width = clientRect.width / scale.x; let height = clientRect.height / scale.y; if (domElement) { const win = getWindow(domElement); const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent; let currentWin = win; let currentIFrame = getFrameElement(currentWin); while (currentIFrame && offsetParent && offsetWin !== currentWin) { const iframeScale = getScale(currentIFrame); const iframeRect = currentIFrame.getBoundingClientRect(); const css = getComputedStyle(currentIFrame); const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; x *= iframeScale.x; y *= iframeScale.y; width *= iframeScale.x; height *= iframeScale.y; x += left; y += top; currentWin = getWindow(currentIFrame); currentIFrame = getFrameElement(currentWin); } } return rectToClientRect({ width, height, x, y }); } // If has a CSS width greater than the viewport, then this will be // incorrect for RTL. function getWindowScrollBarX(element, rect) { const leftScroll = getNodeScroll(element).scrollLeft; if (!rect) { return getBoundingClientRect(getDocumentElement(element)).left + leftScroll; } return rect.left + leftScroll; } function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) { if (ignoreScrollbarX === void 0) { ignoreScrollbarX = false; } const htmlRect = documentElement.getBoundingClientRect(); const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : // RTL scrollbar. getWindowScrollBarX(documentElement, htmlRect)); const y = htmlRect.top + scroll.scrollTop; return { x, y }; } function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { let { elements, rect, offsetParent, strategy } = _ref; const isFixed = strategy === 'fixed'; const documentElement = getDocumentElement(offsetParent); const topLayer = elements ? isTopLayer(elements.floating) : false; if (offsetParent === documentElement || topLayer && isFixed) { return rect; } let scroll = { scrollLeft: 0, scrollTop: 0 }; let scale = createCoords(1); const offsets = createCoords(0); const isOffsetParentAnElement = isHTMLElement(offsetParent); if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isHTMLElement(offsetParent)) { const offsetRect = getBoundingClientRect(offsetParent); scale = getScale(offsetParent); offsets.x = offsetRect.x + offsetParent.clientLeft; offsets.y = offsetRect.y + offsetParent.clientTop; } } const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0); return { width: rect.width * scale.x, height: rect.height * scale.y, x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x, y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y }; } function getClientRects(element) { return Array.from(element.getClientRects()); } // Gets the entire size of the scrollable document area, even extending outside // of the `` and `` rect bounds if horizontally scrollable. function getDocumentRect(element) { const html = getDocumentElement(element); const scroll = getNodeScroll(element); const body = element.ownerDocument.body; const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); let x = -scroll.scrollLeft + getWindowScrollBarX(element); const y = -scroll.scrollTop; if (getComputedStyle(body).direction === 'rtl') { x += max(html.clientWidth, body.clientWidth) - width; } return { width, height, x, y }; } function getViewportRect(element, strategy) { const win = getWindow(element); const html = getDocumentElement(element); const visualViewport = win.visualViewport; let width = html.clientWidth; let height = html.clientHeight; let x = 0; let y = 0; if (visualViewport) { width = visualViewport.width; height = visualViewport.height; const visualViewportBased = isWebKit(); if (!visualViewportBased || visualViewportBased && strategy === 'fixed') { x = visualViewport.offsetLeft; y = visualViewport.offsetTop; } } return { width, height, x, y }; } // Returns the inner client rect, subtracting scrollbars if present. function getInnerBoundingClientRect(element, strategy) { const clientRect = getBoundingClientRect(element, true, strategy === 'fixed'); const top = clientRect.top + element.clientTop; const left = clientRect.left + element.clientLeft; const scale = isHTMLElement(element) ? getScale(element) : createCoords(1); const width = element.clientWidth * scale.x; const height = element.clientHeight * scale.y; const x = left * scale.x; const y = top * scale.y; return { width, height, x, y }; } function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { let rect; if (clippingAncestor === 'viewport') { rect = getViewportRect(element, strategy); } else if (clippingAncestor === 'document') { rect = getDocumentRect(getDocumentElement(element)); } else if (isElement(clippingAncestor)) { rect = getInnerBoundingClientRect(clippingAncestor, strategy); } else { const visualOffsets = getVisualOffsets(element); rect = { x: clippingAncestor.x - visualOffsets.x, y: clippingAncestor.y - visualOffsets.y, width: clippingAncestor.width, height: clippingAncestor.height }; } return rectToClientRect(rect); } function hasFixedPositionAncestor(element, stopNode) { const parentNode = getParentNode(element); if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) { return false; } return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode); } // A "clipping ancestor" is an `overflow` element with the characteristic of // clipping (or hiding) child elements. This returns all clipping ancestors // of the given element up the tree. function getClippingElementAncestors(element, cache) { const cachedResult = cache.get(element); if (cachedResult) { return cachedResult; } let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body'); let currentContainingBlockComputedStyle = null; const elementIsFixed = getComputedStyle(element).position === 'fixed'; let currentNode = elementIsFixed ? getParentNode(element) : element; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block while (isElement(currentNode) && !isLastTraversableNode(currentNode)) { const computedStyle = getComputedStyle(currentNode); const currentNodeIsContaining = isContainingBlock(currentNode); if (!currentNodeIsContaining && computedStyle.position === 'fixed') { currentContainingBlockComputedStyle = null; } const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); if (shouldDropCurrentNode) { // Drop non-containing blocks. result = result.filter(ancestor => ancestor !== currentNode); } else { // Record last containing block for next iteration. currentContainingBlockComputedStyle = computedStyle; } currentNode = getParentNode(currentNode); } cache.set(element, result); return result; } // Gets the maximum area that the element is visible in due to any number of // clipping ancestors. function getClippingRect(_ref) { let { element, boundary, rootBoundary, strategy } = _ref; const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary); const clippingAncestors = [...elementClippingAncestors, rootBoundary]; const firstClippingAncestor = clippingAncestors[0]; const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); accRect.top = max(rect.top, accRect.top); accRect.right = min(rect.right, accRect.right); accRect.bottom = min(rect.bottom, accRect.bottom); accRect.left = max(rect.left, accRect.left); return accRect; }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); return { width: clippingRect.right - clippingRect.left, height: clippingRect.bottom - clippingRect.top, x: clippingRect.left, y: clippingRect.top }; } function getDimensions(element) { const { width, height } = getCssDimensions(element); return { width, height }; } function getRectRelativeToOffsetParent(element, offsetParent, strategy) { const isOffsetParentAnElement = isHTMLElement(offsetParent); const documentElement = getDocumentElement(offsetParent); const isFixed = strategy === 'fixed'; const rect = getBoundingClientRect(element, true, isFixed, offsetParent); let scroll = { scrollLeft: 0, scrollTop: 0 }; const offsets = createCoords(0); if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isOffsetParentAnElement) { const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); offsets.x = offsetRect.x + offsetParent.clientLeft; offsets.y = offsetRect.y + offsetParent.clientTop; } else if (documentElement) { // If the scrollbar appears on the left (e.g. RTL systems). Use // Firefox with layout.scrollbar.side = 3 in about:config to test this. offsets.x = getWindowScrollBarX(documentElement); } } const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0); const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x; const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y; return { x, y, width: rect.width, height: rect.height }; } function isStaticPositioned(element) { return getComputedStyle(element).position === 'static'; } function getTrueOffsetParent(element, polyfill) { if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') { return null; } if (polyfill) { return polyfill(element); } let rawOffsetParent = element.offsetParent; // Firefox returns the element as the offsetParent if it's non-static, // while Chrome and Safari return the element. The element must // be used to perform the correct calculations even if the element is // non-static. if (getDocumentElement(element) === rawOffsetParent) { rawOffsetParent = rawOffsetParent.ownerDocument.body; } return rawOffsetParent; } // Gets the closest ancestor positioned element. Handles some edge cases, // such as table ancestors and cross browser bugs. function getOffsetParent(element, polyfill) { const win = getWindow(element); if (isTopLayer(element)) { return win; } if (!isHTMLElement(element)) { let svgOffsetParent = getParentNode(element); while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) { if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) { return svgOffsetParent; } svgOffsetParent = getParentNode(svgOffsetParent); } return win; } let offsetParent = getTrueOffsetParent(element, polyfill); while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) { offsetParent = getTrueOffsetParent(offsetParent, polyfill); } if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) { return win; } return offsetParent || getContainingBlock(element) || win; } const getElementRects = async function (data) { const getOffsetParentFn = this.getOffsetParent || getOffsetParent; const getDimensionsFn = this.getDimensions; const floatingDimensions = await getDimensionsFn(data.floating); return { reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), floating: { x: 0, y: 0, width: floatingDimensions.width, height: floatingDimensions.height } }; }; function isRTL(element) { return getComputedStyle(element).direction === 'rtl'; } const platform = { convertOffsetParentRelativeRectToViewportRelativeRect, getDocumentElement, getClippingRect, getOffsetParent, getElementRects, getClientRects, getDimensions, getScale, isElement, isRTL }; // https://samthor.au/2021/observing-dom/ function observeMove(element, onMove) { let io = null; let timeoutId; const root = getDocumentElement(element); function cleanup() { var _io; clearTimeout(timeoutId); (_io = io) == null || _io.disconnect(); io = null; } function refresh(skip, threshold) { if (skip === void 0) { skip = false; } if (threshold === void 0) { threshold = 1; } cleanup(); const { left, top, width, height } = element.getBoundingClientRect(); if (!skip) { onMove(); } if (!width || !height) { return; } const insetTop = floor(top); const insetRight = floor(root.clientWidth - (left + width)); const insetBottom = floor(root.clientHeight - (top + height)); const insetLeft = floor(left); const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; const options = { rootMargin, threshold: max(0, min(1, threshold)) || 1 }; let isFirstUpdate = true; function handleObserve(entries) { const ratio = entries[0].intersectionRatio; if (ratio !== threshold) { if (!isFirstUpdate) { return refresh(); } if (!ratio) { // If the reference is clipped, the ratio is 0. Throttle the refresh // to prevent an infinite loop of updates. timeoutId = setTimeout(() => { refresh(false, 1e-7); }, 1000); } else { refresh(false, ratio); } } isFirstUpdate = false; } // Older browsers don't support a `document` as the root and will throw an // error. try { io = new IntersectionObserver(handleObserve, { ...options, // Handle