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C,OAAgB,EAASA,EAAGwD,OACjH,GAAqB,GAAjBF,EACA,OAEJ,MAAMG,EAAWvB,OAAOwB,KAAKT,GAAcU,QAAQ1B,GAAQgB,EAAahB,IAAQqB,IAChF,OAAOL,EAAaQ,EAASA,EAASjD,OAAS,GAAG,EAW5BqE,GACdD,GAAaA,IAAczB,GAC3BC,EAAcwB,GAElB,MAAME,EAAanC,IACfmC,GAAcA,IAAejB,GAC7BC,EAAoBgB,EACxB,GACD,KAEH,OADAjC,OAAOkC,iBAAiB,SAAUL,GAC3B,IAAM7B,OAAOmC,oBAAoB,SAAUN,EAAa,GAChE,CAACvB,EAAYU,IACT,CAEHoB,cAAe9B,GAAcN,OAAOK,MAAMgC,GAE1C3C,SAAUY,EAAaN,OAAOK,MAAMiC,GAEpCC,SAAUjC,GAAcN,OAAOK,MAAMmC,IAAMlC,EAAaN,OAAOK,MAAMiC,GAErEG,eAAgBnC,GAAcN,OAAOK,MAAMqC,GAE3CC,UAAWrC,GAAcN,OAAOK,MAAMiC,GAEtCM,cAAetC,GAAcN,OAAOK,MAAMwC,IAC1C3B,QAASA,EACT4B,SAAU9B,EA5FC,IA6Fd,C,uCC9FL,MAAM9C,EAAQ3B,IACV,MAAMwG,EAAO,GAAGxG,EAAM4B,UAAU5B,EAAMW,OAAOX,EAAMyG,SAAW,SAAW,KACzE,OAAO,gBAAoB,OAAQ,CAAE,aAAczG,EAAM0G,UAAW,eAAe,EAAMvG,UAAW,cAAcqG,KAAQxG,EAAM2G,SAAW,YAAc,MAAO,EAEpKhF,EAAKiF,aAAe,CAChBhF,OAAQ,KACR6E,UAAU,EACVI,YAAY,GAEhB,K","sources":["webpack:///./assets/stone/src/components/clientService/ClientServiceStep.tsx","webpack:///./assets/stone/src/components/clientService/ClientServiceStepsMobile.tsx","webpack:///./assets/stone/src/components/clientService/ClientServiceSteps.tsx","webpack:///./assets/stone/src/hooks/useMediaQueries.tsx","webpack:///./assets/stone/src/ui/icon/Icon.tsx"],"sourcesContent":["import React from 'react';\nconst ClientServiceStep = (props) => {\n const content = () => {\n return (React.createElement(React.Fragment, null,\n props.title && React.createElement(\"h4\", { className: \"cs-step_title font__title mb-32\" }, props.title),\n props.text && React.createElement(\"div\", { className: \"cs-step_text mb-12\", dangerouslySetInnerHTML: { __html: props.text } }),\n props.link && (React.createElement(\"a\", { className: \"button button--tertiary\", href: props.link },\n React.createElement(\"span\", null, props.cta)))));\n };\n return props.isSlide ? (React.createElement(\"div\", { className: \"cs-step_slide\" },\n props.name && React.createElement(\"h3\", { className: \"cs-step_title font__title mb-32\" }, props.name),\n React.createElement(\"div\", null, content()))) : (React.createElement(\"div\", { className: \"row cs-step_row\" },\n React.createElement(\"div\", { className: \"inner-col-24 inner-col-lg-2\" }, props.name && React.createElement(\"h3\", { className: \"cs-step_name font__title\" }, props.name)),\n React.createElement(\"div\", { className: \"inner-col-24 inner-col-lg-8\" }, content())));\n};\nexport default ClientServiceStep;\n","import React, { useRef } from 'react';\nimport SwiperCore, { A11y, Keyboard } from 'swiper';\nimport { Swiper as SwiperInstance, SwiperSlide } from 'swiper/react';\nimport ClientServiceStep from './ClientServiceStep';\nimport Icon from '@stone/ui/icon/Icon';\nSwiperCore.use([Keyboard, A11y]);\nconst ClientServiceTracking = (props) => {\n var _a, _b;\n const swiperRef = useRef(null);\n const prevButton = useRef(null);\n const nextButton = useRef(null);\n const disableClass = 'swiper-button-disabled';\n const renderNavigation = () => (React.createElement(\"div\", { className: \"selector-navigation\" },\n React.createElement(\"button\", { ref: prevButton, className: `selector-prev-${props.componentid} selector-button ${disableClass}`, tabIndex: -1, onClick: () => {\n var _a;\n (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.slidePrev();\n } },\n React.createElement(Icon, { family: \"10\", name: \"left-chevron\" })),\n React.createElement(\"button\", { ref: nextButton, className: `selector-next-${props.componentid} selector-button`, tabIndex: -1, onClick: () => {\n var _a;\n (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.slideNext();\n } },\n React.createElement(Icon, { family: \"10\", name: \"right-chevron\" }))));\n return (React.createElement(React.Fragment, null,\n ((_a = props.steps) === null || _a === void 0 ? void 0 : _a.length) > 1 && renderNavigation(),\n React.createElement(SwiperInstance, { onSwiper: (swiper) => (swiperRef.current = swiper), spaceBetween: 12, slidesPerView: 1.2, onSlideChange: (swiper) => {\n var _a, _b, _c, _d;\n if (swiper.isEnd) {\n (_a = nextButton.current) === null || _a === void 0 ? void 0 : _a.classList.add(disableClass);\n }\n else {\n (_b = nextButton.current) === null || _b === void 0 ? void 0 : _b.classList.remove(disableClass);\n }\n if (swiper.isBeginning) {\n (_c = prevButton.current) === null || _c === void 0 ? void 0 : _c.classList.add(disableClass);\n }\n else {\n (_d = prevButton.current) === null || _d === void 0 ? void 0 : _d.classList.remove(disableClass);\n }\n } }, (_b = props.steps) === null || _b === void 0 ? void 0 : _b.map((step, _k) => {\n return (React.createElement(SwiperSlide, { key: _k },\n React.createElement(ClientServiceStep, Object.assign({}, step, { isSlide: true }))));\n }))));\n};\nexport default ClientServiceTracking;\n","import useMediaQueries from '@stone/hooks/useMediaQueries';\nimport React from 'react';\nimport ClientServiceStepsMobile from './ClientServiceStepsMobile';\nimport ClientServiceStep from './ClientServiceStep';\nconst ClientServiceSteps = (props) => {\n const _steps = typeof props.steps === 'string' ? JSON.parse(props.steps) : props.steps;\n const { isMobile } = useMediaQueries();\n return isMobile ? (React.createElement(ClientServiceStepsMobile, { componentid: props.componentid, steps: _steps })) : (React.createElement(\"div\", { className: \"cs-step_group\" }, _steps.map((step, _i) => (React.createElement(ClientServiceStep, Object.assign({ key: _i }, step))))));\n};\nexport default ClientServiceSteps;\n","import { throttle } from 'lodash';\nimport { useLayoutEffect, useEffect, useRef, useState } from 'react';\nconst REFLOW_CAP = 400;\nconst getInitialBreakpointValue = () => {\n // get initial breakpoint is called before the page is fully loaded and innerWith may be 0. windows.mqObj may not be set\n var _a;\n const mediaQueries = window.mqObj;\n const documentWidth = window.innerWidth || ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.width);\n if (documentWidth == 0 || !mediaQueries) {\n return;\n }\n const filtered = Object.keys(mediaQueries).filter((key) => mediaQueries[key] <= documentWidth);\n const initalBr = filtered.length ? mediaQueries[filtered[filtered.length - 1]] : mediaQueries['xs'];\n // console.info('[getInitialBreakpointValue]: ', documentWidth, initalBr);\n return initalBr;\n};\nconst getReflowValue = () => {\n var _a;\n const documentHeight = window.innerHeight || ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height);\n if (documentHeight == 0) {\n return;\n }\n return documentHeight < REFLOW_CAP ? 399 : REFLOW_CAP;\n};\nconst mediaQueries = Object.assign({ ' {\n const [breakpoint, setBreakpoint] = useState(getInitialBreakpointValue());\n const [breakpointHeight, setBreakpointHeight] = useState(getReflowValue());\n const [isTouch, setIsTouch] = useState(false);\n // const [isMotionReduced, setIsMotionReduced] = useState(false);\n const firstRender = useRef(true);\n function detectTouchscreen() {\n if (window.PointerEvent && 'maxTouchPoints' in navigator) {\n // if Pointer Events are supported, just check maxTouchPoints\n if (navigator.maxTouchPoints > 0) {\n setIsTouch(true);\n }\n }\n else {\n // no Pointer Events...\n if (window.matchMedia && window.matchMedia('(any-pointer:coarse)').matches) {\n // check for any-pointer:coarse which mostly means touchscreen\n setIsTouch(true);\n }\n else if (window.TouchEvent || 'ontouchstart' in window) {\n // last resort - check for exposed touch events API / event handler\n setIsTouch(true);\n }\n }\n }\n const getCurrentBreakpoint = () => {\n var _a;\n const documentWidth = window.innerWidth || ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.width);\n if (documentWidth == 0) {\n return;\n }\n const filtered = Object.keys(mediaQueries).filter((key) => mediaQueries[key] <= documentWidth);\n return mediaQueries[filtered[filtered.length - 1]];\n };\n useEffect(() => {\n if (firstRender.current) {\n // setBreakpoint(window.innerWidth);\n firstRender.current = false;\n detectTouchscreen();\n }\n }, []);\n useLayoutEffect(() => {\n const handleResize = throttle(() => {\n const currentBr = getCurrentBreakpoint();\n if (currentBr && currentBr !== breakpoint) {\n setBreakpoint(currentBr);\n }\n const currentHBr = getReflowValue();\n if (currentHBr && currentHBr !== breakpointHeight) {\n setBreakpointHeight(currentHBr);\n }\n }, 200);\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [breakpoint, breakpointHeight]);\n return {\n //@ts-ignore disable-next-line\n isTightMobile: breakpoint <= window.mqObj.xs,\n //@ts-ignore disable-next-line\n isMobile: breakpoint < window.mqObj.lg,\n //@ts-ignore disable-next-line\n isTablet: breakpoint >= window.mqObj.sm && breakpoint < window.mqObj.lg,\n //@ts-ignore disable-next-line\n isSmallDesktop: breakpoint >= window.mqObj.md,\n //@ts-ignore disable-next-line\n isDesktop: breakpoint >= window.mqObj.lg,\n //@ts-ignore disable-next-line\n isWideDesktop: breakpoint >= window.mqObj.xxl,\n isTouch: isTouch,\n isReflow: breakpointHeight < REFLOW_CAP,\n };\n};\nexport default useMediaQueries;\n","import React from 'react';\nconst Icon = (props) => {\n const icon = `${props.family}-${props.name}${props.inverted ? '-white' : ''}`;\n return React.createElement(\"span\", { \"aria-label\": props.ariaLabel, \"aria-hidden\": true, className: `icon icon--${icon} ${props.autoSize ? 'auto-size' : ''}` });\n};\nIcon.defaultProps = {\n family: '10',\n inverted: false,\n ariaHidden: false,\n};\nexport default Icon;\n"],"names":["props","content","title","className","text","dangerouslySetInnerHTML","__html","link","href","cta","isSlide","name","_a","_b","swiperRef","useRef","prevButton","nextButton","disableClass","steps","length","ref","componentid","tabIndex","onClick","current","slidePrev","Icon","family","slideNext","onSwiper","swiper","spaceBetween","slidesPerView","onSlideChange","_c","_d","isEnd","classList","add","remove","isBeginning","map","step","_k","key","Object","assign","_steps","JSON","parse","isMobile","useMediaQueries","ClientServiceStepsMobile","_i","getReflowValue","documentHeight","window","innerHeight","visualViewport","height","mediaQueries","mqObj","breakpoint","setBreakpoint","useState","documentWidth","innerWidth","width","filtered","keys","filter","getInitialBreakpointValue","breakpointHeight","setBreakpointHeight","isTouch","setIsTouch","firstRender","useEffect","PointerEvent","navigator","maxTouchPoints","matchMedia","matches","TouchEvent","useLayoutEffect","handleResize","throttle","currentBr","getCurrentBreakpoint","currentHBr","addEventListener","removeEventListener","isTightMobile","xs","lg","isTablet","sm","isSmallDesktop","md","isDesktop","isWideDesktop","xxl","isReflow","icon","inverted","ariaLabel","autoSize","defaultProps","ariaHidden"],"sourceRoot":""}