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AAG,CAACG,YAAY,CAACC,GAAG,CAAC,WAAW,EAAEnB,KAAK,CAAC;UAC5C,CAAC,MAAK,IAAGe,GAAG,CAACG,YAAY,CAACyC,GAAG,CAAC,WAAW,CAAC,EAAC;YACvC5C,GAAG,CAACG,YAAY,CAACE,MAAM,CAAC,WAAW,CAAC;UACxC;QACJ;QAEAnE,MAAM,CAACC,QAAQ,CAAC+D,IAAI,GAAGF,GAAG;MAC9B,CAAC,CAAC;IACN;EACJ,CAAC;EAEDrE,QAAQ,CAACgE,gBAAgB,CAAC,kBAAkB,EAAE,MAAM;IAChD,IAAIhD,cAAc,IAAIA,cAAc,CAACkG,cAAc,EAAE;MACjD;IACJ;IAEAtF,aAAa,CAAC,CAAC;IACf4B,QAAQ,CAAC,CAAC;IACVmB,UAAU,CAAC,CAAC;IACZS,iBAAiB,CAAC,CAAC;IACnBN,gBAAgB,CAAC,CAAC;IAClBa,eAAe,CAAC,CAAC;IACjBmB,QAAQ,CAAC,CAAC;EACd,CAAC,CAAC;AACN,CAAC,EAAE,CAAC,C","sources":["webpack://wp-hotel-booking/./assets/js/frontend/filter-by.js"],"sourcesContent":["(function () {\n const priceFields = document.querySelectorAll('.hb-price-field');\n const ratingFields = document.querySelectorAll('.hb-rating-field');\n const roomTypeFields = document.querySelectorAll('.hb-type-field');\n\n\n const getParam = (param) => {\n const queryString = window.location.search;\n const urlParams = new URLSearchParams(queryString);\n\n return urlParams.get(param);\n }\n\n const renderPrice = (price) => {\n const currencySymbol = hotel_settings.currency_symbol || '';\n const currencyPosition = hotel_settings.currency_position || 'left';\n\n price = renderPriceNumber(price);\n\n switch (currencyPosition) {\n case 'left':\n price = currencySymbol + price;\n break;\n case 'right':\n price = price + currencySymbol;\n break;\n case 'left_with_space':\n price = currencySymbol + ' ' + price;\n break;\n case 'right_with_space':\n price = price + ' ' + currencySymbol;\n break;\n default:\n break;\n }\n\n return price;\n };\n\n const renderPriceNumber = (price) => {\n const numberDecimals = hotel_settings.number_decimal || 0;\n const thousandsSeparator = hotel_settings.thousands_separator || '';\n\n price = (price / 1).toFixed(numberDecimals);\n price = price.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparator);\n\n return price;\n };\n\n const hbPriceSlider = () => {\n if (!priceFields) {\n return;\n }\n\n for (let i = 0; i < priceFields.length; i++) {\n const priceField = priceFields[i];\n const minPrice = priceField.getAttribute('data-min');\n const maxPrice = priceField.getAttribute('data-max');\n let step = priceField.getAttribute('data-step');\n\n if (minPrice === '' || maxPrice === '' || step === '') {\n continue;\n }\n\n const minPriceNode = priceField.querySelector('.hb-min-price');\n const maxPriceNode = priceField.querySelector('.hb-max-price');\n\n\n const priceSliderNode = priceField.querySelector('.hb-price-range');\n\n\n const start = getParam('min_price') || minPrice;\n const end = getParam('max_price') || maxPrice;\n\n step = parseInt(step);\n\n noUiSlider.create(priceSliderNode, {\n start: [parseInt(start), parseInt(end)],\n connect: true,\n step,\n tooltips: false,\n range: {\n min: parseInt(minPrice), max: parseInt(maxPrice),\n },\n // direction: 'lt',\n });\n\n priceSliderNode.noUiSlider.on('update', function (values, handle, unencoded) {\n minPriceNode.value = parseInt(values[0]);\n maxPriceNode.value = parseInt(values[1]);\n priceField.querySelector('.min').innerHTML = renderPrice(values[0]);\n priceField.querySelector('.max').innerHTML = renderPrice(values[1]);\n });\n }\n }\n\n const hbRating = () => {\n if (!ratingFields) {\n return;\n }\n\n for (let i = 0; i < ratingFields.length; i++) {\n const ratingField = ratingFields[i];\n\n const allInputs = ratingField.querySelectorAll('input[type=\"checkbox\"]');\n\n let rating = [];\n if (getParam('rating')) {\n rating = getParam('rating').split(',');\n }\n\n [...rating].map(value => {\n ratingField.querySelector(`input[name =\"rating\"][value =\"${value}\"]`).checked = true;\n });\n\n for (let i = 0; i < allInputs.length; i++) {\n const input = allInputs[i];\n\n input.addEventListener('change', function (event) {\n const allCheckedInput = ratingField.querySelectorAll('input[type=\"checkbox\"]:checked');\n\n let value = [];\n [...allCheckedInput].map(checkedInput => {\n value.push(checkedInput.value);\n });\n\n const url = new URL(window.location.href);\n\n if (value.length) {\n url.searchParams.set('rating', value);\n } else {\n url.searchParams.delete('rating');\n }\n\n url.searchParams.set('paged', 1);\n // window.location.href = url;\n });\n }\n }\n }\n\n const hbRoomType = () => {\n if (!roomTypeFields) {\n return;\n }\n\n for (let i = 0; i < roomTypeFields.length; i++) {\n const roomTypeField = roomTypeFields[i];\n\n const allInputs = roomTypeField.querySelectorAll('input[type=\"checkbox\"]');\n\n let roomTypesValue = [];\n if (getParam('room_type')) {\n roomTypesValue = getParam('room_type').split(',');\n }\n\n [...roomTypesValue].map(value => {\n roomTypeField.querySelector(`input[name =\"room_type\"][value =\"${value}\"]`).checked = true;\n });\n\n for (let i = 0; i < allInputs.length; i++) {\n const input = allInputs[i];\n\n input.addEventListener('change', function (event) {\n const allCheckedInput = roomTypeField.querySelectorAll('input[type=\"checkbox\"]:checked');\n\n let value = [];\n [...allCheckedInput].map(checkedInput => {\n value.push(checkedInput.value);\n });\n\n const url = new URL(window.location.href);\n\n if (value.length) {\n url.searchParams.set('room_type', value);\n } else {\n url.searchParams.delete('room_type', value);\n }\n\n url.searchParams.set('paged', 1);\n\n // window.location.href = url;\n });\n }\n }\n }\n\n const clearFieldFilter = () => {\n const filterForms = document.querySelectorAll('.search-filter-form');\n\n if (!filterForms) {\n return;\n }\n\n for (let i = 0; i < filterForms.length; i++) {\n const filterForm = filterForms[i];\n const clearFilterBtn = filterForm.querySelector('.clear-filter button');\n\n if (!clearFilterBtn) {\n return;\n }\n\n clearFilterBtn.addEventListener('click', function () {\n const url = new URL(window.location.href);\n const filterArgs = ['min_price', 'max_price', 'rating', 'room_type'];\n\n [...filterArgs].map(filterArg => {\n if (url.searchParams.get(filterArg)) {\n url.searchParams.delete(filterArg);\n }\n });\n\n url.searchParams.set('paged', 1);\n window.location.href = url;\n });\n }\n }\n\n const hbFilterSelection = () => {\n const selectionWrapper = document.querySelector('.hb-selection-field');\n if (!selectionWrapper) {\n return;\n }\n\n\n if (priceFields.length) {\n for (let i = 0; i < priceFields.length; i++) {\n const priceField = priceFields[i];\n\n const priceSliderNode = priceField.querySelector('.hb-price-range');\n\n priceSliderNode.noUiSlider.on('update', function (values, handle, unencoded) {\n const minPrice = parseInt(values[0]);\n const maxPrice = parseInt(values[1]);\n\n changeSelectedField('price', minPrice + '-' + maxPrice, renderPrice(minPrice) + '-' + renderPrice(maxPrice));\n });\n }\n }\n\n if (ratingFields.length) {\n [...ratingFields].map(ratingField => {\n const allInputs = ratingField.querySelectorAll('input[type=\"checkbox\"]');\n [...allInputs].map(ratingNode => {\n if (ratingNode.checked) {\n const value = ratingNode.value;\n const label = ratingNode.closest('label').querySelector('span').innerHTML.replace('-', ' ');\n changeSelectedField('rating', value, label);\n }\n\n ratingNode.addEventListener('change', function () {\n const value = this.value;\n const label = ratingNode.closest('label').querySelector('span').innerHTML.replace('-', ' ');\n changeSelectedField('rating', value, label);\n });\n })\n });\n }\n\n if (roomTypeFields.length) {\n for (let i = 0; i < roomTypeFields.length; i++) {\n const roomTypeField = roomTypeFields[i];\n\n const allInputs = roomTypeField.querySelectorAll('input[type=\"checkbox\"]');\n\n [...allInputs].map(roomTypeNode => {\n if (roomTypeNode.checked) {\n const value = roomTypeNode.value;\n const label = roomTypeNode.closest('label').querySelector('span').innerHTML.replace('-', ' ');\n changeSelectedField('room-type', value, label);\n }\n\n roomTypeNode.addEventListener('change', function () {\n const value = this.value;\n const label = roomTypeNode.closest('label').querySelector('span').innerHTML.replace('-', ' ');\n changeSelectedField('room-type', value, label);\n });\n })\n }\n }\n }\n\n const removeSelection = () => {\n document.addEventListener('click', function (event) {\n const target = event.target;\n\n if (!target.classList.contains('remove')) {\n return;\n }\n\n const selectionWrapper = target.closest('.hb-selection-field');\n\n if (!selectionWrapper) {\n return;\n }\n\n const listItem = target.closest('.list-item');\n\n const field = listItem.getAttribute('data-field');\n switch (field) {\n case 'room-type':\n resetRoomType(listItem.getAttribute('data-value'));\n break;\n case 'rating':\n resetRating(listItem.getAttribute('data-value'));\n break;\n case 'price':\n resetPrice();\n break;\n default:\n break;\n }\n\n if (listItem) {\n listItem.remove();\n }\n });\n }\n\n\n const resetRoomType = (value = 'all') => {\n [...roomTypeFields].map(roomTypeField => {\n const roomTypeNodes = roomTypeField.querySelectorAll('input[type=\"checkbox\"]');\n if (value === 'all') {\n [...roomTypeNodes].map(roomTypeNode => {\n roomTypeNode.checked = false;\n })\n } else {\n const input = roomTypeField.querySelector(`.room-type-list input[value=\"${value}\"]`);\n input.checked = false;\n }\n\n let param = [];\n [...roomTypeNodes].map(checkedInput => {\n param.push(checkedInput.value);\n });\n\n const url = new URL(window.location.href);\n if (param.length) {\n url.searchParams.set('rating', param);\n } else {\n url.searchParams.delete('rating');\n }\n\n url.searchParams.set('paged', 1);\n window.location.href = url;\n });\n }\n\n const resetRating = (value = 'all') => {\n [...ratingFields].map(ratingField => {\n const ratingNodes = ratingField.querySelectorAll('input[type=\"checkbox\"]');\n if (value === 'all') {\n [...ratingNodes].map(ratingNode => {\n ratingNode.checked = false;\n })\n } else {\n const input = ratingField.querySelector(`.rating-list input[value=\"${value}\"]`);\n input.checked = false;\n }\n\n let param = [];\n [...ratingNodes].map(checkedInput => {\n param.push(checkedInput.value);\n });\n\n const url = new URL(window.location.href);\n if (param.length) {\n url.searchParams.set('rating', param);\n } else {\n url.searchParams.delete('rating');\n }\n\n url.searchParams.set('paged', 1);\n window.location.href = url;\n });\n }\n\n const resetPrice = () => {\n if (priceFields.length) {\n for (let i = 0; i < priceFields.length; i++) {\n const priceField = priceFields[i];\n\n const priceSliderNode = priceField.querySelector('.hb-price-range');\n\n priceSliderNode.noUiSlider.updateOptions({\n start: [parseInt(priceField.getAttribute('data-min')), parseInt(priceField.getAttribute('data-max'))],\n });\n }\n }\n\n const url = new URL(window.location.href);\n\n const filterArgs = ['min_price', 'max_price'];\n\n [...filterArgs].map(filterArg => {\n if (url.searchParams.get(filterArg)) {\n url.searchParams.delete(filterArg);\n }\n });\n\n url.searchParams.set('paged', 1);\n window.location.href = url;\n }\n\n\n const changeSelectedField = (field, value, text) => {\n const listNode = document.querySelector('.hb-selection-field .list');\n\n let fieldNode = listNode.querySelector(`li[data-field=\"${field}\"]`);\n\n if (field === 'rating' || field === 'room-type') {\n fieldNode = listNode.querySelector(`li[data-field=\"${field}\"][data-value=\"${value}\"]`);\n }\n\n if (fieldNode) {\n if (field === 'rating' || field === 'room-type') {\n fieldNode.remove();\n } else {\n if (value) {\n fieldNode.setAttribute('data-value', value);\n fieldNode.querySelector('.title').innerHTML = text;\n } else {\n fieldNode.remove();\n }\n }\n } else {\n const item = `
  • \n ${text}\n \n \n \n \n
  • `;\n listNode.insertAdjacentHTML('beforeend', item);\n }\n }\n\n const hbFilter = () => {\n const roomFilterBtn = document.querySelector('.hb-room-filter-btn');\n\n if (roomFilterBtn) {\n roomFilterBtn.addEventListener('click', function (event) {\n event.preventDefault();\n\n const priceFields = document.querySelectorAll('.hb-price-field');\n const ratingFields = document.querySelectorAll('.hb-rating-field');\n const roomTypeFields = document.querySelectorAll('.hb-type-field');\n\n\n const url = new URL(window.location.href);\n url.searchParams.set('paged', 1);\n\n //Price\n for (let i = 0; i < priceFields.length; i++) {\n const priceField = priceFields[i];\n const minPrice = priceField.querySelector('.hb-min-price').value;\n const maxPrice = priceField.querySelector('.hb-max-price').value;\n\n url.searchParams.set('min_price', minPrice);\n url.searchParams.set('max_price', maxPrice);\n }\n\n //Rating\n for (let i = 0; i < ratingFields.length; i++) {\n const ratingField = ratingFields[i];\n const allCheckedInput = ratingField.querySelectorAll('input[type=\"checkbox\"]:checked');\n\n let value = [];\n [...allCheckedInput].map(checkedInput => {\n value.push(checkedInput.value);\n });\n\n if (value.length) {\n url.searchParams.set('rating', value);\n }else if(url.searchParams.has('rating')){\n url.searchParams.delete('rating');\n }\n }\n\n //Room types\n for (let i = 0; i < roomTypeFields.length; i++) {\n const roomTypeField = roomTypeFields[i];\n\n const allCheckedInput = roomTypeField.querySelectorAll('input[type=\"checkbox\"]:checked');\n\n let value = [];\n [...allCheckedInput].map(checkedInput => {\n value.push(checkedInput.value);\n });\n\n if (value.length) {\n url.searchParams.set('room_type', value);\n }else if(url.searchParams.has('room_type')){\n url.searchParams.delete('room_type');\n }\n }\n\n window.location.href = url;\n });\n }\n }\n\n document.addEventListener('DOMContentLoaded', () => {\n if (hotel_settings && hotel_settings.is_page_search) {\n return;\n }\n\n hbPriceSlider();\n hbRating();\n hbRoomType();\n hbFilterSelection();\n clearFieldFilter();\n removeSelection();\n hbFilter();\n });\n})();\n"],"names":["priceFields","document","querySelectorAll","ratingFields","roomTypeFields","getParam","param","queryString","window","location","search","urlParams","URLSearchParams","get","renderPrice","price","currencySymbol","hotel_settings","currency_symbol","currencyPosition","currency_position","renderPriceNumber","numberDecimals","number_decimal","thousandsSeparator","thousands_separator","toFixed","toString","replace","hbPriceSlider","i","length","priceField","minPrice","getAttribute","maxPrice","step","minPriceNode","querySelector","maxPriceNode","priceSliderNode","start","end","parseInt","noUiSlider","create","connect","tooltips","range","min","max","on","values","handle","unencoded","value","innerHTML","hbRating","ratingField","allInputs","rating","split","map","checked","input","addEventListener","event","allCheckedInput","checkedInput","push","url","URL","href","searchParams","set","delete","hbRoomType","roomTypeField","roomTypesValue","clearFieldFilter","filterForms","filterForm","clearFilterBtn","filterArgs","filterArg","hbFilterSelection","selectionWrapper","changeSelectedField","ratingNode","label","closest","roomTypeNode","removeSelection","target","classList","contains","listItem","field","resetRoomType","resetRating","resetPrice","remove","roomTypeNodes","ratingNodes","updateOptions","text","listNode","fieldNode","setAttribute","item","insertAdjacentHTML","hbFilter","roomFilterBtn","preventDefault","has","is_page_search"],"sourceRoot":""}