@getflip/swirl-components 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/flip-app-layout_5.cjs.entry.js +8 -6
- package/dist/cjs/flip-button.cjs.entry.js +10 -5
- package/dist/cjs/flip-checkbox.cjs.entry.js +13 -6
- package/dist/cjs/flip-console-layout.cjs.entry.js +31 -0
- package/dist/cjs/flip-date-input.cjs.entry.js +9 -7
- package/dist/cjs/flip-date-picker_2.cjs.entry.js +11 -5
- package/dist/cjs/flip-file-viewer_7.cjs.entry.js +8 -6
- package/dist/cjs/flip-form-control.cjs.entry.js +23 -6
- package/dist/cjs/{flip-text.cjs.entry.js → flip-heading_2.cjs.entry.js} +18 -1
- package/dist/cjs/flip-icon-check-small_3.cjs.entry.js +9 -7
- package/dist/cjs/flip-icon-help.cjs.entry.js +20 -0
- package/dist/cjs/flip-pdf-reader.cjs.entry.js +1 -1
- package/dist/cjs/flip-popover.cjs.entry.js +74 -23
- package/dist/cjs/flip-radio.cjs.entry.js +11 -2
- package/dist/cjs/flip-select.cjs.entry.js +71 -0
- package/dist/cjs/flip-text-input.cjs.entry.js +12 -16
- package/dist/cjs/flip-toast-provider.cjs.entry.js +7 -5
- package/dist/cjs/flip-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/flip-app-layout/flip-app-layout.css +1 -1
- package/dist/collection/components/flip-app-layout/flip-app-layout.js +7 -5
- package/dist/collection/components/flip-button/flip-button.js +10 -5
- package/dist/collection/components/flip-checkbox/flip-checkbox.js +13 -6
- package/dist/collection/components/flip-console-layout/flip-console-layout.css +144 -0
- package/dist/collection/components/flip-console-layout/flip-console-layout.js +250 -0
- package/dist/collection/components/flip-console-layout/flip-console-layout.stories.js +29 -0
- package/dist/collection/components/flip-date-input/flip-date-input.js +9 -7
- package/dist/collection/components/flip-date-input/flip-date-input.stories.js +4 -1
- package/dist/collection/components/flip-date-picker/flip-date-picker.js +11 -5
- package/dist/collection/components/flip-file-viewer/viewers/flip-file-viewer-pdf/flip-file-viewer-pdf.css +12 -15
- package/dist/collection/components/flip-file-viewer/viewers/flip-file-viewer-pdf/flip-file-viewer-pdf.js +7 -5
- package/dist/collection/components/flip-form-control/flip-form-control.css +14 -2
- package/dist/collection/components/flip-form-control/flip-form-control.js +23 -4
- package/dist/collection/components/flip-form-control/flip-form-control.stories.js +26 -1
- package/dist/collection/components/flip-icon/icons/flip-icon-help.js +49 -0
- package/dist/collection/components/flip-option-list/flip-option-list.js +9 -7
- package/dist/collection/components/flip-pdf-reader/flip-pdf-reader.css +0 -1
- package/dist/collection/components/flip-popover/flip-popover.css +42 -4
- package/dist/collection/components/flip-popover/flip-popover.js +186 -28
- package/dist/collection/components/flip-popover/flip-popover.stories.js +12 -0
- package/dist/collection/components/flip-progress-indicator/flip-progress-indicator.css +0 -3
- package/dist/collection/components/flip-radio/flip-radio.css +0 -1
- package/dist/collection/components/flip-radio/flip-radio.js +10 -1
- package/dist/collection/components/flip-select/flip-select.css +52 -0
- package/dist/collection/components/flip-select/flip-select.js +218 -0
- package/dist/collection/components/flip-select/flip-select.stories.js +45 -0
- package/dist/collection/components/flip-text/flip-text.js +1 -1
- package/dist/collection/components/flip-text-input/flip-text-input.css +3 -5
- package/dist/collection/components/flip-text-input/flip-text-input.js +11 -15
- package/dist/collection/components/flip-text-input/flip-text-input.stories.js +4 -1
- package/dist/collection/components/flip-toast-provider/flip-toast-provider.js +7 -5
- package/dist/collection/components/flip-tooltip/flip-tooltip.css +0 -1
- package/dist/collection/utils.js +2 -1
- package/dist/components/flip-app-layout2.js +8 -6
- package/dist/components/flip-button2.js +10 -5
- package/dist/components/flip-checkbox.js +13 -6
- package/dist/components/flip-console-layout.d.ts +11 -0
- package/dist/components/flip-console-layout.js +74 -0
- package/dist/components/flip-date-input.js +9 -7
- package/dist/components/flip-date-picker2.js +11 -5
- package/dist/components/flip-file-viewer-pdf2.js +8 -6
- package/dist/components/flip-form-control.js +23 -6
- package/dist/components/flip-icon-help.d.ts +11 -0
- package/dist/components/flip-icon-help.js +37 -0
- package/dist/components/flip-option-list2.js +9 -7
- package/dist/components/flip-pdf-reader.js +1 -1
- package/dist/components/flip-popover2.js +81 -26
- package/dist/components/flip-radio.js +11 -2
- package/dist/components/flip-select.d.ts +11 -0
- package/dist/components/flip-select.js +118 -0
- package/dist/components/flip-text-input2.js +12 -16
- package/dist/components/flip-text2.js +1 -1
- package/dist/components/flip-toast-provider.js +7 -5
- package/dist/components/flip-tooltip.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/esm/flip-app-layout_5.entry.js +8 -6
- package/dist/esm/flip-button.entry.js +10 -5
- package/dist/esm/flip-checkbox.entry.js +13 -6
- package/dist/esm/flip-console-layout.entry.js +27 -0
- package/dist/esm/flip-date-input.entry.js +9 -7
- package/dist/esm/flip-date-picker_2.entry.js +11 -5
- package/dist/esm/flip-file-viewer_7.entry.js +8 -6
- package/dist/esm/flip-form-control.entry.js +23 -6
- package/dist/esm/{flip-text.entry.js → flip-heading_2.entry.js} +18 -2
- package/dist/esm/flip-icon-check-small_3.entry.js +9 -7
- package/dist/esm/flip-icon-help.entry.js +16 -0
- package/dist/esm/flip-pdf-reader.entry.js +1 -1
- package/dist/esm/flip-popover.entry.js +76 -25
- package/dist/esm/flip-radio.entry.js +11 -2
- package/dist/esm/flip-select.entry.js +67 -0
- package/dist/esm/flip-text-input.entry.js +12 -16
- package/dist/esm/flip-toast-provider.entry.js +7 -5
- package/dist/esm/flip-tooltip.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-components.js +1 -1
- package/dist/swirl-components/{p-691cf427.entry.js → p-1a41a293.entry.js} +1 -1
- package/dist/swirl-components/p-1bf07805.entry.js +1 -0
- package/dist/swirl-components/p-1e74139c.entry.js +1 -0
- package/dist/swirl-components/p-215365c6.entry.js +1 -0
- package/dist/swirl-components/{p-3436f57d.entry.js → p-2b35b65a.entry.js} +1 -1
- package/dist/swirl-components/p-3574a311.entry.js +1 -0
- package/dist/swirl-components/p-4743c7ae.entry.js +1 -0
- package/dist/swirl-components/p-4d82b925.entry.js +1 -0
- package/dist/swirl-components/{p-fffbace2.entry.js → p-5b14d410.entry.js} +1 -1
- package/dist/swirl-components/p-6b6ccfd4.entry.js +1 -0
- package/dist/swirl-components/p-6b7077e3.entry.js +1 -0
- package/dist/swirl-components/{p-b7ffc9ca.entry.js → p-8f9ff36b.entry.js} +1 -1
- package/dist/swirl-components/p-96c0db13.entry.js +1 -0
- package/dist/swirl-components/p-b71da729.entry.js +1 -0
- package/dist/swirl-components/p-b9d65b7d.entry.js +1 -0
- package/dist/swirl-components/{p-56d05761.entry.js → p-de892e4e.entry.js} +1 -1
- package/dist/swirl-components/p-e1434bcd.entry.js +1 -0
- package/dist/swirl-components/p-ead5c136.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/flip-button/flip-button.d.ts +1 -0
- package/dist/types/components/flip-checkbox/flip-checkbox.d.ts +1 -0
- package/dist/types/components/flip-console-layout/flip-console-layout.d.ts +17 -0
- package/dist/types/components/flip-console-layout/flip-console-layout.stories.d.ts +14 -0
- package/dist/types/components/flip-form-control/flip-form-control.d.ts +1 -0
- package/dist/types/components/flip-icon/icons/flip-icon-help.d.ts +5 -0
- package/dist/types/components/flip-option-list/flip-option-list.d.ts +1 -0
- package/dist/types/components/flip-popover/flip-popover.d.ts +13 -4
- package/dist/types/components/flip-popover/flip-popover.stories.d.ts +12 -0
- package/dist/types/components/flip-radio/flip-radio.d.ts +1 -0
- package/dist/types/components/flip-select/flip-select.d.ts +25 -0
- package/dist/types/components/flip-select/flip-select.stories.d.ts +13 -0
- package/dist/types/components.d.ts +99 -0
- package/dist/types/utils.d.ts +1 -1
- package/package.json +2 -2
- package/vscode-data.json +115 -0
- package/dist/cjs/flip-heading.cjs.entry.js +0 -25
- package/dist/esm/flip-heading.entry.js +0 -21
- package/dist/swirl-components/p-1cf5d228.entry.js +0 -1
- package/dist/swirl-components/p-21acd8c1.entry.js +0 -1
- package/dist/swirl-components/p-56baecad.entry.js +0 -1
- package/dist/swirl-components/p-5c9e99ff.entry.js +0 -1
- package/dist/swirl-components/p-5eecafeb.entry.js +0 -1
- package/dist/swirl-components/p-697ed33b.entry.js +0 -1
- package/dist/swirl-components/p-81a41df8.entry.js +0 -1
- package/dist/swirl-components/p-93a9605c.entry.js +0 -1
- package/dist/swirl-components/p-a7eebf1e.entry.js +0 -1
- package/dist/swirl-components/p-ca3b3145.entry.js +0 -1
- package/dist/swirl-components/p-ec150068.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as s,F as h}from"./p-9fe00e8a.js";import{c as a,a as r,g as n}from"./p-86bd3473.js";var o=a((function(t){t.exports=function(){var t={d:function(e,i){for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e={};t.d(e,{default:function(){return L}});var i={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},s={classes:"",inline:!1,locale:{days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],daysShort:["Вос","Пон","Вто","Сре","Чет","Пят","Суб"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:i.days,minView:i.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return"string"==typeof t?e.querySelector(t):t}function a(){let{tagName:t="div",className:e="",innerHtml:i="",id:s="",attrs:h={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=document.createElement(t);return e&&a.classList.add(...e.split(" ")),s&&(a.id=s),i&&(a.innerHTML=i),h&&r(a,h),a}function r(t,e){for(let[i,s]of Object.entries(e))void 0!==s&&t.setAttribute(i,s);return t}function n(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function o(t){let e=t.getHours(),i=e%12==0?12:e%12;return{year:t.getFullYear(),month:t.getMonth(),fullMonth:t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,date:t.getDate(),fullDate:t.getDate()<10?"0"+t.getDate():t.getDate(),day:t.getDay(),hours:e,fullHours:l(e),hours12:i,fullHours12:l(i),minutes:t.getMinutes(),fullMinutes:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes()}}function l(t){return t<10?"0"+t:t}function c(t){let e=10*Math.floor(t.getFullYear()/10);return[e,e+9]}function d(){let t=[];for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return i.forEach((e=>{if("object"==typeof e)for(let i in e)e[i]&&t.push(i);else e&&t.push(e)})),t.join(" ")}function u(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.days;if(!t||!e)return!1;let h=o(t),a=o(e);return{[i.days]:h.date===a.date&&h.month===a.month&&h.year===a.year,[i.months]:h.month===a.month&&h.year===a.year,[i.years]:h.year===a.year}[s]}function m(t,e,i){let s=f(t,!1).getTime(),h=f(e,!1).getTime();return i?s>=h:s>h}function p(t,e){return!m(t,e,!0)}function f(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=new Date(t.getTime());return"boolean"!=typeof e||e||v(i),i}function v(t){return t.setHours(0,0,0,0),t}function y(t,e,i){t.length?t.forEach((t=>{t.addEventListener(e,i)})):t.addEventListener(e,i)}function g(t,e){return!(!t||t===document||t instanceof DocumentFragment)&&(t.matches(e)?t:g(t.parentNode,e))}function b(t,e,i){return t>i?i:t<e?e:t}function w(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return i.filter((t=>t)).forEach((e=>{for(let[i,s]of Object.entries(e))if(void 0!==s&&"[object Object]"===s.toString()){let e=void 0!==t[i]?t[i].toString():void 0,h=s.toString(),a=Array.isArray(s)?[]:{};t[i]=t[i]?e!==h?a:t[i]:a,w(t[i],s)}else t[i]=s})),t}function D(t){let e=t;return t instanceof Date||(e=new Date(t)),isNaN(e.getTime())&&(console.log('Unable to convert value "'.concat(t,'" to Date object')),e=!1),e}function k(t){let e="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+e+")("+t+")($|<|"+e+")","g")}function C(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class M{constructor(){let{type:t,date:e,dp:i,opts:s,body:h}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};C(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),C(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),C(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),C(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),C(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),C(this,"onChangeFocusDate",(t=>{if(!t)return void(this.focused&&this.removeFocus());let e=u(t,this.date,this.type);e?this.focus():!e&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),C(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this.$cell.adpCell=this,this.$cell))),this.type=t,this.singleType=this.type.slice(0,-1),this.date=e,this.dp=i,this.opts=s,this.body=h,this.customData=!1,this.init()}init(){let{range:t,onRenderCell:e}=this.opts;e&&(this.customData=e({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),t&&this._handleRangeStatus())}_bindDatepickerEvents(){this.dp.on(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(i.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(i.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var t;let{year:e,month:i,date:s}=o(this.date),h=(null===(t=this.customData)||void 0===t?void 0:t.attrs)||{};this.$cell=a({className:this._getClassName(),attrs:{"data-year":e,"data-month":i,"data-date":s,...h}})}_getClassName(){var t,e;let s=new Date,{selectOtherMonths:h,selectOtherYears:a}=this.opts,{minDate:r,maxDate:n}=this.dp,{day:l}=o(this.date),c=this._isOutOfMinMaxRange(),m=null===(t=this.customData)||void 0===t?void 0:t.disabled,p=d("air-datepicker-cell","-".concat(this.singleType,"-"),{"-current-":u(s,this.date,this.type),"-min-date-":r&&u(r,this.date,this.type),"-max-date-":n&&u(n,this.date,this.type)}),f="";switch(this.type){case i.days:f=d({"-weekend-":this.dp.isWeekend(l),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!h||c||m});break;case i.months:f=d({"-disabled-":c||m});break;case i.years:f=d({"-other-decade-":this.isOtherDecade,"-disabled-":c||this.isOtherDecade&&!a||m})}return d(p,f,null===(e=this.customData)||void 0===e?void 0:e.classes)}_getHtml(){var t;let{year:e,month:s,date:h}=o(this.date),{showOtherMonths:a,showOtherYears:r}=this.opts;if(null!==(t=this.customData)&&void 0!==t&&t.html)return this.customData.html;switch(this.type){case i.days:return!a&&this.isOtherMonth?"":h;case i.months:return this.dp.locale[this.opts.monthsField][s];case i.years:return!r&&this.isOtherDecade?"":e}}_isOutOfMinMaxRange(){let{minDate:t,maxDate:e}=this.dp,{type:s,date:h}=this,{month:a,year:r,date:n}=o(h),l=s===i.days,c=s===i.years,d=!!t&&new Date(r,c?t.getMonth():a,l?n:t.getDate()),u=!!e&&new Date(r,c?e.getMonth():a,l?n:e.getDate());return t&&e?p(d,t)||m(u,e):t?p(d,t):e?m(u,e):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{rangeDateFrom:t,rangeDateTo:e}=this.dp,i=d({"-in-range-":t&&e&&(s=this.date,h=t,a=e,m(s,h)&&p(s,a)),"-range-from-":t&&u(this.date,t,this.type),"-range-to-":e&&u(this.date,e,this.type)});var s,h,a;this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),i&&this.$cell.classList.add(...i.split(" "))}_handleSelectedStatus(){let t=this.dp._checkIfDateIsSelected(this.date,this.type);t?this.select():!t&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){u(this.dp.focusDate,this.date,this.type)&&this.focus()}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function x(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let S={[i.days]:'<div class="air-datepicker-body--day-names"></div>'+'<div class="air-datepicker-body--cells -'.concat(i.days,'-"></div>'),[i.months]:'<div class="air-datepicker-body--cells -'.concat(i.months,'-"></div>'),[i.years]:'<div class="air-datepicker-body--cells -'.concat(i.years,'-"></div>')};const _=".air-datepicker-cell";class O{constructor(t){let{dp:e,type:s,opts:h}=t;x(this,"handleClick",(t=>{let e=t.target.closest(_).adpCell;if(e.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let i=this.dp._checkIfDateIsSelected(e.date,e.type);i?this.dp._handleAlreadySelectedDates(i,e.date):this.dp.selectDate(e.date)})),x(this,"handleDayNameClick",(t=>{let e=t.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(e),datepicker:this.dp})})),x(this,"onChangeCurrentView",(t=>{t!==this.type?this.hide():(this.show(),this.render())})),x(this,"onMouseOverCell",(t=>{let e=g(t.target,_);this.dp.setFocusDate(!!e&&e.adpCell.date)})),x(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),x(this,"onClickBody",(t=>{let{onClickDayName:e}=this.opts,i=t.target;i.closest(_)&&this.handleClick(t),e&&i.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(t)})),x(this,"onMouseDown",(t=>{this.pressed=!0;let e=g(t.target,_),i=e&&e.adpCell;u(i.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),u(i.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),x(this,"onMouseMove",(t=>{if(!this.pressed||!this.dp.isMinViewReached)return;t.preventDefault();let e=g(t.target,_),i=e&&e.adpCell,{selectedDates:s,rangeDateTo:h,rangeDateFrom:a}=this.dp;if(!i||i.isDisabled)return;let{date:r}=i;if(2===s.length){if(this.rangeFromFocused&&!m(r,h)){let{hours:t,minutes:e}=o(a);r.setHours(t),r.setMinutes(e),this.dp.rangeDateFrom=r,this.dp.replaceDate(a,r)}if(this.rangeToFocused&&!p(r,a)){let{hours:t,minutes:e}=o(h);r.setHours(t),r.setMinutes(e),this.dp.rangeDateTo=r,this.dp.replaceDate(h,r)}}})),x(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),x(this,"onChangeViewDate",((t,e)=>{if(!this.isVisible)return;let s=c(t),h=c(e);switch(this.dp.currentView){case i.days:if(u(t,e,i.months))return;break;case i.months:if(u(t,e,i.years))return;break;case i.years:if(s[0]===h[0]&&s[1]===h[1])return}this.render()})),x(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((t=>{this.$cells.appendChild(t.render())}))})),this.dp=e,this.type=s,this.opts=h,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===i.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:t,dynamicRange:e}=this.opts;y(this.$el,"mouseover",this.onMouseOverCell),y(this.$el,"mouseout",this.onMouseOutCell),y(this.$el,"click",this.onClickBody),t&&e&&(y(this.$el,"mousedown",this.onMouseDown),y(this.$el,"mousemove",this.onMouseMove),y(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(i.eventChangeViewDate,this.onChangeViewDate),this.dp.on(i.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:"air-datepicker-body -".concat(this.type,"-"),innerHtml:S[this.type]}),this.$names=h(".air-datepicker-body--day-names",this.$el),this.$cells=h(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dp.locale.firstDay,e="",s=this.dp.isWeekend,{onClickDayName:h}=this.opts,a=t,r=0;for(;r<7;){let t=a%7,n=d("air-datepicker-body--day-name",{[i.cssClassWeekend]:s(t),"-clickable-":!!h}),o=this.dp.locale.daysMin[t];e+='<div class="'.concat(n,"\" data-day-index='").concat(t,"'>").concat(o,"</div>"),r++,a++}return e}_getDaysCells(){let{viewDate:t,locale:{firstDay:e}}=this.dp,i=n(t),{year:s,month:h}=o(t),a=new Date(s,h,1),r=new Date(s,h,i),l=a.getDay()-e,c=6-r.getDay()+e;l=l<0?l+7:l,c=c>6?c-7:c;let d=function(t,e){let{year:i,month:s,date:h}=o(t);return new Date(i,s,h-e)}(a,l),u=i+l+c,m=d.getDate(),{year:p,month:f}=o(d),v=0;for(;v<u;){let t=new Date(p,f,m+v);this._generateCell(t),v++}}_generateCell(t){let{type:e,dp:i,opts:s}=this,h=new M({type:e,dp:i,opts:s,date:t,body:this});return this.cells.push(h),h}_generateDayCells(){this._getDaysCells()}_generateMonthCells(){let{year:t}=this.dp.parsedViewDate,e=0;for(;e<12;)this.cells.push(this._generateCell(new Date(t,e))),e++}_generateYearCells(){let t=c(this.dp.viewDate),e=t[1]+1,i=t[0]-1;for(;i<=e;)this.cells.push(this._generateCell(new Date(i,0))),i++}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCells(){switch(this.type){case i.days:this._generateDayCells();break;case i.months:this._generateMonthCells();break;case i.years:this._generateYearCells()}}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((t=>t.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(i.eventChangeViewDate,this.onChangeViewDate),this.dp.off(i.eventChangeCurrentView,this.onChangeCurrentView)}}function H(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class T{constructor(t){let{dp:e,opts:i}=t;H(this,"onClickNav",(t=>{let e=g(t.target,".air-datepicker-nav--action");e&&this.dp[e.dataset.action]()})),H(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),H(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),H(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),H(this,"update",(()=>{let{prevHtml:t,nextHtml:e}=this.opts;this.$prev.innerHTML=t,this.$next.innerHTML=e,this._resetNavStatus(),this.render(),this.handleNavStatus()})),H(this,"renderDelay",(()=>{setTimeout(this.render)})),H(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),function(t,e){for(let i in e)e[i]?t.classList.add(i):t.classList.remove(i)}(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=e,this.opts=i,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=h(".air-datepicker-nav--title",this.$el),this.$prev=h('[data-action="prev"]',this.$el),this.$next=h('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(i.eventChangeViewDate,this.onChangeViewDate),this.dp.on(i.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(i.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(i.eventChangeTime,this.render))}destroy(){this.dp.off(i.eventChangeViewDate,this.onChangeViewDate),this.dp.off(i.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(i.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(i.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:t,opts:e}=this,i=e.navTitles[t.currentView];return"function"==typeof i?i(t):t.formatDate(t.viewDate,i)}handleNavStatus(){let{disableNavWhenOutOfRange:t}=this.opts,{minDate:e,maxDate:s}=this.dp;if(!e&&!s||!t)return;let{year:h,month:a}=this.dp.parsedViewDate,r=!!e&&o(e),n=!!s&&o(s);switch(this.dp.currentView){case i.days:e&&r.month>=a&&r.year>=h&&this._disableNav("prev"),s&&n.month<=a&&n.year<=h&&this._disableNav("next");break;case i.months:e&&r.year>=h&&this._disableNav("prev"),s&&n.year<=h&&this._disableNav("next");break;case i.years:{let t=c(this.dp.viewDate);e&&r.year>=t[0]&&this._disableNav("prev"),s&&n.year<=t[1]&&this._disableNav("next");break}}}_disableNav(t){h('[data-action="'+t+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){!function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];t.length?t.forEach((t=>{t.classList.remove(...i)})):t.classList.remove(...i)}(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:t,nextHtml:e}=this.opts;this.$el.innerHTML='<div class="air-datepicker-nav--action" data-action="prev">'.concat(t,"</div>")+'<div class="air-datepicker-nav--title"></div>'+'<div class="air-datepicker-nav--action" data-action="next">'.concat(e,"</div>")}get isNavIsFunction(){let{navTitles:t}=this.opts;return Object.keys(t).find((e=>"function"==typeof t[e]))}}var V={today:{content:t=>t.locale.today,onClick:t=>t.setViewDate(new Date)},clear:{content:t=>t.locale.clear,onClick:t=>t.clear()}};class A{constructor(t){let{dp:e,opts:i}=t;this.dp=e,this.opts=i,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:t}=this.opts;Array.isArray(t)||(t=[t]),t.forEach((t=>{let e=t;"string"==typeof t&&V[t]&&(e=V[t]);let i=this.createButton(e);e.onClick&&this.attachEventToButton(i,e.onClick),this.$el.appendChild(i)}))}attachEventToButton(t,e){t.addEventListener("click",(()=>{e(this.dp)}))}createButton(t){let{content:e,className:i,tagName:s="button",attrs:h={}}=t,r="function"==typeof e?e(this.dp):e;return a({tagName:s,innerHtml:"<span tabindex='-1'>".concat(r,"</span>"),className:d("air-datepicker-button",i),attrs:h})}render(){this.generateButtons()}}function F(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class N{constructor(){let{opts:t,dp:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};F(this,"toggleTimepickerIsActive",(t=>{this.dp.timepickerIsActive=t})),F(this,"onChangeSelectedDate",(t=>{let{date:e,updateTime:i=!1}=t;e&&(this.setMinMaxTime(e),this.setCurrentTime(!!i&&e),this.addTimeToDate(e))})),F(this,"onChangeLastSelectedDate",(t=>{t&&(this.setTime(t),this.render())})),F(this,"onChangeInputRange",(t=>{let e=t.target;this[e.getAttribute("name")]=e.value,this.updateText(),this.dp.trigger(i.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),F(this,"onMouseEnterLeave",(t=>{let e=t.target.getAttribute("name"),i=this.$minutesText;"hours"===e&&(i=this.$hoursText),i.classList.toggle("-focus-")})),F(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),F(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=t,this.dp=e;let{timeFormat:s}=this.dp.locale;s&&(s.match(k("h"))||s.match(k("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(i.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let t="input";navigator.userAgent.match(/trident/gi)&&(t="change"),y(this.$ranges,t,this.onChangeInputRange),y(this.$ranges,"mouseenter",this.onMouseEnterLeave),y(this.$ranges,"mouseleave",this.onMouseEnterLeave),y(this.$ranges,"focus",this.onFocus),y(this.$ranges,"mousedown",this.onFocus),y(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:d("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(i.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:t,hours:e,displayHours:i,minutes:s,minHours:h,minMinutes:a,maxHours:r,maxMinutes:n,dayPeriod:o,opts:{hoursStep:c,minutesStep:d}}=this;this.$el.innerHTML='<div class="air-datepicker-time--current">'+' <span class="air-datepicker-time--current-hours">'.concat(l(i),"</span>")+' <span class="air-datepicker-time--current-colon">:</span>'+' <span class="air-datepicker-time--current-minutes">'.concat(l(s),"</span>")+" ".concat(t?"<span class='air-datepicker-time--current-ampm'>".concat(o,"</span>"):"")+'</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row">'+' <input type="range" name="hours" value="'.concat(e,'" min="').concat(h,'" max="').concat(r,'" step="').concat(c,'"/>')+' </div> <div class="air-datepicker-time--row">'+' <input type="range" name="minutes" value="'.concat(s,'" min="').concat(a,'" max="').concat(n,'" step="').concat(d,'"/>')+" </div></div>"}defineDOM(){let t=t=>h(t,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=t('[name="hours"]'),this.$minutes=t('[name="minutes"]'),this.$hoursText=t(".air-datepicker-time--current-hours"),this.$minutesText=t(".air-datepicker-time--current-minutes"),this.$ampm=t(".air-datepicker-time--current-ampm")}setTime(t){this.setMinMaxTime(t),this.setCurrentTime(t)}addTimeToDate(t){t&&(t.setHours(this.hours),t.setMinutes(this.minutes))}setMinMaxTime(t){if(this.setMinMaxTimeFromOptions(),t){let{minDate:e,maxDate:i}=this.dp;e&&u(t,e)&&this.setMinTimeFromMinDate(e),i&&u(t,i)&&this.setMaxTimeFromMaxDate(i)}}setCurrentTime(t){let{hours:e,minutes:i}=t?o(t):this;this.hours=b(e,this.minHours,this.maxHours),this.minutes=b(i,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:t,minMinutes:e,maxHours:i,maxMinutes:s}=this.opts;this.minHours=b(t,0,23),this.minMinutes=b(e,0,59),this.maxHours=b(i,0,23),this.maxMinutes=b(s,0,59)}setMinTimeFromMinDate(t){let{lastSelectedDate:e}=this.dp;this.minHours=t.getHours(),this.minMinutes=e&&e.getHours()>t.getHours()?this.opts.minMinutes:t.getMinutes()}setMaxTimeFromMaxDate(t){let{lastSelectedDate:e}=this.dp;this.maxHours=t.getHours(),this.maxMinutes=e&&e.getHours()<t.getHours()?this.opts.maxMinutes:t.getMinutes()}getDayPeriod(t,e){let i=t,s=Number(t);t instanceof Date&&(i=o(t),s=Number(i.hours));let h="am";if(e||this.ampm){switch(!0){case 12===s:case s>11:h="pm"}s=s%12==0?12:s%12}return{hours:s,dayPeriod:h}}updateSliders(){r(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,r(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=l(this.displayHours),this.$minutesText.innerHTML=l(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(t){this._hours=t;let{hours:e,dayPeriod:i}=this.getDayPeriod(t);this.displayHours=e,this.dayPeriod=i}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function E(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class j{constructor(t){let{dp:e,opts:i}=t;E(this,"pressedKeys",new Set),E(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],t=>t.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],t=>t.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],t=>t.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],t=>t.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],t=>t.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],t=>t.year-=10],[["Control","Shift","ArrowUp"],(t,e)=>e.up()]])),E(this,"handleHotKey",(t=>{let e=this.hotKeys.get(t),i=o(this.getInitialFocusDate());e(i,this.dp);let{year:s,month:h,date:a}=i,r=n(new Date(s,h));r<a&&(a=r);let l=this.dp.getClampedDate(new Date(s,h,a));this.dp.setFocusDate(l,{viewDateTransition:!0})})),E(this,"isHotKeyPressed",(()=>{let t=!1,e=this.pressedKeys.size,i=t=>this.pressedKeys.has(t);for(let[s]of this.hotKeys){if(t)break;if(Array.isArray(s[0]))s.forEach((h=>{t||e!==h.length||(t=h.every(i)&&s)}));else{if(e!==s.length)continue;t=s.every(i)&&s}}return t})),E(this,"isArrow",(t=>t>=37&&t<=40)),E(this,"onKeyDown",(t=>{let{key:e,which:i}=t,{dp:s,dp:{focusDate:h},opts:a}=this;this.registerKey(e);let r=this.isHotKeyPressed();if(r)return t.preventDefault(),void this.handleHotKey(r);if(this.isArrow(i))return t.preventDefault(),void this.focusNextCell(e);if("Enter"===e){if(s.currentView!==a.minView)return void s.down();if(h){let t=s._checkIfDateIsSelected(h);return void(t?s._handleAlreadySelectedDates(t,h):s.selectDate(h))}}"Escape"===e&&this.dp.hide()})),E(this,"onKeyUp",(t=>{this.removeKey(t.key)})),this.dp=e,this.opts=i,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:t}=this.dp;t.addEventListener("keydown",this.onKeyDown),t.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:t}=this.dp;t.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:t,currentView:e,selectedDates:s,parsedViewDate:{year:h,month:a}}=this.dp,r=t||s[s.length-1];if(!r)switch(e){case i.days:r=new Date(h,a,(new Date).getDate());break;case i.months:r=new Date(h,a,1);break;case i.years:r=new Date(h,0,1)}return r}focusNextCell(t){let e=this.getInitialFocusDate(),{currentView:s}=this.dp,{days:h,months:a,years:r}=i,n=o(e),l=n.year,c=n.month,d=n.date;switch(t){case"ArrowLeft":s===h&&(d-=1),s===a&&(c-=1),s===r&&(l-=1);break;case"ArrowUp":s===h&&(d-=7),s===a&&(c-=3),s===r&&(l-=4);break;case"ArrowRight":s===h&&(d+=1),s===a&&(c+=1),s===r&&(l+=1);break;case"ArrowDown":s===h&&(d+=7),s===a&&(c+=3),s===r&&(l+=4)}let u=this.dp.getClampedDate(new Date(l,c,d));this.dp.setFocusDate(u,{viewDateTransition:!0})}registerKey(t){this.pressedKeys.add(t)}removeKey(t){this.pressedKeys.delete(t)}}let P={on(t,e){this.__events||(this.__events={}),this.__events[t]?this.__events[t].push(e):this.__events[t]=[e]},off(t,e){this.__events&&this.__events[t]&&(this.__events[t]=this.__events[t].filter((t=>t!==e)))},removeAllEvents(){this.__events={}},trigger(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];this.__events&&this.__events[t]&&this.__events[t].forEach((t=>{t(...i)}))}};function z(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let R="",I="",U="",B=!1;class L{constructor(t,e){var r=this;if(z(this,"viewIndexes",[i.days,i.months,i.years]),z(this,"next",(()=>{let{year:t,month:e}=this.parsedViewDate;switch(this.currentView){case i.days:this.setViewDate(new Date(t,e+1,1));break;case i.months:this.setViewDate(new Date(t+1,e,1));break;case i.years:this.setViewDate(new Date(t+10,0,1))}})),z(this,"prev",(()=>{let{year:t,month:e}=this.parsedViewDate;switch(this.currentView){case i.days:this.setViewDate(new Date(t,e-1,1));break;case i.months:this.setViewDate(new Date(t-1,e,1));break;case i.years:this.setViewDate(new Date(t-10,0,1))}})),z(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),z(this,"setPosition",(function(t){if("function"==typeof(t=t||r.opts.position))return void(r.customHide=t({$datepicker:r.$datepicker,$target:r.$el,$pointer:r.$pointer,isViewChange:arguments.length>1&&void 0!==arguments[1]&&arguments[1],done:r._finishHide}));let e,i,{isMobile:s}=r.opts,h=r.$el.getBoundingClientRect(),a=r.$el.getBoundingClientRect(),n=r.$datepicker.offsetParent,o=r.$el.offsetParent,l=r.$datepicker.getBoundingClientRect(),c=t.split(" "),d=window.scrollY,u=window.scrollX,m=r.opts.offset,p=c[0],f=c[1];if(s)r.$datepicker.style.cssText="left: 50%; top: 50%";else{if(n===o&&n!==document.body&&(a={top:r.$el.offsetTop,left:r.$el.offsetLeft,width:h.width,height:r.$el.offsetHeight},d=0,u=0),n!==o&&n!==document.body){let t=n.getBoundingClientRect();a={top:h.top-t.top,left:h.left-t.left,width:h.width,height:h.height},d=0,u=0}switch(p){case"top":e=a.top-l.height-m;break;case"right":i=a.left+a.width+m;break;case"bottom":e=a.top+a.height+m;break;case"left":i=a.left-l.width-m}switch(f){case"top":e=a.top;break;case"right":i=a.left+a.width-l.width;break;case"bottom":e=a.top+a.height-l.height;break;case"left":i=a.left;break;case"center":/left|right/.test(p)?e=a.top+a.height/2-l.height/2:i=a.left+a.width/2-l.width/2}r.$datepicker.style.cssText="left: ".concat(i+u,"px; top: ").concat(e+d,"px")}})),z(this,"_setInputValue",(()=>{let{opts:t,$altField:e,locale:{dateFormat:i}}=this,{altFieldDateFormat:s,altField:h}=t;h&&e&&(e.value=this._getInputValue(s)),this.$el.value=this._getInputValue(i)})),z(this,"_getInputValue",(t=>{let{selectedDates:e,opts:i}=this,{multipleDates:s,multipleDatesSeparator:h}=i;if(!e.length)return"";let a="function"==typeof t,r=a?t(s?e:e[0]):e.map((e=>this.formatDate(e,t)));return r=a?r:r.join(h),r})),z(this,"_checkIfDateIsSelected",(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.days,s=!1;return r.selectedDates.some((i=>{let h=u(t,i,e);return s=h&&i,h})),s})),z(this,"_scheduleCallAfterTransition",(t=>{this._cancelScheduledCall(),t&&t(!1),this._onTransitionEnd=()=>{t&&t(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),z(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),z(this,"setViewDate",(t=>{if(!((t=D(t))instanceof Date))return;if(u(t,this.viewDate))return;let e=this.viewDate;this.viewDate=t;let{onChangeViewDate:s}=this.opts;if(s){let{month:t,year:e}=this.parsedViewDate;s({month:t,year:e,decade:this.curDecade})}this.trigger(i.eventChangeViewDate,t,e)})),z(this,"setFocusDate",(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(!t||(t=D(t))instanceof Date)&&(r.focusDate=t,r.opts.range&&t&&r._handleRangeOnFocus(),r.trigger(i.eventChangeFocusDate,t,e))})),z(this,"setCurrentView",(t=>{if(this.viewIndexes.includes(t)){if(this.currentView=t,this.elIsInput&&this.visible&&this.setPosition(void 0,!0),this.trigger(i.eventChangeCurrentView,t),!this.views[t]){let e=this.views[t]=new O({dp:this,opts:this.opts,type:t});this.shouldUpdateDOM&&this.$content.appendChild(e.$el)}this.opts.onChangeView&&this.opts.onChangeView(t)}})),z(this,"_updateLastSelectedDate",(t=>{this.lastSelectedDate=t,this.trigger(i.eventChangeLastSelectedDate,t)})),z(this,"destroy",(()=>{let{showEvent:t,isMobile:e}=this.opts,i=this.$datepicker.parentNode;i&&i.removeChild(this.$datepicker),this.$el.removeEventListener(t,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),e&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts=null,this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=null,this.rangeDateFrom=null,this.rangeDateTo=null})),z(this,"update",(t=>{let e=w({},this.opts);w(this.opts,t);let{timepicker:s,buttons:h,range:a,selectedDates:r,isMobile:n}=this.opts,o=this.visible||this.treatAsInline;this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this._handleLocale(),!e.selectedDates&&r&&this.selectDate(r),t.view&&this.setCurrentView(t.view),this._setInputValue(),e.range&&!a?(this.rangeDateTo=!1,this.rangeDateFrom=!1):!e.range&&a&&this.selectedDates.length&&(this.rangeDateFrom=this.selectedDates[0],this.rangeDateTo=this.selectedDates[1]),e.timepicker&&!s?(o&&this.timepicker.destroy(),this.timepicker=!1,this.$timepicker.parentNode.removeChild(this.$timepicker)):!e.timepicker&&s&&this._addTimepicker(),!e.buttons&&h?this._addButtons():e.buttons&&!h?(this.buttons.destroy(),this.$buttons.parentNode.removeChild(this.$buttons)):o&&e.buttons&&h&&this.buttons.clearHtml().render(),!e.isMobile&&n?(this.treatAsInline||U||this._createMobileOverlay(),this._addMobileAttributes(),this.visible&&this._showMobileOverlay()):e.isMobile&&!n&&(this._removeMobileAttributes(),this.visible&&(U.classList.remove("-active-"),"function"!=typeof this.opts.position&&this.setPosition())),o&&(this.nav.update(),this.views[this.currentView].render(),this.currentView===i.days&&this.views[this.currentView].renderDayNames())})),z(this,"isOtherMonth",(t=>{let{month:e}=o(t);return e!==this.parsedViewDate.month})),z(this,"isOtherYear",(t=>{let{year:e}=o(t);return e!==this.parsedViewDate.year})),z(this,"isOtherDecade",(t=>{let{year:e}=o(t),[i,s]=c(this.viewDate);return e<i||e>s})),z(this,"_onChangeSelectedDate",(t=>{let{silent:e}=t;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!e&&this._triggerOnSelect()}))})),z(this,"_onChangeFocusedDate",(function(t){let{viewDateTransition:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return;let i=!1;e&&(i=r.isOtherMonth(t)||r.isOtherYear(t)||r.isOtherDecade(t)),i&&r.setViewDate(t)})),z(this,"_onChangeTime",(t=>{let{hours:e,minutes:i}=t,s=new Date,{lastSelectedDate:h,opts:{onSelect:a}}=this,r=h;h||(r=s);let n=this.getCell(r,this.currentViewSingular),o=n&&n.adpCell;o&&o.isDisabled||(r.setHours(e),r.setMinutes(i),h?(this._setInputValue(),a&&this._triggerOnSelect()):this.selectDate(r))})),z(this,"_onFocus",(()=>{this.visible||this.show()})),z(this,"_onBlur",(()=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),z(this,"_onMouseDown",(()=>{this.inFocus=!0})),z(this,"_onMouseUp",(()=>{this.inFocus=!1,this.$el.focus()})),z(this,"_onResize",(()=>{this.visible&&"function"!=typeof this.opts.position&&this.setPosition()})),z(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),z(this,"isWeekend",(t=>this.opts.weekends.includes(t))),z(this,"getClampedDate",(t=>{let{minDate:e,maxDate:i}=this,s=t;return i&&m(t,i)?s=i:e&&p(t,e)&&(s=e),s})),this.$el=h(t),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=w({},s,e),this.$customContainer=!!this.opts.container&&h(this.opts.container),this.$altField=h(this.opts.altField||!1),R||(R=h("body"));let{view:n,startDate:l}=this.opts;l||(this.opts.startDate=new Date),"INPUT"===this.$el.nodeName&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=D(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=n,this.selectedDates=[],this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:t,treatAsInline:e,opts:{inline:i,isMobile:s,selectedDates:h,keyboardNav:r,onlyTimepicker:n}}=this;var o;B||i||!this.elIsInput||(B=!0,I=a({className:o=L.defaultContainerId,id:o}),R.appendChild(I)),!s||U||e||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(i||this._bindEvents(),r&&!n&&(this.keyboardNav=new j({dp:this,opts:t}))),h&&this.selectDate(h,{silent:!0}),this.opts.visible&&!e&&this.show(),s&&!e&&this.$el.setAttribute("readonly",!0),e&&this._createComponents()}_createMobileOverlay(){U=a({className:"air-datepicker-overlay"}),I.appendChild(U)}_createComponents(){let{opts:t,treatAsInline:e,opts:{inline:i,buttons:s,timepicker:h,position:a,classes:r,onlyTimepicker:n,isMobile:o}}=this;this._buildBaseHtml(),this.elIsInput&&(i||this._setPositionClasses(a)),!i&&this.elIsInput||this.$datepicker.classList.add("-inline-"),r&&this.$datepicker.classList.add(...r.split(" ")),n&&this.$datepicker.classList.add("-only-timepicker-"),o&&!e&&this._addMobileAttributes(),this.views[this.currentView]=new O({dp:this,type:this.currentView,opts:t}),this.nav=new T({dp:this,opts:t}),h&&this._addTimepicker(),s&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let t in this.views)this.views[t].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){U.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){U.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||""===this.initialReadonly||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:t,maxDate:e}=this.opts;this.minDate=!!t&&D(t),this.maxDate=!!e&&D(e)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new N({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new A({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(i.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(i.eventChangeFocusDate,this._onChangeFocusedDate),this.on(i.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:t}=this.opts;var e;this.elIsInput?t?(e=this.$el).parentNode.insertBefore(this.$datepicker,e.nextSibling):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=h(".air-datepicker--content",this.$datepicker),this.$pointer=h(".air-datepicker--pointer",this.$datepicker),this.$nav=h(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:t,dateFormat:e,firstDay:i,timepicker:s,onlyTimepicker:h,timeFormat:a,dateTimeSeparator:r}=this.opts;this.locale=JSON.parse(JSON.stringify(t)),e&&(this.locale.dateFormat=e),void 0!==a&&""!==a&&(this.locale.timeFormat=a);let{timeFormat:n}=this.locale;""!==i&&(this.locale.firstDay=i),s&&"function"!=typeof e&&(this.locale.dateFormat=[this.locale.dateFormat,n||""].join(n?r:"")),h&&"function"!=typeof e&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(t){if("function"==typeof t)return void this.$datepicker.classList.add("-custom-position-");let e=(t=t.split(" "))[0],i=t[1],s="air-datepicker -".concat(e,"-").concat(i,"- -from-").concat(e,"-");this.$datepicker.classList.add(...s.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:t,minDate:e,maxDate:i}=this;i&&m(t,i)&&this.setViewDate(i),e&&p(t,e)&&this.setViewDate(e)}formatDate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.viewDate,e=arguments.length>1?arguments[1]:void 0;if(t=D(t),!(t instanceof Date))return;let i=e,s=this.locale,h=o(t),a=c(t),r=L.replacer,n="am";this.opts.timepicker&&this.timepicker&&(n=this.timepicker.getDayPeriod(t).dayPeriod);let l={T:t.getTime(),m:h.minutes,mm:h.fullMinutes,h:h.hours12,hh:h.fullHours12,H:h.hours,HH:h.fullHours,aa:n,AA:n.toUpperCase(),E:s.daysShort[h.day],EEEE:s.days[h.day],d:h.date,dd:h.fullDate,M:h.month+1,MM:h.fullMonth,MMM:s.monthsShort[h.month],MMMM:s.months[h.month],yy:h.year.toString().slice(-2),yyyy:h.year,yyyy1:a[0],yyyy2:a[1]};for(let[t,e]of Object.entries(l))i=r(i,k(t),e);return i}down(t){this._handleUpDownActions(t,"down")}up(t){this._handleUpDownActions(t,"up")}selectDate(t){let e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{currentView:h,parsedViewDate:a,selectedDates:r}=this,{updateTime:n}=s,{moveToOtherMonthsOnSelect:o,moveToOtherYearsOnSelect:l,multipleDates:c,range:d,autoClose:u}=this.opts,p=r.length;if(Array.isArray(t))return t.forEach((t=>{this.selectDate(t,s)})),new Promise((t=>{setTimeout(t)}));if((t=D(t))instanceof Date){if(h===i.days&&t.getMonth()!==a.month&&o&&(e=new Date(t.getFullYear(),t.getMonth(),1)),h===i.years&&t.getFullYear()!==a.year&&l&&(e=new Date(t.getFullYear(),0,1)),e&&this.setViewDate(e),c&&!d){if(p===c)return;this._checkIfDateIsSelected(t)||r.push(t)}else if(d)switch(p){case 1:r.push(t),this.rangeDateTo||(this.rangeDateTo=t),m(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=t),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[t],this.rangeDateFrom=t,this.rangeDateTo="";break;default:this.selectedDates=[t],this.rangeDateFrom=t}else this.selectedDates=[t];return this.trigger(i.eventChangeSelectedDate,{action:i.actionSelectDate,silent:null==s?void 0:s.silent,date:t,updateTime:n}),this._updateLastSelectedDate(t),u&&!this.timepickerIsActive&&this.visible&&(c||d?d&&1===p&&this.hide():this.hide()),new Promise((t=>{setTimeout(t)}))}}unselectDate(t){let e=this.selectedDates,s=this;if((t=D(t))instanceof Date)return e.some(((h,a)=>{if(u(h,t))return e.splice(a,1),s.selectedDates.length?s._updateLastSelectedDate(s.selectedDates[s.selectedDates.length-1]):(s.rangeDateFrom="",s.rangeDateTo="",s._updateLastSelectedDate(!1)),this.trigger(i.eventChangeSelectedDate,{action:i.actionUnselectDate,date:t}),!0}))}replaceDate(t,e){let s=this.selectedDates.find((e=>u(e,t,this.currentView))),h=this.selectedDates.indexOf(s);h<0||u(this.selectedDates[h],e,this.currentView)||(this.selectedDates[h]=e,this.trigger(i.eventChangeSelectedDate,{action:i.actionSelectDate,date:e,updateTime:!0}),this._updateLastSelectedDate(e))}clear(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.trigger(i.eventChangeSelectedDate,{action:i.actionUnselectDate,silent:t.silent}),new Promise((t=>{setTimeout(t)}))}show(){let{onShow:t,isMobile:e}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,t&&this._scheduleCallAfterTransition(t),e&&this._showMobileOverlay()}hide(){let{onHide:t,isMobile:e}=this.opts,i=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((e=>{!this.customHide&&(e&&i||!e&&!i)&&this._finishHide(),t&&t(e)})),e&&U.classList.remove("-active-")}_triggerOnSelect(){let t=[],e=[],{selectedDates:i,locale:s,opts:{onSelect:h,multipleDates:a,range:r}}=this,n=a||r,o="function"==typeof s.dateFormat;i.length&&(t=i.map(f),e=o?a?s.dateFormat(t):t.map((t=>s.dateFormat(t))):t.map((t=>this.formatDate(t,s.dateFormat)))),h({date:n?t:t[0],formattedDate:n?e:e[0],datepicker:this})}_handleAlreadySelectedDates(t,e){let{range:i,toggleSelected:s}=this.opts;i?s?this.unselectDate(e):2!==this.selectedDates.length&&this.selectDate(e):s&&this.unselectDate(e),s||this._updateLastSelectedDate(t)}_handleUpDownActions(t,e){if(!((t=D(t||this.focusDate||this.viewDate))instanceof Date))return;let i="up"===e?this.viewIndex+1:this.viewIndex-1;i>2&&(i=2),i<0&&(i=0),this.setViewDate(new Date(t.getFullYear(),t.getMonth(),1)),this.setCurrentView(this.viewIndexes[i])}_handleRangeOnFocus(){1===this.selectedDates.length&&(m(this.selectedDates[0],this.focusDate)?(this.rangeDateTo=this.selectedDates[0],this.rangeDateFrom=this.focusDate):(this.rangeDateTo=this.focusDate,this.rangeDateFrom=this.selectedDates[0]))}getCell(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.day;if(!((t=D(t))instanceof Date))return;let{year:s,month:h,date:a}=o(t),r='[data-year="'.concat(s,'"]'),n='[data-month="'.concat(h,'"]'),l='[data-date="'.concat(a,'"]'),c={[i.day]:"".concat(r).concat(n).concat(l),[i.month]:"".concat(r).concat(n),[i.year]:"".concat(r)};return this.views[this.currentView].$el.querySelector(c[e])}_showMobileOverlay(){U.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((t,e)=>parseFloat(e)+t),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return o(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return c(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===i.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===i.days}get $container(){return this.$customContainer||I}static replacer(t,e,i){return t.replace(e,(function(t,e,s,h){return e+i+h}))}}return z(L,"defaults",s),z(L,"version","3.3.0"),z(L,"defaultContainerId","air-datepicker-global-container"),Object.assign(L.prototype,P),e.default}()}));const l=n(a((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"MM/dd/yyyy",timeFormat:"hh:mm aa",firstDay:0}}))),c=class{constructor(i){t(this,i),this.valueChange=e(this,"valueChange",3),this.locale=l,this.onClick=t=>{t.stopPropagation(),t.preventDefault()}}watchProps(){this.init()}componentDidLoad(){this.init()}disconnectedCallback(){var t;null===(t=this.picker)||void 0===t||t.destroy()}init(){var t;null===(t=this.picker)||void 0===t||t.destroy(),this.picker=new o(this.containerEl,{classes:"date-picker",inline:!0,locale:this.locale,maxDate:this.maxDate,minDate:this.minDate,minView:"days",nextHtml:"<flip-icon-chevron-right></flip-icon-chevron-right>",onSelect:({date:t})=>{this.valueChange.emit(t)},prevHtml:"<flip-icon-chevron-left></flip-icon-chevron-left>",range:this.range,selectedDates:void 0===this.value?void 0:Array.isArray(this.value)?this.value:[this.value],startDate:this.startDate,toggleSelected:!this.range,view:"days"})}render(){return i(s,{onClick:this.onClick},i("div",{ref:t=>this.containerEl=t}))}static get watchers(){return{locale:["watchProps"],maxDate:["watchProps"],minDate:["watchProps"],range:["watchProps"],startDate:["watchProps"],value:["watchProps"]}}};c.style=':host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:var(--s-surface-overlay-default);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker{max-width:17.5rem}}.air-datepicker--pointer{display:none}.air-datepicker-nav{display:flex;margin-bottom:var(--s-space-8);align-items:center}.air-datepicker-nav--action{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;justify-content:center;align-items:center;border-radius:50%;color:var(--s-icon-highlight);cursor:pointer;order:2}.air-datepicker-nav--action:hover{background-color:var(--s-surface-overlay-hovered)}.air-datepicker-nav--title{padding:var(--s-space-8);flex-grow:1;border-radius:var(--s-border-radius-s);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer;order:0}.air-datepicker-nav--title i{font-style:normal}.air-datepicker-body--day-names{display:flex;margin-bottom:var(--s-space-8);justify-content:space-between;align-items:center}.air-datepicker-body--day-name{display:inline-flex;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);aspect-ratio:1}.air-datepicker-body--cells{position:relative;z-index:1;display:flex;flex-wrap:wrap;justify-content:space-between}.air-datepicker-body--cells.-months-{gap:var(--s-space-2)}.air-datepicker-cell{position:relative;display:inline-flex;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer;aspect-ratio:1}.air-datepicker-cell:not(.-month-):not(.-year-):not(.-in-range-):hover:before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-overlay-hovered);content:"";inset:0}.air-datepicker-cell.-month-,.air-datepicker-cell.-year-{height:2.5rem;flex-basis:calc(100 / 3 * 1% - var(--s-space-2) * 2);border-radius:var(--s-border-radius-s);aspect-ratio:auto}.air-datepicker-cell.-month-.-in-range-:before,.air-datepicker-cell.-year-.-in-range-:before{border-radius:var(--s-border-radius-s)}.air-datepicker-cell.-month-:hover:not(.-in-range-):not(.-selected-),.air-datepicker-cell.-year-:hover:not(.-in-range-):not(.-selected-){background-color:var(--s-surface-overlay-hovered)}.air-datepicker-cell.-other-month-{color:var(--s-text-subdued)}.air-datepicker-cell.-current-:not(.-month-):not(.-year-):after{position:absolute;z-index:-1;border:var(--s-border-width-default) solid var(--s-border-highlight);border-radius:50%;content:"";inset:0}.air-datepicker-cell.-selected-{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-selected-.-year-,.air-datepicker-cell.-selected-.-month-{background-color:var(--s-surface-highlight-default)}.air-datepicker-cell.-selected-:not(.-month-):not(.-year-):not(.-in-range-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-disabled-{color:var(--s-text-subdued);cursor:default}.air-datepicker-cell.-disabled-:hover{background-color:transparent}.air-datepicker-cell.-in-range-:before{position:absolute;z-index:-1;top:0.0625rem;right:0;bottom:0.0625rem;left:0;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):hover{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):after{position:absolute;z-index:-1;top:0.0625rem;right:0;bottom:0.0625rem;left:50%;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):hover{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):after{position:absolute;z-index:-1;top:0.0625rem;right:50%;bottom:0.0625rem;left:0;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.-hidden-{display:none}';const d=class{constructor(e){t(this,e),this.size=24}render(){return i("svg",{class:"flip-icon",fill:"none",height:this.size,part:"icon",viewBox:`0 0 ${this.size} ${this.size}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&i(h,null,i("path",{d:"M6 11C5.53333 11 5.13889 10.8389 4.81667 10.5167C4.49444 10.1945 4.33333 9.80004 4.33333 9.33337C4.33333 8.86671 4.49444 8.47226 4.81667 8.15004C5.13889 7.82782 5.53333 7.66671 6 7.66671C6.46667 7.66671 6.86111 7.82782 7.18333 8.15004C7.50556 8.47226 7.66667 8.86671 7.66667 9.33337C7.66667 9.80004 7.50556 10.1945 7.18333 10.5167C6.86111 10.8389 6.46667 11 6 11ZM3.33333 14.6667C2.96667 14.6667 2.65267 14.5363 2.39133 14.2754C2.13044 14.014 2 13.7 2 13.3334V4.00004C2 3.63337 2.13044 3.3196 2.39133 3.05871C2.65267 2.79737 2.96667 2.66671 3.33333 2.66671H4V2.00004C4 1.81115 4.06378 1.65271 4.19133 1.52471C4.31933 1.39715 4.47778 1.33337 4.66667 1.33337C4.85556 1.33337 5.014 1.39715 5.142 1.52471C5.26956 1.65271 5.33333 1.81115 5.33333 2.00004V2.66671H10.6667V2.00004C10.6667 1.81115 10.7307 1.65271 10.8587 1.52471C10.9862 1.39715 11.1444 1.33337 11.3333 1.33337C11.5222 1.33337 11.6804 1.39715 11.808 1.52471C11.936 1.65271 12 1.81115 12 2.00004V2.66671H12.6667C13.0333 2.66671 13.3473 2.79737 13.6087 3.05871C13.8696 3.3196 14 3.63337 14 4.00004V13.3334C14 13.7 13.8696 14.014 13.6087 14.2754C13.3473 14.5363 13.0333 14.6667 12.6667 14.6667H3.33333ZM3.33333 13.3334H12.6667V6.66671H3.33333V13.3334Z",fill:"currentColor"})),24===this.size&&i(h,null,i("path",{d:"M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20Z",fill:"currentColor"})),28===this.size&&i(h,null,i("path",{d:"M10.5 19.25C9.68333 19.25 8.99306 18.9681 8.42917 18.4042C7.86528 17.8403 7.58333 17.15 7.58333 16.3334C7.58333 15.5167 7.86528 14.8264 8.42917 14.2625C8.99306 13.6987 9.68333 13.4167 10.5 13.4167C11.3167 13.4167 12.0069 13.6987 12.5708 14.2625C13.1347 14.8264 13.4167 15.5167 13.4167 16.3334C13.4167 17.15 13.1347 17.8403 12.5708 18.4042C12.0069 18.9681 11.3167 19.25 10.5 19.25ZM5.83333 25.6667C5.19167 25.6667 4.64217 25.4384 4.18483 24.9819C3.72828 24.5245 3.5 23.975 3.5 23.3334V7.00004C3.5 6.35837 3.72828 5.80926 4.18483 5.35271C4.64217 4.89537 5.19167 4.66671 5.83333 4.66671H7V3.50004C7 3.16949 7.11161 2.89221 7.33483 2.66821C7.55883 2.44499 7.83611 2.33337 8.16667 2.33337C8.49722 2.33337 8.7745 2.44499 8.9985 2.66821C9.22172 2.89221 9.33333 3.16949 9.33333 3.50004V4.66671H18.6667V3.50004C18.6667 3.16949 18.7787 2.89221 19.0027 2.66821C19.2259 2.44499 19.5028 2.33337 19.8333 2.33337C20.1639 2.33337 20.4408 2.44499 20.664 2.66821C20.888 2.89221 21 3.16949 21 3.50004V4.66671H22.1667C22.8083 4.66671 23.3578 4.89537 23.8152 5.35271C24.2717 5.80926 24.5 6.35837 24.5 7.00004V23.3334C24.5 23.975 24.2717 24.5245 23.8152 24.9819C23.3578 25.4384 22.8083 25.6667 22.1667 25.6667H5.83333ZM5.83333 23.3334H22.1667V11.6667H5.83333V23.3334Z",fill:"currentColor"})))}};d.style=":host{display:inline-flex}";export{c as flip_date_picker,d as flip_icon_today}
|
|
1
|
+
import{r as t,c as e,h as i,H as s,F as h}from"./p-9fe00e8a.js";import{c as a,a as r,g as n}from"./p-86bd3473.js";var o=a((function(t){t.exports=function(){var t={d:function(e,i){for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e={};t.d(e,{default:function(){return L}});var i={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},s={classes:"",inline:!1,locale:{days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],daysShort:["Вос","Пон","Вто","Сре","Чет","Пят","Суб"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:i.days,minView:i.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return"string"==typeof t?e.querySelector(t):t}function a(){let{tagName:t="div",className:e="",innerHtml:i="",id:s="",attrs:h={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=document.createElement(t);return e&&a.classList.add(...e.split(" ")),s&&(a.id=s),i&&(a.innerHTML=i),h&&r(a,h),a}function r(t,e){for(let[i,s]of Object.entries(e))void 0!==s&&t.setAttribute(i,s);return t}function n(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function o(t){let e=t.getHours(),i=e%12==0?12:e%12;return{year:t.getFullYear(),month:t.getMonth(),fullMonth:t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,date:t.getDate(),fullDate:t.getDate()<10?"0"+t.getDate():t.getDate(),day:t.getDay(),hours:e,fullHours:l(e),hours12:i,fullHours12:l(i),minutes:t.getMinutes(),fullMinutes:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes()}}function l(t){return t<10?"0"+t:t}function c(t){let e=10*Math.floor(t.getFullYear()/10);return[e,e+9]}function d(){let t=[];for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return i.forEach((e=>{if("object"==typeof e)for(let i in e)e[i]&&t.push(i);else e&&t.push(e)})),t.join(" ")}function u(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.days;if(!t||!e)return!1;let h=o(t),a=o(e);return{[i.days]:h.date===a.date&&h.month===a.month&&h.year===a.year,[i.months]:h.month===a.month&&h.year===a.year,[i.years]:h.year===a.year}[s]}function m(t,e,i){let s=f(t,!1).getTime(),h=f(e,!1).getTime();return i?s>=h:s>h}function p(t,e){return!m(t,e,!0)}function f(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=new Date(t.getTime());return"boolean"!=typeof e||e||v(i),i}function v(t){return t.setHours(0,0,0,0),t}function y(t,e,i){t.length?t.forEach((t=>{t.addEventListener(e,i)})):t.addEventListener(e,i)}function g(t,e){return!(!t||t===document||t instanceof DocumentFragment)&&(t.matches(e)?t:g(t.parentNode,e))}function b(t,e,i){return t>i?i:t<e?e:t}function w(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return i.filter((t=>t)).forEach((e=>{for(let[i,s]of Object.entries(e))if(void 0!==s&&"[object Object]"===s.toString()){let e=void 0!==t[i]?t[i].toString():void 0,h=s.toString(),a=Array.isArray(s)?[]:{};t[i]=t[i]?e!==h?a:t[i]:a,w(t[i],s)}else t[i]=s})),t}function D(t){let e=t;return t instanceof Date||(e=new Date(t)),isNaN(e.getTime())&&(console.log('Unable to convert value "'.concat(t,'" to Date object')),e=!1),e}function k(t){let e="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+e+")("+t+")($|<|"+e+")","g")}function C(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class M{constructor(){let{type:t,date:e,dp:i,opts:s,body:h}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};C(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),C(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),C(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),C(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),C(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),C(this,"onChangeFocusDate",(t=>{if(!t)return void(this.focused&&this.removeFocus());let e=u(t,this.date,this.type);e?this.focus():!e&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),C(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this.$cell.adpCell=this,this.$cell))),this.type=t,this.singleType=this.type.slice(0,-1),this.date=e,this.dp=i,this.opts=s,this.body=h,this.customData=!1,this.init()}init(){let{range:t,onRenderCell:e}=this.opts;e&&(this.customData=e({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),t&&this._handleRangeStatus())}_bindDatepickerEvents(){this.dp.on(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(i.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(i.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var t;let{year:e,month:i,date:s}=o(this.date),h=(null===(t=this.customData)||void 0===t?void 0:t.attrs)||{};this.$cell=a({className:this._getClassName(),attrs:{"data-year":e,"data-month":i,"data-date":s,...h}})}_getClassName(){var t,e;let s=new Date,{selectOtherMonths:h,selectOtherYears:a}=this.opts,{minDate:r,maxDate:n}=this.dp,{day:l}=o(this.date),c=this._isOutOfMinMaxRange(),m=null===(t=this.customData)||void 0===t?void 0:t.disabled,p=d("air-datepicker-cell","-".concat(this.singleType,"-"),{"-current-":u(s,this.date,this.type),"-min-date-":r&&u(r,this.date,this.type),"-max-date-":n&&u(n,this.date,this.type)}),f="";switch(this.type){case i.days:f=d({"-weekend-":this.dp.isWeekend(l),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!h||c||m});break;case i.months:f=d({"-disabled-":c||m});break;case i.years:f=d({"-other-decade-":this.isOtherDecade,"-disabled-":c||this.isOtherDecade&&!a||m})}return d(p,f,null===(e=this.customData)||void 0===e?void 0:e.classes)}_getHtml(){var t;let{year:e,month:s,date:h}=o(this.date),{showOtherMonths:a,showOtherYears:r}=this.opts;if(null!==(t=this.customData)&&void 0!==t&&t.html)return this.customData.html;switch(this.type){case i.days:return!a&&this.isOtherMonth?"":h;case i.months:return this.dp.locale[this.opts.monthsField][s];case i.years:return!r&&this.isOtherDecade?"":e}}_isOutOfMinMaxRange(){let{minDate:t,maxDate:e}=this.dp,{type:s,date:h}=this,{month:a,year:r,date:n}=o(h),l=s===i.days,c=s===i.years,d=!!t&&new Date(r,c?t.getMonth():a,l?n:t.getDate()),u=!!e&&new Date(r,c?e.getMonth():a,l?n:e.getDate());return t&&e?p(d,t)||m(u,e):t?p(d,t):e?m(u,e):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{rangeDateFrom:t,rangeDateTo:e}=this.dp,i=d({"-in-range-":t&&e&&(s=this.date,h=t,a=e,m(s,h)&&p(s,a)),"-range-from-":t&&u(this.date,t,this.type),"-range-to-":e&&u(this.date,e,this.type)});var s,h,a;this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),i&&this.$cell.classList.add(...i.split(" "))}_handleSelectedStatus(){let t=this.dp._checkIfDateIsSelected(this.date,this.type);t?this.select():!t&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){u(this.dp.focusDate,this.date,this.type)&&this.focus()}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function x(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let S={[i.days]:'<div class="air-datepicker-body--day-names"></div>'+'<div class="air-datepicker-body--cells -'.concat(i.days,'-"></div>'),[i.months]:'<div class="air-datepicker-body--cells -'.concat(i.months,'-"></div>'),[i.years]:'<div class="air-datepicker-body--cells -'.concat(i.years,'-"></div>')};const _=".air-datepicker-cell";class O{constructor(t){let{dp:e,type:s,opts:h}=t;x(this,"handleClick",(t=>{let e=t.target.closest(_).adpCell;if(e.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let i=this.dp._checkIfDateIsSelected(e.date,e.type);i?this.dp._handleAlreadySelectedDates(i,e.date):this.dp.selectDate(e.date)})),x(this,"handleDayNameClick",(t=>{let e=t.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(e),datepicker:this.dp})})),x(this,"onChangeCurrentView",(t=>{t!==this.type?this.hide():(this.show(),this.render())})),x(this,"onMouseOverCell",(t=>{let e=g(t.target,_);this.dp.setFocusDate(!!e&&e.adpCell.date)})),x(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),x(this,"onClickBody",(t=>{let{onClickDayName:e}=this.opts,i=t.target;i.closest(_)&&this.handleClick(t),e&&i.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(t)})),x(this,"onMouseDown",(t=>{this.pressed=!0;let e=g(t.target,_),i=e&&e.adpCell;u(i.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),u(i.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),x(this,"onMouseMove",(t=>{if(!this.pressed||!this.dp.isMinViewReached)return;t.preventDefault();let e=g(t.target,_),i=e&&e.adpCell,{selectedDates:s,rangeDateTo:h,rangeDateFrom:a}=this.dp;if(!i||i.isDisabled)return;let{date:r}=i;if(2===s.length){if(this.rangeFromFocused&&!m(r,h)){let{hours:t,minutes:e}=o(a);r.setHours(t),r.setMinutes(e),this.dp.rangeDateFrom=r,this.dp.replaceDate(a,r)}if(this.rangeToFocused&&!p(r,a)){let{hours:t,minutes:e}=o(h);r.setHours(t),r.setMinutes(e),this.dp.rangeDateTo=r,this.dp.replaceDate(h,r)}}})),x(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),x(this,"onChangeViewDate",((t,e)=>{if(!this.isVisible)return;let s=c(t),h=c(e);switch(this.dp.currentView){case i.days:if(u(t,e,i.months))return;break;case i.months:if(u(t,e,i.years))return;break;case i.years:if(s[0]===h[0]&&s[1]===h[1])return}this.render()})),x(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((t=>{this.$cells.appendChild(t.render())}))})),this.dp=e,this.type=s,this.opts=h,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===i.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:t,dynamicRange:e}=this.opts;y(this.$el,"mouseover",this.onMouseOverCell),y(this.$el,"mouseout",this.onMouseOutCell),y(this.$el,"click",this.onClickBody),t&&e&&(y(this.$el,"mousedown",this.onMouseDown),y(this.$el,"mousemove",this.onMouseMove),y(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(i.eventChangeViewDate,this.onChangeViewDate),this.dp.on(i.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:"air-datepicker-body -".concat(this.type,"-"),innerHtml:S[this.type]}),this.$names=h(".air-datepicker-body--day-names",this.$el),this.$cells=h(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dp.locale.firstDay,e="",s=this.dp.isWeekend,{onClickDayName:h}=this.opts,a=t,r=0;for(;r<7;){let t=a%7,n=d("air-datepicker-body--day-name",{[i.cssClassWeekend]:s(t),"-clickable-":!!h}),o=this.dp.locale.daysMin[t];e+='<div class="'.concat(n,"\" data-day-index='").concat(t,"'>").concat(o,"</div>"),r++,a++}return e}_getDaysCells(){let{viewDate:t,locale:{firstDay:e}}=this.dp,i=n(t),{year:s,month:h}=o(t),a=new Date(s,h,1),r=new Date(s,h,i),l=a.getDay()-e,c=6-r.getDay()+e;l=l<0?l+7:l,c=c>6?c-7:c;let d=function(t,e){let{year:i,month:s,date:h}=o(t);return new Date(i,s,h-e)}(a,l),u=i+l+c,m=d.getDate(),{year:p,month:f}=o(d),v=0;for(;v<u;){let t=new Date(p,f,m+v);this._generateCell(t),v++}}_generateCell(t){let{type:e,dp:i,opts:s}=this,h=new M({type:e,dp:i,opts:s,date:t,body:this});return this.cells.push(h),h}_generateDayCells(){this._getDaysCells()}_generateMonthCells(){let{year:t}=this.dp.parsedViewDate,e=0;for(;e<12;)this.cells.push(this._generateCell(new Date(t,e))),e++}_generateYearCells(){let t=c(this.dp.viewDate),e=t[1]+1,i=t[0]-1;for(;i<=e;)this.cells.push(this._generateCell(new Date(i,0))),i++}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCells(){switch(this.type){case i.days:this._generateDayCells();break;case i.months:this._generateMonthCells();break;case i.years:this._generateYearCells()}}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((t=>t.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(i.eventChangeViewDate,this.onChangeViewDate),this.dp.off(i.eventChangeCurrentView,this.onChangeCurrentView)}}function H(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class T{constructor(t){let{dp:e,opts:i}=t;H(this,"onClickNav",(t=>{let e=g(t.target,".air-datepicker-nav--action");e&&this.dp[e.dataset.action]()})),H(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),H(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),H(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),H(this,"update",(()=>{let{prevHtml:t,nextHtml:e}=this.opts;this.$prev.innerHTML=t,this.$next.innerHTML=e,this._resetNavStatus(),this.render(),this.handleNavStatus()})),H(this,"renderDelay",(()=>{setTimeout(this.render)})),H(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),function(t,e){for(let i in e)e[i]?t.classList.add(i):t.classList.remove(i)}(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=e,this.opts=i,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=h(".air-datepicker-nav--title",this.$el),this.$prev=h('[data-action="prev"]',this.$el),this.$next=h('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(i.eventChangeViewDate,this.onChangeViewDate),this.dp.on(i.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(i.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(i.eventChangeTime,this.render))}destroy(){this.dp.off(i.eventChangeViewDate,this.onChangeViewDate),this.dp.off(i.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(i.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(i.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:t,opts:e}=this,i=e.navTitles[t.currentView];return"function"==typeof i?i(t):t.formatDate(t.viewDate,i)}handleNavStatus(){let{disableNavWhenOutOfRange:t}=this.opts,{minDate:e,maxDate:s}=this.dp;if(!e&&!s||!t)return;let{year:h,month:a}=this.dp.parsedViewDate,r=!!e&&o(e),n=!!s&&o(s);switch(this.dp.currentView){case i.days:e&&r.month>=a&&r.year>=h&&this._disableNav("prev"),s&&n.month<=a&&n.year<=h&&this._disableNav("next");break;case i.months:e&&r.year>=h&&this._disableNav("prev"),s&&n.year<=h&&this._disableNav("next");break;case i.years:{let t=c(this.dp.viewDate);e&&r.year>=t[0]&&this._disableNav("prev"),s&&n.year<=t[1]&&this._disableNav("next");break}}}_disableNav(t){h('[data-action="'+t+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){!function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];t.length?t.forEach((t=>{t.classList.remove(...i)})):t.classList.remove(...i)}(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:t,nextHtml:e}=this.opts;this.$el.innerHTML='<div class="air-datepicker-nav--action" data-action="prev">'.concat(t,"</div>")+'<div class="air-datepicker-nav--title"></div>'+'<div class="air-datepicker-nav--action" data-action="next">'.concat(e,"</div>")}get isNavIsFunction(){let{navTitles:t}=this.opts;return Object.keys(t).find((e=>"function"==typeof t[e]))}}var V={today:{content:t=>t.locale.today,onClick:t=>t.setViewDate(new Date)},clear:{content:t=>t.locale.clear,onClick:t=>t.clear()}};class A{constructor(t){let{dp:e,opts:i}=t;this.dp=e,this.opts=i,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:t}=this.opts;Array.isArray(t)||(t=[t]),t.forEach((t=>{let e=t;"string"==typeof t&&V[t]&&(e=V[t]);let i=this.createButton(e);e.onClick&&this.attachEventToButton(i,e.onClick),this.$el.appendChild(i)}))}attachEventToButton(t,e){t.addEventListener("click",(()=>{e(this.dp)}))}createButton(t){let{content:e,className:i,tagName:s="button",attrs:h={}}=t,r="function"==typeof e?e(this.dp):e;return a({tagName:s,innerHtml:"<span tabindex='-1'>".concat(r,"</span>"),className:d("air-datepicker-button",i),attrs:h})}render(){this.generateButtons()}}function F(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class N{constructor(){let{opts:t,dp:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};F(this,"toggleTimepickerIsActive",(t=>{this.dp.timepickerIsActive=t})),F(this,"onChangeSelectedDate",(t=>{let{date:e,updateTime:i=!1}=t;e&&(this.setMinMaxTime(e),this.setCurrentTime(!!i&&e),this.addTimeToDate(e))})),F(this,"onChangeLastSelectedDate",(t=>{t&&(this.setTime(t),this.render())})),F(this,"onChangeInputRange",(t=>{let e=t.target;this[e.getAttribute("name")]=e.value,this.updateText(),this.dp.trigger(i.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),F(this,"onMouseEnterLeave",(t=>{let e=t.target.getAttribute("name"),i=this.$minutesText;"hours"===e&&(i=this.$hoursText),i.classList.toggle("-focus-")})),F(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),F(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=t,this.dp=e;let{timeFormat:s}=this.dp.locale;s&&(s.match(k("h"))||s.match(k("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(i.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let t="input";navigator.userAgent.match(/trident/gi)&&(t="change"),y(this.$ranges,t,this.onChangeInputRange),y(this.$ranges,"mouseenter",this.onMouseEnterLeave),y(this.$ranges,"mouseleave",this.onMouseEnterLeave),y(this.$ranges,"focus",this.onFocus),y(this.$ranges,"mousedown",this.onFocus),y(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:d("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(i.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:t,hours:e,displayHours:i,minutes:s,minHours:h,minMinutes:a,maxHours:r,maxMinutes:n,dayPeriod:o,opts:{hoursStep:c,minutesStep:d}}=this;this.$el.innerHTML='<div class="air-datepicker-time--current">'+' <span class="air-datepicker-time--current-hours">'.concat(l(i),"</span>")+' <span class="air-datepicker-time--current-colon">:</span>'+' <span class="air-datepicker-time--current-minutes">'.concat(l(s),"</span>")+" ".concat(t?"<span class='air-datepicker-time--current-ampm'>".concat(o,"</span>"):"")+'</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row">'+' <input type="range" name="hours" value="'.concat(e,'" min="').concat(h,'" max="').concat(r,'" step="').concat(c,'"/>')+' </div> <div class="air-datepicker-time--row">'+' <input type="range" name="minutes" value="'.concat(s,'" min="').concat(a,'" max="').concat(n,'" step="').concat(d,'"/>')+" </div></div>"}defineDOM(){let t=t=>h(t,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=t('[name="hours"]'),this.$minutes=t('[name="minutes"]'),this.$hoursText=t(".air-datepicker-time--current-hours"),this.$minutesText=t(".air-datepicker-time--current-minutes"),this.$ampm=t(".air-datepicker-time--current-ampm")}setTime(t){this.setMinMaxTime(t),this.setCurrentTime(t)}addTimeToDate(t){t&&(t.setHours(this.hours),t.setMinutes(this.minutes))}setMinMaxTime(t){if(this.setMinMaxTimeFromOptions(),t){let{minDate:e,maxDate:i}=this.dp;e&&u(t,e)&&this.setMinTimeFromMinDate(e),i&&u(t,i)&&this.setMaxTimeFromMaxDate(i)}}setCurrentTime(t){let{hours:e,minutes:i}=t?o(t):this;this.hours=b(e,this.minHours,this.maxHours),this.minutes=b(i,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:t,minMinutes:e,maxHours:i,maxMinutes:s}=this.opts;this.minHours=b(t,0,23),this.minMinutes=b(e,0,59),this.maxHours=b(i,0,23),this.maxMinutes=b(s,0,59)}setMinTimeFromMinDate(t){let{lastSelectedDate:e}=this.dp;this.minHours=t.getHours(),this.minMinutes=e&&e.getHours()>t.getHours()?this.opts.minMinutes:t.getMinutes()}setMaxTimeFromMaxDate(t){let{lastSelectedDate:e}=this.dp;this.maxHours=t.getHours(),this.maxMinutes=e&&e.getHours()<t.getHours()?this.opts.maxMinutes:t.getMinutes()}getDayPeriod(t,e){let i=t,s=Number(t);t instanceof Date&&(i=o(t),s=Number(i.hours));let h="am";if(e||this.ampm){switch(!0){case 12===s:case s>11:h="pm"}s=s%12==0?12:s%12}return{hours:s,dayPeriod:h}}updateSliders(){r(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,r(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=l(this.displayHours),this.$minutesText.innerHTML=l(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(t){this._hours=t;let{hours:e,dayPeriod:i}=this.getDayPeriod(t);this.displayHours=e,this.dayPeriod=i}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function E(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class j{constructor(t){let{dp:e,opts:i}=t;E(this,"pressedKeys",new Set),E(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],t=>t.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],t=>t.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],t=>t.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],t=>t.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],t=>t.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],t=>t.year-=10],[["Control","Shift","ArrowUp"],(t,e)=>e.up()]])),E(this,"handleHotKey",(t=>{let e=this.hotKeys.get(t),i=o(this.getInitialFocusDate());e(i,this.dp);let{year:s,month:h,date:a}=i,r=n(new Date(s,h));r<a&&(a=r);let l=this.dp.getClampedDate(new Date(s,h,a));this.dp.setFocusDate(l,{viewDateTransition:!0})})),E(this,"isHotKeyPressed",(()=>{let t=!1,e=this.pressedKeys.size,i=t=>this.pressedKeys.has(t);for(let[s]of this.hotKeys){if(t)break;if(Array.isArray(s[0]))s.forEach((h=>{t||e!==h.length||(t=h.every(i)&&s)}));else{if(e!==s.length)continue;t=s.every(i)&&s}}return t})),E(this,"isArrow",(t=>t>=37&&t<=40)),E(this,"onKeyDown",(t=>{let{key:e,which:i}=t,{dp:s,dp:{focusDate:h},opts:a}=this;this.registerKey(e);let r=this.isHotKeyPressed();if(r)return t.preventDefault(),void this.handleHotKey(r);if(this.isArrow(i))return t.preventDefault(),void this.focusNextCell(e);if("Enter"===e){if(s.currentView!==a.minView)return void s.down();if(h){let t=s._checkIfDateIsSelected(h);return void(t?s._handleAlreadySelectedDates(t,h):s.selectDate(h))}}"Escape"===e&&this.dp.hide()})),E(this,"onKeyUp",(t=>{this.removeKey(t.key)})),this.dp=e,this.opts=i,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:t}=this.dp;t.addEventListener("keydown",this.onKeyDown),t.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:t}=this.dp;t.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:t,currentView:e,selectedDates:s,parsedViewDate:{year:h,month:a}}=this.dp,r=t||s[s.length-1];if(!r)switch(e){case i.days:r=new Date(h,a,(new Date).getDate());break;case i.months:r=new Date(h,a,1);break;case i.years:r=new Date(h,0,1)}return r}focusNextCell(t){let e=this.getInitialFocusDate(),{currentView:s}=this.dp,{days:h,months:a,years:r}=i,n=o(e),l=n.year,c=n.month,d=n.date;switch(t){case"ArrowLeft":s===h&&(d-=1),s===a&&(c-=1),s===r&&(l-=1);break;case"ArrowUp":s===h&&(d-=7),s===a&&(c-=3),s===r&&(l-=4);break;case"ArrowRight":s===h&&(d+=1),s===a&&(c+=1),s===r&&(l+=1);break;case"ArrowDown":s===h&&(d+=7),s===a&&(c+=3),s===r&&(l+=4)}let u=this.dp.getClampedDate(new Date(l,c,d));this.dp.setFocusDate(u,{viewDateTransition:!0})}registerKey(t){this.pressedKeys.add(t)}removeKey(t){this.pressedKeys.delete(t)}}let P={on(t,e){this.__events||(this.__events={}),this.__events[t]?this.__events[t].push(e):this.__events[t]=[e]},off(t,e){this.__events&&this.__events[t]&&(this.__events[t]=this.__events[t].filter((t=>t!==e)))},removeAllEvents(){this.__events={}},trigger(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];this.__events&&this.__events[t]&&this.__events[t].forEach((t=>{t(...i)}))}};function z(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let R="",I="",U="",B=!1;class L{constructor(t,e){var r=this;if(z(this,"viewIndexes",[i.days,i.months,i.years]),z(this,"next",(()=>{let{year:t,month:e}=this.parsedViewDate;switch(this.currentView){case i.days:this.setViewDate(new Date(t,e+1,1));break;case i.months:this.setViewDate(new Date(t+1,e,1));break;case i.years:this.setViewDate(new Date(t+10,0,1))}})),z(this,"prev",(()=>{let{year:t,month:e}=this.parsedViewDate;switch(this.currentView){case i.days:this.setViewDate(new Date(t,e-1,1));break;case i.months:this.setViewDate(new Date(t-1,e,1));break;case i.years:this.setViewDate(new Date(t-10,0,1))}})),z(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),z(this,"setPosition",(function(t){if("function"==typeof(t=t||r.opts.position))return void(r.customHide=t({$datepicker:r.$datepicker,$target:r.$el,$pointer:r.$pointer,isViewChange:arguments.length>1&&void 0!==arguments[1]&&arguments[1],done:r._finishHide}));let e,i,{isMobile:s}=r.opts,h=r.$el.getBoundingClientRect(),a=r.$el.getBoundingClientRect(),n=r.$datepicker.offsetParent,o=r.$el.offsetParent,l=r.$datepicker.getBoundingClientRect(),c=t.split(" "),d=window.scrollY,u=window.scrollX,m=r.opts.offset,p=c[0],f=c[1];if(s)r.$datepicker.style.cssText="left: 50%; top: 50%";else{if(n===o&&n!==document.body&&(a={top:r.$el.offsetTop,left:r.$el.offsetLeft,width:h.width,height:r.$el.offsetHeight},d=0,u=0),n!==o&&n!==document.body){let t=n.getBoundingClientRect();a={top:h.top-t.top,left:h.left-t.left,width:h.width,height:h.height},d=0,u=0}switch(p){case"top":e=a.top-l.height-m;break;case"right":i=a.left+a.width+m;break;case"bottom":e=a.top+a.height+m;break;case"left":i=a.left-l.width-m}switch(f){case"top":e=a.top;break;case"right":i=a.left+a.width-l.width;break;case"bottom":e=a.top+a.height-l.height;break;case"left":i=a.left;break;case"center":/left|right/.test(p)?e=a.top+a.height/2-l.height/2:i=a.left+a.width/2-l.width/2}r.$datepicker.style.cssText="left: ".concat(i+u,"px; top: ").concat(e+d,"px")}})),z(this,"_setInputValue",(()=>{let{opts:t,$altField:e,locale:{dateFormat:i}}=this,{altFieldDateFormat:s,altField:h}=t;h&&e&&(e.value=this._getInputValue(s)),this.$el.value=this._getInputValue(i)})),z(this,"_getInputValue",(t=>{let{selectedDates:e,opts:i}=this,{multipleDates:s,multipleDatesSeparator:h}=i;if(!e.length)return"";let a="function"==typeof t,r=a?t(s?e:e[0]):e.map((e=>this.formatDate(e,t)));return r=a?r:r.join(h),r})),z(this,"_checkIfDateIsSelected",(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.days,s=!1;return r.selectedDates.some((i=>{let h=u(t,i,e);return s=h&&i,h})),s})),z(this,"_scheduleCallAfterTransition",(t=>{this._cancelScheduledCall(),t&&t(!1),this._onTransitionEnd=()=>{t&&t(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),z(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),z(this,"setViewDate",(t=>{if(!((t=D(t))instanceof Date))return;if(u(t,this.viewDate))return;let e=this.viewDate;this.viewDate=t;let{onChangeViewDate:s}=this.opts;if(s){let{month:t,year:e}=this.parsedViewDate;s({month:t,year:e,decade:this.curDecade})}this.trigger(i.eventChangeViewDate,t,e)})),z(this,"setFocusDate",(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(!t||(t=D(t))instanceof Date)&&(r.focusDate=t,r.opts.range&&t&&r._handleRangeOnFocus(),r.trigger(i.eventChangeFocusDate,t,e))})),z(this,"setCurrentView",(t=>{if(this.viewIndexes.includes(t)){if(this.currentView=t,this.elIsInput&&this.visible&&this.setPosition(void 0,!0),this.trigger(i.eventChangeCurrentView,t),!this.views[t]){let e=this.views[t]=new O({dp:this,opts:this.opts,type:t});this.shouldUpdateDOM&&this.$content.appendChild(e.$el)}this.opts.onChangeView&&this.opts.onChangeView(t)}})),z(this,"_updateLastSelectedDate",(t=>{this.lastSelectedDate=t,this.trigger(i.eventChangeLastSelectedDate,t)})),z(this,"destroy",(()=>{let{showEvent:t,isMobile:e}=this.opts,i=this.$datepicker.parentNode;i&&i.removeChild(this.$datepicker),this.$el.removeEventListener(t,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),e&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts=null,this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=null,this.rangeDateFrom=null,this.rangeDateTo=null})),z(this,"update",(t=>{let e=w({},this.opts);w(this.opts,t);let{timepicker:s,buttons:h,range:a,selectedDates:r,isMobile:n}=this.opts,o=this.visible||this.treatAsInline;this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this._handleLocale(),!e.selectedDates&&r&&this.selectDate(r),t.view&&this.setCurrentView(t.view),this._setInputValue(),e.range&&!a?(this.rangeDateTo=!1,this.rangeDateFrom=!1):!e.range&&a&&this.selectedDates.length&&(this.rangeDateFrom=this.selectedDates[0],this.rangeDateTo=this.selectedDates[1]),e.timepicker&&!s?(o&&this.timepicker.destroy(),this.timepicker=!1,this.$timepicker.parentNode.removeChild(this.$timepicker)):!e.timepicker&&s&&this._addTimepicker(),!e.buttons&&h?this._addButtons():e.buttons&&!h?(this.buttons.destroy(),this.$buttons.parentNode.removeChild(this.$buttons)):o&&e.buttons&&h&&this.buttons.clearHtml().render(),!e.isMobile&&n?(this.treatAsInline||U||this._createMobileOverlay(),this._addMobileAttributes(),this.visible&&this._showMobileOverlay()):e.isMobile&&!n&&(this._removeMobileAttributes(),this.visible&&(U.classList.remove("-active-"),"function"!=typeof this.opts.position&&this.setPosition())),o&&(this.nav.update(),this.views[this.currentView].render(),this.currentView===i.days&&this.views[this.currentView].renderDayNames())})),z(this,"isOtherMonth",(t=>{let{month:e}=o(t);return e!==this.parsedViewDate.month})),z(this,"isOtherYear",(t=>{let{year:e}=o(t);return e!==this.parsedViewDate.year})),z(this,"isOtherDecade",(t=>{let{year:e}=o(t),[i,s]=c(this.viewDate);return e<i||e>s})),z(this,"_onChangeSelectedDate",(t=>{let{silent:e}=t;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!e&&this._triggerOnSelect()}))})),z(this,"_onChangeFocusedDate",(function(t){let{viewDateTransition:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return;let i=!1;e&&(i=r.isOtherMonth(t)||r.isOtherYear(t)||r.isOtherDecade(t)),i&&r.setViewDate(t)})),z(this,"_onChangeTime",(t=>{let{hours:e,minutes:i}=t,s=new Date,{lastSelectedDate:h,opts:{onSelect:a}}=this,r=h;h||(r=s);let n=this.getCell(r,this.currentViewSingular),o=n&&n.adpCell;o&&o.isDisabled||(r.setHours(e),r.setMinutes(i),h?(this._setInputValue(),a&&this._triggerOnSelect()):this.selectDate(r))})),z(this,"_onFocus",(()=>{this.visible||this.show()})),z(this,"_onBlur",(()=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),z(this,"_onMouseDown",(()=>{this.inFocus=!0})),z(this,"_onMouseUp",(()=>{this.inFocus=!1,this.$el.focus()})),z(this,"_onResize",(()=>{this.visible&&"function"!=typeof this.opts.position&&this.setPosition()})),z(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),z(this,"isWeekend",(t=>this.opts.weekends.includes(t))),z(this,"getClampedDate",(t=>{let{minDate:e,maxDate:i}=this,s=t;return i&&m(t,i)?s=i:e&&p(t,e)&&(s=e),s})),this.$el=h(t),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=w({},s,e),this.$customContainer=!!this.opts.container&&h(this.opts.container),this.$altField=h(this.opts.altField||!1),R||(R=h("body"));let{view:n,startDate:l}=this.opts;l||(this.opts.startDate=new Date),"INPUT"===this.$el.nodeName&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=D(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=n,this.selectedDates=[],this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:t,treatAsInline:e,opts:{inline:i,isMobile:s,selectedDates:h,keyboardNav:r,onlyTimepicker:n}}=this;var o;B||i||!this.elIsInput||(B=!0,I=a({className:o=L.defaultContainerId,id:o}),R.appendChild(I)),!s||U||e||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(i||this._bindEvents(),r&&!n&&(this.keyboardNav=new j({dp:this,opts:t}))),h&&this.selectDate(h,{silent:!0}),this.opts.visible&&!e&&this.show(),s&&!e&&this.$el.setAttribute("readonly",!0),e&&this._createComponents()}_createMobileOverlay(){U=a({className:"air-datepicker-overlay"}),I.appendChild(U)}_createComponents(){let{opts:t,treatAsInline:e,opts:{inline:i,buttons:s,timepicker:h,position:a,classes:r,onlyTimepicker:n,isMobile:o}}=this;this._buildBaseHtml(),this.elIsInput&&(i||this._setPositionClasses(a)),!i&&this.elIsInput||this.$datepicker.classList.add("-inline-"),r&&this.$datepicker.classList.add(...r.split(" ")),n&&this.$datepicker.classList.add("-only-timepicker-"),o&&!e&&this._addMobileAttributes(),this.views[this.currentView]=new O({dp:this,type:this.currentView,opts:t}),this.nav=new T({dp:this,opts:t}),h&&this._addTimepicker(),s&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let t in this.views)this.views[t].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){U.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){U.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||""===this.initialReadonly||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:t,maxDate:e}=this.opts;this.minDate=!!t&&D(t),this.maxDate=!!e&&D(e)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new N({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new A({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(i.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(i.eventChangeFocusDate,this._onChangeFocusedDate),this.on(i.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:t}=this.opts;var e;this.elIsInput?t?(e=this.$el).parentNode.insertBefore(this.$datepicker,e.nextSibling):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=h(".air-datepicker--content",this.$datepicker),this.$pointer=h(".air-datepicker--pointer",this.$datepicker),this.$nav=h(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:t,dateFormat:e,firstDay:i,timepicker:s,onlyTimepicker:h,timeFormat:a,dateTimeSeparator:r}=this.opts;this.locale=JSON.parse(JSON.stringify(t)),e&&(this.locale.dateFormat=e),void 0!==a&&""!==a&&(this.locale.timeFormat=a);let{timeFormat:n}=this.locale;""!==i&&(this.locale.firstDay=i),s&&"function"!=typeof e&&(this.locale.dateFormat=[this.locale.dateFormat,n||""].join(n?r:"")),h&&"function"!=typeof e&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(t){if("function"==typeof t)return void this.$datepicker.classList.add("-custom-position-");let e=(t=t.split(" "))[0],i=t[1],s="air-datepicker -".concat(e,"-").concat(i,"- -from-").concat(e,"-");this.$datepicker.classList.add(...s.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:t,minDate:e,maxDate:i}=this;i&&m(t,i)&&this.setViewDate(i),e&&p(t,e)&&this.setViewDate(e)}formatDate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.viewDate,e=arguments.length>1?arguments[1]:void 0;if(t=D(t),!(t instanceof Date))return;let i=e,s=this.locale,h=o(t),a=c(t),r=L.replacer,n="am";this.opts.timepicker&&this.timepicker&&(n=this.timepicker.getDayPeriod(t).dayPeriod);let l={T:t.getTime(),m:h.minutes,mm:h.fullMinutes,h:h.hours12,hh:h.fullHours12,H:h.hours,HH:h.fullHours,aa:n,AA:n.toUpperCase(),E:s.daysShort[h.day],EEEE:s.days[h.day],d:h.date,dd:h.fullDate,M:h.month+1,MM:h.fullMonth,MMM:s.monthsShort[h.month],MMMM:s.months[h.month],yy:h.year.toString().slice(-2),yyyy:h.year,yyyy1:a[0],yyyy2:a[1]};for(let[t,e]of Object.entries(l))i=r(i,k(t),e);return i}down(t){this._handleUpDownActions(t,"down")}up(t){this._handleUpDownActions(t,"up")}selectDate(t){let e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{currentView:h,parsedViewDate:a,selectedDates:r}=this,{updateTime:n}=s,{moveToOtherMonthsOnSelect:o,moveToOtherYearsOnSelect:l,multipleDates:c,range:d,autoClose:u}=this.opts,p=r.length;if(Array.isArray(t))return t.forEach((t=>{this.selectDate(t,s)})),new Promise((t=>{setTimeout(t)}));if((t=D(t))instanceof Date){if(h===i.days&&t.getMonth()!==a.month&&o&&(e=new Date(t.getFullYear(),t.getMonth(),1)),h===i.years&&t.getFullYear()!==a.year&&l&&(e=new Date(t.getFullYear(),0,1)),e&&this.setViewDate(e),c&&!d){if(p===c)return;this._checkIfDateIsSelected(t)||r.push(t)}else if(d)switch(p){case 1:r.push(t),this.rangeDateTo||(this.rangeDateTo=t),m(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=t),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[t],this.rangeDateFrom=t,this.rangeDateTo="";break;default:this.selectedDates=[t],this.rangeDateFrom=t}else this.selectedDates=[t];return this.trigger(i.eventChangeSelectedDate,{action:i.actionSelectDate,silent:null==s?void 0:s.silent,date:t,updateTime:n}),this._updateLastSelectedDate(t),u&&!this.timepickerIsActive&&this.visible&&(c||d?d&&1===p&&this.hide():this.hide()),new Promise((t=>{setTimeout(t)}))}}unselectDate(t){let e=this.selectedDates,s=this;if((t=D(t))instanceof Date)return e.some(((h,a)=>{if(u(h,t))return e.splice(a,1),s.selectedDates.length?s._updateLastSelectedDate(s.selectedDates[s.selectedDates.length-1]):(s.rangeDateFrom="",s.rangeDateTo="",s._updateLastSelectedDate(!1)),this.trigger(i.eventChangeSelectedDate,{action:i.actionUnselectDate,date:t}),!0}))}replaceDate(t,e){let s=this.selectedDates.find((e=>u(e,t,this.currentView))),h=this.selectedDates.indexOf(s);h<0||u(this.selectedDates[h],e,this.currentView)||(this.selectedDates[h]=e,this.trigger(i.eventChangeSelectedDate,{action:i.actionSelectDate,date:e,updateTime:!0}),this._updateLastSelectedDate(e))}clear(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.trigger(i.eventChangeSelectedDate,{action:i.actionUnselectDate,silent:t.silent}),new Promise((t=>{setTimeout(t)}))}show(){let{onShow:t,isMobile:e}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,t&&this._scheduleCallAfterTransition(t),e&&this._showMobileOverlay()}hide(){let{onHide:t,isMobile:e}=this.opts,i=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((e=>{!this.customHide&&(e&&i||!e&&!i)&&this._finishHide(),t&&t(e)})),e&&U.classList.remove("-active-")}_triggerOnSelect(){let t=[],e=[],{selectedDates:i,locale:s,opts:{onSelect:h,multipleDates:a,range:r}}=this,n=a||r,o="function"==typeof s.dateFormat;i.length&&(t=i.map(f),e=o?a?s.dateFormat(t):t.map((t=>s.dateFormat(t))):t.map((t=>this.formatDate(t,s.dateFormat)))),h({date:n?t:t[0],formattedDate:n?e:e[0],datepicker:this})}_handleAlreadySelectedDates(t,e){let{range:i,toggleSelected:s}=this.opts;i?s?this.unselectDate(e):2!==this.selectedDates.length&&this.selectDate(e):s&&this.unselectDate(e),s||this._updateLastSelectedDate(t)}_handleUpDownActions(t,e){if(!((t=D(t||this.focusDate||this.viewDate))instanceof Date))return;let i="up"===e?this.viewIndex+1:this.viewIndex-1;i>2&&(i=2),i<0&&(i=0),this.setViewDate(new Date(t.getFullYear(),t.getMonth(),1)),this.setCurrentView(this.viewIndexes[i])}_handleRangeOnFocus(){1===this.selectedDates.length&&(m(this.selectedDates[0],this.focusDate)?(this.rangeDateTo=this.selectedDates[0],this.rangeDateFrom=this.focusDate):(this.rangeDateTo=this.focusDate,this.rangeDateFrom=this.selectedDates[0]))}getCell(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.day;if(!((t=D(t))instanceof Date))return;let{year:s,month:h,date:a}=o(t),r='[data-year="'.concat(s,'"]'),n='[data-month="'.concat(h,'"]'),l='[data-date="'.concat(a,'"]'),c={[i.day]:"".concat(r).concat(n).concat(l),[i.month]:"".concat(r).concat(n),[i.year]:"".concat(r)};return this.views[this.currentView].$el.querySelector(c[e])}_showMobileOverlay(){U.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((t,e)=>parseFloat(e)+t),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return o(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return c(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===i.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===i.days}get $container(){return this.$customContainer||I}static replacer(t,e,i){return t.replace(e,(function(t,e,s,h){return e+i+h}))}}return z(L,"defaults",s),z(L,"version","3.3.0"),z(L,"defaultContainerId","air-datepicker-global-container"),Object.assign(L.prototype,P),e.default}()}));const l=n(a((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"MM/dd/yyyy",timeFormat:"hh:mm aa",firstDay:0}}))),c=class{constructor(i){t(this,i),this.valueChange=e(this,"valueChange",3),this.locale=l,this.onClick=t=>{t.stopPropagation(),t.preventDefault()}}watchProps(){this.init()}componentDidLoad(){this.init()}disconnectedCallback(){var t;null===(t=this.picker)||void 0===t||t.destroy()}init(){var t;let e;null===(t=this.picker)||void 0===t||t.destroy(),e=void 0===this.value?void 0:Array.isArray(this.value)?this.value:[this.value],this.picker=new o(this.containerEl,{classes:"date-picker",inline:!0,locale:this.locale,maxDate:this.maxDate,minDate:this.minDate,minView:"days",nextHtml:"<flip-icon-chevron-right></flip-icon-chevron-right>",onSelect:({date:t})=>{this.valueChange.emit(t)},prevHtml:"<flip-icon-chevron-left></flip-icon-chevron-left>",range:this.range,selectedDates:e,startDate:this.startDate,toggleSelected:!this.range,view:"days"})}render(){return i(s,{onClick:this.onClick},i("div",{ref:t=>this.containerEl=t}))}static get watchers(){return{locale:["watchProps"],maxDate:["watchProps"],minDate:["watchProps"],range:["watchProps"],startDate:["watchProps"],value:["watchProps"]}}};c.style=':host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:var(--s-surface-overlay-default);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker{max-width:17.5rem}}.air-datepicker--pointer{display:none}.air-datepicker-nav{display:flex;margin-bottom:var(--s-space-8);align-items:center}.air-datepicker-nav--action{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;justify-content:center;align-items:center;border-radius:50%;color:var(--s-icon-highlight);cursor:pointer;order:2}.air-datepicker-nav--action:hover{background-color:var(--s-surface-overlay-hovered)}.air-datepicker-nav--title{padding:var(--s-space-8);flex-grow:1;border-radius:var(--s-border-radius-s);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer;order:0}.air-datepicker-nav--title i{font-style:normal}.air-datepicker-body--day-names{display:flex;margin-bottom:var(--s-space-8);justify-content:space-between;align-items:center}.air-datepicker-body--day-name{display:inline-flex;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);aspect-ratio:1}.air-datepicker-body--cells{position:relative;z-index:1;display:flex;flex-wrap:wrap;justify-content:space-between}.air-datepicker-body--cells.-months-{gap:var(--s-space-2)}.air-datepicker-cell{position:relative;display:inline-flex;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer;aspect-ratio:1}.air-datepicker-cell:not(.-month-):not(.-year-):not(.-in-range-):hover:before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-overlay-hovered);content:"";inset:0}.air-datepicker-cell.-month-,.air-datepicker-cell.-year-{height:2.5rem;flex-basis:calc(100 / 3 * 1% - var(--s-space-2) * 2);border-radius:var(--s-border-radius-s);aspect-ratio:auto}.air-datepicker-cell.-month-.-in-range-:before,.air-datepicker-cell.-year-.-in-range-:before{border-radius:var(--s-border-radius-s)}.air-datepicker-cell.-month-:hover:not(.-in-range-):not(.-selected-),.air-datepicker-cell.-year-:hover:not(.-in-range-):not(.-selected-){background-color:var(--s-surface-overlay-hovered)}.air-datepicker-cell.-other-month-{color:var(--s-text-subdued)}.air-datepicker-cell.-current-:not(.-month-):not(.-year-):after{position:absolute;z-index:-1;border:var(--s-border-width-default) solid var(--s-border-highlight);border-radius:50%;content:"";inset:0}.air-datepicker-cell.-selected-{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-selected-.-year-,.air-datepicker-cell.-selected-.-month-{background-color:var(--s-surface-highlight-default)}.air-datepicker-cell.-selected-:not(.-month-):not(.-year-):not(.-in-range-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-disabled-{color:var(--s-text-subdued);cursor:default}.air-datepicker-cell.-disabled-:hover{background-color:transparent}.air-datepicker-cell.-in-range-:before{position:absolute;z-index:-1;top:0.0625rem;right:0;bottom:0.0625rem;left:0;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):hover{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-range-from-:not(.-month-):not(.-year-):not(.-range-to-):after{position:absolute;z-index:-1;top:0.0625rem;right:0;bottom:0.0625rem;left:50%;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):hover{color:var(--s-text-on-surface-highlight)}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):before{position:absolute;z-index:-1;border-radius:50%;background-color:var(--s-surface-highlight-default);content:"";inset:0}.air-datepicker-cell.-range-to-:not(.-month-):not(.-year-):not(.-range-from-):after{position:absolute;z-index:-1;top:0.0625rem;right:50%;bottom:0.0625rem;left:0;border-radius:0;background-color:var(--s-surface-highlight-default);content:"";opacity:0.2}.-hidden-{display:none}';const d=class{constructor(e){t(this,e),this.size=24}render(){return i("svg",{class:"flip-icon",fill:"none",height:this.size,part:"icon",viewBox:`0 0 ${this.size} ${this.size}`,width:this.size,xmlns:"http://www.w3.org/2000/svg"},16===this.size&&i(h,null,i("path",{d:"M6 11C5.53333 11 5.13889 10.8389 4.81667 10.5167C4.49444 10.1945 4.33333 9.80004 4.33333 9.33337C4.33333 8.86671 4.49444 8.47226 4.81667 8.15004C5.13889 7.82782 5.53333 7.66671 6 7.66671C6.46667 7.66671 6.86111 7.82782 7.18333 8.15004C7.50556 8.47226 7.66667 8.86671 7.66667 9.33337C7.66667 9.80004 7.50556 10.1945 7.18333 10.5167C6.86111 10.8389 6.46667 11 6 11ZM3.33333 14.6667C2.96667 14.6667 2.65267 14.5363 2.39133 14.2754C2.13044 14.014 2 13.7 2 13.3334V4.00004C2 3.63337 2.13044 3.3196 2.39133 3.05871C2.65267 2.79737 2.96667 2.66671 3.33333 2.66671H4V2.00004C4 1.81115 4.06378 1.65271 4.19133 1.52471C4.31933 1.39715 4.47778 1.33337 4.66667 1.33337C4.85556 1.33337 5.014 1.39715 5.142 1.52471C5.26956 1.65271 5.33333 1.81115 5.33333 2.00004V2.66671H10.6667V2.00004C10.6667 1.81115 10.7307 1.65271 10.8587 1.52471C10.9862 1.39715 11.1444 1.33337 11.3333 1.33337C11.5222 1.33337 11.6804 1.39715 11.808 1.52471C11.936 1.65271 12 1.81115 12 2.00004V2.66671H12.6667C13.0333 2.66671 13.3473 2.79737 13.6087 3.05871C13.8696 3.3196 14 3.63337 14 4.00004V13.3334C14 13.7 13.8696 14.014 13.6087 14.2754C13.3473 14.5363 13.0333 14.6667 12.6667 14.6667H3.33333ZM3.33333 13.3334H12.6667V6.66671H3.33333V13.3334Z",fill:"currentColor"})),24===this.size&&i(h,null,i("path",{d:"M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20Z",fill:"currentColor"})),28===this.size&&i(h,null,i("path",{d:"M10.5 19.25C9.68333 19.25 8.99306 18.9681 8.42917 18.4042C7.86528 17.8403 7.58333 17.15 7.58333 16.3334C7.58333 15.5167 7.86528 14.8264 8.42917 14.2625C8.99306 13.6987 9.68333 13.4167 10.5 13.4167C11.3167 13.4167 12.0069 13.6987 12.5708 14.2625C13.1347 14.8264 13.4167 15.5167 13.4167 16.3334C13.4167 17.15 13.1347 17.8403 12.5708 18.4042C12.0069 18.9681 11.3167 19.25 10.5 19.25ZM5.83333 25.6667C5.19167 25.6667 4.64217 25.4384 4.18483 24.9819C3.72828 24.5245 3.5 23.975 3.5 23.3334V7.00004C3.5 6.35837 3.72828 5.80926 4.18483 5.35271C4.64217 4.89537 5.19167 4.66671 5.83333 4.66671H7V3.50004C7 3.16949 7.11161 2.89221 7.33483 2.66821C7.55883 2.44499 7.83611 2.33337 8.16667 2.33337C8.49722 2.33337 8.7745 2.44499 8.9985 2.66821C9.22172 2.89221 9.33333 3.16949 9.33333 3.50004V4.66671H18.6667V3.50004C18.6667 3.16949 18.7787 2.89221 19.0027 2.66821C19.2259 2.44499 19.5028 2.33337 19.8333 2.33337C20.1639 2.33337 20.4408 2.44499 20.664 2.66821C20.888 2.89221 21 3.16949 21 3.50004V4.66671H22.1667C22.8083 4.66671 23.3578 4.89537 23.8152 5.35271C24.2717 5.80926 24.5 6.35837 24.5 7.00004V23.3334C24.5 23.975 24.2717 24.5245 23.8152 24.9819C23.3578 25.4384 22.8083 25.6667 22.1667 25.6667H5.83333ZM5.83333 23.3334H22.1667V11.6667H5.83333V23.3334Z",fill:"currentColor"})))}};d.style=":host{display:inline-flex}";export{c as flip_date_picker,d as flip_icon_today}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as r,H as t,g as s}from"./p-9fe00e8a.js";import{c as l}from"./p-efffd297.js";import"./p-86bd3473.js";const i=class{constructor(r){o(this,r),this.descriptionId=`form-control-description-${Math.round(1e5*Math.random())}`,this.listenToInputValueChanges=()=>{this.inputEl.addEventListener("valueChange",this.checkInputValue)},this.checkInputValue=()=>{var o;this.inputValue=null===(o=this.inputEl)||void 0===o?void 0:o.value},this.onFocusIn=()=>{this.hasFocus=!0},this.onFocusOut=()=>{this.hasFocus&&(this.hasFocus=!1)}}componentWillLoad(){this.inputEl=this.el.children[0],this.associateDescriptionWithInputElement(),this.setInputElementDisabledState(),this.setInputElementInvalidState(),this.setInputElementLabel(),this.checkInputValue(),this.listenToInputValueChanges()}associateDescriptionWithInputElement(){Boolean(this.description)&&Boolean(this.inputEl)&&this.inputEl.setAttribute("flip-aria-describedby",this.descriptionId)}setInputElementDisabledState(){Boolean(this.inputEl)&&(this.disabled?this.inputEl.setAttribute("disabled","true"):this.inputEl.removeAttribute("disabled"))}setInputElementInvalidState(){Boolean(this.inputEl)&&(this.invalid?this.inputEl.setAttribute("invalid","true"):this.inputEl.removeAttribute("invalid"))}setInputElementLabel(){Boolean(this.inputEl)&&this.inputEl.setAttribute("label",this.label)}onWindowClick(o){this.hasFocus&&(this.el.contains(o.target)||(this.hasFocus=!1))}render(){const o=Boolean(this.errorMessage),s=Boolean(this.description)&&!o,i=Array.isArray(this.inputValue)?this.inputValue.length>0:Boolean(this.inputValue),e=l("form-control",{"form-control--disabled":this.disabled,"form-control--has-focus":this.hasFocus,"form-control--has-value":i,"form-control--invalid":this.invalid,"form-control--is-select":"FLIP-SELECT"===this.inputEl.tagName});return r(t,{onFocusin:this.onFocusIn,onFocusout:this.onFocusOut},r("div",{class:e,role:"group"},r("label",{class:"form-control__label"},r("span",{class:"form-control__label-text"},this.label),r("span",{class:"form-control__input"},r("slot",null))),s&&r("span",{class:"form-control__description",id:this.descriptionId},this.description),o&&r("span",{"aria-live":"polite",class:"form-control__error-message",id:this.descriptionId},r("flip-inline-error",{message:this.errorMessage,size:"s"}))))}get el(){return s(this)}static get watchers(){return{description:["associateDescriptionWithInputElement"],disabled:["setInputElementDisabledState"],invalid:["setInputElementInvalidState"],label:["setInputElementLabel"]}}};i.style=".sc-flip-form-control-h{display:block;width:100%}.sc-flip-form-control-h *.sc-flip-form-control{box-sizing:border-box}.form-control.sc-flip-form-control{display:block;width:100%;line-height:var(--s-line-height-sm)}.form-control.form-control--has-focus.sc-flip-form-control:not(.form-control--disabled) .form-control__label.sc-flip-form-control{border-color:var(--s-border-highlight);box-shadow:0 0 0 var(--s-border-width-default) var(--s-border-highlight)}.form-control.sc-flip-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select) .form-control__input.sc-flip-form-control{overflow:hidden;max-height:0}.form-control.sc-flip-form-control:not(.form-control--has-value):not(.form-control--has-focus):not(.form-control--is-select) .form-control__label-text.sc-flip-form-control{bottom:50%;font-size:var(--s-font-size-base);transform:translateY(50%)}.form-control.sc-flip-form-control:not(.form-control--has-value).form-control--is-select .select__label.sc-flip-form-control{overflow:hidden;max-height:0;pointer-events:none}.form-control.sc-flip-form-control:not(.form-control--has-value).form-control--is-select .form-control__label-text.sc-flip-form-control{bottom:50%;font-size:var(--s-font-size-base);transform:translateY(50%)}.form-control--invalid.form-control--has-focus.sc-flip-form-control:not(.form-control--disabled) .form-control__label.sc-flip-form-control{border-color:var(--s-border-critical);box-shadow:0 0 0 var(--s-border-width-default) var(--s-border-critical)}.form-control--invalid.sc-flip-form-control .form-control__label.sc-flip-form-control{border-color:var(--s-border-critical)}.form-control--disabled.sc-flip-form-control .form-control__label.sc-flip-form-control{border-color:var(--s-border-disabled);color:var(--s-text-disabled)}.form-control--disabled.sc-flip-form-control .form-control__description.sc-flip-form-control{color:var(--s-text-disabled)}.form-control__label.sc-flip-form-control{position:relative;display:flex;width:100%;min-height:4.375rem;padding:calc(var(--s-space-12) + 1.25rem) var(--s-space-16) var(--s-space-12);justify-content:center;border:var(--s-border-width-default) solid var(--s-border-strong);border-radius:var(--s-border-radius-sm);color:var(--s-text-subdued);flex-direction:column;gap:var(--s-space-2)}.form-control__label-text.sc-flip-form-control{position:absolute;right:var(--s-space-16);bottom:calc(100% - 1.25rem - var(--s-space-12));left:var(--s-space-16);overflow:hidden;font-size:var(--s-font-size-sm);white-space:nowrap;text-overflow:ellipsis;transition:font-size 0.15s, transform 0.15s, top 0.15s;transform:none}.form-control__description.sc-flip-form-control{display:block;margin-top:var(--s-space-4);padding-left:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-sm)}.form-control__error-message.sc-flip-form-control{display:block;margin-top:var(--s-space-4);padding-left:var(--s-space-4)}";export{i as flip_form_control}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e}from"./p-9fe00e8a.js";import{c as n}from"./p-efffd297.js";import"./p-86bd3473.js";const p=class{constructor(s){t(this,s),this.inputBlur=i(this,"inputBlur",7),this.inputFocus=i(this,"inputFocus",7),this.valueChange=i(this,"valueChange",7),this.autoComplete="on",this.clearButtonLabel="Clear input",this.rows=1,this.passwordToggleLabel="Toggle password display",this.type="text",this.showPassword=!1,this.clear=()=>{this.inputEl.value="",this.value="",this.valueChange.emit(""),this.inputEl.focus()},this.onChange=t=>{const i=t.target;this.value=i.value,this.valueChange.emit(i.value)},this.onBlur=t=>{this.inputBlur.emit(t)},this.onFocus=t=>{this.inputFocus.emit(t),this.handleAutoSelect(t)},this.onInput=t=>{this.onChange(t)},this.onKeyPress=t=>{"number"===this.type&&["+","-","e"].includes(t.key)&&t.preventDefault()},this.decreaseValue=()=>{if("number"!==this.type)return;const t=this.step||1;let i=this.inputEl.valueAsNumber;isNaN(this.inputEl.valueAsNumber)&&(i=void 0!==this.min?this.min+1:1),this.value=String(Math.max(this.min||-1/0,i-t)),this.valueChange.emit(this.value)},this.increaseValue=()=>{if("number"!==this.type)return;const t=this.step||1;let i=this.inputEl.valueAsNumber;isNaN(this.inputEl.valueAsNumber)&&(i=void 0!==this.min?this.min-1:-1),this.value=String(Math.min(this.max||1/0,i+t)),this.valueChange.emit(this.value)},this.togglePassword=()=>{"password"===this.type&&(this.showPassword=!this.showPassword)}}componentDidRender(){this.adjustInputSize()}adjustInputSize(){this.rows>1&&(this.inputEl.style.width="",this.inputEl.style.height="",this.inputEl.style.height=this.inputEl.scrollHeight/16+"rem"),1===this.rows&&(this.inputEl.style.height="",this.inputEl.style.width="","password"===this.type||this.disableDynamicWidth||(this.inputEl.style.width=this.inputEl.scrollWidth/16+"rem"))}handleAutoSelect(t){this.autoSelect&&t.target.select()}render(){var t;const i=1===this.rows?"input":"textarea",p=!0===this.invalid||!1===this.invalid?String(this.invalid):void 0,o="number"===this.type&&!this.disabled,a="password"===this.type&&!this.disabled,h=this.clearable&&!this.disabled&&Boolean(this.value)&&!a&&!o&&!this.showCharacterCounter,r="password"===this.type&&this.showPassword?"text":this.type,u=n("text-input",`text-input--type-${this.type}`,{"text-input--clearable":this.clearable,"text-input--disabled":this.disabled,"text-input--disable-dynamic-width":this.disableDynamicWidth,"text-input--show-password":"password"===this.type&&this.showPassword});return s(e,null,s("div",{class:u},this.prefixLabel&&s("span",{class:"text-input__prefix"},this.prefixLabel),s(i,{"aria-autocomplete":this.flipAriaAutocomplete,"aria-controls":this.flipAriaControls,"aria-describedby":this.flipAriaDescribedby,"aria-disabled":this.disabled?"true":void 0,"aria-expanded":this.flipAriaExpanded,"aria-invalid":p,autoComplete:this.autoComplete,autoFocus:this.autoFocus,class:"text-input__input",disabled:this.disabled,inputMode:this.mode,maxLength:this.maxLength,max:"number"===this.type?this.max:void 0,min:"number"===this.type?this.min:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,onKeyPress:this.onKeyPress,ref:t=>this.inputEl=t,required:this.required,role:this.flipRole,rows:this.rows>1?this.rows:void 0,spellcheck:this.spellCheck,step:"number"===this.type?this.step:void 0,type:r,value:1===this.rows?this.value:void 0},this.rows>1&&this.value),this.suffixLabel&&s("span",{class:"text-input__suffix"},this.suffixLabel),h&&s("button",{"aria-label":this.clearButtonLabel,class:"text-input__clear-button",onClick:this.clear,type:"button"},s("flip-icon-cancel",null)),a&&s("button",{"aria-label":this.passwordToggleLabel,class:"text-input__password-toggle",onClick:this.togglePassword,type:"button"},s(this.showPassword?"flip-icon-visibility-off":"flip-icon-visibility",null)),o&&s("span",{class:"text-input__stepper"},s("button",{"aria-hidden":"true",class:"text-input__step-button",onClick:this.increaseValue,tabIndex:-1,type:"button"},s("flip-icon-expand-less",null)),s("button",{"aria-hidden":"true",class:"text-input__step-button",onClick:this.decreaseValue,tabIndex:-1,type:"button"},s("flip-icon-expand-more",null))),this.showCharacterCounter&&s("span",{class:"text-input__character-counter"},(null===(t=this.value)||void 0===t?void 0:t.length)||0," ",Boolean(this.maxLength)?`/ ${this.maxLength}`:"")))}};p.style='.sc-flip-text-input-h{display:block;width:100%}.sc-flip-text-input-h *.sc-flip-text-input{box-sizing:border-box}.text-input.sc-flip-text-input{position:relative;display:flex;width:100%;align-items:center;color:var(--s-text-default);font:inherit;line-height:var(--s-line-height-sm)}.text-input--clearable.sc-flip-text-input,.text-input--type-number.sc-flip-text-input,.text-input--type-password.sc-flip-text-input{padding-right:calc(1.5rem + var(--s-space-8))}.text-input--show-password.sc-flip-text-input .text-input__input.sc-flip-text-input{width:100%}.text-input--disabled.sc-flip-text-input .text-input__character-counter.sc-flip-text-input{color:var(--s-text-disabled)}.text-input__input.sc-flip-text-input{display:inline-flex;width:100%;max-height:13.75rem;margin:0;padding:0;border:none;color:var(--s-text-default);background-color:transparent;font:inherit;font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);resize:none;caret-color:var(--s-border-highlight)}.text-input__input.sc-flip-text-input:focus{outline:none}.text-input__input.sc-flip-text-input:disabled{color:var(--s-text-disabled);background-color:transparent}.text-input__input.sc-flip-text-input::-webkit-outer-spin-button,.text-input__input.sc-flip-text-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.text-input__input[type="number"].sc-flip-text-input{-moz-appearance:textfield}input.text-input__input.sc-flip-text-input:not([type="password"]){width:0.25rem;min-width:0.25rem}.text-input--disable-dynamic-width.sc-flip-text-input input.text-input__input.sc-flip-text-input:not([type="password"]){width:100%;min-width:0}.text-input__clear-button.sc-flip-text-input,.text-input__password-toggle.sc-flip-text-input{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.text-input__clear-button.sc-flip-text-input:focus,.text-input__password-toggle.sc-flip-text-input:focus{outline-color:var(--s-focus-default)}.text-input__stepper.sc-flip-text-input{position:absolute;top:-1.4375rem;right:0;display:flex;flex-direction:column}.text-input__step-button.sc-flip-text-input{display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.text-input__step-button.sc-flip-text-input:focus{outline-color:var(--s-focus-default)}.text-input__character-counter.sc-flip-text-input{position:absolute;top:-1.375rem;right:0;display:flex;color:var(--s-text-subdued);line-height:var(--s-line-height-sm);flex-direction:column}.text-input__prefix.sc-flip-text-input{padding-right:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}.text-input__suffix.sc-flip-text-input{padding-left:var(--s-space-4);color:var(--s-text-subdued);font-size:var(--s-font-size-base)}';export{p as flip_text_input}
|
|
@@ -4,4 +4,4 @@ import{r as t,c as n,h as e,H as r}from"./p-9fe00e8a.js";import{c as o,a as i}fr
|
|
|
4
4
|
* (c) 2019-2021 Alexander Shabunevich
|
|
5
5
|
* Released under the MIT License.
|
|
6
6
|
*/
|
|
7
|
-
!function(t){var n={"#":{pattern:/[0-9]/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,uppercase:!0},a:{pattern:/[a-zA-Z]/,lowercase:!0},"!":{escape:!0},"*":{repeat:!0}};function e(t,e,i=n,u=!0){return r(e).length>1?function(t){const n=r(t).sort(((t,n)=>t.length-n.length));return function(t,r,i,u=!0){const a=n.map((n=>o(t,n,i,!1))).pop();for(const r in n)if(e(a,n[r],i))return o(t,n[r],i,u);return""};function e(t,n,e){for(const t in e)e[t].escape&&(n=n.replace(new RegExp(t+".{1}","g"),""));return n.split("").filter((t=>e[t]&&e[t].pattern)).length>=t.length}}(e)(t,e,i,u):o(t,e,i,u)}function r(t){try{return JSON.parse(t)}catch{return[t]}}function o(t,n,e,r=!0){let o=0,u=0,a="",c="";for(;o<n.length&&u<t.length;){let c=n[o];const f=t[u],l=e[c];if(l&&l.pattern)l.pattern.test(f)&&(a+=i(f,l),o++,r&&n[o]&&(e[n[o]]?e[n[o]]&&e[n[o]].escape&&(a+=n[o+1],o+=2):(a+=n[o],o++))),u++;else if(l&&l.repeat){const t=e[n[o-1]];t&&!t.pattern.test(f)?o++:o--}else l&&l.escape&&(o++,c=n[o]),r&&(a+=c),f===c&&u++,o++}for(;r&&o<n.length;){const t=n[o];if(e[t]){c="";break}c+=t,o++}return a+c}function i(t,n){return n.transform&&(t=n.transform(t)),n.uppercase?t.toLocaleUpperCase():n.lowercase?t.toLocaleLowerCase():t}function u(t){return t instanceof HTMLInputElement?t:t.querySelector("input")||t}function a(t){return"[object String]"===Object.prototype.toString.call(t)}class c{constructor(t,e={}){if(!t)throw new Error("Maska: no element for mask");if(null!=e.preprocessor&&"function"!=typeof e.preprocessor)throw new Error("Maska: preprocessor must be a function");if(e.tokens)for(const t in e.tokens)e.tokens[t]={...e.tokens[t]},e.tokens[t].pattern&&a(e.tokens[t].pattern)&&(e.tokens[t].pattern=new RegExp(e.tokens[t].pattern));this._opts={mask:e.mask,tokens:{...n,...e.tokens},preprocessor:e.preprocessor},this._el=a(t)?document.querySelectorAll(t):t.length?t:[t],this.inputEvent=t=>this.updateValue(t.target,t),this.init()}init(){for(let t=0;t<this._el.length;t++){const n=u(this._el[t]);!this._opts.mask||n.dataset.mask&&n.dataset.mask===this._opts.mask||(n.dataset.mask=this._opts.mask),setTimeout((()=>this.updateValue(n)),0),n.dataset.maskInited||(n.dataset.maskInited=!0,n.addEventListener("input",this.inputEvent),n.addEventListener("beforeinput",this.beforeInput))}}destroy(){for(let t=0;t<this._el.length;t++){const n=u(this._el[t]);n.removeEventListener("input",this.inputEvent),n.removeEventListener("beforeinput",this.beforeInput),delete n.dataset.mask,delete n.dataset.maskInited}}updateValue(t,n){if(!t||!t.type)return;const r=t.type.match(/^number$/i)&&t.validity.badInput;if(!t.value&&!r||!t.dataset.mask)return t.dataset.maskRawValue="",void this.dispatch("maska",t,n);let o=t.selectionEnd;const i=t.value,u=i[o-1];t.dataset.maskRawValue=e(t.value,t.dataset.mask,this._opts.tokens,!1);let a=t.value;this._opts.preprocessor&&(a=this._opts.preprocessor(a)),t.value=e(a,t.dataset.mask,this._opts.tokens),n&&"insertText"===n.inputType&&o===i.length&&(o=t.value.length),function(t,n,e){for(;n&&n<t.value.length&&t.value.charAt(n-1)!==e;)n++;(t.type?t.type.match(/^(text|search|password|tel|url)$/i):!t.type)&&t===document.activeElement&&(t.setSelectionRange(n,n),setTimeout((function(){t.setSelectionRange(n,n)}),0))}(t,o,u),this.dispatch("maska",t,n),t.value!==i&&this.dispatch("input",t,n)}beforeInput(t){t&&t.target&&t.target.type&&t.target.type.match(/^number$/i)&&t.data&&isNaN(t.target.value+t.data)&&t.preventDefault()}dispatch(t,n,e){n.dispatchEvent(function(t,n=null){const e=document.createEvent("Event");return e.initEvent(t,!0,!0),n&&(e.inputType=n),e}(t,e&&e.inputType||null))}}var f=(()=>{const t=new WeakMap;return(n,e)=>{e.value&&(t.has(n)&&!function(t){return!(a(t.value)&&t.value===t.oldValue||Array.isArray(t.value)&&JSON.stringify(t.value)===JSON.stringify(t.oldValue)||t.value&&t.value.mask&&t.oldValue&&t.oldValue.mask&&t.value.mask===t.oldValue.mask)}(e)||t.set(n,new c(n,function(t){const n={};return t.mask?(n.mask=Array.isArray(t.mask)?JSON.stringify(t.mask):t.mask,n.tokens=t.tokens?{...t.tokens}:{},n.preprocessor=t.preprocessor):n.mask=Array.isArray(t)?JSON.stringify(t):t,n}(e.value))))}})();function l(t){t.directive("maska",f)}"undefined"!=typeof window&&window.Vue&&window.Vue.use&&window.Vue.use(l),t.create=function(t,n){return new c(t,n)},t.default=l,t.install=l,t.mask=e,t.maska=f,t.tokens=n,Object.defineProperty(t,"__esModule",{value:!0})}(n)}));const Ru=class{constructor(e){t(this,e),this.valueChange=n(this,"valueChange",7),this.datePickerLabel="Date picker",this.format="yyyy-MM-dd",this.placeholder="yyyy-mm-dd",this.onChange=t=>{const n=t.target.value,e=Su(n,this.format,new Date),r=new RegExp(`^${this.format.replace(/
|
|
7
|
+
!function(t){var n={"#":{pattern:/[0-9]/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,uppercase:!0},a:{pattern:/[a-zA-Z]/,lowercase:!0},"!":{escape:!0},"*":{repeat:!0}};function e(t,e,i=n,u=!0){return r(e).length>1?function(t){const n=r(t).sort(((t,n)=>t.length-n.length));return function(t,r,i,u=!0){const a=n.map((n=>o(t,n,i,!1))).pop();for(const r in n)if(e(a,n[r],i))return o(t,n[r],i,u);return""};function e(t,n,e){for(const t in e)e[t].escape&&(n=n.replace(new RegExp(t+".{1}","g"),""));return n.split("").filter((t=>e[t]&&e[t].pattern)).length>=t.length}}(e)(t,e,i,u):o(t,e,i,u)}function r(t){try{return JSON.parse(t)}catch{return[t]}}function o(t,n,e,r=!0){let o=0,u=0,a="",c="";for(;o<n.length&&u<t.length;){let c=n[o];const f=t[u],l=e[c];if(l&&l.pattern)l.pattern.test(f)&&(a+=i(f,l),o++,r&&n[o]&&(e[n[o]]?e[n[o]]&&e[n[o]].escape&&(a+=n[o+1],o+=2):(a+=n[o],o++))),u++;else if(l&&l.repeat){const t=e[n[o-1]];t&&!t.pattern.test(f)?o++:o--}else l&&l.escape&&(o++,c=n[o]),r&&(a+=c),f===c&&u++,o++}for(;r&&o<n.length;){const t=n[o];if(e[t]){c="";break}c+=t,o++}return a+c}function i(t,n){return n.transform&&(t=n.transform(t)),n.uppercase?t.toLocaleUpperCase():n.lowercase?t.toLocaleLowerCase():t}function u(t){return t instanceof HTMLInputElement?t:t.querySelector("input")||t}function a(t){return"[object String]"===Object.prototype.toString.call(t)}class c{constructor(t,e={}){if(!t)throw new Error("Maska: no element for mask");if(null!=e.preprocessor&&"function"!=typeof e.preprocessor)throw new Error("Maska: preprocessor must be a function");if(e.tokens)for(const t in e.tokens)e.tokens[t]={...e.tokens[t]},e.tokens[t].pattern&&a(e.tokens[t].pattern)&&(e.tokens[t].pattern=new RegExp(e.tokens[t].pattern));this._opts={mask:e.mask,tokens:{...n,...e.tokens},preprocessor:e.preprocessor},this._el=a(t)?document.querySelectorAll(t):t.length?t:[t],this.inputEvent=t=>this.updateValue(t.target,t),this.init()}init(){for(let t=0;t<this._el.length;t++){const n=u(this._el[t]);!this._opts.mask||n.dataset.mask&&n.dataset.mask===this._opts.mask||(n.dataset.mask=this._opts.mask),setTimeout((()=>this.updateValue(n)),0),n.dataset.maskInited||(n.dataset.maskInited=!0,n.addEventListener("input",this.inputEvent),n.addEventListener("beforeinput",this.beforeInput))}}destroy(){for(let t=0;t<this._el.length;t++){const n=u(this._el[t]);n.removeEventListener("input",this.inputEvent),n.removeEventListener("beforeinput",this.beforeInput),delete n.dataset.mask,delete n.dataset.maskInited}}updateValue(t,n){if(!t||!t.type)return;const r=t.type.match(/^number$/i)&&t.validity.badInput;if(!t.value&&!r||!t.dataset.mask)return t.dataset.maskRawValue="",void this.dispatch("maska",t,n);let o=t.selectionEnd;const i=t.value,u=i[o-1];t.dataset.maskRawValue=e(t.value,t.dataset.mask,this._opts.tokens,!1);let a=t.value;this._opts.preprocessor&&(a=this._opts.preprocessor(a)),t.value=e(a,t.dataset.mask,this._opts.tokens),n&&"insertText"===n.inputType&&o===i.length&&(o=t.value.length),function(t,n,e){for(;n&&n<t.value.length&&t.value.charAt(n-1)!==e;)n++;(t.type?t.type.match(/^(text|search|password|tel|url)$/i):!t.type)&&t===document.activeElement&&(t.setSelectionRange(n,n),setTimeout((function(){t.setSelectionRange(n,n)}),0))}(t,o,u),this.dispatch("maska",t,n),t.value!==i&&this.dispatch("input",t,n)}beforeInput(t){t&&t.target&&t.target.type&&t.target.type.match(/^number$/i)&&t.data&&isNaN(t.target.value+t.data)&&t.preventDefault()}dispatch(t,n,e){n.dispatchEvent(function(t,n=null){const e=document.createEvent("Event");return e.initEvent(t,!0,!0),n&&(e.inputType=n),e}(t,e&&e.inputType||null))}}var f=(()=>{const t=new WeakMap;return(n,e)=>{e.value&&(t.has(n)&&!function(t){return!(a(t.value)&&t.value===t.oldValue||Array.isArray(t.value)&&JSON.stringify(t.value)===JSON.stringify(t.oldValue)||t.value&&t.value.mask&&t.oldValue&&t.oldValue.mask&&t.value.mask===t.oldValue.mask)}(e)||t.set(n,new c(n,function(t){const n={};return t.mask?(n.mask=Array.isArray(t.mask)?JSON.stringify(t.mask):t.mask,n.tokens=t.tokens?{...t.tokens}:{},n.preprocessor=t.preprocessor):n.mask=Array.isArray(t)?JSON.stringify(t):t,n}(e.value))))}})();function l(t){t.directive("maska",f)}"undefined"!=typeof window&&window.Vue&&window.Vue.use&&window.Vue.use(l),t.create=function(t,n){return new c(t,n)},t.default=l,t.install=l,t.mask=e,t.maska=f,t.tokens=n,Object.defineProperty(t,"__esModule",{value:!0})}(n)}));const Ru=class{constructor(e){t(this,e),this.valueChange=n(this,"valueChange",7),this.datePickerLabel="Date picker",this.format="yyyy-MM-dd",this.placeholder="yyyy-mm-dd",this.onChange=t=>{const n=t.target.value;""===n&&(this.value=void 0,this.valueChange.emit(void 0));const e=Su(n,this.format,new Date),r=new RegExp(`^${this.format.replace(/[ydM]/g,"\\d")}$`);if(!Boolean(n.match(r))||!v(e))return;const o=tt(e,"yyyy-MM-dd");this.value=o,this.valueChange.emit(o)},this.onInput=t=>{this.onChange(t)},this.onClick=t=>{t.preventDefault()},this.onFocus=t=>{this.handleAutoSelect(t)},this.onPickDate=t=>{const n=tt(t.detail,"yyyy-MM-dd");this.value=n,this.valueChange.emit(n),this.pickerPopover.close()}}componentWillLoad(){const t=document.querySelectorAll("flip-date-input").length;this.id=`flip-date-input-${t}`}componentDidLoad(){this.setupMask()}disconnectedCallback(){var t;null===(t=this.mask)||void 0===t||t.destroy()}watchFormat(){this.setupMask()}handleAutoSelect(t){this.autoSelect&&t.target.select()}setupMask(){var t;null===(t=this.mask)||void 0===t||t.destroy(),this.mask=xu.create(`#${this.id}`,{mask:this.format.replace(/[ydM]/g,"#")})}render(){const t=!0===this.invalid||!1===this.invalid?String(this.invalid):void 0,n=Boolean(this.value)?Su(this.value,"yyyy-MM-dd",new Date):void 0,o=v(n)?tt(n,this.format):void 0;return e(r,null,e("div",{class:"date-input"},e("input",{"aria-describedby":this.flipAriaDescribedby,"aria-disabled":this.disabled?"true":void 0,"aria-invalid":t,autoFocus:this.autoFocus,class:"date-input__input",disabled:this.disabled,id:this.id,onClick:this.onClick,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,required:this.required,type:"text",value:o}),e("button",{"aria-hidden":"true",class:"date-input__date-picker-button",disabled:this.disabled,id:`${this.id}-trigger`,tabIndex:-1,type:"button"},e("flip-icon-today",null))),!this.disabled&&e("flip-popover",{label:this.datePickerLabel,placement:"bottom-end",popoverId:"popover",ref:t=>this.pickerPopover=t,trigger:`${this.id}-trigger`},e("flip-date-picker",{locale:this.locale,onValueChange:this.onPickDate,value:n})))}static get watchers(){return{format:["watchFormat"]}}};Ru.style=".sc-flip-date-input-h{display:flex;width:100%}.sc-flip-date-input-h *.sc-flip-date-input{box-sizing:border-box}.date-input.sc-flip-date-input{position:relative;display:flex;width:100%;align-items:center;color:var(--s-text-default);line-height:var(--s-line-height-sm)}.date-input__input.sc-flip-date-input{display:inline-flex;width:100%;margin:0;padding:0;border:none;color:var(--s-text-default);background-color:transparent;font:inherit;font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);caret-color:var(--s-border-highlight)}.date-input__input.sc-flip-date-input:focus{outline:none}.date-input__input.sc-flip-date-input:disabled{color:var(--s-text-disabled);background-color:transparent}.date-input__date-picker-button.sc-flip-date-input{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.date-input__date-picker-button.sc-flip-date-input:focus{outline-color:var(--s-focus-default)}.date-input__date-picker-button.sc-flip-date-input:disabled{cursor:default;color:var(--s-icon-disabled)}";export{Ru as flip_date_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,c as e,h as o,H as i}from"./p-9fe00e8a.js";import{c as h}from"./p-efffd297.js";import"./p-86bd3473.js";const s=class{constructor(o){c(this,o),this.valueChange=e(this,"valueChange",7),this.checked=!1,this.disabled=!1,this.onChange=()=>{this.checked=!0!==this.checked&&"true"!==this.checked,this.valueChange.emit(this.checked)}}getAriaCheckedLabel(c,e){return c?"true":e?"false":"mixed"}render(){const c=!1===this.checked||"false"===this.checked,e=!0===this.checked||"true"===this.checked,s="indeterminate"===this.checked,b=Boolean(this.label)||Boolean(this.description),l=this.getAriaCheckedLabel(e,c),r=!0===this.invalid||!1===this.invalid?String(this.invalid):void 0,t=h("checkbox",{"checkbox--checked":e,"checkbox--disabled":this.disabled,"checkbox--indeterminate":s,"checkbox--invalid":this.invalid,"checkbox--unchecked":c});return o(i,null,o("label",{class:t,htmlFor:this.inputId},o("span",{class:"checkbox__control"},o("flip-visually-hidden",null,o("input",{"aria-checked":l,"aria-describedby":this.flipAriaDescribedby,"aria-invalid":r,checked:e,class:"checkbox__input",disabled:this.disabled,id:this.inputId,indeterminate:s,name:this.inputName,onChange:this.onChange,type:"checkbox",value:this.value})),o("span",{"aria-hidden":"true",class:"checkbox__box"},o("span",{class:"checkbox__icon"},e&&o("flip-icon-check-strong",null),s&&o("span",{class:"checkbox__indeterminate-icon"})))),b&&o("span",{class:"checkbox__label-container"},this.label&&o("span",{class:"checkbox__label"},this.label),this.description&&o("span",{class:"checkbox__description"},this.description))))}};s.style='.sc-flip-checkbox-h{display:inline-flex}.sc-flip-checkbox-h *.sc-flip-checkbox{box-sizing:border-box}.checkbox.sc-flip-checkbox{display:inline-flex;line-height:var(--s-line-height-base);cursor:pointer}.checkbox.sc-flip-checkbox:focus-within .checkbox__box.sc-flip-checkbox{box-shadow:0 0 0 0.0625rem var(--s-background-default),\n 0 0 0 0.1875rem var(--s-focus-default)}.checkbox--checked.sc-flip-checkbox .checkbox__control.sc-flip-checkbox:hover .checkbox__box.sc-flip-checkbox,.checkbox--indeterminate.sc-flip-checkbox .checkbox__control.sc-flip-checkbox:hover .checkbox__box.sc-flip-checkbox{border-color:var(--s-interactive-primary-hovered);background-color:var(--s-interactive-primary-hovered)}.checkbox--checked.sc-flip-checkbox .checkbox__box.sc-flip-checkbox,.checkbox--indeterminate.sc-flip-checkbox .checkbox__box.sc-flip-checkbox{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.checkbox--invalid.checkbox--checked.sc-flip-checkbox .checkbox__box.sc-flip-checkbox,.checkbox--invalid.checkbox--indeterminate.sc-flip-checkbox .checkbox__box.sc-flip-checkbox{background-color:var(--s-icon-critical)}.checkbox--invalid.sc-flip-checkbox .checkbox__box.sc-flip-checkbox{border-color:var(--s-icon-critical)}.checkbox--disabled.sc-flip-checkbox{cursor:default}.checkbox--disabled.checkbox--checked.sc-flip-checkbox .checkbox__control.sc-flip-checkbox:hover .checkbox__box.sc-flip-checkbox,.checkbox--disabled.checkbox--indeterminate.sc-flip-checkbox .checkbox__control.sc-flip-checkbox:hover .checkbox__box.sc-flip-checkbox{border-color:var(--s-icon-disabled);background-color:var(--s-icon-disabled)}.checkbox--disabled.checkbox--checked.sc-flip-checkbox .checkbox__box.sc-flip-checkbox,.checkbox--disabled.checkbox--indeterminate.sc-flip-checkbox .checkbox__box.sc-flip-checkbox{background-color:var(--s-icon-disabled)}.checkbox--disabled.sc-flip-checkbox .checkbox__control.sc-flip-checkbox:hover .checkbox__box.sc-flip-checkbox{background-color:transparent}.checkbox--disabled.sc-flip-checkbox .checkbox__box.sc-flip-checkbox{border-color:var(--s-icon-disabled)}.checkbox--disabled.sc-flip-checkbox .checkbox__label.sc-flip-checkbox,.checkbox--disabled.sc-flip-checkbox .checkbox__description.sc-flip-checkbox{color:var(--s-text-disabled)}.checkbox__control.sc-flip-checkbox{position:relative;top:0.125rem;width:1.5rem;height:1.5rem;padding:var(--s-space-2);flex-shrink:0}.checkbox__control.sc-flip-checkbox:hover .checkbox__box.sc-flip-checkbox{background-color:var(--s-action-neutral-hovered)}.checkbox__box.sc-flip-checkbox{position:relative;z-index:1;display:flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s)}.checkbox__icon.sc-flip-checkbox{display:inline-flex;width:1.0625rem;height:1.0625rem}.checkbox__icon.sc-flip-checkbox>*.sc-flip-checkbox::part(icon){width:1.0625rem;height:1.0625rem}.checkbox__indeterminate-icon.sc-flip-checkbox{position:relative;width:100%;height:100%}.checkbox__indeterminate-icon.sc-flip-checkbox:after{position:absolute;top:50%;left:50%;width:0.625rem;height:0.125rem;border-radius:0.0625rem;background-color:currentColor;content:"";transform:translate3d(-50%, -50%, 0)}.checkbox__label-container.sc-flip-checkbox{display:inline-flex;margin-left:var(--s-space-8);padding-top:var(--s-space-4);align-items:flex-start;flex-direction:column}.checkbox__label.sc-flip-checkbox{font-weight:var(--s-font-weight-medium)}.checkbox__description.sc-flip-checkbox{color:var(--s-text-subdued)}';export{s as flip_checkbox}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as r,h as o,H as a}from"./p-9fe00e8a.js";import{c as d}from"./p-efffd297.js";import"./p-86bd3473.js";const s=class{constructor(o){i(this,o),this.valueChange=r(this,"valueChange",7),this.checked=!1,this.disabled=!1,this.onChange=()=>{this.checked=!0,this.valueChange.emit(this.value)}}getAriaCheckedLabel(i,r){return i?"true":r?"false":"mixed"}render(){const i=!1===this.checked||"false"===this.checked,r=!0===this.checked||"true"===this.checked,s=this.getAriaCheckedLabel(r,i),e=this.invalid,l=d("radio",{"radio--checked":r,"radio--disabled":this.disabled,"radio--invalid":this.invalid,"radio--unchecked":i});return o(a,null,o("label",{class:l,htmlFor:this.inputId},o("span",{class:"radio__control"},o("flip-visually-hidden",null,o("input",{"aria-checked":s,"aria-invalid":e,checked:r,class:"radio__input",disabled:this.disabled,id:this.inputId,name:this.inputName,onChange:this.onChange,type:"radio",value:this.value})),o("span",{"aria-hidden":"true",class:"radio__box"})),o("span",{class:"radio__label-container"},this.label&&o("span",{class:"radio__label"},this.label),this.description&&o("span",{class:"radio__description"},this.description))))}};s.style='.sc-flip-radio-h{display:inline-flex}.sc-flip-radio-h *.sc-flip-radio{box-sizing:border-box}.radio.sc-flip-radio{display:inline-flex;cursor:pointer;line-height:var(--s-line-height-base)}.radio.sc-flip-radio:focus-within .radio__box.sc-flip-radio{box-shadow:0 0 0 0.0625rem var(--s-background-default),\n 0 0 0 0.1875rem var(--s-focus-default)}.radio--checked.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{border-color:var(--s-interactive-primary-hovered);background-color:var(--s-interactive-primary-hovered)}.radio--checked.sc-flip-radio .radio__box.sc-flip-radio{position:relative;border-color:var(--s-icon-highlight);background-color:var(--s-icon-highlight)}.radio--checked.sc-flip-radio .radio__box.sc-flip-radio:after{position:absolute;top:50%;left:50%;width:0.5rem;height:0.5rem;border-radius:50%;background-color:var(--s-background-default);content:"";transform:translate3d(-50%, -50%, 0)}.radio--invalid.radio--checked.sc-flip-radio .radio__box.sc-flip-radio,.radio--invalid.radio--indeterminate.sc-flip-radio .radio__box.sc-flip-radio{background-color:var(--s-icon-critical)}.radio--invalid.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-critical)}.radio--disabled.sc-flip-radio{cursor:default}.radio--disabled.radio--checked.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled);background-color:transparent}.radio--disabled.radio--checked.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled);background-color:var(--s-background-default)}.radio--disabled.radio--checked.sc-flip-radio .radio__box.sc-flip-radio:after{background-color:var(--s-icon-disabled)}.radio--disabled.sc-flip-radio .radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{background-color:transparent}.radio--disabled.sc-flip-radio .radio__box.sc-flip-radio{border-color:var(--s-icon-disabled)}.radio--disabled.sc-flip-radio .radio__description.sc-flip-radio,.radio--disabled.sc-flip-radio .radio__label.sc-flip-radio{color:var(--s-text-disabled)}.radio__control.sc-flip-radio{position:relative;display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2);flex-shrink:0}.radio__control.sc-flip-radio:hover .radio__box.sc-flip-radio{background-color:var(--s-action-neutral-hovered)}.radio__box.sc-flip-radio{position:relative;display:flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:50%}.radio__label-container.sc-flip-radio{display:inline-flex;margin-left:var(--s-space-8);padding-top:var(--s-space-2);flex-direction:column}.radio__label.sc-flip-radio{font-weight:var(--s-font-weight-medium)}.radio__description.sc-flip-radio{color:var(--s-text-subdued)}';export{s as flip_radio}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,c as o,h as e,H as t}from"./p-9fe00e8a.js";const l=class{constructor(e){a(this,e),this.backButtonClick=o(this,"backButtonClick",7),this.helpButtonClick=o(this,"helpButtonClick",7),this.backButonLabel="Back",this.helpButonLabel="Help",this.logoText="Admin",this.navigationLabel="Main",this.onBackButtonClick=a=>{this.backButtonClick.emit(a)},this.onHelpButtonClick=a=>{this.helpButtonClick.emit(a)}}render(){return e(t,null,e("div",{class:"console-layout"},e("div",{class:"console-layout__sidebar"},e("header",{class:"console-layout__header"},e("div",{class:"console-layout__logo"},e("svg",{class:"console-layout__logo-mark",fill:"none",height:"26",viewBox:"0 0 16 26",width:"16",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M0.624238 14.0705C0.326496 13.5353 0.118077 12.9406 0.0287543 12.3161C-0.0307941 11.662 -0.0010199 11.0375 0.147851 10.4428C0.296722 9.84813 0.594464 9.25343 0.951754 8.77767C1.33882 8.27217 1.78543 7.85588 2.35114 7.55853L14.6181 0.362671C14.9159 0.8979 15.1243 1.4926 15.2136 2.11703C15.3029 2.74147 15.2434 3.3659 15.0945 3.99034C14.9456 4.58504 14.6479 5.17974 14.2906 5.6555C13.9035 6.16099 13.4569 6.57728 12.8912 6.87463L0.624238 14.0705Z",fill:"#145AF5"}),e("path",{d:"M3.69214 21.4743C3.3944 20.9391 3.18598 20.3444 3.09666 19.72C3.00733 19.0956 3.06688 18.4711 3.21575 17.8467C3.36462 17.252 3.66237 16.6573 4.01966 16.1815C4.40672 15.676 4.85333 15.2597 5.41904 14.9624L12.2076 10.9779C12.5053 11.5131 12.7137 12.1078 12.803 12.7323C12.8924 13.3567 12.8328 13.9811 12.6839 14.6056C12.5351 15.2003 12.2373 15.795 11.88 16.2707C11.493 16.7762 11.0464 17.1925 10.4807 17.4899L3.69214 21.4743Z",fill:"#145AF5"}),e("path",{d:"M3.69141 21.4739L7.77047 19.0951C8.39573 20.1953 8.5446 21.5036 8.24686 22.7228C7.91934 23.9419 7.14521 24.9826 6.04357 25.6368L3.69141 21.4739Z",fill:"#80A8F4"}),e("path",{d:"M12.2072 10.9785L7.32419 10.1459L0.625 14.0709L5.38887 14.9629L12.2072 10.9785Z",fill:"#80A8F4"})),e("flip-text",{class:"console-layout__logo-text",weight:"medium"},this.logoText))),e("nav",{"aria-label":this.navigationLabel,class:"console-layout__navigation"},e("slot",{name:"navigation"})),e("div",{class:"console-layout__user"},e("slot",{name:"user"}))),e("main",{"aria-labelledby":"app-name",class:"console-layout__main"},e("header",{class:"console-layout__app-bar"},e("flip-heading",{as:"h1",class:"console-layout__app-name",headingId:"app-name",level:4,text:this.appName}),this.showHelpButton&&e("flip-button",{class:"console-layout__help-button",hideLabel:!0,icon:"<flip-icon-help></flip-icon-help>",label:this.helpButonLabel,onClick:this.onHelpButtonClick,variant:"flat"})),e("section",{"aria-labelledby":"heading",class:"console-layout__content"},e("header",{class:"console-layout__content-header"},this.showBackButton&&e("flip-button",{class:"console-layout__back-button",hideLabel:!0,icon:"<flip-icon-arrow-back></flip-icon-arrow-back>",label:this.backButonLabel,onClick:this.onBackButtonClick}),e("div",null,e("flip-heading",{as:"h2",class:"console-layout__heading",headingId:"heading",level:1,text:this.heading}),this.subheading&&e("flip-text",{class:"console-layout__subheading",color:"subdued"},this.subheading))),e("div",{class:"console-layout__integration"},e("slot",{name:"content"}))))))}};l.style=':host{display:block;width:100%;height:100vh}:host *{box-sizing:border-box}.console-layout{display:grid;width:100%;height:100%;grid-template-columns:20rem 1fr;grid-template-areas:"sidebar main"}.console-layout__sidebar{display:grid;overflow:auto;width:100%;height:100%;border-right:var(--s-border-width-default) solid var(--s-border-default);grid-template-rows:auto 1fr auto;grid-template-areas:"header"\n "navigation"\n "user";grid-area:sidebar}.console-layout__header{position:sticky;top:0;min-width:0;padding:var(--s-space-20) var(--s-space-24);background-color:var(--s-background-default);grid-area:header}.console-layout__navigation{padding-top:var(--s-space-8);padding-bottom:var(--s-space-8);background-color:var(--s-background-default);grid-area:navigation}.console-layout__user{position:sticky;bottom:0;margin-top:var(--s-border-width-default);padding:var(--s-space-16) var(--s-space-24) var(--s-space-24);border-top:var(--s-border-width-default) solid var(--s-border-default);background-color:var(--s-background-default);grid-area:user}.console-layout__main{display:grid;overflow-x:hidden;overflow-y:auto;width:100%;height:100%;grid-area:main;gap:var(--s-border-width-default);grid-template-rows:4rem 1fr;grid-template-areas:"app-bar"\n "content"}.console-layout__app-bar{position:sticky;top:0;display:flex;min-width:0;padding-right:2.5rem;padding-left:2.5rem;align-items:center;border-bottom:var(--s-border-width-default) solid var(--s-border-default);background-color:var(--s-background-default);gap:var(--s-space-12);grid-area:app-bar}.console-layout__app-name{min-width:0;flex-grow:1}.console-layout__app-name .heading{overflow:hidden;font-weight:var(--s-font-weight-regular);white-space:nowrap;text-overflow:ellipsis}.console-layout__help-button{flex-shrink:0}.console-layout__content{padding:2.5rem;background-color:var(--s-background-default);grid-area:content}.console-layout__logo{display:flex;min-width:0;align-items:center;gap:var(--s-space-12)}.console-layout__logo-mark{flex-shrink:0}.console-layout__logo-text{min-width:0}.console-layout__logo-text::part(text){overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.console-layout__content-header{display:flex;margin-bottom:2.5rem;gap:var(--s-space-16)}.console-layout__back-button{position:relative;top:calc(-1 * var(--s-space-2));flex-shrink:0}.console-layout__subheading{margin-top:var(--s-space-8)}';export{l as flip_console_layout}
|