@randstad-uca/design-system 1.0.106 → 1.0.108
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/assets/icons/postulation.svg +4 -0
- package/dist/assets/icons/search-white.svg +10 -0
- package/dist/components/MfaModal.d.ts +48 -0
- package/dist/components/Navbar.d.ts +24 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +428 -65
- package/dist/index.js.map +1 -1
- package/dist/package.json +7 -2
- package/dist/stories/MfaModal.stories.d.ts +54 -0
- package/dist/stories/Navbar.stories.d.ts +21 -0
- package/package.json +7 -2
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@ const a=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)}
|
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const M={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:C},
|
|
23
|
+
const M={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:C},_=(t=M,e,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),s.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];e.call(this,i),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function T(t){return(e,i)=>"object"==typeof i?_(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/function
|
|
28
|
+
*/function B(t){return T({...t,state:!0,attribute:!1})}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -36,7 +36,7 @@ const M={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:C},T=(t=M,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function
|
|
39
|
+
function L(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let R=class extends t{constructor(){super(...arguments),this.label="",this.placeholder="",this.labelColor="",this.value="",this.required=!1,this.optional=!1,this.disabled=!1,this.error=!1,this.errorMessage=null,this.helper=null,this.helperAlign="left",this.helpClickable=!1,this._tooltipOpen=!1,this._lastClickTime=0,this._boundCloseTooltip=this._closeTooltip.bind(this)}_handleTooltipClick(t){t.stopPropagation(),t.preventDefault(),this._lastClickTime=Date.now(),this._tooltipOpen=!this._tooltipOpen}_closeTooltip(){this.helpClickable&&this._tooltipOpen&&Date.now()-this._lastClickTime>50&&(this._tooltipOpen=!1)}updated(t){super.updated(t),t.has("helpClickable")&&(this.helpClickable?document.addEventListener("click",this._boundCloseTooltip):document.removeEventListener("click",this._boundCloseTooltip))}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._boundCloseTooltip)}renderLabelContainer(){return e`
|
|
40
40
|
${this.label?e`
|
|
41
41
|
<div class="label-container">
|
|
42
42
|
${this.renderLabel()}
|
|
@@ -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([
|
|
88
|
+
`}};s([T({type:String}),n("design:type",Object)],R.prototype,"label",void 0),s([T({type:String}),n("design:type",Object)],R.prototype,"placeholder",void 0),s([T({type:String}),n("design:type",Object)],R.prototype,"labelColor",void 0),s([T(),n("design:type",Object)],R.prototype,"value",void 0),s([T({type:Boolean}),n("design:type",Object)],R.prototype,"required",void 0),s([T({type:Boolean}),n("design:type",Object)],R.prototype,"optional",void 0),s([T({type:Boolean}),n("design:type",Object)],R.prototype,"disabled",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],R.prototype,"error",void 0),s([T({type:String}),n("design:type",Object)],R.prototype,"errorMessage",void 0),s([T({type:String}),n("design:type",Object)],R.prototype,"helper",void 0),s([T({type:String}),n("design:type",String)],R.prototype,"helperAlign",void 0),s([T({type:String}),n("design:type",String)],R.prototype,"help",void 0),s([T({type:Boolean}),n("design:type",Object)],R.prototype,"helpClickable",void 0),s([T({type:String}),n("design:type",String)],R.prototype,"helpLink",void 0),s([T({type:String}),n("design:type",String)],R.prototype,"helpLinkTooltipMessage",void 0),s([B(),n("design:type",Object)],R.prototype,"_tooltipOpen",void 0),R=s([a("base-control")],R);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
|
+
`,P=o`
|
|
95
95
|
font-family: 'Graphik', sans-serif;
|
|
96
96
|
font-weight: 400;
|
|
97
97
|
font-size: 14px;
|
|
@@ -109,21 +109,21 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
109
109
|
font-size: 18px;
|
|
110
110
|
line-height: 30px;
|
|
111
111
|
letter-spacing: 0%;
|
|
112
|
-
`,
|
|
112
|
+
`,I=o`
|
|
113
113
|
font-family: 'Graphik', sans-serif;
|
|
114
114
|
font-weight: 400;
|
|
115
115
|
font-size: 18px;
|
|
116
116
|
line-height: 30px;
|
|
117
117
|
letter-spacing: 0%;
|
|
118
118
|
vertical-align: middle;
|
|
119
|
-
`,
|
|
119
|
+
`,N=o`
|
|
120
120
|
font-family: 'Graphik', sans-serif;
|
|
121
121
|
font-weight: 400;
|
|
122
122
|
font-size: 20px;
|
|
123
123
|
line-height: 30px;
|
|
124
124
|
letter-spacing: -1%;
|
|
125
125
|
vertical-align: middle;
|
|
126
|
-
`,
|
|
126
|
+
`,W=o`
|
|
127
127
|
font-family: 'Graphik', sans-serif;
|
|
128
128
|
font-weight: 400;
|
|
129
129
|
font-size: 26px;
|
|
@@ -199,7 +199,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
199
199
|
|
|
200
200
|
@media (min-width: 501px) and (hover: hover) and (pointer: fine) {
|
|
201
201
|
.header:hover .icon-wrapper {
|
|
202
|
-
background-color: var(
|
|
202
|
+
background-color: var(--primary-color-10);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
|
|
@@ -232,7 +232,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
232
232
|
<div class="content ${this.isOpen?"open":""}">
|
|
233
233
|
<slot></slot>
|
|
234
234
|
</div>
|
|
235
|
-
`}};s([
|
|
235
|
+
`}};s([T({type:String}),n("design:type",Object)],q.prototype,"title",void 0),s([B(),n("design:type",Object)],q.prototype,"isOpen",void 0),s([B(),n("design:type",Object)],q.prototype,"isDesktop",void 0),q=s([a("accordion-panel")],q);let U=class extends t{static{this.styles=o`
|
|
236
236
|
:host {
|
|
237
237
|
display: flex;
|
|
238
238
|
flex-direction: column;
|
|
@@ -601,7 +601,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
601
601
|
`}
|
|
602
602
|
</div>
|
|
603
603
|
</button>
|
|
604
|
-
`}};s([
|
|
604
|
+
`}};s([T({type:String}),n("design:type",String)],H.prototype,"type",void 0),s([T({type:String}),n("design:type",String)],H.prototype,"variant",void 0),s([T({type:String}),n("design:type",String)],H.prototype,"size",void 0),s([T({type:String}),n("design:type",Object)],H.prototype,"label",void 0),s([T({type:Boolean}),n("design:type",Object)],H.prototype,"loader",void 0),s([T({type:String,attribute:"icon-src"}),n("design:type",String)],H.prototype,"iconSrc",void 0),s([T({type:String}),n("design:type",String)],H.prototype,"iconPosition",void 0),s([T({type:String}),n("design:type",Object)],H.prototype,"iconName",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Boolean)],H.prototype,"disabled",void 0),s([T({type:String}),n("design:type",Object)],H.prototype,"idevent",void 0),H=s([a("randstad-button")],H);let Y=class extends t{constructor(){super(...arguments),this.img="",this.name="",this.title="",this.description="",this.buttonLabel="",this.cardId="",this.width="",this.height=""}static{this.styles=o`
|
|
605
605
|
:host {
|
|
606
606
|
display: inline-block;
|
|
607
607
|
font-family: "Graphik", sans-serif;
|
|
@@ -687,7 +687,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
687
687
|
}
|
|
688
688
|
|
|
689
689
|
.description {
|
|
690
|
-
${
|
|
690
|
+
${P}
|
|
691
691
|
margin: 0;
|
|
692
692
|
}
|
|
693
693
|
|
|
@@ -738,14 +738,14 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
738
738
|
</div>
|
|
739
739
|
</div>
|
|
740
740
|
</div>
|
|
741
|
-
`}};s([
|
|
741
|
+
`}};s([T({type:String}),n("design:type",Object)],Y.prototype,"img",void 0),s([T({type:String}),n("design:type",Object)],Y.prototype,"name",void 0),s([T({type:String}),n("design:type",Object)],Y.prototype,"title",void 0),s([T({type:String}),n("design:type",Object)],Y.prototype,"description",void 0),s([T({type:String}),n("design:type",Object)],Y.prototype,"buttonLabel",void 0),s([T({type:String}),n("design:type",Object)],Y.prototype,"cardId",void 0),s([T({type:Object}),n("design:type",Object)],Y.prototype,"onClick",void 0),s([T({type:String}),n("design:type",String)],Y.prototype,"width",void 0),s([T({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`
|
|
742
742
|
:host {
|
|
743
743
|
display: block;
|
|
744
744
|
max-width: 100%;
|
|
745
745
|
}
|
|
746
746
|
|
|
747
747
|
label {
|
|
748
|
-
${
|
|
748
|
+
${P}
|
|
749
749
|
display: flex;
|
|
750
750
|
align-items: center;
|
|
751
751
|
gap: 8px;
|
|
@@ -866,7 +866,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
866
866
|
<slot></slot>
|
|
867
867
|
</span>
|
|
868
868
|
</label>
|
|
869
|
-
`}};s([
|
|
869
|
+
`}};s([T({type:Boolean,reflect:!0}),n("design:type",Object)],G.prototype,"checked",void 0),s([T({type:Boolean}),n("design:type",Object)],G.prototype,"error",void 0),s([T({type:Boolean}),n("design:type",Object)],G.prototype,"disabled",void 0),s([T({type:String}),n("design:type",Object)],G.prototype,"checkedColor",void 0),s([T({type:String}),n("design:type",Object)],G.prototype,"checkedBgColor",void 0),G=s([a("randstad-checkbox")],G);const K=o`
|
|
870
870
|
.label-container {
|
|
871
871
|
display: flex;
|
|
872
872
|
align-items: center;
|
|
@@ -982,7 +982,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
982
982
|
|
|
983
983
|
.optional {
|
|
984
984
|
color: var( --secondary-color-60 );
|
|
985
|
-
${
|
|
985
|
+
${j}
|
|
986
986
|
}
|
|
987
987
|
|
|
988
988
|
randstad-icon {
|
|
@@ -1262,7 +1262,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1262
1262
|
|
|
1263
1263
|
${this.renderHelper()}
|
|
1264
1264
|
</div>
|
|
1265
|
-
`}};s([
|
|
1265
|
+
`}};s([T({type:String}),n("design:type",Object)],et.prototype,"keydown",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"keydownRegex",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"size",void 0),s([T({type:String}),n("design:type",Object)],et.prototype,"icon",void 0),s([T({type:Boolean}),n("design:type",Boolean)],et.prototype,"typing",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"type",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"linkText",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"linkRoute",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],et.prototype,"isPasswordVisible",void 0),s([T({type:Boolean}),n("design:type",Boolean)],et.prototype,"cleanButton",void 0),s([T({type:Number}),n("design:type",Number)],et.prototype,"maxLength",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"heightTextArea",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"maxHeightTextArea",void 0),et=s([a("randstad-form")],et);let it=class extends R{constructor(){super(...arguments),this.rows=""}static{this.styles=o`
|
|
1266
1266
|
${Q}
|
|
1267
1267
|
${Z}
|
|
1268
1268
|
${K}
|
|
@@ -1297,7 +1297,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1297
1297
|
|
|
1298
1298
|
${this.renderHelper()}
|
|
1299
1299
|
</div>
|
|
1300
|
-
`}};s([
|
|
1300
|
+
`}};s([T({type:String}),n("design:type",String)],it.prototype,"rows",void 0),it=s([a("randstad-form-group")],it);class ot extends t{constructor(){super(...arguments),this.name="",this.size="24px",this.color="",this.svgTemplate=null}static{this.styles=o`
|
|
1301
1301
|
:host {
|
|
1302
1302
|
display: inline-flex;
|
|
1303
1303
|
width: var( --icon-size, 24px );
|
|
@@ -1309,7 +1309,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1309
1309
|
svg {
|
|
1310
1310
|
width: var( --icon-size, 24px );
|
|
1311
1311
|
height: var( --icon-size, 24px );
|
|
1312
|
-
fill: var( --icon-color,
|
|
1312
|
+
fill: var( --icon-color, #2175D9 );
|
|
1313
1313
|
}
|
|
1314
1314
|
|
|
1315
1315
|
.custom-icon {
|
|
@@ -1323,7 +1323,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1323
1323
|
<div class="custom-icon" style="color: ${this.color};">
|
|
1324
1324
|
${this.svgTemplate}
|
|
1325
1325
|
</div>
|
|
1326
|
-
`:e``}}s([
|
|
1326
|
+
`:e``}}s([T({type:String}),n("design:type",Object)],ot.prototype,"name",void 0),s([T({type:String}),n("design:type",Object)],ot.prototype,"size",void 0),s([T({type:String}),n("design:type",Object)],ot.prototype,"color",void 0),s([B(),n("design:type",Object)],ot.prototype,"svgTemplate",void 0),customElements.define("randstad-icon",ot);const rt=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let st=class extends R{constructor(){super(...arguments),this.platform="linkedin",this.size="md",this.maxLength=100,this.isPasswordVisible=!1,this.customSanitizeRegex=void 0,this.customUrlValidationRegex=void 0,this.value="",this._inputValue="",this._showFormatError=!1,this._onChangeFn=()=>{},this._onTouchedFn=()=>{}}static{this.styles=[J,o`
|
|
1327
1327
|
${Q}
|
|
1328
1328
|
${Z}
|
|
1329
1329
|
${K}
|
|
@@ -1499,7 +1499,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1499
1499
|
${t}
|
|
1500
1500
|
</p>
|
|
1501
1501
|
`}
|
|
1502
|
-
`}writeValue(t){if(t&&"string"==typeof t){const e=this._extractUsernameFromValue(t);e!==this._inputValue&&(this._inputValue=e,this.value=t,this.requestUpdate())}else t||(this._inputValue="",this.value="",this.requestUpdate())}registerOnChange(t){this._onChangeFn=t}registerOnTouched(t){this._onTouchedFn=t}setDisabledState(t){this.disabled=t}};s([
|
|
1502
|
+
`}writeValue(t){if(t&&"string"==typeof t){const e=this._extractUsernameFromValue(t);e!==this._inputValue&&(this._inputValue=e,this.value=t,this.requestUpdate())}else t||(this._inputValue="",this.value="",this.requestUpdate())}registerOnChange(t){this._onChangeFn=t}registerOnTouched(t){this._onTouchedFn=t}setDisabledState(t){this.disabled=t}};s([T({type:String}),n("design:type",String)],st.prototype,"platform",void 0),s([T({type:String}),n("design:type",String)],st.prototype,"size",void 0),s([T({type:Number}),n("design:type",Number)],st.prototype,"maxLength",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],st.prototype,"isPasswordVisible",void 0),s([T({type:String}),n("design:type",Object)],st.prototype,"customSanitizeRegex",void 0),s([T({type:String}),n("design:type",Object)],st.prototype,"customUrlValidationRegex",void 0),s([T({type:String,hasChanged:()=>!1}),n("design:type",String)],st.prototype,"value",void 0),s([B(),n("design:type",String)],st.prototype,"_inputValue",void 0),s([B(),n("design:type",Boolean)],st.prototype,"_showFormatError",void 0),st=s([a("randstad-social-input")],st);let nt=class extends t{constructor(){super(...arguments),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1}static{this.styles=o`
|
|
1503
1503
|
:host {
|
|
1504
1504
|
display: block;
|
|
1505
1505
|
font-family: 'Graphik', sans-serif;
|
|
@@ -1556,7 +1556,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1556
1556
|
|
|
1557
1557
|
<span class="message">${this.message}</span>
|
|
1558
1558
|
</div>
|
|
1559
|
-
`}};s([
|
|
1559
|
+
`}};s([T({type:String}),n("design:type",String)],nt.prototype,"type",void 0),s([T({type:String}),n("design:type",String)],nt.prototype,"icon",void 0),s([T({type:String}),n("design:type",String)],nt.prototype,"message",void 0),s([T({type:Boolean}),n("design:type",Boolean)],nt.prototype,"open",void 0),nt=s([a("randstad-notice")],nt);let at=class extends t{constructor(){super(...arguments),this.open=!1,this.title="Título del modal",this.showNotice=!1,this.noticeType="informative",this.noticeMessage="",this.noticeIcon="info",this.showPrimaryButton=!1,this.primaryButtonLabel="Aceptar",this.showSecondaryButton=!1,this.secondaryButtonLabel="Cancelar",this.isFooterCustom=!1,this.isPrimaryLoader=!1,this.isPrimaryDisabled=!1,this.modalWidth="500px",this.modalHeight="80dvh",this.maxHeight="90dvh",this.hideFooter=!1,this.scrollable=!1,this.hasDropdownOpen=!1,this.hasCalendarOpen=!1,this.handleDropdownOpen=t=>{const e=t.detail;e&&"boolean"==typeof e.open?this.hasDropdownOpen=e.open:this.hasDropdownOpen=!0},this.handleCalendarOpen=t=>{const e=t.detail;e&&"boolean"==typeof e.open?this.hasCalendarOpen=e.open:this.hasCalendarOpen=!0},this.setScrollableMode=()=>{this.scrollable=window.innerWidth>940}}static{this.styles=[J,o`
|
|
1560
1560
|
${X}
|
|
1561
1561
|
|
|
1562
1562
|
:host {
|
|
@@ -1658,7 +1658,10 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1658
1658
|
}
|
|
1659
1659
|
|
|
1660
1660
|
.modal-title {
|
|
1661
|
-
|
|
1661
|
+
display: flex;
|
|
1662
|
+
justify-content: space-between;
|
|
1663
|
+
align-items: center;
|
|
1664
|
+
${W}
|
|
1662
1665
|
font-style: regular;
|
|
1663
1666
|
font-size: 24px;
|
|
1664
1667
|
line-height: 32px;
|
|
@@ -1685,6 +1688,14 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1685
1688
|
align-items: center;
|
|
1686
1689
|
justify-content: center;
|
|
1687
1690
|
padding: 0;
|
|
1691
|
+
width: 40px;
|
|
1692
|
+
height: 40px;
|
|
1693
|
+
border-radius: 50%;
|
|
1694
|
+
transition: background-color 0.2s ease;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
.modal-close:hover {
|
|
1698
|
+
background-color: var(--primary-color-10);
|
|
1688
1699
|
}
|
|
1689
1700
|
|
|
1690
1701
|
.modal-body {
|
|
@@ -1716,25 +1727,31 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1716
1727
|
gap: 16px;
|
|
1717
1728
|
border-top: 1px solid var(--secondary-color-20);
|
|
1718
1729
|
}
|
|
1730
|
+
|
|
1731
|
+
@media ( max-width: 940px ) {
|
|
1732
|
+
.modal-close:hover {
|
|
1733
|
+
background-color: transparent;
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1719
1736
|
`]}closeModal(){this.dispatchEvent(new CustomEvent("modal-close"))}connectedCallback(){super.connectedCallback(),this.setScrollableMode(),window.addEventListener("resize",this.setScrollableMode),this.addEventListener("dropdown-toggle",this.handleDropdownOpen),this.addEventListener("calendar-toggle",this.handleDropdownOpen),this.addEventListener("dropdown-toggle-calendar",this.handleCalendarOpen)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.setScrollableMode),this.removeEventListener("dropdown-toggle",this.handleDropdownOpen),this.removeEventListener("calendar-toggle",this.handleDropdownOpen),this.removeEventListener("dropdown-toggle-calendar",this.handleCalendarOpen)}getFooterClass(){return!this.isFooterCustom||this.showPrimaryButton||this.showSecondaryButton?this.showPrimaryButton&&this.showSecondaryButton?"two-buttons":"one-button":"footer-custom"}render(){return e`
|
|
1720
1737
|
<div class="overlay" role="dialog" aria-modal="true">
|
|
1721
1738
|
<div class="modal" style="--modal-width: ${this.modalWidth}; --modal-height: ${this.modalHeight}; --modal-max-height: ${this.maxHeight};">
|
|
1722
1739
|
<div class="modal-header">
|
|
1723
1740
|
<div class="modal-header-content">
|
|
1724
1741
|
<div class="titles-container">
|
|
1725
|
-
<div class="modal-title">${this.title}
|
|
1742
|
+
<div class="modal-title">${this.title}
|
|
1743
|
+
<button class="modal-close" @click=${this.closeModal} aria-label="Cerrar modal">
|
|
1744
|
+
<randstad-icon
|
|
1745
|
+
name="close"
|
|
1746
|
+
size="24"
|
|
1747
|
+
.color=${"var( --primary-color )"}
|
|
1748
|
+
>
|
|
1749
|
+
</randstad-icon>
|
|
1750
|
+
</button>
|
|
1751
|
+
</div>
|
|
1726
1752
|
|
|
1727
1753
|
${this.subtitle?e`<div class="modal-subtitle">${this.subtitle}</div>`:i}
|
|
1728
|
-
</div>
|
|
1729
|
-
|
|
1730
|
-
<button class="modal-close" @click=${this.closeModal} aria-label="Cerrar modal">
|
|
1731
|
-
<randstad-icon
|
|
1732
|
-
name="close"
|
|
1733
|
-
size="24"
|
|
1734
|
-
.color=${"var( --primary-color )"}
|
|
1735
|
-
>
|
|
1736
|
-
</randstad-icon>
|
|
1737
|
-
</button>
|
|
1754
|
+
</div>
|
|
1738
1755
|
</div>
|
|
1739
1756
|
|
|
1740
1757
|
${this.showNotice?e`
|
|
@@ -1780,7 +1797,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1780
1797
|
`}
|
|
1781
1798
|
</div>
|
|
1782
1799
|
</div>
|
|
1783
|
-
`}};s([
|
|
1800
|
+
`}};s([T({type:Boolean,reflect:!0}),n("design:type",Object)],at.prototype,"open",void 0),s([T({type:String}),n("design:type",Object)],at.prototype,"title",void 0),s([T({type:String}),n("design:type",String)],at.prototype,"subtitle",void 0),s([T({type:Boolean}),n("design:type",Object)],at.prototype,"showNotice",void 0),s([T({type:String}),n("design:type",String)],at.prototype,"noticeType",void 0),s([T({type:String}),n("design:type",Object)],at.prototype,"noticeMessage",void 0),s([T({type:String}),n("design:type",Object)],at.prototype,"noticeIcon",void 0),s([T({type:Boolean}),n("design:type",Object)],at.prototype,"showPrimaryButton",void 0),s([T({type:String}),n("design:type",Object)],at.prototype,"primaryButtonLabel",void 0),s([T({type:Boolean}),n("design:type",Object)],at.prototype,"showSecondaryButton",void 0),s([T({type:String}),n("design:type",Object)],at.prototype,"secondaryButtonLabel",void 0),s([T({type:Boolean}),n("design:type",Object)],at.prototype,"isFooterCustom",void 0),s([T({type:Boolean}),n("design:type",Object)],at.prototype,"isPrimaryLoader",void 0),s([T({type:Boolean}),n("design:type",Object)],at.prototype,"isPrimaryDisabled",void 0),s([T({type:String}),n("design:type",Object)],at.prototype,"modalWidth",void 0),s([T({type:String}),n("design:type",Object)],at.prototype,"modalHeight",void 0),s([T({type:String}),n("design:type",Object)],at.prototype,"maxHeight",void 0),s([T({type:Boolean}),n("design:type",Object)],at.prototype,"hideFooter",void 0),s([B(),n("design:type",Object)],at.prototype,"scrollable",void 0),s([B(),n("design:type",Object)],at.prototype,"hasDropdownOpen",void 0),s([B(),n("design:type",Object)],at.prototype,"hasCalendarOpen",void 0),at=s([a("custom-modal")],at);let lt=class extends t{constructor(){super(...arguments),this.open=!1,this.type="default",this.icon="warning",this.title="",this.description="",this.width="400px",this.height="",this.buttonText="Aceptar",this.confirmText="Sí",this.cancelText="No",this.closeOnOutsideClick=!1,this.stackedActions=[],this._onBackgroundClick=t=>{if(!this.closeOnOutsideClick)return;const e=t.composedPath(),i=this.renderRoot.querySelector(".popup");i&&!e.includes(i)&&(this.dispatchEvent(new CustomEvent("popup-close",{detail:null})),this.open=!1)}}static{this.styles=o`
|
|
1784
1801
|
:host {
|
|
1785
1802
|
display: none;
|
|
1786
1803
|
position: fixed;
|
|
@@ -1846,7 +1863,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1846
1863
|
}
|
|
1847
1864
|
|
|
1848
1865
|
.popup-title {
|
|
1849
|
-
${
|
|
1866
|
+
${N}
|
|
1850
1867
|
margin: 0;
|
|
1851
1868
|
color: var(--secondary-color-80);
|
|
1852
1869
|
}
|
|
@@ -1880,7 +1897,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1880
1897
|
}
|
|
1881
1898
|
|
|
1882
1899
|
.action-item {
|
|
1883
|
-
${
|
|
1900
|
+
${I};
|
|
1884
1901
|
display: flex;
|
|
1885
1902
|
align-items: center;
|
|
1886
1903
|
gap: 16px;
|
|
@@ -1976,7 +1993,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1976
1993
|
`}
|
|
1977
1994
|
</div>
|
|
1978
1995
|
</div>
|
|
1979
|
-
`}};s([
|
|
1996
|
+
`}};s([T({type:Boolean,reflect:!0}),n("design:type",Object)],lt.prototype,"open",void 0),s([T({type:String}),n("design:type",String)],lt.prototype,"type",void 0),s([T({type:String}),n("design:type",Object)],lt.prototype,"icon",void 0),s([T({type:String}),n("design:type",Object)],lt.prototype,"title",void 0),s([T({type:String}),n("design:type",Object)],lt.prototype,"description",void 0),s([T({type:String}),n("design:type",Object)],lt.prototype,"width",void 0),s([T({type:String}),n("design:type",Object)],lt.prototype,"height",void 0),s([T({type:String}),n("design:type",Object)],lt.prototype,"buttonText",void 0),s([T({type:String}),n("design:type",Object)],lt.prototype,"confirmText",void 0),s([T({type:String}),n("design:type",Object)],lt.prototype,"cancelText",void 0),s([T({type:Boolean}),n("design:type",Object)],lt.prototype,"closeOnOutsideClick",void 0),s([T({type:Array}),n("design:type",Array)],lt.prototype,"stackedActions",void 0),lt=s([a("custom-popup")],lt);let dt=class extends t{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=o`
|
|
1980
1997
|
:host {
|
|
1981
1998
|
display: inline-block;
|
|
1982
1999
|
width: 64px;
|
|
@@ -1989,7 +2006,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1989
2006
|
}
|
|
1990
2007
|
|
|
1991
2008
|
.circle-text {
|
|
1992
|
-
${
|
|
2009
|
+
${j};
|
|
1993
2010
|
text-align: center;
|
|
1994
2011
|
vertical-align: middle;
|
|
1995
2012
|
fill: var(--randstad-dark-blue-40);
|
|
@@ -2037,7 +2054,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2037
2054
|
${this.value} de ${this.max}
|
|
2038
2055
|
</text>
|
|
2039
2056
|
</svg>
|
|
2040
|
-
`}};s([
|
|
2057
|
+
`}};s([T({type:Number}),n("design:type",Object)],dt.prototype,"value",void 0),s([T({type:Number}),n("design:type",Object)],dt.prototype,"max",void 0),dt=s([a("progress-circle")],dt);let ct=class extends t{constructor(){super(...arguments),this.name="",this.checked=!1,this.disabled=!1,this.error=!1,this.label="",this.value=""}static{this.styles=o`
|
|
2041
2058
|
:host {
|
|
2042
2059
|
font-family: "Graphik", sans-serif;
|
|
2043
2060
|
|
|
@@ -2181,7 +2198,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2181
2198
|
|
|
2182
2199
|
<span> ${o} </span>
|
|
2183
2200
|
</label>
|
|
2184
|
-
`}};s([
|
|
2201
|
+
`}};s([T({type:String}),n("design:type",Object)],ct.prototype,"name",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"checked",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"disabled",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"error",void 0),s([T({type:String}),n("design:type",Object)],ct.prototype,"label",void 0),s([T({type:String}),n("design:type",Object)],ct.prototype,"value",void 0),ct=s([a("custom-radio")],ct);const ht=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let pt=class extends R{constructor(){super(...arguments),this.value="",this.defaultValue="",this.options=[],this.filterable=!0,this.textLabelFilterNotResult="",this.textLabelMobileSearch="",this.isRenderClearButton=!1,this.sortable=!0,this.isMobile=!1,this.highlightedIndex=-1,this._isCleared=!1,this.originalHtmlOverflow="",this.originalHtmlPaddingRight="",this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.mobileFilterValue="",this.showNoResults=!1,this.lastElement=!1,this.debounceTimeout=null,this.getOptionLabel=t=>"string"==typeof t?t:t.label,this.handleGlobalOverlayOpen=t=>{t.detail!==this&&this.isOpen&&(this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})))},this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this)}static{this.styles=[J,o`
|
|
2185
2202
|
${Q}
|
|
2186
2203
|
${Z}
|
|
2187
2204
|
${K}
|
|
@@ -2340,11 +2357,17 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2340
2357
|
display: flex;
|
|
2341
2358
|
align-items: center;
|
|
2342
2359
|
justify-content: center;
|
|
2343
|
-
width:
|
|
2344
|
-
height:
|
|
2360
|
+
width: 40px;
|
|
2361
|
+
height: 40px;
|
|
2362
|
+
border-radius: 50%;
|
|
2363
|
+
transition: background-color 0.2s ease;
|
|
2345
2364
|
padding: 0;
|
|
2346
2365
|
}
|
|
2347
2366
|
|
|
2367
|
+
.input-wrapper:not(.disabled) .icon-button:hover {
|
|
2368
|
+
background-color: var(--primary-color-10);
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2348
2371
|
randstad-icon {
|
|
2349
2372
|
width: 24px;
|
|
2350
2373
|
height: 24px;
|
|
@@ -2563,6 +2586,12 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2563
2586
|
.mobile-modal .options-list li.no-results-item.mobile-item {
|
|
2564
2587
|
text-align: center;
|
|
2565
2588
|
}
|
|
2589
|
+
|
|
2590
|
+
@media ( max-width: 940px ) {
|
|
2591
|
+
.icon-button:hover {
|
|
2592
|
+
background-color: transparent;
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2566
2595
|
`]}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)}normalizeText(t){return t?t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""):""}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=this.normalizeText(r),a=this.normalizeText(s);if(i&&i.length>0){const t=this.normalizeText(i),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=this.normalizeText(t);let i=this.options.filter((t=>{const i=this.getOptionLabel(t);return this.normalizeText(i).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)),window.addEventListener("overlay-opened",this.handleGlobalOverlayOpen)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),window.removeEventListener("overlay-opened",this.handleGlobalOverlayOpen),this.debounceTimeout&&(clearTimeout(this.debounceTimeout),this.debounceTimeout=null),this.isMobile&&this.toggleDynamicScrollLock(!1),super.disconnectedCallback()}notifyOverlayOpened(){window.dispatchEvent(new CustomEvent("overlay-opened",{detail:this}))}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.disabled||(this.isOpen||(this.notifyOverlayOpened(),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,i=e.value,o=e.selectionStart||0,r=i.slice(0,o).replace(ht,"").length,s=i.replace(ht,"");let n=this.maxLength?s.slice(0,this.maxLength):s;if(n.startsWith(" ")&&(n=n.trimStart()),e.value=n,this.filterValue=n,e.setSelectionRange(r,r),this.notifyOverlayOpened(),this.isOpen=!0,""===n)this.value="",this._isCleared=!0,this.filteredOptions=[...this.options],this.showNoResults=!1,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}));else{const t=this.normalizeText(n);this.filteredOptions=this.options.filter((e=>{const i="string"==typeof e?e:e.label;return this.normalizeText(i).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,i=e.value,o=e.selectionStart||0,r=i.slice(0,o).replace(ht,"").length,s=i.replace(ht,"");let n=this.maxLength?s.slice(0,this.maxLength):s;n.startsWith(" ")&&(n=n.trimStart()),e.value=n,this.mobileFilterValue=n,e.setSelectionRange(r,r);const a=this.normalizeText(n);""===n?(this.value="",this._isCleared=!0,this.filteredOptions=[...this.options],this.showNoResults=!1,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}))):(this.filteredOptions=this.options.filter((t=>{const e="string"==typeof t?t:t.label;return this.normalizeText(e).includes(a)})),this.showNoResults=0===this.filteredOptions.length),this.requestUpdate(),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{n.length>2?this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:n},bubbles:!0,composed:!0})):0===n.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.notifyOverlayOpened(),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()}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]))}preventInvalidStart(t){const e=t.target;if(e&&"INPUT"===e.tagName&&0===e.selectionStart&&1===t.key.length){if(!/[a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]/.test(t.key))return t.preventDefault(),!0}return!1}handlePaste(t){const e=t.target;if(e&&"INPUT"===e.tagName&&0===e.selectionStart){const i=e.selectionStart,o=e.selectionEnd;if(null===i||null===o)return;t.preventDefault();let r=(t.clipboardData?.getData("text")||"").replace(ht,"").replace(/^[^a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]+/,"");r.startsWith(" ")&&(r=r.trimStart()),r&&(e.setRangeText(r,i,o,"end"),e.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}}handleKeyDown(t){if(this.preventInvalidStart(t))return;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.notifyOverlayOpened(),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||!this.filterable&&" "===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"})}renderOptionIcon(t){return t&&"string"==typeof t?e`<span class="icon-list" .innerHTML="${t}"></span>`:i}validateAndCleanOnBlur(){if(!this.filterable)return;const t=this.normalizeText((this.filterValue||"").trim());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 this.normalizeText(String(i))===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`
|
|
2567
2596
|
<randstad-icon
|
|
2568
2597
|
name="${this.isOpen&&this.filteredOptions.length>0?"arrow_up":"arrow_down"}"
|
|
@@ -2711,7 +2740,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2711
2740
|
</div>
|
|
2712
2741
|
</div>
|
|
2713
2742
|
`:i}
|
|
2714
|
-
`}};s([
|
|
2743
|
+
`}};s([T({type:Object}),n("design:type",Object)],pt.prototype,"value",void 0),s([T({type:String,attribute:"default-value"}),n("design:type",Object)],pt.prototype,"defaultValue",void 0),s([T({type:Array}),n("design:type",Array)],pt.prototype,"options",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"filterable",void 0),s([T({type:Number}),n("design:type",Number)],pt.prototype,"maxLength",void 0),s([T({type:String}),n("design:type",String)],pt.prototype,"textLabelFilterNotResult",void 0),s([T({type:String}),n("design:type",String)],pt.prototype,"textLabelMobileSearch",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"isRenderClearButton",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"sortable",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"isMobile",void 0),s([B(),n("design:type",Object)],pt.prototype,"highlightedIndex",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"_isCleared",void 0),s([B(),n("design:type",Array)],pt.prototype,"filteredOptions",void 0),s([B(),n("design:type",Object)],pt.prototype,"filterValue",void 0),s([B(),n("design:type",Object)],pt.prototype,"isOpen",void 0),s([B(),n("design:type",Object)],pt.prototype,"mobileFilterValue",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"showNoResults",void 0),s([T({type:Boolean,attribute:"last-element"}),n("design:type",Object)],pt.prototype,"lastElement",void 0),s([L(".mobile-modal .filter-input"),n("design:type",HTMLInputElement)],pt.prototype,"mobileInputRef",void 0),pt=s([a("filterable-select")],pt);const ut=new CSSStyleSheet;ut.replaceSync("\n @font-face {\n font-family: 'Graphik';\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n .body-s {\n font-weight: 400;\n font-size: 14px;\n line-height: 100%;\n letter-spacing: 0%;\n color: green;\n }\n\n .body-l {\n font-family: Graphik;\n font-size: 18px;\n font-style: normal;\n font-weight: 400;\n line-height: 30px;\n }\n");class gt extends t{static{this.styles=[ut,o`
|
|
2715
2744
|
:host {
|
|
2716
2745
|
display: flex;
|
|
2717
2746
|
position: fixed;
|
|
@@ -2781,7 +2810,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2781
2810
|
}
|
|
2782
2811
|
|
|
2783
2812
|
.container {
|
|
2784
|
-
${
|
|
2813
|
+
${P};
|
|
2785
2814
|
display: flex;
|
|
2786
2815
|
align-items: center;
|
|
2787
2816
|
box-sizing: border-box;
|
|
@@ -2946,7 +2975,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2946
2975
|
</div>
|
|
2947
2976
|
`))}
|
|
2948
2977
|
</div>
|
|
2949
|
-
`}};s([
|
|
2978
|
+
`}};s([T({type:Number}),n("design:type",Object)],bt.prototype,"totalSteps",void 0),s([T({type:Number}),n("design:type",Object)],bt.prototype,"currentStep",void 0),bt=s([a("custom-stepper")],bt);let mt=class extends t{constructor(){super(...arguments),this.tabs=[],this.selected="",this.internalSelected="",this.showPrev=!1,this.showNext=!1,this.SCROLL_OFFSET=56,this.handleScroll=()=>{const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const{scrollLeft:e,scrollWidth:i,clientWidth:o}=t;this.showPrev=e>0,this.showNext=e+o<i-1}}static{this.styles=o`
|
|
2950
2979
|
:host {
|
|
2951
2980
|
display: block;
|
|
2952
2981
|
border-bottom: 1px solid #E7E8EC;
|
|
@@ -2959,7 +2988,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2959
2988
|
}
|
|
2960
2989
|
|
|
2961
2990
|
.tab {
|
|
2962
|
-
${
|
|
2991
|
+
${I};
|
|
2963
2992
|
display: flex;
|
|
2964
2993
|
gap: 8px;
|
|
2965
2994
|
flex-direction: row;
|
|
@@ -3085,7 +3114,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3085
3114
|
</button>
|
|
3086
3115
|
`:null}
|
|
3087
3116
|
</div>
|
|
3088
|
-
`}};s([
|
|
3117
|
+
`}};s([T({type:Array}),n("design:type",Array)],mt.prototype,"tabs",void 0),s([T({type:String}),n("design:type",String)],mt.prototype,"selected",void 0),s([B(),n("design:type",String)],mt.prototype,"internalSelected",void 0),s([B(),n("design:type",Object)],mt.prototype,"showPrev",void 0),s([B(),n("design:type",Object)],mt.prototype,"showNext",void 0),mt=s([a("tabs-bar")],mt);let yt=class extends R{constructor(){super(...arguments),this.files=[],this.simulatedDelay=0,this.showAlertInError=!1,this.typeTextFile="",this.loading=!1,this.progress=0,this.errorTextMessage=null,this.isMultiple=!1,this.TEXT_SNACKBAR_ERROR_TYPE=()=>"El formato del archivo no es válido",this.TEXT_SNACKBAR_ERROR_SIZE=t=>`El archivo es muy grande. Máximo ${t}`,this.TEXT_SNACKBAR_ERROR_DELETE=t=>`Tu ${this.typeTextFile?this.typeTextFile:"file"===t?"archivo":"imagen"} fue ${"file"===t?"eliminado":"eliminada"}`}showSnackbar(t,e=5e3,i){const o=document.querySelector("randstad-snackbar");o?(clearTimeout(o.timer),o.open&&(o.open=!1),setTimeout((()=>{o.type=i,o.icon="error"===i?"warning":"check",o.message=t,o.open=!0,o.timer=setTimeout((()=>o.open=!1),e)}),150)):console.warn("randstad-snackbar component not found in the DOM. Cannot show alert.")}baseGetTextMaxFileSize(t){const e=1048576;if(t>=e){return`${parseFloat((t/e).toPrecision(3)).toString()} MB`}return`${Math.round(t/1024)} KB`}getReadableFileTypes(t,e){const i=t.map((t=>e[t]||t));if(i.length<=1)return i.join("");const o=i.pop();return`${i.join(", ")} y ${o}`}validateFiles(t,e,i,o,r,s){const n=e>0,a=i.length>0;for(const l of t){const t="."+l.name.split(".").pop()?.toLowerCase(),d=i.includes(l.type),c=i.some((e=>{const i=e.split("/")[1];return"jpeg"===i?".jpeg"===t||".jpg"===t:t===`.${i}`}));if(a&&(!d||!c))return this.setError(s,o,this.TEXT_SNACKBAR_ERROR_TYPE()),!1;if(n&&l.size>e)return this.setError(s,r,this.TEXT_SNACKBAR_ERROR_SIZE(this.baseGetTextMaxFileSize(e))),!1}return!0}async baseHandleFiles(t,e){const{baseMaxFiles:i,maxFileSize:o,acceptedFileTypes:r,errorMessageType:s,errorMessageSize:n,typeError:a}=e;if(this.setError(a,null,null),!t||this.disabled||this.loading)return;const l=Array.isArray(this.files)?this.files:[],d=(Number.isFinite(i)&&i>0?i:1)-l.length;if(d<=0){const t="Alcanzaste el número máximo de archivos";return void this.setError(a,t,t)}const c=Array.from(t).slice(0,d);if(0===c.length)return;if(!this.validateFiles(c,o,r,s,n,a))return;const h=this.simulatedDelay??0;if(h<=0)return this.files=[...l,...c],void this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files}));this.loading=!0,this.progress=0,await this.updateComplete;const p=Date.now(),u=setInterval((()=>{const t=Date.now()-p,e=Math.min(Math.round(t/h*100),100);this.progress=e,this.progress>=100&&(clearInterval(u),this.files=[...l,...c],this.loading=!1,this.progress=0,this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})))}),10);this.fileInput&&(this.fileInput.value="")}baseOnFileInputChange(t,e){const i=t.target;this.baseHandleFiles(i.files,e),this.fileInput&&(this.fileInput.value="")}removeFile(t,e){this.files=this.files.filter(((e,i)=>i!==t)),this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})),0===this.files.length&&this.setError(e,null,null),this.showAlertInError&&this.showSnackbar(this.TEXT_SNACKBAR_ERROR_DELETE(e),5e3,"success")}setError(t="file",e,i){"file"===t&&(this.error=!!e,this.errorMessage=e),"image"===t&&(this.errorTextMessage=e),this.showAlertInError&&i&&this.showSnackbar(i,5e3,"error")}renderLoadingContainer(t){return e`
|
|
3089
3118
|
${this.loading?e`
|
|
3090
3119
|
<div class="progress-bar-container">
|
|
3091
3120
|
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
@@ -3095,7 +3124,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3095
3124
|
`:e`
|
|
3096
3125
|
${t}
|
|
3097
3126
|
`}
|
|
3098
|
-
`}};s([
|
|
3127
|
+
`}};s([T({type:Array}),n("design:type",Array)],yt.prototype,"files",void 0),s([T({type:Number}),n("design:type",Object)],yt.prototype,"simulatedDelay",void 0),s([T({type:Boolean}),n("design:type",Object)],yt.prototype,"showAlertInError",void 0),s([T({type:String}),n("design:type",Object)],yt.prototype,"typeTextFile",void 0),s([B(),n("design:type",Object)],yt.prototype,"loading",void 0),s([B(),n("design:type",Object)],yt.prototype,"progress",void 0),s([B(),n("design:type",Object)],yt.prototype,"errorTextMessage",void 0),s([L('input[ type="file" ]'),n("design:type",HTMLInputElement)],yt.prototype,"fileInput",void 0),yt=s([a("base-upload")],yt);const vt={"image/jpg":".jpg","image/jpeg":".jpeg","image/png":".png"},ft={"application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx",...vt,"text/plain":".txt"},wt=o`
|
|
3099
3128
|
.progress-bar-container {
|
|
3100
3129
|
min-height: 23px;
|
|
3101
3130
|
display: flex;
|
|
@@ -3164,28 +3193,28 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3164
3193
|
}
|
|
3165
3194
|
|
|
3166
3195
|
.text-main {
|
|
3167
|
-
${
|
|
3196
|
+
${P};
|
|
3168
3197
|
text-align: center;
|
|
3169
3198
|
vertical-align: middle;
|
|
3170
3199
|
color: var( --secondary-color-80 );
|
|
3171
3200
|
}
|
|
3172
3201
|
|
|
3173
3202
|
.text-secondary {
|
|
3174
|
-
${
|
|
3203
|
+
${j};
|
|
3175
3204
|
text-align: center;
|
|
3176
3205
|
vertical-align: middle;
|
|
3177
3206
|
color: var( --secondary-color-60 );
|
|
3178
3207
|
}
|
|
3179
3208
|
|
|
3180
3209
|
.text-tertiary {
|
|
3181
|
-
${
|
|
3210
|
+
${j};
|
|
3182
3211
|
text-align: center;
|
|
3183
3212
|
vertical-align: middle;
|
|
3184
3213
|
color: var( --secondary-color-40 );
|
|
3185
3214
|
}
|
|
3186
3215
|
|
|
3187
3216
|
.button {
|
|
3188
|
-
${
|
|
3217
|
+
${j};
|
|
3189
3218
|
background-color: var( --primary-color );
|
|
3190
3219
|
border: none;
|
|
3191
3220
|
padding: 4px 16px;
|
|
@@ -3310,7 +3339,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3310
3339
|
</div>
|
|
3311
3340
|
</div>
|
|
3312
3341
|
</div>
|
|
3313
|
-
`}};s([B({type:Array}),n("design:type",Array)],xt.prototype,"acceptedFileTypes",void 0),s([B({type:Number}),n("design:type",Object)],xt.prototype,"maxFiles",void 0),s([B({type:Number}),n("design:type",Object)],xt.prototype,"maxFileSize",void 0),s([B({type:Boolean}),n("design:type",Object)],xt.prototype,"isShowInfoSize",void 0),s([B({type:Boolean}),n("design:type",Object)],xt.prototype,"isChangeStyleError",void 0),s([L(),n("design:type",Object)],xt.prototype,"isDragging",void 0),s([L(),n("design:type",Array)],xt.prototype,"imageUrls",void 0),s([L(),n("design:type",Boolean)],xt.prototype,"isMaxFilesReached",void 0),xt=s([a("upload-image")],xt);const kt=6048e5,$t=Symbol.for("constructDateFrom");function St(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&$t in t?t[$t](e):t instanceof Date?new t.constructor(e):new Date(e)}function Et(t,e){return St(e||t,t)}function Dt(t,e,i){const o=Et(t,i?.in);if(isNaN(e))return St(t,NaN);if(!e)return o;const r=o.getDate(),s=St(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let Ct={};function Ot(){return Ct}function Ft(t,e){const i=Ot(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Et(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 Mt(t,e){return Ft(t,{...e,weekStartsOn:1})}function Tt(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=St(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=Mt(r),n=St(i,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const a=Mt(n);return i.getTime()>=s.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1}function Bt(t){const e=Et(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 Lt(t,...e){const i=St.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function _t(t,e){const i=Et(t,e?.in);return i.setHours(0,0,0,0),i}function Rt(t,e,i){return Dt(t,12*e,i)}function Pt(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+Et(t)));var e}function jt(t,e){const i=Et(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const At={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 zt(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const Nt={date:zt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:zt({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:zt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Wt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function It(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 Vt(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 qt;const Ut={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=At[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:Nt,formatRelative:(t,e,i,o)=>Wt[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:It({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:It({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:It({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:It({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:It({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:(qt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(qt.matchPattern);if(!i)return null;const o=i[0],r=t.match(qt.parsePattern);if(!r)return null;let s=qt.valueCallback?qt.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:Vt({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:Vt({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:Vt({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:Vt({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:Vt({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 Ht(t,e){const i=Et(t,e?.in),o=function(t,e){const[i,o]=Lt(0,t,e),r=_t(i),s=_t(o),n=+r-Bt(r),a=+s-Bt(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=Et(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function Yt(t,e){const i=Et(t,e?.in),o=+Mt(i)-+function(t,e){const i=Tt(t,e),o=St(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Mt(o)}(i);return Math.round(o/kt)+1}function Gt(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=Ot(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=St(e?.in||t,0);n.setFullYear(o+1,0,s),n.setHours(0,0,0,0);const a=Ft(n,e),l=St(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=Ft(l,e);return+i>=+a?o+1:+i>=+d?o:o-1}function Kt(t,e){const i=Et(t,e?.in),o=+Ft(i,e)-+function(t,e){const i=Ot(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Gt(t,e),s=St(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),Ft(s,e)}(i,e);return Math.round(o/kt)+1}function Xt(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Qt={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Xt("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Xt(i+1,2)},d:(t,e)=>Xt(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)=>Xt(t.getHours()%12||12,e.length),H:(t,e)=>Xt(t.getHours(),e.length),m:(t,e)=>Xt(t.getMinutes(),e.length),s:(t,e)=>Xt(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Xt(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Zt="midnight",Jt="noon",te="morning",ee="afternoon",ie="evening",oe="night",re={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 Qt.y(t,e)},Y:function(t,e,i,o){const r=Gt(t,o),s=r>0?r:1-r;if("YY"===e){return Xt(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Xt(s,e.length)},R:function(t,e){return Xt(Tt(t),e.length)},u:function(t,e){return Xt(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 Xt(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 Xt(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 Qt.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 Xt(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=Kt(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Xt(r,e.length)},I:function(t,e,i){const o=Yt(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Xt(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Qt.d(t,e)},D:function(t,e,i){const o=Ht(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Xt(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 Xt(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 Xt(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 Xt(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?Jt:0===o?Zt: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?ie:o>=12?ee:o>=4?te:oe,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 Qt.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Qt.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Qt.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Qt.s(t,e)},S:function(t,e){return Qt.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return ne(o);case"XXXX":case"XX":return ae(o);default:return ae(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return ne(o);case"xxxx":case"xx":return ae(o);default:return ae(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},t:function(t,e,i){return Xt(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Xt(+t,e.length)}};function se(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+Xt(s,2)}function ne(t,e){if(t%60==0){return(t>0?"-":"+")+Xt(Math.abs(t)/60,2)}return ae(t,e)}function ae(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Xt(Math.trunc(o/60),2)+e+Xt(o%60,2)}const le=(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"})}},de=(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"})}},ce={p:de,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return le(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}}",le(o,e)).replace("{{time}}",de(r,e))}},he=/^D+$/,pe=/^Y+$/,ue=["D","DD","YY","YYYY"];const ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,me=/^'([^]*?)'?$/,ye=/''/g,ve=/[a-zA-Z]/;function fe(t,e,i){const o=Ot(),r=o.locale??Ut,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Et(t,i?.in);if(!Pt(a))throw new RangeError("Invalid time value");let l=e.match(be).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,ce[e])(t,r.formatLong)}return t})).join("").match(ge).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:we(t)};if(re[e])return{isToken:!0,value:t};if(e.match(ve))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 pe.test(t)}(o)||function(t){return he.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),ue.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,re[o[0]])(a,o,r.localize,d)})).join("")}function we(t){const e=t.match(me);return e?e[1].replace(ye,"'"):t}function xe(t,e){return Et(t,e?.in).getDate()}function ke(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=St(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function $e(t,e){return+Et(t)>+Et(e)}function Se(t,e){return+Et(t)<+Et(e)}function Ee(t,e,i){const[o,r]=Lt(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function De(t,e,i){const[o,r]=Lt(0,t,e);return o.getFullYear()===r.getFullYear()}function Ce(t,e){return function(t,e){const[i,o]=Lt(0,t,e);return+_t(i)===+_t(o)}(St(t,t),function(t){return St(t,Date.now())}(t))}function Oe(t,e,i){const o=Et(t,i?.in);return o.setDate(e),o}let Fe=class extends t{static{this.styles=[J,o`
|
|
3342
|
+
`}};s([T({type:Array}),n("design:type",Array)],xt.prototype,"acceptedFileTypes",void 0),s([T({type:Number}),n("design:type",Object)],xt.prototype,"maxFiles",void 0),s([T({type:Number}),n("design:type",Object)],xt.prototype,"maxFileSize",void 0),s([T({type:Boolean}),n("design:type",Object)],xt.prototype,"isShowInfoSize",void 0),s([T({type:Boolean}),n("design:type",Object)],xt.prototype,"isChangeStyleError",void 0),s([B(),n("design:type",Object)],xt.prototype,"isDragging",void 0),s([B(),n("design:type",Array)],xt.prototype,"imageUrls",void 0),s([B(),n("design:type",Boolean)],xt.prototype,"isMaxFilesReached",void 0),xt=s([a("upload-image")],xt);const kt=6048e5,$t=Symbol.for("constructDateFrom");function St(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&$t in t?t[$t](e):t instanceof Date?new t.constructor(e):new Date(e)}function Et(t,e){return St(e||t,t)}function Dt(t,e,i){const o=Et(t,i?.in);if(isNaN(e))return St(t,NaN);if(!e)return o;const r=o.getDate(),s=St(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let Ct={};function Ot(){return Ct}function Ft(t,e){const i=Ot(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Et(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 Mt(t,e){return Ft(t,{...e,weekStartsOn:1})}function _t(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=St(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=Mt(r),n=St(i,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const a=Mt(n);return i.getTime()>=s.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1}function Tt(t){const e=Et(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 Bt(t,...e){const i=St.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function Lt(t,e){const i=Et(t,e?.in);return i.setHours(0,0,0,0),i}function Rt(t,e,i){return Dt(t,12*e,i)}function jt(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+Et(t)));var e}function Pt(t,e){const i=Et(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const At={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 zt(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const It={date:zt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:zt({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:zt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Nt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Wt(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 Vt(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 qt;const Ut={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=At[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:It,formatRelative:(t,e,i,o)=>Nt[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:Wt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Wt({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:Wt({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:Wt({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:Wt({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:(qt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(qt.matchPattern);if(!i)return null;const o=i[0],r=t.match(qt.parsePattern);if(!r)return null;let s=qt.valueCallback?qt.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:Vt({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:Vt({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:Vt({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:Vt({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:Vt({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 Ht(t,e){const i=Et(t,e?.in),o=function(t,e){const[i,o]=Bt(0,t,e),r=Lt(i),s=Lt(o),n=+r-Tt(r),a=+s-Tt(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=Et(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function Yt(t,e){const i=Et(t,e?.in),o=+Mt(i)-+function(t,e){const i=_t(t,e),o=St(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Mt(o)}(i);return Math.round(o/kt)+1}function Gt(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=Ot(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=St(e?.in||t,0);n.setFullYear(o+1,0,s),n.setHours(0,0,0,0);const a=Ft(n,e),l=St(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=Ft(l,e);return+i>=+a?o+1:+i>=+d?o:o-1}function Kt(t,e){const i=Et(t,e?.in),o=+Ft(i,e)-+function(t,e){const i=Ot(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Gt(t,e),s=St(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),Ft(s,e)}(i,e);return Math.round(o/kt)+1}function Xt(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Qt={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Xt("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Xt(i+1,2)},d:(t,e)=>Xt(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)=>Xt(t.getHours()%12||12,e.length),H:(t,e)=>Xt(t.getHours(),e.length),m:(t,e)=>Xt(t.getMinutes(),e.length),s:(t,e)=>Xt(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Xt(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Zt="midnight",Jt="noon",te="morning",ee="afternoon",ie="evening",oe="night",re={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 Qt.y(t,e)},Y:function(t,e,i,o){const r=Gt(t,o),s=r>0?r:1-r;if("YY"===e){return Xt(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Xt(s,e.length)},R:function(t,e){return Xt(_t(t),e.length)},u:function(t,e){return Xt(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 Xt(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 Xt(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 Qt.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 Xt(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=Kt(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Xt(r,e.length)},I:function(t,e,i){const o=Yt(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Xt(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Qt.d(t,e)},D:function(t,e,i){const o=Ht(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Xt(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 Xt(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 Xt(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 Xt(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?Jt:0===o?Zt: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?ie:o>=12?ee:o>=4?te:oe,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 Qt.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Qt.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Qt.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Qt.s(t,e)},S:function(t,e){return Qt.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return ne(o);case"XXXX":case"XX":return ae(o);default:return ae(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return ne(o);case"xxxx":case"xx":return ae(o);default:return ae(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},t:function(t,e,i){return Xt(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Xt(+t,e.length)}};function se(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+Xt(s,2)}function ne(t,e){if(t%60==0){return(t>0?"-":"+")+Xt(Math.abs(t)/60,2)}return ae(t,e)}function ae(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Xt(Math.trunc(o/60),2)+e+Xt(o%60,2)}const le=(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"})}},de=(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"})}},ce={p:de,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return le(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}}",le(o,e)).replace("{{time}}",de(r,e))}},he=/^D+$/,pe=/^Y+$/,ue=["D","DD","YY","YYYY"];const ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,me=/^'([^]*?)'?$/,ye=/''/g,ve=/[a-zA-Z]/;function fe(t,e,i){const o=Ot(),r=o.locale??Ut,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Et(t,i?.in);if(!jt(a))throw new RangeError("Invalid time value");let l=e.match(be).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,ce[e])(t,r.formatLong)}return t})).join("").match(ge).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:we(t)};if(re[e])return{isToken:!0,value:t};if(e.match(ve))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 pe.test(t)}(o)||function(t){return he.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),ue.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,re[o[0]])(a,o,r.localize,d)})).join("")}function we(t){const e=t.match(me);return e?e[1].replace(ye,"'"):t}function xe(t,e){return Et(t,e?.in).getDate()}function ke(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=St(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function $e(t,e){return+Et(t)>+Et(e)}function Se(t,e){return+Et(t)<+Et(e)}function Ee(t,e,i){const[o,r]=Bt(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function De(t,e,i){const[o,r]=Bt(0,t,e);return o.getFullYear()===r.getFullYear()}function Ce(t,e){return function(t,e){const[i,o]=Bt(0,t,e);return+Lt(i)===+Lt(o)}(St(t,t),function(t){return St(t,Date.now())}(t))}function Oe(t,e,i){const o=Et(t,i?.in);return o.setDate(e),o}let Fe=class extends t{static{this.styles=[J,o`
|
|
3314
3343
|
${X}
|
|
3315
3344
|
|
|
3316
3345
|
/* Estilos generales del contenedor del calendario (escritorio) */
|
|
@@ -3377,7 +3406,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3377
3406
|
}
|
|
3378
3407
|
|
|
3379
3408
|
.month-year-button {
|
|
3380
|
-
${
|
|
3409
|
+
${P}
|
|
3381
3410
|
display: flex;
|
|
3382
3411
|
align-items: center;
|
|
3383
3412
|
justify-content: center;
|
|
@@ -3741,7 +3770,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3741
3770
|
border-radius: 9999px;
|
|
3742
3771
|
}
|
|
3743
3772
|
/* */
|
|
3744
|
-
`]}constructor(){super(),this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.minDate=null,this.maxDate=null,this.type="date",this.lastElement=!1,this.currentView="days",this.handleOutsideClick=t=>{const e=this.getRootNode(),i=e?.host;!i||t.composedPath().includes(this)||t.composedPath().includes(i)||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))},this._boundHandleCalendarKeydown=this.handleCalendarKeydown.bind(this),this._boundHandleFocusout=t=>{const e=t.relatedTarget;e&&!this.contains(e)&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}firstUpdated(){this.shadowRoot?.addEventListener("keydown",this._boundHandleCalendarKeydown),this.addEventListener("focusout",this._boundHandleFocusout)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focus-input",this.handleFocusInput)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),this.shadowRoot?.removeEventListener("keydown",this._boundHandleCalendarKeydown),this.removeEventListener("focusout",this._boundHandleFocusout)}handleFocusInput(){const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}handleHeaderClick(){"month"===this.type?this.currentView="months"===this.currentView?"years":"months":"days"===this.currentView?this.currentView="years":this.currentView="days"}_updateView(t,e=null){this.viewDate=t,e&&(this.currentView=e),this.dispatchEvent(new CustomEvent("view-date-change",{detail:{date:this.viewDate}}))}handleNavClick(t){let e=this.viewDate;e="days"===this.currentView?Dt(this.viewDate,t):"months"===this.currentView?Rt(this.viewDate,t):Rt(this.viewDate,21*t),this._updateView(e)}handleYearSelect(t){const e=function(t,e,i){const o=Et(t,i?.in);return isNaN(+o)?St(t,NaN):(o.setFullYear(e),o)}(this.viewDate,t);this._updateView(e,"months"),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".month-year-button");t?.focus()}))}handleMonthSelect(t){const e=function(t,e,i){const o=Et(t,i?.in),r=o.getFullYear(),s=o.getDate(),n=St(t,0);n.setFullYear(r,e,15),n.setHours(0,0,0,0);const a=ke(n);return o.setMonth(e,Math.min(s,a)),o}(this.viewDate,t);"month"===this.type?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0}))):(this._updateView(e,"days"),this.updateComplete.then((()=>{const t=this.initialFocusElement||this.shadowRoot?.querySelector(".month-year-button");t?.focus()})))}handleDayClick(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}getFullMonthNames(){return["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]}getShortMonthNames(){return this.getFullMonthNames().map((t=>t.substring(0,3)))}getShortWeekdays(){return["lu","ma","mi","ju","vi","sa","do"]}focusCalendar(){this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".month-year-button");t?t.focus():this.initialFocusElement?.focus()}))}focusFirstElement(){this.updateComplete.then((()=>{"days"!==this.currentView&&(this.currentView="days"),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("button:not([disabled])");t?.focus()}))}))}focusYearsView(){this.updateComplete.then((()=>{this.currentView="years";const t=this.shadowRoot?.querySelector(".year-button:not([disabled])");t&&t.focus()}))}focusMonthsView(){this.updateComplete.then((()=>{"months"!==this.currentView&&(this.currentView="months");const t=this.shadowRoot?.querySelector(".month-button:not([disabled])");t&&t.focus()}))}focusDaysView(){this.updateComplete.then((()=>{"days"!==this.currentView&&(this.currentView="days");const t=this.shadowRoot?.querySelector(".day:not([disabled])");t&&t.focus()}))}_findAndFocusDayButton(t){const e=this.shadowRoot?.activeElement;if(!e||!e.classList.contains("day"))return;const i=Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")),o=i.findIndex((t=>t===e));if(-1===o)return;let r=o+t;r<0&&(r=0),r>=i.length&&(r=i.length-1);const s=i[r];s&&s.focus()}_focusDayOfWeekEdge(t){const e=this.shadowRoot?.activeElement;if(!e||!e.classList.contains("day"))return;if(-1===Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")).findIndex((t=>t===e)))return;const i=Array.from(this.shadowRoot.querySelectorAll(".days-grid > *")).findIndex((t=>t===e));if(-1===i)return;const o=i%7;let r=null;if("start"===t){const t=i-o;r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${t+1}) .day:not([disabled]), .days-grid > :nth-child(${t+1}).day:not([disabled])`);let e=t;for(;!r&&e<=i;)e++,r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${e+1}) .day:not([disabled]), .days-grid > :nth-child(${e+1}).day:not([disabled])`)}else{const t=i+(6-o);r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${t+1}) .day:not([disabled]), .days-grid > :nth-child(${t+1}).day:not([disabled])`);let e=t;for(;!r&&e>=i;)e--,r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${e+1}) .day:not([disabled]), .days-grid > :nth-child(${e+1}).day:not([disabled])`)}r?.focus()}handleCalendarKeydown(t){const{key:e}=t,i=this.shadowRoot?.activeElement;if("Escape"===e)return t.preventDefault(),void this.dispatchEvent(new CustomEvent("close"));if("Tab"!==e)if(i&&(i.classList.contains("month-year-button")||i.classList.contains("nav-button"))){t.preventDefault();const o=this.shadowRoot?.querySelector(".month-year-button"),r=this.shadowRoot?.querySelector(".header-right button:first-child"),s=this.shadowRoot?.querySelector(".header-right button:last-child");if("Enter"===e||" "===e)return i===o?this.handleHeaderClick():i===r?this.handleNavClick(-1):i===s&&this.handleNavClick(1),void this.updateComplete.then((()=>i.focus()));switch(e){case"ArrowUp":return t.preventDefault(),void this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));case"ArrowRight":(i===o||i===r)&&s?.focus();break;case"ArrowLeft":i===s?r?.focus():i===r&&o?.focus();break;case"ArrowDown":if("days"===this.currentView){const t=this.initialFocusElement||this.shadowRoot?.querySelector(".day:not([disabled])");t?.focus()}else if("months"===this.currentView||"years"===this.currentView){const t=this.shadowRoot?.querySelector(`.${"months"===this.currentView?"month":"year"}-grid button:not([disabled])`);t?.focus()}}}else if(i&&i.classList.contains("day")&&"days"===this.currentView){t.preventDefault();const o=Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")).findIndex((t=>t===i)),r=this.shadowRoot?.querySelector(".month-year-button");switch(e){case"ArrowLeft":this._findAndFocusDayButton(-1);break;case"ArrowRight":this._findAndFocusDayButton(1);break;case"ArrowDown":this._findAndFocusDayButton(7);break;case"ArrowUp":o-7<0?r?.focus():this._findAndFocusDayButton(-7);break;case"Home":this._focusDayOfWeekEdge("start");break;case"End":this._focusDayOfWeekEdge("end");break;case"Enter":i.click()}}else if(i&&(i.classList.contains("month-button")||i.classList.contains("year-button"))){t.preventDefault();const o="months"===this.currentView?".month-button:not([disabled])":".year-button:not([disabled])",r=Array.from(this.shadowRoot.querySelectorAll(o)),s=r.findIndex((t=>t===i)),n=this.shadowRoot?.querySelector(".month-year-button");if(-1===s)return;let a=s;switch(e){case"ArrowDown":a+=3,a>=r.length&&(a=r.length-1);break;case"ArrowUp":if(a-=3,a<0)return void n?.focus();break;case"ArrowLeft":a-=1,a<0&&(a=0);break;case"ArrowRight":a+=1,a>=r.length&&(a=r.length-1);break;case"Enter":i.click()}a!==s&&r[a]?.focus()}else(e.startsWith("Arrow")||"Enter"===e)&&t.preventDefault();else{const e=Array.from(this.shadowRoot.querySelectorAll("button:not([disabled])"));if(!e.includes(i))return;if(e.length>0){const o=e[0],r=e[e.length-1];if(t.shiftKey&&i===o)return t.preventDefault(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),void this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));t.shiftKey||i!==r||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}}renderHeader(){const t=this.getFullMonthNames();let i="",o=!1,r=!1;if("years"===this.currentView){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,e=t+20;i=`${t} - ${e}`;o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=e>=(this.maxDate?this.maxDate.getFullYear():1/0)}else if("months"===this.currentView){i=`${this.viewDate.getFullYear()}`;const t=this.viewDate.getFullYear();o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=t>=(this.maxDate?this.maxDate.getFullYear():1/0)}else{i=` ${t[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()} `,this.minDate&&(o=Ee(
|
|
3773
|
+
`]}constructor(){super(),this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.minDate=null,this.maxDate=null,this.type="date",this.lastElement=!1,this.currentView="days",this.handleOutsideClick=t=>{const e=this.getRootNode(),i=e?.host;!i||t.composedPath().includes(this)||t.composedPath().includes(i)||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))},this._boundHandleCalendarKeydown=this.handleCalendarKeydown.bind(this),this._boundHandleFocusout=t=>{const e=t.relatedTarget;e&&!this.contains(e)&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}firstUpdated(){this.shadowRoot?.addEventListener("keydown",this._boundHandleCalendarKeydown),this.addEventListener("focusout",this._boundHandleFocusout)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focus-input",this.handleFocusInput)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),this.shadowRoot?.removeEventListener("keydown",this._boundHandleCalendarKeydown),this.removeEventListener("focusout",this._boundHandleFocusout)}handleFocusInput(){const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}handleHeaderClick(){"month"===this.type?this.currentView="months"===this.currentView?"years":"months":"days"===this.currentView?this.currentView="years":this.currentView="days"}_updateView(t,e=null){this.viewDate=t,e&&(this.currentView=e),this.dispatchEvent(new CustomEvent("view-date-change",{detail:{date:this.viewDate}}))}handleNavClick(t){let e=this.viewDate;e="days"===this.currentView?Dt(this.viewDate,t):"months"===this.currentView?Rt(this.viewDate,t):Rt(this.viewDate,21*t),this._updateView(e)}handleYearSelect(t){const e=function(t,e,i){const o=Et(t,i?.in);return isNaN(+o)?St(t,NaN):(o.setFullYear(e),o)}(this.viewDate,t);this._updateView(e,"months"),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".month-year-button");t?.focus()}))}handleMonthSelect(t){const e=function(t,e,i){const o=Et(t,i?.in),r=o.getFullYear(),s=o.getDate(),n=St(t,0);n.setFullYear(r,e,15),n.setHours(0,0,0,0);const a=ke(n);return o.setMonth(e,Math.min(s,a)),o}(this.viewDate,t);"month"===this.type?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0}))):(this._updateView(e,"days"),this.updateComplete.then((()=>{const t=this.initialFocusElement||this.shadowRoot?.querySelector(".month-year-button");t?.focus()})))}handleDayClick(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}getFullMonthNames(){return["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]}getShortMonthNames(){return this.getFullMonthNames().map((t=>t.substring(0,3)))}getShortWeekdays(){return["lu","ma","mi","ju","vi","sa","do"]}focusCalendar(){this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".month-year-button");t?t.focus():this.initialFocusElement?.focus()}))}focusFirstElement(){this.updateComplete.then((()=>{"days"!==this.currentView&&(this.currentView="days"),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("button:not([disabled])");t?.focus()}))}))}focusYearsView(){this.updateComplete.then((()=>{this.currentView="years";const t=this.shadowRoot?.querySelector(".year-button:not([disabled])");t&&t.focus()}))}focusMonthsView(){this.updateComplete.then((()=>{"months"!==this.currentView&&(this.currentView="months");const t=this.shadowRoot?.querySelector(".month-button:not([disabled])");t&&t.focus()}))}focusDaysView(){this.updateComplete.then((()=>{"days"!==this.currentView&&(this.currentView="days");const t=this.shadowRoot?.querySelector(".day:not([disabled])");t&&t.focus()}))}_findAndFocusDayButton(t){const e=this.shadowRoot?.activeElement;if(!e||!e.classList.contains("day"))return;const i=Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")),o=i.findIndex((t=>t===e));if(-1===o)return;let r=o+t;r<0&&(r=0),r>=i.length&&(r=i.length-1);const s=i[r];s&&s.focus()}_focusDayOfWeekEdge(t){const e=this.shadowRoot?.activeElement;if(!e||!e.classList.contains("day"))return;if(-1===Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")).findIndex((t=>t===e)))return;const i=Array.from(this.shadowRoot.querySelectorAll(".days-grid > *")).findIndex((t=>t===e));if(-1===i)return;const o=i%7;let r=null;if("start"===t){const t=i-o;r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${t+1}) .day:not([disabled]), .days-grid > :nth-child(${t+1}).day:not([disabled])`);let e=t;for(;!r&&e<=i;)e++,r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${e+1}) .day:not([disabled]), .days-grid > :nth-child(${e+1}).day:not([disabled])`)}else{const t=i+(6-o);r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${t+1}) .day:not([disabled]), .days-grid > :nth-child(${t+1}).day:not([disabled])`);let e=t;for(;!r&&e>=i;)e--,r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${e+1}) .day:not([disabled]), .days-grid > :nth-child(${e+1}).day:not([disabled])`)}r?.focus()}handleCalendarKeydown(t){const{key:e}=t,i=this.shadowRoot?.activeElement;if("Escape"===e)return t.preventDefault(),void this.dispatchEvent(new CustomEvent("close"));if("Tab"!==e)if(i&&(i.classList.contains("month-year-button")||i.classList.contains("nav-button"))){t.preventDefault();const o=this.shadowRoot?.querySelector(".month-year-button"),r=this.shadowRoot?.querySelector(".header-right button:first-child"),s=this.shadowRoot?.querySelector(".header-right button:last-child");if("Enter"===e||" "===e)return i===o?this.handleHeaderClick():i===r?this.handleNavClick(-1):i===s&&this.handleNavClick(1),void this.updateComplete.then((()=>i.focus()));switch(e){case"ArrowUp":return t.preventDefault(),void this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));case"ArrowRight":(i===o||i===r)&&s?.focus();break;case"ArrowLeft":i===s?r?.focus():i===r&&o?.focus();break;case"ArrowDown":if("days"===this.currentView){const t=this.initialFocusElement||this.shadowRoot?.querySelector(".day:not([disabled])");t?.focus()}else if("months"===this.currentView||"years"===this.currentView){const t=this.shadowRoot?.querySelector(`.${"months"===this.currentView?"month":"year"}-grid button:not([disabled])`);t?.focus()}}}else if(i&&i.classList.contains("day")&&"days"===this.currentView){t.preventDefault();const o=Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")).findIndex((t=>t===i)),r=this.shadowRoot?.querySelector(".month-year-button");switch(e){case"ArrowLeft":this._findAndFocusDayButton(-1);break;case"ArrowRight":this._findAndFocusDayButton(1);break;case"ArrowDown":this._findAndFocusDayButton(7);break;case"ArrowUp":o-7<0?r?.focus():this._findAndFocusDayButton(-7);break;case"Home":this._focusDayOfWeekEdge("start");break;case"End":this._focusDayOfWeekEdge("end");break;case"Enter":i.click()}}else if(i&&(i.classList.contains("month-button")||i.classList.contains("year-button"))){t.preventDefault();const o="months"===this.currentView?".month-button:not([disabled])":".year-button:not([disabled])",r=Array.from(this.shadowRoot.querySelectorAll(o)),s=r.findIndex((t=>t===i)),n=this.shadowRoot?.querySelector(".month-year-button");if(-1===s)return;let a=s;switch(e){case"ArrowDown":a+=3,a>=r.length&&(a=r.length-1);break;case"ArrowUp":if(a-=3,a<0)return void n?.focus();break;case"ArrowLeft":a-=1,a<0&&(a=0);break;case"ArrowRight":a+=1,a>=r.length&&(a=r.length-1);break;case"Enter":i.click()}a!==s&&r[a]?.focus()}else(e.startsWith("Arrow")||"Enter"===e)&&t.preventDefault();else{const e=Array.from(this.shadowRoot.querySelectorAll("button:not([disabled])"));if(!e.includes(i))return;if(e.length>0){const o=e[0],r=e[e.length-1];if(t.shiftKey&&i===o)return t.preventDefault(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),void this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));t.shiftKey||i!==r||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}}renderHeader(){const t=this.getFullMonthNames();let i="",o=!1,r=!1;if("years"===this.currentView){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,e=t+20;i=`${t} - ${e}`;o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=e>=(this.maxDate?this.maxDate.getFullYear():1/0)}else if("months"===this.currentView){i=`${this.viewDate.getFullYear()}`;const t=this.viewDate.getFullYear();o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=t>=(this.maxDate?this.maxDate.getFullYear():1/0)}else{i=` ${t[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()} `,this.minDate&&(o=Ee(Pt(this.viewDate),Pt(this.minDate))||Se(this.viewDate,this.minDate)),this.maxDate&&(r=Ee(Pt(this.viewDate),Pt(this.maxDate))||$e(this.viewDate,this.maxDate))}return e`
|
|
3745
3774
|
<div class="header">
|
|
3746
3775
|
<div class="header-left">
|
|
3747
3776
|
<button class="month-year-button" @click=${this.handleHeaderClick}>
|
|
@@ -3782,14 +3811,14 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3782
3811
|
</button>
|
|
3783
3812
|
`}))}
|
|
3784
3813
|
</div>
|
|
3785
|
-
`}renderDayView(){const t=ke(this.viewDate),i=
|
|
3814
|
+
`}renderDayView(){const t=ke(this.viewDate),i=Pt(this.viewDate),o=Et(i,r?.in).getDay();var r;const s=Array.from({length:0===o?6:o-1},(()=>null)),n=Array.from({length:t},((t,e)=>Oe(i,e+1))),a=this.getShortWeekdays();return e`
|
|
3786
3815
|
<div class="weekdays">
|
|
3787
3816
|
${a.map((t=>e`<div>${t}</div>`))}
|
|
3788
3817
|
</div>
|
|
3789
3818
|
|
|
3790
3819
|
<div class="days-grid">
|
|
3791
3820
|
${s.map((()=>e`<div></div>`))}
|
|
3792
|
-
${n.map((t=>{const i=
|
|
3821
|
+
${n.map((t=>{const i=Lt(t),o=this.selectedDate?Lt(this.selectedDate):null,r=this.minDate&&Se(i,Lt(this.minDate))||this.maxDate&&$e(i,Lt(this.maxDate)),s=Ce(i),n=o&&xe(i)===xe(o),a=n&&o&&Ee(i,o)&&De(i,o);return e`
|
|
3793
3822
|
<button
|
|
3794
3823
|
class="${`day ${s?"today":""} ${a?"selected":n&&!a?"secondary-selected":""}`}"
|
|
3795
3824
|
?disabled=${r}
|
|
@@ -3813,7 +3842,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3813
3842
|
<div class="calendar-container" style="width: ${this.calendarWidth}px;">
|
|
3814
3843
|
${r}
|
|
3815
3844
|
</div>
|
|
3816
|
-
`}};s([
|
|
3845
|
+
`}};s([T({type:Object}),n("design:type",Object)],Fe.prototype,"selectedDate",void 0),s([T({type:Object}),n("design:type",Date)],Fe.prototype,"viewDate",void 0),s([T({type:Boolean}),n("design:type",Object)],Fe.prototype,"isMobile",void 0),s([T({type:Number}),n("design:type",Number)],Fe.prototype,"calendarWidth",void 0),s([T({type:Object}),n("design:type",Object)],Fe.prototype,"minDate",void 0),s([T({type:Object}),n("design:type",Object)],Fe.prototype,"maxDate",void 0),s([T({type:String}),n("design:type",String)],Fe.prototype,"type",void 0),s([T({type:Boolean}),n("design:type",Object)],Fe.prototype,"lastElement",void 0),s([B(),n("design:type",String)],Fe.prototype,"currentView",void 0),s([L(".day.selected, .day.today:not(.selected)"),n("design:type",HTMLButtonElement)],Fe.prototype,"initialFocusElement",void 0),Fe=s([a("calendar-overlay"),n("design:paramtypes",[])],Fe);let Me=class extends R{constructor(){super(...arguments),this.isRenderClearButton=!0,this.readonly=!1,this.type="date",this.eighteenOrOlder=!1,this.maxLength=10,this.isOpen=!1,this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.inputValue=null,this.lastElement=!1,this.handleGlobalOverlayOpen=t=>{t.detail!==this&&this.isOpen&&(this.isOpen=!1,this._emitDropdownToggle(!1))},this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this),this.handleClickOutside=t=>{t.composedPath().includes(this)||(this.isOpen&&(this._emitToggle(!1),this._emitDropdownToggle(!1)),this.isOpen=!1)}}static{this.styles=o`
|
|
3817
3846
|
${Q}
|
|
3818
3847
|
${Z}
|
|
3819
3848
|
${K}
|
|
@@ -3899,7 +3928,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3899
3928
|
padding: 16px 0;
|
|
3900
3929
|
cursor: text;
|
|
3901
3930
|
background: white;
|
|
3902
|
-
color: #49454f;
|
|
3931
|
+
color: var(--secondary-color, #49454f);
|
|
3903
3932
|
min-width: 0;
|
|
3904
3933
|
}
|
|
3905
3934
|
|
|
@@ -3920,6 +3949,14 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3920
3949
|
align-items: center;
|
|
3921
3950
|
justify-content: center;
|
|
3922
3951
|
padding: 0;
|
|
3952
|
+
width: 40px;
|
|
3953
|
+
height: 40px;
|
|
3954
|
+
border-radius: 50%;
|
|
3955
|
+
transition: background-color 0.2s ease;
|
|
3956
|
+
}
|
|
3957
|
+
|
|
3958
|
+
.input-wrapper:not(.disabled) .icon-button:hover {
|
|
3959
|
+
background-color: var(--primary-color-10);
|
|
3923
3960
|
}
|
|
3924
3961
|
|
|
3925
3962
|
.clear-button {
|
|
@@ -3940,7 +3977,13 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3940
3977
|
.calendar-button randstad-icon {
|
|
3941
3978
|
font-size: 18px;
|
|
3942
3979
|
}
|
|
3943
|
-
|
|
3980
|
+
|
|
3981
|
+
@media ( max-width: 940px ) {
|
|
3982
|
+
.icon-button:hover {
|
|
3983
|
+
background-color: transparent;
|
|
3984
|
+
}
|
|
3985
|
+
}
|
|
3986
|
+
`}setMessageErrorFormatInvalid(){return`formato de fecha inválido, se esperaba '${"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}'`}get _currentFormat(){return"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}handleFocusInput(){this.shadowRoot?.querySelector(".date-input")?.focus()}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside),this.addEventListener("focus-input",this.handleFocusInput),window.addEventListener("overlay-opened",this.handleGlobalOverlayOpen)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside),this.removeEventListener("focus-input",this.handleFocusInput),window.removeEventListener("overlay-opened",this.handleGlobalOverlayOpen),super.disconnectedCallback()}notifyOverlayOpened(){window.dispatchEvent(new CustomEvent("overlay-opened",{detail:this}))}firstUpdated(){this.setInitialWidth()}setInitialWidth(){if(!this.inputContainer)return;const t=this.inputContainer.getBoundingClientRect().width;this.calendarWidth!==t&&(this.calendarWidth=t)}updateResponsiveMode(){this.isMobile=window.innerWidth<=940,this.setInitialWidth()}handleInput(t){this.onlyNumericAndDash(t);const e=t.target,i=e.value.substring(0,this.maxLength);e.value!==i&&(e.value=i),this.inputValue=e.value,this._parseAndValidateDate(e.value,!0)}handleCalendarButtonClick(t){if(!this.disabled)if(t.stopPropagation(),this.isOpen){this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}else this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}))}handleClearDate(){this.inputValue=null,this.selectedDate=null,this.error=!1,this.errorMessage=null,this.closeOverlay(null)}handleDateSelect(t){let e=t.detail.date;if(!e)return;"month"===this.type&&(e=Oe(e,1));if(this._validateDate(e)){this.selectedDate=e,this.viewDate=e;const t=fe(e,this._currentFormat);this.inputValue=t.replace(/-/g,"/"),this.closeOverlay(t)}else{const t=fe(e,this._currentFormat);this.inputValue=t.replace(/-/g,"/"),this.selectedDate=null,this.closeOverlay(null)}}_emitToggle(t){this.dispatchEvent(new CustomEvent("calendar-toggle",{detail:{open:t},bubbles:!0,composed:!0}))}_isLastFocusableInModal(){const t=this.parentElement;if(!t)return!1;const e=["button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","a[href]",'[tabindex]:not([tabindex="-1"])',"randstad-button:not([disabled])","datepicker-component:not([disabled])","randstad-select:not([disabled])"].join(", "),i=t.querySelectorAll(e),o=Array.from(i),r=o.indexOf(this);return-1!==r&&r===o.length-1}_emitDropdownToggle(t){t?this.isOpen&&this.lastElement&&this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("dropdown-toggle-calendar",{detail:{open:!0},bubbles:!0,composed:!0}))})):this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("dropdown-toggle-calendar",{detail:{open:!1},bubbles:!0,composed:!0}))}))}willUpdate(t){if(t.has("width")&&this.style.setProperty("width",this.width||"100%"),t.has("value")){const e=t.get("value");this.value!==e&&this._syncValue(this.value)}t.has("type")&&("month"===this.type?this.maxLength=7:this.maxLength=10)}updated(t){(t.has("isOpen")||t.has("value"))&&this.isOpen&&this.updateComplete.then((()=>{this.setInitialWidth()})),super.updated(t)}handleViewDateChange(t){this.viewDate=t.detail.date}closeOverlay(t){this.value=t,this.inputValue=t?t.replace(/-/g,"/"):null,this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:t}})),this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const e=this.shadowRoot?.querySelector(".date-input");e?.focus()}_syncValue(t){if(""===t||null===t)return void(null===this.selectedDate&&null===this.inputValue||(this.selectedDate=null,this.inputValue=null,this.errorMessage=null,this.error=!1));let e=this._parseDate(t);e&&this._validateDate(e)?("month"===this.type&&(e=Oe(e,1)),this.selectedDate=e,this.viewDate=e,this.error=!1,this.errorMessage=null,this.inputValue=fe(e,this._currentFormat).replace(/-/g,"/")):this.selectedDate=e}_validateDate(t){if(!t)return!1;if(this.error=!1,this.errorMessage=null,this.eighteenOrOlder){const e=function(t,e,i){return Rt(t,-18,i)}(new Date);if($e(t,e))return this.error=!0,this.errorMessage="tenés que ser mayor de 18 años",!1}return!!this._isWithinBounds(t)||(this._getValidDateRange(),this.error=!0,!1)}_parseAndValidateDate(t,e){if(this.disabled)return;if(""===t||null===t)return this.selectedDate=null,this.error=!1,this.errorMessage=null,void(e&&this.closeOverlay(null));const i=this._parseDate(t);if(i){this._validateDate(i)?(this.selectedDate=i,this.viewDate=i,this.error=!1,this.errorMessage=null,e&&this.closeOverlay(fe(i,this._currentFormat))):(this.error=!0,this.selectedDate=null,e&&this.closeOverlay(null))}else this.error=!0,this.errorMessage=this.setMessageErrorFormatInvalid(),this.selectedDate=null,e&&this.closeOverlay(null)}_parseDate(t){const e=t.split("-").map(Number);if("month"===this.type&&2===e.length){const[t,i]=e;if(t>=1&&t<=12&&i>1e3){const e=new Date(i,t-1,1,12);if(jt(e))return e}return null}if(3===e.length){const[i,o,r]=e;if(i&&o&&r&&o>=1&&o<=12&&r>1e3){const e=new Date(r,o-1,i,12);if(jt(e)&&fe(e,"dd-MM-yyyy")===t)return e}}const i=t.split("-").map(Number);if(3===i.length){const[e,o,r]=i;if(e&&o&&r&&o>=1&&o<=12&&e>1e3){const i=new Date(e,o-1,r,12);if(jt(i)&&fe(i,"yyyy-MM-dd")===t)return i}}return null}_parseDateString(t){if(!t)return null;const e=t.split("-").map(Number);if(3===e.length&&!isNaN(e[0])&&!isNaN(e[1])&&!isNaN(e[2])){return new Date(e[0],e[1]-1,e[2],12)}return null}_getValidDateRange(){const t=this._parseDateString(this.minDate),e=this._parseDateString(this.maxDate);return t||e?t&&e&&$e(t,e)?null:{minDate:t,maxDate:e}:{minDate:null,maxDate:null}}_isWithinBounds(t){const e=this._getValidDateRange();return!e||(!e.minDate||!Se(t,e.minDate))&&(!e.maxDate||!$e(t,e.maxDate))}handleKeyDown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input");if("Enter"===e||" "===e)t.preventDefault(),this.isOpen?(this.closeOverlay(this.value),this._emitDropdownToggle(!1)):(this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date);else if("Escape"===e){if(!this.isOpen)return;t.preventDefault(),this.closeOverlay(this.value),this._emitDropdownToggle(!1)}else"ArrowDown"===e&&(t.preventDefault(),this.isOpen||(this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("calendar-overlay");t&&"function"==typeof t.focusCalendar&&t.focusCalendar()})));const o=this.shadowRoot?.querySelector(".clear-button"),r=this.shadowRoot?.querySelector(".calendar-button");"ArrowRight"===e&&(t.preventDefault(),this.shadowRoot?.activeElement===i&&(o?o.focus():r?.focus()))}handleClearButtonKeydown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input"),o=this.shadowRoot?.querySelector(".calendar-button");"ArrowLeft"===e?(t.preventDefault(),i?.focus()):"ArrowRight"===e&&(t.preventDefault(),o?.focus())}handleCalendarButtonKeydown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input"),o=this.shadowRoot?.querySelector(".clear-button");if("Tab"===e){if(!t.shiftKey&&!this.isOpen)return t.preventDefault(),this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,void this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("calendar-overlay");t&&"function"==typeof t.focusFirstElement&&t.focusFirstElement()}));if(this.isOpen)return t.preventDefault(),void this.closeOverlay(this.value)}"ArrowLeft"===e?(t.preventDefault(),o?o.focus():i?.focus()):("Enter"!==e&&" "!==e||t.preventDefault(),this.handleCalendarButtonClick(t))}onlyNumericAndDash(t){const e=t.target,i=e.value.replace(/[^0-9-]/g,"");e.value=i}render(){const t=r({"input-wrapper":!0,active:this.isOpen,error:this.error,disabled:this.disabled,readonly:this.readonly}),o=this._getValidDateRange();return e`
|
|
3944
3987
|
<div class="datepicker-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
3945
3988
|
${this.renderLabelContainer()}
|
|
3946
3989
|
|
|
@@ -4003,7 +4046,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4003
4046
|
|
|
4004
4047
|
${this.renderHelper()}
|
|
4005
4048
|
</div>
|
|
4006
|
-
`}};s([
|
|
4049
|
+
`}};s([T({type:String}),n("design:type",String)],Me.prototype,"width",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"isRenderClearButton",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"readonly",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"minDate",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"maxDate",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"type",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"eighteenOrOlder",void 0),s([T({type:Number}),n("design:type",Number)],Me.prototype,"maxLength",void 0),s([B(),n("design:type",Object)],Me.prototype,"isOpen",void 0),s([B(),n("design:type",Object)],Me.prototype,"selectedDate",void 0),s([B(),n("design:type",Date)],Me.prototype,"viewDate",void 0),s([B(),n("design:type",Object)],Me.prototype,"isMobile",void 0),s([B(),n("design:type",Number)],Me.prototype,"calendarWidth",void 0),s([B(),n("design:type",Object)],Me.prototype,"inputValue",void 0),s([L(".input-container"),n("design:type",HTMLDivElement)],Me.prototype,"inputContainer",void 0),s([T({type:Boolean,attribute:"last-element"}),n("design:type",Object)],Me.prototype,"lastElement",void 0),Me=s([a("datepicker-component")],Me);let _e=class extends yt{constructor(){super(...arguments),this.maxFiles=1,this.acceptedFileTypes=[],this.maxFileSize=0,this.buttonText="Agregar archivo",this.showDeleteConfirmation=!1,this.showInternalError=!0,this.isRemovePopupOpen=!1,this.fileIndexToRemove=-1,this.fileNameToRemove=""}static{this.styles=o`
|
|
4007
4050
|
${Q}
|
|
4008
4051
|
${Z}
|
|
4009
4052
|
${K}
|
|
@@ -4130,7 +4173,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4130
4173
|
</custom-popup>
|
|
4131
4174
|
`:i}
|
|
4132
4175
|
</div>
|
|
4133
|
-
`}};s([
|
|
4176
|
+
`}};s([T({type:String}),n("design:type",String)],_e.prototype,"width",void 0),s([T({type:Number}),n("design:type",Object)],_e.prototype,"maxFiles",void 0),s([T({type:Array}),n("design:type",Array)],_e.prototype,"acceptedFileTypes",void 0),s([T({type:Number}),n("design:type",Object)],_e.prototype,"maxFileSize",void 0),s([T({type:String}),n("design:type",Object)],_e.prototype,"buttonText",void 0),s([T({type:Boolean}),n("design:type",Object)],_e.prototype,"showDeleteConfirmation",void 0),s([T({type:Boolean}),n("design:type",Object)],_e.prototype,"showInternalError",void 0),s([B(),n("design:type",Boolean)],_e.prototype,"isRemovePopupOpen",void 0),s([B(),n("design:type",Number)],_e.prototype,"fileIndexToRemove",void 0),s([B(),n("design:type",String)],_e.prototype,"fileNameToRemove",void 0),_e=s([a("upload-file")],_e);let Te=class extends t{constructor(){super(),this.cards=[],this.cardWidth="",this.cardHeight="",this.navWidth=112,this.showNavButtons=!0,this.isDynamicWidth=!0,this.isInfiniteScrollPartial=!0,this.autoPlayDelayMs=0,this.showPrevButton=!1,this.showNextButton=!0,this.isDraggingWithButtons=!1,this.isDownWithButtons=!1,this.startXWithButtons=0,this.scrollLeftPositionWithButtons=0,this.isScrollingByButton=!1,this.isDownDrag=!1,this.prevXDrag=0,this.isDraggingDrag=!1,this.scrollLeftDrag=0,this.observer=null,this.scrollTimeout=null,this.autoPlayTimer=null,this.handleResize=()=>{},this.DESKTOP_GAP=40,this.TABLET_GAP=24,this.MOBILE_GAP=24,this.handleMouseDownWithButtons=this.handleMouseDownWithButtons.bind(this),this.handleMouseLeaveWithButtons=this.handleMouseLeaveWithButtons.bind(this),this.handleMouseUpWithButtons=this.handleMouseUpWithButtons.bind(this),this.handleMouseMoveWithButtons=this.handleMouseMoveWithButtons.bind(this),this.handleScrollWithButtons=this.handleScrollWithButtons.bind(this),this.handleMouseDownDrag=this.handleMouseDownDrag.bind(this),this.handleMouseLeaveDrag=this.handleMouseLeaveDrag.bind(this),this.handleMouseUpDrag=this.handleMouseUpDrag.bind(this),this.handleMouseMoveDrag=this.handleMouseMoveDrag.bind(this),this.handleResize=this.resizeHandler.bind(this)}static{this.styles=o`
|
|
4134
4177
|
:host {
|
|
4135
4178
|
display: block;
|
|
4136
4179
|
width: 100%;
|
|
@@ -4450,7 +4493,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4450
4493
|
|
|
4451
4494
|
${this.renderNavButtons()}
|
|
4452
4495
|
</div>
|
|
4453
|
-
`}};s([
|
|
4496
|
+
`}};s([T({type:Array}),n("design:type",Array)],Te.prototype,"cards",void 0),s([T({type:String}),n("design:type",String)],Te.prototype,"cardWidth",void 0),s([T({type:String}),n("design:type",String)],Te.prototype,"cardHeight",void 0),s([T({type:Number}),n("design:type",Number)],Te.prototype,"navWidth",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"showNavButtons",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"isDynamicWidth",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"isInfiniteScrollPartial",void 0),s([T({type:Number}),n("design:type",Number)],Te.prototype,"autoPlayDelayMs",void 0),s([B(),n("design:type",Object)],Te.prototype,"showPrevButton",void 0),s([B(),n("design:type",Object)],Te.prototype,"showNextButton",void 0),s([L(".carousel-wrapper"),n("design:type",HTMLElement)],Te.prototype,"slider",void 0),s([L("slot"),n("design:type",HTMLSlotElement)],Te.prototype,"slotElement",void 0),Te=s([a("carousel-component"),n("design:paramtypes",[])],Te);let Be=class extends t{constructor(){super(...arguments),this.message="",this.position="top",this.variant="bubble",this.visible=!0,this.arrowAlign="15px",this.isAnimating=!1}static{this.styles=o`
|
|
4454
4497
|
:host {
|
|
4455
4498
|
display: inline-block;
|
|
4456
4499
|
position: relative;
|
|
@@ -4562,5 +4605,325 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4562
4605
|
<slot></slot>
|
|
4563
4606
|
`:""}
|
|
4564
4607
|
</div>
|
|
4565
|
-
`}};s([
|
|
4608
|
+
`}};s([T({type:String}),n("design:type",Object)],Be.prototype,"message",void 0),s([T({type:Number}),n("design:type",Number)],Be.prototype,"duration",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"position",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"variant",void 0),s([T({type:Boolean}),n("design:type",Object)],Be.prototype,"visible",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"icon",void 0),s([T({type:String}),n("design:type",Object)],Be.prototype,"arrowAlign",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"backgroundColor",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"textColor",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"fontFamily",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"width",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"height",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"top",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"left",void 0),s([B(),n("design:type",Object)],Be.prototype,"isAnimating",void 0),Be=s([a("randstad-bubble")],Be);let Le=class extends t{constructor(){super(...arguments),this.open=!1,this.title="verificación de seguridad",this.email="[correo electrónico]",this.loading=!1,this.showError=!1,this.showSuccessNotice=!1,this.successMessage="",this.helperMessage="",this.resendCooldown=60,this._resendDisabled=!1,this._resendRemaining=0,this._pinValues=Array(6).fill(""),this.modalWidth="450px",this.modalHeight="auto",this.maxHeight="90dvh"}static{this.styles=[X,o`
|
|
4609
|
+
:host {
|
|
4610
|
+
font-family: 'Graphik', sans-serif;
|
|
4611
|
+
}
|
|
4612
|
+
|
|
4613
|
+
.mfa-content {
|
|
4614
|
+
display: flex;
|
|
4615
|
+
flex-direction: column;
|
|
4616
|
+
gap: 16px;
|
|
4617
|
+
}
|
|
4618
|
+
|
|
4619
|
+
.mfa-instruction {
|
|
4620
|
+
${A}
|
|
4621
|
+
color: var(--secondary-color);
|
|
4622
|
+
margin: 0;
|
|
4623
|
+
}
|
|
4624
|
+
|
|
4625
|
+
.pin-group {
|
|
4626
|
+
display: flex;
|
|
4627
|
+
gap: 8px;
|
|
4628
|
+
}
|
|
4629
|
+
|
|
4630
|
+
.pin-input {
|
|
4631
|
+
width: 60.33px;
|
|
4632
|
+
height: 62px;
|
|
4633
|
+
text-align: center;
|
|
4634
|
+
font-size: 20px;
|
|
4635
|
+
font-family: 'Graphik', sans-serif;
|
|
4636
|
+
font-weight: 400;
|
|
4637
|
+
border: 1px solid var(--secondary-color-20);
|
|
4638
|
+
border-radius: 4px;
|
|
4639
|
+
outline: none;
|
|
4640
|
+
transition: border-color 0.2s, box-shadow 0.2s;
|
|
4641
|
+
color: var(--secondary-color);
|
|
4642
|
+
box-sizing: border-box;
|
|
4643
|
+
caret-color: var(--primary-color);
|
|
4644
|
+
}
|
|
4645
|
+
|
|
4646
|
+
.pin-input:focus {
|
|
4647
|
+
border-color: var(--primary-color);
|
|
4648
|
+
box-shadow: 0px 0px 0px 4px var(--primary-color-20);
|
|
4649
|
+
}
|
|
4650
|
+
|
|
4651
|
+
.pin-input.error {
|
|
4652
|
+
border-color: var(--ui-negative);
|
|
4653
|
+
}
|
|
4654
|
+
|
|
4655
|
+
.pin-input.error:focus {
|
|
4656
|
+
box-shadow: 0px 0px 0px 4px var(--ui-negative-pink-shadow);
|
|
4657
|
+
}
|
|
4658
|
+
|
|
4659
|
+
.resend-line {
|
|
4660
|
+
${A}
|
|
4661
|
+
color: var(--secondary-color-60);
|
|
4662
|
+
margin: 8px 0 0;
|
|
4663
|
+
text-align: center;
|
|
4664
|
+
}
|
|
4665
|
+
|
|
4666
|
+
.resend-link {
|
|
4667
|
+
color: var(--primary-color);
|
|
4668
|
+
cursor: pointer;
|
|
4669
|
+
text-decoration: none;
|
|
4670
|
+
background: none;
|
|
4671
|
+
border: none;
|
|
4672
|
+
font-family: 'Graphik', sans-serif;
|
|
4673
|
+
font-size: inherit;
|
|
4674
|
+
padding: 0;
|
|
4675
|
+
line-height: inherit;
|
|
4676
|
+
}
|
|
4677
|
+
|
|
4678
|
+
.resend-link:hover {
|
|
4679
|
+
text-decoration: underline;
|
|
4680
|
+
}
|
|
4681
|
+
|
|
4682
|
+
.resend-link:disabled,
|
|
4683
|
+
.resend-link.disabled {
|
|
4684
|
+
color: var(--secondary-color-60);
|
|
4685
|
+
cursor: default;
|
|
4686
|
+
pointer-events: none;
|
|
4687
|
+
opacity: 0.6;
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4690
|
+
@media (max-width: 576px) {
|
|
4691
|
+
.pin-input {
|
|
4692
|
+
width: 40px;
|
|
4693
|
+
height: 40px;
|
|
4694
|
+
font-size: 16px;
|
|
4695
|
+
}
|
|
4696
|
+
.pin-group {
|
|
4697
|
+
gap: 6px;
|
|
4698
|
+
}
|
|
4699
|
+
}
|
|
4700
|
+
|
|
4701
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4702
|
+
.pin-input {
|
|
4703
|
+
transition: none;
|
|
4704
|
+
}
|
|
4705
|
+
}
|
|
4706
|
+
`]}disconnectedCallback(){super.disconnectedCallback(),this._clearResendTimer()}updated(t){t.has("open")&&this.open&&requestAnimationFrame((()=>this._focusInput(0)))}reset(){this._pinValues=Array(6).fill(""),this.showError=!1,this.showSuccessNotice=!1,this._resendDisabled=!1,this._clearResendTimer(),this.requestUpdate()}focusFirstInput(){this._focusInput(0)}_clearResendTimer(){void 0!==this._resendTimer&&(clearInterval(this._resendTimer),this._resendTimer=void 0)}_getPinInputs(){return this.renderRoot.querySelectorAll(".pin-input")}_focusInput(t){const e=this._getPinInputs(),i=e?.[t];i&&(i.focus(),i.select())}get _isComplete(){return this._pinValues.every((t=>""!==t))}_onPinInput(t,e){let i=(t.target.value||"").replace(/\D/g,"");if(i){if(i.length>1){const t=i.split("");for(let i=e;i<6&&t.length>0;i++)this._pinValues[i]=t.shift();const o=Math.min(5,e+i.length);return setTimeout((()=>this._focusInput(o))),void this.requestUpdate()}this._pinValues[e]=i,this.requestUpdate(),e<5&&this._focusInput(e+1)}else this._pinValues[e]=""}_onPinKeyDown(t,e){"Enter"===t.key&&this._isComplete?this._onConfirm():"Backspace"!==t.key?1!==t.key.length||!/\D/.test(t.key)||t.ctrlKey||t.metaKey||"v"===t.key||t.preventDefault():!this._pinValues[e]&&e>0&&(this._pinValues[e-1]="",this.requestUpdate(),this._focusInput(e-1),t.preventDefault())}_onPinPaste(t){const e=((t.clipboardData??window.clipboardData)?.getData("text")||"").replace(/\D/g,"").slice(0,6).split("");if(0===e.length)return;for(let t=0;t<6;t++)this._pinValues[t]=e[t]||"";t.preventDefault(),this.requestUpdate();const i=this._pinValues.findIndex((t=>!t));setTimeout((()=>this._focusInput(i>=0?i:5)))}_onClose(){this.dispatchEvent(new CustomEvent("mfa-close"))}_onConfirm(){this._isComplete&&!this.loading&&this.dispatchEvent(new CustomEvent("mfa-confirm",{detail:{code:this._pinValues.join("")}}))}_onResend(){this._resendDisabled||(this.dispatchEvent(new CustomEvent("resend-code")),this._startResendCountdown())}_startResendCountdown(){this._clearResendTimer(),this._resendDisabled=!0,this._resendRemaining=this.resendCooldown,this._resendTimer=window.setInterval((()=>{this._resendRemaining-=1,this._resendRemaining<=0&&(this._resendDisabled=!1,this._clearResendTimer()),this.requestUpdate()}),1e3)}_renderPinInputs(){return Array.from({length:6},((t,i)=>e`
|
|
4707
|
+
<input
|
|
4708
|
+
class="pin-input ${this.showError?"error":""}"
|
|
4709
|
+
type="text"
|
|
4710
|
+
inputmode="numeric"
|
|
4711
|
+
pattern="\\d*"
|
|
4712
|
+
maxlength="1"
|
|
4713
|
+
autocomplete="one-time-code"
|
|
4714
|
+
.value=${this._pinValues[i]}
|
|
4715
|
+
@input=${t=>this._onPinInput(t,i)}
|
|
4716
|
+
@keydown=${t=>this._onPinKeyDown(t,i)}
|
|
4717
|
+
aria-label="Dígito ${i+1} del código"
|
|
4718
|
+
aria-invalid=${this.showError?"true":"false"}
|
|
4719
|
+
>
|
|
4720
|
+
`))}_renderResendSection(){return e`
|
|
4721
|
+
<p class="resend-line">
|
|
4722
|
+
¿no lo recibiste?
|
|
4723
|
+
${this._resendDisabled?e`<span role="status" aria-live="polite">Reenviar en (${this._resendRemaining}s)</span>`:e`<button
|
|
4724
|
+
class="resend-link"
|
|
4725
|
+
@click=${this._onResend}
|
|
4726
|
+
>Reenviar código</button>`}
|
|
4727
|
+
</p>
|
|
4728
|
+
`}render(){return e`
|
|
4729
|
+
<custom-modal
|
|
4730
|
+
.open=${this.open}
|
|
4731
|
+
title=${this.title}
|
|
4732
|
+
.hideFooter=${!0}
|
|
4733
|
+
modalWidth= ${this.modalWidth};
|
|
4734
|
+
modalHeight=${this.modalHeight};
|
|
4735
|
+
maxHeight= ${this.maxHeight};
|
|
4736
|
+
@modal-close=${this._onClose}
|
|
4737
|
+
>
|
|
4738
|
+
<div slot="content" class="mfa-content" role="status" aria-live="polite" aria-describedby="mfa-notice-message">
|
|
4739
|
+
<randstad-notice
|
|
4740
|
+
id="mfa-notice-message"
|
|
4741
|
+
.open=${!0}
|
|
4742
|
+
.type=${this.showSuccessNotice?"success":"informative"}
|
|
4743
|
+
.icon=${this.showSuccessNotice?"check":"info"}
|
|
4744
|
+
.message=${this.showSuccessNotice?this.successMessage:this.helperMessage}
|
|
4745
|
+
></randstad-notice>
|
|
4746
|
+
|
|
4747
|
+
<randstad-form-group
|
|
4748
|
+
label="ingresá el código que recibiste"
|
|
4749
|
+
.error=${this.showError}
|
|
4750
|
+
errorMessage="el código ingresado es incorrecto"
|
|
4751
|
+
>
|
|
4752
|
+
<div class="pin-group" @paste=${this._onPinPaste}>
|
|
4753
|
+
${this._renderPinInputs()}
|
|
4754
|
+
</div>
|
|
4755
|
+
</randstad-form-group>
|
|
4756
|
+
|
|
4757
|
+
<randstad-button
|
|
4758
|
+
variant="button-primary"
|
|
4759
|
+
size="md"
|
|
4760
|
+
label="actualizar"
|
|
4761
|
+
.loader=${this.loading}
|
|
4762
|
+
.disabled=${!this._isComplete||this.loading}
|
|
4763
|
+
@click=${this._onConfirm}
|
|
4764
|
+
></randstad-button>
|
|
4765
|
+
|
|
4766
|
+
${this._renderResendSection()}
|
|
4767
|
+
</div>
|
|
4768
|
+
</custom-modal>
|
|
4769
|
+
`}};s([T({type:Boolean,reflect:!0}),n("design:type",Object)],Le.prototype,"open",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"title",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"email",void 0),s([T({type:Boolean}),n("design:type",Object)],Le.prototype,"loading",void 0),s([T({type:Boolean}),n("design:type",Object)],Le.prototype,"showError",void 0),s([T({type:Boolean}),n("design:type",Object)],Le.prototype,"showSuccessNotice",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"successMessage",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"helperMessage",void 0),s([T({type:Number}),n("design:type",Object)],Le.prototype,"resendCooldown",void 0),s([B(),n("design:type",Object)],Le.prototype,"_resendDisabled",void 0),s([B(),n("design:type",Object)],Le.prototype,"_resendRemaining",void 0),s([B(),n("design:type",Array)],Le.prototype,"_pinValues",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"modalWidth",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"modalHeight",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"maxHeight",void 0),Le=s([a("randstad-mfa-modal")],Le);let Re=class extends t{constructor(){super(),this.centerIcon="search-white",this.centerLabel="",this.hidden=!1,this.desktop=!1,this.selectedIndex=-1,this._rafId=null,this.handleScroll=()=>{const t=window.innerHeight+window.scrollY,e=document.documentElement.scrollHeight;this.hidden=t>=e-50},this.handleScrollThrottled=()=>{null==this._rafId&&(this._rafId=requestAnimationFrame((()=>{this._rafId=null,this.handleScroll()})))},this.items=[{icon:"home",label:"Home"},{icon:"postulation",label:"Applications"},{icon:"user",label:"Users"},{icon:"settings",label:"Settings"}]}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.handleScrollThrottled,{passive:!0}),this.handleScroll()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.handleScrollThrottled),null!=this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null)}handleItemClick(t,e){this.selectedIndex=t,this.dispatchEvent(new CustomEvent("nav-item-click",{detail:{index:t,item:e},bubbles:!0,composed:!0}))}handleCenterClick(){this.dispatchEvent(new CustomEvent("center-click",{bubbles:!0,composed:!0}))}static{this.styles=o`
|
|
4770
|
+
:host {
|
|
4771
|
+
display: none;
|
|
4772
|
+
position: fixed;
|
|
4773
|
+
bottom: 0;
|
|
4774
|
+
left: 0;
|
|
4775
|
+
right: 0;
|
|
4776
|
+
z-index: 9998;
|
|
4777
|
+
font-family: 'Graphik', sans-serif;
|
|
4778
|
+
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
4779
|
+
}
|
|
4780
|
+
|
|
4781
|
+
:host([hidden]) {
|
|
4782
|
+
transform: translateY(100%);
|
|
4783
|
+
opacity: 0;
|
|
4784
|
+
}
|
|
4785
|
+
|
|
4786
|
+
@media (max-width: 940px) {
|
|
4787
|
+
:host {
|
|
4788
|
+
display: block;
|
|
4789
|
+
}
|
|
4790
|
+
}
|
|
4791
|
+
|
|
4792
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4793
|
+
:host {
|
|
4794
|
+
transition: none;
|
|
4795
|
+
}
|
|
4796
|
+
}
|
|
4797
|
+
|
|
4798
|
+
@media (min-width: 941px) {
|
|
4799
|
+
:host([desktop]) {
|
|
4800
|
+
display: block;
|
|
4801
|
+
}
|
|
4802
|
+
}
|
|
4803
|
+
|
|
4804
|
+
.navbar {
|
|
4805
|
+
display: flex;
|
|
4806
|
+
align-items: center;
|
|
4807
|
+
justify-content: center;
|
|
4808
|
+
height: 71px;
|
|
4809
|
+
background: var(--white, #ffffff);
|
|
4810
|
+
border-radius: 16px 16px 0 0;
|
|
4811
|
+
box-shadow: 0px -1px 16px 1px rgba(15, 25, 65, 0.15),
|
|
4812
|
+
0px -1px 16px 0px rgba(15, 25, 65, 0.3);
|
|
4813
|
+
padding: 0 16px;
|
|
4814
|
+
}
|
|
4815
|
+
|
|
4816
|
+
.side-item {
|
|
4817
|
+
display: flex;
|
|
4818
|
+
flex-direction: column;
|
|
4819
|
+
align-items: center;
|
|
4820
|
+
justify-content: center;
|
|
4821
|
+
min-width: 34px;
|
|
4822
|
+
height: 51px;
|
|
4823
|
+
text-decoration: none;
|
|
4824
|
+
cursor: pointer;
|
|
4825
|
+
gap: 8px;
|
|
4826
|
+
flex: 1;
|
|
4827
|
+
}
|
|
4828
|
+
|
|
4829
|
+
.side-item .item-icon {
|
|
4830
|
+
width: 24px;
|
|
4831
|
+
height: 24px;
|
|
4832
|
+
display: flex;
|
|
4833
|
+
align-items: center;
|
|
4834
|
+
justify-content: center;
|
|
4835
|
+
}
|
|
4836
|
+
|
|
4837
|
+
.side-item .item-icon randstad-icon {
|
|
4838
|
+
--icon-color: var(--secondary-color-80, #404767);
|
|
4839
|
+
}
|
|
4840
|
+
|
|
4841
|
+
.side-item.active .item-icon randstad-icon {
|
|
4842
|
+
--icon-color: var(--primary-color, #2175d9);
|
|
4843
|
+
}
|
|
4844
|
+
|
|
4845
|
+
.side-item .item-label {
|
|
4846
|
+
font-family: 'Graphik', sans-serif;
|
|
4847
|
+
font-weight: 400;
|
|
4848
|
+
font-size: 10px;
|
|
4849
|
+
line-height: 12px;
|
|
4850
|
+
letter-spacing: 0%;
|
|
4851
|
+
color: var(--secondary-color-80, #404767);
|
|
4852
|
+
text-align: center;
|
|
4853
|
+
white-space: nowrap;
|
|
4854
|
+
overflow: hidden;
|
|
4855
|
+
text-overflow: ellipsis;
|
|
4856
|
+
max-width: 100%;
|
|
4857
|
+
}
|
|
4858
|
+
|
|
4859
|
+
.side-item.active .item-label {
|
|
4860
|
+
color: var(--primary-color, #2175d9);
|
|
4861
|
+
}
|
|
4862
|
+
|
|
4863
|
+
.center-button {
|
|
4864
|
+
display: flex;
|
|
4865
|
+
flex-direction: column;
|
|
4866
|
+
align-items: center;
|
|
4867
|
+
justify-content: center;
|
|
4868
|
+
gap: 2px;
|
|
4869
|
+
cursor: pointer;
|
|
4870
|
+
background: none;
|
|
4871
|
+
border: none;
|
|
4872
|
+
padding: 0;
|
|
4873
|
+
margin: 0 12px;
|
|
4874
|
+
flex-shrink: 0;
|
|
4875
|
+
}
|
|
4876
|
+
|
|
4877
|
+
.center-circle {
|
|
4878
|
+
width: 60px;
|
|
4879
|
+
height: 60px;
|
|
4880
|
+
border-radius: 100px;
|
|
4881
|
+
background: var(--primary-color, #2175d9);
|
|
4882
|
+
border: 4px solid rgba(211, 227, 247, 1);
|
|
4883
|
+
display: flex;
|
|
4884
|
+
align-items: center;
|
|
4885
|
+
justify-content: center;
|
|
4886
|
+
transform: translateY(-12px);
|
|
4887
|
+
}
|
|
4888
|
+
|
|
4889
|
+
.center-circle randstad-icon {
|
|
4890
|
+
--icon-color: var(--white, #ffffff);
|
|
4891
|
+
}
|
|
4892
|
+
|
|
4893
|
+
.center-label {
|
|
4894
|
+
font-family: 'Graphik', sans-serif;
|
|
4895
|
+
font-weight: 400;
|
|
4896
|
+
font-size: 10px;
|
|
4897
|
+
line-height: 12px;
|
|
4898
|
+
letter-spacing: 0%;
|
|
4899
|
+
color: var(--secondary-color, #0f1941);
|
|
4900
|
+
text-align: center;
|
|
4901
|
+
}
|
|
4902
|
+
`}render(){const t=this.items.slice(0,2),o=this.items.slice(2,4),s=(t,o)=>{const s=o===this.selectedIndex,n=r({"side-item":!0,active:s});return e`
|
|
4903
|
+
<a
|
|
4904
|
+
class=${n}
|
|
4905
|
+
href=${t.href||"#"}
|
|
4906
|
+
@click=${e=>{t.href||e.preventDefault(),this.handleItemClick(o,t)}}
|
|
4907
|
+
aria-label=${t.label}
|
|
4908
|
+
aria-current=${s?"page":i}
|
|
4909
|
+
>
|
|
4910
|
+
<span class="item-icon">
|
|
4911
|
+
<randstad-icon name=${t.icon} size="24" aria-hidden="true"></randstad-icon>
|
|
4912
|
+
</span>
|
|
4913
|
+
<span class="item-label">${t.label}</span>
|
|
4914
|
+
</a>
|
|
4915
|
+
`};return e`
|
|
4916
|
+
<nav class="navbar" role="navigation" aria-label="Navegación principal">
|
|
4917
|
+
${t.map(((t,e)=>s(t,e)))}
|
|
4918
|
+
|
|
4919
|
+
<button class="center-button" @click=${this.handleCenterClick} aria-label="Abrir menú">
|
|
4920
|
+
<span class="center-circle">
|
|
4921
|
+
<randstad-icon name=${this.centerIcon} size="28" aria-hidden="true"></randstad-icon>
|
|
4922
|
+
</span>
|
|
4923
|
+
${this.centerLabel?e`<span class="center-label">${this.centerLabel}</span>`:i}
|
|
4924
|
+
</button>
|
|
4925
|
+
|
|
4926
|
+
${o.map(((t,e)=>s(t,e+2)))}
|
|
4927
|
+
</nav>
|
|
4928
|
+
`}};s([T({type:Array}),n("design:type",Array)],Re.prototype,"items",void 0),s([T({type:String}),n("design:type",Object)],Re.prototype,"centerIcon",void 0),s([T({type:String}),n("design:type",Object)],Re.prototype,"centerLabel",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],Re.prototype,"hidden",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],Re.prototype,"desktop",void 0),s([T({type:Number}),n("design:type",Object)],Re.prototype,"selectedIndex",void 0),Re=s([a("randstad-navbar"),n("design:paramtypes",[])],Re);export{U as AccordionList,q as AccordionPanel,R as BaseControl,Fe as CalendarOverlay,Te as Carousel,Y as CarouselCard,G as Checkbox,at as CustomModal,lt as CustomPopup,ct as CustomRadio,bt as CustomStepper,Me as DatePickerComponent,pt as FilterableSelect,it as FormGroup,ot as IconComponent,Le as MfaModal,dt as ProgressCircle,Be as RandstadBubble,H as RandstadButton,et as RandstadForm,Re as RandstadNavbar,nt as RandstadNotice,st as RandstadSocialMediaInput,mt as TabsBar,_e as UploadFile,xt as UploadImage,J as scrollbarStyles};
|
|
4566
4929
|
//# sourceMappingURL=index.js.map
|