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C,iBAAP,GACnC,EAAK,KAAK,UAAU,GACpB,EAAK,KAAK,UAAU,KAEpB,EAAK,IAAI,KAAK,EAAG,WACjB,EAAK,IAAI,KAAK,EAAG,YAEnB,KAAK,aAAa,EAAI,EACxB,CACA,KAAA,GACE,KAAK,gBACP,CACA,SAAA,GACE,IAAI,EAAQ,EACZ,GAAI,KAAK,OAAS,KAAK,IACrB,EAAQ,KAAK,UAAU,KAAK,IAAK,KAAK,OAAS,MAC1C,CACL,MAAM,EAAQ,KAAK,WACb,EAAQ,EAAQ,EAAM,MAAM,KAAK,WAAa,GACpD,GAAI,GAAS,EAAM,QAAU,EAAG,CAC9B,MAAM,EAAU,KAAK,OACrB,EAAQ,KAAK,UAAU,KAAK,UAAU,EAAM,GAAI,GAAU,KAAK,UAAU,EAAM,GAAI,IAAY,CACjG,CACF,CACA,OAAO,CACT,CACA,OAAA,GACM,SAAS,eAAe,KAAK,qBAC/B,KAAK,0BAA0B,KAAK,MAAO,SAC3C,KAAK,0BAA0B,SAAU,SACzC,KAAK,0BAA0B,KAAK,MAAO,UAC3C,KAAK,WAAW,WAAW,YAAY,KAAK,YAEhD,SAGO","file":"/npm/hotel-datepicker@4.12.4/dist/js/hotel-datepicker.esm.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/hotel-datepicker@4.12.4/dist/js/hotel-datepicker.esm.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*! hotel-datepicker 4.12.4 - Copyright 2026 Benito Lopez (http://lopezb.com) - https://github.com/benitolopez/hotel-datepicker - MIT */\nimport * as fecha from 'fecha';\n\nlet idCounter = 0;\nclass HotelDatepicker {\n  constructor(input, options) {\n    this._boundedEventHandlers = {};\n    this.id = HotelDatepicker.getNewId();\n\n    // Set default values\n    const opts = options || {};\n    this.className = opts.className || \"datepicker\";\n    this.format = opts.format || \"YYYY-MM-DD\";\n    this.infoFormat = opts.infoFormat || this.format;\n    this.ariaDayFormat = opts.ariaDayFormat || \"dddd, MMMM DD, YYYY\";\n    this.separator = opts.separator || \" - \";\n    this.startOfWeek = opts.startOfWeek || \"sunday\"; // Or monday\n    this.startDate = opts.startDate || new Date();\n    this.endDate = opts.endDate || false;\n    this.minNights = opts.minNights || 1;\n    this.minNightsMultiple = opts.minNightsMultiple || false;\n    this.maxNights = opts.maxNights || 0;\n    this.selectForward = opts.selectForward || false;\n    this.disabledDates = opts.disabledDates || [];\n    this.noCheckInDates = opts.noCheckInDates || [];\n    this.noCheckOutDates = opts.noCheckOutDates || [];\n    this.disabledDaysOfWeek = opts.disabledDaysOfWeek || [];\n    this.noCheckInDaysOfWeek = opts.noCheckInDaysOfWeek || [];\n    this.noCheckOutDaysOfWeek = opts.noCheckOutDaysOfWeek || [];\n    this.daysWithExtraText = [];\n    this.enableCheckout = opts.enableCheckout || false;\n    this.preventContainerClose = opts.preventContainerClose || false;\n    this.container = opts.container || \"\";\n    this.animationSpeed = opts.animationSpeed || \".5s\";\n    this.hoveringTooltip = opts.hoveringTooltip || true; // Or a function\n    this.autoClose = opts.autoClose === undefined ? true : opts.autoClose;\n    this.showTopbar = opts.showTopbar === undefined ? true : opts.showTopbar;\n    this.topbarPosition = opts.topbarPosition === \"bottom\" ? \"bottom\" : \"top\";\n    this.moveBothMonths = opts.moveBothMonths || false;\n    this.inline = opts.inline || false;\n    this.clearButton = opts.clearButton || false;\n    this.submitButton = Boolean(this.inline && opts.submitButton);\n    this.submitButtonName = this.submitButton && opts.submitButtonName ? opts.submitButtonName : \"\";\n    this.closeOnScroll = opts.closeOnScroll || false;\n    this.i18n = {\n      selected: \"Your stay:\",\n      night: \"Night\",\n      nights: \"Nights\",\n      button: \"Close\",\n      clearButton: \"Clear\",\n      submitButton: \"Submit\",\n      \"checkin-disabled\": \"Check-in disabled\",\n      \"checkout-disabled\": \"Check-out disabled\",\n      \"day-names-short\": [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n      \"day-names\": [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n      \"month-names-short\": [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n      \"month-names\": [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n      \"error-more\": \"Date range should not be more than 1 night\",\n      \"error-more-plural\": \"Date range should not be more than %d nights\",\n      \"error-less\": \"Date range should not be less than 1 night\",\n      \"error-less-plural\": \"Date range should not be less than %d nights\",\n      \"info-more\": \"Please select a date range of at least 1 night\",\n      \"info-more-plural\": \"Please select a date range of at least %d nights\",\n      \"info-range\": \"Please select a date range between %d and %d nights\",\n      \"info-range-equal\": \"Please select a date range of %d nights\",\n      \"info-default\": \"Please select a date range\",\n      \"aria-application\": \"Calendar\",\n      \"aria-selected-checkin\": \"Selected as check-in date, %s\",\n      \"aria-selected-checkout\": \"Selected as check-out date, %s\",\n      \"aria-selected\": \"Selected, %s\",\n      \"aria-disabled\": \"Not available, %s\",\n      \"aria-choose-checkin\": \"Choose %s as your check-in date\",\n      \"aria-choose-checkout\": \"Choose %s as your check-out date\",\n      \"aria-prev-month\": \"Move backward to switch to the previous month\",\n      \"aria-next-month\": \"Move forward to switch to the next month\",\n      \"aria-close-button\": \"Close the datepicker\",\n      \"aria-clear-button\": \"Clear the selected dates\",\n      \"aria-submit-button\": \"Submit the form\",\n      ...opts.i18n\n    };\n    this.getValue = opts.getValue || function () {\n      return input.value;\n    };\n    this.setValue = opts.setValue || function (s) {\n      input.value = s;\n    };\n    this.onDayClick = opts.onDayClick === undefined ? false : opts.onDayClick;\n    this.onOpenDatepicker = opts.onOpenDatepicker === undefined ? false : opts.onOpenDatepicker;\n    this.onSelectRange = opts.onSelectRange === undefined ? false : opts.onSelectRange;\n    this.extraDayText = opts.extraDayText === undefined ? false : opts.extraDayText;\n\n    // DOM input\n    this.input = input;\n\n    // Initialize the datepicker\n    this.init();\n  }\n  addBoundedListener(node, event, handler, capture) {\n    if (!(node in this._boundedEventHandlers)) {\n      // _boundedEventHandlers stores references to nodes\n      this._boundedEventHandlers[node] = {};\n    }\n    if (!(event in this._boundedEventHandlers[node])) {\n      // Each entry contains another entry for each event type\n      this._boundedEventHandlers[node][event] = [];\n    }\n    // Capture reference\n    const boundedHandler = handler.bind(this);\n    this._boundedEventHandlers[node][event].push([boundedHandler, capture]);\n    node.addEventListener(event, boundedHandler, capture);\n  }\n  removeAllBoundedListeners(node, event) {\n    if (node in this._boundedEventHandlers) {\n      const handlers = this._boundedEventHandlers[node];\n      if (event in handlers) {\n        const eventHandlers = handlers[event];\n        for (let i = eventHandlers.length; i--;) {\n          const handler = eventHandlers[i];\n          node.removeEventListener(event, handler[0], handler[1]);\n        }\n      }\n    }\n  }\n  static getNewId() {\n    return ++idCounter;\n  }\n  setFechaI18n() {\n    fecha.setGlobalDateI18n({\n      dayNamesShort: this.i18n[\"day-names-short\"],\n      dayNames: this.i18n[\"day-names\"],\n      monthNamesShort: this.i18n[\"month-names-short\"],\n      monthNames: this.i18n[\"month-names\"]\n    });\n  }\n  getWeekDayNames() {\n    let week = \"\";\n\n    // Start from monday if we passed that option\n    if (this.startOfWeek === \"monday\") {\n      for (let i = 0; i < 7; i++) {\n        week += '<th class=\"' + this.className + '__week-name\">' + this.lang(\"day-names-short\")[(1 + i) % 7] + \"</th>\";\n      }\n      return week;\n    }\n\n    // Otherwise start from sunday (default)\n    for (let i = 0; i < 7; i++) {\n      week += '<th class=\"' + this.className + '__week-name\">' + this.lang(\"day-names-short\")[i] + \"</th>\";\n    }\n    return week;\n  }\n  getMonthDom(month) {\n    // Get month DOM element\n    return document.getElementById(this.getMonthTableId(month));\n  }\n  getMonthName(m) {\n    // Get month name\n    return this.lang(\"month-names\")[m];\n  }\n  getDatepickerId() {\n    // Get datepicker ID\n    return this.className + \"-\" + this.generateId();\n  }\n  getMonthTableId(month) {\n    // Get month table ID\n    return \"month-\" + month + \"-\" + this.generateId();\n  }\n  getCloseButtonId() {\n    // Get close button ID\n    return \"close-\" + this.generateId();\n  }\n  getClearButtonId() {\n    // Get close button ID\n    return \"clear-\" + this.generateId();\n  }\n  getSubmitButtonId() {\n    // Get close button ID\n    return \"submit-\" + this.generateId();\n  }\n  getTooltipId() {\n    // Get close button ID\n    return \"tooltip-\" + this.generateId();\n  }\n  getNextMonth(month) {\n    // Get next month date\n    const _m = new Date(month.valueOf());\n    return new Date(_m.setMonth(_m.getMonth() + 1, 1));\n  }\n  getPrevMonth(month) {\n    // Get previous month date\n    const _m = new Date(month.valueOf());\n    return new Date(_m.setMonth(_m.getMonth() - 1, 1));\n  }\n  getDateString(date) {\n    let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.format;\n    // Format date\n    this.setFechaI18n();\n    return fecha.format(date, format);\n  }\n  parseDate(date) {\n    let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.format;\n    // Parse a date object\n    this.setFechaI18n();\n    return fecha.parse(date, format);\n  }\n  init() {\n    // DOM container\n    this.parent = this.container ? this.container : this.input.parentElement;\n\n    // Start date of the selected range\n    this.start = false;\n\n    // End date of the selected range\n    this.end = false;\n\n    // Set the minimum of days required by the daterange\n    this.minDays = this.minNights > 1 ? this.minNights + 1 : 2;\n\n    // Set the maximum of days required by the daterange\n    this.maxDays = this.maxNights > 0 ? this.maxNights + 1 : 0;\n\n    // Set startDate if we passed that option\n    if (this.startDate && typeof this.startDate === \"string\") {\n      this.startDate = this.parseDate(this.startDate);\n    }\n\n    // Set endDate if we passed that option\n    if (this.endDate && typeof this.endDate === \"string\") {\n      this.endDate = this.parseDate(this.endDate);\n    }\n\n    // Hide tooltip on touch devices\n    if (this.isTouchDevice()) {\n      this.hoveringTooltip = false;\n    }\n\n    // Flag that checks if the datepicker is open\n    this.isOpen = false;\n\n    // Flag that checks if the second date of the range is set\n    this.changed = false;\n\n    // Flag that checks if we exit from the datepicker with the ESC key\n    this.justEsc = false;\n\n    // Flag that checks if we datepicker is on focus\n    this.isOnFocus = false;\n\n    // Create the DOM elements\n    this.createDom();\n\n    // Set default time\n    let defaultTime = new Date();\n    if (this.startDate && this.compareMonth(defaultTime, this.startDate) < 0) {\n      defaultTime = new Date(this.startDate.getTime());\n    }\n    if (this.endDate && this.compareMonth(this.getNextMonth(defaultTime), this.endDate) > 0) {\n      defaultTime = new Date(this.getPrevMonth(this.endDate.getTime()));\n    }\n\n    // Parse disabled dates\n    if (this.disabledDates.length > 0) {\n      this.parseDisabledDates();\n    }\n\n    // Parse disabled days\n    if (this.disabledDaysOfWeek.length > 0) {\n      this.getDisabledDays();\n    }\n\n    // Show months\n    this.showMonth(defaultTime, 1);\n    this.showMonth(this.getNextMonth(defaultTime), 2);\n    this.setDayIndexes();\n\n    // Print default info in top bar\n    this.topBarDefaultText();\n\n    // Open datepicker in inline mode\n    if (this.inline) {\n      this.openDatepicker();\n      if (this.submitButton) {\n        const submitButton = document.getElementById(this.getSubmitButtonId());\n        submitButton.disabled = true;\n        submitButton.setAttribute(\"aria-disabled\", \"true\");\n      }\n    }\n    if (this.clearButton) {\n      if (!this.start && !this.end) {\n        const clearButton = document.getElementById(this.getClearButtonId());\n        clearButton.disabled = true;\n        clearButton.setAttribute(\"aria-disabled\", \"true\");\n      }\n    }\n\n    // Attach listeners\n    this.addListeners();\n\n    // Flag for first disabled date\n    this.isFirstDisabledDate = 0;\n\n    // Holds last disabled date\n    this.lastDisabledDate = false;\n\n    // Add aria attributes\n    this.setDayAriaAttributes();\n  }\n  addListeners() {\n    // Next month button\n    const nextButtons = this.datepicker.getElementsByClassName(this.className + \"__month-button--next\");\n    for (let i = 0; i < nextButtons.length; i++) {\n      nextButtons[i].addEventListener(\"click\", evt => this.goToNextMonth(evt));\n    }\n\n    // Previous month button\n    const prevButtons = this.datepicker.getElementsByClassName(this.className + \"__month-button--prev\");\n    for (let i = 0; i < prevButtons.length; i++) {\n      prevButtons[i].addEventListener(\"click\", evt => this.goToPreviousMonth(evt));\n    }\n\n    // Open the datepicker on the input click\n    this.addBoundedListener(this.input, \"click\", evt => this.openDatepicker(evt));\n    if (this.showTopbar && !this.inline) {\n      // Close the datepicker on the button click\n      document.getElementById(this.getCloseButtonId()).addEventListener(\"click\", evt => this.closeDatepicker(evt));\n    }\n    if (this.showTopbar && this.clearButton) {\n      // Clear the datepicker on the button click\n      document.getElementById(this.getClearButtonId()).addEventListener(\"click\", evt => this.clearDatepicker(evt));\n    }\n\n    // Close the datepicker on resize?\n    // The problem is that mobile keyboards trigger the resize event closing\n    // the datepicker. There are some workarounds (http://stackoverflow.com/q/14902321)\n    // but for now I will disable this option. I'm open to new ideas.\n    // window.addEventListener('resize', evt => this.closeDatepicker(evt));\n\n    // Re-check datepicker, buttons, etc after resize\n    window.addEventListener(\"resize\", evt => this.onResizeDatepicker(evt));\n\n    // Add a mouseover event listener to the document. This will help us to:\n    // 1 - Handle the hover on calendar days\n    this.datepicker.addEventListener(\"mouseover\", evt => this.datepickerHover(evt));\n\n    // Add a mouseout event listener to the document. This will help us to:\n    // 1 - Hide the tooltip on the mouseout event on days\n    this.datepicker.addEventListener(\"mouseout\", evt => this.datepickerMouseOut(evt));\n\n    // Update the selected values when the input changes manually\n    this.addBoundedListener(this.input, \"change\", () => this.checkAndSetDefaultValue());\n\n    // Open datepicker on focus\n    if (!this.inline) {\n      if (!this.justEsc) {\n        this.addBoundedListener(this.input, \"focus\", evt => this.openDatepicker(evt));\n      }\n      this.justEsc = false;\n    }\n\n    // Listen for keystrokes\n    window.addEventListener(\"keydown\", evt => this.doKeyDown(evt));\n\n    // Listen for focus\n    document.addEventListener(\"focus\", evt => this.checkOnFocus(evt), true);\n\n    // Close datepicker on scroll\n    if (this.closeOnScroll) {\n      window.addEventListener(\"scroll\", evt => this.closeDatepicker(evt));\n    }\n  }\n  generateId() {\n    // Generate an unique ID for each datepicker\n    // Use input ID if set\n    if (this.input.id) {\n      return this.input.id;\n      // Otherwise get the instance id\n    }\n\n    return this.id;\n  }\n  createDom() {\n    const domString = this.createDatepickerDomString();\n\n    // Insert the datepicker in the document\n    this.parent.insertAdjacentHTML(\"beforeend\", domString);\n\n    // Store our datepicker in a property\n    this.datepicker = document.getElementById(this.getDatepickerId());\n  }\n  createDatepickerDomString() {\n    // Generate our datepicker\n    let wrapperClass = this.inline ? \" \" + this.className + \"--inline\" : \"\";\n    if (this.showTopbar) {\n      if (this.topbarPosition === \"bottom\") {\n        wrapperClass += \" \" + this.className + \"--topbar-bottom\";\n      } else {\n        wrapperClass += \" \" + this.className + \"--topbar-top\";\n      }\n    }\n    if (!this.inline) {\n      wrapperClass += \" \" + this.className + this.className + \"--topbar-has-close-button\";\n    }\n    if (this.clearButton) {\n      wrapperClass += \" \" + this.className + \"--topbar-has-clear-button\";\n    }\n    if (this.submitButton) {\n      wrapperClass += \" \" + this.className + \"--topbar-has-submit-button\";\n    }\n    const wrapperStyle = this.inline ? \"\" : ' style=\"display:none\"';\n    let html = '<div id=\"' + this.getDatepickerId() + '\"' + wrapperStyle + ' class=\"' + this.className + \" \" + this.className + \"--closed\" + wrapperClass + '\" tabindex=\"0\">';\n    html += '<div class=\"' + this.className + '__inner\">';\n    let topBarHtml = \"\";\n    if (this.showTopbar) {\n      // Top bar section\n      topBarHtml += '<div class=\"' + this.className + '__topbar\">' + '<div class=\"' + this.className + \"__info \" + this.className + '__info--selected\"><span class=\"' + this.className + \"__info \" + this.className + '__info--selected-label\">' + this.lang(\"selected\") + ' </span> <strong class=\"' + this.className + \"__info-text \" + this.className + '__info-text--start-day\">...</strong>' + ' <span class=\"' + this.className + \"__info-text \" + this.className + '__info--separator\">' + this.separator + '</span> <strong class=\"' + this.className + \"__info-text \" + this.className + '__info-text--end-day\">...</strong> <em class=\"' + this.className + \"__info-text \" + this.className + '__info-text--selected-days\">(<span></span>)</em>' + \"</div>\" + '<div class=\"' + this.className + \"__info \" + this.className + '__info--feedback\"></div>';\n      let buttonsHtml = \"\";\n      if (this.clearButton) {\n        buttonsHtml += '<button type=\"button\" id=\"' + this.getClearButtonId() + '\" class=\"' + this.className + '__clear-button\" aria-label=\"' + this.i18n[\"aria-clear-button\"] + '\">' + this.lang(\"clearButton\") + \"</button>\";\n      }\n      if (!this.inline) {\n        buttonsHtml += '<button type=\"button\" id=\"' + this.getCloseButtonId() + '\" class=\"' + this.className + '__close-button\" aria-label=\"' + this.i18n[\"aria-close-button\"] + '\">' + this.lang(\"button\") + \"</button>\";\n      }\n\n      // if (this.clearButton || this.submitButton) {\n      //     topBarHtml += '<div class=\"' + this.className + '__buttons\">';\n      // }\n\n      if (this.submitButton) {\n        buttonsHtml += '<input type=\"submit\" id=\"' + this.getSubmitButtonId() + '\" class=\"' + this.className + '__submit-button\" value=\"' + this.lang(\"submitButton\") + '\" name=\"' + this.submitButtonName + '\" aria-label=\"' + this.i18n[\"aria-submit-button\"] + '\">';\n      }\n      if (buttonsHtml) {\n        topBarHtml += '<div class=\"' + this.className + '__buttons\">' + buttonsHtml + \"</div>\";\n      }\n      topBarHtml += \"</div>\";\n    }\n    if (this.showTopbar && this.topbarPosition === \"top\") {\n      html += topBarHtml;\n    }\n\n    // Months section\n    html += '<div class=\"' + this.className + '__months\" role=\"application\" aria-roledescription=\"datepicker\" aria-label=\"' + this.i18n[\"aria-application\"] + '\">';\n\n    // Print single months\n    for (let i = 1; i <= 2; i++) {\n      html += '<table role=\"presentation\" id=\"' + this.getMonthTableId(i) + '\" class=\"' + this.className + \"__month \" + this.className + \"__month--month\" + i + '\"><thead><tr class=\"' + this.className + '__month-caption\"><th><span  role=\"button\" tabindex=\"0\" aria-label=\"' + this.i18n[\"aria-prev-month\"] + '\" class=\"' + this.className + \"__month-button \" + this.className + '__month-button--prev\" month=\"' + i + '\">&lt;</span></th><th colspan=\"5\" class=\"' + this.className + '__month-name\"></th><th><span role=\"button\" tabindex=\"0\" aria-label=\"' + this.i18n[\"aria-next-month\"] + '\" class=\"' + this.className + \"__month-button \" + this.className + '__month-button--next\" month=\"' + i + '\">&gt;</span></th></tr><tr class=\"' + this.className + '__week-days\"  aria-hidden=\"true\" role=\"presentation\">' + this.getWeekDayNames(i) + \"</tr></thead><tbody></tbody></table>\";\n    }\n    html += \"</div>\";\n    if (this.showTopbar && this.topbarPosition === \"bottom\") {\n      html += topBarHtml;\n    }\n\n    // Tooltip\n    html += '<div style=\"display:none\" id=\"' + this.getTooltipId() + '\" class=\"' + this.className + '__tooltip\"></div>';\n    html += \"</div>\";\n    html += \"</div>\";\n    return html;\n  }\n  showMonth(date, month) {\n    date.setHours(0, 0, 0, 0);\n\n    // Show month table and create the necessary HTML code\n    const name = this.getMonthName(date.getMonth());\n    const monthDom = this.getMonthDom(month);\n    const monthName = monthDom.getElementsByClassName(this.className + \"__month-name\")[0];\n    const monthBody = monthDom.getElementsByTagName(\"tbody\")[0];\n\n    // Month caption\n    monthName.textContent = name + \" \" + date.getFullYear();\n\n    // Remove child elements before to insert the new month\n    this.emptyElement(monthBody);\n\n    // Append the month\n    monthBody.insertAdjacentHTML(\"beforeend\", this.createMonthDomString(date));\n\n    // Check day dates\n    this.updateSelectableRange();\n\n    // Store current month dates\n    this[\"month\" + month] = date;\n  }\n  createMonthDomString(_date) {\n    const days = [];\n    let html = \"\";\n    let valid;\n    _date.setDate(1);\n    let dayOfWeek = _date.getDay();\n    const currentMonth = _date.getMonth();\n    if (dayOfWeek === 0 && this.startOfWeek === \"monday\") {\n      // Add one week\n      dayOfWeek = 7;\n    }\n\n    // If the first day is in the middle of the week, push also\n    // the first days of the week (the days before our first day).\n    // We need a complete week row.\n    // Obviously, these days are part of the previous month.\n    if (dayOfWeek > 0) {\n      for (let i = dayOfWeek; i > 0; i--) {\n        const _day = new Date(_date.getTime() - 86400000 * i);\n\n        // Check if the day is valid. And pass this property to the days object\n        valid = this.isValidDate(_day.getTime());\n        if (this.startDate && this.compareDay(_day, this.startDate) < 0 || this.endDate && this.compareDay(_day, this.endDate) > 0) {\n          valid = false;\n        }\n\n        // We pass the type property to know if the day is part of the\n        // previous month. We already know that it is true.\n        days.push({\n          date: _day,\n          type: \"lastMonth\",\n          day: _day.getDate(),\n          time: _day.getTime(),\n          valid\n        });\n      }\n    }\n\n    // Push 40 days. Each month table needs the days of the month plus\n    // the remaining days (of the week row) before the first day of the month\n    // and after the last day of the month. (PS. They will be hidden)\n    // 40 days are enough to cover all the possibilities.\n    for (let i = 0; i < 40; i++) {\n      const _day = this.addDays(_date, i);\n\n      // Check if the day is valid. And pass this property to the days object\n      valid = this.isValidDate(_day.getTime());\n      if (this.startDate && this.compareDay(_day, this.startDate) < 0 || this.endDate && this.compareDay(_day, this.endDate) > 0) {\n        valid = false;\n      }\n\n      // We pass the type property to know if the day is part of the\n      // current month or part of the next month\n      days.push({\n        date: _day,\n        type: _day.getMonth() === currentMonth ? \"visibleMonth\" : \"nextMonth\",\n        day: _day.getDate(),\n        time: _day.getTime(),\n        valid\n      });\n    }\n\n    // Create the week rows.\n    for (let week = 0; week < 6; week++) {\n      // Iterate the days object week by week.\n      // If the last day is part of the next month, stop the loop.\n      let allNextMonth = true;\n      for (let i = 0; i < 7; i++) {\n        let dayIdx = this.startOfWeek === \"monday\" ? week * 7 + i + 1 : week * 7 + i;\n        let dayObj = days[dayIdx];\n        if (dayObj && dayObj.type !== \"nextMonth\") {\n          allNextMonth = false;\n          break;\n        }\n      }\n      if (allNextMonth) {\n        break;\n      }\n      html += '<tr class=\"' + this.className + '__week-row\">';\n\n      // Create the days of a week, one by one\n      for (let i = 0; i < 7; i++) {\n        let _day = this.startOfWeek === \"monday\" ? i + 1 : i;\n        _day = days[week * 7 + _day];\n        const classes = this.getDayClasses(_day);\n\n        // Add a title for those days where the checkin or checkout is disabled\n        let title = \"\";\n        if (this.hasClass(_day, this.className + \"__month-day--no-checkin\")) {\n          title = this.i18n[\"checkin-disabled\"];\n        }\n        if (this.hasClass(_day, +this.className + \"__month-day--no-checkout\")) {\n          if (title) {\n            title += \". \";\n          }\n          title += this.i18n[\"checkout-disabled\"];\n        }\n\n        // Each day has the \"time\" attribute (timestamp) and an appropriate class\n        const dayAttributes = {\n          daytype: _day.type,\n          time: _day.time,\n          class: classes.join(\" \"),\n          d: i + 1\n        };\n\n        // Add title attribute if available\n        if (title) {\n          dayAttributes.title = title;\n        }\n\n        // Add role\n        dayAttributes.role = \"button\";\n\n        // Add tabindex to today date\n        if (this.getDateString(_day.time) === this.getDateString(new Date())) {\n          dayAttributes.tabindex = \"0\";\n        }\n        let extraText = \"\";\n\n        // Optionally print some text in day cells\n        if (this.extraDayText) {\n          extraText = this.extraDayText(this.getDateString(_day.time), dayAttributes);\n        }\n        extraText = extraText ? extraText : \"\";\n        if (extraText) {\n          dayAttributes.class = dayAttributes.class + \" \" + this.className + \"__month-day--with-extra\";\n          this.daysWithExtraText.push(this.getDateString(_day.time));\n        }\n\n        // Create the day HTML\n        html += '<td class=\"' + dayAttributes.class + '\" ' + this.printAttributes(dayAttributes) + \">\" + _day.day + extraText + \"</td>\";\n      }\n      html += \"</tr>\";\n    }\n    return html;\n  }\n  openDatepicker() {\n    // Open the datepicker\n    if (!this.isOpen) {\n      // Add/remove helper classes\n      this.removeClass(this.datepicker, this.className + \"--closed\");\n      this.addClass(this.datepicker, this.className + \"--open\");\n\n      // Set (and check) the range value based on the current input value\n      this.checkAndSetDefaultValue();\n\n      // Slide down the datepicker\n      if (!this.inline) {\n        this.slideDown(this.datepicker, this.animationSpeed);\n      }\n\n      // Set flag\n      this.isOpen = true;\n\n      // Show selected days in the calendar\n      this.showSelectedDays();\n\n      // Disable (if needed) the prev/next buttons\n      this.disableNextPrevButtons();\n\n      // Add a click event listener to the document. This will help us to:\n      // 1 - Check if the click it's outside the datepicker\n      // 2 - Handle the click on calendar days\n      this.addBoundedListener(document, \"click\", evt => this.documentClick(evt));\n\n      // Optionally run a function when the datepicker is open\n      if (this.onOpenDatepicker) {\n        this.onOpenDatepicker();\n      }\n    }\n  }\n  closeDatepicker() {\n    // Close the datepicker\n    if (!this.isOpen || this.inline) {\n      return;\n    }\n\n    // Add/remove helper classes\n    this.removeClass(this.datepicker, this.className + \"--open\");\n    this.addClass(this.datepicker, this.className + \"--closed\");\n\n    // Slide up the datepicker\n    this.slideUp(this.datepicker, this.animationSpeed);\n    this.isOpen = false;\n\n    // Create event on close\n    const evt = new CustomEvent(\"afterClose\", {\n      bubbles: true,\n      cancelable: true\n    });\n    this.input.dispatchEvent(evt);\n    this.removeAllBoundedListeners(document, \"click\");\n  }\n  autoclose() {\n    // Autoclose the datepicker when the second date is set\n    if (this.autoClose && this.changed && this.isOpen && this.start && this.end && !this.inline) {\n      this.closeDatepicker();\n    }\n  }\n  documentClick(evt) {\n    // Check if the click was outside the datepicker and close it\n    if (!this.parent.contains(evt.target) && evt.target !== this.input) {\n      if (!this.preventContainerClose) {\n        this.closeDatepicker();\n      }\n    } else if (evt.target.tagName.toLowerCase() === \"td\") {\n      // Check if the click was on a calendar day\n      this.dayClicked(evt.target);\n    }\n  }\n  datepickerHover(evt) {\n    // Check if the hover is on a calendar day\n    if (evt.target.tagName && evt.target.tagName.toLowerCase() === \"td\") {\n      this.dayHovering(evt.target);\n    }\n  }\n  datepickerMouseOut(evt) {\n    // Check if the mouseout is on a calendar day\n    if (evt.target.tagName && evt.target.tagName.toLowerCase() === \"td\") {\n      // Hide the tooltip\n      const tooltipContainer = document.getElementById(this.getTooltipId());\n      tooltipContainer.style.display = \"none\";\n    }\n  }\n  onResizeDatepicker() {\n    // Reset month views\n    this.checkAndSetDefaultValue(true);\n  }\n  getDayClasses(_day) {\n    const isToday = this.getDateString(_day.time) === this.getDateString(new Date());\n    const isStartDate = this.getDateString(_day.time) === this.getDateString(this.startDate);\n    const isDayWithExtraText = this.daysWithExtraText.indexOf(this.getDateString(_day.time)) > -1;\n    let isDisabled = false;\n    let isNoCheckIn = false;\n    let isNoCheckOut = false;\n    let isDayOfWeekDisabled = false;\n    let isFirstEnabledDate = false;\n\n    // Day between disabled dates and the last day\n    // before the disabled date\n    let isDayBeforeDisabledDate = false;\n\n    // Check if the day is one of the days passed in the\n    // (optional) disabledDates option. And set valid to\n    // false in this case.\n    //\n    // Also, check if the checkin or checkout is disabled\n    if (_day.valid || _day.type === \"visibleMonth\") {\n      const dateString = this.getDateString(_day.time, \"YYYY-MM-DD\");\n      if (this.disabledDates.length > 0) {\n        // Check if this day is between two disabled dates\n        // and disable it if there are not enough days\n        // available to select a valid range\n        const limit = this.getClosestDisabledDates(_day.date);\n\n        // Consider also the day before startDate\n        // as disabled date\n        if (limit[0] === false) {\n          limit[0] = this.substractDays(this.startDate, 1);\n        }\n        if (limit[0] && limit[1]) {\n          if (this.compareDay(_day.date, limit[0]) && this.countDays(limit[0], limit[1]) - 2 > 0) {\n            const daysBeforeNextDisabledDate = this.countDays(limit[1], _day.date) - 1;\n            const daysAfterPrevDisabledDate = this.countDays(_day.date, limit[0]) - 1;\n            if (this.selectForward && daysBeforeNextDisabledDate < this.minDays) {\n              _day.valid = false;\n            } else if (!this.selectForward && daysBeforeNextDisabledDate < this.minDays && daysAfterPrevDisabledDate < this.minDays) {\n              _day.valid = false;\n            }\n            if (!_day.valid && this.enableCheckout && daysBeforeNextDisabledDate === 2) {\n              isDayBeforeDisabledDate = true;\n            }\n          }\n        }\n        if (this.disabledDates.indexOf(dateString) > -1) {\n          _day.valid = false;\n          isDisabled = true;\n          this.isFirstDisabledDate++;\n\n          // Store last disabled date for later\n          this.lastDisabledDate = _day.date;\n        } else {\n          this.isFirstDisabledDate = 0;\n        }\n\n        // First day after a disabled day\n        if (_day.valid && this.lastDisabledDate && this.compareDay(_day.date, this.lastDisabledDate) > 0 && this.countDays(_day.date, this.lastDisabledDate) === 2) {\n          isFirstEnabledDate = true;\n        }\n      }\n      if (this.disabledDaysOfWeek.length > 0) {\n        if (this.disabledDaysOfWeek.indexOf(fecha.format(_day.time, \"dddd\")) > -1) {\n          _day.valid = false;\n          isDayOfWeekDisabled = true;\n        }\n      }\n      if (this.noCheckInDates.length > 0) {\n        if (this.noCheckInDates.indexOf(dateString) > -1) {\n          isNoCheckIn = true;\n          isFirstEnabledDate = false;\n        }\n      }\n      if (this.noCheckOutDates.length > 0) {\n        if (this.noCheckOutDates.indexOf(dateString) > -1) {\n          isNoCheckOut = true;\n        }\n      }\n      if (this.noCheckInDaysOfWeek.length > 0) {\n        if (this.noCheckInDaysOfWeek.indexOf(fecha.format(_day.time, \"dddd\")) > -1) {\n          isNoCheckIn = true;\n          isFirstEnabledDate = false;\n        }\n      }\n      if (this.noCheckOutDaysOfWeek.length > 0) {\n        if (this.noCheckOutDaysOfWeek.indexOf(fecha.format(_day.time, \"dddd\")) > -1) {\n          isNoCheckOut = true;\n        }\n      }\n    }\n    const classes = [this.className + \"__month-day\", this.className + \"__month-day--\" + _day.type, this.className + \"__month-day--\" + (_day.valid ? \"valid\" : \"invalid\"), isToday ? this.className + \"__month-day--today\" : \"\", isDisabled ? this.className + \"__month-day--disabled\" : \"\", isDisabled && this.enableCheckout && this.isFirstDisabledDate === 1 ? this.className + \"__month-day--checkout-enabled\" : \"\", isDayBeforeDisabledDate ? this.className + \"__month-day--before-disabled-date\" : \"\", isStartDate || isFirstEnabledDate ? this.className + \"__month-day--checkin-only\" : \"\", isNoCheckIn ? this.className + \"__month-day--no-checkin\" : \"\", isNoCheckOut ? this.className + \"__month-day--no-checkout\" : \"\", isDayOfWeekDisabled ? this.className + \"__month-day--day-of-week-disabled\" : \"\", isDayWithExtraText ? this.className + \"__month-day--with-extra\" : \"\"];\n    return classes;\n  }\n  checkAndSetDayClasses() {\n    // Get every td in the months table: our days\n    const days = this.datepicker.getElementsByTagName(\"td\");\n\n    // Iterate each day and re-check HTML classes\n    for (let i = 0; i < days.length; i++) {\n      const time = parseInt(days[i].getAttribute(\"time\"), 10);\n      const day = new Date(time);\n      const daytype = days[i].getAttribute(\"daytype\");\n      let valid;\n\n      // Check if the day is valid. And pass this property to the days object\n      valid = this.isValidDate(day.getTime());\n      if (this.startDate && this.compareDay(day, this.startDate) < 0 || this.endDate && this.compareDay(day, this.endDate) > 0) {\n        valid = false;\n      }\n      const _day = {\n        date: day,\n        type: daytype,\n        day: day.getDate(),\n        time,\n        valid\n      };\n      const classes = this.getDayClasses(_day);\n      days[i].className = classes.join(\" \");\n    }\n  }\n  checkAndSetDefaultValue() {\n    let onresize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n    // Set range based on the input value\n\n    // Get dates from input value\n    const value = this.getValue();\n    const dates = value ? value.split(this.separator) : \"\";\n\n    // If we have our two dates, set the date range\n    if (dates && dates.length >= 2) {\n      // Format the values correctly\n      const _format = this.format;\n\n      // Set the date range\n      this.changed = false;\n      this.setDateRange(this.parseDate(dates[0], _format), this.parseDate(dates[1], _format), onresize);\n      this.changed = true;\n    } else if (this.showTopbar) {\n      const selectedInfo = this.datepicker.getElementsByClassName(this.className + \"__info--selected\")[0];\n      selectedInfo.style.display = \"none\";\n      if (onresize) {\n        // Set default time\n        let defaultTime = new Date();\n        if (this.startDate && this.compareMonth(defaultTime, this.startDate) < 0) {\n          defaultTime = new Date(this.startDate.getTime());\n        }\n        if (this.endDate && this.compareMonth(this.getNextMonth(defaultTime), this.endDate) > 0) {\n          defaultTime = new Date(this.getPrevMonth(this.endDate.getTime()));\n        }\n        if (this.start && !this.end) {\n          this.clearSelection();\n        }\n\n        // Show months\n        this.showMonth(defaultTime, 1);\n        this.showMonth(this.getNextMonth(defaultTime), 2);\n        this.setDayIndexes();\n      }\n    }\n  }\n  setDateRange(date1, date2) {\n    let onresize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    // Swap dates if needed\n    if (date1.getTime() > date2.getTime()) {\n      let tmp = date2;\n      date2 = date1;\n      date1 = tmp;\n      tmp = null;\n    }\n    let valid = true;\n\n    // Check the validity of the dates\n    if (this.startDate && this.compareDay(date1, this.startDate) < 0 || this.endDate && this.compareDay(date2, this.endDate) > 0) {\n      valid = false;\n    }\n\n    // If not valid, reset the datepicker\n    if (!valid) {\n      // Show default (initial) months\n      this.showMonth(this.startDate, 1);\n      this.showMonth(this.getNextMonth(this.startDate), 2);\n      this.setDayIndexes();\n\n      // Show selected days in the calendar\n      this.showSelectedDays();\n\n      // Disable (if needed) the prev/next buttons\n      this.disableNextPrevButtons();\n      return;\n    }\n\n    // Fix DST\n    date1.setTime(date1.getTime() + 12 * 60 * 60 * 1000);\n    date2.setTime(date2.getTime() + 12 * 60 * 60 * 1000);\n\n    // Calculate the next month value\n    this.start = date1.getTime();\n    this.end = date2.getTime();\n    if (this.compareDay(date1, date2) > 0 && this.compareMonth(date1, date2) === 0) {\n      date2 = this.getNextMonth(date1);\n    }\n    if (this.compareMonth(date1, date2) === 0) {\n      date2 = this.getNextMonth(date1);\n    }\n\n    // Show the months\n    this.showMonth(date1, 1);\n    this.showMonth(date2, 2);\n    this.setDayIndexes();\n\n    // Show selected days in the calendar\n    this.showSelectedDays();\n\n    // Disable (if needed) the prev/next buttons\n    this.disableNextPrevButtons();\n\n    // Check the selection\n    this.checkSelection();\n\n    // Show selected dates in top bar\n    this.showSelectedInfo();\n\n    // Close the datepicker\n    if (!onresize) {\n      this.autoclose();\n    }\n\n    // Add aria attributes\n    this.setDayAriaAttributes();\n  }\n  showSelectedDays() {\n    // Show selected days in the calendar\n\n    // Return early if we don't have the start and end dates\n    if (!this.start && !this.end) {\n      return;\n    }\n\n    // Get every td in the months table: our days\n    const days = this.datepicker.getElementsByTagName(\"td\");\n\n    // Iterate each day and assign an appropriate HTML class\n    // if they are selected in the date range\n    for (let i = 0; i < days.length; i++) {\n      const time = parseInt(days[i].getAttribute(\"time\"), 10);\n\n      // Add selected class\n      if (this.start && this.end && this.end >= time && this.start <= time || this.start && !this.end && this.getDateString(this.start, \"YYYY-MM-DD\") === this.getDateString(time, \"YYYY-MM-DD\")) {\n        this.addClass(days[i], this.className + \"__month-day--selected\");\n      } else {\n        this.removeClass(days[i], this.className + \"__month-day--selected\");\n      }\n\n      // Add class to the first day of the range\n      if (this.start && this.getDateString(this.start, \"YYYY-MM-DD\") === this.getDateString(time, \"YYYY-MM-DD\")) {\n        this.addClass(days[i], this.className + \"__month-day--first-day-selected\");\n      } else {\n        this.removeClass(days[i], this.className + \"__month-day--first-day-selected\");\n      }\n\n      // Add class to the last day of the range\n      if (this.end && this.getDateString(this.end, \"YYYY-MM-DD\") === this.getDateString(time, \"YYYY-MM-DD\")) {\n        this.addClass(days[i], this.className + \"__month-day--last-day-selected\");\n      } else {\n        this.removeClass(days[i], this.className + \"__month-day--last-day-selected\");\n      }\n    }\n  }\n  showSelectedInfo() {\n    // Return early if the top bar is disabled\n    if (!this.showTopbar) {\n      // If both dates are set, set the value of our input\n      if (this.start && this.end) {\n        const dateRangeValue = this.getDateString(new Date(this.start)) + this.separator + this.getDateString(new Date(this.end));\n\n        // Set input value\n        this.setValue(dateRangeValue, this.getDateString(new Date(this.start)), this.getDateString(new Date(this.end)));\n        this.changed = true;\n      }\n      return;\n    }\n\n    // Show selected range in top bar\n    const selectedInfo = this.datepicker.getElementsByClassName(this.className + \"__info--selected\")[0];\n    const elStart = selectedInfo.getElementsByClassName(this.className + \"__info-text--start-day\")[0];\n    const elEnd = selectedInfo.getElementsByClassName(this.className + \"__info-text--end-day\")[0];\n    const elSelected = selectedInfo.getElementsByClassName(this.className + \"__info-text--selected-days\")[0];\n    const closeButton = document.getElementById(this.getCloseButtonId());\n    const clearButton = document.getElementById(this.getClearButtonId());\n    const submitButton = document.getElementById(this.getSubmitButtonId());\n\n    // Set default text and hide the count element\n    elStart.textContent = \"...\";\n    elEnd.textContent = \"...\";\n    elSelected.style.display = \"none\";\n\n    // Show first date\n    if (this.start) {\n      selectedInfo.style.display = \"\";\n      elStart.textContent = this.getDateString(new Date(parseInt(this.start, 10)), this.infoFormat);\n      if (this.clearButton) {\n        clearButton.disabled = false;\n        clearButton.setAttribute(\"aria-disabled\", \"false\");\n      }\n    }\n\n    // Show second date\n    if (this.end) {\n      elEnd.textContent = this.getDateString(new Date(parseInt(this.end, 10)), this.infoFormat);\n    }\n\n    // If both dates are set, show the count and set the value of our input\n    if (this.start && this.end) {\n      const count = this.countDays(this.getDateString(new Date(this.end)), this.getDateString(new Date(this.start))) - 1;\n      const countText = count === 1 ? count + \" \" + this.lang(\"night\") : count + \" \" + this.lang(\"nights\");\n      const dateRangeValue = this.getDateString(new Date(this.start)) + this.separator + this.getDateString(new Date(this.end));\n\n      // Show count\n      elSelected.style.display = \"\";\n      elSelected.firstElementChild.textContent = countText;\n      if (!this.inline) {\n        closeButton.disabled = false;\n        closeButton.setAttribute(\"aria-disabled\", \"false\");\n      } else if (this.submitButton) {\n        submitButton.disabled = false;\n        submitButton.setAttribute(\"aria-disabled\", \"false\");\n      }\n\n      // Set input value\n      this.setValue(dateRangeValue, this.getDateString(new Date(this.start)), this.getDateString(new Date(this.end)));\n      this.changed = true;\n    } else if (!this.inline && this.start === false && this.end === false) {\n      closeButton.disabled = false;\n      closeButton.setAttribute(\"aria-disabled\", \"false\");\n    } else if (!this.inline) {\n      // Disable the close button until a valid date range\n      closeButton.disabled = true;\n      closeButton.setAttribute(\"aria-disabled\", \"true\");\n    } else {\n      if (this.submitButton) {\n        // Disable the submit button until a valid date range\n        submitButton.disabled = true;\n        submitButton.setAttribute(\"aria-disabled\", \"true\");\n      }\n    }\n    if (this.clearButton && !this.start && !this.end) {\n      // Disable the clear button until one valid date is selected\n      clearButton.disabled = true;\n      clearButton.setAttribute(\"aria-disabled\", \"true\");\n    }\n  }\n  dayClicked(day) {\n    if (this.hasClass(day, this.className + \"__month-day--invalid\")) {\n      return;\n    }\n    const isSelectStart = this.start && this.end || !this.start && !this.end;\n    const time = parseInt(day.getAttribute(\"time\"), 10);\n\n    // Return early for those days where the checkin or checkout is disabled\n    if (isSelectStart) {\n      if (this.hasClass(day, this.className + \"__month-day--no-checkin\")) {\n        return;\n      }\n    } else if (this.start) {\n      if (this.start > time && this.hasClass(day, this.className + \"__month-day--no-checkin\")) {\n        return;\n      }\n      const startDayEl = this.datepicker.querySelectorAll('td[time=\"' + this.start + '\"]')[0];\n      if (startDayEl) {\n        if (this.hasClass(startDayEl, this.className + \"__month-day--no-checkout\") && this.start > time) {\n          return;\n        }\n      }\n      if (this.hasClass(day, this.className + \"__month-day--no-checkout\") && time > this.start) {\n        return;\n      }\n    }\n    this.addClass(day, this.className + \"__month-day--selected\");\n    if (isSelectStart) {\n      this.start = time;\n      this.end = false;\n    } else if (this.start) {\n      this.end = time;\n    }\n\n    // Swap dates if they are inverted\n    if (this.start && this.end && this.start > this.end) {\n      const tmp = this.end;\n      this.end = this.start;\n      this.start = tmp;\n    }\n    this.start = parseInt(this.start, 10);\n    this.end = parseInt(this.end, 10);\n\n    // Remove hovering class from every day and hide tooltip\n    this.clearHovering();\n\n    // Show hover\n    if (this.start && !this.end) {\n      // Add hovering class\n      this.dayHovering(day);\n    }\n\n    // Check day dates\n    this.updateSelectableRange();\n\n    // Check the selection\n    this.checkSelection();\n\n    // Show selected dates in top bar\n    this.showSelectedInfo();\n\n    // Check dates again after selection\n    if (this.start && this.end) {\n      this.checkAndSetDayClasses();\n    }\n\n    // Show selected days in the calendar\n    this.showSelectedDays();\n\n    // Close the datepicker\n    this.autoclose();\n\n    // Optionally run a function when a day is clicked\n    if (this.onDayClick) {\n      this.onDayClick();\n    }\n\n    // Optionally run a function when a range is selected\n    if (this.end && this.onSelectRange) {\n      this.onSelectRange();\n    }\n\n    // Add aria attributes\n    this.setDayAriaAttributes();\n  }\n  isValidDate(time) {\n    // Check if the date is valid\n    time = parseInt(time, 10);\n    if (this.startDate && this.compareDay(time, this.startDate) < 0 || this.endDate && this.compareDay(time, this.endDate) > 0) {\n      return false;\n    }\n\n    // Update valid dates during the selection\n    if (this.start && !this.end) {\n      // Check maximum/minimum days\n      if (this.maxDays > 0 && this.countDays(time, this.start) > this.maxDays || this.minDays > 0 && this.countDays(time, this.start) > 1 && this.countDays(time, this.start) < this.minDays) {\n        return false;\n      }\n\n      // Check if only multiple of minDays is allowed\n      if (this.minNightsMultiple && (this.countDays(time, this.start) - 1) % 7 !== 0) {\n        return false;\n      }\n\n      // Check if date is before first date of range\n      if (this.selectForward && time < this.start) {\n        return false;\n      }\n\n      // Check the disabled dates\n      if (this.disabledDates.length > 0) {\n        const limit = this.getClosestDisabledDates(new Date(parseInt(this.start, 10)));\n        if (limit[0] && this.compareDay(time, limit[0]) <= 0) {\n          return false;\n        }\n        if (limit[1] && this.compareDay(time, limit[1]) >= 0) {\n          return false;\n        }\n      }\n\n      // Check disabled days of week\n      if (this.disabledDaysOfWeek.length > 0) {\n        const limit = this.getClosestDisabledDays(new Date(parseInt(this.start, 10)));\n        if (limit[0] && this.compareDay(time, limit[0]) <= 0) {\n          return false;\n        }\n        if (limit[1] && this.compareDay(time, limit[1]) >= 0) {\n          return false;\n        }\n      }\n    }\n    return true;\n  }\n  checkSelection() {\n    const numberOfDays = this.countDays(this.end, this.start);\n    const bar = this.showTopbar ? this.datepicker.getElementsByClassName(this.className + \"__info--feedback\")[0] : false;\n    if (this.maxDays && numberOfDays > this.maxDays) {\n      this.start = false;\n      this.end = false;\n\n      // Remove selected class from each day\n      const days = this.datepicker.getElementsByTagName(\"td\");\n      for (let i = 0; i < days.length; i++) {\n        this.removeClass(days[i], this.className + \"__month-day--selected\");\n        this.removeClass(days[i], this.className + \"__month-day--first-day-selected\");\n        this.removeClass(days[i], this.className + \"__month-day--last-day-selected\");\n      }\n      if (this.showTopbar) {\n        // Show error in top bar\n        const errorValue = this.maxDays - 1;\n        this.topBarErrorText(bar, \"error-more\", errorValue);\n      }\n    } else if (this.minDays && numberOfDays < this.minDays) {\n      this.start = false;\n      this.end = false;\n\n      // Remove selected class from each day\n      const days = this.datepicker.getElementsByTagName(\"td\");\n      for (let i = 0; i < days.length; i++) {\n        this.removeClass(days[i], this.className + \"__month-day--selected\");\n        this.removeClass(days[i], this.className + \"__month-day--first-day-selected\");\n        this.removeClass(days[i], this.className + \"__month-day--last-day-selected\");\n      }\n      if (this.showTopbar) {\n        // Show error in top bar\n        const errorValue = this.minDays - 1;\n        this.topBarErrorText(bar, \"error-less\", errorValue);\n      }\n    } else if (this.start || this.end) {\n      if (this.showTopbar) {\n        // Remove error and help classes from top bar\n        this.removeClass(bar, this.className + \"__info--error\");\n        this.removeClass(bar, this.className + \"__info--help\");\n      }\n    } else if (this.showTopbar) {\n      // Show help message\n      this.removeClass(bar, this.className + \"__info--error\");\n      this.addClass(bar, this.className + \"__info--help\");\n    }\n  }\n  addDays(date, days) {\n    // Add xx days to date\n    const result = new Date(date);\n    result.setDate(result.getDate() + days);\n    return result;\n  }\n  substractDays(date, days) {\n    // Substract xx days to date\n    const result = new Date(date);\n    result.setDate(result.getDate() - days);\n    return result;\n  }\n  countDays(start, end) {\n    // Return days between two dates\n    return Math.abs(this.daysFrom1970(start) - this.daysFrom1970(end)) + 1;\n  }\n  compareDay(day1, day2) {\n    // Compare two days: check if day1 is before/after/same day of day2\n    const p = parseInt(this.getDateString(day1, \"YYYYMMDD\"), 10) - parseInt(this.getDateString(day2, \"YYYYMMDD\"), 10);\n    if (p > 0) {\n      return 1;\n    }\n    if (p === 0) {\n      return 0;\n    }\n    return -1;\n  }\n  compareMonth(month1, month2) {\n    // Compare two months: check if month1 is before/after/same month of month2\n    const p = parseInt(this.getDateString(month1, \"YYYYMM\"), 10) - parseInt(this.getDateString(month2, \"YYYYMM\"), 10);\n    if (p > 0) {\n      return 1;\n    }\n    if (p === 0) {\n      return 0;\n    }\n    return -1;\n  }\n  daysFrom1970(t) {\n    // Get days from 1970\n    return Math.round(this.toLocalTimestamp(t) / 86400000);\n  }\n  toLocalTimestamp(t) {\n    // Convert timestamp to local timestamp\n    if (typeof t === \"object\" && t.getTime) {\n      t = t.getTime();\n    }\n    if (typeof t === \"string\" && !t.match(/\\d{13}/)) {\n      t = this.parseDate(t).getTime();\n    }\n    t = parseInt(t, 10) - new Date().getTimezoneOffset() * 60 * 1000;\n    return t;\n  }\n  printAttributes(obj) {\n    // Print object attributes in a DOM element\n    const _obj = obj;\n    let attribute = \"\";\n    for (const attr in obj) {\n      if (Object.prototype.hasOwnProperty.call(_obj, attr)) {\n        attribute += attr + '=\"' + _obj[attr] + '\" ';\n      }\n    }\n    return attribute;\n  }\n  goToNextMonth(e) {\n    let forceBoth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    // Go to the next month\n    const thisMonth = Number.isInteger(e) ? e : e.target.getAttribute(\"month\");\n    const isMonth2 = thisMonth > 1;\n    let nextMonth = isMonth2 ? this.month2 : this.month1;\n    nextMonth = this.getNextMonth(nextMonth);\n\n    // Dont't go to the next month if:\n    // 1. The second month is visible and it is the next month after\n    //    our current month\n    // 2. The month is after the (optional) endDate. There's no need\n    //    to show other months in this case.\n    if (!this.isSingleMonth() && !isMonth2 && this.compareMonth(nextMonth, this.month2) >= 0 || this.isMonthOutOfRange(nextMonth)) {\n      return false;\n    }\n\n    // We can now show the month and proceed\n    if ((this.moveBothMonths || forceBoth) && isMonth2) {\n      this.showMonth(this.month2, 1);\n    }\n    this.showMonth(nextMonth, thisMonth);\n    this.setDayIndexes();\n    this.showSelectedDays();\n    this.disableNextPrevButtons();\n    return true;\n  }\n  goToPreviousMonth(e) {\n    let forceBoth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    // Go to the previous month\n    const thisMonth = Number.isInteger(e) ? e : e.target.getAttribute(\"month\");\n    const isMonth2 = thisMonth > 1;\n    let prevMonth = isMonth2 ? this.month2 : this.month1;\n    prevMonth = this.getPrevMonth(prevMonth);\n\n    // Dont't go to the previous month if:\n    // 1. The click it's in the second month and the month we need is already\n    //    shown in the first month\n    // 2. The month is before the (optional) startDate. There's no need\n    //    to show other months in this case.\n    if (isMonth2 && this.compareMonth(prevMonth, this.month1) <= 0 || this.isMonthOutOfRange(prevMonth)) {\n      return false;\n    }\n\n    // We can now show the month and proceed\n    if ((this.moveBothMonths || forceBoth) && !isMonth2) {\n      this.showMonth(this.month1, 2);\n    }\n    this.showMonth(prevMonth, thisMonth);\n    this.setDayIndexes();\n    this.showSelectedDays();\n    this.disableNextPrevButtons();\n    return true;\n  }\n  isSingleMonth() {\n    // Check if the second month is visible\n    return !this.isVisible(this.getMonthDom(2));\n  }\n  isMonthOutOfRange(month) {\n    const _m = new Date(month.valueOf());\n\n    // Return true for months before the startDate and months after the endDate\n    if (this.startDate && new Date(_m.getFullYear(), _m.getMonth() + 1, 0, 23, 59, 59) < this.startDate || this.endDate && new Date(_m.getFullYear(), _m.getMonth(), 1) > this.endDate) {\n      return true;\n    }\n    return false;\n  }\n\n  // Disable next/prev buttons according to the value of the prev/next\n  // month. We don't want two same months at the same time!\n  disableNextPrevButtons() {\n    if (this.isSingleMonth()) {\n      return;\n    }\n    const month1 = parseInt(this.getDateString(this.month1, \"YYYYMM\"), 10);\n    const month2 = parseInt(this.getDateString(this.month2, \"YYYYMM\"), 10);\n    const d = Math.abs(month1 - month2);\n    const nextButtons = this.datepicker.getElementsByClassName(this.className + \"__month-button--next\");\n    const prevButtons = this.datepicker.getElementsByClassName(this.className + \"__month-button--prev\");\n    if (d > 1 && d !== 89 && !this.moveBothMonths) {\n      this.removeClass(nextButtons[0], this.className + \"__month-button--disabled\");\n      nextButtons[0].setAttribute(\"aria-disabled\", \"false\");\n      this.removeClass(prevButtons[1], this.className + \"__month-button--disabled\");\n      prevButtons[1].setAttribute(\"aria-disabled\", \"false\");\n    } else {\n      this.addClass(nextButtons[0], this.className + \"__month-button--disabled\");\n      nextButtons[0].setAttribute(\"aria-disabled\", \"true\");\n      this.addClass(prevButtons[1], this.className + \"__month-button--disabled\");\n      prevButtons[1].setAttribute(\"aria-disabled\", \"true\");\n    }\n    if (this.isMonthOutOfRange(this.getPrevMonth(this.month1))) {\n      this.addClass(prevButtons[0], this.className + \"__month-button--disabled\");\n      prevButtons[0].setAttribute(\"aria-disabled\", \"true\");\n    } else {\n      this.removeClass(prevButtons[0], this.className + \"__month-button--disabled\");\n      prevButtons[0].setAttribute(\"aria-disabled\", \"false\");\n    }\n    if (this.isMonthOutOfRange(this.getNextMonth(this.month2))) {\n      this.addClass(nextButtons[1], this.className + \"__month-button--disabled\");\n      nextButtons[1].setAttribute(\"aria-disabled\", \"true\");\n    } else {\n      this.removeClass(nextButtons[1], this.className + \"__month-button--disabled\");\n      nextButtons[1].setAttribute(\"aria-disabled\", \"false\");\n    }\n  }\n  topBarDefaultText() {\n    // Return early if the top bar is disabled\n    if (!this.showTopbar) {\n      return;\n    }\n\n    // Show help message on top bar\n    let topBarText = \"\";\n    if (this.minDays && this.maxDays) {\n      if (this.minDays === this.maxDays) {\n        topBarText = this.lang(\"info-range-equal\");\n      } else {\n        topBarText = this.lang(\"info-range\");\n      }\n    } else if (this.minDays && this.minDays > 2) {\n      topBarText = this.lang(\"info-more-plural\");\n    } else if (this.minDays) {\n      topBarText = this.lang(\"info-more\");\n    } else {\n      topBarText = this.lang(\"info-default\");\n    }\n    const bar = this.datepicker.getElementsByClassName(this.className + \"__info--feedback\")[0];\n    topBarText = topBarText.replace(/%d/, this.minDays - 1).replace(/%d/, this.maxDays - 1);\n    this.addClass(bar, this.className + \"__info--help\");\n    this.removeClass(bar, this.className + \"__info--error\");\n    bar.textContent = topBarText;\n  }\n  topBarErrorText(bar, errorText, errorValue) {\n    if (!this.showTopbar) {\n      return;\n    }\n\n    // Show error message on top bar\n    this.addClass(bar, this.className + \"__info--error\");\n    this.removeClass(bar, this.className + \"__info--help\");\n    if (errorValue > 1) {\n      errorText = this.lang(errorText + \"-plural\");\n      errorText = errorText.replace(\"%d\", errorValue);\n      bar.textContent = errorText;\n    } else {\n      errorText = this.lang(errorText);\n    }\n\n    // And hide the selected info\n    const selectedInfo = this.datepicker.getElementsByClassName(this.className + \"__info--selected\")[0];\n    selectedInfo.style.display = \"none\";\n  }\n  updateSelectableRange() {\n    const days = this.datepicker.getElementsByTagName(\"td\");\n    const isSelecting = this.start && !this.end;\n\n    // Add needed classes\n    for (let i = 0; i < days.length; i++) {\n      if (this.hasClass(days[i], this.className + \"__month-day--invalid\") && this.hasClass(days[i], this.className + \"__month-day--tmp\")) {\n        this.removeClass(days[i], this.className + \"__month-day--tmp\");\n        if (this.hasClass(days[i], this.className + \"__month-day--tmpinvalid\")) {\n          this.removeClass(days[i], this.className + \"__month-day--tmpinvalid\");\n        } else {\n          this.removeClass(days[i], this.className + \"__month-day--invalid\");\n          this.addClass(days[i], this.className + \"__month-day--valid\");\n        }\n      }\n\n      // Update day classes during the date range selection\n      if (isSelecting) {\n        if (this.hasClass(days[i], this.className + \"__month-day--visibleMonth\") && (this.hasClass(days[i], this.className + \"__month-day--valid\") || this.hasClass(days[i], this.className + \"__month-day--disabled\") || this.hasClass(days[i], this.className + \"__month-day--before-disabled-date\"))) {\n          const time = parseInt(days[i].getAttribute(\"time\"), 10);\n          if (this.isValidDate(time)) {\n            this.addClass(days[i], this.className + \"__month-day--valid\");\n            this.addClass(days[i], this.className + \"__month-day--tmp\");\n            this.removeClass(days[i], this.className + \"__month-day--invalid\");\n            this.removeClass(days[i], this.className + \"__month-day--disabled\");\n          } else {\n            if (this.hasClass(days[i], this.className + \"__month-day--invalid\")) {\n              this.addClass(days[i], this.className + \"__month-day--tmpinvalid\");\n            }\n            this.addClass(days[i], this.className + \"__month-day--invalid\");\n            this.addClass(days[i], this.className + \"__month-day--tmp\");\n            this.removeClass(days[i], this.className + \"__month-day--valid\");\n          }\n        }\n      } else if (this.hasClass(days[i], this.className + \"__month-day--checkout-enabled\") || this.hasClass(days[i], this.className + \"__month-day--before-disabled-date\")) {\n        // At the end of the selection, restore the disabled/invalid class for\n        // days where the checkout is enabled. We need to check this when the\n        // autoclose option is false. The same for the day just before the\n        // disabled date\n        this.addClass(days[i], this.className + \"__month-day--invalid\");\n        this.removeClass(days[i], this.className + \"__month-day--valid\");\n        if (!this.hasClass(days[i], this.className + \"__month-day--before-disabled-date\")) {\n          this.addClass(days[i], this.className + \"__month-day--disabled\");\n        }\n      }\n    }\n\n    // Set aria attributes\n    this.setDayAriaAttributes();\n    return true;\n  }\n  dayHovering(day) {\n    const hoverTime = parseInt(day.getAttribute(\"time\"), 10);\n    let tooltip = \"\";\n    if (!this.hasClass(day, this.className + \"__month-day--invalid\")) {\n      // Get every td in the months table: our days\n      const days = this.datepicker.getElementsByTagName(\"td\");\n\n      // Iterate each day and add the hovering class\n      for (let i = 0; i < days.length; i++) {\n        const time = parseInt(days[i].getAttribute(\"time\"), 10);\n        if (time === hoverTime) {\n          this.addClass(days[i], this.className + \"__month-day--hovering\");\n        } else {\n          this.removeClass(days[i], this.className + \"__month-day--hovering\");\n        }\n        if (this.start && !this.end && (this.start < time && hoverTime >= time || this.start > time && hoverTime <= time)) {\n          this.addClass(days[i], this.className + \"__month-day--hovering\");\n        } else {\n          this.removeClass(days[i], this.className + \"__month-day--hovering\");\n        }\n      }\n\n      // Generate date range tooltip\n      if (this.start && !this.end) {\n        const nights = this.countDays(hoverTime, this.start) - 1;\n        if (this.hoveringTooltip) {\n          if (typeof this.hoveringTooltip === \"function\") {\n            tooltip = this.hoveringTooltip(nights, this.start, hoverTime);\n          } else if (this.hoveringTooltip === true && nights > 0) {\n            const label = nights === 1 ? this.lang(\"night\") : this.lang(\"nights\");\n            tooltip = nights + \" \" + label;\n          }\n        }\n      }\n    }\n\n    // Show tooltip on hovering and set its position\n    if (tooltip) {\n      const dayBounding = day.getBoundingClientRect();\n      const datepickerBounding = this.datepicker.getBoundingClientRect();\n      let _left = dayBounding.left - datepickerBounding.left;\n      let _top = dayBounding.top - datepickerBounding.top;\n      _left += dayBounding.width / 2;\n      const tooltipContainer = document.getElementById(this.getTooltipId());\n      tooltipContainer.style.display = \"\";\n      tooltipContainer.textContent = tooltip;\n      const w = tooltipContainer.getBoundingClientRect().width;\n      const h = tooltipContainer.getBoundingClientRect().height;\n      _left -= w / 2;\n      _top -= h;\n      setTimeout(() => {\n        tooltipContainer.style.left = _left + \"px\";\n        tooltipContainer.style.top = _top + \"px\";\n      }, 10);\n    } else {\n      const tooltipContainer = document.getElementById(this.getTooltipId());\n      tooltipContainer.style.display = \"none\";\n    }\n  }\n  clearHovering() {\n    // Remove hovering class from every day\n    const days = this.datepicker.getElementsByTagName(\"td\");\n    for (let i = 0; i < days.length; i++) {\n      this.removeClass(days[i], this.className + \"__month-day--hovering\");\n    }\n\n    // Hide the tooltip\n    const tooltipContainer = document.getElementById(this.getTooltipId());\n    tooltipContainer.style.display = \"none\";\n  }\n  clearSelection() {\n    // Reset start and end dates\n    this.start = false;\n    this.end = false;\n\n    // Remove selected classes\n    const days = this.datepicker.getElementsByTagName(\"td\");\n    for (let i = 0; i < days.length; i++) {\n      this.removeClass(days[i], this.className + \"__month-day--selected\");\n      this.removeClass(days[i], this.className + \"__month-day--first-day-selected\");\n      this.removeClass(days[i], this.className + \"__month-day--last-day-selected\");\n      this.removeClass(days[i], this.className + \"__month-day--hovering\");\n    }\n\n    // Reset input\n    this.setValue(\"\");\n\n    // Check the selection\n    this.checkSelection();\n\n    // Show selected dates in top bar\n    this.showSelectedInfo();\n\n    // Show selected days in the calendar\n    this.showSelectedDays();\n  }\n  clearDatepicker() {\n    // Reset start and end dates\n    this.start = false;\n    this.end = false;\n\n    // Remove selected classes\n    const days = this.datepicker.getElementsByTagName(\"td\");\n    for (let i = 0; i < days.length; i++) {\n      this.removeClass(days[i], this.className + \"__month-day--selected\");\n      this.removeClass(days[i], this.className + \"__month-day--first-day-selected\");\n      this.removeClass(days[i], this.className + \"__month-day--last-day-selected\");\n      this.removeClass(days[i], this.className + \"__month-day--hovering\");\n    }\n\n    // Reset input\n    this.setValue(\"\");\n\n    // Show default text in top bar\n    this.topBarDefaultText();\n\n    // Check the selection\n    this.checkSelection();\n\n    // Show selected dates in top bar\n    this.showSelectedInfo();\n\n    // Hide the selected info\n    const selectedInfo = this.datepicker.getElementsByClassName(this.className + \"__info--selected\")[0];\n    selectedInfo.style.display = \"none\";\n\n    // Show selected days in the calendar\n    this.showSelectedDays();\n\n    // Check day dates\n    this.updateSelectableRange();\n\n    // Create event on clear\n    const evt = new CustomEvent(\"afterClear\", {\n      bubbles: true,\n      cancelable: true\n    });\n    this.input.dispatchEvent(evt);\n  }\n  parseDisabledDates() {\n    // Sort disabled dates and store it in property\n    const _tmp = [];\n    this.setFechaI18n();\n    for (let i = 0; i < this.disabledDates.length; i++) {\n      _tmp[i] = fecha.parse(this.disabledDates[i], \"YYYY-MM-DD\");\n    }\n    _tmp.sort((a, b) => {\n      return a - b;\n    });\n    this.disabledDatesTime = _tmp;\n  }\n  getClosestDisabledDates(x) {\n    // This method implements part of the work done by the user Zeta\n    // http://stackoverflow.com/a/11795472\n\n    // Return an array with two elements:\n    // - The closest date on the left\n    // - The closest date on the right\n    let dates = [false, false];\n\n    // If the day is before the first disabled date return early\n    if (x < this.disabledDatesTime[0]) {\n      // Add one day if we want include the checkout\n      if (this.enableCheckout) {\n        dates = [false, this.addDays(this.disabledDatesTime[0], 1)];\n        // Otherwise use the first date of the array\n      } else {\n        dates = [false, this.disabledDatesTime[0]];\n      }\n\n      // If the day is after the last disabled date return early\n    } else if (x > this.disabledDatesTime[this.disabledDatesTime.length - 1]) {\n      dates = [this.disabledDatesTime[this.disabledDatesTime.length - 1], false];\n      // Otherwise calculate the closest dates\n    } else {\n      let bestPrevDate = this.disabledDatesTime.length;\n      let bestNextDate = this.disabledDatesTime.length;\n      const maxDateValue = Math.abs(new Date(0, 0, 0).valueOf());\n      let bestPrevDiff = maxDateValue;\n      let bestNextDiff = -maxDateValue;\n      let currDiff = 0;\n      let i;\n      for (i = 0; i < this.disabledDatesTime.length; ++i) {\n        currDiff = x - this.disabledDatesTime[i];\n        if (currDiff < 0 && currDiff > bestNextDiff) {\n          bestNextDate = i;\n          bestNextDiff = currDiff;\n        }\n        if (currDiff > 0 && currDiff < bestPrevDiff) {\n          bestPrevDate = i;\n          bestPrevDiff = currDiff;\n        }\n      }\n      if (this.disabledDatesTime[bestPrevDate]) {\n        dates[0] = this.disabledDatesTime[bestPrevDate];\n      }\n      if (typeof this.disabledDatesTime[bestPrevDate] === \"undefined\") {\n        dates[1] = false;\n        // Add one day if we want include the checkout\n      } else if (this.enableCheckout) {\n        dates[1] = this.addDays(this.disabledDatesTime[bestNextDate], 1);\n        // Otherwise use the date of the array\n      } else {\n        dates[1] = this.disabledDatesTime[bestNextDate];\n      }\n    }\n    return dates;\n  }\n  getDisabledDays() {\n    const allDays = [];\n    const disabledDays = [];\n    const day = new Date();\n    for (let i = 0; i < 7; i++) {\n      const _date = this.addDays(day, i);\n      allDays[fecha.format(_date, \"d\")] = fecha.format(_date, \"dddd\");\n    }\n    for (let i = 0; i < this.disabledDaysOfWeek.length; i++) {\n      disabledDays.push(allDays.indexOf(this.disabledDaysOfWeek[i]));\n    }\n    disabledDays.sort();\n    this.disabledDaysIndexes = disabledDays;\n  }\n  getClosestDisabledDays(day) {\n    // Return an array with two elements:\n    // - The closest date on the left\n    // - The closest date on the right\n    const dates = [false, false];\n    for (let i = 0; i < 7; i++) {\n      const _date = this.substractDays(day, i);\n      if (this.disabledDaysIndexes.indexOf(parseInt(fecha.format(_date, \"d\"), 10)) > -1) {\n        dates[0] = _date;\n        break;\n      }\n    }\n    for (let i = 0; i < 7; i++) {\n      const _date = this.addDays(day, i);\n      if (this.disabledDaysIndexes.indexOf(parseInt(fecha.format(_date, \"d\"), 10)) > -1) {\n        dates[1] = _date;\n        break;\n      }\n    }\n    return dates;\n  }\n  lang(s) {\n    // Return i18n string\n    return s in this.i18n ? this.i18n[s] : \"\";\n  }\n  emptyElement(element) {\n    // Remove all child elements of a DOM node\n    while (element.firstChild) {\n      element.removeChild(element.firstChild);\n    }\n  }\n\n  // Helper regex for DOM classes\n  classRegex(c) {\n    return new RegExp(\"(^|\\\\s+)\" + c + \"(\\\\s+|$)\");\n  }\n\n  // Check if an element has a class\n  hasClass(el, c) {\n    return this.classRegex(c).test(el.className);\n  }\n\n  // Add a class to the element\n  addClass(el, c) {\n    if (!this.hasClass(el, c)) {\n      el.className = el.className + \" \" + c;\n    }\n  }\n\n  // Remove class from element\n  removeClass(el, c) {\n    el.className = el.className.replace(this.classRegex(c), \" \");\n  }\n  isVisible(element) {\n    // Check if a DOM element is visible\n    return element.offsetWidth || element.offsetHeight || element.getClientRects().length;\n  }\n  slideDown(element, speed) {\n    // Slide down an element\n    element.style.display = \"\";\n    const h = element.getBoundingClientRect().height;\n    element.style.height = 0;\n    this.recalc(element.offsetHeight);\n    element.style.transition = \"height \" + speed;\n    element.style.height = h + \"px\";\n    element.addEventListener(\"transitionend\", () => {\n      element.style.height = element.style.transition = element.style.display = \"\";\n    });\n  }\n  slideUp(element, speed) {\n    // Slide up an element\n    const h = element.getBoundingClientRect().height;\n    element.style.height = h + \"px\";\n    this.recalc(element.offsetHeight);\n    element.style.transition = \"height \" + speed;\n    element.style.height = 0;\n    element.addEventListener(\"transitionend\", () => {\n      element.style.display = \"none\";\n    });\n  }\n  recalc(element) {\n    // Force browser recalculation\n    return element.offsetHeight;\n  }\n  isTouchDevice() {\n    // This *does not* necessarily reflect a touchscreen device!!!\n    // http://www.stucox.com/blog/you-cant-detect-a-touchscreen/\n    return \"ontouchstart\" in window || window.DocumentTouch && document instanceof DocumentTouch;\n  }\n  setDayAriaAttributes() {\n    const days = this.datepicker.getElementsByTagName(\"td\");\n    for (let i = 0; i < days.length; i++) {\n      const classes = days[i].className;\n      const time = parseInt(days[i].getAttribute(\"time\"), 10);\n      let ariaDisabled = \"false\";\n      let ariaLabel = \"\";\n      if (classes.includes(this.className + \"__month-day--invalid\")) {\n        ariaLabel = this.replacei18n(this.i18n[\"aria-disabled\"], fecha.format(time, this.ariaDayFormat));\n        ariaDisabled = \"true\";\n      } else if (classes.includes(this.className + \"__month-day--first-day-selected\")) {\n        ariaLabel = this.replacei18n(this.i18n[\"aria-selected-checkin\"], fecha.format(time, this.ariaDayFormat));\n      } else if (classes.includes(this.className + \"__month-day--last-day-selected\")) {\n        ariaLabel = this.replacei18n(this.i18n[\"aria-selected-checkout\"], fecha.format(time, this.ariaDayFormat));\n      } else if (classes.includes(this.className + \"__month-day--selected\")) {\n        ariaLabel = this.replacei18n(this.i18n[\"aria-selected\"], fecha.format(time, this.ariaDayFormat));\n      } else if (this.start && !this.end) {\n        ariaLabel = this.replacei18n(this.i18n[\"aria-choose-checkout\"], fecha.format(time, this.ariaDayFormat));\n      } else {\n        ariaLabel = this.replacei18n(this.i18n[\"aria-choose-checkin\"], fecha.format(time, this.ariaDayFormat));\n      }\n      if (ariaLabel) {\n        days[i].setAttribute(\"aria-label\", ariaLabel);\n      }\n      days[i].setAttribute(\"aria-disabled\", ariaDisabled);\n    }\n  }\n  replacei18n(string, value) {\n    return string.replace(\"%s\", value);\n  }\n  checkOnFocus(event) {\n    if (event.target && this.input === event.target || this.datepicker.contains(event.target)) {\n      this.isOnFocus = true;\n    } else {\n      this.isOnFocus = false;\n      if (this.isOpen) {\n        this.closeDatepicker();\n      }\n    }\n  }\n  doKeyDown(event) {\n    switch (event.keyCode) {\n      case 39:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.setActiveDay(\"next\");\n        }\n        break;\n      case 37:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.setActiveDay(\"prev\");\n        }\n        break;\n      case 40:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.setActiveDay(\"down\");\n        }\n        break;\n      case 38:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.setActiveDay(\"up\");\n        }\n        break;\n      case 36:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.setActiveDay(\"first\");\n        }\n        break;\n      case 35:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.setActiveDay(\"last\");\n        }\n        break;\n      case 27:\n        if (this.isOnFocus && this.input.offsetParent !== null) {\n          this.setFocusToInput();\n        }\n        break;\n      case 34:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.moveMonthFromKeyboard(\"next\");\n        }\n        break;\n      case 33:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.moveMonthFromKeyboard(\"prev\");\n        }\n        break;\n      case 13:\n        if (this.isOnFocus) {\n          event.preventDefault();\n          this.handleReturn();\n        }\n        break;\n    }\n  }\n  setActiveDay($direction) {\n    const activeEl = document.activeElement;\n    if (activeEl && this.hasClass(activeEl, this.className + \"__month-day--visibleMonth\") && this.datepicker.contains(activeEl)) {\n      const currentIndex = parseInt(activeEl.getAttribute(\"index\"), 10);\n      const currentWeekdayIndex = parseInt(activeEl.getAttribute(\"d\"), 10);\n      let nextIndex = -1;\n      switch ($direction) {\n        case \"next\":\n          nextIndex = currentIndex + 1;\n          break;\n        case \"prev\":\n          nextIndex = currentIndex - 1;\n          break;\n        case \"up\":\n          nextIndex = currentIndex - 7;\n          break;\n        case \"down\":\n          nextIndex = currentIndex + 7;\n          break;\n        case \"first\":\n          if (currentWeekdayIndex === 1) {\n            return false;\n          }\n          nextIndex = currentIndex - (currentWeekdayIndex - 1);\n          break;\n        case \"last\":\n          if (currentWeekdayIndex === 7) {\n            return false;\n          }\n          nextIndex = currentIndex + (7 - currentWeekdayIndex);\n          break;\n      }\n      const nextDay = this.datepicker.querySelectorAll('[index=\"' + nextIndex + '\"]');\n      if (nextDay.length > 0 && nextIndex > 0) {\n        this.setDayFocus(nextDay[0]);\n      } else if (nextIndex > 0) {\n        let nextDay = \"\";\n        const gone = this.goToNextMonth(2, true);\n        if (gone) {\n          const month = this.datepicker.getElementsByClassName(this.className + \"__month--month2\");\n          if (month.length > 0) {\n            if ($direction === \"down\") {\n              nextDay = month[0].querySelectorAll(\".\" + this.className + '__month-day--visibleMonth[d=\"' + currentWeekdayIndex + '\"]');\n            } else if ($direction === \"last\") {\n              const nextWeekdayIndex = currentWeekdayIndex + (7 - currentWeekdayIndex);\n              nextDay = month[0].querySelectorAll(\".\" + this.className + '__month-day--visibleMonth[d=\"' + nextWeekdayIndex + '\"]');\n            } else {\n              nextDay = month[0].querySelectorAll(\".\" + this.className + \"__month-day--visibleMonth\");\n            }\n            if (nextDay.length > 0) {\n              this.setDayFocus(nextDay[0]);\n            }\n          }\n        }\n      } else if (nextIndex <= 0) {\n        let prevDay = \"\";\n        const gone = this.goToPreviousMonth(1, true);\n        if (gone) {\n          const month = this.datepicker.getElementsByClassName(this.className + \"__month--month1\");\n          if (month.length > 0) {\n            if ($direction === \"up\") {\n              prevDay = month[0].querySelectorAll(\".\" + this.className + '__month-day--visibleMonth[d=\"' + currentWeekdayIndex + '\"]');\n            } else if ($direction === \"first\") {\n              const prevWeekdayIndex = currentWeekdayIndex - (currentWeekdayIndex - 1);\n              prevDay = month[0].querySelectorAll(\".\" + this.className + '__month-day--visibleMonth[d=\"' + prevWeekdayIndex + '\"]');\n            } else {\n              prevDay = month[0].querySelectorAll(\".\" + this.className + \"__month-day--visibleMonth\");\n            }\n            if (prevDay.length > 0) {\n              this.setDayFocus(prevDay[prevDay.length - 1]);\n            }\n          }\n        }\n      }\n    } else {\n      this.setInitialActiveDay();\n    }\n  }\n  setInitialActiveDay() {\n    // Check if today is visible\n    const today = this.datepicker.getElementsByClassName(this.className + \"__month-day--today\");\n    if (today.length > 0) {\n      this.setDayFocus(today[0]);\n      return today[0];\n    }\n\n    // Check if check-in is visible\n    const checkin = this.datepicker.getElementsByClassName(this.className + \"__month-day--first-day-selected\");\n    if (checkin.length > 0) {\n      this.setDayFocus(checkin[0]);\n      return checkin[0];\n    }\n\n    // Get first visible day\n    const visibleDay = this.datepicker.getElementsByClassName(this.className + \"__month-day--visibleMonth\");\n    if (visibleDay.length > 0) {\n      this.setDayFocus(visibleDay[0]);\n      return visibleDay[0];\n    }\n  }\n  setDayFocus(day) {\n    const days = this.datepicker.getElementsByTagName(\"td\");\n    this.removeDaysTabIndex(days);\n    day.setAttribute(\"tabindex\", \"0\");\n    day.focus();\n    if (this.start && !this.end) {\n      this.dayHovering(day);\n    }\n  }\n  removeDaysTabIndex(days) {\n    for (let i = 0; i < days.length; i++) {\n      days[i].removeAttribute(\"tabindex\");\n    }\n  }\n  setDayIndexes() {\n    const days = this.datepicker.getElementsByTagName(\"td\");\n    this.dayIndex = 1;\n    for (let i = 0; i < days.length; i++) {\n      if (this.hasClass(days[i], this.className + \"__month-day--visibleMonth\")) {\n        days[i].setAttribute(\"index\", this.dayIndex);\n        this.dayIndex++;\n      } else {\n        days[i].setAttribute(\"index\", 0);\n      }\n    }\n  }\n  setFocusToInput() {\n    this.input.focus();\n    this.closeDatepicker();\n    this.clearHovering();\n    this.justEsc = true;\n    this.isOnFocus = false;\n  }\n  moveMonthFromKeyboard($direction) {\n    if ($direction === \"prev\") {\n      this.goToPreviousMonth(1, true);\n    } else {\n      this.goToNextMonth(2, true);\n    }\n  }\n  handleReturn() {\n    const activeEl = document.activeElement;\n    if (activeEl && this.datepicker.contains(activeEl) && (this.hasClass(activeEl, this.className + \"__month-day--visibleMonth\") || this.hasClass(activeEl, this.className + \"__month-button\") || this.hasClass(activeEl, this.className + \"__close-button\") || this.hasClass(activeEl, this.className + \"__clear-button\") || this.hasClass(activeEl, this.className + \"__submit-button\"))) {\n      activeEl.click();\n    }\n  }\n\n  // ------------------ //\n  //   PUBLIC METHODS   //\n  // ------------------ //\n\n  open() {\n    this.openDatepicker();\n  }\n  close() {\n    this.closeDatepicker();\n  }\n  getDatePicker() {\n    return this.datepicker;\n  }\n  setRange(d1, d2) {\n    if (typeof d1 === \"string\" && typeof d2 === \"string\") {\n      d1 = this.parseDate(d1);\n      d2 = this.parseDate(d2);\n    } else {\n      d1 = new Date(d1.getTime());\n      d2 = new Date(d2.getTime());\n    }\n    this.setDateRange(d1, d2);\n  }\n  clear() {\n    this.clearSelection();\n  }\n  getNights() {\n    let count = 0;\n    if (this.start && this.end) {\n      count = this.countDays(this.end, this.start) - 1;\n    } else {\n      const value = this.getValue();\n      const dates = value ? value.split(this.separator) : \"\";\n      if (dates && dates.length >= 2) {\n        const _format = this.format;\n        count = this.countDays(this.parseDate(dates[0], _format), this.parseDate(dates[1], _format)) - 1;\n      }\n    }\n    return count;\n  }\n  destroy() {\n    if (document.getElementById(this.getDatepickerId())) {\n      this.removeAllBoundedListeners(this.input, \"click\");\n      this.removeAllBoundedListeners(document, \"click\");\n      this.removeAllBoundedListeners(this.input, \"change\");\n      this.datepicker.parentNode.removeChild(this.datepicker);\n    }\n  }\n}\n\nexport { HotelDatepicker as default };\n"]}