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AkB5C,GAAeoE,IAEzCA,IACAA,OAAY,EACd,GAEF,CACEpC,OACA9B,aACAD,YAEA0D,kBAEAW,SAEF9B,GAGK,KACD4B,GACFA,GACF,CACD,GAIH,CAGEP,MAAMC,QAAQ7D,GAAaA,EAAUkC,WAAalC,EAClDjG,EACAgI,EACA9B,EACAF,EACAuE,EACAZ,EACAnB,EACA8B,IAIJ,MAAMQ,EAAc,OAAArB,EAAAmB,EAAMpB,YAAN,EAAAC,EAAa3H,OAC3BiJ,EAA4BJ,EAAAA,SAE/B3K,IACD8K,GACC9E,GACAuE,GACDQ,EAAoB/L,UAAY8L,IAIhCC,EAAoB/L,QAAU8L,EAC9BD,EAAS,CACP/E,SAAU0E,EACVhB,WAAO,KAIX,MAAM7L,EAAS,CAAC+M,EAAQE,EAAM9E,OAAQ8E,EAAMpB,OAO5C,OAJA7L,EAAOqC,IAAMrC,EAAO,GACpBA,EAAOmI,OAASnI,EAAO,GACvBA,EAAO6L,MAAQ7L,EAAO,GAEfA,CACT,C","sources":["blocks/components/NewsSlider/components/Carousel/helpers/getInViewChildren.ts","webpack://@danishagro/cms/./src/blocks/components/NewsSlider/components/Carousel/Carousel.module.scss?ca9c","blocks/components/NewsSlider/components/Carousel/Carousel.tsx","blocks/components/NewsSlider/hooks/useAlignment.hook.ts","webpack://@danishagro/cms/./src/blocks/components/NewsSlider/NewsSlider.module.scss?5db2","blocks/components/NewsSlider/NewsSlider.component.tsx","blocks/components/NewsSlider/hooks/useItems.hook.ts","blocks/components/NewsSlider/components/News/hooks/useTags.hook.ts","webpack://@danishagro/cms/./src/blocks/components/NewsSlider/components/News/News.module.scss?f303","blocks/components/NewsSlider/components/News/News.component.tsx","../../../node_modules/src/observe.ts","../../../node_modules/src/InView.tsx","../../../node_modules/src/useInView.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const getInViewChildren = (listElementRef: any) => {\n    const result: number[] = [];\n\n    if (listElementRef) {\n        const children = listElementRef.children;\n\n        for (let i = 0; i < children.length; i++) {\n            const isInView = children[i].classList.contains(\"in_view\");\n\n            if (isInView) {\n                result.push(i);\n            }\n        }\n    }\n\n    return result;\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"Carousel_wrapper__lUXm4\",\"list\":\"Carousel_list__3Mnn6\",\"pagination\":\"Carousel_pagination__LCxkA\",\"buttonWrapper\":\"Carousel_buttonWrapper__bSwT8\",\"previous\":\"Carousel_previous__glDgM\",\"next\":\"Carousel_next__snzAT\",\"link\":\"Carousel_link__qiQxR\"};","import React, { useEffect, useRef, useState } from \"react\";\nimport { DA_IconNames } from \"@danishagro/shared/src/components/atoms/Icon/Icon.component\";\nimport { DA_InlineLink } from \"@danishagro/shared/src/components/atoms/InlineLink/InlineLink.component\";\nimport { DA_Button } from \"@danishagro/shared/src/components/atoms/Button/Button.component\";\nimport { CarouselProps } from \"./CarouselProps\";\nimport { getInViewChildren } from \"./helpers/getInViewChildren\";\nimport S from \"./Carousel.module.scss\";\n\nexport const Carousel = (props: CarouselProps) => {\n    const listElementRef = useRef<HTMLDivElement>(null);\n\n    const [showPagination, setShowPagination] = useState(true);\n\n    const onPreviousClick = () => {\n        const inViewIndexes = getInViewChildren(listElementRef.current);\n\n        if (inViewIndexes && inViewIndexes?.length > 0) {\n            const currentIndex = inViewIndexes?.[0];\n\n            if (listElementRef.current && typeof currentIndex !== \"undefined\" && currentIndex < 2) {\n                listElementRef.current.scrollLeft = 0;\n            } else if (listElementRef.current && currentIndex) {\n                const previousElement = listElementRef.current.children?.[\n                    currentIndex - 1\n                ] as HTMLElement;\n                listElementRef.current.scrollTo({\n                    left: previousElement.offsetLeft,\n                    top: 0,\n                    behavior: \"smooth\",\n                });\n            }\n        }\n    };\n\n    const onNextClick = () => {\n        const inViewIndexes = getInViewChildren(listElementRef.current);\n\n        if (inViewIndexes && inViewIndexes?.length > 0) {\n            const currentIndex = inViewIndexes[inViewIndexes.length - 1];\n\n            if (\n                listElementRef.current &&\n                currentIndex === listElementRef.current.children.length - 1\n            ) {\n                listElementRef.current.scrollLeft = listElementRef.current.scrollWidth;\n            } else if (listElementRef.current) {\n                const nextElement = listElementRef.current.children?.[\n                    currentIndex + 1\n                ] as HTMLElement;\n                listElementRef.current.scrollTo({\n                    left: nextElement.offsetLeft,\n                    top: 0,\n                    behavior: \"smooth\",\n                });\n            }\n        }\n    };\n\n    useEffect(() => {\n        const updatePaginationVisibility = () => {\n            const totalItems = React.Children.toArray(props.children).length;\n            const inViewIndexes = getInViewChildren(listElementRef.current);\n            const allItemsInView = inViewIndexes.length === totalItems;\n\n            setShowPagination(!allItemsInView);\n        };\n\n        const observer = new MutationObserver(updatePaginationVisibility);\n        if (listElementRef.current) {\n            observer.observe(listElementRef.current, {\n                childList: true, // Observe direct children additions/removals\n                subtree: true, // Observe all descendants\n                attributes: true, // Observe attributes changes\n                characterData: true, // Observe text changes\n            });\n        }\n\n        updatePaginationVisibility(); // Initial check\n        window.addEventListener(\"resize\", updatePaginationVisibility);\n\n        return () => {\n            observer.disconnect();\n            window.removeEventListener(\"resize\", updatePaginationVisibility);\n        };\n    }, [props.children]);\n\n    return (\n        <div className={S.wrapper}>\n            {/* List */}\n            <div className={S.list} ref={listElementRef}>\n                {props.children}\n            </div>\n\n            {/* Pagination */}\n            {showPagination && (\n                <div className={S.pagination}>\n                    <div className={S.buttonWrapper}>\n                        <DA_Button\n                            onClick={() => onPreviousClick()}\n                            icon={DA_IconNames.ChevronLeft}\n                            className={S.previous}\n                            isGhost\n                        />\n\n                        <DA_Button\n                            onClick={() => onNextClick()}\n                            icon={DA_IconNames.ChevronRight}\n                            className={S.next}\n                            isGhost\n                        />\n                    </div>\n\n                    {props.link?.url ? (\n                        <DA_InlineLink\n                            title={props.label}\n                            href={props.link?.url}\n                            icon={DA_IconNames.ArrowRight}\n                            className={S.link}\n                            target=\"_self\"\n                        />\n                    ) : null}\n                </div>\n            )}\n        </div>\n    );\n};\n","import { useMemo } from \"react\";\n\nexport const useAlignment = (alignment: string, S: { [key: string]: string }) => {\n    const alignmentClass = useMemo(() => {\n        switch (alignment) {\n            case \"ALIGNMENT_LEFT\":\n                return S.alignmentLeft;\n        }\n    }, [alignment, S]);\n\n    return {\n        alignmentClass,\n    };\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"NewsSlider_wrapper__RNuGx\",\"inner\":\"NewsSlider_inner__bE6Cn\",\"header\":\"NewsSlider_header__Fv1tD\",\"alignmentLeft\":\"NewsSlider_alignmentLeft__EZpYw\",\"tagline\":\"NewsSlider_tagline__oC2Qq\",\"item\":\"NewsSlider_item__PLiYQ\",\"item-3\":\"NewsSlider_item-3__KdYzD\",\"item-2\":\"NewsSlider_item-2__OTFPw\",\"item-1\":\"NewsSlider_item-1__4UKzt\"};","import React from \"react\";\nimport { DA_Container } from \"@danishagro/shared/src/components/atoms/Container/Container.component\";\nimport {\n    DA_Title,\n    DA_TitleTag,\n} from \"@danishagro/shared/src/components/atoms/Title/Title.component\";\nimport { DA_Text } from \"@danishagro/shared/src/components/atoms/Text/Text.component\";\nimport { useBackgroundColor } from \"src/blocks/hooks/useBackgroundColor/useBackgroundColor.hook\";\nimport { usePadding } from \"src/blocks/hooks/usePadding/usePadding.hook\";\nimport { cn } from \"@danishagro/shared/src/helpers/classNames.helper\";\nimport { NewsSliderProps } from \"./NewsSlider.interface\";\nimport { Carousel } from \"./components/Carousel/Carousel\";\nimport { useItems } from \"./hooks/useItems.hook\";\nimport News from \"./components/News/News.component\";\n// eslint-disable-next-line css-modules/no-unused-class\nimport { useAlignment } from \"./hooks/useAlignment.hook\";\nimport S from \"./NewsSlider.module.scss\";\n\nconst NewsSlider = (props: NewsSliderProps) => {\n    const { backgroundColorClass, hasBackgroundColor } = useBackgroundColor(props.backgroundColor);\n    const { paddingClass } = usePadding(props.isCompact, hasBackgroundColor);\n    const { alignmentClass } = useAlignment(props.alignment, S);\n\n    const { items, viewState } = useItems();\n\n    // Function to get item class based on item count\n    const getItemClassName = (itemCount: number) => {\n        switch (itemCount) {\n            case 1:\n                return `${S.item} ${S[\"item-1\"]}`;\n            case 2:\n                return `${S.item} ${S[\"item-2\"]}`;\n            case 3:\n                return `${S.item} ${S[\"item-3\"]}`;\n            default:\n                return S.item;\n        }\n    };\n\n    return (\n        <div className={cn(S.wrapper, paddingClass, backgroundColorClass, alignmentClass)}>\n            <DA_Container noVerticalPadding>\n                {/** Content */}\n                <div className={S.inner}>\n                    {/** Content */}\n                    <div className={S.header}>\n                        {/** Tagline */}\n                        {props.tagline ? <span className={S.tagline}>{props.tagline}</span> : null}\n\n                        {/** Title */}\n                        {props.headline ? (\n                            <DA_Title h3 tag={DA_TitleTag.H3} noMargin fullWidth>\n                                {props.headline}\n                            </DA_Title>\n                        ) : null}\n\n                        {/** Text */}\n                        {props.text ? <DA_Text html={props.text} noPadding /> : null}\n                        {/* TODO: Set width of Items based on items amount (Create switch with class names) */}\n                    </div>\n\n                    {viewState === \"DONE\" ? (\n                        <Carousel label={props.label} link={{ url: props.link.url }}>\n                            {items.map((item, key) => (\n                                <News\n                                    key={key}\n                                    {...item}\n                                    className={getItemClassName(items?.length)}\n                                />\n                            ))}\n                        </Carousel>\n                    ) : null}\n                </div>\n            </DA_Container>\n        </div>\n    );\n};\n\nexport default NewsSlider;\n","import { useCallback, useEffect, useState } from \"react\";\nimport { getAbsoluteUrl } from \"@helpers/getAbsoluteUrl.helper\";\nimport { NewsSliderProps } from \"../NewsSlider.interface\";\n\nexport const useItems = () => {\n    const [items, setItems] = useState<NewsSliderProps[]>(undefined);\n    const [viewState, setViewState] = useState<string>(\"INIT\");\n\n    const fetchItems = useCallback(async () => {\n        const cultureCode = globalThis?.cultures[0]?.alias;\n\n        try {\n            const url = getAbsoluteUrl(\"/getnewslist\", \"SPA\", {\n                rootNodeId: globalThis.rootNodeId,\n            });\n\n            const request = await fetch(`${url}&cultureCode=${cultureCode}`);\n\n            if (request) {\n                const response = await request.json();\n                return response;\n            }\n        } catch {\n            // Empty\n        }\n    }, []);\n\n    const getItems = useCallback(async () => {\n        try {\n            const response = await fetchItems();\n\n            if (response) {\n                setItems(response);\n                setViewState(\"DONE\");\n            } else {\n                throw new Error();\n            }\n        } catch {\n            setItems(undefined);\n            setViewState(\"ERROR\");\n        }\n    }, [fetchItems]);\n\n    // Init\n\n    useEffect(() => {\n        getItems();\n    }, [getItems]);\n\n    return {\n        items,\n        viewState,\n    };\n};\n","import { useMemo } from \"react\";\n\nexport const useTags = (tag: string, S: { [key: string]: string }) => {\n    const tagClass = useMemo(() => {\n        switch (tag) {\n            case \"News\":\n                return S.tagNews;\n            case \"Press\":\n                return S.tagPress;\n            case \"Partnership\":\n                return S.tagPartnership;\n        }\n    }, [tag, S]);\n\n    return {\n        tagClass,\n    };\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"News_wrapper__J-YiG\",\"imageWrapper\":\"News_imageWrapper__zhI9+\",\"tags\":\"News_tags__rgZAw\",\"tag\":\"News_tag__gR21b\",\"tagNews\":\"News_tagNews__vP4eB\",\"tagPress\":\"News_tagPress__58VRo\",\"tagPartnership\":\"News_tagPartnership__bELQG\",\"inner\":\"News_inner__Nna6K\",\"image\":\"News_image__YsaXE\",\"textWrapper\":\"News_textWrapper__1sftk\",\"title\":\"News_title__Jz1Ea\"};","import React from \"react\";\nimport { useInView } from \"react-intersection-observer\";\nimport {\n    DA_Title,\n    DA_TitleTag,\n} from \"@danishagro/shared/src/components/atoms/Title/Title.component\";\nimport { cn } from \"@danishagro/shared/src/helpers/classNames.helper\";\nimport { DA_Button } from \"@danishagro/shared/src/components/atoms/Button/Button.component\";\nimport { getAbsoluteUrl } from \"@helpers/getAbsoluteUrl.helper\";\nimport { useTranslations } from \"@danishagro/shared/src/contexts/translations/translations.context\";\nimport useFormattedCultureDate from \"@hooks/useFormattedCultureDate.hook\";\nimport { ImageViewer } from \"../../../../../components/ImageViewer/ImageViewer.component\";\nimport { NewsProps } from \"./News.interface\";\nimport { useTags } from \"./hooks/useTags.hook\";\n// eslint-disable-next-line css-modules/no-unused-class\nimport S from \"./News.module.scss\";\n\nconst News = (props: NewsProps) => {\n    const { getDictionaryString } = useTranslations();\n\n    const [wrapperElementRef, inView] = useInView({\n        triggerOnce: false,\n        threshold: 0.3,\n        rootMargin: \"0px -80px 0px 0px\",\n    });\n    const isInViewClass = inView === true ? \"in_view\" : undefined;\n\n    const { tagClass } = useTags(props.tags[0], S);\n\n    //use dateCulture from Umbraco global settings\n    const publishedDate = useFormattedCultureDate(props?.publishedDate);\n\n    return (\n        <div\n            className={cn(S.wrapper, wrapperElementRef, isInViewClass, props.className)}\n            ref={wrapperElementRef}\n        >\n            <div className={S.inner}>\n                <div className={S.imageWrapper}>\n                    {/** Image */}\n                    {props.thumbnail ? (\n                        <ImageViewer\n                            src={getAbsoluteUrl(props?.thumbnail?.url)}\n                            className={S.image}\n                            forceWidth={400}\n                        />\n                    ) : null}\n\n                    {/**Tags*/}\n                    {props.tags ? (\n                        <div className={S.tags}>\n                            {props.tags.map((tag, index) => (\n                                <div className={cn(S.tag, tagClass)} key={index}>\n                                    {tag}\n                                </div>\n                            ))}\n                        </div>\n                    ) : null}\n                </div>\n                {/**Content */}\n                <div className={S.textWrapper}>\n                    {/** publishedDate */}\n                    {props.publishedDate ? <span>{publishedDate}</span> : null}\n\n                    {/** Title */}\n                    {props.title ? (\n                        <div className={S.title}>\n                            <DA_Title h3 tag={DA_TitleTag.H3} noMargin>\n                                {props.title}\n                            </DA_Title>\n                        </div>\n                    ) : null}\n\n                    {/** Button */}\n                    {/*// News open in new tab*/}\n                    {props.url ? (\n                        <div>\n                            <DA_Button\n                                title={getDictionaryString(\"General.Read\")}\n                                href={props.url}\n                                target=\"_blank\"\n                            />\n                        </div>\n                    ) : null}\n                </div>\n            </div>\n        </div>\n    );\n};\n\nexport default News;\n","import type { ObserverInstanceCallback } from './index';\n\nconst observerMap = new Map<\n  string,\n  {\n    id: string;\n    observer: IntersectionObserver;\n    elements: Map<Element, Array<ObserverInstanceCallback>>;\n  }\n>();\n\nconst RootIds: WeakMap<Element | Document, string> = new WeakMap();\nlet rootId = 0;\n\nlet unsupportedValue: boolean | undefined = undefined;\n\n/**\n * What should be the default behavior if the IntersectionObserver is unsupported?\n * Ideally the polyfill has been loaded, you can have the following happen:\n * - `undefined`: Throw an error\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\n * **/\nexport function defaultFallbackInView(inView: boolean | undefined) {\n  unsupportedValue = inView;\n}\n\n/**\n * Generate a unique ID for the root element\n * @param root\n */\nfunction getRootId(root: IntersectionObserverInit['root']) {\n  if (!root) return '0';\n  if (RootIds.has(root)) return RootIds.get(root);\n  rootId += 1;\n  RootIds.set(root, rootId.toString());\n  return RootIds.get(root);\n}\n\n/**\n * Convert the options to a string Id, based on the values.\n * Ensures we can reuse the same observer when observing elements with the same options.\n * @param options\n */\nexport function optionsToId(options: IntersectionObserverInit) {\n  return Object.keys(options)\n    .sort()\n    .filter(\n      (key) => options[key as keyof IntersectionObserverInit] !== undefined,\n    )\n    .map((key) => {\n      return `${key}_${\n        key === 'root'\n          ? getRootId(options.root)\n          : options[key as keyof IntersectionObserverInit]\n      }`;\n    })\n    .toString();\n}\n\nfunction createObserver(options: IntersectionObserverInit) {\n  // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n  let id = optionsToId(options);\n  let instance = observerMap.get(id);\n\n  if (!instance) {\n    // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n    const elements = new Map<Element, Array<ObserverInstanceCallback>>();\n    let thresholds: number[] | readonly number[];\n\n    const observer = new IntersectionObserver((entries) => {\n      entries.forEach((entry) => {\n        // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n        // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n        const inView =\n          entry.isIntersecting &&\n          thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n\n        // @ts-ignore support IntersectionObserver v2\n        if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n          // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n          // @ts-ignore\n          entry.isVisible = inView;\n        }\n\n        elements.get(entry.target)?.forEach((callback) => {\n          callback(inView, entry);\n        });\n      });\n    }, options);\n\n    // Ensure we have a valid thresholds array. If not, use the threshold from the options\n    thresholds =\n      observer.thresholds ||\n      (Array.isArray(options.threshold)\n        ? options.threshold\n        : [options.threshold || 0]);\n\n    instance = {\n      id,\n      observer,\n      elements,\n    };\n\n    observerMap.set(id, instance);\n  }\n\n  return instance;\n}\n\n/**\n * @param element - DOM Element to observe\n * @param callback - Callback function to trigger when intersection status changes\n * @param options - Intersection Observer options\n * @param fallbackInView - Fallback inView value.\n * @return Function - Cleanup function that should be triggered to unregister the observer\n */\nexport function observe(\n  element: Element,\n  callback: ObserverInstanceCallback,\n  options: IntersectionObserverInit = {},\n  fallbackInView = unsupportedValue,\n) {\n  if (\n    typeof window.IntersectionObserver === 'undefined' &&\n    fallbackInView !== undefined\n  ) {\n    const bounds = element.getBoundingClientRect();\n    callback(fallbackInView, {\n      isIntersecting: fallbackInView,\n      target: element,\n      intersectionRatio:\n        typeof options.threshold === 'number' ? options.threshold : 0,\n      time: 0,\n      boundingClientRect: bounds,\n      intersectionRect: bounds,\n      rootBounds: bounds,\n    });\n    return () => {\n      // Nothing to cleanup\n    };\n  }\n  // An observer with the same options can be reused, so lets use this fact\n  const { id, observer, elements } = createObserver(options);\n\n  // Register the callback listener for this element\n  let callbacks = elements.get(element) || [];\n  if (!elements.has(element)) {\n    elements.set(element, callbacks);\n  }\n\n  callbacks.push(callback);\n  observer.observe(element);\n\n  return function unobserve() {\n    // Remove the callback from the callback list\n    callbacks.splice(callbacks.indexOf(callback), 1);\n\n    if (callbacks.length === 0) {\n      // No more callback exists for element, so destroy it\n      elements.delete(element);\n      observer.unobserve(element);\n    }\n\n    if (elements.size === 0) {\n      // No more elements are being observer by this instance, so destroy it\n      observer.disconnect();\n      observerMap.delete(id);\n    }\n  };\n}\n","import * as React from 'react';\nimport type { IntersectionObserverProps, PlainChildrenProps } from './index';\nimport { observe } from './observe';\n\ntype State = {\n  inView: boolean;\n  entry?: IntersectionObserverEntry;\n};\n\nfunction isPlainChildren(\n  props: IntersectionObserverProps | PlainChildrenProps,\n): props is PlainChildrenProps {\n  return typeof props.children !== 'function';\n}\n\n/**\n ## Render props\n\n To use the `<InView>` component, you pass it a function. It will be called\n whenever the state changes, with the new value of `inView`. In addition to the\n `inView` prop, children also receive a `ref` that should be set on the\n containing DOM element. This is the element that the IntersectionObserver will\n monitor.\n\n If you need it, you can also access the\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\n on `entry`, giving you access to all the details about the current intersection\n state.\n\n ```jsx\n import { InView } from 'react-intersection-observer';\n\n const Component = () => (\n <InView>\n {({ inView, ref, entry }) => (\n      <div ref={ref}>\n        <h2>{`Header inside viewport ${inView}.`}</h2>\n      </div>\n    )}\n </InView>\n );\n\n export default Component;\n ```\n\n ## Plain children\n\n You can pass any element to the `<InView />`, and it will handle creating the\n wrapping DOM element. Add a handler to the `onChange` method, and control the\n state in your own component. Any extra props you add to `<InView>` will be\n passed to the HTML element, allowing you set the `className`, `style`, etc.\n\n ```jsx\n import { InView } from 'react-intersection-observer';\n\n const Component = () => (\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\n </InView>\n );\n\n export default Component;\n ```\n */\nexport class InView extends React.Component<\n  IntersectionObserverProps | PlainChildrenProps,\n  State\n> {\n  constructor(props: IntersectionObserverProps | PlainChildrenProps) {\n    super(props);\n    this.state = {\n      inView: !!props.initialInView,\n      entry: undefined,\n    };\n  }\n\n  componentDidUpdate(prevProps: IntersectionObserverProps) {\n    // If a IntersectionObserver option changed, reinit the observer\n    if (\n      prevProps.rootMargin !== this.props.rootMargin ||\n      prevProps.root !== this.props.root ||\n      prevProps.threshold !== this.props.threshold ||\n      prevProps.skip !== this.props.skip ||\n      prevProps.trackVisibility !== this.props.trackVisibility ||\n      prevProps.delay !== this.props.delay\n    ) {\n      this.unobserve();\n      this.observeNode();\n    }\n  }\n\n  componentWillUnmount() {\n    this.unobserve();\n    this.node = null;\n  }\n\n  node: Element | null = null;\n  _unobserveCb: (() => void) | null = null;\n\n  observeNode() {\n    if (!this.node || this.props.skip) return;\n    const {\n      threshold,\n      root,\n      rootMargin,\n      trackVisibility,\n      delay,\n      fallbackInView,\n    } = this.props;\n\n    this._unobserveCb = observe(\n      this.node,\n      this.handleChange,\n      {\n        threshold,\n        root,\n        rootMargin,\n        // @ts-ignore\n        trackVisibility,\n        // @ts-ignore\n        delay,\n      },\n      fallbackInView,\n    );\n  }\n\n  unobserve() {\n    if (this._unobserveCb) {\n      this._unobserveCb();\n      this._unobserveCb = null;\n    }\n  }\n\n  handleNode = (node?: Element | null) => {\n    if (this.node) {\n      // Clear the old observer, before we start observing a new element\n      this.unobserve();\n\n      if (!node && !this.props.triggerOnce && !this.props.skip) {\n        // Reset the state if we get a new node, and we aren't ignoring updates\n        this.setState({ inView: !!this.props.initialInView, entry: undefined });\n      }\n    }\n\n    this.node = node ? node : null;\n    this.observeNode();\n  };\n\n  handleChange = (inView: boolean, entry: IntersectionObserverEntry) => {\n    if (inView && this.props.triggerOnce) {\n      // If `triggerOnce` is true, we should stop observing the element.\n      this.unobserve();\n    }\n    if (!isPlainChildren(this.props)) {\n      // Store the current State, so we can pass it to the children in the next render update\n      // There's no reason to update the state for plain children, since it's not used in the rendering.\n      this.setState({ inView, entry });\n    }\n    if (this.props.onChange) {\n      // If the user is actively listening for onChange, always trigger it\n      this.props.onChange(inView, entry);\n    }\n  };\n\n  render() {\n    const { children } = this.props;\n    if (typeof children === 'function') {\n      const { inView, entry } = this.state;\n      return children({ inView, entry, ref: this.handleNode });\n    }\n\n    const {\n      as,\n      triggerOnce,\n      threshold,\n      root,\n      rootMargin,\n      onChange,\n      skip,\n      trackVisibility,\n      delay,\n      initialInView,\n      fallbackInView,\n      ...props\n    } = this.props as PlainChildrenProps;\n\n    return React.createElement(\n      as || 'div',\n      { ref: this.handleNode, ...props },\n      children,\n    );\n  }\n}\n","import * as React from 'react';\nimport type { InViewHookResponse, IntersectionOptions } from './index';\nimport { observe } from './observe';\n\ntype State = {\n  inView: boolean;\n  entry?: IntersectionObserverEntry;\n};\n\n/**\n * React Hooks make it easy to monitor the `inView` state of your components. Call\n * the `useInView` hook with the (optional) [options](#options) you need. It will\n * return an array containing a `ref`, the `inView` status and the current\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\n * report the status.\n *\n * @example\n * ```jsx\n * import React from 'react';\n * import { useInView } from 'react-intersection-observer';\n *\n * const Component = () => {\n *   const { ref, inView, entry } = useInView({\n *       threshold: 0,\n *   });\n *\n *   return (\n *     <div ref={ref}>\n *       <h2>{`Header inside viewport ${inView}.`}</h2>\n *     </div>\n *   );\n * };\n * ```\n */\nexport function useInView({\n  threshold,\n  delay,\n  trackVisibility,\n  rootMargin,\n  root,\n  triggerOnce,\n  skip,\n  initialInView,\n  fallbackInView,\n  onChange,\n}: IntersectionOptions = {}): InViewHookResponse {\n  const [ref, setRef] = React.useState<Element | null>(null);\n  const callback = React.useRef<IntersectionOptions['onChange']>();\n  const [state, setState] = React.useState<State>({\n    inView: !!initialInView,\n    entry: undefined,\n  });\n\n  // Store the onChange callback in a `ref`, so we can access the latest instance\n  // inside the `useEffect`, but without triggering a rerender.\n  callback.current = onChange;\n\n  React.useEffect(\n    () => {\n      // Ensure we have node ref, and that we shouldn't skip observing\n      if (skip || !ref) return;\n\n      let unobserve: (() => void) | undefined;\n      unobserve = observe(\n        ref,\n        (inView, entry) => {\n          setState({\n            inView,\n            entry,\n          });\n          if (callback.current) callback.current(inView, entry);\n\n          if (entry.isIntersecting && triggerOnce && unobserve) {\n            // If it should only trigger once, unobserve the element after it's inView\n            unobserve();\n            unobserve = undefined;\n          }\n        },\n        {\n          root,\n          rootMargin,\n          threshold,\n          // @ts-ignore\n          trackVisibility,\n          // @ts-ignore\n          delay,\n        },\n        fallbackInView,\n      );\n\n      return () => {\n        if (unobserve) {\n          unobserve();\n        }\n      };\n    },\n    // We break the rule here, because we aren't including the actual `threshold` variable\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [\n      // If the threshold is an array, convert it to a string, so it won't change between renders.\n      // eslint-disable-next-line react-hooks/exhaustive-deps\n      Array.isArray(threshold) ? threshold.toString() : threshold,\n      ref,\n      root,\n      rootMargin,\n      triggerOnce,\n      skip,\n      trackVisibility,\n      fallbackInView,\n      delay,\n    ],\n  );\n\n  const entryTarget = state.entry?.target;\n  const previousEntryTarget = React.useRef<Element>();\n  if (\n    !ref &&\n    entryTarget &&\n    !triggerOnce &&\n    !skip &&\n    previousEntryTarget.current !== entryTarget\n  ) {\n    // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n    // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n    previousEntryTarget.current = entryTarget;\n    setState({\n      inView: !!initialInView,\n      entry: undefined,\n    });\n  }\n\n  const result = [setRef, state.inView, state.entry] as InViewHookResponse;\n\n  // Support object destructuring, by adding the specific values.\n  result.ref = result[0];\n  result.inView = result[1];\n  result.entry = result[2];\n\n  return result;\n}\n"],"names":["getInViewChildren","listElementRef","result","children","i","length","classList","contains","push","Carousel","props","_props$link","_props$link2","useRef","showPagination","setShowPagination","useState","useEffect","updatePaginationVisibility","totalItems","React","toArray","allItemsInView","current","observer","MutationObserver","observe","childList","subtree","attributes","characterData","window","addEventListener","disconnect","removeEventListener","_jsxs","className","S","_jsx","ref","DA_Button","onClick","onPreviousClick","inViewIndexes","currentIndex","scrollLeft","_listElementRef$curre","previousElement","scrollTo","left","offsetLeft","top","behavior","icon","DA_IconNames","ChevronLeft","isGhost","onNextClick","scrollWidth","_listElementRef$curre2","nextElement","ChevronRight","link","url","DA_InlineLink","title","label","href","ArrowRight","target","backgroundColorClass","hasBackgroundColor","useBackgroundColor","backgroundColor","paddingClass","usePadding","isCompact","alignmentClass","alignment","useMemo","alignmentLeft","useAlignment","items","viewState","useItems","setItems","undefined","setViewState","fetchItems","useCallback","async","_globalThis$cultures$","cultureCode","globalThis","cultures","alias","getAbsoluteUrl","rootNodeId","request","fetch","json","getItems","response","Error","getItemClassName","itemCount","item","cn","wrapper","DA_Container","noVerticalPadding","inner","header","tagline","headline","DA_Title","h3","tag","DA_TitleTag","H3","noMargin","fullWidth","text","DA_Text","html","noPadding","map","key","News","_props$thumbnail","getDictionaryString","useTranslations","wrapperElementRef","inView","useInView","triggerOnce","threshold","rootMargin","isInViewClass","tagClass","tags","tagNews","tagPress","tagPartnership","useTags","publishedDate","useFormattedCultureDate","imageWrapper","thumbnail","ImageViewer","src","image","forceWidth","index","textWrapper","observerMap","Map","RootIds","WeakMap","rootId","unsupportedValue","optionsToId","options","Object","keys","sort","filter","root","has","set","toString","get","element","callback","arguments","fallbackInView","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","time","boundingClientRect","intersectionRect","rootBounds","id","elements","instance","thresholds","entries","forEach","entry","_a","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","splice","indexOf","delete","unobserve","size","delay","skip","initialInView","onChange","setRef","React2","state","setState","entryTarget","previousEntryTarget"],"sourceRoot":""}