{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/stories/Components/Buttons/ButtonShared.styles.ts","webpack:///./src/stories/Components/Buttons/IconButton/IconButton.styles.ts","webpack:///./src/stories/Components/Buttons/IconButton/IconButton.tsx","webpack:///./src/helpers/fluid.ts","webpack:///./src/hooks/useMedia.ts","webpack:///./src/stories/Components/Buttons/NextButton/NextButton.styles.ts","webpack:///./src/stories/Components/Buttons/PrevButton/PrevButton.styles.ts","webpack:///./src/stories/Components/Cards/DocumentCard/DocumentCard.tsx","webpack:///./src/stories/Components/Buttons/PrevButton/PrevButton.tsx","webpack:///./src/stories/Components/Buttons/NextButton/NextButton.tsx","webpack:///./src/stories/Components/Global/Typography/Heading.tsx","webpack:///./src/img/icons/chevron-right.svg","webpack:///./src/hoc/withMotion.tsx","webpack:///./src/helpers/date.ts","webpack:///./src/img/icons/chevron.svg","webpack:///./src/stories/Widgets/Content/LatestNewsCarousel/LatestNewsCarousel.styles.ts","webpack:///./src/stories/Widgets/Content/LatestNewsCarousel/LatestNewsCarousel.widget.tsx","webpack:///./src/helpers/imageUrl.ts","webpack:///./src/hooks/useIntersectionObserver.ts","webpack:///./src/hooks/useInView.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","56","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice","css","brand","black","white","Icon","from","Device","MobileLarge","styled","span","Tablet","PrimaryStyles","ThemeSwitch","groundforceColour","primary","base","groundforceColourHover","PrimaryAltStyles","alt","Button","button","until","IconButton","iconComponent","className","icon","themeOption","title","otherProps","React","createElement","SBS","as","href","S","type","DEFAULT_MIN_VALUE","TabletSmall","DEFAULT_MAX_VALUE","ActualDesktop","fluid","min","max","minWidth","maxWidth","minRem","maxRem","minWidthRem","maxWidthRem","slope","yAxisIntersection","clampMin","round","clampVal","clampMax","num","Math","useMedia","queries","values","defaultValue","isSSR","mediaQueryLists","map","query","window","matchMedia","getValue","index","findIndex","mql","matches","useState","setValue","useEffect","handler","forEach","addListener","removeListener","StyledButton","DocumentCard","forwardRef","props","ref","ThemeWrapper","theme","DocumentCardStyles","Card","document","url","draggable","isLatestNewsWidget","TagArea","noticeTag","NoticeTag","groundforceDivision","DivisionTag","class","Media","Image","layout","src","imageUrl","sizes","TabletLarge","DesktopLarge","objectFit","fullPaddingTop","loading","Content","date","Date","dateTime","formatDateISO","formatDateShort","tag","Tag","Title","ParagraphContent","size","description","Chevron","displayName","PrevButton","SvgChevronRight","NextButton","Heading","children","semantic","visual","_path","_extends","assign","target","arguments","source","xmlns","viewBox","fill","stroke","strokeWidth","withMotion","WrappedComponent","ComponentWithMotion","LazyMotion","features","domAnimation","strict","formatStringDate","dateString","formatDate","toISOString","Intl","DateTimeFormat","undefined","day","month","year","format","formatDateLong","useShortMonthName","SvgChevron","MotionWrapper","div","attrs","initial","animate","Container","Mobile","Inner","HeadingStyles","h2","H3Styles","Intro","ItemList","PluginCss","Desktop","Item","variants","hidden","opacity","y","visible","transition","delay","ImageStyles","Responsive","CtaWrapper","Controls","verticalFadeIn","PrevButtonStyles","NextButtonStyles","CarouselDot","grey","grey89","DotHolder","Base","DesktopOnly","MobileOnly","CarouselSection","items","isMobile","refFlicking","useRef","itemListRef","activeIndex","setActiveIndex","showControls","setShowControls","controlsLength","setControlsLength","handleSetControlsLength","visiblePanelsLength","current","itemListStyles","getComputedStyle","featureSize","parseInt","getPropertyValue","itemSize","total","anyFeatured","featured","Fragment","Flicking","align","ALIGN","PREV","bound","onAfterResize","event","currentTarget","moveTo","visiblePanels","getVisiblePanels","onChanged","element","contains","activeElement","panel","focus","onWillChange","onMoveStart","stop","onReady","item","aspectRatio","crop","height","width","Array","disabled","onClick","preventDefault","actualIndex","direction","DIRECTION","NEXT","prev","next","withWidget","intro","cta","featuredCard","useMemo","find","useInView","threshold","elementRef","inView","Grid","Default","style","marginBottom","filter","x","LinkButton","branding","hydrate","HydrateOption","InView","instance","panels","visibleRatio","publicId","params","transformation","dpr","gravity","indexOf","createTransformation","encodedPublicId","encodeURIComponent","useIntersectionObserver","callback","options","observerRef","rootRef","IntersectionObserver","root","observe","disconnect","reverse","isEditMode","setInView","entries","isIntersecting"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,GAAI,GAG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F,SAGhBmF,EAAYnF,QAAQwF,gBAEzB,CAACP,EAAUC,IACP,CAAE3B,aAAY4B,cAAaC,Y,g9BCzB/B,SAAS/B,EAAU6B,GAA8C,IAArCO,EAAqC,wDAApBC,EAAoB,wDACpE,EAA4BvO,oBAAS,GAArC,SAAOqM,EAAP,KAAemC,EAAf,KACA,EAAuBX,GAAwB,SAACY,GACxCA,EAAQ,GAAGC,eACXF,GAAU,IAEO,IAAZF,GACLE,GAAU,KAEfT,GAPK3B,EAAR,EAAQA,WAQR,MAAO,CAACA,IAAYmC,GAAoBlC","file":"LatestNewsCarousel-df4c156b5a370ada67a1.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t56: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/sitefiles/next-gen/dist/\";\n\n \tvar jsonpArray = this[\"nextGenJsonpFunction\"] = this[\"nextGenJsonpFunction\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([603,0,1,2,3,4,6,11,15,13]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import brand from '@helpers/brand';\r\nimport { Device, from } from '@helpers/media';\r\nimport styled, { css } from 'styled-components';\r\nexport function buttonTheme(theme) {\r\n const value = css `\r\n ${theme.bgColor &&\r\n css `\r\n --buttonBgColor: ${theme.bgColor};\r\n `}\r\n\r\n ${theme.borderColor &&\r\n css `\r\n --buttonBorderColor: ${theme.borderColor};\r\n `}\r\n\r\n ${theme.fgColor &&\r\n css `\r\n --buttonColor: ${theme.fgColor};\r\n `}\r\n `;\r\n return value;\r\n}\r\nexport const sharedButtonStyles = css `\r\n display: inline-flex;\r\n align-items: center;\r\n border: 0;\r\n background-color: ${brand.black};\r\n border: 1px solid ${brand.black};\r\n border-radius: 8px;\r\n color: ${brand.white};\r\n height: 48px;\r\n justify-content: flex-start;\r\n margin: 0;\r\n outline: none;\r\n padding: 0 24px;\r\n place-content: center;\r\n place-items: center;\r\n text-decoration: none;\r\n transition: background-color 0.15s ease-out, background-size 0.15s ease-out,\r\n border-color 0.15s ease-out, color 0.15s ease-out, opacity 0.15s ease-out,\r\n transform 0.15s ease-out;\r\n user-select: none;\r\n width: auto;\r\n\r\n &:disabled {\r\n opacity: 0.5;\r\n }\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n ${() => Icon} {\r\n margin-left: 12px;\r\n }\r\n\r\n @media ${from(Device.MobileLarge)} {\r\n min-width: 150px;\r\n }\r\n`;\r\nexport const Icon = styled.span `\r\n display: block;\r\n height: 20px;\r\n width: 20px;\r\n\r\n @media ${from(Device.Tablet)} {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n`;\r\nexport const Text = styled.span `\r\n color: currentColor;\r\n\r\n font-size: 18px;\r\n line-height: 25px;\r\n`;\r\n","import brand from '@helpers/brand';\r\nimport { Device, from, until } from '@helpers/media';\r\nimport styled, { css } from 'styled-components';\r\nimport { ThemeSwitch } from '@helpers/theme';\r\nconst PrimaryStyles = css `\r\n color: ${brand.white};\r\n ${ThemeSwitch({ groundforceColour: brand.primary.base, groundforceColourHover: '#a2b952' })}\r\n background-color: var(--theme-hover);\r\n\r\n &:hover {\r\n background-color: var(--theme);\r\n color: ${brand.white};\r\n }\r\n\r\n &:active,\r\n &:focus {\r\n color: ${brand.white};\r\n }\r\n`;\r\nconst PrimaryAltStyles = css `\r\n color: ${brand.white};\r\n ${ThemeSwitch({ groundforceColour: brand.primary.alt })}\r\n background-color: var(--theme);\r\n\r\n &:hover {\r\n color: ${brand.white};\r\n }\r\n\r\n &:active,\r\n &:focus {\r\n color: ${brand.white};\r\n }\r\n`;\r\nconst Button = styled.button `\r\n display: inline-flex;\r\n align-items: center;\r\n border: 0;\r\n ${ThemeSwitch({ groundforceColour: brand.primary.base })}\r\n background-color: var(--theme);\r\n color: ${brand.white};\r\n height: 48px;\r\n justify-content: flex-start;\r\n margin: 0;\r\n outline: none;\r\n padding: 0;\r\n place-content: center;\r\n place-items: center;\r\n text-decoration: none;\r\n transition: background-size 0.15s ease-out, opacity 0.15s ease-out, transform 0.15s ease-out;\r\n user-select: none;\r\n width: 48px;\r\n\r\n &[data-theme='primary'] {\r\n ${PrimaryStyles}\r\n }\r\n &[data-theme='primaryAlt'] {\r\n ${PrimaryAltStyles}\r\n }\r\n\r\n &:disabled {\r\n opacity: 0.5;\r\n }\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n @media ${from(Device.Tablet)} {\r\n &:hover {\r\n opacity: 0.7;\r\n }\r\n }\r\n\r\n @media ${until(Device.Tablet)} {\r\n height: 40px;\r\n width: 40px;\r\n }\r\n`;\r\nexport default {\r\n Button,\r\n};\r\n","import React from 'react';\r\nimport * as SBS from '../ButtonShared.styles';\r\nimport S from './IconButton.styles';\r\nconst IconButton = ({ className, icon, themeOption, title, ...otherProps }) => {\r\n let iconComponent;\r\n if (typeof icon === 'string') {\r\n iconComponent = (React.createElement(SBS.Icon, { as: \"svg\", \"aria-label\": title },\r\n React.createElement(\"use\", { href: icon })));\r\n }\r\n else {\r\n iconComponent = React.createElement(SBS.Icon, { as: icon, \"aria-label\": title });\r\n }\r\n return (React.createElement(S.Button, { className: className, themeOption: themeOption, \"data-theme\": themeOption, type: \"button\", ...otherProps }, iconComponent));\r\n};\r\nexport default IconButton;\r\n","import { Device } from './media';\r\n/**\r\n * Base pixel value for the \"rem\" unit.\r\n */\r\nexport const PIXELS_PER_REM = 16;\r\n/**\r\n * Default pixel value for the min width.\r\n */\r\nexport const DEFAULT_MIN_VALUE = Device.TabletSmall;\r\n/**\r\n * Default pixel value for the max width.\r\n */\r\nexport const DEFAULT_MAX_VALUE = Device.ActualDesktop;\r\n/**\r\n * Define a fluid value between the min/max values at the min/max widths.\r\n */\r\nexport function fluid(min, max, minWidth = DEFAULT_MIN_VALUE, maxWidth = DEFAULT_MAX_VALUE) {\r\n const minRem = min / PIXELS_PER_REM;\r\n const maxRem = max / PIXELS_PER_REM;\r\n const minWidthRem = minWidth / PIXELS_PER_REM;\r\n const maxWidthRem = maxWidth / PIXELS_PER_REM;\r\n const slope = (maxRem - minRem) / (maxWidthRem - minWidthRem);\r\n const yAxisIntersection = -minWidthRem * slope + minRem;\r\n const clampMin = `${round(minRem)}rem`;\r\n const clampVal = `${round(yAxisIntersection)}rem + ${round(slope * 100)}vw`;\r\n const clampMax = `${round(maxRem)}rem`;\r\n return `clamp(${clampMin}, ${clampVal}, ${clampMax})`;\r\n}\r\n/**\r\n * Define a fluid value between the min/max values at the min/max widths.\r\n */\r\nexport function fluidUnit(min, max, minWidth = DEFAULT_MIN_VALUE, maxWidth = DEFAULT_MAX_VALUE, unit) {\r\n const slope = (max - min) / (maxWidth - minWidth);\r\n const yAxisIntersection = -minWidth * slope + min;\r\n const clampMin = `${round(min)}`;\r\n const clampVal = `${round(yAxisIntersection)}${unit} + ${round(slope * 100)}vw`;\r\n const clampMax = `${round(max)}`;\r\n return `clamp(${clampMin}${unit}, ${clampVal}, ${clampMax}${unit})`;\r\n}\r\n/**\r\n * Round to nearest hundredth.\r\n */\r\nfunction round(num) {\r\n return Math.round(num * 100) / 100;\r\n}\r\n","import { isSSR } from '@helpers/ssr';\r\nimport { useEffect, useState } from 'react';\r\n/**\r\n * Store a value in state based on the specified media queries.\r\n * @param {Array} queries\r\n * @param {Array} values\r\n * @param {T} defaultValue\r\n */\r\nfunction useMedia(queries, values, defaultValue) {\r\n // Avoid error with SSR.\r\n if (isSSR()) {\r\n return defaultValue;\r\n }\r\n // Array containing a media query list for each query\r\n const mediaQueryLists = queries.map((query) => window.matchMedia(query));\r\n // Function that gets value based on matching media query\r\n const getValue = () => {\r\n // Get index of first media query that matches\r\n const index = mediaQueryLists.findIndex((mql) => mql.matches);\r\n // Return related value or defaultValue if none\r\n return typeof values[index] !== 'undefined' ? values[index] : defaultValue;\r\n };\r\n // State and setter for matched value\r\n const [value, setValue] = useState(getValue);\r\n useEffect(() => {\r\n // Event listener callback\r\n // Note: By defining getValue outside of useEffect we ensure that it has ...\r\n // ... current values of hook args (as this hook callback is created once on mount).\r\n const handler = () => setValue(getValue);\r\n // Set a listener for each media query with above handler as callback.\r\n mediaQueryLists.forEach((mql) => mql.addListener(handler));\r\n // Remove listeners on cleanup\r\n return () => mediaQueryLists.forEach((mql) => mql.removeListener(handler));\r\n }, []); // Empty array ensures effect is only run on mount and unmount\r\n return value;\r\n}\r\nexport default useMedia;\r\n","import styled from 'styled-components';\r\nimport IconButton from '../IconButton/IconButton';\r\nconst StyledButton = styled(IconButton) ``;\r\nexport default {\r\n Button: StyledButton,\r\n};\r\n","import styled from 'styled-components';\r\nimport * as SBS from '../ButtonShared.styles';\r\nimport IconButton from '../IconButton/IconButton';\r\nconst StyledButton = styled(IconButton) `\r\n ${SBS.Icon} {\r\n transform: rotate(-180deg);\r\n }\r\n`;\r\nexport default {\r\n Button: StyledButton,\r\n};\r\n","import { formatDateISO, formatDateShort } from '@helpers/date';\r\nimport { Device, until } from '@helpers/media';\r\nimport { ReactComponent as Chevron } from '@img/icons/chevron.svg';\r\nimport Image from '@stories/Components/Media/Image/Image';\r\nimport React from 'react';\r\nimport { DocumentCardStyles } from './DocumentCard.styles';\r\nimport { ThemeWrapper } from '@helpers/theme';\r\nconst DocumentCard = React.forwardRef((props, ref) => {\r\n return (React.createElement(ThemeWrapper, { \"data-theme\": props.theme },\r\n React.createElement(DocumentCardStyles.Card, { ref: ref, href: props.document.url, draggable: false, isLatestNewsWidget: props.isLatestNewsWidget, as: props.document.url ? 'a' : 'div' },\r\n React.createElement(DocumentCardStyles.TagArea, null,\r\n props.document.noticeTag ? (React.createElement(DocumentCardStyles.NoticeTag, null, props.document.noticeTag)) : null,\r\n props.document.groundforceDivision &&\r\n props.document.groundforceDivision.name.length > 0 && (React.createElement(DocumentCardStyles.DivisionTag, { \"data-tag-colour\": props.document.groundforceDivision.class }, props.document.groundforceDivision.name))),\r\n React.createElement(DocumentCardStyles.Media, { isLatestNewsWidget: props.isLatestNewsWidget }, props.Image ? (React.createElement(props.Image, null)) : (React.createElement(Image, { layout: \"fill\", src: props.document.imageUrl, sizes: `${until(Device.TabletLarge)} 50vw, ${until(Device.DesktopLarge)} 33vw, 25vw`, objectFit: \"cover\", alt: props.document.title || '', draggable: false, fullPaddingTop: props.document.fullPaddingTop, loading: 'lazy' }))),\r\n React.createElement(DocumentCardStyles.Content, null,\r\n props.document.date && (React.createElement(DocumentCardStyles.Date, { as: \"time\", dateTime: formatDateISO(props.document.date) }, formatDateShort(props.document.date))),\r\n props.document.tag && (React.createElement(DocumentCardStyles.Tag, null, props.document.tag)),\r\n React.createElement(DocumentCardStyles.Title, { isLatestNewsWidget: props.isLatestNewsWidget }, props.document.title),\r\n React.createElement(DocumentCardStyles.ParagraphContent, { size: \"small\", isLatestNewsWidget: props.isLatestNewsWidget }, props.document.description),\r\n props.document.url && (React.createElement(DocumentCardStyles.Icon, null,\r\n React.createElement(Chevron, null)))))));\r\n});\r\nDocumentCard.displayName = 'DocumentCard';\r\nexport default DocumentCard;\r\n","import { ReactComponent as SvgChevronRight } from '@img/icons/chevron-right.svg';\r\nimport React from 'react';\r\nimport S from './PrevButton.styles';\r\nconst PrevButton = ({ themeOption, title = 'Next', ...otherProps }) => {\r\n return (React.createElement(S.Button, { type: \"button\", icon: SvgChevronRight, themeOption: themeOption, title: title, ...otherProps }));\r\n};\r\nexport default PrevButton;\r\n","import { ReactComponent as SvgChevronRight } from '@img/icons/chevron-right.svg';\r\nimport React from 'react';\r\nimport S from './NextButton.styles';\r\nconst NextButton = ({ themeOption, title = 'Next', ...otherProps }) => {\r\n return (React.createElement(S.Button, { type: \"button\", icon: SvgChevronRight, themeOption: themeOption, title: title, ...otherProps }));\r\n};\r\nexport default NextButton;\r\n","import React from 'react';\r\nimport s from './Heading.styles';\r\nconst Heading = ({ children, semantic = 'h1', visual, ...otherProps }) => {\r\n return (React.createElement(s.Heading, { as: semantic, visual: visual, ...otherProps }, children));\r\n};\r\nexport default Heading;\r\n","var _path;\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 * as React from \"react\";\n\nfunction SvgChevronRight(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 7.257 11.686\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n \"data-name\": \"Path 48\",\n d: \"M.707.707l5.136 5.136-5.136 5.136\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2\n })));\n}\n\nexport default __webpack_public_path__ + \"6973e4a6f707c58d2376f688ccfb4a95.svg\";\nexport { SvgChevronRight as ReactComponent };","import { domAnimation, LazyMotion } from 'framer-motion';\r\nimport React from 'react';\r\nexport function withMotion(WrappedComponent) {\r\n const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\r\n const ComponentWithMotion = (props) => {\r\n return (React.createElement(LazyMotion, { features: domAnimation, strict: true },\r\n React.createElement(WrappedComponent, { ...props })));\r\n };\r\n ComponentWithMotion.displayName = `withMotion(${displayName})`;\r\n return ComponentWithMotion;\r\n}\r\n","export function formatStringDate(dateString) {\r\n const date = new Date(dateString);\r\n return formatDate(date);\r\n}\r\nexport function formatDateISO(value) {\r\n let date = value;\r\n if (typeof date === 'string') {\r\n date = new Date(date);\r\n }\r\n return date.toISOString();\r\n}\r\nexport function formatDate(value) {\r\n let date = value;\r\n if (typeof date === 'string') {\r\n date = new Date(date);\r\n }\r\n return new Intl.DateTimeFormat(undefined, {\r\n day: 'numeric',\r\n month: 'short',\r\n year: 'numeric',\r\n }).format(date);\r\n}\r\nexport function formatDateLong(value, useShortMonthName) {\r\n let date = value;\r\n if (typeof date === 'string') {\r\n date = new Date(date);\r\n }\r\n return new Intl.DateTimeFormat(undefined, {\r\n day: 'numeric',\r\n month: useShortMonthName ? 'short' : 'long',\r\n year: 'numeric',\r\n }).format(date);\r\n}\r\nexport function formatDateShort(value) {\r\n let date = value;\r\n if (typeof date === 'string') {\r\n date = new Date(date);\r\n }\r\n return new Intl.DateTimeFormat(undefined, {\r\n day: 'numeric',\r\n month: '2-digit',\r\n year: '2-digit',\r\n }).format(date);\r\n}\r\n","var _path;\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 * as React from \"react\";\n\nfunction SvgChevron(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20.679 12.461\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n \"data-name\": \"Path 99\",\n d: \"M19.618 11.4l-9.279-9.279L1.06 11.4\",\n fill: \"none\"\n })));\n}\n\nexport default __webpack_public_path__ + \"056c9f699b39d0845225c962dec7c133.svg\";\nexport { SvgChevron as ReactComponent };","import PluginCss from '!raw-loader!@egjs/react-flicking/dist/flicking.css';\r\nimport brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport { Device, from, until } from '@helpers/media';\r\nimport { ThemeSwitch } from '@helpers/theme';\r\nimport { verticalFadeIn } from '@helpers/variants';\r\nimport NextButtonStyles from '@stories/Components/Buttons/NextButton/NextButton.styles';\r\nimport PrevButtonStyles from '@stories/Components/Buttons/PrevButton/PrevButton.styles';\r\nimport { DocumentCardStyles } from '@stories/Components/Cards/DocumentCard/DocumentCard.styles';\r\nimport HeadingStyles from '@stories/Components/Global/Typography/Heading.styles';\r\nimport { ImageStyles } from '@stories/Components/Media/Image/Image.styles';\r\nimport { m } from 'framer-motion';\r\nimport styled from 'styled-components';\r\nconst MotionWrapper = styled(m.div).attrs((props) => ({\r\n initial: 'hidden',\r\n animate: props['data-in-view'] ? 'visible' : 'hidden',\r\n})) `\r\n display: contents;\r\n`;\r\nconst Container = styled.div `\r\n overflow: hidden;\r\n margin: 40px 0px;\r\n\r\n &[data-ssr='true'] {\r\n &[data-has-load-more='false'] {\r\n min-height: 608px;\r\n\r\n @media ${from(Device.Tablet)} {\r\n min-height: 590px;\r\n }\r\n }\r\n\r\n &[data-has-load-more='true'] {\r\n min-height: ${fluid(671, 760, Device.Mobile, Device.ActualDesktop)};\r\n }\r\n }\r\n`;\r\nconst Inner = styled.div `\r\n grid-column: span 12;\r\n position: relative;\r\n z-index: 2;\r\n\r\n ${HeadingStyles.Heading} {\r\n grid-column: span 12;\r\n text-align: center;\r\n ${ThemeSwitch({ groundforceColour: brand.primary.alt })}\r\n color: var(--theme);\r\n margin-bottom: 28px;\r\n }\r\n`;\r\nconst Title = styled.h2 `\r\n ${HeadingStyles.H3Styles}\r\n`;\r\nconst Intro = styled.p `\r\n font-size: 16px;\r\n line-height: 26px;\r\n text-align: center;\r\n margin: 0 auto 30px;\r\n\r\n @media ${from(Device.Tablet)} {\r\n font-size: 18px;\r\n line-height: 28px;\r\n max-width: 670px;\r\n margin: 0 auto 80px;\r\n }\r\n`;\r\nconst ItemList = styled.div `\r\n --itemGutter: ${fluid(10, 30)};\r\n --featureGutter: 0px;\r\n\r\n --itemWidth: 1;\r\n --itemSize: 1;\r\n --itemSpace: 0;\r\n\r\n --featureWidth: 100%;\r\n --featureSize: 1;\r\n\r\n ${PluginCss};\r\n\r\n display: flex;\r\n width: 100%;\r\n\r\n .flicking-viewport {\r\n width: 100%;\r\n // Stops the overflow cutting the box-shadow\r\n padding: 8px;\r\n margin-right: -8px;\r\n margin-left: -8px;\r\n\r\n @media ${until(Device.TabletLarge)} {\r\n overflow: visible;\r\n }\r\n }\r\n\r\n @media ${from(Device.Tablet)} {\r\n --itemWidth: 2;\r\n --itemSpace: 1;\r\n --itemSize: 1;\r\n\r\n --featureWidth: 100%;\r\n --featureSize: 2;\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n --itemWidth: 3;\r\n --itemSpace: 2;\r\n --itemSize: 1;\r\n\r\n --featureWidth: 66%;\r\n --featureSize: 2;\r\n }\r\n\r\n @media ${from(Device.Desktop)} {\r\n --itemWidth: 4;\r\n --itemSpace: 3;\r\n --itemSize: 1;\r\n\r\n --featureWidth: 50%;\r\n --featureGutter: 30px;\r\n --featureSize: 2;\r\n }\r\n`;\r\nconst Item = styled(m.div).attrs((props) => ({\r\n variants: {\r\n hidden: { opacity: 0, y: 15 },\r\n visible: { opacity: 1, y: 0, transition: { delay: props['data-offset'] * 0.1 } },\r\n },\r\n})) `\r\n display: block;\r\n margin-right: var(--itemGutter);\r\n /* flex: 1 0 calc(var(--itemWidth) - (var(--itemGutter) / 2)); */\r\n\r\n flex: 1 0 calc((100% - (var(--itemGutter) * var(--itemSpace))) / var(--itemWidth));\r\n\r\n &[data-featured='true'][data-main-item='false'] {\r\n @media ${from(Device.TabletLarge)} {\r\n display: none;\r\n }\r\n }\r\n\r\n --imageAspectRatio: 387 / 246;\r\n --imageMaxHeight: 246px;\r\n\r\n &[data-featured='true'] {\r\n flex: 1 0 calc(var(--featureWidth) - (var(--featureGutter) / 2));\r\n\r\n --imageAspectRatio: 804 / 299;\r\n --imageMaxHeight: 299px;\r\n }\r\n\r\n @media ${until(Device.MobileLarge)} {\r\n max-width: 100%;\r\n height: auto;\r\n }\r\n\r\n ${DocumentCardStyles.Card} {\r\n height: 100% !important;\r\n }\r\n\r\n ${DocumentCardStyles.Media} {\r\n aspect-ratio: var(--imageAspectRatio);\r\n max-height: var(--imageMaxHeight);\r\n\r\n ${ImageStyles.Responsive} {\r\n height: 100%;\r\n }\r\n }\r\n`;\r\nconst CtaWrapper = styled.div `\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-start;\r\n margin: 22px 0 0;\r\n\r\n @media ${from(Device.Tablet)} {\r\n justify-content: center;\r\n margin: 64px 0 0;\r\n }\r\n`;\r\nconst Controls = styled(m.div).attrs(() => ({\r\n variants: verticalFadeIn(25),\r\n})) `\r\n display: grid;\r\n grid-template-columns: 40px 40px 1fr 40px 40px;\r\n margin: 24px 0 0;\r\n gap: 12px;\r\n ${ThemeSwitch({ groundforceColour: brand.primary.alt })}\r\n\r\n @media ${from(Device.Tablet)} {\r\n grid-template-columns: 48px 48px 1fr 48px 48px;\r\n margin: 40px 0 0;\r\n }\r\n\r\n ${PrevButtonStyles.Button} {\r\n background-color: var(--theme);\r\n grid-column: 4;\r\n }\r\n\r\n ${NextButtonStyles.Button} {\r\n background-color: var(--theme);\r\n grid-column: 5;\r\n }\r\n`;\r\nconst CarouselDot = styled.button.attrs({ type: 'button' }) `\r\n display: flex;\r\n flex: 1 0 auto;\r\n border: none;\r\n border-radius: 0;\r\n height: 5px;\r\n padding: 0;\r\n background-color: ${brand.grey.grey89};\r\n transform-origin: center bottom;\r\n transition: background-color 0.15s ease-out, transform 0.15s ease-out;\r\n max-width: 132px;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:focus,\r\n &:hover {\r\n transform: scaleY(2);\r\n ${ThemeSwitch({ groundforceColour: brand.primary.alt })}\r\n background-color: var(--theme);\r\n }\r\n\r\n &[disabled] {\r\n ${ThemeSwitch({ groundforceColour: brand.primary.alt })}\r\n background-color: var(--theme);\r\n }\r\n`;\r\nconst DotHolder = styled.div `\r\n display: flex;\r\n flex: 1 0 auto;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 6px;\r\n grid-column: 1 / span 3;\r\n\r\n @media ${until(Device.TabletLarge)} {\r\n &[data-hidden='1'] {\r\n display: none;\r\n }\r\n }\r\n\r\n @media ${from(Device.Tablet)} {\r\n gap: 10px;\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n grid-column: 3;\r\n }\r\n`;\r\nconst Base = styled.div `\r\n grid-column: span 12;\r\n position: relative;\r\n z-index: 2;\r\n padding: 30px 0;\r\n text-align: center;\r\n`;\r\nconst DesktopOnly = styled.div `\r\n display: contents;\r\n\r\n @media ${until(Device.TabletLarge)} {\r\n display: none;\r\n }\r\n`;\r\nconst MobileOnly = styled.div `\r\n display: none;\r\n\r\n @media ${until(Device.TabletLarge)} {\r\n display: contents;\r\n }\r\n`;\r\nexport default {\r\n Base,\r\n CarouselDot,\r\n Container,\r\n Controls,\r\n CtaWrapper,\r\n DotHolder,\r\n Inner,\r\n Intro,\r\n Item,\r\n ItemList,\r\n Title,\r\n MotionWrapper,\r\n DesktopOnly,\r\n MobileOnly,\r\n};\r\n","import { HydrateOption } from '@core/enums';\r\nimport Flicking, { ALIGN, DIRECTION, } from '@egjs/react-flicking';\r\nimport { Grid } from '@helpers/grid';\r\nimport withWidget from '@hoc/withWidget';\r\nimport { LinkButton } from '@stories/Components/Buttons/Button/Button';\r\nimport NextButton from '@stories/Components/Buttons/NextButton/NextButton';\r\nimport PrevButton from '@stories/Components/Buttons/PrevButton/PrevButton';\r\nimport DocumentCard from '@stories/Components/Cards/DocumentCard/DocumentCard';\r\nimport Heading from '@stories/Components/Global/Typography/Heading';\r\nimport React, { useRef, useState } from 'react';\r\nimport S from './LatestNewsCarousel.styles';\r\nimport { imageUrl } from '@helpers/imageUrl';\r\nimport useMedia from '@hooks/useMedia';\r\nimport { Device, until } from '@helpers/media';\r\nimport { ThemeWrapper } from '@helpers/theme';\r\nimport { withMotion } from '@hoc/withMotion';\r\nimport { useInView } from '@hooks/useInView';\r\nconst CarouselSection = ({ items, isLatestNewsWidget, isMobile }) => {\r\n const refFlicking = useRef(null);\r\n const itemListRef = useRef(null);\r\n const [activeIndex, setActiveIndex] = useState(0);\r\n const [showControls, setShowControls] = useState(false);\r\n const [controlsLength, setControlsLength] = useState(0);\r\n const handleSetControlsLength = (visiblePanelsLength) => {\r\n if (!itemListRef.current) {\r\n return;\r\n }\r\n const itemListStyles = getComputedStyle(itemListRef.current);\r\n const featureSize = parseInt(itemListStyles.getPropertyValue('--featureSize'), 10);\r\n const itemSize = parseInt(itemListStyles.getPropertyValue('--itemSize'), 10);\r\n let total = 0;\r\n let anyFeatured = false;\r\n for (let index = 0; index < items.length; index++) {\r\n const item = items[index];\r\n if (item.featured === true) {\r\n anyFeatured = true;\r\n total += featureSize;\r\n }\r\n else {\r\n total += itemSize;\r\n }\r\n }\r\n getComputedStyle(itemListRef.current);\r\n if (itemSize === 1 && featureSize === 1) {\r\n setControlsLength(total);\r\n return;\r\n }\r\n if (anyFeatured === false) {\r\n setControlsLength(total + 1 - visiblePanelsLength);\r\n return;\r\n }\r\n setControlsLength(total - 1 - visiblePanelsLength);\r\n };\r\n return (React.createElement(React.Fragment, null,\r\n React.createElement(S.ItemList, { ref: itemListRef },\r\n React.createElement(Flicking, { ref: refFlicking, align: ALIGN.PREV, bound: true, onAfterResize: (event) => {\r\n // Move to first item after resizing to fix misalignment.\r\n event.currentTarget.moveTo(0);\r\n const visiblePanels = getVisiblePanels(event.currentTarget);\r\n handleSetControlsLength(visiblePanels.length);\r\n // Hide controls when all panels are visible.\r\n setShowControls(!(visiblePanels.length === items.length));\r\n }, onChanged: (event) => {\r\n // Auto-focus the new slide if the focus was already inside the carousel.\r\n if (event.currentTarget.element.contains(document.activeElement)) {\r\n event.panel.element.focus();\r\n }\r\n }, onWillChange: (event) => {\r\n if (event.index > items.length - 1) {\r\n setActiveIndex(event.index - items.length);\r\n }\r\n else {\r\n setActiveIndex(event.index);\r\n }\r\n }, onMoveStart: (event) => {\r\n const visiblePanels = getVisiblePanels(event.currentTarget);\r\n // Avoid swiping when all panels are visible.\r\n if (visiblePanels.length === items.length) {\r\n event.stop();\r\n }\r\n }, onReady: (event) => {\r\n const visiblePanels = getVisiblePanels(event.currentTarget);\r\n handleSetControlsLength(visiblePanels.length);\r\n // Hide controls when all panels are visible.\r\n setShowControls(!(visiblePanels.length === items.length));\r\n } }, items.map((item, i) => (React.createElement(S.Item, { key: i, \"data-offset\": i, \"data-main-item\": true, \"data-featured\": item.featured },\r\n React.createElement(DocumentCard, { document: item, isLatestNewsWidget: isLatestNewsWidget, Image: () => {\r\n return (React.createElement(\"img\", { loading: \"lazy\", draggable: false, src: imageUrl(item.imageUrl, {\r\n aspectRatio: isMobile\r\n ? item.featured\r\n ? 350 / 220\r\n : 239 / 178\r\n : item.featured\r\n ? 804 / 299\r\n : 387 / 246,\r\n crop: 'auto',\r\n height: isMobile ? 146 : item.featured ? 299 : 246,\r\n width: isMobile ? 230 : item.featured ? 804 : 387,\r\n }) }));\r\n } })))))),\r\n showControls && controlsLength > 1 && (React.createElement(S.Controls, null,\r\n React.createElement(S.DotHolder, { \"data-hidden\": controlsLength > 5 ? '1' : '0' }, new Array(controlsLength).fill(null).map((item, index) => (React.createElement(S.CarouselDot, { key: index, disabled: activeIndex === index, onClick: (event) => {\r\n event.preventDefault();\r\n moveTo(index);\r\n } })))),\r\n React.createElement(PrevButton, { disabled: activeIndex === 0, themeOption: \"primaryAlt\", onClick: (event) => {\r\n event.preventDefault();\r\n refFlicking.current?.prev();\r\n } }),\r\n React.createElement(NextButton, { disabled: activeIndex === controlsLength - 1, themeOption: \"primaryAlt\", onClick: (event) => {\r\n event.preventDefault();\r\n refFlicking.current?.next();\r\n } })))));\r\n function moveTo(index) {\r\n const actualIndex = refFlicking.current?.index ?? 0;\r\n // Adjust index to account for cloned items.\r\n if (actualIndex > items.length - 1) {\r\n index += items.length;\r\n }\r\n const direction = index < actualIndex ? DIRECTION.PREV : DIRECTION.NEXT;\r\n refFlicking.current?.moveTo(index, undefined, direction);\r\n }\r\n};\r\nconst LatestNewsCarousel = ({ items = [], title, intro, cta, isLatestNewsWidget, theme, }) => {\r\n const isMobile = useMedia([until(Device.TabletLarge)], [true], false);\r\n const featuredCard = React.useMemo(() => items.find((item) => item.featured), [isMobile, items]);\r\n const [elementRef, inView] = useInView({ threshold: 0.25 });\r\n return (React.createElement(ThemeWrapper, { \"data-theme\": theme },\r\n React.createElement(S.MotionWrapper, { \"data-in-view\": inView },\r\n React.createElement(S.Container, { ref: elementRef, \"data-has-load-more\": items.length > 4, \"data-ssr\": false, key: `LatestNewsCarousel_Container` },\r\n React.createElement(Grid.Default, null,\r\n React.createElement(S.Inner, null,\r\n React.createElement(Heading, { visual: \"h5\", semantic: \"h2\" }, title),\r\n intro && React.createElement(S.Intro, null, intro),\r\n featuredCard && (React.createElement(S.Item, { \"data-offset\": 0, \"data-featured\": true, \"data-main-item\": false, style: { marginBottom: 26 } },\r\n React.createElement(DocumentCard, { document: featuredCard, isLatestNewsWidget: isLatestNewsWidget, Image: () => {\r\n return (React.createElement(\"img\", { draggable: false, loading: \"lazy\", src: imageUrl(featuredCard.imageUrl, {\r\n aspectRatio: 350 / 220,\r\n crop: 'auto',\r\n height: 220,\r\n width: 350,\r\n }) }));\r\n } }))),\r\n React.createElement(S.DesktopOnly, null,\r\n React.createElement(CarouselSection, { items: items, isLatestNewsWidget: isLatestNewsWidget, isMobile: isMobile })),\r\n React.createElement(S.MobileOnly, null,\r\n React.createElement(CarouselSection, { items: items.filter((x) => !x.featured), isLatestNewsWidget: isLatestNewsWidget, isMobile: isMobile }))),\r\n cta && (React.createElement(S.Base, null,\r\n React.createElement(LinkButton, { title: cta.title, target: cta.target, href: cta.url, branding: \"primaryAlt\" }))))))));\r\n};\r\nexport default withWidget(withMotion(LatestNewsCarousel), 'LatestNewsCarousel', {\r\n hydrate: HydrateOption.InView,\r\n});\r\nfunction getVisiblePanels(instance) {\r\n return instance.panels.filter((panel) => panel.visibleRatio >= 0.9);\r\n}\r\n","const CLOUD_NAME = 'vp-groundforce';\r\nexport function imageUrl(publicId, params) {\r\n const transformation = createTransformation(params);\r\n const encodedPublicId = encodeURIComponent(publicId);\r\n return `https://res.cloudinary.com/${CLOUD_NAME}/image/upload/${transformation}/${encodedPublicId}`;\r\n}\r\nexport function createTransformation(params) {\r\n let transformation = '';\r\n if (params.width) {\r\n transformation += `,w_${params.width}`;\r\n }\r\n if (params.height) {\r\n transformation += `,h_${params.height}`;\r\n }\r\n if (params.aspectRatio) {\r\n transformation += `,ar_${params.aspectRatio}`;\r\n }\r\n if (params.dpr) {\r\n transformation += `,dpr_${params.dpr}`;\r\n }\r\n if (params.crop) {\r\n transformation += `,c_${params.crop}`;\r\n }\r\n if (params.gravity) {\r\n transformation += `,g_${params.gravity}`;\r\n }\r\n const format = params.format ?? 'auto';\r\n transformation += `/f_${format},q_auto`;\r\n if (transformation.indexOf(',') === 0) {\r\n transformation = transformation.slice(1);\r\n }\r\n return transformation;\r\n}\r\n","import { useEffect, useRef } from 'react';\r\n/**\r\n * Use the IntersectionObserver to track visibility of an element in the viewport.\r\n * @param {IntersectionObserverCallback} callback\r\n * @param {IntersectionObserverInit} options\r\n * @returns {UseIntersectionObserverReturn}\r\n */\r\nfunction useIntersectionObserver(callback, options = {}) {\r\n const observerRef = useRef(null);\r\n const rootRef = useRef(null);\r\n const elementRef = useRef(null);\r\n useEffect(() => {\r\n if (!elementRef.current) {\r\n return undefined;\r\n }\r\n observerRef.current = new IntersectionObserver(callback, {\r\n root: rootRef.current,\r\n ...options,\r\n });\r\n observerRef.current.observe(elementRef.current);\r\n return () => {\r\n if (observerRef.current === null) {\r\n return;\r\n }\r\n observerRef.current.disconnect();\r\n };\r\n }, [callback, options]);\r\n return { elementRef, observerRef, rootRef };\r\n}\r\nexport default useIntersectionObserver;\r\n","import { useState } from 'react';\r\nimport useIntersectionObserver from './useIntersectionObserver';\r\nexport function useInView(options, reverse = false, isEditMode = false) {\r\n const [inView, setInView] = useState(false);\r\n const { elementRef } = useIntersectionObserver((entries) => {\r\n if (entries[0].isIntersecting) {\r\n setInView(true);\r\n }\r\n else if (reverse === true) {\r\n setInView(false);\r\n }\r\n }, options);\r\n return [elementRef, isEditMode ? true : inView];\r\n}\r\n"],"sourceRoot":""}