;(function () {
  function _toConsumableArray(arr) {
    return (
      _arrayWithoutHoles(arr) ||
      _iterableToArray(arr) ||
      _unsupportedIterableToArray(arr) ||
      _nonIterableSpread()
    )
  }
  function _nonIterableSpread() {
    throw new TypeError(
      'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
    )
  }
  function _unsupportedIterableToArray(o, minLen) {
    if (!o) return
    if (typeof o === 'string') return _arrayLikeToArray(o, minLen)
    var n = Object.prototype.toString.call(o).slice(8, -1)
    if (n === 'Object' && o.constructor) n = o.constructor.name
    if (n === 'Map' || n === 'Set') return Array.from(o)
    if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
      return _arrayLikeToArray(o, minLen)
  }
  function _iterableToArray(iter) {
    if (
      (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null) ||
      iter['@@iterator'] != null
    )
      return Array.from(iter)
  }
  function _arrayWithoutHoles(arr) {
    if (Array.isArray(arr)) return _arrayLikeToArray(arr)
  }
  function _arrayLikeToArray(arr, len) {
    if (len == null || len > arr.length) len = arr.length
    for (var i = 0, arr2 = new Array(len); i < len; i++) {
      arr2[i] = arr[i]
    }
    return arr2
  }
  function ownKeys(object, enumerableOnly) {
    var keys = Object.keys(object)
    if (Object.getOwnPropertySymbols) {
      var symbols = Object.getOwnPropertySymbols(object)
      enumerableOnly &&
        (symbols = symbols.filter(function (sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable
        })),
        keys.push.apply(keys, symbols)
    }
    return keys
  }
  function _objectSpread(target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = null != arguments[i] ? arguments[i] : {}
      i % 2
        ? ownKeys(Object(source), !0).forEach(function (key) {
            _defineProperty(target, key, source[key])
          })
        : Object.getOwnPropertyDescriptors
        ? Object.defineProperties(
            target,
            Object.getOwnPropertyDescriptors(source)
          )
        : ownKeys(Object(source)).forEach(function (key) {
            Object.defineProperty(
              target,
              key,
              Object.getOwnPropertyDescriptor(source, key)
            )
          })
    }
    return target
  }
  function _defineProperty(obj, key, value) {
    if (key in obj) {
      Object.defineProperty(obj, key, {
        value: value,
        enumerable: true,
        configurable: true,
        writable: true
      })
    } else {
      obj[key] = value
    }
    return obj
  }
  var __vite_style__ = document.createElement('style')
  __vite_style__.innerHTML =
    ':root{--van-calendar-background-color: var(--van-background-color-light);--van-calendar-popup-height: 80%;--van-calendar-header-box-shadow: 0 .05333rem .26667rem rgba(125, 126, 128, .16);--van-calendar-header-title-height: 1.17333rem;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-weekdays-height: .8rem;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 4.26667rem;--van-calendar-day-height: 1.70667rem;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background-color: var(--van-danger-color);--van-calendar-range-middle-color: var(--van-danger-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 1.44rem;--van-calendar-selected-day-color: var(--van-white);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-selected-day-background-color: var(--van-danger-color);--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-confirm-button-height: .96rem;--van-calendar-confirm-button-margin: .18667rem 0}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background-color)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:.29333rem}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-box-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{height:var(--van-calendar-header-title-height);font-weight:var(--van-font-weight-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background-color)}.van-calendar__day--start{border-radius:var(--van-border-radius-md) 0 0 var(--van-border-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-border-radius-md) var(--van-border-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-border-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width: 350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:.24rem}}.van-calendar__top-info{top:.16rem}.van-calendar__bottom-info{bottom:.16rem}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background-color);border-radius:var(--van-border-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}._calendar_1oek0_1{border-radius:.26667rem}._calendar_1oek0_1 ._subtitle_1oek0_4{display:flex;align-items:center;justify-content:space-between;font-size:.48rem;font-weight:500;color:#333;line-height:.66667rem;height:var(--van-calendar-header-title-height);padding:0 .58667rem}._calendar_1oek0_1 ._subtitle_1oek0_4 ._right_1oek0_15{transform:rotate(180deg)}._calendar_1oek0_1 ._subtitle_1oek0_4 ._disabled_1oek0_18{opacity:.6}._calendar_1oek0_1 .van-calendar__header{box-shadow:none}._calendar_1oek0_1 .van-calendar__selected-day{width:1.01333rem!important;height:1.2rem!important;border-radius:.13333rem;overflow:hidden}._calendar_1oek0_1 .van-calendar__selected-day .van-calendar__bottom-info{color:#fff!important}._calendar_1oek0_1 .van-calendar__weekday{color:#777;font-size:.37333rem}._calendar_1oek0_1 .van-calendar__day{font-size:.4rem}._calendar_1oek0_1 .van-calendar__day:after{position:absolute;top:50%;right:0;bottom:0;left:50%;width:1.01333rem;height:1.2rem;background:#01C1B5;content:" ";opacity:.12;transform:translate(-50%,-50%);border-radius:.05333rem}._calendar_1oek0_1 .van-calendar__days{padding:.32rem 0}._calendar_1oek0_1 .van-calendar__bottom-info{bottom:.08rem}._calendar_1oek0_1 .full .van-calendar__bottom-info{color:#ff6363}._calendar_1oek0_1 .van-calendar__day.full:after,._calendar_1oek0_1 .van-calendar__day--disabled.full:after{display:inline-block!important;background-color:#ffd7a6}._calendar_1oek0_1 .van-calendar__day--disabled:after{display:none!important}._calenderPopup_1oek0_71{border-radius:.21333rem;overflow:hidden;padding:.48rem .32rem .74667rem}._calenderPopup_1oek0_71 ._popup_1oek0_76{width:8.32rem;background:#ffffff}._calenderPopup_1oek0_71 ._title_1oek0_80{display:flex;align-items:center;justify-content:space-around;font-size:.48rem;font-weight:500;color:#333;line-height:.66667rem;padding:0 .53333rem .66667rem}._calenderPopup_1oek0_71 ._container_1oek0_90{display:flex;align-items:center;flex-wrap:wrap;padding-bottom:.37333rem}._calenderPopup_1oek0_71 ._container_1oek0_90>div{flex-basis:33.33%;text-align:center}._calenderPopup_1oek0_71 ._noDay_1oek0_100{display:flex;align-items:center;justify-content:center;flex:1;padding:.66667rem 0 .93333rem}._calenderPopup_1oek0_71 ._noDay_1oek0_100 ._clock_1oek0_107{width:.8rem}._calenderPopup_1oek0_71 ._noDay_1oek0_100 span{padding-left:.26667rem;font-size:.37333rem;font-weight:500;color:#999}._calenderPopup_1oek0_71 ._tag_1oek0_116{padding:.21333rem .26667rem;margin-bottom:.26667rem;font-size:.32rem;color:#333!important;border-color:#d8d8d8!important}._calenderPopup_1oek0_71 ._tag_1oek0_116._active_1oek0_123{color:var(--van-primary)!important;background:#e0f7f3;border-color:var(--van-primary)!important}._calenderPopup_1oek0_71 ._dayBtn_1oek0_128{display:flex;align-items:center}\n'
  document.head.appendChild(__vite_style__)
  System.register(
    [
      './vendor-legacy.09f20d09.js',
      './index-legacy.f25f109a11.js',
      './index-legacy.f25f109a2.js',
      './index-legacy.f25f109a10.js'
    ],
    function (exports) {
      'use strict'
      var commonjsGlobal,
        defineComponent,
        dayjs,
        Toast,
        createVNode,
        Fragment,
        Calendar$1,
        Icon,
        Popup,
        Tag,
        createTextVNode,
        Image,
        Button
      return {
        setters: [
          function (module) {
            commonjsGlobal = module.a2
            defineComponent = module.d
            dayjs = module.g
            Toast = module.T
            createVNode = module.a
            Fragment = module.F
            Calendar$1 = module.a3
            Icon = module.K
            Popup = module.P
            Tag = module.U
            createTextVNode = module.j
            Image = module.I
            Button = module.B
          },
          function () {},
          function () {},
          function () {}
        ],
        execute: function execute() {
          var index = ''
          var calendar = '_calendar_1oek0_1'
          var subtitle = '_subtitle_1oek0_4'
          var right = '_right_1oek0_15'
          var disabled = '_disabled_1oek0_18'
          var calenderPopup = '_calenderPopup_1oek0_71'
          var popup = '_popup_1oek0_76'
          var title = '_title_1oek0_80'
          var container = '_container_1oek0_90'
          var noDay = '_noDay_1oek0_100'
          var clock = '_clock_1oek0_107'
          var tag = '_tag_1oek0_116'
          var active = '_active_1oek0_123'
          var dayBtn = '_dayBtn_1oek0_128'
          var styles = {
            calendar: calendar,
            subtitle: subtitle,
            right: right,
            disabled: disabled,
            calenderPopup: calenderPopup,
            popup: popup,
            title: title,
            container: container,
            noDay: noDay,
            clock: clock,
            tag: tag,
            active: active,
            dayBtn: dayBtn
          }
          var IconArrow =
            'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAAXNSR0IArs4c6QAAAKJQTFRFAAAAqv//3///2/Pz4P/34fjw4fj04vn23/jz4vjz4vj14fj14ff04Pfz4ff04fj04Pfz4Pj04ffz4Pj04Pfz4fj0LceqNMmtNsmtOcquO8qvPsuxRc2zSc61TM+2UtC5VdG6W9O8ZdbAcdnFctnGftzLjeDRjuDRrunfr+nfuOziwO7myPDpzPHrzvLr0vPt1PTu1/Tv2/Xx3fby3/fy4PfzO48SQAAAABZ0Uk5TAAMIFSEiRFhoaGiYpMTKzdfX6/j+/uKmZyQAAAD0SURBVDjLjZTXDsIwDEXd0tJCJx1m771n/v/XoAiQk5TK983WkRKvC0BkuX6UpGkS+a4FpTKcIBM/ZYFj6Ew9ForiuoKYXi405Z5JmVooShXWCNMSf9T6UWYo/ir8vuiJCnmfuvIqKH/XaMSiUnHRL0dLrzoLGjovKFCQxxKxRxMBgJ3JzH2O2N7STGZBQ2ZuM8TuTs654EvxdYrY3ysf8CGi4XmMODiohUSQkOg4RBydtGoTSEk0Qpxc9E6lPIj1HOvjrBawmlk6lo0yFtaAS1Zlra8Ka+lY68s7BN5JsY6Td+Y8w+BZD9PECtnNrx02JDt8Aj29wQfuVoPFAAAAAElFTkSuQmCC'
          var IconClock =
            'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA2CAMAAAChp3phAAAAAXNSR0IArs4c6QAAASxQTFRFAAAAAAAA////gICAqqqqgICAmZmZqqqqkpKSgICAn5+fjo6OmZmZoqKilZWViYmJnZ2dkpKSn5+fnJyclJSUmZmZl5eXm5ubmZmZnZ2dlZWVlJSUl5eXm5ublpaWnp6emZmZmZmZmJiYmpqam5ubmJiYmpqamZmZmJiYmpqanJycmZmZlpaWmpqal5eXnJycmZmZm5ubmZmZmJiYmpqal5eXmpqamJiYnJycmpqamJiYm5ubmJiYmpqam5ubmpqamJiYm5ubmpqamJiYmpqamJiYm5ubmZmZmZmZmZmZmJiYmpqamZmZmZmZmZmZmJiYmpqamZmZmpqamZmZmJiYmZmZmpqamZmZmpqamZmZm5ubmZmZmJiYmpqamZmZm5ubmpqamZmZm5ubmZmZwxMU8QAAAGR0Uk5TAAEBAgMEBQYHCAgJCgsMDQ0OEBITFBYXGRodHyAhIiIjKCorLi8wMjQ1Njc4Ojs7PEBBQ0RHR0hISUpKTU5SU1xcXV5gY2NkZmdoaGlrbG1tbm9xdHZ3eHl6ent8fH19fn9/gF4hmekAAAJvSURBVBgZlcGLQtJQAAbgH1ExA1JBvGFFeKFMvJSSqWCaF7ySJNtEF/C//zt0NoWNczYY3weX6KF2NQsfs1faYRQ+lh5IXsPHNcmHJXiJlGjR4EOjpRSBYuKSth342KHtcgKSVJWWej4EH6F8nZZqCl0WNFrOptHD9Bkt2gJcUhqF1tYQXsWzu8d3mmnWKkeFbByvhrZaFLQUOiaqFMwVvBj7ctqkS/N0bQwvVkwK1Qm8ilxS0N/DFisYVBiFGGzvdQqXEbwoUTA/wBLeNOjJ2AjD8tGkUIJtiUJrBZZkmb7KSVhWWhSWIEQfKGzBktHZg56BZZvCQxTAIYXzIQi5Bntq5CAMnVM4BGCQfJqGkGuxj1YOwvQTSQPADck8hEyDfTUyEPIkbwDM3TzuhwAkdQagJwGE9h9v5tARLlNSTAzPX1BWDkO2QUkRwmiFsg1IYgYlCVhWKTOi6FagLATLIhXf0GXMoAy2NBX6W7itUQFbmqrPcDulArY0Vb/hEm9SAVuaqmYcjixVsKXp4RMcBapgS9PDdziOqIItTQ/HcPyhCrbx9IvF1Qo7buGoUQXJ6AXb/sJhUgXZPNue4DCpCkEyzLZ/cNSoSkCSYFsNjjuqipAU2XYPxxE9FBMhdIQSRXacwLHLgezDkeVAluGINzmISbiccgDXcFvjANbh9sZgYM9xdNljYAfoFjMY0PMUJJsMaBuycJmB3I5AkdQZQH0GHjIN9tVchqcc+9qAj1yDPbXy8JXR2UN9GT0ky/R1O4OewpsGPT1vj6Cf2J5BxfPBFIIY/3rWpNv1ehyBvcv++FWpmY3a/cnP5Ul4+w80tbiPt9JlfAAAAABJRU5ErkJggg=='
          var isToday$1 = { exports: {} }
          ;(function (module, exports) {
            !(function (e, o) {
              module.exports = o()
            })(commonjsGlobal, function () {
              return function (e, o, t) {
                o.prototype.isToday = function () {
                  var e = 'YYYY-MM-DD',
                    o = t()
                  return this.format(e) === o.format(e)
                }
              }
            })
          })(isToday$1)
          var isToday = isToday$1.exports
          dayjs.extend(isToday)
          var Calendar = exports(
            'C',
            defineComponent({
              name: 'calendar',
              props: {
                calendarDate: {
                  type: Date,
                  default: function _default() {
                    return new Date()
                  }
                }, // 选中的数据
                selectList: { type: Array, default: [] }, // 接口数据
                list: { type: Object, default: {} },
                /**
                 * 每天选择课程最大数
                 */ maxDays: { type: [Number, String], default: 0 },
                /**
                 * 点击并选中任意日期时触发
                 */ onSelect: {
                  type: Function,
                  default: function _default(date) {}
                },
                /**
                 * 上一月，不能小于当月
                 */ prevMonth: {
                  type: Function,
                  default: function _default(date) {}
                },
                /**
                 * 下一月，暂无限制
                 */ nextMonth: {
                  type: Function,
                  default: function _default(date) {}
                },
                /**
                 * 日期选择结束时触发
                 */ selectDay: {
                  type: Function,
                  default: function _default(obj) {}
                },
                isSkipHolidays: {
                  // 是否跳过节假日
                  type: Boolean,
                  default: false
                }
              },
              data: function data() {
                return {
                  minDate: new Date(),
                  maxDate: new Date(),
                  currentDate: dayjs().add(1, 'day').toDate(), // 当前日历日期
                  subtitle: '',
                  show: false,
                  dayList: [],
                  selectDays: []
                }
              },
              computed: {
                arrowStatus: function arrowStatus() {
                  // 上月箭头状态
                  return !dayjs()
                    .add(1, 'day')
                    .isBefore(dayjs(this.currentDate), 'month')
                },
                selectDayTitle: function selectDayTitle() {
                  // 选中日期标题
                  return dayjs(this.currentDate).format('YYYY-MM-DD')
                },
                isPrevDay: function isPrevDay() {
                  // 是否可以点击上一天
                  return dayjs(this.currentDate)
                    .subtract(1, 'day')
                    .isBefore(dayjs(this.minDate), 'day')
                },
                isNextDay: function isNextDay() {
                  // 是否可以点击下一天
                  return dayjs(this.currentDate)
                    .add(1, 'day')
                    .isAfter(dayjs(this.maxDate), 'day')
                }
              },
              mounted: function mounted() {
                // 初始化标题和最大显示日期
                this.subtitle = dayjs().add(1, 'day').format('YYYY年MM月')
                this.maxDate = dayjs().add(1, 'day').endOf('month').toDate()
                this.minDate = dayjs().add(1, 'day').toDate() // 初始化日历
                // console.log(this.list, 323, this.maxDays)
              },
              methods: {
                formatter: function formatter(date) {
                  var dateStr = dayjs(date.date).format('YYYY-MM-DD')
                  var dateObj = this.list[dateStr]
                  date.type = '' // 判断是否有课程 并且 时间在当前时间之后
                  if (
                    dateObj &&
                    dayjs().subtract(1, 'day').isBefore(dayjs(date.date))
                  ) {
                    var _dateObj$courseTime // fullCourse当天是否排满 0: 未,1:满 , courseTime 当天没有课程
                    if (
                      dateObj.fullCourse ||
                      !(
                        dateObj !== null &&
                        dateObj !== void 0 &&
                        dateObj.courseTime
                      ) ||
                      (dateObj === null || dateObj === void 0
                        ? void 0
                        : (_dateObj$courseTime = dateObj.courseTime) === null ||
                          _dateObj$courseTime === void 0
                        ? void 0
                        : _dateObj$courseTime.length) <= 0
                    ) {
                      date.bottomInfo = '满'
                      date.className = 'full'
                      date.type = 'disabled'
                    }
                  } else {
                    date.type = 'disabled'
                  } // console.log(date)
                  if (
                    this.$route.name == 'liveCreate' &&
                    dayjs(date.date).isToday()
                  ) {
                    date.type = 'disabled'
                  } // 是否是节假日
                  if (dateObj && this.isSkipHolidays && dateObj.holiday) {
                    // date.bottomInfo = '节假日'
                    date.type = 'disabled'
                  } // date.type = date.type === 'selected' ? 'selected' : date.type
                  // console.log(date.type)
                  return date
                },
                onPrevMonth: function onPrevMonth() {
                  // 上一月
                  if (this.arrowStatus) return
                  var tempDate = dayjs(this.currentDate).subtract(1, 'month')
                  this._monthChange(tempDate)
                  this.prevMonth && this.prevMonth(this.minDate)
                },
                onNextMonth: function onNextMonth() {
                  // 下一月
                  var tempDate = dayjs(this.currentDate).add(1, 'month')
                  this._monthChange(tempDate)
                  this.nextMonth && this.nextMonth(this.minDate)
                },
                _monthChange: function _monthChange(date) {
                  // 月份改变
                  // 需要判断是否是当月，需要单独处理最小时间
                  var currentMinDate = dayjs().add(1, 'day').toDate()
                  var monthMinDate = date.startOf('month').toDate()
                  this.minDate = dayjs(currentMinDate).isAfter(monthMinDate)
                    ? currentMinDate
                    : monthMinDate // this.minDate = date.startOf('month').toDate()
                  this.maxDate = date.endOf('month').toDate()
                  this.currentDate = date.toDate()
                  this.$emit('update:calendarDate', date.toDate())
                  this.subtitle = date.format('YYYY年MM月')
                },
                onSelectDay: function onSelectDay(item) {
                  // 选择某个时间段
                  var index = this.selectDays.findIndex(function (days) {
                    return days.startTime === item.startTime
                  })
                  if (this.selectDays.length < this.maxDays || index !== -1) {
                    var _index = this.selectDays.findIndex(function (days) {
                      return days.startTime === item.startTime
                    })
                    item.checked = !item.checked
                    if (_index === -1) {
                      this.selectDays.push(_objectSpread({}, item))
                    } else {
                      this.selectDays.splice(_index, 1)
                    }
                  } else {
                    Toast('最多选择' + this.maxDays + '个时间段')
                  }
                },
                onPrevDay: function onPrevDay() {
                  // 获取上一天的数据
                  var tempDate = dayjs(this.currentDate).subtract(1, 'day')
                  this._dayChange(tempDate.toDate())
                },
                onNextDay: function onNextDay() {
                  // 获取下一天的数据
                  var tempDate = dayjs(this.currentDate).add(1, 'day')
                  this._dayChange(tempDate.toDate())
                },
                onDateSelect: function onDateSelect(date) {
                  // 选择日历上某一个日期
                  // console.log([...this.selectList])
                  this.selectDays = _toConsumableArray(this.selectList) // 初始化用户选中的值
                  this._dayChange(date)
                  this.onSelect && this.onSelect(date)
                },
                _dayChange: function _dayChange(date) {
                  var _this = this
                  var dateStr = dayjs(date).format('YYYY-MM-DD')
                  var dataList = []
                  if (
                    this.list[dateStr] &&
                    Array.isArray(this.list[dateStr].courseTime)
                  ) {
                    dataList = _toConsumableArray(
                      this.list[dateStr].courseTime
                    ).filter(function (n) {
                      return dayjs().isBefore(dayjs(n.startTime))
                    })
                  }
                  dataList.forEach(function (item) {
                    var _this$selectDays
                    item.start = dayjs(item.startTime).format('HH:mm')
                    item.end = dayjs(item.endTime).format('HH:mm')
                    var isExist =
                      (_this$selectDays = _this.selectDays) === null ||
                      _this$selectDays === void 0
                        ? void 0
                        : _this$selectDays.some(function (course) {
                            return course.startTime === item.startTime
                          })
                    item.checked = isExist
                  })
                  this.dayList = dataList
                  this.currentDate = date // 更新当前日期
                  this.$emit('update:calendarDate', date)
                  this.show = true
                }
              },
              render: function render() {
                var _this2 = this
                return createVNode(Fragment, null, [
                  createVNode(
                    Calendar$1,
                    {
                      class: styles.calendar,
                      showTitle: false,
                      poppable: false,
                      showConfirm: false,
                      showMark: false,
                      firstDayOfWeek: 1,
                      rowHeight: 56,
                      minDate: this.minDate,
                      maxDate: this.maxDate,
                      color: 'var(--van-primary)',
                      formatter: this.formatter,
                      onSelect: this.onDateSelect
                    },
                    {
                      subtitle: function subtitle() {
                        return createVNode('div', { class: styles.subtitle }, [
                          createVNode(
                            Icon,
                            {
                              name: IconArrow,
                              size: 22,
                              class: _this2.arrowStatus && styles.disabled,
                              onClick: _this2.onPrevMonth
                            },
                            null
                          ),
                          createVNode('span', null, [_this2.subtitle]),
                          createVNode(
                            Icon,
                            {
                              name: IconArrow,
                              size: 22,
                              class: styles.right,
                              onClick: _this2.onNextMonth
                            },
                            null
                          )
                        ])
                      } // 'bottom-info': (date: any) => <span>{date.type}</span>
                    }
                  ),
                  createVNode(
                    Popup,
                    { show: this.show, class: styles.calenderPopup },
                    {
                      default: function _default() {
                        return [
                          createVNode('div', { class: styles.popup }, [
                            createVNode('div', { class: styles.title }, [
                              createVNode('span', null, [_this2.selectDayTitle])
                            ]),
                            createVNode('div', { class: styles.container }, [
                              _this2.dayList.map(function (item) {
                                return createVNode('div', null, [
                                  createVNode(
                                    Tag,
                                    {
                                      round: true,
                                      class: [
                                        styles.tag,
                                        item.checked ? styles.active : ''
                                      ],
                                      size: 'large',
                                      plain: true,
                                      onClick: function onClick() {
                                        return _this2.onSelectDay(item)
                                      }
                                    },
                                    {
                                      default: function _default() {
                                        return [
                                          item.start,
                                          createTextVNode('\uFF5E'),
                                          item.end
                                        ]
                                      }
                                    }
                                  )
                                ])
                              }),
                              _this2.dayList.length <= 0 &&
                                createVNode('div', { class: styles.noDay }, [
                                  createVNode(
                                    Image,
                                    {
                                      src: IconClock,
                                      class: styles.clock,
                                      fit: 'cover'
                                    },
                                    null
                                  ),
                                  createVNode('span', null, [
                                    createTextVNode(
                                      '\u4ECA\u65E5\u5DF2\u7EA6\u6EE1'
                                    )
                                  ])
                                ])
                            ]),
                            createVNode('div', { class: styles.dayBtn }, [
                              createVNode(
                                Button,
                                {
                                  round: true,
                                  plain: true,
                                  block: true,
                                  style: { marginRight: '10px' },
                                  onClick: function onClick() {
                                    _this2.show = false
                                    _this2.selectDays = []
                                  }
                                },
                                {
                                  default: function _default() {
                                    return [createTextVNode('\u53D6\u6D88')]
                                  }
                                }
                              ),
                              createVNode(
                                Button,
                                {
                                  type: 'primary',
                                  block: true,
                                  round: true,
                                  disabled: !(_this2.selectDays.length > 0),
                                  onClick: function onClick() {
                                    _this2.selectDay &&
                                      _this2.selectDay(_this2.selectDays)
                                    _this2.show = false
                                  }
                                },
                                {
                                  default: function _default() {
                                    return [createTextVNode('\u786E\u8BA4')]
                                  }
                                }
                              )
                            ])
                          ])
                        ]
                      }
                    }
                  )
                ])
              }
            })
          )
        }
      }
    }
  )
})()
