diff --git a/.yarn/versions/69e7ac83.yml b/.yarn/versions/69e7ac83.yml new file mode 100644 index 000000000..96237af44 --- /dev/null +++ b/.yarn/versions/69e7ac83.yml @@ -0,0 +1,16 @@ +undecided: + - embla-carousel-monorepo + - embla-carousel + - embla-carousel-auto-height + - embla-carousel-auto-scroll + - embla-carousel-autoplay + - embla-carousel-class-names + - embla-carousel-docs + - embla-carousel-fade + - embla-carousel-react + - embla-carousel-reactive-utils + - embla-carousel-solid + - embla-carousel-svelte + - embla-carousel-vue + - embla-carousel-playground-react + - embla-carousel-playground-solid diff --git a/README.md b/README.md index 8c9efd38c..c7c19a671 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,8 @@ + + @@ -103,8 +105,6 @@ - - diff --git a/docs/1905-2479836f551e53be6259.js.map b/docs/1905-2479836f551e53be6259.js.map index daae1fba3..747fd61a7 100644 --- a/docs/1905-2479836f551e53be6259.js.map +++ b/docs/1905-2479836f551e53be6259.js.map @@ -1 +1 @@ -{"version":3,"file":"1905-2479836f551e53be6259.js","mappings":"qMAaO,MAAMA,EAA8B,CACzCC,UAAW,UACXC,MAAO,EACPC,WAAY,IACZC,QAAQ,EACRC,YAAa,CAAC,EACdC,YAAY,EACZC,eAAe,EACfC,mBAAmB,EACnBC,kBAAkB,EAClBC,SAAU,MCSZ,SAASC,EAAWC,GAClB,IAAIC,EACAC,EACAC,OAHc,IAAAH,IAAAA,EAAqC,CAAC,GAIxD,IAGIT,EACAa,EAJAC,GAAU,EACVC,GAAS,EACTC,EAAQ,EAsEZ,SAASC,IACP,GAAIL,GAAaE,EAAS,OAC1B,IAAKC,EAAQ,OACbJ,EAASO,KAAK,mBAEd,MAAMC,EAASR,EAASS,kBAClB,YAAEC,GAAgBF,EAExBH,EAAQK,EAAYC,YAAW,KAC7BH,EAAOI,WA8BX,SAAmCJ,GACjC,MAAM,SACJK,EAAQ,OACRC,EAAM,aACNC,EAAY,MACZC,EAAK,cACLC,EACAC,OAAO,WAAEC,EAAU,WAAEC,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,SACbD,EAAAA,cAAA,OAAKC,UAAU,kBAAkBC,IAAKrB,GACpCmB,EAAAA,cAAA,OAAKC,UAAU,oBACZrB,EAAOuB,KAAK3F,GACXwF,EAAAA,cAAA,OAAKC,UAAU,eAAeG,IAAK5F,GACjCwF,EAAAA,cAAA,OAAKC,UAAU,wBACbD,EAAAA,cAAA,YAAOxF,EAAQ,SAOzBwF,EAAAA,cAAA,OAAKC,UAAU,mBACbD,EAAAA,cAAA,OAAKC,UAAU,kBACbD,EAAAA,cAACK,EAAAA,GAAU,CACTC,QAASA,IAAMhB,EAAsBH,GACrCoB,SAAUtB,IAEZe,EAAAA,cAACQ,EAAAA,GAAU,CACTF,QAASA,IAAMhB,EAAsBF,GACrCmB,SAAUrB,KAIdc,EAAAA,cAAA,UAAQC,UAAU,cAAcK,QAASV,EAAgBa,KAAK,UAC3DhC,EAAY,OAAS,UAGtB,C","sources":["webpack://embla-carousel-docs/../src/components/Options.ts","webpack://embla-carousel-docs/../src/components/AutoScroll.ts","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/AutoScroll/EmblaCarousel.tsx"],"sourcesContent":["import { CreateOptionsType } from 'embla-carousel/components/Options'\n\nexport type OptionsType = CreateOptionsType<{\n direction: 'forward' | 'backward'\n speed: number\n startDelay: number\n playOnInit: boolean\n stopOnFocusIn: boolean\n stopOnInteraction: boolean\n stopOnMouseEnter: boolean\n rootNode: ((emblaRoot: HTMLElement) => HTMLElement | null) | null\n}>\n\nexport const defaultOptions: OptionsType = {\n direction: 'forward',\n speed: 2,\n startDelay: 1000,\n active: true,\n breakpoints: {},\n playOnInit: true,\n stopOnFocusIn: true,\n stopOnInteraction: true,\n stopOnMouseEnter: false,\n rootNode: null\n}\n","import { OptionsType, defaultOptions } from './Options'\nimport { CreatePluginType } from 'embla-carousel/components/Plugins'\nimport { OptionsHandlerType } from 'embla-carousel/components/OptionsHandler'\nimport { EmblaCarouselType } from 'embla-carousel'\nimport { EngineType } from 'embla-carousel/components/Engine'\nimport { ScrollBodyType } from 'embla-carousel/components/ScrollBody'\n\ndeclare module 'embla-carousel/components/Plugins' {\n interface EmblaPluginsType {\n autoScroll?: AutoScrollType\n }\n}\n\ndeclare module 'embla-carousel/components/EventHandler' {\n interface EmblaEventListType {\n autoScrollPlay: 'autoScroll:play'\n autoScrollStop: 'autoScroll:stop'\n }\n}\n\nexport type AutoScrollType = CreatePluginType<\n {\n play: (delay?: number) => void\n stop: () => void\n reset: () => void\n isPlaying: () => boolean\n },\n OptionsType\n>\n\nexport type AutoScrollOptionsType = AutoScrollType['options']\n\nfunction AutoScroll(userOptions: AutoScrollOptionsType = {}): AutoScrollType {\n let options: OptionsType\n let emblaApi: EmblaCarouselType\n let destroyed: boolean\n let playing = false\n let resume = true\n let timer = 0\n let startDelay: number\n let defaultScrollBehaviour: ScrollBodyType\n\n function init(\n emblaApiInstance: EmblaCarouselType,\n optionsHandler: OptionsHandlerType\n ): void {\n emblaApi = emblaApiInstance\n\n const { mergeOptions, optionsAtMedia } = optionsHandler\n const optionsBase = mergeOptions(defaultOptions, AutoScroll.globalOptions)\n const allOptions = mergeOptions(optionsBase, userOptions)\n options = optionsAtMedia(allOptions)\n\n if (emblaApi.scrollSnapList().length <= 1) return\n\n startDelay = options.startDelay\n destroyed = false\n defaultScrollBehaviour = emblaApi.internalEngine().scrollBody\n\n const { eventStore } = emblaApi.internalEngine()\n const emblaRoot = emblaApi.rootNode()\n const root = (options.rootNode && options.rootNode(emblaRoot)) || emblaRoot\n const container = emblaApi.containerNode()\n\n emblaApi.on('pointerDown', stopScroll)\n\n if (!options.stopOnInteraction) {\n emblaApi.on('pointerUp', startScrollOnSettle)\n }\n\n if (options.stopOnMouseEnter) {\n eventStore.add(root, 'mouseenter', () => {\n resume = false\n stopScroll()\n })\n\n if (!options.stopOnInteraction) {\n eventStore.add(root, 'mouseleave', () => {\n resume = true\n startScroll()\n })\n }\n }\n\n if (options.stopOnFocusIn) {\n eventStore.add(container, 'focusin', () => {\n stopScroll()\n emblaApi.scrollTo(emblaApi.selectedScrollSnap(), true)\n })\n\n if (!options.stopOnInteraction) {\n eventStore.add(container, 'focusout', startScroll)\n }\n }\n\n if (options.playOnInit) startScroll()\n }\n\n function destroy(): void {\n emblaApi\n .off('pointerDown', stopScroll)\n .off('pointerUp', startScrollOnSettle)\n .off('settle', onSettle)\n stopScroll()\n destroyed = true\n playing = false\n }\n\n function startScroll(): void {\n if (destroyed || playing) return\n if (!resume) return\n emblaApi.emit('autoScroll:play')\n\n const engine = emblaApi.internalEngine()\n const { ownerWindow } = engine\n\n timer = ownerWindow.setTimeout(() => {\n engine.scrollBody = createAutoScrollBehaviour(engine)\n engine.animation.start()\n }, startDelay)\n\n playing = true\n }\n\n function stopScroll(): void {\n if (destroyed || !playing) return\n emblaApi.emit('autoScroll:stop')\n\n const engine = emblaApi.internalEngine()\n const { ownerWindow } = engine\n\n engine.scrollBody = defaultScrollBehaviour\n ownerWindow.clearTimeout(timer)\n timer = 0\n\n playing = false\n }\n\n function onSettle(): void {\n if (resume) startScroll()\n emblaApi.off('settle', onSettle)\n }\n\n function startScrollOnSettle(): void {\n emblaApi.on('settle', onSettle)\n }\n\n function createAutoScrollBehaviour(engine: EngineType): ScrollBodyType {\n const {\n location,\n target,\n scrollTarget,\n index,\n indexPrevious,\n limit: { reachedMin, reachedMax, constrain },\n options: { loop }\n } = engine\n const directionSign = options.direction === 'forward' ? -1 : 1\n const noop = (): ScrollBodyType => self\n\n let bodyVelocity = 0\n let scrollDirection = 0\n let rawLocation = location.get()\n let rawLocationPrevious = 0\n let hasSettled = false\n\n function seek(): ScrollBodyType {\n let directionDiff = 0\n\n bodyVelocity = directionSign * options.speed\n rawLocation += bodyVelocity\n location.add(bodyVelocity)\n target.set(location)\n\n directionDiff = rawLocation - rawLocationPrevious\n scrollDirection = Math.sign(directionDiff)\n rawLocationPrevious = rawLocation\n\n const currentIndex = scrollTarget.byDistance(0, false).index\n\n if (index.get() !== currentIndex) {\n indexPrevious.set(index.get())\n index.set(currentIndex)\n emblaApi.emit('select')\n }\n\n const reachedEnd =\n options.direction === 'forward'\n ? reachedMin(location.get())\n : reachedMax(location.get())\n\n if (!loop && reachedEnd) {\n hasSettled = true\n const constrainedLocation = constrain(location.get())\n location.set(constrainedLocation)\n target.set(location)\n stopScroll()\n }\n\n return self\n }\n\n const self: ScrollBodyType = {\n direction: () => scrollDirection,\n duration: () => -1,\n velocity: () => bodyVelocity,\n settled: () => hasSettled,\n seek,\n useBaseFriction: noop,\n useBaseDuration: noop,\n useFriction: noop,\n useDuration: noop\n }\n return self\n }\n\n function play(startDelayOverride?: number): void {\n if (typeof startDelayOverride !== 'undefined') {\n startDelay = startDelayOverride\n }\n resume = true\n startScroll()\n }\n\n function stop(): void {\n if (playing) stopScroll()\n }\n\n function reset(): void {\n if (playing) {\n stopScroll()\n startScrollOnSettle()\n }\n }\n\n function isPlaying(): boolean {\n return playing\n }\n\n const self: AutoScrollType = {\n name: 'autoScroll',\n options: userOptions,\n init,\n destroy,\n play,\n stop,\n reset,\n isPlaying\n }\n return self\n}\n\nAutoScroll.globalOptions = undefined\n\nexport default AutoScroll\n","import React, { useCallback, useEffect, useState } from 'react'\nimport { EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport AutoScroll from 'embla-carousel-auto-scroll'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options, [\n AutoScroll({ playOnInit: false })\n ])\n const [isPlaying, setIsPlaying] = useState(false)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const onButtonAutoplayClick = useCallback(\n (callback: () => void) => {\n const autoScroll = emblaApi?.plugins()?.autoScroll\n if (!autoScroll) return\n\n const resetOrStop =\n autoScroll.options.stopOnInteraction === false\n ? autoScroll.reset\n : autoScroll.stop\n\n resetOrStop()\n callback()\n },\n [emblaApi]\n )\n\n const toggleAutoplay = useCallback(() => {\n const autoScroll = emblaApi?.plugins()?.autoScroll\n if (!autoScroll) return\n\n const playOrStop = autoScroll.isPlaying()\n ? autoScroll.stop\n : autoScroll.play\n playOrStop()\n }, [emblaApi])\n\n useEffect(() => {\n const autoScroll = emblaApi?.plugins()?.autoScroll\n if (!autoScroll) return\n\n setIsPlaying(autoScroll.isPlaying())\n emblaApi\n .on('autoScroll:play', () => setIsPlaying(true))\n .on('autoScroll:stop', () => setIsPlaying(false))\n .on('reInit', () => setIsPlaying(autoScroll.isPlaying()))\n }, [emblaApi])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n {index + 1}\n \n \n ))}\n \n \n\n \n \n onButtonAutoplayClick(onPrevButtonClick)}\n disabled={prevBtnDisabled}\n />\n onButtonAutoplayClick(onNextButtonClick)}\n disabled={nextBtnDisabled}\n />\n \n\n \n {isPlaying ? 'Stop' : 'Start'}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n"],"names":["defaultOptions","direction","speed","startDelay","active","breakpoints","playOnInit","stopOnFocusIn","stopOnInteraction","stopOnMouseEnter","rootNode","AutoScroll","userOptions","options","emblaApi","destroyed","defaultScrollBehaviour","playing","resume","timer","startScroll","emit","engine","internalEngine","ownerWindow","setTimeout","scrollBody","location","target","scrollTarget","index","indexPrevious","limit","reachedMin","reachedMax","constrain","loop","directionSign","noop","self","bodyVelocity","scrollDirection","rawLocation","get","rawLocationPrevious","hasSettled","seek","directionDiff","add","set","Math","sign","currentIndex","byDistance","reachedEnd","constrainedLocation","stopScroll","duration","velocity","settled","useBaseFriction","useBaseDuration","useFriction","useDuration","createAutoScrollBehaviour","animation","start","clearTimeout","onSettle","off","startScrollOnSettle","on","name","init","emblaApiInstance","optionsHandler","mergeOptions","optionsAtMedia","optionsBase","globalOptions","allOptions","scrollSnapList","length","eventStore","emblaRoot","root","container","containerNode","scrollTo","selectedScrollSnap","destroy","play","startDelayOverride","stop","reset","isPlaying","undefined","props","slides","emblaRef","useEmblaCarousel","setIsPlaying","useState","prevBtnDisabled","nextBtnDisabled","onPrevButtonClick","onNextButtonClick","usePrevNextButtons","onButtonAutoplayClick","useCallback","callback","_emblaApi$plugins","autoScroll","plugins","toggleAutoplay","_emblaApi$plugins2","useEffect","_emblaApi$plugins3","React","className","ref","map","key","PrevButton","onClick","disabled","NextButton","type"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"1905-2479836f551e53be6259.js","mappings":"qMAaO,MAAMA,EAA8B,CACzCC,UAAW,UACXC,MAAO,EACPC,WAAY,IACZC,QAAQ,EACRC,YAAa,CAAC,EACdC,YAAY,EACZC,eAAe,EACfC,mBAAmB,EACnBC,kBAAkB,EAClBC,SAAU,MCSZ,SAASC,EAAWC,GAClB,IAAIC,EACAC,EACAC,OAHc,IAAAH,IAAAA,EAAqC,CAAC,GAIxD,IAGIT,EACAa,EAJAC,GAAU,EACVC,GAAS,EACTC,EAAQ,EAsEZ,SAASC,IACP,GAAIL,GAAaE,EAAS,OAC1B,IAAKC,EAAQ,OACbJ,EAASO,KAAK,mBAEd,MAAMC,EAASR,EAASS,kBAClB,YAAEC,GAAgBF,EAExBH,EAAQK,EAAYC,YAAW,KAC7BH,EAAOI,WA8BX,SAAmCJ,GACjC,MAAM,SACJK,EAAQ,OACRC,EAAM,aACNC,EAAY,MACZC,EAAK,cACLC,EACAC,OAAO,WAAEC,EAAU,WAAEC,EAAU,UAAEC,GACjCtB,SAAS,KAAEuB,IACTd,EACEe,EAAsC,YAAtBxB,EAAQZ,WAA2B,EAAI,EACvDqC,EAAOA,IAAsBC,EAEnC,IAAIC,EAAe,EACfC,EAAkB,EAClBC,EAAcf,EAASgB,MACvBC,EAAsB,EACtBC,GAAa,EAEjB,SAASC,IACP,IAAIC,EAAgB,EAEpBP,EAAeH,EAAgBxB,EAAQX,MACv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AAU,mBACbD,EAAAA,cAAA,OAAKC,UAAU,kBACbD,EAAAA,cAACK,EAAAA,GAAU,CACTC,QAASA,IAAMhB,EAAsBH,GACrCoB,SAAUtB,IAEZe,EAAAA,cAACQ,EAAAA,GAAU,CACTF,QAASA,IAAMhB,EAAsBF,GACrCmB,SAAUrB,KAIdc,EAAAA,cAAA,UAAQC,UAAU,cAAcK,QAASV,EAAgBa,KAAK,UAC3DhC,EAAY,OAAS,UAGtB,C","sources":["webpack://embla-carousel-docs/../src/components/Options.ts","webpack://embla-carousel-docs/../src/components/AutoScroll.ts","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/AutoScroll/EmblaCarousel.tsx"],"sourcesContent":["import { CreateOptionsType } from 'embla-carousel'\n\nexport type OptionsType = CreateOptionsType<{\n direction: 'forward' | 'backward'\n speed: number\n startDelay: number\n playOnInit: boolean\n stopOnFocusIn: boolean\n stopOnInteraction: boolean\n stopOnMouseEnter: boolean\n rootNode: ((emblaRoot: HTMLElement) => HTMLElement | null) | null\n}>\n\nexport const defaultOptions: OptionsType = {\n direction: 'forward',\n speed: 2,\n startDelay: 1000,\n active: true,\n breakpoints: {},\n playOnInit: true,\n stopOnFocusIn: true,\n stopOnInteraction: true,\n stopOnMouseEnter: false,\n rootNode: null\n}\n","import { OptionsType, defaultOptions } from './Options'\nimport {\n CreatePluginType,\n OptionsHandlerType,\n EmblaCarouselType,\n EngineType,\n ScrollBodyType\n} from 'embla-carousel'\n\ndeclare module 'embla-carousel' {\n interface EmblaPluginsType {\n autoScroll: AutoScrollType\n }\n\n interface EmblaEventListType {\n autoScrollPlay: 'autoScroll:play'\n autoScrollStop: 'autoScroll:stop'\n }\n}\n\nexport type AutoScrollType = CreatePluginType<\n {\n play: (delay?: number) => void\n stop: () => void\n reset: () => void\n isPlaying: () => boolean\n },\n OptionsType\n>\n\nexport type AutoScrollOptionsType = AutoScrollType['options']\n\nfunction AutoScroll(userOptions: AutoScrollOptionsType = {}): AutoScrollType {\n let options: OptionsType\n let emblaApi: EmblaCarouselType\n let destroyed: boolean\n let playing = false\n let resume = true\n let timer = 0\n let startDelay: number\n let defaultScrollBehaviour: ScrollBodyType\n\n function init(\n emblaApiInstance: EmblaCarouselType,\n optionsHandler: OptionsHandlerType\n ): void {\n emblaApi = emblaApiInstance\n\n const { mergeOptions, optionsAtMedia } = optionsHandler\n const optionsBase = mergeOptions(defaultOptions, AutoScroll.globalOptions)\n const allOptions = mergeOptions(optionsBase, userOptions)\n options = optionsAtMedia(allOptions)\n\n if (emblaApi.scrollSnapList().length <= 1) return\n\n startDelay = options.startDelay\n destroyed = false\n defaultScrollBehaviour = emblaApi.internalEngine().scrollBody\n\n const { eventStore } = emblaApi.internalEngine()\n const emblaRoot = emblaApi.rootNode()\n const root = (options.rootNode && options.rootNode(emblaRoot)) || emblaRoot\n const container = emblaApi.containerNode()\n\n emblaApi.on('pointerDown', stopScroll)\n\n if (!options.stopOnInteraction) {\n emblaApi.on('pointerUp', startScrollOnSettle)\n }\n\n if (options.stopOnMouseEnter) {\n eventStore.add(root, 'mouseenter', () => {\n resume = false\n stopScroll()\n })\n\n if (!options.stopOnInteraction) {\n eventStore.add(root, 'mouseleave', () => {\n resume = true\n startScroll()\n })\n }\n }\n\n if (options.stopOnFocusIn) {\n eventStore.add(container, 'focusin', () => {\n stopScroll()\n emblaApi.scrollTo(emblaApi.selectedScrollSnap(), true)\n })\n\n if (!options.stopOnInteraction) {\n eventStore.add(container, 'focusout', startScroll)\n }\n }\n\n if (options.playOnInit) startScroll()\n }\n\n function destroy(): void {\n emblaApi\n .off('pointerDown', stopScroll)\n .off('pointerUp', startScrollOnSettle)\n .off('settle', onSettle)\n stopScroll()\n destroyed = true\n playing = false\n }\n\n function startScroll(): void {\n if (destroyed || playing) return\n if (!resume) return\n emblaApi.emit('autoScroll:play')\n\n const engine = emblaApi.internalEngine()\n const { ownerWindow } = engine\n\n timer = ownerWindow.setTimeout(() => {\n engine.scrollBody = createAutoScrollBehaviour(engine)\n engine.animation.start()\n }, startDelay)\n\n playing = true\n }\n\n function stopScroll(): void {\n if (destroyed || !playing) return\n emblaApi.emit('autoScroll:stop')\n\n const engine = emblaApi.internalEngine()\n const { ownerWindow } = engine\n\n engine.scrollBody = defaultScrollBehaviour\n ownerWindow.clearTimeout(timer)\n timer = 0\n\n playing = false\n }\n\n function onSettle(): void {\n if (resume) startScroll()\n emblaApi.off('settle', onSettle)\n }\n\n function startScrollOnSettle(): void {\n emblaApi.on('settle', onSettle)\n }\n\n function createAutoScrollBehaviour(engine: EngineType): ScrollBodyType {\n const {\n location,\n target,\n scrollTarget,\n index,\n indexPrevious,\n limit: { reachedMin, reachedMax, constrain },\n options: { loop }\n } = engine\n const directionSign = options.direction === 'forward' ? -1 : 1\n const noop = (): ScrollBodyType => self\n\n let bodyVelocity = 0\n let scrollDirection = 0\n let rawLocation = location.get()\n let rawLocationPrevious = 0\n let hasSettled = false\n\n function seek(): ScrollBodyType {\n let directionDiff = 0\n\n bodyVelocity = directionSign * options.speed\n rawLocation += bodyVelocity\n location.add(bodyVelocity)\n target.set(location)\n\n directionDiff = rawLocation - rawLocationPrevious\n scrollDirection = Math.sign(directionDiff)\n rawLocationPrevious = rawLocation\n\n const currentIndex = scrollTarget.byDistance(0, false).index\n\n if (index.get() !== currentIndex) {\n indexPrevious.set(index.get())\n index.set(currentIndex)\n emblaApi.emit('select')\n }\n\n const reachedEnd =\n options.direction === 'forward'\n ? reachedMin(location.get())\n : reachedMax(location.get())\n\n if (!loop && reachedEnd) {\n hasSettled = true\n const constrainedLocation = constrain(location.get())\n location.set(constrainedLocation)\n target.set(location)\n stopScroll()\n }\n\n return self\n }\n\n const self: ScrollBodyType = {\n direction: () => scrollDirection,\n duration: () => -1,\n velocity: () => bodyVelocity,\n settled: () => hasSettled,\n seek,\n useBaseFriction: noop,\n useBaseDuration: noop,\n useFriction: noop,\n useDuration: noop\n }\n return self\n }\n\n function play(startDelayOverride?: number): void {\n if (typeof startDelayOverride !== 'undefined') {\n startDelay = startDelayOverride\n }\n resume = true\n startScroll()\n }\n\n function stop(): void {\n if (playing) stopScroll()\n }\n\n function reset(): void {\n if (playing) {\n stopScroll()\n startScrollOnSettle()\n }\n }\n\n function isPlaying(): boolean {\n return playing\n }\n\n const self: AutoScrollType = {\n name: 'autoScroll',\n options: userOptions,\n init,\n destroy,\n play,\n stop,\n reset,\n isPlaying\n }\n return self\n}\n\ndeclare namespace AutoScroll {\n let globalOptions: AutoScrollOptionsType | undefined\n}\n\nAutoScroll.globalOptions = undefined\n\nexport default AutoScroll\n","import React, { useCallback, useEffect, useState } from 'react'\nimport { EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport AutoScroll from 'embla-carousel-auto-scroll'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options, [\n AutoScroll({ playOnInit: false })\n ])\n const [isPlaying, setIsPlaying] = useState(false)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const onButtonAutoplayClick = useCallback(\n (callback: () => void) => {\n const autoScroll = emblaApi?.plugins()?.autoScroll\n if (!autoScroll) return\n\n const resetOrStop =\n autoScroll.options.stopOnInteraction === false\n ? autoScroll.reset\n : autoScroll.stop\n\n resetOrStop()\n callback()\n },\n [emblaApi]\n )\n\n const toggleAutoplay = useCallback(() => {\n const autoScroll = emblaApi?.plugins()?.autoScroll\n if (!autoScroll) return\n\n const playOrStop = autoScroll.isPlaying()\n ? autoScroll.stop\n : autoScroll.play\n playOrStop()\n }, [emblaApi])\n\n useEffect(() => {\n const autoScroll = emblaApi?.plugins()?.autoScroll\n if (!autoScroll) return\n\n setIsPlaying(autoScroll.isPlaying())\n emblaApi\n .on('autoScroll:play', () => setIsPlaying(true))\n .on('autoScroll:stop', () => setIsPlaying(false))\n .on('reInit', () => setIsPlaying(autoScroll.isPlaying()))\n }, [emblaApi])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n {index + 1}\n \n \n ))}\n \n \n\n \n \n onButtonAutoplayClick(onPrevButtonClick)}\n disabled={prevBtnDisabled}\n />\n onButtonAutoplayClick(onNextButtonClick)}\n disabled={nextBtnDisabled}\n />\n \n\n \n {isPlaying ? 'Stop' : 'Start'}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n"],"names":["defaultOptions","direction","speed","startDelay","active","breakpoints","playOnInit","stopOnFocusIn","stopOnInteraction","stopOnMouseEnter","rootNode","AutoScroll","userOptions","options","emblaApi","destroyed","defaultScrollBehaviour","playing","resume","timer","startScroll","emit","engine","internalEngine","ownerWindow","setTimeout","scrollBody","location","target","scrollTarget","index","indexPrevious","limit","reachedMin","reachedMax","constrain","loop","directionSign","noop","self","bodyVelocity","scrollDirection","rawLocation","get","rawLocationPrevious","hasSettled","seek","directionDiff","add","set","Math","sign","currentIndex","byDistance","reachedEnd","constrainedLocation","stopScroll","duration","velocity","settled","useBaseFriction","useBaseDuration","useFriction","useDuration","createAutoScrollBehaviour","animation","start","clearTimeout","onSettle","off","startScrollOnSettle","on","name","init","emblaApiInstance","optionsHandler","mergeOptions","optionsAtMedia","optionsBase","globalOptions","allOptions","scrollSnapList","length","eventStore","emblaRoot","root","container","containerNode","scrollTo","selectedScrollSnap","destroy","play","startDelayOverride","stop","reset","isPlaying","undefined","props","slides","emblaRef","useEmblaCarousel","setIsPlaying","useState","prevBtnDisabled","nextBtnDisabled","onPrevButtonClick","onNextButtonClick","usePrevNextButtons","onButtonAutoplayClick","useCallback","callback","_emblaApi$plugins","autoScroll","plugins","toggleAutoplay","_emblaApi$plugins2","useEffect","_emblaApi$plugins3","React","className","ref","map","key","PrevButton","onClick","disabled","NextButton","type"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/2445-520d15ac197a112a3ec1.js b/docs/2445-520d15ac197a112a3ec1.js new file mode 100644 index 000000000..be1f93b93 --- /dev/null +++ b/docs/2445-520d15ac197a112a3ec1.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkembla_carousel_docs=self.webpackChunkembla_carousel_docs||[]).push([[2445],{2445:function(e,t,r){r.r(t),r.d(t,{SearchAlgolia:function(){return po}});var n=r(4041),o=r(3057),i=r(8362),a=r(7254),c=r(3144);function l(){return n.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},n.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function u(){return n.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},n.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var s=["translations"];function f(){return f=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var h="Ctrl";var v=n.forwardRef((function(e,t){var r=e.translations,o=void 0===r?{}:r,i=d(e,s),a=o.buttonText,c=void 0===a?"Search":a,p=o.buttonAriaLabel,v=void 0===p?"Search":p,b=m((0,n.useState)(null),2),g=b[0],S=b[1];return(0,n.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?S("⌘"):S(h))}),[]),n.createElement("button",f({type:"button",className:"DocSearch DocSearch-Button","aria-label":v},i,{ref:t}),n.createElement("span",{className:"DocSearch-Button-Container"},n.createElement(u,null),n.createElement("span",{className:"DocSearch-Button-Placeholder"},c)),n.createElement("span",{className:"DocSearch-Button-Keys"},null!==g&&n.createElement(n.Fragment,null,n.createElement(y,{reactsToKey:g===h?h:"Meta"},g===h?n.createElement(l,null):g),n.createElement(y,{reactsToKey:"k"},"K"))))}));function y(e){var t=e.reactsToKey,r=e.children,o=m((0,n.useState)(!1),2),i=o[0],a=o[1];return(0,n.useEffect)((function(){if(t)return window.addEventListener("keydown",e),window.addEventListener("keyup",r),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",r)};function e(e){e.key===t&&a(!0)}function r(e){e.key!==t&&"Meta"!==e.key||a(!1)}}),[t]),n.createElement("kbd",{className:i?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},r)}function b(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t=3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(T(r),[{headers:a}]))}else e.apply(void 0,[t].concat(T(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDsAfterSearch",x(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDs",x(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDsAfterSearch",x(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDs",x(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var r=t.items,n=C(t,D);return[].concat(T(e),T(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function L(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function H(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function q(e){return function(e){if(Array.isArray(e))return U(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return U(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&z({onItemsChange:n,items:r,insights:c,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;a("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:c}}),r((function(e){var t=e.item,r=e.state,n=e.event;H(t)&&o({state:r,event:n,insights:c,item:t,insightsEvents:[B({eventName:"Item Selected"},E({item:t,items:l.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;H(t)&&i({state:r,event:n,insights:c,item:t,insightsEvents:[B({eventName:"Item Active"},E({item:t,items:l.current}))]})}))},onStateChange:function(e){var t=e.state;u({state:t})},__autocomplete_pluginOptions:e}}function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==W(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===W(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y(e,t,r){var n,o=t.initialState;return{getState:function(){return o},dispatch:function(n,i){var a=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(oe++),plugins:o,initialState:pe({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(se(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:O,onResolve:O};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=ae(ae({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return Q(e)})).then((function(e){return e.map((function(e){return pe(pe({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:pe({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Fe,Be,Ke,Ve=null,$e=(Fe=-1,Be=-1,Ke=void 0,function(e){var t=++Fe;return Promise.resolve(e).then((function(e){return Ke&&t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ze=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}var tt=["props","refresh","store"],rt=["inputElement","formElement","panelElement"],nt=["inputElement"],ot=["inputElement","maxLength"],it=["sourceIndex"],at=["sourceIndex"],ct=["item","source","sourceIndex"];function lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ut(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function mt(e){var t=e.props,r=e.refresh,n=e.store,o=ft(e,tt),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return ut({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},ft(e,rt))},getRootProps:function(e){return ut({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return ut({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(ut({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(ut({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},ft(e,nt))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=ft(r,it);return ut({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function a(e){(t.openOnFocus||Boolean(n.getState().query))&&ze(ut({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var c=e||{},l=(c.inputElement,c.maxLength),u=void 0===l?512:l,s=ft(c,ot),f=xe(n.getState()),m=function(e){return Boolean(e&&e.match(Ze))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),p=null!=f&&f.itemUrl&&!m?"go":"search";return ut({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(e){ze(ut({event:e,props:t,query:e.currentTarget.value.slice(0,u),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=Qe(e,We);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=xe(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,l=e.source;l.onActive(Je({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:l,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?ze(Je({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=xe(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,m=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(Je({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(Je({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(Je({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:u,state:o.getState()});ze(Je({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(Je({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(ut({event:e,props:t,refresh:r,store:n},o))},onFocus:a,onBlur:O,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||a(r)}},s)},getPanelProps:function(e){return ut({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=ft(r,at);return ut({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,l=e.sourceIndex,u=ft(e,ct);return ut({id:"".concat(i(t.id,l),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=xe(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(ut({event:e,item:i,itemInputValue:c,itemUrl:l,refresh:r,source:u,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():ze(ut({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(ut({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},u)}}}var pt=[{segment:"autocomplete-core",version:"1.9.3"}];function dt(e){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dt(e)}function ht(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vt(e){for(var t=1;t=r?null===n?null:0:o}function Ot(e){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ot(e)}function Et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Kt(e){var t=e.translations,r=void 0===t?{}:t,o=Bt(e,qt),i=r.noResultsText,a=void 0===i?"No results for":i,c=r.suggestedQueryText,l=void 0===c?"Try searching for":c,u=r.reportMissingResultsText,s=void 0===u?"Believe this query should return results?":u,f=r.reportMissingResultsLinkText,m=void 0===f?"Let us know.":f,p=o.state.context.searchSuggestions;return n.createElement("div",{className:"DocSearch-NoResults"},n.createElement("div",{className:"DocSearch-Screen-Icon"},n.createElement(Mt,null)),n.createElement("p",{className:"DocSearch-Title"},a,' "',n.createElement("strong",null,o.state.query),'"'),p&&p.length>0&&n.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},n.createElement("p",{className:"DocSearch-Help"},l,":"),n.createElement("ul",null,p.slice(0,3).reduce((function(e,t){return[].concat(Ut(e),[n.createElement("li",{key:t},n.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){o.setQuery(t.toLowerCase()+" "),o.refresh(),o.inputRef.current.focus()}},t))])}),[]))),o.getMissingResultsUrl&&n.createElement("p",{className:"DocSearch-Help"},"".concat(s," "),n.createElement("a",{href:o.getMissingResultsUrl({query:o.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var Vt=function(){return n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},n.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function $t(e){switch(e.type){case"lvl1":return n.createElement(Vt,null);case"content":return n.createElement(Gt,null);default:return n.createElement(zt,null)}}function zt(){return n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},n.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Gt(){return n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},n.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Wt(){return n.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},n.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),n.createElement("path",{d:"M8 17l-6-6 6-6"})))}var Xt=["hit","attribute","tagName"];function Jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yt(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function er(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function tr(e){var t=e.hit,r=e.attribute,o=e.tagName,i=void 0===o?"span":o,a=Zt(e,Xt);return(0,n.createElement)(i,Yt(Yt({},a),{},{dangerouslySetInnerHTML:{__html:er(t,"_snippetResult.".concat(r,".value"))||er(t,r)}}))}function rr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r|<\/mark>)/g,lr=RegExp(cr.source);function ur(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((n.__docsearch_parent?null===(t=n.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(r=e._highlightResult)||void 0===r||null===(r=r.hierarchy)||void 0===r?void 0:r.lvl0)||{}).value;return o&&lr.test(o)?o.replace(cr,""):o}function sr(){return sr=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function br(e){var t=e.translations,r=void 0===t?{}:t,o=yr(e,hr),i=r.recentSearchesTitle,a=void 0===i?"Recent":i,c=r.noRecentSearchesText,l=void 0===c?"No recent searches":c,u=r.saveRecentSearchButtonTitle,s=void 0===u?"Save this search":u,f=r.removeRecentSearchButtonTitle,m=void 0===f?"Remove this search from history":f,p=r.favoriteSearchesTitle,d=void 0===p?"Favorite":p,h=r.removeFavoriteSearchButtonTitle,v=void 0===h?"Remove this search from favorites":h;return"idle"===o.state.status&&!1===o.hasCollections?o.disableUserPersonalization?null:n.createElement("div",{className:"DocSearch-StartScreen"},n.createElement("p",{className:"DocSearch-Help"},l)):!1===o.hasCollections?null:n.createElement("div",{className:"DocSearch-Dropdown-Container"},n.createElement(ir,vr({},o,{title:a,collection:o.state.collections[0],renderIcon:function(){return n.createElement("div",{className:"DocSearch-Hit-icon"},n.createElement(mr,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,i=e.runDeleteTransition;return n.createElement(n.Fragment,null,n.createElement("div",{className:"DocSearch-Hit-action"},n.createElement("button",{className:"DocSearch-Hit-action-button",title:s,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){o.favoriteSearches.add(t),o.recentSearches.remove(t),o.refresh()}))}},n.createElement(pr,null))),n.createElement("div",{className:"DocSearch-Hit-action"},n.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),i((function(){o.recentSearches.remove(t),o.refresh()}))}},n.createElement(dr,null))))}})),n.createElement(ir,vr({},o,{title:d,collection:o.state.collections[1],renderIcon:function(){return n.createElement("div",{className:"DocSearch-Hit-icon"},n.createElement(pr,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return n.createElement("div",{className:"DocSearch-Hit-action"},n.createElement("button",{className:"DocSearch-Hit-action-button",title:v,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){o.favoriteSearches.remove(t),o.refresh()}))}},n.createElement(dr,null)))}})))}var gr=["translations"];function Sr(){return Sr=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Er=n.memo((function(e){var t=e.translations,r=void 0===t?{}:t,o=Or(e,gr);if("error"===o.state.status)return n.createElement(Ht,{translations:null==r?void 0:r.errorScreen});var i=o.state.collections.some((function(e){return e.items.length>0}));return o.state.query?!1===i?n.createElement(Kt,Sr({},o,{translations:null==r?void 0:r.noResultsScreen})):n.createElement(fr,o):n.createElement(br,Sr({},o,{hasCollections:i,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function wr(){return n.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},n.createElement("g",{fill:"none",fillRule:"evenodd"},n.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},n.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),n.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},n.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var jr=["translations"];function Ir(){return Ir=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Pr(e){var t=e.translations,r=void 0===t?{}:t,o=Dr(e,jr),i=r.resetButtonTitle,a=void 0===i?"Clear the query":i,c=r.resetButtonAriaLabel,l=void 0===c?"Clear the query":c,s=r.cancelButtonText,f=void 0===s?"Cancel":s,m=r.cancelButtonAriaLabel,p=void 0===m?"Cancel":m,d=r.searchInputLabel,h=void 0===d?"Search":d,v=o.getFormProps({inputElement:o.inputRef.current}).onReset;return n.useEffect((function(){o.autoFocus&&o.inputRef.current&&o.inputRef.current.focus()}),[o.autoFocus,o.inputRef]),n.useEffect((function(){o.isFromSelection&&o.inputRef.current&&o.inputRef.current.select()}),[o.isFromSelection,o.inputRef]),n.createElement(n.Fragment,null,n.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:v},n.createElement("label",Ir({className:"DocSearch-MagnifierLabel"},o.getLabelProps()),n.createElement(u,null),n.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},h)),n.createElement("div",{className:"DocSearch-LoadingIndicator"},n.createElement(wr,null)),n.createElement("input",Ir({className:"DocSearch-Input",ref:o.inputRef},o.getInputProps({inputElement:o.inputRef.current,autoFocus:o.autoFocus,maxLength:_t}))),n.createElement("button",{type:"reset",title:a,className:"DocSearch-Reset","aria-label":l,hidden:!o.state.query},n.createElement(dr,null))),n.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":p,onClick:o.onClose},f))}var Tr=["_highlightResult","_snippetResult"];function Ar(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Cr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function _r(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=Cr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,Ar(t,Tr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function Nr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get(t,r,n={miss:()=>Promise.resolve()}){return Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e))},set(e,r){return Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r}))},delete(e){return Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))}))},clear(){return Promise.resolve().then((()=>{n().removeItem(t)}))}}}function kr(e){const t=[...e.caches],r=t.shift();return void 0===r?{get(e,t,r={miss:()=>Promise.resolve()}){return t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e))},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}:{get(e,n,o={miss:()=>Promise.resolve()}){return r.get(e,n,o).catch((()=>kr({caches:t}).get(e,n,o)))},set(e,n){return r.set(e,n).catch((()=>kr({caches:t}).set(e,n)))},delete(e){return r.delete(e).catch((()=>kr({caches:t}).delete(e)))},clear(){return r.clear().catch((()=>kr({caches:t}).clear()))}}}function xr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function Rr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function Lr(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Hr(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Mr="4.23.2",qr={WithinQueryParameters:0,WithinHeaders:1};function Ur(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Fr={Read:1,Write:2,Any:3},Br={Up:1,Down:2,Timeouted:3},Kr=12e4;function Vr(e,t=Br.Up){return{...e,status:t,lastUpdate:Date.now()}}function $r(e){return"string"==typeof e?{protocol:"https",url:e,accept:Fr.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Fr.Any}}const zr={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function Gr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Vr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===Br.Up||Date.now()-e.lastUpdate>Kr}(e))),n=e.filter((e=>function(e){return e.status===Br.Timeouted&&Date.now()-e.lastUpdate<=Kr}(e))),o=[...r,...n],i=o.length>0?o.map((e=>$r(e))):t;return{getTimeout(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i}}))}const Wr=(e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&!~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e);function Xr(e,t,r,n){const o=[],i=function(e,t){if(e.method===zr.Get||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,l=r.method!==zr.Get?{}:{...r.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let s=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Zr(o)};const p={data:i,headers:a,method:c,url:Yr(m,r.path,u),connectTimeout:l(s,e.timeouts.connect),responseTimeout:l(s,n.timeout)},d=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},h={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=d(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",en(n)),e.hostsCache.set(m,Vr(m,r.isTimedOut?Br.Timeouted:Br.Down))]).then((()=>f(t,l)))},onFail(e){throw d(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Zr(o))}};return e.requester.send(p).then((e=>Wr(e,h)))};return Gr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Jr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Yr(e,t,r){const n=Qr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Qr(e){return Object.keys(e).map((t=>{return Hr("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Zr(e){return e.map((e=>en(e)))}function en(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const tn=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===qr.WithinHeaders?n:{}},queryParameters(){return e===qr.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:qr.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:l,queryParameters:u,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:u,hosts:l.map((e=>$r(e))),read(e,t){const r=Ur(t,f.timeouts.read),n=()=>Xr(f,f.hosts.filter((e=>!!(e.accept&Fr.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write(e,t){return Xr(f,f.hosts.filter((e=>!!(e.accept&Fr.Write))),e,Ur(t,f.timeouts.write))}};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Fr.Read},{url:`${t}.algolia.net`,accept:Fr.Write}].concat(Rr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))}};return Lr(o,e.methods)},rn=e=>(t,r)=>t.method===zr.Get?e.transporter.read(t,r):e.transporter.write(t,r),nn=e=>(t,r={})=>Lr({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),on=e=>(t,r)=>{const n=t.map((e=>({...e,params:Qr(e.params||{})})));return e.transporter.read({method:zr.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},an=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return nn(e)(t.indexName,{methods:{searchForFacetValues:un}}).searchForFacetValues(n,o,{...r,...i})}))),cn=e=>(t,r,n)=>e.transporter.read({method:zr.Post,path:Hr("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),ln=e=>(t,r)=>e.transporter.read({method:zr.Post,path:Hr("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),un=e=>(t,r,n)=>e.transporter.read({method:zr.Post,path:Hr("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),sn={Debug:1,Info:2,Error:3};const fn=e=>(t,r)=>{const n=t.map((e=>({...e,threshold:e.threshold||0})));return e.transporter.read({method:zr.Post,path:"1/indexes/*/recommendations",data:{requests:n},cacheable:!0},r)};function mn(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(o=sn.Error,{debug(e,t){return sn.Debug>=o&&console.debug(e,t),Promise.resolve()},info(e,t){return sn.Info>=o&&console.info(e,t),Promise.resolve()},error(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:xr(),requestsCache:xr({serializable:!1}),hostsCache:kr({caches:[Nr({key:`${Mr}-${e}`}),xr()]}),userAgent:Jr(Mr).add({segment:"Browser",version:"lite"}),authMode:qr.WithinQueryParameters};var o;return tn({...n,...r,methods:{search:on,searchForFacetValues:an,multipleQueries:on,multipleSearchForFacetValues:an,customRequest:rn,initIndex:e=>t=>nn(e)(t,{methods:{search:ln,searchForFacetValues:un,findAnswers:cn}}),getRecommendations:fn}})}mn.version=Mr;var pn=mn,dn="3.6.0";function hn(){}function vn(e){return e}function yn(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function bn(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}var gn=["footer","searchBox"];function Sn(){return Sn=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Pn(e){var t=e.appId,r=e.apiKey,o=e.indexName,i=e.placeholder,a=void 0===i?"Search docs":i,c=e.searchParameters,l=e.maxResultsPerGroup,u=e.onClose,s=void 0===u?hn:u,f=e.transformItems,m=void 0===f?vn:f,p=e.hitComponent,d=void 0===p?Rt:p,h=e.resultsFooterComponent,v=void 0===h?function(){return null}:h,y=e.navigator,b=e.initialScrollY,g=void 0===b?0:b,S=e.transformSearchClient,O=void 0===S?vn:S,E=e.disableUserPersonalization,w=void 0!==E&&E,j=e.initialQuery,I=void 0===j?"":j,D=e.translations,P=void 0===D?{}:D,T=e.getMissingResultsUrl,A=e.insights,C=void 0!==A&&A,_=P.footer,N=P.searchBox,k=Dn(P,gn),x=jn(n.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),R=x[0],L=x[1],H=n.useRef(null),M=n.useRef(null),q=n.useRef(null),U=n.useRef(null),F=n.useRef(null),B=n.useRef(10),K=n.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,_t):"").current,V=n.useRef(I||K).current,$=function(e,t,r){return n.useMemo((function(){var n=pn(e,t);return n.addAlgoliaAgent("docsearch",dn),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",dn),r(n)}),[e,t,r])}(t,r,O),z=n.useRef(_r({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(o),limit:10})).current,G=n.useRef(_r({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(o),limit:0===z.getAll().length?7:4})).current,W=n.useCallback((function(e){if(!w){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===z.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&G.add(t)}}),[z,G,w]),X=n.useCallback((function(e){if(R.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};R.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[R.context.algoliaInsightsPlugin]),J=n.useMemo((function(){return Ct({id:"docsearch",defaultActiveItemId:0,placeholder:a,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:C,navigator:y,onStateChange:function(e){L(e.state)},getSources:function(e){var n=e.query,i=e.state,a=e.setContext,u=e.setStatus;if(!n)return w?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;W(t),yn(r)||s()},getItemUrl:function(e){return e.item.url},getItems:function(){return G.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;W(t),yn(r)||s()},getItemUrl:function(e){return e.item.url},getItems:function(){return z.getAll()}}];var f=Boolean(C);return $.search([{query:n,indexName:o,params:En({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(B.current),"hierarchy.lvl2:".concat(B.current),"hierarchy.lvl3:".concat(B.current),"hierarchy.lvl4:".concat(B.current),"hierarchy.lvl5:".concat(B.current),"hierarchy.lvl6:".concat(B.current),"content:".concat(B.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:f},c)}]).catch((function(e){throw"RetryError"===e.name&&u("error"),e})).then((function(e){var n=e.results[0],c=n.hits,u=n.nbHits,p=bn(c,(function(e){return ur(e)}),l);i.context.searchSuggestions.length0&&(Z(),F.current&&F.current.focus())}),[V,Z]),n.useEffect((function(){function e(){if(M.current){var e=.01*window.innerHeight;M.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),n.createElement("div",Sn({ref:H},Q({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===R.status&&"DocSearch-Container--Stalled","error"===R.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&s()}}),n.createElement("div",{className:"DocSearch-Modal",ref:M},n.createElement("header",{className:"DocSearch-SearchBar",ref:q},n.createElement(Pr,Sn({},J,{state:R,autoFocus:0===V.length,inputRef:F,isFromSelection:Boolean(V)&&V===K,translations:N,onClose:s}))),n.createElement("div",{className:"DocSearch-Dropdown",ref:U},n.createElement(Er,Sn({},J,{indexName:o,state:R,hitComponent:d,resultsFooterComponent:v,disableUserPersonalization:w,recentSearches:G,favoriteSearches:z,inputRef:F,translations:k,getMissingResultsUrl:T,onItemClick:function(e,t){X(e),W(e),yn(t)||s()}}))),n.createElement("footer",{className:"DocSearch-Footer"},n.createElement(xt,{translations:_}))))}function Tn(){return Tn=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r svg{","}}.DocSearch-Title{color:",";margin-bottom:",";font-size:",";}.DocSearch-Help a{",";",";}.DocSearch-Dropdown{overflow-y:auto;overflow-x:hidden;flex:1 1 0;}.DocSearch-Help{font-size:",";margin:0;user-select:none;}.DocSearch-Hits mark{",";}.DocSearch-HitsFooter{color:",";font-size:",";display:flex;justify-content:center;}.DocSearch-HitsFooter a{padding-top:",";margin-bottom:",";border-bottom:"," solid;color:inherit;display:inline-flex;}.DocSearch-Hit{padding-bottom:",";border-radius:",";display:flex;position:relative;}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none;}}.DocSearch-Hit--deleting{opacity:0;transition:all 250ms linear;}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none;}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all 250ms linear;transition-delay:250ms;}.DocSearch-Hit a{",";outline-offset:-",";background-color:",";padding-left:",";border-radius:",";display:block;width:100%;}.DocSearch-Hit-source{background-color:",";color:",";margin:0 -",";padding:"," "," 0;font-size:",";font-weight:",";line-height:3.2rem;position:sticky;top:0;z-index:10;}.DocSearch-Hit-Tree{","{display:none;}","{color:",";height:",";opacity:0.5;stroke-width:",";width:",";}}.DocSearch-Hit[aria-selected='true'] a{position:relative;display:block;&:before,&:after{content:'';position:absolute;pointer-events:none;top:0;bottom:0;left:0;",";}&:before{width:0.4rem;}&:after{border-radius:",";right:0;opacity:0.07;}}.DocSearch-Hit-Container{color:",";height:",";padding:0 "," 0 0;align-items:center;display:flex;flex-direction:row;}.DocSearch-Hit-icon{"," color:",";stroke-width:",";}.DocSearch-Hit-action{",";color:",";stroke-width:",";align-items:center;display:flex;> svg{",";display:block;}}.DocSearch-Hit-action + .DocSearch-Hit-action{margin-left:",";}.DocSearch-Hit-action-button{",";color:inherit;padding:",";}svg.DocSearch-Hit-Select-Icon{display:none;}.DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-Select-Icon{display:block;}.DocSearch-Hit-action-button:hover path,.DocSearch-Hit-action-button:focus path{fill:",";}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:",";justify-content:center;line-height:1.2em;margin:0 ",";overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%;}.DocSearch-Hit-title{font-size:",";}.DocSearch-Hit-path{color:",";font-size:",";}.DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected='true'] mark,.DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-Tree{color:"," !important;}.DocSearch-NoResults-Prefill-List{padding-bottom:",";> ul{padding-top:",";font-size:",";display:inline-block;}li{color:",";list-style-position:inside;list-style-type:'» ';text-align:left;}}.DocSearch-Prefill{",";",";padding-top:",";padding-bottom:",";}"],Bn.lm.TEXT_LOW_CONTRAST,Fn.F.SIX,Kn.$.COMPLEMENTARY,Bn.lm.DETAIL_HIGH_CONTRAST,eo,(0,xn.P)("4rem"),Bn.lm.TEXT_HIGH_CONTRAST,Fn.F.THREE,Kn.$.H4,kn.y,$n.y,Kn.$.COMPLEMENTARY,Rn.y,Bn.lm.TEXT_LOW_CONTRAST,Kn.$.COMPLEMENTARY,eo,eo,Vn.C.DETAIL,Fn.F.CUSTOM((e=>{let{ONE:t}=e;return t-.2})),Vn.Y.BOX,$n.y,Vn.C.OUTLINE,Bn.lm.BACKGROUND_CODE,eo,Vn.Y.BOX,Bn.lm.BACKGROUND_SITE,Bn.lm.TEXT_HIGH_CONTRAST,Fn.F.CUSTOM((e=>{let{ONE:t}=e;return t-.2})),Fn.F.CUSTOM((e=>{let{ONE:t}=e;return t+.2})),Fn.F.CUSTOM((e=>{let{ONE:t}=e;return t-.2})),Kn.$.COMPLEMENTARY,Kn.s.SEMI_BOLD,qn.Rn.COMPACT,qn.Rn.DESKTOP,Bn.lm.DETAIL_HIGH_CONTRAST,Yn,Jn,Fn.F.FOUR,Rn.J,Vn.Y.BOX,Bn.lm.TEXT_MEDIUM_CONTRAST,Yn,eo,(0,xn.P)("2rem"),Bn.lm.DETAIL_HIGH_CONTRAST,Jn,(0,xn.P)("2.2rem"),Bn.lm.DETAIL_HIGH_CONTRAST,Jn,(0,xn.P)("1.8rem"),Fn.F.ONE,Nn.jq,Fn.F.CUSTOM((e=>{let{ONE:t}=e;return t-.4})),Bn.lm.TEXT_MEDIUM_CONTRAST,Kn.s.MEDIUM,Fn.F.CUSTOM((e=>{let{ONE:t}=e;return t+.2})),Kn.$.CUSTOM((e=>{let{COMPLEMENTARY:t}=e;return t+.04})),Bn.lm.TEXT_LOW_CONTRAST,Kn.$.DETAIL,Bn.lm.TEXT_HIGH_CONTRAST,Fn.F.THREE,Fn.F.ONE,Kn.$.COMPLEMENTARY,Bn.lm.TEXT_HIGH_CONTRAST,Nn.jq,kn.y,Fn.F.ONE,Fn.F.ONE),oo=(0,o.css)([".DocSearch-Footer{flex:0 0 auto;padding-top:",";display:flex;flex-direction:row-reverse;flex-shrink:0;width:100%;justify-content:space-between;align-items:center;}.DocSearch-Logo a{",";display:flex;}.DocSearch-Logo svg{color:#5468ff;margin-left:",";}.DocSearch-Label{color:",";font-size:",";line-height:1.9rem;}.DocSearch-Commands{color:",";display:flex;list-style:none;margin:0;padding:0;","{display:none;}}.DocSearch-Commands li{align-items:center;display:flex;}.DocSearch-Commands li:not(:last-of-type){margin-right:",";;}.DocSearch-Commands-Key{align-items:center;border-radius:",";background:linear-gradient( -225deg,"," 0%,"," 100% );box-shadow:inset 0 -0.2rem 0 0 ",";,inset 0 0 0.1rem 0.1rem ",",0 0.1rem 0.2rem 0.1rem rgba(",",0.4);display:flex;height:1.8rem;justify-content:center;margin-right:0.4em;padding-bottom:0.1rem;width:2rem;}.","","{.DocSearch-Commands-Key{background:linear-gradient( -225deg,"," 0%,"," 100% );box-shadow:inset 0 -0.2rem 0 0 ",",inset 0 0 0.1rem 0.1rem ",",0 0.1rem 0.2rem 0.1rem rgba(",",0.4);}}.","","{.DocSearch-Commands-Key{background:linear-gradient( -225deg,"," 0%,"," 100% );box-shadow:inset 0 -0.2rem 0 0 ",";,inset 0 0 0.1rem 0.1rem ",",0 0.1rem 0.2rem 0.1rem rgba(",",0.4);}}"],eo,$n.y,Fn.F.CUSTOM((e=>{let{ONE:t}=e;return t+.2})),Bn.lm.TEXT_LOW_CONTRAST,Kn.$.DETAIL,Bn.lm.TEXT_LOW_CONTRAST,qn.Rn.COMPACT,Fn.F.CUSTOM((e=>{let{ONE:t}=e;return t+.2})),Vn.Y.LINE,Bn.lm.DETAIL_MEDIUM_CONTRAST,Bn.lm.DETAIL_HIGH_CONTRAST,Bn.lm.DETAIL_LOW_CONTRAST,Bn.lm.DETAIL_MEDIUM_CONTRAST,Bn.lm.DETAIL_HIGH_CONTRAST_RGB_VALUE,Bn.tv,Bn.$.LIGHT,Bn.lm.DETAIL_HIGH_CONTRAST,Bn.lm.DETAIL_MEDIUM_CONTRAST,Bn.lm.DETAIL_HIGH_CONTRAST,Bn.lm.DETAIL_MEDIUM_CONTRAST,Bn.lm.DETAIL_LOW_CONTRAST_RGB_VALUE,Bn.tv,Bn.$.DARK,Bn.lm.DETAIL_MEDIUM_CONTRAST,Bn.lm.DETAIL_HIGH_CONTRAST,Bn.lm.DETAIL_LOW_CONTRAST,Bn.lm.DETAIL_MEDIUM_CONTRAST,Bn.lm.DETAIL_HIGH_CONTRAST_RGB_VALUE),io=(0,o.css)([".DocSearch-Input{",";",";height:calc("," - ("," * 2));padding-left:",";padding-right:",";-webkit-appearance:none;appearance:none;border-radius:",";width:100%;font-size:",";background-color:",";color:",";border:0;}.DocSearch-Input::-ms-clear{display:none;",";}.DocSearch-Input::-ms-reveal{display:none;",";}.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none;}.DocSearch-VisuallyHiddenForAccessibility{",";}"],(ao=Bn.lm.TEXT_LOW_CONTRAST,(0,o.css)(["::-webkit-input-placeholder{color:",";}:-moz-placeholder{color:",";opacity:1;}::-moz-placeholder{color:",";opacity:1;}:-ms-input-placeholder{color:",";}::-ms-input-placeholder{color:",";}::placeholder{color:",";}"],ao,ao,ao,ao,ao,ao)),$n.y,Yn,Xn,Qn,Qn,Vn.Y.BOX,Kn.$.H4,Bn.lm.BACKGROUND_SITE,Bn.lm.TEXT_BODY,(0,xn.P)("0"),(0,xn.P)("0"),Ln.O);var ao;const co=(0,o.css)([".DocSearch-Button{",";&:hover{box-shadow:none;}}.DocSearch-Button-Placeholder,.DocSearch-Button-Keys{","}.DocSearch-Search-Icon{",";}"],Wn.PQ,Ln.O,Wn.aT),lo=(0,o.css)([".DocSearch-MagnifierLabel{display:flex;width:",";top:",";bottom:",";position:absolute;align-items:center;justify-content:center;> svg{",";}}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel{display:none;}"],Qn,Xn,Xn,(0,xn.P)("2.35rem")),uo=(0,o.css)([".DocSearch-Reset{",";width:",";top:",";bottom:",";right:",";display:flex;position:absolute;align-items:center;justify-content:center;stroke-width:0.2rem;color:",";> svg{",";}}.DocSearch-Reset[hidden]{display:none;}"],Nn.jq,Qn,Xn,Xn,Xn,Bn.lm.TEXT_HIGH_CONTRAST,(0,xn.P)("2.35rem")),so=(0,o.css)([".DocSearch-Cancel{",";color:",";height:",";display:flex;align-items:center;margin-left:",";}"],Nn.jq,Bn.lm.TEXT_BODY,Yn,Fn.F.CUSTOM((e=>{let{TWO:t}=e;return t-.2}))),fo=(0,o.css)([".DocSearch-LoadingIndicator{width:",";top:",";bottom:",";position:absolute;align-items:center;justify-content:center;color:",";display:none;> svg{",";}}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{display:flex;}"],Qn,Xn,Xn,Bn.lm.TEXT_HIGH_CONTRAST,(0,xn.P)("2.35rem")),mo=(0,o.createGlobalStyle)(["",";",";",";",";",";",";",";",";",";",";"],to,ro,no,oo,io,co,lo,uo,so,fo),po=()=>{const e=(0,i.GV)(a.U$),t=(0,i.GV)((0,Gn.s4)(Mn.l.SITE_SEARCH)),r=(0,n.useRef)(t),o=(0,n.useRef)(),c=(0,n.useRef)(null),l=(0,i.jL)(),u=(0,n.useCallback)((()=>{l((0,Gn.WI)(Mn.l.SITE_SEARCH))}),[l]),s=(0,n.useCallback)((()=>{l((0,Gn.q6)(Mn.l.SITE_SEARCH))}),[l]);return(0,n.useEffect)((()=>{if(zn.B&&!c.current)return c.current=document.querySelector("."+Hn.D.SEARCH_TOGGLE_BUTTON),c.current&&c.current.addEventListener("click",u),()=>{c.current&&c.current.removeEventListener("click",u)}}),[u]),(0,n.useEffect)((()=>{c.current&&r.current&&c.current.click()}),[]),(0,n.useEffect)((()=>{if(!zn.B)return;const{body:e}=document,t=new MutationObserver((t=>{t.forEach((t=>{if("attributes"!==t.type)return;var r;if(!e.classList.contains(Hn.D.SEARCH_ACTIVE))return void(null===(r=o.current)||void 0===r||r.call(o));const n=e.querySelector("."+Hn.D.SEARCH_INPUT);n&&setTimeout((()=>n.focus()),0)}))}));return t.observe(e,{attributes:!0,childList:!1,subtree:!1}),()=>t.disconnect()}),[]),(0,n.useEffect)((()=>{o.current=s}),[s]),n.createElement(n.Fragment,null,n.createElement(mo,{$isKeyNavigating:e}),n.createElement(_n,{appId:Hn.g.APP_ID,indexName:Hn.g.INDEX_NAME,apiKey:Hn.g.API_KEY}))}}}]); +//# sourceMappingURL=2445-520d15ac197a112a3ec1.js.map \ No newline at end of file diff --git a/docs/2445-520d15ac197a112a3ec1.js.map b/docs/2445-520d15ac197a112a3ec1.js.map new file mode 100644 index 000000000..91d4fdcc9 --- /dev/null +++ b/docs/2445-520d15ac197a112a3ec1.js.map @@ -0,0 +1 @@ +{"version":3,"file":"2445-520d15ac197a112a3ec1.js","mappings":"0OACO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OAChB,MAAM,KAAE/zB,GAASP,SAEX00B,EAAW,IAAIC,kBAAkBC,IACrCA,EAAUz7B,SAAS07B,IACjB,GAAsB,eAAlBA,EAASx/B,KAAuB,OAE6B,IAADy/B,EAAhE,IAAKv0B,EAAKssB,UAAUvf,SAASinB,GAAAA,EAAmBQ,eAE9C,YADsB,QAAtBD,EAAAhB,EAAeh2B,eAAO,IAAAg3B,GAAtBA,EAAAxjC,KAAAwiC,IAIF,MAAMr6B,EAAQ8G,EAAKyS,cAAc,IAAIuhB,GAAAA,EAAmBS,cACpDv7B,GAAO7C,YAAW,IAAO6C,EAA2BmN,SAAS,EAAE,GACnE,IASJ,OANA8tB,EAASO,QAAQ10B,EAAM,CACrB20B,YAAY,EACZC,WAAW,EACXC,SAAS,IAGJ,IAAMV,EAASW,YAAY,GACjC,KAEHngC,EAAAA,EAAAA,YAAU,KACR4+B,EAAeh2B,QAAUs2B,CAAW,GACnC,CAACA,IAGFkB,EAAAA,cAAAA,EAAAA,SAAA,KACEA,EAAAA,cAACpC,GAAY,CAACqC,iBAAkBlC,IAChCiC,EAAAA,cAAC7H,GAAS,CACRlyB,MAAOi6B,GAAAA,EAAsBC,OAC7Bz3B,UAAWw3B,GAAAA,EAAsBE,WACjCl6B,OAAQg6B,GAAAA,EAAsBG,UAE/B,C","sources":["webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/DocSearchButton.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/noop.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/createStore.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/reshape.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/resolve.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/onInput.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/version.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/metadata.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js","webpack://embla-carousel-docs/../../node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/constants.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/AlgoliaLogo.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/Footer.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/Hit.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/ErrorScreen.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/NoResultsScreen.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/SourceIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/SelectIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/Snippet.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/Results.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/ResultsScreen.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/RecentIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/StarIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/StartScreen.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/ScreenState.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/SearchBox.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/stored-searches.js","webpack://embla-carousel-docs/../../node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/version.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/noop.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/identity.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/isModifierEvent.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/utils/groupBy.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/DocSearchModal.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/useSearchClient.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/useTouchEvents.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/useTrapFocus.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/DocSearch.js","webpack://embla-carousel-docs/../../node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.js","webpack://embla-carousel-docs/./src/components/Search/SearchAlgolia.tsx","webpack://embla-carousel-docs/./src/utils/createPlaceholderStyles.ts"],"sourcesContent":["import React from 'react';\nexport function ControlKeyIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"15\",\n height: \"15\",\n className: \"DocSearch-Control-Key-Icon\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953\",\n strokeWidth: \"1.2\",\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"square\"\n }));\n}","import React from 'react';\nexport function SearchIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n className: \"DocSearch-Search-Icon\",\n viewBox: \"0 0 20 20\",\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React, { useEffect, useState } from 'react';\nimport { ControlKeyIcon } from './icons/ControlKeyIcon';\nimport { SearchIcon } from './icons/SearchIcon';\nvar ACTION_KEY_DEFAULT = 'Ctrl';\nvar ACTION_KEY_APPLE = '⌘';\n\nfunction isAppleDevice() {\n return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\n}\n\nexport var DocSearchButton = React.forwardRef(function (_ref, ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$buttonT = translations.buttonText,\n buttonText = _translations$buttonT === void 0 ? 'Search' : _translations$buttonT,\n _translations$buttonA = translations.buttonAriaLabel,\n buttonAriaLabel = _translations$buttonA === void 0 ? 'Search' : _translations$buttonA;\n\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n key = _useState2[0],\n setKey = _useState2[1];\n\n useEffect(function () {\n if (typeof navigator !== 'undefined') {\n isAppleDevice() ? setKey(ACTION_KEY_APPLE) : setKey(ACTION_KEY_DEFAULT);\n }\n }, []);\n return /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n className: \"DocSearch DocSearch-Button\",\n \"aria-label\": buttonAriaLabel\n }, props, {\n ref: ref\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Container\"\n }, /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Placeholder\"\n }, buttonText)), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Keys\"\n }, key !== null && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DocSearchButtonKey, {\n reactsToKey: key === ACTION_KEY_DEFAULT ? ACTION_KEY_DEFAULT : 'Meta'\n }, key === ACTION_KEY_DEFAULT ? /*#__PURE__*/React.createElement(ControlKeyIcon, null) : key), /*#__PURE__*/React.createElement(DocSearchButtonKey, {\n reactsToKey: \"k\"\n }, \"K\"))));\n});\n\nfunction DocSearchButtonKey(_ref2) {\n var reactsToKey = _ref2.reactsToKey,\n children = _ref2.children;\n\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n isKeyDown = _useState4[0],\n setIsKeyDown = _useState4[1];\n\n useEffect(function () {\n if (!reactsToKey) {\n return undefined;\n }\n\n function handleKeyDown(e) {\n if (e.key === reactsToKey) {\n setIsKeyDown(true);\n }\n }\n\n function handleKeyUp(e) {\n if (e.key === reactsToKey || // keyup doesn't fire when Command is held down,\n // workaround is to mark key as also released when Command is released\n // See https://stackoverflow.com/a/73419500\n e.key === 'Meta') {\n setIsKeyDown(false);\n }\n }\n\n window.addEventListener('keydown', handleKeyDown);\n window.addEventListener('keyup', handleKeyUp);\n return function () {\n window.removeEventListener('keydown', handleKeyDown);\n window.removeEventListener('keyup', handleKeyUp);\n };\n }, [reactsToKey]);\n return /*#__PURE__*/React.createElement(\"kbd\", {\n className: isKeyDown ? 'DocSearch-Button-Key DocSearch-Button-Key--pressed' : 'DocSearch-Button-Key'\n }, children);\n}","export function debounce(fn, time) {\n var timerId = undefined;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(function () {\n return fn.apply(void 0, args);\n }, time);\n };\n}","function isPrimitive(obj) {\n return obj !== Object(obj);\n}\nexport function isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {\n return first === second;\n }\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n if (!(key in second)) {\n return false;\n }\n if (!isEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n}","export var noop = function noop() {};","export function createClickedEvent(_ref) {\n var item = _ref.item,\n items = _ref.items;\n return {\n index: item.__autocomplete_indexName,\n items: [item],\n positions: [1 + items.findIndex(function (x) {\n return x.objectID === item.objectID;\n })],\n queryID: item.__autocomplete_queryID,\n algoliaSource: ['autocomplete']\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client) {\n var _split$map = (client.version || '').split('.').map(Number),\n _split$map2 = _slicedToArray(_split$map, 2),\n major = _split$map2[0],\n minor = _split$map2[1];\n\n /* eslint-disable @typescript-eslint/camelcase */\n var v3 = major >= 3;\n var v2_4 = major === 2 && minor >= 4;\n var v1_10 = major === 1 && minor >= 10;\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}","var _excluded = [\"items\"],\n _excluded2 = [\"items\"];\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isModernInsightsClient } from './isModernInsightsClient';\nfunction chunk(item) {\n var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;\n var chunks = [];\n for (var i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push(_objectSpread(_objectSpread({}, item), {}, {\n objectIDs: item.objectIDs.slice(i, i + chunkSize)\n }));\n }\n return chunks;\n}\nfunction mapToInsightsParamsApi(params) {\n return params.map(function (_ref) {\n var items = _ref.items,\n param = _objectWithoutProperties(_ref, _excluded);\n return _objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) {\n var objectID = _ref2.objectID;\n return objectID;\n })) || param.objectIDs\n });\n });\n}\nexport function createSearchInsightsApi(searchInsights) {\n var canSendHeaders = isModernInsightsClient(searchInsights);\n function sendToInsights(method, payloads, items) {\n if (canSendHeaders && typeof items !== 'undefined') {\n var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials,\n appId = _items$0$__autocomple.appId,\n apiKey = _items$0$__autocomple.apiKey;\n var headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey\n };\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{\n headers: headers\n }]));\n } else {\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads)));\n }\n }\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init: function init(appId, apiKey) {\n searchInsights('init', {\n appId: appId,\n apiKey: apiKey\n });\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken: function setUserToken(userToken) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs: function clickedObjectIDs() {\n for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters: function clickedFilters() {\n for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['clickedFilters'].concat(params));\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() {\n for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n params[_key4] = arguments[_key4];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs: function convertedObjectIDs() {\n for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n params[_key5] = arguments[_key5];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters: function convertedFilters() {\n for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n params[_key6] = arguments[_key6];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['convertedFilters'].concat(params));\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs: function viewedObjectIDs() {\n for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n params[_key7] = arguments[_key7];\n }\n if (params.length > 0) {\n params.reduce(function (acc, _ref3) {\n var items = _ref3.items,\n param = _objectWithoutProperties(_ref3, _excluded2);\n return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) {\n var objectID = _ref4.objectID;\n return objectID;\n })) || param.objectIDs\n })).map(function (payload) {\n return {\n items: items,\n payload: payload\n };\n })));\n }, []).forEach(function (_ref5) {\n var items = _ref5.items,\n payload = _ref5.payload;\n return sendToInsights('viewedObjectIDs', [payload], items);\n });\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters: function viewedFilters() {\n for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n params[_key8] = arguments[_key8];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['viewedFilters'].concat(params));\n }\n }\n };\n}","export function createViewedEvents(_ref) {\n var items = _ref.items;\n var itemsByIndexName = items.reduce(function (acc, current) {\n var _acc$current$__autoco;\n acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current);\n return acc;\n }, {});\n return Object.keys(itemsByIndexName).map(function (indexName) {\n var items = itemsByIndexName[indexName];\n return {\n index: indexName,\n items: items,\n algoliaSource: ['autocomplete']\n };\n });\n}","export function isAlgoliaInsightsHit(hit) {\n return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createRef, debounce, isEqual, noop, safelyRunOnBrowser } from '@algolia/autocomplete-shared';\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nvar VIEW_EVENT_DELAY = 400;\nvar ALGOLIA_INSIGHTS_VERSION = '2.6.0';\nvar ALGOLIA_INSIGHTS_SRC = \"https://cdn.jsdelivr.net/npm/search-insights@\".concat(ALGOLIA_INSIGHTS_VERSION, \"/dist/search-insights.min.js\");\nvar sendViewedObjectIDs = debounce(function (_ref) {\n var onItemsChange = _ref.onItemsChange,\n items = _ref.items,\n insights = _ref.insights,\n state = _ref.state;\n onItemsChange({\n insights: insights,\n insightsEvents: createViewedEvents({\n items: items\n }).map(function (event) {\n return _objectSpread({\n eventName: 'Items Viewed'\n }, event);\n }),\n state: state\n });\n}, VIEW_EVENT_DELAY);\nexport function createAlgoliaInsightsPlugin(options) {\n var _getOptions = getOptions(options),\n providedInsightsClient = _getOptions.insightsClient,\n onItemsChange = _getOptions.onItemsChange,\n onSelectEvent = _getOptions.onSelect,\n onActiveEvent = _getOptions.onActive;\n var insightsClient = providedInsightsClient;\n if (!providedInsightsClient) {\n safelyRunOnBrowser(function (_ref2) {\n var window = _ref2.window;\n var pointer = window.AlgoliaAnalyticsObject || 'aa';\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n if (!window[pointer]) {\n window[pointer] = function () {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n window[pointer].queue.push(args);\n };\n }\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n insightsClient = window[pointer];\n loadInsights(window);\n }\n });\n }\n var insights = createSearchInsightsApi(insightsClient);\n var previousItems = createRef([]);\n var debouncedOnStateChange = debounce(function (_ref3) {\n var state = _ref3.state;\n if (!state.isOpen) {\n return;\n }\n var items = state.collections.reduce(function (acc, current) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items));\n }, []).filter(isAlgoliaInsightsHit);\n if (!isEqual(previousItems.current.map(function (x) {\n return x.objectID;\n }), items.map(function (x) {\n return x.objectID;\n }))) {\n previousItems.current = items;\n if (items.length > 0) {\n sendViewedObjectIDs({\n onItemsChange: onItemsChange,\n items: items,\n insights: insights,\n state: state\n });\n }\n }\n }, 0);\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe: function subscribe(_ref4) {\n var setContext = _ref4.setContext,\n onSelect = _ref4.onSelect,\n onActive = _ref4.onActive;\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: {\n clickAnalytics: true\n },\n insights: insights\n }\n });\n onSelect(function (_ref5) {\n var item = _ref5.item,\n state = _ref5.state,\n event = _ref5.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onSelectEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Selected'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n onActive(function (_ref6) {\n var item = _ref6.item,\n state = _ref6.state,\n event = _ref6.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onActiveEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Active'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n },\n onStateChange: function onStateChange(_ref7) {\n var state = _ref7.state;\n debouncedOnStateChange({\n state: state\n });\n },\n __autocomplete_pluginOptions: options\n };\n}\nfunction getOptions(options) {\n return _objectSpread({\n onItemsChange: function onItemsChange(_ref8) {\n var insights = _ref8.insights,\n insightsEvents = _ref8.insightsEvents;\n insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onSelect: function onSelect(_ref9) {\n var insights = _ref9.insights,\n insightsEvents = _ref9.insightsEvents;\n insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onActive: noop\n }, options);\n}\nfunction loadInsights(environment) {\n var errorMessage = \"[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete\";\n try {\n var script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n script.onerror = function () {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createCancelablePromiseList } from './utils';\nexport function createStore(reducer, props, onStoreStateChange) {\n var state = props.initialState;\n return {\n getState: function getState() {\n return state;\n },\n dispatch: function dispatch(action, payload) {\n var prevState = _objectSpread({}, state);\n state = reducer(state, {\n type: action,\n props: props,\n payload: payload\n });\n onStoreStateChange({\n state: state,\n prevState: prevState\n });\n },\n pendingRequests: createCancelablePromiseList()\n };\n}","export function createCancelablePromiseList() {\n var list = [];\n return {\n add: function add(cancelablePromise) {\n list.push(cancelablePromise);\n return cancelablePromise.finally(function () {\n list = list.filter(function (item) {\n return item !== cancelablePromise;\n });\n });\n },\n cancelAll: function cancelAll() {\n list.forEach(function (promise) {\n return promise.cancel();\n });\n },\n isEmpty: function isEmpty() {\n return list.length === 0;\n }\n };\n}","export function flatten(values) {\n return values.reduce(function (a, b) {\n return a.concat(b);\n }, []);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function getAutocompleteSetters(_ref) {\n var store = _ref.store;\n var setActiveItemId = function setActiveItemId(value) {\n store.dispatch('setActiveItemId', value);\n };\n var setQuery = function setQuery(value) {\n store.dispatch('setQuery', value);\n };\n var setCollections = function setCollections(rawValue) {\n var baseItemId = 0;\n var value = rawValue.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n // We flatten the stored items to support calling `getAlgoliaResults`\n // from the source itself.\n items: flatten(collection.items).map(function (item) {\n return _objectSpread(_objectSpread({}, item), {}, {\n __autocomplete_id: baseItemId++\n });\n })\n });\n });\n store.dispatch('setCollections', value);\n };\n var setIsOpen = function setIsOpen(value) {\n store.dispatch('setIsOpen', value);\n };\n var setStatus = function setStatus(value) {\n store.dispatch('setStatus', value);\n };\n var setContext = function setContext(value) {\n store.dispatch('setContext', value);\n };\n return {\n setActiveItemId: setActiveItemId,\n setQuery: setQuery,\n setCollections: setCollections,\n setIsOpen: setIsOpen,\n setStatus: setStatus,\n setContext: setContext\n };\n}","export function getItemsCount(state) {\n if (state.collections.length === 0) {\n return 0;\n }\n return state.collections.reduce(function (sum, collection) {\n return sum + collection.items.length;\n }, 0);\n}","var autocompleteId = 0;\nexport function generateAutocompleteId() {\n return \"autocomplete-\".concat(autocompleteId++);\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport { invariant, decycle, noop } from '@algolia/autocomplete-shared';\nexport function getNormalizedSources(getSources, params) {\n var seenSourceIds = [];\n return Promise.resolve(getSources(params)).then(function (sources) {\n invariant(Array.isArray(sources), function () {\n return \"The `getSources` function must return an array of sources but returned type \".concat(JSON.stringify(_typeof(sources)), \":\\n\\n\").concat(JSON.stringify(decycle(sources), null, 2));\n });\n return Promise.all(sources\n // We allow `undefined` and `false` sources to allow users to use\n // `Boolean(query) && source` (=> `false`).\n // We need to remove these values at this point.\n .filter(function (maybeSource) {\n return Boolean(maybeSource);\n }).map(function (source) {\n invariant(typeof source.sourceId === 'string', 'A source must provide a `sourceId` string.');\n if (seenSourceIds.includes(source.sourceId)) {\n throw new Error(\"[Autocomplete] The `sourceId` \".concat(JSON.stringify(source.sourceId), \" is not unique.\"));\n }\n seenSourceIds.push(source.sourceId);\n var defaultSource = {\n getItemInputValue: function getItemInputValue(_ref) {\n var state = _ref.state;\n return state.query;\n },\n getItemUrl: function getItemUrl() {\n return undefined;\n },\n onSelect: function onSelect(_ref2) {\n var setIsOpen = _ref2.setIsOpen;\n setIsOpen(false);\n },\n onActive: noop,\n onResolve: noop\n };\n Object.keys(defaultSource).forEach(function (key) {\n defaultSource[key].__default = true;\n });\n var normalizedSource = _objectSpread(_objectSpread({}, defaultSource), source);\n return Promise.resolve(normalizedSource);\n }));\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, generateAutocompleteId, flatten } from '@algolia/autocomplete-shared';\nimport { getNormalizedSources } from './utils';\nexport function getDefaultProps(props, pluginSubscribers) {\n var _props$id;\n /* eslint-disable no-restricted-globals */\n var environment = typeof window !== 'undefined' ? window : {};\n /* eslint-enable no-restricted-globals */\n var plugins = props.plugins || [];\n return _objectSpread(_objectSpread({\n debug: false,\n openOnFocus: false,\n placeholder: '',\n autoFocus: false,\n defaultActiveItemId: null,\n stallThreshold: 300,\n insights: false,\n environment: environment,\n shouldPanelOpen: function shouldPanelOpen(_ref) {\n var state = _ref.state;\n return getItemsCount(state) > 0;\n },\n reshape: function reshape(_ref2) {\n var sources = _ref2.sources;\n return sources;\n }\n }, props), {}, {\n // Since `generateAutocompleteId` triggers a side effect (it increments\n // an internal counter), we don't want to execute it if unnecessary.\n id: (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generateAutocompleteId(),\n plugins: plugins,\n // The following props need to be deeply defaulted.\n initialState: _objectSpread({\n activeItemId: null,\n query: '',\n completion: null,\n collections: [],\n isOpen: false,\n status: 'idle',\n context: {}\n }, props.initialState),\n onStateChange: function onStateChange(params) {\n var _props$onStateChange;\n (_props$onStateChange = props.onStateChange) === null || _props$onStateChange === void 0 ? void 0 : _props$onStateChange.call(props, params);\n plugins.forEach(function (x) {\n var _x$onStateChange;\n return (_x$onStateChange = x.onStateChange) === null || _x$onStateChange === void 0 ? void 0 : _x$onStateChange.call(x, params);\n });\n },\n onSubmit: function onSubmit(params) {\n var _props$onSubmit;\n (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 ? void 0 : _props$onSubmit.call(props, params);\n plugins.forEach(function (x) {\n var _x$onSubmit;\n return (_x$onSubmit = x.onSubmit) === null || _x$onSubmit === void 0 ? void 0 : _x$onSubmit.call(x, params);\n });\n },\n onReset: function onReset(params) {\n var _props$onReset;\n (_props$onReset = props.onReset) === null || _props$onReset === void 0 ? void 0 : _props$onReset.call(props, params);\n plugins.forEach(function (x) {\n var _x$onReset;\n return (_x$onReset = x.onReset) === null || _x$onReset === void 0 ? void 0 : _x$onReset.call(x, params);\n });\n },\n getSources: function getSources(params) {\n return Promise.all([].concat(_toConsumableArray(plugins.map(function (plugin) {\n return plugin.getSources;\n })), [props.getSources]).filter(Boolean).map(function (getSources) {\n return getNormalizedSources(getSources, params);\n })).then(function (nested) {\n return flatten(nested);\n }).then(function (sources) {\n return sources.map(function (source) {\n return _objectSpread(_objectSpread({}, source), {}, {\n onSelect: function onSelect(params) {\n source.onSelect(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onSelect;\n return (_x$onSelect = x.onSelect) === null || _x$onSelect === void 0 ? void 0 : _x$onSelect.call(x, params);\n });\n },\n onActive: function onActive(params) {\n source.onActive(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onActive;\n return (_x$onActive = x.onActive) === null || _x$onActive === void 0 ? void 0 : _x$onActive.call(x, params);\n });\n },\n onResolve: function onResolve(params) {\n source.onResolve(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onResolve;\n return (_x$onResolve = x.onResolve) === null || _x$onResolve === void 0 ? void 0 : _x$onResolve.call(x, params);\n });\n }\n });\n });\n });\n },\n navigator: _objectSpread({\n navigate: function navigate(_ref3) {\n var itemUrl = _ref3.itemUrl;\n environment.location.assign(itemUrl);\n },\n navigateNewTab: function navigateNewTab(_ref4) {\n var itemUrl = _ref4.itemUrl;\n var windowReference = environment.open(itemUrl, '_blank', 'noopener');\n windowReference === null || windowReference === void 0 ? void 0 : windowReference.focus();\n },\n navigateNewWindow: function navigateNewWindow(_ref5) {\n var itemUrl = _ref5.itemUrl;\n environment.open(itemUrl, '_blank', 'noopener');\n }\n }, props.navigator)\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function reshape(_ref) {\n var collections = _ref.collections,\n props = _ref.props,\n state = _ref.state;\n // Sources are grouped by `sourceId` to conveniently pick them via destructuring.\n // Example: `const { recentSearchesPlugin } = sourcesBySourceId`\n var originalSourcesBySourceId = collections.reduce(function (acc, collection) {\n return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, collection.source.sourceId, _objectSpread(_objectSpread({}, collection.source), {}, {\n getItems: function getItems() {\n // We provide the resolved items from the collection to the `reshape` prop.\n return flatten(collection.items);\n }\n })));\n }, {});\n var _props$plugins$reduce = props.plugins.reduce(function (acc, plugin) {\n if (plugin.reshape) {\n return plugin.reshape(acc);\n }\n return acc;\n }, {\n sourcesBySourceId: originalSourcesBySourceId,\n state: state\n }),\n sourcesBySourceId = _props$plugins$reduce.sourcesBySourceId;\n var reshapeSources = props.reshape({\n sourcesBySourceId: sourcesBySourceId,\n sources: Object.values(sourcesBySourceId),\n state: state\n });\n\n // We reconstruct the collections with the items modified by the `reshape` prop.\n return flatten(reshapeSources).filter(Boolean).map(function (source) {\n return {\n source: source,\n items: source.getItems()\n };\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { decycle, flatten, invariant } from '@algolia/autocomplete-shared';\nimport { mapToAlgoliaResponse } from './utils';\nfunction isDescription(item) {\n return Boolean(item.execute);\n}\nfunction isRequesterDescription(description) {\n return Boolean(description === null || description === void 0 ? void 0 : description.execute);\n}\nexport function preResolve(itemsOrDescription, sourceId, state) {\n if (isRequesterDescription(itemsOrDescription)) {\n var contextParameters = itemsOrDescription.requesterId === 'algolia' ? Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.keys(state.context).map(function (key) {\n var _state$context$key;\n return (_state$context$key = state.context[key]) === null || _state$context$key === void 0 ? void 0 : _state$context$key.__algoliaSearchParameters;\n })))) : {};\n return _objectSpread(_objectSpread({}, itemsOrDescription), {}, {\n requests: itemsOrDescription.queries.map(function (query) {\n return {\n query: itemsOrDescription.requesterId === 'algolia' ? _objectSpread(_objectSpread({}, query), {}, {\n params: _objectSpread(_objectSpread({}, contextParameters), query.params)\n }) : query,\n sourceId: sourceId,\n transformResponse: itemsOrDescription.transformResponse\n };\n })\n });\n }\n return {\n items: itemsOrDescription,\n sourceId: sourceId\n };\n}\nexport function resolve(items) {\n var packed = items.reduce(function (acc, current) {\n if (!isDescription(current)) {\n acc.push(current);\n return acc;\n }\n var searchClient = current.searchClient,\n execute = current.execute,\n requesterId = current.requesterId,\n requests = current.requests;\n var container = acc.find(function (item) {\n return isDescription(current) && isDescription(item) && item.searchClient === searchClient && Boolean(requesterId) && item.requesterId === requesterId;\n });\n if (container) {\n var _container$items;\n (_container$items = container.items).push.apply(_container$items, _toConsumableArray(requests));\n } else {\n var request = {\n execute: execute,\n requesterId: requesterId,\n items: requests,\n searchClient: searchClient\n };\n acc.push(request);\n }\n return acc;\n }, []);\n var values = packed.map(function (maybeDescription) {\n if (!isDescription(maybeDescription)) {\n return Promise.resolve(maybeDescription);\n }\n var _ref = maybeDescription,\n execute = _ref.execute,\n items = _ref.items,\n searchClient = _ref.searchClient;\n return execute({\n searchClient: searchClient,\n requests: items\n });\n });\n return Promise.all(values).then(function (responses) {\n return flatten(responses);\n });\n}\nexport function postResolve(responses, sources, store) {\n return sources.map(function (source) {\n var matches = responses.filter(function (response) {\n return response.sourceId === source.sourceId;\n });\n var results = matches.map(function (_ref2) {\n var items = _ref2.items;\n return items;\n });\n var transform = matches[0].transformResponse;\n var items = transform ? transform(mapToAlgoliaResponse(results)) : results;\n source.onResolve({\n source: source,\n results: results,\n items: items,\n state: store.getState()\n });\n invariant(Array.isArray(items), function () {\n return \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned type \").concat(JSON.stringify(_typeof(items)), \":\\n\\n\").concat(JSON.stringify(decycle(items), null, 2), \".\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\");\n });\n invariant(items.every(Boolean), \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned \").concat(JSON.stringify(undefined), \".\\n\\nDid you forget to return items?\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\"));\n return {\n source: source,\n items: items\n };\n });\n}","export function mapToAlgoliaResponse(rawResults) {\n return {\n results: rawResults,\n hits: rawResults.map(function (result) {\n return result.hits;\n }).filter(Boolean),\n facetHits: rawResults.map(function (result) {\n var _facetHits;\n return (_facetHits = result.facetHits) === null || _facetHits === void 0 ? void 0 : _facetHits.map(function (facetHit) {\n // Bring support for the highlighting components.\n return {\n label: facetHit.value,\n count: facetHit.count,\n _highlightResult: {\n label: {\n value: facetHit.highlighted\n }\n }\n };\n });\n }).filter(Boolean)\n };\n}","function createInternalCancelablePromise(promise, initialState) {\n var state = initialState;\n return {\n then: function then(onfulfilled, onrejected) {\n return createInternalCancelablePromise(promise.then(createCallback(onfulfilled, state, promise), createCallback(onrejected, state, promise)), state);\n },\n catch: function _catch(onrejected) {\n return createInternalCancelablePromise(promise.catch(createCallback(onrejected, state, promise)), state);\n },\n finally: function _finally(onfinally) {\n if (onfinally) {\n state.onCancelList.push(onfinally);\n }\n return createInternalCancelablePromise(promise.finally(createCallback(onfinally && function () {\n state.onCancelList = [];\n return onfinally();\n }, state, promise)), state);\n },\n cancel: function cancel() {\n state.isCanceled = true;\n var callbacks = state.onCancelList;\n state.onCancelList = [];\n callbacks.forEach(function (callback) {\n callback();\n });\n },\n isCanceled: function isCanceled() {\n return state.isCanceled === true;\n }\n };\n}\nexport function createCancelablePromise(executor) {\n return createInternalCancelablePromise(new Promise(function (resolve, reject) {\n return executor(resolve, reject);\n }), {\n isCanceled: false,\n onCancelList: []\n });\n}\ncreateCancelablePromise.resolve = function (value) {\n return cancelable(Promise.resolve(value));\n};\ncreateCancelablePromise.reject = function (reason) {\n return cancelable(Promise.reject(reason));\n};\nexport function cancelable(promise) {\n return createInternalCancelablePromise(promise, {\n isCanceled: false,\n onCancelList: []\n });\n}\nfunction createCallback(onResult, state, fallback) {\n if (!onResult) {\n return fallback;\n }\n return function callback(arg) {\n if (state.isCanceled) {\n return arg;\n }\n return onResult(arg);\n };\n}","// We don't have access to the autocomplete source when we call `onKeyDown`\n// or `onClick` because those are native browser events.\n// However, we can get the source from the suggestion index.\nfunction getCollectionFromActiveItemId(state) {\n // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3]\n // We want to get the accumulated counts:\n // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6]\n var accumulatedCollectionsCount = state.collections.map(function (collections) {\n return collections.items.length;\n }).reduce(function (acc, collectionsCount, index) {\n var previousValue = acc[index - 1] || 0;\n var nextValue = previousValue + collectionsCount;\n acc.push(nextValue);\n return acc;\n }, []);\n\n // Based on the accumulated counts, we can infer the index of the suggestion.\n var collectionIndex = accumulatedCollectionsCount.reduce(function (acc, current) {\n if (current <= state.activeItemId) {\n return acc + 1;\n }\n return acc;\n }, 0);\n return state.collections[collectionIndex];\n}\n\n/**\n * Gets the highlighted index relative to a suggestion object (not the absolute\n * highlighted index).\n *\n * Example:\n * [['a', 'b'], ['c', 'd', 'e'], ['f']]\n * ↑\n * (absolute: 3, relative: 1)\n */\nfunction getRelativeActiveItemId(_ref) {\n var state = _ref.state,\n collection = _ref.collection;\n var isOffsetFound = false;\n var counter = 0;\n var previousItemsOffset = 0;\n while (isOffsetFound === false) {\n var currentCollection = state.collections[counter];\n if (currentCollection === collection) {\n isOffsetFound = true;\n break;\n }\n previousItemsOffset += currentCollection.items.length;\n counter++;\n }\n return state.activeItemId - previousItemsOffset;\n}\nexport function getActiveItem(state) {\n var collection = getCollectionFromActiveItemId(state);\n if (!collection) {\n return null;\n }\n var item = collection.items[getRelativeActiveItemId({\n state: state,\n collection: collection\n })];\n var source = collection.source;\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: state\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: state\n });\n return {\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n source: source\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"nextState\", \"props\", \"query\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { reshape } from './reshape';\nimport { preResolve, resolve, postResolve } from './resolve';\nimport { cancelable, createConcurrentSafePromise, getActiveItem } from './utils';\nvar lastStalledId = null;\nvar runConcurrentSafePromise = createConcurrentSafePromise();\nexport function onInput(_ref) {\n var event = _ref.event,\n _ref$nextState = _ref.nextState,\n nextState = _ref$nextState === void 0 ? {} : _ref$nextState,\n props = _ref.props,\n query = _ref.query,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n var setCollections = setters.setCollections,\n setIsOpen = setters.setIsOpen,\n setQuery = setters.setQuery,\n setActiveItemId = setters.setActiveItemId,\n setStatus = setters.setStatus;\n setQuery(query);\n setActiveItemId(props.defaultActiveItemId);\n if (!query && props.openOnFocus === false) {\n var _nextState$isOpen;\n var collections = store.getState().collections.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n items: []\n });\n });\n setStatus('idle');\n setCollections(collections);\n setIsOpen((_nextState$isOpen = nextState.isOpen) !== null && _nextState$isOpen !== void 0 ? _nextState$isOpen : props.shouldPanelOpen({\n state: store.getState()\n }));\n\n // We make sure to update the latest resolved value of the tracked\n // promises to keep late resolving promises from \"cancelling\" the state\n // updates performed in this code path.\n // We chain with a void promise to respect `onInput`'s expected return type.\n var _request = cancelable(runConcurrentSafePromise(collections).then(function () {\n return Promise.resolve();\n }));\n return store.pendingRequests.add(_request);\n }\n setStatus('loading');\n lastStalledId = props.environment.setTimeout(function () {\n setStatus('stalled');\n }, props.stallThreshold);\n\n // We track the entire promise chain triggered by `onInput` before mutating\n // the Autocomplete state to make sure that any state manipulation is based on\n // fresh data regardless of when promises individually resolve.\n // We don't track nested promises and only rely on the full chain resolution,\n // meaning we should only ever manipulate the state once this concurrent-safe\n // promise is resolved.\n var request = cancelable(runConcurrentSafePromise(props.getSources(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters)).then(function (sources) {\n return Promise.all(sources.map(function (source) {\n return Promise.resolve(source.getItems(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters))).then(function (itemsOrDescription) {\n return preResolve(itemsOrDescription, source.sourceId, store.getState());\n });\n })).then(resolve).then(function (responses) {\n return postResolve(responses, sources, store);\n }).then(function (collections) {\n return reshape({\n collections: collections,\n props: props,\n state: store.getState()\n });\n });\n }))).then(function (collections) {\n var _nextState$isOpen2;\n // Parameters passed to `onInput` could be stale when the following code\n // executes, because `onInput` calls may not resolve in order.\n // If it becomes a problem we'll need to save the last passed parameters.\n // See: https://codesandbox.io/s/agitated-cookies-y290z\n\n setStatus('idle');\n setCollections(collections);\n var isPanelOpen = props.shouldPanelOpen({\n state: store.getState()\n });\n setIsOpen((_nextState$isOpen2 = nextState.isOpen) !== null && _nextState$isOpen2 !== void 0 ? _nextState$isOpen2 : props.openOnFocus && !query && isPanelOpen || isPanelOpen);\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }).finally(function () {\n setStatus('idle');\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n });\n return store.pendingRequests.add(request);\n}","/**\n * Creates a runner that executes promises in a concurrent-safe way.\n *\n * This is useful to prevent older promises to resolve after a newer promise,\n * otherwise resulting in stale resolved values.\n */\nexport function createConcurrentSafePromise() {\n var basePromiseId = -1;\n var latestResolvedId = -1;\n var latestResolvedValue = undefined;\n return function runConcurrentSafePromise(promise) {\n basePromiseId++;\n var currentPromiseId = basePromiseId;\n return Promise.resolve(promise).then(function (x) {\n // The promise might take too long to resolve and get outdated. This would\n // result in resolving stale values.\n // When this happens, we ignore the promise value and return the one\n // coming from the latest resolved value.\n //\n // +----------------------------------+\n // | 100ms |\n // | run(1) +---> R1 |\n // | 300ms |\n // | run(2) +-------------> R2 (SKIP) |\n // | 200ms |\n // | run(3) +--------> R3 |\n // +----------------------------------+\n if (latestResolvedValue && currentPromiseId < latestResolvedId) {\n return latestResolvedValue;\n }\n latestResolvedId = currentPromiseId;\n latestResolvedValue = x;\n return x;\n });\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"props\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { onInput } from './onInput';\nimport { getActiveItem } from './utils';\nexport function onKeyDown(_ref) {\n var event = _ref.event,\n props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n // eslint-disable-next-line no-inner-declarations\n var triggerScrollIntoView = function triggerScrollIntoView() {\n var nodeItem = props.environment.document.getElementById(\"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId));\n if (nodeItem) {\n if (nodeItem.scrollIntoViewIfNeeded) {\n nodeItem.scrollIntoViewIfNeeded(false);\n } else {\n nodeItem.scrollIntoView(false);\n }\n }\n }; // eslint-disable-next-line no-inner-declarations\n var triggerOnActive = function triggerOnActive() {\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }; // Default browser behavior changes the caret placement on ArrowUp and\n // ArrowDown.\n event.preventDefault();\n\n // When re-opening the panel, we need to split the logic to keep the actions\n // synchronized as `onInput` returns a promise.\n if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n store.dispatch(event.key, {\n nextActiveItemId: props.defaultActiveItemId\n });\n triggerOnActive();\n // Since we rely on the DOM, we need to wait for all the micro tasks to\n // finish (which include re-opening the panel) to make sure all the\n // elements are available.\n setTimeout(triggerScrollIntoView, 0);\n });\n } else {\n store.dispatch(event.key, {});\n triggerOnActive();\n triggerScrollIntoView();\n }\n } else if (event.key === 'Escape') {\n // This prevents the default browser behavior on `input[type=\"search\"]`\n // from removing the query right away because we first want to close the\n // panel.\n event.preventDefault();\n store.dispatch(event.key, null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Tab') {\n store.dispatch('blur', null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Enter') {\n // No active item, so we let the browser handle the native `onSubmit` form\n // event.\n if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) {\n return collection.items.length === 0;\n })) {\n // If requests are still pending when the panel closes, they could reopen\n // the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n return;\n }\n\n // This prevents the `onSubmit` event to be sent because an item is\n // highlighted.\n event.preventDefault();\n var _ref2 = getActiveItem(store.getState()),\n item = _ref2.item,\n itemInputValue = _ref2.itemInputValue,\n itemUrl = _ref2.itemUrl,\n source = _ref2.source;\n if (event.metaKey || event.ctrlKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewTab({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.shiftKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewWindow({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.altKey) {\n // Keep native browser behavior\n } else {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigate({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n return;\n }\n onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }\n}","var regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;\nexport function isSamsung(userAgent) {\n return Boolean(userAgent && userAgent.match(regex));\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"props\", \"refresh\", \"store\"],\n _excluded2 = [\"inputElement\", \"formElement\", \"panelElement\"],\n _excluded3 = [\"inputElement\"],\n _excluded4 = [\"inputElement\", \"maxLength\"],\n _excluded5 = [\"sourceIndex\"],\n _excluded6 = [\"sourceIndex\"],\n _excluded7 = [\"item\", \"source\", \"sourceIndex\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { noop } from '@algolia/autocomplete-shared';\nimport { onInput } from './onInput';\nimport { onKeyDown as _onKeyDown } from './onKeyDown';\nimport { getActiveItem, isOrContainsNode, isSamsung } from './utils';\nexport function getPropGetters(_ref) {\n var props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n var getEnvironmentProps = function getEnvironmentProps(providedProps) {\n var inputElement = providedProps.inputElement,\n formElement = providedProps.formElement,\n panelElement = providedProps.panelElement,\n rest = _objectWithoutProperties(providedProps, _excluded2);\n function onMouseDownOrTouchStart(event) {\n // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur`\n // handler when it's not an interaction with Autocomplete.\n // We detect it with the following heuristics:\n // - the panel is closed AND there are no pending requests\n // (no interaction with the autocomplete, no future state updates)\n // - OR the touched target is the input element (should open the panel)\n var isAutocompleteInteraction = store.getState().isOpen || !store.pendingRequests.isEmpty();\n if (!isAutocompleteInteraction || event.target === inputElement) {\n return;\n }\n\n // @TODO: support cases where there are multiple Autocomplete instances.\n // Right now, a second instance makes this computation return false.\n var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) {\n return isOrContainsNode(contextNode, event.target);\n });\n if (isTargetWithinAutocomplete === false) {\n store.dispatch('blur', null);\n\n // If requests are still pending when the user closes the panel, they\n // could reopen the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n }\n }\n return _objectSpread({\n // We do not rely on the native `blur` event of the input to close the\n // panel, but rather on a custom `touchstart`/`mousedown` event outside\n // of the autocomplete elements.\n // This ensures we don't mistakenly interpret interactions within the\n // autocomplete (but outside of the input) as a signal to close the panel.\n // For example, clicking reset button causes an input blur, but if\n // `openOnFocus=true`, it shouldn't close the panel.\n // On touch devices, scrolling results (`touchmove`) causes an input blur\n // but shouldn't close the panel.\n onTouchStart: onMouseDownOrTouchStart,\n onMouseDown: onMouseDownOrTouchStart,\n // When scrolling on touch devices (mobiles, tablets, etc.), we want to\n // mimic the native platform behavior where the input is blurred to\n // hide the virtual keyboard. This gives more vertical space to\n // discover all the suggestions showing up in the panel.\n onTouchMove: function onTouchMove(event) {\n if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) {\n return;\n }\n inputElement.blur();\n }\n }, rest);\n };\n var getRootProps = function getRootProps(rest) {\n return _objectSpread({\n role: 'combobox',\n 'aria-expanded': store.getState().isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\")\n }, rest);\n };\n var getFormProps = function getFormProps(providedProps) {\n var inputElement = providedProps.inputElement,\n rest = _objectWithoutProperties(providedProps, _excluded3);\n return _objectSpread({\n action: '',\n noValidate: true,\n role: 'search',\n onSubmit: function onSubmit(event) {\n var _providedProps$inputE;\n event.preventDefault();\n props.onSubmit(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('submit', null);\n (_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur();\n },\n onReset: function onReset(event) {\n var _providedProps$inputE2;\n event.preventDefault();\n props.onReset(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('reset', null);\n (_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus();\n }\n }, rest);\n };\n var getInputProps = function getInputProps(providedProps) {\n var _props$environment$na;\n function onFocus(event) {\n // We want to trigger a query when `openOnFocus` is true\n // because the panel should open with the current query.\n if (props.openOnFocus || Boolean(store.getState().query)) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().completion || store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n store.dispatch('focus', null);\n }\n var _ref2 = providedProps || {},\n inputElement = _ref2.inputElement,\n _ref2$maxLength = _ref2.maxLength,\n maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength,\n rest = _objectWithoutProperties(_ref2, _excluded4);\n var activeItem = getActiveItem(store.getState());\n var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';\n var shouldFallbackKeyHint = isSamsung(userAgent);\n var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';\n return _objectSpread({\n 'aria-autocomplete': 'both',\n 'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? \"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId) : undefined,\n 'aria-controls': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\"),\n value: store.getState().completion || store.getState().query,\n id: \"\".concat(props.id, \"-input\"),\n autoComplete: 'off',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n enterKeyHint: enterKeyHint,\n spellCheck: 'false',\n autoFocus: props.autoFocus,\n placeholder: props.placeholder,\n maxLength: maxLength,\n type: 'search',\n onChange: function onChange(event) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: event.currentTarget.value.slice(0, maxLength),\n refresh: refresh,\n store: store\n }, setters));\n },\n onKeyDown: function onKeyDown(event) {\n _onKeyDown(_objectSpread({\n event: event,\n props: props,\n refresh: refresh,\n store: store\n }, setters));\n },\n onFocus: onFocus,\n // We don't rely on the `blur` event.\n // See explanation in `onTouchStart`/`onMouseDown`.\n // @MAJOR See if we need to keep this handler.\n onBlur: noop,\n onClick: function onClick(event) {\n // When the panel is closed and you click on the input while\n // the input is focused, the `onFocus` event is not triggered\n // (default browser behavior).\n // In an autocomplete context, it makes sense to open the panel in this\n // case.\n // We mimic this event by catching the `onClick` event which\n // triggers the `onFocus` for the panel to open.\n if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) {\n onFocus(event);\n }\n }\n }, rest);\n };\n var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) {\n return typeof sourceId !== 'undefined' ? \"\".concat(instanceId, \"-\").concat(sourceId) : instanceId;\n };\n var getLabelProps = function getLabelProps(providedProps) {\n var _ref3 = providedProps || {},\n sourceIndex = _ref3.sourceIndex,\n rest = _objectWithoutProperties(_ref3, _excluded5);\n return _objectSpread({\n htmlFor: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-input\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\")\n }, rest);\n };\n var getListProps = function getListProps(providedProps) {\n var _ref4 = providedProps || {},\n sourceIndex = _ref4.sourceIndex,\n rest = _objectWithoutProperties(_ref4, _excluded6);\n return _objectSpread({\n role: 'listbox',\n 'aria-labelledby': \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-list\")\n }, rest);\n };\n var getPanelProps = function getPanelProps(rest) {\n return _objectSpread({\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the panel so\n // that the blur event is not triggered, otherwise it closes the\n // panel.\n event.preventDefault();\n },\n onMouseLeave: function onMouseLeave() {\n store.dispatch('mouseleave', null);\n }\n }, rest);\n };\n var getItemProps = function getItemProps(providedProps) {\n var item = providedProps.item,\n source = providedProps.source,\n sourceIndex = providedProps.sourceIndex,\n rest = _objectWithoutProperties(providedProps, _excluded7);\n return _objectSpread({\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-item-\").concat(item.__autocomplete_id),\n role: 'option',\n 'aria-selected': store.getState().activeItemId === item.__autocomplete_id,\n onMouseMove: function onMouseMove(event) {\n if (item.__autocomplete_id === store.getState().activeItemId) {\n return;\n }\n store.dispatch('mousemove', item.__autocomplete_id);\n var activeItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && activeItem) {\n var _item = activeItem.item,\n itemInputValue = activeItem.itemInputValue,\n itemUrl = activeItem.itemUrl,\n _source = activeItem.source;\n _source.onActive(_objectSpread({\n event: event,\n item: _item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: _source,\n state: store.getState()\n }, setters));\n }\n },\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the item so it\n // can remain with the current `activeElement`.\n event.preventDefault();\n },\n onClick: function onClick(event) {\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: store.getState()\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: store.getState()\n });\n\n // If `getItemUrl` is provided, it means that the suggestion\n // is a link, not plain text that aims at updating the query.\n // We can therefore skip the state change because it will update\n // the `activeItemId`, resulting in a UI flash, especially\n // noticeable on mobile.\n var runPreCommand = itemUrl ? Promise.resolve() : onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters));\n runPreCommand.then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }, rest);\n };\n return {\n getEnvironmentProps: getEnvironmentProps,\n getRootProps: getRootProps,\n getFormProps: getFormProps,\n getLabelProps: getLabelProps,\n getInputProps: getInputProps,\n getPanelProps: getPanelProps,\n getListProps: getListProps,\n getItemProps: getItemProps\n };\n}","export function isOrContainsNode(parent, child) {\n return parent === child || parent.contains(child);\n}","export var version = '1.9.3';","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\n}];","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { userAgents } from '@algolia/autocomplete-shared';\nexport function getMetadata(_ref) {\n var _, _options$__autocomple, _options$__autocomple2, _options$__autocomple3;\n var plugins = _ref.plugins,\n options = _ref.options;\n var optionsKey = (_ = (((_options$__autocomple = options.__autocomplete_metadata) === null || _options$__autocomple === void 0 ? void 0 : _options$__autocomple.userAgents) || [])[0]) === null || _ === void 0 ? void 0 : _.segment;\n var extraOptions = optionsKey ? _defineProperty({}, optionsKey, Object.keys(((_options$__autocomple2 = options.__autocomplete_metadata) === null || _options$__autocomple2 === void 0 ? void 0 : _options$__autocomple2.options) || {})) : {};\n return {\n plugins: plugins.map(function (plugin) {\n return {\n name: plugin.name,\n options: Object.keys(plugin.__autocomplete_pluginOptions || [])\n };\n }),\n options: _objectSpread({\n 'autocomplete-core': Object.keys(options)\n }, extraOptions),\n ua: userAgents.concat(((_options$__autocomple3 = options.__autocomplete_metadata) === null || _options$__autocomple3 === void 0 ? void 0 : _options$__autocomple3.userAgents) || [])\n };\n}\nexport function injectMetadata(_ref3) {\n var _environment$navigato, _environment$navigato2;\n var metadata = _ref3.metadata,\n environment = _ref3.environment;\n var isMetadataEnabled = (_environment$navigato = environment.navigator) === null || _environment$navigato === void 0 ? void 0 : (_environment$navigato2 = _environment$navigato.userAgent) === null || _environment$navigato2 === void 0 ? void 0 : _environment$navigato2.includes('Algolia Crawler');\n if (isMetadataEnabled) {\n var metadataContainer = environment.document.createElement('meta');\n var headRef = environment.document.querySelector('head');\n metadataContainer.name = 'algolia:metadata';\n setTimeout(function () {\n metadataContainer.content = JSON.stringify(metadata);\n headRef.appendChild(metadataContainer);\n }, 0);\n }\n}","import { getActiveItem } from './utils';\nexport function getCompletion(_ref) {\n var _getActiveItem;\n var state = _ref.state;\n if (state.isOpen === false || state.activeItemId === null) {\n return null;\n }\n return ((_getActiveItem = getActiveItem(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null;\n}","/**\n * Returns the next active item ID from the current state.\n *\n * We allow circular keyboard navigation from the base index.\n * The base index can either be `null` (nothing is highlighted) or `0`\n * (the first item is highlighted).\n * The base index is allowed to get assigned `null` only if\n * `props.defaultActiveItemId` is `null`. This pattern allows to \"stop\"\n * by the actual query before navigating to other suggestions as seen on\n * Google or Amazon.\n *\n * @param moveAmount The offset to increment (or decrement) the last index\n * @param baseIndex The current index to compute the next index from\n * @param itemCount The number of items\n * @param defaultActiveItemId The default active index to fallback to\n */\nexport function getNextActiveItemId(moveAmount, baseIndex, itemCount, defaultActiveItemId) {\n if (!itemCount) {\n return null;\n }\n if (moveAmount < 0 && (baseIndex === null || defaultActiveItemId !== null && baseIndex === 0)) {\n return itemCount + moveAmount;\n }\n var numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount;\n if (numericIndex <= -1 || numericIndex >= itemCount) {\n return defaultActiveItemId === null ? null : 0;\n }\n return numericIndex;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, invariant } from '@algolia/autocomplete-shared';\nimport { getCompletion } from './getCompletion';\nimport { getNextActiveItemId } from './utils';\nexport var stateReducer = function stateReducer(state, action) {\n switch (action.type) {\n case 'setActiveItemId':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'setQuery':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n query: action.payload,\n completion: null\n });\n }\n case 'setCollections':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n collections: action.payload\n });\n }\n case 'setIsOpen':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: action.payload\n });\n }\n case 'setStatus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n status: action.payload\n });\n }\n case 'setContext':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n context: _objectSpread(_objectSpread({}, state.context), action.payload)\n });\n }\n case 'ArrowDown':\n {\n var nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : getNextActiveItemId(1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, nextState), {}, {\n completion: getCompletion({\n state: nextState\n })\n });\n }\n case 'ArrowUp':\n {\n var _nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: getNextActiveItemId(-1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, _nextState), {}, {\n completion: getCompletion({\n state: _nextState\n })\n });\n }\n case 'Escape':\n {\n if (state.isOpen) {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n completion: null\n });\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n query: '',\n status: 'idle',\n collections: []\n });\n }\n case 'submit':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n status: 'idle'\n });\n }\n case 'reset':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId:\n // Since we open the panel on reset when openOnFocus=true\n // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)\n\n // Since we close the panel when openOnFocus=false\n // we lose track of the highlighted index. (Query-suggestions use-case)\n action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,\n status: 'idle',\n query: ''\n });\n }\n case 'focus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId,\n isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({\n state: state\n })\n });\n }\n case 'blur':\n {\n if (action.props.debug) {\n return state;\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: false,\n activeItemId: null\n });\n }\n case 'mousemove':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'mouseleave':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId\n });\n }\n default:\n invariant(false, \"The reducer action \".concat(JSON.stringify(action.type), \" is not supported.\"));\n return state;\n }\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights';\nimport { checkOptions } from './checkOptions';\nimport { createStore } from './createStore';\nimport { getAutocompleteSetters } from './getAutocompleteSetters';\nimport { getDefaultProps } from './getDefaultProps';\nimport { getPropGetters } from './getPropGetters';\nimport { getMetadata, injectMetadata } from './metadata';\nimport { onInput } from './onInput';\nimport { stateReducer } from './stateReducer';\nexport function createAutocomplete(options) {\n checkOptions(options);\n var subscribers = [];\n var props = getDefaultProps(options, subscribers);\n var store = createStore(stateReducer, props, onStoreStateChange);\n var setters = getAutocompleteSetters({\n store: store\n });\n var propGetters = getPropGetters(_objectSpread({\n props: props,\n refresh: refresh,\n store: store,\n navigator: props.navigator\n }, setters));\n function onStoreStateChange(_ref) {\n var prevState = _ref.prevState,\n state = _ref.state;\n props.onStateChange(_objectSpread({\n prevState: prevState,\n state: state,\n refresh: refresh,\n navigator: props.navigator\n }, setters));\n }\n function refresh() {\n return onInput(_objectSpread({\n event: new Event('input'),\n nextState: {\n isOpen: store.getState().isOpen\n },\n props: props,\n navigator: props.navigator,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n if (options.insights && !props.plugins.some(function (plugin) {\n return plugin.name === 'aa.algoliaInsightsPlugin';\n })) {\n var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights;\n props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));\n }\n props.plugins.forEach(function (plugin) {\n var _plugin$subscribe;\n return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {\n navigator: props.navigator,\n refresh: refresh,\n onSelect: function onSelect(fn) {\n subscribers.push({\n onSelect: fn\n });\n },\n onActive: function onActive(fn) {\n subscribers.push({\n onActive: fn\n });\n },\n onResolve: function onResolve(fn) {\n subscribers.push({\n onResolve: fn\n });\n }\n }));\n });\n injectMetadata({\n metadata: getMetadata({\n plugins: props.plugins,\n options: options\n }),\n environment: props.environment\n });\n return _objectSpread(_objectSpread({\n refresh: refresh,\n navigator: props.navigator\n }, propGetters), setters);\n}","export var MAX_QUERY_SIZE = 64;","import React from 'react';\nexport function AlgoliaLogo(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$searchB = translations.searchByText,\n searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB;\n return /*#__PURE__*/React.createElement(\"a\", {\n href: \"https://www.algolia.com/ref/docsearch/?utm_source=\".concat(window.location.hostname, \"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch\"),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, searchByText), /*#__PURE__*/React.createElement(\"svg\", {\n width: \"77\",\n height: \"19\",\n \"aria-label\": \"Algolia\",\n role: \"img\",\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 2196.2 500\"\n }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}\")), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z\"\n }), /*#__PURE__*/React.createElement(\"rect\", {\n className: \"cls-1\",\n x: \"1845.88\",\n y: \"104.73\",\n width: \"62.58\",\n height: \"277.9\",\n rx: \"5.9\",\n ry: \"5.9\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-1\",\n d: \"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z\"\n })));\n}","import React from 'react';\nimport { AlgoliaLogo } from './AlgoliaLogo';\n\nfunction CommandIcon(props) {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"15\",\n height: \"15\",\n \"aria-label\": props.ariaLabel,\n role: \"img\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: \"1.2\"\n }, props.children));\n}\n\nexport function Footer(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$selectT = translations.selectText,\n selectText = _translations$selectT === void 0 ? 'to select' : _translations$selectT,\n _translations$selectK = translations.selectKeyAriaLabel,\n selectKeyAriaLabel = _translations$selectK === void 0 ? 'Enter key' : _translations$selectK,\n _translations$navigat = translations.navigateText,\n navigateText = _translations$navigat === void 0 ? 'to navigate' : _translations$navigat,\n _translations$navigat2 = translations.navigateUpKeyAriaLabel,\n navigateUpKeyAriaLabel = _translations$navigat2 === void 0 ? 'Arrow up' : _translations$navigat2,\n _translations$navigat3 = translations.navigateDownKeyAriaLabel,\n navigateDownKeyAriaLabel = _translations$navigat3 === void 0 ? 'Arrow down' : _translations$navigat3,\n _translations$closeTe = translations.closeText,\n closeText = _translations$closeTe === void 0 ? 'to close' : _translations$closeTe,\n _translations$closeKe = translations.closeKeyAriaLabel,\n closeKeyAriaLabel = _translations$closeKe === void 0 ? 'Escape key' : _translations$closeKe,\n _translations$searchB = translations.searchByText,\n searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Logo\"\n }, /*#__PURE__*/React.createElement(AlgoliaLogo, {\n translations: {\n searchByText: searchByText\n }\n })), /*#__PURE__*/React.createElement(\"ul\", {\n className: \"DocSearch-Commands\"\n }, /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: selectKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, selectText)), /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: navigateDownKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5 3.5v8M10.5 8.5l-3 3-3-3\"\n }))), /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: navigateUpKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5 11.5v-8M10.5 6.5l-3-3-3 3\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, navigateText)), /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: closeKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, closeText))));\n}","import React from 'react';\nexport function Hit(_ref) {\n var hit = _ref.hit,\n children = _ref.children;\n return /*#__PURE__*/React.createElement(\"a\", {\n href: hit.url\n }, children);\n}","import React from 'react';\nexport function ErrorIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n fillRule: \"evenodd\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0\"\n }));\n}","import React from 'react';\nimport { ErrorIcon } from './icons';\nexport function ErrorScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$titleTe = translations.titleText,\n titleText = _translations$titleTe === void 0 ? 'Unable to fetch results' : _translations$titleTe,\n _translations$helpTex = translations.helpText,\n helpText = _translations$helpTex === void 0 ? 'You might want to check your network connection.' : _translations$helpTex;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-ErrorScreen\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Screen-Icon\"\n }, /*#__PURE__*/React.createElement(ErrorIcon, null)), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Title\"\n }, titleText), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, helpText));\n}","import React from 'react';\nexport function NoResultsIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n fillRule: \"evenodd\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2\"\n }));\n}","var _excluded = [\"translations\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { NoResultsIcon } from './icons';\nexport function NoResultsScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$noResul = translations.noResultsText,\n noResultsText = _translations$noResul === void 0 ? 'No results for' : _translations$noResul,\n _translations$suggest = translations.suggestedQueryText,\n suggestedQueryText = _translations$suggest === void 0 ? 'Try searching for' : _translations$suggest,\n _translations$reportM = translations.reportMissingResultsText,\n reportMissingResultsText = _translations$reportM === void 0 ? 'Believe this query should return results?' : _translations$reportM,\n _translations$reportM2 = translations.reportMissingResultsLinkText,\n reportMissingResultsLinkText = _translations$reportM2 === void 0 ? 'Let us know.' : _translations$reportM2;\n var searchSuggestions = props.state.context.searchSuggestions;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-NoResults\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Screen-Icon\"\n }, /*#__PURE__*/React.createElement(NoResultsIcon, null)), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Title\"\n }, noResultsText, \" \\\"\", /*#__PURE__*/React.createElement(\"strong\", null, props.state.query), \"\\\"\"), searchSuggestions && searchSuggestions.length > 0 && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-NoResults-Prefill-List\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, suggestedQueryText, \":\"), /*#__PURE__*/React.createElement(\"ul\", null, searchSuggestions.slice(0, 3).reduce(function (acc, search) {\n return [].concat(_toConsumableArray(acc), [/*#__PURE__*/React.createElement(\"li\", {\n key: search\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Prefill\",\n key: search,\n type: \"button\",\n onClick: function onClick() {\n props.setQuery(search.toLowerCase() + ' ');\n props.refresh();\n props.inputRef.current.focus();\n }\n }, search))]);\n }, []))), props.getMissingResultsUrl && /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, \"\".concat(reportMissingResultsText, \" \"), /*#__PURE__*/React.createElement(\"a\", {\n href: props.getMissingResultsUrl({\n query: props.state.query\n }),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, reportMissingResultsLinkText)));\n}","import React from 'react';\n\nvar LvlIcon = function LvlIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n};\n\nexport function SourceIcon(props) {\n switch (props.type) {\n case 'lvl1':\n return /*#__PURE__*/React.createElement(LvlIcon, null);\n\n case 'content':\n return /*#__PURE__*/React.createElement(ContentIcon, null);\n\n default:\n return /*#__PURE__*/React.createElement(AnchorIcon, null);\n }\n}\n\nfunction AnchorIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}\n\nfunction ContentIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 5H3h14zm0 5H3h14zm0 5H3h14z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function SelectIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n className: \"DocSearch-Hit-Select-Icon\",\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18 3v4c0 2-2 4-4 4H2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 17l-6-6 6-6\"\n })));\n}","var _excluded = [\"hit\", \"attribute\", \"tagName\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { createElement } from 'react';\n\nfunction getPropertyByPath(object, path) {\n var parts = path.split('.');\n return parts.reduce(function (prev, current) {\n if (prev !== null && prev !== void 0 && prev[current]) return prev[current];\n return null;\n }, object);\n}\n\nexport function Snippet(_ref) {\n var hit = _ref.hit,\n attribute = _ref.attribute,\n _ref$tagName = _ref.tagName,\n tagName = _ref$tagName === void 0 ? 'span' : _ref$tagName,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n return createElement(tagName, _objectSpread(_objectSpread({}, rest), {}, {\n dangerouslySetInnerHTML: {\n __html: getPropertyByPath(hit, \"_snippetResult.\".concat(attribute, \".value\")) || getPropertyByPath(hit, attribute)\n }\n }));\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport React from 'react';\nimport { Snippet } from './Snippet';\nexport function Results(props) {\n if (!props.collection || props.collection.items.length === 0) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"section\", {\n className: \"DocSearch-Hits\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-source\"\n }, props.title), /*#__PURE__*/React.createElement(\"ul\", props.getListProps(), props.collection.items.map(function (item, index) {\n return /*#__PURE__*/React.createElement(Result, _extends({\n key: [props.title, item.objectID].join(':'),\n item: item,\n index: index\n }, props));\n })));\n}\n\nfunction Result(_ref) {\n var item = _ref.item,\n index = _ref.index,\n renderIcon = _ref.renderIcon,\n renderAction = _ref.renderAction,\n getItemProps = _ref.getItemProps,\n onItemClick = _ref.onItemClick,\n collection = _ref.collection,\n hitComponent = _ref.hitComponent;\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isDeleting = _React$useState2[0],\n setIsDeleting = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n isFavoriting = _React$useState4[0],\n setIsFavoriting = _React$useState4[1];\n\n var action = React.useRef(null);\n var Hit = hitComponent;\n\n function runDeleteTransition(cb) {\n setIsDeleting(true);\n action.current = cb;\n }\n\n function runFavoriteTransition(cb) {\n setIsFavoriting(true);\n action.current = cb;\n }\n\n return /*#__PURE__*/React.createElement(\"li\", _extends({\n className: ['DocSearch-Hit', item.__docsearch_parent && 'DocSearch-Hit--Child', isDeleting && 'DocSearch-Hit--deleting', isFavoriting && 'DocSearch-Hit--favoriting'].filter(Boolean).join(' '),\n onTransitionEnd: function onTransitionEnd() {\n if (action.current) {\n action.current();\n }\n }\n }, getItemProps({\n item: item,\n source: collection.source,\n onClick: function onClick(event) {\n onItemClick(item, event);\n }\n })), /*#__PURE__*/React.createElement(Hit, {\n hit: item\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-Container\"\n }, renderIcon({\n item: item,\n index: index\n }), item.hierarchy[item.type] && item.type === 'lvl1' && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n }), item.content && /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"content\"\n })), item.hierarchy[item.type] && (item.type === 'lvl2' || item.type === 'lvl3' || item.type === 'lvl4' || item.type === 'lvl5' || item.type === 'lvl6') && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"hierarchy.\".concat(item.type)\n }), /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n })), item.type === 'content' && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"content\"\n }), /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n })), renderAction({\n item: item,\n runDeleteTransition: runDeleteTransition,\n runFavoriteTransition: runFavoriteTransition\n }))));\n}","var regexHighlightTags = /(|<\\/mark>)/g;\nvar regexHasHighlightTags = RegExp(regexHighlightTags.source);\nexport function removeHighlightTags(hit) {\n var _internalDocSearchHit, _hit$_highlightResult;\n\n var internalDocSearchHit = hit;\n\n if (!internalDocSearchHit.__docsearch_parent && !hit._highlightResult) {\n return hit.hierarchy.lvl0;\n }\n\n var _ref = (internalDocSearchHit.__docsearch_parent ? (_internalDocSearchHit = internalDocSearchHit.__docsearch_parent) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit._highlightResult) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit.hierarchy) === null || _internalDocSearchHit === void 0 ? void 0 : _internalDocSearchHit.lvl0 : (_hit$_highlightResult = hit._highlightResult) === null || _hit$_highlightResult === void 0 || (_hit$_highlightResult = _hit$_highlightResult.hierarchy) === null || _hit$_highlightResult === void 0 ? void 0 : _hit$_highlightResult.lvl0) || {},\n value = _ref.value;\n\n return value && regexHasHighlightTags.test(value) ? value.replace(regexHighlightTags, '') : value;\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport React from 'react';\nimport { SelectIcon, SourceIcon } from './icons';\nimport { Results } from './Results';\nimport { removeHighlightTags } from './utils';\nexport function ResultsScreen(props) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown-Container\"\n }, props.state.collections.map(function (collection) {\n if (collection.items.length === 0) {\n return null;\n }\n\n var title = removeHighlightTags(collection.items[0]);\n return /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n key: collection.source.sourceId,\n title: title,\n collection: collection,\n renderIcon: function renderIcon(_ref) {\n var _collection$items;\n\n var item = _ref.item,\n index = _ref.index;\n return /*#__PURE__*/React.createElement(React.Fragment, null, item.__docsearch_parent && /*#__PURE__*/React.createElement(\"svg\", {\n className: \"DocSearch-Hit-Tree\",\n viewBox: \"0 0 24 54\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, item.__docsearch_parent !== ((_collection$items = collection.items[index + 1]) === null || _collection$items === void 0 ? void 0 : _collection$items.__docsearch_parent) ? /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 6v21M20 27H8.3\"\n }) : /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 6v42M20 27H8.3\"\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(SourceIcon, {\n type: item.type\n })));\n },\n renderAction: function renderAction() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(SelectIcon, null));\n }\n }));\n }), props.resultsFooterComponent && /*#__PURE__*/React.createElement(\"section\", {\n className: \"DocSearch-HitsFooter\"\n }, /*#__PURE__*/React.createElement(props.resultsFooterComponent, {\n state: props.state\n })));\n}","import React from 'react';\nexport function RecentIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13\"\n })));\n}","import React from 'react';\nexport function StarIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function ResetIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { RecentIcon, ResetIcon, StarIcon } from './icons';\nimport { Results } from './Results';\nexport function StartScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$recentS = translations.recentSearchesTitle,\n recentSearchesTitle = _translations$recentS === void 0 ? 'Recent' : _translations$recentS,\n _translations$noRecen = translations.noRecentSearchesText,\n noRecentSearchesText = _translations$noRecen === void 0 ? 'No recent searches' : _translations$noRecen,\n _translations$saveRec = translations.saveRecentSearchButtonTitle,\n saveRecentSearchButtonTitle = _translations$saveRec === void 0 ? 'Save this search' : _translations$saveRec,\n _translations$removeR = translations.removeRecentSearchButtonTitle,\n removeRecentSearchButtonTitle = _translations$removeR === void 0 ? 'Remove this search from history' : _translations$removeR,\n _translations$favorit = translations.favoriteSearchesTitle,\n favoriteSearchesTitle = _translations$favorit === void 0 ? 'Favorite' : _translations$favorit,\n _translations$removeF = translations.removeFavoriteSearchButtonTitle,\n removeFavoriteSearchButtonTitle = _translations$removeF === void 0 ? 'Remove this search from favorites' : _translations$removeF;\n\n if (props.state.status === 'idle' && props.hasCollections === false) {\n if (props.disableUserPersonalization) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-StartScreen\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, noRecentSearchesText));\n }\n\n if (props.hasCollections === false) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown-Container\"\n }, /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n title: recentSearchesTitle,\n collection: props.state.collections[0],\n renderIcon: function renderIcon() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(RecentIcon, null));\n },\n renderAction: function renderAction(_ref2) {\n var item = _ref2.item,\n runFavoriteTransition = _ref2.runFavoriteTransition,\n runDeleteTransition = _ref2.runDeleteTransition;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: saveRecentSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runFavoriteTransition(function () {\n props.favoriteSearches.add(item);\n props.recentSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(StarIcon, null))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: removeRecentSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(function () {\n props.recentSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(ResetIcon, null))));\n }\n })), /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n title: favoriteSearchesTitle,\n collection: props.state.collections[1],\n renderIcon: function renderIcon() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(StarIcon, null));\n },\n renderAction: function renderAction(_ref3) {\n var item = _ref3.item,\n runDeleteTransition = _ref3.runDeleteTransition;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: removeFavoriteSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(function () {\n props.favoriteSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(ResetIcon, null)));\n }\n })));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { ErrorScreen } from './ErrorScreen';\nimport { NoResultsScreen } from './NoResultsScreen';\nimport { ResultsScreen } from './ResultsScreen';\nimport { StartScreen } from './StartScreen';\nexport var ScreenState = React.memo(function (_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n if (props.state.status === 'error') {\n return /*#__PURE__*/React.createElement(ErrorScreen, {\n translations: translations === null || translations === void 0 ? void 0 : translations.errorScreen\n });\n }\n\n var hasCollections = props.state.collections.some(function (collection) {\n return collection.items.length > 0;\n });\n\n if (!props.state.query) {\n return /*#__PURE__*/React.createElement(StartScreen, _extends({}, props, {\n hasCollections: hasCollections,\n translations: translations === null || translations === void 0 ? void 0 : translations.startScreen\n }));\n }\n\n if (hasCollections === false) {\n return /*#__PURE__*/React.createElement(NoResultsScreen, _extends({}, props, {\n translations: translations === null || translations === void 0 ? void 0 : translations.noResultsScreen\n }));\n }\n\n return /*#__PURE__*/React.createElement(ResultsScreen, props);\n}, function areEqual(_prevProps, nextProps) {\n // We don't update the screen when Autocomplete is loading or stalled to\n // avoid UI flashes:\n // - Empty screen → Results screen\n // - NoResults screen → NoResults screen with another query\n return nextProps.state.status === 'loading' || nextProps.state.status === 'stalled';\n});","import React from 'react';\nexport function LoadingIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n viewBox: \"0 0 38 38\",\n stroke: \"currentColor\",\n strokeOpacity: \".5\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(1 1)\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n strokeOpacity: \".3\",\n cx: \"18\",\n cy: \"18\",\n r: \"18\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36 18c0-9.94-8.06-18-18-18\"\n }, /*#__PURE__*/React.createElement(\"animateTransform\", {\n attributeName: \"transform\",\n type: \"rotate\",\n from: \"0 18 18\",\n to: \"360 18 18\",\n dur: \"1s\",\n repeatCount: \"indefinite\"\n })))));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { MAX_QUERY_SIZE } from './constants';\nimport { LoadingIcon } from './icons/LoadingIcon';\nimport { ResetIcon } from './icons/ResetIcon';\nimport { SearchIcon } from './icons/SearchIcon';\nexport function SearchBox(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$resetBu = translations.resetButtonTitle,\n resetButtonTitle = _translations$resetBu === void 0 ? 'Clear the query' : _translations$resetBu,\n _translations$resetBu2 = translations.resetButtonAriaLabel,\n resetButtonAriaLabel = _translations$resetBu2 === void 0 ? 'Clear the query' : _translations$resetBu2,\n _translations$cancelB = translations.cancelButtonText,\n cancelButtonText = _translations$cancelB === void 0 ? 'Cancel' : _translations$cancelB,\n _translations$cancelB2 = translations.cancelButtonAriaLabel,\n cancelButtonAriaLabel = _translations$cancelB2 === void 0 ? 'Cancel' : _translations$cancelB2,\n _translations$searchI = translations.searchInputLabel,\n searchInputLabel = _translations$searchI === void 0 ? 'Search' : _translations$searchI;\n\n var _props$getFormProps = props.getFormProps({\n inputElement: props.inputRef.current\n }),\n onReset = _props$getFormProps.onReset;\n\n React.useEffect(function () {\n if (props.autoFocus && props.inputRef.current) {\n props.inputRef.current.focus();\n }\n }, [props.autoFocus, props.inputRef]);\n React.useEffect(function () {\n if (props.isFromSelection && props.inputRef.current) {\n props.inputRef.current.select();\n }\n }, [props.isFromSelection, props.inputRef]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"form\", {\n className: \"DocSearch-Form\",\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n },\n onReset: onReset\n }, /*#__PURE__*/React.createElement(\"label\", _extends({\n className: \"DocSearch-MagnifierLabel\"\n }, props.getLabelProps()), /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-VisuallyHiddenForAccessibility\"\n }, searchInputLabel)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-LoadingIndicator\"\n }, /*#__PURE__*/React.createElement(LoadingIcon, null)), /*#__PURE__*/React.createElement(\"input\", _extends({\n className: \"DocSearch-Input\",\n ref: props.inputRef\n }, props.getInputProps({\n inputElement: props.inputRef.current,\n autoFocus: props.autoFocus,\n maxLength: MAX_QUERY_SIZE\n }))), /*#__PURE__*/React.createElement(\"button\", {\n type: \"reset\",\n title: resetButtonTitle,\n className: \"DocSearch-Reset\",\n \"aria-label\": resetButtonAriaLabel,\n hidden: !props.state.query\n }, /*#__PURE__*/React.createElement(ResetIcon, null))), /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Cancel\",\n type: \"reset\",\n \"aria-label\": cancelButtonAriaLabel,\n onClick: props.onClose\n }, cancelButtonText));\n}","var _excluded = [\"_highlightResult\", \"_snippetResult\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction isLocalStorageSupported() {\n var key = '__TEST_KEY__';\n\n try {\n localStorage.setItem(key, '');\n localStorage.removeItem(key);\n return true;\n } catch (error) {\n return false;\n }\n}\n\nfunction createStorage(key) {\n if (isLocalStorageSupported() === false) {\n return {\n setItem: function setItem() {},\n getItem: function getItem() {\n return [];\n }\n };\n }\n\n return {\n setItem: function setItem(item) {\n return window.localStorage.setItem(key, JSON.stringify(item));\n },\n getItem: function getItem() {\n var item = window.localStorage.getItem(key);\n return item ? JSON.parse(item) : [];\n }\n };\n}\n\nexport function createStoredSearches(_ref) {\n var key = _ref.key,\n _ref$limit = _ref.limit,\n limit = _ref$limit === void 0 ? 5 : _ref$limit;\n var storage = createStorage(key);\n var items = storage.getItem().slice(0, limit);\n return {\n add: function add(item) {\n var _ref2 = item,\n _highlightResult = _ref2._highlightResult,\n _snippetResult = _ref2._snippetResult,\n hit = _objectWithoutProperties(_ref2, _excluded);\n\n var isQueryAlreadySaved = items.findIndex(function (x) {\n return x.objectID === hit.objectID;\n });\n\n if (isQueryAlreadySaved > -1) {\n items.splice(isQueryAlreadySaved, 1);\n }\n\n items.unshift(hit);\n items = items.slice(0, limit);\n storage.setItem(items);\n },\n remove: function remove(item) {\n items = items.filter(function (x) {\n return x.objectID !== item.objectID;\n });\n storage.setItem(items);\n },\n getAll: function getAll() {\n return items;\n }\n };\n}","function createBrowserLocalStorageCache(options) {\r\n const namespaceKey = `algoliasearch-client-js-${options.key}`;\r\n // eslint-disable-next-line functional/no-let\r\n let storage;\r\n const getStorage = () => {\r\n if (storage === undefined) {\r\n storage = options.localStorage || window.localStorage;\r\n }\r\n return storage;\r\n };\r\n const getNamespace = () => {\r\n return JSON.parse(getStorage().getItem(namespaceKey) || '{}');\r\n };\r\n const setNamespace = (namespace) => {\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n };\r\n const removeOutdatedCacheItems = () => {\r\n const timeToLive = options.timeToLive ? options.timeToLive * 1000 : null;\r\n const namespace = getNamespace();\r\n const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(Object.entries(namespace).filter(([, cacheItem]) => {\r\n return cacheItem.timestamp !== undefined;\r\n }));\r\n setNamespace(filteredNamespaceWithoutOldFormattedCacheItems);\r\n if (!timeToLive)\r\n return;\r\n const filteredNamespaceWithoutExpiredItems = Object.fromEntries(Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => {\r\n const currentTimestamp = new Date().getTime();\r\n const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp;\r\n return !isExpired;\r\n }));\r\n setNamespace(filteredNamespaceWithoutExpiredItems);\r\n };\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n return Promise.resolve()\r\n .then(() => {\r\n removeOutdatedCacheItems();\r\n const keyAsString = JSON.stringify(key);\r\n return getNamespace()[keyAsString];\r\n })\r\n .then(value => {\r\n return Promise.all([value ? value.value : defaultValue(), value !== undefined]);\r\n })\r\n .then(([value, exists]) => {\r\n return Promise.all([value, exists || events.miss(value)]);\r\n })\r\n .then(([value]) => value);\r\n },\r\n set(key, value) {\r\n return Promise.resolve().then(() => {\r\n const namespace = getNamespace();\r\n // eslint-disable-next-line functional/immutable-data\r\n namespace[JSON.stringify(key)] = {\r\n timestamp: new Date().getTime(),\r\n value,\r\n };\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n return value;\r\n });\r\n },\r\n delete(key) {\r\n return Promise.resolve().then(() => {\r\n const namespace = getNamespace();\r\n // eslint-disable-next-line functional/immutable-data\r\n delete namespace[JSON.stringify(key)];\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n });\r\n },\r\n clear() {\r\n return Promise.resolve().then(() => {\r\n getStorage().removeItem(namespaceKey);\r\n });\r\n },\r\n };\r\n}\n\n// @todo Add logger on options to debug when caches go wrong.\r\nfunction createFallbackableCache(options) {\r\n const caches = [...options.caches];\r\n const current = caches.shift(); // eslint-disable-line functional/immutable-data\r\n if (current === undefined) {\r\n return createNullCache();\r\n }\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n return current.get(key, defaultValue, events).catch(() => {\r\n return createFallbackableCache({ caches }).get(key, defaultValue, events);\r\n });\r\n },\r\n set(key, value) {\r\n return current.set(key, value).catch(() => {\r\n return createFallbackableCache({ caches }).set(key, value);\r\n });\r\n },\r\n delete(key) {\r\n return current.delete(key).catch(() => {\r\n return createFallbackableCache({ caches }).delete(key);\r\n });\r\n },\r\n clear() {\r\n return current.clear().catch(() => {\r\n return createFallbackableCache({ caches }).clear();\r\n });\r\n },\r\n };\r\n}\n\nfunction createNullCache() {\r\n return {\r\n get(_key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n const value = defaultValue();\r\n return value\r\n .then(result => Promise.all([result, events.miss(result)]))\r\n .then(([result]) => result);\r\n },\r\n set(_key, value) {\r\n return Promise.resolve(value);\r\n },\r\n delete(_key) {\r\n return Promise.resolve();\r\n },\r\n clear() {\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createInMemoryCache(options = { serializable: true }) {\r\n // eslint-disable-next-line functional/no-let\r\n let cache = {};\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n const keyAsString = JSON.stringify(key);\r\n if (keyAsString in cache) {\r\n return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]);\r\n }\r\n const promise = defaultValue();\r\n const miss = (events && events.miss) || (() => Promise.resolve());\r\n return promise.then((value) => miss(value)).then(() => promise);\r\n },\r\n set(key, value) {\r\n // eslint-disable-next-line functional/immutable-data\r\n cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;\r\n return Promise.resolve(value);\r\n },\r\n delete(key) {\r\n // eslint-disable-next-line functional/immutable-data\r\n delete cache[JSON.stringify(key)];\r\n return Promise.resolve();\r\n },\r\n clear() {\r\n cache = {};\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createAuth(authMode, appId, apiKey) {\r\n const credentials = {\r\n 'x-algolia-api-key': apiKey,\r\n 'x-algolia-application-id': appId,\r\n };\r\n return {\r\n headers() {\r\n return authMode === AuthMode.WithinHeaders ? credentials : {};\r\n },\r\n queryParameters() {\r\n return authMode === AuthMode.WithinQueryParameters ? credentials : {};\r\n },\r\n };\r\n}\n\n// eslint-disable-next-line functional/prefer-readonly-type\r\nfunction shuffle(array) {\r\n let c = array.length - 1; // eslint-disable-line functional/no-let\r\n // eslint-disable-next-line functional/no-loop-statement\r\n for (c; c > 0; c--) {\r\n const b = Math.floor(Math.random() * (c + 1));\r\n const a = array[c];\r\n array[c] = array[b]; // eslint-disable-line functional/immutable-data, no-param-reassign\r\n array[b] = a; // eslint-disable-line functional/immutable-data, no-param-reassign\r\n }\r\n return array;\r\n}\r\nfunction addMethods(base, methods) {\r\n if (!methods) {\r\n return base;\r\n }\r\n Object.keys(methods).forEach(key => {\r\n // eslint-disable-next-line functional/immutable-data, no-param-reassign\r\n base[key] = methods[key](base);\r\n });\r\n return base;\r\n}\r\nfunction encode(format, ...args) {\r\n // eslint-disable-next-line functional/no-let\r\n let i = 0;\r\n return format.replace(/%s/g, () => encodeURIComponent(args[i++]));\r\n}\n\nconst version = '4.23.2';\n\nconst AuthMode = {\r\n /**\r\n * If auth credentials should be in query parameters.\r\n */\r\n WithinQueryParameters: 0,\r\n /**\r\n * If auth credentials should be in headers.\r\n */\r\n WithinHeaders: 1,\r\n};\n\nfunction createMappedRequestOptions(requestOptions, timeout) {\r\n const options = requestOptions || {};\r\n const data = options.data || {};\r\n Object.keys(options).forEach(key => {\r\n if (['timeout', 'headers', 'queryParameters', 'data', 'cacheable'].indexOf(key) === -1) {\r\n data[key] = options[key]; // eslint-disable-line functional/immutable-data\r\n }\r\n });\r\n return {\r\n data: Object.entries(data).length > 0 ? data : undefined,\r\n timeout: options.timeout || timeout,\r\n headers: options.headers || {},\r\n queryParameters: options.queryParameters || {},\r\n cacheable: options.cacheable,\r\n };\r\n}\n\nconst CallEnum = {\r\n /**\r\n * If the host is read only.\r\n */\r\n Read: 1,\r\n /**\r\n * If the host is write only.\r\n */\r\n Write: 2,\r\n /**\r\n * If the host is both read and write.\r\n */\r\n Any: 3,\r\n};\n\nconst HostStatusEnum = {\r\n Up: 1,\r\n Down: 2,\r\n Timeouted: 3,\r\n};\n\n// By default, API Clients at Algolia have expiration delay\r\n// of 5 mins. In the JavaScript client, we have 2 mins.\r\nconst EXPIRATION_DELAY = 2 * 60 * 1000;\r\nfunction createStatefulHost(host, status = HostStatusEnum.Up) {\r\n return {\r\n ...host,\r\n status,\r\n lastUpdate: Date.now(),\r\n };\r\n}\r\nfunction isStatefulHostUp(host) {\r\n return host.status === HostStatusEnum.Up || Date.now() - host.lastUpdate > EXPIRATION_DELAY;\r\n}\r\nfunction isStatefulHostTimeouted(host) {\r\n return (host.status === HostStatusEnum.Timeouted && Date.now() - host.lastUpdate <= EXPIRATION_DELAY);\r\n}\n\nfunction createStatelessHost(options) {\r\n if (typeof options === 'string') {\r\n return {\r\n protocol: 'https',\r\n url: options,\r\n accept: CallEnum.Any,\r\n };\r\n }\r\n return {\r\n protocol: options.protocol || 'https',\r\n url: options.url,\r\n accept: options.accept || CallEnum.Any,\r\n };\r\n}\n\nconst MethodEnum = {\r\n Delete: 'DELETE',\r\n Get: 'GET',\r\n Post: 'POST',\r\n Put: 'PUT',\r\n};\n\nfunction createRetryableOptions(hostsCache, statelessHosts) {\r\n return Promise.all(statelessHosts.map(statelessHost => {\r\n return hostsCache.get(statelessHost, () => {\r\n return Promise.resolve(createStatefulHost(statelessHost));\r\n });\r\n })).then(statefulHosts => {\r\n const hostsUp = statefulHosts.filter(host => isStatefulHostUp(host));\r\n const hostsTimeouted = statefulHosts.filter(host => isStatefulHostTimeouted(host));\r\n /**\r\n * Note, we put the hosts that previously timeouted on the end of the list.\r\n */\r\n const hostsAvailable = [...hostsUp, ...hostsTimeouted];\r\n const statelessHostsAvailable = hostsAvailable.length > 0\r\n ? hostsAvailable.map(host => createStatelessHost(host))\r\n : statelessHosts;\r\n return {\r\n getTimeout(timeoutsCount, baseTimeout) {\r\n /**\r\n * Imagine that you have 4 hosts, if timeouts will increase\r\n * on the following way: 1 (timeouted) > 4 (timeouted) > 5 (200)\r\n *\r\n * Note that, the very next request, we start from the previous timeout\r\n *\r\n * 5 (timeouted) > 6 (timeouted) > 7 ...\r\n *\r\n * This strategy may need to be reviewed, but is the strategy on the our\r\n * current v3 version.\r\n */\r\n const timeoutMultiplier = hostsTimeouted.length === 0 && timeoutsCount === 0\r\n ? 1\r\n : hostsTimeouted.length + 3 + timeoutsCount;\r\n return timeoutMultiplier * baseTimeout;\r\n },\r\n statelessHosts: statelessHostsAvailable,\r\n };\r\n });\r\n}\n\nconst isNetworkError = ({ isTimedOut, status }) => {\r\n return !isTimedOut && ~~status === 0;\r\n};\r\nconst isRetryable = (response) => {\r\n const status = response.status;\r\n const isTimedOut = response.isTimedOut;\r\n return (isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4));\r\n};\r\nconst isSuccess = ({ status }) => {\r\n return ~~(status / 100) === 2;\r\n};\r\nconst retryDecision = (response, outcomes) => {\r\n if (isRetryable(response)) {\r\n return outcomes.onRetry(response);\r\n }\r\n if (isSuccess(response)) {\r\n return outcomes.onSuccess(response);\r\n }\r\n return outcomes.onFail(response);\r\n};\n\nfunction retryableRequest(transporter, statelessHosts, request, requestOptions) {\r\n const stackTrace = []; // eslint-disable-line functional/prefer-readonly-type\r\n /**\r\n * First we prepare the payload that do not depend from hosts.\r\n */\r\n const data = serializeData(request, requestOptions);\r\n const headers = serializeHeaders(transporter, requestOptions);\r\n const method = request.method;\r\n // On `GET`, the data is proxied to query parameters.\r\n const dataQueryParameters = request.method !== MethodEnum.Get\r\n ? {}\r\n : {\r\n ...request.data,\r\n ...requestOptions.data,\r\n };\r\n const queryParameters = {\r\n 'x-algolia-agent': transporter.userAgent.value,\r\n ...transporter.queryParameters,\r\n ...dataQueryParameters,\r\n ...requestOptions.queryParameters,\r\n };\r\n let timeoutsCount = 0; // eslint-disable-line functional/no-let\r\n const retry = (hosts, // eslint-disable-line functional/prefer-readonly-type\r\n getTimeout) => {\r\n /**\r\n * We iterate on each host, until there is no host left.\r\n */\r\n const host = hosts.pop(); // eslint-disable-line functional/immutable-data\r\n if (host === undefined) {\r\n throw createRetryError(stackTraceWithoutCredentials(stackTrace));\r\n }\r\n const payload = {\r\n data,\r\n headers,\r\n method,\r\n url: serializeUrl(host, request.path, queryParameters),\r\n connectTimeout: getTimeout(timeoutsCount, transporter.timeouts.connect),\r\n responseTimeout: getTimeout(timeoutsCount, requestOptions.timeout),\r\n };\r\n /**\r\n * The stackFrame is pushed to the stackTrace so we\r\n * can have information about onRetry and onFailure\r\n * decisions.\r\n */\r\n const pushToStackTrace = (response) => {\r\n const stackFrame = {\r\n request: payload,\r\n response,\r\n host,\r\n triesLeft: hosts.length,\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n stackTrace.push(stackFrame);\r\n return stackFrame;\r\n };\r\n const decisions = {\r\n onSuccess: response => deserializeSuccess(response),\r\n onRetry(response) {\r\n const stackFrame = pushToStackTrace(response);\r\n /**\r\n * If response is a timeout, we increaset the number of\r\n * timeouts so we can increase the timeout later.\r\n */\r\n if (response.isTimedOut) {\r\n timeoutsCount++;\r\n }\r\n return Promise.all([\r\n /**\r\n * Failures are individually send the logger, allowing\r\n * the end user to debug / store stack frames even\r\n * when a retry error does not happen.\r\n */\r\n transporter.logger.info('Retryable failure', stackFrameWithoutCredentials(stackFrame)),\r\n /**\r\n * We also store the state of the host in failure cases. If the host, is\r\n * down it will remain down for the next 2 minutes. In a timeout situation,\r\n * this host will be added end of the list of hosts on the next request.\r\n */\r\n transporter.hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? HostStatusEnum.Timeouted : HostStatusEnum.Down)),\r\n ]).then(() => retry(hosts, getTimeout));\r\n },\r\n onFail(response) {\r\n pushToStackTrace(response);\r\n throw deserializeFailure(response, stackTraceWithoutCredentials(stackTrace));\r\n },\r\n };\r\n return transporter.requester.send(payload).then(response => {\r\n return retryDecision(response, decisions);\r\n });\r\n };\r\n /**\r\n * Finally, for each retryable host perform request until we got a non\r\n * retryable response. Some notes here:\r\n *\r\n * 1. The reverse here is applied so we can apply a `pop` later on => more performant.\r\n * 2. We also get from the retryable options a timeout multiplier that is tailored\r\n * for the current context.\r\n */\r\n return createRetryableOptions(transporter.hostsCache, statelessHosts).then(options => {\r\n return retry([...options.statelessHosts].reverse(), options.getTimeout);\r\n });\r\n}\n\nfunction createTransporter(options) {\r\n const { hostsCache, logger, requester, requestsCache, responsesCache, timeouts, userAgent, hosts, queryParameters, headers, } = options;\r\n const transporter = {\r\n hostsCache,\r\n logger,\r\n requester,\r\n requestsCache,\r\n responsesCache,\r\n timeouts,\r\n userAgent,\r\n headers,\r\n queryParameters,\r\n hosts: hosts.map(host => createStatelessHost(host)),\r\n read(request, requestOptions) {\r\n /**\r\n * First, we compute the user request options. Now, keep in mind,\r\n * that using request options the user is able to modified the intire\r\n * payload of the request. Such as headers, query parameters, and others.\r\n */\r\n const mappedRequestOptions = createMappedRequestOptions(requestOptions, transporter.timeouts.read);\r\n const createRetryableRequest = () => {\r\n /**\r\n * Then, we prepare a function factory that contains the construction of\r\n * the retryable request. At this point, we may *not* perform the actual\r\n * request. But we want to have the function factory ready.\r\n */\r\n return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Read) !== 0), request, mappedRequestOptions);\r\n };\r\n /**\r\n * Once we have the function factory ready, we need to determine of the\r\n * request is \"cacheable\" - should be cached. Note that, once again,\r\n * the user can force this option.\r\n */\r\n const cacheable = mappedRequestOptions.cacheable !== undefined\r\n ? mappedRequestOptions.cacheable\r\n : request.cacheable;\r\n /**\r\n * If is not \"cacheable\", we immediatly trigger the retryable request, no\r\n * need to check cache implementations.\r\n */\r\n if (cacheable !== true) {\r\n return createRetryableRequest();\r\n }\r\n /**\r\n * If the request is \"cacheable\", we need to first compute the key to ask\r\n * the cache implementations if this request is on progress or if the\r\n * response already exists on the cache.\r\n */\r\n const key = {\r\n request,\r\n mappedRequestOptions,\r\n transporter: {\r\n queryParameters: transporter.queryParameters,\r\n headers: transporter.headers,\r\n },\r\n };\r\n /**\r\n * With the computed key, we first ask the responses cache\r\n * implemention if this request was been resolved before.\r\n */\r\n return transporter.responsesCache.get(key, () => {\r\n /**\r\n * If the request has never resolved before, we actually ask if there\r\n * is a current request with the same key on progress.\r\n */\r\n return transporter.requestsCache.get(key, () => {\r\n return (transporter.requestsCache\r\n /**\r\n * Finally, if there is no request in progress with the same key,\r\n * this `createRetryableRequest()` will actually trigger the\r\n * retryable request.\r\n */\r\n .set(key, createRetryableRequest())\r\n .then(response => Promise.all([transporter.requestsCache.delete(key), response]), err => Promise.all([transporter.requestsCache.delete(key), Promise.reject(err)]))\r\n .then(([_, response]) => response));\r\n });\r\n }, {\r\n /**\r\n * Of course, once we get this response back from the server, we\r\n * tell response cache to actually store the received response\r\n * to be used later.\r\n */\r\n miss: response => transporter.responsesCache.set(key, response),\r\n });\r\n },\r\n write(request, requestOptions) {\r\n /**\r\n * On write requests, no cache mechanisms are applied, and we\r\n * proxy the request immediately to the requester.\r\n */\r\n return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Write) !== 0), request, createMappedRequestOptions(requestOptions, transporter.timeouts.write));\r\n },\r\n };\r\n return transporter;\r\n}\n\nfunction createUserAgent(version) {\r\n const userAgent = {\r\n value: `Algolia for JavaScript (${version})`,\r\n add(options) {\r\n const addedUserAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`;\r\n if (userAgent.value.indexOf(addedUserAgent) === -1) {\r\n // eslint-disable-next-line functional/immutable-data\r\n userAgent.value = `${userAgent.value}${addedUserAgent}`;\r\n }\r\n return userAgent;\r\n },\r\n };\r\n return userAgent;\r\n}\n\nfunction deserializeSuccess(response) {\r\n // eslint-disable-next-line functional/no-try-statement\r\n try {\r\n return JSON.parse(response.content);\r\n }\r\n catch (e) {\r\n throw createDeserializationError(e.message, response);\r\n }\r\n}\r\nfunction deserializeFailure({ content, status }, stackFrame) {\r\n // eslint-disable-next-line functional/no-let\r\n let message = content;\r\n // eslint-disable-next-line functional/no-try-statement\r\n try {\r\n message = JSON.parse(content).message;\r\n }\r\n catch (e) {\r\n // ..\r\n }\r\n return createApiError(message, status, stackFrame);\r\n}\n\nfunction serializeUrl(host, path, queryParameters) {\r\n const queryParametersAsString = serializeQueryParameters(queryParameters);\r\n // eslint-disable-next-line functional/no-let\r\n let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;\r\n if (queryParametersAsString.length) {\r\n url += `?${queryParametersAsString}`;\r\n }\r\n return url;\r\n}\r\nfunction serializeQueryParameters(parameters) {\r\n const isObjectOrArray = (value) => Object.prototype.toString.call(value) === '[object Object]' ||\r\n Object.prototype.toString.call(value) === '[object Array]';\r\n return Object.keys(parameters)\r\n .map(key => encode('%s=%s', key, isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]))\r\n .join('&');\r\n}\r\nfunction serializeData(request, requestOptions) {\r\n if (request.method === MethodEnum.Get ||\r\n (request.data === undefined && requestOptions.data === undefined)) {\r\n return undefined;\r\n }\r\n const data = Array.isArray(request.data)\r\n ? request.data\r\n : { ...request.data, ...requestOptions.data };\r\n return JSON.stringify(data);\r\n}\r\nfunction serializeHeaders(transporter, requestOptions) {\r\n const headers = {\r\n ...transporter.headers,\r\n ...requestOptions.headers,\r\n };\r\n const serializedHeaders = {};\r\n Object.keys(headers).forEach(header => {\r\n const value = headers[header];\r\n // @ts-ignore\r\n // eslint-disable-next-line functional/immutable-data\r\n serializedHeaders[header.toLowerCase()] = value;\r\n });\r\n return serializedHeaders;\r\n}\n\nfunction stackTraceWithoutCredentials(stackTrace) {\r\n return stackTrace.map(stackFrame => stackFrameWithoutCredentials(stackFrame));\r\n}\r\nfunction stackFrameWithoutCredentials(stackFrame) {\r\n const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key']\r\n ? { 'x-algolia-api-key': '*****' }\r\n : {};\r\n return {\r\n ...stackFrame,\r\n request: {\r\n ...stackFrame.request,\r\n headers: {\r\n ...stackFrame.request.headers,\r\n ...modifiedHeaders,\r\n },\r\n },\r\n };\r\n}\n\nfunction createApiError(message, status, transporterStackTrace) {\r\n return {\r\n name: 'ApiError',\r\n message,\r\n status,\r\n transporterStackTrace,\r\n };\r\n}\n\nfunction createDeserializationError(message, response) {\r\n return {\r\n name: 'DeserializationError',\r\n message,\r\n response,\r\n };\r\n}\n\nfunction createRetryError(transporterStackTrace) {\r\n return {\r\n name: 'RetryError',\r\n message: 'Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.',\r\n transporterStackTrace,\r\n };\r\n}\n\nconst createSearchClient = options => {\r\n const appId = options.appId;\r\n const auth = createAuth(options.authMode !== undefined ? options.authMode : AuthMode.WithinHeaders, appId, options.apiKey);\r\n const transporter = createTransporter({\r\n hosts: [\r\n { url: `${appId}-dsn.algolia.net`, accept: CallEnum.Read },\r\n { url: `${appId}.algolia.net`, accept: CallEnum.Write },\r\n ].concat(shuffle([\r\n { url: `${appId}-1.algolianet.com` },\r\n { url: `${appId}-2.algolianet.com` },\r\n { url: `${appId}-3.algolianet.com` },\r\n ])),\r\n ...options,\r\n headers: {\r\n ...auth.headers(),\r\n ...{ 'content-type': 'application/x-www-form-urlencoded' },\r\n ...options.headers,\r\n },\r\n queryParameters: {\r\n ...auth.queryParameters(),\r\n ...options.queryParameters,\r\n },\r\n });\r\n const base = {\r\n transporter,\r\n appId,\r\n addAlgoliaAgent(segment, version) {\r\n transporter.userAgent.add({ segment, version });\r\n },\r\n clearCache() {\r\n return Promise.all([\r\n transporter.requestsCache.clear(),\r\n transporter.responsesCache.clear(),\r\n ]).then(() => undefined);\r\n },\r\n };\r\n return addMethods(base, options.methods);\r\n};\n\nconst customRequest = (base) => {\r\n return (request, requestOptions) => {\r\n if (request.method === MethodEnum.Get) {\r\n return base.transporter.read(request, requestOptions);\r\n }\r\n return base.transporter.write(request, requestOptions);\r\n };\r\n};\n\nconst initIndex = (base) => {\r\n return (indexName, options = {}) => {\r\n const searchIndex = {\r\n transporter: base.transporter,\r\n appId: base.appId,\r\n indexName,\r\n };\r\n return addMethods(searchIndex, options.methods);\r\n };\r\n};\n\nconst multipleQueries = (base) => {\r\n return (queries, requestOptions) => {\r\n const requests = queries.map(query => {\r\n return {\r\n ...query,\r\n params: serializeQueryParameters(query.params || {}),\r\n };\r\n });\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: '1/indexes/*/queries',\r\n data: {\r\n requests,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst multipleSearchForFacetValues = (base) => {\r\n return (queries, requestOptions) => {\r\n return Promise.all(queries.map(query => {\r\n const { facetName, facetQuery, ...params } = query.params;\r\n return initIndex(base)(query.indexName, {\r\n methods: { searchForFacetValues },\r\n }).searchForFacetValues(facetName, facetQuery, {\r\n ...requestOptions,\r\n ...params,\r\n });\r\n }));\r\n };\r\n};\n\nconst findAnswers = (base) => {\r\n return (query, queryLanguages, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/answers/%s/prediction', base.indexName),\r\n data: {\r\n query,\r\n queryLanguages,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst search = (base) => {\r\n return (query, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/indexes/%s/query', base.indexName),\r\n data: {\r\n query,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst searchForFacetValues = (base) => {\r\n return (facetName, facetQuery, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/indexes/%s/facets/%s/query', base.indexName, facetName),\r\n data: {\r\n facetQuery,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst LogLevelEnum = {\r\n Debug: 1,\r\n Info: 2,\r\n Error: 3,\r\n};\n\n/* eslint no-console: 0 */\r\nfunction createConsoleLogger(logLevel) {\r\n return {\r\n debug(message, args) {\r\n if (LogLevelEnum.Debug >= logLevel) {\r\n console.debug(message, args);\r\n }\r\n return Promise.resolve();\r\n },\r\n info(message, args) {\r\n if (LogLevelEnum.Info >= logLevel) {\r\n console.info(message, args);\r\n }\r\n return Promise.resolve();\r\n },\r\n error(message, args) {\r\n console.error(message, args);\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nconst getRecommendations = base => {\r\n return (queries, requestOptions) => {\r\n const requests = queries.map(query => ({\r\n ...query,\r\n // The `threshold` param is required by the endpoint to make it easier\r\n // to provide a default value later, so we default it in the client\r\n // so that users don't have to provide a value.\r\n threshold: query.threshold || 0,\r\n }));\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: '1/indexes/*/recommendations',\r\n data: {\r\n requests,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nfunction createBrowserXhrRequester() {\r\n return {\r\n send(request) {\r\n return new Promise((resolve) => {\r\n const baseRequester = new XMLHttpRequest();\r\n baseRequester.open(request.method, request.url, true);\r\n Object.keys(request.headers).forEach(key => baseRequester.setRequestHeader(key, request.headers[key]));\r\n const createTimeout = (timeout, content) => {\r\n return setTimeout(() => {\r\n baseRequester.abort();\r\n resolve({\r\n status: 0,\r\n content,\r\n isTimedOut: true,\r\n });\r\n }, timeout * 1000);\r\n };\r\n const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout');\r\n // eslint-disable-next-line functional/no-let\r\n let responseTimeout;\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onreadystatechange = () => {\r\n if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) {\r\n clearTimeout(connectTimeout);\r\n responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout');\r\n }\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onerror = () => {\r\n // istanbul ignore next\r\n if (baseRequester.status === 0) {\r\n clearTimeout(connectTimeout);\r\n clearTimeout(responseTimeout);\r\n resolve({\r\n content: baseRequester.responseText || 'Network request failed',\r\n status: baseRequester.status,\r\n isTimedOut: false,\r\n });\r\n }\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onload = () => {\r\n clearTimeout(connectTimeout);\r\n clearTimeout(responseTimeout);\r\n resolve({\r\n content: baseRequester.responseText,\r\n status: baseRequester.status,\r\n isTimedOut: false,\r\n });\r\n };\r\n baseRequester.send(request.data);\r\n });\r\n },\r\n };\r\n}\n\nfunction algoliasearch(appId, apiKey, options) {\r\n const commonOptions = {\r\n appId,\r\n apiKey,\r\n timeouts: {\r\n connect: 1,\r\n read: 2,\r\n write: 30,\r\n },\r\n requester: createBrowserXhrRequester(),\r\n logger: createConsoleLogger(LogLevelEnum.Error),\r\n responsesCache: createInMemoryCache(),\r\n requestsCache: createInMemoryCache({ serializable: false }),\r\n hostsCache: createFallbackableCache({\r\n caches: [\r\n createBrowserLocalStorageCache({ key: `${version}-${appId}` }),\r\n createInMemoryCache(),\r\n ],\r\n }),\r\n userAgent: createUserAgent(version).add({\r\n segment: 'Browser',\r\n version: 'lite',\r\n }),\r\n authMode: AuthMode.WithinQueryParameters,\r\n };\r\n return createSearchClient({\r\n ...commonOptions,\r\n ...options,\r\n methods: {\r\n search: multipleQueries,\r\n searchForFacetValues: multipleSearchForFacetValues,\r\n multipleQueries,\r\n multipleSearchForFacetValues,\r\n customRequest,\r\n initIndex: base => (indexName) => {\r\n return initIndex(base)(indexName, {\r\n methods: { search, searchForFacetValues, findAnswers },\r\n });\r\n },\r\n getRecommendations,\r\n },\r\n });\r\n}\r\n// eslint-disable-next-line functional/immutable-data\r\nalgoliasearch.version = version;\n\nexport default algoliasearch;\n","export var version = '3.6.0';","export function noop() {}","export function identity(x) {\n return x;\n}","/**\n * Detect when an event is modified with a special key to let the browser\n * trigger its default behavior.\n */\nexport function isModifierEvent(event) {\n var isMiddleClick = event.button === 1;\n return isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n}","export function groupBy(values, predicate, maxResultsPerGroup) {\n return values.reduce(function (acc, item) {\n var key = predicate(item);\n\n if (!acc.hasOwnProperty(key)) {\n acc[key] = [];\n } // We limit each section to show 5 hits maximum.\n // This acts as a frontend alternative to `distinct`.\n\n\n if (acc[key].length < (maxResultsPerGroup || 5)) {\n acc[key].push(item);\n }\n\n return acc;\n }, {});\n}","var _excluded = [\"footer\", \"searchBox\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { createAutocomplete } from '@algolia/autocomplete-core';\nimport React from 'react';\nimport { MAX_QUERY_SIZE } from './constants';\nimport { Footer } from './Footer';\nimport { Hit } from './Hit';\nimport { ScreenState } from './ScreenState';\nimport { SearchBox } from './SearchBox';\nimport { createStoredSearches } from './stored-searches';\nimport { useSearchClient } from './useSearchClient';\nimport { useTouchEvents } from './useTouchEvents';\nimport { useTrapFocus } from './useTrapFocus';\nimport { groupBy, identity, noop, removeHighlightTags, isModifierEvent } from './utils';\nexport function DocSearchModal(_ref) {\n var appId = _ref.appId,\n apiKey = _ref.apiKey,\n indexName = _ref.indexName,\n _ref$placeholder = _ref.placeholder,\n placeholder = _ref$placeholder === void 0 ? 'Search docs' : _ref$placeholder,\n searchParameters = _ref.searchParameters,\n maxResultsPerGroup = _ref.maxResultsPerGroup,\n _ref$onClose = _ref.onClose,\n onClose = _ref$onClose === void 0 ? noop : _ref$onClose,\n _ref$transformItems = _ref.transformItems,\n transformItems = _ref$transformItems === void 0 ? identity : _ref$transformItems,\n _ref$hitComponent = _ref.hitComponent,\n hitComponent = _ref$hitComponent === void 0 ? Hit : _ref$hitComponent,\n _ref$resultsFooterCom = _ref.resultsFooterComponent,\n resultsFooterComponent = _ref$resultsFooterCom === void 0 ? function () {\n return null;\n } : _ref$resultsFooterCom,\n navigator = _ref.navigator,\n _ref$initialScrollY = _ref.initialScrollY,\n initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,\n _ref$transformSearchC = _ref.transformSearchClient,\n transformSearchClient = _ref$transformSearchC === void 0 ? identity : _ref$transformSearchC,\n _ref$disableUserPerso = _ref.disableUserPersonalization,\n disableUserPersonalization = _ref$disableUserPerso === void 0 ? false : _ref$disableUserPerso,\n _ref$initialQuery = _ref.initialQuery,\n initialQueryFromProp = _ref$initialQuery === void 0 ? '' : _ref$initialQuery,\n _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n getMissingResultsUrl = _ref.getMissingResultsUrl,\n _ref$insights = _ref.insights,\n insights = _ref$insights === void 0 ? false : _ref$insights;\n\n var footerTranslations = translations.footer,\n searchBoxTranslations = translations.searchBox,\n screenStateTranslations = _objectWithoutProperties(translations, _excluded);\n\n var _React$useState = React.useState({\n query: '',\n collections: [],\n completion: null,\n context: {},\n isOpen: false,\n activeItemId: null,\n status: 'idle'\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n state = _React$useState2[0],\n setState = _React$useState2[1];\n\n var containerRef = React.useRef(null);\n var modalRef = React.useRef(null);\n var formElementRef = React.useRef(null);\n var dropdownRef = React.useRef(null);\n var inputRef = React.useRef(null);\n var snippetLength = React.useRef(10);\n var initialQueryFromSelection = React.useRef(typeof window !== 'undefined' ? window.getSelection().toString().slice(0, MAX_QUERY_SIZE) : '').current;\n var initialQuery = React.useRef(initialQueryFromProp || initialQueryFromSelection).current;\n var searchClient = useSearchClient(appId, apiKey, transformSearchClient);\n var favoriteSearches = React.useRef(createStoredSearches({\n key: \"__DOCSEARCH_FAVORITE_SEARCHES__\".concat(indexName),\n limit: 10\n })).current;\n var recentSearches = React.useRef(createStoredSearches({\n key: \"__DOCSEARCH_RECENT_SEARCHES__\".concat(indexName),\n // We display 7 recent searches and there's no favorites, but only\n // 4 when there are favorites.\n limit: favoriteSearches.getAll().length === 0 ? 7 : 4\n })).current;\n var saveRecentSearch = React.useCallback(function saveRecentSearch(item) {\n if (disableUserPersonalization) {\n return;\n } // We don't store `content` record, but their parent if available.\n\n\n var search = item.type === 'content' ? item.__docsearch_parent : item; // We save the recent search only if it's not favorited.\n\n if (search && favoriteSearches.getAll().findIndex(function (x) {\n return x.objectID === search.objectID;\n }) === -1) {\n recentSearches.add(search);\n }\n }, [favoriteSearches, recentSearches, disableUserPersonalization]);\n var sendItemClickEvent = React.useCallback(function (item) {\n if (!state.context.algoliaInsightsPlugin || !item.__autocomplete_id) return;\n var insightsItem = item;\n var insightsClickParams = {\n eventName: 'Item Selected',\n index: insightsItem.__autocomplete_indexName,\n items: [insightsItem],\n positions: [item.__autocomplete_id],\n queryID: insightsItem.__autocomplete_queryID\n };\n state.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(insightsClickParams);\n }, [state.context.algoliaInsightsPlugin]);\n var autocomplete = React.useMemo(function () {\n return createAutocomplete({\n id: 'docsearch',\n defaultActiveItemId: 0,\n placeholder: placeholder,\n openOnFocus: true,\n initialState: {\n query: initialQuery,\n context: {\n searchSuggestions: []\n }\n },\n insights: insights,\n navigator: navigator,\n onStateChange: function onStateChange(props) {\n setState(props.state);\n },\n getSources: function getSources(_ref2) {\n var query = _ref2.query,\n sourcesState = _ref2.state,\n setContext = _ref2.setContext,\n setStatus = _ref2.setStatus;\n\n if (!query) {\n if (disableUserPersonalization) {\n return [];\n }\n\n return [{\n sourceId: 'recentSearches',\n onSelect: function onSelect(_ref3) {\n var item = _ref3.item,\n event = _ref3.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref4) {\n var item = _ref4.item;\n return item.url;\n },\n getItems: function getItems() {\n return recentSearches.getAll();\n }\n }, {\n sourceId: 'favoriteSearches',\n onSelect: function onSelect(_ref5) {\n var item = _ref5.item,\n event = _ref5.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref6) {\n var item = _ref6.item;\n return item.url;\n },\n getItems: function getItems() {\n return favoriteSearches.getAll();\n }\n }];\n }\n\n var insightsActive = Boolean(insights);\n return searchClient.search([{\n query: query,\n indexName: indexName,\n params: _objectSpread({\n attributesToRetrieve: ['hierarchy.lvl0', 'hierarchy.lvl1', 'hierarchy.lvl2', 'hierarchy.lvl3', 'hierarchy.lvl4', 'hierarchy.lvl5', 'hierarchy.lvl6', 'content', 'type', 'url'],\n attributesToSnippet: [\"hierarchy.lvl1:\".concat(snippetLength.current), \"hierarchy.lvl2:\".concat(snippetLength.current), \"hierarchy.lvl3:\".concat(snippetLength.current), \"hierarchy.lvl4:\".concat(snippetLength.current), \"hierarchy.lvl5:\".concat(snippetLength.current), \"hierarchy.lvl6:\".concat(snippetLength.current), \"content:\".concat(snippetLength.current)],\n snippetEllipsisText: '…',\n highlightPreTag: '',\n highlightPostTag: '',\n hitsPerPage: 20,\n clickAnalytics: insightsActive\n }, searchParameters)\n }]).catch(function (error) {\n // The Algolia `RetryError` happens when all the servers have\n // failed, meaning that there's no chance the response comes\n // back. This is the right time to display an error.\n // See https://github.com/algolia/algoliasearch-client-javascript/blob/2ffddf59bc765cd1b664ee0346b28f00229d6e12/packages/transporter/src/errors/createRetryError.ts#L5\n if (error.name === 'RetryError') {\n setStatus('error');\n }\n\n throw error;\n }).then(function (_ref7) {\n var results = _ref7.results;\n var firstResult = results[0];\n var hits = firstResult.hits,\n nbHits = firstResult.nbHits;\n var sources = groupBy(hits, function (hit) {\n return removeHighlightTags(hit);\n }, maxResultsPerGroup); // We store the `lvl0`s to display them as search suggestions\n // in the \"no results\" screen.\n\n if (sourcesState.context.searchSuggestions.length < Object.keys(sources).length) {\n setContext({\n searchSuggestions: Object.keys(sources)\n });\n }\n\n setContext({\n nbHits: nbHits\n });\n var insightsParams = {};\n\n if (insightsActive) {\n insightsParams = {\n __autocomplete_indexName: indexName,\n __autocomplete_queryID: firstResult.queryID,\n __autocomplete_algoliaCredentials: {\n appId: appId,\n apiKey: apiKey\n }\n };\n }\n\n return Object.values(sources).map(function (items, index) {\n return {\n sourceId: \"hits\".concat(index),\n onSelect: function onSelect(_ref8) {\n var item = _ref8.item,\n event = _ref8.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref9) {\n var item = _ref9.item;\n return item.url;\n },\n getItems: function getItems() {\n return Object.values(groupBy(items, function (item) {\n return item.hierarchy.lvl1;\n }, maxResultsPerGroup)).map(transformItems).map(function (groupedHits) {\n return groupedHits.map(function (item) {\n var parent = null;\n var potentialParent = groupedHits.find(function (siblingItem) {\n return siblingItem.type === 'lvl1' && siblingItem.hierarchy.lvl1 === item.hierarchy.lvl1;\n });\n\n if (item.type !== 'lvl1' && potentialParent) {\n parent = potentialParent;\n }\n\n return _objectSpread(_objectSpread({}, item), {}, {\n __docsearch_parent: parent\n }, insightsParams);\n });\n }).flat();\n }\n };\n });\n });\n }\n });\n }, [indexName, searchParameters, maxResultsPerGroup, searchClient, onClose, recentSearches, favoriteSearches, saveRecentSearch, initialQuery, placeholder, navigator, transformItems, disableUserPersonalization, insights, appId, apiKey]);\n var getEnvironmentProps = autocomplete.getEnvironmentProps,\n getRootProps = autocomplete.getRootProps,\n refresh = autocomplete.refresh;\n useTouchEvents({\n getEnvironmentProps: getEnvironmentProps,\n panelElement: dropdownRef.current,\n formElement: formElementRef.current,\n inputElement: inputRef.current\n });\n useTrapFocus({\n container: containerRef.current\n });\n React.useEffect(function () {\n document.body.classList.add('DocSearch--active');\n return function () {\n var _window$scrollTo, _window;\n\n document.body.classList.remove('DocSearch--active'); // IE11 doesn't support `scrollTo` so we check that the method exists\n // first.\n\n (_window$scrollTo = (_window = window).scrollTo) === null || _window$scrollTo === void 0 || _window$scrollTo.call(_window, 0, initialScrollY);\n }; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(function () {\n var isMobileMediaQuery = window.matchMedia('(max-width: 768px)');\n\n if (isMobileMediaQuery.matches) {\n snippetLength.current = 5;\n }\n }, []);\n React.useEffect(function () {\n if (dropdownRef.current) {\n dropdownRef.current.scrollTop = 0;\n }\n }, [state.query]); // We don't focus the input when there's an initial query (i.e. Selection\n // Search) because users rather want to see the results directly, without the\n // keyboard appearing.\n // We therefore need to refresh the autocomplete instance to load all the\n // results, which is usually triggered on focus.\n\n React.useEffect(function () {\n if (initialQuery.length > 0) {\n refresh();\n\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }\n }, [initialQuery, refresh]); // We rely on a CSS property to set the modal height to the full viewport height\n // because all mobile browsers don't compute their height the same way.\n // See https://css-tricks.com/the-trick-to-viewport-units-on-mobile/\n\n React.useEffect(function () {\n function setFullViewportHeight() {\n if (modalRef.current) {\n var vh = window.innerHeight * 0.01;\n modalRef.current.style.setProperty('--docsearch-vh', \"\".concat(vh, \"px\"));\n }\n }\n\n setFullViewportHeight();\n window.addEventListener('resize', setFullViewportHeight);\n return function () {\n window.removeEventListener('resize', setFullViewportHeight);\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: containerRef\n }, getRootProps({\n 'aria-expanded': true\n }), {\n className: ['DocSearch', 'DocSearch-Container', state.status === 'stalled' && 'DocSearch-Container--Stalled', state.status === 'error' && 'DocSearch-Container--Errored'].filter(Boolean).join(' '),\n role: \"button\",\n tabIndex: 0,\n onMouseDown: function onMouseDown(event) {\n if (event.target === event.currentTarget) {\n onClose();\n }\n }\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Modal\",\n ref: modalRef\n }, /*#__PURE__*/React.createElement(\"header\", {\n className: \"DocSearch-SearchBar\",\n ref: formElementRef\n }, /*#__PURE__*/React.createElement(SearchBox, _extends({}, autocomplete, {\n state: state,\n autoFocus: initialQuery.length === 0,\n inputRef: inputRef,\n isFromSelection: Boolean(initialQuery) && initialQuery === initialQueryFromSelection,\n translations: searchBoxTranslations,\n onClose: onClose\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown\",\n ref: dropdownRef\n }, /*#__PURE__*/React.createElement(ScreenState, _extends({}, autocomplete, {\n indexName: indexName,\n state: state,\n hitComponent: hitComponent,\n resultsFooterComponent: resultsFooterComponent,\n disableUserPersonalization: disableUserPersonalization,\n recentSearches: recentSearches,\n favoriteSearches: favoriteSearches,\n inputRef: inputRef,\n translations: screenStateTranslations,\n getMissingResultsUrl: getMissingResultsUrl,\n onItemClick: function onItemClick(item, event) {\n // If insights is active, send insights click event\n sendItemClickEvent(item);\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n }\n }))), /*#__PURE__*/React.createElement(\"footer\", {\n className: \"DocSearch-Footer\"\n }, /*#__PURE__*/React.createElement(Footer, {\n translations: footerTranslations\n }))));\n}","import algoliasearch from 'algoliasearch/dist/algoliasearch-lite.esm.browser';\nimport React from 'react';\nimport { version } from './version';\nexport function useSearchClient(appId, apiKey, transformSearchClient) {\n var searchClient = React.useMemo(function () {\n var client = algoliasearch(appId, apiKey);\n client.addAlgoliaAgent('docsearch', version); // Since DocSearch.js relies on DocSearch React with an alias to Preact,\n // we cannot add the `docsearch-react` user agent by default, otherwise\n // it would also be sent on a DocSearch.js integration.\n // We therefore only add the `docsearch-react` user agent if `docsearch.js`\n // is not present.\n\n if (/docsearch.js \\(.*\\)/.test(client.transporter.userAgent.value) === false) {\n client.addAlgoliaAgent('docsearch-react', version);\n }\n\n return transformSearchClient(client);\n }, [appId, apiKey, transformSearchClient]);\n return searchClient;\n}","import React from 'react';\nexport function useTouchEvents(_ref) {\n var getEnvironmentProps = _ref.getEnvironmentProps,\n panelElement = _ref.panelElement,\n formElement = _ref.formElement,\n inputElement = _ref.inputElement;\n React.useEffect(function () {\n if (!(panelElement && formElement && inputElement)) {\n return undefined;\n }\n\n var _getEnvironmentProps = getEnvironmentProps({\n panelElement: panelElement,\n formElement: formElement,\n inputElement: inputElement\n }),\n onTouchStart = _getEnvironmentProps.onTouchStart,\n onTouchMove = _getEnvironmentProps.onTouchMove;\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchmove', onTouchMove);\n return function () {\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchmove', onTouchMove);\n };\n }, [getEnvironmentProps, panelElement, formElement, inputElement]);\n}","import React from 'react';\nexport function useTrapFocus(_ref) {\n var container = _ref.container;\n React.useEffect(function () {\n if (!container) {\n return undefined;\n }\n\n var focusableElements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input:not([disabled])');\n var firstElement = focusableElements[0];\n var lastElement = focusableElements[focusableElements.length - 1];\n\n function trapFocus(event) {\n if (event.key !== 'Tab') {\n return;\n }\n\n if (event.shiftKey) {\n if (document.activeElement === firstElement) {\n event.preventDefault();\n lastElement.focus();\n }\n } else if (document.activeElement === lastElement) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n\n container.addEventListener('keydown', trapFocus);\n return function () {\n container.removeEventListener('keydown', trapFocus);\n };\n }, [container]);\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport React from 'react';\nimport { createPortal } from 'react-dom';\nimport { DocSearchButton } from './DocSearchButton';\nimport { DocSearchModal } from './DocSearchModal';\nimport { useDocSearchKeyboardEvents } from './useDocSearchKeyboardEvents';\nexport function DocSearch(props) {\n var _props$translations, _props$translations2;\n\n var searchButtonRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isOpen = _React$useState2[0],\n setIsOpen = _React$useState2[1];\n\n var _React$useState3 = React.useState((props === null || props === void 0 ? void 0 : props.initialQuery) || undefined),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n initialQuery = _React$useState4[0],\n setInitialQuery = _React$useState4[1];\n\n var onOpen = React.useCallback(function () {\n setIsOpen(true);\n }, [setIsOpen]);\n var onClose = React.useCallback(function () {\n setIsOpen(false);\n }, [setIsOpen]);\n var onInput = React.useCallback(function (event) {\n setIsOpen(true);\n setInitialQuery(event.key);\n }, [setIsOpen, setInitialQuery]);\n useDocSearchKeyboardEvents({\n isOpen: isOpen,\n onOpen: onOpen,\n onClose: onClose,\n onInput: onInput,\n searchButtonRef: searchButtonRef\n });\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DocSearchButton, {\n ref: searchButtonRef,\n translations: props === null || props === void 0 || (_props$translations = props.translations) === null || _props$translations === void 0 ? void 0 : _props$translations.button,\n onClick: onOpen\n }), isOpen && createPortal( /*#__PURE__*/React.createElement(DocSearchModal, _extends({}, props, {\n initialScrollY: window.scrollY,\n initialQuery: initialQuery,\n translations: props === null || props === void 0 || (_props$translations2 = props.translations) === null || _props$translations2 === void 0 ? void 0 : _props$translations2.modal,\n onClose: onClose\n })), document.body));\n}","import React from 'react';\n\nfunction isEditingContent(event) {\n var element = event.target;\n var tagName = element.tagName;\n return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';\n}\n\nexport function useDocSearchKeyboardEvents(_ref) {\n var isOpen = _ref.isOpen,\n onOpen = _ref.onOpen,\n onClose = _ref.onClose,\n onInput = _ref.onInput,\n searchButtonRef = _ref.searchButtonRef;\n React.useEffect(function () {\n function onKeyDown(event) {\n var _event$key;\n\n function open() {\n // We check that no other DocSearch modal is showing before opening\n // another one.\n if (!document.body.classList.contains('DocSearch--active')) {\n onOpen();\n }\n }\n\n if (event.keyCode === 27 && isOpen || // The `Cmd+K` shortcut both opens and closes the modal.\n // We need to check for `event.key` because it can be `undefined` with\n // Chrome's autofill feature.\n // See https://github.com/paperjs/paper.js/issues/1398\n ((_event$key = event.key) === null || _event$key === void 0 ? void 0 : _event$key.toLowerCase()) === 'k' && (event.metaKey || event.ctrlKey) || // The `/` shortcut opens but doesn't close the modal because it's\n // a character.\n !isEditingContent(event) && event.key === '/' && !isOpen) {\n event.preventDefault();\n\n if (isOpen) {\n onClose();\n } else if (!document.body.classList.contains('DocSearch--active')) {\n open();\n }\n }\n\n if (searchButtonRef && searchButtonRef.current === document.activeElement && onInput) {\n if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) {\n onInput(event);\n }\n }\n }\n\n window.addEventListener('keydown', onKeyDown);\n return function () {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [isOpen, onOpen, onClose, onInput, searchButtonRef]);\n}","import React, { useCallback, useEffect, useRef } from 'react'\nimport { createGlobalStyle, css } from 'styled-components'\nimport { useAppDispatch, useAppSelector } from 'hooks/useRedux'\nimport { selectKeyNavigating } from 'components/KeyEvents/keyEventsReducer'\nimport { DocSearch } from '@docsearch/react'\nimport { buttonBareStyles } from 'components/Button/ButtonBare'\nimport { linkContentStyles } from 'components/Link/LinkContent'\nimport { createPlaceholderStyles } from 'utils/createPlaceholderStyles'\nimport { createSquareSizeStyles } from 'utils/createSquareSizeStyles'\nimport { BRAND_GRADIENT_BACKGROUND_STYLES } from 'consts/gradients'\nimport { BRAND_GRADIENT_TEXT_STYLES } from 'consts/gradients'\nimport { visuallyHiddenStyles } from 'utils/visuallyHiddenStyles'\nimport { ALGOLIA_CLASSNAMES, ALGOLIA_SEARCH_CONFIG } from 'consts/algoliaSearch'\nimport { MODALS } from 'consts/modal'\nimport { MEDIA } from 'consts/breakpoints'\nimport { LAYERS } from 'consts/layers'\nimport { SPACINGS } from 'consts/spacings'\nimport { THEME_KEYS, THEME_PREFIX, COLORS } from 'consts/themes'\nimport { FONT_SIZES, FONT_WEIGHTS } from 'consts/fontSizes'\nimport { BORDER_RADIUSES, BORDER_SIZES } from 'consts/border'\nimport { KEY_NAVIGATING_STYLES } from 'consts/keyEvents'\nimport { isBrowser } from 'utils/isBrowser'\nimport {\n selectIsModalOpen,\n setModalClosed,\n setModalOpen\n} from 'components/Modal/modalReducer'\nimport {\n searchButtonIconStyles,\n searchButtonStyles\n} from 'components/Search/SearchButton'\n\nconst MODAL_MAX_WIDTH = '56rem'\nconst INPUT_BORDER_SIZE = '0.2rem'\nconst SVG_STROKE_WIDTH = '0.14rem'\nconst INPUT_HEIGHT = SPACINGS.NINE\nconst BUTTON_WIDTH = SPACINGS.EIGHT\nconst DESKTOP_END_SPACING = SPACINGS.TEN\nconst EDGE_SPACING = SPACINGS.TWO\n\nconst modalStyles = css`\n .DocSearch-Container {\n z-index: ${LAYERS.SEARCH};\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n &:before {\n position: absolute;\n opacity: 0.9;\n background-color: ${COLORS.BACKGROUND_SITE};\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n content: '';\n display: flex;\n }\n }\n\n .DocSearch-Container a {\n text-decoration: none;\n }\n\n .DocSearch-Modal {\n padding: ${EDGE_SPACING};\n box-shadow: 0 0 0 ${BORDER_SIZES.DETAIL} ${COLORS.DETAIL_LOW_CONTRAST};\n background-color: ${COLORS.BACKGROUND_SITE};\n z-index: ${LAYERS.STEP};\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n height: 100vh;\n\n ${MEDIA.DESKTOP} {\n border-radius: ${BORDER_RADIUSES.SOFT};\n max-width: ${MODAL_MAX_WIDTH};\n margin: ${DESKTOP_END_SPACING} auto;\n height: calc(100vh - ${DESKTOP_END_SPACING} * 2);\n }\n }\n`\n\nconst headerStyles = css`\n .DocSearch-SearchBar {\n display: flex;\n flex: 0 0 auto;\n }\n\n .DocSearch-Form {\n padding: ${INPUT_BORDER_SIZE};\n position: relative;\n width: 100%;\n border-radius: ${BORDER_RADIUSES.BOX};\n ${BRAND_GRADIENT_BACKGROUND_STYLES};\n }\n`\n\nconst contentStyles = css`\n .DocSearch-NoResults,\n .DocSearch-StartScreen,\n .DocSearch-ErrorScreen {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n padding: ${SPACINGS.SIX} 0;\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n margin: 0 auto;\n text-align: center;\n width: 80%;\n }\n\n .DocSearch-Screen-Icon {\n color: ${COLORS.DETAIL_HIGH_CONTRAST};\n padding-bottom: ${EDGE_SPACING};\n\n > svg {\n ${createSquareSizeStyles('4rem')}\n }\n }\n\n .DocSearch-Title {\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n margin-bottom: ${SPACINGS.THREE};\n font-size: ${FONT_SIZES.H4};\n }\n\n .DocSearch-Help a {\n ${linkContentStyles};\n ${KEY_NAVIGATING_STYLES};\n }\n\n .DocSearch-Dropdown {\n overflow-y: auto;\n overflow-x: hidden;\n flex: 1 1 0;\n }\n\n .DocSearch-Help {\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n margin: 0;\n user-select: none;\n }\n\n .DocSearch-Hits mark {\n ${BRAND_GRADIENT_TEXT_STYLES};\n }\n\n .DocSearch-HitsFooter {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n display: flex;\n justify-content: center;\n }\n\n .DocSearch-HitsFooter a {\n padding-top: ${EDGE_SPACING};\n margin-bottom: ${EDGE_SPACING};\n border-bottom: ${BORDER_SIZES.DETAIL} solid;\n color: inherit;\n display: inline-flex;\n }\n\n .DocSearch-Hit {\n padding-bottom: ${SPACINGS.CUSTOM(({ ONE }) => ONE - 0.2)};\n border-radius: ${BORDER_RADIUSES.BOX};\n display: flex;\n position: relative;\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n .DocSearch-Hit--deleting {\n transition: none;\n }\n }\n\n .DocSearch-Hit--deleting {\n opacity: 0;\n transition: all 250ms linear;\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n .DocSearch-Hit--favoriting {\n transition: none;\n }\n }\n\n .DocSearch-Hit--favoriting {\n transform: scale(0);\n transform-origin: top center;\n transition: all 250ms linear;\n transition-delay: 250ms;\n }\n\n .DocSearch-Hit a {\n ${KEY_NAVIGATING_STYLES};\n outline-offset: -${BORDER_SIZES.OUTLINE};\n background-color: ${COLORS.BACKGROUND_CODE};\n padding-left: ${EDGE_SPACING};\n border-radius: ${BORDER_RADIUSES.BOX};\n display: block;\n width: 100%;\n }\n\n .DocSearch-Hit-source {\n background-color: ${COLORS.BACKGROUND_SITE};\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n margin: 0 -${SPACINGS.CUSTOM(({ ONE }) => ONE - 0.2)};\n padding: ${SPACINGS.CUSTOM(({ ONE }) => ONE + 0.2)}\n ${SPACINGS.CUSTOM(({ ONE }) => ONE - 0.2)} 0;\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n font-weight: ${FONT_WEIGHTS.SEMI_BOLD};\n line-height: 3.2rem;\n position: sticky;\n top: 0;\n z-index: 10;\n }\n\n .DocSearch-Hit-Tree {\n ${MEDIA.COMPACT} {\n display: none;\n }\n ${MEDIA.DESKTOP} {\n color: ${COLORS.DETAIL_HIGH_CONTRAST};\n height: ${INPUT_HEIGHT};\n opacity: 0.5;\n stroke-width: ${SVG_STROKE_WIDTH};\n width: ${SPACINGS.FOUR};\n }\n }\n\n .DocSearch-Hit[aria-selected='true'] a {\n position: relative;\n display: block;\n\n &:before,\n &:after {\n content: '';\n position: absolute;\n pointer-events: none;\n top: 0;\n bottom: 0;\n left: 0;\n ${BRAND_GRADIENT_BACKGROUND_STYLES};\n }\n\n &:before {\n width: 0.4rem;\n }\n &:after {\n border-radius: ${BORDER_RADIUSES.BOX};\n right: 0;\n opacity: 0.07;\n }\n }\n\n .DocSearch-Hit-Container {\n color: ${COLORS.TEXT_MEDIUM_CONTRAST};\n height: ${INPUT_HEIGHT};\n padding: 0 ${EDGE_SPACING} 0 0;\n align-items: center;\n display: flex;\n flex-direction: row;\n }\n\n .DocSearch-Hit-icon {\n ${createSquareSizeStyles('2rem')}\n color: ${COLORS.DETAIL_HIGH_CONTRAST};\n stroke-width: ${SVG_STROKE_WIDTH};\n }\n\n .DocSearch-Hit-action {\n ${createSquareSizeStyles('2.2rem')};\n color: ${COLORS.DETAIL_HIGH_CONTRAST};\n stroke-width: ${SVG_STROKE_WIDTH};\n align-items: center;\n display: flex;\n\n > svg {\n ${createSquareSizeStyles('1.8rem')};\n display: block;\n }\n }\n\n .DocSearch-Hit-action + .DocSearch-Hit-action {\n margin-left: ${SPACINGS.ONE};\n }\n\n .DocSearch-Hit-action-button {\n ${buttonBareStyles};\n color: inherit;\n padding: ${SPACINGS.CUSTOM(({ ONE }) => ONE - 0.4)};\n }\n\n svg.DocSearch-Hit-Select-Icon {\n display: none;\n }\n\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-Select-Icon {\n display: block;\n }\n\n .DocSearch-Hit-action-button:hover path,\n .DocSearch-Hit-action-button:focus path {\n fill: ${COLORS.TEXT_MEDIUM_CONTRAST};\n }\n\n .DocSearch-Hit-content-wrapper {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n font-weight: ${FONT_WEIGHTS.MEDIUM};\n justify-content: center;\n line-height: 1.2em;\n margin: 0 ${SPACINGS.CUSTOM(({ ONE }) => ONE + 0.2)};\n overflow-x: hidden;\n position: relative;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 80%;\n }\n\n .DocSearch-Hit-title {\n font-size: ${FONT_SIZES.CUSTOM(\n ({ COMPLEMENTARY }) => COMPLEMENTARY + 0.04\n )};\n }\n\n .DocSearch-Hit-path {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n font-size: ${FONT_SIZES.DETAIL};\n }\n\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-title,\n .DocSearch-Hit[aria-selected='true'] mark,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-text,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-path,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-icon,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-action,\n .DocSearch-Hit[aria-selected='true'] .DocSearch-Hit-Tree {\n color: ${COLORS.TEXT_HIGH_CONTRAST} !important;\n }\n\n .DocSearch-NoResults-Prefill-List {\n padding-bottom: ${SPACINGS.THREE};\n\n > ul {\n padding-top: ${SPACINGS.ONE};\n font-size: ${FONT_SIZES.COMPLEMENTARY};\n display: inline-block;\n }\n\n li {\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n list-style-position: inside;\n list-style-type: '» ';\n text-align: left;\n }\n }\n\n .DocSearch-Prefill {\n ${buttonBareStyles};\n ${linkContentStyles};\n padding-top: ${SPACINGS.ONE};\n padding-bottom: ${SPACINGS.ONE};\n }\n`\n\nconst footerStyles = css`\n .DocSearch-Footer {\n flex: 0 0 auto;\n padding-top: ${EDGE_SPACING};\n display: flex;\n flex-direction: row-reverse;\n flex-shrink: 0;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n }\n\n .DocSearch-Logo a {\n ${KEY_NAVIGATING_STYLES};\n display: flex;\n }\n\n .DocSearch-Logo svg {\n color: #5468ff;\n margin-left: ${SPACINGS.CUSTOM(({ ONE }) => ONE + 0.2)};\n }\n\n .DocSearch-Label {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n font-size: ${FONT_SIZES.DETAIL};\n line-height: 1.9rem;\n }\n\n .DocSearch-Commands {\n color: ${COLORS.TEXT_LOW_CONTRAST};\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n\n ${MEDIA.COMPACT} {\n display: none;\n }\n }\n\n .DocSearch-Commands li {\n align-items: center;\n display: flex;\n }\n\n .DocSearch-Commands li:not(:last-of-type) {\n margin-right: ${SPACINGS.CUSTOM(({ ONE }) => ONE + 0.2)};;\n }\n\n .DocSearch-Commands-Key {\n align-items: center;\n border-radius: ${BORDER_RADIUSES.LINE};\n background: linear-gradient(\n -225deg,\n ${COLORS.DETAIL_MEDIUM_CONTRAST} 0%,\n ${COLORS.DETAIL_HIGH_CONTRAST} 100%\n );\n box-shadow: inset 0 -0.2rem 0 0 ${COLORS.DETAIL_LOW_CONTRAST};,\n inset 0 0 0.1rem 0.1rem ${COLORS.DETAIL_MEDIUM_CONTRAST},\n 0 0.1rem 0.2rem 0.1rem rgba(${\n COLORS.DETAIL_HIGH_CONTRAST_RGB_VALUE\n }, 0.4);\n display: flex;\n height: 1.8rem;\n justify-content: center;\n margin-right: 0.4em;\n padding-bottom: 0.1rem;\n width: 2rem;\n }\n\n .${THEME_PREFIX}${THEME_KEYS.LIGHT} {\n .DocSearch-Commands-Key {\n background: linear-gradient(\n -225deg,\n ${COLORS.DETAIL_HIGH_CONTRAST} 0%,\n ${COLORS.DETAIL_MEDIUM_CONTRAST} 100%\n );\n box-shadow: inset 0 -0.2rem 0 0 ${COLORS.DETAIL_HIGH_CONTRAST},\n inset 0 0 0.1rem 0.1rem ${COLORS.DETAIL_MEDIUM_CONTRAST},\n 0 0.1rem 0.2rem 0.1rem rgba(${\n COLORS.DETAIL_LOW_CONTRAST_RGB_VALUE\n }, 0.4);\n }\n }\n .${THEME_PREFIX}${THEME_KEYS.DARK} {\n .DocSearch-Commands-Key {\n background: linear-gradient(\n -225deg,\n ${COLORS.DETAIL_MEDIUM_CONTRAST} 0%,\n ${COLORS.DETAIL_HIGH_CONTRAST} 100%\n );\n box-shadow: inset 0 -0.2rem 0 0 ${COLORS.DETAIL_LOW_CONTRAST};,\n inset 0 0 0.1rem 0.1rem ${COLORS.DETAIL_MEDIUM_CONTRAST},\n 0 0.1rem 0.2rem 0.1rem rgba(${\n COLORS.DETAIL_HIGH_CONTRAST_RGB_VALUE\n }, 0.4);\n }\n }\n`\n\nconst inputStyles = css`\n .DocSearch-Input {\n ${createPlaceholderStyles(COLORS.TEXT_LOW_CONTRAST)};\n ${KEY_NAVIGATING_STYLES};\n height: calc(${INPUT_HEIGHT} - (${INPUT_BORDER_SIZE} * 2));\n padding-left: ${BUTTON_WIDTH};\n padding-right: ${BUTTON_WIDTH};\n -webkit-appearance: none;\n appearance: none;\n border-radius: ${BORDER_RADIUSES.BOX};\n width: 100%;\n font-size: ${FONT_SIZES.H4};\n background-color: ${COLORS.BACKGROUND_SITE};\n color: ${COLORS.TEXT_BODY};\n border: 0;\n }\n\n .DocSearch-Input::-ms-clear {\n display: none;\n ${createSquareSizeStyles('0')};\n }\n .DocSearch-Input::-ms-reveal {\n display: none;\n ${createSquareSizeStyles('0')};\n }\n .DocSearch-Input::-webkit-search-decoration,\n .DocSearch-Input::-webkit-search-cancel-button,\n .DocSearch-Input::-webkit-search-results-button,\n .DocSearch-Input::-webkit-search-results-decoration {\n display: none;\n }\n\n .DocSearch-VisuallyHiddenForAccessibility {\n ${visuallyHiddenStyles};\n }\n`\n\nconst toggleButtonStyles = css`\n .DocSearch-Button {\n ${searchButtonStyles};\n\n &:hover {\n box-shadow: none;\n }\n }\n .DocSearch-Button-Placeholder,\n .DocSearch-Button-Keys {\n ${visuallyHiddenStyles}\n }\n .DocSearch-Search-Icon {\n ${searchButtonIconStyles};\n }\n`\n\nconst magnifyerButtonStyles = css`\n .DocSearch-MagnifierLabel {\n display: flex;\n width: ${BUTTON_WIDTH};\n top: ${INPUT_BORDER_SIZE};\n bottom: ${INPUT_BORDER_SIZE};\n position: absolute;\n align-items: center;\n justify-content: center;\n\n > svg {\n ${createSquareSizeStyles('2.35rem')};\n }\n }\n\n .DocSearch-Container--Stalled .DocSearch-MagnifierLabel {\n display: none;\n }\n`\n\nconst resetButtonStyles = css`\n .DocSearch-Reset {\n ${buttonBareStyles};\n width: ${BUTTON_WIDTH};\n top: ${INPUT_BORDER_SIZE};\n bottom: ${INPUT_BORDER_SIZE};\n right: ${INPUT_BORDER_SIZE};\n display: flex;\n position: absolute;\n align-items: center;\n justify-content: center;\n stroke-width: 0.2rem;\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n\n > svg {\n ${createSquareSizeStyles('2.35rem')};\n }\n }\n\n .DocSearch-Reset[hidden] {\n display: none;\n }\n`\n\nconst cancelButtonStyles = css`\n .DocSearch-Cancel {\n ${buttonBareStyles};\n color: ${COLORS.TEXT_BODY};\n height: ${INPUT_HEIGHT};\n display: flex;\n align-items: center;\n margin-left: ${SPACINGS.CUSTOM(({ TWO }) => TWO - 0.2)};\n }\n`\n\nconst loadingIndicatorStyles = css`\n .DocSearch-LoadingIndicator {\n width: ${BUTTON_WIDTH};\n top: ${INPUT_BORDER_SIZE};\n bottom: ${INPUT_BORDER_SIZE};\n position: absolute;\n align-items: center;\n justify-content: center;\n color: ${COLORS.TEXT_HIGH_CONTRAST};\n display: none;\n\n > svg {\n ${createSquareSizeStyles('2.35rem')};\n }\n }\n\n .DocSearch-Container--Stalled .DocSearch-LoadingIndicator {\n display: flex;\n }\n`\n\nconst SearchStyles = createGlobalStyle<{ $isKeyNavigating: boolean }>`\n ${modalStyles};\n ${headerStyles};\n ${contentStyles};\n ${footerStyles};\n ${inputStyles};\n ${toggleButtonStyles};\n ${magnifyerButtonStyles};\n ${resetButtonStyles};\n ${cancelButtonStyles};\n ${loadingIndicatorStyles};\n`\n\nexport const SearchAlgolia = () => {\n const isKeyNavigating = useAppSelector(selectKeyNavigating)\n const isSearchOpen = useAppSelector(selectIsModalOpen(MODALS.SITE_SEARCH))\n const isSearchInitiallyOpenRef = useRef(isSearchOpen)\n const closeSearchRef = useRef<() => void>()\n const toggleElement = useRef(null)\n const dispatch = useAppDispatch()\n\n const openSearch = useCallback(() => {\n dispatch(setModalOpen(MODALS.SITE_SEARCH))\n }, [dispatch])\n\n const closeSearch = useCallback(() => {\n dispatch(setModalClosed(MODALS.SITE_SEARCH))\n }, [dispatch])\n\n useEffect(() => {\n if (!isBrowser || toggleElement.current) return\n\n toggleElement.current = document.querySelector(\n `.${ALGOLIA_CLASSNAMES.SEARCH_TOGGLE_BUTTON}`\n )\n\n if (toggleElement.current) {\n toggleElement.current.addEventListener('click', openSearch)\n }\n\n return () => {\n if (toggleElement.current) {\n toggleElement.current.removeEventListener('click', openSearch)\n }\n }\n }, [openSearch])\n\n useEffect(() => {\n if (!toggleElement.current || !isSearchInitiallyOpenRef.current) return\n toggleElement.current.click()\n }, [])\n\n useEffect(() => {\n if (!isBrowser) return\n const { body } = document\n\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type !== 'attributes') return\n\n if (!body.classList.contains(ALGOLIA_CLASSNAMES.SEARCH_ACTIVE)) {\n closeSearchRef.current?.()\n return\n }\n\n const input = body.querySelector(`.${ALGOLIA_CLASSNAMES.SEARCH_INPUT}`)\n if (input) setTimeout(() => (input as HTMLInputElement).focus(), 0)\n })\n })\n\n observer.observe(body, {\n attributes: true,\n childList: false,\n subtree: false\n })\n\n return () => observer.disconnect()\n }, [])\n\n useEffect(() => {\n closeSearchRef.current = closeSearch\n }, [closeSearch])\n\n return (\n <>\n \n \n >\n )\n}\n","import { css, FlattenSimpleInterpolation } from 'styled-components'\n\nexport const createPlaceholderStyles = (\n color: string\n): FlattenSimpleInterpolation => css`\n ::-webkit-input-placeholder {\n color: ${color};\n }\n :-moz-placeholder {\n color: ${color};\n opacity: 1;\n }\n ::-moz-placeholder {\n color: ${color};\n opacity: 1;\n }\n :-ms-input-placeholder {\n color: ${color};\n }\n ::-ms-input-placeholder {\n color: ${color};\n }\n ::placeholder {\n color: ${color};\n }\n`\n"],"names":["ControlKeyIcon","width","height","className","d","strokeWidth","stroke","fill","strokeLinecap","SearchIcon","viewBox","fillRule","strokeLinejoin","_excluded","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_i","Symbol","iterator","_s","_e","_arr","_n","_d","next","done","push","value","err","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","len","arr2","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","ACTION_KEY_DEFAULT","DocSearchButton","_ref","ref","_ref$translations","translations","props","_translations$buttonT","buttonText","_translations$buttonA","buttonAriaLabel","_useState2","useState","setKey","useEffect","navigator","platform","type","DocSearchButtonKey","reactsToKey","_ref2","children","_useState4","isKeyDown","setIsKeyDown","window","addEventListener","handleKeyDown","handleKeyUp","removeEventListener","e","debounce","fn","time","timerId","undefined","_len","args","_key","clearTimeout","setTimeout","isPrimitive","obj","isEqual","first","second","_Object$keys","noop","createClickedEvent","item","items","index","__autocomplete_indexName","positions","findIndex","x","objectID","queryID","__autocomplete_queryID","algoliaSource","_x","_r","return","_excluded2","_typeof","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","arg","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","mapToInsightsParamsApi","params","map","param","objectIDs","createSearchInsightsApi","searchInsights","_split$map2","major","minor","canSendHeaders","version","split","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","headers","appId","apiKey","concat","init","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","reduce","acc","_ref3","chunkSize","chunks","chunk","_ref4","payload","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","current","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","state","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","options","_getOptions","_ref8","onSelect","_ref9","onActive","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onActiveEvent","callback","safelyRunOnBrowser","pointer","AlgoliaAnalyticsObject","queue","environment","errorMessage","script","document","createElement","async","src","onerror","console","error","body","appendChild","cause","loadInsights","previousItems","debouncedOnStateChange","isOpen","collections","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","createStore","reducer","onStoreStateChange","list","initialState","getState","dispatch","action","prevState","pendingRequests","add","cancelablePromise","finally","cancelAll","promise","cancel","isEmpty","flatten","values","a","b","getItemsCount","sum","collection","autocompleteId","getDefaultProps","pluginSubscribers","_props$id","plugins","debug","openOnFocus","placeholder","autoFocus","defaultActiveItemId","stallThreshold","shouldPanelOpen","reshape","sources","id","activeItemId","query","completion","status","context","_props$onStateChange","_x$onStateChange","onSubmit","_props$onSubmit","_x$onSubmit","onReset","_props$onReset","_x$onReset","getSources","Promise","all","plugin","Boolean","seenSourceIds","resolve","then","maybeSource","sourceId","includes","Error","JSON","stringify","defaultSource","getItemInputValue","getItemUrl","setIsOpen","onResolve","__default","normalizedSource","getNormalizedSources","nested","_x$onSelect","_x$onActive","_x$onResolve","navigate","itemUrl","location","navigateNewTab","windowReference","open","focus","navigateNewWindow","isDescription","execute","preResolve","itemsOrDescription","description","contextParameters","requesterId","_state$context$key","requests","queries","transformResponse","searchClient","container","find","_container$items","request","maybeDescription","responses","postResolve","store","rawResults","matches","response","results","transform","hits","result","facetHits","_facetHits","facetHit","label","count","_highlightResult","highlighted","every","createInternalCancelablePromise","onfulfilled","onrejected","createCallback","catch","onfinally","onCancelList","isCanceled","callbacks","createCancelablePromise","executor","reject","cancelable","onResult","fallback","getActiveItem","collectionIndex","collectionsCount","nextValue","getCollectionFromActiveItemId","isOffsetFound","counter","previousItemsOffset","currentCollection","getRelativeActiveItemId","itemInputValue","reason","basePromiseId","latestResolvedId","latestResolvedValue","lastStalledId","runConcurrentSafePromise","currentPromiseId","onInput","_ref$nextState","nextState","refresh","setters","setCollections","setQuery","setActiveItemId","setStatus","_nextState$isOpen","_request","getItems","originalSourcesBySourceId","sourcesBySourceId","_nextState$isOpen2","isPanelOpen","highlightedItem","regex","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","getPropGetters","getAutocompleteId","instanceId","getEnvironmentProps","providedProps","inputElement","formElement","panelElement","onMouseDownOrTouchStart","some","contextNode","parent","child","contains","onTouchStart","onMouseDown","onTouchMove","activeElement","blur","getRootProps","rest","role","getFormProps","noValidate","_providedProps$inputE","preventDefault","_providedProps$inputE2","getLabelProps","sourceIndex","htmlFor","getInputProps","_props$environment$na","onFocus","_ref2$maxLength","maxLength","activeItem","shouldFallbackKeyHint","userAgent","match","isSamsung","enterKeyHint","autoComplete","autoCorrect","autoCapitalize","spellCheck","onChange","currentTarget","onKeyDown","triggerScrollIntoView","nodeItem","getElementById","scrollIntoViewIfNeeded","scrollIntoView","triggerOnActive","nextActiveItemId","metaKey","ctrlKey","shiftKey","altKey","onBlur","onClick","getPanelProps","onMouseLeave","getListProps","getItemProps","__autocomplete_id","onMouseMove","_item","_source","userAgents","segment","getMetadata","_","_options$__autocomple","_options$__autocomple2","_options$__autocomple3","optionsKey","__autocomplete_metadata","extraOptions","ua","getCompletion","_getActiveItem","getNextActiveItemId","moveAmount","baseIndex","itemCount","numericIndex","stateReducer","_nextState","createAutocomplete","subscribers","rawValue","baseItemId","getAutocompleteSetters","propGetters","Event","insightsParams","_plugin$subscribe","_environment$navigato","_environment$navigato2","metadata","metadataContainer","headRef","querySelector","content","injectMetadata","MAX_QUERY_SIZE","AlgoliaLogo","_translations$searchB","searchByText","href","hostname","rel","xmlns","y","rx","ry","CommandIcon","ariaLabel","Footer","_translations$selectT","selectText","_translations$selectK","selectKeyAriaLabel","_translations$navigat","navigateText","_translations$navigat2","navigateUpKeyAriaLabel","_translations$navigat3","navigateDownKeyAriaLabel","_translations$closeTe","closeText","_translations$closeKe","closeKeyAriaLabel","Hit","url","ErrorIcon","ErrorScreen","_translations$titleTe","titleText","_translations$helpTex","helpText","NoResultsIcon","NoResultsScreen","_translations$noResul","noResultsText","_translations$suggest","suggestedQueryText","_translations$reportM","reportMissingResultsText","_translations$reportM2","reportMissingResultsLinkText","searchSuggestions","search","toLowerCase","inputRef","getMissingResultsUrl","LvlIcon","SourceIcon","ContentIcon","AnchorIcon","SelectIcon","getPropertyByPath","path","prev","Snippet","attribute","_ref$tagName","tagName","dangerouslySetInnerHTML","__html","Results","title","Result","join","renderIcon","renderAction","onItemClick","hitComponent","_React$useState2","isDeleting","setIsDeleting","_React$useState4","isFavoriting","setIsFavoriting","__docsearch_parent","onTransitionEnd","hierarchy","runDeleteTransition","cb","runFavoriteTransition","regexHighlightTags","regexHasHighlightTags","RegExp","removeHighlightTags","_internalDocSearchHit","_hit$_highlightResult","internalDocSearchHit","lvl0","replace","ResultsScreen","_collection$items","resultsFooterComponent","RecentIcon","StarIcon","ResetIcon","StartScreen","_translations$recentS","recentSearchesTitle","_translations$noRecen","noRecentSearchesText","_translations$saveRec","saveRecentSearchButtonTitle","_translations$removeR","removeRecentSearchButtonTitle","_translations$favorit","favoriteSearchesTitle","_translations$removeF","removeFavoriteSearchButtonTitle","hasCollections","disableUserPersonalization","stopPropagation","favoriteSearches","recentSearches","remove","ScreenState","errorScreen","noResultsScreen","startScreen","_prevProps","nextProps","LoadingIcon","strokeOpacity","cx","cy","r","attributeName","to","dur","repeatCount","SearchBox","_translations$resetBu","resetButtonTitle","_translations$resetBu2","resetButtonAriaLabel","_translations$cancelB","cancelButtonText","_translations$cancelB2","cancelButtonAriaLabel","_translations$searchI","searchInputLabel","isFromSelection","select","hidden","onClose","createStorage","localStorage","setItem","removeItem","isLocalStorageSupported","getItem","parse","createStoredSearches","_ref$limit","limit","storage","_snippetResult","isQueryAlreadySaved","splice","unshift","getAll","createBrowserLocalStorageCache","namespaceKey","getStorage","getNamespace","setNamespace","namespace","get","defaultValue","events","miss","timeToLive","filteredNamespaceWithoutOldFormattedCacheItems","fromEntries","entries","cacheItem","timestamp","filteredNamespaceWithoutExpiredItems","currentTimestamp","Date","getTime","removeOutdatedCacheItems","keyAsString","exists","set","clear","createFallbackableCache","caches","shift","delete","createInMemoryCache","serializable","cache","shuffle","array","c","Math","floor","random","addMethods","base","methods","encode","format","encodeURIComponent","AuthMode","WithinQueryParameters","WithinHeaders","createMappedRequestOptions","requestOptions","timeout","data","queryParameters","cacheable","CallEnum","Read","Write","Any","HostStatusEnum","Up","Down","Timeouted","EXPIRATION_DELAY","createStatefulHost","host","lastUpdate","now","createStatelessHost","protocol","accept","MethodEnum","Delete","Get","Post","Put","createRetryableOptions","hostsCache","statelessHosts","statelessHost","statefulHosts","hostsUp","isStatefulHostUp","hostsTimeouted","isStatefulHostTimeouted","hostsAvailable","statelessHostsAvailable","getTimeout","timeoutsCount","baseTimeout","retryDecision","outcomes","isTimedOut","isNetworkError","isRetryable","onRetry","isSuccess","onSuccess","onFail","retryableRequest","transporter","stackTrace","serializeData","serializedHeaders","header","serializeHeaders","dataQueryParameters","retry","hosts","pop","message","transporterStackTrace","stackTraceWithoutCredentials","serializeUrl","connectTimeout","timeouts","connect","responseTimeout","pushToStackTrace","stackFrame","triesLeft","decisions","createDeserializationError","deserializeSuccess","logger","info","stackFrameWithoutCredentials","createApiError","deserializeFailure","requester","send","reverse","createUserAgent","addedUserAgent","queryParametersAsString","serializeQueryParameters","charAt","substr","parameters","modifiedHeaders","createSearchClient","auth","authMode","credentials","createAuth","requestsCache","responsesCache","read","mappedRequestOptions","createRetryableRequest","write","createTransporter","addAlgoliaAgent","clearCache","customRequest","initIndex","multipleQueries","multipleSearchForFacetValues","facetName","facetQuery","searchForFacetValues","findAnswers","queryLanguages","LogLevelEnum","Debug","Info","getRecommendations","threshold","algoliasearch","commonOptions","baseRequester","XMLHttpRequest","setRequestHeader","createTimeout","abort","onreadystatechange","readyState","OPENED","responseText","onload","logLevel","identity","isModifierEvent","button","groupBy","predicate","maxResultsPerGroup","DocSearchModal","_ref$placeholder","searchParameters","_ref$onClose","_ref$transformItems","transformItems","_ref$hitComponent","_ref$resultsFooterCom","_ref$initialScrollY","initialScrollY","_ref$transformSearchC","transformSearchClient","_ref$disableUserPerso","_ref$initialQuery","initialQuery","initialQueryFromProp","_ref$insights","footerTranslations","footer","searchBoxTranslations","searchBox","screenStateTranslations","setState","containerRef","modalRef","formElementRef","dropdownRef","snippetLength","initialQueryFromSelection","getSelection","client","useSearchClient","saveRecentSearch","sendItemClickEvent","insightsItem","insightsClickParams","autocomplete","sourcesState","insightsActive","attributesToRetrieve","attributesToSnippet","snippetEllipsisText","highlightPreTag","highlightPostTag","hitsPerPage","firstResult","nbHits","lvl1","groupedHits","potentialParent","siblingItem","flat","_getEnvironmentProps","useTouchEvents","focusableElements","querySelectorAll","firstElement","lastElement","trapFocus","useTrapFocus","classList","_window$scrollTo","_window","scrollTo","matchMedia","scrollTop","setFullViewportHeight","vh","innerHeight","style","setProperty","tabIndex","DocSearch","_props$translations","_props$translations2","searchButtonRef","setInitialQuery","onOpen","_event$key","keyCode","element","isContentEditable","isEditingContent","fromCharCode","useDocSearchKeyboardEvents","createPortal","scrollY","modal","INPUT_BORDER_SIZE","SVG_STROKE_WIDTH","INPUT_HEIGHT","SPACINGS","NINE","BUTTON_WIDTH","EIGHT","DESKTOP_END_SPACING","TEN","EDGE_SPACING","TWO","modalStyles","css","LAYERS","SEARCH","COLORS","BACKGROUND_SITE","BORDER_SIZES","DETAIL","DETAIL_LOW_CONTRAST","STEP","MEDIA","DESKTOP","BORDER_RADIUSES","SOFT","headerStyles","BOX","BRAND_GRADIENT_BACKGROUND_STYLES","contentStyles","TEXT_LOW_CONTRAST","SIX","FONT_SIZES","COMPLEMENTARY","DETAIL_HIGH_CONTRAST","createSquareSizeStyles","TEXT_HIGH_CONTRAST","THREE","H4","linkContentStyles","KEY_NAVIGATING_STYLES","BRAND_GRADIENT_TEXT_STYLES","CUSTOM","ONE","OUTLINE","BACKGROUND_CODE","FONT_WEIGHTS","SEMI_BOLD","COMPACT","FOUR","TEXT_MEDIUM_CONTRAST","buttonBareStyles","MEDIUM","footerStyles","LINE","DETAIL_MEDIUM_CONTRAST","DETAIL_HIGH_CONTRAST_RGB_VALUE","THEME_PREFIX","THEME_KEYS","LIGHT","DETAIL_LOW_CONTRAST_RGB_VALUE","DARK","inputStyles","color","TEXT_BODY","visuallyHiddenStyles","toggleButtonStyles","searchButtonStyles","searchButtonIconStyles","magnifyerButtonStyles","resetButtonStyles","cancelButtonStyles","_ref10","loadingIndicatorStyles","SearchStyles","createGlobalStyle","SearchAlgolia","isKeyNavigating","useAppSelector","selectKeyNavigating","isSearchOpen","selectIsModalOpen","MODALS","SITE_SEARCH","isSearchInitiallyOpenRef","useRef","closeSearchRef","toggleElement","useAppDispatch","openSearch","useCallback","setModalOpen","closeSearch","setModalClosed","isBrowser","ALGOLIA_CLASSNAMES","SEARCH_TOGGLE_BUTTON","click","observer","MutationObserver","mutations","mutation","_closeSearchRef$curre","SEARCH_ACTIVE","SEARCH_INPUT","observe","attributes","childList","subtree","disconnect","React","$isKeyNavigating","ALGOLIA_SEARCH_CONFIG","APP_ID","INDEX_NAME","API_KEY"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/2682-e50dd563da035e3b2513.js b/docs/2682-e50dd563da035e3b2513.js deleted file mode 100644 index 2e818b10e..000000000 --- a/docs/2682-e50dd563da035e3b2513.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkembla_carousel_docs=self.webpackChunkembla_carousel_docs||[]).push([[2682],{2682:function(n,_,e){e.r(_),_.default='import React, {\n PropsWithChildren,\n useCallback,\n useEffect,\n useState\n} from \'react\'\nimport { EmblaCarouselType } from \'embla-carousel\'\n\ntype UsePrevNextButtonsType = {\n prevBtnDisabled: boolean\n nextBtnDisabled: boolean\n onPrevButtonClick: () => void\n onNextButtonClick: () => void\n}\n\nexport const usePrevNextButtons = (\n emblaApi: EmblaCarouselType | undefined,\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n): UsePrevNextButtonsType => {\n const [prevBtnDisabled, setPrevBtnDisabled] = useState(true)\n const [nextBtnDisabled, setNextBtnDisabled] = useState(true)\n\n const onPrevButtonClick = useCallback(() => {\n if (!emblaApi) return\n emblaApi.scrollPrev()\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n }, [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ])\n\n const onNextButtonClick = useCallback(() => {\n if (!emblaApi) return\n emblaApi.scrollNext()\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n }, [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setPrevBtnDisabled(!emblaApi.canScrollPrev())\n setNextBtnDisabled(!emblaApi.canScrollNext())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onSelect(emblaApi)\n emblaApi.on(\'reInit\', onSelect).on(\'select\', onSelect)\n }, [emblaApi, onSelect])\n\n return {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n }\n}\n\ntype PropType = PropsWithChildren<\n React.DetailedHTMLProps<\n React.ButtonHTMLAttributes,\n HTMLButtonElement\n >\n>\n\nexport const PrevButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\n \n {children}\n \n )\n}\n\nexport const NextButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\n \n {children}\n \n )\n}\n'}}]); -//# sourceMappingURL=2682-e50dd563da035e3b2513.js.map \ No newline at end of file diff --git a/docs/2682-e50dd563da035e3b2513.js.map b/docs/2682-e50dd563da035e3b2513.js.map deleted file mode 100644 index bda4a3961..000000000 --- a/docs/2682-e50dd563da035e3b2513.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"2682-e50dd563da035e3b2513.js","mappings":"uIAAA,0wL","sources":["webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesDist/CarouselGenerator/EmblaCarouselArrowButtons.tsx"],"sourcesContent":["export default \"import React, {\\n PropsWithChildren,\\n useCallback,\\n useEffect,\\n useState\\n} from 'react'\\nimport { EmblaCarouselType } from 'embla-carousel'\\n\\ntype UsePrevNextButtonsType = {\\n prevBtnDisabled: boolean\\n nextBtnDisabled: boolean\\n onPrevButtonClick: () => void\\n onNextButtonClick: () => void\\n}\\n\\nexport const usePrevNextButtons = (\\n emblaApi: EmblaCarouselType | undefined,\\n /*__NAV_AUTOPLAY_REPLACE_START__*/\\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\\n /*__NAV_AUTOPLAY_REPLACE_END__*/\\n): UsePrevNextButtonsType => {\\n const [prevBtnDisabled, setPrevBtnDisabled] = useState(true)\\n const [nextBtnDisabled, setNextBtnDisabled] = useState(true)\\n\\n const onPrevButtonClick = useCallback(() => {\\n if (!emblaApi) return\\n emblaApi.scrollPrev()\\n /*__NAV_AUTOPLAY_REPLACE_START__*/\\n if (onButtonClick) onButtonClick(emblaApi)\\n /*__NAV_AUTOPLAY_REPLACE_END__*/\\n }, [\\n emblaApi,\\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\\n ])\\n\\n const onNextButtonClick = useCallback(() => {\\n if (!emblaApi) return\\n emblaApi.scrollNext()\\n /*__NAV_AUTOPLAY_REPLACE_START__*/\\n if (onButtonClick) onButtonClick(emblaApi)\\n /*__NAV_AUTOPLAY_REPLACE_END__*/\\n }, [\\n emblaApi,\\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\\n ])\\n\\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\\n setPrevBtnDisabled(!emblaApi.canScrollPrev())\\n setNextBtnDisabled(!emblaApi.canScrollNext())\\n }, [])\\n\\n useEffect(() => {\\n if (!emblaApi) return\\n\\n onSelect(emblaApi)\\n emblaApi.on('reInit', onSelect).on('select', onSelect)\\n }, [emblaApi, onSelect])\\n\\n return {\\n prevBtnDisabled,\\n nextBtnDisabled,\\n onPrevButtonClick,\\n onNextButtonClick\\n }\\n}\\n\\ntype PropType = PropsWithChildren<\\n React.DetailedHTMLProps<\\n React.ButtonHTMLAttributes,\\n HTMLButtonElement\\n >\\n>\\n\\nexport const PrevButton: React.FC = (props) => {\\n const { children, ...restProps } = props\\n\\n return (\\n \\n \\n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\\n \\n {children}\\n \\n )\\n}\\n\\nexport const NextButton: React.FC = (props) => {\\n const { children, ...restProps } = props\\n\\n return (\\n \\n \\n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\\n \\n {children}\\n \\n )\\n}\\n\";"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/2682-ea2dd26c33112f5be706.js b/docs/2682-ea2dd26c33112f5be706.js new file mode 100644 index 000000000..2c85539d0 --- /dev/null +++ b/docs/2682-ea2dd26c33112f5be706.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkembla_carousel_docs=self.webpackChunkembla_carousel_docs||[]).push([[2682],{2682:function(n,_,e){e.r(_),_.default='import React, {\n ComponentPropsWithRef,\n useCallback,\n useEffect,\n useState\n} from \'react\'\nimport { EmblaCarouselType } from \'embla-carousel\'\n\ntype UsePrevNextButtonsType = {\n prevBtnDisabled: boolean\n nextBtnDisabled: boolean\n onPrevButtonClick: () => void\n onNextButtonClick: () => void\n}\n\nexport const usePrevNextButtons = (\n emblaApi: EmblaCarouselType | undefined,\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n): UsePrevNextButtonsType => {\n const [prevBtnDisabled, setPrevBtnDisabled] = useState(true)\n const [nextBtnDisabled, setNextBtnDisabled] = useState(true)\n\n const onPrevButtonClick = useCallback(() => {\n if (!emblaApi) return\n emblaApi.scrollPrev()\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n }, [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ])\n\n const onNextButtonClick = useCallback(() => {\n if (!emblaApi) return\n emblaApi.scrollNext()\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n }, [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setPrevBtnDisabled(!emblaApi.canScrollPrev())\n setNextBtnDisabled(!emblaApi.canScrollNext())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onSelect(emblaApi)\n emblaApi.on(\'reInit\', onSelect).on(\'select\', onSelect)\n }, [emblaApi, onSelect])\n\n return {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n }\n}\n\ntype PropType = ComponentPropsWithRef<\'button\'>\n\nexport const PrevButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\n \n {children}\n \n )\n}\n\nexport const NextButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\n \n {children}\n \n )\n}\n'}}]); +//# sourceMappingURL=2682-ea2dd26c33112f5be706.js.map \ No newline at end of file diff --git a/docs/2682-ea2dd26c33112f5be706.js.map b/docs/2682-ea2dd26c33112f5be706.js.map new file mode 100644 index 000000000..1baeadb1b --- /dev/null +++ b/docs/2682-ea2dd26c33112f5be706.js.map @@ -0,0 +1 @@ +{"version":3,"file":"2682-ea2dd26c33112f5be706.js","mappings":"uIAAA,8qL","sources":["webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesDist/CarouselGenerator/EmblaCarouselArrowButtons.tsx"],"sourcesContent":["export default \"import React, {\\n ComponentPropsWithRef,\\n useCallback,\\n useEffect,\\n useState\\n} from 'react'\\nimport { EmblaCarouselType } from 'embla-carousel'\\n\\ntype UsePrevNextButtonsType = {\\n prevBtnDisabled: boolean\\n nextBtnDisabled: boolean\\n onPrevButtonClick: () => void\\n onNextButtonClick: () => void\\n}\\n\\nexport const usePrevNextButtons = (\\n emblaApi: EmblaCarouselType | undefined,\\n /*__NAV_AUTOPLAY_REPLACE_START__*/\\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\\n /*__NAV_AUTOPLAY_REPLACE_END__*/\\n): UsePrevNextButtonsType => {\\n const [prevBtnDisabled, setPrevBtnDisabled] = useState(true)\\n const [nextBtnDisabled, setNextBtnDisabled] = useState(true)\\n\\n const onPrevButtonClick = useCallback(() => {\\n if (!emblaApi) return\\n emblaApi.scrollPrev()\\n /*__NAV_AUTOPLAY_REPLACE_START__*/\\n if (onButtonClick) onButtonClick(emblaApi)\\n /*__NAV_AUTOPLAY_REPLACE_END__*/\\n }, [\\n emblaApi,\\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\\n ])\\n\\n const onNextButtonClick = useCallback(() => {\\n if (!emblaApi) return\\n emblaApi.scrollNext()\\n /*__NAV_AUTOPLAY_REPLACE_START__*/\\n if (onButtonClick) onButtonClick(emblaApi)\\n /*__NAV_AUTOPLAY_REPLACE_END__*/\\n }, [\\n emblaApi,\\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\\n ])\\n\\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\\n setPrevBtnDisabled(!emblaApi.canScrollPrev())\\n setNextBtnDisabled(!emblaApi.canScrollNext())\\n }, [])\\n\\n useEffect(() => {\\n if (!emblaApi) return\\n\\n onSelect(emblaApi)\\n emblaApi.on('reInit', onSelect).on('select', onSelect)\\n }, [emblaApi, onSelect])\\n\\n return {\\n prevBtnDisabled,\\n nextBtnDisabled,\\n onPrevButtonClick,\\n onNextButtonClick\\n }\\n}\\n\\ntype PropType = ComponentPropsWithRef<'button'>\\n\\nexport const PrevButton: React.FC = (props) => {\\n const { children, ...restProps } = props\\n\\n return (\\n \\n \\n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\\n \\n {children}\\n \\n )\\n}\\n\\nexport const NextButton: React.FC = (props) => {\\n const { children, ...restProps } = props\\n\\n return (\\n \\n \\n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\\n \\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\\n \\n {children}\\n \\n )\\n}\\n\";"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/2900-1c386162116f224c8b54.js b/docs/2900-1c386162116f224c8b54.js new file mode 100644 index 000000000..c2e04a298 --- /dev/null +++ b/docs/2900-1c386162116f224c8b54.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkembla_carousel_docs=self.webpackChunkembla_carousel_docs||[]).push([[2900],{2900:function(e,t,n){n.r(t),n.d(t,{default:function(){return i}});var l=n(4041),a=n(7154);function c(e){let t;void 0===e&&(e={});let n=[];const l=["select","slideFocus"];function a(){t.containerNode().style.height=function(){const{slideRegistry:e}=t.internalEngine();return e[t.selectedScrollSnap()].map((e=>n[e])).reduce(((e,t)=>Math.max(e,t)),0)}()+"px"}return{name:"autoHeight",options:e,init:function(e){t=e;const{options:{axis:c},slideRects:s}=t.internalEngine();"y"!==c&&(n=s.map((e=>e.height)),l.forEach((e=>t.on(e,a))),a())},destroy:function(){l.forEach((e=>t.off(e,a)));const e=t.containerNode();e.style.height="",e.getAttribute("style")||e.removeAttribute("style")}}}c.globalOptions=void 0;var s=n(7105),o=n(642);var i=e=>{const{slides:t,options:n}=e,[i,r]=(0,a.A)(n,[c()]),{selectedIndex:u,scrollSnaps:d,onDotButtonClick:m}=(0,o.R)(r),{prevBtnDisabled:b,nextBtnDisabled:_,onPrevButtonClick:p,onNextButtonClick:f}=(0,s.Hd)(r);return l.createElement("div",{className:"embla"},l.createElement("div",{className:"embla__viewport",ref:i},l.createElement("div",{className:"embla__container"},t.map((e=>l.createElement("div",{className:"embla__slide",key:e},l.createElement("div",{className:"embla__slide__number"},l.createElement("span",null,e+1))))))),l.createElement("div",{className:"embla__controls"},l.createElement("div",{className:"embla__buttons"},l.createElement(s.U1,{onClick:p,disabled:b}),l.createElement(s.WE,{onClick:f,disabled:_})),l.createElement("div",{className:"embla__dots"},d.map(((e,t)=>l.createElement(o.c,{key:t,onClick:()=>m(t),className:"embla__dot".concat(t===u?" embla__dot--selected":"")}))))))}},642:function(e,t,n){n.d(t,{R:function(){return a},c:function(){return c}});var l=n(4041);const a=(e,t)=>{const{0:n,1:a}=(0,l.useState)(0),{0:c,1:s}=(0,l.useState)([]),o=(0,l.useCallback)((n=>{e&&(e.scrollTo(n),t&&t(e))}),[e,t]),i=(0,l.useCallback)((e=>{s(e.scrollSnapList())}),[]),r=(0,l.useCallback)((e=>{a(e.selectedScrollSnap())}),[]);return(0,l.useEffect)((()=>{e&&(i(e),r(e),e.on("reInit",i).on("reInit",r).on("select",r))}),[e,i,r]),{selectedIndex:n,scrollSnaps:c,onDotButtonClick:o}},c=e=>{const{children:t,...n}=e;return l.createElement("button",Object.assign({type:"button"},n),t)}}}]); +//# sourceMappingURL=2900-1c386162116f224c8b54.js.map \ No newline at end of file diff --git a/docs/2900-1c386162116f224c8b54.js.map b/docs/2900-1c386162116f224c8b54.js.map new file mode 100644 index 000000000..a799a6118 --- /dev/null +++ b/docs/2900-1c386162116f224c8b54.js.map @@ -0,0 +1 @@ +{"version":3,"file":"2900-1c386162116f224c8b54.js","mappings":"qMAiBA,SAASA,EAAWC,GAClB,IAAIC,OADc,IAAAD,IAAAA,EAAqC,CAAC,GAExD,IAAIE,EAAyB,GAC7B,MAAMC,EAAiC,CAA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sources":["webpack://embla-carousel-docs/../src/components/AutoHeight.ts","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/AutoHeight/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/EmblaCarouselDotButton.tsx"],"sourcesContent":["import { OptionsType } from './Options'\nimport {\n EmblaEventType,\n CreatePluginType,\n EmblaCarouselType\n} from 'embla-carousel'\n\ndeclare module 'embla-carousel' {\n interface EmblaPluginsType {\n autoHeight: AutoHeightType\n }\n}\n\nexport type AutoHeightType = CreatePluginType<{}, OptionsType>\n\nexport type AutoHeightOptionsType = AutoHeightType['options']\n\nfunction AutoHeight(userOptions: AutoHeightOptionsType = {}): AutoHeightType {\n let emblaApi: EmblaCarouselType\n let slideHeights: number[] = []\n const heightEvents: EmblaEventType[] = ['select', 'slideFocus']\n\n function init(emblaApiInstance: EmblaCarouselType): void {\n emblaApi = emblaApiInstance\n\n const {\n options: { axis },\n slideRects\n } = emblaApi.internalEngine()\n\n if (axis === 'y') return\n\n slideHeights = slideRects.map((slideRect) => slideRect.height)\n\n heightEvents.forEach((evt) => emblaApi.on(evt, setContainerHeight))\n setContainerHeight()\n }\n\n function destroy(): void {\n heightEvents.forEach((evt) => emblaApi.off(evt, setContainerHeight))\n const container = emblaApi.containerNode()\n container.style.height = ''\n if (!container.getAttribute('style')) container.removeAttribute('style')\n }\n\n function highestInView(): number {\n const { slideRegistry } = emblaApi.internalEngine()\n const selectedIndexes = slideRegistry[emblaApi.selectedScrollSnap()]\n\n return selectedIndexes\n .map((index) => slideHeights[index])\n .reduce((a, b) => Math.max(a, b), 0)\n }\n\n function setContainerHeight(): void {\n emblaApi.containerNode().style.height = `${highestInView()}px`\n }\n\n const self: AutoHeightType = {\n name: 'autoHeight',\n options: userOptions,\n init,\n destroy\n }\n return self\n}\n\ndeclare namespace AutoHeight {\n let globalOptions: AutoHeightOptionsType | undefined\n}\n\nAutoHeight.globalOptions = undefined\n\nexport default AutoHeight\n","import React from 'react'\nimport { EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport AutoHeight from 'embla-carousel-auto-height'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options, [AutoHeight()])\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n {index + 1}\n \n \n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, {\n ComponentPropsWithRef,\n useCallback,\n useEffect,\n useState\n} from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UseDotButtonType = {\n selectedIndex: number\n scrollSnaps: number[]\n onDotButtonClick: (index: number) => void\n}\n\nexport const useDotButton = (\n emblaApi: EmblaCarouselType | undefined,\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n): UseDotButtonType => {\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [scrollSnaps, setScrollSnaps] = useState([])\n\n const onDotButtonClick = useCallback(\n (index: number) => {\n if (!emblaApi) return\n emblaApi.scrollTo(index)\n if (onButtonClick) onButtonClick(emblaApi)\n },\n [emblaApi, onButtonClick]\n )\n\n const onInit = useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onInit(emblaApi)\n onSelect(emblaApi)\n\n emblaApi.on('reInit', onInit).on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onInit, onSelect])\n\n return {\n selectedIndex,\n scrollSnaps,\n onDotButtonClick\n }\n}\n\ntype PropType = ComponentPropsWithRef<'button'>\n\nexport const DotButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n {children}\n \n )\n}\n"],"names":["AutoHeight","userOptions","emblaApi","slideHeights","heightEvents","setContainerHeight","containerNode","style","height","slideRegistry","internalEngine","selectedScrollSnap","map","index","reduce","a","b","Math","max","highestInView","name","options","init","emblaApiInstance","axis","slideRects","slideRect","forEach","evt","on","destroy","off","container","getAttribute","removeAttribute","globalOptions","undefined","props","slides","emblaRef","useEmblaCarousel","selectedIndex","scrollSnaps","onDotButtonClick","useDotButton","prevBtnDisabled","nextBtnDisabled","onPrevButtonClick","onNextButtonClick","usePrevNextButtons","React","className","ref","key","PrevButton","onClick","disabled","NextButton","_","DotButton","concat","onButtonClick","setSelectedIndex","useState","setScrollSnaps","useCallback","scrollTo","onInit","scrollSnapList","onSelect","useEffect","children","restProps","Object","assign","type"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/2900-779eedf26db62b1cd2eb.js b/docs/2900-779eedf26db62b1cd2eb.js deleted file mode 100644 index 391100a51..000000000 --- a/docs/2900-779eedf26db62b1cd2eb.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkembla_carousel_docs=self.webpackChunkembla_carousel_docs||[]).push([[2900],{2900:function(e,t,n){n.r(t),n.d(t,{default:function(){return r}});var a=n(4041),l=n(7154);const s={active:!0,breakpoints:{},destroyHeight:"auto"};function o(e){let t,n;void 0===e&&(e={});let a=[];const l=["select"];function c(e,l){const s="destroy"===l?t.destroyHeight:function(){const{slideRegistry:e}=n.internalEngine();return e[n.selectedScrollSnap()].map((e=>a[e])).reduce(((e,t)=>Math.max(e,t)),0)}()+"px";n.containerNode().style.height=s}return{name:"autoHeight",options:e,init:function(i,r){n=i;const{mergeOptions:d,optionsAtMedia:u}=r,m=d(s,o.globalOptions),b=d(m,e);t=u(b);const{options:{axis:p},slideRects:_}=n.internalEngine();"y"!==p&&(a=_.map((e=>e.height)),l.forEach((e=>n.on(e,c))),c())},destroy:function(){l.forEach((e=>n.off(e,c))),c(void 0,"destroy")}}}o.globalOptions=void 0;var c=n(7105),i=n(642);var r=e=>{const{slides:t,options:n}=e,[s,r]=(0,l.A)(n,[o()]),{selectedIndex:d,scrollSnaps:u,onDotButtonClick:m}=(0,i.R)(r),{prevBtnDisabled:b,nextBtnDisabled:p,onPrevButtonClick:_,onNextButtonClick:f}=(0,c.Hd)(r);return a.createElement("div",{className:"embla"},a.createElement("div",{className:"embla__viewport",ref:s},a.createElement("div",{className:"embla__container"},t.map((e=>a.createElement("div",{className:"embla__slide",key:e},a.createElement("div",{className:"embla__slide__number"},a.createElement("span",null,e+1))))))),a.createElement("div",{className:"embla__controls"},a.createElement("div",{className:"embla__buttons"},a.createElement(c.U1,{onClick:_,disabled:b}),a.createElement(c.WE,{onClick:f,disabled:p})),a.createElement("div",{className:"embla__dots"},u.map(((e,t)=>a.createElement(i.c,{key:t,onClick:()=>m(t),className:"embla__dot".concat(t===d?" embla__dot--selected":"")}))))))}},642:function(e,t,n){n.d(t,{R:function(){return l},c:function(){return s}});var a=n(4041);const l=(e,t)=>{const{0:n,1:l}=(0,a.useState)(0),{0:s,1:o}=(0,a.useState)([]),c=(0,a.useCallback)((n=>{e&&(e.scrollTo(n),t&&t(e))}),[e,t]),i=(0,a.useCallback)((e=>{o(e.scrollSnapList())}),[]),r=(0,a.useCallback)((e=>{l(e.selectedScrollSnap())}),[]);return(0,a.useEffect)((()=>{e&&(i(e),r(e),e.on("reInit",i).on("reInit",r).on("select",r))}),[e,i,r]),{selectedIndex:n,scrollSnaps:s,onDotButtonClick:c}},s=e=>{const{children:t,...n}=e;return a.createElement("button",Object.assign({type:"button"},n),t)}}}]); -//# sourceMappingURL=2900-779eedf26db62b1cd2eb.js.map \ No newline at end of file diff --git a/docs/2900-779eedf26db62b1cd2eb.js.map b/docs/2900-779eedf26db62b1cd2eb.js.map deleted file mode 100644 index da0caa6ac..000000000 --- a/docs/2900-779eedf26db62b1cd2eb.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"2900-779eedf26db62b1cd2eb.js","mappings":"qMAMO,MAAMA,EAA8B,CACzCC,QAAQ,EACRC,YAAa,CAAC,EACdC,cAAe,QCMjB,SAASC,EAAWC,GAClB,IAAIC,EACAC,OAFc,IAAAF,IAAAA,EAAqC,CAAC,GAGxD,IAAIG,EAAyB,GAC7B,MAAMC,EAAiC,CAAC,UAwCxC,SAASC,EACPC,EACAC,GAEA,MAAMC,EACI,YAARD,EAAoBN,EAAQH,cAdhC,WACE,MAAM,cAAEW,GAAkBP,EAASQ,iBAGnC,OAFwBD,EAAcP,EAASS,sBAG5CC,KAAKC,GAAUV,EAAaU,KAC5BC,QAAO,CAACC,EAAGC,IAAMC,KAAKC,IAAIH,EAAGC,IAAI,EACtC,CAOmDG,GAAa,KAC9DjB,EAASkB,gBAAgBC,MAAMb,OAASA,CAC1C,CAQA,MAN6B,CAC3Bc,KAAM,aACNrB,QAASD,EACTuB,KAlDF,SACEC,EACAC,GAEAvB,EAAWsB,EAEX,MAAM,aAAEE,EAAY,eAAEC,GAAmBF,EACnCG,EAAcF,EAAa/B,EAAgBI,EAAW8B,eACtDC,EAAaJ,EAAaE,EAAa5B,GAC7CC,EAAU0B,EAAeG,GAEzB,MACE7B,SAAS,KAAE8B,GAAM,WACjBC,GACE9B,EAASQ,iBAEA,MAATqB,IAEJ5B,EAAe6B,EAAWpB,KAAKqB,GAAcA,EAAUzB,SAEvDJ,EAAa8B,SAAS3B,GAAQL,EAASiC,GAAG5B,EAAKF,KAC/CA,IACF,EA6BE+B,QA3BF,WACEhC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nB,GAAmBqB,EAAAA,EAAAA,cACtBrD,IACMX,IACLA,EAASiE,SAAStD,GACdiD,GAAeA,EAAc5D,GAAS,GAE5C,CAACA,EAAU4D,IAGPM,GAASF,EAAAA,EAAAA,cAAahE,IAC1B+D,EAAe/D,EAASmE,iBAAiB,GACxC,IAEGC,GAAWJ,EAAAA,EAAAA,cAAahE,IAC5B6D,EAAiB7D,EAASS,qBAAqB,GAC9C,IAWH,OATA4D,EAAAA,EAAAA,YAAU,KACHrE,IAELkE,EAAOlE,GACPoE,EAASpE,GAETA,EAASiC,GAAG,SAAUiC,GAAQjC,GAAG,SAAUmC,GAAUnC,GAAG,SAAUmC,GAAS,GAC1E,CAACpE,EAAUkE,EAAQE,IAEf,CACL3B,gBACAC,cACAC,mBACD,EAUUe,EAAiCrB,IAC5C,MAAM,SAAEiC,KAAaC,GAAclC,EAEnC,OACEa,EAAAA,cAAA,SAAAsB,OAAAC,OAAA,CAAQC,KAAK,UAAaH,GACvBD,EACM,C","sources":["webpack://embla-carousel-docs/../src/components/Options.ts","webpack://embla-carousel-docs/../src/components/AutoHeight.ts","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/AutoHeight/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/EmblaCarouselDotButton.tsx"],"sourcesContent":["import { CreateOptionsType } from 'embla-carousel/components/Options'\n\nexport type OptionsType = CreateOptionsType<{\n destroyHeight: CSSStyleDeclaration['height']\n}>\n\nexport const defaultOptions: OptionsType = {\n active: true,\n breakpoints: {},\n destroyHeight: 'auto'\n}\n","import { defaultOptions, OptionsType } from './Options'\nimport { CreatePluginType } from 'embla-carousel/components/Plugins'\nimport { OptionsHandlerType } from 'embla-carousel/components/OptionsHandler'\nimport { EmblaCarouselType, EmblaEventType } from 'embla-carousel'\n\ndeclare module 'embla-carousel/components/Plugins' {\n interface EmblaPluginsType {\n autoHeight?: AutoHeightType\n }\n}\n\nexport type AutoHeightType = CreatePluginType<{}, OptionsType>\n\nexport type AutoHeightOptionsType = AutoHeightType['options']\n\nfunction AutoHeight(userOptions: AutoHeightOptionsType = {}): AutoHeightType {\n let options: OptionsType\n let emblaApi: EmblaCarouselType\n let slideHeights: number[] = []\n const heightEvents: EmblaEventType[] = ['select']\n\n function init(\n emblaApiInstance: EmblaCarouselType,\n optionsHandler: OptionsHandlerType\n ): void {\n emblaApi = emblaApiInstance\n\n const { mergeOptions, optionsAtMedia } = optionsHandler\n const optionsBase = mergeOptions(defaultOptions, AutoHeight.globalOptions)\n const allOptions = mergeOptions(optionsBase, userOptions)\n options = optionsAtMedia(allOptions)\n\n const {\n options: { axis },\n slideRects\n } = emblaApi.internalEngine()\n\n if (axis === 'y') return\n\n slideHeights = slideRects.map((slideRect) => slideRect.height)\n\n heightEvents.forEach((evt) => emblaApi.on(evt, setContainerHeight))\n setContainerHeight()\n }\n\n function destroy(): void {\n heightEvents.forEach((evt) => emblaApi.off(evt, setContainerHeight))\n setContainerHeight(undefined, 'destroy')\n }\n\n function highestInView(): number {\n const { slideRegistry } = emblaApi.internalEngine()\n const selectedIndexes = slideRegistry[emblaApi.selectedScrollSnap()]\n\n return selectedIndexes\n .map((index) => slideHeights[index])\n .reduce((a, b) => Math.max(a, b), 0)\n }\n\n function setContainerHeight(\n _?: EmblaCarouselType,\n evt?: EmblaEventType\n ): void {\n const height =\n evt === 'destroy' ? options.destroyHeight : `${highestInView()}px`\n emblaApi.containerNode().style.height = height\n }\n\n const self: AutoHeightType = {\n name: 'autoHeight',\n options: userOptions,\n init,\n destroy\n }\n return self\n}\n\nAutoHeight.globalOptions = undefined\n\nexport default AutoHeight\n","import React from 'react'\nimport { EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport AutoHeight from 'embla-carousel-auto-height'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options, [AutoHeight()])\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n {index + 1}\n \n \n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, {\n PropsWithChildren,\n useCallback,\n useEffect,\n useState\n} from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UseDotButtonType = {\n selectedIndex: number\n scrollSnaps: number[]\n onDotButtonClick: (index: number) => void\n}\n\nexport const useDotButton = (\n emblaApi: EmblaCarouselType | undefined,\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n): UseDotButtonType => {\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [scrollSnaps, setScrollSnaps] = useState([])\n\n const onDotButtonClick = useCallback(\n (index: number) => {\n if (!emblaApi) return\n emblaApi.scrollTo(index)\n if (onButtonClick) onButtonClick(emblaApi)\n },\n [emblaApi, onButtonClick]\n )\n\n const onInit = useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onInit(emblaApi)\n onSelect(emblaApi)\n\n emblaApi.on('reInit', onInit).on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onInit, onSelect])\n\n return {\n selectedIndex,\n scrollSnaps,\n onDotButtonClick\n }\n}\n\ntype PropType = PropsWithChildren<\n React.DetailedHTMLProps<\n React.ButtonHTMLAttributes,\n HTMLButtonElement\n >\n>\n\nexport const DotButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n {children}\n \n )\n}\n"],"names":["defaultOptions","active","breakpoints","destroyHeight","AutoHeight","userOptions","options","emblaApi","slideHeights","heightEvents","setContainerHeight","_","evt","height","slideRegistry","internalEngine","selectedScrollSnap","map","index","reduce","a","b","Math","max","highestInView","containerNode","style","name","init","emblaApiInstance","optionsHandler","mergeOptions","optionsAtMedia","optionsBase","globalOptions","allOptions","axis","slideRects","slideRect","forEach","on","destroy","off","undefined","props","slides","emblaRef","useEmblaCarousel","selectedIndex","scrollSnaps","onDotButtonClick","useDotButton","prevBtnDisabled","nextBtnDisabled","onPrevButtonClick","onNextButtonClick","usePrevNextButtons","React","className","ref","key","PrevButton","onClick","disabled","NextButton","DotButton","concat","onButtonClick","setSelectedIndex","useState","setScrollSnaps","useCallback","scrollTo","onInit","scrollSnapList","onSelect","useEffect","children","restProps","Object","assign","type"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/2c8f1d14031690b3a7c730295b2f775c68c4b349-9081749583888e3f282d.js.map b/docs/2c8f1d14031690b3a7c730295b2f775c68c4b349-9081749583888e3f282d.js.map index 6f306c893..0115fe0aa 100644 --- a/docs/2c8f1d14031690b3a7c730295b2f775c68c4b349-9081749583888e3f282d.js.map +++ b/docs/2c8f1d14031690b3a7c730295b2f775c68c4b349-9081749583888e3f282d.js.map @@ -1 +1 @@ -{"version":3,"file":"2c8f1d14031690b3a7c730295b2f775c68c4b349-9081749583888e3f282d.js","mappings":"oMAcO,MAAMA,EAAeA,CAC1BC,EACAC,KAEA,MAAM,EAACC,EAAc,EAACC,IAAoBC,EAAAA,EAAAA,UAAS,IAC7C,EAACC,EAAY,EAACC,IAAkBF,EAAAA,EAAAA,UAAmB,IAEnDG,GAAmBC,EAAAA,EAAAA,cACtBC,IACMT,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AK/F,GACXY,EAAAA,cAAA,OAAKiF,UAAU,eAAeG,IAAKhG,GACjCY,EAAAA,cAAA,OAAKiF,UAAU,wBAAwB7F,EAAQ,QAMvDY,EAAAA,cAAA,OAAKiF,UAAU,gBACbjF,EAAAA,cAAA,OAAKiF,UAAU,yBAAyBC,IAAK8F,GAC3ChL,EAAAA,cAAA,OAAKiF,UAAU,2BACZ5E,EAAO8E,KAAK/F,GACXY,EAAAA,cAAC4K,EAAK,CACJxF,IAAKhG,EACLmG,QAASA,IAAM2F,EAAa9L,GAC5ByL,SAAUzL,IAAUP,EACpBO,MAAOA,SAMb,C,uDC5DV,MAAM+L,EAA6B,CCNpB,IAA0B,sDCA1B,IAA0B,sDCA1B,IAA0B,sDCA1B,IAA0B,sDCA1B,IAA0B,uDLQ5BhB,EAAiB/K,GAC5B+L,EAAiB/L,EAAQ+L,EAAiB5H,O","sources":["webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/EmblaCarouselDotButton.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/InfiniteScroll/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/IosPicker/EmblaCarouselIosPickerItem.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/IosPicker/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/LazyLoad/EmblaCarouselLazyLoadImage.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/LazyLoad/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Opacity/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Parallax/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Progress/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Scale/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Thumbs/EmblaCarouselThumbsButton.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Thumbs/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/sandboxImages.ts","webpack://embla-carousel-docs/./src/assets/images/slide-1.jpg","webpack://embla-carousel-docs/./src/assets/images/slide-2.jpg","webpack://embla-carousel-docs/./src/assets/images/slide-3.jpg","webpack://embla-carousel-docs/./src/assets/images/slide-4.jpg","webpack://embla-carousel-docs/./src/assets/images/slide-5.jpg"],"sourcesContent":["import React, {\n PropsWithChildren,\n useCallback,\n useEffect,\n useState\n} from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UseDotButtonType = {\n selectedIndex: number\n scrollSnaps: number[]\n onDotButtonClick: (index: number) => void\n}\n\nexport const useDotButton = (\n emblaApi: EmblaCarouselType | undefined,\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n): UseDotButtonType => {\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [scrollSnaps, setScrollSnaps] = useState([])\n\n const onDotButtonClick = useCallback(\n (index: number) => {\n if (!emblaApi) return\n emblaApi.scrollTo(index)\n if (onButtonClick) onButtonClick(emblaApi)\n },\n [emblaApi, onButtonClick]\n )\n\n const onInit = useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onInit(emblaApi)\n onSelect(emblaApi)\n\n emblaApi.on('reInit', onInit).on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onInit, onSelect])\n\n return {\n selectedIndex,\n scrollSnaps,\n onDotButtonClick\n }\n}\n\ntype PropType = PropsWithChildren<\n React.DetailedHTMLProps<\n React.ButtonHTMLAttributes,\n HTMLButtonElement\n >\n>\n\nexport const DotButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n {children}\n \n )\n}\n","import React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { EngineType } from 'embla-carousel/components/Engine'\nimport { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\n\nconst mockApiCall = (\n minWait: number,\n maxWait: number,\n callback: () => void\n): void => {\n const min = Math.ceil(minWait)\n const max = Math.floor(maxWait)\n const wait = Math.floor(Math.random() * (max - min + 1)) + min\n setTimeout(callback, wait)\n}\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { options, slides: propSlides } = props\n const scrollListenerRef = useRef<() => void>(() => undefined)\n const listenForScrollRef = useRef(true)\n const hasMoreToLoadRef = useRef(true)\n const [slides, setSlides] = useState(propSlides)\n const [hasMoreToLoad, setHasMoreToLoad] = useState(true)\n const [loadingMore, setLoadingMore] = useState(false)\n\n const [emblaRef, emblaApi] = useEmblaCarousel({\n ...options,\n watchSlides: (emblaApi) => {\n const reloadEmbla = (): void => {\n const oldEngine = emblaApi.internalEngine()\n\n emblaApi.reInit()\n const newEngine = emblaApi.internalEngine()\n const copyEngineModules: (keyof EngineType)[] = [\n 'location',\n 'target',\n 'scrollBody'\n ]\n copyEngineModules.forEach((engineModule) => {\n Object.assign(newEngine[engineModule], oldEngine[engineModule])\n })\n\n newEngine.translate.to(oldEngine.location.get())\n const { index } = newEngine.scrollTarget.byDistance(0, false)\n newEngine.index.set(index)\n newEngine.animation.start()\n\n setLoadingMore(false)\n listenForScrollRef.current = true\n }\n\n const reloadAfterPointerUp = (): void => {\n emblaApi.off('pointerUp', reloadAfterPointerUp)\n reloadEmbla()\n }\n\n const engine = emblaApi.internalEngine()\n\n if (hasMoreToLoadRef.current && engine.dragHandler.pointerDown()) {\n const boundsActive = engine.limit.reachedMax(engine.target.get())\n engine.scrollBounds.toggleActive(boundsActive)\n emblaApi.on('pointerUp', reloadAfterPointerUp)\n } else {\n reloadEmbla()\n }\n }\n })\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const onScroll = useCallback((emblaApi: EmblaCarouselType) => {\n if (!listenForScrollRef.current) return\n\n setLoadingMore((loadingMore) => {\n const lastSlide = emblaApi.slideNodes().length - 1\n const lastSlideInView = emblaApi.slidesInView().includes(lastSlide)\n const loadMore = !loadingMore && lastSlideInView\n\n if (loadMore) {\n listenForScrollRef.current = false\n\n mockApiCall(1000, 2000, () => {\n setSlides((currentSlides) => {\n if (currentSlides.length === 20) {\n setHasMoreToLoad(false)\n emblaApi.off('scroll', scrollListenerRef.current)\n return currentSlides\n }\n const newSlideCount = currentSlides.length + 5\n return Array.from(Array(newSlideCount).keys())\n })\n })\n }\n\n return loadingMore || lastSlideInView\n })\n }, [])\n\n const addScrollListener = useCallback(\n (emblaApi: EmblaCarouselType) => {\n scrollListenerRef.current = () => onScroll(emblaApi)\n emblaApi.on('scroll', scrollListenerRef.current)\n },\n [onScroll]\n )\n\n useEffect(() => {\n if (!emblaApi) return\n addScrollListener(emblaApi)\n\n const onResize = () => emblaApi.reInit()\n window.addEventListener('resize', onResize)\n emblaApi.on('destroy', () => window.removeEventListener('resize', onResize))\n }, [emblaApi, addScrollListener])\n\n useEffect(() => {\n hasMoreToLoadRef.current = hasMoreToLoad\n }, [hasMoreToLoad])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n {index + 1}\n \n \n ))}\n {hasMoreToLoad && (\n \n \n \n )}\n \n \n\n \n \n \n \n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useEffect, useState, useCallback, useRef } from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\n\nconst CIRCLE_DEGREES = 360\nconst WHEEL_ITEM_SIZE = 32\nconst WHEEL_ITEM_COUNT = 18\nconst WHEEL_ITEMS_IN_VIEW = 4\n\nexport const WHEEL_ITEM_RADIUS = CIRCLE_DEGREES / WHEEL_ITEM_COUNT\nexport const IN_VIEW_DEGREES = WHEEL_ITEM_RADIUS * WHEEL_ITEMS_IN_VIEW\nexport const WHEEL_RADIUS = Math.round(\n WHEEL_ITEM_SIZE / 2 / Math.tan(Math.PI / WHEEL_ITEM_COUNT)\n)\n\nconst isInView = (wheelLocation: number, slidePosition: number): boolean =>\n Math.abs(wheelLocation - slidePosition) < IN_VIEW_DEGREES\n\nconst setSlideStyles = (\n emblaApi: EmblaCarouselType,\n index: number,\n loop: boolean,\n slideCount: number,\n totalRadius: number\n): void => {\n const slideNode = emblaApi.slideNodes()[index]\n const wheelLocation = emblaApi.scrollProgress() * totalRadius\n const positionDefault = emblaApi.scrollSnapList()[index] * totalRadius\n const positionLoopStart = positionDefault + totalRadius\n const positionLoopEnd = positionDefault - totalRadius\n\n let inView = false\n let angle = index * -WHEEL_ITEM_RADIUS\n\n if (isInView(wheelLocation, positionDefault)) {\n inView = true\n }\n\n if (loop && isInView(wheelLocation, positionLoopEnd)) {\n inView = true\n angle = -CIRCLE_DEGREES + (slideCount - index) * WHEEL_ITEM_RADIUS\n }\n\n if (loop && isInView(wheelLocation, positionLoopStart)) {\n inView = true\n angle = -(totalRadius % CIRCLE_DEGREES) - index * WHEEL_ITEM_RADIUS\n }\n\n if (inView) {\n slideNode.style.opacity = '1'\n slideNode.style.transform = `translateY(-${\n index * 100\n }%) rotateX(${angle}deg) translateZ(${WHEEL_RADIUS}px)`\n } else {\n slideNode.style.opacity = '0'\n slideNode.style.transform = 'none'\n }\n}\n\nexport const setContainerStyles = (\n emblaApi: EmblaCarouselType,\n wheelRotation: number\n): void => {\n emblaApi.containerNode().style.transform = `translateZ(${WHEEL_RADIUS}px) rotateX(${wheelRotation}deg)`\n}\n\ntype PropType = {\n loop?: boolean\n label: string\n slideCount: number\n perspective: 'left' | 'right'\n}\n\nexport const IosPickerItem: React.FC = (props) => {\n const { slideCount, perspective, label, loop = false } = props\n const [emblaRef, emblaApi] = useEmblaCarousel({\n loop,\n axis: 'y',\n dragFree: true,\n containScroll: false,\n watchSlides: false\n })\n const rootNodeRef = useRef(null)\n const totalRadius = slideCount * WHEEL_ITEM_RADIUS\n const rotationOffset = loop ? 0 : WHEEL_ITEM_RADIUS\n const slides = Array.from(Array(slideCount).keys())\n\n const inactivateEmblaTransform = useCallback(\n (emblaApi: EmblaCarouselType) => {\n if (!emblaApi) return\n const { translate, slideLooper } = emblaApi.internalEngine()\n translate.clear()\n translate.toggleActive(false)\n slideLooper.loopPoints.forEach(({ translate }) => {\n translate.clear()\n translate.toggleActive(false)\n })\n },\n []\n )\n\n const rotateWheel = useCallback(\n (emblaApi: EmblaCarouselType) => {\n const rotation = slideCount * WHEEL_ITEM_RADIUS - rotationOffset\n const wheelRotation = rotation * emblaApi.scrollProgress()\n setContainerStyles(emblaApi, wheelRotation)\n emblaApi.slideNodes().forEach((_, index) => {\n setSlideStyles(emblaApi, index, loop, slideCount, totalRadius)\n })\n },\n [slideCount, rotationOffset, totalRadius]\n )\n\n useEffect(() => {\n if (!emblaApi) return\n\n emblaApi.on('pointerUp', (emblaApi) => {\n const { scrollTo, target, location } = emblaApi.internalEngine()\n const diffToTarget = target.get() - location.get()\n const factor = Math.abs(diffToTarget) < WHEEL_ITEM_SIZE / 2.5 ? 10 : 0.1\n const distance = diffToTarget * factor\n scrollTo.distance(distance, true)\n })\n\n emblaApi.on('scroll', rotateWheel)\n\n emblaApi.on('reInit', (emblaApi) => {\n inactivateEmblaTransform(emblaApi)\n rotateWheel(emblaApi)\n })\n\n inactivateEmblaTransform(emblaApi)\n rotateWheel(emblaApi)\n }, [emblaApi, inactivateEmblaTransform, rotateWheel])\n\n return (\n \n \n \n \n {slides.map((_, index) => (\n \n {index}\n \n ))}\n \n \n \n {label}\n \n )\n}\n","import React from 'react'\nimport { EmblaOptionsType } from 'embla-carousel'\nimport { IosPickerItem } from './EmblaCarouselIosPickerItem'\n\ntype PropType = {\n loop?: EmblaOptionsType['loop']\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { loop } = props\n\n return (\n \n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useState, useCallback } from 'react'\n\nconst PLACEHOLDER_SRC = `data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D`\n\ntype PropType = {\n imgSrc: string\n inView: boolean\n index: number\n}\n\nexport const LazyLoadImage: React.FC = (props) => {\n const { imgSrc, inView } = props\n const [hasLoaded, setHasLoaded] = useState(false)\n\n const setLoaded = useCallback(() => {\n if (inView) setHasLoaded(true)\n }, [inView, setHasLoaded])\n\n return (\n \n \n {!hasLoaded && }\n \n \n \n )\n}\n","import React, { useCallback, useEffect, useState } from 'react'\nimport { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport { LazyLoadImage } from './EmblaCarouselLazyLoadImage'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRed, emblaApi] = useEmblaCarousel(options)\n const [slidesInView, setSlidesInView] = useState([])\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const updateSlidesInView = useCallback((emblaApi: EmblaCarouselType) => {\n setSlidesInView((slidesInView) => {\n if (slidesInView.length === emblaApi.slideNodes().length) {\n emblaApi.off('slidesInView', updateSlidesInView)\n }\n const inView = emblaApi\n .slidesInView()\n .filter((index) => !slidesInView.includes(index))\n return slidesInView.concat(inView)\n })\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n updateSlidesInView(emblaApi)\n emblaApi.on('slidesInView', updateSlidesInView)\n emblaApi.on('reInit', updateSlidesInView)\n }, [emblaApi, updateSlidesInView])\n\n return (\n \n \n \n {slides.map((index) => (\n -1}\n />\n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useCallback, useEffect, useRef } from 'react'\nimport {\n EmblaCarouselType,\n EmblaEventType,\n EmblaOptionsType\n} from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\nimport { sandboxImages } from 'components/Sandbox/sandboxImages'\n\nconst TWEEN_FACTOR_BASE = 0.84\n\nconst numberWithinRange = (number: number, min: number, max: number): number =>\n Math.min(Math.max(number, min), max)\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options)\n const tweenFactor = useRef(0)\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const setTweenFactor = useCallback((emblaApi: EmblaCarouselType) => {\n tweenFactor.current = TWEEN_FACTOR_BASE * emblaApi.scrollSnapList().length\n }, [])\n\n const tweenOpacity = useCallback(\n (emblaApi: EmblaCarouselType, eventName?: EmblaEventType) => {\n const engine = emblaApi.internalEngine()\n const scrollProgress = emblaApi.scrollProgress()\n const slidesInView = emblaApi.slidesInView()\n const isScrollEvent = eventName === 'scroll'\n\n emblaApi.scrollSnapList().forEach((scrollSnap, snapIndex) => {\n let diffToTarget = scrollSnap - scrollProgress\n const slidesInSnap = engine.slideRegistry[snapIndex]\n\n slidesInSnap.forEach((slideIndex) => {\n if (isScrollEvent && !slidesInView.includes(slideIndex)) return\n\n if (engine.options.loop) {\n engine.slideLooper.loopPoints.forEach((loopItem) => {\n const target = loopItem.target()\n\n if (slideIndex === loopItem.index && target !== 0) {\n const sign = Math.sign(target)\n\n if (sign === -1) {\n diffToTarget = scrollSnap - (1 + scrollProgress)\n }\n if (sign === 1) {\n diffToTarget = scrollSnap + (1 - scrollProgress)\n }\n }\n })\n }\n\n const tweenValue = 1 - Math.abs(diffToTarget * tweenFactor.current)\n const opacity = numberWithinRange(tweenValue, 0, 1).toString()\n emblaApi.slideNodes()[slideIndex].style.opacity = opacity\n })\n })\n },\n []\n )\n\n useEffect(() => {\n if (!emblaApi) return\n\n setTweenFactor(emblaApi)\n tweenOpacity(emblaApi)\n emblaApi\n .on('reInit', setTweenFactor)\n .on('reInit', tweenOpacity)\n .on('scroll', tweenOpacity)\n .on('slideFocus', tweenOpacity)\n }, [emblaApi, tweenOpacity])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n \n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useCallback, useEffect, useRef } from 'react'\nimport {\n EmblaCarouselType,\n EmblaEventType,\n EmblaOptionsType\n} from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\nimport { sandboxImages } from 'components/Sandbox/sandboxImages'\n\nconst TWEEN_FACTOR_BASE = 0.2\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options)\n const tweenFactor = useRef(0)\n const tweenNodes = useRef([])\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const setTweenNodes = useCallback((emblaApi: EmblaCarouselType): void => {\n tweenNodes.current = emblaApi.slideNodes().map((slideNode) => {\n return slideNode.querySelector('.embla__parallax__layer') as HTMLElement\n })\n }, [])\n\n const setTweenFactor = useCallback((emblaApi: EmblaCarouselType) => {\n tweenFactor.current = TWEEN_FACTOR_BASE * emblaApi.scrollSnapList().length\n }, [])\n\n const tweenParallax = useCallback(\n (emblaApi: EmblaCarouselType, eventName?: EmblaEventType) => {\n const engine = emblaApi.internalEngine()\n const scrollProgress = emblaApi.scrollProgress()\n const slidesInView = emblaApi.slidesInView()\n const isScrollEvent = eventName === 'scroll'\n\n emblaApi.scrollSnapList().forEach((scrollSnap, snapIndex) => {\n let diffToTarget = scrollSnap - scrollProgress\n const slidesInSnap = engine.slideRegistry[snapIndex]\n\n slidesInSnap.forEach((slideIndex) => {\n if (isScrollEvent && !slidesInView.includes(slideIndex)) return\n\n if (engine.options.loop) {\n engine.slideLooper.loopPoints.forEach((loopItem) => {\n const target = loopItem.target()\n\n if (slideIndex === loopItem.index && target !== 0) {\n const sign = Math.sign(target)\n\n if (sign === -1) {\n diffToTarget = scrollSnap - (1 + scrollProgress)\n }\n if (sign === 1) {\n diffToTarget = scrollSnap + (1 - scrollProgress)\n }\n }\n })\n }\n\n const translate = diffToTarget * (-1 * tweenFactor.current) * 100\n const tweenNode = tweenNodes.current[slideIndex]\n tweenNode.style.transform = `translateX(${translate}%)`\n })\n })\n },\n []\n )\n\n useEffect(() => {\n if (!emblaApi) return\n\n setTweenNodes(emblaApi)\n setTweenFactor(emblaApi)\n tweenParallax(emblaApi)\n\n emblaApi\n .on('reInit', setTweenNodes)\n .on('reInit', setTweenFactor)\n .on('reInit', tweenParallax)\n .on('scroll', tweenParallax)\n .on('slideFocus', tweenParallax)\n }, [emblaApi, tweenParallax])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n \n \n \n \n \n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useCallback, useEffect, useState } from 'react'\nimport { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options)\n const [scrollProgress, setScrollProgress] = useState(0)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const onScroll = useCallback((emblaApi: EmblaCarouselType) => {\n const progress = Math.max(0, Math.min(1, emblaApi.scrollProgress()))\n setScrollProgress(progress * 100)\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onScroll(emblaApi)\n emblaApi\n .on('reInit', onScroll)\n .on('scroll', onScroll)\n .on('slideFocus', onScroll)\n }, [emblaApi, onScroll])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n {index + 1}\n \n \n ))}\n \n \n\n \n \n \n \n \n\n \n \n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useCallback, useEffect, useRef } from 'react'\nimport {\n EmblaCarouselType,\n EmblaEventType,\n EmblaOptionsType\n} from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\n\nconst TWEEN_FACTOR_BASE = 0.52\n\nconst numberWithinRange = (number: number, min: number, max: number): number =>\n Math.min(Math.max(number, min), max)\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options)\n const tweenFactor = useRef(0)\n const tweenNodes = useRef([])\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const setTweenNodes = useCallback((emblaApi: EmblaCarouselType): void => {\n tweenNodes.current = emblaApi.slideNodes().map((slideNode) => {\n return slideNode.querySelector('.embla__slide__number') as HTMLElement\n })\n }, [])\n\n const setTweenFactor = useCallback((emblaApi: EmblaCarouselType) => {\n tweenFactor.current = TWEEN_FACTOR_BASE * emblaApi.scrollSnapList().length\n }, [])\n\n const tweenScale = useCallback(\n (emblaApi: EmblaCarouselType, eventName?: EmblaEventType) => {\n const engine = emblaApi.internalEngine()\n const scrollProgress = emblaApi.scrollProgress()\n const slidesInView = emblaApi.slidesInView()\n const isScrollEvent = eventName === 'scroll'\n\n emblaApi.scrollSnapList().forEach((scrollSnap, snapIndex) => {\n let diffToTarget = scrollSnap - scrollProgress\n const slidesInSnap = engine.slideRegistry[snapIndex]\n\n slidesInSnap.forEach((slideIndex) => {\n if (isScrollEvent && !slidesInView.includes(slideIndex)) return\n\n if (engine.options.loop) {\n engine.slideLooper.loopPoints.forEach((loopItem) => {\n const target = loopItem.target()\n\n if (slideIndex === loopItem.index && target !== 0) {\n const sign = Math.sign(target)\n\n if (sign === -1) {\n diffToTarget = scrollSnap - (1 + scrollProgress)\n }\n if (sign === 1) {\n diffToTarget = scrollSnap + (1 - scrollProgress)\n }\n }\n })\n }\n\n const tweenValue = 1 - Math.abs(diffToTarget * tweenFactor.current)\n const scale = numberWithinRange(tweenValue, 0, 1).toString()\n const tweenNode = tweenNodes.current[slideIndex]\n tweenNode.style.transform = `scale(${scale})`\n })\n })\n },\n []\n )\n\n useEffect(() => {\n if (!emblaApi) return\n\n setTweenNodes(emblaApi)\n setTweenFactor(emblaApi)\n tweenScale(emblaApi)\n\n emblaApi\n .on('reInit', setTweenNodes)\n .on('reInit', setTweenFactor)\n .on('reInit', tweenScale)\n .on('scroll', tweenScale)\n .on('slideFocus', tweenScale)\n }, [emblaApi, tweenScale])\n\n return (\n \n \n \n {slides.map((index) => (\n \n {index + 1}\n \n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React from 'react'\n\ntype PropType = {\n selected: boolean\n index: number\n onClick: () => void\n}\n\nexport const Thumb: React.FC = (props) => {\n const { selected, index, onClick } = props\n\n return (\n \n \n {index + 1}\n \n \n )\n}\n","import React, { useState, useEffect, useCallback } from 'react'\nimport { EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport { Thumb } from './EmblaCarouselThumbsButton'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [emblaMainRef, emblaMainApi] = useEmblaCarousel(options)\n const [emblaThumbsRef, emblaThumbsApi] = useEmblaCarousel({\n containScroll: 'keepSnaps',\n dragFree: true\n })\n\n const onThumbClick = useCallback(\n (index: number) => {\n if (!emblaMainApi || !emblaThumbsApi) return\n emblaMainApi.scrollTo(index)\n },\n [emblaMainApi, emblaThumbsApi]\n )\n\n const onSelect = useCallback(() => {\n if (!emblaMainApi || !emblaThumbsApi) return\n setSelectedIndex(emblaMainApi.selectedScrollSnap())\n emblaThumbsApi.scrollTo(emblaMainApi.selectedScrollSnap())\n }, [emblaMainApi, emblaThumbsApi, setSelectedIndex])\n\n useEffect(() => {\n if (!emblaMainApi) return\n onSelect()\n\n emblaMainApi.on('select', onSelect).on('reInit', onSelect)\n }, [emblaMainApi, onSelect])\n\n return (\n \n \n \n {slides.map((index) => (\n \n {index + 1}\n \n ))}\n \n \n\n \n \n \n {slides.map((index) => (\n onThumbClick(index)}\n selected={index === selectedIndex}\n index={index}\n />\n ))}\n \n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import image1 from 'assets/images/slide-1.jpg'\nimport image2 from 'assets/images/slide-2.jpg'\nimport image3 from 'assets/images/slide-3.jpg'\nimport image4 from 'assets/images/slide-4.jpg'\nimport image5 from 'assets/images/slide-5.jpg'\n\nconst sandboxImageList: string[] = [image1, image2, image3, image4, image5]\n\nexport const sandboxImages = (index: number): string =>\n sandboxImageList[index % sandboxImageList.length]\n","export default __webpack_public_path__ + \"static/slide-1-47ed6052f4455272d8f76db16447d760.jpg\";","export default __webpack_public_path__ + \"static/slide-2-dc15cfe63eb4aeb8c9c09823179ee64c.jpg\";","export default __webpack_public_path__ + \"static/slide-3-6362505742d23d7cd240880140151a95.jpg\";","export default __webpack_public_path__ + \"static/slide-4-ebad84cfea5ff9481504ded363c22003.jpg\";","export default __webpack_public_path__ + \"static/slide-5-2d88e98502aa565d6269834d7a7be406.jpg\";"],"names":["useDotButton","emblaApi","onButtonClick","selectedIndex","setSelectedIndex","useState","scrollSnaps","setScrollSnaps","onDotButtonClick","useCallback","index","scrollTo","onInit","scrollSnapList","onSelect","selectedScrollSnap","useEffect","on","DotButton","props","children","restProps","React","Object","assign","type","options","slides","propSlides","scrollListenerRef","useRef","listenForScrollRef","hasMoreToLoadRef","setSlides","hasMoreToLoad","setHasMoreToLoad","loadingMore","setLoadingMore","emblaRef","useEmblaCarousel","watchSlides","reloadEmbla","oldEngine","internalEngine","reInit","newEngine","forEach","engineModule","translate","to","location","get","scrollTarget","byDistance","set","animation","start","current","reloadAfterPointerUp","off","engine","dragHandler","pointerDown","boundsActive","limit","reachedMax","target","scrollBounds","toggleActive","prevBtnDisabled","nextBtnDisabled","onPrevButtonClick","onNextButtonClick","usePrevNextButtons","onScroll","lastSlide","slideNodes","length","lastSlideInView","slidesInView","includes","mockApiCall","minWait","maxWait","callback","min","Math","ceil","max","floor","wait","random","setTimeout","currentSlides","newSlideCount","Array","from","keys","addScrollListener","onResize","window","addEventListener","removeEventListener","className","ref","map","key","concat","PrevButton","onClick","disabled","NextButton","WHEEL_ITEM_RADIUS","CIRCLE_DEGREES","WHEEL_RADIUS","round","WHEEL_ITEM_SIZE","tan","PI","isInView","wheelLocation","slidePosition","abs","IosPickerItem","slideCount","perspective","label","loop","axis","dragFree","containScroll","rootNodeRef","totalRadius","rotationOffset","inactivateEmblaTransform","slideLooper","clear","loopPoints","_ref","rotateWheel","wheelRotation","scrollProgress","setContainerStyles","containerNode","style","transform","_","setSlideStyles","slideNode","positionDefault","positionLoopStart","positionLoopEnd","inView","angle","opacity","diffToTarget","distance","LazyLoadImage","imgSrc","hasLoaded","setHasLoaded","setLoaded","onLoad","src","alt","emblaRed","setSlidesInView","updateSlidesInView","filter","indexOf","tweenFactor","setTweenFactor","tweenOpacity","eventName","isScrollEvent","scrollSnap","snapIndex","slideRegistry","slideIndex","loopItem","sign","tweenValue","number","toString","numberWithinRange","sandboxImages","tweenNodes","setTweenNodes","querySelector","tweenParallax","setScrollProgress","progress","tweenScale","scale","Thumb","selected","emblaMainRef","emblaMainApi","emblaThumbsRef","emblaThumbsApi","onThumbClick","sandboxImageList"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"2c8f1d14031690b3a7c730295b2f775c68c4b349-9081749583888e3f282d.js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SAAUH,GAAUG,GAAG,SAAUH,GAAS,GACzD,CAACuL,EAAcvL,IAGhBQ,EAAAA,cAAA,OAAKiF,UAAU,SACbjF,EAAAA,cAAA,OAAKiF,UAAU,kBAAkBC,IAAK4F,GACpC9K,EAAAA,cAAA,OAAKiF,UAAU,oBACZ5E,EAAO8E,KAAK/F,GACXY,EAAAA,cAAA,OAAKiF,UAAU,eAAeG,IAAKhG,GACjCY,EAAAA,cAAA,OAAKiF,UAAU,wBAAwB7F,EAAQ,QAMvDY,EAAAA,cAAA,OAAKiF,UAAU,gBACbjF,EAAAA,cAAA,OAAKiF,UAAU,yBAAyBC,IAAK8F,GAC3ChL,EAAAA,cAAA,OAAKiF,UAAU,2BACZ5E,EAAO8E,KAAK/F,GACXY,EAAAA,cAAC4K,EAAK,CACJxF,IAAKhG,EACLmG,QAASA,IAAM2F,EAAa9L,GAC5ByL,SAAUzL,IAAUP,EACpBO,MAAOA,SAMb,C,uDC5DV,MAAM+L,EAA6B,CCNpB,IAA0B,sDCA1B,IAA0B,sDCA1B,IAA0B,sDCA1B,IAA0B,sDCA1B,IAA0B,uDLQ5BhB,EAAiB/K,GAC5B+L,EAAiB/L,EAAQ+L,EAAiB5H,O","sources":["webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/EmblaCarouselDotButton.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/InfiniteScroll/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/IosPicker/EmblaCarouselIosPickerItem.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/IosPicker/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/LazyLoad/EmblaCarouselLazyLoadImage.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/LazyLoad/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Opacity/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Parallax/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Progress/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Scale/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Thumbs/EmblaCarouselThumbsButton.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/Thumbs/EmblaCarousel.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/sandboxImages.ts","webpack://embla-carousel-docs/./src/assets/images/slide-1.jpg","webpack://embla-carousel-docs/./src/assets/images/slide-2.jpg","webpack://embla-carousel-docs/./src/assets/images/slide-3.jpg","webpack://embla-carousel-docs/./src/assets/images/slide-4.jpg","webpack://embla-carousel-docs/./src/assets/images/slide-5.jpg"],"sourcesContent":["import React, {\n ComponentPropsWithRef,\n useCallback,\n useEffect,\n useState\n} from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UseDotButtonType = {\n selectedIndex: number\n scrollSnaps: number[]\n onDotButtonClick: (index: number) => void\n}\n\nexport const useDotButton = (\n emblaApi: EmblaCarouselType | undefined,\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n): UseDotButtonType => {\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [scrollSnaps, setScrollSnaps] = useState([])\n\n const onDotButtonClick = useCallback(\n (index: number) => {\n if (!emblaApi) return\n emblaApi.scrollTo(index)\n if (onButtonClick) onButtonClick(emblaApi)\n },\n [emblaApi, onButtonClick]\n )\n\n const onInit = useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onInit(emblaApi)\n onSelect(emblaApi)\n\n emblaApi.on('reInit', onInit).on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onInit, onSelect])\n\n return {\n selectedIndex,\n scrollSnaps,\n onDotButtonClick\n }\n}\n\ntype PropType = ComponentPropsWithRef<'button'>\n\nexport const DotButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n {children}\n \n )\n}\n","import React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { EngineType } from 'embla-carousel/components/Engine'\nimport { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\n\nconst mockApiCall = (\n minWait: number,\n maxWait: number,\n callback: () => void\n): void => {\n const min = Math.ceil(minWait)\n const max = Math.floor(maxWait)\n const wait = Math.floor(Math.random() * (max - min + 1)) + min\n setTimeout(callback, wait)\n}\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { options, slides: propSlides } = props\n const scrollListenerRef = useRef<() => void>(() => undefined)\n const listenForScrollRef = useRef(true)\n const hasMoreToLoadRef = useRef(true)\n const [slides, setSlides] = useState(propSlides)\n const [hasMoreToLoad, setHasMoreToLoad] = useState(true)\n const [loadingMore, setLoadingMore] = useState(false)\n\n const [emblaRef, emblaApi] = useEmblaCarousel({\n ...options,\n watchSlides: (emblaApi) => {\n const reloadEmbla = (): void => {\n const oldEngine = emblaApi.internalEngine()\n\n emblaApi.reInit()\n const newEngine = emblaApi.internalEngine()\n const copyEngineModules: (keyof EngineType)[] = [\n 'location',\n 'target',\n 'scrollBody'\n ]\n copyEngineModules.forEach((engineModule) => {\n Object.assign(newEngine[engineModule], oldEngine[engineModule])\n })\n\n newEngine.translate.to(oldEngine.location.get())\n const { index } = newEngine.scrollTarget.byDistance(0, false)\n newEngine.index.set(index)\n newEngine.animation.start()\n\n setLoadingMore(false)\n listenForScrollRef.current = true\n }\n\n const reloadAfterPointerUp = (): void => {\n emblaApi.off('pointerUp', reloadAfterPointerUp)\n reloadEmbla()\n }\n\n const engine = emblaApi.internalEngine()\n\n if (hasMoreToLoadRef.current && engine.dragHandler.pointerDown()) {\n const boundsActive = engine.limit.reachedMax(engine.target.get())\n engine.scrollBounds.toggleActive(boundsActive)\n emblaApi.on('pointerUp', reloadAfterPointerUp)\n } else {\n reloadEmbla()\n }\n }\n })\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const onScroll = useCallback((emblaApi: EmblaCarouselType) => {\n if (!listenForScrollRef.current) return\n\n setLoadingMore((loadingMore) => {\n const lastSlide = emblaApi.slideNodes().length - 1\n const lastSlideInView = emblaApi.slidesInView().includes(lastSlide)\n const loadMore = !loadingMore && lastSlideInView\n\n if (loadMore) {\n listenForScrollRef.current = false\n\n mockApiCall(1000, 2000, () => {\n setSlides((currentSlides) => {\n if (currentSlides.length === 20) {\n setHasMoreToLoad(false)\n emblaApi.off('scroll', scrollListenerRef.current)\n return currentSlides\n }\n const newSlideCount = currentSlides.length + 5\n return Array.from(Array(newSlideCount).keys())\n })\n })\n }\n\n return loadingMore || lastSlideInView\n })\n }, [])\n\n const addScrollListener = useCallback(\n (emblaApi: EmblaCarouselType) => {\n scrollListenerRef.current = () => onScroll(emblaApi)\n emblaApi.on('scroll', scrollListenerRef.current)\n },\n [onScroll]\n )\n\n useEffect(() => {\n if (!emblaApi) return\n addScrollListener(emblaApi)\n\n const onResize = () => emblaApi.reInit()\n window.addEventListener('resize', onResize)\n emblaApi.on('destroy', () => window.removeEventListener('resize', onResize))\n }, [emblaApi, addScrollListener])\n\n useEffect(() => {\n hasMoreToLoadRef.current = hasMoreToLoad\n }, [hasMoreToLoad])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n {index + 1}\n \n \n ))}\n {hasMoreToLoad && (\n \n \n \n )}\n \n \n\n \n \n \n \n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useEffect, useState, useCallback, useRef } from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\n\nconst CIRCLE_DEGREES = 360\nconst WHEEL_ITEM_SIZE = 32\nconst WHEEL_ITEM_COUNT = 18\nconst WHEEL_ITEMS_IN_VIEW = 4\n\nexport const WHEEL_ITEM_RADIUS = CIRCLE_DEGREES / WHEEL_ITEM_COUNT\nexport const IN_VIEW_DEGREES = WHEEL_ITEM_RADIUS * WHEEL_ITEMS_IN_VIEW\nexport const WHEEL_RADIUS = Math.round(\n WHEEL_ITEM_SIZE / 2 / Math.tan(Math.PI / WHEEL_ITEM_COUNT)\n)\n\nconst isInView = (wheelLocation: number, slidePosition: number): boolean =>\n Math.abs(wheelLocation - slidePosition) < IN_VIEW_DEGREES\n\nconst setSlideStyles = (\n emblaApi: EmblaCarouselType,\n index: number,\n loop: boolean,\n slideCount: number,\n totalRadius: number\n): void => {\n const slideNode = emblaApi.slideNodes()[index]\n const wheelLocation = emblaApi.scrollProgress() * totalRadius\n const positionDefault = emblaApi.scrollSnapList()[index] * totalRadius\n const positionLoopStart = positionDefault + totalRadius\n const positionLoopEnd = positionDefault - totalRadius\n\n let inView = false\n let angle = index * -WHEEL_ITEM_RADIUS\n\n if (isInView(wheelLocation, positionDefault)) {\n inView = true\n }\n\n if (loop && isInView(wheelLocation, positionLoopEnd)) {\n inView = true\n angle = -CIRCLE_DEGREES + (slideCount - index) * WHEEL_ITEM_RADIUS\n }\n\n if (loop && isInView(wheelLocation, positionLoopStart)) {\n inView = true\n angle = -(totalRadius % CIRCLE_DEGREES) - index * WHEEL_ITEM_RADIUS\n }\n\n if (inView) {\n slideNode.style.opacity = '1'\n slideNode.style.transform = `translateY(-${\n index * 100\n }%) rotateX(${angle}deg) translateZ(${WHEEL_RADIUS}px)`\n } else {\n slideNode.style.opacity = '0'\n slideNode.style.transform = 'none'\n }\n}\n\nexport const setContainerStyles = (\n emblaApi: EmblaCarouselType,\n wheelRotation: number\n): void => {\n emblaApi.containerNode().style.transform = `translateZ(${WHEEL_RADIUS}px) rotateX(${wheelRotation}deg)`\n}\n\ntype PropType = {\n loop?: boolean\n label: string\n slideCount: number\n perspective: 'left' | 'right'\n}\n\nexport const IosPickerItem: React.FC = (props) => {\n const { slideCount, perspective, label, loop = false } = props\n const [emblaRef, emblaApi] = useEmblaCarousel({\n loop,\n axis: 'y',\n dragFree: true,\n containScroll: false,\n watchSlides: false\n })\n const rootNodeRef = useRef(null)\n const totalRadius = slideCount * WHEEL_ITEM_RADIUS\n const rotationOffset = loop ? 0 : WHEEL_ITEM_RADIUS\n const slides = Array.from(Array(slideCount).keys())\n\n const inactivateEmblaTransform = useCallback(\n (emblaApi: EmblaCarouselType) => {\n if (!emblaApi) return\n const { translate, slideLooper } = emblaApi.internalEngine()\n translate.clear()\n translate.toggleActive(false)\n slideLooper.loopPoints.forEach(({ translate }) => {\n translate.clear()\n translate.toggleActive(false)\n })\n },\n []\n )\n\n const rotateWheel = useCallback(\n (emblaApi: EmblaCarouselType) => {\n const rotation = slideCount * WHEEL_ITEM_RADIUS - rotationOffset\n const wheelRotation = rotation * emblaApi.scrollProgress()\n setContainerStyles(emblaApi, wheelRotation)\n emblaApi.slideNodes().forEach((_, index) => {\n setSlideStyles(emblaApi, index, loop, slideCount, totalRadius)\n })\n },\n [slideCount, rotationOffset, totalRadius]\n )\n\n useEffect(() => {\n if (!emblaApi) return\n\n emblaApi.on('pointerUp', (emblaApi) => {\n const { scrollTo, target, location } = emblaApi.internalEngine()\n const diffToTarget = target.get() - location.get()\n const factor = Math.abs(diffToTarget) < WHEEL_ITEM_SIZE / 2.5 ? 10 : 0.1\n const distance = diffToTarget * factor\n scrollTo.distance(distance, true)\n })\n\n emblaApi.on('scroll', rotateWheel)\n\n emblaApi.on('reInit', (emblaApi) => {\n inactivateEmblaTransform(emblaApi)\n rotateWheel(emblaApi)\n })\n\n inactivateEmblaTransform(emblaApi)\n rotateWheel(emblaApi)\n }, [emblaApi, inactivateEmblaTransform, rotateWheel])\n\n return (\n \n \n \n \n {slides.map((_, index) => (\n \n {index}\n \n ))}\n \n \n \n {label}\n \n )\n}\n","import React from 'react'\nimport { EmblaOptionsType } from 'embla-carousel'\nimport { IosPickerItem } from './EmblaCarouselIosPickerItem'\n\ntype PropType = {\n loop?: EmblaOptionsType['loop']\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { loop } = props\n\n return (\n \n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useState, useCallback } from 'react'\n\nconst PLACEHOLDER_SRC = `data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D`\n\ntype PropType = {\n imgSrc: string\n inView: boolean\n index: number\n}\n\nexport const LazyLoadImage: React.FC = (props) => {\n const { imgSrc, inView } = props\n const [hasLoaded, setHasLoaded] = useState(false)\n\n const setLoaded = useCallback(() => {\n if (inView) setHasLoaded(true)\n }, [inView, setHasLoaded])\n\n return (\n \n \n {!hasLoaded && }\n \n \n \n )\n}\n","import React, { useCallback, useEffect, useState } from 'react'\nimport { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport { LazyLoadImage } from './EmblaCarouselLazyLoadImage'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRed, emblaApi] = useEmblaCarousel(options)\n const [slidesInView, setSlidesInView] = useState([])\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const updateSlidesInView = useCallback((emblaApi: EmblaCarouselType) => {\n setSlidesInView((slidesInView) => {\n if (slidesInView.length === emblaApi.slideNodes().length) {\n emblaApi.off('slidesInView', updateSlidesInView)\n }\n const inView = emblaApi\n .slidesInView()\n .filter((index) => !slidesInView.includes(index))\n return slidesInView.concat(inView)\n })\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n updateSlidesInView(emblaApi)\n emblaApi.on('slidesInView', updateSlidesInView)\n emblaApi.on('reInit', updateSlidesInView)\n }, [emblaApi, updateSlidesInView])\n\n return (\n \n \n \n {slides.map((index) => (\n -1}\n />\n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useCallback, useEffect, useRef } from 'react'\nimport {\n EmblaCarouselType,\n EmblaEventType,\n EmblaOptionsType\n} from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\nimport { sandboxImages } from 'components/Sandbox/sandboxImages'\n\nconst TWEEN_FACTOR_BASE = 0.84\n\nconst numberWithinRange = (number: number, min: number, max: number): number =>\n Math.min(Math.max(number, min), max)\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options)\n const tweenFactor = useRef(0)\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const setTweenFactor = useCallback((emblaApi: EmblaCarouselType) => {\n tweenFactor.current = TWEEN_FACTOR_BASE * emblaApi.scrollSnapList().length\n }, [])\n\n const tweenOpacity = useCallback(\n (emblaApi: EmblaCarouselType, eventName?: EmblaEventType) => {\n const engine = emblaApi.internalEngine()\n const scrollProgress = emblaApi.scrollProgress()\n const slidesInView = emblaApi.slidesInView()\n const isScrollEvent = eventName === 'scroll'\n\n emblaApi.scrollSnapList().forEach((scrollSnap, snapIndex) => {\n let diffToTarget = scrollSnap - scrollProgress\n const slidesInSnap = engine.slideRegistry[snapIndex]\n\n slidesInSnap.forEach((slideIndex) => {\n if (isScrollEvent && !slidesInView.includes(slideIndex)) return\n\n if (engine.options.loop) {\n engine.slideLooper.loopPoints.forEach((loopItem) => {\n const target = loopItem.target()\n\n if (slideIndex === loopItem.index && target !== 0) {\n const sign = Math.sign(target)\n\n if (sign === -1) {\n diffToTarget = scrollSnap - (1 + scrollProgress)\n }\n if (sign === 1) {\n diffToTarget = scrollSnap + (1 - scrollProgress)\n }\n }\n })\n }\n\n const tweenValue = 1 - Math.abs(diffToTarget * tweenFactor.current)\n const opacity = numberWithinRange(tweenValue, 0, 1).toString()\n emblaApi.slideNodes()[slideIndex].style.opacity = opacity\n })\n })\n },\n []\n )\n\n useEffect(() => {\n if (!emblaApi) return\n\n setTweenFactor(emblaApi)\n tweenOpacity(emblaApi)\n emblaApi\n .on('reInit', setTweenFactor)\n .on('reInit', tweenOpacity)\n .on('scroll', tweenOpacity)\n .on('slideFocus', tweenOpacity)\n }, [emblaApi, tweenOpacity])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n \n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useCallback, useEffect, useRef } from 'react'\nimport {\n EmblaCarouselType,\n EmblaEventType,\n EmblaOptionsType\n} from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\nimport { sandboxImages } from 'components/Sandbox/sandboxImages'\n\nconst TWEEN_FACTOR_BASE = 0.2\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options)\n const tweenFactor = useRef(0)\n const tweenNodes = useRef([])\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const setTweenNodes = useCallback((emblaApi: EmblaCarouselType): void => {\n tweenNodes.current = emblaApi.slideNodes().map((slideNode) => {\n return slideNode.querySelector('.embla__parallax__layer') as HTMLElement\n })\n }, [])\n\n const setTweenFactor = useCallback((emblaApi: EmblaCarouselType) => {\n tweenFactor.current = TWEEN_FACTOR_BASE * emblaApi.scrollSnapList().length\n }, [])\n\n const tweenParallax = useCallback(\n (emblaApi: EmblaCarouselType, eventName?: EmblaEventType) => {\n const engine = emblaApi.internalEngine()\n const scrollProgress = emblaApi.scrollProgress()\n const slidesInView = emblaApi.slidesInView()\n const isScrollEvent = eventName === 'scroll'\n\n emblaApi.scrollSnapList().forEach((scrollSnap, snapIndex) => {\n let diffToTarget = scrollSnap - scrollProgress\n const slidesInSnap = engine.slideRegistry[snapIndex]\n\n slidesInSnap.forEach((slideIndex) => {\n if (isScrollEvent && !slidesInView.includes(slideIndex)) return\n\n if (engine.options.loop) {\n engine.slideLooper.loopPoints.forEach((loopItem) => {\n const target = loopItem.target()\n\n if (slideIndex === loopItem.index && target !== 0) {\n const sign = Math.sign(target)\n\n if (sign === -1) {\n diffToTarget = scrollSnap - (1 + scrollProgress)\n }\n if (sign === 1) {\n diffToTarget = scrollSnap + (1 - scrollProgress)\n }\n }\n })\n }\n\n const translate = diffToTarget * (-1 * tweenFactor.current) * 100\n const tweenNode = tweenNodes.current[slideIndex]\n tweenNode.style.transform = `translateX(${translate}%)`\n })\n })\n },\n []\n )\n\n useEffect(() => {\n if (!emblaApi) return\n\n setTweenNodes(emblaApi)\n setTweenFactor(emblaApi)\n tweenParallax(emblaApi)\n\n emblaApi\n .on('reInit', setTweenNodes)\n .on('reInit', setTweenFactor)\n .on('reInit', tweenParallax)\n .on('scroll', tweenParallax)\n .on('slideFocus', tweenParallax)\n }, [emblaApi, tweenParallax])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n \n \n \n \n \n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useCallback, useEffect, useState } from 'react'\nimport { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options)\n const [scrollProgress, setScrollProgress] = useState(0)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const onScroll = useCallback((emblaApi: EmblaCarouselType) => {\n const progress = Math.max(0, Math.min(1, emblaApi.scrollProgress()))\n setScrollProgress(progress * 100)\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onScroll(emblaApi)\n emblaApi\n .on('reInit', onScroll)\n .on('scroll', onScroll)\n .on('slideFocus', onScroll)\n }, [emblaApi, onScroll])\n\n return (\n \n \n \n {slides.map((index) => (\n \n \n {index + 1}\n \n \n ))}\n \n \n\n \n \n \n \n \n\n \n \n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React, { useCallback, useEffect, useRef } from 'react'\nimport {\n EmblaCarouselType,\n EmblaEventType,\n EmblaOptionsType\n} from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport {\n NextButton,\n PrevButton,\n usePrevNextButtons\n} from '../EmblaCarouselArrowButtons'\nimport { DotButton, useDotButton } from '../EmblaCarouselDotButton'\n\nconst TWEEN_FACTOR_BASE = 0.52\n\nconst numberWithinRange = (number: number, min: number, max: number): number =>\n Math.min(Math.max(number, min), max)\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(options)\n const tweenFactor = useRef(0)\n const tweenNodes = useRef([])\n\n const { selectedIndex, scrollSnaps, onDotButtonClick } =\n useDotButton(emblaApi)\n\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(emblaApi)\n\n const setTweenNodes = useCallback((emblaApi: EmblaCarouselType): void => {\n tweenNodes.current = emblaApi.slideNodes().map((slideNode) => {\n return slideNode.querySelector('.embla__slide__number') as HTMLElement\n })\n }, [])\n\n const setTweenFactor = useCallback((emblaApi: EmblaCarouselType) => {\n tweenFactor.current = TWEEN_FACTOR_BASE * emblaApi.scrollSnapList().length\n }, [])\n\n const tweenScale = useCallback(\n (emblaApi: EmblaCarouselType, eventName?: EmblaEventType) => {\n const engine = emblaApi.internalEngine()\n const scrollProgress = emblaApi.scrollProgress()\n const slidesInView = emblaApi.slidesInView()\n const isScrollEvent = eventName === 'scroll'\n\n emblaApi.scrollSnapList().forEach((scrollSnap, snapIndex) => {\n let diffToTarget = scrollSnap - scrollProgress\n const slidesInSnap = engine.slideRegistry[snapIndex]\n\n slidesInSnap.forEach((slideIndex) => {\n if (isScrollEvent && !slidesInView.includes(slideIndex)) return\n\n if (engine.options.loop) {\n engine.slideLooper.loopPoints.forEach((loopItem) => {\n const target = loopItem.target()\n\n if (slideIndex === loopItem.index && target !== 0) {\n const sign = Math.sign(target)\n\n if (sign === -1) {\n diffToTarget = scrollSnap - (1 + scrollProgress)\n }\n if (sign === 1) {\n diffToTarget = scrollSnap + (1 - scrollProgress)\n }\n }\n })\n }\n\n const tweenValue = 1 - Math.abs(diffToTarget * tweenFactor.current)\n const scale = numberWithinRange(tweenValue, 0, 1).toString()\n const tweenNode = tweenNodes.current[slideIndex]\n tweenNode.style.transform = `scale(${scale})`\n })\n })\n },\n []\n )\n\n useEffect(() => {\n if (!emblaApi) return\n\n setTweenNodes(emblaApi)\n setTweenFactor(emblaApi)\n tweenScale(emblaApi)\n\n emblaApi\n .on('reInit', setTweenNodes)\n .on('reInit', setTweenFactor)\n .on('reInit', tweenScale)\n .on('scroll', tweenScale)\n .on('slideFocus', tweenScale)\n }, [emblaApi, tweenScale])\n\n return (\n \n \n \n {slides.map((index) => (\n \n {index + 1}\n \n ))}\n \n \n\n \n \n \n \n \n\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import React from 'react'\n\ntype PropType = {\n selected: boolean\n index: number\n onClick: () => void\n}\n\nexport const Thumb: React.FC = (props) => {\n const { selected, index, onClick } = props\n\n return (\n \n \n {index + 1}\n \n \n )\n}\n","import React, { useState, useEffect, useCallback } from 'react'\nimport { EmblaOptionsType } from 'embla-carousel'\nimport useEmblaCarousel from 'embla-carousel-react'\nimport { Thumb } from './EmblaCarouselThumbsButton'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [emblaMainRef, emblaMainApi] = useEmblaCarousel(options)\n const [emblaThumbsRef, emblaThumbsApi] = useEmblaCarousel({\n containScroll: 'keepSnaps',\n dragFree: true\n })\n\n const onThumbClick = useCallback(\n (index: number) => {\n if (!emblaMainApi || !emblaThumbsApi) return\n emblaMainApi.scrollTo(index)\n },\n [emblaMainApi, emblaThumbsApi]\n )\n\n const onSelect = useCallback(() => {\n if (!emblaMainApi || !emblaThumbsApi) return\n setSelectedIndex(emblaMainApi.selectedScrollSnap())\n emblaThumbsApi.scrollTo(emblaMainApi.selectedScrollSnap())\n }, [emblaMainApi, emblaThumbsApi, setSelectedIndex])\n\n useEffect(() => {\n if (!emblaMainApi) return\n onSelect()\n\n emblaMainApi.on('select', onSelect).on('reInit', onSelect)\n }, [emblaMainApi, onSelect])\n\n return (\n \n \n \n {slides.map((index) => (\n \n {index + 1}\n \n ))}\n \n \n\n \n \n \n {slides.map((index) => (\n onThumbClick(index)}\n selected={index === selectedIndex}\n index={index}\n />\n ))}\n \n \n \n \n )\n}\n\nexport default EmblaCarousel\n","import image1 from 'assets/images/slide-1.jpg'\nimport image2 from 'assets/images/slide-2.jpg'\nimport image3 from 'assets/images/slide-3.jpg'\nimport image4 from 'assets/images/slide-4.jpg'\nimport image5 from 'assets/images/slide-5.jpg'\n\nconst sandboxImageList: string[] = [image1, image2, image3, image4, image5]\n\nexport const sandboxImages = (index: number): string =>\n sandboxImageList[index % sandboxImageList.length]\n","export default __webpack_public_path__ + \"static/slide-1-47ed6052f4455272d8f76db16447d760.jpg\";","export default __webpack_public_path__ + \"static/slide-2-dc15cfe63eb4aeb8c9c09823179ee64c.jpg\";","export default __webpack_public_path__ + \"static/slide-3-6362505742d23d7cd240880140151a95.jpg\";","export default __webpack_public_path__ + \"static/slide-4-ebad84cfea5ff9481504ded363c22003.jpg\";","export default __webpack_public_path__ + \"static/slide-5-2d88e98502aa565d6269834d7a7be406.jpg\";"],"names":["useDotButton","emblaApi","onButtonClick","selectedIndex","setSelectedIndex","useState","scrollSnaps","setScrollSnaps","onDotButtonClick","useCallback","index","scrollTo","onInit","scrollSnapList","onSelect","selectedScrollSnap","useEffect","on","DotButton","props","children","restProps","React","Object","assign","type","options","slides","propSlides","scrollListenerRef","useRef","listenForScrollRef","hasMoreToLoadRef","setSlides","hasMoreToLoad","setHasMoreToLoad","loadingMore","setLoadingMore","emblaRef","useEmblaCarousel","watchSlides","reloadEmbla","oldEngine","internalEngine","reInit","newEngine","forEach","engineModule","translate","to","location","get","scrollTarget","byDistance","set","animation","start","current","reloadAfterPointerUp","off","engine","dragHandler","pointerDown","boundsActive","limit","reachedMax","target","scrollBounds","toggleActive","prevBtnDisabled","nextBtnDisabled","onPrevButtonClick","onNextButtonClick","usePrevNextButtons","onScroll","lastSlide","slideNodes","length","lastSlideInView","slidesInView","includes","mockApiCall","minWait","maxWait","callback","min","Math","ceil","max","floor","wait","random","setTimeout","currentSlides","newSlideCount","Array","from","keys","addScrollListener","onResize","window","addEventListener","removeEventListener","className","ref","map","key","concat","PrevButton","onClick","disabled","NextButton","WHEEL_ITEM_RADIUS","CIRCLE_DEGREES","WHEEL_RADIUS","round","WHEEL_ITEM_SIZE","tan","PI","isInView","wheelLocation","slidePosition","abs","IosPickerItem","slideCount","perspective","label","loop","axis","dragFree","containScroll","rootNodeRef","totalRadius","rotationOffset","inactivateEmblaTransform","slideLooper","clear","loopPoints","_ref","rotateWheel","wheelRotation","scrollProgress","setContainerStyles","containerNode","style","transform","_","setSlideStyles","slideNode","positionDefault","positionLoopStart","positionLoopEnd","inView","angle","opacity","diffToTarget","distance","LazyLoadImage","imgSrc","hasLoaded","setHasLoaded","setLoaded","onLoad","src","alt","emblaRed","setSlidesInView","updateSlidesInView","filter","indexOf","tweenFactor","setTweenFactor","tweenOpacity","eventName","isScrollEvent","scrollSnap","snapIndex","slideRegistry","slideIndex","loopItem","sign","tweenValue","number","toString","numberWithinRange","sandboxImages","tweenNodes","setTweenNodes","querySelector","tweenParallax","setScrollProgress","progress","tweenScale","scale","Thumb","selected","emblaMainRef","emblaMainApi","emblaThumbsRef","emblaThumbsApi","onThumbClick","sandboxImageList"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/3602-1df978a2563465b2ac92.js.map b/docs/3602-1df978a2563465b2ac92.js.map index 0fbf96fbb..fe077ab02 100644 --- a/docs/3602-1df978a2563465b2ac92.js.map +++ b/docs/3602-1df978a2563465b2ac92.js.map @@ -1 +1 @@ -{"version":3,"file":"3602-1df978a2563465b2ac92.js","mappings":"2LAcO,MAqDMA,EAAiCC,IAC5C,MAAM,SAAEC,KAAaC,GAAcF,EAEnC,OACEG,EAAAA,cAAA,SAAAC,OAAAC,OAAA,CAAQC,KAAK,UAAaJ,GACvBD,EACM,ECAAM,EAAkCP,IAC7C,MAAM,SAAEC,KAAaC,GAAcF,EAEnC,OACEG,EAAAA,cAAA,SAAAC,OAAAC,OAAA,CACEG,UAAU,oCACVF,KAAK,UACDJ,GAEJC,EAAAA,cAAA,OAAKK,UAAU,qBAAqBC,QAAQ,eAE1CN,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,+VAIJR,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,4VAIJR,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,+VAILV,EACM,EAIAW,EAAkCZ,IAC7C,MAAM,SAAEC,KAAaC,GAAcF,EAEnC,OACEG,EAAAA,cAAA,SAAAC,OAAAC,OAAA,CACEG,UAAU,oCACVF,KAAK,UACDJ,GAEJC,EAAAA,cAAA,OAAKK,UAAU,qBAAqBC,QAAQ,eAE1CN,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,4VAIJR,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,+VAIJR,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,+VAILV,EACM,ECnGAY,EAA2Cb,IACtD,MAAM,aAAEc,EAAY,UAAEC,GAAcf,EAEpC,OACEG,EAAAA,cAAA,OAAKK,UAAU,gCACZM,EAAe,EAAE,MAAIC,EAClB,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B,GAAQ/B,IAC1D,CAEA,SAAS2I,IACP,MAAM,cAAEC,GAAkBjI,EAASsE,iBAEnCiD,EADqBU,EAAcjI,EAASyB,sBACX3B,EAAQ0G,QAC3C,CAEA,SAAS0B,IAEPX,EADqBvH,EAASmI,eACGrI,EAAQ2G,OAC3C,CAQA,MAN6B,CAC3BnB,KAAM,aACNxF,QAASgE,EACTyB,KAtEF,SACEC,EACAC,GAEAzF,EAAWwF,EAEX,MAAM,aAAEE,EAAY,eAAEC,GAAmBF,EACnCG,EAAcF,EAAatC,EAAgBjD,EAAW0F,eACtDC,EAAaJ,EAAaE,EAAa9B,GAC7ChE,EAAU6F,EAAeG,GAEzBG,EAAOjG,EAAS6D,WAChBhE,EAASG,EAASoI,eACIpI,EAASsE,iBAAiBxE,QAAQuI,WAGtDpB,EAAShB,EAAMnG,EAAQ4G,WAErB5G,EAAQ6G,UACVQ,EAAeW,SAASR,GAAQtH,EAAS2B,GAAG2F,EAAKD,KAE/CvH,EAAQ0G,UACVU,EAAeY,SAASR,GAAQtH,EAAS2B,GAAG2F,EAAKU,KACjDA,KAEElI,EAAQ2G,SACVW,EAAaU,SAASR,GAAQtH,EAAS2B,GAAG2F,EAAKY,KAC/CA,IAEJ,EA0CE9B,QAxCF,WACEQ,EAAYX,EAAMnG,EAAQ4G,WAC1BS,EAAeW,SAASR,GAAQtH,EAASqG,IAAIiB,EAAKD,KAClDH,EAAeY,SAASR,GAAQtH,EAASqG,IAAIiB,EAAKU,KAClDZ,EAAaU,SAASR,GAAQtH,EAASqG,IAAIiB,EAAKY,KAChDrI,EAAOiI,SAASC,GAAUnB,EAAYmB,EAAOjI,EAAQ0G,UACvD,EAqCF,CAEArG,EAAW0F,mBAAmDU,C","sources":["webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/CarouselGenerator/EmblaCarouselDotButton.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/CarouselGenerator/EmblaCarouselArrowButtons.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/CarouselGenerator/EmblaCarouselSelectedSnapDisplay.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/CarouselGenerator/EmblaCarousel.tsx","webpack://embla-carousel-docs/../src/components/Options.ts","webpack://embla-carousel-docs/../src/components/Autoplay.ts","webpack://embla-carousel-docs/../src/components/utils.ts","webpack://embla-carousel-docs/../src/components/ClassNames.ts"],"sourcesContent":["import React, {\n PropsWithChildren,\n useCallback,\n useEffect,\n useState\n} from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UseDotButtonType = {\n selectedIndex: number\n scrollSnaps: number[]\n onDotButtonClick: (index: number) => void\n}\n\nexport const useDotButton = (\n emblaApi: EmblaCarouselType | undefined,\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n): UseDotButtonType => {\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [scrollSnaps, setScrollSnaps] = useState([])\n\n const onDotButtonClick = useCallback(\n (index: number) => {\n if (!emblaApi) return\n emblaApi.scrollTo(index)\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n },\n [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ]\n )\n\n const onInit = useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onInit(emblaApi)\n onSelect(emblaApi)\n emblaApi.on('reInit', onInit).on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onInit, onSelect])\n\n return {\n selectedIndex,\n scrollSnaps,\n onDotButtonClick\n }\n}\n\ntype PropType = PropsWithChildren<\n React.DetailedHTMLProps<\n React.ButtonHTMLAttributes,\n HTMLButtonElement\n >\n>\n\nexport const DotButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n {children}\n \n )\n}\n","import React, {\n PropsWithChildren,\n useCallback,\n useEffect,\n useState\n} from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UsePrevNextButtonsType = {\n prevBtnDisabled: boolean\n nextBtnDisabled: boolean\n onPrevButtonClick: () => void\n onNextButtonClick: () => void\n}\n\nexport const usePrevNextButtons = (\n emblaApi: EmblaCarouselType | undefined,\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n): UsePrevNextButtonsType => {\n const [prevBtnDisabled, setPrevBtnDisabled] = useState(true)\n const [nextBtnDisabled, setNextBtnDisabled] = useState(true)\n\n const onPrevButtonClick = useCallback(() => {\n if (!emblaApi) return\n emblaApi.scrollPrev()\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n }, [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ])\n\n const onNextButtonClick = useCallback(() => {\n if (!emblaApi) return\n emblaApi.scrollNext()\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n }, [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setPrevBtnDisabled(!emblaApi.canScrollPrev())\n setNextBtnDisabled(!emblaApi.canScrollNext())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onSelect(emblaApi)\n emblaApi.on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onSelect])\n\n return {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n }\n}\n\ntype PropType = PropsWithChildren<\n React.DetailedHTMLProps<\n React.ButtonHTMLAttributes,\n HTMLButtonElement\n >\n>\n\nexport const PrevButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\n \n {children}\n \n )\n}\n\nexport const NextButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\n \n {children}\n \n )\n}\n","import React, { useCallback, useEffect, useState } from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UseSelectedSnapDisplayType = {\n selectedSnap: number\n snapCount: number\n}\n\nexport const useSelectedSnapDisplay = (\n emblaApi: EmblaCarouselType | undefined\n): UseSelectedSnapDisplayType => {\n const [selectedSnap, setSelectedSnap] = useState(0)\n const [snapCount, setSnapCount] = useState(0)\n\n const updateScrollSnapState = useCallback((emblaApi: EmblaCarouselType) => {\n setSnapCount(emblaApi.scrollSnapList().length)\n setSelectedSnap(emblaApi.selectedScrollSnap())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n updateScrollSnapState(emblaApi)\n emblaApi.on('select', updateScrollSnapState)\n emblaApi.on('reInit', updateScrollSnapState)\n }, [emblaApi, updateScrollSnapState])\n\n return {\n selectedSnap,\n snapCount\n }\n}\n\ntype PropType = {\n selectedSnap: number\n snapCount: number\n}\n\nexport const SelectedSnapDisplay: React.FC = (props) => {\n const { selectedSnap, snapCount } = props\n\n return (\n \n {selectedSnap + 1} / {snapCount}\n \n )\n}\n","import React, {\n /*__NAV_AUTOPLAY_REPLACE_START__*/ useCallback /*__NAV_AUTOPLAY_REPLACE_END__*/\n} from 'react'\nimport {\n EmblaOptionsType,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ EmblaCarouselType /*__NAV_AUTOPLAY_REPLACE_END__*/\n} from 'embla-carousel'\n/*__DOT_BUTTONS_REPLACE_START__*/\nimport { DotButton, useDotButton } from './EmblaCarouselDotButton'\n/*__DOT_BUTTONS_REPLACE_END__*/\n/*__PREV_NEXT_BUTTONS_REPLACE_START__*/\nimport {\n PrevButton,\n NextButton,\n usePrevNextButtons\n} from './EmblaCarouselArrowButtons'\n/*__PREV_NEXT_BUTTONS_REPLACE_END__*/\n/*__SELECTED_SNAP_DISPLAY_REPLACE_START__*/\nimport {\n SelectedSnapDisplay,\n useSelectedSnapDisplay\n} from './EmblaCarouselSelectedSnapDisplay'\n/*__SELECTED_SNAP_DISPLAY_REPLACE_END__*/\n/*__AUTOPLAY_REPLACE_START__*/\nimport Autoplay from 'embla-carousel-autoplay'\n/*__AUTOPLAY_REPLACE_END__*/\n/*__CLASS_NAMES_REPLACE_START__*/\nimport ClassNames from 'embla-carousel-class-names'\n/*__CLASS_NAMES_REPLACE_END__*/\nimport useEmblaCarousel from 'embla-carousel-react'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(\n options,\n /*__PLUGINS_REPLACE_START__*/\n [\n /*__AUTOPLAY_REPLACE_START__*/\n Autoplay(),\n /*__AUTOPLAY_REPLACE_END__*/\n\n /*__CLASS_NAMES_REPLACE_START__*/\n ClassNames()\n /*__CLASS_NAMES_REPLACE_END__*/\n ]\n /*__PLUGINS_REPLACE_END__*/\n )\n\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n const onNavButtonClick = useCallback((emblaApi: EmblaCarouselType) => {\n const autoplay = emblaApi?.plugins()?.autoplay\n if (!autoplay) return\n\n const resetOrStop =\n autoplay.options.stopOnInteraction === false\n ? autoplay.reset\n : autoplay.stop\n\n resetOrStop()\n }, [])\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n\n /*__DOT_BUTTONS_REPLACE_START__*/\n const { selectedIndex, scrollSnaps, onDotButtonClick } = useDotButton(\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onNavButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n )\n /*__DOT_BUTTONS_REPLACE_END__*/\n\n /*__PREV_NEXT_BUTTONS_REPLACE_START__*/\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onNavButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n )\n /*__PREV_NEXT_BUTTONS_REPLACE_END__*/\n\n /*__SELECTED_SNAP_DISPLAY_REPLACE_START__*/\n const { selectedSnap, snapCount } = useSelectedSnapDisplay(emblaApi)\n /*__SELECTED_SNAP_DISPLAY_REPLACE_END__*/\n\n return (\n \n \n \n {slides.map((index) => (\n \n {index + 1}\n \n ))}\n \n \n\n {/*__CONTROLS_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_REPLACE_START__*/}\n \n \n \n \n {/*__PREV_NEXT_BUTTONS_REPLACE_END__*/}\n\n {/*__DOT_BUTTONS_REPLACE_START__*/}\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n {/*__DOT_BUTTONS_REPLACE_END__*/}\n\n {/*__SELECTED_SNAP_DISPLAY_REPLACE_START__*/}\n \n {/*__SELECTED_SNAP_DISPLAY_REPLACE_END__*/}\n \n {/*__CONTROLS_REPLACE_END__*/}\n \n )\n}\n\nexport default EmblaCarousel\n","import { CreateOptionsType } from 'embla-carousel/components/Options'\n\nexport type OptionsType = CreateOptionsType<{\n delay: number\n jump: boolean\n playOnInit: boolean\n stopOnFocusIn: boolean\n stopOnInteraction: boolean\n stopOnMouseEnter: boolean\n stopOnLastSnap: boolean\n rootNode: ((emblaRoot: HTMLElement) => HTMLElement | null) | null\n}>\n\nexport const defaultOptions: OptionsType = {\n active: true,\n breakpoints: {},\n delay: 4000,\n jump: false,\n playOnInit: true,\n stopOnFocusIn: true,\n stopOnInteraction: true,\n stopOnMouseEnter: false,\n stopOnLastSnap: false,\n rootNode: null\n}\n","import { OptionsType, defaultOptions } from './Options'\nimport { CreatePluginType } from 'embla-carousel/components/Plugins'\nimport { OptionsHandlerType } from 'embla-carousel/components/OptionsHandler'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ndeclare module 'embla-carousel/components/Plugins' {\n interface EmblaPluginsType {\n autoplay?: AutoplayType\n }\n}\n\ndeclare module 'embla-carousel/components/EventHandler' {\n interface EmblaEventListType {\n autoplayPlay: 'autoplay:play'\n autoplayStop: 'autoplay:stop'\n }\n}\n\nexport type AutoplayType = CreatePluginType<\n {\n play: (jump?: boolean) => void\n stop: () => void\n reset: () => void\n isPlaying: () => boolean\n },\n OptionsType\n>\n\nexport type AutoplayOptionsType = AutoplayType['options']\n\nfunction Autoplay(userOptions: AutoplayOptionsType = {}): AutoplayType {\n let options: OptionsType\n let emblaApi: EmblaCarouselType\n let destroyed: boolean\n let playing = false\n let resume = true\n let jump = false\n let timer = 0\n\n function init(\n emblaApiInstance: EmblaCarouselType,\n optionsHandler: OptionsHandlerType\n ): void {\n emblaApi = emblaApiInstance\n\n const { mergeOptions, optionsAtMedia } = optionsHandler\n const optionsBase = mergeOptions(defaultOptions, Autoplay.globalOptions)\n const allOptions = mergeOptions(optionsBase, userOptions)\n options = optionsAtMedia(allOptions)\n\n if (emblaApi.scrollSnapList().length <= 1) return\n\n jump = options.jump\n destroyed = false\n\n const { eventStore, ownerDocument } = emblaApi.internalEngine()\n const emblaRoot = emblaApi.rootNode()\n const root = (options.rootNode && options.rootNode(emblaRoot)) || emblaRoot\n const container = emblaApi.containerNode()\n\n emblaApi.on('pointerDown', stopTimer)\n\n if (!options.stopOnInteraction) {\n emblaApi.on('pointerUp', startTimer)\n }\n\n if (options.stopOnMouseEnter) {\n eventStore.add(root, 'mouseenter', () => {\n resume = false\n stopTimer()\n })\n\n if (!options.stopOnInteraction) {\n eventStore.add(root, 'mouseleave', () => {\n resume = true\n startTimer()\n })\n }\n }\n\n if (options.stopOnFocusIn) {\n eventStore.add(container, 'focusin', stopTimer)\n\n if (!options.stopOnInteraction) {\n eventStore.add(container, 'focusout', startTimer)\n }\n }\n\n eventStore.add(ownerDocument, 'visibilitychange', visibilityChange)\n\n if (options.playOnInit && !documentIsHidden()) startTimer()\n }\n\n function destroy(): void {\n emblaApi.off('pointerDown', stopTimer).off('pointerUp', startTimer)\n stopTimer()\n destroyed = true\n playing = false\n }\n\n function startTimer(): void {\n if (destroyed) return\n if (!resume) return\n if (!playing) emblaApi.emit('autoplay:play')\n const { ownerWindow } = emblaApi.internalEngine()\n ownerWindow.clearInterval(timer)\n timer = ownerWindow.setInterval(next, options.delay)\n playing = true\n }\n\n function stopTimer(): void {\n if (destroyed) return\n if (playing) emblaApi.emit('autoplay:stop')\n const { ownerWindow } = emblaApi.internalEngine()\n ownerWindow.clearInterval(timer)\n timer = 0\n playing = false\n }\n\n function visibilityChange(): void {\n if (documentIsHidden()) {\n resume = playing\n return stopTimer()\n }\n\n if (resume) startTimer()\n }\n\n function documentIsHidden(): boolean {\n const { ownerDocument } = emblaApi.internalEngine()\n return ownerDocument.visibilityState === 'hidden'\n }\n\n function play(jumpOverride?: boolean): void {\n if (typeof jumpOverride !== 'undefined') jump = jumpOverride\n resume = true\n startTimer()\n }\n\n function stop(): void {\n if (playing) stopTimer()\n }\n\n function reset(): void {\n if (playing) play()\n }\n\n function isPlaying(): boolean {\n return playing\n }\n\n function next(): void {\n const { index } = emblaApi.internalEngine()\n const nextIndex = index.clone().add(1).get()\n const lastIndex = emblaApi.scrollSnapList().length - 1\n const kill = options.stopOnLastSnap && nextIndex === lastIndex\n\n if (kill) stopTimer()\n\n if (emblaApi.canScrollNext()) {\n emblaApi.scrollNext(jump)\n } else {\n emblaApi.scrollTo(0, jump)\n }\n }\n\n const self: AutoplayType = {\n name: 'autoplay',\n options: userOptions,\n init,\n destroy,\n play,\n stop,\n reset,\n isPlaying\n }\n return self\n}\n\nAutoplay.globalOptions = undefined\n\nexport default Autoplay\n","export function removeClass(node: HTMLElement, className: string): void {\n if (!node || !className) return\n const { classList } = node\n if (classList.contains(className)) classList.remove(className)\n}\n\nexport function addClass(node: HTMLElement, className: string): void {\n if (!node || !className) return\n const { classList } = node\n if (!classList.contains(className)) classList.add(className)\n}\n\nexport function nodeListToArray(nodeList: NodeListOf): HTMLElement[] {\n return Array.from(nodeList)\n}\n","import { defaultOptions, OptionsType } from './Options'\nimport { nodeListToArray, addClass, removeClass } from './utils'\nimport { CreatePluginType } from 'embla-carousel/components/Plugins'\nimport { EmblaCarouselType, EmblaEventType } from 'embla-carousel'\nimport { OptionsHandlerType } from 'embla-carousel/components/OptionsHandler'\n\ndeclare module 'embla-carousel/components/Plugins' {\n interface EmblaPluginsType {\n classNames?: ClassNamesType\n }\n}\n\nexport type ClassNamesType = CreatePluginType<{}, OptionsType>\n\nexport type ClassNamesOptionsType = ClassNamesType['options']\n\nfunction ClassNames(userOptions: ClassNamesOptionsType = {}): ClassNamesType {\n let options: OptionsType\n let emblaApi: EmblaCarouselType\n let root: HTMLElement\n let slides: HTMLElement[]\n const selectedEvents: EmblaEventType[] = ['select']\n const draggingEvents: EmblaEventType[] = ['pointerDown', 'pointerUp']\n const inViewEvents: EmblaEventType[] = ['slidesInView']\n\n function init(\n emblaApiInstance: EmblaCarouselType,\n optionsHandler: OptionsHandlerType\n ): void {\n emblaApi = emblaApiInstance\n\n const { mergeOptions, optionsAtMedia } = optionsHandler\n const optionsBase = mergeOptions(defaultOptions, ClassNames.globalOptions)\n const allOptions = mergeOptions(optionsBase, userOptions)\n options = optionsAtMedia(allOptions)\n\n root = emblaApi.rootNode()\n slides = emblaApi.slideNodes()\n const isDraggable = !!emblaApi.internalEngine().options.watchDrag\n\n if (isDraggable) {\n addClass(root, options.draggable)\n }\n if (options.dragging) {\n draggingEvents.forEach((evt) => emblaApi.on(evt, toggleDraggingClass))\n }\n if (options.snapped) {\n selectedEvents.forEach((evt) => emblaApi.on(evt, toggleSnappedClasses))\n toggleSnappedClasses()\n }\n if (options.inView) {\n inViewEvents.forEach((evt) => emblaApi.on(evt, toggleInViewClasses))\n toggleInViewClasses()\n }\n }\n\n function destroy(): void {\n removeClass(root, options.draggable)\n draggingEvents.forEach((evt) => emblaApi.off(evt, toggleDraggingClass))\n selectedEvents.forEach((evt) => emblaApi.off(evt, toggleSnappedClasses))\n inViewEvents.forEach((evt) => emblaApi.off(evt, toggleInViewClasses))\n slides.forEach((slide) => removeClass(slide, options.snapped))\n }\n\n function toggleDraggingClass(\n _: EmblaCarouselType,\n evt: EmblaEventType\n ): void {\n if (evt === 'pointerDown') addClass(root, options.dragging)\n else removeClass(root, options.dragging)\n }\n\n function toggleSlideClasses(slideIndexes: number[], className: string): void {\n const container = emblaApi.containerNode()\n const slideNodeList = container.querySelectorAll(`.${className}`)\n const removeClassSlides = nodeListToArray(slideNodeList)\n\n removeClassSlides.forEach((slide) => removeClass(slide, className))\n slideIndexes.forEach((index) => addClass(slides[index], className))\n }\n\n function toggleSnappedClasses(): void {\n const { slideRegistry } = emblaApi.internalEngine()\n const slideIndexes = slideRegistry[emblaApi.selectedScrollSnap()]\n toggleSlideClasses(slideIndexes, options.snapped)\n }\n\n function toggleInViewClasses(): void {\n const slideIndexes = emblaApi.slidesInView()\n toggleSlideClasses(slideIndexes, options.inView)\n }\n\n const self: ClassNamesType = {\n name: 'classNames',\n options: userOptions,\n init,\n destroy\n }\n return self\n}\n\nClassNames.globalOptions = undefined\n\nexport default ClassNames\n"],"names":["DotButton","props","children","restProps","React","Object","assign","type","PrevButton","className","viewBox","fill","d","NextButton","SelectedSnapDisplay","selectedSnap","snapCount","slides","options","emblaRef","emblaApi","useEmblaCarousel","Autoplay","ClassNames","onNavButtonClick","useCallback","_emblaApi$plugins","autoplay","plugins","stopOnInteraction","reset","stop","selectedIndex","scrollSnaps","onDotButtonClick","useDotButton","onButtonClick","setSelectedIndex","useState","setScrollSnaps","index","scrollTo","onInit","scrollSnapList","onSelect","selectedScrollSnap","useEffect","on","prevBtnDisabled","nextBtnDisabled","onPrevButtonClick","onNextButtonClick","usePrevNextButtons","setPrevBtnDisabled","setNextBtnDisabled","scrollPrev","scrollNext","canScrollPrev","canScrollNext","setSelectedSnap","setSnapCount","updateScrollSnapState","length","useSelectedSnapDisplay","dir","ref","map","key","onClick","disabled","_","concat","defaultOptions","active","breakpoints","delay","jump","playOnInit","stopOnFocusIn","stopOnMouseEnter","stopOnLastSnap","rootNode","userOptions","destroyed","playing","resume","timer","startTimer","emit","ownerWindow","internalEngine","clearInterval","setInterval","next","stopTimer","visibilityChange","documentIsHidden","ownerDocument","visibilityState","play","jumpOverride","nextIndex","clone","add","get","lastIndex","name","init","emblaApiInstance","optionsHandler","mergeOptions","optionsAtMedia","optionsBase","globalOptions","allOptions","eventStore","emblaRoot","root","container","containerNode","destroy","off","isPlaying","undefined","snapped","inView","draggable","dragging","removeClass","node","classList","contains","remove","addClass","selectedEvents","draggingEvents","inViewEvents","toggleDraggingClass","evt","toggleSlideClasses","slideIndexes","slideNodeList","querySelectorAll","nodeList","Array","from","forEach","slide","toggleSnappedClasses","slideRegistry","toggleInViewClasses","slidesInView","slideNodes","watchDrag"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"3602-1df978a2563465b2ac92.js","mappings":"2LAcO,MAgDMA,EAAiCC,IAC5C,MAAM,SAAEC,KAAaC,GAAcF,EAEnC,OACEG,EAAAA,cAAA,SAAAC,OAAAC,OAAA,CAAQC,KAAK,UAAaJ,GACvBD,EACM,ECAAM,EAAkCP,IAC7C,MAAM,SAAEC,KAAaC,GAAcF,EAEnC,OACEG,EAAAA,cAAA,SAAAC,OAAAC,OAAA,CACEG,UAAU,oCACVF,KAAK,UACDJ,GAEJC,EAAAA,cAAA,OAAKK,UAAU,qBAAqBC,QAAQ,eAE1CN,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,+VAIJR,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,4VAIJR,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,+VAILV,EACM,EAIAW,EAAkCZ,IAC7C,MAAM,SAAEC,KAAaC,GAAcF,EAEnC,OACEG,EAAAA,cAAA,SAAAC,OAAAC,OAAA,CACEG,UAAU,oCACVF,KAAK,UACDJ,GAEJC,EAAAA,cAAA,OAAKK,UAAU,qBAAqBC,QAAQ,eAE1CN,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,4VAIJR,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,+VAIJR,EAAAA,cAAA,QACEO,KAAK,eACLC,EAAE,+VAILV,EACM,EC9FAY,EAA2Cb,IACtD,MAAM,aAAEc,EAAY,UAAEC,GAAcf,EAEpC,OACEG,EAAAA,cAAA,OAAKK,UAAU,gCACZM,EAAe,EAAE,MAAIC,EAClB,E,kCCgGV,MAxG2Cf,IACzC,MAAM,OAAEgB,EAAM,QAAEC,GAAYjB,GACrBkB,EA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CiD,EADqBU,EAAcjI,EAASyB,sBACX3B,EAAQ0G,QAC3C,CAEA,SAAS0B,IAEPX,EADqBvH,EAASmI,eACGrI,EAAQ2G,OAC3C,CAQA,MAN6B,CAC3BnB,KAAM,aACNxF,QAASgE,EACTyB,KAtEF,SACEC,EACAC,GAEAzF,EAAWwF,EAEX,MAAM,aAAEE,EAAY,eAAEC,GAAmBF,EACnCG,EAAcF,EAAatC,EAAgBjD,EAAW0F,eACtDC,EAAaJ,EAAaE,EAAa9B,GAC7ChE,EAAU6F,EAAeG,GAEzBG,EAAOjG,EAAS6D,WAChBhE,EAASG,EAASoI,eACIpI,EAASsE,iBAAiBxE,QAAQuI,WAGtDpB,EAAShB,EAAMnG,EAAQ4G,WAErB5G,EAAQ6G,UACVQ,EAAeW,SAASR,GAAQtH,EAAS2B,GAAG2F,EAAKD,KAE/CvH,EAAQ0G,UACVU,EAAeY,SAASR,GAAQtH,EAAS2B,GAAG2F,EAAKU,KACjDA,KAEElI,EAAQ2G,SACVW,EAAaU,SAASR,GAAQtH,EAAS2B,GAAG2F,EAAKY,KAC/CA,IAEJ,EA0CE9B,QAxCF,WACEQ,EAAYX,EAAMnG,EAAQ4G,WAC1BS,EAAeW,SAASR,GAAQtH,EAASqG,IAAIiB,EAAKD,KAClDH,EAAeY,SAASR,GAAQtH,EAASqG,IAAIiB,EAAKU,KAClDZ,EAAaU,SAASR,GAAQtH,EAASqG,IAAIiB,EAAKY,KAChDrI,EAAOiI,SAASC,GAAUnB,EAAYmB,EAAOjI,EAAQ0G,UACvD,EAqCF,CAMArG,EAAW0F,mBAAgBU,C","sources":["webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/CarouselGenerator/EmblaCarouselDotButton.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/CarouselGenerator/EmblaCarouselArrowButtons.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/CarouselGenerator/EmblaCarouselSelectedSnapDisplay.tsx","webpack://embla-carousel-docs/./src/components/Sandbox/React/SandboxFilesSrc/CarouselGenerator/EmblaCarousel.tsx","webpack://embla-carousel-docs/../src/components/Options.ts","webpack://embla-carousel-docs/../src/components/Autoplay.ts","webpack://embla-carousel-docs/../src/components/utils.ts","webpack://embla-carousel-docs/../src/components/ClassNames.ts"],"sourcesContent":["import React, {\n ComponentPropsWithRef,\n useCallback,\n useEffect,\n useState\n} from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UseDotButtonType = {\n selectedIndex: number\n scrollSnaps: number[]\n onDotButtonClick: (index: number) => void\n}\n\nexport const useDotButton = (\n emblaApi: EmblaCarouselType | undefined,\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n): UseDotButtonType => {\n const [selectedIndex, setSelectedIndex] = useState(0)\n const [scrollSnaps, setScrollSnaps] = useState([])\n\n const onDotButtonClick = useCallback(\n (index: number) => {\n if (!emblaApi) return\n emblaApi.scrollTo(index)\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n },\n [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ]\n )\n\n const onInit = useCallback((emblaApi: EmblaCarouselType) => {\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setSelectedIndex(emblaApi.selectedScrollSnap())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onInit(emblaApi)\n onSelect(emblaApi)\n emblaApi.on('reInit', onInit).on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onInit, onSelect])\n\n return {\n selectedIndex,\n scrollSnaps,\n onDotButtonClick\n }\n}\n\ntype PropType = ComponentPropsWithRef<'button'>\n\nexport const DotButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n {children}\n \n )\n}\n","import React, {\n ComponentPropsWithRef,\n useCallback,\n useEffect,\n useState\n} from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UsePrevNextButtonsType = {\n prevBtnDisabled: boolean\n nextBtnDisabled: boolean\n onPrevButtonClick: () => void\n onNextButtonClick: () => void\n}\n\nexport const usePrevNextButtons = (\n emblaApi: EmblaCarouselType | undefined,\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n onButtonClick?: (emblaApi: EmblaCarouselType) => void\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n): UsePrevNextButtonsType => {\n const [prevBtnDisabled, setPrevBtnDisabled] = useState(true)\n const [nextBtnDisabled, setNextBtnDisabled] = useState(true)\n\n const onPrevButtonClick = useCallback(() => {\n if (!emblaApi) return\n emblaApi.scrollPrev()\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n }, [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ])\n\n const onNextButtonClick = useCallback(() => {\n if (!emblaApi) return\n emblaApi.scrollNext()\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n if (onButtonClick) onButtonClick(emblaApi)\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n }, [\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n ])\n\n const onSelect = useCallback((emblaApi: EmblaCarouselType) => {\n setPrevBtnDisabled(!emblaApi.canScrollPrev())\n setNextBtnDisabled(!emblaApi.canScrollNext())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n onSelect(emblaApi)\n emblaApi.on('reInit', onSelect).on('select', onSelect)\n }, [emblaApi, onSelect])\n\n return {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n }\n}\n\ntype PropType = ComponentPropsWithRef<'button'>\n\nexport const PrevButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\n \n {children}\n \n )\n}\n\nexport const NextButton: React.FC = (props) => {\n const { children, ...restProps } = props\n\n return (\n \n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_RTL_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_LTR_REPLACE_END__*/}\n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_VERTICAL_REPLACE_END__*/}\n \n {children}\n \n )\n}\n","import React, { useCallback, useEffect, useState } from 'react'\nimport { EmblaCarouselType } from 'embla-carousel'\n\ntype UseSelectedSnapDisplayType = {\n selectedSnap: number\n snapCount: number\n}\n\nexport const useSelectedSnapDisplay = (\n emblaApi: EmblaCarouselType | undefined\n): UseSelectedSnapDisplayType => {\n const [selectedSnap, setSelectedSnap] = useState(0)\n const [snapCount, setSnapCount] = useState(0)\n\n const updateScrollSnapState = useCallback((emblaApi: EmblaCarouselType) => {\n setSnapCount(emblaApi.scrollSnapList().length)\n setSelectedSnap(emblaApi.selectedScrollSnap())\n }, [])\n\n useEffect(() => {\n if (!emblaApi) return\n\n updateScrollSnapState(emblaApi)\n emblaApi.on('select', updateScrollSnapState)\n emblaApi.on('reInit', updateScrollSnapState)\n }, [emblaApi, updateScrollSnapState])\n\n return {\n selectedSnap,\n snapCount\n }\n}\n\ntype PropType = {\n selectedSnap: number\n snapCount: number\n}\n\nexport const SelectedSnapDisplay: React.FC = (props) => {\n const { selectedSnap, snapCount } = props\n\n return (\n \n {selectedSnap + 1} / {snapCount}\n \n )\n}\n","import React, {\n /*__NAV_AUTOPLAY_REPLACE_START__*/ useCallback /*__NAV_AUTOPLAY_REPLACE_END__*/\n} from 'react'\nimport {\n EmblaOptionsType,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ EmblaCarouselType /*__NAV_AUTOPLAY_REPLACE_END__*/\n} from 'embla-carousel'\n/*__DOT_BUTTONS_REPLACE_START__*/\nimport { DotButton, useDotButton } from './EmblaCarouselDotButton'\n/*__DOT_BUTTONS_REPLACE_END__*/\n/*__PREV_NEXT_BUTTONS_REPLACE_START__*/\nimport {\n PrevButton,\n NextButton,\n usePrevNextButtons\n} from './EmblaCarouselArrowButtons'\n/*__PREV_NEXT_BUTTONS_REPLACE_END__*/\n/*__SELECTED_SNAP_DISPLAY_REPLACE_START__*/\nimport {\n SelectedSnapDisplay,\n useSelectedSnapDisplay\n} from './EmblaCarouselSelectedSnapDisplay'\n/*__SELECTED_SNAP_DISPLAY_REPLACE_END__*/\n/*__AUTOPLAY_REPLACE_START__*/\nimport Autoplay from 'embla-carousel-autoplay'\n/*__AUTOPLAY_REPLACE_END__*/\n/*__CLASS_NAMES_REPLACE_START__*/\nimport ClassNames from 'embla-carousel-class-names'\n/*__CLASS_NAMES_REPLACE_END__*/\nimport useEmblaCarousel from 'embla-carousel-react'\n\ntype PropType = {\n slides: number[]\n options?: EmblaOptionsType\n}\n\nconst EmblaCarousel: React.FC = (props) => {\n const { slides, options } = props\n const [emblaRef, emblaApi] = useEmblaCarousel(\n options,\n /*__PLUGINS_REPLACE_START__*/\n [\n /*__AUTOPLAY_REPLACE_START__*/\n Autoplay(),\n /*__AUTOPLAY_REPLACE_END__*/\n\n /*__CLASS_NAMES_REPLACE_START__*/\n ClassNames()\n /*__CLASS_NAMES_REPLACE_END__*/\n ]\n /*__PLUGINS_REPLACE_END__*/\n )\n\n /*__NAV_AUTOPLAY_REPLACE_START__*/\n const onNavButtonClick = useCallback((emblaApi: EmblaCarouselType) => {\n const autoplay = emblaApi?.plugins()?.autoplay\n if (!autoplay) return\n\n const resetOrStop =\n autoplay.options.stopOnInteraction === false\n ? autoplay.reset\n : autoplay.stop\n\n resetOrStop()\n }, [])\n /*__NAV_AUTOPLAY_REPLACE_END__*/\n\n /*__DOT_BUTTONS_REPLACE_START__*/\n const { selectedIndex, scrollSnaps, onDotButtonClick } = useDotButton(\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onNavButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n )\n /*__DOT_BUTTONS_REPLACE_END__*/\n\n /*__PREV_NEXT_BUTTONS_REPLACE_START__*/\n const {\n prevBtnDisabled,\n nextBtnDisabled,\n onPrevButtonClick,\n onNextButtonClick\n } = usePrevNextButtons(\n emblaApi,\n /*__NAV_AUTOPLAY_REPLACE_START__*/ onNavButtonClick /*__NAV_AUTOPLAY_REPLACE_END__*/\n )\n /*__PREV_NEXT_BUTTONS_REPLACE_END__*/\n\n /*__SELECTED_SNAP_DISPLAY_REPLACE_START__*/\n const { selectedSnap, snapCount } = useSelectedSnapDisplay(emblaApi)\n /*__SELECTED_SNAP_DISPLAY_REPLACE_END__*/\n\n return (\n \n \n \n {slides.map((index) => (\n \n {index + 1}\n \n ))}\n \n \n\n {/*__CONTROLS_REPLACE_START__*/}\n \n {/*__PREV_NEXT_BUTTONS_REPLACE_START__*/}\n \n \n \n \n {/*__PREV_NEXT_BUTTONS_REPLACE_END__*/}\n\n {/*__DOT_BUTTONS_REPLACE_START__*/}\n \n {scrollSnaps.map((_, index) => (\n onDotButtonClick(index)}\n className={'embla__dot'.concat(\n index === selectedIndex ? ' embla__dot--selected' : ''\n )}\n />\n ))}\n \n {/*__DOT_BUTTONS_REPLACE_END__*/}\n\n {/*__SELECTED_SNAP_DISPLAY_REPLACE_START__*/}\n \n {/*__SELECTED_SNAP_DISPLAY_REPLACE_END__*/}\n \n {/*__CONTROLS_REPLACE_END__*/}\n \n )\n}\n\nexport default EmblaCarousel\n","import { CreateOptionsType } from 'embla-carousel'\n\nexport type OptionsType = CreateOptionsType<{\n delay: number\n jump: boolean\n playOnInit: boolean\n stopOnFocusIn: boolean\n stopOnInteraction: boolean\n stopOnMouseEnter: boolean\n stopOnLastSnap: boolean\n rootNode: ((emblaRoot: HTMLElement) => HTMLElement | null) | null\n}>\n\nexport const defaultOptions: OptionsType = {\n active: true,\n breakpoints: {},\n delay: 4000,\n jump: false,\n playOnInit: true,\n stopOnFocusIn: true,\n stopOnInteraction: true,\n stopOnMouseEnter: false,\n stopOnLastSnap: false,\n rootNode: null\n}\n","import { OptionsType, defaultOptions } from './Options'\nimport {\n CreatePluginType,\n OptionsHandlerType,\n EmblaCarouselType\n} from 'embla-carousel'\n\ndeclare module 'embla-carousel' {\n interface EmblaPluginsType {\n autoplay: AutoplayType\n }\n\n interface EmblaEventListType {\n autoplayPlay: 'autoplay:play'\n autoplayStop: 'autoplay:stop'\n }\n}\n\nexport type AutoplayType = CreatePluginType<\n {\n play: (jump?: boolean) => void\n stop: () => void\n reset: () => void\n isPlaying: () => boolean\n },\n OptionsType\n>\n\nexport type AutoplayOptionsType = AutoplayType['options']\n\nfunction Autoplay(userOptions: AutoplayOptionsType = {}): AutoplayType {\n let options: OptionsType\n let emblaApi: EmblaCarouselType\n let destroyed: boolean\n let playing = false\n let resume = true\n let jump = false\n let timer = 0\n\n function init(\n emblaApiInstance: EmblaCarouselType,\n optionsHandler: OptionsHandlerType\n ): void {\n emblaApi = emblaApiInstance\n\n const { mergeOptions, optionsAtMedia } = optionsHandler\n const optionsBase = mergeOptions(defaultOptions, Autoplay.globalOptions)\n const allOptions = mergeOptions(optionsBase, userOptions)\n options = optionsAtMedia(allOptions)\n\n if (emblaApi.scrollSnapList().length <= 1) return\n\n jump = options.jump\n destroyed = false\n\n const { eventStore, ownerDocument } = emblaApi.internalEngine()\n const emblaRoot = emblaApi.rootNode()\n const root = (options.rootNode && options.rootNode(emblaRoot)) || emblaRoot\n const container = emblaApi.containerNode()\n\n emblaApi.on('pointerDown', stopTimer)\n\n if (!options.stopOnInteraction) {\n emblaApi.on('pointerUp', startTimer)\n }\n\n if (options.stopOnMouseEnter) {\n eventStore.add(root, 'mouseenter', () => {\n resume = false\n stopTimer()\n })\n\n if (!options.stopOnInteraction) {\n eventStore.add(root, 'mouseleave', () => {\n resume = true\n startTimer()\n })\n }\n }\n\n if (options.stopOnFocusIn) {\n eventStore.add(container, 'focusin', stopTimer)\n\n if (!options.stopOnInteraction) {\n eventStore.add(container, 'focusout', startTimer)\n }\n }\n\n eventStore.add(ownerDocument, 'visibilitychange', visibilityChange)\n\n if (options.playOnInit && !documentIsHidden()) startTimer()\n }\n\n function destroy(): void {\n emblaApi.off('pointerDown', stopTimer).off('pointerUp', startTimer)\n stopTimer()\n destroyed = true\n playing = false\n }\n\n function startTimer(): void {\n if (destroyed) return\n if (!resume) return\n if (!playing) emblaApi.emit('autoplay:play')\n const { ownerWindow } = emblaApi.internalEngine()\n ownerWindow.clearInterval(timer)\n timer = ownerWindow.setInterval(next, options.delay)\n playing = true\n }\n\n function stopTimer(): void {\n if (destroyed) return\n if (playing) emblaApi.emit('autoplay:stop')\n const { ownerWindow } = emblaApi.internalEngine()\n ownerWindow.clearInterval(timer)\n timer = 0\n playing = false\n }\n\n function visibilityChange(): void {\n if (documentIsHidden()) {\n resume = playing\n return stopTimer()\n }\n\n if (resume) startTimer()\n }\n\n function documentIsHidden(): boolean {\n const { ownerDocument } = emblaApi.internalEngine()\n return ownerDocument.visibilityState === 'hidden'\n }\n\n function play(jumpOverride?: boolean): void {\n if (typeof jumpOverride !== 'undefined') jump = jumpOverride\n resume = true\n startTimer()\n }\n\n function stop(): void {\n if (playing) stopTimer()\n }\n\n function reset(): void {\n if (playing) play()\n }\n\n function isPlaying(): boolean {\n return playing\n }\n\n function next(): void {\n const { index } = emblaApi.internalEngine()\n const nextIndex = index.clone().add(1).get()\n const lastIndex = emblaApi.scrollSnapList().length - 1\n const kill = options.stopOnLastSnap && nextIndex === lastIndex\n\n if (kill) stopTimer()\n\n if (emblaApi.canScrollNext()) {\n emblaApi.scrollNext(jump)\n } else {\n emblaApi.scrollTo(0, jump)\n }\n }\n\n const self: AutoplayType = {\n name: 'autoplay',\n options: userOptions,\n init,\n destroy,\n play,\n stop,\n reset,\n isPlaying\n }\n return self\n}\n\ndeclare namespace Autoplay {\n let globalOptions: AutoplayOptionsType | undefined\n}\n\nAutoplay.globalOptions = undefined\n\nexport default Autoplay\n","export function removeClass(node: HTMLElement, className: string): void {\n if (!node || !className) return\n const { classList } = node\n if (classList.contains(className)) classList.remove(className)\n}\n\nexport function addClass(node: HTMLElement, className: string): void {\n if (!node || !className) return\n const { classList } = node\n if (!classList.contains(className)) classList.add(className)\n}\n\nexport function nodeListToArray(nodeList: NodeListOf): HTMLElement[] {\n return Array.from(nodeList)\n}\n","import { defaultOptions, OptionsType } from './Options'\nimport { nodeListToArray, addClass, removeClass } from './utils'\nimport {\n CreatePluginType,\n OptionsHandlerType,\n EmblaCarouselType,\n EmblaEventType\n} from 'embla-carousel'\n\ndeclare module 'embla-carousel' {\n interface EmblaPluginsType {\n classNames: ClassNamesType\n }\n}\n\nexport type ClassNamesType = CreatePluginType<{}, OptionsType>\n\nexport type ClassNamesOptionsType = ClassNamesType['options']\n\nfunction ClassNames(userOptions: ClassNamesOptionsType = {}): ClassNamesType {\n let options: OptionsType\n let emblaApi: EmblaCarouselType\n let root: HTMLElement\n let slides: HTMLElement[]\n const selectedEvents: EmblaEventType[] = ['select']\n const draggingEvents: EmblaEventType[] = ['pointerDown', 'pointerUp']\n const inViewEvents: EmblaEventType[] = ['slidesInView']\n\n function init(\n emblaApiInstance: EmblaCarouselType,\n optionsHandler: OptionsHandlerType\n ): void {\n emblaApi = emblaApiInstance\n\n const { mergeOptions, optionsAtMedia } = optionsHandler\n const optionsBase = mergeOptions(defaultOptions, ClassNames.globalOptions)\n const allOptions = mergeOptions(optionsBase, userOptions)\n options = optionsAtMedia(allOptions)\n\n root = emblaApi.rootNode()\n slides = emblaApi.slideNodes()\n const isDraggable = !!emblaApi.internalEngine().options.watchDrag\n\n if (isDraggable) {\n addClass(root, options.draggable)\n }\n if (options.dragging) {\n draggingEvents.forEach((evt) => emblaApi.on(evt, toggleDraggingClass))\n }\n if (options.snapped) {\n selectedEvents.forEach((evt) => emblaApi.on(evt, toggleSnappedClasses))\n toggleSnappedClasses()\n }\n if (options.inView) {\n inViewEvents.forEach((evt) => emblaApi.on(evt, toggleInViewClasses))\n toggleInViewClasses()\n }\n }\n\n function destroy(): void {\n removeClass(root, options.draggable)\n draggingEvents.forEach((evt) => emblaApi.off(evt, toggleDraggingClass))\n selectedEvents.forEach((evt) => emblaApi.off(evt, toggleSnappedClasses))\n inViewEvents.forEach((evt) => emblaApi.off(evt, toggleInViewClasses))\n slides.forEach((slide) => removeClass(slide, options.snapped))\n }\n\n function toggleDraggingClass(\n _: EmblaCarouselType,\n evt: EmblaEventType\n ): void {\n if (evt === 'pointerDown') addClass(root, options.dragging)\n else removeClass(root, options.dragging)\n }\n\n function toggleSlideClasses(slideIndexes: number[], className: string): void {\n const container = emblaApi.containerNode()\n const slideNodeList = container.querySelectorAll(`.${className}`)\n const removeClassSlides = nodeListToArray(slideNodeList)\n\n removeClassSlides.forEach((slide) => removeClass(slide, className))\n slideIndexes.forEach((index) => addClass(slides[index], className))\n }\n\n function toggleSnappedClasses(): void {\n const { slideRegistry } = emblaApi.internalEngine()\n const slideIndexes = slideRegistry[emblaApi.selectedScrollSnap()]\n toggleSlideClasses(slideIndexes, options.snapped)\n }\n\n function toggleInViewClasses(): void {\n const slideIndexes = emblaApi.slidesInView()\n toggleSlideClasses(slideIndexes, options.inView)\n }\n\n const self: ClassNamesType = {\n name: 'classNames',\n options: userOptions,\n init,\n destroy\n }\n return self\n}\n\ndeclare namespace ClassNames {\n let globalOptions: ClassNamesOptionsType | undefined\n}\n\nClassNames.globalOptions = undefined\n\nexport default ClassNames\n"],"names":["DotButton","props","children","restProps","React","Object","assign","type","PrevButton","className","viewBox","fill","d","NextButton","SelectedSnapDisplay","selectedSnap","snapCount","slides","options","emblaRef","emblaApi","useEmblaCarousel","Autoplay","ClassNames","onNavButtonClick","useCallback","_emblaApi$plugins","autoplay","plugins","stopOnInteraction","reset","stop","selectedIndex","scrollSnaps","onDotButtonClick","useDotButton","onButtonClick","setSelectedIndex","useState","setScrollSnaps","index","scrollTo","onInit","scrollSnapList","onSelect","selectedScrollSnap","useEffect","on","prevBtnDisabled","nextBtnDisabled","onPrevButtonClick","onNextButtonClick","usePrevNextButtons","setPrevBtnDisabled","setNextBtnDisabled","scrollPrev","scrollNext","canScrollPrev","canScrollNext","setSelectedSnap","setSnapCount","updateScrollSnapState","length","useSelectedSnapDisplay","dir","ref","map","key","onClick","disabled","_","concat","defaultOptions","active","breakpoints","delay","jump","playOnInit","stopOnFocusIn","stopOnMouseEnter","stopOnLastSnap","rootNode","userOptions","destroyed","playing","resume","timer","startTimer","emit","ownerWindow","internalEngine","clearInterval","setInterval","next","stopTimer","visibilityChange","documentIsHidden","ownerDocument","visibilityState","play","jumpOverride","nextIndex","clone","add","get","lastIndex","name","init","emblaApiInstance","optionsHandler","mergeOptions","optionsAtMedia","optionsBase","globalOptions","allOptions","eventStore","emblaRoot","root","container","containerNode","destroy","off","isPlaying","undefined","snapped","inView","draggable","dragging","removeClass","node","classList","contains","remove","addClass","selectedEvents","draggingEvents","inViewEvents","toggleDraggingClass","evt","toggleSlideClasses","slideIndexes","slideNodeList","querySelectorAll","nodeList","Array","from","forEach","slide","toggleSnappedClasses","slideRegistry","toggleInViewClasses","slidesInView","slideNodes","watchDrag"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/404.html b/docs/404.html index e53a48619..1be96facf 100644 --- a/docs/404.html +++ b/docs/404.html @@ -25,14 +25,12 @@ html{background-color:var(--background-site);font-size:62.5%;}/*!sc*/ body{background-color:var(--background-site);color:var(--text-high-contrast);font-size:1.6rem;line-height:1.65;}/*!sc*/ .theme-light{color-scheme:light;}/*!sc*/ -.theme-light .SiteLogo__LogoDarkIcon-sc-1by5cek-3,.theme-light .ThemeToggle__LightThemeSvg-sc-1ezo9zi-1{display:none;}/*!sc*/ +.theme-light .SiteLogo__LogoDarkIcon-sc-1by5cek-4,.theme-light .SiteLogo__LogoDarkImage-sc-1by5cek-2,.theme-light .ThemeToggle__LightThemeSvg-sc-1ezo9zi-1{display:none;}/*!sc*/ .theme-dark{color-scheme:dark;}/*!sc*/ -.theme-dark .SiteLogo__LogoLightIcon-sc-1by5cek-2,.theme-dark .ThemeToggle__DarkThemeSvg-sc-1ezo9zi-2{display:none;}/*!sc*/ -data-styled.g22[id="sc-global-dAorGo1"]{content:"sc-global-dAorGo1,"}/*!sc*/ +.theme-dark .SiteLogo__LogoLightIcon-sc-1by5cek-3,.theme-dark .SiteLogo__LogoLightImage-sc-1by5cek-1,.theme-dark .ThemeToggle__DarkThemeSvg-sc-1ezo9zi-2{display:none;}/*!sc*/ +data-styled.g23[id="sc-global-isqsKj1"]{content:"sc-global-isqsKj1,"}/*!sc*/ .bxhdr{margin-left:auto;margin-right:auto;padding-left:2.4rem;padding-right:2.4rem;max-width:68rem;width:100%;}/*!sc*/ -data-styled.g23[id="PageFrame__PageFrameWrapper-sc-1wyjdd4-0"]{content:"bxhdr,"}/*!sc*/ -.eOqFPv{color:var(--brand-primary);background-image:linear-gradient( 45deg,var(--brand-primary),var(--brand-secondary) );background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;display:inline-block;font-weight:500;}/*!sc*/ -data-styled.g29[id="LinkContent__LinkContentWrapper-sc-1wcim9r-0"]{content:"eOqFPv,"}/*!sc*/ +data-styled.g24[id="PageFrame__PageFrameWrapper-sc-1wyjdd4-0"]{content:"bxhdr,"}/*!sc*/ .fhEhjC{color:var(--text-body);}/*!sc*/ .fhEhjC .code-highlight{background-color:var(--background-code);border-radius:0.4rem;border:0.1rem solid var(--detail-low-contrast);padding:0.3rem 0.6rem;font-size:1.44rem;box-sizing:border-box;}/*!sc*/ .fhEhjC .Admonition__AdmonitionWrapper-sc-1cc944d-0 .code-highlight{background-color:var(--background-site);border-color:var(--detail-medium-contrast);}/*!sc*/ @@ -92,18 +90,20 @@ .fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > h1,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > h1,.fhEhjC > h1,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > h2,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > h2,.fhEhjC > h2,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > h3,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > h3,.fhEhjC > h3,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > h4,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > h4,.fhEhjC > h4,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > h5,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > h5,.fhEhjC > h5,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > h6,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > h6,.fhEhjC > h6,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > ul,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > ul,.fhEhjC > ul,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > ol,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > ol,.fhEhjC > ol,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > dl,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > dl,.fhEhjC > dl,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > p,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > p,.fhEhjC > p,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > hgroup,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > hgroup,.fhEhjC > hgroup,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > address,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > address,.fhEhjC > address,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > table,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > table,.fhEhjC > table,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > fieldset,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > fieldset,.fhEhjC > fieldset,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > figure,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > figure,.fhEhjC > figure,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > pre,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > pre,.fhEhjC > pre,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > dd,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > dd,.fhEhjC > dd,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > blockquote,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > blockquote,.fhEhjC > blockquote,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > blockquote code,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > blockquote code,.fhEhjC > blockquote code,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > kbd,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > kbd,.fhEhjC > kbd,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > samp,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > samp,.fhEhjC > samp,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > .prism-highlight,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > .prism-highlight,.fhEhjC > .prism-highlight,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > .Tabs__TabsWrapper-sc-1wvkykc-0,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > .Tabs__TabsWrapper-sc-1wvkykc-0,.fhEhjC > .Tabs__TabsWrapper-sc-1wvkykc-0,.fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > .Admonition__AdmonitionWrapper-sc-1cc944d-0,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > .Admonition__AdmonitionWrapper-sc-1cc944d-0,.fhEhjC > .Admonition__AdmonitionWrapper-sc-1cc944d-0{margin-bottom:2.4rem;}/*!sc*/ .fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > *:first-child,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > *:first-child,.fhEhjC > *:first-child{margin-top:0;}/*!sc*/ .fhEhjC .TabsPanel__TabsPanelWrapper-sc-1ihsh9r-0 > *:last-child,.fhEhjC .Admonition__AdmonitionContent-sc-1cc944d-1 > *:last-child,.fhEhjC > *:last-child{margin-bottom:0;}/*!sc*/ -data-styled.g120[id="Styles__MdxStyles-sc-18i58cr-0"]{content:"fhEhjC,"}/*!sc*/ +data-styled.g92[id="Styles__MdxStyles-sc-18i58cr-0"]{content:"fhEhjC,"}/*!sc*/ +.eOqFPv{color:var(--brand-primary);background-image:linear-gradient( 45deg,var(--brand-primary),var(--brand-secondary) );background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;display:inline-block;font-weight:500;}/*!sc*/ +data-styled.g93[id="LinkContent__LinkContentWrapper-sc-1wcim9r-0"]{content:"eOqFPv,"}/*!sc*/ .bNscHq .code-highlight > span{color:var(--brand-primary);background-image:linear-gradient( 45deg,var(--brand-primary),var(--brand-secondary) );background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;}/*!sc*/ -data-styled.g121[id="Link__LinkContentStyled-sc-1x8mt22-0"]{content:"bNscHq,"}/*!sc*/ +data-styled.g94[id="Link__LinkContentStyled-sc-1x8mt22-0"]{content:"bNscHq,"}/*!sc*/ .jgctsE{display:block;width:100%;}/*!sc*/ -data-styled.g123[id="H1__Text-sc-1ov938g-0"]{content:"jgctsE,"}/*!sc*/ +data-styled.g96[id="H1__Text-sc-1ov938g-0"]{content:"jgctsE,"}/*!sc*/ .cYbjpM{display:block;font-size:0;}/*!sc*/ -data-styled.g124[id="H1__DecorationWrapper-sc-1ov938g-1"]{content:"cYbjpM,"}/*!sc*/ +data-styled.g97[id="H1__DecorationWrapper-sc-1ov938g-1"]{content:"cYbjpM,"}/*!sc*/ .bnSdak{background-image:linear-gradient( 45deg,var(--brand-primary),var(--brand-secondary) );margin-top:2.4rem;height:0.3rem;width:5rem;max-width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}/*!sc*/ -data-styled.g125[id="H1__Decoration-sc-1ov938g-2"]{content:"bnSdak,"}/*!sc*/ +data-styled.g98[id="H1__Decoration-sc-1ov938g-2"]{content:"bnSdak,"}/*!sc*/ .celRSI{text-align:center;}/*!sc*/ .celRSI:before{content:'';display:block;height:10vw;max-height:100px;}/*!sc*/ -data-styled.g146[id="sc-404__PageNotFoundWrapper-sc-8mtezr-0"]{content:"celRSI,"}/*!sc*/ +data-styled.g122[id="sc-404__PageNotFoundWrapper-sc-8mtezr-0"]{content:"celRSI,"}/*!sc*/ This app only works with JavaScript enabled.Page not found + This app only works with JavaScript enabled.Page not found Sorry - We couldn’t find what you were looking for. Embla Carousel Homepage -
Sorry - We couldn’t find what you were looking for.
Embla Carousel Homepage