@paperless/core 2.0.1-beta.167 → 2.0.1-beta.169
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/CHANGELOG.md +22 -0
- package/dist/build/{p-f34e9e65.entry.js → p-086a66af.entry.js} +2 -2
- package/dist/build/{p-f34e9e65.entry.js.map → p-086a66af.entry.js.map} +1 -1
- package/dist/build/p-7b701c17.entry.js +2 -0
- package/dist/build/p-7b701c17.entry.js.map +1 -0
- package/dist/build/p-808fcfe0.entry.js +2 -0
- package/dist/build/p-808fcfe0.entry.js.map +1 -0
- package/dist/build/p-ac288d66.js +2 -0
- package/dist/build/p-datepicker.entry.esm.js.map +1 -1
- package/dist/build/p-empty-state.p-floating-menu-container.p-floating-menu-item.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.esm.js.map +1 -1
- package/dist/build/p-f75cc2ab.entry.js +2 -0
- package/dist/build/p-f75cc2ab.entry.js.map +1 -0
- package/dist/build/p-field.p-field-container.entry.esm.js.map +1 -1
- package/dist/build/p-select.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +6 -2
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.entry.cjs.js.map +1 -1
- package/dist/cjs/p-empty-state.p-floating-menu-container.p-floating-menu-item.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.cjs.js.map +1 -1
- package/dist/cjs/p-empty-state_9.cjs.entry.js +5 -4
- package/dist/cjs/p-empty-state_9.cjs.entry.js.map +1 -1
- package/dist/cjs/p-field.p-field-container.entry.cjs.js.map +1 -1
- package/dist/cjs/p-field_2.cjs.entry.js +20 -8
- package/dist/cjs/p-field_2.cjs.entry.js.map +1 -1
- package/dist/cjs/p-select.cjs.entry.js +5 -1
- package/dist/cjs/p-select.cjs.entry.js.map +1 -1
- package/dist/cjs/p-select.entry.cjs.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +26 -2
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/collection/components/molecules/field/container/field-container.component.js +33 -5
- package/dist/collection/components/molecules/field/container/field-container.component.js.map +1 -1
- package/dist/collection/components/molecules/field/field/field.component.js +27 -3
- package/dist/collection/components/molecules/field/field/field.component.js.map +1 -1
- package/dist/collection/components/molecules/select/select.component.js +25 -1
- package/dist/collection/components/molecules/select/select.component.js.map +1 -1
- package/dist/collection/components/molecules/table/header/table-header.component.css +1 -1
- package/dist/collection/components/molecules/table/header/table-header.component.js +4 -3
- package/dist/collection/components/molecules/table/header/table-header.component.js.map +1 -1
- package/dist/components/{p-DUGSBBgc.js → p-C8Uio1Yl.js} +16 -7
- package/dist/components/p-C8Uio1Yl.js.map +1 -0
- package/dist/components/{p-Cf-_6-uf.js → p-D1sBE1PZ.js} +11 -6
- package/dist/components/p-D1sBE1PZ.js.map +1 -0
- package/dist/components/{p-DCYyroOh.js → p-DUjpYGCR.js} +9 -8
- package/dist/components/{p-DCYyroOh.js.map → p-DUjpYGCR.js.map} +1 -1
- package/dist/components/p-attachment.js +1 -1
- package/dist/components/p-datepicker.js +9 -4
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/components/p-field-container.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/p-select.js +8 -3
- package/dist/components/p-select.js.map +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-datepicker.entry.js +6 -2
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/esm/p-empty-state.p-floating-menu-container.p-floating-menu-item.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.js.map +1 -1
- package/dist/esm/p-empty-state_9.entry.js +5 -4
- package/dist/esm/p-empty-state_9.entry.js.map +1 -1
- package/dist/esm/p-field.p-field-container.entry.js.map +1 -1
- package/dist/esm/p-field_2.entry.js +20 -8
- package/dist/esm/p-field_2.entry.js.map +1 -1
- package/dist/esm/p-select.entry.js +5 -1
- package/dist/esm/p-select.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-f34e9e65.entry.js → p-086a66af.entry.js} +2 -2
- package/dist/paperless/{p-f34e9e65.entry.js.map → p-086a66af.entry.js.map} +1 -1
- package/dist/paperless/p-7b701c17.entry.js +2 -0
- package/dist/paperless/p-7b701c17.entry.js.map +1 -0
- package/dist/paperless/p-808fcfe0.entry.js +2 -0
- package/dist/paperless/p-808fcfe0.entry.js.map +1 -0
- package/dist/paperless/p-datepicker.entry.esm.js.map +1 -1
- package/dist/paperless/p-empty-state.p-floating-menu-container.p-floating-menu-item.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.esm.js.map +1 -1
- package/dist/paperless/p-f75cc2ab.entry.js +2 -0
- package/dist/paperless/p-f75cc2ab.entry.js.map +1 -0
- package/dist/paperless/p-field.p-field-container.entry.esm.js.map +1 -1
- package/dist/paperless/p-select.entry.esm.js.map +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +4 -0
- package/dist/types/components/molecules/field/container/field-container.component.d.ts +4 -0
- package/dist/types/components/molecules/field/field/field.component.d.ts +4 -0
- package/dist/types/components/molecules/select/select.component.d.ts +4 -0
- package/dist/types/components.d.ts +32 -0
- package/package.json +1 -1
- package/dist/build/p-50a816b0.entry.js +0 -2
- package/dist/build/p-50a816b0.entry.js.map +0 -1
- package/dist/build/p-52f9d182.js +0 -2
- package/dist/build/p-7b7c60de.entry.js +0 -2
- package/dist/build/p-7b7c60de.entry.js.map +0 -1
- package/dist/build/p-baec5c22.entry.js +0 -2
- package/dist/build/p-baec5c22.entry.js.map +0 -1
- package/dist/components/p-Cf-_6-uf.js.map +0 -1
- package/dist/components/p-DUGSBBgc.js.map +0 -1
- package/dist/paperless/p-50a816b0.entry.js +0 -2
- package/dist/paperless/p-50a816b0.entry.js.map +0 -1
- package/dist/paperless/p-7b7c60de.entry.js +0 -2
- package/dist/paperless/p-7b7c60de.entry.js.map +0 -1
- package/dist/paperless/p-baec5c22.entry.js +0 -2
- package/dist/paperless/p-baec5c22.entry.js.map +0 -1
|
@@ -158,6 +158,10 @@ export declare class Select {
|
|
|
158
158
|
* Wether the field is required
|
|
159
159
|
*/
|
|
160
160
|
required: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Wether to show optional when not required
|
|
163
|
+
*/
|
|
164
|
+
showOptional: boolean;
|
|
161
165
|
/**
|
|
162
166
|
* The helper of the input group used by the select
|
|
163
167
|
*/
|
|
@@ -500,6 +500,10 @@ export namespace Components {
|
|
|
500
500
|
* Wether the field is required
|
|
501
501
|
*/
|
|
502
502
|
"required": boolean;
|
|
503
|
+
/**
|
|
504
|
+
* Wether to show optional when not required
|
|
505
|
+
*/
|
|
506
|
+
"showOptional": boolean;
|
|
503
507
|
/**
|
|
504
508
|
* The size of the input group used by the datepicker
|
|
505
509
|
*/
|
|
@@ -812,6 +816,10 @@ export namespace Components {
|
|
|
812
816
|
* Wether to select all text on focus
|
|
813
817
|
*/
|
|
814
818
|
"selectAllOnFocus": boolean;
|
|
819
|
+
/**
|
|
820
|
+
* Wether to show optional when not required
|
|
821
|
+
*/
|
|
822
|
+
"showOptional": boolean;
|
|
815
823
|
/**
|
|
816
824
|
* The size of the field
|
|
817
825
|
*/
|
|
@@ -878,6 +886,10 @@ export namespace Components {
|
|
|
878
886
|
* Wether the field is required
|
|
879
887
|
*/
|
|
880
888
|
"required": boolean;
|
|
889
|
+
/**
|
|
890
|
+
* Wether to show optional when not required
|
|
891
|
+
*/
|
|
892
|
+
"showOptional": boolean;
|
|
881
893
|
/**
|
|
882
894
|
* The variant of the field container
|
|
883
895
|
*/
|
|
@@ -1482,6 +1494,10 @@ export namespace Components {
|
|
|
1482
1494
|
* Wether to apply the item's icon on the selected item display
|
|
1483
1495
|
*/
|
|
1484
1496
|
"showIconOnSelectedItem": string;
|
|
1497
|
+
/**
|
|
1498
|
+
* Wether to show optional when not required
|
|
1499
|
+
*/
|
|
1500
|
+
"showOptional": boolean;
|
|
1485
1501
|
/**
|
|
1486
1502
|
* The size of the input group used by the select
|
|
1487
1503
|
*/
|
|
@@ -3658,6 +3674,10 @@ declare namespace LocalJSX {
|
|
|
3658
3674
|
* Wether the field is required
|
|
3659
3675
|
*/
|
|
3660
3676
|
"required"?: boolean;
|
|
3677
|
+
/**
|
|
3678
|
+
* Wether to show optional when not required
|
|
3679
|
+
*/
|
|
3680
|
+
"showOptional"?: boolean;
|
|
3661
3681
|
/**
|
|
3662
3682
|
* The size of the input group used by the datepicker
|
|
3663
3683
|
*/
|
|
@@ -4002,6 +4022,10 @@ declare namespace LocalJSX {
|
|
|
4002
4022
|
* Wether to select all text on focus
|
|
4003
4023
|
*/
|
|
4004
4024
|
"selectAllOnFocus"?: boolean;
|
|
4025
|
+
/**
|
|
4026
|
+
* Wether to show optional when not required
|
|
4027
|
+
*/
|
|
4028
|
+
"showOptional"?: boolean;
|
|
4005
4029
|
/**
|
|
4006
4030
|
* The size of the field
|
|
4007
4031
|
*/
|
|
@@ -4069,6 +4093,10 @@ declare namespace LocalJSX {
|
|
|
4069
4093
|
* Wether the field is required
|
|
4070
4094
|
*/
|
|
4071
4095
|
"required"?: boolean;
|
|
4096
|
+
/**
|
|
4097
|
+
* Wether to show optional when not required
|
|
4098
|
+
*/
|
|
4099
|
+
"showOptional"?: boolean;
|
|
4072
4100
|
/**
|
|
4073
4101
|
* The variant of the field container
|
|
4074
4102
|
*/
|
|
@@ -4749,6 +4777,10 @@ declare namespace LocalJSX {
|
|
|
4749
4777
|
* Wether to apply the item's icon on the selected item display
|
|
4750
4778
|
*/
|
|
4751
4779
|
"showIconOnSelectedItem"?: string;
|
|
4780
|
+
/**
|
|
4781
|
+
* Wether to show optional when not required
|
|
4782
|
+
*/
|
|
4783
|
+
"showOptional"?: boolean;
|
|
4752
4784
|
/**
|
|
4753
4785
|
* The size of the input group used by the select
|
|
4754
4786
|
*/
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as r,g as e,h as n}from"./p-DhGo7hbh.js";import{c as i}from"./p-BFSNj6hu.js";import{i as a}from"./p-DVCJlilm.js";import{a as u}from"./p-C5CTp9IA.js";import{r as o,t as s,_ as c,g as f,s as v,a as l,b as h,c as d,d as w,e as y,l as p,f as b,h as m,i as k,j as g,k as x,m as D,n as T,o as M,p as A,q as E,u as q,v as L,w as I}from"./p-C1h1E07M.js";function R(t){o(1,arguments);var r=s(t);var e=r.getDay();return e===0||e===6}var Q=6e4;var S=36e5;var j=1e3;function B(t){o(1,arguments);var r=s(t);var e=new Date(0);e.setFullYear(r.getFullYear(),0,1);e.setHours(0,0,0,0);return e}function _(t,r){if(t==null){throw new TypeError("assign requires that input parameter not be null or undefined")}for(var e in r){if(Object.prototype.hasOwnProperty.call(r,e)){t[e]=r[e]}}return t}function O(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function Y(t,r){if(t){if("string"==typeof t)return O(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?O(t,r):void 0}}function C(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Y(t))||r){e&&(t=e);var n=0,i=function t(){};return{s:i,n:function r(){return n>=t.length?{done:true}:{done:false,value:t[n++]}},e:function t(r){throw r},f:i}}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 a,u=true,o=false;return{s:function r(){e=e.call(t)},n:function t(){var r=e.next();return u=r.done,r},e:function t(r){o=true,a=r},f:function t(){try{u||null==e["return"]||e["return"]()}finally{if(o)throw a}}}}function G(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function N(t,r){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},N(t,r)}function X(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:true,configurable:true}}),Object.defineProperty(t,"prototype",{writable:false}),r&&N(t,r)}function H(t){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},H(t)}function P(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(P=function r(){return!!t})()}function F(t,r){if(r&&("object"==c(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return G(t)}function W(t){var r=P();return function(){var e,n=H(t);if(r){var i=H(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return F(this,e)}}function K(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function V(t,r){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r);if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Z(t){var r=V(t,"string");return"symbol"==c(r)?r:r+""}function z(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||false,n.configurable=true,"value"in n&&(n.writable=true),Object.defineProperty(t,Z(n.key),n)}}function $(t,r,e){return r&&z(t.prototype,r),Object.defineProperty(t,"prototype",{writable:false}),t}function J(t,r,e){return(r=Z(r))in t?Object.defineProperty(t,r,{value:e,enumerable:true,configurable:true,writable:true}):t[r]=e,t}var U=10;var tt=function(){function t(){K(this,t);J(this,"priority",void 0);J(this,"subPriority",0)}$(t,[{key:"validate",value:function t(r,e){return true}}]);return t}();var rt=function(t){X(e,t);var r=W(e);function e(t,n,i,a,u){var o;K(this,e);o=r.call(this);o.value=t;o.validateValue=n;o.setValue=i;o.priority=a;if(u){o.subPriority=u}return o}$(e,[{key:"validate",value:function t(r,e){return this.validateValue(r,this.value,e)}},{key:"set",value:function t(r,e,n){return this.setValue(r,e,this.value,n)}}]);return e}(tt);var et=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",U);J(G(t),"subPriority",-1);return t}$(e,[{key:"set",value:function t(r,e){if(e.timestampIsSet){return r}var n=new Date(0);n.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate());n.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds());return n}}]);return e}(tt);var nt=function(){function t(){K(this,t);J(this,"incompatibleTokens",void 0);J(this,"priority",void 0);J(this,"subPriority",void 0)}$(t,[{key:"run",value:function t(r,e,n,i){var a=this.parse(r,e,n,i);if(!a){return null}return{setter:new rt(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}}},{key:"validate",value:function t(r,e,n){return true}}]);return t}();var it=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",140);J(G(t),"incompatibleTokens",["R","u","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"})||n.era(r,{width:"narrow"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})||n.era(r,{width:"abbreviated"})||n.era(r,{width:"narrow"})}}},{key:"set",value:function t(r,e,n){e.era=n;r.setUTCFullYear(n,0,1);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var at={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/};var ut={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ot(t,r){if(!t){return t}return{value:r(t.value),rest:t.rest}}function st(t,r){var e=r.match(t);if(!e){return null}return{value:parseInt(e[0],10),rest:r.slice(e[0].length)}}function ct(t,r){var e=r.match(t);if(!e){return null}if(e[0]==="Z"){return{value:0,rest:r.slice(1)}}var n=e[1]==="+"?1:-1;var i=e[2]?parseInt(e[2],10):0;var a=e[3]?parseInt(e[3],10):0;var u=e[5]?parseInt(e[5],10):0;return{value:n*(i*S+a*Q+u*j),rest:r.slice(e[0].length)}}function ft(t){return st(at.anyDigitsSigned,t)}function vt(t,r){switch(t){case 1:return st(at.singleDigit,r);case 2:return st(at.twoDigits,r);case 3:return st(at.threeDigits,r);case 4:return st(at.fourDigits,r);default:return st(new RegExp("^\\d{1,"+t+"}"),r)}}function lt(t,r){switch(t){case 1:return st(at.singleDigitSigned,r);case 2:return st(at.twoDigitsSigned,r);case 3:return st(at.threeDigitsSigned,r);case 4:return st(at.fourDigitsSigned,r);default:return st(new RegExp("^-?\\d{1,"+t+"}"),r)}}function ht(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function dt(t,r){var e=r>0;var n=e?r:1-r;var i;if(n<=50){i=t||100}else{var a=n+50;var u=Math.floor(a/100)*100;var o=t>=a%100;i=t+u-(o?100:0)}return e?i:1-i}function wt(t){return t%400===0||t%4===0&&t%100!==0}var yt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",130);J(G(t),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){var i=function t(r){return{year:r,isTwoDigitYear:e==="yy"}};switch(e){case"y":return ot(vt(4,r),i);case"yo":return ot(n.ordinalNumber(r,{unit:"year"}),i);default:return ot(vt(e.length,r),i)}}},{key:"validate",value:function t(r,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function t(r,e,n){var i=r.getUTCFullYear();if(n.isTwoDigitYear){var a=dt(n.year,i);r.setUTCFullYear(a,0,1);r.setUTCHours(0,0,0,0);return r}var u=!("era"in e)||e.era===1?n.year:1-n.year;r.setUTCFullYear(u,0,1);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var pt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",130);J(G(t),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){var i=function t(r){return{year:r,isTwoDigitYear:e==="YY"}};switch(e){case"Y":return ot(vt(4,r),i);case"Yo":return ot(n.ordinalNumber(r,{unit:"year"}),i);default:return ot(vt(e.length,r),i)}}},{key:"validate",value:function t(r,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function t(r,e,n,i){var a=f(r,i);if(n.isTwoDigitYear){var u=dt(n.year,a);r.setUTCFullYear(u,0,i.firstWeekContainsDate);r.setUTCHours(0,0,0,0);return v(r,i)}var o=!("era"in e)||e.era===1?n.year:1-n.year;r.setUTCFullYear(o,0,i.firstWeekContainsDate);r.setUTCHours(0,0,0,0);return v(r,i)}}]);return e}(nt);var bt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",130);J(G(t),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e){if(e==="R"){return lt(4,r)}return lt(e.length,r)}},{key:"set",value:function t(r,e,n){var i=new Date(0);i.setUTCFullYear(n,0,4);i.setUTCHours(0,0,0,0);return l(i)}}]);return e}(nt);var mt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",130);J(G(t),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e){if(e==="u"){return lt(4,r)}return lt(e.length,r)}},{key:"set",value:function t(r,e,n){r.setUTCFullYear(n,0,1);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var kt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",120);J(G(t),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"Q":case"QQ":return vt(e.length,r);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"})||n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})||n.quarter(r,{width:"abbreviated",context:"formatting"})||n.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function t(r,e){return e>=1&&e<=4}},{key:"set",value:function t(r,e,n){r.setUTCMonth((n-1)*3,1);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var gt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",120);J(G(t),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"q":case"qq":return vt(e.length,r);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"})||n.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})||n.quarter(r,{width:"abbreviated",context:"standalone"})||n.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function t(r,e){return e>=1&&e<=4}},{key:"set",value:function t(r,e,n){r.setUTCMonth((n-1)*3,1);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var xt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);J(G(t),"priority",110);return t}$(e,[{key:"parse",value:function t(r,e,n){var i=function t(r){return r-1};switch(e){case"M":return ot(st(at.month,r),i);case"MM":return ot(vt(2,r),i);case"Mo":return ot(n.ordinalNumber(r,{unit:"month"}),i);case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"})||n.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})||n.month(r,{width:"abbreviated",context:"formatting"})||n.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function t(r,e){return e>=0&&e<=11}},{key:"set",value:function t(r,e,n){r.setUTCMonth(n,1);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var Dt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",110);J(G(t),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){var i=function t(r){return r-1};switch(e){case"L":return ot(st(at.month,r),i);case"LL":return ot(vt(2,r),i);case"Lo":return ot(n.ordinalNumber(r,{unit:"month"}),i);case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"})||n.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})||n.month(r,{width:"abbreviated",context:"standalone"})||n.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function t(r,e){return e>=0&&e<=11}},{key:"set",value:function t(r,e,n){r.setUTCMonth(n,1);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);function Tt(t,r,e){o(2,arguments);var n=s(t);var i=d(r);var a=h(n,e)-i;n.setUTCDate(n.getUTCDate()-a*7);return n}var Mt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",100);J(G(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"w":return st(at.week,r);case"wo":return n.ordinalNumber(r,{unit:"week"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){return e>=1&&e<=53}},{key:"set",value:function t(r,e,n,i){return v(Tt(r,n,i),i)}}]);return e}(nt);function At(t,r){o(2,arguments);var e=s(t);var n=d(r);var i=w(e)-n;e.setUTCDate(e.getUTCDate()-i*7);return e}var Et=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",100);J(G(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"I":return st(at.week,r);case"Io":return n.ordinalNumber(r,{unit:"week"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){return e>=1&&e<=53}},{key:"set",value:function t(r,e,n){return l(At(r,n))}}]);return e}(nt);var qt=[31,28,31,30,31,30,31,31,30,31,30,31];var Lt=[31,29,31,30,31,30,31,31,30,31,30,31];var It=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",90);J(G(t),"subPriority",1);J(G(t),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"d":return st(at.date,r);case"do":return n.ordinalNumber(r,{unit:"date"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){var n=r.getUTCFullYear();var i=wt(n);var a=r.getUTCMonth();if(i){return e>=1&&e<=Lt[a]}else{return e>=1&&e<=qt[a]}}},{key:"set",value:function t(r,e,n){r.setUTCDate(n);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var Rt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",90);J(G(t),"subpriority",1);J(G(t),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"D":case"DD":return st(at.dayOfYear,r);case"Do":return n.ordinalNumber(r,{unit:"date"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){var n=r.getUTCFullYear();var i=wt(n);if(i){return e>=1&&e<=366}else{return e>=1&&e<=365}}},{key:"set",value:function t(r,e,n){r.setUTCMonth(0,n);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);function Qt(t,r,e){var n,i,a,u,c,f,v,l;o(2,arguments);var h=y();var w=d((n=(i=(a=(u=e===null||e===void 0?void 0:e.weekStartsOn)!==null&&u!==void 0?u:e===null||e===void 0?void 0:(c=e.locale)===null||c===void 0?void 0:(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&a!==void 0?a:h.weekStartsOn)!==null&&i!==void 0?i:(v=h.locale)===null||v===void 0?void 0:(l=v.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&n!==void 0?n:0);if(!(w>=0&&w<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var p=s(t);var b=d(r);var m=p.getUTCDay();var k=b%7;var g=(k+7)%7;var x=(g<w?7:0)+b-m;p.setUTCDate(p.getUTCDate()+x);return p}var St=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",90);J(G(t),"incompatibleTokens",["D","i","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"})||n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})||n.day(r,{width:"abbreviated",context:"formatting"})||n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function t(r,e){return e>=0&&e<=6}},{key:"set",value:function t(r,e,n,i){r=Qt(r,n,i);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var jt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",90);J(G(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n,i){var a=function t(r){var e=Math.floor((r-1)/7)*7;return(r+i.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ot(vt(e.length,r),a);case"eo":return ot(n.ordinalNumber(r,{unit:"day"}),a);case"eee":return n.day(r,{width:"abbreviated",context:"formatting"})||n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})||n.day(r,{width:"abbreviated",context:"formatting"})||n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function t(r,e){return e>=0&&e<=6}},{key:"set",value:function t(r,e,n,i){r=Qt(r,n,i);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var Bt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",90);J(G(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n,i){var a=function t(r){var e=Math.floor((r-1)/7)*7;return(r+i.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ot(vt(e.length,r),a);case"co":return ot(n.ordinalNumber(r,{unit:"day"}),a);case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"})||n.day(r,{width:"short",context:"standalone"})||n.day(r,{width:"narrow",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"})||n.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})||n.day(r,{width:"abbreviated",context:"standalone"})||n.day(r,{width:"short",context:"standalone"})||n.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function t(r,e){return e>=0&&e<=6}},{key:"set",value:function t(r,e,n,i){r=Qt(r,n,i);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);function _t(t,r){o(2,arguments);var e=d(r);if(e%7===0){e=e-7}var n=1;var i=s(t);var a=i.getUTCDay();var u=e%7;var c=(u+7)%7;var f=(c<n?7:0)+e-a;i.setUTCDate(i.getUTCDate()+f);return i}var Ot=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",90);J(G(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){var i=function t(r){if(r===0){return 7}return r};switch(e){case"i":case"ii":return vt(e.length,r);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return ot(n.day(r,{width:"abbreviated",context:"formatting"})||n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"}),i);case"iiiii":return ot(n.day(r,{width:"narrow",context:"formatting"}),i);case"iiiiii":return ot(n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"}),i);case"iiii":default:return ot(n.day(r,{width:"wide",context:"formatting"})||n.day(r,{width:"abbreviated",context:"formatting"})||n.day(r,{width:"short",context:"formatting"})||n.day(r,{width:"narrow",context:"formatting"}),i)}}},{key:"validate",value:function t(r,e){return e>=1&&e<=7}},{key:"set",value:function t(r,e,n){r=_t(r,n);r.setUTCHours(0,0,0,0);return r}}]);return e}(nt);var Yt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",80);J(G(t),"incompatibleTokens",["b","B","H","k","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"})||n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})||n.dayPeriod(r,{width:"abbreviated",context:"formatting"})||n.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function t(r,e,n){r.setUTCHours(ht(n),0,0,0);return r}}]);return e}(nt);var Ct=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",80);J(G(t),"incompatibleTokens",["a","B","H","k","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"})||n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})||n.dayPeriod(r,{width:"abbreviated",context:"formatting"})||n.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function t(r,e,n){r.setUTCHours(ht(n),0,0,0);return r}}]);return e}(nt);var Gt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",80);J(G(t),"incompatibleTokens",["a","b","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"})||n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})||n.dayPeriod(r,{width:"abbreviated",context:"formatting"})||n.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function t(r,e,n){r.setUTCHours(ht(n),0,0,0);return r}}]);return e}(nt);var Nt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",70);J(G(t),"incompatibleTokens",["H","K","k","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"h":return st(at.hour12h,r);case"ho":return n.ordinalNumber(r,{unit:"hour"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){return e>=1&&e<=12}},{key:"set",value:function t(r,e,n){var i=r.getUTCHours()>=12;if(i&&n<12){r.setUTCHours(n+12,0,0,0)}else if(!i&&n===12){r.setUTCHours(0,0,0,0)}else{r.setUTCHours(n,0,0,0)}return r}}]);return e}(nt);var Xt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",70);J(G(t),"incompatibleTokens",["a","b","h","K","k","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"H":return st(at.hour23h,r);case"Ho":return n.ordinalNumber(r,{unit:"hour"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){return e>=0&&e<=23}},{key:"set",value:function t(r,e,n){r.setUTCHours(n,0,0,0);return r}}]);return e}(nt);var Ht=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",70);J(G(t),"incompatibleTokens",["h","H","k","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"K":return st(at.hour11h,r);case"Ko":return n.ordinalNumber(r,{unit:"hour"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){return e>=0&&e<=11}},{key:"set",value:function t(r,e,n){var i=r.getUTCHours()>=12;if(i&&n<12){r.setUTCHours(n+12,0,0,0)}else{r.setUTCHours(n,0,0,0)}return r}}]);return e}(nt);var Pt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",70);J(G(t),"incompatibleTokens",["a","b","h","H","K","t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"k":return st(at.hour24h,r);case"ko":return n.ordinalNumber(r,{unit:"hour"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){return e>=1&&e<=24}},{key:"set",value:function t(r,e,n){var i=n<=24?n%24:n;r.setUTCHours(i,0,0,0);return r}}]);return e}(nt);var Ft=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",60);J(G(t),"incompatibleTokens",["t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"m":return st(at.minute,r);case"mo":return n.ordinalNumber(r,{unit:"minute"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){return e>=0&&e<=59}},{key:"set",value:function t(r,e,n){r.setUTCMinutes(n,0,0);return r}}]);return e}(nt);var Wt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",50);J(G(t),"incompatibleTokens",["t","T"]);return t}$(e,[{key:"parse",value:function t(r,e,n){switch(e){case"s":return st(at.second,r);case"so":return n.ordinalNumber(r,{unit:"second"});default:return vt(e.length,r)}}},{key:"validate",value:function t(r,e){return e>=0&&e<=59}},{key:"set",value:function t(r,e,n){r.setUTCSeconds(n,0);return r}}]);return e}(nt);var Kt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",30);J(G(t),"incompatibleTokens",["t","T"]);return t}$(e,[{key:"parse",value:function t(r,e){var n=function t(r){return Math.floor(r*Math.pow(10,-e.length+3))};return ot(vt(e.length,r),n)}},{key:"set",value:function t(r,e,n){r.setUTCMilliseconds(n);return r}}]);return e}(nt);var Vt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",10);J(G(t),"incompatibleTokens",["t","T","x"]);return t}$(e,[{key:"parse",value:function t(r,e){switch(e){case"X":return ct(ut.basicOptionalMinutes,r);case"XX":return ct(ut.basic,r);case"XXXX":return ct(ut.basicOptionalSeconds,r);case"XXXXX":return ct(ut.extendedOptionalSeconds,r);case"XXX":default:return ct(ut.extended,r)}}},{key:"set",value:function t(r,e,n){if(e.timestampIsSet){return r}return new Date(r.getTime()-n)}}]);return e}(nt);var Zt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",10);J(G(t),"incompatibleTokens",["t","T","X"]);return t}$(e,[{key:"parse",value:function t(r,e){switch(e){case"x":return ct(ut.basicOptionalMinutes,r);case"xx":return ct(ut.basic,r);case"xxxx":return ct(ut.basicOptionalSeconds,r);case"xxxxx":return ct(ut.extendedOptionalSeconds,r);case"xxx":default:return ct(ut.extended,r)}}},{key:"set",value:function t(r,e,n){if(e.timestampIsSet){return r}return new Date(r.getTime()-n)}}]);return e}(nt);var zt=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",40);J(G(t),"incompatibleTokens","*");return t}$(e,[{key:"parse",value:function t(r){return ft(r)}},{key:"set",value:function t(r,e,n){return[new Date(n*1e3),{timestampIsSet:true}]}}]);return e}(nt);var $t=function(t){X(e,t);var r=W(e);function e(){var t;K(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}t=r.call.apply(r,[this].concat(i));J(G(t),"priority",20);J(G(t),"incompatibleTokens","*");return t}$(e,[{key:"parse",value:function t(r){return ft(r)}},{key:"set",value:function t(r,e,n){return[new Date(n),{timestampIsSet:true}]}}]);return e}(nt);var Jt={G:new it,y:new yt,Y:new pt,R:new bt,u:new mt,Q:new kt,q:new gt,M:new xt,L:new Dt,w:new Mt,I:new Et,d:new It,D:new Rt,E:new St,e:new jt,c:new Bt,i:new Ot,a:new Yt,b:new Ct,B:new Gt,h:new Nt,H:new Xt,K:new Ht,k:new Pt,m:new Ft,s:new Wt,S:new Kt,X:new Vt,x:new Zt,t:new zt,T:new $t};var Ut=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;var tr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;var rr=/^'([^]*?)'?$/;var er=/''/g;var nr=/\S/;var ir=/[a-zA-Z]/;function ar(t,r,e,n){var i,a,u,f,v,l,h,w,T,M,A,E,q,L;o(3,arguments);var I=String(t);var R=String(r);var Q=y();var S=(i=(a=void 0)!==null&&a!==void 0?a:Q.locale)!==null&&i!==void 0?i:p;if(!S.match){throw new RangeError("locale must contain match property")}var j=d((u=(f=(v=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&v!==void 0?v:Q.firstWeekContainsDate)!==null&&f!==void 0?f:(h=Q.locale)===null||h===void 0?void 0:(w=h.options)===null||w===void 0?void 0:w.firstWeekContainsDate)!==null&&u!==void 0?u:1);if(!(j>=1&&j<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var B=d((T=(M=(A=(E=void 0)!==null&&E!==void 0?E:void 0)!==null&&A!==void 0?A:Q.weekStartsOn)!==null&&M!==void 0?M:(q=Q.locale)===null||q===void 0?void 0:(L=q.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&T!==void 0?T:0);if(!(B>=0&&B<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}if(R===""){if(I===""){return s(e)}else{return new Date(NaN)}}var O={firstWeekContainsDate:j,weekStartsOn:B,locale:S};var Y=[new et];var G=R.match(tr).map((function(t){var r=t[0];if(r in b){var e=b[r];return e(t,S.formatLong)}return t})).join("").match(Ut);var N=[];var X=C(G),H;try{var P=function r(){var e=H.value;if(g(e)){x(e,R,t)}if(D(e)){x(e,R,t)}var n=e[0];var i=Jt[n];if(i){var a=i.incompatibleTokens;if(Array.isArray(a)){var u=N.find((function(t){return a.includes(t.token)||t.token===n}));if(u){throw new RangeError("The format string mustn't contain `".concat(u.fullToken,"` and `").concat(e,"` at the same time"))}}else if(i.incompatibleTokens==="*"&&N.length>0){throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"))}N.push({token:n,fullToken:e});var o=i.run(I,e,S.match,O);if(!o){return{v:new Date(NaN)}}Y.push(o.setter);I=o.rest}else{if(n.match(ir)){throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`")}if(e==="''"){e="'"}else if(n==="'"){e=ur(e)}if(I.indexOf(e)===0){I=I.slice(e.length)}else{return{v:new Date(NaN)}}}};for(X.s();!(H=X.n()).done;){var F=P();if(c(F)==="object")return F.v}}catch(t){X.e(t)}finally{X.f()}if(I.length>0&&nr.test(I)){return new Date(NaN)}var W=Y.map((function(t){return t.priority})).sort((function(t,r){return r-t})).filter((function(t,r,e){return e.indexOf(t)===r})).map((function(t){return Y.filter((function(r){return r.priority===t})).sort((function(t,r){return r.subPriority-t.subPriority}))})).map((function(t){return t[0]}));var K=s(e);if(isNaN(K.getTime())){return new Date(NaN)}var V=m(K,k(K));var Z={};var z=C(W),$;try{for(z.s();!($=z.n()).done;){var J=$.value;if(!J.validate(V,O)){return new Date(NaN)}var U=J.set(V,Z,O);if(Array.isArray(U)){V=U[0];_(Z,U[1])}else{V=U}}}catch(t){z.e(t)}finally{z.f()}return V}function ur(t){return t.match(rr)[1].replace(er,"'")}const or="*{box-sizing:border-box}.static{position:static!important}.absolute{position:absolute!important}.h-0{height:0!important}.overflow-hidden{overflow:hidden!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";const sr=class{constructor(e){t(this,e);this.valueChange=r(this,"valueChange",3);if(e.$hostElement$["s-ei"]){this._internals=e.$hostElement$["s-ei"]}else{this._internals=e.$hostElement$.attachInternals();e.$hostElement$["s-ei"]=this._internals}}placeholder;value;preselectToday=false;enableNativePicker=true;disabledDates;minDate;maxDate;disableWeekends=false;mode="day";valueChange;format="dd-MM-yyyy";hideIconWhenFilled=false;size="base";prefix;label;loading=false;helper;required;error;disabled=false;strategy="absolute";placement="bottom-start";get _el(){return e(this)}_showDropdown=false;_value;_minDate;_maxDate;_disabledDates=[];_isMobileBrowser=false;_internals;_onInputTimeout;_inputRef;_dateInputRef;_defaultFormats={year:"yyyy",month:"LLLL, yyyy",day:"dd-MM-yyyy"};parseValue(t){if(!t&&this.preselectToday){t=new Date}if(typeof t==="string"){t=new Date(t)}this._setValue(t)}parseMinDate(t){if(typeof t==="string"){t=new Date(t)}if(!T(t)){return}this._minDate=t;if(M(this._value,this._minDate)){this._setValue(null)}}parseMaxDate(t){if(typeof t==="string"){t=new Date(t)}if(!T(t)){return}this._maxDate=t;if(A(this._value,this._maxDate)){this._setValue(null)}}parseDisabledDates(t){if(typeof t==="string"){t=JSON.parse(t)}if(!t||!Array.isArray(t)){return}this._disabledDates=t.map((t=>{if(typeof t==="string"){return new Date(t)}return t})).filter((t=>T(t)));if(this._isDisabledDay(this._value)){this._setValue(null)}}formResetCallback(){this._setValue(null)}formDisabledCallback(t){if(!this._internals.form){return}this.disabled=t}componentWillLoad(){if(this.disabledDates){this.parseDisabledDates(this.disabledDates)}if(this.minDate){this.parseMinDate(this.minDate)}if(this.maxDate){this.parseMaxDate(this.maxDate)}if(this.mode!=="day"&&this.format===this._defaultFormats["day"]){this.format=this._defaultFormats[this.mode]}this._isMobileBrowser=a();this.parseValue(this.value)}render(){return n("p-dropdown",{key:"908c05cb4fbc0b374dd68e274b19675f9b35cfd3",strategy:this.strategy,placement:this.placement,disableTriggerClick:true,applyMaxWidth:false,applyFullWidth:false,insideClick:true,show:this._showDropdown},n("p-field",{key:"776ddbd3defa7083c9ad8ddda4b1ae342a309949",slot:"trigger",icon:this.hideIconWhenFilled&&!!this._value?null:"calendar-multi",iconPosition:"start",size:this.size,prefix:this.prefix,label:this.label,loading:this.loading,helper:this.helper,required:u(this.required),error:this.error,forceShowTooltip:!!this.error?.length&&!this._showDropdown,disabled:u(this.disabled),focused:this._showDropdown,value:this._getFormattedDate(),placeholder:this.placeholder,onFocus:()=>this._onFocus(),onBlur:()=>this._onBlur(),onValueChange:t=>this._onValueChange(t.detail),onInputRefChange:t=>this._inputRef=t.detail}),this.enableNativePicker&&this._isMobileBrowser&&n("input",{key:"fd410b203a523b1629f54b44595c526db435bf4e",slot:"trigger",type:this.mode==="day"?"date":"month",class:"h-0 overflow-hidden",onInput:t=>this._onNativeInput(t),ref:t=>this._dateInputRef=t,value:this._value&&E(this._value,"yyyy-MM-dd"),min:this.minDate&&E(new Date(this.minDate),"yyyy-MM-dd"),max:this.maxDate&&E(new Date(this.maxDate),"yyyy-MM-dd")}),n("div",{key:"dabc9c994613aa412162bae1e01592ca47d46cf9",slot:"items"},n("p-calendar",{key:"d2bde5fecd14463c587e3bc9c7b89828a217cecd",variant:"embedded",value:this._value,onValueChange:({detail:t})=>this.value=t,preselectToday:this.preselectToday,disabledDates:this.disabledDates,minDate:this.minDate,maxDate:this.maxDate,disableWeekends:this.disableWeekends,mode:this.mode})))}documentClickHandler({target:t}){if(!this._showDropdown||i(t,this._el)){return}this._showDropdown=false}_onFocus(){if(this._isMobileBrowser&&this._dateInputRef){this._dateInputRef.showPicker();this._inputRef.blur();return}this._showDropdown=true}_onBlur(){if(this._isMobileBrowser&&this._dateInputRef){return}const t=this._inputRef;if(t.value===null){return}const r=ar(t.value,this.format,new Date);if(r===this._value){return}if(!T(r)||this._isDisabledDay(r)){t.value=this._getFormattedDate();return}this._setValue(r,false)}_onValueChange(t){if(this._onInputTimeout){clearTimeout(this._onInputTimeout);this._onInputTimeout=null}this._onInputTimeout=setTimeout((()=>{const r=ar(t,this.format,new Date);if(!T(r)||E(r,this.format)!==t){return}this._setValue(r,false)}),300)}_onNativeInput(t){if(!t.target){return}if(this._onInputTimeout){clearTimeout(this._onInputTimeout);this._onInputTimeout=null}this._onInputTimeout=setTimeout((()=>{this._setValue(t.target.value===""?null:new Date(t.target.value),false)}))}_setValue(t,r=true){if(t===null){this._value=null;this.valueChange.emit(null);return}if(!T(t)){return}if(this._isDisabledDay(t)){if(!!this._dateInputRef?.value){this._dateInputRef.value=this._value?E(this._value,"yyyy-MM-dd"):null}return}t=this.mode==="day"?q(t):this.mode==="month"?L(t):B(t);const e=I(t,this._value);if(e){return}if(r){this._showDropdown=false}this._value=t;this.valueChange.emit(t)}_isDisabledDay(t){return this.disableWeekends&&R(t)||M(t,this._minDate)&&!I(t,this._minDate)||A(t,this._maxDate)&&!I(t,this._maxDate)||this._disabledDates.findIndex((r=>I(r,t)))>=0}_getFormattedDate(){if(!this._value){return""}return E(this._value,this.format)}static get formAssociated(){return true}static get watchers(){return{value:["parseValue"],minDate:["parseMinDate"],maxDate:["parseMaxDate"],disabledDates:["parseDisabledDates"]}}};sr.style=or;export{sr as p_datepicker};
|
|
2
|
-
//# sourceMappingURL=p-50a816b0.entry.js.map
|