{"version":3,"sources":["webpack:///./src/components/forms/sale-form.js","webpack:///./node_modules/react-countdown/dist/index.es.js","webpack:///./src/components/seo.js"],"names":["rePhoneNumber","Yup","this","test","value","_handleSubmit","SaleForm","withFormik","mapPropsToValues","props","phone","referrer","ga","success","form_name","discount","validationSchema","shape","min","React","createElement","PhoneErrorMessage","handleSubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_ref2","_ref3","setSubmitting","resetForm","setFieldValue","UTMS","isEn","testovani","data","wrap","_context","prev","next","getUTM","getReferrer","document","location","pathname","includes","localStorage","getItem","formName","utm_source","UTM_SOURCE","utm_medium","UTM_MEDIUM","utm_campaign","UTM_CAMPAIGN","utm_term","UTM_TERM","utm_content","UTM_CONTENT","roistat","getCookie","fetch","process","method","headers","body","JSON","stringify","setTimeout","setItem","window","href","t0","stop","_x","_x2","apply","arguments","_ref","isSubmitting","errors","values","touched","_ref$btnText","btnType","btnText","t","useTranslation","Form","name","className","cx","saleFormStyles","saleForm","styles","inputField","label","inputFieldLabel","inputWrap","inputIcon","width","height","viewBox","fill","xmlns","d","FastField","component","type","input","error","Button2","color","buttonType","disabled","contactFormButton","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps","prototype","_inherits","subClass","superClass","create","constructor","_setPrototypeOf","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","p","_possibleConstructorReturn","self","call","ReferenceError","_assertThisInitialized","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Date","toString","e","_isNativeReflectConstruct","result","Super","NewTarget","_toConsumableArray","arr","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","iter","Symbol","iterator","from","_iterableToArray","minLen","n","slice","_unsupportedIterableToArray","_nonIterableSpread","len","arr2","zeroPad","undefined","strValue","String","match","prefix","suffix","strNo","paddedNo","map","join","concat","timeDeltaFormatOptionsDefaults","daysInHours","zeroPadTime","formatTimeDelta","timeDelta","options","days","hours","minutes","seconds","_Object$assign","assign","_Object$assign$zeroPa","zeroPadDays","zeroPadTimeLength","Math","formattedHours","Countdown","_React$Component","_super","_this","state","count","startCountdown","interval","setInterval","stopCountdown","onComplete","setState","prevState","clearInterval","addTime","children","Countdown$1","mounted","initialTimestamp","calcOffsetStartTimestamp","offsetStartTimestamp","autoStart","offsetTime","legacyMode","legacyCountdownRef","tick","calcTimeDelta","callback","completed","overtime","onTick","setTimeDeltaState","start","isStarted","prevOffsetStartTimestamp","onStart","controlled","clearTimer","intervalDelay","pause","isPaused","onPause","isStopped","onStop","isStatus","isCompleted","date","status","onMount","prevProps","_this$props","now","precision","startTimestamp","_options$now","_options$precision","_options$offsetTime","getTime","timeLeft","clampedPrecision","max","total","round","parseFloat","toFixed","abs","floor","milliseconds","Number","current","_this2","completing","completedOnStart","newStatus","api","_this$props2","getApi","formatted","_this$props3","_children","ref","_this$props4","renderer","renderProps","getRenderProps","countdown","_renderProps$formatte","defaultProps","SEO","description","meta","title","site","useStaticQuery","_useLangContext","useLangContext","lang","originalPath","host","siteMetadata","siteUrl","metaDescription","Helmet","htmlAttributes","titleTemplate","content","property","author","link","rel","hrefLang","supportedLanguages","supportedLang"],"mappings":"wVAcMA,EAAgB,kFAEtBC,IAAcA,IAAY,SAAS,WACjC,OAAOC,KAAKC,KAAK,QAAS,0CAA0C,SAAAC,GAAK,OACvEJ,EAAcG,KAAKC,SAKhB,IAqLOC,EAfDC,EAAWC,YAAW,CACjCC,iBAAkB,SAACC,GAAK,MAAM,CAC5BC,MAAO,MACPC,SAAU,GACVC,GAAI,GACJC,SAAS,EACTC,UAAWL,EAAMK,UACjBC,SAAUN,EAAMM,WAElBC,iBAAkB,kBAChBf,MAAagB,MAAM,CACjBP,MAAOT,MACJiB,IAAI,EAAGC,IAAAC,cAACC,IAAiB,OACzBX,WAEPY,cAAYjB,EAAAkB,YAAAC,IAAAC,MAAE,SAAAC,EAAAC,EAAAC,GAAA,IAAAlB,EAA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,OAAO4G,GACTkB,KAAI,CACF,CACEC,IAAK,YACL3P,KAASgP,EAAI,IAAIF,EAAOC,GAE1B,CACEY,IAAK,YACLC,SAAU,YACV5P,KAAK,GAAIgP,EAAOD,IACjBnH,OAAA7B,YACE2I,EAAKO,aAAaY,mBAAmBnI,KAAI,SAAAoI,GAAa,MAAK,CAC5DH,IAAK,YACLC,SAAUE,EACV9P,KAASgP,EAAI,IAAIc,EAAgBf,UAO3CT,EAAID,aAAe,CACjBS,KAAK,KACLN,KAAM,GACND,YAAY,IAUCD","file":"077bef416b6e200b9fbe3d8269343bf94685097e-051fe7b690ff2550aefe.js","sourcesContent":["import cx from 'classnames';\nimport { FastField, Form, withFormik } from 'formik';\nimport React from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\nimport MaskedInput from 'react-text-mask';\nimport * as Yup from 'yup';\n\nimport { getCookie, getReferrer, getUTM } from '../../helpers';\nimport { useLangContext } from '../../utils/lang';\nimport { Button2 } from '../button2';\nimport styles from './form2.module.css';\nimport { PhoneErrorMessage } from './forms-error-messages';\nimport saleFormStyles from './sale-form.module.css';\n\nconst rePhoneNumber = /^(\\+?\\d{0,4})?\\s?-?\\s?(\\(?\\d{3}\\)?)\\s?-?\\s?(\\(?\\d{3}\\)?)\\s?-?\\s?(\\(?\\d{4}\\)?)?$/\n\nYup.addMethod(Yup.string, \"phone\", function() {\n return this.test(\"phone\", \"Telefonní číslo musí obsahovat 9 znaků\", value =>\n rePhoneNumber.test(value)\n )\n});\n\n\nexport const SaleFormLayout = ({\n isSubmitting,\n values,\n errors,\n touched,\n btnType = \"secondary\",\n btnText = \"Odeslat\",\n form_name,\n}) => {\n const { t } = useTranslation()\n return (\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n {touched.phone && errors.phone && (\n \n {errors.phone}\n \n )}\n
\n \n {btnText || t(\"forms.contactForm2.CTA\")}\n \n \n )\n}\n\nexport const SaleForm = withFormik({\n mapPropsToValues: (props) => ({\n phone: \"+48\",\n referrer: \"\",\n ga: \"\",\n success: false,\n form_name: props.form_name,\n discount: props.discount,\n }),\n validationSchema: () =>\n Yup.object().shape({\n phone: Yup.string()\n .min(8, )\n .phone(),\n }),\n handleSubmit: async (\n { phone, form_name, discount },\n { setSubmitting, resetForm, setFieldValue }\n ) => {\n try {\n const UTMS = getUTM()\n let referrer = getReferrer()\n\n const isEn = document.location.pathname.includes(\"/en\")\n const testovani = localStorage.getItem(\"website-version\")\n\n // console.log(\"discount: \", discount);\n // console.log(\"form_name: \", form_name);\n\n const getFormName = () => {\n let formName\n if (form_name) {\n formName = isEn ? `${form_name}_en${discount}` : `${form_name}${discount}`\n } else {\n formName = isEn ? `hromadna-objednavka_en${discount}` : `hromadna-objednavka${discount}`\n }\n return formName\n }\n\n const data = {\n formName: getFormName(),\n discount: discount,\n phone: phone,\n utm_source: UTMS.UTM_SOURCE,\n utm_medium: UTMS.UTM_MEDIUM,\n utm_campaign: UTMS.UTM_CAMPAIGN,\n utm_term: UTMS.UTM_TERM,\n utm_content: UTMS.UTM_CONTENT,\n referrer: referrer,\n roistat: getCookie(\"roistat_visit\"),\n ga: getCookie(\"_ga\"),\n testovani: testovani,\n }\n await fetch(`${process.env.GATSBY_APP_API_URL}/poland/application`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(data),\n })\n await setSubmitting(false)\n await setFieldValue(\"success\", true)\n // await console.log(\"data: \", data);\n setTimeout(() => {\n resetForm()\n localStorage.setItem(\"salesModalAvailable\", 0);\n window.location.href = isEn ? \"/en/thank-you\" : \"/thank-you\"\n // window.dataLayer.push({\n // event: \"ga.pageview\",\n // pageURL: isEn\n // ? \"/en/thank-you-contact-new\"\n // : \"/thank-you-contact-new\",\n // pageType: \"Purchase\",\n // testovani: testovani,\n // })\n // window.dataLayer.push({\n // event: \"ga.event\",\n // eCategory: \"sleva\",\n // eAction: \"\",\n // eLabel: \"Homepage\",\n // })\n }, 300)\n } catch (err) {\n setSubmitting(false)\n setFieldValue(\"success\", false)\n }\n },\n})(SaleFormLayout)\n","import { cloneElement, Component, createRef, createElement } from 'react';\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n}\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableSpread() {\n 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 zeroPad(value) {\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n var strValue = String(value);\n if (length === 0) return strValue;\n var match = strValue.match(/(.*?)([0-9]+)(.*)/);\n var prefix = match ? match[1] : '';\n var suffix = match ? match[3] : '';\n var strNo = match ? match[2] : strValue;\n var paddedNo = strNo.length >= length ? strNo : (_toConsumableArray(Array(length)).map(function () {\n return '0';\n }).join('') + strNo).slice(length * -1);\n return \"\".concat(prefix).concat(paddedNo).concat(suffix);\n}\nvar timeDeltaFormatOptionsDefaults = {\n daysInHours: false,\n zeroPadTime: 2\n};\nfunction calcTimeDelta(date) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$now = options.now,\n now = _options$now === void 0 ? Date.now : _options$now,\n _options$precision = options.precision,\n precision = _options$precision === void 0 ? 0 : _options$precision,\n controlled = options.controlled,\n _options$offsetTime = options.offsetTime,\n offsetTime = _options$offsetTime === void 0 ? 0 : _options$offsetTime,\n overtime = options.overtime;\n var startTimestamp;\n if (typeof date === 'string') {\n startTimestamp = new Date(date).getTime();\n } else if (date instanceof Date) {\n startTimestamp = date.getTime();\n } else {\n startTimestamp = date;\n }\n if (!controlled) {\n startTimestamp += offsetTime;\n }\n var timeLeft = controlled ? startTimestamp : startTimestamp - now();\n var clampedPrecision = Math.min(20, Math.max(0, precision));\n var total = Math.round(parseFloat(((overtime ? timeLeft : Math.max(0, timeLeft)) / 1000).toFixed(clampedPrecision)) * 1000);\n var seconds = Math.abs(total) / 1000;\n return {\n total: total,\n days: Math.floor(seconds / (3600 * 24)),\n hours: Math.floor(seconds / 3600 % 24),\n minutes: Math.floor(seconds / 60 % 60),\n seconds: Math.floor(seconds % 60),\n milliseconds: Number((seconds % 1 * 1000).toFixed()),\n completed: total <= 0\n };\n}\nfunction formatTimeDelta(timeDelta, options) {\n var days = timeDelta.days,\n hours = timeDelta.hours,\n minutes = timeDelta.minutes,\n seconds = timeDelta.seconds;\n var _Object$assign = Object.assign(Object.assign({}, timeDeltaFormatOptionsDefaults), options),\n daysInHours = _Object$assign.daysInHours,\n zeroPadTime = _Object$assign.zeroPadTime,\n _Object$assign$zeroPa = _Object$assign.zeroPadDays,\n zeroPadDays = _Object$assign$zeroPa === void 0 ? zeroPadTime : _Object$assign$zeroPa;\n var zeroPadTimeLength = Math.min(2, zeroPadTime);\n var formattedHours = daysInHours ? zeroPad(hours + days * 24, zeroPadTime) : zeroPad(hours, zeroPadTimeLength);\n return {\n days: daysInHours ? '' : zeroPad(days, zeroPadDays),\n hours: formattedHours,\n minutes: zeroPad(minutes, zeroPadTimeLength),\n seconds: zeroPad(seconds, zeroPadTimeLength)\n };\n}\nvar Countdown = function (_React$Component) {\n _inherits(Countdown, _React$Component);\n var _super = _createSuper(Countdown);\n function Countdown() {\n var _this;\n _classCallCheck(this, Countdown);\n _this = _super.apply(this, arguments);\n _this.state = {\n count: _this.props.count || 3\n };\n _this.startCountdown = function () {\n _this.interval = window.setInterval(function () {\n var count = _this.state.count - 1;\n if (count === 0) {\n _this.stopCountdown();\n _this.props.onComplete && _this.props.onComplete();\n } else {\n _this.setState(function (prevState) {\n return {\n count: prevState.count - 1\n };\n });\n }\n }, 1000);\n };\n _this.stopCountdown = function () {\n clearInterval(_this.interval);\n };\n _this.addTime = function (seconds) {\n _this.stopCountdown();\n _this.setState(function (prevState) {\n return {\n count: prevState.count + seconds\n };\n }, _this.startCountdown);\n };\n return _this;\n }\n _createClass(Countdown, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.startCountdown();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n clearInterval(this.interval);\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.props.children ? cloneElement(this.props.children, {\n count: this.state.count\n }) : null;\n }\n }]);\n return Countdown;\n}(Component);\nvar Countdown$1 = function (_React$Component) {\n _inherits(Countdown$1, _React$Component);\n var _super = _createSuper(Countdown$1);\n function Countdown$1(props) {\n var _this;\n _classCallCheck(this, Countdown$1);\n _this = _super.call(this, props);\n _this.mounted = false;\n _this.initialTimestamp = _this.calcOffsetStartTimestamp();\n _this.offsetStartTimestamp = _this.props.autoStart ? 0 : _this.initialTimestamp;\n _this.offsetTime = 0;\n _this.legacyMode = false;\n _this.legacyCountdownRef = createRef();\n _this.tick = function () {\n var timeDelta = _this.calcTimeDelta();\n var callback = timeDelta.completed && !_this.props.overtime ? undefined : _this.props.onTick;\n _this.setTimeDeltaState(timeDelta, undefined, callback);\n };\n _this.start = function () {\n if (_this.isStarted()) return;\n var prevOffsetStartTimestamp = _this.offsetStartTimestamp;\n _this.offsetStartTimestamp = 0;\n _this.offsetTime += prevOffsetStartTimestamp ? _this.calcOffsetStartTimestamp() - prevOffsetStartTimestamp : 0;\n var timeDelta = _this.calcTimeDelta();\n _this.setTimeDeltaState(timeDelta, \"STARTED\", _this.props.onStart);\n if (!_this.props.controlled && (!timeDelta.completed || _this.props.overtime)) {\n _this.clearTimer();\n _this.interval = window.setInterval(_this.tick, _this.props.intervalDelay);\n }\n };\n _this.pause = function () {\n if (_this.isPaused()) return;\n _this.clearTimer();\n _this.offsetStartTimestamp = _this.calcOffsetStartTimestamp();\n _this.setTimeDeltaState(_this.state.timeDelta, \"PAUSED\", _this.props.onPause);\n };\n _this.stop = function () {\n if (_this.isStopped()) return;\n _this.clearTimer();\n _this.offsetStartTimestamp = _this.calcOffsetStartTimestamp();\n _this.offsetTime = _this.offsetStartTimestamp - _this.initialTimestamp;\n _this.setTimeDeltaState(_this.calcTimeDelta(), \"STOPPED\", _this.props.onStop);\n };\n _this.isStarted = function () {\n return _this.isStatus(\"STARTED\");\n };\n _this.isPaused = function () {\n return _this.isStatus(\"PAUSED\");\n };\n _this.isStopped = function () {\n return _this.isStatus(\"STOPPED\");\n };\n _this.isCompleted = function () {\n return _this.isStatus(\"COMPLETED\");\n };\n if (props.date) {\n var timeDelta = _this.calcTimeDelta();\n _this.state = {\n timeDelta: timeDelta,\n status: timeDelta.completed ? \"COMPLETED\" : \"STOPPED\"\n };\n } else {\n _this.legacyMode = true;\n }\n return _this;\n }\n _createClass(Countdown$1, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.legacyMode) {\n return;\n }\n this.mounted = true;\n if (this.props.onMount) this.props.onMount(this.calcTimeDelta());\n if (this.props.autoStart) this.start();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.legacyMode) {\n return;\n }\n if (this.props.date !== prevProps.date) {\n this.initialTimestamp = this.calcOffsetStartTimestamp();\n this.offsetStartTimestamp = this.initialTimestamp;\n this.offsetTime = 0;\n this.setTimeDeltaState(this.calcTimeDelta());\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.legacyMode) {\n return;\n }\n this.mounted = false;\n this.clearTimer();\n }\n }, {\n key: \"calcTimeDelta\",\n value: function calcTimeDelta$1() {\n var _this$props = this.props,\n date = _this$props.date,\n now = _this$props.now,\n precision = _this$props.precision,\n controlled = _this$props.controlled,\n overtime = _this$props.overtime;\n return calcTimeDelta(date, {\n now: now,\n precision: precision,\n controlled: controlled,\n offsetTime: this.offsetTime,\n overtime: overtime\n });\n }\n }, {\n key: \"calcOffsetStartTimestamp\",\n value: function calcOffsetStartTimestamp() {\n return Date.now();\n }\n }, {\n key: \"addTime\",\n value: function addTime(seconds) {\n this.legacyCountdownRef.current.addTime(seconds);\n }\n }, {\n key: \"clearTimer\",\n value: function clearTimer() {\n window.clearInterval(this.interval);\n }\n }, {\n key: \"isStatus\",\n value: function isStatus(status) {\n return this.state.status === status;\n }\n }, {\n key: \"setTimeDeltaState\",\n value: function setTimeDeltaState(timeDelta, status, callback) {\n var _this2 = this;\n if (!this.mounted) return;\n var completing = timeDelta.completed && !this.state.timeDelta.completed;\n var completedOnStart = timeDelta.completed && status === \"STARTED\";\n if (completing && !this.props.overtime) {\n this.clearTimer();\n }\n var onDone = function onDone() {\n if (callback) callback(_this2.state.timeDelta);\n if (_this2.props.onComplete && (completing || completedOnStart)) {\n _this2.props.onComplete(timeDelta, completedOnStart);\n }\n };\n return this.setState(function (prevState) {\n var newStatus = status || prevState.status;\n if (timeDelta.completed && !_this2.props.overtime) {\n newStatus = \"COMPLETED\";\n } else if (!status && newStatus === \"COMPLETED\") {\n newStatus = \"STOPPED\";\n }\n return {\n timeDelta: timeDelta,\n status: newStatus\n };\n }, onDone);\n }\n }, {\n key: \"getApi\",\n value: function getApi() {\n return this.api = this.api || {\n start: this.start,\n pause: this.pause,\n stop: this.stop,\n isStarted: this.isStarted,\n isPaused: this.isPaused,\n isStopped: this.isStopped,\n isCompleted: this.isCompleted\n };\n }\n }, {\n key: \"getRenderProps\",\n value: function getRenderProps() {\n var _this$props2 = this.props,\n daysInHours = _this$props2.daysInHours,\n zeroPadTime = _this$props2.zeroPadTime,\n zeroPadDays = _this$props2.zeroPadDays;\n var timeDelta = this.state.timeDelta;\n return Object.assign(Object.assign({}, timeDelta), {\n api: this.getApi(),\n props: this.props,\n formatted: formatTimeDelta(timeDelta, {\n daysInHours: daysInHours,\n zeroPadTime: zeroPadTime,\n zeroPadDays: zeroPadDays\n })\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.legacyMode) {\n var _this$props3 = this.props,\n count = _this$props3.count,\n _children = _this$props3.children,\n onComplete = _this$props3.onComplete;\n return createElement(Countdown, {\n ref: this.legacyCountdownRef,\n count: count,\n onComplete: onComplete\n }, _children);\n }\n var _this$props4 = this.props,\n className = _this$props4.className,\n overtime = _this$props4.overtime,\n children = _this$props4.children,\n renderer = _this$props4.renderer;\n var renderProps = this.getRenderProps();\n if (renderer) {\n return renderer(renderProps);\n }\n if (children && this.state.timeDelta.completed && !overtime) {\n return cloneElement(children, {\n countdown: renderProps\n });\n }\n var _renderProps$formatte = renderProps.formatted,\n days = _renderProps$formatte.days,\n hours = _renderProps$formatte.hours,\n minutes = _renderProps$formatte.minutes,\n seconds = _renderProps$formatte.seconds;\n return createElement(\"span\", {\n className: className\n }, renderProps.total < 0 ? '-' : '', days, days ? ':' : '', hours, \":\", minutes, \":\", seconds);\n }\n }]);\n return Countdown$1;\n}(Component);\nCountdown$1.defaultProps = Object.assign(Object.assign({}, timeDeltaFormatOptionsDefaults), {\n controlled: false,\n intervalDelay: 1000,\n precision: 0,\n autoStart: true\n});\nexport default Countdown$1;\nexport { calcTimeDelta, formatTimeDelta, zeroPad };","import { graphql, useStaticQuery } from 'gatsby';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport Helmet from 'react-helmet';\nimport { useTranslation } from 'react-i18next';\n\nimport { useLangContext } from '../utils/lang';\n\n/**\n * SEO component that queries for data with\n * Gatsby's useStaticQuery React hook\n *\n * See: https://www.gatsbyjs.org/docs/use-static-query/\n */\nfunction SEO({ description, meta, title }) {\n const { site } = useStaticQuery(\n graphql`\n query {\n site {\n siteMetadata {\n title\n description\n author\n supportedLanguages\n siteUrl\n }\n }\n }\n `\n )\n\n const { lang, originalPath } = useLangContext()\n const host = site.siteMetadata.siteUrl\n const metaDescription = description || site.siteMetadata.description\n\n return (\n ({\n rel: \"alternate\",\n hrefLang: supportedLang,\n href: `${host}/${supportedLang}${originalPath}`,\n })),\n ]}\n />\n )\n}\n\nSEO.defaultProps = {\n lang: `cz`,\n meta: [],\n description: ``,\n}\n\nSEO.propTypes = {\n description: PropTypes.string,\n lang: PropTypes.string,\n meta: PropTypes.arrayOf(PropTypes.object),\n title: PropTypes.string.isRequired,\n}\n\nexport default SEO\n"],"sourceRoot":""}