-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path423-d48cfcde094bd36a685b.js.descarga
450 lines (450 loc) · 86.3 KB
/
423-d48cfcde094bd36a685b.js.descarga
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[423],{3303:(function(module,exports,__webpack_require__){(function(global,factory){true?module.exports=factory():undefined;}(this,function(){'use strict';/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p];}
return t;};return __assign.apply(this,arguments);};var HOOKS=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition",];var defaults={_disable:[],_enable:[],allowInput:false,altFormat:"F j, Y",altInput:false,altInputClass:"form-control input",animate:typeof window==="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",clickOpens:true,closeOnSelect:true,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:false,enable:[],enableSeconds:false,enableTime:false,errorHandler:function(err){return typeof console!=="undefined"&&console.warn(err);},getWeek:function(givenDate){var date=new Date(givenDate.getTime());date.setHours(0,0,0,0);date.setDate(date.getDate()+3-((date.getDay()+6)%7));var week1=new Date(date.getFullYear(),0,4);return(1+
Math.round(((date.getTime()-week1.getTime())/86400000-
3+
((week1.getDay()+6)%7))/7));},hourIncrement:1,ignoredFocusElements:[],inline:false,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:false,now:new Date(),onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:undefined,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:false,showMonths:1,static:false,time_24hr:false,weekNumbers:false,wrap:false};var english={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday",]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",],longhand:["January","February","March","April","May","June","July","August","September","October","November","December",]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(nth){var s=nth%100;if(s>3&&s<21)
return "th";switch(s%10){case 1:return "st";case 2:return "nd";case 3:return "rd";default:return "th";}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:false};var pad=function(number){return("0"+number).slice(-2);};var int=function(bool){return(bool===true?1:0);};function debounce(func,wait,immediate){if(immediate===void 0){immediate=false;}
var timeout;return function(){var context=this,args=arguments;timeout!==null&&clearTimeout(timeout);timeout=window.setTimeout(function(){timeout=null;if(!immediate)
func.apply(context,args);},wait);if(immediate&&!timeout)
func.apply(context,args);};}
var arrayify=function(obj){return obj instanceof Array?obj:[obj];};function toggleClass(elem,className,bool){if(bool===true)
return elem.classList.add(className);elem.classList.remove(className);}
function createElement(tag,className,content){var e=window.document.createElement(tag);className=className||"";content=content||"";e.className=className;if(content!==undefined)
e.textContent=content;return e;}
function clearNode(node){while(node.firstChild)
node.removeChild(node.firstChild);}
function findParent(node,condition){if(condition(node))
return node;else if(node.parentNode)
return findParent(node.parentNode,condition);return undefined;}
function createNumberInput(inputClassName,opts){var wrapper=createElement("div","numInputWrapper"),numInput=createElement("input","numInput "+inputClassName),arrowUp=createElement("span","arrowUp"),arrowDown=createElement("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1){numInput.type="number";}
else{numInput.type="text";numInput.pattern="\\d*";}
if(opts!==undefined)
for(var key in opts)
numInput.setAttribute(key,opts[key]);wrapper.appendChild(numInput);wrapper.appendChild(arrowUp);wrapper.appendChild(arrowDown);return wrapper;}
function getEventTarget(event){if(typeof event.composedPath==="function"){var path=event.composedPath();return path[0];}
return event.target;}
var doNothing=function(){return undefined;};var monthToStr=function(monthNumber,shorthand,locale){return locale.months[shorthand?"shorthand":"longhand"][monthNumber];};var revFormat={D:doNothing,F:function(dateObj,monthName,locale){dateObj.setMonth(locale.months.longhand.indexOf(monthName));},G:function(dateObj,hour){dateObj.setHours(parseFloat(hour));},H:function(dateObj,hour){dateObj.setHours(parseFloat(hour));},J:function(dateObj,day){dateObj.setDate(parseFloat(day));},K:function(dateObj,amPM,locale){dateObj.setHours((dateObj.getHours()%12)+
12*int(new RegExp(locale.amPM[1],"i").test(amPM)));},M:function(dateObj,shortMonth,locale){dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));},S:function(dateObj,seconds){dateObj.setSeconds(parseFloat(seconds));},U:function(_,unixSeconds){return new Date(parseFloat(unixSeconds)*1000);},W:function(dateObj,weekNum,locale){var weekNumber=parseInt(weekNum);var date=new Date(dateObj.getFullYear(),0,2+(weekNumber-1)*7,0,0,0,0);date.setDate(date.getDate()-date.getDay()+locale.firstDayOfWeek);return date;},Y:function(dateObj,year){dateObj.setFullYear(parseFloat(year));},Z:function(_,ISODate){return new Date(ISODate);},d:function(dateObj,day){dateObj.setDate(parseFloat(day));},h:function(dateObj,hour){dateObj.setHours(parseFloat(hour));},i:function(dateObj,minutes){dateObj.setMinutes(parseFloat(minutes));},j:function(dateObj,day){dateObj.setDate(parseFloat(day));},l:doNothing,m:function(dateObj,month){dateObj.setMonth(parseFloat(month)-1);},n:function(dateObj,month){dateObj.setMonth(parseFloat(month)-1);},s:function(dateObj,seconds){dateObj.setSeconds(parseFloat(seconds));},u:function(_,unixMillSeconds){return new Date(parseFloat(unixMillSeconds));},w:doNothing,y:function(dateObj,year){dateObj.setFullYear(2000+parseFloat(year));}};var tokenRegex={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"};var formats={Z:function(date){return date.toISOString();},D:function(date,locale,options){return locale.weekdays.shorthand[formats.w(date,locale,options)];},F:function(date,locale,options){return monthToStr(formats.n(date,locale,options)-1,false,locale);},G:function(date,locale,options){return pad(formats.h(date,locale,options));},H:function(date){return pad(date.getHours());},J:function(date,locale){return locale.ordinal!==undefined?date.getDate()+locale.ordinal(date.getDate()):date.getDate();},K:function(date,locale){return locale.amPM[int(date.getHours()>11)];},M:function(date,locale){return monthToStr(date.getMonth(),true,locale);},S:function(date){return pad(date.getSeconds());},U:function(date){return date.getTime()/1000;},W:function(date,_,options){return options.getWeek(date);},Y:function(date){return date.getFullYear();},d:function(date){return pad(date.getDate());},h:function(date){return(date.getHours()%12?date.getHours()%12:12);},i:function(date){return pad(date.getMinutes());},j:function(date){return date.getDate();},l:function(date,locale){return locale.weekdays.longhand[date.getDay()];},m:function(date){return pad(date.getMonth()+1);},n:function(date){return date.getMonth()+1;},s:function(date){return date.getSeconds();},u:function(date){return date.getTime();},w:function(date){return date.getDay();},y:function(date){return String(date.getFullYear()).substring(2);}};var createDateFormatter=function(_a){var _b=_a.config,config=_b===void 0?defaults:_b,_c=_a.l10n,l10n=_c===void 0?english:_c;return function(dateObj,frmt,overrideLocale){var locale=overrideLocale||l10n;if(config.formatDate!==undefined){return config.formatDate(dateObj,frmt,locale);}
return frmt.split("").map(function(c,i,arr){return formats[c]&&arr[i-1]!=="\\"?formats[c](dateObj,locale,config):c!=="\\"?c:"";}).join("");};};var createDateParser=function(_a){var _b=_a.config,config=_b===void 0?defaults:_b,_c=_a.l10n,l10n=_c===void 0?english:_c;return function(date,givenFormat,timeless,customLocale){if(date!==0&&!date)
return undefined;var locale=customLocale||l10n;var parsedDate;var dateOrig=date;if(date instanceof Date)
parsedDate=new Date(date.getTime());else if(typeof date!=="string"&&date.toFixed!==undefined)
parsedDate=new Date(date);else if(typeof date==="string"){var format=givenFormat||(config||defaults).dateFormat;var datestr=String(date).trim();if(datestr==="today"){parsedDate=new Date();timeless=true;}
else if(/Z$/.test(datestr)||/GMT$/.test(datestr))
parsedDate=new Date(date);else if(config&&config.parseDate)
parsedDate=config.parseDate(date,format);else{parsedDate=!config||!config.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0));var matched=void 0,ops=[];for(var i=0,matchIndex=0,regexStr="";i<format.length;i++){var token_1=format[i];var isBackSlash=token_1==="\\";var escaped=format[i-1]==="\\"||isBackSlash;if(tokenRegex[token_1]&&!escaped){regexStr+=tokenRegex[token_1];var match=new RegExp(regexStr).exec(date);if(match&&(matched=true)){ops[token_1!=="Y"?"push":"unshift"]({fn:revFormat[token_1],val:match[++matchIndex]});}}
else if(!isBackSlash)
regexStr+=".";ops.forEach(function(_a){var fn=_a.fn,val=_a.val;return(parsedDate=fn(parsedDate,val,locale)||parsedDate);});}
parsedDate=matched?parsedDate:undefined;}}
if(!(parsedDate instanceof Date&&!isNaN(parsedDate.getTime()))){config.errorHandler(new Error("Invalid date provided: "+dateOrig));return undefined;}
if(timeless===true)
parsedDate.setHours(0,0,0,0);return parsedDate;};};function compareDates(date1,date2,timeless){if(timeless===void 0){timeless=true;}
if(timeless!==false){return(new Date(date1.getTime()).setHours(0,0,0,0)-
new Date(date2.getTime()).setHours(0,0,0,0));}
return date1.getTime()-date2.getTime();}
var isBetween=function(ts,ts1,ts2){return ts>Math.min(ts1,ts2)&&ts<Math.max(ts1,ts2);};var duration={DAY:86400000};if(typeof Object.assign!=="function"){Object.assign=function(target){var args=[];for(var _i=1;_i<arguments.length;_i++){args[_i-1]=arguments[_i];}
if(!target){throw TypeError("Cannot convert undefined or null to object");}
var _loop_1=function(source){if(source){Object.keys(source).forEach(function(key){return(target[key]=source[key]);});}};for(var _a=0,args_1=args;_a<args_1.length;_a++){var source=args_1[_a];_loop_1(source);}
return target;};}
var DEBOUNCED_CHANGE_MS=300;function FlatpickrInstance(element,instanceConfig){var self={config:__assign({},defaults,flatpickr.defaultConfig),l10n:english};self.parseDate=createDateParser({config:self.config,l10n:self.l10n});self._handlers=[];self.pluginElements=[];self.loadedPlugins=[];self._bind=bind;self._setHoursFromDate=setHoursFromDate;self._positionCalendar=positionCalendar;self.changeMonth=changeMonth;self.changeYear=changeYear;self.clear=clear;self.close=close;self._createElement=createElement;self.destroy=destroy;self.isEnabled=isEnabled;self.jumpToDate=jumpToDate;self.open=open;self.redraw=redraw;self.set=set;self.setDate=setDate;self.toggle=toggle;function setupHelperFunctions(){self.utils={getDaysInMonth:function(month,yr){if(month===void 0){month=self.currentMonth;}
if(yr===void 0){yr=self.currentYear;}
if(month===1&&((yr%4===0&&yr%100!==0)||yr%400===0))
return 29;return self.l10n.daysInMonth[month];}};}
function init(){self.element=self.input=element;self.isOpen=false;parseConfig();setupLocale();setupInputs();setupDates();setupHelperFunctions();if(!self.isMobile)
build();bindEvents();if(self.selectedDates.length||self.config.noCalendar){if(self.config.enableTime){setHoursFromDate(self.config.noCalendar?self.latestSelectedDateObj||self.config.minDate:undefined);}
updateValue(false);}
setCalendarWidth();self.showTimeInput=self.selectedDates.length>0||self.config.noCalendar;var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if(!self.isMobile&&isSafari){positionCalendar();}
triggerEvent("onReady");}
function bindToInstance(fn){return fn.bind(self);}
function setCalendarWidth(){var config=self.config;if(config.weekNumbers===false&&config.showMonths===1)
return;else if(config.noCalendar!==true){window.requestAnimationFrame(function(){if(self.calendarContainer!==undefined){self.calendarContainer.style.visibility="hidden";self.calendarContainer.style.display="block";}
if(self.daysContainer!==undefined){var daysWidth=(self.days.offsetWidth+1)*config.showMonths;self.daysContainer.style.width=daysWidth+"px";self.calendarContainer.style.width=daysWidth+
(self.weekWrapper!==undefined?self.weekWrapper.offsetWidth:0)+
"px";self.calendarContainer.style.removeProperty("visibility");self.calendarContainer.style.removeProperty("display");}});}}
function updateTime(e){if(self.selectedDates.length===0){setDefaultTime();}
if(e!==undefined&&e.type!=="blur"){timeWrapper(e);}
var prevValue=self._input.value;setHoursFromInputs();updateValue();if(self._input.value!==prevValue){self._debouncedChange();}}
function ampm2military(hour,amPM){return(hour%12)+12*int(amPM===self.l10n.amPM[1]);}
function military2ampm(hour){switch(hour%24){case 0:case 12:return 12;default:return hour%12;}}
function setHoursFromInputs(){if(self.hourElement===undefined||self.minuteElement===undefined)
return;var hours=(parseInt(self.hourElement.value.slice(-2),10)||0)%24,minutes=(parseInt(self.minuteElement.value,10)||0)%60,seconds=self.secondElement!==undefined?(parseInt(self.secondElement.value,10)||0)%60:0;if(self.amPM!==undefined){hours=ampm2military(hours,self.amPM.textContent);}
var limitMinHours=self.config.minTime!==undefined||(self.config.minDate&&self.minDateHasTime&&self.latestSelectedDateObj&&compareDates(self.latestSelectedDateObj,self.config.minDate,true)===0);var limitMaxHours=self.config.maxTime!==undefined||(self.config.maxDate&&self.maxDateHasTime&&self.latestSelectedDateObj&&compareDates(self.latestSelectedDateObj,self.config.maxDate,true)===0);if(limitMaxHours){var maxTime=self.config.maxTime!==undefined?self.config.maxTime:self.config.maxDate;hours=Math.min(hours,maxTime.getHours());if(hours===maxTime.getHours())
minutes=Math.min(minutes,maxTime.getMinutes());if(minutes===maxTime.getMinutes())
seconds=Math.min(seconds,maxTime.getSeconds());}
if(limitMinHours){var minTime=self.config.minTime!==undefined?self.config.minTime:self.config.minDate;hours=Math.max(hours,minTime.getHours());if(hours===minTime.getHours())
minutes=Math.max(minutes,minTime.getMinutes());if(minutes===minTime.getMinutes())
seconds=Math.max(seconds,minTime.getSeconds());}
setHours(hours,minutes,seconds);}
function setHoursFromDate(dateObj){var date=dateObj||self.latestSelectedDateObj;if(date)
setHours(date.getHours(),date.getMinutes(),date.getSeconds());}
function setDefaultHours(){var hours=self.config.defaultHour;var minutes=self.config.defaultMinute;var seconds=self.config.defaultSeconds;if(self.config.minDate!==undefined){var minHr=self.config.minDate.getHours();var minMinutes=self.config.minDate.getMinutes();hours=Math.max(hours,minHr);if(hours===minHr)
minutes=Math.max(minMinutes,minutes);if(hours===minHr&&minutes===minMinutes)
seconds=self.config.minDate.getSeconds();}
if(self.config.maxDate!==undefined){var maxHr=self.config.maxDate.getHours();var maxMinutes=self.config.maxDate.getMinutes();hours=Math.min(hours,maxHr);if(hours===maxHr)
minutes=Math.min(maxMinutes,minutes);if(hours===maxHr&&minutes===maxMinutes)
seconds=self.config.maxDate.getSeconds();}
setHours(hours,minutes,seconds);}
function setHours(hours,minutes,seconds){if(self.latestSelectedDateObj!==undefined){self.latestSelectedDateObj.setHours(hours%24,minutes,seconds||0,0);}
if(!self.hourElement||!self.minuteElement||self.isMobile)
return;self.hourElement.value=pad(!self.config.time_24hr?((12+hours)%12)+12*int(hours%12===0):hours);self.minuteElement.value=pad(minutes);if(self.amPM!==undefined)
self.amPM.textContent=self.l10n.amPM[int(hours>=12)];if(self.secondElement!==undefined)
self.secondElement.value=pad(seconds);}
function onYearInput(event){var year=parseInt(event.target.value)+(event.delta||0);if(year/1000>1||(event.key==="Enter"&&!/[^\d]/.test(year.toString()))){changeYear(year);}}
function bind(element,event,handler,options){if(event instanceof Array)
return event.forEach(function(ev){return bind(element,ev,handler,options);});if(element instanceof Array)
return element.forEach(function(el){return bind(el,event,handler,options);});element.addEventListener(event,handler,options);self._handlers.push({element:element,event:event,handler:handler,options:options});}
function onClick(handler){return function(evt){evt.which===1&&handler(evt);};}
function triggerChange(){triggerEvent("onChange");}
function bindEvents(){if(self.config.wrap){["open","close","toggle","clear"].forEach(function(evt){Array.prototype.forEach.call(self.element.querySelectorAll("[data-"+evt+"]"),function(el){return bind(el,"click",self[evt]);});});}
if(self.isMobile){setupMobile();return;}
var debouncedResize=debounce(onResize,50);self._debouncedChange=debounce(triggerChange,DEBOUNCED_CHANGE_MS);if(self.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent))
bind(self.daysContainer,"mouseover",function(e){if(self.config.mode==="range")
onMouseOver(e.target);});bind(window.document.body,"keydown",onKeyDown);if(!self.config.inline&&!self.config.static)
bind(window,"resize",debouncedResize);if(window.ontouchstart!==undefined)
bind(window.document,"touchstart",documentClick);else
bind(window.document,"mousedown",onClick(documentClick));bind(window.document,"focus",documentClick,{capture:true});if(self.config.clickOpens===true){bind(self._input,"focus",self.open);bind(self._input,"mousedown",onClick(self.open));}
if(self.daysContainer!==undefined){bind(self.monthNav,"mousedown",onClick(onMonthNavClick));bind(self.monthNav,["keyup","increment"],onYearInput);bind(self.daysContainer,"mousedown",onClick(selectDate));}
if(self.timeContainer!==undefined&&self.minuteElement!==undefined&&self.hourElement!==undefined){var selText=function(e){return e.target.select();};bind(self.timeContainer,["increment"],updateTime);bind(self.timeContainer,"blur",updateTime,{capture:true});bind(self.timeContainer,"mousedown",onClick(timeIncrement));bind([self.hourElement,self.minuteElement],["focus","click"],selText);if(self.secondElement!==undefined)
bind(self.secondElement,"focus",function(){return self.secondElement&&self.secondElement.select();});if(self.amPM!==undefined){bind(self.amPM,"mousedown",onClick(function(e){updateTime(e);triggerChange();}));}}}
function jumpToDate(jumpDate,triggerChange){var jumpTo=jumpDate!==undefined?self.parseDate(jumpDate):self.latestSelectedDateObj||(self.config.minDate&&self.config.minDate>self.now?self.config.minDate:self.config.maxDate&&self.config.maxDate<self.now?self.config.maxDate:self.now);var oldYear=self.currentYear;var oldMonth=self.currentMonth;try{if(jumpTo!==undefined){self.currentYear=jumpTo.getFullYear();self.currentMonth=jumpTo.getMonth();}}
catch(e){e.message="Invalid date supplied: "+jumpTo;self.config.errorHandler(e);}
if(triggerChange&&self.currentYear!==oldYear){triggerEvent("onYearChange");buildMonthSwitch();}
if(triggerChange&&(self.currentYear!==oldYear||self.currentMonth!==oldMonth)){triggerEvent("onMonthChange");}
self.redraw();}
function timeIncrement(e){if(~e.target.className.indexOf("arrow"))
incrementNumInput(e,e.target.classList.contains("arrowUp")?1:-1);}
function incrementNumInput(e,delta,inputElem){var target=e&&e.target;var input=inputElem||(target&&target.parentNode&&target.parentNode.firstChild);var event=createEvent("increment");event.delta=delta;input&&input.dispatchEvent(event);}
function build(){var fragment=window.document.createDocumentFragment();self.calendarContainer=createElement("div","flatpickr-calendar");self.calendarContainer.tabIndex=-1;if(!self.config.noCalendar){fragment.appendChild(buildMonthNav());self.innerContainer=createElement("div","flatpickr-innerContainer");if(self.config.weekNumbers){var _a=buildWeeks(),weekWrapper=_a.weekWrapper,weekNumbers=_a.weekNumbers;self.innerContainer.appendChild(weekWrapper);self.weekNumbers=weekNumbers;self.weekWrapper=weekWrapper;}
self.rContainer=createElement("div","flatpickr-rContainer");self.rContainer.appendChild(buildWeekdays());if(!self.daysContainer){self.daysContainer=createElement("div","flatpickr-days");self.daysContainer.tabIndex=-1;}
buildDays();self.rContainer.appendChild(self.daysContainer);self.innerContainer.appendChild(self.rContainer);fragment.appendChild(self.innerContainer);}
if(self.config.enableTime){fragment.appendChild(buildTime());}
toggleClass(self.calendarContainer,"rangeMode",self.config.mode==="range");toggleClass(self.calendarContainer,"animate",self.config.animate===true);toggleClass(self.calendarContainer,"multiMonth",self.config.showMonths>1);self.calendarContainer.appendChild(fragment);var customAppend=self.config.appendTo!==undefined&&self.config.appendTo.nodeType!==undefined;if(self.config.inline||self.config.static){self.calendarContainer.classList.add(self.config.inline?"inline":"static");if(self.config.inline){if(!customAppend&&self.element.parentNode)
self.element.parentNode.insertBefore(self.calendarContainer,self._input.nextSibling);else if(self.config.appendTo!==undefined)
self.config.appendTo.appendChild(self.calendarContainer);}
if(self.config.static){var wrapper=createElement("div","flatpickr-wrapper");if(self.element.parentNode)
self.element.parentNode.insertBefore(wrapper,self.element);wrapper.appendChild(self.element);if(self.altInput)
wrapper.appendChild(self.altInput);wrapper.appendChild(self.calendarContainer);}}
if(!self.config.static&&!self.config.inline)
(self.config.appendTo!==undefined?self.config.appendTo:window.document.body).appendChild(self.calendarContainer);}
function createDay(className,date,dayNumber,i){var dateIsEnabled=isEnabled(date,true),dayElement=createElement("span","flatpickr-day "+className,date.getDate().toString());dayElement.dateObj=date;dayElement.$i=i;dayElement.setAttribute("aria-label",self.formatDate(date,self.config.ariaDateFormat));if(className.indexOf("hidden")===-1&&compareDates(date,self.now)===0){self.todayDateElem=dayElement;dayElement.classList.add("today");dayElement.setAttribute("aria-current","date");}
if(dateIsEnabled){dayElement.tabIndex=-1;if(isDateSelected(date)){dayElement.classList.add("selected");self.selectedDateElem=dayElement;if(self.config.mode==="range"){toggleClass(dayElement,"startRange",self.selectedDates[0]&&compareDates(date,self.selectedDates[0],true)===0);toggleClass(dayElement,"endRange",self.selectedDates[1]&&compareDates(date,self.selectedDates[1],true)===0);if(className==="nextMonthDay")
dayElement.classList.add("inRange");}}}
else{dayElement.classList.add("flatpickr-disabled");}
if(self.config.mode==="range"){if(isDateInRange(date)&&!isDateSelected(date))
dayElement.classList.add("inRange");}
if(self.weekNumbers&&self.config.showMonths===1&&className!=="prevMonthDay"&&dayNumber%7===1){self.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+self.config.getWeek(date)+"</span>");}
triggerEvent("onDayCreate",dayElement);return dayElement;}
function focusOnDayElem(targetNode){targetNode.focus();if(self.config.mode==="range")
onMouseOver(targetNode);}
function getFirstAvailableDay(delta){var startMonth=delta>0?0:self.config.showMonths-1;var endMonth=delta>0?self.config.showMonths:-1;for(var m=startMonth;m!=endMonth;m+=delta){var month=self.daysContainer.children[m];var startIndex=delta>0?0:month.children.length-1;var endIndex=delta>0?month.children.length:-1;for(var i=startIndex;i!=endIndex;i+=delta){var c=month.children[i];if(c.className.indexOf("hidden")===-1&&isEnabled(c.dateObj))
return c;}}
return undefined;}
function getNextAvailableDay(current,delta){var givenMonth=current.className.indexOf("Month")===-1?current.dateObj.getMonth():self.currentMonth;var endMonth=delta>0?self.config.showMonths:-1;var loopDelta=delta>0?1:-1;for(var m=givenMonth-self.currentMonth;m!=endMonth;m+=loopDelta){var month=self.daysContainer.children[m];var startIndex=givenMonth-self.currentMonth===m?current.$i+delta:delta<0?month.children.length-1:0;var numMonthDays=month.children.length;for(var i=startIndex;i>=0&&i<numMonthDays&&i!=(delta>0?numMonthDays:-1);i+=loopDelta){var c=month.children[i];if(c.className.indexOf("hidden")===-1&&isEnabled(c.dateObj)&&Math.abs(current.$i-i)>=Math.abs(delta))
return focusOnDayElem(c);}}
self.changeMonth(loopDelta);focusOnDay(getFirstAvailableDay(loopDelta),0);return undefined;}
function focusOnDay(current,offset){var dayFocused=isInView(document.activeElement||document.body);var startElem=current!==undefined?current:dayFocused?document.activeElement:self.selectedDateElem!==undefined&&isInView(self.selectedDateElem)?self.selectedDateElem:self.todayDateElem!==undefined&&isInView(self.todayDateElem)?self.todayDateElem:getFirstAvailableDay(offset>0?1:-1);if(startElem===undefined)
return self._input.focus();if(!dayFocused)
return focusOnDayElem(startElem);getNextAvailableDay(startElem,offset);}
function buildMonthDays(year,month){var firstOfMonth=(new Date(year,month,1).getDay()-self.l10n.firstDayOfWeek+7)%7;var prevMonthDays=self.utils.getDaysInMonth((month-1+12)%12);var daysInMonth=self.utils.getDaysInMonth(month),days=window.document.createDocumentFragment(),isMultiMonth=self.config.showMonths>1,prevMonthDayClass=isMultiMonth?"prevMonthDay hidden":"prevMonthDay",nextMonthDayClass=isMultiMonth?"nextMonthDay hidden":"nextMonthDay";var dayNumber=prevMonthDays+1-firstOfMonth,dayIndex=0;for(;dayNumber<=prevMonthDays;dayNumber++,dayIndex++){days.appendChild(createDay(prevMonthDayClass,new Date(year,month-1,dayNumber),dayNumber,dayIndex));}
for(dayNumber=1;dayNumber<=daysInMonth;dayNumber++,dayIndex++){days.appendChild(createDay("",new Date(year,month,dayNumber),dayNumber,dayIndex));}
for(var dayNum=daysInMonth+1;dayNum<=42-firstOfMonth&&(self.config.showMonths===1||dayIndex%7!==0);dayNum++,dayIndex++){days.appendChild(createDay(nextMonthDayClass,new Date(year,month+1,dayNum%daysInMonth),dayNum,dayIndex));}
var dayContainer=createElement("div","dayContainer");dayContainer.appendChild(days);return dayContainer;}
function buildDays(){if(self.daysContainer===undefined){return;}
clearNode(self.daysContainer);if(self.weekNumbers)
clearNode(self.weekNumbers);var frag=document.createDocumentFragment();for(var i=0;i<self.config.showMonths;i++){var d=new Date(self.currentYear,self.currentMonth,1);d.setMonth(self.currentMonth+i);frag.appendChild(buildMonthDays(d.getFullYear(),d.getMonth()));}
self.daysContainer.appendChild(frag);self.days=self.daysContainer.firstChild;if(self.config.mode==="range"&&self.selectedDates.length===1){onMouseOver();}}
function buildMonthSwitch(){if(self.config.showMonths>1||self.config.monthSelectorType!=="dropdown")
return;var shouldBuildMonth=function(month){if(self.config.minDate!==undefined&&self.currentYear===self.config.minDate.getFullYear()&&month<self.config.minDate.getMonth()){return false;}
return!(self.config.maxDate!==undefined&&self.currentYear===self.config.maxDate.getFullYear()&&month>self.config.maxDate.getMonth());};self.monthsDropdownContainer.tabIndex=-1;self.monthsDropdownContainer.innerHTML="";for(var i=0;i<12;i++){if(!shouldBuildMonth(i))
continue;var month=createElement("option","flatpickr-monthDropdown-month");month.value=new Date(self.currentYear,i).getMonth().toString();month.textContent=monthToStr(i,self.config.shorthandCurrentMonth,self.l10n);month.tabIndex=-1;if(self.currentMonth===i){month.selected=true;}
self.monthsDropdownContainer.appendChild(month);}}
function buildMonth(){var container=createElement("div","flatpickr-month");var monthNavFragment=window.document.createDocumentFragment();var monthElement;if(self.config.showMonths>1||self.config.monthSelectorType==="static"){monthElement=createElement("span","cur-month");}
else{self.monthsDropdownContainer=createElement("select","flatpickr-monthDropdown-months");bind(self.monthsDropdownContainer,"change",function(e){var target=e.target;var selectedMonth=parseInt(target.value,10);self.changeMonth(selectedMonth-self.currentMonth);triggerEvent("onMonthChange");});buildMonthSwitch();monthElement=self.monthsDropdownContainer;}
var yearInput=createNumberInput("cur-year",{tabindex:"-1"});var yearElement=yearInput.getElementsByTagName("input")[0];yearElement.setAttribute("aria-label",self.l10n.yearAriaLabel);if(self.config.minDate){yearElement.setAttribute("min",self.config.minDate.getFullYear().toString());}
if(self.config.maxDate){yearElement.setAttribute("max",self.config.maxDate.getFullYear().toString());yearElement.disabled=!!self.config.minDate&&self.config.minDate.getFullYear()===self.config.maxDate.getFullYear();}
var currentMonth=createElement("div","flatpickr-current-month");currentMonth.appendChild(monthElement);currentMonth.appendChild(yearInput);monthNavFragment.appendChild(currentMonth);container.appendChild(monthNavFragment);return{container:container,yearElement:yearElement,monthElement:monthElement};}
function buildMonths(){clearNode(self.monthNav);self.monthNav.appendChild(self.prevMonthNav);if(self.config.showMonths){self.yearElements=[];self.monthElements=[];}
for(var m=self.config.showMonths;m--;){var month=buildMonth();self.yearElements.push(month.yearElement);self.monthElements.push(month.monthElement);self.monthNav.appendChild(month.container);}
self.monthNav.appendChild(self.nextMonthNav);}
function buildMonthNav(){self.monthNav=createElement("div","flatpickr-months");self.yearElements=[];self.monthElements=[];self.prevMonthNav=createElement("span","flatpickr-prev-month");self.prevMonthNav.innerHTML=self.config.prevArrow;self.nextMonthNav=createElement("span","flatpickr-next-month");self.nextMonthNav.innerHTML=self.config.nextArrow;buildMonths();Object.defineProperty(self,"_hidePrevMonthArrow",{get:function(){return self.__hidePrevMonthArrow;},set:function(bool){if(self.__hidePrevMonthArrow!==bool){toggleClass(self.prevMonthNav,"flatpickr-disabled",bool);self.__hidePrevMonthArrow=bool;}}});Object.defineProperty(self,"_hideNextMonthArrow",{get:function(){return self.__hideNextMonthArrow;},set:function(bool){if(self.__hideNextMonthArrow!==bool){toggleClass(self.nextMonthNav,"flatpickr-disabled",bool);self.__hideNextMonthArrow=bool;}}});self.currentYearElement=self.yearElements[0];updateNavigationCurrentMonth();return self.monthNav;}
function buildTime(){self.calendarContainer.classList.add("hasTime");if(self.config.noCalendar)
self.calendarContainer.classList.add("noCalendar");self.timeContainer=createElement("div","flatpickr-time");self.timeContainer.tabIndex=-1;var separator=createElement("span","flatpickr-time-separator",":");var hourInput=createNumberInput("flatpickr-hour",{"aria-label":self.l10n.hourAriaLabel});self.hourElement=hourInput.getElementsByTagName("input")[0];var minuteInput=createNumberInput("flatpickr-minute",{"aria-label":self.l10n.minuteAriaLabel});self.minuteElement=minuteInput.getElementsByTagName("input")[0];self.hourElement.tabIndex=self.minuteElement.tabIndex=-1;self.hourElement.value=pad(self.latestSelectedDateObj?self.latestSelectedDateObj.getHours():self.config.time_24hr?self.config.defaultHour:military2ampm(self.config.defaultHour));self.minuteElement.value=pad(self.latestSelectedDateObj?self.latestSelectedDateObj.getMinutes():self.config.defaultMinute);self.hourElement.setAttribute("step",self.config.hourIncrement.toString());self.minuteElement.setAttribute("step",self.config.minuteIncrement.toString());self.hourElement.setAttribute("min",self.config.time_24hr?"0":"1");self.hourElement.setAttribute("max",self.config.time_24hr?"23":"12");self.minuteElement.setAttribute("min","0");self.minuteElement.setAttribute("max","59");self.timeContainer.appendChild(hourInput);self.timeContainer.appendChild(separator);self.timeContainer.appendChild(minuteInput);if(self.config.time_24hr)
self.timeContainer.classList.add("time24hr");if(self.config.enableSeconds){self.timeContainer.classList.add("hasSeconds");var secondInput=createNumberInput("flatpickr-second");self.secondElement=secondInput.getElementsByTagName("input")[0];self.secondElement.value=pad(self.latestSelectedDateObj?self.latestSelectedDateObj.getSeconds():self.config.defaultSeconds);self.secondElement.setAttribute("step",self.minuteElement.getAttribute("step"));self.secondElement.setAttribute("min","0");self.secondElement.setAttribute("max","59");self.timeContainer.appendChild(createElement("span","flatpickr-time-separator",":"));self.timeContainer.appendChild(secondInput);}
if(!self.config.time_24hr){self.amPM=createElement("span","flatpickr-am-pm",self.l10n.amPM[int((self.latestSelectedDateObj?self.hourElement.value:self.config.defaultHour)>11)]);self.amPM.title=self.l10n.toggleTitle;self.amPM.tabIndex=-1;self.timeContainer.appendChild(self.amPM);}
return self.timeContainer;}
function buildWeekdays(){if(!self.weekdayContainer)
self.weekdayContainer=createElement("div","flatpickr-weekdays");else
clearNode(self.weekdayContainer);for(var i=self.config.showMonths;i--;){var container=createElement("div","flatpickr-weekdaycontainer");self.weekdayContainer.appendChild(container);}
updateWeekdays();return self.weekdayContainer;}
function updateWeekdays(){if(!self.weekdayContainer){return;}
var firstDayOfWeek=self.l10n.firstDayOfWeek;var weekdays=self.l10n.weekdays.shorthand.slice();if(firstDayOfWeek>0&&firstDayOfWeek<weekdays.length){weekdays=weekdays.splice(firstDayOfWeek,weekdays.length).concat(weekdays.splice(0,firstDayOfWeek));}
for(var i=self.config.showMonths;i--;){self.weekdayContainer.children[i].innerHTML="\n <span class='flatpickr-weekday'>\n "+weekdays.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n ";}}
function buildWeeks(){self.calendarContainer.classList.add("hasWeeks");var weekWrapper=createElement("div","flatpickr-weekwrapper");weekWrapper.appendChild(createElement("span","flatpickr-weekday",self.l10n.weekAbbreviation));var weekNumbers=createElement("div","flatpickr-weeks");weekWrapper.appendChild(weekNumbers);return{weekWrapper:weekWrapper,weekNumbers:weekNumbers};}
function changeMonth(value,isOffset){if(isOffset===void 0){isOffset=true;}
var delta=isOffset?value:value-self.currentMonth;if((delta<0&&self._hidePrevMonthArrow===true)||(delta>0&&self._hideNextMonthArrow===true))
return;self.currentMonth+=delta;if(self.currentMonth<0||self.currentMonth>11){self.currentYear+=self.currentMonth>11?1:-1;self.currentMonth=(self.currentMonth+12)%12;triggerEvent("onYearChange");buildMonthSwitch();}
buildDays();triggerEvent("onMonthChange");updateNavigationCurrentMonth();}
function clear(triggerChangeEvent,toInitial){if(triggerChangeEvent===void 0){triggerChangeEvent=true;}
if(toInitial===void 0){toInitial=true;}
self.input.value="";if(self.altInput!==undefined)
self.altInput.value="";if(self.mobileInput!==undefined)
self.mobileInput.value="";self.selectedDates=[];self.latestSelectedDateObj=undefined;if(toInitial===true){self.currentYear=self._initialDate.getFullYear();self.currentMonth=self._initialDate.getMonth();}
self.showTimeInput=false;if(self.config.enableTime===true){setDefaultHours();}
self.redraw();if(triggerChangeEvent)
triggerEvent("onChange");}
function close(){self.isOpen=false;if(!self.isMobile){if(self.calendarContainer!==undefined){self.calendarContainer.classList.remove("open");}
if(self._input!==undefined){self._input.classList.remove("active");}}
triggerEvent("onClose");}
function destroy(){if(self.config!==undefined)
triggerEvent("onDestroy");for(var i=self._handlers.length;i--;){var h=self._handlers[i];h.element.removeEventListener(h.event,h.handler,h.options);}
self._handlers=[];if(self.mobileInput){if(self.mobileInput.parentNode)
self.mobileInput.parentNode.removeChild(self.mobileInput);self.mobileInput=undefined;}
else if(self.calendarContainer&&self.calendarContainer.parentNode){if(self.config.static&&self.calendarContainer.parentNode){var wrapper=self.calendarContainer.parentNode;wrapper.lastChild&&wrapper.removeChild(wrapper.lastChild);if(wrapper.parentNode){while(wrapper.firstChild)
wrapper.parentNode.insertBefore(wrapper.firstChild,wrapper);wrapper.parentNode.removeChild(wrapper);}}
else
self.calendarContainer.parentNode.removeChild(self.calendarContainer);}
if(self.altInput){self.input.type="text";if(self.altInput.parentNode)
self.altInput.parentNode.removeChild(self.altInput);delete self.altInput;}
if(self.input){self.input.type=self.input._type;self.input.classList.remove("flatpickr-input");self.input.removeAttribute("readonly");self.input.value="";}
["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config",].forEach(function(k){try{delete self[k];}
catch(_){}});}
function isCalendarElem(elem){if(self.config.appendTo&&self.config.appendTo.contains(elem))
return true;return self.calendarContainer.contains(elem);}
function documentClick(e){if(self.isOpen&&!self.config.inline){var eventTarget_1=getEventTarget(e);var isCalendarElement=isCalendarElem(eventTarget_1);var isInput=eventTarget_1===self.input||eventTarget_1===self.altInput||self.element.contains(eventTarget_1)||(e.path&&e.path.indexOf&&(~e.path.indexOf(self.input)||~e.path.indexOf(self.altInput)));var lostFocus=e.type==="blur"?isInput&&e.relatedTarget&&!isCalendarElem(e.relatedTarget):!isInput&&!isCalendarElement&&!isCalendarElem(e.relatedTarget);var isIgnored=!self.config.ignoredFocusElements.some(function(elem){return elem.contains(eventTarget_1);});if(lostFocus&&isIgnored){if(self.timeContainer!==undefined&&self.minuteElement!==undefined&&self.hourElement!==undefined){updateTime();}
self.close();if(self.config.mode==="range"&&self.selectedDates.length===1){self.clear(false);self.redraw();}}}}
function changeYear(newYear){if(!newYear||(self.config.minDate&&newYear<self.config.minDate.getFullYear())||(self.config.maxDate&&newYear>self.config.maxDate.getFullYear()))
return;var newYearNum=newYear,isNewYear=self.currentYear!==newYearNum;self.currentYear=newYearNum||self.currentYear;if(self.config.maxDate&&self.currentYear===self.config.maxDate.getFullYear()){self.currentMonth=Math.min(self.config.maxDate.getMonth(),self.currentMonth);}
else if(self.config.minDate&&self.currentYear===self.config.minDate.getFullYear()){self.currentMonth=Math.max(self.config.minDate.getMonth(),self.currentMonth);}
if(isNewYear){self.redraw();triggerEvent("onYearChange");buildMonthSwitch();}}
function isEnabled(date,timeless){if(timeless===void 0){timeless=true;}
var dateToCheck=self.parseDate(date,undefined,timeless);if((self.config.minDate&&dateToCheck&&compareDates(dateToCheck,self.config.minDate,timeless!==undefined?timeless:!self.minDateHasTime)<0)||(self.config.maxDate&&dateToCheck&&compareDates(dateToCheck,self.config.maxDate,timeless!==undefined?timeless:!self.maxDateHasTime)>0))
return false;if(self.config.enable.length===0&&self.config.disable.length===0)
return true;if(dateToCheck===undefined)
return false;var bool=self.config.enable.length>0,array=bool?self.config.enable:self.config.disable;for(var i=0,d=void 0;i<array.length;i++){d=array[i];if(typeof d==="function"&&d(dateToCheck))
return bool;else if(d instanceof Date&&dateToCheck!==undefined&&d.getTime()===dateToCheck.getTime())
return bool;else if(typeof d==="string"&&dateToCheck!==undefined){var parsed=self.parseDate(d,undefined,true);return parsed&&parsed.getTime()===dateToCheck.getTime()?bool:!bool;}
else if(typeof d==="object"&&dateToCheck!==undefined&&d.from&&d.to&&dateToCheck.getTime()>=d.from.getTime()&&dateToCheck.getTime()<=d.to.getTime())
return bool;}
return!bool;}
function isInView(elem){if(self.daysContainer!==undefined)
return(elem.className.indexOf("hidden")===-1&&self.daysContainer.contains(elem));return false;}
function onKeyDown(e){var isInput=e.target===self._input;var allowInput=self.config.allowInput;var allowKeydown=self.isOpen&&(!allowInput||!isInput);var allowInlineKeydown=self.config.inline&&isInput&&!allowInput;if(e.keyCode===13&&isInput){if(allowInput){self.setDate(self._input.value,true,e.target===self.altInput?self.config.altFormat:self.config.dateFormat);return e.target.blur();}
else{self.open();}}
else if(isCalendarElem(e.target)||allowKeydown||allowInlineKeydown){var isTimeObj=!!self.timeContainer&&self.timeContainer.contains(e.target);switch(e.keyCode){case 13:if(isTimeObj){e.preventDefault();updateTime();focusAndClose();}
else
selectDate(e);break;case 27:e.preventDefault();focusAndClose();break;case 8:case 46:if(isInput&&!self.config.allowInput){e.preventDefault();self.clear();}
break;case 37:case 39:if(!isTimeObj&&!isInput){e.preventDefault();if(self.daysContainer!==undefined&&(allowInput===false||(document.activeElement&&isInView(document.activeElement)))){var delta_1=e.keyCode===39?1:-1;if(!e.ctrlKey)
focusOnDay(undefined,delta_1);else{e.stopPropagation();changeMonth(delta_1);focusOnDay(getFirstAvailableDay(1),0);}}}
else if(self.hourElement)
self.hourElement.focus();break;case 38:case 40:e.preventDefault();var delta=e.keyCode===40?1:-1;if((self.daysContainer&&e.target.$i!==undefined)||e.target===self.input||e.target===self.altInput){if(e.ctrlKey){e.stopPropagation();changeYear(self.currentYear-delta);focusOnDay(getFirstAvailableDay(1),0);}
else if(!isTimeObj)
focusOnDay(undefined,delta*7);}
else if(e.target===self.currentYearElement){changeYear(self.currentYear-delta);}
else if(self.config.enableTime){if(!isTimeObj&&self.hourElement)
self.hourElement.focus();updateTime(e);self._debouncedChange();}
break;case 9:if(isTimeObj){var elems=[self.hourElement,self.minuteElement,self.secondElement,self.amPM,].concat(self.pluginElements).filter(function(x){return x;});var i=elems.indexOf(e.target);if(i!==-1){var target=elems[i+(e.shiftKey?-1:1)];e.preventDefault();(target||self._input).focus();}}
else if(!self.config.noCalendar&&self.daysContainer&&self.daysContainer.contains(e.target)&&e.shiftKey){e.preventDefault();self._input.focus();}
break;default:break;}}
if(self.amPM!==undefined&&e.target===self.amPM){switch(e.key){case self.l10n.amPM[0].charAt(0):case self.l10n.amPM[0].charAt(0).toLowerCase():self.amPM.textContent=self.l10n.amPM[0];setHoursFromInputs();updateValue();break;case self.l10n.amPM[1].charAt(0):case self.l10n.amPM[1].charAt(0).toLowerCase():self.amPM.textContent=self.l10n.amPM[1];setHoursFromInputs();updateValue();break;}}
if(isInput||isCalendarElem(e.target)){triggerEvent("onKeyDown",e);}}
function onMouseOver(elem){if(self.selectedDates.length!==1||(elem&&(!elem.classList.contains("flatpickr-day")||elem.classList.contains("flatpickr-disabled"))))
return;var hoverDate=elem?elem.dateObj.getTime():self.days.firstElementChild.dateObj.getTime(),initialDate=self.parseDate(self.selectedDates[0],undefined,true).getTime(),rangeStartDate=Math.min(hoverDate,self.selectedDates[0].getTime()),rangeEndDate=Math.max(hoverDate,self.selectedDates[0].getTime());var containsDisabled=false;var minRange=0,maxRange=0;for(var t=rangeStartDate;t<rangeEndDate;t+=duration.DAY){if(!isEnabled(new Date(t),true)){containsDisabled=containsDisabled||(t>rangeStartDate&&t<rangeEndDate);if(t<initialDate&&(!minRange||t>minRange))
minRange=t;else if(t>initialDate&&(!maxRange||t<maxRange))
maxRange=t;}}
for(var m=0;m<self.config.showMonths;m++){var month=self.daysContainer.children[m];var _loop_1=function(i,l){var dayElem=month.children[i],date=dayElem.dateObj;var timestamp=date.getTime();var outOfRange=(minRange>0&×tamp<minRange)||(maxRange>0&×tamp>maxRange);if(outOfRange){dayElem.classList.add("notAllowed");["inRange","startRange","endRange"].forEach(function(c){dayElem.classList.remove(c);});return "continue";}
else if(containsDisabled&&!outOfRange)
return "continue";["startRange","inRange","endRange","notAllowed"].forEach(function(c){dayElem.classList.remove(c);});if(elem!==undefined){elem.classList.add(hoverDate<=self.selectedDates[0].getTime()?"startRange":"endRange");if(initialDate<hoverDate&×tamp===initialDate)
dayElem.classList.add("startRange");else if(initialDate>hoverDate&×tamp===initialDate)
dayElem.classList.add("endRange");if(timestamp>=minRange&&(maxRange===0||timestamp<=maxRange)&&isBetween(timestamp,initialDate,hoverDate))
dayElem.classList.add("inRange");}};for(var i=0,l=month.children.length;i<l;i++){_loop_1(i,l);}}}
function onResize(){if(self.isOpen&&!self.config.static&&!self.config.inline)
positionCalendar();}
function setDefaultTime(){self.setDate(self.config.minDate!==undefined?new Date(self.config.minDate.getTime()):new Date(),true);setDefaultHours();updateValue();}
function open(e,positionElement){if(positionElement===void 0){positionElement=self._positionElement;}
if(self.isMobile===true){if(e){e.preventDefault();e.target&&e.target.blur();}
if(self.mobileInput!==undefined){self.mobileInput.focus();self.mobileInput.click();}
triggerEvent("onOpen");return;}
if(self._input.disabled||self.config.inline)
return;var wasOpen=self.isOpen;self.isOpen=true;if(!wasOpen){self.calendarContainer.classList.add("open");self._input.classList.add("active");triggerEvent("onOpen");positionCalendar(positionElement);}
if(self.config.enableTime===true&&self.config.noCalendar===true){if(self.selectedDates.length===0){setDefaultTime();}
if(self.config.allowInput===false&&(e===undefined||!self.timeContainer.contains(e.relatedTarget))){setTimeout(function(){return self.hourElement.select();},50);}}}
function minMaxDateSetter(type){return function(date){var dateObj=(self.config["_"+type+"Date"]=self.parseDate(date,self.config.dateFormat));var inverseDateObj=self.config["_"+(type==="min"?"max":"min")+"Date"];if(dateObj!==undefined){self[type==="min"?"minDateHasTime":"maxDateHasTime"]=dateObj.getHours()>0||dateObj.getMinutes()>0||dateObj.getSeconds()>0;}
if(self.selectedDates){self.selectedDates=self.selectedDates.filter(function(d){return isEnabled(d);});if(!self.selectedDates.length&&type==="min")
setHoursFromDate(dateObj);updateValue();}
if(self.daysContainer){redraw();if(dateObj!==undefined)
self.currentYearElement[type]=dateObj.getFullYear().toString();else
self.currentYearElement.removeAttribute(type);self.currentYearElement.disabled=!!inverseDateObj&&dateObj!==undefined&&inverseDateObj.getFullYear()===dateObj.getFullYear();}};}
function parseConfig(){var boolOpts=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile",];var userConfig=__assign({},instanceConfig,JSON.parse(JSON.stringify(element.dataset||{})));var formats={};self.config.parseDate=userConfig.parseDate;self.config.formatDate=userConfig.formatDate;Object.defineProperty(self.config,"enable",{get:function(){return self.config._enable;},set:function(dates){self.config._enable=parseDateRules(dates);}});Object.defineProperty(self.config,"disable",{get:function(){return self.config._disable;},set:function(dates){self.config._disable=parseDateRules(dates);}});var timeMode=userConfig.mode==="time";if(!userConfig.dateFormat&&(userConfig.enableTime||timeMode)){var defaultDateFormat=flatpickr.defaultConfig.dateFormat||defaults.dateFormat;formats.dateFormat=userConfig.noCalendar||timeMode?"H:i"+(userConfig.enableSeconds?":S":""):defaultDateFormat+" H:i"+(userConfig.enableSeconds?":S":"");}
if(userConfig.altInput&&(userConfig.enableTime||timeMode)&&!userConfig.altFormat){var defaultAltFormat=flatpickr.defaultConfig.altFormat||defaults.altFormat;formats.altFormat=userConfig.noCalendar||timeMode?"h:i"+(userConfig.enableSeconds?":S K":" K"):defaultAltFormat+(" h:i"+(userConfig.enableSeconds?":S":"")+" K");}
if(!userConfig.altInputClass){self.config.altInputClass=self.input.className+" "+self.config.altInputClass;}
Object.defineProperty(self.config,"minDate",{get:function(){return self.config._minDate;},set:minMaxDateSetter("min")});Object.defineProperty(self.config,"maxDate",{get:function(){return self.config._maxDate;},set:minMaxDateSetter("max")});var minMaxTimeSetter=function(type){return function(val){self.config[type==="min"?"_minTime":"_maxTime"]=self.parseDate(val,"H:i:S");};};Object.defineProperty(self.config,"minTime",{get:function(){return self.config._minTime;},set:minMaxTimeSetter("min")});Object.defineProperty(self.config,"maxTime",{get:function(){return self.config._maxTime;},set:minMaxTimeSetter("max")});if(userConfig.mode==="time"){self.config.noCalendar=true;self.config.enableTime=true;}
Object.assign(self.config,formats,userConfig);for(var i=0;i<boolOpts.length;i++)
self.config[boolOpts[i]]=self.config[boolOpts[i]]===true||self.config[boolOpts[i]]==="true";HOOKS.filter(function(hook){return self.config[hook]!==undefined;}).forEach(function(hook){self.config[hook]=arrayify(self.config[hook]||[]).map(bindToInstance);});self.isMobile=!self.config.disableMobile&&!self.config.inline&&self.config.mode==="single"&&!self.config.disable.length&&!self.config.enable.length&&!self.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var i=0;i<self.config.plugins.length;i++){var pluginConf=self.config.plugins[i](self)||{};for(var key in pluginConf){if(HOOKS.indexOf(key)>-1){self.config[key]=arrayify(pluginConf[key]).map(bindToInstance).concat(self.config[key]);}
else if(typeof userConfig[key]==="undefined")
self.config[key]=pluginConf[key];}}
triggerEvent("onParseConfig");}
function setupLocale(){if(typeof self.config.locale!=="object"&&typeof flatpickr.l10ns[self.config.locale]==="undefined")
self.config.errorHandler(new Error("flatpickr: invalid locale "+self.config.locale));self.l10n=__assign({},flatpickr.l10ns["default"],(typeof self.config.locale==="object"?self.config.locale:self.config.locale!=="default"?flatpickr.l10ns[self.config.locale]:undefined));tokenRegex.K="("+self.l10n.amPM[0]+"|"+self.l10n.amPM[1]+"|"+self.l10n.amPM[0].toLowerCase()+"|"+self.l10n.amPM[1].toLowerCase()+")";var userConfig=__assign({},instanceConfig,JSON.parse(JSON.stringify(element.dataset||{})));if(userConfig.time_24hr===undefined&&flatpickr.defaultConfig.time_24hr===undefined){self.config.time_24hr=self.l10n.time_24hr;}
self.formatDate=createDateFormatter(self);self.parseDate=createDateParser({config:self.config,l10n:self.l10n});}
function positionCalendar(customPositionElement){if(self.calendarContainer===undefined)
return;triggerEvent("onPreCalendarPosition");var positionElement=customPositionElement||self._positionElement;var calendarHeight=Array.prototype.reduce.call(self.calendarContainer.children,(function(acc,child){return acc+child.offsetHeight;}),0),calendarWidth=self.calendarContainer.offsetWidth,configPos=self.config.position.split(" "),configPosVertical=configPos[0],configPosHorizontal=configPos.length>1?configPos[1]:null,inputBounds=positionElement.getBoundingClientRect(),distanceFromBottom=window.innerHeight-inputBounds.bottom,showOnTop=configPosVertical==="above"||(configPosVertical!=="below"&&distanceFromBottom<calendarHeight&&inputBounds.top>calendarHeight);var top=window.pageYOffset+
inputBounds.top+
(!showOnTop?positionElement.offsetHeight+2:-calendarHeight-2);toggleClass(self.calendarContainer,"arrowTop",!showOnTop);toggleClass(self.calendarContainer,"arrowBottom",showOnTop);if(self.config.inline)
return;var left=window.pageXOffset+
inputBounds.left-
(configPosHorizontal!=null&&configPosHorizontal==="center"?(calendarWidth-inputBounds.width)/2:0);var right=window.document.body.offsetWidth-(window.pageXOffset+inputBounds.right);var rightMost=left+calendarWidth>window.document.body.offsetWidth;var centerMost=right+calendarWidth>window.document.body.offsetWidth;toggleClass(self.calendarContainer,"rightMost",rightMost);if(self.config.static)
return;self.calendarContainer.style.top=top+"px";if(!rightMost){self.calendarContainer.style.left=left+"px";self.calendarContainer.style.right="auto";}
else if(!centerMost){self.calendarContainer.style.left="auto";self.calendarContainer.style.right=right+"px";}
else{var doc=document.styleSheets[0];if(doc===undefined)
return;var bodyWidth=window.document.body.offsetWidth;var centerLeft=Math.max(0,bodyWidth/2-calendarWidth/2);var centerBefore=".flatpickr-calendar.centerMost:before";var centerAfter=".flatpickr-calendar.centerMost:after";var centerIndex=doc.cssRules.length;var centerStyle="{left:"+inputBounds.left+"px;right:auto;}";toggleClass(self.calendarContainer,"rightMost",false);toggleClass(self.calendarContainer,"centerMost",true);doc.insertRule(centerBefore+","+centerAfter+centerStyle,centerIndex);self.calendarContainer.style.left=centerLeft+"px";self.calendarContainer.style.right="auto";}}
function redraw(){if(self.config.noCalendar||self.isMobile)
return;updateNavigationCurrentMonth();buildDays();}
function focusAndClose(){self._input.focus();if(window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==undefined){setTimeout(self.close,0);}
else{self.close();}}
function selectDate(e){e.preventDefault();e.stopPropagation();var isSelectable=function(day){return day.classList&&day.classList.contains("flatpickr-day")&&!day.classList.contains("flatpickr-disabled")&&!day.classList.contains("notAllowed");};var t=findParent(e.target,isSelectable);if(t===undefined)
return;var target=t;var selectedDate=(self.latestSelectedDateObj=new Date(target.dateObj.getTime()));var shouldChangeMonth=(selectedDate.getMonth()<self.currentMonth||selectedDate.getMonth()>self.currentMonth+self.config.showMonths-1)&&self.config.mode!=="range";self.selectedDateElem=target;if(self.config.mode==="single")
self.selectedDates=[selectedDate];else if(self.config.mode==="multiple"){var selectedIndex=isDateSelected(selectedDate);if(selectedIndex)
self.selectedDates.splice(parseInt(selectedIndex),1);else
self.selectedDates.push(selectedDate);}
else if(self.config.mode==="range"){if(self.selectedDates.length===2){self.clear(false,false);}
self.latestSelectedDateObj=selectedDate;self.selectedDates.push(selectedDate);if(compareDates(selectedDate,self.selectedDates[0],true)!==0)
self.selectedDates.sort(function(a,b){return a.getTime()-b.getTime();});}
setHoursFromInputs();if(shouldChangeMonth){var isNewYear=self.currentYear!==selectedDate.getFullYear();self.currentYear=selectedDate.getFullYear();self.currentMonth=selectedDate.getMonth();if(isNewYear){triggerEvent("onYearChange");buildMonthSwitch();}
triggerEvent("onMonthChange");}
updateNavigationCurrentMonth();buildDays();updateValue();if(self.config.enableTime)
setTimeout(function(){return(self.showTimeInput=true);},50);if(!shouldChangeMonth&&self.config.mode!=="range"&&self.config.showMonths===1)
focusOnDayElem(target);else if(self.selectedDateElem!==undefined&&self.hourElement===undefined){self.selectedDateElem&&self.selectedDateElem.focus();}
if(self.hourElement!==undefined)
self.hourElement!==undefined&&self.hourElement.focus();if(self.config.closeOnSelect){var single=self.config.mode==="single"&&!self.config.enableTime;var range=self.config.mode==="range"&&self.selectedDates.length===2&&!self.config.enableTime;if(single||range){focusAndClose();}}
triggerChange();}
var CALLBACKS={locale:[setupLocale,updateWeekdays],showMonths:[buildMonths,setCalendarWidth,buildWeekdays],minDate:[jumpToDate],maxDate:[jumpToDate]};function set(option,value){if(option!==null&&typeof option==="object"){Object.assign(self.config,option);for(var key in option){if(CALLBACKS[key]!==undefined)
CALLBACKS[key].forEach(function(x){return x();});}}
else{self.config[option]=value;if(CALLBACKS[option]!==undefined)
CALLBACKS[option].forEach(function(x){return x();});else if(HOOKS.indexOf(option)>-1)
self.config[option]=arrayify(value);}
self.redraw();updateValue(false);}
function setSelectedDate(inputDate,format){var dates=[];if(inputDate instanceof Array)
dates=inputDate.map(function(d){return self.parseDate(d,format);});else if(inputDate instanceof Date||typeof inputDate==="number")
dates=[self.parseDate(inputDate,format)];else if(typeof inputDate==="string"){switch(self.config.mode){case "single":case "time":dates=[self.parseDate(inputDate,format)];break;case "multiple":dates=inputDate.split(self.config.conjunction).map(function(date){return self.parseDate(date,format);});break;case "range":dates=inputDate.split(self.l10n.rangeSeparator).map(function(date){return self.parseDate(date,format);});break;default:break;}}
else
self.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(inputDate)));self.selectedDates=dates.filter(function(d){return d instanceof Date&&isEnabled(d,false);});if(self.config.mode==="range")
self.selectedDates.sort(function(a,b){return a.getTime()-b.getTime();});}
function setDate(date,triggerChange,format){if(triggerChange===void 0){triggerChange=false;}
if(format===void 0){format=self.config.dateFormat;}
if((date!==0&&!date)||(date instanceof Array&&date.length===0))
return self.clear(triggerChange);setSelectedDate(date,format);self.showTimeInput=self.selectedDates.length>0;self.latestSelectedDateObj=self.selectedDates[self.selectedDates.length-1];self.redraw();jumpToDate();setHoursFromDate();if(self.selectedDates.length===0){self.clear(false);}
updateValue(triggerChange);if(triggerChange)
triggerEvent("onChange");}
function parseDateRules(arr){return arr.slice().map(function(rule){if(typeof rule==="string"||typeof rule==="number"||rule instanceof Date){return self.parseDate(rule,undefined,true);}
else if(rule&&typeof rule==="object"&&rule.from&&rule.to)
return{from:self.parseDate(rule.from,undefined),to:self.parseDate(rule.to,undefined)};return rule;}).filter(function(x){return x;});}
function setupDates(){self.selectedDates=[];self.now=self.parseDate(self.config.now)||new Date();var preloadedDate=self.config.defaultDate||((self.input.nodeName==="INPUT"||self.input.nodeName==="TEXTAREA")&&self.input.placeholder&&self.input.value===self.input.placeholder?null:self.input.value);if(preloadedDate)
setSelectedDate(preloadedDate,self.config.dateFormat);self._initialDate=self.selectedDates.length>0?self.selectedDates[0]:self.config.minDate&&self.config.minDate.getTime()>self.now.getTime()?self.config.minDate:self.config.maxDate&&self.config.maxDate.getTime()<self.now.getTime()?self.config.maxDate:self.now;self.currentYear=self._initialDate.getFullYear();self.currentMonth=self._initialDate.getMonth();if(self.selectedDates.length>0)
self.latestSelectedDateObj=self.selectedDates[0];if(self.config.minTime!==undefined)
self.config.minTime=self.parseDate(self.config.minTime,"H:i");if(self.config.maxTime!==undefined)
self.config.maxTime=self.parseDate(self.config.maxTime,"H:i");self.minDateHasTime=!!self.config.minDate&&(self.config.minDate.getHours()>0||self.config.minDate.getMinutes()>0||self.config.minDate.getSeconds()>0);self.maxDateHasTime=!!self.config.maxDate&&(self.config.maxDate.getHours()>0||self.config.maxDate.getMinutes()>0||self.config.maxDate.getSeconds()>0);Object.defineProperty(self,"showTimeInput",{get:function(){return self._showTimeInput;},set:function(bool){self._showTimeInput=bool;if(self.calendarContainer)
toggleClass(self.calendarContainer,"showTimeInput",bool);self.isOpen&&positionCalendar();}});}
function setupInputs(){self.input=self.config.wrap?element.querySelector("[data-input]"):element;if(!self.input){self.config.errorHandler(new Error("Invalid input element specified"));return;}
self.input._type=self.input.type;self.input.type="text";self.input.classList.add("flatpickr-input");self._input=self.input;if(self.config.altInput){self.altInput=createElement(self.input.nodeName,self.config.altInputClass);self._input=self.altInput;self.altInput.placeholder=self.input.placeholder;self.altInput.disabled=self.input.disabled;self.altInput.required=self.input.required;self.altInput.tabIndex=self.input.tabIndex;self.altInput.type="text";self.input.setAttribute("type","hidden");if(!self.config.static&&self.input.parentNode)
self.input.parentNode.insertBefore(self.altInput,self.input.nextSibling);}
if(!self.config.allowInput)
self._input.setAttribute("readonly","readonly");self._positionElement=self.config.positionElement||self._input;}
function setupMobile(){var inputType=self.config.enableTime?self.config.noCalendar?"time":"datetime-local":"date";self.mobileInput=createElement("input",self.input.className+" flatpickr-mobile");self.mobileInput.step=self.input.getAttribute("step")||"any";self.mobileInput.tabIndex=1;self.mobileInput.type=inputType;self.mobileInput.disabled=self.input.disabled;self.mobileInput.required=self.input.required;self.mobileInput.placeholder=self.input.placeholder;self.mobileFormatStr=inputType==="datetime-local"?"Y-m-d\\TH:i:S":inputType==="date"?"Y-m-d":"H:i:S";if(self.selectedDates.length>0){self.mobileInput.defaultValue=self.mobileInput.value=self.formatDate(self.selectedDates[0],self.mobileFormatStr);}
if(self.config.minDate)
self.mobileInput.min=self.formatDate(self.config.minDate,"Y-m-d");if(self.config.maxDate)
self.mobileInput.max=self.formatDate(self.config.maxDate,"Y-m-d");self.input.type="hidden";if(self.altInput!==undefined)
self.altInput.type="hidden";try{if(self.input.parentNode)
self.input.parentNode.insertBefore(self.mobileInput,self.input.nextSibling);}
catch(_a){}
bind(self.mobileInput,"change",function(e){self.setDate(e.target.value,false,self.mobileFormatStr);triggerEvent("onChange");triggerEvent("onClose");});}
function toggle(e){if(self.isOpen===true)
return self.close();self.open(e);}
function triggerEvent(event,data){if(self.config===undefined)
return;var hooks=self.config[event];if(hooks!==undefined&&hooks.length>0){for(var i=0;hooks[i]&&i<hooks.length;i++)
hooks[i](self.selectedDates,self.input.value,self,data);}
if(event==="onChange"){self.input.dispatchEvent(createEvent("change"));self.input.dispatchEvent(createEvent("input"));}}
function createEvent(name){var e=document.createEvent("Event");e.initEvent(name,true,true);return e;}
function isDateSelected(date){for(var i=0;i<self.selectedDates.length;i++){if(compareDates(self.selectedDates[i],date)===0)
return ""+i;}
return false;}
function isDateInRange(date){if(self.config.mode!=="range"||self.selectedDates.length<2)
return false;return(compareDates(date,self.selectedDates[0])>=0&&compareDates(date,self.selectedDates[1])<=0);}
function updateNavigationCurrentMonth(){if(self.config.noCalendar||self.isMobile||!self.monthNav)
return;self.yearElements.forEach(function(yearElement,i){var d=new Date(self.currentYear,self.currentMonth,1);d.setMonth(self.currentMonth+i);if(self.config.showMonths>1||self.config.monthSelectorType==="static"){self.monthElements[i].textContent=monthToStr(d.getMonth(),self.config.shorthandCurrentMonth,self.l10n)+" ";}
else{self.monthsDropdownContainer.value=d.getMonth().toString();}
yearElement.value=d.getFullYear().toString();});self._hidePrevMonthArrow=self.config.minDate!==undefined&&(self.currentYear===self.config.minDate.getFullYear()?self.currentMonth<=self.config.minDate.getMonth():self.currentYear<self.config.minDate.getFullYear());self._hideNextMonthArrow=self.config.maxDate!==undefined&&(self.currentYear===self.config.maxDate.getFullYear()?self.currentMonth+1>self.config.maxDate.getMonth():self.currentYear>self.config.maxDate.getFullYear());}
function getDateStr(format){return self.selectedDates.map(function(dObj){return self.formatDate(dObj,format);}).filter(function(d,i,arr){return self.config.mode!=="range"||self.config.enableTime||arr.indexOf(d)===i;}).join(self.config.mode!=="range"?self.config.conjunction:self.l10n.rangeSeparator);}
function updateValue(triggerChange){if(triggerChange===void 0){triggerChange=true;}
if(self.mobileInput!==undefined&&self.mobileFormatStr){self.mobileInput.value=self.latestSelectedDateObj!==undefined?self.formatDate(self.latestSelectedDateObj,self.mobileFormatStr):"";}
self.input.value=getDateStr(self.config.dateFormat);if(self.altInput!==undefined){self.altInput.value=getDateStr(self.config.altFormat);}
if(triggerChange!==false)
triggerEvent("onValueUpdate");}
function onMonthNavClick(e){var isPrevMonth=self.prevMonthNav.contains(e.target);var isNextMonth=self.nextMonthNav.contains(e.target);if(isPrevMonth||isNextMonth){changeMonth(isPrevMonth?-1:1);}
else if(self.yearElements.indexOf(e.target)>=0){e.target.select();}
else if(e.target.classList.contains("arrowUp")){self.changeYear(self.currentYear+1);}
else if(e.target.classList.contains("arrowDown")){self.changeYear(self.currentYear-1);}}
function timeWrapper(e){e.preventDefault();var isKeyDown=e.type==="keydown",input=e.target;if(self.amPM!==undefined&&e.target===self.amPM){self.amPM.textContent=self.l10n.amPM[int(self.amPM.textContent===self.l10n.amPM[0])];}
var min=parseFloat(input.getAttribute("min")),max=parseFloat(input.getAttribute("max")),step=parseFloat(input.getAttribute("step")),curValue=parseInt(input.value,10),delta=e.delta||(isKeyDown?(e.which===38?1:-1):0);var newValue=curValue+step*delta;if(typeof input.value!=="undefined"&&input.value.length===2){var isHourElem=input===self.hourElement,isMinuteElem=input===self.minuteElement;if(newValue<min){newValue=max+
newValue+
int(!isHourElem)+
(int(isHourElem)&&int(!self.amPM));if(isMinuteElem)
incrementNumInput(undefined,-1,self.hourElement);}
else if(newValue>max){newValue=input===self.hourElement?newValue-max-int(!self.amPM):min;if(isMinuteElem)
incrementNumInput(undefined,1,self.hourElement);}
if(self.amPM&&isHourElem&&(step===1?newValue+curValue===23:Math.abs(newValue-curValue)>step)){self.amPM.textContent=self.l10n.amPM[int(self.amPM.textContent===self.l10n.amPM[0])];}
input.value=pad(newValue);}}
init();return self;}
function _flatpickr(nodeList,config){var nodes=Array.prototype.slice.call(nodeList).filter(function(x){return x instanceof HTMLElement;});var instances=[];for(var i=0;i<nodes.length;i++){var node=nodes[i];try{if(node.getAttribute("data-fp-omit")!==null)
continue;if(node._flatpickr!==undefined){node._flatpickr.destroy();node._flatpickr=undefined;}
node._flatpickr=FlatpickrInstance(node,config||{});instances.push(node._flatpickr);}
catch(e){console.error(e);}}
return instances.length===1?instances[0]:instances;}
if(typeof HTMLElement!=="undefined"&&typeof HTMLCollection!=="undefined"&&typeof NodeList!=="undefined"){HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(config){return _flatpickr(this,config);};HTMLElement.prototype.flatpickr=function(config){return _flatpickr([this],config);};}
var flatpickr=function(selector,config){if(typeof selector==="string"){return _flatpickr(window.document.querySelectorAll(selector),config);}
else if(selector instanceof Node){return _flatpickr([selector],config);}
else{return _flatpickr(selector,config);}};flatpickr.defaultConfig={};flatpickr.l10ns={en:__assign({},english),"default":__assign({},english)};flatpickr.localize=function(l10n){flatpickr.l10ns["default"]=__assign({},flatpickr.l10ns["default"],l10n);};flatpickr.setDefaults=function(config){flatpickr.defaultConfig=__assign({},flatpickr.defaultConfig,config);};flatpickr.parseDate=createDateParser({});flatpickr.formatDate=createDateFormatter({});flatpickr.compareDates=compareDates;if(typeof jQuery!=="undefined"&&typeof jQuery.fn!=="undefined"){jQuery.fn.flatpickr=function(config){return _flatpickr(this,config);};}
Date.prototype.fp_incr=function(days){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof days==="string"?parseInt(days,10):days));};if(typeof window!=="undefined"){window.flatpickr=flatpickr;}
return flatpickr;}));}),3673:(function(module,exports,__webpack_require__){!function(e,t){true?module.exports=t(__webpack_require__(378),__webpack_require__(352),__webpack_require__(3674),__webpack_require__(3675)):undefined}(this,function(e,t,n,r){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),p=r(f),l=n(2),d=r(l),v=n(3),h=r(v),_=n(4),g=r(_),m=function(e){function t(){var e,n,r,u;o(this,t);for(var s=arguments.length,c=Array(s),f=0;f<s;f++)c[f]=arguments[f];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r._sigPad=null,r._excludeOurProps=function(){var e=r.props,t=(e.canvasProps,e.clearOnResize,a(e,["canvasProps","clearOnResize"]));return t},r.getCanvas=function(){return r._canvas},r.getTrimmedCanvas=function(){var e=document.createElement("canvas");return e.width=r._canvas.width,e.height=r._canvas.height,e.getContext("2d").drawImage(r._canvas,0,0),(0,g.default)(e)},r.getSignaturePad=function(){return r._sigPad},r._checkClearOnResize=function(){r.props.clearOnResize&&r._resizeCanvas()},r._resizeCanvas=function(){var e=r.props.canvasProps||{},t=e.width,n=e.height;if(!t||!n){var a=r._canvas,o=Math.max(window.devicePixelRatio||1,1);t||(a.width=a.offsetWidth*o),n||(a.height=a.offsetHeight*o),a.getContext("2d").scale(o,o),r.clear()}},r.on=function(){return window.addEventListener("resize",r._checkClearOnResize),r._sigPad.on()},r.off=function(){return window.removeEventListener("resize",r._checkClearOnResize),r._sigPad.off()},r.clear=function(){return r._sigPad.clear()},r.isEmpty=function(){return r._sigPad.isEmpty()},r.fromDataURL=function(e,t){return r._sigPad.fromDataURL(e,t)},r.toDataURL=function(e,t){return r._sigPad.toDataURL(e,t)},r.fromData=function(e){return r._sigPad.fromData(e)},r.toData=function(){return r._sigPad.toData()},u=n,i(r,u)}return u(t,e),c(t,[{key:"componentDidMount",value:function(){this._sigPad=new h.default(this._canvas,this._excludeOurProps()),this._resizeCanvas(),this.on()}},{key:"componentWillUnmount",value:function(){this.off()}},{key:"componentDidUpdate",value:function(){Object.assign(this._sigPad,this._excludeOurProps())}},{key:"render",value:function(){var e=this,t=this.props.canvasProps;return d.default.createElement("canvas",s({ref:function(t){e._canvas=t}},t))}}]),t}(l.Component);m.propTypes={velocityFilterWeight:p.default.number,minWidth:p.default.number,maxWidth:p.default.number,minDistance:p.default.number,dotSize:p.default.oneOfType([p.default.number,p.default.func]),penColor:p.default.string,throttle:p.default.number,onEnd:p.default.func,onBegin:p.default.func,canvasProps:p.default.object,clearOnResize:p.default.bool},m.defaultProps={clearOnResize:!0},t.default=m},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r}])});}),3674:(function(__webpack_module__,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);/*!
* Signature Pad v2.3.2
* https://github.com/szimek/signature_pad
*
* Copyright 2017 Szymon Nowak
* Released under the MIT license
*
* The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:
* http://corner.squareup.com/2012/07/smoother-signatures.html
*
* Implementation of interpolation using cubic Bézier curves is taken from:
* http://benknowscode.wordpress.com/2012/09/14/path-interpolation-using-cubic-bezier-and-control-point-estimation-in-javascript
*
* Algorithm for approximated length of a Bézier curve is taken from:
* http://www.lemoda.net/maths/bezier-length/index.html
*
*/function Point(x,y,time){this.x=x;this.y=y;this.time=time||new Date().getTime();}
Point.prototype.velocityFrom=function(start){return this.time!==start.time?this.distanceTo(start)/(this.time-start.time):1;};Point.prototype.distanceTo=function(start){return Math.sqrt(Math.pow(this.x-start.x,2)+Math.pow(this.y-start.y,2));};Point.prototype.equals=function(other){return this.x===other.x&&this.y===other.y&&this.time===other.time;};function Bezier(startPoint,control1,control2,endPoint){this.startPoint=startPoint;this.control1=control1;this.control2=control2;this.endPoint=endPoint;}
Bezier.prototype.length=function(){var steps=10;var length=0;var px=void 0;var py=void 0;for(var i=0;i<=steps;i+=1){var t=i/steps;var cx=this._point(t,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x);var cy=this._point(t,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){var xdiff=cx-px;var ydiff=cy-py;length+=Math.sqrt(xdiff*xdiff+ydiff*ydiff);}
px=cx;py=cy;}
return length;};Bezier.prototype._point=function(t,start,c1,c2,end){return start*(1.0-t)*(1.0-t)*(1.0-t)+3.0*c1*(1.0-t)*(1.0-t)*t+3.0*c2*(1.0-t)*t*t+end*t*t*t;};function throttle(func,wait,options){var context,args,result;var timeout=null;var previous=0;if(!options)options={};var later=function later(){previous=options.leading===false?0:Date.now();timeout=null;result=func.apply(context,args);if(!timeout)context=args=null;};return function(){var now=Date.now();if(!previous&&options.leading===false)previous=now;var remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0||remaining>wait){if(timeout){clearTimeout(timeout);timeout=null;}
previous=now;result=func.apply(context,args);if(!timeout)context=args=null;}else if(!timeout&&options.trailing!==false){timeout=setTimeout(later,remaining);}
return result;};}
function SignaturePad(canvas,options){var self=this;var opts=options||{};this.velocityFilterWeight=opts.velocityFilterWeight||0.7;this.minWidth=opts.minWidth||0.5;this.maxWidth=opts.maxWidth||2.5;this.throttle='throttle'in opts?opts.throttle:16;this.minDistance='minDistance'in opts?opts.minDistance:5;if(this.throttle){this._strokeMoveUpdate=throttle(SignaturePad.prototype._strokeUpdate,this.throttle);}else{this._strokeMoveUpdate=SignaturePad.prototype._strokeUpdate;}
this.dotSize=opts.dotSize||function(){return(this.minWidth+this.maxWidth)/2;};this.penColor=opts.penColor||'black';this.backgroundColor=opts.backgroundColor||'rgba(0,0,0,0)';this.onBegin=opts.onBegin;this.onEnd=opts.onEnd;this._canvas=canvas;this._ctx=canvas.getContext('2d');this.clear();this._handleMouseDown=function(event){if(event.which===1){self._mouseButtonDown=true;self._strokeBegin(event);}};this._handleMouseMove=function(event){if(self._mouseButtonDown){self._strokeMoveUpdate(event);}};this._handleMouseUp=function(event){if(event.which===1&&self._mouseButtonDown){self._mouseButtonDown=false;self._strokeEnd(event);}};this._handleTouchStart=function(event){if(event.targetTouches.length===1){var touch=event.changedTouches[0];self._strokeBegin(touch);}};this._handleTouchMove=function(event){event.preventDefault();var touch=event.targetTouches[0];self._strokeMoveUpdate(touch);};this._handleTouchEnd=function(event){var wasCanvasTouched=event.target===self._canvas;if(wasCanvasTouched){event.preventDefault();self._strokeEnd(event);}};this.on();}
SignaturePad.prototype.clear=function(){var ctx=this._ctx;var canvas=this._canvas;ctx.fillStyle=this.backgroundColor;ctx.clearRect(0,0,canvas.width,canvas.height);ctx.fillRect(0,0,canvas.width,canvas.height);this._data=[];this._reset();this._isEmpty=true;};SignaturePad.prototype.fromDataURL=function(dataUrl){var _this=this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var image=new Image();var ratio=options.ratio||window.devicePixelRatio||1;var width=options.width||this._canvas.width/ratio;var height=options.height||this._canvas.height/ratio;this._reset();image.src=dataUrl;image.onload=function(){_this._ctx.drawImage(image,0,0,width,height);};this._isEmpty=false;};SignaturePad.prototype.toDataURL=function(type){var _canvas;switch(type){case 'image/svg+xml':return this._toSVG();default:for(var _len=arguments.length,options=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){options[_key-1]=arguments[_key];}
return(_canvas=this._canvas).toDataURL.apply(_canvas,[type].concat(options));}};SignaturePad.prototype.on=function(){this._handleMouseEvents();this._handleTouchEvents();};SignaturePad.prototype.off=function(){this._canvas.removeEventListener('mousedown',this._handleMouseDown);this._canvas.removeEventListener('mousemove',this._handleMouseMove);document.removeEventListener('mouseup',this._handleMouseUp);this._canvas.removeEventListener('touchstart',this._handleTouchStart);this._canvas.removeEventListener('touchmove',this._handleTouchMove);this._canvas.removeEventListener('touchend',this._handleTouchEnd);};SignaturePad.prototype.isEmpty=function(){return this._isEmpty;};SignaturePad.prototype._strokeBegin=function(event){this._data.push([]);this._reset();this._strokeUpdate(event);if(typeof this.onBegin==='function'){this.onBegin(event);}};SignaturePad.prototype._strokeUpdate=function(event){var x=event.clientX;var y=event.clientY;var point=this._createPoint(x,y);var lastPointGroup=this._data[this._data.length-1];var lastPoint=lastPointGroup&&lastPointGroup[lastPointGroup.length-1];var isLastPointTooClose=lastPoint&&point.distanceTo(lastPoint)<this.minDistance;if(!(lastPoint&&isLastPointTooClose)){var _addPoint=this._addPoint(point),curve=_addPoint.curve,widths=_addPoint.widths;if(curve&&widths){this._drawCurve(curve,widths.start,widths.end);}
this._data[this._data.length-1].push({x:point.x,y:point.y,time:point.time,color:this.penColor});}};SignaturePad.prototype._strokeEnd=function(event){var canDrawCurve=this.points.length>2;var point=this.points[0];if(!canDrawCurve&&point){this._drawDot(point);}
if(point){var lastPointGroup=this._data[this._data.length-1];var lastPoint=lastPointGroup[lastPointGroup.length-1];if(!point.equals(lastPoint)){lastPointGroup.push({x:point.x,y:point.y,time:point.time,color:this.penColor});}}
if(typeof this.onEnd==='function'){this.onEnd(event);}};SignaturePad.prototype._handleMouseEvents=function(){this._mouseButtonDown=false;this._canvas.addEventListener('mousedown',this._handleMouseDown);this._canvas.addEventListener('mousemove',this._handleMouseMove);document.addEventListener('mouseup',this._handleMouseUp);};SignaturePad.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction='none';this._canvas.style.touchAction='none';this._canvas.addEventListener('touchstart',this._handleTouchStart);this._canvas.addEventListener('touchmove',this._handleTouchMove);this._canvas.addEventListener('touchend',this._handleTouchEnd);};SignaturePad.prototype._reset=function(){this.points=[];this._lastVelocity=0;this._lastWidth=(this.minWidth+this.maxWidth)/2;this._ctx.fillStyle=this.penColor;};SignaturePad.prototype._createPoint=function(x,y,time){var rect=this._canvas.getBoundingClientRect();return new Point(x-rect.left,y-rect.top,time||new Date().getTime());};SignaturePad.prototype._addPoint=function(point){var points=this.points;var tmp=void 0;points.push(point);if(points.length>2){if(points.length===3)points.unshift(points[0]);tmp=this._calculateCurveControlPoints(points[0],points[1],points[2]);var c2=tmp.c2;tmp=this._calculateCurveControlPoints(points[1],points[2],points[3]);var c3=tmp.c1;var curve=new Bezier(points[1],c2,c3,points[2]);var widths=this._calculateCurveWidths(curve);points.shift();return{curve:curve,widths:widths};}
return{};};SignaturePad.prototype._calculateCurveControlPoints=function(s1,s2,s3){var dx1=s1.x-s2.x;var dy1=s1.y-s2.y;var dx2=s2.x-s3.x;var dy2=s2.y-s3.y;var m1={x:(s1.x+s2.x)/2.0,y:(s1.y+s2.y)/2.0};var m2={x:(s2.x+s3.x)/2.0,y:(s2.y+s3.y)/2.0};var l1=Math.sqrt(dx1*dx1+dy1*dy1);var l2=Math.sqrt(dx2*dx2+dy2*dy2);var dxm=m1.x-m2.x;var dym=m1.y-m2.y;var k=l2/(l1+l2);var cm={x:m2.x+dxm*k,y:m2.y+dym*k};var tx=s2.x-cm.x;var ty=s2.y-cm.y;return{c1:new Point(m1.x+tx,m1.y+ty),c2:new Point(m2.x+tx,m2.y+ty)};};SignaturePad.prototype._calculateCurveWidths=function(curve){var startPoint=curve.startPoint;var endPoint=curve.endPoint;var widths={start:null,end:null};var velocity=this.velocityFilterWeight*endPoint.velocityFrom(startPoint)+(1-this.velocityFilterWeight)*this._lastVelocity;var newWidth=this._strokeWidth(velocity);widths.start=this._lastWidth;widths.end=newWidth;this._lastVelocity=velocity;this._lastWidth=newWidth;return widths;};SignaturePad.prototype._strokeWidth=function(velocity){return Math.max(this.maxWidth/(velocity+1),this.minWidth);};SignaturePad.prototype._drawPoint=function(x,y,size){var ctx=this._ctx;ctx.moveTo(x,y);ctx.arc(x,y,size,0,2*Math.PI,false);this._isEmpty=false;};SignaturePad.prototype._drawCurve=function(curve,startWidth,endWidth){var ctx=this._ctx;var widthDelta=endWidth-startWidth;var drawSteps=Math.floor(curve.length());ctx.beginPath();for(var i=0;i<drawSteps;i+=1){var t=i/drawSteps;var tt=t*t;var ttt=tt*t;var u=1-t;var uu=u*u;var uuu=uu*u;var x=uuu*curve.startPoint.x;x+=3*uu*t*curve.control1.x;x+=3*u*tt*curve.control2.x;x+=ttt*curve.endPoint.x;var y=uuu*curve.startPoint.y;y+=3*uu*t*curve.control1.y;y+=3*u*tt*curve.control2.y;y+=ttt*curve.endPoint.y;var width=startWidth+ttt*widthDelta;this._drawPoint(x,y,width);}
ctx.closePath();ctx.fill();};SignaturePad.prototype._drawDot=function(point){var ctx=this._ctx;var width=typeof this.dotSize==='function'?this.dotSize():this.dotSize;ctx.beginPath();this._drawPoint(point.x,point.y,width);ctx.closePath();ctx.fill();};SignaturePad.prototype._fromData=function(pointGroups,drawCurve,drawDot){for(var i=0;i<pointGroups.length;i+=1){var group=pointGroups[i];if(group.length>1){for(var j=0;j<group.length;j+=1){var rawPoint=group[j];var point=new Point(rawPoint.x,rawPoint.y,rawPoint.time);var color=rawPoint.color;if(j===0){this.penColor=color;this._reset();this._addPoint(point);}else if(j!==group.length-1){var _addPoint2=this._addPoint(point),curve=_addPoint2.curve,widths=_addPoint2.widths;if(curve&&widths){drawCurve(curve,widths,color);}}else{}}}else{this._reset();var _rawPoint=group[0];drawDot(_rawPoint);}}};SignaturePad.prototype._toSVG=function(){var _this2=this;var pointGroups=this._data;var canvas=this._canvas;var ratio=Math.max(window.devicePixelRatio||1,1);var minX=0;var minY=0;var maxX=canvas.width/ratio;var maxY=canvas.height/ratio;var svg=document.createElementNS('http://www.w3.org/2000/svg','svg');svg.setAttributeNS(null,'width',canvas.width);svg.setAttributeNS(null,'height',canvas.height);this._fromData(pointGroups,function(curve,widths,color){var path=document.createElement('path');if(!isNaN(curve.control1.x)&&!isNaN(curve.control1.y)&&!isNaN(curve.control2.x)&&!isNaN(curve.control2.y)){var attr='M '+curve.startPoint.x.toFixed(3)+','+curve.startPoint.y.toFixed(3)+' '+('C '+curve.control1.x.toFixed(3)+','+curve.control1.y.toFixed(3)+' ')+(curve.control2.x.toFixed(3)+','+curve.control2.y.toFixed(3)+' ')+(curve.endPoint.x.toFixed(3)+','+curve.endPoint.y.toFixed(3));path.setAttribute('d',attr);path.setAttribute('stroke-width',(widths.end*2.25).toFixed(3));path.setAttribute('stroke',color);path.setAttribute('fill','none');path.setAttribute('stroke-linecap','round');svg.appendChild(path);}},function(rawPoint){var circle=document.createElement('circle');var dotSize=typeof _this2.dotSize==='function'?_this2.dotSize():_this2.dotSize;circle.setAttribute('r',dotSize);circle.setAttribute('cx',rawPoint.x);circle.setAttribute('cy',rawPoint.y);circle.setAttribute('fill',rawPoint.color);svg.appendChild(circle);});var prefix='data:image/svg+xml;base64,';var header='<svg'+' xmlns="http://www.w3.org/2000/svg"'+' xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+minX+' '+minY+' '+maxX+' '+maxY+'"')+(' width="'+maxX+'"')+(' height="'+maxY+'"')+'>';var body=svg.innerHTML;if(body===undefined){var dummy=document.createElement('dummy');var nodes=svg.childNodes;dummy.innerHTML='';for(var i=0;i<nodes.length;i+=1){dummy.appendChild(nodes[i].cloneNode(true));}
body=dummy.innerHTML;}
var footer='</svg>';var data=header+body+footer;return prefix+btoa(data);};SignaturePad.prototype.fromData=function(pointGroups){var _this3=this;this.clear();this._fromData(pointGroups,function(curve,widths){return _this3._drawCurve(curve,widths.start,widths.end);},function(rawPoint){return _this3._drawDot(rawPoint);});this._data=pointGroups;};SignaturePad.prototype.toData=function(){return this._data;};__webpack_exports__["default"]=(SignaturePad);}),3675:(function(module,exports,__webpack_require__){!function(e,t){true?module.exports=t():undefined}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t){"use strict";function r(e){var t=e.getContext("2d"),r=e.width,n=e.height,o=t.getImageData(0,0,r,n).data,f=a(!0,r,n,o),i=a(!1,r,n,o),c=u(!0,r,n,o),d=u(!1,r,n,o),p=d-c+1,l=i-f+1,s=t.getImageData(c,f,p,l);return e.width=p,e.height=l,t.clearRect(0,0,p,l),t.putImageData(s,0,0),e}function n(e,t,r,n){return{red:n[4*(r*t+e)],green:n[4*(r*t+e)+1],blue:n[4*(r*t+e)+2],alpha:n[4*(r*t+e)+3]}}function o(e,t,r,o){return n(e,t,r,o).alpha}function a(e,t,r,n){for(var a=e?1:-1,u=e?0:r-1,f=u;e?f<r:f>-1;f+=a)for(var i=0;i<t;i++)if(o(i,f,t,n))return f;return null}function u(e,t,r,n){for(var a=e?1:-1,u=e?0:t-1,f=u;e?f<t:f>-1;f+=a)for(var i=0;i<r;i++)if(o(f,i,t,n))return f;return null}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r}])});}),787:(function(module,exports,__webpack_require__){}),788:(function(module,exports,__webpack_require__){})}]);