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AR,EAAU,IACHA,EACHC,QAAS,IACFD,EAAQC,QACXU,yBAA0BH,IAI1C,CAGA,OADuB,WAAY,IAAII,QAAQ,IAAMhL,OAAOiL,MAAQA,EAAAA,IAC9ClB,EAAKK,GAAS3N,KAAKyO,EAAa,EAGpDA,EAAgBxO,IAClB,GAAIA,EAASyO,QAAU,KAAOzO,EAASyO,OAAS,IAC5C,OAAOzO,EACJ,CACH,IAAIY,EAAQ,IAAI8N,MAAM1O,EAAS2O,YAE/B,MADA/N,EAAMZ,SAAWA,EACXY,CACV,E","sources":["webpack:///./Scripts/Actions/Cart.action.js","webpack:///./Scripts/Actions/Error.action.js","webpack:///./Scripts/Components/Booking/BookingButton.js","webpack:///./Scripts/Components/Booking/BookingContainer.js","webpack:///./Scripts/Components/Booking/TimePicker.js","webpack:///./Scripts/Components/ConfirmModal.js","webpack:///./Scripts/Components/withReactiveStyleBuyButton.js","webpack:///./Scripts/Services/Booking.service.js","webpack:///./Scripts/Services/http.js"],"sourcesContent":["import { get, put } from '../Services/http';\nimport { catchError } from './Error.action';\nimport {\n CART_LOAD_ERROR,\n CART_RECEIVE,\n CART_SHOW_INFO,\n CART_CLEAR,\n} from '../constants';\nimport { camelCaseAdditionalInfo } from '../Services/Booking.service';\n\nexport const load = () => (dispatch, getState) => {\n return get('/api/cart')\n .then((response) => response.json())\n .then((cart) => {\n cart.orderRows?.forEach((row) => {\n if (!!row.additionalInfo) {\n row.additionalInfo = camelCaseAdditionalInfo(row.additionalInfo);\n }\n });\n dispatch(receive(cart));\n })\n .catch((ex) => dispatch(catchError(ex, (error) => loadError(error))));\n};\n\nexport const loadError = (error) => ({\n type: CART_LOAD_ERROR,\n payload: {\n error,\n },\n});\n\nexport const receive = (cart) => ({\n type: CART_RECEIVE,\n payload: cart,\n});\n\nexport const clearCart = () => ({\n type: CART_CLEAR,\n payload: {},\n});\n\nexport const toggle = () => (dispatch, getState) => {\n dispatch(show(!getState().cart.showInfo));\n};\n\nconst show = (visible) => ({\n type: CART_SHOW_INFO,\n payload: {\n showInfo: visible,\n },\n});\n\nexport const update = (\n rowSystemId,\n articleNumber,\n quantity,\n abortController = null\n) => (dispatch) => {\n return put(\n `/api/cart/update`,\n { articleNumber, quantity, rowSystemId },\n abortController\n )\n .then((response) => response.json())\n .then((cart) => {\n cart.orderRows?.forEach((row) => {\n row.additionalInfo = camelCaseAdditionalInfo(row.additionalInfo);\n });\n dispatch(receive(cart));\n })\n .catch((ex) => {\n dispatch(catchError(ex, (error) => loadError(error)));\n throw ex;\n });\n};\n","export const catchError = (ex, onError) => (dispatch) => {\n if (ex.response) {\n ex.response.json().then((error) => dispatch(onError(error)));\n } else {\n dispatch(onError(ex));\n }\n};\n","import React, { Fragment, useState } from 'react';\nimport withReactiveStyleBuyButton from '../withReactiveStyleBuyButton';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { receive, loadError } from '../../Actions/Cart.action';\nimport { catchError } from '../../Actions/Error.action';\nimport { translate } from '../../Services/translation';\nimport {\n camelCaseAdditionalInfo,\n reserveBooking,\n} from '../../Services/Booking.service';\nimport { ConfirmModal } from '../ConfirmModal';\n\nconst OrderButton = ({\n onClick,\n cssClass,\n articleNumber,\n additionalInfo,\n disabled,\n setReservationFailed,\n skipUpsell,\n}) => (\n \n onClick({\n articleNumber,\n additionalInfo,\n setReservationFailed,\n skipUpsell,\n })\n }\n disabled={disabled}\n >\n {translate('booking.addtocart')}\n \n);\n\nconst StyledButton = (props) => {\n const dispatch = useDispatch();\n const [showModal, setShowModal] = useState(false);\n const stateCart = useSelector((state) => state.cart);\n const onClick = async ({\n articleNumber,\n additionalInfo,\n setReservationFailed,\n skipUpsell,\n }) => {\n try {\n const result = await reserveBooking(\n additionalInfo.location,\n additionalInfo.idBlock,\n additionalInfo.numberOfPeople,\n {\n articleNumber,\n quantity: 1,\n additionalInfo: additionalInfo,\n },\n skipUpsell\n );\n\n if (!result.success) {\n setReservationFailed(true);\n return false;\n }\n\n var cart = result.cart;\n cart.orderRows.forEach((row) => {\n if (row.additionalInfo != null) {\n row.additionalInfo = camelCaseAdditionalInfo(row.additionalInfo);\n }\n });\n\n dispatch(receive(cart));\n\n if (skipUpsell) {\n setShowModal(true);\n } else if (cart.upsellUrl) {\n window.location.href = cart.upsellUrl;\n }\n\n return true;\n } catch (ex) {\n dispatch(catchError(ex, (error) => loadError(error)));\n return false;\n }\n };\n const Button = withReactiveStyleBuyButton(OrderButton, onClick, 'buy-button');\n\n return (\n \n \n \n onCloseModal()}\n shouldCloseOnOverlayClick={true}\n className=\"modal\"\n >\n

\n {translate('booking.reservationfailed')}\n

\n

\n {translate('booking.reservationfailedtext')}\n

\n \n \n \n );\n};\n\nexport default BookingContainer;","import React, { Fragment } from 'react';\nimport { translate } from '../../Services/translation';\nimport { addMinutes } from 'date-fns';\n\nexport const TimePicker = ({\n timeblocks,\n selectedTimeblock,\n selectTimeblock,\n minutes,\n type,\n}) => {\n const isAvailable = (timeblock) => {\n const availableMinutes =\n timeblock.availableMinutes == null ||\n timeblock.availableMinutes >= minutes;\n\n const beforeNow =\n new Date(timeblock.fromDateTime) < addMinutes(new Date(), 30);\n\n return availableMinutes && !beforeNow;\n };\n\n const displayTime = (timeblocks) => {\n const from = new Date(timeblocks.fromDateTime);\n const hour = from.getHours();\n const minute = from.getMinutes();\n return `${hour}:${minute < 10 ? '0' + minute : minute}`;\n };\n\n const backgroundColor = (timeblock) => {\n if (selectedTimeblock && selectedTimeblock.idBlock === timeblock.idBlock)\n return '#EA6F27';\n else if (!timeblock.onPeak) return '#fff';\n else return '#ABD6EF';\n };\n\n return (\n \n

{translate('booking.availabletimes')}

\n
\n
\n {type === 1 && (\n <>\n

\n {translate('booking.offpeaktime')}\n

\n

\n {translate('booking.onpeaktime')}\n

\n \n )}\n

\n {translate('booking.selectedtime')}\n

\n
\n {timeblocks.map((timeblock) => (\n {\n selectedTimeblock == timeblock\n ? selectTimeblock(undefined)\n : selectTimeblock(timeblock);\n }}\n style={{\n backgroundColor: backgroundColor(timeblock),\n }}\n >\n
\n {displayTime(timeblock)}{' '}\n {type == 0\n ? null\n : timeblock.onPeak\n ? translate('booking.onpeak')\n : translate('booking.offpeak')}\n
\n \n ))}\n
\n
\n );\n};\n","import React from 'react';\nimport Modal from 'react-modal';\n\nexport const ConfirmModal = ({\n title,\n body,\n acceptText,\n closeText,\n onAccept,\n onClose,\n }) => (\n \n

{title}

\n

{body}

\n
\n {acceptText && (\n \n )}\n \n
\n \n);","import React, { useState, useRef, useEffect } from 'react';\n\nconst StateStyles = {\n LOADING: '--loading',\n SUCCESS: '--success',\n ERROR: '--error',\n};\n\n/**\n * Represents a HOC which wraps a BuyButton or ReorderButton and applies diffrent styles to it\n * depending on its click state.\n * @param {*} WrappedComponent The button component.\n * @param {*} onClick The async button's onClick event. It should return true if everything is OK, or false if there is any error.\n * @param {*} stylePrefix The style prefix to append state's modifiers. For\n * example, 'button' will result as 'button--loading'.\n *\n * Some available props that the HOC component supports:\n * autoReset : it is true by default. Not its value, but the behaviour is like that. Unless people set it as false, by default, button is always reset to neutral state after the request is completed.\n * resetTimeout: Number milisecond after the complete state, the style of button will be reset. If don't set, it is 2000\n * minimumLoadingTime: Mininum milisecond to display the loading state. If don't set, it is 1000\n */\nexport default function withReactiveStyleBuyButton(\n WrappedComponent,\n onClick,\n stylePrefix\n) {\n return (props) => {\n const [stateClass, setStateClass] = useState('');\n const startTime = useRef(0);\n\n useEffect(() => {\n return () => {\n setStateClass('');\n };\n }, []);\n\n function onNeutralState() {\n setStateClass('');\n startTime.current = 0;\n }\n\n function onLoadingState() {\n setStateClass(`${stylePrefix}${StateStyles.LOADING}`);\n startTime.current = Date.now();\n }\n\n const changeState = (complete) => {\n setStateClass(\n `${stylePrefix}${\n complete ? StateStyles.SUCCESS : StateStyles.ERROR\n }`\n );\n\n // if `autoReset` is true, which is default, the style will be changed\n // to neutral after a `resetTimeout` amount of time (2 seconds by default).\n props.autoReset !== false &&\n setTimeout(() => {\n onNeutralState();\n }, props.resetTimeout || 2000);\n };\n\n function onComplete(complete) {\n const loadingDuration = Date.now() - startTime.current;\n const minimumLoadingTime = props.minimumLoadingTime || 1000;\n // ensure the loading indicator is displayed at least a `minimumLoadingTime`\n // amount of time before changing it to Success or Error.\n if (loadingDuration >= minimumLoadingTime) {\n changeState(complete);\n } else {\n setTimeout(() => {\n changeState(complete);\n }, minimumLoadingTime - loadingDuration);\n }\n }\n\n async function onButtonClick(params) {\n onLoadingState();\n const data = await onClick(params);\n onComplete(data);\n }\n\n return (\n \n onButtonClick(params)}\n {...props}\n />\n \n );\n };\n}\n","import { get, post } from './http';\nimport { format } from 'date-fns';\nimport { camelCase } from '../Reducers/Error.reducer';\nimport { error as formatError } from '../Reducers/Error.reducer';\n\nexport const getAvailableBlocks = async (location, day, type, productId) => {\n var res = await get(\n `/api/booking/available?location=${location}&date=${format(\n day,\n 'yyyy-MM-dd'\n )}&type=${type}&productId=${productId ?? ''}`\n );\n\n if (res.ok) {\n return await res.json();\n }\n\n return [];\n};\n\nexport const getAvailableDates = async (location, type, productId) => {\n const res = await get(\n `/api/booking/availabledates?location=${location}&type=${type}&productId=${productId ?? ''}`\n );\n\n if (res.ok) {\n return await res.json();\n }\n\n return [];\n};\n\nexport const reserveBooking = async (system, idBlock, persons, cart) => {\n var res = null;\n try {\n res = await post(`/api/booking/reserve`, {\n system,\n idBlock,\n persons,\n cart,\n });\n } catch (e) {\n return { success: false, cart: null };\n }\n\n var data = await res.json();\n return {\n success: true,\n cart: data,\n };\n};\n\nexport const moveBooking = async (system, idBooking, idBlock) => {\n var res = null;\n try {\n res = await post(`/api/booking/move`, {\n system,\n idBooking,\n idBlock,\n });\n } catch (e) {\n var error = await e.response.json();\n const errors = formatError({}, { payload: { error } });\n return { success: false, error: errors?.general?.[0] };\n }\n return {\n success: true,\n };\n};\n\nexport const cancelBooking = async (bookingId, system) => {\n try {\n const res = await post(`/api/booking/cancel`, {\n system: system,\n idBooking: bookingId,\n });\n } catch (e) {\n var error = await e.response.json();\n const errors = formatError({}, { payload: { error } });\n return { success: false, error: errors?.general?.[0] };\n }\n\n return { success: true };\n};\n\nexport const camelCaseAdditionalInfo = (additionalInfo) => {\n if (!additionalInfo) return null;\n\n const additionalBookingInfo = {};\n Object.keys(additionalInfo).forEach((key) => {\n additionalBookingInfo[camelCase(key)] = additionalInfo[key];\n });\n return additionalBookingInfo;\n};\n","import { fetch } from 'whatwg-fetch';\n\nexport const get = (url) => _fetch(url, 'GET');\n\nexport const post = (url, data, abortController = null) =>\n _fetch(url, 'POST', data, abortController);\nexport const put = (url, data, abortController = null) =>\n _fetch(url, 'PUT', data, abortController);\nexport const patch = (url, data, abortController = null) =>\n _fetch(url, 'PATCH', data, abortController);\nexport const remove = (url, data, abortController = null) =>\n _fetch(url, 'DELETE', data, abortController);\n\nconst _fetch = (url, method, data = null, abortController = null) => {\n let options = {\n method,\n headers: {\n 'litium-request-context': JSON.stringify(\n window.__litium.requestContext\n ),\n },\n credentials: 'include',\n };\n if (abortController) {\n options.signal = abortController.signal;\n }\n if (method !== 'GET') {\n options = {\n ...options,\n body: data ? JSON.stringify(data) : null,\n headers: {\n ...options.headers,\n 'content-type': 'application/json',\n },\n };\n\n const token = window.localStorage.getItem('requestVerificationToken');\n if (token) {\n options = {\n ...options,\n headers: {\n ...options.headers,\n RequestVerificationToken: token,\n },\n };\n }\n }\n // use native browser implementation if it supports aborting\n const abortableFetch = 'signal' in new Request('') ? window.fetch : fetch;\n return abortableFetch(url, options).then(_checkStatus);\n};\n\nconst _checkStatus = (response) => {\n if (response.status >= 200 && response.status < 300) {\n return response;\n } else {\n let error = new Error(response.statusText);\n error.response = response;\n throw error;\n }\n};\n"],"names":["load","dispatch","getState","get","then","response","json","cart","orderRows","forEach","row","additionalInfo","camelCaseAdditionalInfo","receive","catch","ex","catchError","error","loadError","type","CART_LOAD_ERROR","payload","CART_RECEIVE","clearCart","CART_CLEAR","update","rowSystemId","articleNumber","quantity","abortController","put","onError","OrderButton","onClick","cssClass","disabled","setReservationFailed","skipUpsell","React","className","translate","props","useDispatch","showModal","setShowModal","useState","stateCart","useSelector","state","Button","withReactiveStyleBuyButton","async","result","reserveBooking","location","idBlock","numberOfPeople","success","upsellUrl","window","href","Fragment","ConfirmModal","title","body","acceptText","closeText","onAccept","checkoutUrl","onClose","BookingContainer","bookingInfo","selectedDay","setSelectedDay","selectedTimeblock","setSelectedTimeblock","timeblocks","setTimeblocks","availableDates","setAvailableDates","reservationFailed","timeNow","Date","useEffect","getAvailableBlocks","Location","Type","blocks","getAvailableDates","productId","dates","length","y","m","d","split","hiddenDays","useMemo","days","eachDayOfInterval","start","end","addMonths","filter","day","includes","format","before","styles","head","caption","nav","caption_label","month","months","root","table","tbody","caption_end","cell","head_cell","onCloseModal","undefined","LocationTranslated","ProductName","OffPeakPrice","onPeak","Price","CampaignPrice","NumberOfClients","Minutes","DayPicker","mode","selected","onSelect","locale","sv","toMonth","fromMonth","classNames","TimePicker","selectTimeblock","minutes","BookingButton","ArticleNumber","quantityFieldId","minutesFlyTime","fromDateTime","locationTranslated","description","ProductDescription","productType","ProductTypes","Booking","isOffPeak","resetTimeout","history","back","Modal","ariaHideApp","preventScroll","isOpen","onRequestClose","shouldCloseOnOverlayClick","isAvailable","timeblock","availableMinutes","beforeNow","addMinutes","backgroundColor","map","key","style","from","hour","getHours","minute","getMinutes","displayTime","StateStyles","LOADING","SUCCESS","ERROR","WrappedComponent","stylePrefix","stateClass","setStateClass","startTime","useRef","changeState","complete","autoReset","setTimeout","current","onButtonClick","params","now","loadingDuration","minimumLoadingTime","onComplete","_extends","res","ok","system","persons","post","e","moveBooking","idBooking","errors","formatError","general","cancelBooking","bookingId","additionalBookingInfo","Object","keys","camelCase","url","_fetch","data","remove","method","options","headers","JSON","stringify","__litium","requestContext","credentials","signal","token","localStorage","getItem","RequestVerificationToken","Request","fetch","_checkStatus","status","Error","statusText"],"sourceRoot":""}