import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-97e6d7b1.js';

var customParseFormat = createCommonjsModule(function (module, exports) {
!function(t,n){module.exports=n();}(commonjsGlobal,function(){var t,n=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,e=/\d\d/,o=/\d\d?/,r=/\d*[^\s\d-:/.()]+/;var s=function(t){return function(n){this[t]=+n;}},i=[/[+-]\d\d:?\d\d/,function(t){var n,e;(this.zone||(this.zone={})).offset=(n=t.match(/([+-]|\d\d)/g),0===(e=60*n[1]+ +n[2])?0:"+"===n[0]?-e:e);}],a={A:[/[AP]M/,function(t){this.afternoon="PM"===t;}],a:[/[ap]m/,function(t){this.afternoon="pm"===t;}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[e,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[o,s("seconds")],ss:[o,s("seconds")],m:[o,s("minutes")],mm:[o,s("minutes")],H:[o,s("hours")],h:[o,s("hours")],HH:[o,s("hours")],hh:[o,s("hours")],D:[o,s("day")],DD:[e,s("day")],Do:[r,function(n){var e=t.ordinal,o=n.match(/\d+/);if(this.day=o[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===n&&(this.day=r);}],M:[o,s("month")],MM:[e,s("month")],MMM:[r,function(n){var e=t,o=e.months,r=e.monthsShort,s=r?r.findIndex(function(t){return t===n}):o.findIndex(function(t){return t.substr(0,3)===n});if(s<0)throw new Error;this.month=s+1;}],MMMM:[r,function(n){var e=t.months.indexOf(n);if(e<0)throw new Error;this.month=e+1;}],Y:[/[+-]?\d+/,s("year")],YY:[e,function(t){t=+t,this.year=t+(t>68?1900:2e3);}],YYYY:[/\d{4}/,s("year")],Z:i,ZZ:i};var u=function(t,e,o){try{var r=function(t){for(var e=t.match(n),o=e.length,r=0;r<o;r+=1){var s=e[r],i=a[s],u=i&&i[0],f=i&&i[1];e[r]=f?{regex:u,parser:f}:s.replace(/^\[|\]$/g,"");}return function(t){for(var n={},r=0,s=0;r<o;r+=1){var i=e[r];if("string"==typeof i)s+=i.length;else{var a=i.regex,u=i.parser,f=t.substr(s),h=a.exec(f)[0];u.call(n,h),t=t.replace(h,"");}}return function(t){var n=t.afternoon;if(void 0!==n){var e=t.hours;n?e<12&&(t.hours+=12):12===e&&(t.hours=0),delete t.afternoon;}}(n),n}}(e)(t),s=r.year,i=r.month,u=r.day,f=r.hours,h=r.minutes,d=r.seconds,c=r.milliseconds,m=r.zone,l=new Date,v=u||(s||i?1:l.getDate()),p=s||l.getFullYear(),M=0;s&&!i||(M=i>0?i-1:l.getMonth());var y=f||0,D=h||0,Y=d||0,g=c||0;return m?new Date(Date.UTC(p,M,v,y,D,Y,g+60*m.offset*1e3)):o?new Date(Date.UTC(p,M,v,y,D,Y,g)):new Date(p,M,v,y,D,Y,g)}catch(t){return new Date("")}};return function(n,e,o){var r=e.prototype,s=r.parse;r.parse=function(n){var e=n.date,r=n.format,i=n.pl,a=n.utc;this.$u=a,r?(t=i?o.Ls[i]:this.$locale(),this.$d=u(e,r,a),this.init(n),i&&(this.$L=i)):s.call(this,n);};}});
});

export { customParseFormat as c };
