{"version":3,"file":"carousel.cjs","sources":["../src/shared/constants.ts","../src/shared/injectSymbols.ts","../src/shared/slideRegistry.ts","../src/utils/applyEdgeSpacing.ts","../src/utils/calculateAverage.ts","../src/utils/createCloneSlides.ts","../src/utils/debounce.ts","../src/utils/disableChildrenTabbing.ts","../src/utils/except.ts","../src/utils/getNumberInRange.ts","../src/utils/getClampedScrollTarget.ts","../src/utils/getDraggedSlidesCount.ts","../node_modules/.pnpm/@rollup+plugin-typescript@12.1.4_rollup@4.59.0_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js","../src/utils/getNativeScrollDelta.ts","../src/utils/getNativeSlideIndex.ts","../src/utils/getScaleMultipliers.ts","../src/utils/getSnapAlignOffset.ts","../src/utils/i18nFormatter.ts","../src/utils/mapNumberToRange.ts","../src/utils/supportsNativeCss.ts","../src/utils/throttle.ts","../src/utils/toCssValue.ts","../src/components/ARIA/ARIA.ts","../src/composables/useDrag.ts","../src/composables/useHover.ts","../src/composables/useMarqueePhase.ts","../src/composables/useWheel.ts","../src/components/Carousel/carouselProps.ts","../src/components/Carousel/Carousel.ts","../src/components/Icon/Icon.types.ts","../src/components/Icon/Icon.ts","../src/components/Navigation/Navigation.ts","../src/components/Pagination/Pagination.ts","../src/components/Slide/Slide.ts"],"sourcesContent":["import { CarouselConfig } from './types'\n\nexport const BREAKPOINT_MODE_OPTIONS = ['viewport', 'carousel'] as const\n\nexport const DIR_MAP = {\n  'bottom-to-top': 'btt',\n  'left-to-right': 'ltr',\n  'right-to-left': 'rtl',\n  'top-to-bottom': 'ttb',\n} as const\n\nexport const DIR_OPTIONS = [\n  'ltr',\n  'left-to-right',\n  'rtl',\n  'right-to-left',\n  'ttb',\n  'top-to-bottom',\n  'btt',\n  'bottom-to-top',\n] as const\n\nexport const I18N_DEFAULT_CONFIG = {\n  ariaGallery: 'Gallery {id}',\n  ariaNavigateToPage: 'Navigate to page {slideNumber}',\n  ariaNavigateToSlide: 'Navigate to slide {slideNumber}',\n  ariaNextSlide: 'Navigate to next slide',\n  ariaPreviousSlide: 'Navigate to previous slide',\n  iconArrowDown: 'Arrow pointing downwards',\n  iconArrowLeft: 'Arrow pointing to the left',\n  iconArrowRight: 'Arrow pointing to the right',\n  iconArrowUp: 'Arrow pointing upwards',\n  itemXofY: 'Item {currentSlide} of {slidesCount}',\n} as const\n\nexport const NORMALIZED_DIR_OPTIONS = Object.values(DIR_MAP)\n\nexport const SLIDE_EFFECTS = ['slide', 'fade'] as const\n\nexport const SNAP_ALIGN_OPTIONS = [\n  'center',\n  'start',\n  'end',\n  'center-even',\n  'center-odd',\n] as const\n\n// scroll-snap-align value used by each snapAlign option in native CSS mode\nexport const NATIVE_SNAP_ALIGN = {\n  center: 'center',\n  'center-even': 'center',\n  'center-odd': 'center',\n  end: 'end',\n  start: 'start',\n} as const\n\nexport const DEFAULT_MOUSE_WHEEL_THRESHOLD = 10\nexport const DEFAULT_DRAG_THRESHOLD = 0.08\n\nexport const DEFAULT_CLASS_PREFIX = 'carousel'\n\nexport const DEFAULT_CONFIG: CarouselConfig = {\n  adaptiveHeight: false,\n  autoplay: 0,\n  autoScrollOnFocus: true,\n  breakpointMode: BREAKPOINT_MODE_OPTIONS[0],\n  breakpoints: undefined,\n  classPrefix: DEFAULT_CLASS_PREFIX,\n  dir: DIR_OPTIONS[0],\n  disableWhenSlidesFit: false,\n  edgeSpacing: 0,\n  enabled: true,\n  gap: 0,\n  height: 'auto',\n  i18n: I18N_DEFAULT_CONFIG,\n  ignoreAnimations: false,\n  itemsToScroll: 1,\n  itemsToShow: 1,\n  keyboardNavigation: true,\n  marquee: false,\n  marqueeSpeed: 60,\n  modelValue: 0,\n  mouseDrag: true,\n  mouseWheel: false,\n  nativeCss: false,\n  pauseAutoplayOnHover: false,\n  preventExcessiveDragging: false,\n  slideEffect: SLIDE_EFFECTS[0],\n  snapAlign: SNAP_ALIGN_OPTIONS[0],\n  touchDrag: true,\n  transition: 300,\n  transitionEasing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)', // ease-out-quad for smooth transitions\n  wrapAround: false,\n}\n","import { InjectionKey } from 'vue'\n\nimport { InjectedCarousel } from '@/components/Carousel'\n\n// Use a symbol for inject provide to avoid any kind of collision with another lib\n// https://vuejs.org/guide/components/provide-inject#working-with-symbol-keys\nexport const injectCarousel = Symbol('carousel') as InjectionKey<\n  InjectedCarousel | undefined\n>\n","import { ComponentInternalInstance, EmitFn, shallowReactive } from 'vue'\n\nconst createSlideRegistry = (emit: EmitFn) => {\n  const slides = shallowReactive<Array<ComponentInternalInstance>>([])\n\n  const updateSlideIndexes = (startIndex?: number) => {\n    if (startIndex !== undefined) {\n      slides.slice(startIndex).forEach((slide, offset) => {\n        slide.exposed?.setIndex(startIndex + offset)\n      })\n    } else {\n      slides.forEach((slide, index) => {\n        slide.exposed?.setIndex(index)\n      })\n    }\n  }\n\n  return {\n    cleanup: () => {\n      slides.splice(0, slides.length)\n    },\n\n    getSlides: () => slides,\n\n    registerSlide: (slide: ComponentInternalInstance, index?: number) => {\n      if (!slide) return\n\n      if (slide.props.isClone) {\n        return\n      }\n\n      const slideIndex = index ?? slides.length\n      slides.splice(slideIndex, 0, slide)\n      updateSlideIndexes(slideIndex)\n      emit('slide-registered', { slide, index: slideIndex })\n    },\n\n    unregisterSlide: (slide: ComponentInternalInstance) => {\n      const slideIndex = slides.indexOf(slide)\n      if (slideIndex === -1) return\n\n      emit('slide-unregistered', { slide, index: slideIndex })\n\n      slides.splice(slideIndex, 1)\n      updateSlideIndexes(slideIndex)\n    },\n  }\n}\n\nexport type SlideRegistry = ReturnType<typeof createSlideRegistry>\n\nexport { createSlideRegistry }\n","type ApplyEdgeSpacingArgs = {\n  /** Scrolled distance, already clamped to the [0, max] range. */\n  value: number\n  /** Scrolled distance of the last position. */\n  max: number\n  /** Extra space, in the same unit as `value`, to add at both edges. */\n  spacing: number\n}\n\n/**\n * Pushes a clamped scrolled distance past its edges so that empty space\n * appears before the first slide (at the start) and after the last slide\n * (at the end). Positions in between are returned unchanged.\n */\nexport function applyEdgeSpacing({ value, max, spacing }: ApplyEdgeSpacingArgs): number {\n  if (spacing <= 0) {\n    return value\n  }\n  if (value <= 0) {\n    return value - spacing\n  }\n  if (value >= max) {\n    return value + spacing\n  }\n  return value\n}\n","export function calculateAverage(numbers: number[]) {\n  if (numbers.length === 0) return 0\n  const validNumbers = numbers.filter(num => typeof num === 'number' && !isNaN(num) && isFinite(num))\n  if (validNumbers.length === 0) return 0\n  const sum = validNumbers.reduce((acc, num) => acc + num, 0)\n  return sum / validNumbers.length\n}\n","import { cloneVNode, ComponentInternalInstance, VNode } from 'vue'\n\ntype CreateCloneSlidesArgs = {\n  slides: Array<ComponentInternalInstance>\n  position: 'before' | 'after'\n  toShow: number\n}\n\nexport function createCloneSlides({ slides, position, toShow }: CreateCloneSlidesArgs) {\n  const clones: VNode[] = []\n  const isBefore = position === 'before'\n  const start = isBefore ? -toShow : 0\n  const end = isBefore ? 0 : toShow\n\n  if (slides.length <= 0 || !Number.isFinite(toShow) || toShow <= 0) {\n    return clones\n  }\n\n  for (let i = start; i < end; i++) {\n    const index = isBefore ? i : i + slides.length\n    const props = {\n      index,\n      isClone: true,\n      id: undefined, // Make sure we don't duplicate the id which would be invalid html\n      key: `clone-${position}-${i}`,\n    }\n    const vnode = slides[((i % slides.length) + slides.length) % slides.length].vnode\n    const clone = cloneVNode(vnode, props)\n    clone.el = null\n    clones.push(clone)\n  }\n\n  return clones\n}\n","/**\n * Returns a debounced version of the function: it runs once, `ms` after the\n * last call, with the last call's arguments. `cancel` drops the pending call;\n * `flush` runs it now.\n */\nexport function debounce<Args extends Array<unknown>>(\n  fn: (...args: Args) => void,\n  ms: number\n): { (...args: Args): void; cancel: () => void; flush: () => void } {\n  let timeoutId: ReturnType<typeof setTimeout> | null = null\n  let pendingArgs: Args | null = null\n\n  function debounced(...args: Args) {\n    if (timeoutId !== null) {\n      clearTimeout(timeoutId)\n    }\n    pendingArgs = args\n    timeoutId = setTimeout(debounced.flush, ms)\n  }\n\n  debounced.cancel = () => {\n    if (timeoutId !== null) {\n      clearTimeout(timeoutId)\n      timeoutId = null\n    }\n    pendingArgs = null\n  }\n\n  debounced.flush = () => {\n    const args = pendingArgs\n    debounced.cancel()\n    if (args) {\n      fn(...args)\n    }\n  }\n\n  return debounced\n}\n","import { VNode } from 'vue'\n\nconst FOCUSABLE_ELEMENTS_SELECTOR =\n  'a[href], area[href], button, input, textarea, select, summary, iframe, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])'\n\ntype TabbingState = {\n  // tabindex the element had before it was first disabled (null = none)\n  original: string | null\n  // containers currently disabling the element; nested carousels can overlap\n  owners: Set<Element>\n}\n\nconst tabbingState = new WeakMap<HTMLElement, TabbingState>()\n\n/**\n * Disables keyboard tab navigation for all focusable child elements\n * @param node Vue virtual node containing the elements to disable\n */\nexport function disableChildrenTabbing(node: VNode) {\n  const owner = node.el\n  if (typeof Element === 'undefined' || !owner || !(owner instanceof Element)) {\n    return\n  }\n\n  // Also visit tabindex=\"-1\" elements: one a nested container already disabled\n  // no longer matches [tabindex]:not([tabindex=\"-1\"]) but still needs this owner\n  const elements = owner.querySelectorAll(\n    `${FOCUSABLE_ELEMENTS_SELECTOR}, [tabindex=\"-1\"]`\n  )\n\n  for (const el of elements) {\n    if (!(el instanceof HTMLElement)) {\n      continue\n    }\n    let state = tabbingState.get(el)\n    if (!state) {\n      if (\n        !el.matches(FOCUSABLE_ELEMENTS_SELECTOR) ||\n        el.hasAttribute('disabled') ||\n        el.getAttribute('aria-hidden') === 'true'\n      ) {\n        continue\n      }\n      state = { original: el.getAttribute('tabindex'), owners: new Set() }\n      tabbingState.set(el, state)\n    }\n    state.owners.add(owner)\n    el.setAttribute('tabindex', '-1')\n  }\n}\n\n/**\n * Restores the tabindex of child elements changed by disableChildrenTabbing,\n * once no other container still disables them\n * @param node Vue virtual node containing the elements to restore\n */\nexport function restoreChildrenTabbing(node: VNode) {\n  const owner = node.el\n  if (typeof Element === 'undefined' || !owner || !(owner instanceof Element)) {\n    return\n  }\n\n  const elements = owner.querySelectorAll('[tabindex=\"-1\"]')\n\n  for (const el of elements) {\n    if (!(el instanceof HTMLElement)) {\n      continue\n    }\n    const state = tabbingState.get(el)\n    if (!state) {\n      continue\n    }\n    state.owners.delete(owner)\n    if (state.owners.size > 0) {\n      continue\n    }\n    if (state.original === null) {\n      el.removeAttribute('tabindex')\n    } else {\n      el.setAttribute('tabindex', state.original)\n    }\n    tabbingState.delete(el)\n  }\n}\n","\n/** Useful function to destructure props without triggering reactivity for certain keys */\nexport function except<Obj extends object, Keys extends string>(obj: Obj, keys: Keys[]): Omit<Obj, Keys> {\n  return (Object.keys(obj).filter((k) => !(keys as string[]).includes(k)) as Array<Exclude<keyof Obj, Keys>>)\n    .reduce((acc, key) => (acc[key] = obj[key], acc), {} as Omit<Obj, Keys>)\n}","type GetNumberInRangeArgs = {\n  val: number\n  max: number\n  min: number\n}\n\nexport function getNumberInRange({ val, max, min }: GetNumberInRangeArgs): number {\n  if (max < min) {\n    return val\n  }\n  return Math.min(Math.max(val, isNaN(min) ? val : min), isNaN(max) ? val : max)\n}\n","import { getNumberInRange } from './getNumberInRange'\n\ntype GetClampedScrollTargetArgs = {\n  currentIndex: number\n  direction: 1 | -1\n  itemsToScroll: number\n  itemsToShow: number\n  slidesCount: number\n  snapAlignOffset: number\n}\n\n/**\n * Target index for next/prev when the track is clamped at both ends\n * (no wrapAround). Steps the visible window by itemsToScroll so a clamped\n * first or last position still moves the full amount, and lands on the edge\n * index for the final step so navigation can disable.\n */\nexport function getClampedScrollTarget({\n  currentIndex,\n  direction,\n  itemsToScroll,\n  itemsToShow,\n  slidesCount,\n  snapAlignOffset,\n}: GetClampedScrollTargetArgs): number {\n  const step = direction * itemsToScroll\n  if (slidesCount <= 0) {\n    return currentIndex + step\n  }\n\n  const maxScrolled = Math.max(0, slidesCount - itemsToShow)\n  const rawScrolled = currentIndex - snapAlignOffset\n  const scrolled = getNumberInRange({ val: rawScrolled, min: 0, max: maxScrolled })\n  const target = scrolled + step\n\n  if (target >= maxScrolled) {\n    return slidesCount - 1\n  }\n  if (target <= 0) {\n    return 0\n  }\n\n  // scrolled - rawScrolled is 0 unless the current position is clamped\n  const index = currentIndex + step + (scrolled - rawScrolled)\n  return direction > 0 ? Math.floor(index) : Math.ceil(index)\n}\n","type DragParams = {\n  isVertical: boolean\n  isReversed: boolean\n  dragged: { x: number; y: number }\n  effectiveSlideSize: number\n  threshold: number\n}\n\n/**\n * Calculates the number of slides to move based on drag movement\n * @param params Configuration parameters for drag calculation\n * @returns Number of slides to move (positive or negative)\n */\nexport function getDraggedSlidesCount(params: DragParams): number {\n  const { isVertical, isReversed, dragged, effectiveSlideSize, threshold } = params\n\n  // Get drag value based on direction\n  const dragValue = isVertical ? dragged.y : dragged.x\n\n  // If no drag (or an unusable drag value), return +0 explicitly\n  if (dragValue === 0 || !Number.isFinite(dragValue)) return 0\n\n  // A carousel with no measurable size cannot map a drag to slides (#518):\n  // dividing by 0 would make the count Infinity and, with wrapAround, the\n  // clone count with it\n  if (!Number.isFinite(effectiveSlideSize) || effectiveSlideSize <= 0) return 0\n\n  const dragRatio = dragValue / effectiveSlideSize\n  const absRatio = Math.abs(dragRatio)\n\n  // If below the threshold, consider it no movement\n  if (absRatio < threshold) return 0\n  \n  // For drags less than a full slide, move one slide in the drag direction\n  // For drags of a full slide or more, move the corresponding number of slides\n  const slidesDragged = absRatio < 1 ? Math.sign(dragRatio) : Math.round(dragRatio)\n\n  return isReversed ? slidesDragged : -slidesDragged\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n    function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n    var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n    var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n    var _, done = false;\r\n    for (var i = decorators.length - 1; i >= 0; i--) {\r\n        var context = {};\r\n        for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n        for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n        context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n        var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n        if (kind === \"accessor\") {\r\n            if (result === void 0) continue;\r\n            if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n            if (_ = accept(result.get)) descriptor.get = _;\r\n            if (_ = accept(result.set)) descriptor.set = _;\r\n            if (_ = accept(result.init)) initializers.unshift(_);\r\n        }\r\n        else if (_ = accept(result)) {\r\n            if (kind === \"field\") initializers.unshift(_);\r\n            else descriptor[key] = _;\r\n        }\r\n    }\r\n    if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n    done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n    var useValue = arguments.length > 2;\r\n    for (var i = 0; i < initializers.length; i++) {\r\n        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n    }\r\n    return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n    return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n    if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n    return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n    return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    var desc = Object.getOwnPropertyDescriptor(m, k);\r\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n        desc = { enumerable: true, get: function() { return m[k]; } };\r\n    }\r\n    Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n    function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n    ownKeys = Object.getOwnPropertyNames || function (o) {\r\n        var ar = [];\r\n        for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n        return ar;\r\n    };\r\n    return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n    if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n    return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n    if (value !== null && value !== void 0) {\r\n        if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n        var dispose, inner;\r\n        if (async) {\r\n            if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n            dispose = value[Symbol.asyncDispose];\r\n        }\r\n        if (dispose === void 0) {\r\n            if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n            dispose = value[Symbol.dispose];\r\n            if (async) inner = dispose;\r\n        }\r\n        if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n        if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n        env.stack.push({ value: value, dispose: dispose, async: async });\r\n    }\r\n    else if (async) {\r\n        env.stack.push({ async: true });\r\n    }\r\n    return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n    var e = new Error(message);\r\n    return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n    function fail(e) {\r\n        env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n        env.hasError = true;\r\n    }\r\n    var r, s = 0;\r\n    function next() {\r\n        while (r = env.stack.pop()) {\r\n            try {\r\n                if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n                if (r.dispose) {\r\n                    var result = r.dispose.call(r.value);\r\n                    if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n                }\r\n                else s |= 1;\r\n            }\r\n            catch (e) {\r\n                fail(e);\r\n            }\r\n        }\r\n        if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n        if (env.hasError) throw env.error;\r\n    }\r\n    return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n    if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n        return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n            return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n        });\r\n    }\r\n    return path;\r\n}\r\n\r\nexport default {\r\n    __extends: __extends,\r\n    __assign: __assign,\r\n    __rest: __rest,\r\n    __decorate: __decorate,\r\n    __param: __param,\r\n    __esDecorate: __esDecorate,\r\n    __runInitializers: __runInitializers,\r\n    __propKey: __propKey,\r\n    __setFunctionName: __setFunctionName,\r\n    __metadata: __metadata,\r\n    __awaiter: __awaiter,\r\n    __generator: __generator,\r\n    __createBinding: __createBinding,\r\n    __exportStar: __exportStar,\r\n    __values: __values,\r\n    __read: __read,\r\n    __spread: __spread,\r\n    __spreadArrays: __spreadArrays,\r\n    __spreadArray: __spreadArray,\r\n    __await: __await,\r\n    __asyncGenerator: __asyncGenerator,\r\n    __asyncDelegator: __asyncDelegator,\r\n    __asyncValues: __asyncValues,\r\n    __makeTemplateObject: __makeTemplateObject,\r\n    __importStar: __importStar,\r\n    __importDefault: __importDefault,\r\n    __classPrivateFieldGet: __classPrivateFieldGet,\r\n    __classPrivateFieldSet: __classPrivateFieldSet,\r\n    __classPrivateFieldIn: __classPrivateFieldIn,\r\n    __addDisposableResource: __addDisposableResource,\r\n    __disposeResources: __disposeResources,\r\n    __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import { NativeSnapAlign } from '@/shared'\n\nexport type EdgeRect = {\n  top: number\n  right: number\n  bottom: number\n  left: number\n}\n\nexport type NativeAlignOptions = {\n  align: NativeSnapAlign\n  isReversed: boolean\n  isVertical: boolean\n}\n\n/**\n * The coordinate (client px, along the carousel axis) of a rect's snap point:\n * its logical start edge, end edge, or middle. The logical start is the right\n * (or bottom) edge when the direction is reversed.\n */\nexport function getAlignPoint(\n  rect: EdgeRect,\n  { align, isReversed, isVertical }: NativeAlignOptions\n): number {\n  const [start, end] = isVertical ? [rect.top, rect.bottom] : [rect.left, rect.right]\n  if (align === 'center') {\n    return (start + end) / 2\n  }\n  const usePhysicalStart = (align === 'start') !== isReversed\n  return usePhysicalStart ? start : end\n}\n\n/**\n * How far the viewport must scroll (positive = right/down in client px) so the\n * slide's snap point meets the viewport's. Direction-agnostic: `scrollBy` with a\n * positive value moves the view right in both ltr and rtl.\n */\nexport function getNativeScrollDelta({\n  slideRect,\n  viewportRect,\n  ...options\n}: NativeAlignOptions & { slideRect: EdgeRect; viewportRect: EdgeRect }): number {\n  return getAlignPoint(slideRect, options) - getAlignPoint(viewportRect, options)\n}\n","import {\n  EdgeRect,\n  NativeAlignOptions,\n  getAlignPoint,\n  getNativeScrollDelta,\n} from './getNativeScrollDelta'\n\ntype NativeSlideIndexParams = NativeAlignOptions & {\n  slideRects: EdgeRect[]\n  viewportRect: EdgeRect\n  // px of slack when deciding the scroller sits at its start or end\n  tolerance?: number\n  // the slide the carousel is on now, kept when the scroll position matches it\n  currentIndex?: number\n}\n\n/**\n * The slide index a native (scroll-snap) carousel is on: the first slide at\n * the scroll start, the last at the scroll end, otherwise the slide whose snap\n * point is nearest the viewport's. -1 without slides.\n *\n * The browser clamps snap points beyond the scroll range to its edges, so\n * several slides can be \"on\" at an edge: `currentIndex` is kept whenever the\n * scroller is where that slide would put it (its snap point at or past the\n * edge, or aligned in between).\n */\nexport function getNativeSlideIndex({\n  slideRects,\n  viewportRect,\n  tolerance = 1,\n  currentIndex,\n  ...options\n}: NativeSlideIndexParams): number {\n  if (!slideRects.length) {\n    return -1\n  }\n\n  const { isReversed, isVertical } = options\n  // Distances are measured in the logical direction: forward is right/down,\n  // or left when reversed.\n  const forward = isReversed ? -1 : 1\n  const edge = (rect: EdgeRect, align: 'start' | 'end') =>\n    getAlignPoint(rect, { align, isReversed, isVertical })\n\n  const deltaOf = (index: number) =>\n    getNativeScrollDelta({ ...options, slideRect: slideRects[index], viewportRect })\n  const current = currentIndex ?? -1\n  const hasCurrent =\n    Number.isInteger(current) && current >= 0 && current < slideRects.length\n  // Forward distance from the viewport's snap point to the current slide's\n  const currentDelta = () => deltaOf(current) * forward\n\n  const startGap = (edge(slideRects[0], 'start') - edge(viewportRect, 'start')) * forward\n  if (startGap >= -tolerance) {\n    return hasCurrent && currentDelta() <= tolerance ? current : 0\n  }\n\n  const lastIndex = slideRects.length - 1\n  const endGap =\n    (edge(slideRects[lastIndex], 'end') - edge(viewportRect, 'end')) * forward\n  if (endGap <= tolerance) {\n    return hasCurrent && currentDelta() >= -tolerance ? current : lastIndex\n  }\n\n  if (hasCurrent && Math.abs(currentDelta()) <= tolerance) {\n    return current\n  }\n\n  let nearest = 0\n  let nearestDistance = Infinity\n  slideRects.forEach((_, index) => {\n    const distance = Math.abs(deltaOf(index))\n    if (distance < nearestDistance) {\n      nearest = index\n      nearestDistance = distance\n    }\n  })\n  return nearest\n}\n","export type ScaleMultipliers = {\n  widthMultiplier: number\n  heightMultiplier: number\n}\n\ntype ScaleValues = { scaleX: number; scaleY: number }\n\nconst IDENTITY_MATRIX = Object.freeze([1, 0, 0, 1, 0, 0])\nconst IDENTITY_SCALE: ScaleValues = { scaleX: 1, scaleY: 1 }\n\n/**\n * Parses the computed transform of an element into its matrix values.\n * Returns the 2D identity matrix when the element has no (parsable) transform.\n */\nexport function getTransformValues(el: Element): readonly number[] {\n  const { transform } = window.getComputedStyle(el)\n\n  if (!transform || transform === 'none') {\n    return IDENTITY_MATRIX\n  }\n\n  const values = transform\n    .split(/[(,)]/)\n    .slice(1, -1)\n    .map((v) => parseFloat(v))\n\n  return values.length > 0 && !values.some(isNaN) ? values : IDENTITY_MATRIX\n}\n\n/**\n * Reads the axis scales out of a transform matrix.\n *\n * A non-zero b or c is a rotation or a skew: the element's axis-aligned\n * bounding box is then not a scaled copy of its layout box, so there is no\n * multiplier to derive and we bail out to identity. `getBoundingClientRect()`\n * is never negative, so a mirrored axis (`scaleX(-1)`, `rotate(180deg)`) has to\n * be read as its magnitude.\n */\nfunction getScale(values: readonly number[]): ScaleValues {\n  // matrix(a, b, c, d, e, f): a = scaleX, d = scaleY\n  if (values.length === 6) {\n    if (values[1] || values[2]) {\n      return IDENTITY_SCALE\n    }\n    return { scaleX: Math.abs(values[0]), scaleY: Math.abs(values[3]) }\n  }\n  // matrix3d(m11, ..., m44): m11 = scaleX, m22 = scaleY\n  if (values.length === 16) {\n    if (values[1] || values[4]) {\n      return IDENTITY_SCALE\n    }\n    return { scaleX: Math.abs(values[0]), scaleY: Math.abs(values[5]) }\n  }\n  return IDENTITY_SCALE\n}\n\n/**\n * Parses the computed `scale` of an element — the CSS Transforms Level 2\n * individual property, which is *not* reflected in `transform`. The computed\n * value is `none` or 1 to 3 space-separated numbers (a single value applies to\n * both axes; two or three are x then y). jsdom does not implement it and\n * reports `undefined` or an empty string, which yields identity values.\n */\nexport function getScaleValues(el: Element): ScaleValues {\n  const { scale } = window.getComputedStyle(el)\n\n  if (!scale || scale === 'none') {\n    return IDENTITY_SCALE\n  }\n\n  const values = scale.trim().split(/\\s+/).map(parseFloat)\n\n  if (values.length > 3 || values.some(isNaN)) {\n    return IDENTITY_SCALE\n  }\n\n  // `scale: -1` is valid CSS, and a rect is never negative\n  return {\n    scaleX: Math.abs(values[0]),\n    scaleY: Math.abs(values.length > 1 ? values[1] : values[0]),\n  }\n}\n\n/**\n * Multipliers that convert screen-space sizes of `el` (getBoundingClientRect)\n * back into layout pixels, accounting for CSS scaling on `el` and on every\n * ancestor — both the `transform` matrix and the individual `scale` property.\n * Deliberately uncached: an ancestor's transform can change without any event\n * the carousel observes (e.g. a screen-fitting wrapper rescaling on window\n * resize).\n */\nexport function getScaleMultipliers(el: Element | null): ScaleMultipliers {\n  let widthMultiplier = 1\n  let heightMultiplier = 1\n\n  let current: Element | null = el\n  while (current) {\n    // A zero scale (mid-animation) is skipped rather than divided by\n    const matrixScale = getScale(getTransformValues(current))\n    if (matrixScale.scaleX) widthMultiplier /= matrixScale.scaleX\n    if (matrixScale.scaleY) heightMultiplier /= matrixScale.scaleY\n\n    const propertyScale = getScaleValues(current)\n    if (propertyScale.scaleX) widthMultiplier /= propertyScale.scaleX\n    if (propertyScale.scaleY) heightMultiplier /= propertyScale.scaleY\n\n    current = current.parentElement\n  }\n\n  return { widthMultiplier, heightMultiplier }\n}\n","import { SnapAlign } from '@/shared'\n\ntype SnapAlignOffsetParams = {\n  align: SnapAlign\n  slideSize?: number\n  viewportSize?: number\n  itemsToShow?: number\n}\n\n/**\n * Calculates the snap align offset for a carousel item based on items to show.\n * Returns the number of slides to offset.\n *\n * @param align - The alignment type.\n * @param itemsToShow - The number of items to show.\n * @returns The calculated offset.\n */\nfunction getSnapAlignOffsetByItemsToShow(align: SnapAlign, itemsToShow: number): number {\n  switch (align) {\n    case 'start':\n      return 0\n    case 'center':\n    case 'center-odd':\n      return (itemsToShow - 1) / 2\n    case 'center-even':\n      return (itemsToShow - 2) / 2\n    case 'end':\n      return itemsToShow - 1\n    default:\n      return 0\n  }\n}\n\n/**\n * Calculates the snap align offset for a carousel item based on slide and viewport size.\n * Returns the real width to offset.\n *\n * @param align - The alignment type.\n * @param slideSize - The size of the slide.\n * @param viewportSize - The size of the viewport.\n * @returns The calculated offset.\n */\nfunction getSnapAlignOffsetBySlideAndViewport(\n  align: SnapAlign,\n  slideSize: number,\n  viewportSize: number\n): number {\n  switch (align) {\n    case 'start':\n      return 0\n    case 'center':\n    case 'center-odd':\n      return (viewportSize - slideSize) / 2\n    case 'center-even':\n      return viewportSize / 2 - slideSize\n    case 'end':\n      return viewportSize - slideSize\n    default:\n      return 0\n  }\n}\n\n/**\n * Calculates the snap align offset for a carousel item.\n *\n * @param params - The parameters for calculating the offset.\n * @returns The calculated offset.\n */\nexport function getSnapAlignOffset({\n  slideSize,\n  viewportSize,\n  align,\n  itemsToShow,\n}: SnapAlignOffsetParams): number {\n  if (itemsToShow !== undefined) {\n    return getSnapAlignOffsetByItemsToShow(align, itemsToShow)\n  }\n  if (slideSize !== undefined && viewportSize !== undefined) {\n    return getSnapAlignOffsetBySlideAndViewport(align, slideSize, viewportSize)\n  }\n\n  return 0\n}\n","export function i18nFormatter(string = '', values = {}) {\n  return Object.entries(values).reduce(\n    (acc, [key, value]) => acc.replace(`{${key}}`, String(value)),\n    string\n  )\n}\n","type MapNumberToRangeArgs = {\n  val: number\n  max: number\n  min?: number\n}\n\nexport function mapNumberToRange({ val, max, min = 0 }: MapNumberToRangeArgs): number {\n  const mod = max - min + 1\n  return ((((val - min) % mod) + mod) % mod) + min\n}\n","/**\n * Whether the browser can run the carousel in native CSS mode (scroll snap).\n * Always false without a DOM (SSR).\n */\nexport function supportsNativeCss(): boolean {\n  return (\n    typeof CSS !== 'undefined' &&\n    typeof CSS.supports === 'function' &&\n    CSS.supports('scroll-snap-type', 'x mandatory')\n  )\n}\n","/**\n * Returns a throttled version of the function using requestAnimationFrame or setTimeout.\n *\n * Uses requestAnimationFrame for immediate/frame-based throttling (ms = 0)\n * and setTimeout for longer delays to avoid unnecessary RAF calls.\n *\n * @param fn - The function to throttle.\n * @param ms - The number of milliseconds to wait for the throttled function to be called again\n */\nexport function throttle<Args extends Array<unknown>>(\n  fn: (...args: Args) => void,\n  ms = 0\n): { (...args: Args): void; cancel: () => void } {\n  let isThrottled = false\n  let timeoutId: ReturnType<typeof setTimeout> | null = null\n  let frameId: number | null = null\n\n  function throttled(...args: Args) {\n    if (isThrottled) return\n\n    isThrottled = true\n\n    // For delays longer than one frame (16ms), use setTimeout\n    // For immediate or frame-based throttling, use requestAnimationFrame\n    if (ms > 16) {\n      timeoutId = setTimeout(() => {\n        fn(...args)\n        isThrottled = false\n        timeoutId = null\n      }, ms)\n    } else {\n      frameId = requestAnimationFrame(() => {\n        fn(...args)\n        isThrottled = false\n        frameId = null\n      })\n    }\n  }\n\n  throttled.cancel = () => {\n    if (timeoutId !== null) {\n      clearTimeout(timeoutId)\n      timeoutId = null\n    }\n    if (frameId !== null) {\n      cancelAnimationFrame(frameId)\n      frameId = null\n    }\n    isThrottled = false\n  }\n\n  return throttled\n}\n","/**\n * Converts a value to a CSS-compatible string.\n * @param value - The value to convert.\n * @returns The CSS-compatible string.\n **/\nexport function toCssValue(\n  value?: string | number,\n  unit: string = 'px'\n): string | undefined {\n  if (value === null || value === undefined || value === '') {\n    return undefined\n  }\n\n  if (typeof value === 'number' || parseFloat(value).toString() === value) {\n    return `${value}${unit}`\n  }\n  return value\n}\n","import { defineComponent, h, inject } from 'vue'\n\nimport { DEFAULT_CLASS_PREFIX, injectCarousel } from '@/shared'\nimport { i18nFormatter } from '@/utils'\n\nexport const ARIA = defineComponent({\n  name: 'CarouselAria',\n  setup() {\n    const carousel = inject(injectCarousel)\n\n    if (!carousel) {\n      return () => ''\n    }\n\n    return () => {\n      const prefix = carousel.config.classPrefix || DEFAULT_CLASS_PREFIX\n\n      return h(\n        'div',\n        {\n          class: [`${prefix}__liveregion`, `${prefix}__sr-only`],\n          'aria-live': 'polite',\n          'aria-atomic': 'true',\n        },\n        // A marquee has no current item to announce\n        carousel.isMarquee\n          ? ''\n          : i18nFormatter(carousel.config.i18n['itemXofY'], {\n              currentSlide: carousel.currentSlide + 1,\n              slidesCount: carousel.slidesCount,\n            })\n      )\n    }\n  },\n})\n","import { ref, reactive, computed, Ref } from 'vue'\n\nimport { throttle } from '@/utils'\n\nexport type DragEventData = {\n  deltaX: number\n  deltaY: number\n  isTouch: boolean\n}\nexport interface UseDragOptions {\n  isSliding: boolean | Ref<boolean>\n  onDrag?: ({ deltaX, deltaY, isTouch }: DragEventData) => void\n  onDragStart?: () => void\n  onDragEnd?: () => void\n}\n\nexport function useDrag(options: UseDragOptions) {\n  let isTouch = false\n  let hasPendingMove = false\n  const startPosition = { x: 0, y: 0 }\n  const lastPosition = { x: 0, y: 0 }\n  const dragged = reactive({ x: 0, y: 0 })\n  const isDragging = ref(false)\n\n  const { isSliding } = options\n\n  const sliding = computed(() => {\n    return typeof isSliding === 'boolean' ? isSliding : isSliding.value\n  })\n\n  const getPosition = (event: TouchEvent | MouseEvent) => {\n    const source = isTouch ? (event as TouchEvent).touches[0] : (event as MouseEvent)\n    return { x: source.clientX, y: source.clientY }\n  }\n\n  const handleDragStart = (event: MouseEvent | TouchEvent): void => {\n    // Prevent drag initiation on input elements or if already sliding\n    const targetTagName = (event.target as HTMLElement).tagName\n    if (['INPUT', 'TEXTAREA', 'SELECT'].includes(targetTagName) || sliding.value) {\n      return\n    }\n\n    isTouch = event.type === 'touchstart'\n\n    if (isTouch && (event as TouchEvent).touches.length > 1) {\n      // If there is more than 1 finger on the screen, avoid drag start (this allows user to pinch zoom)\n      return\n    } else if (!isTouch) {\n      event.preventDefault()\n      if ((event as MouseEvent).button !== 0) {\n        return\n      }\n    }\n\n    // A drag that never ended (e.g. touchcancel) may still have a frame scheduled\n    throttledApplyDrag.cancel()\n    hasPendingMove = false\n    const { x, y } = getPosition(event)\n    startPosition.x = x\n    startPosition.y = y\n\n    const moveEvent = isTouch ? 'touchmove' : 'mousemove'\n    const endEvent = isTouch ? 'touchend' : 'mouseup'\n    document.addEventListener(moveEvent, handleDrag, { passive: isTouch })\n    document.addEventListener(endEvent, handleDragEnd, { passive: true })\n\n    options.onDragStart?.()\n  }\n\n  const applyDrag = (): void => {\n    hasPendingMove = false\n    isDragging.value = true\n    dragged.x = lastPosition.x - startPosition.x\n    dragged.y = lastPosition.y - startPosition.y\n    options.onDrag?.({ deltaX: dragged.x, deltaY: dragged.y, isTouch })\n  }\n\n  const throttledApplyDrag = throttle(applyDrag)\n\n  const handleDrag = (event: TouchEvent | MouseEvent): void => {\n    if (isTouch && (event as TouchEvent).touches.length > 1) {\n      return\n    }\n    const { x, y } = getPosition(event)\n    lastPosition.x = x\n    lastPosition.y = y\n    hasPendingMove = true\n    throttledApplyDrag()\n  }\n\n  const handleDragEnd = (): void => {\n    throttledApplyDrag.cancel()\n    if (hasPendingMove) {\n      applyDrag()\n    }\n\n    const draggedDistance = Math.abs(dragged.x) + Math.abs(dragged.y)\n\n    if (!isTouch && draggedDistance > 10) {\n      window.addEventListener(\n        'click',\n        (e: MouseEvent) => {\n          e.preventDefault()\n          e.stopPropagation()\n        },\n        { once: true, capture: true }\n      )\n    }\n\n    options.onDragEnd?.()\n\n    dragged.x = 0\n    dragged.y = 0\n    isDragging.value = false\n\n    const moveEvent = isTouch ? 'touchmove' : 'mousemove'\n    const endEvent = isTouch ? 'touchend' : 'mouseup'\n    document.removeEventListener(moveEvent, handleDrag)\n    document.removeEventListener(endEvent, handleDragEnd)\n  }\n\n  return {\n    dragged,\n    isDragging,\n    handleDragStart,\n  }\n}\n","import { ref } from 'vue'\n\nexport function useHover() {\n  const isHover = ref(false)\n\n  const handleMouseEnter = (): void => {\n    isHover.value = true\n  }\n\n  const handleMouseLeave = (): void => {\n    isHover.value = false\n  }\n\n  return {\n    isHover,\n    handleMouseEnter,\n    handleMouseLeave,\n  }\n}\n","import { Ref, WatchSource, watch } from 'vue'\n\nimport { getNumberInRange } from '@/utils'\n\nexport type UseMarqueePhaseOptions = {\n  track: Ref<HTMLElement | null>\n  // Marquee loop duration in seconds; 0 when the marquee is not running\n  duration: WatchSource<number>\n  // Number of real slides in one loop\n  slidesCount: WatchSource<number>\n}\n\nconst MARQUEE_ANIMATION = 'vc-marquee'\n\n/**\n * Keeps the marquee track in place when its loop duration changes.\n *\n * A running CSS animation keeps its elapsed time when `animation-duration`\n * changes, so a new duration would map that time onto a different point of\n * the loop and the track would jump. The position is read before the DOM\n * updates and applied to the new duration afterwards.\n *\n * The position is kept in slides, not as a fraction of the loop: a resize or\n * speed change keeps the slide count, so the fraction is unchanged, while\n * adding or removing slides changes the loop length but not where the current\n * slides are.\n */\nexport function useMarqueePhase({\n  track,\n  duration,\n  slidesCount,\n}: UseMarqueePhaseOptions) {\n  let progress: number | null = null\n\n  const getAnimation = (): Animation | undefined =>\n    track.value\n      ?.getAnimations?.()\n      .find(\n        (animation) => (animation as CSSAnimation).animationName === MARQUEE_ANIMATION\n      )\n\n  watch(\n    [duration, slidesCount],\n    ([, newSlidesCount], [oldDuration, oldSlidesCount]) => {\n      progress = null\n      if (!oldDuration) {\n        return\n      }\n      const currentTime = Number(getAnimation()?.currentTime)\n      if (!Number.isFinite(currentTime)) {\n        return\n      }\n      const oldDurationMs = oldDuration * 1000\n      const fraction = (currentTime % oldDurationMs) / oldDurationMs\n      if (oldSlidesCount > 0 && newSlidesCount > 0) {\n        // A full loop is the start of the next one\n        progress =\n          getNumberInRange({\n            val: (fraction * oldSlidesCount) / newSlidesCount,\n            min: 0,\n            max: 1,\n          }) % 1\n      } else {\n        progress = fraction\n      }\n    },\n    { flush: 'pre' }\n  )\n\n  watch(\n    [duration, slidesCount],\n    ([newDuration]) => {\n      if (progress === null) {\n        return\n      }\n      const animation = getAnimation()\n      if (animation && newDuration > 0) {\n        animation.currentTime = progress * newDuration * 1000\n      }\n      progress = null\n    },\n    { flush: 'post' }\n  )\n}\n","import { ComputedRef, Ref, computed } from 'vue'\n\nimport { CarouselConfig } from '@/shared'\nimport { DEFAULT_MOUSE_WHEEL_THRESHOLD } from '@/shared/constants'\n\nexport type WheelEventData = {\n  deltaX: number\n  deltaY: number\n  isScrollingForward: boolean\n}\n\nexport type UseWheelOptions = {\n  isVertical: boolean | ComputedRef<boolean>\n  isSliding: boolean | Ref<boolean>\n  config: CarouselConfig\n  onWheel?: (data: WheelEventData) => void\n}\n\nexport function useWheel(options: UseWheelOptions) {\n  const { isVertical, isSliding, config } = options\n\n  // Create computed values to handle both reactive and non-reactive inputs\n  const vertical = computed(() => {\n    return typeof isVertical === 'boolean' ? isVertical : isVertical.value\n  })\n\n  const sliding = computed(() => {\n    return typeof isSliding === 'boolean' ? isSliding : isSliding.value\n  })\n\n  const handleScroll = (event: WheelEvent): void => {\n    const wheelConfig =\n      config.mouseWheel && typeof config.mouseWheel === 'object' ? config.mouseWheel : {}\n\n    // Add sensitivity threshold to prevent small movements from triggering navigation\n    const threshold = wheelConfig.threshold ?? DEFAULT_MOUSE_WHEEL_THRESHOLD\n\n    // Determine scroll direction\n    const deltaY = Math.abs(event.deltaY) > threshold ? event.deltaY : 0\n    const deltaX = Math.abs(event.deltaX) > threshold ? event.deltaX : 0\n\n    // Determine primary delta based on carousel orientation\n    const primaryDelta = vertical.value ? deltaY : deltaX\n    const crossDelta = vertical.value ? deltaX : deltaY\n\n    // Leave cross-axis wheel input to the browser (e.g. page scroll over a horizontal carousel).\n    // A tie in magnitude goes to the carousel (strict `>`), so an ambiguous gesture still navigates.\n    if (\n      wheelConfig.ignoreCrossAxis &&\n      (primaryDelta === 0 || Math.abs(crossDelta) > Math.abs(primaryDelta))\n    ) {\n      return\n    }\n\n    event.preventDefault()\n\n    if (!config.mouseWheel || sliding.value) {\n      return\n    }\n\n    // If neither delta exceeds the threshold, don't navigate\n    if (deltaY === 0 && deltaX === 0) {\n      return\n    }\n\n    // If primaryDelta is 0, use the other delta as fallback\n    const effectiveDelta =\n      primaryDelta !== 0 ? primaryDelta : vertical.value ? deltaX : deltaY\n\n    // Positive delta means scrolling down/right\n    const isScrollingForward = effectiveDelta > 0\n\n    options.onWheel?.({ deltaX, deltaY, isScrollingForward })\n  }\n\n  return {\n    handleScroll,\n  }\n}\n","import { PropType } from 'vue'\n\nimport {\n  BREAKPOINT_MODE_OPTIONS,\n  DEFAULT_CONFIG,\n  DIR_MAP,\n  DIR_OPTIONS,\n  SLIDE_EFFECTS,\n  SNAP_ALIGN_OPTIONS,\n} from '@/shared'\n\nimport type {\n  BreakpointMode,\n  CarouselConfig,\n  Dir,\n  DragConfig,\n  NonNormalizedDir,\n  NormalizedDir,\n  SlideEffect,\n  SnapAlign,\n  TransitionEasing,\n  WheelConfig,\n} from '@/shared'\n\nexport const isValidClassPrefix = (value: unknown): value is string =>\n  typeof value === 'string' && /^\\S+$/.test(value)\n\nexport const carouselProps = {\n  // follow the height of the visible slides instead of the tallest slide\n  adaptiveHeight: {\n    default: DEFAULT_CONFIG.adaptiveHeight,\n    type: Boolean,\n    validator(value: boolean, props: { dir?: Dir }) {\n      const dir = props.dir || DEFAULT_CONFIG.dir!\n      const normalizedDir =\n        dir in DIR_MAP ? DIR_MAP[dir as NonNormalizedDir] : (dir as NormalizedDir)\n      if (value && ['ttb', 'btt'].includes(normalizedDir)) {\n        console.warn(\n          `[vue3-carousel]: \"adaptiveHeight\" is ignored with the vertical dir \"${dir}\".`\n        )\n      }\n      return true\n    },\n  },\n  // time to auto advance slides in ms\n  autoplay: {\n    default: DEFAULT_CONFIG.autoplay,\n    type: Number,\n  },\n  // slide to a slide when it, or an element inside it, receives keyboard or programmatic focus\n  autoScrollOnFocus: {\n    default: DEFAULT_CONFIG.autoScrollOnFocus,\n    type: Boolean,\n  },\n  // an object to store breakpoints\n  breakpoints: {\n    default: DEFAULT_CONFIG.breakpoints,\n    type: Object as PropType<CarouselConfig['breakpoints']>,\n  },\n  // controls the breakpoint mode relative to the carousel container or the viewport\n  breakpointMode: {\n    default: DEFAULT_CONFIG.breakpointMode,\n    validator(value: BreakpointMode) {\n      const isValid = BREAKPOINT_MODE_OPTIONS.includes(value)\n      if (!isValid) {\n        console.warn(`[vue3-carousel]: Invalid breakpointMode \"${value}\". Allowed values: ${BREAKPOINT_MODE_OPTIONS.join(', ')}`)\n      }\n      return isValid\n    },\n  },\n  clamp: {\n    type: Boolean,\n  },\n  // prefix for every CSS class the carousel renders\n  classPrefix: {\n    default: DEFAULT_CONFIG.classPrefix,\n    type: String,\n    validator(value: string) {\n      const isValid = isValidClassPrefix(value)\n      if (!isValid) {\n        console.warn(\n          `[vue3-carousel]: Invalid classPrefix \"${value}\". It must be a non-empty string without whitespace.`\n        )\n      }\n      return isValid\n    },\n  },\n  // control the direction of the carousel\n  dir: {\n    type: String as PropType<Dir>,\n    default: DEFAULT_CONFIG.dir,\n    validator(value: Dir, props: { height?: string }) {\n      if (!DIR_OPTIONS.includes(value)) {\n        console.warn(`[vue3-carousel]: Invalid dir \"${value}\". Allowed values: ${DIR_OPTIONS.join(', ')}`)\n        return false\n      }\n      const normalizedDir = value in DIR_MAP ? DIR_MAP[value as NonNormalizedDir] : (value as NormalizedDir)\n      if ([\"ttb\", \"btt\"].includes(normalizedDir) && (!props.height || props.height === \"auto\")) {\n        console.warn(`[vue3-carousel]: The dir \"${value}\" is not supported with height \"auto\".`)\n      }\n      return true\n    },\n  },\n  // lock the carousel and hide its addons while every slide fits in the viewport\n  disableWhenSlidesFit: {\n    default: DEFAULT_CONFIG.disableWhenSlidesFit,\n    type: Boolean,\n  },\n  // space in pixels before the first slide and after the last slide\n  edgeSpacing: {\n    default: DEFAULT_CONFIG.edgeSpacing,\n    type: Number,\n    validator(value: number) {\n      const isValid = value >= 0\n      if (!isValid) {\n        console.warn(\n          `[vue3-carousel]: Invalid edgeSpacing \"${value}\". It must be 0 or greater.`\n        )\n      }\n      return isValid\n    },\n  },\n  // enable/disable the carousel component\n  enabled: {\n    default: DEFAULT_CONFIG.enabled,\n    type: Boolean,\n  },\n  // control the gap between slides\n  gap: {\n    default: DEFAULT_CONFIG.gap,\n    type: Number,\n  },\n  // set carousel height\n  height: {\n    default: DEFAULT_CONFIG.height,\n    type: [Number, String],\n  },\n  // aria-labels and additional text labels\n  i18n: {\n    default: DEFAULT_CONFIG.i18n,\n    type: Object as PropType<typeof DEFAULT_CONFIG.i18n>,\n  },\n  ignoreAnimations: {\n    default: false,\n    type: [Array, Boolean, String] as PropType<CarouselConfig['ignoreAnimations']>,\n  },\n  // count of items to be scrolled\n  itemsToScroll: {\n    default: DEFAULT_CONFIG.itemsToScroll,\n    type: Number,\n  },\n  // count of items to showed per view\n  itemsToShow: {\n    default: DEFAULT_CONFIG.itemsToShow,\n    type: [Number, String],\n  },\n  // toggle arrow-key navigation while the carousel is focused\n  keyboardNavigation: {\n    default: DEFAULT_CONFIG.keyboardNavigation,\n    type: Boolean,\n  },\n  // continuously scroll the slides at a constant speed\n  marquee: {\n    default: DEFAULT_CONFIG.marquee,\n    type: Boolean,\n    validator(value: boolean, props: { slideEffect?: SlideEffect }) {\n      if (value && props.slideEffect === 'fade') {\n        console.warn(\n          `[vue3-carousel]: \"marquee\" cannot be used with slideEffect \"fade\". The setting will be ignored.`\n        )\n      }\n      return true\n    },\n  },\n  // marquee speed in pixels per second\n  marqueeSpeed: {\n    default: DEFAULT_CONFIG.marqueeSpeed,\n    type: Number,\n    validator(value: number) {\n      const isValid = value > 0\n      if (!isValid) {\n        console.warn(\n          `[vue3-carousel]: Invalid marqueeSpeed \"${value}\". It must be greater than 0.`\n        )\n      }\n      return isValid\n    },\n  },\n  // slide number number of initial slide\n  modelValue: {\n    default: undefined,\n    type: Number,\n  },\n  // toggle mouse dragging\n  mouseDrag: {\n    default: DEFAULT_CONFIG.mouseDrag,\n    type: [Boolean, Object] as PropType<boolean | DragConfig>,\n  },\n  // toggle mouse wheel scrolling\n  mouseWheel: {\n    default: DEFAULT_CONFIG.mouseWheel,\n    type: [Boolean, Object] as PropType<boolean | WheelConfig>,\n  },\n  // control mouse scroll threshold\n  mouseScrollThreshold: {\n    default: DEFAULT_CONFIG.mouseScrollThreshold,\n    type: Number,\n  },\n  // render a CSS scroll-snap carousel instead of a transformed track\n  nativeCss: {\n    default: DEFAULT_CONFIG.nativeCss,\n    type: Boolean,\n  },\n  pauseAutoplayOnHover: {\n    default: DEFAULT_CONFIG.pauseAutoplayOnHover,\n    type: Boolean,\n  },\n  preventExcessiveDragging: {\n    default: false,\n    type: Boolean,\n    validator(value: boolean, props: { wrapAround?: boolean }) {\n      if (value && props.wrapAround) {\n        console.warn(\n          `[vue3-carousel]: \"preventExcessiveDragging\" cannot be used with wrapAround. The setting will be ignored.`\n        )\n      }\n      return true\n    },\n  },\n  slideEffect: {\n    type: String as PropType<SlideEffect>,\n    default: DEFAULT_CONFIG.slideEffect,\n    validator(value: SlideEffect) {\n      const isValid = SLIDE_EFFECTS.includes(value)\n      if (!isValid) {\n        console.warn(`[vue3-carousel]: Invalid slideEffect \"${value}\". Allowed values: ${SLIDE_EFFECTS.join(', ')}`)\n      }\n      return isValid\n    },\n  },\n  // control snap position alignment\n  snapAlign: {\n    default: DEFAULT_CONFIG.snapAlign,\n    validator(value: SnapAlign) {\n      const isValid = SNAP_ALIGN_OPTIONS.includes(value)\n      if (!isValid) {\n        console.warn(`[vue3-carousel]: Invalid snapAlign \"${value}\". Allowed values: ${SNAP_ALIGN_OPTIONS.join(', ')}`)\n      }\n      return isValid\n    },\n  },\n  // toggle touch dragging\n  touchDrag: {\n    default: DEFAULT_CONFIG.touchDrag,\n    type: [Boolean, Object] as PropType<boolean | DragConfig>,\n  },\n  // sliding transition time in ms\n  transition: {\n    default: DEFAULT_CONFIG.transition,\n    type: Number,\n  },\n  // transition easing function\n  transitionEasing: {\n    default: DEFAULT_CONFIG.transitionEasing,\n    type: String as PropType<TransitionEasing>,\n  },\n  // control infinite scrolling mode\n  wrapAround: {\n    default: DEFAULT_CONFIG.wrapAround,\n    type: Boolean,\n  },\n}\n","import {\n  ComputedRef,\n  Ref,\n  SetupContext,\n  computed,\n  defineComponent,\n  h,\n  onBeforeUnmount,\n  onMounted,\n  provide,\n  reactive,\n  ref,\n  shallowReactive,\n  shallowRef,\n  toRefs,\n  useId,\n  watch,\n  watchEffect,\n} from 'vue'\n\nimport { ARIA as ARIAComponent } from '@/components/ARIA'\nimport {\n  DragEventData,\n  useDrag,\n  useHover,\n  useMarqueePhase,\n  useWheel,\n  WheelEventData,\n} from '@/composables'\nimport {\n  CarouselConfig,\n  DEFAULT_CLASS_PREFIX,\n  DEFAULT_CONFIG,\n  DEFAULT_DRAG_THRESHOLD,\n  DIR_MAP,\n  NATIVE_SNAP_ALIGN,\n  NonNormalizedDir,\n  NormalizedDir,\n  createSlideRegistry,\n  injectCarousel,\n} from '@/shared'\nimport {\n  ScaleMultipliers,\n  applyEdgeSpacing,\n  calculateAverage,\n  createCloneSlides,\n  debounce,\n  except,\n  getClampedScrollTarget,\n  getDraggedSlidesCount,\n  getNativeScrollDelta,\n  getNativeSlideIndex,\n  getNumberInRange,\n  getScaleMultipliers,\n  getSnapAlignOffset,\n  i18nFormatter,\n  mapNumberToRange,\n  supportsNativeCss,\n  throttle,\n  toCssValue,\n} from '@/utils'\n\nimport {\n  CarouselData,\n  CarouselExposed,\n  CarouselNav,\n  ElRect,\n  InjectedCarousel,\n} from './Carousel.types'\nimport { carouselProps, isValidClassPrefix } from './carouselProps'\n\nexport const Carousel = defineComponent({\n  name: 'VueCarousel',\n  props: carouselProps,\n  emits: [\n    'before-init',\n    'drag',\n    'init',\n    'loop',\n    'slide-end',\n    'slide-registered',\n    'slide-start',\n    'slide-unregistered',\n    'update:modelValue',\n    'wheel',\n  ],\n  setup(props: CarouselConfig, { slots, emit, expose }: SetupContext) {\n    const slideRegistry = createSlideRegistry(emit)\n    const slides = slideRegistry.getSlides()\n    const slidesCount = computed(() => slides.length)\n    const id = useId()\n\n    const root: Ref<Element | null> = ref(null)\n    const viewport: Ref<Element | null> = ref(null)\n    const track: Ref<HTMLElement | null> = ref(null)\n    const slideSize: Ref<number> = ref(0)\n\n    // Assumed until mount so supported browsers render native mode from the\n    // first paint and SSR output never needs a hydration fix-up\n    const nativeSupport = ref(true)\n\n    const fallbackConfig = computed(() => ({\n      ...DEFAULT_CONFIG,\n      // Avoid reactivity tracking in breakpoints and vModel which would trigger unnecessary updates\n      ...except(props, ['breakpoints', 'modelValue']),\n      // The validator only warns, so an invalid prefix falls back here\n      classPrefix: isValidClassPrefix(props.classPrefix)\n        ? props.classPrefix\n        : DEFAULT_CLASS_PREFIX,\n      i18n: { ...DEFAULT_CONFIG.i18n, ...props.i18n },\n    }))\n\n    // current active config\n    const config = shallowReactive<CarouselConfig>({ ...fallbackConfig.value })\n\n    // slides\n    const currentSlideIndex = ref(props.modelValue ?? 0)\n    const activeSlideIndex = ref(currentSlideIndex.value)\n\n    watch(currentSlideIndex, (val) => (activeSlideIndex.value = val))\n    const prevSlideIndex = ref(0)\n    const middleSlideIndex = computed(() => Math.ceil((slidesCount.value - 1) / 2))\n    const maxSlideIndex = computed(() => slidesCount.value - 1)\n    const minSlideIndex = computed(() => 0)\n\n    let autoplayTimer: ReturnType<typeof setInterval> | null = null\n    let transitionTimer: ReturnType<typeof setTimeout> | null = null\n    let snapBackTimer: ReturnType<typeof setTimeout> | null = null\n    let endTransition: ((interrupted?: boolean) => void) | null = null\n    let resizeObserver: ResizeObserver | null = null\n\n    const effectiveSlideSize = computed(() => slideSize.value + config.gap)\n\n    // Sanitized edge spacing: never negative, and never applied while wrapping around\n    // or fading (the track is not translated with the fade effect).\n    const normalizedEdgeSpacing = computed(() =>\n      config.wrapAround || config.slideEffect === 'fade'\n        ? 0\n        : Math.max(0, config.edgeSpacing)\n    )\n\n    const normalizedDir = computed<NormalizedDir>(() => {\n      const dir = config.dir || 'ltr'\n      return dir in DIR_MAP ? DIR_MAP[dir as NonNormalizedDir] : (dir as NormalizedDir)\n    })\n\n    const isReversed = computed(() => ['rtl', 'btt'].includes(normalizedDir.value))\n    const isVertical = computed(() => ['ttb', 'btt'].includes(normalizedDir.value))\n    const isAuto = computed(() => config.itemsToShow === 'auto')\n    // Marquee is ignored with the fade effect: the stacked slides cannot scroll\n    const isMarquee = computed(() => !!config.marquee && config.slideEffect !== 'fade')\n\n    // btt relies on column-reverse, whose overflow is not reliably scrollable.\n    // Marquee loops over cloned slides, which native mode cannot render\n    const isNative = computed(\n      () =>\n        !!config.nativeCss &&\n        nativeSupport.value &&\n        normalizedDir.value !== 'btt' &&\n        !isMarquee.value\n    )\n\n    // Native CSS mode cannot loop, fade, drag with JS or offset the track, so\n    // those options are turned off in one place and everything else just reads config\n    function applyNativeConstraints(): void {\n      if (!isNative.value) {\n        return\n      }\n      Object.assign(config, {\n        edgeSpacing: 0,\n        mouseDrag: false,\n        mouseWheel: false,\n        preventExcessiveDragging: false,\n        slideEffect: 'slide',\n        touchDrag: false,\n        wrapAround: false,\n      })\n    }\n    applyNativeConstraints()\n\n    const dimension = computed(() => (isVertical.value ? 'height' : 'width'))\n\n    function updateBreakpointsConfig(): void {\n      if (!mounted.value) {\n        return\n      }\n      // Determine the width source based on the 'breakpointMode' config\n      // The carousel is measured in layout px, like every other measurement,\n      // so breakpoints match the same way under a CSS-scaled ancestor\n      const carouselWidth = () =>\n        root.value\n          ? root.value.getBoundingClientRect().width *\n            getScaleMultipliers(root.value).widthMultiplier\n          : 0\n      const widthSource =\n        (fallbackConfig.value.breakpointMode === 'carousel'\n          ? carouselWidth()\n          : typeof window !== 'undefined'\n            ? window.innerWidth\n            : 0) || 0\n\n      const breakpointsArray = Object.keys(props.breakpoints || {})\n        .map((key) => Number(key))\n        .sort((a, b) => +b - +a)\n\n      const newConfig: Partial<CarouselConfig> = {}\n      breakpointsArray.some((breakpoint) => {\n        if (widthSource >= breakpoint) {\n          Object.assign(newConfig, props.breakpoints![breakpoint])\n          if (newConfig.i18n) {\n            Object.assign(\n              newConfig.i18n,\n              fallbackConfig.value.i18n,\n              props.breakpoints![breakpoint].i18n\n            )\n          }\n          return true\n        }\n        return false\n      })\n\n      // classPrefix is not a breakpoint option (see Breakpoints); keep the prop value\n      Object.assign(config, fallbackConfig.value, newConfig, {\n        classPrefix: fallbackConfig.value.classPrefix,\n      })\n\n      // Validate itemsToShow\n      if (!isAuto.value) {\n        config.itemsToShow = getNumberInRange({\n          val: Number(config.itemsToShow),\n          max: props.clamp ? slidesCount.value : Infinity,\n          min: 1,\n        })\n      }\n\n      applyNativeConstraints()\n    }\n\n    // With adaptiveHeight the root ResizeObserver fires on every frame of the height\n    // transition; those root-only, width-unchanged entries are skipped where the\n    // observer is created. The measured slide heights do not depend on the root\n    // height, so a re-measure cannot loop.\n    const handleResize = throttle(() => {\n      updateBreakpointsConfig()\n      updateSlidesData()\n      updateSlideSize()\n      // A user scroll that has not settled yet is still moving away from the\n      // current slide; snapping back to it would undo the scroll\n      if (isNative.value && !nativeScrollPending) {\n        scrollToSlide(currentSlideIndex.value, 'instant')\n      }\n    })\n\n    // Plain Set: nothing reads it reactively — the rAF loop and finishAnimation\n    // call updateSlideSize() explicitly\n    const transformElements = new Set<HTMLElement>()\n\n    /**\n     * Setup functions\n     */\n    const slidesRect = ref<Array<ElRect>>([])\n    function updateSlidesRectSize({\n      widthMultiplier,\n      heightMultiplier,\n    }: ScaleMultipliers): void {\n      slidesRect.value = slides.map((slide) => {\n        const rect = slide.exposed?.getBoundingRect()\n        return {\n          width: rect.width * widthMultiplier,\n          height: rect.height * heightMultiplier,\n        }\n      })\n    }\n    const viewportRect: Ref<ElRect> = ref({\n      width: 0,\n      height: 0,\n    })\n    function updateViewportRectSize({\n      widthMultiplier,\n      heightMultiplier,\n    }: ScaleMultipliers): void {\n      const rect = viewport.value?.getBoundingClientRect() || { width: 0, height: 0 }\n      viewportRect.value = {\n        width: rect.width * widthMultiplier,\n        height: rect.height * heightMultiplier,\n      }\n    }\n\n    // Every slide is on screen at once, so there is nothing to slide to.\n    // Never true with wrapAround: the loop always has somewhere to go.\n    const allSlidesFit = computed(() => {\n      if (slidesCount.value === 0) {\n        // Nothing registered yet (first render, SSR): never lock an empty carousel\n        return false\n      }\n      if (config.wrapAround) {\n        return false\n      }\n      if (config.slideEffect === 'fade') {\n        // Fade stacks every slide in one cell, so only a single slide ever fits\n        return slidesCount.value <= 1\n      }\n      if (!isAuto.value) {\n        return slidesCount.value <= Number(config.itemsToShow)\n      }\n      const viewportSize = viewportRect.value[dimension.value]\n      if (viewportSize <= 0) {\n        // Not measured yet: keep the controls until the sizes are known\n        return false\n      }\n      const slidesSize = slidesRect.value.reduce(\n        (acc, slide) => acc + slide[dimension.value] + config.gap,\n        -config.gap\n      )\n      // The locked track keeps its leading edgeSpacing, so that has to fit as well.\n      // 1px tolerance: fractional widths and scale multipliers make an exact fit measure a hair over\n      return slidesSize + normalizedEdgeSpacing.value - viewportSize <= 1\n    })\n\n    const isLocked = computed(() => config.disableWhenSlidesFit && allSlidesFit.value)\n\n    // Drag and wheel do nothing on a locked carousel or a display-only marquee\n    const isInteractionDisabled = computed(() => isLocked.value || isMarquee.value)\n\n    function updateSlideSize(): void {\n      if (!viewport.value) return\n\n      const scaleMultipliers = getScaleMultipliers(root.value)\n\n      updateViewportRectSize(scaleMultipliers)\n      updateSlidesRectSize(scaleMultipliers)\n\n      if (isAuto.value) {\n        slideSize.value = calculateAverage(\n          slidesRect.value.map((slide) => slide[dimension.value])\n        )\n      } else {\n        const itemsToShow = Number(config.itemsToShow)\n        const totalGap = (itemsToShow - 1) * config.gap\n        slideSize.value = (viewportRect.value[dimension.value] - totalGap) / itemsToShow\n      }\n    }\n\n    function updateSlidesData(): void {\n      if (!config.wrapAround && slidesCount.value > 0) {\n        currentSlideIndex.value = getNumberInRange({\n          val: currentSlideIndex.value,\n          max: maxSlideIndex.value,\n          min: minSlideIndex.value,\n        })\n      }\n    }\n\n    const ignoreAnimations = computed<false | string[]>(() => {\n      if (typeof props.ignoreAnimations === 'string') {\n        return props.ignoreAnimations.split(',')\n      } else if (Array.isArray(props.ignoreAnimations)) {\n        return props.ignoreAnimations\n      } else if (!props.ignoreAnimations) {\n        return []\n      }\n      return false\n    })\n\n    watchEffect(() => updateSlidesData())\n\n    watchEffect(() => {\n      // Call updateSlideSize when viewport is ready and track deps\n      updateSlideSize()\n    })\n\n    let animationInterval: number\n\n    const setAnimationInterval = (event: AnimationEvent) => {\n      // A marquee track animates forever and never changes the slide sizes, so\n      // tracking it (e.g. from a carousel nested in a marquee) would run the\n      // rAF loop for good\n      if (event.animationName === 'vc-marquee') {\n        return\n      }\n\n      const target = event.target as HTMLElement\n      if (\n        !target?.contains(root.value) ||\n        (Array.isArray(ignoreAnimations.value) &&\n          ignoreAnimations.value.includes(event.animationName))\n      ) {\n        return\n      }\n\n      transformElements.add(target)\n\n      if (!animationInterval) {\n        const stepAnimation = () => {\n          animationInterval = requestAnimationFrame(() => {\n            updateSlideSize()\n            stepAnimation()\n          })\n        }\n        stepAnimation()\n      }\n    }\n    const finishAnimation = (event: AnimationEvent | TransitionEvent) => {\n      const target = event.target as HTMLElement\n      if (target) {\n        transformElements.delete(target)\n      }\n      if (animationInterval && transformElements.size === 0) {\n        cancelAnimationFrame(animationInterval)\n        // Reset so the guard in setAnimationInterval can restart the loop\n        animationInterval = 0\n        updateSlideSize()\n      }\n    }\n\n    const mounted = ref(false)\n\n    if (typeof document !== 'undefined') {\n      watchEffect(() => {\n        if (mounted.value && ignoreAnimations.value !== false) {\n          // Use passive listeners for better performance\n          document.addEventListener('animationstart', setAnimationInterval, {\n            passive: true,\n          })\n          document.addEventListener('animationend', finishAnimation, { passive: true })\n          // A cancelled animation never fires `animationend`, so without this\n          // its element would stay in `transformElements` and the rAF loop\n          // would keep walking ancestors every frame\n          document.addEventListener('animationcancel', finishAnimation, {\n            passive: true,\n          })\n        } else {\n          document.removeEventListener('animationstart', setAnimationInterval)\n          document.removeEventListener('animationend', finishAnimation)\n          document.removeEventListener('animationcancel', finishAnimation)\n        }\n      })\n    }\n\n    onMounted((): void => {\n      mounted.value = true\n      nativeSupport.value = supportsNativeCss()\n      updateBreakpointsConfig()\n      initAutoplay()\n\n      if (root.value) {\n        let rootWidth = -1\n        resizeObserver = new ResizeObserver((entries) => {\n          // In adaptive mode the root height follows the slides, so a root-only\n          // entry with an unchanged width is a frame of the height transition\n          const rootEntry = entries.find((entry) => entry.target === root.value)\n          const onlyRootHeight =\n            isAdaptiveHeight.value &&\n            entries.length === 1 &&\n            rootEntry !== undefined &&\n            rootEntry.contentRect.width === rootWidth\n          if (rootEntry) {\n            rootWidth = rootEntry.contentRect.width\n          }\n          if (!onlyRootHeight) {\n            handleResize()\n          }\n        })\n        resizeObserver.observe(root.value)\n        updateObservedSlides()\n      }\n\n      emit('init')\n      if (isNative.value) {\n        scrollToSlide(currentSlideIndex.value, 'instant')\n      }\n    })\n\n    onBeforeUnmount(() => {\n      mounted.value = false\n\n      slideRegistry.cleanup()\n      handleNativeScroll.cancel()\n\n      if (transitionTimer) {\n        clearTimeout(transitionTimer)\n        transitionTimer = null\n        endTransition = null\n      }\n      if (snapBackTimer) {\n        clearTimeout(snapBackTimer)\n      }\n      if (animationInterval) {\n        cancelAnimationFrame(animationInterval)\n      }\n      if (autoplayTimer) {\n        clearInterval(autoplayTimer)\n      }\n      if (resizeObserver) {\n        resizeObserver.disconnect()\n        observedSlides.clear()\n        resizeObserver = null\n      }\n\n      if (typeof document !== 'undefined') {\n        handleBlur()\n      }\n      if (root.value) {\n        root.value.removeEventListener('transitionend', updateSlideSize)\n        root.value.removeEventListener('animationiteration', updateSlideSize)\n      }\n    })\n\n    /**\n     * Carousel Event listeners\n     */\n    const { isHover, handleMouseEnter, handleMouseLeave } = useHover()\n\n    const handleArrowKeys = throttle((event: KeyboardEvent): void => {\n      if (!config.keyboardNavigation || event.ctrlKey) return\n      switch (event.key) {\n        case 'ArrowLeft':\n        case 'ArrowUp':\n          if (isVertical.value === event.key.endsWith('Up')) {\n            if (isReversed.value) {\n              next()\n            } else {\n              prev()\n            }\n          }\n          break\n        case 'ArrowRight':\n        case 'ArrowDown':\n          if (isVertical.value === event.key.endsWith('Down')) {\n            if (isReversed.value) {\n              prev()\n            } else {\n              next()\n            }\n          }\n          break\n      }\n    }, 200)\n\n    const handleBlur = (): void => {\n      document.removeEventListener('keydown', handleArrowKeys)\n    }\n\n    const handleFocus = (): void => {\n      document.addEventListener('keydown', handleArrowKeys)\n    }\n\n    /**\n     * Autoplay\n     */\n    function initAutoplay(): void {\n      if (isMarquee.value || !config.autoplay || config.autoplay <= 0) {\n        return\n      }\n\n      autoplayTimer = setInterval(() => {\n        if (config.pauseAutoplayOnHover && isHover.value) {\n          return\n        }\n\n        next()\n      }, config.autoplay)\n    }\n\n    function resetAutoplay(): void {\n      stopAutoplay()\n      initAutoplay()\n    }\n\n    function stopAutoplay(): void {\n      if (autoplayTimer) {\n        clearInterval(autoplayTimer)\n        autoplayTimer = null\n      }\n    }\n\n    /**\n     * Navigation function\n     */\n    const isSliding = ref(false)\n    // Transitions the track back after a drag that did not change slide,\n    // without locking input the way isSliding does\n    const isSnappingBack = ref(false)\n\n    // Screen px → layout px multipliers, sampled when a drag starts so the\n    // drag follows the pointer 1:1 under scaled ancestors\n    const dragScale = shallowRef<ScaleMultipliers>({\n      widthMultiplier: 1,\n      heightMultiplier: 1,\n    })\n\n    const onDragStart = () => {\n      // A new drag must follow the pointer directly, not with easing\n      if (snapBackTimer) {\n        clearTimeout(snapBackTimer)\n        snapBackTimer = null\n      }\n      isSnappingBack.value = false\n      dragScale.value = getScaleMultipliers(root.value)\n    }\n\n    const onDrag = ({ deltaX, deltaY, isTouch }: DragEventData) => {\n      // Emitted as raw screen px on purpose (public API); the values below are\n      // converted to layout px for the carousel's own maths\n      emit('drag', { deltaX, deltaY })\n\n      const threshold = isTouch\n        ? typeof config.touchDrag === 'object'\n          ? (config.touchDrag?.threshold ?? DEFAULT_DRAG_THRESHOLD)\n          : DEFAULT_DRAG_THRESHOLD\n        : typeof config.mouseDrag === 'object'\n          ? (config.mouseDrag?.threshold ?? DEFAULT_DRAG_THRESHOLD)\n          : DEFAULT_DRAG_THRESHOLD\n\n      const draggedSlides = getDraggedSlidesCount({\n        isVertical: isVertical.value,\n        isReversed: isReversed.value,\n        dragged: {\n          x: deltaX * dragScale.value.widthMultiplier,\n          y: deltaY * dragScale.value.heightMultiplier,\n        },\n        effectiveSlideSize: effectiveSlideSize.value,\n        threshold,\n      })\n\n      // Prevent unnecessary reactivity\n      if (draggedSlides === 0) {\n        return\n      }\n\n      activeSlideIndex.value = config.wrapAround\n        ? currentSlideIndex.value + draggedSlides\n        : getNumberInRange({\n            val: currentSlideIndex.value + draggedSlides,\n            max: maxSlideIndex.value,\n            min: minSlideIndex.value,\n          })\n    }\n\n    const onDragEnd = () => {\n      if (isLocked.value) {\n        activeSlideIndex.value = currentSlideIndex.value\n        return\n      }\n      slideTo(activeSlideIndex.value)\n\n      // slideTo returns early when the drag did not change the slide (under the\n      // threshold or clamped at an edge). The track's return to its slot must\n      // still be transitioned instead of snapping back.\n      const axisOffset = isVertical.value ? dragged.y : dragged.x\n      if (!isSliding.value && config.slideEffect !== 'fade' && axisOffset !== 0) {\n        isSnappingBack.value = true\n        if (snapBackTimer) {\n          clearTimeout(snapBackTimer)\n        }\n        snapBackTimer = setTimeout(() => {\n          isSnappingBack.value = false\n          snapBackTimer = null\n        }, config.transition)\n      }\n    }\n\n    const { dragged, isDragging, handleDragStart } = useDrag({\n      isSliding,\n      onDrag,\n      onDragStart,\n      onDragEnd,\n    })\n\n    const onWheel = ({ deltaX, deltaY, isScrollingForward }: WheelEventData) => {\n      emit('wheel', { deltaX, deltaY })\n\n      if (isScrollingForward) {\n        // Scrolling down/right\n        if (isReversed.value) {\n          prev()\n        } else {\n          next()\n        }\n      } else {\n        // Scrolling up/left\n        if (isReversed.value) {\n          next()\n        } else {\n          prev()\n        }\n      }\n    }\n\n    const { handleScroll } = useWheel({\n      isVertical,\n      isSliding,\n      config,\n      onWheel,\n    })\n\n    function getStepTarget(direction: 1 | -1): number {\n      // Window stepping only applies to multi-slide steps on a track clamped at\n      // both ends; itemsToScroll 1 must reach every slide, and when itemsToShow\n      // exceeds the slide count the track is not clamped, so both use the index.\n      if (\n        config.wrapAround ||\n        isAuto.value ||\n        config.itemsToScroll <= 1 ||\n        Number(config.itemsToShow) > slidesCount.value\n      ) {\n        return currentSlideIndex.value + direction * config.itemsToScroll\n      }\n      return getClampedScrollTarget({\n        currentIndex: currentSlideIndex.value,\n        direction,\n        itemsToScroll: config.itemsToScroll,\n        itemsToShow: Number(config.itemsToShow),\n        slidesCount: slidesCount.value,\n        snapAlignOffset: snapAlignOffset.value,\n      })\n    }\n\n    function next(skipTransition = false): void {\n      flushNativeScroll()\n      slideTo(getStepTarget(1), skipTransition)\n    }\n\n    function prev(skipTransition = false): void {\n      flushNativeScroll()\n      slideTo(getStepTarget(-1), skipTransition)\n    }\n\n    function slideTo(slideIndex: number, skipTransition = false): void {\n      if (isMarquee.value) {\n        return\n      }\n\n      flushNativeScroll()\n      // Only an explicit `true` bypasses the guard, so a handler that forwards\n      // its event (`@click=\"carousel.next\"`) cannot start an overlapping slide\n      if (isLocked.value || (skipTransition !== true && isSliding.value)) {\n        return\n      }\n\n      const targetIndex = (config.wrapAround ? mapNumberToRange : getNumberInRange)({\n        val: slideIndex,\n        max: maxSlideIndex.value,\n        min: minSlideIndex.value,\n      })\n\n      if (currentSlideIndex.value === targetIndex) {\n        return\n      }\n\n      // A transition still in flight ends here, so that its timer never fires\n      if (transitionTimer) {\n        clearTimeout(transitionTimer)\n        transitionTimer = null\n        endTransition?.(true)\n      }\n\n      prevSlideIndex.value = currentSlideIndex.value\n\n      emit('slide-start', {\n        slidingToIndex: slideIndex,\n        currentSlideIndex: currentSlideIndex.value,\n        prevSlideIndex: prevSlideIndex.value,\n        slidesCount: slidesCount.value,\n      })\n\n      stopAutoplay()\n      isSliding.value = true\n\n      currentSlideIndex.value = slideIndex\n      if (targetIndex !== slideIndex) {\n        modelWatcher.pause()\n      } else {\n        // The interrupted transition may have left the watcher paused\n        modelWatcher.resume()\n      }\n      emit('update:modelValue', targetIndex)\n\n      endTransition = (interrupted = false): void => {\n        if (config.wrapAround && targetIndex !== slideIndex) {\n          // The interrupting transition sets the watcher state itself, resuming\n          // here would queue a watcher run in the middle of that transition\n          if (!interrupted) {\n            modelWatcher.resume()\n          }\n\n          currentSlideIndex.value = targetIndex\n          emit('loop', {\n            currentSlideIndex: currentSlideIndex.value,\n            slidingToIndex: slideIndex,\n          })\n        }\n\n        emit('slide-end', {\n          currentSlideIndex: currentSlideIndex.value,\n          prevSlideIndex: prevSlideIndex.value,\n          slidesCount: slidesCount.value,\n        })\n      }\n\n      transitionTimer = setTimeout(() => {\n        transitionTimer = null\n        // slideTo can still be called on an unmounted carousel\n        if (!mounted.value) {\n          return\n        }\n\n        endTransition?.()\n        endTransition = null\n        isSliding.value = false\n        resetAutoplay()\n      }, config.transition)\n\n      if (isNative.value) {\n        scrollToSlide(targetIndex)\n      }\n    }\n\n    // Native mode: the snap point every scroll measurement aligns on\n    const nativeAlignOptions = computed(() => ({\n      align: NATIVE_SNAP_ALIGN[config.snapAlign],\n      isReversed: isReversed.value,\n      isVertical: isVertical.value,\n    }))\n\n    /**\n     * Native mode: scroll the viewport so `index` meets its snap point. Uses\n     * client rects so it works for every direction; scaled like every other\n     * measurement (layout px).\n     */\n    function scrollToSlide(index: number, behavior: ScrollBehavior = 'smooth'): void {\n      const slideEl = slides[index]?.vnode.el as Element | null | undefined\n      if (!viewport.value || !slideEl?.getBoundingClientRect) {\n        return\n      }\n      const delta = getNativeScrollDelta({\n        ...nativeAlignOptions.value,\n        slideRect: slideEl.getBoundingClientRect(),\n        viewportRect: viewport.value.getBoundingClientRect(),\n      })\n      if (Math.abs(delta) < 1) {\n        return\n      }\n      const { widthMultiplier, heightMultiplier } = getScaleMultipliers(root.value)\n      viewport.value.scrollBy(\n        isVertical.value\n          ? { top: delta * heightMultiplier, behavior }\n          : { left: delta * widthMultiplier, behavior }\n      )\n    }\n\n    // Native mode: once the user's scroll settles, adopt the slide the scroller\n    // landed on. A smooth scroll fires `scroll` every frame, so the debounce\n    // cannot fire in the middle of a programmatic scroll.\n    function adoptNativeScrollIndex(): void {\n      if (!isNative.value || !viewport.value) {\n        return\n      }\n      const slideEls = slides.map((slide) => slide.vnode.el as Element | null | undefined)\n      // Every slide must be measurable, or the indexes would not line up\n      if (!slideEls.every((el): el is Element => !!el?.getBoundingClientRect)) {\n        return\n      }\n      const index = getNativeSlideIndex({\n        ...nativeAlignOptions.value,\n        slideRects: slideEls.map((el) => el.getBoundingClientRect()),\n        viewportRect: viewport.value.getBoundingClientRect(),\n        currentIndex: currentSlideIndex.value,\n      })\n      if (index === -1 || index === currentSlideIndex.value) {\n        return\n      }\n      prevSlideIndex.value = currentSlideIndex.value\n      emit('slide-start', {\n        slidingToIndex: index,\n        currentSlideIndex: currentSlideIndex.value,\n        prevSlideIndex: prevSlideIndex.value,\n        slidesCount: slidesCount.value,\n      })\n      currentSlideIndex.value = index\n      emit('update:modelValue', index)\n      emit('slide-end', {\n        currentSlideIndex: index,\n        prevSlideIndex: prevSlideIndex.value,\n        slidesCount: slidesCount.value,\n      })\n    }\n\n    // Set by a scroll event, cleared once that scroll settles\n    let nativeScrollPending = false\n\n    const handleNativeScroll = debounce(() => {\n      nativeScrollPending = false\n      adoptNativeScrollIndex()\n      resetAutoplay()\n    }, 100)\n\n    // A user scroll pauses autoplay until it settles; while sliding, the scroll\n    // is the carousel's own and autoplay restarts when the slide ends\n    function onNativeScroll(): void {\n      if (!isSliding.value) {\n        stopAutoplay()\n      }\n      nativeScrollPending = true\n      handleNativeScroll()\n    }\n\n    // Before navigating, adopt a user scroll that has not settled yet so the\n    // move starts from the slide in view. Skipped while sliding: the pending\n    // scroll is then the carousel's own, still on its way to the current slide\n    function flushNativeScroll(): void {\n      if (isNative.value && !isSliding.value) {\n        handleNativeScroll.flush()\n      }\n    }\n\n    function restartCarousel(): void {\n      updateBreakpointsConfig()\n      updateSlidesData()\n      updateSlideSize()\n      resetAutoplay()\n    }\n\n    // Update the carousel on props change\n    watch(\n      () => [fallbackConfig.value, props.breakpoints],\n      () => updateBreakpointsConfig(),\n      { deep: true }\n    )\n\n    watch(\n      () => props.autoplay,\n      () => resetAutoplay()\n    )\n\n    // Marquee disables autoplay, so restore or stop it when marquee toggles\n    // (a prop change or a breakpoint)\n    watch(isMarquee, () => resetAutoplay())\n\n    // Turning native mode on after mount: the track is no longer transformed,\n    // so put the scroller on the current slide once the DOM has updated.\n    // Turning it off: the viewport's leftover native scroll offset would add to\n    // the track transform under `overflow: hidden`, so reset it\n    watch(\n      isNative,\n      (native) => {\n        if (native && mounted.value) {\n          scrollToSlide(currentSlideIndex.value, 'instant')\n        } else if (!native && viewport.value) {\n          viewport.value.scrollLeft = 0\n          viewport.value.scrollTop = 0\n        }\n      },\n      { flush: 'post' }\n    )\n\n    // Adding or removing slides shifts the ones after them, so put the\n    // scroller back on the current slide once the DOM has updated\n    watch(\n      slidesCount,\n      () => {\n        if (isNative.value && mounted.value) {\n          scrollToSlide(currentSlideIndex.value, 'instant')\n        }\n      },\n      { flush: 'post' }\n    )\n\n    // A v-model can only hold a canonical index, so with wrapAround take the\n    // shortest path to it; slideTo maps the unclamped index and loops.\n    function getModelTarget(val: number): number {\n      if (!config.wrapAround || isAuto.value || slidesCount.value <= 0) {\n        return val\n      }\n      const current = currentSlideIndex.value\n      const canonical = mapNumberToRange({ val, max: maxSlideIndex.value, min: 0 })\n      return [canonical - slidesCount.value, canonical + slidesCount.value].reduce(\n        (best, candidate) =>\n          Math.abs(candidate - current) < Math.abs(best - current) ? candidate : best,\n        canonical\n      )\n    }\n\n    // Handle changing v-model value\n    const modelWatcher = watch(\n      () => props.modelValue,\n      (val) => {\n        if (val === currentSlideIndex.value) {\n          return\n        }\n        slideTo(getModelTarget(Number(val)), true)\n      }\n    )\n\n    // Locking pins the carousel at its first slide; unlocking re-applies the\n    // v-model value that was ignored while locked\n    watch(isLocked, (locked) => {\n      if (locked) {\n        if (currentSlideIndex.value !== minSlideIndex.value) {\n          currentSlideIndex.value = minSlideIndex.value\n          emit('update:modelValue', minSlideIndex.value)\n        }\n      } else if (\n        props.modelValue !== undefined &&\n        props.modelValue !== currentSlideIndex.value\n      ) {\n        slideTo(props.modelValue, true)\n      }\n    })\n\n    // Init carousel\n    emit('before-init')\n\n    // Length of the real slide set, gaps included: the distance one marquee loop travels\n    const marqueeDistance = computed(() => {\n      if (!isMarquee.value) {\n        return 0\n      }\n      if (isAuto.value) {\n        return slidesRect.value.reduce(\n          (acc, slide) => acc + slide[dimension.value] + config.gap,\n          0\n        )\n      }\n      return slidesCount.value * effectiveSlideSize.value\n    })\n\n    const clonedSlidesCount = computed(() => {\n      if (isMarquee.value) {\n        // The clones after the real set must cover one viewport, so the jump\n        // back to the start shows the same pixels\n        if (!isAuto.value) {\n          return { before: 0, after: Math.ceil(Number(config.itemsToShow)) }\n        }\n        // Auto mode clones whole sets; a set narrower than the viewport needs several.\n        // Before the slides are measured the distance is 0, so clone a single set\n        const sets = marqueeDistance.value\n          ? Math.max(\n              1,\n              Math.ceil(viewportRect.value[dimension.value] / marqueeDistance.value)\n            )\n          : 1\n        return { before: 0, after: slidesCount.value * sets }\n      }\n      if (!config.wrapAround) {\n        return { before: 0, after: 0 }\n      }\n      if (isAuto.value) {\n        return { before: slides.length, after: slides.length }\n      }\n\n      const itemsToShow = Number(config.itemsToShow)\n      const slidesToClone = Math.ceil(itemsToShow + (config.itemsToScroll - 1))\n      const before = slidesToClone - activeSlideIndex.value\n      const after = slidesToClone - (slidesCount.value - (activeSlideIndex.value + 1))\n\n      return {\n        before: Math.max(0, before),\n        after: Math.max(0, after),\n      }\n    })\n\n    const clonedSlidesOffset = computed(() => {\n      if (!clonedSlidesCount.value.before) {\n        return 0\n      }\n      if (isAuto.value) {\n        return (\n          slidesRect.value\n            .slice(-1 * clonedSlidesCount.value.before)\n            .reduce((acc, slide) => acc + slide[dimension.value] + config.gap, 0) * -1\n        )\n      }\n\n      return clonedSlidesCount.value.before * effectiveSlideSize.value * -1\n    })\n\n    const snapAlignOffset = computed(() => {\n      if (isAuto.value) {\n        const slideIndex =\n          ((currentSlideIndex.value % slides.length) + slides.length) % slides.length\n        return getSnapAlignOffset({\n          slideSize: slidesRect.value[slideIndex]?.[dimension.value],\n          viewportSize: viewportRect.value[dimension.value],\n          align: config.snapAlign,\n        })\n      }\n\n      return getSnapAlignOffset({\n        align: config.snapAlign,\n        itemsToShow: +config.itemsToShow,\n      })\n    })\n    const scrolledOffset = computed(() => {\n      let output = 0\n\n      if (isAuto.value) {\n        if (currentSlideIndex.value < 0) {\n          output =\n            slidesRect.value\n              .slice(currentSlideIndex.value)\n              .reduce((acc, slide) => acc + slide[dimension.value] + config.gap, 0) * -1\n        } else {\n          output = slidesRect.value\n            .slice(0, currentSlideIndex.value)\n            .reduce((acc, slide) => acc + slide[dimension.value] + config.gap, 0)\n        }\n        output -= snapAlignOffset.value\n\n        // remove whitespace\n        if (!config.wrapAround) {\n          const maxSlidingValue =\n            slidesRect.value.reduce(\n              (acc, slide) => acc + slide[dimension.value] + config.gap,\n              0\n            ) -\n            viewportRect.value[dimension.value] -\n            config.gap\n\n          // A locked carousel is pinned at its first slide: every slide is already on screen\n          output = applyEdgeSpacing({\n            value: isLocked.value\n              ? 0\n              : getNumberInRange({ val: output, max: maxSlidingValue, min: 0 }),\n            max: maxSlidingValue,\n            spacing: normalizedEdgeSpacing.value,\n          })\n        }\n      } else {\n        const scrolledSlides = currentSlideIndex.value - snapAlignOffset.value\n\n        if (config.wrapAround) {\n          output = scrolledSlides * effectiveSlideSize.value\n        } else {\n          // remove whitespace\n          const maxScrolledSlides = slidesCount.value - +config.itemsToShow\n          // A locked carousel is pinned at its first slide: every slide is already on screen\n          output = applyEdgeSpacing({\n            value:\n              (isLocked.value\n                ? 0\n                : getNumberInRange({\n                    val: scrolledSlides,\n                    max: maxScrolledSlides,\n                    min: 0,\n                  })) * effectiveSlideSize.value,\n            max: maxScrolledSlides * effectiveSlideSize.value,\n            spacing: normalizedEdgeSpacing.value,\n          })\n        }\n      }\n\n      return output * (isReversed.value ? 1 : -1)\n    })\n\n    const visibleRange = computed(() => {\n      if (isLocked.value) {\n        // A locked track is pinned at its first slide with every slide on screen\n        return { min: 0, max: slidesCount.value - 1 }\n      }\n      if (!isAuto.value) {\n        const base = currentSlideIndex.value - snapAlignOffset.value\n        if (config.wrapAround) {\n          return {\n            min: Math.floor(base),\n            max: Math.ceil(base + Number(config.itemsToShow) - 1),\n          }\n        }\n        const itemsToShow = Number(config.itemsToShow)\n        const start = getNumberInRange({\n          val: base,\n          max: slidesCount.value - itemsToShow,\n          min: 0,\n        })\n        return {\n          min: Math.floor(start),\n          max: Math.ceil(\n            getNumberInRange({\n              val: start + itemsToShow - 1,\n              max: slidesCount.value - 1,\n              min: 0,\n            })\n          ),\n        }\n      }\n\n      // Auto width mode\n      // Distance the track has scrolled forward, in px. edgeSpacing can push the\n      // track before the first slide, which makes this negative; trackOffset clamps\n      // that away so the minIndex walk still starts at the first slide.\n      const forwardOffset = scrolledOffset.value * (isReversed.value ? 1 : -1)\n      const trackOffset = Math.max(0, forwardOffset - clonedSlidesOffset.value)\n\n      let minIndex = 0\n      {\n        let accumulatedSize = 0\n        let index = 0 - clonedSlidesCount.value.before\n        let iterations = 0\n        const maxIterations = slides.length * 2\n\n        while (accumulatedSize <= trackOffset && iterations < maxIterations) {\n          const normalizedIndex =\n            ((index % slides.length) + slides.length) % slides.length\n          const slideSize = slidesRect.value[normalizedIndex]?.[dimension.value] || 0\n          if (slideSize <= 0) break\n          accumulatedSize += slideSize + config.gap\n          index++\n          iterations++\n        }\n        minIndex = index - 1\n      }\n\n      let maxIndex = 0\n      {\n        let index = minIndex\n        let accumulatedSize = 0\n        let iterations = 0\n        const maxIterations = slides.length * 2\n\n        if (index < 0) {\n          accumulatedSize =\n            slidesRect.value\n              .slice(0, index)\n              .reduce((acc, slide) => acc + slide[dimension.value] + config.gap, 0) -\n            trackOffset\n        } else {\n          accumulatedSize =\n            slidesRect.value\n              .slice(0, index)\n              .reduce((acc, slide) => acc + slide[dimension.value] + config.gap, 0) -\n            forwardOffset\n        }\n\n        while (\n          accumulatedSize < viewportRect.value[dimension.value] &&\n          iterations < maxIterations\n        ) {\n          const normalizedIndex =\n            ((index % slides.length) + slides.length) % slides.length\n          const slideSize = slidesRect.value[normalizedIndex]?.[dimension.value] || 0\n          if (slideSize <= 0) break\n          accumulatedSize += slideSize + config.gap\n          index++\n          iterations++\n        }\n        maxIndex = index - 1\n      }\n\n      return {\n        min: Math.floor(minIndex),\n        max: Math.ceil(maxIndex),\n      }\n    })\n\n    const isAdaptiveHeight = computed(() => !!config.adaptiveHeight && !isVertical.value)\n\n    // Tallest visible slide in layout px; undefined until a slide has a height, so\n    // the `height` prop stays in effect before the first measurement\n    const adaptiveHeight = computed<number | undefined>(() => {\n      if (!isAdaptiveHeight.value) {\n        return undefined\n      }\n      const count = slidesRect.value.length\n      if (!count) {\n        return undefined\n      }\n      const { min, max } = visibleRange.value\n      let height = 0\n      for (let index = min; index <= max; index++) {\n        const normalizedIndex = ((index % count) + count) % count\n        height = Math.max(height, slidesRect.value[normalizedIndex]?.height || 0)\n      }\n      return height > 0 ? height : undefined\n    })\n\n    // In adaptive height mode the root no longer grows with its content, so slide\n    // content changing size later (images loading) is caught by observing the\n    // slide elements themselves. Clones mirror real slides and are not observed.\n    const observedSlides = new Set<Element>()\n    function updateObservedSlides(): void {\n      const observer = resizeObserver\n      if (!observer) {\n        return\n      }\n      const next = new Set<Element>()\n      if (isAdaptiveHeight.value) {\n        slides.forEach((slide) => {\n          const el = slide.vnode.el\n          if (el instanceof Element) {\n            next.add(el)\n          }\n        })\n      }\n      observedSlides.forEach((el) => {\n        if (!next.has(el)) {\n          observer.unobserve(el)\n          observedSlides.delete(el)\n        }\n      })\n      next.forEach((el) => {\n        if (!observedSlides.has(el)) {\n          observer.observe(el)\n          observedSlides.add(el)\n        }\n      })\n    }\n    // Spread `slides` so registry changes re-run the watcher; post flush so the\n    // slide elements exist\n    watch(() => [isAdaptiveHeight.value, ...slides], updateObservedSlides, {\n      flush: 'post',\n    })\n\n    const trackTransform: ComputedRef<string | undefined> = computed(() => {\n      if (config.slideEffect === 'fade' || isMarquee.value || isNative.value) {\n        return undefined\n      }\n\n      const translateAxis = isVertical.value ? 'Y' : 'X'\n\n      // Include user drag interaction offset, converted to layout px\n      const dragOffset = isVertical.value\n        ? dragged.y * dragScale.value.heightMultiplier\n        : dragged.x * dragScale.value.widthMultiplier\n\n      let totalOffset = scrolledOffset.value + dragOffset\n\n      if (!config.wrapAround && config.preventExcessiveDragging) {\n        let maxSlidingValue = 0\n        if (isAuto.value) {\n          maxSlidingValue = slidesRect.value.reduce(\n            (acc, slide) => acc + slide[dimension.value],\n            0\n          )\n        } else {\n          maxSlidingValue =\n            (slidesCount.value - Number(config.itemsToShow)) * effectiveSlideSize.value\n        }\n        maxSlidingValue += normalizedEdgeSpacing.value\n        const min = isReversed.value ? -normalizedEdgeSpacing.value : -1 * maxSlidingValue\n        const max = isReversed.value ? maxSlidingValue : normalizedEdgeSpacing.value\n        totalOffset = getNumberInRange({\n          val: totalOffset,\n          min,\n          max,\n        })\n      }\n      return `translate${translateAxis}(${totalOffset}px)`\n    })\n\n    // Seconds one marquee loop takes; 0 when the marquee is off or cannot run\n    const marqueeDuration = computed(() => {\n      const speed = Number(config.marqueeSpeed) || 0\n      return isMarquee.value && speed > 0 ? marqueeDistance.value / speed : 0\n    })\n\n    useMarqueePhase({ track, duration: marqueeDuration, slidesCount })\n\n    const carouselStyle = computed(() => {\n      const marqueeOffset = isMarquee.value\n        ? toCssValue(marqueeDistance.value * (isReversed.value ? 1 : -1))\n        : undefined\n      return {\n        '--vc-carousel-height':\n          adaptiveHeight.value !== undefined\n            ? toCssValue(adaptiveHeight.value)\n            : toCssValue(config.height),\n        '--vc-cloned-offset': toCssValue(clonedSlidesOffset.value),\n        '--vc-marquee-duration': isMarquee.value\n          ? toCssValue(marqueeDuration.value, 's')\n          : undefined,\n        '--vc-marquee-x': isVertical.value ? undefined : marqueeOffset,\n        '--vc-marquee-y': isVertical.value ? marqueeOffset : undefined,\n        '--vc-slide-gap': toCssValue(config.gap),\n        '--vc-snap-align': isNative.value\n          ? NATIVE_SNAP_ALIGN[config.snapAlign]\n          : undefined,\n        '--vc-transition-duration':\n          isSliding.value || isSnappingBack.value\n            ? toCssValue(config.transition, 'ms')\n            : undefined,\n        '--vc-transition-easing': config.transitionEasing,\n      }\n    })\n\n    const nav: CarouselNav = { slideTo, next, prev }\n\n    const provided: InjectedCarousel = reactive({\n      activeSlide: activeSlideIndex,\n      allSlidesFit,\n      config,\n      currentSlide: currentSlideIndex,\n      isMarquee,\n      isSliding,\n      isNative,\n      isLocked,\n      isVertical,\n      maxSlide: maxSlideIndex,\n      minSlide: minSlideIndex,\n      nav,\n      normalizedDir,\n      slideRegistry,\n      slideSize,\n      slides,\n      slidesCount,\n      viewport,\n      visibleRange,\n    })\n\n    provide(injectCarousel, provided)\n\n    const data = reactive<CarouselData>({\n      config,\n      currentSlide: currentSlideIndex,\n      maxSlide: maxSlideIndex,\n      middleSlide: middleSlideIndex,\n      minSlide: minSlideIndex,\n      slideSize,\n      slidesCount,\n    })\n\n    expose<CarouselExposed>(\n      reactive({\n        data,\n        next,\n        prev,\n        restartCarousel,\n        slideTo,\n        updateBreakpointsConfig,\n        updateSlideSize,\n        updateSlidesData,\n        ...toRefs(provided),\n      })\n    )\n\n    return () => {\n      const slotSlides = slots.default || slots.slides\n      const outputSlides = slotSlides?.(data) || []\n\n      const { before, after } = clonedSlidesCount.value\n      const slidesBefore = createCloneSlides({\n        slides,\n        position: 'before',\n        toShow: before,\n      })\n\n      const slidesAfter = createCloneSlides({\n        slides,\n        position: 'after',\n        toShow: after,\n      })\n\n      const output = [...slidesBefore, ...outputSlides, ...slidesAfter]\n\n      const prefix = config.classPrefix\n\n      if (!config.enabled || !output.length) {\n        return h(\n          'section',\n          {\n            ref: root,\n            class: [prefix, 'is-disabled'],\n          },\n          output\n        )\n      }\n\n      const addonsElements = slots.addons?.(data) || []\n\n      const trackEl = h(\n        'ol',\n        {\n          ref: track,\n          class: `${prefix}__track`,\n          onMousedownCapture:\n            config.mouseDrag && !isInteractionDisabled.value ? handleDragStart : null,\n          onTouchstartPassiveCapture:\n            config.touchDrag && !isInteractionDisabled.value ? handleDragStart : null,\n          onWheel: config.mouseWheel && !isInteractionDisabled.value ? handleScroll : null,\n          style: { transform: trackTransform.value },\n        },\n        output\n      )\n      const viewPortEl = h(\n        'div',\n        {\n          class: `${prefix}__viewport`,\n          ref: viewport,\n          onScrollPassive: isNative.value ? onNativeScroll : undefined,\n        },\n        trackEl\n      )\n\n      return h(\n        'section',\n        {\n          ref: root,\n          class: [\n            prefix,\n            `is-${normalizedDir.value}`,\n            `is-effect-${config.slideEffect}`,\n            {\n              'is-adaptive-height': isAdaptiveHeight.value,\n              'is-dragging': isDragging.value,\n              'is-hover': isHover.value,\n              'is-locked': isLocked.value,\n              'is-native': isNative.value,\n              'is-marquee': isMarquee.value,\n              'is-paused':\n                isMarquee.value && !!config.pauseAutoplayOnHover && isHover.value,\n              'is-sliding': isSliding.value,\n              'is-vertical': isVertical.value,\n            },\n          ],\n          dir: normalizedDir.value,\n          style: carouselStyle.value,\n          'aria-label': i18nFormatter(config.i18n['ariaGallery'], { id }),\n          tabindex: '0',\n          onBlur: handleBlur,\n          onFocus: handleFocus,\n          onMouseenter: handleMouseEnter,\n          onMouseleave: handleMouseLeave,\n        },\n        [viewPortEl, addonsElements, h(ARIAComponent)]\n      )\n    }\n  },\n})\n","import type { InjectedCarousel } from '@/components/Carousel'\n\nexport enum IconName {\n  arrowDown = 'arrowDown',\n  arrowLeft = 'arrowLeft',\n  arrowRight = 'arrowRight',\n  arrowUp = 'arrowUp',\n}\n\nexport type IconNameValue = `${IconName}`\n\nexport type IconProps = {\n  name: IconNameValue\n  title?: string\n  carousel?: InjectedCarousel\n}\n","import { defineComponent, h, inject, PropType } from 'vue'\n\nimport { DEFAULT_CLASS_PREFIX, DEFAULT_CONFIG, injectCarousel } from '@/shared'\n\nimport { IconName, IconNameValue, IconProps } from './Icon.types'\n\nconst iconI18n = <Name extends IconNameValue>(name: Name) =>\n  `icon${name.charAt(0).toUpperCase() + name.slice(1)}` as `icon${Capitalize<Name>}`\n\nexport const icons = {\n  arrowDown: 'M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z',\n  arrowLeft: 'M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z',\n  arrowRight: 'M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z',\n  arrowUp: 'M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z',\n}\n\nfunction isIconName(candidate: string): candidate is IconName {\n  return candidate in IconName\n}\n\nconst validateIconName = (value: IconNameValue) => {\n  return value && isIconName(value)\n}\n\nexport const Icon = defineComponent<IconProps>({\n  props: {\n    name: {\n      type: String as PropType<IconNameValue>,\n      required: true,\n      validator: validateIconName,\n    },\n    title: {\n      type: String,\n      default: (props: { name: IconNameValue }) =>\n        props.name ? DEFAULT_CONFIG.i18n[iconI18n(props.name)] : '',\n    },\n    carousel: {\n      type: Object as PropType<IconProps['carousel']>,\n    },\n  },\n  setup(props) {\n    const injected = inject(injectCarousel, null)\n\n    return () => {\n      const carousel = props.carousel ?? injected\n      const iconName = props.name\n      if (!iconName || !validateIconName(iconName)) return\n\n      const path = icons[iconName]\n      const pathEl = h('path', { d: path })\n\n      const iconTitle: string = carousel?.config.i18n[iconI18n(iconName)] || props.title!\n\n      const titleEl = h('title', iconTitle)\n      const prefix = carousel?.config.classPrefix || DEFAULT_CLASS_PREFIX\n\n      return h(\n        'svg',\n        {\n          class: `${prefix}__icon`,\n          viewBox: '0 0 24 24',\n          role: 'img',\n          'aria-label': iconTitle,\n        },\n        [titleEl, pathEl]\n      )\n    }\n  },\n})\n","import { computed, defineComponent, h, inject, PropType } from 'vue'\n\nimport { DEFAULT_CLASS_PREFIX, injectCarousel, NormalizedDir } from '@/shared'\n\nimport { Icon, IconNameValue } from '../Icon'\n\nimport { NavigationProps } from './Navigation.types'\n\nexport const Navigation = defineComponent<NavigationProps>({\n  name: 'CarouselNavigation',\n  inheritAttrs: false,\n  props: {\n    carousel: {\n      type: Object as PropType<NavigationProps['carousel']>,\n    },\n  },\n  setup(props, { slots, attrs }) {\n    let carousel = inject(injectCarousel, null)!\n    const { next: slotNext, prev: slotPrev } = slots\n\n    const getPrevIcon = () => {\n      const directionIcons: Record<NormalizedDir, IconNameValue> = {\n        btt: 'arrowDown',\n        ltr: 'arrowLeft',\n        rtl: 'arrowRight',\n        ttb: 'arrowUp',\n      }\n\n      return directionIcons[carousel.normalizedDir]\n    }\n    const getNextIcon = () => {\n      const directionIcons: Record<NormalizedDir, IconNameValue> = {\n        btt: 'arrowUp',\n        ltr: 'arrowRight',\n        rtl: 'arrowLeft',\n        ttb: 'arrowDown',\n      }\n\n      return directionIcons[carousel.normalizedDir]\n    }\n\n    const prevDisabled = computed(\n      () => !carousel.config.wrapAround && carousel.currentSlide <= carousel.minSlide\n    )\n    const nextDisabled = computed(\n      () => !carousel.config.wrapAround && carousel.currentSlide >= carousel.maxSlide\n    )\n\n    return () => {\n      if (props.carousel) {\n        carousel = props.carousel\n      }\n      if (!carousel) {\n        console.warn(\n          '[vue3-carousel]: A carousel component must be provided for the navigation component to display'\n        )\n        return ''\n      }\n      if (carousel.isLocked) {\n        return ''\n      }\n      if (carousel.isMarquee) {\n        return ''\n      }\n      const { i18n } = carousel.config\n      const prefix = carousel.config.classPrefix || DEFAULT_CLASS_PREFIX\n      const prevButton = h(\n        'button',\n        {\n          type: 'button',\n          disabled: prevDisabled.value,\n          'aria-label': i18n['ariaPreviousSlide'],\n          title: i18n['ariaPreviousSlide'],\n          onClick: () => carousel.nav.prev(),\n          ...attrs,\n          class: [\n            `${prefix}__prev`,\n            { [`${prefix}__prev--disabled`]: prevDisabled.value },\n            attrs.class,\n          ],\n        },\n        slotPrev?.() || h(Icon, { name: getPrevIcon(), carousel })\n      )\n      const nextButton = h(\n        'button',\n        {\n          type: 'button',\n          disabled: nextDisabled.value,\n          'aria-label': i18n['ariaNextSlide'],\n          title: i18n['ariaNextSlide'],\n          onClick: () => carousel.nav.next(),\n          ...attrs,\n          class: [\n            `${prefix}__next`,\n            { [`${prefix}__next--disabled`]: nextDisabled.value },\n            attrs.class,\n          ],\n        },\n        slotNext?.() || h(Icon, { name: getNextIcon(), carousel })\n      )\n\n      return [prevButton, nextButton]\n    }\n  },\n})\n","import { computed, defineComponent, h, inject, PropType, VNode } from 'vue'\n\nimport { DEFAULT_CLASS_PREFIX, injectCarousel } from '@/shared'\nimport {\n  getNumberInRange,\n  getSnapAlignOffset,\n  i18nFormatter,\n  mapNumberToRange,\n} from '@/utils'\n\nimport { PaginationProps } from './Pagination.types'\n\nexport const Pagination = defineComponent<PaginationProps>({\n  name: 'CarouselPagination',\n  props: {\n    disableOnClick: {\n      type: Boolean,\n    },\n    paginateByItemsToShow: {\n      type: Boolean,\n    },\n    carousel: {\n      type: Object as PropType<PaginationProps['carousel']>,\n    }\n  },\n  setup(props) {\n    let carousel = inject(injectCarousel, null)!\n\n    const itemsToShow = computed(() => carousel.config.itemsToShow as number)\n    const offset = computed(() =>\n      getSnapAlignOffset({\n        align: carousel.config.snapAlign,\n        itemsToShow: itemsToShow.value,\n      })\n    )\n    const isPaginated = computed(\n      () => props.paginateByItemsToShow && itemsToShow.value > 1\n    )\n    const currentPage = computed(() =>\n      Math.ceil((carousel.activeSlide - offset.value) / itemsToShow.value)\n    )\n    const pageCount = computed(() => Math.ceil(carousel.slidesCount / itemsToShow.value))\n\n    // Without wrapAround the last step lands on the last slide, which can give a\n    // page past the end; clamp it there instead of wrapping to the first page.\n    const isActive = (slide: number): boolean =>\n      (carousel.config.wrapAround ? mapNumberToRange : getNumberInRange)(\n        isPaginated.value\n          ? {\n              val: currentPage.value,\n              max: pageCount.value - 1,\n              min: 0,\n            }\n          : {\n              val: carousel.activeSlide,\n              max: carousel.maxSlide,\n              min: carousel.minSlide,\n            }\n      ) === slide\n\n    // Without wrapAround the last page targets the last slide, where next() also\n    // lands, so the Navigation button disables there too.\n    const getPageTarget = (slide: number): number => {\n      if (!isPaginated.value) {\n        return slide\n      }\n      const index = Math.floor(slide * itemsToShow.value + offset.value)\n      const reachesEnd =\n        !carousel.config.wrapAround &&\n        itemsToShow.value <= carousel.slidesCount &&\n        index - offset.value >= carousel.slidesCount - itemsToShow.value\n      return reachesEnd ? carousel.maxSlide : index\n    }\n\n    return () => {\n      if (props.carousel) {\n        carousel = props.carousel;\n      }\n      if (!carousel) {\n        console.warn('[vue3-carousel]: A carousel component must be provided for the pagination component to display')\n        return '';\n      }\n      if (carousel.isMarquee) {\n        return ''\n      }\n      if (carousel.isLocked) {\n        return ''\n      }\n      const prefix = carousel.config.classPrefix || DEFAULT_CLASS_PREFIX\n      const children: Array<VNode> = []\n\n      for (\n        let slide = isPaginated.value ? 0 : carousel.minSlide;\n        slide <= (isPaginated.value ? pageCount.value - 1 : carousel.maxSlide);\n        slide++\n      ) {\n        const buttonLabel = i18nFormatter(\n          carousel.config.i18n[\n            isPaginated.value ? 'ariaNavigateToPage' : 'ariaNavigateToSlide'\n          ],\n          {\n            slideNumber: slide + 1,\n          }\n        )\n        const active = isActive(slide)\n        const button = h('button', {\n          type: 'button',\n          class: {\n            [`${prefix}__pagination-button`]: true,\n            [`${prefix}__pagination-button--active`]: active,\n          },\n          'aria-label': buttonLabel,\n          'aria-pressed': active,\n          'aria-controls': carousel.slides[slide]?.exposed?.id,\n          title: buttonLabel,\n          disabled: props.disableOnClick,\n          onClick: () => carousel.nav.slideTo(getPageTarget(slide)),\n        })\n        const item = h('li', { class: `${prefix}__pagination-item`, key: slide }, button)\n        children.push(item)\n      }\n\n      return h('ol', { class: `${prefix}__pagination` }, children)\n    }\n  },\n})\n","import {\n  ComputedRef,\n  computed,\n  defineComponent,\n  DeepReadonly,\n  getCurrentInstance,\n  h,\n  inject,\n  onMounted,\n  onUnmounted,\n  onUpdated,\n  provide,\n  ref,\n  SetupContext,\n  useId,\n} from 'vue'\n\nimport { DEFAULT_CLASS_PREFIX, injectCarousel } from '@/shared'\nimport { disableChildrenTabbing, restoreChildrenTabbing } from '@/utils'\n\nimport { SlideProps } from './Slide.types'\n\nexport const Slide = defineComponent({\n  name: 'CarouselSlide',\n  props: {\n    id: {\n      type: String,\n      default: (props: { isClone?: boolean }) => (props.isClone ? undefined : useId()),\n    },\n    index: {\n      type: Number,\n      default: undefined,\n    },\n    isClone: {\n      type: Boolean,\n      default: false,\n    },\n  },\n  setup(props: DeepReadonly<SlideProps>, { attrs, slots, expose }: SetupContext) {\n    const carousel = inject(injectCarousel)\n    provide(injectCarousel, undefined) // Don't provide for nested slides\n\n    if (!carousel) {\n      return () => '' // Don't render, let vue warn about the missing provide\n    }\n\n    const currentIndex = ref(props.index)\n\n    const setIndex = (newIndex: number) => {\n      currentIndex.value = newIndex\n    }\n\n    const instance = getCurrentInstance()!\n\n    const getBoundingRect = () => {\n      const el = instance.vnode.el as HTMLElement\n      return el ? el.getBoundingClientRect() : { width: 0, height: 0 }\n    }\n\n    expose({\n      id: props.id,\n      setIndex,\n      getBoundingRect,\n    })\n\n    // A marquee has no current slide, and every slide passes through the viewport\n    const isActive: ComputedRef<boolean> = computed(\n      () => !carousel.isMarquee && currentIndex.value === carousel.activeSlide\n    )\n    const isPrev: ComputedRef<boolean> = computed(\n      () => !carousel.isMarquee && currentIndex.value === carousel.activeSlide - 1\n    )\n    const isNext: ComputedRef<boolean> = computed(\n      () => !carousel.isMarquee && currentIndex.value === carousel.activeSlide + 1\n    )\n    const isVisible: ComputedRef<boolean> = computed(\n      () =>\n        carousel.isMarquee ||\n        (currentIndex.value >= carousel.visibleRange.min &&\n          currentIndex.value <= carousel.visibleRange.max)\n    )\n\n    const slideStyle = computed(() => {\n      if (carousel.config.itemsToShow === 'auto') {\n        return\n      }\n      const itemsToShow = carousel.config.itemsToShow\n      const dimension =\n        carousel.config.gap > 0 && itemsToShow > 1\n          ? `calc(${100 / itemsToShow}% - ${\n              (carousel.config.gap * (itemsToShow - 1)) / itemsToShow\n            }px)`\n          : `${100 / itemsToShow}%`\n\n      return carousel.isVertical ? { height: dimension } : { width: dimension }\n    })\n\n    // Focus caused by a pointer (mouse click or the compat mousedown after a\n    // touch tap) must not navigate; only keyboard/programmatic focus should.\n    let isPointerFocus = false\n    let pointerFocusTimer: ReturnType<typeof setTimeout> | null = null\n\n    const handleMousedown = () => {\n      isPointerFocus = true\n      if (pointerFocusTimer) {\n        clearTimeout(pointerFocusTimer)\n      }\n      // The browser focuses synchronously after mousedown; a macrotask runs after that.\n      pointerFocusTimer = setTimeout(() => {\n        isPointerFocus = false\n        pointerFocusTimer = null\n      }, 0)\n    }\n\n    carousel.slideRegistry.registerSlide(instance, props.index)\n    onUnmounted(() => {\n      carousel.slideRegistry.unregisterSlide(instance)\n      if (pointerFocusTimer) {\n        clearTimeout(pointerFocusTimer)\n      }\n    })\n\n    // Keep focusable content of clones and off-screen slides out of the tab order.\n    // Slides re-render on every navigation, so only query the DOM when this\n    // slide has actually disabled something.\n    let hasDisabledChildren = false\n    const updateChildrenTabbing = () => {\n      if (!carousel.config.enabled) {\n        return\n      }\n      if (props.isClone || !isVisible.value) {\n        disableChildrenTabbing(instance.vnode)\n        hasDisabledChildren = true\n      } else if (hasDisabledChildren) {\n        restoreChildrenTabbing(instance.vnode)\n        hasDisabledChildren = false\n      }\n    }\n    onMounted(updateChildrenTabbing)\n    onUpdated(updateChildrenTabbing)\n\n    return () => {\n      if (!carousel.config.enabled) {\n        return slots.default?.()\n      }\n\n      const prefix = carousel.config.classPrefix || DEFAULT_CLASS_PREFIX\n\n      return h(\n        'li',\n        {\n          style: [attrs.style, { ...slideStyle.value }],\n          class: {\n            [`${prefix}__slide`]: true,\n            [`${prefix}__slide--clone`]: props.isClone,\n            [`${prefix}__slide--visible`]: isVisible.value,\n            [`${prefix}__slide--active`]: isActive.value,\n            [`${prefix}__slide--prev`]: isPrev.value,\n            [`${prefix}__slide--next`]: isNext.value,\n            [`${prefix}__slide--sliding`]: carousel.isSliding,\n          },\n          onMousedownCapture: handleMousedown,\n          onFocusin: () => {\n            // Prevent the viewport being scrolled by the focus (in native mode\n            // that scroll is the navigation itself)\n            if (carousel.viewport && !carousel.isNative) {\n              carousel.viewport.scrollLeft = 0\n              carousel.viewport.scrollTop = 0\n            }\n            if (isPointerFocus || carousel.config.autoScrollOnFocus === false) {\n              return\n            }\n            carousel.nav.slideTo(currentIndex.value)\n          },\n          id: props.isClone ? undefined : props.id,\n          'aria-hidden': props.isClone || undefined,\n          tabindex: props.isClone || !isVisible.value ? -1 : undefined,\n        },\n        slots.default?.({\n          currentIndex: currentIndex.value,\n          isActive: isActive.value,\n          isClone: props.isClone,\n          isPrev: isPrev.value,\n          isNext: isNext.value,\n          isSliding: carousel.isSliding,\n          isVisible: isVisible.value,\n        })\n      )\n    }\n  },\n})\n"],"names":["shallowReactive","cloneVNode","defineComponent","inject","h","reactive","ref","computed","watch","useId","watchEffect","onMounted","onBeforeUnmount","shallowRef","provide","toRefs","ARIAComponent","getCurrentInstance","onUnmounted","onUpdated"],"mappings":";;;;;;;;;MAEa,uBAAuB,GAAG,CAAC,UAAU,EAAE,UAAU;AAEvD,MAAM,OAAO,GAAG;AACrB,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,eAAe,EAAE,KAAK;;AAGjB,MAAM,WAAW,GAAG;IACzB,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;;AAGV,MAAM,mBAAmB,GAAG;AACjC,IAAA,WAAW,EAAE,cAAc;AAC3B,IAAA,kBAAkB,EAAE,gCAAgC;AACpD,IAAA,mBAAmB,EAAE,iCAAiC;AACtD,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,iBAAiB,EAAE,4BAA4B;AAC/C,IAAA,aAAa,EAAE,0BAA0B;AACzC,IAAA,aAAa,EAAE,4BAA4B;AAC3C,IAAA,cAAc,EAAE,6BAA6B;AAC7C,IAAA,WAAW,EAAE,wBAAwB;AACrC,IAAA,QAAQ,EAAE,sCAAsC;;AAG3C,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO;MAE9C,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM;AAEtC,MAAM,kBAAkB,GAAG;IAChC,QAAQ;IACR,OAAO;IACP,KAAK;IACL,aAAa;IACb,YAAY;;AAGd;AACO,MAAM,iBAAiB,GAAG;AAC/B,IAAA,MAAM,EAAE,QAAQ;AAChB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