@everymatrix/general-input 1.49.2 → 1.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_10.cjs.entry.js +22 -15
- package/dist/cjs/general-input.cjs.entry.js +1 -1
- package/dist/cjs/general-input.cjs.js +2 -2
- package/dist/cjs/{index-d9883885.js → index-01420a64.js} +30 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/toggle-checkbox-input.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +8 -8
- package/dist/collection/components/checkbox-input/checkbox-input.css +7 -7
- package/dist/collection/components/date-input/date-input.css +12 -12
- package/dist/collection/components/email-input/email-input.css +13 -13
- package/dist/collection/components/number-input/number-input.css +11 -11
- package/dist/collection/components/password-input/password-input.css +25 -25
- package/dist/collection/components/radio-input/radio-input.css +4 -4
- package/dist/collection/components/select-input/select-input.css +16 -16
- package/dist/collection/components/select-input/select-input.js +9 -2
- package/dist/collection/components/tel-input/tel-input.css +19 -19
- package/dist/collection/components/text-input/text-input.css +14 -14
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +7 -7
- package/dist/esm/checkbox-group-input_10.entry.js +22 -15
- package/dist/esm/general-input.entry.js +1 -1
- package/dist/esm/general-input.js +3 -3
- package/dist/esm/{index-4afeecb5.js → index-542cff81.js} +30 -13
- package/dist/esm/loader.js +2 -2
- package/dist/esm/toggle-checkbox-input.entry.js +2 -2
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/{p-22d31471.entry.js → p-3cab3b95.entry.js} +1 -1
- package/dist/general-input/p-3ce1e382.js +2 -0
- package/dist/general-input/{p-77266677.entry.js → p-cc4fcb3f.entry.js} +485 -6
- package/dist/general-input/{p-f5ae5ebf.entry.js → p-e5532cb1.entry.js} +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/select-input/select-input.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/package.json +1 -1
- package/dist/general-input/p-6061c27c.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as o}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,g as o}from"./p-3ce1e382.js";import{t as s}from"./p-6ca41a3b.js";import{t as r}from"./p-2dccd0bf.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -736,7 +736,486 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
736
736
|
Code distributed by Google as part of the polymer project is also
|
|
737
737
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
738
738
|
*/
|
|
739
|
-
function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=o(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,o(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),Ei=window.ShadyCSS&&window.ShadyCSS.cssBuild,Mi=Ht((t=>{const e=Si(Ti(t));function i(t,e,i,o){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,o)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,o[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.
|
|
739
|
+
function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=o(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,o(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),Ei=window.ShadyCSS&&window.ShadyCSS.cssBuild,Mi=Ht((t=>{const e=Si(Ti(t));function i(t,e,i,o){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,o)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,o[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Nt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let o=0;o<t.length;o++)i._createMethodObserver(t[o],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Bt||Ot)&&(e=Xt.import(t,"template"),Bt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Et(t.url);else{const t=Xt.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Pt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let o=e[i];"value"in o&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=o)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return St(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,o){if(!Ei){const s=e.content.querySelectorAll("style"),r=ae(e),a=function(t){let e=ie(t);return e?ne(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let s=a[i];s.textContent=t._processStyleText(s.textContent,o),e.content.insertBefore(s,n)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],a=s[l];a!==i?(i=i.cloneNode(!0),a.parentNode.insertBefore(i,a)):l++,i.textContent=t._processStyleText(i.textContent,o)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Vt&&Ei&&It){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?Dt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=le(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),qt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Dt(this.importPath)),Dt(t,e)}static _parseTemplateContent(t,i,o){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,o)}static _addTemplatePropertyEffect(t,i,o){return!jt||i in this._properties||o.info.part.signature&&o.info.part.signature.static||o.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,o)}}})),Ii=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Pi{constructor(t,e){Oi(t,e);const i=e.reduce(((e,i,o)=>e+Fi(i)+t[o+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Fi(t){if(t instanceof Pi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Bi=function(t,...e){Oi(t,e);const i=document.createElement("template");let o=e.reduce(((e,i,o)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Pi)return Fi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[o+1]),t[0]);return Ii&&(o=Ii.createHTML(o)),i.innerHTML=o,i},Oi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Ni=Mi(HTMLElement),ji=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,qi=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Li(t,e){if("function"!=typeof t)return;const i=ji.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function Ri(){
|
|
740
|
+
/*! vaadin-dev-mode:start
|
|
741
|
+
(function () {
|
|
742
|
+
'use strict';
|
|
743
|
+
|
|
744
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
745
|
+
return typeof obj;
|
|
746
|
+
} : function (obj) {
|
|
747
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
var classCallCheck = function (instance, Constructor) {
|
|
751
|
+
if (!(instance instanceof Constructor)) {
|
|
752
|
+
throw new TypeError("Cannot call a class as a function");
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
var createClass = function () {
|
|
757
|
+
function defineProperties(target, props) {
|
|
758
|
+
for (var i = 0; i < props.length; i++) {
|
|
759
|
+
var descriptor = props[i];
|
|
760
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
761
|
+
descriptor.configurable = true;
|
|
762
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
763
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
return function (Constructor, protoProps, staticProps) {
|
|
768
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
769
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
770
|
+
return Constructor;
|
|
771
|
+
};
|
|
772
|
+
}();
|
|
773
|
+
|
|
774
|
+
var getPolymerVersion = function getPolymerVersion() {
|
|
775
|
+
return window.Polymer && window.Polymer.version;
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
var StatisticsGatherer = function () {
|
|
779
|
+
function StatisticsGatherer(logger) {
|
|
780
|
+
classCallCheck(this, StatisticsGatherer);
|
|
781
|
+
|
|
782
|
+
this.now = new Date().getTime();
|
|
783
|
+
this.logger = logger;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
createClass(StatisticsGatherer, [{
|
|
787
|
+
key: 'frameworkVersionDetectors',
|
|
788
|
+
value: function frameworkVersionDetectors() {
|
|
789
|
+
return {
|
|
790
|
+
'Flow': function Flow() {
|
|
791
|
+
if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
|
|
792
|
+
var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
|
|
793
|
+
return window.Vaadin.Flow.clients[key];
|
|
794
|
+
}).filter(function (client) {
|
|
795
|
+
return client.getVersionInfo;
|
|
796
|
+
}).map(function (client) {
|
|
797
|
+
return client.getVersionInfo().flow;
|
|
798
|
+
});
|
|
799
|
+
if (flowVersions.length > 0) {
|
|
800
|
+
return flowVersions[0];
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
'Vaadin Framework': function VaadinFramework() {
|
|
805
|
+
if (window.vaadin && window.vaadin.clients) {
|
|
806
|
+
var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
|
|
807
|
+
return client.getVersionInfo;
|
|
808
|
+
}).map(function (client) {
|
|
809
|
+
return client.getVersionInfo().vaadinVersion;
|
|
810
|
+
});
|
|
811
|
+
if (frameworkVersions.length > 0) {
|
|
812
|
+
return frameworkVersions[0];
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
'AngularJs': function AngularJs() {
|
|
817
|
+
if (window.angular && window.angular.version && window.angular.version) {
|
|
818
|
+
return window.angular.version.full;
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
'Angular': function Angular() {
|
|
822
|
+
if (window.ng) {
|
|
823
|
+
var tags = document.querySelectorAll("[ng-version]");
|
|
824
|
+
if (tags.length > 0) {
|
|
825
|
+
return tags[0].getAttribute("ng-version");
|
|
826
|
+
}
|
|
827
|
+
return "Unknown";
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
'Backbone.js': function BackboneJs() {
|
|
831
|
+
if (window.Backbone) {
|
|
832
|
+
return window.Backbone.VERSION;
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
'React': function React() {
|
|
836
|
+
var reactSelector = '[data-reactroot], [data-reactid]';
|
|
837
|
+
if (!!document.querySelector(reactSelector)) {
|
|
838
|
+
// React does not publish the version by default
|
|
839
|
+
return "unknown";
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
'Ember': function Ember() {
|
|
843
|
+
if (window.Em && window.Em.VERSION) {
|
|
844
|
+
return window.Em.VERSION;
|
|
845
|
+
} else if (window.Ember && window.Ember.VERSION) {
|
|
846
|
+
return window.Ember.VERSION;
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
'jQuery': function (_jQuery) {
|
|
850
|
+
function jQuery() {
|
|
851
|
+
return _jQuery.apply(this, arguments);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
jQuery.toString = function () {
|
|
855
|
+
return _jQuery.toString();
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
return jQuery;
|
|
859
|
+
}(function () {
|
|
860
|
+
if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
|
|
861
|
+
return jQuery.prototype.jquery;
|
|
862
|
+
}
|
|
863
|
+
}),
|
|
864
|
+
'Polymer': function Polymer() {
|
|
865
|
+
var version = getPolymerVersion();
|
|
866
|
+
if (version) {
|
|
867
|
+
return version;
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
'LitElement': function LitElement() {
|
|
871
|
+
var version = window.litElementVersions && window.litElementVersions[0];
|
|
872
|
+
if (version) {
|
|
873
|
+
return version;
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
'LitHtml': function LitHtml() {
|
|
877
|
+
var version = window.litHtmlVersions && window.litHtmlVersions[0];
|
|
878
|
+
if (version) {
|
|
879
|
+
return version;
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
'Vue.js': function VueJs() {
|
|
883
|
+
if (window.Vue) {
|
|
884
|
+
return window.Vue.version;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
}, {
|
|
890
|
+
key: 'getUsedVaadinElements',
|
|
891
|
+
value: function getUsedVaadinElements(elements) {
|
|
892
|
+
var version = getPolymerVersion();
|
|
893
|
+
var elementClasses = void 0;
|
|
894
|
+
// NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
|
|
895
|
+
// Check all locations calling the method getEntries() in
|
|
896
|
+
// https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
|
|
897
|
+
// Currently it is only used by BootstrapHandler.
|
|
898
|
+
if (version && version.indexOf('2') === 0) {
|
|
899
|
+
// Polymer 2: components classes are stored in window.Vaadin
|
|
900
|
+
elementClasses = Object.keys(window.Vaadin).map(function (c) {
|
|
901
|
+
return window.Vaadin[c];
|
|
902
|
+
}).filter(function (c) {
|
|
903
|
+
return c.is;
|
|
904
|
+
});
|
|
905
|
+
} else {
|
|
906
|
+
// Polymer 3: components classes are stored in window.Vaadin.registrations
|
|
907
|
+
elementClasses = window.Vaadin.registrations || [];
|
|
908
|
+
}
|
|
909
|
+
elementClasses.forEach(function (klass) {
|
|
910
|
+
var version = klass.version ? klass.version : "0.0.0";
|
|
911
|
+
elements[klass.is] = { version: version };
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
}, {
|
|
915
|
+
key: 'getUsedVaadinThemes',
|
|
916
|
+
value: function getUsedVaadinThemes(themes) {
|
|
917
|
+
['Lumo', 'Material'].forEach(function (themeName) {
|
|
918
|
+
var theme;
|
|
919
|
+
var version = getPolymerVersion();
|
|
920
|
+
if (version && version.indexOf('2') === 0) {
|
|
921
|
+
// Polymer 2: themes are stored in window.Vaadin
|
|
922
|
+
theme = window.Vaadin[themeName];
|
|
923
|
+
} else {
|
|
924
|
+
// Polymer 3: themes are stored in custom element registry
|
|
925
|
+
theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
|
|
926
|
+
}
|
|
927
|
+
if (theme && theme.version) {
|
|
928
|
+
themes[themeName] = { version: theme.version };
|
|
929
|
+
}
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
}, {
|
|
933
|
+
key: 'getFrameworks',
|
|
934
|
+
value: function getFrameworks(frameworks) {
|
|
935
|
+
var detectors = this.frameworkVersionDetectors();
|
|
936
|
+
Object.keys(detectors).forEach(function (framework) {
|
|
937
|
+
var detector = detectors[framework];
|
|
938
|
+
try {
|
|
939
|
+
var version = detector();
|
|
940
|
+
if (version) {
|
|
941
|
+
frameworks[framework] = { version: version };
|
|
942
|
+
}
|
|
943
|
+
} catch (e) {}
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
}, {
|
|
947
|
+
key: 'gather',
|
|
948
|
+
value: function gather(storage) {
|
|
949
|
+
var storedStats = storage.read();
|
|
950
|
+
var gatheredStats = {};
|
|
951
|
+
var types = ["elements", "frameworks", "themes"];
|
|
952
|
+
|
|
953
|
+
types.forEach(function (type) {
|
|
954
|
+
gatheredStats[type] = {};
|
|
955
|
+
if (!storedStats[type]) {
|
|
956
|
+
storedStats[type] = {};
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
|
|
960
|
+
var previousStats = JSON.stringify(storedStats);
|
|
961
|
+
|
|
962
|
+
this.getUsedVaadinElements(gatheredStats.elements);
|
|
963
|
+
this.getFrameworks(gatheredStats.frameworks);
|
|
964
|
+
this.getUsedVaadinThemes(gatheredStats.themes);
|
|
965
|
+
|
|
966
|
+
var now = this.now;
|
|
967
|
+
types.forEach(function (type) {
|
|
968
|
+
var keys = Object.keys(gatheredStats[type]);
|
|
969
|
+
keys.forEach(function (key) {
|
|
970
|
+
if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
|
|
971
|
+
storedStats[type][key] = { firstUsed: now };
|
|
972
|
+
}
|
|
973
|
+
// Discards any previously logged version number
|
|
974
|
+
storedStats[type][key].version = gatheredStats[type][key].version;
|
|
975
|
+
storedStats[type][key].lastUsed = now;
|
|
976
|
+
});
|
|
977
|
+
});
|
|
978
|
+
|
|
979
|
+
var newStats = JSON.stringify(storedStats);
|
|
980
|
+
storage.write(newStats);
|
|
981
|
+
if (newStats != previousStats && Object.keys(storedStats).length > 0) {
|
|
982
|
+
this.logger.debug("New stats: " + newStats);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}]);
|
|
986
|
+
return StatisticsGatherer;
|
|
987
|
+
}();
|
|
988
|
+
|
|
989
|
+
var StatisticsStorage = function () {
|
|
990
|
+
function StatisticsStorage(key) {
|
|
991
|
+
classCallCheck(this, StatisticsStorage);
|
|
992
|
+
|
|
993
|
+
this.key = key;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
createClass(StatisticsStorage, [{
|
|
997
|
+
key: 'read',
|
|
998
|
+
value: function read() {
|
|
999
|
+
var localStorageStatsString = localStorage.getItem(this.key);
|
|
1000
|
+
try {
|
|
1001
|
+
return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
|
|
1002
|
+
} catch (e) {
|
|
1003
|
+
return {};
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}, {
|
|
1007
|
+
key: 'write',
|
|
1008
|
+
value: function write(data) {
|
|
1009
|
+
localStorage.setItem(this.key, data);
|
|
1010
|
+
}
|
|
1011
|
+
}, {
|
|
1012
|
+
key: 'clear',
|
|
1013
|
+
value: function clear() {
|
|
1014
|
+
localStorage.removeItem(this.key);
|
|
1015
|
+
}
|
|
1016
|
+
}, {
|
|
1017
|
+
key: 'isEmpty',
|
|
1018
|
+
value: function isEmpty() {
|
|
1019
|
+
var storedStats = this.read();
|
|
1020
|
+
var empty = true;
|
|
1021
|
+
Object.keys(storedStats).forEach(function (key) {
|
|
1022
|
+
if (Object.keys(storedStats[key]).length > 0) {
|
|
1023
|
+
empty = false;
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
|
|
1027
|
+
return empty;
|
|
1028
|
+
}
|
|
1029
|
+
}]);
|
|
1030
|
+
return StatisticsStorage;
|
|
1031
|
+
}();
|
|
1032
|
+
|
|
1033
|
+
var StatisticsSender = function () {
|
|
1034
|
+
function StatisticsSender(url, logger) {
|
|
1035
|
+
classCallCheck(this, StatisticsSender);
|
|
1036
|
+
|
|
1037
|
+
this.url = url;
|
|
1038
|
+
this.logger = logger;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
createClass(StatisticsSender, [{
|
|
1042
|
+
key: 'send',
|
|
1043
|
+
value: function send(data, errorHandler) {
|
|
1044
|
+
var logger = this.logger;
|
|
1045
|
+
|
|
1046
|
+
if (navigator.onLine === false) {
|
|
1047
|
+
logger.debug("Offline, can't send");
|
|
1048
|
+
errorHandler();
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
logger.debug("Sending data to " + this.url);
|
|
1052
|
+
|
|
1053
|
+
var req = new XMLHttpRequest();
|
|
1054
|
+
req.withCredentials = true;
|
|
1055
|
+
req.addEventListener("load", function () {
|
|
1056
|
+
// Stats sent, nothing more to do
|
|
1057
|
+
logger.debug("Response: " + req.responseText);
|
|
1058
|
+
});
|
|
1059
|
+
req.addEventListener("error", function () {
|
|
1060
|
+
logger.debug("Send failed");
|
|
1061
|
+
errorHandler();
|
|
1062
|
+
});
|
|
1063
|
+
req.addEventListener("abort", function () {
|
|
1064
|
+
logger.debug("Send aborted");
|
|
1065
|
+
errorHandler();
|
|
1066
|
+
});
|
|
1067
|
+
req.open("POST", this.url);
|
|
1068
|
+
req.setRequestHeader("Content-Type", "application/json");
|
|
1069
|
+
req.send(data);
|
|
1070
|
+
}
|
|
1071
|
+
}]);
|
|
1072
|
+
return StatisticsSender;
|
|
1073
|
+
}();
|
|
1074
|
+
|
|
1075
|
+
var StatisticsLogger = function () {
|
|
1076
|
+
function StatisticsLogger(id) {
|
|
1077
|
+
classCallCheck(this, StatisticsLogger);
|
|
1078
|
+
|
|
1079
|
+
this.id = id;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
createClass(StatisticsLogger, [{
|
|
1083
|
+
key: '_isDebug',
|
|
1084
|
+
value: function _isDebug() {
|
|
1085
|
+
return localStorage.getItem("vaadin." + this.id + ".debug");
|
|
1086
|
+
}
|
|
1087
|
+
}, {
|
|
1088
|
+
key: 'debug',
|
|
1089
|
+
value: function debug(msg) {
|
|
1090
|
+
if (this._isDebug()) {
|
|
1091
|
+
console.info(this.id + ": " + msg);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}]);
|
|
1095
|
+
return StatisticsLogger;
|
|
1096
|
+
}();
|
|
1097
|
+
|
|
1098
|
+
var UsageStatistics = function () {
|
|
1099
|
+
function UsageStatistics() {
|
|
1100
|
+
classCallCheck(this, UsageStatistics);
|
|
1101
|
+
|
|
1102
|
+
this.now = new Date();
|
|
1103
|
+
this.timeNow = this.now.getTime();
|
|
1104
|
+
this.gatherDelay = 10; // Delay between loading this file and gathering stats
|
|
1105
|
+
this.initialDelay = 24 * 60 * 60;
|
|
1106
|
+
|
|
1107
|
+
this.logger = new StatisticsLogger("statistics");
|
|
1108
|
+
this.storage = new StatisticsStorage("vaadin.statistics.basket");
|
|
1109
|
+
this.gatherer = new StatisticsGatherer(this.logger);
|
|
1110
|
+
this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
createClass(UsageStatistics, [{
|
|
1114
|
+
key: 'maybeGatherAndSend',
|
|
1115
|
+
value: function maybeGatherAndSend() {
|
|
1116
|
+
var _this = this;
|
|
1117
|
+
|
|
1118
|
+
if (localStorage.getItem(UsageStatistics.optOutKey)) {
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1121
|
+
this.gatherer.gather(this.storage);
|
|
1122
|
+
setTimeout(function () {
|
|
1123
|
+
_this.maybeSend();
|
|
1124
|
+
}, this.gatherDelay * 1000);
|
|
1125
|
+
}
|
|
1126
|
+
}, {
|
|
1127
|
+
key: 'lottery',
|
|
1128
|
+
value: function lottery() {
|
|
1129
|
+
return true;
|
|
1130
|
+
}
|
|
1131
|
+
}, {
|
|
1132
|
+
key: 'currentMonth',
|
|
1133
|
+
value: function currentMonth() {
|
|
1134
|
+
return this.now.getYear() * 12 + this.now.getMonth();
|
|
1135
|
+
}
|
|
1136
|
+
}, {
|
|
1137
|
+
key: 'maybeSend',
|
|
1138
|
+
value: function maybeSend() {
|
|
1139
|
+
var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
1140
|
+
var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
|
|
1141
|
+
|
|
1142
|
+
if (!firstUse) {
|
|
1143
|
+
// Use a grace period to avoid interfering with tests, incognito mode etc
|
|
1144
|
+
firstUse = this.timeNow;
|
|
1145
|
+
localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
if (this.timeNow < firstUse + this.initialDelay * 1000) {
|
|
1149
|
+
this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
|
|
1150
|
+
return;
|
|
1151
|
+
}
|
|
1152
|
+
if (this.currentMonth() <= monthProcessed) {
|
|
1153
|
+
this.logger.debug("This month has already been processed");
|
|
1154
|
+
return;
|
|
1155
|
+
}
|
|
1156
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
|
|
1157
|
+
// Use random sampling
|
|
1158
|
+
if (this.lottery()) {
|
|
1159
|
+
this.logger.debug("Congratulations, we have a winner!");
|
|
1160
|
+
} else {
|
|
1161
|
+
this.logger.debug("Sorry, no stats from you this time");
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
this.send();
|
|
1166
|
+
}
|
|
1167
|
+
}, {
|
|
1168
|
+
key: 'send',
|
|
1169
|
+
value: function send() {
|
|
1170
|
+
// Ensure we have the latest data
|
|
1171
|
+
this.gatherer.gather(this.storage);
|
|
1172
|
+
|
|
1173
|
+
// Read, send and clean up
|
|
1174
|
+
var data = this.storage.read();
|
|
1175
|
+
data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
1176
|
+
data["usageStatisticsVersion"] = UsageStatistics.version;
|
|
1177
|
+
var info = 'This request contains usage statistics gathered from the application running in development mode. \n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n\n\n';
|
|
1178
|
+
var self = this;
|
|
1179
|
+
this.sender.send(info + JSON.stringify(data), function () {
|
|
1180
|
+
// Revert the 'month processed' flag
|
|
1181
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
}], [{
|
|
1185
|
+
key: 'version',
|
|
1186
|
+
get: function get$1() {
|
|
1187
|
+
return '2.1.2';
|
|
1188
|
+
}
|
|
1189
|
+
}, {
|
|
1190
|
+
key: 'firstUseKey',
|
|
1191
|
+
get: function get$1() {
|
|
1192
|
+
return 'vaadin.statistics.firstuse';
|
|
1193
|
+
}
|
|
1194
|
+
}, {
|
|
1195
|
+
key: 'monthProcessedKey',
|
|
1196
|
+
get: function get$1() {
|
|
1197
|
+
return 'vaadin.statistics.monthProcessed';
|
|
1198
|
+
}
|
|
1199
|
+
}, {
|
|
1200
|
+
key: 'optOutKey',
|
|
1201
|
+
get: function get$1() {
|
|
1202
|
+
return 'vaadin.statistics.optout';
|
|
1203
|
+
}
|
|
1204
|
+
}]);
|
|
1205
|
+
return UsageStatistics;
|
|
1206
|
+
}();
|
|
1207
|
+
|
|
1208
|
+
try {
|
|
1209
|
+
window.Vaadin = window.Vaadin || {};
|
|
1210
|
+
window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
|
|
1211
|
+
window.Vaadin.usageStatsChecker.maybeGatherAndSend();
|
|
1212
|
+
} catch (e) {
|
|
1213
|
+
// Intentionally ignored as this is not a problem in the app being developed
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
}());
|
|
1217
|
+
|
|
1218
|
+
vaadin-dev-mode:end **/}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(qi?!(qi&&Object.keys(qi).map((t=>qi[t])).filter((t=>t.productionMode)).length>0):!Li((function(){return!0})))}catch(t){return!1}}());
|
|
740
1219
|
/**
|
|
741
1220
|
* @license
|
|
742
1221
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1244,7 +1723,7 @@ class Cs{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
1244
1723
|
</div>
|
|
1245
1724
|
|
|
1246
1725
|
<slot name="tooltip"></slot>
|
|
1247
|
-
`}static get properties(){return{value:{type:Array,value:()=>[],notify:!0,observer:"__valueChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new vo(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new uo(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),o=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),o.forEach(this.__unregisterCheckbox);const s=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(s),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||this.value.length>0}__filterCheckboxes(t){return t.filter((t=>t instanceof bs))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),t.checked?this.__addCheckboxToValue(t.value):this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value.includes(t)||(this.value=[...this.value,t])}__removeCheckboxFromValue(t){this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){0===t.length&&void 0===e||(this.toggleAttribute("has-value",t.length>0),this.__checkboxes.forEach((e=>{e.checked=t.includes(e.value)})),void 0!==e&&this.validate())}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}a(Es);const Ms=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[]}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{key:"fa45026502fd8d46aa537aee03210ad68d30e577",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"15ded4fd896920c6244806e49f300c124c27186d",class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{key:"d7eaa205877f8f12c9ef7d4f77018665806f5c7c",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{key:"aca39ed398415a6e2cef861be40dad33e0398759",class:"checkboxgroup__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{key:"a1a6e1c3c02edcca572b8826ffba06835ca451c3",class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{key:"9f5f8a945e4ba13d7d0da6d362c15d00a7796b71",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Ms.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}';const Is=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"0aae00d291d1da02adae1bc91e79ccd579aa5c7f",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{key:"4b8c61d322b5065d8abe4e2687e270511fadc97f",class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{key:"934263cb58a0d379e8b7dc1f5004ad7e61c63ce0",class:"checkbox__error-message"},this.errorMessage),i("div",{key:"88cc71329d88b6325d792226e64ff7f93e940178",class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{key:"3708dc613dc920bac6557f2a8020bbafd97d9127",class:"checkbox__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Is.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}';
|
|
1726
|
+
`}static get properties(){return{value:{type:Array,value:()=>[],notify:!0,observer:"__valueChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new vo(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new uo(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),o=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),o.forEach(this.__unregisterCheckbox);const s=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(s),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||this.value.length>0}__filterCheckboxes(t){return t.filter((t=>t instanceof bs))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),t.checked?this.__addCheckboxToValue(t.value):this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value.includes(t)||(this.value=[...this.value,t])}__removeCheckboxFromValue(t){this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){0===t.length&&void 0===e||(this.toggleAttribute("has-value",t.length>0),this.__checkboxes.forEach((e=>{e.checked=t.includes(e.value)})),void 0!==e&&this.validate())}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}a(Es);const Ms=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[]}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{key:"fa45026502fd8d46aa537aee03210ad68d30e577",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"15ded4fd896920c6244806e49f300c124c27186d",class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{key:"d7eaa205877f8f12c9ef7d4f77018665806f5c7c",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{key:"aca39ed398415a6e2cef861be40dad33e0398759",class:"checkboxgroup__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{key:"a1a6e1c3c02edcca572b8826ffba06835ca451c3",class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{key:"9f5f8a945e4ba13d7d0da6d362c15d00a7796b71",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Ms.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}';const Is=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"0aae00d291d1da02adae1bc91e79ccd579aa5c7f",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{key:"4b8c61d322b5065d8abe4e2687e270511fadc97f",class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{key:"934263cb58a0d379e8b7dc1f5004ad7e61c63ce0",class:"checkbox__error-message"},this.errorMessage),i("div",{key:"88cc71329d88b6325d792226e64ff7f93e940178",class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{key:"3708dc613dc920bac6557f2a8020bbafd97d9127",class:"checkbox__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Is.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}';
|
|
1248
1727
|
/**
|
|
1249
1728
|
* @license
|
|
1250
1729
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -3929,7 +4408,7 @@ ft("vaadin-date-picker",[ba,p`
|
|
|
3929
4408
|
></vaadin-date-picker-overlay>
|
|
3930
4409
|
|
|
3931
4410
|
<slot name="tooltip"></slot>
|
|
3932
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new cs(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new fs(this.inputElement,this._labelController)),this._tooltipController=new vo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function ka(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Aa(t){ka(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===_a(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ca(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function za(t,e){return ka(2,arguments),function(t,e){ka(2,arguments);var i=Aa(t).getTime(),o=Ca(e);return new Date(i+o)}(t,-Ca(e))}function Ta(t){ka(1,arguments);var e=Aa(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Da(t){ka(1,arguments);var e=Aa(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var s=Ta(o),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var a=Ta(r);return e.getTime()>=s.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}a(xa);function Sa(t){ka(1,arguments);var e=Aa(t),i=Ta(e).getTime()-function(t){ka(1,arguments);var e=Da(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Ta(i)}(e).getTime();return Math.round(i/6048e5)+1}var Ea={};function Ma(){return Ea}function Ia(t,e){var i,o,s,r,a,n,l,h;ka(1,arguments);var c=Ma(),u=Ca(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==s?s:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Aa(t),p=d.getUTCDay(),m=(p<u?7:0)+p-u;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function Pa(t,e){var i,o,s,r,a,n,l,h;ka(1,arguments);var c=Aa(t),u=c.getUTCFullYear(),d=Ma(),p=Ca(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,p),m.setUTCHours(0,0,0,0);var f=Ia(m,e),v=new Date(0);v.setUTCFullYear(u,0,p),v.setUTCHours(0,0,0,0);var b=Ia(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=b.getTime()?u:u-1}function Fa(t,e){ka(1,arguments);var i=Aa(t),o=Ia(i,e).getTime()-function(t,e){var i,o,s,r,a,n,l,h;ka(1,arguments);var c=Ma(),u=Ca(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=Pa(t,e),p=new Date(0);return p.setUTCFullYear(d,0,u),p.setUTCHours(0,0,0,0),Ia(p,e)}(i,e).getTime();return Math.round(o/6048e5)+1}function Ba(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const Oa=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Ba("yy"===e?o%100:o,e.length)},Na=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Ba(i+1,2)},ja=function(t,e){return Ba(t.getUTCDate(),e.length)},qa=function(t,e){return Ba(t.getUTCHours()%12||12,e.length)},La=function(t,e){return Ba(t.getUTCHours(),e.length)},Ra=function(t,e){return Ba(t.getUTCMinutes(),e.length)},Wa=function(t,e){return Ba(t.getUTCSeconds(),e.length)},Ya=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Ba(Math.floor(o*Math.pow(10,i-3)),e.length)};function Ua(t,e){var i=t>0?"-":"+",o=Math.abs(t),s=Math.floor(o/60),r=o%60;if(0===r)return i+String(s);var a=e||"";return i+String(s)+a+Ba(r,2)}function Va(t,e){return t%60==0?(t>0?"-":"+")+Ba(Math.abs(t)/60,2):Ga(t,e)}function Ga(t,e){var i=e||"",o=t>0?"-":"+",s=Math.abs(t);return o+Ba(Math.floor(s/60),2)+i+Ba(s%60,2)}const Ha={G:function(t,e,i){var o=t.getUTCFullYear()>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){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return Oa(t,e)},Y:function(t,e,i,o){var s=Pa(t,o),r=s>0?s:1-s;return"YY"===e?Ba(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):Ba(r,e.length)},R:function(t,e){return Ba(Da(t),e.length)},u:function(t,e){return Ba(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Ba(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){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Ba(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){var o=t.getUTCMonth();switch(e){case"M":case"MM":return Na(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){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Ba(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){var s=Fa(t,o);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):Ba(s,e.length)},I:function(t,e,i){var o=Sa(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Ba(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):ja(t,e)},D:function(t,e,i){var o=function(t){ka(1,arguments);var e=Aa(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Ba(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();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){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return Ba(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return Ba(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),s=0===o?7:o;switch(e){case"i":return String(s);case"ii":return Ba(s,e.length);case"io":return i.ordinalNumber(s,{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){var o=t.getUTCHours()/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){var o,s=t.getUTCHours();switch(o=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,s=t.getUTCHours();switch(o=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return qa(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):La(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ba(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ba(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ra(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Wa(t,e)},S:function(t,e){return Ya(t,e)},X:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return Va(s);case"XXXX":case"XX":return Ga(s);default:return Ga(s,":")}},x:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Va(s);case"xxxx":case"xx":return Ga(s);default:return Ga(s,":")}},O:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ua(s,":");default:return"GMT"+Ga(s,":")}},z:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ua(s,":");default:return"GMT"+Ga(s,":")}},t:function(t,e,i,o){return Ba(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Ba((o._originalDate||t).getTime(),e.length)}};var Ja=function(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"})}},Ka=function(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"})}},Za={p:Ka,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],s=o[1],r=o[2];if(!r)return Ja(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Ja(s,e)).replace("{{time}}",Ka(r,e))}};const Qa=Za;function Xa(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var $a=["D","DD"],tn=["YY","YYYY"];function en(t){return-1!==$a.indexOf(t)}function on(t){return-1!==tn.indexOf(t)}function sn(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rn={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 an(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var nn,ln={date:an({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:an({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:an({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},hn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function cn(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;o=t.formattingValues[r]||t.formattingValues[s]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[n]||t.values[a]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function un(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,s=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var r,a=s[0],n=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(a.length)}}}const dn={code:"en-US",formatDistance:function(t,e,i){var o,s=rn[t];return o="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:ln,formatRelative:function(t){return hn[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:cn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:cn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:cn({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:cn({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:cn({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:(nn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(nn.matchPattern);if(!i)return null;var o=i[0],s=t.match(nn.parsePattern);if(!s)return null;var r=nn.valueCallback?nn.valueCallback(s[0]):s[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:un({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:un({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:function(t){return t+1}}),month:un({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:un({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:un({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}};var pn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fn=/^'([^]*?)'?$/,vn=/''/g,bn=/[a-zA-Z]/;function gn(t,e,i){var o,s,r,a,n,l,h,c,u,d,p,m,f,v,b,g,y,w;ka(2,arguments);var x=String(e),_=Ma(),k=null!==(o=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:_.locale)&&void 0!==o?o:dn,A=Ca(null!==(r=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:_.firstWeekContainsDate)&&void 0!==a?a:null===(u=_.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Ca(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==f?f:_.weekStartsOn)&&void 0!==m?m:null===(y=_.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var z=Aa(t);if(!function(t){if(ka(1,arguments),!function(t){return ka(1,arguments),t instanceof Date||"object"===_a(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Aa(t);return!isNaN(Number(e))}(z))throw new RangeError("Invalid time value");var T=za(z,Xa(z)),D={firstWeekContainsDate:A,weekStartsOn:C,locale:k,_originalDate:z};return x.match(mn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Qa[e])(t,k.formatLong):t})).join("").match(pn).map((function(o){if("''"===o)return"'";var s,r,a=o[0];if("'"===a)return(r=(s=o).match(fn))?r[1].replace(vn,"'"):s;var n=Ha[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||!on(o)||sn(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!en(o)||sn(o,e,String(t)),n(T,o,k.localize,D);if(a.match(bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return o})).join("")}function yn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function wn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return yn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?yn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,n=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){n=!0,r=t},f:function(){try{a||null==i.return||i.return()}finally{if(n)throw r}}}}function xn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function _n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kn(t,e){return kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kn(t,e)}function An(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kn(t,e)}function Cn(t){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cn(t)}function zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zn=function(){return!!t})()}function Tn(t){var e=zn();return function(){var i,o=Cn(t);if(e){var s=Cn(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==_a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _n(t)}(this,i)}}function Dn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sn(t){var e=function(t){if("object"!=_a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=_a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_a(e)?e:e+""}function En(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Sn(o.key),o)}}function Mn(t,e,i){return e&&En(t.prototype,e),i&&En(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function In(t,e,i){return(e=Sn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Pn=function(){function t(){Dn(this,t),In(this,"priority",void 0),In(this,"subPriority",0)}return Mn(t,[{key:"validate",value:function(){return!0}}]),t}(),Fn=function(){An(e,Pn);var t=Tn(e);function e(i,o,s,r,a){var n;return Dn(this,e),(n=t.call(this)).value=i,n.validateValue=o,n.setValue=s,n.priority=r,a&&(n.subPriority=a),n}return Mn(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Bn=function(){An(e,Pn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",10),In(_n(i),"subPriority",-1),i}return Mn(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),On=function(){function t(){Dn(this,t),In(this,"incompatibleTokens",void 0),In(this,"priority",void 0),In(this,"subPriority",void 0)}return Mn(t,[{key:"run",value:function(t,e,i,o){var s=this.parse(t,e,i,o);return s?{setter:new Fn(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Nn=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",140),In(_n(i),"incompatibleTokens",["R","u","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),jn=/^(1[0-2]|0?\d)/,qn=/^(3[0-1]|[0-2]?\d)/,Ln=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Rn=/^(5[0-3]|[0-4]?\d)/,Wn=/^(2[0-3]|[0-1]?\d)/,Yn=/^(2[0-4]|[0-1]?\d)/,Un=/^(1[0-1]|0?\d)/,Vn=/^(1[0-2]|0?\d)/,Gn=/^[0-5]?\d/,Hn=/^[0-5]?\d/,Jn=/^\d/,Kn=/^\d{1,2}/,Zn=/^\d{1,3}/,Qn=/^\d{1,4}/,Xn=/^-?\d+/,$n=/^-?\d/,tl=/^-?\d{1,2}/,el=/^-?\d{1,3}/,il=/^-?\d{1,4}/,ol=/^([+-])(\d{2})(\d{2})?|Z/,sl=/^([+-])(\d{2})(\d{2})|Z/,rl=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,al=/^([+-])(\d{2}):(\d{2})|Z/,nl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ll(t,e){return t?{value:e(t.value),rest:t.rest}:t}function hl(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function cl(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function ul(t){return hl(Xn,t)}function dl(t,e){switch(t){case 1:return hl(Jn,e);case 2:return hl(Kn,e);case 3:return hl(Zn,e);case 4:return hl(Qn,e);default:return hl(new RegExp("^\\d{1,"+t+"}"),e)}}function pl(t,e){switch(t){case 1:return hl($n,e);case 2:return hl(tl,e);case 3:return hl(el,e);case 4:return hl(il,e);default:return hl(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ml(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function fl(t,e){var i,o=e>0,s=o?e:1-e;if(s<=50)i=t||100;else{var r=s+50;i=t+100*Math.floor(r/100)-(t>=r%100?100:0)}return o?i:1-i}function vl(t){return t%400==0||t%4==0&&t%100!=0}var bl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",130),In(_n(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return ll(dl(4,t),o);case"yo":return ll(i.ordinalNumber(t,{unit:"year"}),o);default:return ll(dl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var s=fl(i.year,o);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),gl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",130),In(_n(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return ll(dl(4,t),o);case"Yo":return ll(i.ordinalNumber(t,{unit:"year"}),o);default:return ll(dl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var s=Pa(t,o);if(i.isTwoDigitYear){var r=fl(i.year,s);return t.setUTCFullYear(r,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ia(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ia(t,o)}}]),e}(),yl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",130),In(_n(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e){return pl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),Ta(o)}}]),e}(),wl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",130),In(_n(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e){return pl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),xl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",120),In(_n(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return dl(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),_l=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",120),In(_n(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return dl(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),kl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),In(_n(i),"priority",110),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return ll(hl(jn,t),o);case"MM":return ll(dl(2,t),o);case"Mo":return ll(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Al=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",110),In(_n(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return ll(hl(jn,t),o);case"LL":return ll(dl(2,t),o);case"Lo":return ll(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Cl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",100),In(_n(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return hl(Rn,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return Ia(function(t,e,i){ka(2,arguments);var o=Aa(t),s=Ca(e),r=Fa(o,i)-s;return o.setUTCDate(o.getUTCDate()-7*r),o}(t,i,o),o)}}]),e}(),zl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",100),In(_n(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return hl(Rn,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Ta(function(t,e){ka(2,arguments);var i=Aa(t),o=Ca(e),s=Sa(i)-o;return i.setUTCDate(i.getUTCDate()-7*s),i}(t,i))}}]),e}(),Tl=[31,28,31,30,31,30,31,31,30,31,30,31],Dl=[31,29,31,30,31,30,31,31,30,31,30,31],Sl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"subPriority",1),In(_n(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return hl(qn,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){var i=vl(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=Dl[o]:e>=1&&e<=Tl[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),El=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"subpriority",1),In(_n(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return hl(Ln,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return vl(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ml(t,e,i){var o,s,r,a,n,l,h,c;ka(2,arguments);var u=Ma(),d=Ca(null!==(o=null!==(s=null!==(r=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(n=i.locale)||void 0===n||null===(l=n.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Aa(t),m=Ca(e),f=((m%7+7)%7<d?7:0)+m-p.getUTCDay();return p.setUTCDate(p.getUTCDate()+f),p}var Il=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ml(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Pl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i,o){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ll(dl(e.length,t),s);case"eo":return ll(i.ordinalNumber(t,{unit:"day"}),s);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ml(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Fl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i,o){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ll(dl(e.length,t),s);case"co":return ll(i.ordinalNumber(t,{unit:"day"}),s);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ml(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Bl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return dl(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return ll(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return ll(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ll(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return ll(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){ka(2,arguments);var i=Ca(e);i%7==0&&(i-=7);var o=Aa(t),s=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+s),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Ol=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",80),In(_n(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(ml(i),0,0,0),t}}]),e}(),Nl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",80),In(_n(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(ml(i),0,0,0),t}}]),e}(),jl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",80),In(_n(i),"incompatibleTokens",["a","b","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(ml(i),0,0,0),t}}]),e}(),ql=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",70),In(_n(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return hl(Vn,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),Ll=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",70),In(_n(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return hl(Wn,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Rl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",70),In(_n(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return hl(Un,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),Wl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",70),In(_n(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return hl(Yn,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Yl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",60),In(_n(i),"incompatibleTokens",["t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return hl(Gn,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Ul=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",50),In(_n(i),"incompatibleTokens",["t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return hl(Hn,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Vl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",30),In(_n(i),"incompatibleTokens",["t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e){return ll(dl(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Gl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",10),In(_n(i),"incompatibleTokens",["t","T","x"]),i}return Mn(e,[{key:"parse",value:function(t,e){switch(e){case"X":return cl(ol,t);case"XX":return cl(sl,t);case"XXXX":return cl(rl,t);case"XXXXX":return cl(nl,t);default:return cl(al,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Hl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",10),In(_n(i),"incompatibleTokens",["t","T","X"]),i}return Mn(e,[{key:"parse",value:function(t,e){switch(e){case"x":return cl(ol,t);case"xx":return cl(sl,t);case"xxxx":return cl(rl,t);case"xxxxx":return cl(nl,t);default:return cl(al,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Jl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",40),In(_n(i),"incompatibleTokens","*"),i}return Mn(e,[{key:"parse",value:function(t){return ul(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Kl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",20),In(_n(i),"incompatibleTokens","*"),i}return Mn(e,[{key:"parse",value:function(t){return ul(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Zl={G:new Nn,y:new bl,Y:new gl,R:new yl,u:new wl,Q:new xl,q:new _l,M:new kl,L:new Al,w:new Cl,I:new zl,d:new Sl,D:new El,E:new Il,e:new Pl,c:new Fl,i:new Bl,a:new Ol,b:new Nl,B:new jl,h:new ql,H:new Ll,K:new Rl,k:new Wl,m:new Yl,s:new Ul,S:new Vl,X:new Gl,x:new Hl,t:new Jl,T:new Kl},Ql=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$l=/^'([^]*?)'?$/,th=/''/g,eh=/\S/,ih=/[a-zA-Z]/;function oh(t,e,i,o){var s,r,a,n,l,h,c,u,d,p,m,f,v,b,g,y,w,x;ka(3,arguments);var _=String(t),k=String(e),A=Ma(),C=null!==(s=null!==(r=null==o?void 0:o.locale)&&void 0!==r?r:A.locale)&&void 0!==s?s:dn;if(!C.match)throw new RangeError("locale must contain match property");var z=Ca(null!==(a=null!==(n=null!==(l=null!==(h=null==o?void 0:o.firstWeekContainsDate)&&void 0!==h?h:null==o||null===(c=o.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:A.firstWeekContainsDate)&&void 0!==n?n:null===(d=A.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==a?a:1);if(!(z>=1&&z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Ca(null!==(m=null!==(f=null!==(v=null!==(b=null==o?void 0:o.weekStartsOn)&&void 0!==b?b:null==o||null===(g=o.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:A.weekStartsOn)&&void 0!==f?f:null===(w=A.locale)||void 0===w||null===(x=w.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===_?Aa(i):new Date(NaN);var D,S={firstWeekContainsDate:z,weekStartsOn:T,locale:C},E=[new Bn],M=k.match(Xl).map((function(t){var e=t[0];return e in Qa?(0,Qa[e])(t,C.formatLong):t})).join("").match(Ql),I=[],P=wn(M);try{var F=function(){var e=D.value;null!=o&&o.useAdditionalWeekYearTokens||!on(e)||sn(e,k,t),null!=o&&o.useAdditionalDayOfYearTokens||!en(e)||sn(e,k,t);var i=e[0],s=Zl[i];if(s){var r=s.incompatibleTokens;if(Array.isArray(r)){var a=I.find((function(t){return r.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===s.incompatibleTokens&&I.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));I.push({token:i,fullToken:e});var n=s.run(_,e,C.match,S);if(!n)return{v:new Date(NaN)};E.push(n.setter),_=n.rest}else{if(i.match(ih))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match($l)[1].replace(th,"'")),0!==_.indexOf(e))return{v:new Date(NaN)};_=_.slice(e.length)}};for(P.s();!(D=P.n()).done;){var B=F();if("object"===_a(B))return B.v}}catch(t){P.e(t)}finally{P.f()}if(_.length>0&&eh.test(_))return new Date(NaN);var O=E.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return E.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),N=Aa(i);if(isNaN(N.getTime()))return new Date(NaN);var j,q=za(N,Xa(N)),L={},R=wn(O);try{for(R.s();!(j=R.n()).done;){var W=j.value;if(!W.validate(q,S))return new Date(NaN);var Y=W.set(q,L,S);Array.isArray(Y)?(q=Y[0],xn(L,Y[1])):q=Y}}catch(t){R.e(t)}finally{R.f()}return q}function sh(t,e){ka(2,arguments);var i=Aa(t),o=Aa(e);return i.getTime()>o.getTime()}function rh(t,e){ka(2,arguments);var i=Aa(t),o=Aa(e);return i.getTime()<o.getTime()}const ah=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:o}=t;return gn(new Date(e,i,o),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=oh(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.emitOnClick=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=oh((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=oh((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const t=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');t&&t.addEventListener("click",(()=>this.handleCalendarIconClick()))}this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=oh(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!rh(this.valueAsDate,this.minDate)&&!sh(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return rh(this.valueAsDate,this.minDate)||sh(this.valueAsDate,this.maxDate)?s("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?s("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"fc9cd0a618c7b6e62962c0800399a470fffa1fc4",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"abc7c1715dd2d0c60dd2ac6d028355de910be501",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"a6b40a978b573d41490457d708f9a7ac78622a6f",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{key:"d802ea7b25a64802aca3a7491107fcee7af2a23c",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"46edd200a9ce9eba27414a6434c6b3d5e9dc9964",class:"date__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ah.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const nh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},i("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};nh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const lh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?s("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},i("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};lh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';
|
|
4411
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new cs(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new fs(this.inputElement,this._labelController)),this._tooltipController=new vo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function ka(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Aa(t){ka(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===_a(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ca(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function za(t,e){return ka(2,arguments),function(t,e){ka(2,arguments);var i=Aa(t).getTime(),o=Ca(e);return new Date(i+o)}(t,-Ca(e))}function Ta(t){ka(1,arguments);var e=Aa(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Da(t){ka(1,arguments);var e=Aa(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var s=Ta(o),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var a=Ta(r);return e.getTime()>=s.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}a(xa);function Sa(t){ka(1,arguments);var e=Aa(t),i=Ta(e).getTime()-function(t){ka(1,arguments);var e=Da(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Ta(i)}(e).getTime();return Math.round(i/6048e5)+1}var Ea={};function Ma(){return Ea}function Ia(t,e){var i,o,s,r,a,n,l,h;ka(1,arguments);var c=Ma(),u=Ca(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==s?s:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Aa(t),p=d.getUTCDay(),m=(p<u?7:0)+p-u;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function Pa(t,e){var i,o,s,r,a,n,l,h;ka(1,arguments);var c=Aa(t),u=c.getUTCFullYear(),d=Ma(),p=Ca(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,p),m.setUTCHours(0,0,0,0);var f=Ia(m,e),v=new Date(0);v.setUTCFullYear(u,0,p),v.setUTCHours(0,0,0,0);var b=Ia(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=b.getTime()?u:u-1}function Fa(t,e){ka(1,arguments);var i=Aa(t),o=Ia(i,e).getTime()-function(t,e){var i,o,s,r,a,n,l,h;ka(1,arguments);var c=Ma(),u=Ca(null!==(i=null!==(o=null!==(s=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=Pa(t,e),p=new Date(0);return p.setUTCFullYear(d,0,u),p.setUTCHours(0,0,0,0),Ia(p,e)}(i,e).getTime();return Math.round(o/6048e5)+1}function Ba(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const Oa=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Ba("yy"===e?o%100:o,e.length)},Na=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Ba(i+1,2)},ja=function(t,e){return Ba(t.getUTCDate(),e.length)},qa=function(t,e){return Ba(t.getUTCHours()%12||12,e.length)},La=function(t,e){return Ba(t.getUTCHours(),e.length)},Ra=function(t,e){return Ba(t.getUTCMinutes(),e.length)},Wa=function(t,e){return Ba(t.getUTCSeconds(),e.length)},Ya=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Ba(Math.floor(o*Math.pow(10,i-3)),e.length)};function Ua(t,e){var i=t>0?"-":"+",o=Math.abs(t),s=Math.floor(o/60),r=o%60;if(0===r)return i+String(s);var a=e||"";return i+String(s)+a+Ba(r,2)}function Va(t,e){return t%60==0?(t>0?"-":"+")+Ba(Math.abs(t)/60,2):Ga(t,e)}function Ga(t,e){var i=e||"",o=t>0?"-":"+",s=Math.abs(t);return o+Ba(Math.floor(s/60),2)+i+Ba(s%60,2)}const Ha={G:function(t,e,i){var o=t.getUTCFullYear()>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){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return Oa(t,e)},Y:function(t,e,i,o){var s=Pa(t,o),r=s>0?s:1-s;return"YY"===e?Ba(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):Ba(r,e.length)},R:function(t,e){return Ba(Da(t),e.length)},u:function(t,e){return Ba(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Ba(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){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Ba(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){var o=t.getUTCMonth();switch(e){case"M":case"MM":return Na(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){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Ba(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){var s=Fa(t,o);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):Ba(s,e.length)},I:function(t,e,i){var o=Sa(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Ba(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):ja(t,e)},D:function(t,e,i){var o=function(t){ka(1,arguments);var e=Aa(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Ba(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();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){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return Ba(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return Ba(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),s=0===o?7:o;switch(e){case"i":return String(s);case"ii":return Ba(s,e.length);case"io":return i.ordinalNumber(s,{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){var o=t.getUTCHours()/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){var o,s=t.getUTCHours();switch(o=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,s=t.getUTCHours();switch(o=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return qa(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):La(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ba(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ba(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ra(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Wa(t,e)},S:function(t,e){return Ya(t,e)},X:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return Va(s);case"XXXX":case"XX":return Ga(s);default:return Ga(s,":")}},x:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Va(s);case"xxxx":case"xx":return Ga(s);default:return Ga(s,":")}},O:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ua(s,":");default:return"GMT"+Ga(s,":")}},z:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ua(s,":");default:return"GMT"+Ga(s,":")}},t:function(t,e,i,o){return Ba(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Ba((o._originalDate||t).getTime(),e.length)}};var Ja=function(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"})}},Ka=function(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"})}},Za={p:Ka,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],s=o[1],r=o[2];if(!r)return Ja(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Ja(s,e)).replace("{{time}}",Ka(r,e))}};const Qa=Za;function Xa(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var $a=["D","DD"],tn=["YY","YYYY"];function en(t){return-1!==$a.indexOf(t)}function on(t){return-1!==tn.indexOf(t)}function sn(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rn={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 an(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var nn,ln={date:an({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:an({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:an({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},hn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function cn(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;o=t.formattingValues[r]||t.formattingValues[s]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[n]||t.values[a]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function un(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,s=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var r,a=s[0],n=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(a.length)}}}const dn={code:"en-US",formatDistance:function(t,e,i){var o,s=rn[t];return o="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:ln,formatRelative:function(t){return hn[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:cn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:cn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:cn({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:cn({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:cn({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:(nn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(nn.matchPattern);if(!i)return null;var o=i[0],s=t.match(nn.parsePattern);if(!s)return null;var r=nn.valueCallback?nn.valueCallback(s[0]):s[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:un({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:un({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:function(t){return t+1}}),month:un({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:un({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:un({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}};var pn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fn=/^'([^]*?)'?$/,vn=/''/g,bn=/[a-zA-Z]/;function gn(t,e,i){var o,s,r,a,n,l,h,c,u,d,p,m,f,v,b,g,y,w;ka(2,arguments);var x=String(e),_=Ma(),k=null!==(o=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:_.locale)&&void 0!==o?o:dn,A=Ca(null!==(r=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:_.firstWeekContainsDate)&&void 0!==a?a:null===(u=_.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Ca(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==f?f:_.weekStartsOn)&&void 0!==m?m:null===(y=_.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var z=Aa(t);if(!function(t){if(ka(1,arguments),!function(t){return ka(1,arguments),t instanceof Date||"object"===_a(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Aa(t);return!isNaN(Number(e))}(z))throw new RangeError("Invalid time value");var T=za(z,Xa(z)),D={firstWeekContainsDate:A,weekStartsOn:C,locale:k,_originalDate:z};return x.match(mn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Qa[e])(t,k.formatLong):t})).join("").match(pn).map((function(o){if("''"===o)return"'";var s,r,a=o[0];if("'"===a)return(r=(s=o).match(fn))?r[1].replace(vn,"'"):s;var n=Ha[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||!on(o)||sn(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!en(o)||sn(o,e,String(t)),n(T,o,k.localize,D);if(a.match(bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return o})).join("")}function yn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function wn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return yn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?yn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,n=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){n=!0,r=t},f:function(){try{a||null==i.return||i.return()}finally{if(n)throw r}}}}function xn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function _n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kn(t,e){return kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kn(t,e)}function An(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kn(t,e)}function Cn(t){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cn(t)}function zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zn=function(){return!!t})()}function Tn(t){var e=zn();return function(){var i,o=Cn(t);if(e){var s=Cn(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==_a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _n(t)}(this,i)}}function Dn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sn(t){var e=function(t){if("object"!=_a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=_a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_a(e)?e:e+""}function En(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Sn(o.key),o)}}function Mn(t,e,i){return e&&En(t.prototype,e),i&&En(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function In(t,e,i){return(e=Sn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Pn=function(){function t(){Dn(this,t),In(this,"priority",void 0),In(this,"subPriority",0)}return Mn(t,[{key:"validate",value:function(){return!0}}]),t}(),Fn=function(){An(e,Pn);var t=Tn(e);function e(i,o,s,r,a){var n;return Dn(this,e),(n=t.call(this)).value=i,n.validateValue=o,n.setValue=s,n.priority=r,a&&(n.subPriority=a),n}return Mn(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Bn=function(){An(e,Pn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",10),In(_n(i),"subPriority",-1),i}return Mn(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),On=function(){function t(){Dn(this,t),In(this,"incompatibleTokens",void 0),In(this,"priority",void 0),In(this,"subPriority",void 0)}return Mn(t,[{key:"run",value:function(t,e,i,o){var s=this.parse(t,e,i,o);return s?{setter:new Fn(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Nn=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",140),In(_n(i),"incompatibleTokens",["R","u","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),jn=/^(1[0-2]|0?\d)/,qn=/^(3[0-1]|[0-2]?\d)/,Ln=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Rn=/^(5[0-3]|[0-4]?\d)/,Wn=/^(2[0-3]|[0-1]?\d)/,Yn=/^(2[0-4]|[0-1]?\d)/,Un=/^(1[0-1]|0?\d)/,Vn=/^(1[0-2]|0?\d)/,Gn=/^[0-5]?\d/,Hn=/^[0-5]?\d/,Jn=/^\d/,Kn=/^\d{1,2}/,Zn=/^\d{1,3}/,Qn=/^\d{1,4}/,Xn=/^-?\d+/,$n=/^-?\d/,tl=/^-?\d{1,2}/,el=/^-?\d{1,3}/,il=/^-?\d{1,4}/,ol=/^([+-])(\d{2})(\d{2})?|Z/,sl=/^([+-])(\d{2})(\d{2})|Z/,rl=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,al=/^([+-])(\d{2}):(\d{2})|Z/,nl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ll(t,e){return t?{value:e(t.value),rest:t.rest}:t}function hl(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function cl(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function ul(t){return hl(Xn,t)}function dl(t,e){switch(t){case 1:return hl(Jn,e);case 2:return hl(Kn,e);case 3:return hl(Zn,e);case 4:return hl(Qn,e);default:return hl(new RegExp("^\\d{1,"+t+"}"),e)}}function pl(t,e){switch(t){case 1:return hl($n,e);case 2:return hl(tl,e);case 3:return hl(el,e);case 4:return hl(il,e);default:return hl(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ml(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function fl(t,e){var i,o=e>0,s=o?e:1-e;if(s<=50)i=t||100;else{var r=s+50;i=t+100*Math.floor(r/100)-(t>=r%100?100:0)}return o?i:1-i}function vl(t){return t%400==0||t%4==0&&t%100!=0}var bl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",130),In(_n(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return ll(dl(4,t),o);case"yo":return ll(i.ordinalNumber(t,{unit:"year"}),o);default:return ll(dl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var s=fl(i.year,o);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),gl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",130),In(_n(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return ll(dl(4,t),o);case"Yo":return ll(i.ordinalNumber(t,{unit:"year"}),o);default:return ll(dl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var s=Pa(t,o);if(i.isTwoDigitYear){var r=fl(i.year,s);return t.setUTCFullYear(r,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ia(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ia(t,o)}}]),e}(),yl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",130),In(_n(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e){return pl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),Ta(o)}}]),e}(),wl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",130),In(_n(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e){return pl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),xl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",120),In(_n(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return dl(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),_l=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",120),In(_n(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return dl(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),kl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),In(_n(i),"priority",110),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return ll(hl(jn,t),o);case"MM":return ll(dl(2,t),o);case"Mo":return ll(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Al=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",110),In(_n(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return ll(hl(jn,t),o);case"LL":return ll(dl(2,t),o);case"Lo":return ll(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Cl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",100),In(_n(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return hl(Rn,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return Ia(function(t,e,i){ka(2,arguments);var o=Aa(t),s=Ca(e),r=Fa(o,i)-s;return o.setUTCDate(o.getUTCDate()-7*r),o}(t,i,o),o)}}]),e}(),zl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",100),In(_n(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return hl(Rn,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Ta(function(t,e){ka(2,arguments);var i=Aa(t),o=Ca(e),s=Sa(i)-o;return i.setUTCDate(i.getUTCDate()-7*s),i}(t,i))}}]),e}(),Tl=[31,28,31,30,31,30,31,31,30,31,30,31],Dl=[31,29,31,30,31,30,31,31,30,31,30,31],Sl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"subPriority",1),In(_n(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return hl(qn,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){var i=vl(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=Dl[o]:e>=1&&e<=Tl[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),El=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"subpriority",1),In(_n(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return hl(Ln,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return vl(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ml(t,e,i){var o,s,r,a,n,l,h,c;ka(2,arguments);var u=Ma(),d=Ca(null!==(o=null!==(s=null!==(r=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(n=i.locale)||void 0===n||null===(l=n.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Aa(t),m=Ca(e),f=((m%7+7)%7<d?7:0)+m-p.getUTCDay();return p.setUTCDate(p.getUTCDate()+f),p}var Il=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ml(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Pl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i,o){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ll(dl(e.length,t),s);case"eo":return ll(i.ordinalNumber(t,{unit:"day"}),s);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ml(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Fl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i,o){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ll(dl(e.length,t),s);case"co":return ll(i.ordinalNumber(t,{unit:"day"}),s);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ml(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Bl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",90),In(_n(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return dl(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return ll(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return ll(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ll(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return ll(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){ka(2,arguments);var i=Ca(e);i%7==0&&(i-=7);var o=Aa(t),s=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+s),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Ol=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",80),In(_n(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(ml(i),0,0,0),t}}]),e}(),Nl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",80),In(_n(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(ml(i),0,0,0),t}}]),e}(),jl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",80),In(_n(i),"incompatibleTokens",["a","b","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(ml(i),0,0,0),t}}]),e}(),ql=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",70),In(_n(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return hl(Vn,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),Ll=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",70),In(_n(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return hl(Wn,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Rl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",70),In(_n(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return hl(Un,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),Wl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",70),In(_n(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return hl(Yn,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Yl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",60),In(_n(i),"incompatibleTokens",["t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return hl(Gn,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Ul=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",50),In(_n(i),"incompatibleTokens",["t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return hl(Hn,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return dl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Vl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",30),In(_n(i),"incompatibleTokens",["t","T"]),i}return Mn(e,[{key:"parse",value:function(t,e){return ll(dl(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Gl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",10),In(_n(i),"incompatibleTokens",["t","T","x"]),i}return Mn(e,[{key:"parse",value:function(t,e){switch(e){case"X":return cl(ol,t);case"XX":return cl(sl,t);case"XXXX":return cl(rl,t);case"XXXXX":return cl(nl,t);default:return cl(al,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Hl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",10),In(_n(i),"incompatibleTokens",["t","T","X"]),i}return Mn(e,[{key:"parse",value:function(t,e){switch(e){case"x":return cl(ol,t);case"xx":return cl(sl,t);case"xxxx":return cl(rl,t);case"xxxxx":return cl(nl,t);default:return cl(al,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Jl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",40),In(_n(i),"incompatibleTokens","*"),i}return Mn(e,[{key:"parse",value:function(t){return ul(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Kl=function(){An(e,On);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return In(_n(i=t.call.apply(t,[this].concat(s))),"priority",20),In(_n(i),"incompatibleTokens","*"),i}return Mn(e,[{key:"parse",value:function(t){return ul(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Zl={G:new Nn,y:new bl,Y:new gl,R:new yl,u:new wl,Q:new xl,q:new _l,M:new kl,L:new Al,w:new Cl,I:new zl,d:new Sl,D:new El,E:new Il,e:new Pl,c:new Fl,i:new Bl,a:new Ol,b:new Nl,B:new jl,h:new ql,H:new Ll,K:new Rl,k:new Wl,m:new Yl,s:new Ul,S:new Vl,X:new Gl,x:new Hl,t:new Jl,T:new Kl},Ql=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$l=/^'([^]*?)'?$/,th=/''/g,eh=/\S/,ih=/[a-zA-Z]/;function oh(t,e,i,o){var s,r,a,n,l,h,c,u,d,p,m,f,v,b,g,y,w,x;ka(3,arguments);var _=String(t),k=String(e),A=Ma(),C=null!==(s=null!==(r=null==o?void 0:o.locale)&&void 0!==r?r:A.locale)&&void 0!==s?s:dn;if(!C.match)throw new RangeError("locale must contain match property");var z=Ca(null!==(a=null!==(n=null!==(l=null!==(h=null==o?void 0:o.firstWeekContainsDate)&&void 0!==h?h:null==o||null===(c=o.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:A.firstWeekContainsDate)&&void 0!==n?n:null===(d=A.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==a?a:1);if(!(z>=1&&z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Ca(null!==(m=null!==(f=null!==(v=null!==(b=null==o?void 0:o.weekStartsOn)&&void 0!==b?b:null==o||null===(g=o.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:A.weekStartsOn)&&void 0!==f?f:null===(w=A.locale)||void 0===w||null===(x=w.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===_?Aa(i):new Date(NaN);var D,S={firstWeekContainsDate:z,weekStartsOn:T,locale:C},E=[new Bn],M=k.match(Xl).map((function(t){var e=t[0];return e in Qa?(0,Qa[e])(t,C.formatLong):t})).join("").match(Ql),I=[],P=wn(M);try{var F=function(){var e=D.value;null!=o&&o.useAdditionalWeekYearTokens||!on(e)||sn(e,k,t),null!=o&&o.useAdditionalDayOfYearTokens||!en(e)||sn(e,k,t);var i=e[0],s=Zl[i];if(s){var r=s.incompatibleTokens;if(Array.isArray(r)){var a=I.find((function(t){return r.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===s.incompatibleTokens&&I.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));I.push({token:i,fullToken:e});var n=s.run(_,e,C.match,S);if(!n)return{v:new Date(NaN)};E.push(n.setter),_=n.rest}else{if(i.match(ih))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match($l)[1].replace(th,"'")),0!==_.indexOf(e))return{v:new Date(NaN)};_=_.slice(e.length)}};for(P.s();!(D=P.n()).done;){var B=F();if("object"===_a(B))return B.v}}catch(t){P.e(t)}finally{P.f()}if(_.length>0&&eh.test(_))return new Date(NaN);var O=E.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return E.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),N=Aa(i);if(isNaN(N.getTime()))return new Date(NaN);var j,q=za(N,Xa(N)),L={},R=wn(O);try{for(R.s();!(j=R.n()).done;){var W=j.value;if(!W.validate(q,S))return new Date(NaN);var Y=W.set(q,L,S);Array.isArray(Y)?(q=Y[0],xn(L,Y[1])):q=Y}}catch(t){R.e(t)}finally{R.f()}return q}function sh(t,e){ka(2,arguments);var i=Aa(t),o=Aa(e);return i.getTime()>o.getTime()}function rh(t,e){ka(2,arguments);var i=Aa(t),o=Aa(e);return i.getTime()<o.getTime()}const ah=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:o}=t;return gn(new Date(e,i,o),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=oh(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.emitOnClick=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=oh((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=oh((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const t=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');t&&t.addEventListener("click",(()=>this.handleCalendarIconClick()))}this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=oh(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!rh(this.valueAsDate,this.minDate)&&!sh(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return rh(this.valueAsDate,this.minDate)||sh(this.valueAsDate,this.maxDate)?s("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?s("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"fc9cd0a618c7b6e62962c0800399a470fffa1fc4",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"abc7c1715dd2d0c60dd2ac6d028355de910be501",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"a6b40a978b573d41490457d708f9a7ac78622a6f",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{key:"d802ea7b25a64802aca3a7491107fcee7af2a23c",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"46edd200a9ce9eba27414a6434c6b3d5e9dc9964",class:"date__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ah.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const nh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},i("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};nh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emw--color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__input::placeholder{color:var(--emw--color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const lh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?s("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},i("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};lh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';
|
|
3933
4412
|
/**
|
|
3934
4413
|
* @license
|
|
3935
4414
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -4818,7 +5297,7 @@ const yh=Bi`
|
|
|
4818
5297
|
<div part="reveal-button" slot="suffix">
|
|
4819
5298
|
<slot name="reveal"></slot>
|
|
4820
5299
|
</div>
|
|
4821
|
-
`;let wh;a(class extends gh{static get is(){return"vaadin-password-field"}static get template(){if(!wh){wh=super.template.cloneNode(!0);const t=yh.content.querySelector('[part="reveal-button"]');wh.content.querySelector('[part="input-field"]').appendChild(t)}return wh}static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n.*)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new fo(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t.base)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}});const xh=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.isDuplicateInput&&!this.originalValid)return s("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,o=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},s("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},s(o?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,s(`${t.ruleKey}`,this.language)?s(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c704b51efdf53817beb1541b4794e0b11b490a24",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"e590afa403084ff95a8735ade400ab81ad16937f",class:"password__wrapper--flex"},i("label",{key:"9d8db00b59c4b9594538aeacee3ef5a0e678c0e9",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"bb39f6018cf688fafcd0b5bef91ba079edf09daf",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"d8dbd086da34a8c7db9b5826654530bdb888c927",class:"password__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"ae1c212d663fe379561b1c514087629409196ac3",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{key:"2fa1e25239a7314399c16b2f897873b7a31e9f77",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};xh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__wrapper--autofilled .password__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.password__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.password__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);background-color:var(--emfe-w-color-white, #FFFFFF);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;position:relative;margin-bottom:unset;height:44px;padding:0;width:100%}.password__input::part(reveal-button){position:relative;right:10px}.password__input::part(reveal-button)::before{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__input>input{padding:5px 15px}.password__input>input:placeholder-shown{color:var(--emfe-w-color-gray-150, #828282)}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:var(--emfe-w-color-white, #FFFFFF);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:150px;border:1px solid #B0B0B0;}.password__complexity meter{border-color:transparent;}.password__complexity meter[value="1"]::-moz-meter-bar{background-color:var(--emfe-w-color-valid, #48952a)}.password__complexity meter[value="1"]::-webkit-meter-optimum-value{background-color:var(--emfe-w-color-valid, #48952a)}.password__complexity meter:not([value="1"])::-moz-meter-bar{background-color:var(--emfe-w-color-error, #FD2839)}.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value{background-color:var(--emfe-w-color-error, #FD2839)}.password__complexity--strength{display:flex;justify-content:space-evenly;align-items:center}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid var(--emfe-w-color-gray-150, #828282);border-right:0 solid var(--emfe-w-color-gray-150, #828282);border-left:1px solid var(--emfe-w-color-gray-150, #828282);border-bottom:0 solid var(--emfe-w-color-gray-150, #828282);bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:var(--emfe-w-color-white, #FFFFFF)}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-150, #828282);color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const _h=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"3d90735f7dc8fef6a96dc85b8f9ba22880cb205f",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"9472ed76f5c7fabb90d2b3d39eeb9e18f05a30dd",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"2ae0947580bb8a0a3d889a2d9ebd0b82458fdfd2",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"4f3cbf341f1c559bbdf44ca5d169be7a64d46e97",class:"radio__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};_h.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";
|
|
5300
|
+
`;let wh;a(class extends gh{static get is(){return"vaadin-password-field"}static get template(){if(!wh){wh=super.template.cloneNode(!0);const t=yh.content.querySelector('[part="reveal-button"]');wh.content.querySelector('[part="input-field"]').appendChild(t)}return wh}static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n.*)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new fo(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t.base)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}});const xh=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.isDuplicateInput&&!this.originalValid)return s("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,o=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},s("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},s(o?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,s(`${t.ruleKey}`,this.language)?s(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c704b51efdf53817beb1541b4794e0b11b490a24",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"e590afa403084ff95a8735ade400ab81ad16937f",class:"password__wrapper--flex"},i("label",{key:"9d8db00b59c4b9594538aeacee3ef5a0e678c0e9",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"bb39f6018cf688fafcd0b5bef91ba079edf09daf",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"d8dbd086da34a8c7db9b5826654530bdb888c927",class:"password__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"ae1c212d663fe379561b1c514087629409196ac3",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{key:"2fa1e25239a7314399c16b2f897873b7a31e9f77",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};xh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__wrapper--autofilled .password__input::part(input-field){color:var(--emw--color-black, #000000)}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.password__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.password__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);background-color:var(--emw--color-white, #FFFFFF);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;position:relative;margin-bottom:unset;height:44px;padding:0;width:100%}.password__input::part(reveal-button){position:relative;right:10px}.password__input::part(reveal-button)::before{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__input>input{padding:5px 15px}.password__input>input:placeholder-shown{color:var(--emw--color-gray-150, #828282)}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:var(--emw--color-white, #FFFFFF);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:150px;border:1px solid #B0B0B0;}.password__complexity meter{border-color:transparent;}.password__complexity meter[value="1"]::-moz-meter-bar{background-color:var(--emw--color-valid, #48952a)}.password__complexity meter[value="1"]::-webkit-meter-optimum-value{background-color:var(--emw--color-valid, #48952a)}.password__complexity meter:not([value="1"])::-moz-meter-bar{background-color:var(--emw--color-error, #FD2839)}.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value{background-color:var(--emw--color-error, #FD2839)}.password__complexity--strength{display:flex;justify-content:space-evenly;align-items:center}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid var(--emw--color-gray-150, #828282);border-right:0 solid var(--emw--color-gray-150, #828282);border-left:1px solid var(--emw--color-gray-150, #828282);border-bottom:0 solid var(--emw--color-gray-150, #828282);bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:var(--emw--color-white, #FFFFFF)}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-150, #828282);color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const _h=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"3d90735f7dc8fef6a96dc85b8f9ba22880cb205f",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"9472ed76f5c7fabb90d2b3d39eeb9e18f05a30dd",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"2ae0947580bb8a0a3d889a2d9ebd0b82458fdfd2",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"4f3cbf341f1c559bbdf44ca5d169be7a64d46e97",class:"radio__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};_h.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";
|
|
4822
5301
|
/**
|
|
4823
5302
|
* @license
|
|
4824
5303
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -5427,4 +5906,4 @@ function Yh(t){return null!=t}function Uh(t,e){return t.findIndex((t=>!(t instan
|
|
|
5427
5906
|
></vaadin-combo-box-overlay>
|
|
5428
5907
|
|
|
5429
5908
|
<slot name="tooltip"></slot>
|
|
5430
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new cs(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new fs(this.inputElement,this._labelController)),this._tooltipController=new vo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}a(Gh);const Hh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c235991f572ea3f8659f66d660fd1fb41b0094ad",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"50931d2e1345bb8337820409a6aff2eee4d33cd5",class:"select__wrapper--flex"},i("label",{key:"28a05e2a88132fb8ad279ec0fbc0d49253d3ffbc",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"1d53254871214080c3f1d25c73380a9b9df19aab",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"020465f83dd9a03a37b223521bfce37a66df818d",class:"select__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{key:"bbf7aff9102f6c849c84ff7cb390ed57e5b992b2",name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange}),i("small",{key:"4cda22e9fdccb3960107a661fa24649946d6bb14",class:"select__error-message"},this.errorMessage))}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Hh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%}vaadin-combo-box>input{background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.select__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emfe-w-color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__input>input{padding:5px 15px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const Jh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.touched=!0,this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"5febd36c339710683111039d477196daac87853c",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"fb779beee03992b23478ffcaac85095420048ceb",class:"tel__wrapper--flex-label"},i("label",{key:"5b69271c1c8bf403a003d765adb40a553e09466e",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"040c487308231459fc92eba2e643a80639df09d6",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"91efd4656c718c75e5047413daf10c22c37e8f93",class:"tel__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"6215f80b6bccb3dfb03dbbc485c850725633627c",class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{key:"3b7b1ef3415619c51d74f5fc7c5e034acb8f037f",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"886553206896c367ba96f015d81b44ea86f741ea",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"d4c88d386c3342c789527d925e9cd061494b785c",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Jh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);background-color:var(--emfe-w-color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.tel__wrapper--flex--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emfe-w-color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));background-color:var(--emfe-w-color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emfe-w-color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const Kh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"bfb803110a70b89dd484e993c204b572f0115a17",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"6e9f8f5aada98821d5dc78ccb8b1431ba23b81ab",class:"text__wrapper--flex"},i("label",{key:"05cf07855121a79641475a5b020774cf8120d1ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"f8c48a999f6827a61ec392ce99858c19559c77d2",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"e866f1df104ce57c29164e73b4ad4d017c7201cd",class:"text__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"d761c265b1487fe73af54568b6da7fed82656b8d",name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"5c8df34dd47959eb1668cdf389524d145c69fa84",class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Kh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.text__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.text__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';export{Ms as checkbox_group_input,Is as checkbox_input,ah as date_input,nh as email_input,lh as number_input,xh as password_input,_h as radio_input,Hh as select_input,Jh as tel_input,Kh as text_input}
|
|
5909
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new cs(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new fs(this.inputElement,this._labelController)),this._tooltipController=new vo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}a(Gh);const Hh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"3d298b9709617233adacd88b8acb7d6298d35627",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"9ba53148a200b925da11ad0dea5589e9634ffb03",class:"select__wrapper--flex"},i("label",{key:"eb2fa2233926ada4da750e47304325d0d7ea3985",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"3cbe968f9a7c612d0b8d0517621a933cccd1bd58",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"9fa9be645ed72897a95705b0e17b3aee855eb6d4",class:"select__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{key:"f596a5fa5b480791080dfa63359ed30eeabfaa02",name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange,onBlur:this.handleBlur}),i("small",{key:"a9c652406489ba1d23497c55aa14e7b67fa701bd",class:"select__error-message"},this.errorMessage))}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Hh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__input>input{padding:5px 15px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const Jh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.touched=!0,this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"5febd36c339710683111039d477196daac87853c",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"fb779beee03992b23478ffcaac85095420048ceb",class:"tel__wrapper--flex-label"},i("label",{key:"5b69271c1c8bf403a003d765adb40a553e09466e",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"040c487308231459fc92eba2e643a80639df09d6",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"91efd4656c718c75e5047413daf10c22c37e8f93",class:"tel__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"6215f80b6bccb3dfb03dbbc485c850725633627c",class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{key:"3b7b1ef3415619c51d74f5fc7c5e034acb8f037f",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"886553206896c367ba96f015d81b44ea86f741ea",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"d4c88d386c3342c789527d925e9cd061494b785c",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Jh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.tel__wrapper--flex--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const Kh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"bfb803110a70b89dd484e993c204b572f0115a17",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"6e9f8f5aada98821d5dc78ccb8b1431ba23b81ab",class:"text__wrapper--flex"},i("label",{key:"05cf07855121a79641475a5b020774cf8120d1ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"f8c48a999f6827a61ec392ce99858c19559c77d2",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"e866f1df104ce57c29164e73b4ad4d017c7201cd",class:"text__tooltip-icon",src:r,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"d761c265b1487fe73af54568b6da7fed82656b8d",name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"5c8df34dd47959eb1668cdf389524d145c69fa84",class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Kh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';export{Ms as checkbox_group_input,Is as checkbox_input,ah as date_input,nh as email_input,lh as number_input,xh as password_input,_h as radio_input,Hh as select_input,Jh as tel_input,Kh as text_input}
|