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AG,EAAG,GACjBS,CACT,C,mFCLO,SAASuC,EAAUxC,EAAM6Q,GAC9B,OAAO,OAAU7Q,GAAO6Q,EAC1B,C","sources":["webpack://CATSAS/./node_modules/lodash/_createFind.js","webpack://CATSAS/./node_modules/lodash/findLast.js","webpack://CATSAS/./node_modules/lodash/findLastIndex.js","webpack://CATSAS/./node_modules/blocks-nextjs/blocks-react/components/FieldNote/FieldNote.tsx","webpack://CATSAS/./node_modules/blocks-nextjs/blocks-react/components/Icons/Trash/Trash.tsx","webpack://CATSAS/./node_modules/date-fns/differenceInDays.mjs","webpack://CATSAS/./node_modules/date-fns/eachMonthOfInterval.mjs","webpack://CATSAS/./node_modules/date-fns/endOfYear.mjs","webpack://CATSAS/./node_modules/date-fns/getYear.mjs","webpack://CATSAS/./node_modules/date-fns/isSameMonth.mjs","webpack://CATSAS/./node_modules/date-fns/setYear.mjs","webpack://CATSAS/./node_modules/blocks-nextjs/blocks-web-components/components/calendar/calendar.styles.ts","webpack://CATSAS/./node_modules/blocks-nextjs/blocks-web-components/components/calendar/calendar.ts","webpack://CATSAS/./node_modules/date-fns/endOfMonth.mjs","webpack://CATSAS/./node_modules/blocks-nextjs/blocks-web-components/components/icon/icons/calendar.ts","webpack://CATSAS/./node_modules/blocks-nextjs/blocks-web-components/components/icon/icons/trash.ts","webpack://CATSAS/./node_modules/date-fns/getMonth.mjs","webpack://CATSAS/./node_modules/date-fns/isAfter.mjs","webpack://CATSAS/./node_modules/date-fns/isBefore.mjs","webpack://CATSAS/./node_modules/date-fns/isEqual.mjs","webpack://CATSAS/./node_modules/date-fns/isSameDay.mjs","webpack://CATSAS/./node_modules/date-fns/setDefaultOptions.mjs","webpack://CATSAS/./node_modules/date-fns/startOfMonth.mjs","webpack://CATSAS/./node_modules/date-fns/subMonths.mjs"],"sourcesContent":["var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n","var createFind = require('./_createFind'),\n findLastIndex = require('./findLastIndex');\n\n/**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\nvar findLast = createFind(findLastIndex);\n\nmodule.exports = findLast;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\nfunction findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index, true);\n}\n\nmodule.exports = findLastIndex;\n","import { BlocksFieldNote } from 'blocks-nextjs/blocks-web-components/components/field-note/field-note';\nimport React from 'react';\nimport { createComponent } from '../CustomWrapper/CustomWrapper';\nexport const CatFieldNote = createComponent({ react: React, tagName: 'cat-field-note', elementClass: BlocksFieldNote });\n","import { BlocksIconTrash } from 'blocks-nextjs/blocks-web-components/components/icon/icons/trash';\nimport React from 'react';\nimport { createComponent } from '../../CustomWrapper/CustomWrapper';\nexport const CatIconTrash = createComponent({ react: React, tagName: 'cat-icon-trash', elementClass: BlocksIconTrash });\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of full days according to the local timezone\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n *\n * @example\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n * //=> 92\n */\nexport function differenceInDays(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const sign = compareLocalAsc(_dateLeft, _dateRight);\n const difference = Math.abs(differenceInCalendarDays(_dateLeft, _dateRight));\n\n _dateLeft.setDate(_dateLeft.getDate() - sign * difference);\n\n // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n const isLastDayNotFull = Number(\n compareLocalAsc(_dateLeft, _dateRight) === -sign,\n );\n const result = sign * (difference - isLastDayNotFull);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\nfunction compareLocalAsc(dateLeft, dateRight) {\n const diff =\n dateLeft.getFullYear() - dateRight.getFullYear() ||\n dateLeft.getMonth() - dateRight.getMonth() ||\n dateLeft.getDate() - dateRight.getDate() ||\n dateLeft.getHours() - dateRight.getHours() ||\n dateLeft.getMinutes() - dateRight.getMinutes() ||\n dateLeft.getSeconds() - dateRight.getSeconds() ||\n dateLeft.getMilliseconds() - dateRight.getMilliseconds();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n// Fallback for modularized imports:\nexport default differenceInDays;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link eachMonthOfInterval} function options.\n */\n\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param interval - The interval\n *\n * @returns The array with starts of months from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * const result = eachMonthOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10)\n * })\n * //=> [\n * // Sat Feb 01 2014 00:00:00,\n * // Sat Mar 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Thu May 01 2014 00:00:00,\n * // Sun Jun 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // Fri Aug 01 2014 00:00:00\n * // ]\n */\nexport function eachMonthOfInterval(interval, options) {\n const startDate = toDate(interval.start);\n const endDate = toDate(interval.end);\n\n let reversed = +startDate > +endDate;\n const endTime = reversed ? +startDate : +endDate;\n const currentDate = reversed ? endDate : startDate;\n currentDate.setHours(0, 0, 0, 0);\n currentDate.setDate(1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+currentDate <= endTime) {\n dates.push(toDate(currentDate));\n currentDate.setMonth(currentDate.getMonth() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachMonthOfInterval;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nexport function endOfYear(date) {\n const _date = toDate(date);\n const year = _date.getFullYear();\n _date.setFullYear(year + 1, 0, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYear;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The year\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport function getYear(date) {\n return toDate(date).getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default getYear;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to check\n * @param dateRight - The second date to check\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n return (\n _dateLeft.getFullYear() === _dateRight.getFullYear() &&\n _dateLeft.getMonth() === _dateRight.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year) {\n const _date = toDate(date);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+_date)) {\n return constructFrom(date, NaN);\n }\n\n _date.setFullYear(year);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","import { css } from 'lit';\nexport default css ` \n @charset \"UTF-8\";\n/* ------------------------------------*\\\n #RESET\n\\*------------------------------------ */\n/**\n * Border-Box http:/paulirish.com/2012/box-sizing-border-box-ftw/\n */\n*,\n::slotted(*),\n*:before,\n*:after {\n box-sizing: border-box;\n}\n\n:focus-visible {\n outline-color: var(--cat-theme-color-focus-ring);\n}\n\n/* ------------------------------------*\\\n    #BREAKPOINT VARIABLES\n\\*------------------------------------ */\n:root,\n:host {\n --size-base-unit: 0.5rem;\n}\n\n/**\n * RTL support for values logical properties can't automatically adjust for\n * 1) Percentage based horizontal translate values need to be flipped\n * 2) Background gradients using \"to right\" or \"to left\" need to be switched to using deg values\n * 3) Background Position From is used for reversing animation from right to left at 0%\n * 4) Background Position To is used for reversing animation from right to left at 100%\n * 5) Rotate Icon to 180deg for nav button\n * 6) Transformation size for badge left positions\n * 7) Transformation size for badge right positions\n * 8 to 18) Padding values for Input Field Type Tel\n */\n[dir=rtl] {\n --rtlTranslateX: 50%; /* 1 */\n --rtlGradientToRight: 270deg; /* 2 */\n --rtlBackgroundPositionFrom: -135%; /* 3 */\n --rtlBackgroundPositionTo: 0%; /* 4 */\n --rtlRotate180: 180deg; /* 5 */\n --rtlRotate135: 135deg;\n --rtlBadgeLeft: -1.5; /* 6 */\n --rtlBadgeRight: 1.5; /* 7 */\n --rtlTelTypeInputFieldPaddingStart: calc(var(--size-base-unit) * 5); /* 8 */\n --rtlTelTypeInputFieldPaddingEnd: calc(var(--size-base-unit) * 2); /* 9 */\n --rtlTelTypeInputFieldMedPaddingStart: calc(var(--size-base-unit) * 4.5); /* 10 */\n --rtlTelTypeInputFieldMedPaddingEnd: calc(var(--size-base-unit) * 1.5); /* 11 */\n --rtlTelTypeInputFieldSmPaddingStart: calc(var(--size-base-unit) * 4); /* 12 */\n --rtlTelTypeInputFieldSmPaddingEnd: calc(var(--size-base-unit) * 1); /* 13 */\n --rtlTelTypeInputFieldCharBeforePaddingEnd: calc(var(--size-base-unit) * 3.75); /* 14 */\n --rtlTelTypeInputFieldCharAfterPaddingStart: calc(var(--size-base-unit) * 6); /* 15 */\n --rtlTelTypeInputFieldCharAfterErrPaddingStart: calc(var(--size-base-unit) * 9); /* 16 */\n --rtlTelTypeInputFieldIconAfterErrPaddingStart: calc(var(--size-base-unit) * 8); /* 17 */\n --rtlTelTypeInputFieldIconCharAfterErrPaddingStart: calc(var(--size-base-unit) * 12); /* 18 */\n --rtlDisplayNone: none;\n --rtlDisplayBlock: block;\n --rtlDrawerRightTranslateX: -100%;\n --rtlDrawerLeftTranslateX: 100%;\n}\n\n/**\n * Visible focus outline for elements on a light background\n */\n/**\n * Visible focus outline for elements on a dark background\n */\n/**\n * Invisible focus outline for elements that need a more visible\n * focus state for high-contrast mode\n */\n/**\n * Visually hidden from display\n */\n/**\n * style for text ellipsis\n */\n/**\n * Popover attribute has default styling which comes from UA stylesheets which will be overridden here.\n */\n/* ------------------------------------*\\\n #TYPOGRAPHY APPLICATIONS\n\\*------------------------------------ */ /* ------------------------------------*\\\n #DATEPICKER\n\\*------------------------------------ */\n/**\n * 1) Calendar popup widget\n */\n.cat-c-calendar {\n min-width: calc(var(--size-base-unit) * 40);\n width: var(--cat-c-calendar--width, auto);\n margin-block-start: 0;\n background-color: var(--cat-theme-color-background-default);\n position: relative;\n border-radius: var(--cat-theme-border-radius);\n padding: calc(var(--size-base-unit) * 1);\n}\n\n/**\n * Navigation wrapper for previous, next and month sele\n */\n.cat-c-calendar__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-block-end: calc(var(--size-base-unit) * 1);\n height: calc(var(--size-base-unit) * 6);\n}\n\n/**\n * Displayed Month and Year above calendar dates\n */\n.cat-c-calendar__month-selector-button {\n font-family: var(--cat-theme-typography-label-font-family);\n font-weight: var(--cat-theme-typography-label-font-weight);\n font-size: var(--cat-theme-typography-label-font-size);\n line-height: var(--cat-theme-typography-label-line-height);\n display: inline-flex;\n align-items: center;\n gap: calc(var(--size-base-unit) * 1);\n background: none;\n cursor: pointer;\n border: 0;\n padding: calc(var(--size-base-unit) * 1);\n text-align: center;\n color: var(--cat-theme-color-content-default);\n}\n.cat-c-calendar__month-selector-button:focus-visible {\n outline: 2px solid var(--cat-theme-color-focus-ring);\n outline-offset: var(--cat-theme-offset-focus-ring, -2px);\n transition: all var(--cat-anim-fade-quick) var(--cat-anim-ease);\n}\n\n/**\n * Down-caret icon next to current month label\n */\n.cat-c-calendar__month-selector-button-icon {\n --cat-icon-width: calc(var(--size-base-unit) * 2);\n --cat-icon-height: calc(var(--size-base-unit) * 2);\n}\n\n/**\n * Navigation buttons for previous/next month\n */\n.cat-c-calendar__nav-btn {\n cursor: pointer;\n --cat-icon-width: calc(var(--size-base-unit) * 2);\n --cat-icon-height: calc(var(--size-base-unit) * 2);\n /**\n * When previous/next month is not selectable\n */\n}\n.cat-c-calendar__nav-btn[disabled], .cat-c-calendar__nav-btn[disabled]:focus, .cat-c-calendar__nav-btn[disabled]:hover {\n --cat-icon-fill: var(--cat-theme-color-content-disabled);\n}\n\n/**\n * Body wrapper for days\n */\n.cat-c-calendar__table-container {\n text-align: center;\n}\n\n/**\n * Footer container in datepicker\n */\n.cat-c-calendar__footer {\n padding: 0 calc(var(--size-base-unit) * 2) calc(var(--size-base-unit) * 2);\n}\n\n/**\n * Grid for displaying dates\n */\n.cat-c-calendar__table {\n width: 100%;\n}\n.cat-c-calendar__table .cat-c-calendar__table-cell {\n padding: 0;\n}\n.cat-c-calendar__table .cat-c-calendar__table-row:last-child .cat-c-calendar__item {\n margin-block-end: 0;\n}\n\n/**\n * Grid header row spacing\n */\n.cat-c-calendar__header-cell {\n font-family: var(--cat-theme-typography-label-sm-font-family);\n font-weight: var(--cat-theme-typography-label-sm-font-weight);\n font-size: var(--cat-theme-typography-label-sm-font-size);\n line-height: var(--cat-theme-typography-label-sm-line-height);\n text-transform: uppercase;\n color: var(--cat-theme-color-content-default);\n height: calc(var(--size-base-unit) * 6);\n font-weight: var(--cat-font-weight-bold);\n padding-block-end: calc(var(--size-base-unit) * 1);\n}\n\n/**\n * Day buttons on calendar\n */\n.cat-c-calendar__item {\n background: none;\n border: 1px solid transparent;\n border-radius: 50%;\n height: calc(var(--size-base-unit) * 5);\n width: calc(var(--size-base-unit) * 5);\n padding: 0;\n margin-block-end: calc(var(--size-base-unit) * 1);\n position: relative;\n transition: background-color var(--cat-anim-fade-quick) var(--cat-anim-ease), color var(--cat-anim-fade-quick) var(--cat-anim-ease);\n /**\n * Hover/Focus styles\n */\n /**\n * Focus states for dates\n */\n /**\n * When day is Today but unavailable to select\n * 1) Display a dot underneath the date to indicate the present day\n */\n /**\n * When day is Today and available to select\n * 1) Display a dot underneath the date to indicate the present day\n */\n /**\n * When day is available to be selected\n */\n /**\n * Selected\n */\n /**\n * When focus is set to the active selected day\n */\n /**\n * When day is not selectable\n */\n}\n.cat-c-calendar__item:focus-visible, .cat-c-calendar__item:hover {\n background-color: var(--cat-theme-color-background-subtle);\n cursor: pointer;\n outline: none;\n}\n.cat-c-calendar__item:focus-visible {\n outline: 2px solid var(--cat-theme-color-focus-ring);\n outline-offset: var(--cat-theme-offset-focus-ring, -2px);\n transition: all var(--cat-anim-fade-quick) var(--cat-anim-ease);\n}\n.cat-c-calendar__item:focus {\n outline: 2px solid var(--cat-theme-color-focus-ring);\n outline-offset: var(--cat-theme-offset-focus-ring, -2px);\n transition: all var(--cat-anim-fade-quick) var(--cat-anim-ease);\n --cat-theme-offset-focus-ring: 0;\n}\n.cat-c-calendar__item.is-today:after {\n content: \"\";\n width: calc(var(--size-base-unit) * 1);\n height: calc(var(--size-base-unit) * 1);\n background: var(--cat-theme-color-content-disabled);\n border-radius: 50%;\n position: absolute;\n inset-block-end: calc(var(--size-base-unit) * 0.125);\n inset-inline-start: calc(50% - (var(--size-base-unit) * 0.5));\n}\n.cat-c-calendar__item.is-today.is-available:after {\n background: var(--cat-theme-color-background-xstrong);\n}\n.cat-c-calendar__item.is-available {\n font-family: var(--cat-theme-typography-body-sm-font-family);\n font-weight: var(--cat-theme-typography-body-sm-font-weight);\n font-size: var(--cat-theme-typography-body-sm-font-size);\n line-height: var(--cat-theme-typography-body-sm-line-height);\n color: var(--cat-theme-color-content-default);\n}\n.cat-c-calendar__item.is-active, .cat-c-calendar__item.is-available.is-active {\n color: var(--cat-theme-color-content-knockout);\n background-color: var(--cat-theme-color-background-xstrong);\n /**\n  * 1) Change current day dot indicator to knockout text color\n  */\n}\n.cat-c-calendar__item.is-active.is-today:after, .cat-c-calendar__item.is-available.is-active.is-today:after {\n background: var(--cat-theme-color-content-knockout); /* 1 */\n}\n.cat-c-calendar__item.is-active:focus {\n box-shadow: inset 0 0 0 var(--cat-border-width-md) var(--cat-theme-color-border-strong);\n}\n.cat-c-calendar__item:disabled, .cat-c-calendar__item:disabled:focus, .cat-c-calendar__item:disabled:hover {\n color: var(--cat-theme-color-content-disabled);\n cursor: not-allowed;\n background: none;\n}\n.cat-c-calendar__item.is-active:disabled {\n background-color: var(--cat-theme-color-button-background-disabled);\n color: var(--cat-theme-color-content-disabled);\n}\n.cat-c-calendar__item.is-active:hover {\n color: var(--cat-theme-color-content-knockout);\n background-color: var(--cat-theme-color-background-xstrong);\n}\n\n/**\n * Month calendar popup\n */\n.cat-c-calendar-month-panel--open {\n min-width: calc(var(--size-base-unit) * 40);\n}\n\n.cat-c-calendar__month-selector-popup {\n position: absolute;\n inset-inline-start: 0;\n inset-block-start: 0;\n width: 100%;\n height: 100%;\n overflow: hidden auto;\n z-index: 1;\n background: var(--cat-theme-color-background-default);\n}\n.cat-c-calendar__month-selector-popup::-webkit-scrollbar {\n width: calc(var(--size-base-unit) * 0.5);\n}\n.cat-c-calendar__month-selector-popup::-webkit-scrollbar-thumb {\n border-radius: 2px;\n background: var(--cat-theme-color-background-subtle-hover);\n height: calc(var(--size-base-unit) * 5);\n}\n\n/* ------------------------------------*\\\n #MONTH SELECTOR\n\\*------------------------------------ */\n.cat-c-month-selector {\n padding: calc(var(--size-base-unit) * 1);\n}\n\n.cat-c-month-selector__list {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n.cat-c-month-selector__item {\n border-block-end: 1px solid var(--cat-theme-color-border-default);\n padding: calc(var(--size-base-unit) * 1) 0;\n display: grid;\n grid-template-columns: min-content 1fr;\n gap: calc(var(--size-base-unit) * 0.5);\n}\n.cat-c-month-selector__item:last-of-type {\n border-block-end: none;\n}\n\n.cat-c-month-selector__sub-list {\n list-style: none;\n padding: 0;\n margin: 0;\n display: grid;\n grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;\n gap: calc(var(--size-base-unit) * 0.5);\n}\n\n.cat-c-month-selector__year-heading {\n font-family: var(--cat-theme-typography-body-sm-font-family);\n font-weight: var(--cat-theme-typography-body-sm-font-weight);\n font-size: var(--cat-theme-typography-body-sm-font-size);\n line-height: var(--cat-theme-typography-body-sm-line-height);\n color: var(--cat-theme-color-content-subtle);\n margin: calc(var(--size-base-unit) * 1) 0 0;\n}\n\n.cat-c-month-selector__button {\n font-family: var(--cat-theme-typography-label-font-family);\n font-weight: var(--cat-theme-typography-label-font-weight);\n font-size: var(--cat-theme-typography-label-font-size);\n line-height: var(--cat-theme-typography-label-line-height);\n text-transform: uppercase;\n font-weight: var(--cat-font-weight-bold);\n background: none;\n border: 1px solid transparent;\n border-radius: 50%;\n min-height: calc(var(--size-base-unit) * 5);\n min-width: calc(var(--size-base-unit) * 5);\n padding: 0;\n position: relative;\n cursor: pointer;\n transition: background-color var(--cat-anim-fade-quick) var(--cat-anim-ease), color var(--cat-anim-fade-quick) var(--cat-anim-ease);\n color: var(--cat-theme-color-content-strong);\n /**\n * Hover/Focus styles\n */\n /**\n * Focus states for dates\n */\n /**\n * When month is current month\n * 1) Display a dot underneath the date to indicate the present day\n */\n /**\n * When month is current month but disabled\n * 1) Display a disabled dot underneath the date to indicate the present day\n */\n /**\n * Selected\n */\n /**\n * When month is not selectable\n */\n /**\n * When month is active and not selectable\n */\n}\n.cat-c-month-selector__button abbr {\n border-block-end: 0;\n text-decoration: none;\n}\n.cat-c-month-selector__button:focus-visible, .cat-c-month-selector__button:hover {\n background-color: var(--cat-theme-color-background-subtle);\n cursor: pointer;\n outline: none;\n}\n.cat-c-month-selector__button:focus-visible {\n outline: 2px solid var(--cat-theme-color-focus-ring);\n outline-offset: var(--cat-theme-offset-focus-ring, -2px);\n transition: all var(--cat-anim-fade-quick) var(--cat-anim-ease);\n}\n.cat-c-month-selector__button.is-current:after {\n content: \"\";\n width: calc(var(--size-base-unit) * 1);\n height: calc(var(--size-base-unit) * 1);\n background: var(--cat-theme-color-background-xstrong);\n border-radius: 50%;\n position: absolute;\n inset-block-end: calc(var(--size-base-unit) * 0.125);\n inset-inline-start: calc(50% - (var(--size-base-unit) * 0.5));\n}\n.cat-c-month-selector__button.is-current:disabled:after {\n background: var(--cat-theme-color-content-disabled);\n}\n.cat-c-month-selector__button.is-active, .cat-c-month-selector__button.is-available.is-active {\n color: var(--cat-theme-color-content-knockout);\n background-color: var(--cat-theme-color-background-xstrong);\n /**\n  * 1) Change current day dot indicator to knockout text color\n  */\n}\n.cat-c-month-selector__button.is-active.is-current:after, .cat-c-month-selector__button.is-available.is-active.is-current:after {\n background: var(--cat-theme-color-content-knockout); /* 1 */\n}\n.cat-c-month-selector__button:disabled, .cat-c-month-selector__button:disabled:focus, .cat-c-month-selector__button:disabled:hover {\n color: var(--cat-theme-color-content-disabled);\n cursor: not-allowed;\n background: none;\n}\n.cat-c-month-selector__button.is-active:disabled {\n background: var(--cat-theme-color-button-background-disabled);\n}\n`;\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { addDays } from 'date-fns/addDays';\nimport { addMonths } from 'date-fns/addMonths';\nimport { addYears } from 'date-fns/addYears';\nimport { differenceInDays } from 'date-fns/differenceInDays';\nimport { eachMonthOfInterval } from 'date-fns/eachMonthOfInterval';\nimport { endOfMonth } from 'date-fns/endOfMonth';\nimport { endOfYear } from 'date-fns/endOfYear';\nimport { format } from 'date-fns/format';\nimport { getDay } from 'date-fns/getDay';\nimport { getDefaultOptions } from 'date-fns/getDefaultOptions';\nimport { getMonth } from 'date-fns/getMonth';\nimport { getYear } from 'date-fns/getYear';\nimport { isAfter } from 'date-fns/isAfter';\nimport { isBefore } from 'date-fns/isBefore';\nimport { isEqual } from 'date-fns/isEqual';\nimport { isSameDay } from 'date-fns/isSameDay';\nimport { isSameMonth } from 'date-fns/isSameMonth';\nimport { isValid } from 'date-fns/isValid';\nimport { enUS } from 'date-fns/locale';\nimport { parse } from 'date-fns/parse';\nimport { setDay } from 'date-fns/setDay';\nimport { setDefaultOptions } from 'date-fns/setDefaultOptions';\nimport { setYear } from 'date-fns/setYear';\nimport { startOfDay } from 'date-fns/startOfDay';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport { startOfYear } from 'date-fns/startOfYear';\nimport { subMonths } from 'date-fns/subMonths';\nimport { subYears } from 'date-fns/subYears';\nimport { toDate } from 'date-fns/toDate';\nimport { createFocusTrap } from 'focus-trap';\nimport { html, nothing } from 'lit';\nimport { property, queryAll } from 'lit/decorators.js';\nimport { query } from 'lit/decorators/query.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { KEYS } from '../../util/event-keys';\nimport { BlocksElement } from '../BlocksElement';\nimport '../button/button';\nimport '../icon/icons/arrow-triangular-left';\nimport '../icon/icons/arrow-triangular-right';\nimport '../icon/icons/chevron-down';\nimport styles from './calendar.styles';\n/**\n * @slot before - The component before content\n * @slot after - The component after content\n * @fires bl-calendar-change - emitted when a day is selected\n * @csspart base - The component's base wrapper.\n * @csspart header - The component's header wrapper.\n * @csspart previous-nav - The component's previous-nav button.\n * @csspart part-before - The component's before slot.\n * @csspart triangular-left-icon - The component's triangular-left icon.\n * @csspart month-button - The component's month-button.\n * @csspart chevron-down-icon - The component's chevron-down icon.\n * @csspart next-nav - The component's next-nav button.\n * @csspart part-after - The component's after slot.\n * @csspart triangular-right-icon - The component's triangular-right icon.\n * @csspart table-container - The component's table-container wrapper.\n * @csspart table - The component's table wrapper.\n * @csspart table-header - The component's table-header wrapper.\n * @csspart week-table-row - The component's week-table-row wrapper.\n * @csspart header-cell - The component's header-cell.\n * @csspart table-body - The component's table-body wrapper.\n * @csspart day-table-row - The component's day-table-row.\n * @csspart table-cell - The component's table-cell.\n * @csspart day - The component's day element.\n * @csspart month-popup - The component's month-popup wrapper.\n * @csspart month-selector - The component's month-selector wrapper.\n * @csspart month-list - The component's month-list wrapper.\n * @csspart month-selector_item - The component's month-selector_item.\n * @csspart month-selector-year - The component's month-selector-year.\n * @csspart month-selector_sub-list - The component's month-selector_sub-list wrapper.\n * @csspart month-selector_sub-item - The component's month-selector_sub-item wrapper.\n * @csspart month-selector_button - The component's month-selector_button wrapper.\n * @csspart abbr - The component's abbr element.\n */\nexport class BlocksCalendar extends BlocksElement {\n constructor() {\n super(...arguments);\n /**\n * locale object from date-fns/locale\n */\n this.locale = enUS;\n /**\n * Current Month/Year\n */\n this.currentDate = new Date();\n /**\n * Amount of years to go before and after the current date\n */\n this.multiYear = 3;\n this.previousButtonText = 'Previous Month';\n this.nextButtonText = 'Next Month';\n /**\n * Container for current days in month\n */\n this.days = [];\n /**\n * Container for years toggle\n */\n this.years = [];\n /**\n * Make active calendar date inactive\n */\n this.resetDates = false;\n /**\n * Specify date format for UI display\n */\n this.dateFormat = 'MMM dd, yyyy';\n /**\n * Specify \"full\" date format for aria role\n */\n this.fullDateFormat = 'd, EEEE MMMM yyyy';\n /*\n * Currently focussed position\n */\n this.focusedDateIndex = 0;\n /*\n * Current focussed month position\n */\n this.focusedMonthIndex = 0;\n this.monthSelectorButtonClassName = '.cat-c-month-selector__button';\n this.dateSelectorButtonClassName = '.cat-c-calendar__item.is-available';\n this.dateRowSelectorClassName = '.cat-c-calendar__table-row';\n /**\n * Navigate previous in sequential month order\n * 1) Go back a month if able to\n * 2) Reset the calendar grid\n * 3) Reset the previous focus details when we move to next month\n */\n this.subNavMonth = () => {\n if (this.canChangeSubNavMonth()) {\n this.navDate = subMonths(this.navDate ?? '', 1); /* 1 */\n this.makeGrid(); /* 2 */\n this.resetCurrentFocussedDate(); /* 3 */\n return true;\n }\n };\n /**\n * Navigate next in sequential month order\n * 1) Go forward a month if able to\n * 2) Reset the calendar grid\n * 3) Reset the previous focus details when we move to pervious month\n */\n this.addNavMonth = () => {\n if (this.canChangeAddNavMonth()) {\n this.navDate = addMonths(this.navDate ?? '', 1); /* 1 */\n this.makeGrid(); /* 2 */\n this.resetCurrentFocussedDate(); /* 3 */\n return true;\n }\n };\n /**\n * Toggle the month popup overlay\n * 1) Starting Year: Get the current year - this.multiYear years (defaults to 3)\n * 2) Ending Year: Get the current year + this.multiYear years (defaults to 3)\n * 3) Get the years in between\n * 4) Get the months in each year\n * 5) Increment the year\n * 6) Position scroll on year of clicked month\n */\n this.toggleMonthPopup = () => {\n this.showMonthPopup = !this.showMonthPopup;\n /* 1 */\n let startYear = subYears(this.currentDate, this.multiYear);\n /* 2 */\n const endYear = addYears(this.currentDate, this.multiYear);\n /* 3 */\n this.years = [];\n while (startYear <= endYear) {\n const year = { value: startYear };\n year.value = startYear;\n this.years.push(year);\n /* 4 */\n year.month = eachMonthOfInterval({\n start: startOfYear(startYear),\n end: endOfYear(startYear)\n });\n /* 5 */\n startYear = addYears(startYear, 1);\n }\n setTimeout(() => {\n /* 6 */\n const monthToggleYear = this._catCalendarMonthButton?.dataset.year;\n this.shadowRoot?.querySelector('#cat-year-' + monthToggleYear)?.scrollIntoView({ block: 'nearest' });\n }, 1);\n };\n /**\n * Update the calendar grid to the month and year selected\n * @param date date timestamp\n */\n this.updateGrid = (date) => {\n if (date !== undefined) {\n this.resetCurrentFocussedDate();\n const yearNumber = getYear(date);\n this.navDate = setYear(date, yearNumber);\n if (this.showMonthPopup === true) {\n this.toggleMonthPopup();\n }\n this.makeGrid();\n }\n };\n /**\n * Create days of month grid\n * 1) if we have an active date available the focus on that after build the grid so that next key focus starts from this\n */\n this.makeGrid = () => {\n setTimeout(() => {\n this.days = [];\n const weekStart = 0;\n const selectedMonth = getMonth(this.navDate ?? '');\n let currentDate = startOfMonth(this.navDate ?? '');\n let firstDayOfMonth = (getDay(currentDate) + 7 - weekStart) % 7;\n let weekDays = [];\n // Add empty days to align the first day of the month with the correct day of the week\n while (firstDayOfMonth > 0) {\n weekDays.push({ value: null, available: false });\n firstDayOfMonth--;\n }\n // Add the days of the selected month\n while (getMonth(currentDate) === selectedMonth) {\n const day = { value: currentDate, available: true };\n weekDays.push(day);\n currentDate = addDays(currentDate, 1);\n }\n // Add empty days to align the end of the month with the end of the week\n while (weekDays.length % 7 !== 0) {\n weekDays.push({ value: null, available: false });\n }\n let counter = 0;\n let i = 0;\n let week = [];\n do {\n week.push(weekDays[i]);\n i++;\n counter++;\n if (counter === 7 || i === weekDays.length) {\n this.days.push(week);\n week = [];\n counter = 0;\n }\n } while (i < weekDays.length);\n }, 1);\n /* 1 */\n this.focusOnActive();\n };\n /**\n * @fire bl-calendar-change\n * Change output binding\n */\n this.onChanged = () => {\n this.dispatch({\n eventName: 'bl-calendar-change',\n detailObj: {\n value: format(this.selectedDate ?? '', this.dateFormat, { locale: enUS }),\n rawDate: this.selectedDate\n }\n });\n return format(this.selectedDate ?? '', this.dateFormat);\n };\n /**\n * Select the day and emit\n * 1) Bind to form control\n * @param day selected day\n */\n this.selectDay = (day) => {\n // Clear date reset\n this.resetDates = false;\n if (day.available) {\n this.selectedDate = day.value;\n this.onChanged();\n this.focusOnActive();\n }\n };\n /*\n * Only today or active date is tabbed similar to MUI\n */\n this.setTabIndex = (day) => {\n if (!this.setActiveDate && this.isToday(day)) {\n return 0;\n }\n if (this.isActive(day)) {\n this._catIsToday?.setAttribute('tabindex', '-1');\n return 0;\n }\n return -1;\n };\n this.focusOnMonth = (month) => {\n if (!month) {\n return;\n }\n month?.focus();\n this.selectedMonth = month;\n };\n /*\n * Get the next month when month dropdown is active\n * 1) Get the next sibling of the current month selection and focus on that.\n * 2) If the no next item siblings then move to next row for the month selection\n */\n this.getNextMonth = () => {\n let nextElement = this.selectedMonth?.parentElement?.nextElementSibling;\n let nextMonth = nextElement?.querySelector(this.monthSelectorButtonClassName);\n if (nextMonth) {\n this.focusOnMonth(nextMonth);\n return;\n }\n nextElement = this.selectedMonth?.closest('[id^=\"cat-year-\"]')?.nextElementSibling;\n nextMonth = nextElement?.querySelector(this.monthSelectorButtonClassName);\n if (nextMonth) {\n this.focusOnMonth(nextMonth);\n }\n };\n /**\n * Move to lower month when press on down arrow\n * 1. Based on current month selection get the current selection index\n * 2. If the month is available in same year, focus on that below row\n * 3. If the previous month is available in the previous year, focus on that\n */\n this.getBelowMonth = () => {\n /* 1 */\n const subListItems = Array.from(this.selectedMonth?.closest('.cat-c-month-selector__sub-list')?.querySelectorAll('.cat-c-month-selector__sub-item') || []);\n this.focusedMonthIndex = subListItems?.findIndex((subListItem) => subListItem.querySelector('.cat-c-month-selector__button') === this.selectedMonth);\n /* 2 */\n if (this.focusedMonthIndex <= 6) {\n const nextMonth = subListItems[this.focusedMonthIndex + 6]?.querySelector('.cat-c-month-selector__button');\n if (nextMonth) {\n this.focusOnMonth(nextMonth);\n return;\n }\n }\n /* 3 */\n if (this.focusedMonthIndex >= 6) {\n const nextItems = Array.from(this.selectedMonth?.closest('[id^=\"cat-year-\"]')?.nextElementSibling?.querySelectorAll('.cat-c-month-selector__sub-item') || []);\n this.focusedMonthIndex = this.focusedMonthIndex - 6;\n const nextMonth = nextItems[this.focusedMonthIndex]?.querySelector('.cat-c-month-selector__button');\n if (nextMonth) {\n this.focusOnMonth(nextMonth);\n }\n }\n };\n /**\n * Move to upper month when press on up arrow\n * 1. Based on current month selection get the current selection index\n * 2. If the month is available in same year, focus on that upper row\n * 3. If the previous month is available in the previous year, focus on that\n */\n this.getUpperMonth = () => {\n /* 1*/\n const subListItems = Array.from(this.selectedMonth?.closest('.cat-c-month-selector__sub-list')?.querySelectorAll('.cat-c-month-selector__sub-item') || []);\n this.focusedMonthIndex = subListItems?.findIndex((subListItem) => subListItem.querySelector('.cat-c-month-selector__button') === this.selectedMonth);\n /* 2 */\n if (this.focusedMonthIndex >= 6) {\n const nextMonth = subListItems[this.focusedMonthIndex - 6]?.querySelector('.cat-c-month-selector__button');\n if (nextMonth) {\n this.focusOnMonth(nextMonth);\n }\n }\n /* 3 */\n if (this.focusedMonthIndex <= 6) {\n const subListItems = Array.from(this.selectedMonth?.closest('[id^=\"cat-year-\"]')?.previousElementSibling?.querySelectorAll('.cat-c-month-selector__sub-item') ||\n []);\n this.focusedMonthIndex = this.focusedMonthIndex + 6;\n const nextMonth = subListItems[this.focusedMonthIndex]?.querySelector('.cat-c-month-selector__button');\n if (nextMonth) {\n this.focusOnMonth(nextMonth);\n return;\n }\n }\n };\n /**\n * Set the focussed moth index\n */\n this.setFocussedMonthIndex = () => {\n const subListItems = Array.from(this.selectedMonth?.closest('.cat-c-month-selector__sub-list')?.querySelectorAll('.cat-c-month-selector__sub-item') || []);\n this.focusedMonthIndex = subListItems?.findIndex((listItem) => listItem.querySelector('.cat-c-month-selector__button') === this.selectedMonth);\n };\n /*\n * Get the previous month\n */\n this.getPreviousMonth = () => {\n let prevElement = this.selectedMonth?.parentElement?.previousElementSibling;\n let prevMonth = prevElement?.querySelector(this.monthSelectorButtonClassName);\n if (prevMonth) {\n this.focusOnMonth(prevMonth);\n return;\n }\n prevElement = this.selectedMonth?.closest('[id^=\"cat-year-\"]')?.previousElementSibling;\n prevMonth = Array.from(prevElement?.querySelectorAll(this.monthSelectorButtonClassName) || []).pop();\n if (prevMonth) {\n this.focusOnMonth(prevMonth);\n }\n };\n /*\n * Focus first item when any of arrow key pressed\n */\n this.focusFirstItem = (e) => {\n const firstItem = this._catIsActive || this._catIsToday;\n if (!e && firstItem) {\n this.setFocusOnDate(firstItem);\n return;\n }\n const arrowKeys = [KEYS.DOWN_ARROW, KEYS.UP_ARROW, KEYS.LEFT_ARROW, KEYS.RIGHT_ARROW];\n if (e && !this.showMonthPopup && arrowKeys.includes(e.key)) {\n const hasFocussedItem = this.shadowRoot?.querySelector('.cat-c-calendar__table-body :focus');\n if (!hasFocussedItem && firstItem) {\n this.setFocusOnDate(firstItem);\n }\n e.preventDefault();\n }\n };\n /*\n * Focus first item when any of arrow key pressed\n */\n this.focusOnFirstKeypress = (e) => {\n if (this.focusedDate || this.showMonthPopup) {\n e.preventDefault();\n return;\n }\n const firstItem = this._catIsActive || this._catIsToday;\n if (!this.focusedDate || this._catIsActive) {\n this.focusedDate = firstItem;\n this.focusedDate?.setAttribute('tabindex', '0');\n firstItem?.focus();\n this.getDatePosition();\n return firstItem;\n }\n };\n /*\n * Reset the current focussed date\n */\n this.resetCurrentFocussedDate = () => {\n this.focusedDate?.setAttribute('tabindex', '-1');\n this.focusedDate = null;\n this.focusedDateIndex = 0;\n };\n /*\n * Get the date to focus within the month\n */\n this.getFocusDateWithInMonth = (currentFocusedDate) => {\n let nextFocusDate;\n let nextDate = currentFocusedDate?.closest(this.dateRowSelectorClassName)?.nextElementSibling;\n while (nextDate) {\n nextFocusDate = nextDate?.querySelector(this.dateSelectorButtonClassName);\n if (nextFocusDate) {\n break;\n }\n nextDate = nextDate?.closest(this.dateRowSelectorClassName)?.nextElementSibling;\n }\n return nextFocusDate;\n };\n /*\n * Get the date to focus within the month\n */\n this.getFocusDatePrevWithInMonth = (currentFocusedDate) => {\n let prevFocusDate;\n let prevDate = currentFocusedDate?.closest(this.dateRowSelectorClassName)?.previousElementSibling;\n while (prevDate) {\n prevFocusDate = Array.from(prevDate?.querySelectorAll(this.dateSelectorButtonClassName) || []).pop();\n if (prevFocusDate) {\n break;\n }\n prevDate = prevDate.closest(this.dateRowSelectorClassName)?.previousElementSibling;\n }\n return prevFocusDate;\n };\n /*\n * Get the next element to focus when right arrow key pressed\n * 1) Set the current focused date\n * 2) Get the next siblings date and if it is available then focus on it.\n * 3) If no immediate siblings found then search next siblings from current month\n * 4) If no date found in this month then move to next month and repeat the above process\n */\n this.focusRightdate = (focusdedDate) => {\n let nextFocusDateWithInMonth;\n /* 1 */\n const currentFocusedDate = focusdedDate || this.focusedDate;\n if (!currentFocusedDate) {\n if (this._catIsToday) {\n this.setFocusOnDate(this._catIsToday);\n return;\n }\n if (this._catIsAvailableAll && this._catIsAvailableAll[0]) {\n this.setFocusOnDate(this._catIsAvailableAll[0]);\n return;\n }\n }\n /* 2 */\n let nextFocusDate = currentFocusedDate?.parentElement?.nextElementSibling?.querySelector(this.dateSelectorButtonClassName);\n if (nextFocusDate) {\n this.setFocusOnDate(nextFocusDate);\n return;\n }\n /* 3 */\n if (currentFocusedDate) {\n nextFocusDateWithInMonth = this.getFocusDateWithInMonth(currentFocusedDate);\n if (nextFocusDateWithInMonth) {\n this.setFocusOnDate(nextFocusDateWithInMonth);\n return;\n }\n }\n if (!this.canChangeAddNavMonth()) {\n return;\n }\n /* 4 */\n this.addNavMonth();\n // settimeout is required due the movement to next month\n setTimeout(() => {\n if (this._catIsAvailableAll && this._catCalendarItems) {\n const nextFocusDate = this._catIsAvailableAll[0];\n if (nextFocusDate) {\n this.setFocusOnDate(nextFocusDate);\n }\n else {\n this.focusRightdate(this._catCalendarItems[0]);\n }\n }\n }, 50);\n };\n /*\n * Get the next element to focus when right arrow key pressed\n * 1) Get the previous siblings date and if it is available then focus on it.\n * 2) If no immediate siblings found then search previous siblings from current month\n * 3) If no date found in this month then move to previous month and repeat the above process\n */\n this.focusLeftdate = (focusdedDate) => {\n let prevFocusDateWithInMonth;\n const currentFocusedDate = focusdedDate || this.focusedDate;\n if (!currentFocusedDate) {\n if (this._catIsToday) {\n this.setFocusOnDate(this._catIsToday);\n return;\n }\n if (this._catIsAvailableAll && this._catIsAvailableAll[0]) {\n this.setFocusOnDate(this._catIsAvailableAll[0]);\n return;\n }\n }\n /* 1 */\n let prevFocusDate = currentFocusedDate?.parentElement?.previousElementSibling?.querySelector(this.dateSelectorButtonClassName);\n if (prevFocusDate) {\n this.setFocusOnDate(prevFocusDate);\n return;\n }\n /* 2 */\n if (currentFocusedDate) {\n prevFocusDateWithInMonth = this.getFocusDatePrevWithInMonth(currentFocusedDate);\n if (prevFocusDateWithInMonth) {\n this.setFocusOnDate(prevFocusDateWithInMonth);\n return;\n }\n }\n if (!this.canChangeSubNavMonth()) {\n return;\n }\n /* 3 */\n this.subNavMonth();\n // settimeout is required due the movement to previous month\n setTimeout(() => {\n if (this._catCalendarItems) {\n const nextFocusDate = Array.from(this._catCalendarItems || []).pop();\n if (nextFocusDate) {\n this.setFocusOnDate(nextFocusDate);\n }\n else {\n this.focusRightdate(this._catCalendarItems[0]);\n }\n }\n }, 50);\n };\n /*\n * Focus down row date when down arrow pressed\n * 1) If no element to select then focus on the first available date\n * 2) Get the next date from the next row same location\n * 3) If no next item move to next month and find the available date\n */\n this.focusDownDate = (focusdedDate, position) => {\n let currentDate = focusdedDate || this.focusedDate;\n /* 1 */\n if (!currentDate) {\n if (this._catIsToday) {\n this.setFocusOnDate(this._catIsToday);\n return;\n }\n if (this._catIsAvailableAll && this._catIsAvailableAll[0]) {\n this.setFocusOnDate(this._catIsAvailableAll[0]);\n return;\n }\n }\n if (!currentDate) {\n return;\n }\n /* 2 */\n this.focusedDateIndex = position || this.focusedDateIndex;\n const nextDateRows = Array.from(currentDate?.closest(this.dateRowSelectorClassName)?.nextElementSibling?.children || []);\n let nextFocusDate = nextDateRows[this.focusedDateIndex]?.querySelector(this.dateSelectorButtonClassName);\n if (nextFocusDate) {\n this.setFocusOnDate(nextFocusDate);\n return;\n }\n if (!this.canChangeAddNavMonth()) {\n return;\n }\n /* 3 */\n this.addNavMonth();\n // settimeout is required due the movement to next month\n setTimeout(() => {\n if (this._catIsAvailableAll && position && this._catCalendarItems) {\n const nextDateRows = Array.from(this._catIsAvailableAll[0]?.closest(this.dateRowSelectorClassName)?.children || []);\n const nextDate = nextDateRows[position]?.querySelector(this.dateSelectorButtonClassName);\n if (nextDate) {\n this.setFocusOnDate(nextDate);\n }\n else {\n this.focusDownDate(this._catCalendarItems[0], position);\n }\n }\n }, 50);\n };\n /*\n * Focus up row date when up arrow pressed\n * 1) Get the previous date from the previous row same location\n * 2) If no item then move to previous month and find the available date and focus\n */\n this.focusUpDate = (focusdedDate, position) => {\n const element = focusdedDate || this.focusedDate;\n this.focusedDateIndex = position || this.focusedDateIndex;\n if (!element) {\n if (this._catIsToday) {\n this.setFocusOnDate(this._catIsToday);\n return;\n }\n if (this._catIsAvailableAll && this._catIsAvailableAll[0]) {\n this.setFocusOnDate(this._catIsAvailableAll[0]);\n return;\n }\n }\n /* 1 */\n const prevDateRows = Array.from(element?.closest(this.dateRowSelectorClassName)?.previousElementSibling?.children || []);\n let prevFocusDate = prevDateRows[this.focusedDateIndex]?.querySelector(this.dateSelectorButtonClassName);\n if (prevFocusDate) {\n this.setFocusOnDate(prevFocusDate);\n return;\n }\n if (!this.canChangeSubNavMonth()) {\n return;\n }\n /* 2 */\n this.subNavMonth();\n // settimeout is required due the movement to previous month\n setTimeout(() => {\n if (this._catIsAvailableAll && position) {\n const lastDateFromNextMonth = Array.from(this._catIsAvailableAll).pop();\n const prevMonthRowDates = Array.from(lastDateFromNextMonth?.closest(this.dateRowSelectorClassName)?.children || []);\n const prevDate = prevMonthRowDates[position]?.querySelector(this.dateSelectorButtonClassName);\n if (prevDate) {\n this.setFocusOnDate(prevDate);\n }\n else {\n this.focusUpDate(Array.from(this._catCalendarItems || []).pop(), position);\n }\n }\n }, 50);\n };\n /*\n * Handle key press\n */\n this.handleDateKeypress = (e) => {\n if (e.key === KEYS.TAB) {\n this.setTodaysDate(e);\n }\n if (this.showMonthPopup) {\n return;\n }\n if (e.key === KEYS.RIGHT_ARROW) {\n this.setTodaysDate(e);\n this.focusRightdate();\n }\n if (e.key === KEYS.LEFT_ARROW) {\n this.setTodaysDate(e);\n this.focusLeftdate();\n }\n if (e.key === KEYS.DOWN_ARROW) {\n this.setTodaysDate(e);\n this.focusDownDate(null, this.focusedDateIndex);\n }\n if (e.key === KEYS.UP_ARROW) {\n this.setTodaysDate(e);\n this.focusUpDate(null, this.focusedDateIndex);\n }\n };\n /*\n * Hide the popup\n * Before hiding focus on today else clear the previous focus selection\n */\n this.hidePopup = () => {\n this.showMonthPopup = false;\n this.focusedDate?.setAttribute('tabindex', '-1');\n if (this.selectedDate && this._catIsActive) {\n this.setFocusOnDate(this._catIsActive);\n return;\n }\n if (!this.selectedDate) {\n setTimeout(() => {\n this._catIsToday?.setAttribute('tabindex', '0');\n }, 100);\n }\n };\n /*\n * Focus on the date\n * 1) Clear the existing tab index values\n * 2) Set the tabindex only on today or active element\n */\n this.setFocusOnDate = (element, isFocus = true) => {\n if (!element) {\n return;\n }\n this.focusedDate?.setAttribute('tabindex', '-1');\n this._catIsToday?.setAttribute('tabindex', '-1');\n this.focusedDate = element;\n this.focusedDate?.setAttribute('tabindex', '0');\n isFocus && element?.focus();\n this.getDatePosition();\n };\n }\n static { this.styles = styles; }\n connectedCallback() {\n super.connectedCallback();\n /**\n * Use the start of the month for the month navigation\n */\n this.navDate = startOfMonth(this.currentDate);\n /**\n * If an active date / disabledMinDate is set, move to that month and day on the calendar\n */\n this.updateComplete.then(() => {\n if (this.setActiveDate) {\n const activeDate = parse(this.setActiveDate, this.dateFormat, new Date(), { locale: enUS });\n this.updateGrid(activeDate);\n }\n if (this.disabledMinDate) {\n const activeDate = parse(this.disabledMinDate, 'yyyy/MM/dd', new Date(), { locale: enUS });\n this.updateGrid(activeDate);\n }\n });\n this.makeGrid();\n }\n /*\n * De-activate the focus trap\n */\n disconnectedCallback() {\n this._focusTrap?.deactivate();\n }\n /**\n * Make the calendar days header\n * 1) Set the start of the week\n * 2) Set the pattern for the day of the week\n * 3) Add the day to the array\n * 4) Return the array\n */\n weekDaysHeader() {\n const weekdays = [];\n const start = 0; /* 1 */\n const pattern = 'eee'; /* 2 */\n for (let i = 0; i < 7; i++) {\n weekdays.push(format(setDay(new Date(), start + i), pattern)); /* 3 */\n }\n return weekdays; /* 4 */\n }\n /**\n * Validate if month can proceed previous.\n * 1) If the current end of the month date is before the minimum date, return false\n */\n canChangeSubNavMonth() {\n let disabledMinDate = startOfYear(subYears(this.currentDate, this.multiYear));\n if (this.disabledMinDate) {\n disabledMinDate = toDate(new Date(this.disabledMinDate));\n }\n /* 1 */\n if (isBefore(subMonths(endOfMonth(this.navDate ?? ''), 1), disabledMinDate)) {\n return false;\n }\n return true;\n }\n /**\n * Validate if month can proceed next.\n * 1) If the day is after the maximum date, return false\n */\n canChangeAddNavMonth() {\n let disabledMaxDate = endOfYear(addYears(this.currentDate, this.multiYear));\n let updatedNavDate;\n if (this.disabledMaxDate) {\n disabledMaxDate = toDate(new Date(this.disabledMaxDate));\n }\n if (!this.navDate || !(this.navDate instanceof Date)) {\n return;\n }\n let navDateToString = '' + (this.navDate?.getMonth() + 1) + '/' + this.navDate?.getDate() + '/' + this.navDate?.getFullYear();\n /*****Start****\n #1175445 : this condition will check diff between disabledMaxDate & navDate\n if it is less than 31 then addMonth will not happen to avoid disabled next icon\n */\n const dayDiff = differenceInDays(new Date(this.disabledMaxDate ?? ''), new Date(navDateToString));\n if (this.navDate?.getMonth() + 1 !== new Date(this.disabledMaxDate ?? '')?.getMonth() + 1 && dayDiff < 31) {\n updatedNavDate = this.navDate;\n }\n else {\n updatedNavDate = addMonths(this.navDate, 1);\n }\n /***End*****/\n if (isAfter(updatedNavDate, disabledMaxDate)) {\n return false;\n }\n return true;\n }\n /*\n * Check whether the element is visible in the DOM\n * This is required for the date picker as it is visible only on selection, else this will try to activate an hidden element\n */\n isVisible(elem) {\n if (!elem) {\n return;\n }\n return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;\n }\n /*\n * Activate the focus trap\n */\n firstUpdated() {\n const calendarPanel = this._catCalendar;\n if (calendarPanel && this.isVisible(calendarPanel)) {\n this._focusTrap = createFocusTrap(calendarPanel, {\n initialFocus: false,\n tabbableOptions: { getShadowRoot: true },\n fallbackFocus: this._catCalendar,\n allowOutsideClick: true\n });\n /**To activate focus trap */\n this._focusTrap?.activate();\n }\n else {\n this._focusTrap?.deactivate();\n }\n }\n /**\n * Set tabindex and focus state on month popup current month\n * 1) If an active month has been selected, put the focus there\n * 2) If no active month has been selected, put the focus on the current month\n */\n async updated(_changedProperties) {\n if (_changedProperties.has('locale')) {\n await this.updateComplete;\n const locale = this.locale;\n setDefaultOptions({ locale });\n this.makeGrid();\n }\n if (_changedProperties.has('showMonthPopup')) {\n await this.updateComplete;\n const currentMonth = this._catCalendarMonthPopup?.querySelector('.is-current');\n const activeMonth = this._catCalendarMonthPopup?.querySelector('.is-active');\n if (activeMonth) {\n /* 1 */\n activeMonth.tabIndex = -1;\n if (this.showMonthPopup === true) {\n activeMonth.focus();\n this.selectedMonth = activeMonth;\n this.setFocussedMonthIndex();\n }\n }\n else if (currentMonth) {\n /* 2 */\n currentMonth.tabIndex = -1;\n if (this.showMonthPopup === true) {\n currentMonth.focus();\n this.selectedMonth = currentMonth;\n this.setFocussedMonthIndex();\n }\n }\n }\n if (_changedProperties.has('setActiveDate')) {\n await this.updateComplete;\n let activeDate = null;\n if (this.setActiveDate) {\n activeDate = parse(this.setActiveDate, this.dateFormat, new Date(), { locale: enUS });\n }\n else {\n this.resetCurrentFocussedDate();\n }\n this.selectedDate = activeDate;\n this.updateGrid(activeDate || this.currentDate);\n }\n }\n /**\n * Handle keydown\n * 1) Close the month calendar popup when escape is hit when the user is focused within the popup\n * 2) Return focus back to the month selector button\n * 3) Reset the previous focus details\n * 4) If arrow right key pressed then focus to next month\n * 5) If arrow down key pressed then focus to below month\n * 6) If arrow left or up key pressed then focus to previous month\n * 7) If arrow up key pressed then focus to previous row month\n */\n handleKeyDown(e) {\n if (e.key === KEYS.TAB && this.selectedMonth) {\n this.focusOnMonth(this.selectedMonth);\n e.preventDefault();\n return;\n }\n if (e.key === KEYS.ESCAPE && this._catCalendarMonthButton) {\n this.showMonthPopup = false; /* 1 */\n this._catCalendarMonthButton.tabIndex = 0; /* 2 */\n this._catCalendarMonthButton.focus();\n }\n this.resetCurrentFocussedDate(); /* 3 */\n /* 4 */\n if (e.key === KEYS.RIGHT_ARROW) {\n this.getNextMonth();\n }\n /* 5 */\n if (e.key === KEYS.DOWN_ARROW) {\n this.getBelowMonth();\n }\n /* 6 */\n if (e.key === KEYS.LEFT_ARROW) {\n this.getPreviousMonth();\n }\n /* 7 */\n if (e.key === KEYS.UP_ARROW) {\n this.getUpperMonth();\n }\n }\n // Focus back on the month header button after month grid has been updated\n focusMonthButton() {\n const monthButton = this.shadowRoot?.querySelector('.cat-c-calendar__month-selector-button');\n if (monthButton) {\n monthButton.focus();\n }\n }\n /**\n * Focus on active date\n */\n focusOnActive() {\n setTimeout(() => {\n if (this._catIsActive) {\n this.setFocusOnDate(this._catIsActive);\n }\n }, 3);\n }\n /**\n * Apply active state if day has been selected\n * @param day selected day\n */\n isActive(day) {\n const parseWithEnglishLocale = parse(this.setActiveDate || '', this.dateFormat, new Date(), { locale: enUS });\n const parseWithCurrentLocale = parse(this.setActiveDate || '', this.dateFormat, new Date(), {\n locale: getDefaultOptions().locale\n });\n const dateObject = isValid(parseWithEnglishLocale) ? parseWithEnglishLocale : parseWithCurrentLocale;\n const activeDateString = dateObject;\n const activeDate = startOfDay(toDate(activeDateString));\n const currentDateInLoop = startOfDay(day.value ?? '');\n /**\n * If a specific date is set, highlight it\n */\n if (day.available && this.selectedDate && this.resetDates === false) {\n return isEqual(day.value ?? '', this.selectedDate);\n }\n else if (activeDate && isEqual(currentDateInLoop, activeDate)) {\n return true;\n }\n }\n /**\n * Check if day can be selected\n * @param day selected day\n */\n isAvailableDay(day) {\n let disabledMinDate = startOfYear(subYears(this.currentDate, this.multiYear));\n if (this.disabledMinDate) {\n disabledMinDate = toDate(Date.UTC(new Date(this.disabledMinDate).getFullYear(), new Date(this.disabledMinDate).getMonth(), new Date(this.disabledMinDate).getDate()));\n disabledMinDate.setUTCHours(0, 0, 0, 0);\n }\n let disabledMaxDate = endOfYear(addYears(this.currentDate, this.multiYear));\n if (this.disabledMaxDate) {\n disabledMaxDate = toDate(Date.UTC(new Date(this.disabledMaxDate).getFullYear(), new Date(this.disabledMaxDate).getMonth(), new Date(this.disabledMaxDate).getDate()));\n disabledMaxDate.setUTCHours(0, 0, 0, 0);\n }\n day = new Date(Date.UTC(day.getFullYear(), day.getMonth(), day.getDate()));\n if (isAfter(disabledMinDate, day) || isBefore(disabledMaxDate, day)) {\n return false;\n }\n return true;\n }\n /**\n * Check if month can be selected\n * @param month selected month\n */\n isAvailableMonth(month) {\n let disabledMinDate = startOfYear(subYears(this.currentDate, this.multiYear));\n if (this.disabledMinDate) {\n disabledMinDate = toDate(subMonths(new Date(this.disabledMinDate), 1));\n }\n let disabledMaxDate = endOfYear(addYears(this.currentDate, this.multiYear));\n if (this.disabledMaxDate) {\n disabledMaxDate = toDate(new Date(this.disabledMaxDate));\n }\n if ((this.disabledMinDate && isSameDay(disabledMinDate, month)) || isAfter(disabledMinDate, month) || isBefore(disabledMaxDate, month)) {\n return false;\n }\n return true;\n }\n /**\n * Check if day in calendar is today and highlight it\n * @param day\n */\n isToday(day) {\n if (isSameDay(this.currentDate, day.value ?? '')) {\n return true;\n }\n return false;\n }\n /**\n * Set todays date as focused\n */\n setTodaysDate(e) {\n const target = e.target;\n const todaysClassList = ['is-available', 'is-today'];\n if (this.focusedDate) {\n return;\n }\n const isTodayDateAvailable = todaysClassList.every((item) => Array.from(target.classList || []).includes(item));\n if (isTodayDateAvailable && this._catIsToday) {\n this.setFocusOnDate(this._catIsToday, false);\n }\n }\n /*\n * Get the date position based on the element\n */\n getDatePosition(BtnElement) {\n let datePosition = 0;\n const element = BtnElement || this.focusedDate;\n if (element) {\n if (!this.isVisible(element)) {\n return;\n }\n const closestElementChildren = element.closest(this.dateRowSelectorClassName)?.children;\n if (closestElementChildren) {\n const dates = Array.from(closestElementChildren);\n for (const [i, date] of dates.entries()) {\n if (date === element?.parentElement) {\n datePosition = i;\n break;\n }\n }\n }\n }\n this.focusedDateIndex = datePosition;\n if (BtnElement) {\n return datePosition;\n }\n }\n render() {\n const componentClassNames = this.componentClassNames('cat-c-calendar', {\n 'cat-c-calendar-month-panel--open': this.showMonthPopup\n });\n return html `\n
\n \n\n
\n \n \n \n ${this.weekDaysHeader().map((day) => {\n return html ` `;\n })}\n \n \n \n ${this.days.map((week) => {\n return html `\n \n ${week.map((day) => {\n return html `\n \n `;\n })}\n \n `;\n })}\n \n
${day}
\n ${day.value !== null\n ? html `\n this.selectDay(day)}\n ?disabled=${!this.isAvailableDay(day.value)}\n aria-label=\"${format(day.value, this.fullDateFormat)}\"\n tabindex=${this.setTabIndex(day)}\n >\n ${format(day.value, 'd')}\n \n `\n : ''}\n
\n
\n\n
\n
\n
    \n ${this.years.map((year) => {\n return html `\n
  • \n

    ${format(year.value, 'y')}

    \n
      \n ${year.month\n ? year?.month.map((month) => {\n return html `\n
    • \n {\n this.updateGrid(month);\n this.focusMonthButton();\n }}\n aria-label=\"${format(month, 'MMMM, y')}\"\n tabindex=\"-1\"\n >\n ${format(month, 'MMM')}\n \n
    • \n `;\n })\n : html `${nothing}`}\n
    \n
  • \n `;\n })}\n
\n
\n
\n
\n \n `;\n }\n}\n__decorate([\n property({ type: Object })\n], BlocksCalendar.prototype, \"locale\", void 0);\n__decorate([\n property({ type: Object })\n], BlocksCalendar.prototype, \"currentDate\", void 0);\n__decorate([\n property({ type: Object })\n], BlocksCalendar.prototype, \"navDate\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"disabledMinDate\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"disabledMaxDate\", void 0);\n__decorate([\n property({ type: Number })\n], BlocksCalendar.prototype, \"multiYear\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"previousButtonText\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"nextButtonText\", void 0);\n__decorate([\n property({ type: Array })\n], BlocksCalendar.prototype, \"days\", void 0);\n__decorate([\n property({ type: Array })\n], BlocksCalendar.prototype, \"years\", void 0);\n__decorate([\n property({ type: Boolean })\n], BlocksCalendar.prototype, \"showMonthPopup\", void 0);\n__decorate([\n property({ type: Boolean })\n], BlocksCalendar.prototype, \"resetDates\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"selectedDate\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"setActiveDate\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"datepickerId\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"dateFormat\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"fullDateFormat\", void 0);\n__decorate([\n property({ type: Boolean })\n], BlocksCalendar.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: String })\n], BlocksCalendar.prototype, \"iconName\", void 0);\n__decorate([\n query('.cat-c-calendar__month-selector-popup')\n], BlocksCalendar.prototype, \"_catCalendarMonthPopup\", void 0);\n__decorate([\n query('.cat-c-calendar__month-selector-button')\n], BlocksCalendar.prototype, \"_catCalendarMonthButton\", void 0);\n__decorate([\n query('.cat-c-calendar')\n], BlocksCalendar.prototype, \"_catCalendar\", void 0);\n__decorate([\n query('.cat-c-calendar__table-body .is-active')\n], BlocksCalendar.prototype, \"_catIsActive\", void 0);\n__decorate([\n query('.is-today:not(:disabled)')\n], BlocksCalendar.prototype, \"_catIsToday\", void 0);\n__decorate([\n queryAll('.is-available')\n], BlocksCalendar.prototype, \"_catIsAvailableAll\", void 0);\n__decorate([\n queryAll('.cat-c-calendar__item')\n], BlocksCalendar.prototype, \"_catCalendarItems\", void 0);\nif (customElements.get('cat-calendar') === undefined) {\n customElements.define('cat-calendar', BlocksCalendar);\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { BlocksElement } from '../../BlocksElement';\nimport styles from '../icon.styles';\n/**\n * Calendar component\n * @csspart base- The component's base wrapper\n */\nexport class BlocksIconCalendar extends BlocksElement {\n static { this.styles = styles; }\n connectedCallback() {\n super.connectedCallback();\n this.classList.add('cat-icon');\n }\n render() {\n const componentClassName = this.componentClassNames('cat-c-icon', {\n 'cat-c-icon--sm': this.size === 'sm',\n 'cat-c-icon--lg': this.size === 'lg',\n 'cat-c-icon--xl': this.size === 'xl',\n 'cat-c-icon--content-strong': this.color === 'content-strong',\n 'cat-c-icon--knockout': this.color === 'knockout',\n 'cat-c-icon--knockout-brand': this.color === 'knockout-brand',\n 'cat-c-icon--information': this.color === 'information',\n 'cat-c-icon--success': this.color === 'success',\n 'cat-c-icon--warning': this.color === 'warning',\n 'cat-c-icon--error': this.color === 'error'\n });\n return html `\n \n \n \n \n \n `;\n }\n}\n__decorate([\n property({ type: String })\n], BlocksIconCalendar.prototype, \"color\", void 0);\n__decorate([\n property({ type: String })\n], BlocksIconCalendar.prototype, \"iconTitle\", void 0);\n__decorate([\n property({ type: String })\n], BlocksIconCalendar.prototype, \"size\", void 0);\nif (customElements.get('cat-icon-calendar') === undefined) {\n customElements.define('cat-icon-calendar', BlocksIconCalendar);\n}\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { BlocksElement } from '../../BlocksElement';\nimport styles from '../icon.styles';\n/**\n * Trash component\n * @csspart base- The component's base wrapper\n */\nexport class BlocksIconTrash extends BlocksElement {\n static { this.styles = styles; }\n connectedCallback() {\n super.connectedCallback();\n this.classList.add('cat-icon');\n }\n render() {\n const componentClassName = this.componentClassNames('cat-c-icon', {\n 'cat-c-icon--sm': this.size === 'sm',\n 'cat-c-icon--lg': this.size === 'lg',\n 'cat-c-icon--xl': this.size === 'xl',\n 'cat-c-icon--content-strong': this.color === 'content-strong',\n 'cat-c-icon--knockout': this.color === 'knockout',\n 'cat-c-icon--knockout-brand': this.color === 'knockout-brand',\n 'cat-c-icon--information': this.color === 'information',\n 'cat-c-icon--success': this.color === 'success',\n 'cat-c-icon--warning': this.color === 'warning',\n 'cat-c-icon--error': this.color === 'error'\n });\n return html `\n \n \n \n \n \n `;\n }\n}\n__decorate([\n property({ type: String })\n], BlocksIconTrash.prototype, \"color\", void 0);\n__decorate([\n property({ type: String })\n], BlocksIconTrash.prototype, \"iconTitle\", void 0);\n__decorate([\n property({ type: String })\n], BlocksIconTrash.prototype, \"size\", void 0);\nif (customElements.get('cat-icon-trash') === undefined) {\n customElements.define('cat-icon-trash', BlocksIconTrash);\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n return month;\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n const _date = toDate(date);\n const _dateToCompare = toDate(dateToCompare);\n return _date.getTime() > _dateToCompare.getTime();\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n const _date = toDate(date);\n const _dateToCompare = toDate(dateToCompare);\n return +_date < +_dateToCompare;\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport function isEqual(leftDate, rightDate) {\n const _dateLeft = toDate(leftDate);\n const _dateRight = toDate(rightDate);\n return +_dateLeft === +_dateRight;\n}\n\n// Fallback for modularized imports:\nexport default isEqual;\n","import { startOfDay } from \"./startOfDay.mjs\";\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to check\n * @param dateRight - The second date to check\n\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(dateLeft, dateRight) {\n const dateLeftStartOfDay = startOfDay(dateLeft);\n const dateRightStartOfDay = startOfDay(dateRight);\n\n return +dateLeftStartOfDay === +dateRightStartOfDay;\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","import {\n getDefaultOptions,\n setDefaultOptions as setInternalDefaultOptions,\n} from \"./_lib/defaultOptions.mjs\";\n\n/**\n * @name setDefaultOptions\n * @category Common Helpers\n * @summary Set default options including locale.\n * @pure false\n *\n * @description\n * Sets the defaults for\n * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`\n * arguments for all functions.\n *\n * @param options - An object with options\n *\n * @example\n * // Set global locale:\n * import { es } from 'date-fns/locale'\n * setDefaultOptions({ locale: es })\n * const result = format(new Date(2014, 8, 2), 'PPPP')\n * //=> 'martes, 2 de septiembre de 2014'\n *\n * @example\n * // Start of the week for 2 September 2014:\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Start of the week for 2 September 2014,\n * // when we set that week starts on Monday by default:\n * setDefaultOptions({ weekStartsOn: 1 })\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Mon Sep 01 2014 00:00:00\n *\n * @example\n * // Manually set options take priority over default options:\n * setDefaultOptions({ weekStartsOn: 1 })\n * const result = startOfWeek(new Date(2014, 8, 2), { weekStartsOn: 0 })\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Remove the option by setting it to `undefined`:\n * setDefaultOptions({ weekStartsOn: 1 })\n * setDefaultOptions({ weekStartsOn: undefined })\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Sun Aug 31 2014 00:00:00\n */\nexport function setDefaultOptions(options) {\n const result = {};\n const defaultOptions = getDefaultOptions();\n\n for (const property in defaultOptions) {\n if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n result[property] = defaultOptions[property];\n }\n }\n\n for (const property in options) {\n if (Object.prototype.hasOwnProperty.call(options, property)) {\n if (options[property] === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n delete result[property];\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n result[property] = options[property];\n }\n }\n }\n\n setInternalDefaultOptions(result);\n}\n\n// Fallback for modularized imports:\nexport default setDefaultOptions;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date) {\n const _date = toDate(date);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { addMonths } from \"./addMonths.mjs\";\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount) {\n return addMonths(date, -amount);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n"],"names":["baseIteratee","isArrayLike","keys","module","exports","findIndexFunc","collection","predicate","fromIndex","iterable","Object","iteratee","key","index","undefined","findLast","createFind","baseFindIndex","toInteger","nativeMax","Math","max","nativeMin","min","array","length","CatFieldNote","react","tagName","elementClass","CatIconTrash","compareLocalAsc","dateLeft","dateRight","diff","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","eachMonthOfInterval","interval","options","startDate","toDate","start","endDate","end","reversed","endTime","currentDate","setHours","setDate","step","dates","push","setMonth","reverse","endOfYear","date","_date","year","setFullYear","__decorate","decorators","target","desc","d","c","arguments","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","BlocksCalendar","BlocksElement","constructor","super","this","locale","Date","multiYear","previousButtonText","nextButtonText","days","years","resetDates","dateFormat","fullDateFormat","focusedDateIndex","focusedMonthIndex","monthSelectorButtonClassName","dateSelectorButtonClassName","dateRowSelectorClassName","subNavMonth","canChangeSubNavMonth","navDate","subMonths","makeGrid","resetCurrentFocussedDate","addNavMonth","canChangeAddNavMonth","addMonths","toggleMonthPopup","showMonthPopup","startYear","subYears","endYear","addYears","value","month","startOfYear","setTimeout","monthToggleYear","_catCalendarMonthButton","dataset","shadowRoot","querySelector","scrollIntoView","block","updateGrid","yearNumber","getYear","isNaN","constructFrom","NaN","setYear","selectedMonth","startOfMonth","firstDayOfMonth","getDay","weekDays","available","day","addDays","counter","week","focusOnActive","onChanged","dispatch","eventName","detailObj","format","selectedDate","rawDate","selectDay","setTabIndex","setActiveDate","isToday","isActive","_catIsToday","setAttribute","focusOnMonth","focus","getNextMonth","nextElement","parentElement","nextElementSibling","nextMonth","closest","getBelowMonth","subListItems","Array","from","querySelectorAll","findIndex","subListItem","nextItems","getUpperMonth","previousElementSibling","setFocussedMonthIndex","listItem","getPreviousMonth","prevElement","prevMonth","pop","focusFirstItem","e","firstItem","_catIsActive","setFocusOnDate","arrowKeys","DOWN_ARROW","UP_ARROW","LEFT_ARROW","RIGHT_ARROW","includes","hasFocussedItem","preventDefault","focusOnFirstKeypress","focusedDate","getDatePosition","getFocusDateWithInMonth","currentFocusedDate","nextFocusDate","nextDate","getFocusDatePrevWithInMonth","prevFocusDate","prevDate","focusRightdate","focusdedDate","nextFocusDateWithInMonth","_catIsAvailableAll","_catCalendarItems","focusLeftdate","prevFocusDateWithInMonth","focusDownDate","position","nextDateRows","children","focusUpDate","element","prevDateRows","lastDateFromNextMonth","prevMonthRowDates","handleDateKeypress","TAB","setTodaysDate","hidePopup","isFocus","styles","connectedCallback","updateComplete","then","activeDate","parse","disabledMinDate","disconnectedCallback","_focusTrap","deactivate","weekDaysHeader","weekdays","setDay","isBefore","endOfMonth","updatedNavDate","disabledMaxDate","navDateToString","dayDiff","_dateLeft","_dateRight","sign","difference","abs","differenceInCalendarDays","result","Number","differenceInDays","isAfter","isVisible","elem","offsetWidth","offsetHeight","getClientRects","firstUpdated","calendarPanel","_catCalendar","createFocusTrap","initialFocus","tabbableOptions","getShadowRoot","fallbackFocus","allowOutsideClick","activate","updated","_changedProperties","has","setDefaultOptions","currentMonth","_catCalendarMonthPopup","activeMonth","tabIndex","handleKeyDown","ESCAPE","focusMonthButton","monthButton","parseWithEnglishLocale","parseWithCurrentLocale","getDefaultOptions","activeDateString","isValid","startOfDay","currentDateInLoop","isEqual","isAvailableDay","UTC","setUTCHours","isAvailableMonth","isSameDay","every","item","classList","BtnElement","datePosition","closestElementChildren","entries","render","componentClassNames","getExportParts","datepickerId","map","isSameMonth","type","prototype","String","Boolean","query","customElements","get","define","BlocksIconCalendar","add","componentClassName","size","color","iconTitle","BlocksIconTrash","dateToCompare","_dateToCompare","getTime","leftDate","rightDate","defaultOptions","property","hasOwnProperty","call","amount"],"sourceRoot":""}