{"version":3,"sources":["datepicker-full.js","vanilla-datepicker.js"],"names":["lastItemOf","arr","length","pushUnique","items","forEach","item","includes","push","stringToArray","str","separator","split","isInRange","testVal","min","max","undefined","limitToRange","val","createTagRepeat","tagName","repeat","attributes","index","html","Object","keys","reduce","src","attr","next","optimizeTemplateHTML","replace","stripTime","timeValue","Date","setHours","today","dateValue","args","newDate","setFullYear","addDays","date","amount","setDate","getDate","addMonths","monthsToSet","getMonth","expectedMonth","time","setMonth","addYears","getFullYear","dayDiff","day","from","dayOfTheWeekOf","baseDate","dayOfWeek","weekStart","baseDay","getDay","calcWeekNum","dayOfTheWeek","sameDayOfFirstWeek","Math","round","getIsoWeek","thuOfTheWeek","calcTraditionalWeekNumber","startOfFirstWeek","startOfTheWeek","weekNum","getWesternTradWeek","getMidEasternWeek","startOfYearPeriod","years","year","floor","regularizeDate","timeSpan","useLastDate","reFormatTokens","reNonDateParts","knownFormats","parseFns","y","parseInt","m","month","locale","monthIndex","isNaN","NaN","monthName","toLowerCase","compareNames","name","startsWith","monthsShort","findIndex","months","normalizeMonth","getTime","d","formatFns","dd","padZero","D","daysShort","DD","days","mm","M","MM","yy","slice","yyyy","num","toString","padStart","parseFormatString","format","Error","separators","parts","match","RegExp","partFormatters","map","token","partParserKeys","key","find","part","parser","dateStr","dateParts","dtParts","origDate","formatter","fn","parseDate","toValue","formatDate","dateObj","toDisplay","range","document","createRange","parseHTML","createContextualFragment","getParent","el","parentElement","parentNode","ShadowRoot","host","isActiveElement","getRootNode","activeElement","hideElement","style","display","dataset","styleDisplay","showElement","emptyChildNodes","firstChild","removeChild","listenerRegistry","WeakMap","addEventListener","removeEventListener","EventTarget","prototype","registerListeners","keyObj","listeners","registered","get","set","listener","call","unregisterListeners","delete","Event","composedPath","getComposedPath","node","path","parent","defaultView","this","target","findFromPath","criteria","currentTarget","rest","findElementInEventPath","ev","selector","Element","matches","locales","en","daysMin","clear","titleFormat","defaultOptions","autohide","beforeShowDay","beforeShowDecade","beforeShowMonth","beforeShowYear","clearButton","dateDelimiter","datesDisabled","daysOfWeekDisabled","daysOfWeekHighlighted","defaultViewDate","disableTouchKeyboard","enableOnReadonly","language","maxDate","maxNumberOfDates","maxView","minDate","nextArrow","orientation","pickLevel","prevArrow","showDaysOfWeek","showOnClick","showOnFocus","startView","title","todayButton","todayButtonMode","todayHighlight","updateOnBlur","weekNumbers","defaultLang","defaultFormat","defaultWeekStart","sanitizeDOW","dow","determineGetWeekMethod","numberingMode","updateWeekStart","newValue","config","weekEnd","getWeekNumber","validateDate","value","origValue","validateViewId","viewId","replaceOptions","options","to","convert","processOptions","datepicker","inOpts","assign","constructor","rangeEnd","rangeSideIndex","lang","origLocale","hasToDisplay","hasToValue","validFormatString","test","newPickLevel","minDt","maxDt","defaultMinDt","dtsDisabled","checkDisabled","disabled","dates","dt","viewDate","wkStart","Number","method","startOfWeek","multidate","String","newMaxView","newStartView","childNodes","x","entries","defaultShortcutKeys","show","hide","toggle","prevButton","ctrlOrMetaKey","nextButton","viewSwitch","exitEditMode","getButtons","buttonList","classes","join","pickerTemplate","daysTemplate","class","weekNumbersTemplate","View","picker","element","selected","isRangeEnd","init","isMinView","id","setOptions","updateFocus","updateSelection","prepareForRender","switchLabel","prevButtonDisabled","nextButtonDisabled","setViewSwitchLabel","setPrevButtonDisabled","setNextButtonDisabled","setDisabled","classList","add","performBeforeHook","result","beforeShow","enabled","extraClasses","content","newChildNodes","DocumentFragment","appendChild","replaceChildNodes","renderCell","cellVal","outOfScope","textContent","className","cellClass","first","last","rangeStart","focused","refreshCell","remove","changeFocusedCell","cellIndex","grid","querySelectorAll","children","DaysView","super","onConstruction","inner","lastChild","updateDOW","dayNames","switchLabelFormat","weeksElem","weeks","insertBefore","Array","viewYear","viewMonth","firstOfMonth","start","rangepicker","render","dateOfWeekStart","current","refresh","refreshFocus","computeMonthRange","thisYear","startY","startM","endY","endM","MonthsView","ix","monthNames","minYear","minMonth","minDateObj","maxYear","maxMonth","maxDateObj","yrOutOfRange","isMinYear","isMaxYear","YearsView","word","navStep","step","beforeShowOption","ch","toUpperCase","triggerDatepickerEvent","type","bubbles","cancelable","detail","currentView","dispatchEvent","CustomEvent","goToPrevOrNext","direction","newViewDate","changeFocus","switchView","changeView","clearSelection","goToOrSelectToday","currentDate","forceRefresh","setFocusedDate","unfocus","onBlur","update","revert","once","goToSelectedMonthOrYear","selection","onClickViewSwitch","onClickPrevButton","onClickNextButton","onClickView","contains","data","onMousedownPicker","preventDefault","orientClasses","obj","toPx","processPickerOptions","controls","cloneNode","computeResetViewDate","setViewDate","_oldViewDate","getTextDirection","window","getComputedStyle","findScrollParents","body","overflow","Picker","inputField","template","buttonClass","header","main","footer","firstElementChild","lastElementChild","elementClass","bind","views","container","after","view","detach","active","inputDirection","dir","removeAttribute","place","blur","width","calendarWidth","height","calendarHeight","getBoundingClientRect","offsetParent","left","inputLeft","top","inputTop","right","inputRight","bottom","inputBottom","inputWidth","inputHeight","orientX","orientY","offsetParentRect","scrollLeft","scrollTop","scrollX","scrollY","scrollParent","scrollAreaLeft","scrollAreaTop","clientWidth","scrollAreaRight","clientHeight","scrollAreaBottom","documentElement","scrollParentRect","adjustment","values","labelText","_oldView","_renderMethod","quickRender","oldView","oldViewDate","renderMethod","replaceChild","findNextAvailableOne","addFn","increase","testFn","moveByArrowKey","vertical","onKeydown","editMode","altKey","shiftKey","ctrlKey","metaKey","cancelEvent","stopPropagation","shortcutKeys","keyInfo","shortcut","keyDef","prop","action","isArray","apply","handleArrowKeyPress","enterEditMode","onFocus","_showing","onMousedown","_active","_clicking","setTimeout","onClickInput","clearTimeout","onPaste","clipboardData","types","onClickOutside","pickerElem","stringifyDates","processInputDates","inputDates","origDates","newDates","filter","refreshUI","mode","newView","getOutputConverter","Datepicker","HTMLElement","querySelector","inputs","indexOf","datepickers","_options","keyDefs","normalizedDef","createShortcutKeyConfig","initialDates","inputDateValues","keydownListener","pickerElement","newOptions","readOnly","focus","destroy","callback","opts","lastArg","pop","getFocusedDate","resetView","forceRender","filterOptions","newOpts","allowOneSidedRange","onChangeDate","_updating","datepicker0","datepicker1","setDateOptions","changedSide","otherSide","changedDate","otherDate","DateRangePicker","freeze","changeDateListener","cleanOptions","input","setupDatepicker","defineProperty","getDates","setDates","input0","input1","origDate0","origDate1","getMaterialSymbolSVG","materialSymbolsUrl","initDateInput","inputWrapper","cancelIcon","calendarIconSVG","calendarIcon","createElement","innerHTML","dateResetBtn","mapDate","getMinMaxDate","dataObject","vanilla_datepicker_i18n","initVanillaDatepickerDropdown","dropdownElement","getElementById","dropdownId","filterReset","datepickerInput","datepickerRadio","dateCheckbox","targetId","chooseDateCheckboxes","checkbox","event","checked","getAttribute","now","cmsNativeLanguage","click","parsed","dateString","regex","exec","monthParser","radio","$","trigger","minMaxDate","e"],"mappings":"CAAA,WACA,aAEA,SAAAA,EAAAC,GACA,OAAAA,EAAAA,EAAAC,OAAA,EACA,CAGA,SAAAC,EAAAF,KAAAG,GAOA,OANAA,EAAAC,SAAAC,IACAL,EAAAM,SAAAD,IAGAL,EAAAO,KAAAF,EAAA,IAEAL,CACA,CAEA,SAAAQ,EAAAC,EAAAC,GAEA,OAAAD,EAAAA,EAAAE,MAAAD,GAAA,EACA,CAEA,SAAAE,EAAAC,EAAAC,EAAAC,GAGA,YAFAC,IAAAF,GAAAD,GAAAC,UACAE,IAAAD,GAAAF,GAAAE,EAEA,CAEA,SAAAE,EAAAC,EAAAJ,EAAAC,GACA,OAAAG,EAAAJ,EACAA,EAEAI,EAAAH,EACAA,EAEAG,CACA,CAEA,SAAAC,EAAAC,EAAAC,EAAAC,EAAA,CAAA,EAAAC,EAAA,EAAAC,EAAA,IAQAA,GAAA,IAPAC,OAAAC,KAAAJ,GAAAK,QAAA,CAAAC,EAAAC,KACA,IAAAX,EAAAI,EAAAO,GAIA,MAHA,mBAAAX,IACAA,EAAAA,EAAAK,IAEA,GAAAK,KAAAC,MAAAX,IAAA,GACAE,QACAA,KAEA,MAAAU,EAAAP,EAAA,EACA,OAAAO,EAAAT,E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GA,IAAAsP,OAAAyJ,gBAAAlS,EAAA,CACAiJ,YAAA,MACAtP,aAAA,EACAQ,SAAAya,kBACA3Z,aAAA,EACAC,gBAAA,EACAV,YACAG,eACA2a,GACA,GACA","file":"../datepicker-bundle.min.js","sourcesContent":["(function () {\n  'use strict';\n\n  function lastItemOf(arr) {\n    return arr[arr.length - 1];\n  }\n\n  // push only the items not included in the array\n  function pushUnique(arr, ...items) {\n    items.forEach((item) => {\n      if (arr.includes(item)) {\n        return;\n      }\n      arr.push(item);\n    });\n    return arr;\n  }\n\n  function stringToArray(str, separator) {\n    // convert empty string to an empty array\n    return str ? str.split(separator) : [];\n  }\n\n  function isInRange(testVal, min, max) {\n    const minOK = min === undefined || testVal >= min;\n    const maxOK = max === undefined || testVal <= max;\n    return minOK && maxOK;\n  }\n\n  function limitToRange(val, min, max) {\n    if (val < min) {\n      return min;\n    }\n    if (val > max) {\n      return max;\n    }\n    return val;\n  }\n\n  function createTagRepeat(tagName, repeat, attributes = {}, index = 0, html = '') {\n    const openTagSrc = Object.keys(attributes).reduce((src, attr) => {\n      let val = attributes[attr];\n      if (typeof val === 'function') {\n        val = val(index);\n      }\n      return `${src} ${attr}=\"${val}\"`;\n    }, tagName);\n    html += `<${openTagSrc}></${tagName}>`;\n\n    const next = index + 1;\n    return next < repeat\n      ? createTagRepeat(tagName, repeat, attributes, next, html)\n      : html;\n  }\n\n  // Remove the spacing surrounding tags for HTML parser not to create text nodes\n  // before/after elements\n  function optimizeTemplateHTML(html) {\n    return html.replace(/>\\s+/g, '>').replace(/\\s+</, '<');\n  }\n\n  function stripTime(timeValue) {\n    return new Date(timeValue).setHours(0, 0, 0, 0);\n  }\n\n  function today() {\n    return new Date().setHours(0, 0, 0, 0);\n  }\n\n  // Get the time value of the start of given date or year, month and day\n  function dateValue(...args) {\n    switch (args.length) {\n      case 0:\n        return today();\n      case 1:\n        return stripTime(args[0]);\n    }\n\n    // use setFullYear() to keep 2-digit year from being mapped to 1900-1999\n    const newDate = new Date(0);\n    newDate.setFullYear(...args);\n    return newDate.setHours(0, 0, 0, 0);\n  }\n\n  function addDays(date, amount) {\n    const newDate = new Date(date);\n    return newDate.setDate(newDate.getDate() + amount);\n  }\n\n  function addWeeks(date, amount) {\n    return addDays(date, amount * 7);\n  }\n\n  function addMonths(date, amount) {\n    // If the day of the date is not in the new month, the last day of the new\n    // month will be returned. e.g. Jan 31 + 1 month → Feb 28 (not Mar 03)\n    const newDate = new Date(date);\n    const monthsToSet = newDate.getMonth() + amount;\n    let expectedMonth = monthsToSet % 12;\n    if (expectedMonth < 0) {\n      expectedMonth += 12;\n    }\n\n    const time = newDate.setMonth(monthsToSet);\n    return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time;\n  }\n\n  function addYears(date, amount) {\n    // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the\n    // new year will be returned.\n    const newDate = new Date(date);\n    const expectedMonth = newDate.getMonth();\n    const time = newDate.setFullYear(newDate.getFullYear() + amount);\n    return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time;\n  }\n\n  // Calculate the distance bettwen 2 days of the week\n  function dayDiff(day, from) {\n    return (day - from + 7) % 7;\n  }\n\n  // Get the date of the specified day of the week of given base date\n  function dayOfTheWeekOf(baseDate, dayOfWeek, weekStart = 0) {\n    const baseDay = new Date(baseDate).getDay();\n    return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n  }\n\n  function calcWeekNum(dayOfTheWeek, sameDayOfFirstWeek) {\n    return Math.round((dayOfTheWeek - sameDayOfFirstWeek) / 604800000) + 1;\n  }\n\n  // Get the ISO week number of a date\n  function getIsoWeek(date) {\n    // - Start of ISO week is Monday\n    // - Use Thursday for culculation because the first Thursday of ISO week is\n    //   always in January\n    const thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n    // - Week 1 in ISO week is the week including Jan 04\n    // - Use the Thu of given date's week (instead of given date itself) to\n    //   calculate week 1 of the year so that Jan 01 - 03 won't be miscalculated\n    //   as week 0 when Jan 04 is Mon - Wed\n    const firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n    // return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n    return calcWeekNum(thuOfTheWeek, firstThu);\n  }\n\n  // Calculate week number in traditional week number system\n  // @see https://en.wikipedia.org/wiki/Week#Other_week_numbering_systems\n  function calcTraditionalWeekNumber(date, weekStart) {\n    // - Week 1 of traditional week is the week including the Jan 01\n    // - Use Jan 01 of given date's year to calculate the start of week 1\n    const startOfFirstWeek = dayOfTheWeekOf(new Date(date).setMonth(0, 1), weekStart, weekStart);\n    const startOfTheWeek = dayOfTheWeekOf(date, weekStart, weekStart);\n    const weekNum = calcWeekNum(startOfTheWeek, startOfFirstWeek);\n    if (weekNum < 53) {\n      return weekNum;\n    }\n    // If the 53rd week includes Jan 01, it's actually next year's week 1\n    const weekOneOfNextYear = dayOfTheWeekOf(new Date(date).setDate(32), weekStart, weekStart);\n    return startOfTheWeek === weekOneOfNextYear ? 1 : weekNum;\n  }\n\n  // Get the Western traditional week number of a date\n  function getWesternTradWeek(date) {\n    // Start of Western traditionl week is Sunday\n    return calcTraditionalWeekNumber(date, 0);\n  }\n\n  // Get the Middle Eastern week number of a date\n  function getMidEasternWeek(date) {\n    // Start of Middle Eastern week is Saturday\n    return calcTraditionalWeekNumber(date, 6);\n  }\n\n  // Get the start year of the period of years that includes given date\n  // years: length of the year period\n  function startOfYearPeriod(date, years) {\n    /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n    const year = new Date(date).getFullYear();\n    return Math.floor(year / years) * years;\n  }\n\n  // Convert date to the first/last date of the month/year of the date\n  function regularizeDate(date, timeSpan, useLastDate) {\n    if (timeSpan !== 1 && timeSpan !== 2) {\n      return date;\n    }\n    const newDate = new Date(date);\n    if (timeSpan === 1) {\n      useLastDate\n        ? newDate.setMonth(newDate.getMonth() + 1, 0)\n        : newDate.setDate(1);\n    } else {\n      useLastDate\n        ? newDate.setFullYear(newDate.getFullYear() + 1, 0, 0)\n        : newDate.setMonth(0, 1);\n    }\n    return newDate.setHours(0, 0, 0, 0);\n  }\n\n  // pattern for format parts\n  const reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n  // pattern for non date parts\n  const reNonDateParts = /[\\s!-/:-@[-`{-~年月日]+/;\n  // cache for persed formats\n  let knownFormats = {};\n  // parse funtions for date parts\n  const parseFns = {\n    y(date, year) {\n      return new Date(date).setFullYear(parseInt(year, 10));\n    },\n    m(date, month, locale) {\n      const newDate = new Date(date);\n      let monthIndex = parseInt(month, 10) - 1;\n\n      if (isNaN(monthIndex)) {\n        if (!month) {\n          return NaN;\n        }\n\n        const monthName = month.toLowerCase();\n        const compareNames = name => name.toLowerCase().startsWith(monthName);\n        // compare with both short and full names because some locales have periods\n        // in the short names (not equal to the first X letters of the full names)\n        monthIndex = locale.monthsShort.findIndex(compareNames);\n        if (monthIndex < 0) {\n          monthIndex = locale.months.findIndex(compareNames);\n        }\n        if (monthIndex < 0) {\n          return NaN;\n        }\n      }\n\n      newDate.setMonth(monthIndex);\n      return newDate.getMonth() !== normalizeMonth(monthIndex)\n        ? newDate.setDate(0)\n        : newDate.getTime();\n    },\n    d(date, day) {\n      return new Date(date).setDate(parseInt(day, 10));\n    },\n  };\n  // format functions for date parts\n  const formatFns = {\n    d(date) {\n      return date.getDate();\n    },\n    dd(date) {\n      return padZero(date.getDate(), 2);\n    },\n    D(date, locale) {\n      return locale.daysShort[date.getDay()];\n    },\n    DD(date, locale) {\n      return locale.days[date.getDay()];\n    },\n    m(date) {\n      return date.getMonth() + 1;\n    },\n    mm(date) {\n      return padZero(date.getMonth() + 1, 2);\n    },\n    M(date, locale) {\n      return locale.monthsShort[date.getMonth()];\n    },\n    MM(date, locale) {\n      return locale.months[date.getMonth()];\n    },\n    y(date) {\n      return date.getFullYear();\n    },\n    yy(date) {\n      return padZero(date.getFullYear(), 2).slice(-2);\n    },\n    yyyy(date) {\n      return padZero(date.getFullYear(), 4);\n    },\n  };\n\n  // get month index in normal range (0 - 11) from any number\n  function normalizeMonth(monthIndex) {\n    return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n  }\n\n  function padZero(num, length) {\n    return num.toString().padStart(length, '0');\n  }\n\n  function parseFormatString(format) {\n    if (typeof format !== 'string') {\n      throw new Error(\"Invalid date format.\");\n    }\n    if (format in knownFormats) {\n      return knownFormats[format];\n    }\n\n    // sprit the format string into parts and seprators\n    const separators = format.split(reFormatTokens);\n    const parts = format.match(new RegExp(reFormatTokens, 'g'));\n    if (separators.length === 0 || !parts) {\n      throw new Error(\"Invalid date format.\");\n    }\n\n    // collect format functions used in the format\n    const partFormatters = parts.map(token => formatFns[token]);\n\n    // collect parse function keys used in the format\n    // iterate over parseFns' keys in order to keep the order of the keys.\n    const partParserKeys = Object.keys(parseFns).reduce((keys, key) => {\n      const token = parts.find(part => part[0] !== 'D' && part[0].toLowerCase() === key);\n      if (token) {\n        keys.push(key);\n      }\n      return keys;\n    }, []);\n\n    return knownFormats[format] = {\n      parser(dateStr, locale) {\n        const dateParts = dateStr.split(reNonDateParts).reduce((dtParts, part, index) => {\n          if (part.length > 0 && parts[index]) {\n            const token = parts[index][0];\n            if (token === 'M') {\n              dtParts.m = part;\n            } else if (token !== 'D') {\n              dtParts[token] = part;\n            }\n          }\n          return dtParts;\n        }, {});\n\n        // iterate over partParserkeys so that the parsing is made in the oder\n        // of year, month and day to prevent the day parser from correcting last\n        // day of month wrongly\n        return partParserKeys.reduce((origDate, key) => {\n          const newDate = parseFns[key](origDate, dateParts[key], locale);\n          // ingnore the part failed to parse\n          return isNaN(newDate) ? origDate : newDate;\n        }, today());\n      },\n      formatter(date, locale) {\n        let dateStr = partFormatters.reduce((str, fn, index) => {\n          return str += `${separators[index]}${fn(date, locale)}`;\n        }, '');\n        // separators' length is always parts' length + 1,\n        return dateStr += lastItemOf(separators);\n      },\n    };\n  }\n\n  function parseDate(dateStr, format, locale) {\n    if (dateStr instanceof Date || typeof dateStr === 'number') {\n      const date = stripTime(dateStr);\n      return isNaN(date) ? undefined : date;\n    }\n    if (!dateStr) {\n      return undefined;\n    }\n    if (dateStr === 'today') {\n      return today();\n    }\n\n    if (format && format.toValue) {\n      const date = format.toValue(dateStr, format, locale);\n      return isNaN(date) ? undefined : stripTime(date);\n    }\n\n    return parseFormatString(format).parser(dateStr, locale);\n  }\n\n  function formatDate(date, format, locale) {\n    if (isNaN(date) || (!date && date !== 0)) {\n      return '';\n    }\n\n    const dateObj = typeof date === 'number' ? new Date(date) : date;\n\n    if (format.toDisplay) {\n      return format.toDisplay(dateObj, format, locale);\n    }\n\n    return parseFormatString(format).formatter(dateObj, locale);\n  }\n\n  const range = document.createRange();\n\n  function parseHTML(html) {\n    return range.createContextualFragment(html);\n  }\n\n  function getParent(el) {\n    return el.parentElement\n      || (el.parentNode instanceof ShadowRoot ? el.parentNode.host : undefined);\n  }\n\n  function isActiveElement(el) {\n    return el.getRootNode().activeElement === el;\n  }\n\n  function hideElement(el) {\n    if (el.style.display === 'none') {\n      return;\n    }\n    // back up the existing display setting in data-style-display\n    if (el.style.display) {\n      el.dataset.styleDisplay = el.style.display;\n    }\n    el.style.display = 'none';\n  }\n\n  function showElement(el) {\n    if (el.style.display !== 'none') {\n      return;\n    }\n    if (el.dataset.styleDisplay) {\n      // restore backed-up dispay property\n      el.style.display = el.dataset.styleDisplay;\n      delete el.dataset.styleDisplay;\n    } else {\n      el.style.display = '';\n    }\n  }\n\n  function emptyChildNodes(el) {\n    if (el.firstChild) {\n      el.removeChild(el.firstChild);\n      emptyChildNodes(el);\n    }\n  }\n\n  function replaceChildNodes(el, newChildNodes) {\n    emptyChildNodes(el);\n    if (newChildNodes instanceof DocumentFragment) {\n      el.appendChild(newChildNodes);\n    } else if (typeof newChildNodes === 'string') {\n      el.appendChild(parseHTML(newChildNodes));\n    } else if (typeof newChildNodes.forEach === 'function') {\n      newChildNodes.forEach((node) => {\n        el.appendChild(node);\n      });\n    }\n  }\n\n  const listenerRegistry = new WeakMap();\n  const {addEventListener, removeEventListener} = EventTarget.prototype;\n\n  // Register event listeners to a key object\n  // listeners: array of listener definitions;\n  //   - each definition must be a flat array of event target and the arguments\n  //     used to call addEventListener() on the target\n  function registerListeners(keyObj, listeners) {\n    let registered = listenerRegistry.get(keyObj);\n    if (!registered) {\n      registered = [];\n      listenerRegistry.set(keyObj, registered);\n    }\n    listeners.forEach((listener) => {\n      addEventListener.call(...listener);\n      registered.push(listener);\n    });\n  }\n\n  function unregisterListeners(keyObj) {\n    let listeners = listenerRegistry.get(keyObj);\n    if (!listeners) {\n      return;\n    }\n    listeners.forEach((listener) => {\n      removeEventListener.call(...listener);\n    });\n    listenerRegistry.delete(keyObj);\n  }\n\n  // Event.composedPath() polyfill for Edge\n  // based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\n  if (!Event.prototype.composedPath) {\n    const getComposedPath = (node, path = []) => {\n      path.push(node);\n\n      let parent;\n      if (node.parentNode) {\n        parent = node.parentNode;\n      } else if (node.host) { // ShadowRoot\n        parent = node.host;\n      } else if (node.defaultView) {  // Document\n        parent = node.defaultView;\n      }\n      return parent ? getComposedPath(parent, path) : path;\n    };\n\n    Event.prototype.composedPath = function () {\n      return getComposedPath(this.target);\n    };\n  }\n\n  function findFromPath(path, criteria, currentTarget) {\n    const [node, ...rest] = path;\n    if (criteria(node)) {\n      return node;\n    }\n    if (node === currentTarget || node.tagName === 'HTML' || rest.length === 0) {\n      // stop when reaching currentTarget or <html>\n      return;\n    }\n    return findFromPath(rest, criteria, currentTarget);\n  }\n\n  // Search for the actual target of a delegated event\n  function findElementInEventPath(ev, selector) {\n    const criteria = typeof selector === 'function'\n      ? selector\n      : el => el instanceof Element && el.matches(selector);\n    return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n  }\n\n  // default locales\n  const locales = {\n    en: {\n      days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n      daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n      daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n      months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n      monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n      today: \"Today\",\n      clear: \"Clear\",\n      titleFormat: \"MM y\"\n    }\n  };\n\n  // config options updatable by setOptions() and their default values\n  const defaultOptions = {\n    autohide: false,\n    beforeShowDay: null,\n    beforeShowDecade: null,\n    beforeShowMonth: null,\n    beforeShowYear: null,\n    clearButton: false,\n    dateDelimiter: ',',\n    datesDisabled: [],\n    daysOfWeekDisabled: [],\n    daysOfWeekHighlighted: [],\n    defaultViewDate: undefined, // placeholder, defaults to today() by the program\n    disableTouchKeyboard: false,\n    enableOnReadonly: true,\n    format: 'mm/dd/yyyy',\n    language: 'en',\n    maxDate: null,\n    maxNumberOfDates: 1,\n    maxView: 3,\n    minDate: null,\n    nextArrow: '»',\n    orientation: 'auto',\n    pickLevel: 0,\n    prevArrow: '«',\n    showDaysOfWeek: true,\n    showOnClick: true,\n    showOnFocus: true,\n    startView: 0,\n    title: '',\n    todayButton: false,\n    todayButtonMode: 0,\n    todayHighlight: false,\n    updateOnBlur: true,\n    weekNumbers: 0,\n    weekStart: 0,\n  };\n\n  const {\n    language: defaultLang,\n    format: defaultFormat,\n    weekStart: defaultWeekStart,\n  } = defaultOptions;\n\n  // Reducer function to filter out invalid day-of-week from the input\n  function sanitizeDOW(dow, day) {\n    return dow.length < 6 && day >= 0 && day < 7\n      ? pushUnique(dow, day)\n      : dow;\n  }\n\n  function determineGetWeekMethod(numberingMode, weekStart) {\n    const methodId = numberingMode === 4\n      ? (weekStart === 6 ? 3 : !weekStart + 1)\n      : numberingMode;\n    switch (methodId) {\n      case 1:\n        return getIsoWeek;\n      case 2:\n        return getWesternTradWeek;\n      case 3:\n        return getMidEasternWeek;\n    }\n  }\n\n  function updateWeekStart(newValue, config, weekNumbers) {\n    config.weekStart = newValue;\n    config.weekEnd = (newValue + 6) % 7;\n    if (weekNumbers === 4) {\n      config.getWeekNumber = determineGetWeekMethod(4, newValue);\n    }\n    return newValue;\n  }\n\n  // validate input date. if invalid, fallback to the original value\n  function validateDate(value, format, locale, origValue) {\n    const date = parseDate(value, format, locale);\n    return date !== undefined ? date : origValue;\n  }\n\n  // Validate viewId. if invalid, fallback to the original value\n  function validateViewId(value, origValue, max = 3) {\n    const viewId = parseInt(value, 10);\n    return viewId >= 0 && viewId <= max ? viewId : origValue;\n  }\n\n  function replaceOptions(options, from, to, convert = undefined) {\n    if (from in options) {\n      if (!(to in options)) {\n        options[to] = convert ? convert(options[from]) : options[from];\n      }\n      delete options[from];\n    }\n  }\n\n  // Create Datepicker configuration to set\n  function processOptions(options, datepicker) {\n    const inOpts = Object.assign({}, options);\n    const config = {};\n    const locales = datepicker.constructor.locales;\n    const rangeEnd = !!datepicker.rangeSideIndex;\n    let {\n      datesDisabled,\n      format,\n      language,\n      locale,\n      maxDate,\n      maxView,\n      minDate,\n      pickLevel,\n      startView,\n      weekNumbers,\n      weekStart,\n    } = datepicker.config || {};\n\n    // for backword compatibility\n    replaceOptions(inOpts, 'calendarWeeks', 'weekNumbers', val => val ? 1 : 0);\n    replaceOptions(inOpts, 'clearBtn', 'clearButton');\n    replaceOptions(inOpts, 'todayBtn', 'todayButton');\n    replaceOptions(inOpts, 'todayBtnMode', 'todayButtonMode');\n\n    if (inOpts.language) {\n      let lang;\n      if (inOpts.language !== language) {\n        if (locales[inOpts.language]) {\n          lang = inOpts.language;\n        } else {\n          // Check if langauge + region tag can fallback to the one without\n          // region (e.g. fr-CA → fr)\n          lang = inOpts.language.split('-')[0];\n          if (!locales[lang]) {\n            lang = false;\n          }\n        }\n      }\n      delete inOpts.language;\n      if (lang) {\n        language = config.language = lang;\n\n        // update locale as well when updating language\n        const origLocale = locale || locales[defaultLang];\n        // use default language's properties for the fallback\n        locale = Object.assign({\n          format: defaultFormat,\n          weekStart: defaultWeekStart\n        }, locales[defaultLang]);\n        if (language !== defaultLang) {\n          Object.assign(locale, locales[language]);\n        }\n        config.locale = locale;\n        // if format and/or weekStart are the same as old locale's defaults,\n        // update them to new locale's defaults\n        if (format === origLocale.format) {\n          format = config.format = locale.format;\n        }\n        if (weekStart === origLocale.weekStart) {\n          weekStart = updateWeekStart(locale.weekStart, config, weekNumbers);\n        }\n      }\n    }\n\n    if (inOpts.format) {\n      const hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n      const hasToValue = typeof inOpts.format.toValue === 'function';\n      const validFormatString = reFormatTokens.test(inOpts.format);\n      if ((hasToDisplay && hasToValue) || validFormatString) {\n        format = config.format = inOpts.format;\n      }\n      delete inOpts.format;\n    }\n\n    //*** pick level ***//\n    let newPickLevel = pickLevel;\n    if ('pickLevel' in inOpts) {\n      newPickLevel = validateViewId(inOpts.pickLevel, pickLevel, 2);\n      delete inOpts.pickLevel;\n    }\n    if (newPickLevel !== pickLevel) {\n      if (newPickLevel > pickLevel) {\n        // complement current minDate/madDate so that the existing range will be\n        // expanded to fit the new level later\n        if (!('minDate' in inOpts)) {\n          inOpts.minDate = minDate;\n        }\n        if (!('maxDate' in inOpts)) {\n          inOpts.maxDate = maxDate;\n        }\n      }\n      // complement datesDisabled so that it will be reset later\n      if (datesDisabled && !inOpts.datesDisabled) {\n        inOpts.datesDisabled = [];\n      }\n      pickLevel = config.pickLevel = newPickLevel;\n    }\n\n    //*** dates ***//\n    // while min and maxDate for \"no limit\" in the options are better to be null\n    // (especially when updating), the ones in the config have to be undefined\n    // because null is treated as 0 (= unix epoch) when comparing with time value\n    let minDt = minDate;\n    let maxDt = maxDate;\n    if ('minDate' in inOpts) {\n      const defaultMinDt = dateValue(0, 0, 1);\n      minDt = inOpts.minDate === null\n        ? defaultMinDt  // set 0000-01-01 to prevent negative values for year\n        : validateDate(inOpts.minDate, format, locale, minDt);\n      if (minDt !== defaultMinDt) {\n        minDt = regularizeDate(minDt, pickLevel, false);\n      }\n      delete inOpts.minDate;\n    }\n    if ('maxDate' in inOpts) {\n      maxDt = inOpts.maxDate === null\n        ? undefined\n        : validateDate(inOpts.maxDate, format, locale, maxDt);\n      if (maxDt !== undefined) {\n        maxDt = regularizeDate(maxDt, pickLevel, true);\n      }\n      delete inOpts.maxDate;\n    }\n    if (maxDt < minDt) {\n      minDate = config.minDate = maxDt;\n      maxDate = config.maxDate = minDt;\n    } else {\n      if (minDate !== minDt) {\n        minDate = config.minDate = minDt;\n      }\n      if (maxDate !== maxDt) {\n        maxDate = config.maxDate = maxDt;\n      }\n    }\n\n    if (inOpts.datesDisabled) {\n      const dtsDisabled = inOpts.datesDisabled;\n      if (typeof dtsDisabled === 'function') {\n        config.datesDisabled = null;\n        config.checkDisabled = (timeValue, viewId) => dtsDisabled(\n          new Date(timeValue),\n          viewId,\n          rangeEnd\n        );\n      } else {\n        const disabled = config.datesDisabled = dtsDisabled.reduce((dates, dt) => {\n          const date = parseDate(dt, format, locale);\n          return date !== undefined\n            ? pushUnique(dates, regularizeDate(date, pickLevel, rangeEnd))\n            : dates;\n        }, []);\n        config.checkDisabled = timeValue => disabled.includes(timeValue);\n      }\n      delete inOpts.datesDisabled;\n    }\n    if ('defaultViewDate' in inOpts) {\n      const viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n      if (viewDate !== undefined) {\n        config.defaultViewDate = viewDate;\n      }\n      delete inOpts.defaultViewDate;\n    }\n\n    //*** days of week ***//\n    if ('weekStart' in inOpts) {\n      const wkStart = Number(inOpts.weekStart) % 7;\n      if (!isNaN(wkStart)) {\n        weekStart = updateWeekStart(wkStart, config, weekNumbers);\n      }\n      delete inOpts.weekStart;\n    }\n    if (inOpts.daysOfWeekDisabled) {\n      config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n      delete inOpts.daysOfWeekDisabled;\n    }\n    if (inOpts.daysOfWeekHighlighted) {\n      config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n      delete inOpts.daysOfWeekHighlighted;\n    }\n\n    //*** week numbers ***//\n    if ('weekNumbers' in inOpts) {\n      let method = inOpts.weekNumbers;\n      if (method) {\n        const getWeekNumber = typeof method === 'function'\n          ? (timeValue, startOfWeek) => method(new Date(timeValue), startOfWeek)\n          : determineGetWeekMethod((method = parseInt(method, 10)), weekStart);\n        if (getWeekNumber) {\n          weekNumbers = config.weekNumbers = method;\n          config.getWeekNumber = getWeekNumber;\n        }\n      } else {\n        weekNumbers = config.weekNumbers = 0;\n        config.getWeekNumber = null;\n      }\n      delete inOpts.weekNumbers;\n    }\n\n    //*** multi date ***//\n    if ('maxNumberOfDates' in inOpts) {\n      const maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n      if (maxNumberOfDates >= 0) {\n        config.maxNumberOfDates = maxNumberOfDates;\n        config.multidate = maxNumberOfDates !== 1;\n      }\n      delete inOpts.maxNumberOfDates;\n    }\n    if (inOpts.dateDelimiter) {\n      config.dateDelimiter = String(inOpts.dateDelimiter);\n      delete inOpts.dateDelimiter;\n    }\n\n    //*** view ***//\n    let newMaxView = maxView;\n    if ('maxView' in inOpts) {\n      newMaxView = validateViewId(inOpts.maxView, maxView);\n      delete inOpts.maxView;\n    }\n    // ensure max view >= pick level\n    newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n    if (newMaxView !== maxView) {\n      maxView = config.maxView = newMaxView;\n    }\n\n    let newStartView = startView;\n    if ('startView' in inOpts) {\n      newStartView = validateViewId(inOpts.startView, newStartView);\n      delete inOpts.startView;\n    }\n    // ensure pick level <= start view <= max view\n    if (newStartView < pickLevel) {\n      newStartView = pickLevel;\n    } else if (newStartView > maxView) {\n      newStartView = maxView;\n    }\n    if (newStartView !== startView) {\n      config.startView = newStartView;\n    }\n\n    //*** template ***//\n    if (inOpts.prevArrow) {\n      const prevArrow = parseHTML(inOpts.prevArrow);\n      if (prevArrow.childNodes.length > 0) {\n        config.prevArrow = prevArrow.childNodes;\n      }\n      delete inOpts.prevArrow;\n    }\n    if (inOpts.nextArrow) {\n      const nextArrow = parseHTML(inOpts.nextArrow);\n      if (nextArrow.childNodes.length > 0) {\n        config.nextArrow = nextArrow.childNodes;\n      }\n      delete inOpts.nextArrow;\n    }\n\n    //*** misc ***//\n    if ('disableTouchKeyboard' in inOpts) {\n      config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n      delete inOpts.disableTouchKeyboard;\n    }\n    if (inOpts.orientation) {\n      const orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n      config.orientation = {\n        x: orientation.find(x => (x === 'left' || x === 'right')) || 'auto',\n        y: orientation.find(y => (y === 'top' || y === 'bottom')) || 'auto',\n      };\n      delete inOpts.orientation;\n    }\n    if ('todayButtonMode' in inOpts) {\n      switch(inOpts.todayButtonMode) {\n        case 0:\n        case 1:\n          config.todayButtonMode = inOpts.todayButtonMode;\n      }\n      delete inOpts.todayButtonMode;\n    }\n\n    //*** copy the rest ***//\n    Object.entries(inOpts).forEach(([key, value]) => {\n      if (value !== undefined && key in defaultOptions) {\n        config[key] = value;\n      }\n    });\n\n    return config;\n  }\n\n  const defaultShortcutKeys = {\n    show: {key: 'ArrowDown'},\n    hide: null,\n    toggle: {key: 'Escape'},\n    prevButton: {key: 'ArrowLeft', ctrlOrMetaKey: true},\n    nextButton: {key: 'ArrowRight', ctrlOrMetaKey: true},\n    viewSwitch: {key: 'ArrowUp', ctrlOrMetaKey: true},\n    clearButton: {key: 'Backspace', ctrlOrMetaKey: true},\n    todayButton: {key: '.', ctrlOrMetaKey: true},\n    exitEditMode: {key: 'ArrowDown', ctrlOrMetaKey: true},\n  };\n\n  function createShortcutKeyConfig(options) {\n    return Object.keys(defaultShortcutKeys).reduce((keyDefs, shortcut) => {\n      const keyDef = options[shortcut] === undefined\n        ? defaultShortcutKeys[shortcut]\n        : options[shortcut];\n      const key = keyDef && keyDef.key;\n      if (!key || typeof key !== 'string') {\n        return keyDefs;\n      }\n\n      const normalizedDef = {\n        key,\n        ctrlOrMetaKey: !!(keyDef.ctrlOrMetaKey || keyDef.ctrlKey || keyDef.metaKey),\n      };\n      if (key.length > 1) {\n        normalizedDef.altKey = !!keyDef.altKey;\n        normalizedDef.shiftKey = !!keyDef.shiftKey;\n      }\n      keyDefs[shortcut] = normalizedDef;\n      return keyDefs;\n    }, {});\n  }\n\n  const getButtons = buttonList => buttonList\n    .map(classes => `<button type=\"button\" class=\"%buttonClass% ${classes}\" tabindex=\"-1\"></button>`)\n    .join('');\n\n  const pickerTemplate = optimizeTemplateHTML(`<div class=\"datepicker\">\n  <div class=\"datepicker-picker\">\n    <div class=\"datepicker-header\">\n      <div class=\"datepicker-title\"></div>\n      <div class=\"datepicker-controls\">\n        ${getButtons([\n          'prev-button prev-btn',\n          'view-switch',\n          'next-button next-btn',\n        ])}\n      </div>\n    </div>\n    <div class=\"datepicker-main\"></div>\n    <div class=\"datepicker-footer\">\n      <div class=\"datepicker-controls\">\n        ${getButtons([\n          'today-button today-btn',\n          'clear-button clear-btn',\n        ])}\n      </div>\n    </div>\n  </div>\n</div>`);\n\n  const daysTemplate = optimizeTemplateHTML(`<div class=\"days\">\n  <div class=\"days-of-week\">${createTagRepeat('span', 7, {class: 'dow'})}</div>\n  <div class=\"datepicker-grid\">${createTagRepeat('span', 42)}</div>\n</div>`);\n\n  const weekNumbersTemplate = optimizeTemplateHTML(`<div class=\"week-numbers calendar-weeks\">\n  <div class=\"days-of-week\"><span class=\"dow\"></span></div>\n  <div class=\"weeks\">${createTagRepeat('span', 6, {class: 'week'})}</div>\n</div>`);\n\n  // Base class of the view classes\n  class View {\n    constructor(picker, config) {\n      Object.assign(this, config, {\n        picker,\n        element: parseHTML(`<div class=\"datepicker-view\"></div>`).firstChild,\n        selected: [],\n        isRangeEnd: !!picker.datepicker.rangeSideIndex,\n      });\n      this.init(this.picker.datepicker.config);\n    }\n\n    init(options) {\n      if ('pickLevel' in options) {\n        this.isMinView = this.id === options.pickLevel;\n      }\n      this.setOptions(options);\n      this.updateFocus();\n      this.updateSelection();\n    }\n\n    prepareForRender(switchLabel, prevButtonDisabled, nextButtonDisabled) {\n      // refresh disabled years on every render in order to clear the ones added\n      // by beforeShow hook at previous render\n      this.disabled = [];\n\n      const picker = this.picker;\n      picker.setViewSwitchLabel(switchLabel);\n      picker.setPrevButtonDisabled(prevButtonDisabled);\n      picker.setNextButtonDisabled(nextButtonDisabled);\n    }\n\n    setDisabled(date, classList) {\n      classList.add('disabled');\n      pushUnique(this.disabled, date);\n    }\n\n    // Execute beforeShow() callback and apply the result to the element\n    // args:\n    performBeforeHook(el, timeValue) {\n      let result = this.beforeShow(new Date(timeValue));\n      switch (typeof result) {\n        case 'boolean':\n          result = {enabled: result};\n          break;\n        case 'string':\n          result = {classes: result};\n      }\n\n      if (result) {\n        const classList = el.classList;\n        if (result.enabled === false) {\n          this.setDisabled(timeValue, classList);\n        }\n        if (result.classes) {\n          const extraClasses = result.classes.split(/\\s+/);\n          classList.add(...extraClasses);\n          if (extraClasses.includes('disabled')) {\n            this.setDisabled(timeValue, classList);\n          }\n        }\n        if (result.content) {\n          replaceChildNodes(el, result.content);\n        }\n      }\n    }\n\n    renderCell(el, content, cellVal, date, {selected, range}, outOfScope, extraClasses = []) {\n      el.textContent = content;\n      if (this.isMinView) {\n        el.dataset.date = date;\n      }\n\n      const classList = el.classList;\n      el.className = `datepicker-cell ${this.cellClass}`;\n      if (cellVal < this.first) {\n        classList.add('prev');\n      } else if (cellVal > this.last) {\n        classList.add('next');\n      }\n      classList.add(...extraClasses);\n      if (outOfScope || this.checkDisabled(date, this.id)) {\n        this.setDisabled(date, classList);\n      }\n      if (range) {\n        const [rangeStart, rangeEnd] = range;\n        if (cellVal > rangeStart && cellVal < rangeEnd) {\n          classList.add('range');\n        }\n        if (cellVal === rangeStart) {\n          classList.add('range-start');\n        }\n        if (cellVal === rangeEnd) {\n          classList.add('range-end');\n        }\n      }\n      if (selected.includes(cellVal)) {\n        classList.add('selected');\n      }\n      if (cellVal === this.focused) {\n        classList.add('focused');\n      }\n\n      if (this.beforeShow) {\n        this.performBeforeHook(el, date);\n      }\n    }\n\n    refreshCell(el, cellVal, selected, [rangeStart, rangeEnd]) {\n      const classList = el.classList;\n      classList.remove('range', 'range-start', 'range-end', 'selected', 'focused');\n      if (cellVal > rangeStart && cellVal < rangeEnd) {\n        classList.add('range');\n      }\n      if (cellVal === rangeStart) {\n        classList.add('range-start');\n      }\n      if (cellVal === rangeEnd) {\n        classList.add('range-end');\n      }\n      if (selected.includes(cellVal)) {\n        classList.add('selected');\n      }\n      if (cellVal === this.focused) {\n        classList.add('focused');\n      }\n    }\n\n    changeFocusedCell(cellIndex) {\n      this.grid.querySelectorAll('.focused').forEach((el) => {\n        el.classList.remove('focused');\n      });\n      this.grid.children[cellIndex].classList.add('focused');\n    }\n  }\n\n  class DaysView extends View {\n    constructor(picker) {\n      super(picker, {\n        id: 0,\n        name: 'days',\n        cellClass: 'day',\n      });\n    }\n\n    init(options, onConstruction = true) {\n      if (onConstruction) {\n        const inner = parseHTML(daysTemplate).firstChild;\n        this.dow = inner.firstChild;\n        this.grid = inner.lastChild;\n        this.element.appendChild(inner);\n      }\n      super.init(options);\n    }\n\n    setOptions(options) {\n      let updateDOW;\n\n      if ('minDate' in options) {\n        this.minDate = options.minDate;\n      }\n      if ('maxDate' in options) {\n        this.maxDate = options.maxDate;\n      }\n      if (options.checkDisabled) {\n        this.checkDisabled = options.checkDisabled;\n      }\n      if (options.daysOfWeekDisabled) {\n        this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n        updateDOW = true;\n      }\n      if (options.daysOfWeekHighlighted) {\n        this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n      }\n      if ('todayHighlight' in options) {\n        this.todayHighlight = options.todayHighlight;\n      }\n      if ('weekStart' in options) {\n        this.weekStart = options.weekStart;\n        this.weekEnd = options.weekEnd;\n        updateDOW = true;\n      }\n      if (options.locale) {\n        const locale = this.locale = options.locale;\n        this.dayNames = locale.daysMin;\n        this.switchLabelFormat = locale.titleFormat;\n        updateDOW = true;\n      }\n      if ('beforeShowDay' in options) {\n        this.beforeShow = typeof options.beforeShowDay === 'function'\n          ? options.beforeShowDay\n          : undefined;\n      }\n\n      if ('weekNumbers' in options) {\n        if (options.weekNumbers && !this.weekNumbers) {\n          const weeksElem = parseHTML(weekNumbersTemplate).firstChild;\n          this.weekNumbers = {\n            element: weeksElem,\n            dow: weeksElem.firstChild,\n            weeks: weeksElem.lastChild,\n          };\n          this.element.insertBefore(weeksElem, this.element.firstChild);\n        } else if (this.weekNumbers && !options.weekNumbers) {\n          this.element.removeChild(this.weekNumbers.element);\n          this.weekNumbers = null;\n        }\n      }\n\n      if ('getWeekNumber' in options) {\n        this.getWeekNumber = options.getWeekNumber;\n      }\n\n      if ('showDaysOfWeek' in options) {\n        if (options.showDaysOfWeek) {\n          showElement(this.dow);\n          if (this.weekNumbers) {\n            showElement(this.weekNumbers.dow);\n          }\n        } else {\n          hideElement(this.dow);\n          if (this.weekNumbers) {\n            hideElement(this.weekNumbers.dow);\n          }\n        }\n      }\n\n      // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n      if (updateDOW) {\n        Array.from(this.dow.children).forEach((el, index) => {\n          const dow = (this.weekStart + index) % 7;\n          el.textContent = this.dayNames[dow];\n          el.className = this.daysOfWeekDisabled.includes(dow) ? 'dow disabled' : 'dow';\n        });\n      }\n    }\n\n    // Apply update on the focused date to view's settings\n    updateFocus() {\n      const viewDate = new Date(this.picker.viewDate);\n      const viewYear = viewDate.getFullYear();\n      const viewMonth = viewDate.getMonth();\n      const firstOfMonth = dateValue(viewYear, viewMonth, 1);\n      const start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n\n      this.first = firstOfMonth;\n      this.last = dateValue(viewYear, viewMonth + 1, 0);\n      this.start = start;\n      this.focused = this.picker.viewDate;\n    }\n\n    // Apply update on the selected dates to view's settings\n    updateSelection() {\n      const {dates, rangepicker} = this.picker.datepicker;\n      this.selected = dates;\n      if (rangepicker) {\n        this.range = rangepicker.dates;\n      }\n    }\n\n     // Update the entire view UI\n    render() {\n      // update today marker on ever render\n      this.today = this.todayHighlight ? today() : undefined;\n\n      this.prepareForRender(\n        formatDate(this.focused, this.switchLabelFormat, this.locale),\n        this.first <= this.minDate,\n        this.last >= this.maxDate\n      );\n\n      if (this.weekNumbers) {\n        const weekStart = this.weekStart;\n        const startOfWeek = dayOfTheWeekOf(this.first, weekStart, weekStart);\n        Array.from(this.weekNumbers.weeks.children).forEach((el, index) => {\n          const dateOfWeekStart = addWeeks(startOfWeek, index);\n          el.textContent = this.getWeekNumber(dateOfWeekStart, weekStart);\n          if (index > 3) {\n            el.classList[dateOfWeekStart > this.last ? 'add' : 'remove']('next');\n          }\n        });\n      }\n      Array.from(this.grid.children).forEach((el, index) => {\n        const current = addDays(this.start, index);\n        const dateObj = new Date(current);\n        const day = dateObj.getDay();\n        const extraClasses = [];\n\n        if (this.today === current) {\n          extraClasses.push('today');\n        }\n        if (this.daysOfWeekHighlighted.includes(day)) {\n          extraClasses.push('highlighted');\n        }\n\n        this.renderCell(\n          el,\n          dateObj.getDate(),\n          current,\n          current,\n          this,\n          current < this.minDate\n            || current > this.maxDate\n            || this.daysOfWeekDisabled.includes(day),\n          extraClasses\n        );\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n    refresh() {\n      const range = this.range || [];\n      Array.from(this.grid.children).forEach((el) => {\n        this.refreshCell(el, Number(el.dataset.date), this.selected, range);\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n    refreshFocus() {\n      this.changeFocusedCell(Math.round((this.focused - this.start) / 86400000));\n    }\n  }\n\n  function computeMonthRange(range, thisYear) {\n    if (!range || !range[0] || !range[1]) {\n      return;\n    }\n\n    const [[startY, startM], [endY, endM]] = range;\n    if (startY > thisYear || endY < thisYear) {\n      return;\n    }\n    return [\n      startY === thisYear ? startM : -1,\n      endY === thisYear ? endM : 12,\n    ];\n  }\n\n  class MonthsView extends View {\n    constructor(picker) {\n      super(picker, {\n        id: 1,\n        name: 'months',\n        cellClass: 'month',\n      });\n    }\n\n    init(options, onConstruction = true) {\n      if (onConstruction) {\n        this.grid = this.element;\n        this.element.classList.add('months', 'datepicker-grid');\n        this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {'data-month': ix => ix})));\n        this.first = 0;\n        this.last = 11;\n      }\n      super.init(options);\n    }\n\n    setOptions(options) {\n      if (options.locale) {\n        this.monthNames = options.locale.monthsShort;\n      }\n      if ('minDate' in options) {\n        if (options.minDate === undefined) {\n          this.minYear = this.minMonth = this.minDate = undefined;\n        } else {\n          const minDateObj = new Date(options.minDate);\n          this.minYear = minDateObj.getFullYear();\n          this.minMonth = minDateObj.getMonth();\n          this.minDate = minDateObj.setDate(1);\n        }\n      }\n      if ('maxDate' in options) {\n        if (options.maxDate === undefined) {\n          this.maxYear = this.maxMonth = this.maxDate = undefined;\n        } else {\n          const maxDateObj = new Date(options.maxDate);\n          this.maxYear = maxDateObj.getFullYear();\n          this.maxMonth = maxDateObj.getMonth();\n          this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n        }\n      }\n      if (options.checkDisabled) {\n        this.checkDisabled = this.isMinView || options.datesDisabled === null\n          ? options.checkDisabled\n          : () => false;\n      }\n      if ('beforeShowMonth' in options) {\n        this.beforeShow = typeof options.beforeShowMonth === 'function'\n          ? options.beforeShowMonth\n          : undefined;\n      }\n    }\n\n    // Update view's settings to reflect the viewDate set on the picker\n    updateFocus() {\n      const viewDate = new Date(this.picker.viewDate);\n      this.year = viewDate.getFullYear();\n      this.focused = viewDate.getMonth();\n    }\n\n    // Update view's settings to reflect the selected dates\n    updateSelection() {\n      const {dates, rangepicker} = this.picker.datepicker;\n      this.selected = dates.reduce((selected, timeValue) => {\n        const date = new Date(timeValue);\n        const year = date.getFullYear();\n        const month = date.getMonth();\n        if (selected[year] === undefined) {\n          selected[year] = [month];\n        } else {\n          pushUnique(selected[year], month);\n        }\n        return selected;\n      }, {});\n      if (rangepicker && rangepicker.dates) {\n        this.range = rangepicker.dates.map(timeValue => {\n          const date = new Date(timeValue);\n          return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n        });\n      }\n    }\n\n    // Update the entire view UI\n    render() {\n      this.prepareForRender(\n        this.year,\n        this.year <= this.minYear,\n        this.year >= this.maxYear\n      );\n\n      const selected = this.selected[this.year] || [];\n      const yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n      const isMinYear = this.year === this.minYear;\n      const isMaxYear = this.year === this.maxYear;\n      const range = computeMonthRange(this.range, this.year);\n\n      Array.from(this.grid.children).forEach((el, index) => {\n        const date = regularizeDate(new Date(this.year, index, 1), 1, this.isRangeEnd);\n\n        this.renderCell(\n          el,\n          this.monthNames[index],\n          index,\n          date,\n          {selected, range},\n          yrOutOfRange\n            || isMinYear && index < this.minMonth\n            || isMaxYear && index > this.maxMonth\n        );\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n    refresh() {\n      const selected = this.selected[this.year] || [];\n      const range = computeMonthRange(this.range, this.year) || [];\n      Array.from(this.grid.children).forEach((el, index) => {\n        this.refreshCell(el, index, selected, range);\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n    refreshFocus() {\n      this.changeFocusedCell(this.focused);\n    }\n  }\n\n  function toTitleCase(word) {\n    return [...word].reduce((str, ch, ix) => str += ix ? ch : ch.toUpperCase(), '');\n  }\n\n  // Class representing the years and decades view elements\n  class YearsView extends View {\n    constructor(picker, config) {\n      super(picker, config);\n    }\n\n    init(options, onConstruction = true) {\n      if (onConstruction) {\n        this.navStep = this.step * 10;\n        this.beforeShowOption = `beforeShow${toTitleCase(this.cellClass)}`;\n        this.grid = this.element;\n        this.element.classList.add(this.name, 'datepicker-grid');\n        this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n      }\n      super.init(options);\n    }\n\n    setOptions(options) {\n      if ('minDate' in options) {\n        if (options.minDate === undefined) {\n          this.minYear = this.minDate = undefined;\n        } else {\n          this.minYear = startOfYearPeriod(options.minDate, this.step);\n          this.minDate = dateValue(this.minYear, 0, 1);\n        }\n      }\n      if ('maxDate' in options) {\n        if (options.maxDate === undefined) {\n          this.maxYear = this.maxDate = undefined;\n        } else {\n          this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n          this.maxDate = dateValue(this.maxYear, 11, 31);\n        }\n      }\n      if (options.checkDisabled) {\n        this.checkDisabled = this.isMinView || options.datesDisabled === null\n          ? options.checkDisabled\n          : () => false;\n      }\n      if (this.beforeShowOption in options) {\n        const beforeShow = options[this.beforeShowOption];\n        this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n      }\n    }\n\n    // Update view's settings to reflect the viewDate set on the picker\n    updateFocus() {\n      const viewDate = new Date(this.picker.viewDate);\n      const first = startOfYearPeriod(viewDate, this.navStep);\n      const last = first + 9 * this.step;\n\n      this.first = first;\n      this.last = last;\n      this.start = first - this.step;\n      this.focused = startOfYearPeriod(viewDate, this.step);\n    }\n\n    // Update view's settings to reflect the selected dates\n    updateSelection() {\n      const {dates, rangepicker} = this.picker.datepicker;\n      this.selected = dates.reduce((years, timeValue) => {\n        return pushUnique(years, startOfYearPeriod(timeValue, this.step));\n      }, []);\n      if (rangepicker && rangepicker.dates) {\n        this.range = rangepicker.dates.map(timeValue => {\n          if (timeValue !== undefined) {\n            return startOfYearPeriod(timeValue, this.step);\n          }\n        });\n      }\n    }\n\n    // Update the entire view UI\n    render() {\n      this.prepareForRender(\n        `${this.first}-${this.last}`,\n        this.first <= this.minYear,\n        this.last >= this.maxYear\n      );\n\n      Array.from(this.grid.children).forEach((el, index) => {\n        const current = this.start + (index * this.step);\n        const date = regularizeDate(new Date(current, 0, 1), 2, this.isRangeEnd);\n\n        el.dataset.year = current;\n        this.renderCell(\n          el,\n          current,\n          current,\n          date,\n          this,\n          current < this.minYear || current > this.maxYear\n        );\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n    refresh() {\n      const range = this.range || [];\n      Array.from(this.grid.children).forEach((el) => {\n        this.refreshCell(el, Number(el.textContent), this.selected, range);\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n    refreshFocus() {\n      this.changeFocusedCell(Math.round((this.focused - this.start) / this.step));\n    }\n  }\n\n  function triggerDatepickerEvent(datepicker, type) {\n    const options = {\n      bubbles: true,\n      cancelable: true,\n      detail: {\n        date: datepicker.getDate(),\n        viewDate: new Date(datepicker.picker.viewDate),\n        viewId: datepicker.picker.currentView.id,\n        datepicker,\n      },\n    };\n    datepicker.element.dispatchEvent(new CustomEvent(type, options));\n  }\n\n  // direction: -1 (to previous), 1 (to next)\n  function goToPrevOrNext(datepicker, direction) {\n    const {config, picker} = datepicker;\n    const {currentView, viewDate} = picker;\n    let newViewDate;\n    switch (currentView.id) {\n      case 0:\n        newViewDate = addMonths(viewDate, direction);\n        break;\n      case 1:\n        newViewDate = addYears(viewDate, direction);\n        break;\n      default:\n        newViewDate = addYears(viewDate, direction * currentView.navStep);\n    }\n    newViewDate = limitToRange(newViewDate, config.minDate, config.maxDate);\n    picker.changeFocus(newViewDate).render();\n  }\n\n  function switchView(datepicker) {\n    const viewId = datepicker.picker.currentView.id;\n    if (viewId === datepicker.config.maxView) {\n      return;\n    }\n    datepicker.picker.changeView(viewId + 1).render();\n  }\n\n  function clearSelection(datepicker) {\n    datepicker.setDate({clear: true});\n  }\n\n  function goToOrSelectToday(datepicker) {\n    const currentDate = today();\n    if (datepicker.config.todayButtonMode === 1) {\n      datepicker.setDate(currentDate, {forceRefresh: true, viewDate: currentDate});\n    } else {\n      datepicker.setFocusedDate(currentDate, true);\n    }\n  }\n\n  function unfocus(datepicker) {\n    const onBlur = () => {\n      if (datepicker.config.updateOnBlur) {\n        datepicker.update({revert: true});\n      } else {\n        datepicker.refresh('input');\n      }\n      datepicker.hide();\n    };\n    const element = datepicker.element;\n\n    if (isActiveElement(element)) {\n      element.addEventListener('blur', onBlur, {once: true});\n    } else {\n      onBlur();\n    }\n  }\n\n  function goToSelectedMonthOrYear(datepicker, selection) {\n    const picker = datepicker.picker;\n    const viewDate = new Date(picker.viewDate);\n    const viewId = picker.currentView.id;\n    const newDate = viewId === 1\n      ? addMonths(viewDate, selection - viewDate.getMonth())\n      : addYears(viewDate, selection - viewDate.getFullYear());\n\n    picker.changeFocus(newDate).changeView(viewId - 1).render();\n  }\n\n  function onClickViewSwitch(datepicker) {\n    switchView(datepicker);\n  }\n\n  function onClickPrevButton(datepicker) {\n    goToPrevOrNext(datepicker, -1);\n  }\n\n  function onClickNextButton(datepicker) {\n    goToPrevOrNext(datepicker, 1);\n  }\n\n  // For the picker's main block to delegete the events from `datepicker-cell`s\n  function onClickView(datepicker, ev) {\n    const target = findElementInEventPath(ev, '.datepicker-cell');\n    if (!target || target.classList.contains('disabled')) {\n      return;\n    }\n\n    const {id, isMinView} = datepicker.picker.currentView;\n    const data = target.dataset;\n    if (isMinView) {\n      datepicker.setDate(Number(data.date));\n    } else if (id === 1) {\n      goToSelectedMonthOrYear(datepicker, Number(data.month));\n    } else {\n      goToSelectedMonthOrYear(datepicker, Number(data.year));\n    }\n  }\n\n  function onMousedownPicker(ev) {\n    ev.preventDefault();\n  }\n\n  const orientClasses = ['left', 'top', 'right', 'bottom'].reduce((obj, key) => {\n    obj[key] = `datepicker-orient-${key}`;\n    return obj;\n  }, {});\n  const toPx = num => num ? `${num}px` : num;\n\n  function processPickerOptions(picker, options) {\n    if ('title' in options) {\n      if (options.title) {\n        picker.controls.title.textContent = options.title;\n        showElement(picker.controls.title);\n      } else {\n        picker.controls.title.textContent = '';\n        hideElement(picker.controls.title);\n      }\n    }\n    if (options.prevArrow) {\n      const prevButton = picker.controls.prevButton;\n      emptyChildNodes(prevButton);\n      options.prevArrow.forEach((node) => {\n        prevButton.appendChild(node.cloneNode(true));\n      });\n    }\n    if (options.nextArrow) {\n      const nextButton = picker.controls.nextButton;\n      emptyChildNodes(nextButton);\n      options.nextArrow.forEach((node) => {\n        nextButton.appendChild(node.cloneNode(true));\n      });\n    }\n    if (options.locale) {\n      picker.controls.todayButton.textContent = options.locale.today;\n      picker.controls.clearButton.textContent = options.locale.clear;\n    }\n    if ('todayButton' in options) {\n      if (options.todayButton) {\n        showElement(picker.controls.todayButton);\n      } else {\n        hideElement(picker.controls.todayButton);\n      }\n    }\n    if ('minDate' in options || 'maxDate' in options) {\n      const {minDate, maxDate} = picker.datepicker.config;\n      picker.controls.todayButton.disabled = !isInRange(today(), minDate, maxDate);\n    }\n    if ('clearButton' in options) {\n      if (options.clearButton) {\n        showElement(picker.controls.clearButton);\n      } else {\n        hideElement(picker.controls.clearButton);\n      }\n    }\n  }\n\n  // Compute view date to reset, which will be...\n  // - the last item of the selected dates or defaultViewDate if no selection\n  // - limitted to minDate or maxDate if it exceeds the range\n  function computeResetViewDate(datepicker) {\n    const {dates, config, rangeSideIndex} = datepicker;\n    const viewDate = dates.length > 0\n      ? lastItemOf(dates)\n      : regularizeDate(config.defaultViewDate, config.pickLevel, rangeSideIndex);\n    return limitToRange(viewDate, config.minDate, config.maxDate);\n  }\n\n  // Change current view's view date\n  function setViewDate(picker, newDate) {\n    if (!('_oldViewDate' in picker) && newDate !== picker.viewDate) {\n      picker._oldViewDate = picker.viewDate;\n    }\n    picker.viewDate = newDate;\n\n    // return whether the new date is in different period on time from the one\n    // displayed in the current view\n    // when true, the view needs to be re-rendered on the next UI refresh.\n    const {id, year, first, last} = picker.currentView;\n    const viewYear = new Date(newDate).getFullYear();\n    switch (id) {\n      case 0:\n        return newDate < first || newDate > last;\n      case 1:\n        return viewYear !== year;\n      default:\n        return viewYear < first || viewYear > last;\n    }\n  }\n\n  function getTextDirection(el) {\n    return window.getComputedStyle(el).direction;\n  }\n\n  // find the closet scrollable ancestor elemnt under the body\n  function findScrollParents(el) {\n    const parent = getParent(el);\n    if (parent === document.body || !parent) {\n      return;\n    }\n\n    // checking overflow only is enough because computed overflow cannot be\n    // visible or a combination of visible and other when either axis is set\n    // to other than visible.\n    // (Setting one axis to other than 'visible' while the other is 'visible'\n    // results in the other axis turning to 'auto')\n    return window.getComputedStyle(parent).overflow !== 'visible'\n      ? parent\n      : findScrollParents(parent);\n  }\n\n  // Class representing the picker UI\n  class Picker {\n    constructor(datepicker) {\n      const {config, inputField} = this.datepicker = datepicker;\n\n      const template = pickerTemplate.replace(/%buttonClass%/g, config.buttonClass);\n      const element = this.element = parseHTML(template).firstChild;\n      const [header, main, footer] = element.firstChild.children;\n      const title = header.firstElementChild;\n      const [prevButton, viewSwitch, nextButton] = header.lastElementChild.children;\n      const [todayButton, clearButton] = footer.firstChild.children;\n      const controls = {\n        title,\n        prevButton,\n        viewSwitch,\n        nextButton,\n        todayButton,\n        clearButton,\n      };\n      this.main = main;\n      this.controls = controls;\n\n      const elementClass = inputField ? 'dropdown' : 'inline';\n      element.classList.add(`datepicker-${elementClass}`);\n\n      processPickerOptions(this, config);\n      this.viewDate = computeResetViewDate(datepicker);\n\n      // set up event listeners\n      registerListeners(datepicker, [\n        [element, 'mousedown', onMousedownPicker],\n        [main, 'click', onClickView.bind(null, datepicker)],\n        [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)],\n        [controls.prevButton, 'click', onClickPrevButton.bind(null, datepicker)],\n        [controls.nextButton, 'click', onClickNextButton.bind(null, datepicker)],\n        [controls.todayButton, 'click', goToOrSelectToday.bind(null, datepicker)],\n        [controls.clearButton, 'click', clearSelection.bind(null, datepicker)],\n      ]);\n\n      // set up views\n      this.views = [\n        new DaysView(this),\n        new MonthsView(this),\n        new YearsView(this, {id: 2, name: 'years', cellClass: 'year', step: 1}),\n        new YearsView(this, {id: 3, name: 'decades', cellClass: 'decade', step: 10}),\n      ];\n      this.currentView = this.views[config.startView];\n\n      this.currentView.render();\n      this.main.appendChild(this.currentView.element);\n      if (config.container) {\n        config.container.appendChild(this.element);\n      } else {\n        inputField.after(this.element);\n      }\n    }\n\n    setOptions(options) {\n      processPickerOptions(this, options);\n      this.views.forEach((view) => {\n        view.init(options, false);\n      });\n      this.currentView.render();\n    }\n\n    detach() {\n      this.element.remove();\n    }\n\n    show() {\n      if (this.active) {\n        return;\n      }\n\n      const {datepicker, element} = this;\n      const inputField = datepicker.inputField;\n      if (inputField) {\n        // ensure picker's direction matches input's\n        const inputDirection = getTextDirection(inputField);\n        if (inputDirection !== getTextDirection(getParent(element))) {\n          element.dir = inputDirection;\n        } else if (element.dir) {\n          element.removeAttribute('dir');\n        }\n\n        // Determine the picker's position first to prevent `orientation: 'auto'`\n        // from being miscalculated to 'bottom' after the picker temporarily\n        // shown below the input field expands the document height if the field\n        // is at the bottom edge of the document\n        this.place();\n        element.classList.add('active');\n\n        if (datepicker.config.disableTouchKeyboard) {\n          inputField.blur();\n        }\n      } else {\n        element.classList.add('active');\n      }\n      this.active = true;\n      triggerDatepickerEvent(datepicker, 'show');\n    }\n\n    hide() {\n      if (!this.active) {\n        return;\n      }\n      this.datepicker.exitEditMode();\n      this.element.classList.remove('active');\n      this.active = false;\n      triggerDatepickerEvent(this.datepicker, 'hide');\n    }\n\n    place() {\n      const {classList, style} = this.element;\n      // temporarily display the picker to get its size and offset parent\n      style.display = 'block';\n\n      const {\n        width: calendarWidth,\n        height: calendarHeight,\n      } = this.element.getBoundingClientRect();\n      const offsetParent = this.element.offsetParent;\n      // turn the picker back to hidden so that the position is determined with\n      // the state before it is shown.\n      style.display = '';\n\n      const {config, inputField} = this.datepicker;\n      const {\n        left: inputLeft,\n        top: inputTop,\n        right: inputRight,\n        bottom: inputBottom,\n        width: inputWidth,\n        height: inputHeight\n      } = inputField.getBoundingClientRect();\n      let {x: orientX, y: orientY} = config.orientation;\n      let left = inputLeft;\n      let top = inputTop;\n\n      // caliculate offsetLeft/Top of inputField\n      if (offsetParent === document.body || !offsetParent) {\n        left += window.scrollX;\n        top += window.scrollY;\n      } else {\n        const offsetParentRect = offsetParent.getBoundingClientRect();\n        left -= offsetParentRect.left - offsetParent.scrollLeft;\n        top -= offsetParentRect.top - offsetParent.scrollTop;\n      }\n\n      // caliculate the boundaries of the visible area that contains inputField\n      const scrollParent = findScrollParents(inputField);\n      let scrollAreaLeft = 0;\n      let scrollAreaTop = 0;\n      let {\n        clientWidth: scrollAreaRight,\n        clientHeight: scrollAreaBottom,\n      } = document.documentElement;\n\n      if (scrollParent) {\n        const scrollParentRect = scrollParent.getBoundingClientRect();\n        if (scrollParentRect.top > 0) {\n          scrollAreaTop = scrollParentRect.top;\n        }\n        if (scrollParentRect.left > 0) {\n          scrollAreaLeft = scrollParentRect.left;\n        }\n        if (scrollParentRect.right < scrollAreaRight) {\n          scrollAreaRight = scrollParentRect.right;\n        }\n        if (scrollParentRect.bottom < scrollAreaBottom) {\n          scrollAreaBottom = scrollParentRect.bottom;\n        }\n      }\n\n      // determine the horizontal orientation and left position\n      let adjustment = 0;\n      if (orientX === 'auto') {\n        if (inputLeft < scrollAreaLeft) {\n          orientX = 'left';\n          adjustment = scrollAreaLeft - inputLeft;\n        } else if (inputLeft + calendarWidth > scrollAreaRight) {\n          orientX = 'right';\n          if (scrollAreaRight < inputRight) {\n            adjustment = scrollAreaRight - inputRight;\n          }\n        } else if (getTextDirection(inputField) === 'rtl') {\n          orientX = inputRight - calendarWidth < scrollAreaLeft ? 'left' : 'right';\n        } else {\n          orientX = 'left';\n        }\n      }\n      if (orientX === 'right') {\n        left += inputWidth - calendarWidth;\n      }\n      left += adjustment;\n\n      // determine the vertical orientation and top position\n      if (orientY === 'auto') {\n        if (inputTop - calendarHeight > scrollAreaTop) {\n          orientY = inputBottom + calendarHeight > scrollAreaBottom ? 'top' : 'bottom';\n        } else {\n          orientY = 'bottom';\n        }\n      }\n      if (orientY === 'top') {\n        top -= calendarHeight;\n      } else {\n        top += inputHeight;\n      }\n\n      classList.remove(...Object.values(orientClasses));\n      classList.add(orientClasses[orientX], orientClasses[orientY]);\n\n      style.left = toPx(left);\n      style.top = toPx(top);\n    }\n\n    setViewSwitchLabel(labelText) {\n      this.controls.viewSwitch.textContent = labelText;\n    }\n\n    setPrevButtonDisabled(disabled) {\n      this.controls.prevButton.disabled = disabled;\n    }\n\n    setNextButtonDisabled(disabled) {\n      this.controls.nextButton.disabled = disabled;\n    }\n\n    changeView(viewId) {\n      const currentView = this.currentView;\n      if (viewId !== currentView.id) {\n        if (!this._oldView) {\n          this._oldView = currentView;\n        }\n        this.currentView = this.views[viewId];\n        this._renderMethod = 'render';\n      }\n      return this;\n    }\n\n    // Change the focused date (view date)\n    changeFocus(newViewDate) {\n      this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n      this.views.forEach((view) => {\n        view.updateFocus();\n      });\n      return this;\n    }\n\n    // Apply the change of the selected dates\n    update(viewDate = undefined) {\n      const newViewDate = viewDate === undefined\n        ? computeResetViewDate(this.datepicker)\n        : viewDate;\n      this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n      this.views.forEach((view) => {\n        view.updateFocus();\n        view.updateSelection();\n      });\n      return this;\n    }\n\n    // Refresh the picker UI\n    render(quickRender = true) {\n      const {currentView, datepicker, _oldView: oldView} = this;\n      const oldViewDate = new Date(this._oldViewDate);\n      const renderMethod = (quickRender && this._renderMethod) || 'render';\n      delete this._oldView;\n      delete this._oldViewDate;\n      delete this._renderMethod;\n\n      currentView[renderMethod]();\n      if (oldView) {\n        this.main.replaceChild(currentView.element, oldView.element);\n        triggerDatepickerEvent(datepicker, 'changeView');\n      }\n      if (!isNaN(oldViewDate)) {\n        const newViewDate = new Date(this.viewDate);\n        if (newViewDate.getFullYear() !== oldViewDate.getFullYear()) {\n          triggerDatepickerEvent(datepicker, 'changeYear');\n        }\n        if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n          triggerDatepickerEvent(datepicker, 'changeMonth');\n        }\n      }\n    }\n  }\n\n  // Find the closest date that doesn't meet the condition for unavailable date\n  // Returns undefined if no available date is found\n  // addFn: function to calculate the next date\n  //   - args: time value, amount\n  // increase: amount to pass to addFn\n  // testFn: function to test the unavailability of the date\n  //   - args: time value; return: true if unavailable\n  function findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n    if (!isInRange(date, min, max)) {\n      return;\n    }\n    if (testFn(date)) {\n      const newDate = addFn(date, increase);\n      return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n    }\n    return date;\n  }\n\n  // direction: -1 (left/up), 1 (right/down)\n  // vertical: true for up/down, false for left/right\n  function moveByArrowKey(datepicker, direction, vertical) {\n    const picker = datepicker.picker;\n    const currentView = picker.currentView;\n    const step = currentView.step || 1;\n    let viewDate = picker.viewDate;\n    let addFn;\n    switch (currentView.id) {\n      case 0:\n        viewDate = addDays(viewDate, vertical ? direction * 7 : direction);\n        addFn = addDays;\n        break;\n      case 1:\n        viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n        addFn = addMonths;\n        break;\n      default:\n        viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n        addFn = addYears;\n    }\n    viewDate = findNextAvailableOne(\n      viewDate,\n      addFn,\n      direction < 0 ? -step : step,\n      (date) => currentView.disabled.includes(date),\n      currentView.minDate,\n      currentView.maxDate\n    );\n    if (viewDate !== undefined) {\n      picker.changeFocus(viewDate).render();\n    }\n  }\n\n  function onKeydown(datepicker, ev) {\n    const {config, picker, editMode} = datepicker;\n    const active = picker.active;\n    const {key, altKey, shiftKey} = ev;\n    const ctrlOrMetaKey = ev.ctrlKey || ev.metaKey;\n    const cancelEvent = () => {\n      ev.preventDefault();\n      ev.stopPropagation();\n    };\n\n    // tab/enter keys should not be taken by shortcut keys\n    if (key === 'Tab') {\n      unfocus(datepicker);\n      return;\n    }\n    if (key === 'Enter') {\n      if (!active) {\n        datepicker.update();\n      } else if (editMode) {\n        datepicker.exitEditMode({update: true, autohide: config.autohide});\n      } else {\n        const currentView = picker.currentView;\n        if (currentView.isMinView) {\n          datepicker.setDate(picker.viewDate);\n        } else {\n          picker.changeView(currentView.id - 1).render();\n          cancelEvent();\n        }\n      }\n      return;\n    }\n\n    const shortcutKeys = config.shortcutKeys;\n    const keyInfo = {key, ctrlOrMetaKey, altKey, shiftKey};\n    const shortcut = Object.keys(shortcutKeys).find((item) => {\n      const keyDef = shortcutKeys[item];\n      return !Object.keys(keyDef).find(prop => keyDef[prop] !== keyInfo[prop]);\n    });\n    if (shortcut) {\n      let action;\n      if (shortcut === 'toggle') {\n        action = shortcut;\n      } else if (editMode) {\n        if (shortcut === 'exitEditMode') {\n          action = shortcut;\n        }\n      } else if (active) {\n        if (shortcut === 'hide') {\n          action = shortcut;\n        } else if (shortcut === 'prevButton') {\n          action = [goToPrevOrNext, [datepicker, -1]];\n        } else if (shortcut === 'nextButton') {\n          action = [goToPrevOrNext, [datepicker, 1]];\n        } else if (shortcut === 'viewSwitch') {\n          action = [switchView, [datepicker]];\n        } else if (config.clearButton && shortcut === 'clearButton') {\n          action = [clearSelection, [datepicker]];\n        } else if (config.todayButton && shortcut === 'todayButton') {\n          action = [goToOrSelectToday, [datepicker]];\n        }\n      } else if (shortcut === 'show') {\n        action = shortcut;\n      }\n      if (action) {\n        if (Array.isArray(action)) {\n          action[0].apply(null, action[1]);\n        } else {\n          datepicker[action]();\n        }\n        cancelEvent();\n        return;\n      }\n    }\n\n    // perform as a regular <input> when picker in hidden or in edit mode\n    if (!active || editMode) {\n      return;\n    }\n\n    const handleArrowKeyPress = (direction, vertical) => {\n      if (shiftKey || ctrlOrMetaKey || altKey) {\n        datepicker.enterEditMode();\n      } else {\n        moveByArrowKey(datepicker, direction, vertical);\n        ev.preventDefault();\n      }\n    };\n\n    if (key === 'ArrowLeft') {\n      handleArrowKeyPress(-1, false);\n    } else if (key === 'ArrowRight') {\n      handleArrowKeyPress(1, false);\n    } else if (key === 'ArrowUp') {\n      handleArrowKeyPress(-1, true);\n    } else if (key === 'ArrowDown') {\n      handleArrowKeyPress(1, true);\n    } else if (\n      key === 'Backspace'\n      || key === 'Delete'\n        // When autofill is performed, Chromium-based browsers trigger fake\n        // keydown/keyup events that don't have the `key` property (on Edge,\n        // keyup only) in addition to the input event. Therefore, we need to\n        // check the existence of `key`'s value before checking the length.\n        // (issue #144)\n      || (key && key.length === 1 && !ctrlOrMetaKey)\n    ) {\n      datepicker.enterEditMode();\n    }\n  }\n\n  function onFocus(datepicker) {\n    if (datepicker.config.showOnFocus && !datepicker._showing) {\n      datepicker.show();\n    }\n  }\n\n  // for the prevention for entering edit mode while getting focus on click\n  function onMousedown(datepicker, ev) {\n    const el = ev.target;\n    if (datepicker.picker.active || datepicker.config.showOnClick) {\n      el._active = isActiveElement(el);\n      el._clicking = setTimeout(() => {\n        delete el._active;\n        delete el._clicking;\n      }, 2000);\n    }\n  }\n\n  function onClickInput(datepicker, ev) {\n    const el = ev.target;\n    if (!el._clicking) {\n      return;\n    }\n    clearTimeout(el._clicking);\n    delete el._clicking;\n\n    if (el._active) {\n      datepicker.enterEditMode();\n    }\n    delete el._active;\n\n    if (datepicker.config.showOnClick) {\n      datepicker.show();\n    }\n  }\n\n  function onPaste(datepicker, ev) {\n    if (ev.clipboardData.types.includes('text/plain')) {\n      datepicker.enterEditMode();\n    }\n  }\n\n  // for the `document` to delegate the events from outside the picker/input field\n  function onClickOutside(datepicker, ev) {\n    const {element, picker} = datepicker;\n    // check both picker's and input's activeness to make updateOnBlur work in\n    // the cases where...\n    // - picker is hidden by ESC key press → input stays focused\n    // - input is unfocused by closing mobile keyboard → piker is kept shown\n    if (!picker.active && !isActiveElement(element)) {\n      return;\n    }\n    const pickerElem = picker.element;\n    if (findElementInEventPath(ev, el => el === element || el === pickerElem)) {\n      return;\n    }\n    unfocus(datepicker);\n  }\n\n  function stringifyDates(dates, config) {\n    return dates\n      .map(dt => formatDate(dt, config.format, config.locale))\n      .join(config.dateDelimiter);\n  }\n\n  // parse input dates and create an array of time values for selection\n  // returns undefined if there are no valid dates in inputDates\n  // when origDates (current selection) is passed, the function works to mix\n  // the input dates into the current selection\n  function processInputDates(datepicker, inputDates, clear = false) {\n    if (inputDates.length === 0) {\n      // empty input is considered valid unless origiDates is passed\n      return clear ? [] : undefined;\n    }\n\n    const {config, dates: origDates, rangeSideIndex} = datepicker;\n    const {pickLevel, maxNumberOfDates} = config;\n    let newDates = inputDates.reduce((dates, dt) => {\n      let date = parseDate(dt, config.format, config.locale);\n      if (date === undefined) {\n        return dates;\n      }\n      // adjust to 1st of the month/Jan 1st of the year\n      // or to the last day of the monh/Dec 31st of the year if the datepicker\n      // is the range-end picker of a rangepicker\n      date = regularizeDate(date, pickLevel, rangeSideIndex);\n      if (\n        isInRange(date, config.minDate, config.maxDate)\n        && !dates.includes(date)\n        && !config.checkDisabled(date, pickLevel)\n        && (pickLevel > 0 || !config.daysOfWeekDisabled.includes(new Date(date).getDay()))\n      ) {\n        dates.push(date);\n      }\n      return dates;\n    }, []);\n    if (newDates.length === 0) {\n      return;\n    }\n    if (config.multidate && !clear) {\n      // get the synmetric difference between origDates and newDates\n      newDates = newDates.reduce((dates, date) => {\n        if (!origDates.includes(date)) {\n          dates.push(date);\n        }\n        return dates;\n      }, origDates.filter(date => !newDates.includes(date)));\n    }\n    // do length check always because user can input multiple dates regardless of the mode\n    return maxNumberOfDates && newDates.length > maxNumberOfDates\n      ? newDates.slice(maxNumberOfDates * -1)\n      : newDates;\n  }\n\n  // refresh the UI elements\n  // modes: 1: input only, 2, picker only, 3 both\n  function refreshUI(datepicker, mode = 3, quickRender = true, viewDate = undefined) {\n    const {config, picker, inputField} = datepicker;\n    if (mode & 2) {\n      const newView = picker.active ? config.pickLevel : config.startView;\n      picker.update(viewDate).changeView(newView).render(quickRender);\n    }\n    if (mode & 1 && inputField) {\n      inputField.value = stringifyDates(datepicker.dates, config);\n    }\n  }\n\n  function setDate(datepicker, inputDates, options) {\n    const config = datepicker.config;\n    let {clear, render, autohide, revert, forceRefresh, viewDate} = options;\n    if (render === undefined) {\n      render = true;\n    }\n    if (!render) {\n      autohide = forceRefresh = false;\n    } else if (autohide === undefined) {\n      autohide = config.autohide;\n    }\n    viewDate = parseDate(viewDate, config.format, config.locale);\n\n    const newDates = processInputDates(datepicker, inputDates, clear);\n    if (!newDates && !revert) {\n      return;\n    }\n    if (newDates && newDates.toString() !== datepicker.dates.toString()) {\n      datepicker.dates = newDates;\n      refreshUI(datepicker, render ? 3 : 1, true, viewDate);\n      triggerDatepickerEvent(datepicker, 'changeDate');\n    } else {\n      refreshUI(datepicker, forceRefresh ? 3 : 1, true, viewDate);\n    }\n\n    if (autohide) {\n      datepicker.hide();\n    }\n  }\n\n  function getOutputConverter(datepicker, format) {\n    return format\n      ? date => formatDate(date, format, datepicker.config.locale)\n      : date => new Date(date);\n  }\n\n  /**\n   * Class representing a date picker\n   */\n  class Datepicker {\n    /**\n     * Create a date picker\n     * @param  {Element} element - element to bind a date picker\n     * @param  {Object} [options] - config options\n     * @param  {DateRangePicker} [rangepicker] - DateRangePicker instance the\n     * date picker belongs to. Use this only when creating date picker as a part\n     * of date range picker\n     */\n    constructor(element, options = {}, rangepicker = undefined) {\n      element.datepicker = this;\n      this.element = element;\n      this.dates = [];\n\n      // initialize config\n      const config = this.config = Object.assign({\n        buttonClass: (options.buttonClass && String(options.buttonClass)) || 'button',\n        container: null,\n        defaultViewDate: today(),\n        maxDate: undefined,\n        minDate: undefined,\n      }, processOptions(defaultOptions, this));\n\n      // configure by type\n      let inputField;\n      if (element.tagName === 'INPUT') {\n        inputField = this.inputField = element;\n        inputField.classList.add('datepicker-input');\n        if (options.container) {\n          // omit string type check because it doesn't guarantee to avoid errors\n          // (invalid selector string causes abend with sytax error)\n          config.container = options.container instanceof HTMLElement\n            ? options.container\n            : document.querySelector(options.container);\n        }\n      } else {\n        config.container = element;\n      }\n      if (rangepicker) {\n        // check validiry\n        const index = rangepicker.inputs.indexOf(inputField);\n        const datepickers = rangepicker.datepickers;\n        if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n          throw Error('Invalid rangepicker object.');\n        }\n        // attach itaelf to the rangepicker here so that processInputDates() can\n        // determine if this is the range-end picker of the rangepicker while\n        // setting inital values when pickLevel > 0\n        datepickers[index] = this;\n        this.rangepicker = rangepicker;\n        this.rangeSideIndex = index;\n      }\n\n      // set up config\n      this._options = options;\n      Object.assign(config, processOptions(options, this));\n      config.shortcutKeys = createShortcutKeyConfig(options.shortcutKeys || {});\n\n      // process initial value\n      const initialDates = stringToArray(\n        element.value || element.dataset.date,\n        config.dateDelimiter\n      );\n      delete element.dataset.date;\n      const inputDateValues = processInputDates(this, initialDates);\n      if (inputDateValues && inputDateValues.length > 0) {\n        this.dates = inputDateValues;\n      }\n      if (inputField) {\n        inputField.value = stringifyDates(this.dates, config);\n      }\n\n      // set up picekr element\n      const picker = this.picker = new Picker(this);\n\n      const keydownListener = [element, 'keydown', onKeydown.bind(null, this)];\n      if (inputField) {\n        registerListeners(this, [\n          keydownListener,\n          [inputField, 'focus', onFocus.bind(null, this)],\n          [inputField, 'mousedown', onMousedown.bind(null, this)],\n          [inputField, 'click', onClickInput.bind(null, this)],\n          [inputField, 'paste', onPaste.bind(null, this)],\n          // To detect a click on outside, just listening to mousedown is enough,\n          // no need to listen to touchstart.\n          // Actually, listening to touchstart can be a problem because, while\n          // mousedown is fired only on tapping but not on swiping/pinching,\n          // touchstart is fired on swiping/pinching as well.\n          // (issue #95)\n          [document, 'mousedown', onClickOutside.bind(null, this)],\n          [window, 'resize', picker.place.bind(picker)]\n        ]);\n      } else {\n        registerListeners(this, [keydownListener]);\n        this.show();\n      }\n    }\n\n    /**\n     * Format Date object or time value in given format and language\n     * @param  {Date|Number} date - date or time value to format\n     * @param  {String|Object} format - format string or object that contains\n     * toDisplay() custom formatter, whose signature is\n     * - args:\n     *   - date: {Date} - Date instance of the date passed to the method\n     *   - format: {Object} - the format object passed to the method\n     *   - locale: {Object} - locale for the language specified by `lang`\n     * - return:\n     *     {String} formatted date\n     * @param  {String} [lang=en] - language code for the locale to use\n     * @return {String} formatted date\n     */\n    static formatDate(date, format, lang) {\n      return formatDate(date, format, lang && locales[lang] || locales.en);\n    }\n\n    /**\n     * Parse date string\n     * @param  {String|Date|Number} dateStr - date string, Date object or time\n     * value to parse\n     * @param  {String|Object} format - format string or object that contains\n     * toValue() custom parser, whose signature is\n     * - args:\n     *   - dateStr: {String|Date|Number} - the dateStr passed to the method\n     *   - format: {Object} - the format object passed to the method\n     *   - locale: {Object} - locale for the language specified by `lang`\n     * - return:\n     *     {Date|Number} parsed date or its time value\n     * @param  {String} [lang=en] - language code for the locale to use\n     * @return {Number} time value of parsed date\n     */\n    static parseDate(dateStr, format, lang) {\n      return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n    }\n\n    /**\n     * @type {Object} - Installed locales in `[languageCode]: localeObject` format\n     * en`:_English (US)_ is pre-installed.\n     */\n    static get locales() {\n      return locales;\n    }\n\n    /**\n     * @type {Boolean} - Whether the picker element is shown. `true` whne shown\n     */\n    get active() {\n      return !!(this.picker && this.picker.active);\n    }\n\n    /**\n     * @type {HTMLDivElement} - DOM object of picker element\n     */\n    get pickerElement() {\n      return this.picker ? this.picker.element : undefined;\n    }\n\n    /**\n     * Set new values to the config options\n     * @param {Object} options - config options to update\n     */\n    setOptions(options) {\n      const newOptions = processOptions(options, this);\n      Object.assign(this._options, options);\n      Object.assign(this.config, newOptions);\n      this.picker.setOptions(newOptions);\n\n      refreshUI(this, 3);\n    }\n\n    /**\n     * Show the picker element\n     */\n    show() {\n      if (this.inputField) {\n        const {config, inputField} = this;\n        if (inputField.disabled || (inputField.readOnly && !config.enableOnReadonly)) {\n          return;\n        }\n        if (!isActiveElement(inputField) && !config.disableTouchKeyboard) {\n          this._showing = true;\n          inputField.focus();\n          delete this._showing;\n        }\n      }\n      this.picker.show();\n    }\n\n    /**\n     * Hide the picker element\n     * Not available on inline picker\n     */\n    hide() {\n      if (!this.inputField) {\n        return;\n      }\n      this.picker.hide();\n      this.picker.update().changeView(this.config.startView).render();\n    }\n\n    /**\n     * Toggle the display of the picker element\n     * Not available on inline picker\n     *\n     * Unlike hide(), the picker does not return to the start view when hiding.\n     */\n    toggle() {\n      if (!this.picker.active) {\n        this.show();\n      } else if (this.inputField) {\n        this.picker.hide();\n      }\n    }\n\n    /**\n     * Destroy the Datepicker instance\n     * @return {Detepicker} - the instance destroyed\n     */\n    destroy() {\n      this.hide();\n      unregisterListeners(this);\n      this.picker.detach();\n      const element = this.element;\n      element.classList.remove('datepicker-input');\n      delete element.datepicker;\n      return this;\n    }\n\n    /**\n     * Get the selected date(s)\n     *\n     * The method returns a Date object of selected date by default, and returns\n     * an array of selected dates in multidate mode. If format string is passed,\n     * it returns date string(s) formatted in given format.\n     *\n     * @param  {String} [format] - format string to stringify the date(s)\n     * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\n     * selected, empty array in multidate mode and undefined in sigledate mode\n     */\n    getDate(format = undefined) {\n      const callback = getOutputConverter(this, format);\n\n      if (this.config.multidate) {\n        return this.dates.map(callback);\n      }\n      if (this.dates.length > 0) {\n        return callback(this.dates[0]);\n      }\n    }\n\n    /**\n     * Set selected date(s)\n     *\n     * In multidate mode, you can pass multiple dates as a series of arguments\n     * or an array. (Since each date is parsed individually, the type of the\n     * dates doesn't have to be the same.)\n     * The given dates are used to toggle the select status of each date. The\n     * number of selected dates is kept from exceeding the length set to\n     * maxNumberOfDates.\n     *\n     * With clear: true option, the method can be used to clear the selection\n     * and to replace the selection instead of toggling in multidate mode.\n     * If the option is passed with no date arguments or an empty dates array,\n     * it works as \"clear\" (clear the selection then set nothing), and if the\n     * option is passed with new dates to select, it works as \"replace\" (clear\n     * the selection then set the given dates)\n     *\n     * When render: false option is used, the method omits re-rendering the\n     * picker element. In this case, you need to call refresh() method later in\n     * order for the picker element to reflect the changes. The input field is\n     * refreshed always regardless of this option.\n     *\n     * When invalid (unparsable, repeated, disabled or out-of-range) dates are\n     * passed, the method ignores them and applies only valid ones. In the case\n     * that all the given dates are invalid, which is distinguished from passing\n     * no dates, the method considers it as an error and leaves the selection\n     * untouched. (The input field also remains untouched unless revert: true\n     * option is used.)\n     * Replacing the selection with the same date(s) also causes a similar\n     * situation. In both cases, the method does not refresh the picker element\n     * unless forceRefresh: true option is used.\n     *\n     * If viewDate option is used, the method changes the focused date to the\n     * specified date instead of the last item of the selection.\n     *\n     * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\n     * objects, time values or mix of those for new selection\n     * @param {Object} [options] - function options\n     * - clear: {boolean} - Whether to clear the existing selection\n     *     defualt: false\n     * - render: {boolean} - Whether to re-render the picker element\n     *     default: true\n     * - autohide: {boolean} - Whether to hide the picker element after re-render\n     *     Ignored when used with render: false\n     *     default: config.autohide\n     * - revert: {boolean} - Whether to refresh the input field when all the\n     *     passed dates are invalid\n     *     default: false\n     * - forceRefresh: {boolean} - Whether to refresh the picker element when\n     *     passed dates don't change the existing selection\n     *     default: false\n     * - viewDate: {Date|Number|String} - Date to be focused after setiing date(s)\n     *     default: The last item of the resulting selection, or defaultViewDate\n     *     config option if none is selected\n     */\n    setDate(...args) {\n      const dates = [...args];\n      const opts = {};\n      const lastArg = lastItemOf(args);\n      if (\n        lastArg\n        && typeof lastArg === 'object'\n        && !Array.isArray(lastArg)\n        && !(lastArg instanceof Date)\n      ) {\n        Object.assign(opts, dates.pop());\n      }\n\n      const inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n      setDate(this, inputDates, opts);\n    }\n\n    /**\n     * Update the selected date(s) with input field's value\n     * Not available on inline picker\n     *\n     * The input field will be refreshed with properly formatted date string.\n     *\n     * In the case that all the entered dates are invalid (unparsable, repeated,\n     * disabled or out-of-range), which is distinguished from empty input field,\n     * the method leaves the input field untouched as well as the selection by\n     * default. If revert: true option is used in this case, the input field is\n     * refreshed with the existing selection.\n     * The method also doesn't refresh the picker element in this case and when\n     * the entered dates are the same as the existing selection. If\n     * forceRefresh: true option is used, the picker element is refreshed in\n     * these cases too.\n     *\n     * @param  {Object} [options] - function options\n     * - autohide: {boolean} - whether to hide the picker element after refresh\n     *     default: false\n     * - revert: {boolean} - Whether to refresh the input field when all the\n     *     passed dates are invalid\n     *     default: false\n     * - forceRefresh: {boolean} - Whether to refresh the picer element when\n     *     input field's value doesn't change the existing selection\n     *     default: false\n     */\n    update(options = undefined) {\n      if (!this.inputField) {\n        return;\n      }\n\n      const opts = Object.assign(options || {}, {clear: true, render: true, viewDate: undefined});\n      const inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n      setDate(this, inputDates, opts);\n    }\n\n    /**\n     * Get the focused date\n     *\n     * The method returns a Date object of focused date by default. If format\n     * string is passed, it returns date string formatted in given format.\n     *\n     * @param  {String} [format] - format string to stringify the date\n     * @return {Date|String} - focused date (viewDate)\n     */\n    getFocusedDate(format = undefined) {\n      return getOutputConverter(this, format)(this.picker.viewDate);\n    }\n\n    /**\n     * Set focused date\n     *\n     * By default, the method updates the focus on the view shown at the time,\n     * or the one set to the startView config option if the picker is hidden.\n     * When resetView: true is passed, the view displayed is changed to the\n     * pickLevel config option's if the picker is shown.\n     *\n     * @param {Date|Number|String} viewDate - date string, Date object, time\n     * values of the date to focus\n     * @param {Boolean} [resetView] - whether to change the view to pickLevel\n     * config option's when the picker is shown. Ignored when the picker is\n     * hidden\n     */\n    setFocusedDate(viewDate, resetView = false) {\n      const {config, picker, active, rangeSideIndex} = this;\n      const pickLevel = config.pickLevel;\n      const newViewDate = parseDate(viewDate, config.format, config.locale);\n      if (newViewDate === undefined) {\n        return;\n      }\n\n      picker.changeFocus(regularizeDate(newViewDate, pickLevel, rangeSideIndex));\n      if (active && resetView) {\n        picker.changeView(pickLevel);\n      }\n      picker.render();\n    }\n\n    /**\n     * Refresh the picker element and the associated input field\n     * @param {String} [target] - target item when refreshing one item only\n     * 'picker' or 'input'\n     * @param {Boolean} [forceRender] - whether to re-render the picker element\n     * regardless of its state instead of optimized refresh\n     */\n    refresh(target = undefined, forceRender = false) {\n      if (target && typeof target !== 'string') {\n        forceRender = target;\n        target = undefined;\n      }\n\n      let mode;\n      if (target === 'picker') {\n        mode = 2;\n      } else if (target === 'input') {\n        mode = 1;\n      } else {\n        mode = 3;\n      }\n      refreshUI(this, mode, !forceRender);\n    }\n\n    /**\n     * Enter edit mode\n     * Not available on inline picker or when the picker element is hidden\n     */\n    enterEditMode() {\n      const inputField = this.inputField;\n      if (!inputField || inputField.readOnly || !this.picker.active || this.editMode) {\n        return;\n      }\n      this.editMode = true;\n      inputField.classList.add('in-edit');\n    }\n\n    /**\n     * Exit from edit mode\n     * Not available on inline picker\n     * @param  {Object} [options] - function options\n     * - update: {boolean} - whether to call update() after exiting\n     *     If false, input field is revert to the existing selection\n     *     default: false\n     */\n    exitEditMode(options = undefined) {\n      if (!this.inputField || !this.editMode) {\n        return;\n      }\n      const opts = Object.assign({update: false}, options);\n      delete this.editMode;\n      this.inputField.classList.remove('in-edit');\n      if (opts.update) {\n        this.update(opts);\n      }\n    }\n  }\n\n  // filter out the config options inapproprite to pass to Datepicker\n  function filterOptions(options) {\n    const newOpts = Object.assign({}, options);\n\n    delete newOpts.inputs;\n    delete newOpts.allowOneSidedRange;\n    delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n    return newOpts;\n  }\n\n  function setupDatepicker(rangepicker, changeDateListener, el, options) {\n    registerListeners(rangepicker, [\n      [el, 'changeDate', changeDateListener],\n    ]);\n    new Datepicker(el, options, rangepicker);\n  }\n\n  function onChangeDate(rangepicker, ev) {\n    // to prevent both datepickers trigger the other side's update each other\n    if (rangepicker._updating) {\n      return;\n    }\n    rangepicker._updating = true;\n\n    const target = ev.target;\n    if (target.datepicker === undefined) {\n      return;\n    }\n\n    const datepickers = rangepicker.datepickers;\n    const [datepicker0, datepicker1] = datepickers;\n    const setDateOptions = {render: false};\n    const changedSide = rangepicker.inputs.indexOf(target);\n    const otherSide = changedSide === 0 ? 1 : 0;\n    const changedDate = datepickers[changedSide].dates[0];\n    const otherDate = datepickers[otherSide].dates[0];\n\n    if (changedDate !== undefined && otherDate !== undefined) {\n      // if the start of the range > the end, swap them\n      if (changedSide === 0 && changedDate > otherDate) {\n        datepicker0.setDate(otherDate, setDateOptions);\n        datepicker1.setDate(changedDate, setDateOptions);\n      } else if (changedSide === 1 && changedDate < otherDate) {\n        datepicker0.setDate(changedDate, setDateOptions);\n        datepicker1.setDate(otherDate, setDateOptions);\n      }\n    } else if (!rangepicker.allowOneSidedRange) {\n      // to prevent the range from becoming one-sided, copy changed side's\n      // selection (no matter if it's empty) to the other side\n      if (changedDate !== undefined || otherDate !== undefined) {\n        setDateOptions.clear = true;\n        datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n      }\n    }\n    datepickers.forEach((datepicker) => {\n      datepicker.picker.update().render();\n    });\n    delete rangepicker._updating;\n  }\n\n  /**\n   * Class representing a date range picker\n   */\n  class DateRangePicker  {\n    /**\n     * Create a date range picker\n     * @param  {Element} element - element to bind a date range picker\n     * @param  {Object} [options] - config options\n     */\n    constructor(element, options = {}) {\n      let inputs = Array.isArray(options.inputs)\n        ? options.inputs\n        : Array.from(element.querySelectorAll('input'));\n      if (inputs.length < 2) {\n        return;\n      }\n\n      element.rangepicker = this;\n      this.element = element;\n      this.inputs = inputs = inputs.slice(0, 2);\n      Object.freeze(inputs);\n      this.allowOneSidedRange = !!options.allowOneSidedRange;\n\n      const changeDateListener = onChangeDate.bind(null, this);\n      const cleanOptions = filterOptions(options);\n      // in order for initial date setup to work right when pcicLvel > 0,\n      // let Datepicker constructor add the instance to the rangepicker\n      const datepickers = this.datepickers = [];\n      inputs.forEach((input) => {\n        setupDatepicker(this, changeDateListener, input, cleanOptions);\n      });\n      Object.freeze(datepickers);\n      Object.defineProperty(this, 'dates', {\n        get() {\n          return datepickers.map(datepicker => datepicker.dates[0]);\n        },\n      });\n      // normalize the range if inital dates are given\n      if (datepickers[0].dates.length > 0) {\n        onChangeDate(this, {target: inputs[0]});\n      } else if (datepickers[1].dates.length > 0) {\n        onChangeDate(this, {target: inputs[1]});\n      }\n    }\n\n    /**\n     * Set new values to the config options\n     * @param {Object} options - config options to update\n     */\n    setOptions(options) {\n      this.allowOneSidedRange = !!options.allowOneSidedRange;\n\n      const cleanOptions = filterOptions(options);\n      this.datepickers.forEach((datepicker) => {\n        datepicker.setOptions(cleanOptions);\n      });\n    }\n\n    /**\n     * Destroy the DateRangePicker instance\n     * @return {DateRangePicker} - the instance destroyed\n     */\n    destroy() {\n      this.datepickers.forEach((datepicker) => {\n        datepicker.destroy();\n      });\n      unregisterListeners(this);\n      delete this.element.rangepicker;\n    }\n\n    /**\n     * Get the start and end dates of the date range\n     *\n     * The method returns Date objects by default. If format string is passed,\n     * it returns date strings formatted in given format.\n     * The result array always contains 2 items (start date/end date) and\n     * undefined is used for unselected side. (e.g. If none is selected,\n     * the result will be [undefined, undefined]. If only the end date is set\n     * when allowOneSidedRange config option is true, [undefined, endDate] will\n     * be returned.)\n     *\n     * @param  {String} [format] - Format string to stringify the dates\n     * @return {Array} - Start and end dates\n     */\n    getDates(format = undefined) {\n      const callback = format\n        ? date => formatDate(date, format, this.datepickers[0].config.locale)\n        : date => new Date(date);\n\n      return this.dates.map(date => date === undefined ? date : callback(date));\n    }\n\n    /**\n     * Set the start and end dates of the date range\n     *\n     * The method calls datepicker.setDate() internally using each of the\n     * arguments in start→end order.\n     *\n     * When a clear: true option object is passed instead of a date, the method\n     * clears the date.\n     *\n     * If an invalid date, the same date as the current one or an option object\n     * without clear: true is passed, the method considers that argument as an\n     * \"ineffective\" argument because calling datepicker.setDate() with those\n     * values makes no changes to the date selection.\n     *\n     * When the allowOneSidedRange config option is false, passing {clear: true}\n     * to clear the range works only when it is done to the last effective\n     * argument (in other words, passed to rangeEnd or to rangeStart along with\n     * ineffective rangeEnd). This is because when the date range is changed,\n     * it gets normalized based on the last change at the end of the changing\n     * process.\n     *\n     * @param {Date|Number|String|Object} rangeStart - Start date of the range\n     * or {clear: true} to clear the date\n     * @param {Date|Number|String|Object} rangeEnd - End date of the range\n     * or {clear: true} to clear the date\n     */\n    setDates(rangeStart, rangeEnd) {\n      const {\n        datepickers: [datepicker0, datepicker1],\n        inputs: [input0, input1],\n        dates: [origDate0, origDate1],\n      } = this;\n\n      // If range normalization runs on every change, we can't set a new range\n      // that starts after the end of the current range correctly because the\n      // normalization process swaps start↔︎end right after setting the new start\n      // date. To prevent this, the normalization process needs to run once after\n      // both of the new dates are set.\n      this._updating = true;\n      datepicker0.setDate(rangeStart);\n      datepicker1.setDate(rangeEnd);\n      delete this._updating;\n\n      if (datepicker1.dates[0] !== origDate1) {\n        onChangeDate(this, {target: input1});\n      } else if (datepicker0.dates[0] !== origDate0) {\n        onChangeDate(this, {target: input0});\n      }\n    }\n  }\n\n  window.Datepicker = Datepicker;\n  window.DateRangePicker = DateRangePicker;\n\n})();\n","/* global materialSymbolsUrl vanilla_datepicker_i18n Datepicker cmsNativeLanguage */\nconst getMaterialSymbolSVG = (id) => {\n  return `<svg class=\"material-symbols-20\"><use xlink:href=\"${materialSymbolsUrl}#${id}\" /></svg>`;\n};\n\nfunction initDateInput(inputWrapper, clearButton = true) {\n  const cancelIcon = getMaterialSymbolSVG('close_400');\n  const calendarIconSVG = getMaterialSymbolSVG('calendar_month_400');\n\n  const calendarIcon = document.createElement('div');\n  calendarIcon.classList.add('calendar-icon');\n  calendarIcon.innerHTML = calendarIconSVG;\n  inputWrapper.appendChild(calendarIcon);\n\n  if (clearButton) {\n    const dateResetBtn = document.createElement('div');\n    dateResetBtn.classList.add('date-reset');\n    dateResetBtn.innerHTML = cancelIcon;\n    inputWrapper.appendChild(dateResetBtn);\n\n    return dateResetBtn;\n  }\n}\n\nfunction mapDate(dateValue) {\n  if (dateValue === 'today') {\n    return new Date();\n  }\n\n  return new Date(dateValue);\n}\n\nfunction getMinMaxDate(element) {\n  const dataObject = element.classList.contains('vanilla-range-datepicker') ? element.dataset : element;\n\n  const minDate = dataObject.min ? { minDate: mapDate(dataObject.min) } : {};\n  const maxDate = dataObject.max ? { maxDate: mapDate(dataObject.max) } : {};\n\n  return {\n    ...minDate,\n    ...maxDate,\n  };\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  Object.assign(Datepicker.locales, vanilla_datepicker_i18n);\n  const nextArrow = getMaterialSymbolSVG('keyboard_double_arrow_right_400');\n  const prevArrow = getMaterialSymbolSVG('keyboard_double_arrow_left_400');\n\n  const monthParser = (dateString) => {\n    const regex = /([0-9]{2})(\\/|-|.)([0-9]{4})/;\n    if (regex.test(dateString)) {\n      const [, month, , year] = regex.exec(dateString);\n      return new Date(Number(year), Number(month) - 1, 1);\n    } else {\n      return dateString;\n    }\n  };\n\n  function initVanillaDatepickerDropdown(element) {\n    if (element && !element.datepicker) {\n      const dropdownElement = document.getElementById(element.dataset.dropdownId);\n      const filterReset = dropdownElement.parentElement.querySelector('.filter-compact__dropdown-reset');\n      const inputWrapper = dropdownElement.parentElement.querySelector('.filter-compact__dropdown-input');\n      const datepickerInput = element.parentElement.querySelector('input');\n      const datepickerRadio = dropdownElement.parentElement.querySelectorAll('input[type=\"radio\"]');\n      const dateCheckbox = document.getElementById(datepickerInput.dataset.targetId);\n      const chooseDateCheckboxes = document.querySelectorAll('[name=' + dateCheckbox.name + ']');\n      const dateResetBtn = initDateInput(inputWrapper);\n\n      chooseDateCheckboxes.forEach((checkbox) => {\n        checkbox.addEventListener('change', function (event) {\n          if (event.target.checked && event.target.id === datepickerInput.dataset.targetId) {\n            const viewDate = checkbox.getAttribute('data-init-timestamp')\n              ? new Date(parseInt(checkbox.getAttribute('data-init-timestamp')))\n              : Date.now();\n            new window.Datepicker(element, {\n              buttonClass: 'btn',\n              language: cmsNativeLanguage,\n              maxView: 2,\n              pickLevel: 1,\n              startView: 1,\n              nextArrow,\n              prevArrow,\n              defaultViewDate: viewDate,\n            });\n          } else if (element.datepicker) {\n            element.datepicker.destroy();\n            datepickerInput.value = '';\n          }\n        });\n      });\n\n      dateResetBtn.addEventListener('click', function () {\n        if (element.datepicker) element.datepicker.setDate({ clear: true });\n        datepickerInput.value = '';\n      });\n\n      datepickerInput.addEventListener('focus', function () {\n        if (!dateCheckbox.checked) {\n          dateCheckbox.click();\n        }\n      });\n\n      datepickerInput.addEventListener('change', () => {\n        const parsed = monthParser(datepickerInput.value);\n        element.datepicker.setDate(parsed);\n      });\n\n      filterReset.addEventListener('click', function (event) {\n        event.preventDefault();\n\n        datepickerRadio.forEach((radio) => {\n          if (radio.checked === true) {\n            radio.checked = false;\n            radio.dispatchEvent(new Event('change'));\n            // event trigger for jquery based event listener (f.e. jquery.listing.js)\n            $(radio).trigger('change');\n          }\n        });\n      });\n\n      element.addEventListener('changeDate', function () {\n        datepickerInput.value = element.datepicker.getDate('mm/yyyy');\n      });\n    }\n  }\n\n  document.querySelectorAll('.vanilla-datepicker[data-dropdown-id]').forEach((element) => {\n    initVanillaDatepickerDropdown(element);\n  });\n\n  document.addEventListener('initVanillaDatepickerDropdown', (event) => {\n    initVanillaDatepickerDropdown(event.target);\n  });\n\n  document.querySelectorAll('input.vanilla-datepicker').forEach((element) => {\n    const datepickerInput = element.parentElement.querySelector('input');\n    const minMaxDate = getMinMaxDate(element);\n\n    new window.Datepicker(datepickerInput, {\n      buttonClass: 'btn',\n      clearButton: true,\n      language: cmsNativeLanguage,\n      todayButton: true,\n      todayButtonMode: 1,\n      todayHighlight: true,\n      nextArrow,\n      prevArrow,\n      ...minMaxDate,\n    });\n\n    datepickerInput.blur();\n\n    const dateResetBtn = initDateInput(element.parentElement);\n\n    dateResetBtn.addEventListener('click', function (e) {\n      e.preventDefault();\n      if (element.datepicker) {\n        element.datepicker.setDate({ clear: true });\n      }\n\n      datepickerInput.value = '';\n      datepickerInput.focus();\n    });\n\n    if (!datepickerInput.value) {\n      dateResetBtn.classList.add('hidden');\n    }\n\n    datepickerInput.addEventListener('changeDate', (event) => {\n      if (event.target.value) {\n        dateResetBtn.classList.remove('hidden');\n      } else {\n        dateResetBtn.classList.add('hidden');\n      }\n    });\n  });\n\n  document.querySelectorAll('.vanilla-range-datepicker').forEach((element) => {\n    const minMaxDate = getMinMaxDate(element);\n\n    const inputs = element.querySelectorAll('input');\n\n    inputs.forEach((input) => {\n      const dateResetBtn = initDateInput(input.parentElement);\n\n      if (!input.value) {\n        dateResetBtn.classList.add('hidden');\n      }\n\n      input.addEventListener('changeDate', (event) => {\n        if (event.target.value) {\n          input.parentElement.classList.add('active');\n          dateResetBtn.classList.remove('hidden');\n        } else {\n          dateResetBtn.classList.add('hidden');\n        }\n\n        if (!event.target.value && input !== document.activeElement) {\n          input.parentElement.classList.remove('active');\n        }\n\n        dateResetBtn.addEventListener('click', function (e) {\n          e.preventDefault();\n\n          if (element.rangepicker) {\n            element.rangepicker.setDates({ clear: true });\n          }\n        });\n      });\n    });\n\n    new window.DateRangePicker(element, {\n      buttonClass: 'btn',\n      clearButton: true,\n      language: cmsNativeLanguage,\n      todayButton: true,\n      todayButtonMode: 1,\n      nextArrow,\n      prevArrow,\n      ...minMaxDate,\n    });\n  });\n});\n"]}