@randstad-uca/design-system 1.0.95 → 1.0.96
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/components/Checkbox.d.ts +2 -0
- package/dist/index.js +24 -22
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/stories/Checkbox.stories.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -85,13 +85,13 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
85
85
|
${this.helper}
|
|
86
86
|
</p>
|
|
87
87
|
`:i}
|
|
88
|
-
`}};s([L({type:String}),n("design:type",Object)],P.prototype,"label",void 0),s([L({type:String}),n("design:type",Object)],P.prototype,"placeholder",void 0),s([L({type:String}),n("design:type",Object)],P.prototype,"labelColor",void 0),s([L(),n("design:type",Object)],P.prototype,"value",void 0),s([L({type:Boolean}),n("design:type",Object)],P.prototype,"required",void 0),s([L({type:Boolean}),n("design:type",Object)],P.prototype,"optional",void 0),s([L({type:Boolean}),n("design:type",Object)],P.prototype,"disabled",void 0),s([L({type:Boolean,reflect:!0}),n("design:type",Object)],P.prototype,"error",void 0),s([L({type:String}),n("design:type",Object)],P.prototype,"errorMessage",void 0),s([L({type:String}),n("design:type",Object)],P.prototype,"helper",void 0),s([L({type:String}),n("design:type",String)],P.prototype,"helperAlign",void 0),s([L({type:String}),n("design:type",String)],P.prototype,"help",void 0),s([L({type:Boolean}),n("design:type",Object)],P.prototype,"helpClickable",void 0),s([L({type:String}),n("design:type",String)],P.prototype,"helpLink",void 0),s([L({type:String}),n("design:type",String)],P.prototype,"helpLinkTooltipMessage",void 0),s([B(),n("design:type",Object)],P.prototype,"_tooltipOpen",void 0),P=s([a("base-control")],P);const
|
|
88
|
+
`}};s([L({type:String}),n("design:type",Object)],P.prototype,"label",void 0),s([L({type:String}),n("design:type",Object)],P.prototype,"placeholder",void 0),s([L({type:String}),n("design:type",Object)],P.prototype,"labelColor",void 0),s([L(),n("design:type",Object)],P.prototype,"value",void 0),s([L({type:Boolean}),n("design:type",Object)],P.prototype,"required",void 0),s([L({type:Boolean}),n("design:type",Object)],P.prototype,"optional",void 0),s([L({type:Boolean}),n("design:type",Object)],P.prototype,"disabled",void 0),s([L({type:Boolean,reflect:!0}),n("design:type",Object)],P.prototype,"error",void 0),s([L({type:String}),n("design:type",Object)],P.prototype,"errorMessage",void 0),s([L({type:String}),n("design:type",Object)],P.prototype,"helper",void 0),s([L({type:String}),n("design:type",String)],P.prototype,"helperAlign",void 0),s([L({type:String}),n("design:type",String)],P.prototype,"help",void 0),s([L({type:Boolean}),n("design:type",Object)],P.prototype,"helpClickable",void 0),s([L({type:String}),n("design:type",String)],P.prototype,"helpLink",void 0),s([L({type:String}),n("design:type",String)],P.prototype,"helpLinkTooltipMessage",void 0),s([B(),n("design:type",Object)],P.prototype,"_tooltipOpen",void 0),P=s([a("base-control")],P);const j=o`
|
|
89
89
|
font-family: 'Graphik', sans-serif;
|
|
90
90
|
font-weight: 400;
|
|
91
91
|
font-size: 12px;
|
|
92
92
|
line-height: 15px;
|
|
93
93
|
letter-spacing: 0%;
|
|
94
|
-
`,
|
|
94
|
+
`,R=o`
|
|
95
95
|
font-family: 'Graphik', sans-serif;
|
|
96
96
|
font-weight: 400;
|
|
97
97
|
font-size: 14px;
|
|
@@ -698,7 +698,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
.description {
|
|
701
|
-
${
|
|
701
|
+
${R}
|
|
702
702
|
margin: 0;
|
|
703
703
|
}
|
|
704
704
|
|
|
@@ -749,14 +749,14 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
749
749
|
</div>
|
|
750
750
|
</div>
|
|
751
751
|
</div>
|
|
752
|
-
`}};s([L({type:String}),n("design:type",Object)],Y.prototype,"img",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"name",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"title",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"description",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"buttonLabel",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"cardId",void 0),s([L({type:Object}),n("design:type",Object)],Y.prototype,"onClick",void 0),s([L({type:String}),n("design:type",String)],Y.prototype,"width",void 0),s([L({type:String}),n("design:type",String)],Y.prototype,"height",void 0),Y=s([a("carousel-card")],Y);let G=class extends t{constructor(){super(...arguments),this.checked=!1,this.error=!1,this.disabled=!1}static{this.styles=o`
|
|
752
|
+
`}};s([L({type:String}),n("design:type",Object)],Y.prototype,"img",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"name",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"title",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"description",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"buttonLabel",void 0),s([L({type:String}),n("design:type",Object)],Y.prototype,"cardId",void 0),s([L({type:Object}),n("design:type",Object)],Y.prototype,"onClick",void 0),s([L({type:String}),n("design:type",String)],Y.prototype,"width",void 0),s([L({type:String}),n("design:type",String)],Y.prototype,"height",void 0),Y=s([a("carousel-card")],Y);let G=class extends t{constructor(){super(...arguments),this.checked=!1,this.error=!1,this.disabled=!1,this.checkedColor="var(--primary-color)",this.checkedBgColor="transparent"}static{this.styles=o`
|
|
753
753
|
:host {
|
|
754
754
|
display: block;
|
|
755
755
|
max-width: 100%;
|
|
756
756
|
}
|
|
757
757
|
|
|
758
758
|
label {
|
|
759
|
-
${
|
|
759
|
+
${R}
|
|
760
760
|
display: flex;
|
|
761
761
|
align-items: center;
|
|
762
762
|
gap: 8px;
|
|
@@ -771,11 +771,13 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
771
771
|
border: 1px solid var(--secondary-color-20);
|
|
772
772
|
appearance: none;
|
|
773
773
|
position: relative;
|
|
774
|
+
background-color: var(--_initial-bg, transparent);
|
|
775
|
+
transition: background-color 0.2s ease;
|
|
774
776
|
}
|
|
775
777
|
|
|
776
778
|
input[type="checkbox"]:checked {
|
|
777
|
-
background-color: var(--primary-color);
|
|
778
|
-
border: 1px solid var(--primary-color);
|
|
779
|
+
background-color: var(--_checked-bg, var(--primary-color));
|
|
780
|
+
border: 1px solid var(--_checked-bg, var(--primary-color));
|
|
779
781
|
}
|
|
780
782
|
|
|
781
783
|
input[type="checkbox"]:checked::after {
|
|
@@ -843,7 +845,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
843
845
|
}
|
|
844
846
|
|
|
845
847
|
input[type="checkbox"]:disabled {
|
|
846
|
-
background-color: var(--secondary-color-10);
|
|
848
|
+
background-color: var(--secondary-color-10)!important;
|
|
847
849
|
border-color: var(--secondary-color-20);
|
|
848
850
|
color: #9FA3B3;
|
|
849
851
|
cursor: default;
|
|
@@ -858,8 +860,8 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
858
860
|
outline: none;
|
|
859
861
|
box-shadow: 0 0 0 2px rgb( 0, 215, 255 ), 0 0 0 4px var( --secondary-color-10 );
|
|
860
862
|
}
|
|
861
|
-
`}toggleCheck(t){this.checked=t.target.checked,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}handleKeyDown(t){if(this.disabled)return;const{key:e}=t;"Enter"!==e&&" "!==e||(t.preventDefault(),this.checked=!this.checked,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0})))}render(){return e`
|
|
862
|
-
<label class="${this.error?"error":""} ${this.disabled?"disabled":""}">
|
|
863
|
+
`}toggleCheck(t){this.checked=t.target.checked,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}handleKeyDown(t){if(this.disabled)return;const{key:e}=t;"Enter"!==e&&" "!==e||(t.preventDefault(),this.checked=!this.checked,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0})))}render(){const t=`\n --_checked-bg: ${this.checkedColor}; \n --_initial-bg: ${this.checkedBgColor};\n `;return e`
|
|
864
|
+
<label class="${this.error?"error":""} ${this.disabled?"disabled":""}" style="${t}">
|
|
863
865
|
<input
|
|
864
866
|
type="checkbox"
|
|
865
867
|
role="checkbox"
|
|
@@ -867,7 +869,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
867
869
|
.checked=${this.checked}
|
|
868
870
|
?disabled=${this.disabled}
|
|
869
871
|
@change=${this.toggleCheck}
|
|
870
|
-
@keydown=${this.handleKeyDown}
|
|
872
|
+
@keydown=${this.handleKeyDown}
|
|
871
873
|
@focus=${()=>this.setAttribute("focused","")}
|
|
872
874
|
@blur=${()=>this.removeAttribute("focused")}
|
|
873
875
|
/>
|
|
@@ -875,7 +877,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
875
877
|
<slot></slot>
|
|
876
878
|
</span>
|
|
877
879
|
</label>
|
|
878
|
-
`}};s([L({type:Boolean,reflect:!0}),n("design:type",Object)],G.prototype,"checked",void 0),s([L({type:Boolean}),n("design:type",Object)],G.prototype,"error",void 0),s([L({type:Boolean}),n("design:type",Object)],G.prototype,"disabled",void 0),G=s([a("randstad-checkbox")],G);const K=o`
|
|
880
|
+
`}};s([L({type:Boolean,reflect:!0}),n("design:type",Object)],G.prototype,"checked",void 0),s([L({type:Boolean}),n("design:type",Object)],G.prototype,"error",void 0),s([L({type:Boolean}),n("design:type",Object)],G.prototype,"disabled",void 0),s([L({type:String}),n("design:type",Object)],G.prototype,"checkedColor",void 0),s([L({type:String}),n("design:type",Object)],G.prototype,"checkedBgColor",void 0),G=s([a("randstad-checkbox")],G);const K=o`
|
|
879
881
|
.label-container {
|
|
880
882
|
display: flex;
|
|
881
883
|
align-items: center;
|
|
@@ -991,7 +993,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
991
993
|
|
|
992
994
|
.optional {
|
|
993
995
|
color: var( --secondary-color-60 );
|
|
994
|
-
${
|
|
996
|
+
${j}
|
|
995
997
|
}
|
|
996
998
|
|
|
997
999
|
randstad-icon {
|
|
@@ -1991,7 +1993,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1991
1993
|
}
|
|
1992
1994
|
|
|
1993
1995
|
.circle-text {
|
|
1994
|
-
${
|
|
1996
|
+
${j};
|
|
1995
1997
|
text-align: center;
|
|
1996
1998
|
vertical-align: middle;
|
|
1997
1999
|
fill: var(--randstad-dark-blue-40);
|
|
@@ -2565,7 +2567,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2565
2567
|
.mobile-modal .options-list li.no-results-item.mobile-item {
|
|
2566
2568
|
text-align: center;
|
|
2567
2569
|
}
|
|
2568
|
-
`]}manageScrollElement(t,e){e?t.classList.add("modal-open-no-scroll"):t.classList.remove("modal-open-no-scroll")}toggleDynamicScrollLock(t){const e=document.documentElement;if(t){this.originalHtmlOverflow=e.style.overflow,this.originalHtmlPaddingRight=e.style.paddingRight,e.style.overflow="hidden",this.manageScrollElement(e,!0);if(e.scrollHeight>e.clientHeight){const t=window.innerWidth-e.clientWidth;e.style.paddingRight=`${t}px`}}else e.style.overflow=this.originalHtmlOverflow,e.style.paddingRight=this.originalHtmlPaddingRight,this.manageScrollElement(e,!1)}sortOptions(t,e,i){const o=t=>"string"==typeof t?t:"string"==typeof t.value?t.value:"",r=this.getOptionLabel(t),s=this.getOptionLabel(e),n=r.toLowerCase(),a=s.toLowerCase();if(i&&i.length>0){const t=i.toLowerCase(),e=n.startsWith(t),o=a.startsWith(t);if(e&&!o)return-1;if(!e&&o)return 1}const l=o(t),d=o(e);if("+54"===l)return-1;if("+54"===d)return 1;if("+54"===l&&"+54"===d)return 0;const c=r.match(/^\d+(\.\d+)?/),h=s.match(/^\d+(\.\d+)?/),p=c?Number(c[0]):NaN,u=h?Number(h[0]):NaN;return isNaN(p)||isNaN(u)?r.localeCompare(s,"es",{usage:"sort",sensitivity:"accent"}):p-u}filterAndSortOptions(){if(!this.filterable||!this.filterValue||0===this.filterValue.length)return this.filteredOptions=this.sortable?[...this.options].sort(((t,e)=>this.sortOptions(t,e,void 0))):[...this.options],this.highlightedIndex=-1,void(this.showNoResults=!1);const t=this.filterValue,e=t.toLowerCase();let i=this.options.filter((t=>this.getOptionLabel(t).toLowerCase().includes(e)));this.sortable?this.filteredOptions=i.sort(((e,i)=>this.sortOptions(e,i,t))):this.filteredOptions=i,this.highlightedIndex=this.filteredOptions.length>0?0:-1,this.showNoResults=0===this.filteredOptions.length}handleOptionHover(t){this.highlightedIndex!==t&&(this.highlightedIndex=t)}update(t){if(t.has("options")){if(this.sortable){const t=[...this.options].sort(((t,e)=>this.sortOptions(t,e,void 0)));this.options=t}this.filterAndSortOptions();if(this.options.length<=5)this.filterable=!1;else{const t=this.getAttribute("filterable");this.filterable=null===t||"false"!==t}}if((t.has("defaultValue")||t.has("options")||t.has("value")&&this.value)&&!this._isCleared){const t=this.value||this.defaultValue,e=this.options.find((e=>"string"==typeof e?e===t:e.value===t));e?(this.filterValue="string"==typeof e?e:e.label,this.value="string"==typeof e?e:e.value):((this.isOpen||this.filterValue)&&(this.isOpen||""!==this.value)||(this.filterValue=""),this.value="")}this._isCleared&&""===this.value&&(this._isCleared=!1),super.update(t)}willUpdate(t){t.has("filterValue")&&this.filterAndSortOptions()}updated(t){super.updated(t),t.has("isOpen")&&this.isMobile&&this.toggleDynamicScrollLock(this.isOpen);const e=!1===t.get("isOpen");this.isMobile&&this.isOpen&&t.has("isOpen")&&e&&this.updateComplete.then((()=>{const t=this.mobileInputRef;t&&window.setTimeout((()=>{t.focus(),t.setSelectionRange(t.value.length,t.value.length)}),0)}))}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),this.debounceTimeout&&(clearTimeout(this.debounceTimeout),this.debounceTimeout=null),this.isMobile&&this.toggleDynamicScrollLock(!1),super.disconnectedCallback()}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.disabled||(this.isOpen||(this.filteredOptions=[...this.options],this.showNoResults=!1,this.isMobile&&(this.mobileFilterValue="")),this.isOpen=!this.isOpen,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:this.isOpen},bubbles:!0,composed:!0})),this.requestUpdate())}handleInput(t){if(!this.filterable)return;this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength):e;if(this.filterValue=i,this.isOpen=!0,""===i)this.value="",this.filteredOptions=[...this.options],this.showNoResults=!1;else{const t=i.toLowerCase();this.filteredOptions=this.options.filter((e=>("string"==typeof e?e:e.label).toLowerCase().includes(t))),this.showNoResults=0===this.filteredOptions.length}this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength):e;this.mobileFilterValue=i;const o=i.toLowerCase();this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(o))),this.showNoResults=i.length>0&&0===this.filteredOptions.length,this.requestUpdate(),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2?this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0})):0===i.length&&(this.filteredOptions=[...this.options])}),300)}handleSelect(t){this._isCleared=!1,this.highlightedIndex=-1;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.value=e,this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.mobileFilterValue=this.filterValue,this.filteredOptions=[...this.options],this.showNoResults=!1,this.requestUpdate()}handleIconClick(){if(this.disabled)return;this.highlightedIndex=-1;const t=this.isRenderClearButton,e="string"==typeof this.value&&""!==this.value,i="object"==typeof this.value&&null!==this.value&&Object.keys(this.value).length>0;t&&(e||i)?(this._isCleared=!0,this.filterValue="",this.value="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0}))):(this.isOpen=!this.isOpen,this.isOpen?(this.mobileFilterValue="",this.showNoResults=!1,this.filteredOptions=[...this.options],this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!0},bubbles:!0,composed:!0})),this.updateComplete.then((()=>{if(this.isMobile)return;const t=this.shadowRoot?.querySelector(".filter-input");t?.focus()}))):(this.mobileFilterValue="",this.filteredOptions=[...this.options],this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})))),this.requestUpdate()}handleReset(){this.filterValue="",this.showNoResults=!1,this.highlightedIndex=-1,this.mobileFilterValue="",this.filteredOptions=[...this.options]}handleClickOutside(t){const e=t.target;e instanceof Node&&(!this.contains(e)&&this.isOpen&&(this.isOpen=!1,this.validateAndCleanOnBlur(),this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.requestUpdate()),this.isMobile&&(this.mobileFilterValue="",this.filteredOptions=[...this.options]))}handleKeyDown(t){const{key:e}=t,i=this.shadowRoot?.querySelector(".filter-input");if("Backspace"===e&&this.filterable){const t=i?.value||"",e=i&&i.selectionStart!==i.selectionEnd,o=1===t.length&&!e,r=0===t.length;(o||r)&&(this.value="",this.filterValue="",this._isCleared=!0,this.filteredOptions=[...this.options],this.isOpen=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.requestUpdate())}const o=this.filteredOptions.filter((t=>!("object"==typeof t&&t.disabled)));if(!this.isOpen&&("Enter"===e||" "===e)){t.preventDefault(),this.isOpen=!0;const e=this.filteredOptions.findIndex((t=>!("object"==typeof t&&t.disabled)));return this.highlightedIndex=-1!==e?e:-1,void this.requestUpdate()}if(this.isOpen){if("ArrowDown"===e){t.preventDefault();let e=this.highlightedIndex+1;for(;e<this.filteredOptions.length;){const t=this.filteredOptions[e];if("object"!=typeof t||!t.disabled){this.highlightedIndex=e;break}e++}if(e>=this.filteredOptions.length){const t=this.filteredOptions.length-1;this.highlightedIndex=o.length>0?t:-1}this.requestUpdate(),this.updateComplete.then((()=>this.scrollHighlightedIntoView()))}else if("ArrowUp"===e){t.preventDefault();let e=this.highlightedIndex-1;for(;e>=0;){const t=this.filteredOptions[e];if("object"!=typeof t||!t.disabled){this.highlightedIndex=e;break}e--}e<0&&(this.highlightedIndex=-1),this.requestUpdate(),this.updateComplete.then((()=>this.scrollHighlightedIntoView()))}else if("Enter"===e||" "===e){this.highlightedIndex>=0&&t.preventDefault();const e=this.filteredOptions[this.highlightedIndex];if(this.highlightedIndex>=0&&e&&("object"!=typeof e||!e.disabled)){this.handleSelect(e);const t=this.shadowRoot?.querySelector(".filter-input"),i=this.shadowRoot?.querySelector(".filter-fake");return t?t.focus():i?.focus(),void(this.highlightedIndex=-1)}}else if("Escape"===e){t.preventDefault(),this.isOpen=!1,this.highlightedIndex=-1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0}));const e=this.shadowRoot?.querySelector(".filter-input"),i=this.shadowRoot?.querySelector(".filter-fake");e?e.focus():i?.focus()}else"Tab"===e?(this.isOpen=!1,this.highlightedIndex=-1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.requestUpdate()):!this.isMobile&&this.filterable&&1===e.length&&(this.highlightedIndex=-1);if(("ArrowLeft"===e||"ArrowRight"===e)&&this.filterable)return}if("ArrowRight"!==e)this.isOpen&&!this.isMobile&&this.filterable&&1===e.length&&(this.highlightedIndex=-1);else{const e=!i||i.selectionStart===i.value.length;if(!this.filterable||e){t.preventDefault();const e=this.shadowRoot?.querySelector(".icon-button");e?.focus()}}}handleButtonKeyDown(t){const{key:e}=t,i=this.shadowRoot?.querySelector(".filter-input"),o=this.shadowRoot?.querySelector(".filter-fake"),r=i||o;return"ArrowLeft"===e?(t.preventDefault(),r?.focus(),void(r instanceof HTMLInputElement&&(r.selectionStart=r.selectionEnd=r.value.length))):"Enter"===e||" "===e?(t.preventDefault(),this.filterable&&this.filterValue?(this.handleIconClick(),r?.focus()):(this.isOpen=!this.isOpen,this.isOpen&&(this.highlightedIndex=-1,r?.focus())),void this.requestUpdate()):void("Tab"===e&&this.isOpen&&(this.isOpen=!1,this.highlightedIndex=-1,this.requestUpdate()))}handleBlur(){window.setTimeout((()=>{this.isOpen||(this.validateAndCleanOnBlur(),this.requestUpdate())}),200)}scrollHighlightedIntoView(){if(this.isMobile||this.highlightedIndex<0)return;const t=this.shadowRoot?.querySelector(".options-list");if(!t)return;const e=t.querySelector("li.highlighted");e&&e.scrollIntoView({block:"nearest"})}renderSelectedIcon(){const t=this.options.find((t=>"string"==typeof t?t===this.value:t.value===this.value));return t&&"string"!=typeof t&&t.icon&&"string"==typeof t.icon?e`<span class="icon-selected" .innerHTML="${t.icon}"></span>`:i}renderOptionIcon(t){return t&&"string"==typeof t?e`<span class="icon-list" .innerHTML="${t}"></span>`:i}_getFilteredOptions(){if(!this.filterable)return this.options;if(!this.filterValue||""===this.filterValue.trim())return this.options;const t=this.filterValue.toLowerCase();return this.options.filter((e=>"string"==typeof e?e.toLowerCase().includes(t):e.label.toLowerCase().includes(t)))}validateAndCleanOnBlur(){if(!this.filterable)return;const t=(this.filterValue||"").trim().toLowerCase();if(!t)return""!==this.value&&(this.value="",this._isCleared=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}))),this.filterValue="",this.filteredOptions=[...this.options],void(this.showNoResults=!1);const e=this.options.find((e=>{const i="string"==typeof e?e:e.label;return String(i).toLowerCase()===t}));if(e){const t="string"==typeof e?e:e.value,i="string"==typeof e?e:e.label;this.value!==t&&(this.value=t,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:t},bubbles:!0,composed:!0}))),this.filterValue=i,this.showNoResults=!1}else this.value="",this._isCleared=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.filterValue="",this.filteredOptions=[...this.options],this.showNoResults=!1}render(){const t=this.isMobile,o=` --filter-text-color: ${this.value?"var( --secondary-color )":"var( --secondary-color-40 )"}; `,r=e`
|
|
2570
|
+
`]}manageScrollElement(t,e){e?t.classList.add("modal-open-no-scroll"):t.classList.remove("modal-open-no-scroll")}toggleDynamicScrollLock(t){const e=document.documentElement;if(t){this.originalHtmlOverflow=e.style.overflow,this.originalHtmlPaddingRight=e.style.paddingRight,e.style.overflow="hidden",this.manageScrollElement(e,!0);if(e.scrollHeight>e.clientHeight){const t=window.innerWidth-e.clientWidth;e.style.paddingRight=`${t}px`}}else e.style.overflow=this.originalHtmlOverflow,e.style.paddingRight=this.originalHtmlPaddingRight,this.manageScrollElement(e,!1)}sortOptions(t,e,i){const o=t=>"string"==typeof t?t:"string"==typeof t.value?t.value:"",r=this.getOptionLabel(t),s=this.getOptionLabel(e),n=r.toLowerCase(),a=s.toLowerCase();if(i&&i.length>0){const t=i.toLowerCase(),e=n.startsWith(t),o=a.startsWith(t);if(e&&!o)return-1;if(!e&&o)return 1}const l=o(t),d=o(e);if("+54"===l)return-1;if("+54"===d)return 1;if("+54"===l&&"+54"===d)return 0;const c=r.match(/^\d+(\.\d+)?/),h=s.match(/^\d+(\.\d+)?/),p=c?Number(c[0]):NaN,u=h?Number(h[0]):NaN;return isNaN(p)||isNaN(u)?r.localeCompare(s,"es",{usage:"sort",sensitivity:"accent"}):p-u}filterAndSortOptions(){if(!this.filterable||!this.filterValue||0===this.filterValue.length)return this.filteredOptions=this.sortable?[...this.options].sort(((t,e)=>this.sortOptions(t,e,void 0))):[...this.options],this.highlightedIndex=-1,void(this.showNoResults=!1);const t=this.filterValue,e=t.toLowerCase();let i=this.options.filter((t=>this.getOptionLabel(t).toLowerCase().includes(e)));this.sortable?this.filteredOptions=i.sort(((e,i)=>this.sortOptions(e,i,t))):this.filteredOptions=i,this.highlightedIndex=this.filteredOptions.length>0?0:-1,this.showNoResults=0===this.filteredOptions.length}handleOptionHover(t){this.highlightedIndex!==t&&(this.highlightedIndex=t)}update(t){if(t.has("options")){if(this.sortable){const t=[...this.options].sort(((t,e)=>this.sortOptions(t,e,void 0)));this.options=t}this.filterAndSortOptions();if(this.options.length<=5)this.filterable=!1;else{const t=this.getAttribute("filterable");this.filterable=null===t||"false"!==t}}if((t.has("defaultValue")||t.has("options")||t.has("value")&&this.value)&&!this._isCleared){const t=this.value||this.defaultValue,e=this.options.find((e=>"string"==typeof e?e===t:e.value===t));e?(this.filterValue="string"==typeof e?e:e.label,this.value="string"==typeof e?e:e.value):((this.isOpen||this.filterValue)&&(this.isOpen||""!==this.value)||(this.filterValue=""),this.value="")}this._isCleared&&""===this.value&&(this._isCleared=!1),super.update(t)}willUpdate(t){t.has("filterValue")&&this.filterAndSortOptions()}updated(t){super.updated(t),t.has("isOpen")&&this.isMobile&&this.toggleDynamicScrollLock(this.isOpen);const e=!1===t.get("isOpen");this.isMobile&&this.isOpen&&t.has("isOpen")&&e&&this.updateComplete.then((()=>{const t=this.mobileInputRef;t&&window.setTimeout((()=>{t.focus(),t.setSelectionRange(t.value.length,t.value.length)}),0)}))}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),this.debounceTimeout&&(clearTimeout(this.debounceTimeout),this.debounceTimeout=null),this.isMobile&&this.toggleDynamicScrollLock(!1),super.disconnectedCallback()}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.disabled||(this.isOpen||(this.filteredOptions=[...this.options],this.showNoResults=!1,this.isMobile&&(this.mobileFilterValue="")),this.isOpen=!this.isOpen,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:this.isOpen},bubbles:!0,composed:!0})),this.requestUpdate())}handleInput(t){if(!this.filterable)return;this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength):e;if(this.filterValue=i,this.isOpen=!0,""===i)this.value="",this.filteredOptions=[...this.options],this.showNoResults=!1;else{const t=i.toLowerCase();this.filteredOptions=this.options.filter((e=>("string"==typeof e?e:e.label).toLowerCase().includes(t))),this.showNoResults=0===this.filteredOptions.length}this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength):e;this.mobileFilterValue=i;const o=i.toLowerCase();this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(o))),this.showNoResults=i.length>0&&0===this.filteredOptions.length,this.requestUpdate(),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2?this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0})):0===i.length&&(this.filteredOptions=[...this.options])}),300)}handleSelect(t){this._isCleared=!1,this.highlightedIndex=-1;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.value=e,this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.mobileFilterValue=this.filterValue,this.filteredOptions=[...this.options],this.showNoResults=!1,this.requestUpdate()}handleIconClick(){if(this.disabled)return;this.highlightedIndex=-1;const t=this.isRenderClearButton,e="string"==typeof this.value&&""!==this.value,i="object"==typeof this.value&&null!==this.value&&Object.keys(this.value).length>0;t&&(e||i)?(this._isCleared=!0,this.filterValue="",this.value="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0}))):(this.isOpen=!this.isOpen,this.isOpen?(this.mobileFilterValue="",this.showNoResults=!1,this.filteredOptions=[...this.options],this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!0},bubbles:!0,composed:!0})),this.updateComplete.then((()=>{if(this.isMobile)return;const t=this.shadowRoot?.querySelector(".filter-input");t?.focus()}))):(this.mobileFilterValue="",this.filteredOptions=[...this.options],this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})))),this.requestUpdate()}handleReset(){this.filterValue="",this.showNoResults=!1,this.highlightedIndex=-1,this.mobileFilterValue="",this.filteredOptions=[...this.options]}handleClickOutside(t){const e=t.target;e instanceof Node&&(!this.contains(e)&&this.isOpen&&(this.isOpen=!1,this.validateAndCleanOnBlur(),this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.requestUpdate()),this.isMobile&&(this.mobileFilterValue="",this.filteredOptions=[...this.options]))}handleKeyDown(t){const{key:e}=t,i=this.shadowRoot?.querySelector(".filter-input");if("Backspace"===e&&this.filterable){const t=i?.value||"",e=i&&i.selectionStart!==i.selectionEnd,o=1===t.length&&!e,r=0===t.length;(o||r)&&(this.value="",this.filterValue="",this._isCleared=!0,this.filteredOptions=[...this.options],this.isOpen=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.requestUpdate())}const o=this.filteredOptions.filter((t=>!("object"==typeof t&&t.disabled)));if(!this.isOpen&&("Enter"===e||" "===e)){t.preventDefault(),this.isOpen=!0;const e=this.filteredOptions.findIndex((t=>!("object"==typeof t&&t.disabled)));return this.highlightedIndex=-1!==e?e:-1,void this.requestUpdate()}if(this.isOpen){if("ArrowDown"===e){t.preventDefault();let e=this.highlightedIndex+1;for(;e<this.filteredOptions.length;){const t=this.filteredOptions[e];if("object"!=typeof t||!t.disabled){this.highlightedIndex=e;break}e++}if(e>=this.filteredOptions.length){const t=this.filteredOptions.length-1;this.highlightedIndex=o.length>0?t:-1}this.requestUpdate(),this.updateComplete.then((()=>this.scrollHighlightedIntoView()))}else if("ArrowUp"===e){t.preventDefault();let e=this.highlightedIndex-1;for(;e>=0;){const t=this.filteredOptions[e];if("object"!=typeof t||!t.disabled){this.highlightedIndex=e;break}e--}e<0&&(this.highlightedIndex=-1),this.requestUpdate(),this.updateComplete.then((()=>this.scrollHighlightedIntoView()))}else if("Enter"===e||" "===e){this.highlightedIndex>=0&&t.preventDefault();const e=this.filteredOptions[this.highlightedIndex];if(this.highlightedIndex>=0&&e&&("object"!=typeof e||!e.disabled)){this.handleSelect(e);const t=this.shadowRoot?.querySelector(".filter-input"),i=this.shadowRoot?.querySelector(".filter-fake");return t?t.focus():i?.focus(),void(this.highlightedIndex=-1)}}else if("Escape"===e){t.preventDefault(),this.isOpen=!1,this.highlightedIndex=-1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0}));const e=this.shadowRoot?.querySelector(".filter-input"),i=this.shadowRoot?.querySelector(".filter-fake");e?e.focus():i?.focus()}else"Tab"===e?(this.isOpen=!1,this.highlightedIndex=-1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.requestUpdate()):!this.isMobile&&this.filterable&&1===e.length&&(this.highlightedIndex=-1);if(("ArrowLeft"===e||"ArrowRight"===e)&&this.filterable)return}if("ArrowRight"!==e)this.isOpen&&!this.isMobile&&this.filterable&&1===e.length&&(this.highlightedIndex=-1);else{const e=!i||i.selectionStart===i.value.length;if(!this.filterable||e){t.preventDefault();const e=this.shadowRoot?.querySelector(".icon-button");e?.focus()}}}handleButtonKeyDown(t){const{key:e}=t,i=this.shadowRoot?.querySelector(".filter-input"),o=this.shadowRoot?.querySelector(".filter-fake"),r=i||o;return"ArrowLeft"===e?(t.preventDefault(),r?.focus(),void(r instanceof HTMLInputElement&&(r.selectionStart=r.selectionEnd=r.value.length))):"Enter"===e||" "===e?(t.preventDefault(),this.filterable&&this.filterValue?(this.handleIconClick(),r?.focus()):(this.isOpen=!this.isOpen,this.isOpen&&(this.highlightedIndex=-1,r?.focus())),void this.requestUpdate()):void("Tab"===e&&this.isOpen&&(this.isOpen=!1,this.highlightedIndex=-1,this.requestUpdate()))}handleBlur(){window.setTimeout((()=>{this.validateAndCleanOnBlur(),this.requestUpdate()}),200)}scrollHighlightedIntoView(){if(this.isMobile||this.highlightedIndex<0)return;const t=this.shadowRoot?.querySelector(".options-list");if(!t)return;const e=t.querySelector("li.highlighted");e&&e.scrollIntoView({block:"nearest"})}renderSelectedIcon(){const t=this.options.find((t=>"string"==typeof t?t===this.value:t.value===this.value));return t&&"string"!=typeof t&&t.icon&&"string"==typeof t.icon?e`<span class="icon-selected" .innerHTML="${t.icon}"></span>`:i}renderOptionIcon(t){return t&&"string"==typeof t?e`<span class="icon-list" .innerHTML="${t}"></span>`:i}_getFilteredOptions(){if(!this.filterable)return this.options;if(!this.filterValue||""===this.filterValue.trim())return this.options;const t=this.filterValue.toLowerCase();return this.options.filter((e=>"string"==typeof e?e.toLowerCase().includes(t):e.label.toLowerCase().includes(t)))}validateAndCleanOnBlur(){if(!this.filterable)return;const t=(this.filterValue||"").trim().toLowerCase();if(!t)return""!==this.value&&(this.value="",this._isCleared=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}))),this.filterValue="",this.filteredOptions=[...this.options],void(this.showNoResults=!1);const e=this.options.find((e=>{const i="string"==typeof e?e:e.label;return String(i).toLowerCase()===t}));if(e){const t="string"==typeof e?e:e.value,i="string"==typeof e?e:e.label;this.value!==t&&(this.value=t,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:t},bubbles:!0,composed:!0}))),this.filterValue=i,this.showNoResults=!1}else this.value="",this._isCleared=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.filterValue="",this.filteredOptions=[...this.options],this.showNoResults=!1}render(){const t=this.isMobile,o=` --filter-text-color: ${this.value?"var( --secondary-color )":"var( --secondary-color-40 )"}; `,r=e`
|
|
2569
2571
|
<randstad-icon
|
|
2570
2572
|
name="${this.isOpen&&this.filteredOptions.length>0?"arrow_up":"arrow_down"}"
|
|
2571
2573
|
size="24px"
|
|
@@ -2778,7 +2780,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2778
2780
|
}
|
|
2779
2781
|
|
|
2780
2782
|
.container {
|
|
2781
|
-
${
|
|
2783
|
+
${R};
|
|
2782
2784
|
display: flex;
|
|
2783
2785
|
align-items: center;
|
|
2784
2786
|
box-sizing: border-box;
|
|
@@ -3161,28 +3163,28 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3161
3163
|
}
|
|
3162
3164
|
|
|
3163
3165
|
.text-main {
|
|
3164
|
-
${
|
|
3166
|
+
${R};
|
|
3165
3167
|
text-align: center;
|
|
3166
3168
|
vertical-align: middle;
|
|
3167
3169
|
color: var( --secondary-color-80 );
|
|
3168
3170
|
}
|
|
3169
3171
|
|
|
3170
3172
|
.text-secondary {
|
|
3171
|
-
${
|
|
3173
|
+
${j};
|
|
3172
3174
|
text-align: center;
|
|
3173
3175
|
vertical-align: middle;
|
|
3174
3176
|
color: var( --secondary-color-60 );
|
|
3175
3177
|
}
|
|
3176
3178
|
|
|
3177
3179
|
.text-tertiary {
|
|
3178
|
-
${
|
|
3180
|
+
${j};
|
|
3179
3181
|
text-align: center;
|
|
3180
3182
|
vertical-align: middle;
|
|
3181
3183
|
color: var( --secondary-color-40 );
|
|
3182
3184
|
}
|
|
3183
3185
|
|
|
3184
3186
|
.button {
|
|
3185
|
-
${
|
|
3187
|
+
${j};
|
|
3186
3188
|
background-color: var( --primary-color );
|
|
3187
3189
|
border: none;
|
|
3188
3190
|
padding: 4px 16px;
|
|
@@ -3307,7 +3309,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3307
3309
|
</div>
|
|
3308
3310
|
</div>
|
|
3309
3311
|
</div>
|
|
3310
|
-
`}};s([L({type:Array}),n("design:type",Array)],vt.prototype,"acceptedFileTypes",void 0),s([L({type:Number}),n("design:type",Object)],vt.prototype,"maxFiles",void 0),s([L({type:Number}),n("design:type",Object)],vt.prototype,"maxFileSize",void 0),s([L({type:Boolean}),n("design:type",Object)],vt.prototype,"isShowInfoSize",void 0),s([L({type:Boolean}),n("design:type",Object)],vt.prototype,"isChangeStyleError",void 0),s([B(),n("design:type",Object)],vt.prototype,"isDragging",void 0),s([B(),n("design:type",Array)],vt.prototype,"imageUrls",void 0),s([B(),n("design:type",Boolean)],vt.prototype,"isMaxFilesReached",void 0),vt=s([a("upload-image")],vt);const ft=6048e5,wt=Symbol.for("constructDateFrom");function xt(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&wt in t?t[wt](e):t instanceof Date?new t.constructor(e):new Date(e)}function kt(t,e){return xt(e||t,t)}function $t(t,e,i){const o=kt(t,i?.in);if(isNaN(e))return xt(t,NaN);if(!e)return o;const r=o.getDate(),s=xt(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let St={};function Dt(){return St}function Et(t,e){const i=Dt(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=kt(t,e?.in),s=r.getDay(),n=(s<o?7:0)+s-o;return r.setDate(r.getDate()-n),r.setHours(0,0,0,0),r}function Ct(t,e){return Et(t,{...e,weekStartsOn:1})}function Ot(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=xt(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=Ct(r),n=xt(i,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const a=Ct(n);return i.getTime()>=s.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1}function Ft(t){const e=kt(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Mt(t,...e){const i=xt.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function Tt(t,e){const i=kt(t,e?.in);return i.setHours(0,0,0,0),i}function Lt(t,e,i){return $t(t,12*e,i)}function Bt(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+kt(t)));var e}function _t(t,e){const i=kt(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const Pt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Rt(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const jt={date:Rt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Rt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Rt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},At={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function zt(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=i?.width?String(i.width):e;o=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=i?.width?String(i.width):t.defaultWidth;o=t.values[r]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function Nt(t){return(e,i={})=>{const o=i.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=e.match(r);if(!s)return null;const n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(a,(t=>t.test(n))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(a,(t=>t.test(n)));let d;d=t.valueCallback?t.valueCallback(l):l,d=i.valueCallback?i.valueCallback(d):d;return{value:d,rest:e.slice(n.length)}}}var Wt;const Vt={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=Pt[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:jt,formatRelative:(t,e,i,o)=>At[t],localize:{ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:zt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:zt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:zt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:zt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:zt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Wt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(Wt.matchPattern);if(!i)return null;const o=i[0],r=t.match(Wt.parsePattern);if(!r)return null;let s=Wt.valueCallback?Wt.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:Nt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Nt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:Nt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Nt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Nt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function It(t,e){const i=kt(t,e?.in),o=function(t,e){const[i,o]=Mt(0,t,e),r=Tt(i),s=Tt(o),n=+r-Ft(r),a=+s-Ft(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=kt(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function qt(t,e){const i=kt(t,e?.in),o=+Ct(i)-+function(t,e){const i=Ot(t,e),o=xt(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Ct(o)}(i);return Math.round(o/ft)+1}function Ut(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=Dt(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=xt(e?.in||t,0);n.setFullYear(o+1,0,s),n.setHours(0,0,0,0);const a=Et(n,e),l=xt(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=Et(l,e);return+i>=+a?o+1:+i>=+d?o:o-1}function Ht(t,e){const i=kt(t,e?.in),o=+Et(i,e)-+function(t,e){const i=Dt(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Ut(t,e),s=xt(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),Et(s,e)}(i,e);return Math.round(o/ft)+1}function Yt(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Gt={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Yt("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Yt(i+1,2)},d:(t,e)=>Yt(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>Yt(t.getHours()%12||12,e.length),H:(t,e)=>Yt(t.getHours(),e.length),m:(t,e)=>Yt(t.getMinutes(),e.length),s:(t,e)=>Yt(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Yt(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Kt="midnight",Xt="noon",Qt="morning",Jt="afternoon",Zt="evening",te="night",ee={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return Gt.y(t,e)},Y:function(t,e,i,o){const r=Ut(t,o),s=r>0?r:1-r;if("YY"===e){return Yt(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Yt(s,e.length)},R:function(t,e){return Yt(Ot(t),e.length)},u:function(t,e){return Yt(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Yt(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Yt(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return Gt.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return Yt(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const r=Ht(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Yt(r,e.length)},I:function(t,e,i){const o=qt(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Yt(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Gt.d(t,e)},D:function(t,e,i){const o=It(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Yt(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Yt(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Yt(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Yt(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let r;switch(r=12===o?Xt:0===o?Kt:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let r;switch(r=o>=17?Zt:o>=12?Jt:o>=4?Qt:te,e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return Gt.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Gt.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Yt(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Yt(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Gt.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Gt.s(t,e)},S:function(t,e){return Gt.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return oe(o);case"XXXX":case"XX":return re(o);default:return re(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return oe(o);case"xxxx":case"xx":return re(o);default:return re(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ie(o,":");default:return"GMT"+re(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ie(o,":");default:return"GMT"+re(o,":")}},t:function(t,e,i){return Yt(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Yt(+t,e.length)}};function ie(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),s=o%60;return 0===s?i+String(r):i+String(r)+e+Yt(s,2)}function oe(t,e){if(t%60==0){return(t>0?"-":"+")+Yt(Math.abs(t)/60,2)}return re(t,e)}function re(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Yt(Math.trunc(o/60),2)+e+Yt(o%60,2)}const se=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},ne=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ae={p:ne,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return se(t,e);let s;switch(o){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",se(o,e)).replace("{{time}}",ne(r,e))}},le=/^D+$/,de=/^Y+$/,ce=["D","DD","YY","YYYY"];const he=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ue=/^'([^]*?)'?$/,ge=/''/g,be=/[a-zA-Z]/;function me(t,e,i){const o=Dt(),r=o.locale??Vt,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=kt(t,i?.in);if(!Bt(a))throw new RangeError("Invalid time value");let l=e.match(pe).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,ae[e])(t,r.formatLong)}return t})).join("").match(he).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:ye(t)};if(ee[e])return{isToken:!0,value:t};if(e.match(be))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const d={firstWeekContainsDate:s,weekStartsOn:n,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(function(t){return de.test(t)}(o)||function(t){return le.test(t)}(o))&&function(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),ce.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,ee[o[0]])(a,o,r.localize,d)})).join("")}function ye(t){const e=t.match(ue);return e?e[1].replace(ge,"'"):t}function ve(t,e){return kt(t,e?.in).getDate()}function fe(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=xt(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function we(t,e){return+kt(t)>+kt(e)}function xe(t,e){return+kt(t)<+kt(e)}function ke(t,e,i){const[o,r]=Mt(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function $e(t,e,i){const[o,r]=Mt(0,t,e);return o.getFullYear()===r.getFullYear()}function Se(t,e){return function(t,e){const[i,o]=Mt(0,t,e);return+Tt(i)===+Tt(o)}(xt(t,t),function(t){return xt(t,Date.now())}(t))}function De(t,e,i){const o=kt(t,i?.in);return o.setDate(e),o}let Ee=class extends t{static{this.styles=[Z,o`
|
|
3312
|
+
`}};s([L({type:Array}),n("design:type",Array)],vt.prototype,"acceptedFileTypes",void 0),s([L({type:Number}),n("design:type",Object)],vt.prototype,"maxFiles",void 0),s([L({type:Number}),n("design:type",Object)],vt.prototype,"maxFileSize",void 0),s([L({type:Boolean}),n("design:type",Object)],vt.prototype,"isShowInfoSize",void 0),s([L({type:Boolean}),n("design:type",Object)],vt.prototype,"isChangeStyleError",void 0),s([B(),n("design:type",Object)],vt.prototype,"isDragging",void 0),s([B(),n("design:type",Array)],vt.prototype,"imageUrls",void 0),s([B(),n("design:type",Boolean)],vt.prototype,"isMaxFilesReached",void 0),vt=s([a("upload-image")],vt);const ft=6048e5,wt=Symbol.for("constructDateFrom");function xt(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&wt in t?t[wt](e):t instanceof Date?new t.constructor(e):new Date(e)}function kt(t,e){return xt(e||t,t)}function $t(t,e,i){const o=kt(t,i?.in);if(isNaN(e))return xt(t,NaN);if(!e)return o;const r=o.getDate(),s=xt(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let St={};function Dt(){return St}function Et(t,e){const i=Dt(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=kt(t,e?.in),s=r.getDay(),n=(s<o?7:0)+s-o;return r.setDate(r.getDate()-n),r.setHours(0,0,0,0),r}function Ct(t,e){return Et(t,{...e,weekStartsOn:1})}function Ot(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=xt(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=Ct(r),n=xt(i,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const a=Ct(n);return i.getTime()>=s.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1}function Ft(t){const e=kt(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Mt(t,...e){const i=xt.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function Tt(t,e){const i=kt(t,e?.in);return i.setHours(0,0,0,0),i}function Lt(t,e,i){return $t(t,12*e,i)}function Bt(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+kt(t)));var e}function _t(t,e){const i=kt(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const Pt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function jt(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const Rt={date:jt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:jt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:jt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},At={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function zt(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=i?.width?String(i.width):e;o=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=i?.width?String(i.width):t.defaultWidth;o=t.values[r]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function Nt(t){return(e,i={})=>{const o=i.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=e.match(r);if(!s)return null;const n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(a,(t=>t.test(n))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(a,(t=>t.test(n)));let d;d=t.valueCallback?t.valueCallback(l):l,d=i.valueCallback?i.valueCallback(d):d;return{value:d,rest:e.slice(n.length)}}}var Wt;const Vt={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=Pt[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:Rt,formatRelative:(t,e,i,o)=>At[t],localize:{ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:zt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:zt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:zt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:zt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:zt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Wt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(Wt.matchPattern);if(!i)return null;const o=i[0],r=t.match(Wt.parsePattern);if(!r)return null;let s=Wt.valueCallback?Wt.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:Nt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Nt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:Nt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Nt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Nt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function It(t,e){const i=kt(t,e?.in),o=function(t,e){const[i,o]=Mt(0,t,e),r=Tt(i),s=Tt(o),n=+r-Ft(r),a=+s-Ft(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=kt(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function qt(t,e){const i=kt(t,e?.in),o=+Ct(i)-+function(t,e){const i=Ot(t,e),o=xt(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Ct(o)}(i);return Math.round(o/ft)+1}function Ut(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=Dt(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=xt(e?.in||t,0);n.setFullYear(o+1,0,s),n.setHours(0,0,0,0);const a=Et(n,e),l=xt(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=Et(l,e);return+i>=+a?o+1:+i>=+d?o:o-1}function Ht(t,e){const i=kt(t,e?.in),o=+Et(i,e)-+function(t,e){const i=Dt(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Ut(t,e),s=xt(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),Et(s,e)}(i,e);return Math.round(o/ft)+1}function Yt(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Gt={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Yt("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Yt(i+1,2)},d:(t,e)=>Yt(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>Yt(t.getHours()%12||12,e.length),H:(t,e)=>Yt(t.getHours(),e.length),m:(t,e)=>Yt(t.getMinutes(),e.length),s:(t,e)=>Yt(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Yt(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Kt="midnight",Xt="noon",Qt="morning",Jt="afternoon",Zt="evening",te="night",ee={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return Gt.y(t,e)},Y:function(t,e,i,o){const r=Ut(t,o),s=r>0?r:1-r;if("YY"===e){return Yt(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Yt(s,e.length)},R:function(t,e){return Yt(Ot(t),e.length)},u:function(t,e){return Yt(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Yt(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Yt(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return Gt.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return Yt(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const r=Ht(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Yt(r,e.length)},I:function(t,e,i){const o=qt(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Yt(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Gt.d(t,e)},D:function(t,e,i){const o=It(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Yt(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Yt(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Yt(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Yt(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let r;switch(r=12===o?Xt:0===o?Kt:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let r;switch(r=o>=17?Zt:o>=12?Jt:o>=4?Qt:te,e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return Gt.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Gt.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Yt(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Yt(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Gt.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Gt.s(t,e)},S:function(t,e){return Gt.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return oe(o);case"XXXX":case"XX":return re(o);default:return re(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return oe(o);case"xxxx":case"xx":return re(o);default:return re(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ie(o,":");default:return"GMT"+re(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ie(o,":");default:return"GMT"+re(o,":")}},t:function(t,e,i){return Yt(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Yt(+t,e.length)}};function ie(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),s=o%60;return 0===s?i+String(r):i+String(r)+e+Yt(s,2)}function oe(t,e){if(t%60==0){return(t>0?"-":"+")+Yt(Math.abs(t)/60,2)}return re(t,e)}function re(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Yt(Math.trunc(o/60),2)+e+Yt(o%60,2)}const se=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},ne=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ae={p:ne,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return se(t,e);let s;switch(o){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",se(o,e)).replace("{{time}}",ne(r,e))}},le=/^D+$/,de=/^Y+$/,ce=["D","DD","YY","YYYY"];const he=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ue=/^'([^]*?)'?$/,ge=/''/g,be=/[a-zA-Z]/;function me(t,e,i){const o=Dt(),r=o.locale??Vt,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=kt(t,i?.in);if(!Bt(a))throw new RangeError("Invalid time value");let l=e.match(pe).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,ae[e])(t,r.formatLong)}return t})).join("").match(he).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:ye(t)};if(ee[e])return{isToken:!0,value:t};if(e.match(be))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const d={firstWeekContainsDate:s,weekStartsOn:n,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(function(t){return de.test(t)}(o)||function(t){return le.test(t)}(o))&&function(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),ce.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,ee[o[0]])(a,o,r.localize,d)})).join("")}function ye(t){const e=t.match(ue);return e?e[1].replace(ge,"'"):t}function ve(t,e){return kt(t,e?.in).getDate()}function fe(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=xt(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function we(t,e){return+kt(t)>+kt(e)}function xe(t,e){return+kt(t)<+kt(e)}function ke(t,e,i){const[o,r]=Mt(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function $e(t,e,i){const[o,r]=Mt(0,t,e);return o.getFullYear()===r.getFullYear()}function Se(t,e){return function(t,e){const[i,o]=Mt(0,t,e);return+Tt(i)===+Tt(o)}(xt(t,t),function(t){return xt(t,Date.now())}(t))}function De(t,e,i){const o=kt(t,i?.in);return o.setDate(e),o}let Ee=class extends t{static{this.styles=[Z,o`
|
|
3311
3313
|
${X}
|
|
3312
3314
|
|
|
3313
3315
|
/* Estilos generales del contenedor del calendario (escritorio) */
|
|
@@ -3374,7 +3376,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3374
3376
|
}
|
|
3375
3377
|
|
|
3376
3378
|
.month-year-button {
|
|
3377
|
-
${
|
|
3379
|
+
${R}
|
|
3378
3380
|
display: flex;
|
|
3379
3381
|
align-items: center;
|
|
3380
3382
|
justify-content: center;
|