1 line
114 KiB
JavaScript
1 line
114 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-access-card-access-card~pages-epidemic-epidemic-vaccine~pages-epidemic-travel-check~pages-epid~d98d3b36"],{"08f0":function(e,t,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.Calendar=void 0,t.addZero=u,t.checkDate=function(e){return e.match(/((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g)},t.dateCompare=l,t.fixIosDateFormat=h,t.getDate=c,t.getDateTime=function(e,t){return"".concat(c(e)," ").concat(d(e,t))},t.getDefaultSecond=function(e){return e?"00:00":"00:00:00"},t.getTime=d,i("aa9c"),i("c223"),i("aa77"),i("bf0f"),i("bd06"),i("e966"),i("5c47"),i("2c10"),i("0506"),i("a1c1");var n=a(i("b7c7")),o=a(i("80b1")),r=a(i("efe5")),s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.selected,a=t.startDate,n=t.endDate,r=t.range;(0,o.default)(this,e),this.date=this.getDateObj(new Date),this.selected=i||[],this.startDate=a,this.endDate=n,this.range=r,this.cleanMultipleStatus(),this.weeks={},this.lastHover=!1}return(0,r.default)(e,[{key:"setDate",value:function(e){var t=this.getDateObj(e);this.getWeeks(t.fullDate)}},{key:"cleanMultipleStatus",value:function(){this.multipleStatus={before:"",after:"",data:[]}}},{key:"setStartDate",value:function(e){this.startDate=e}},{key:"setEndDate",value:function(e){this.endDate=e}},{key:"getPreMonthObj",value:function(e){e=h(e),e=new Date(e);var t=e.getMonth();e.setMonth(t-1);var i=e.getMonth();return 0!==t&&i-t===0&&e.setMonth(i-1),this.getDateObj(e)}},{key:"getNextMonthObj",value:function(e){e=h(e),e=new Date(e);var t=e.getMonth();e.setMonth(t+1);var i=e.getMonth();return i-t>1&&e.setMonth(i-1),this.getDateObj(e)}},{key:"getDateObj",value:function(e){return e=h(e),e=new Date(e),{fullDate:c(e),year:e.getFullYear(),month:u(e.getMonth()+1),date:u(e.getDate()),day:e.getDay()}}},{key:"getPreMonthDays",value:function(e,t){for(var i=[],a=e-1;a>=0;a--){var n=t.month-1;i.push({date:new Date(t.year,n,-a).getDate(),month:n,disable:!0})}return i}},{key:"getCurrentMonthDays",value:function(e,t){for(var i=this,a=[],n=this.date.fullDate,o=function(e){var o="".concat(t.year,"-").concat(t.month,"-").concat(u(e)),r=n===o,s=i.selected&&i.selected.find((function(e){if(i.dateEqual(o,e.date))return e}));i.startDate&&l(i.startDate,o),i.endDate&&l(o,i.endDate);var c=i.multipleStatus.data,d=-1;i.range&&c&&(d=c.findIndex((function(e){return i.dateEqual(e,o)})));var f=-1!==d;a.push({fullDate:o,year:t.year,date:e,multiple:!!i.range&&f,beforeMultiple:i.isLogicBefore(o,i.multipleStatus.before,i.multipleStatus.after),afterMultiple:i.isLogicAfter(o,i.multipleStatus.before,i.multipleStatus.after),month:t.month,disable:i.startDate&&!l(i.startDate,o)||i.endDate&&!l(o,i.endDate),isToday:r,userChecked:!1,extraInfo:s})},r=1;r<=e;r++)o(r);return a}},{key:"_getNextMonthDays",value:function(e,t){for(var i=[],a=t.month+1,n=1;n<=e;n++)i.push({date:n,month:a,disable:!0});return i}},{key:"getInfo",value:function(e){var t=this;return e||(e=new Date),this.calendar.find((function(i){return i.fullDate===t.getDateObj(e).fullDate}))}},{key:"dateEqual",value:function(e,t){return e=new Date(h(e)),t=new Date(h(t)),e.valueOf()===t.valueOf()}},{key:"isLogicBefore",value:function(e,t,i){var a=t;return t&&i&&(a=l(t,i)?t:i),this.dateEqual(a,e)}},{key:"isLogicAfter",value:function(e,t,i){var a=i;return t&&i&&(a=l(t,i)?i:t),this.dateEqual(a,e)}},{key:"geDateAll",value:function(e,t){var i=[],a=e.split("-"),n=t.split("-"),o=new Date;o.setFullYear(a[0],a[1]-1,a[2]);var r=new Date;r.setFullYear(n[0],n[1]-1,n[2]);for(var s=o.getTime()-864e5,c=r.getTime()-864e5,d=s;d<=c;)d+=864e5,i.push(this.getDateObj(new Date(parseInt(d))).fullDate);return i}},{key:"setMultiple",value:function(e){if(this.range){var t=this.multipleStatus,i=t.before,a=t.after;if(i&&a){if(!this.lastHover)return void(this.lastHover=!0);this.multipleStatus.before=e,this.multipleStatus.after="",this.multipleStatus.data=[],this.multipleStatus.fulldate="",this.lastHover=!1}else i?(this.multipleStatus.after=e,l(this.multipleStatus.before,this.mul
|