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AAP;AAID;AA1CO,KALqD;AAkD/D,aAAS;AACP,0BADO,8BACa,SADb,EACmD;AAAA,gBAAf,OAAe,uEAAL,KAAK;;AACxD,mBAAO;AACL,6BAAa,UAAU,OADlB;AAEL,0BAAU,UAAU,IAFf;AAGL,4BAAY,UAAU,MAHjB;AAIL,6BAAa;AAJR,aAAP;AAMD,SARM;AASP,sBATO,0BASS,SATT,EAS8B;AACnC,mBAAO,+BAAe,SAAf,EAA0B,KAAK,QAA/B,EAAyC,KAAK,KAAL,CAAW,KAApD,CAAP;AACD,SAXM;AAYP,oBAZO,wBAYO,SAZP,EAY4B;AACjC,mBAAO,6BAAa,SAAb,EAAwB,KAAK,QAA7B,EAAuC,KAAK,KAAL,CAAW,KAAlD,CAAP;AACD;AAdM;AAlDsD,CAAlD,C","sourcesContent":["\n// Mixins\nimport mixins from '../../../util/mixins'\nimport Themeable from '../../../mixins/themeable'\nimport Colorable from '../../../mixins/colorable'\nimport Times from './times'\nimport Mouse from './mouse'\n\n// Util\nimport props from '../util/props'\nimport {\n VTimestamp,\n VTimestampFormatter,\n parseTimestamp,\n getWeekdaySkips,\n createDayList,\n createNativeLocaleFormatter,\n getStartOfWeek,\n getEndOfWeek\n} from '../util/timestamp'\n\n/* @vue/component */\nexport default mixins(Colorable, Themeable, Times, Mouse).extend({\n name: 'calendar-base',\n\n props: props.base,\n\n computed: {\n weekdaySkips (): number[] {\n return getWeekdaySkips(this.weekdays)\n },\n parsedStart (): VTimestamp {\n return parseTimestamp(this.start) as VTimestamp\n },\n parsedEnd (): VTimestamp {\n return parseTimestamp(this.end) as VTimestamp\n },\n days (): VTimestamp[] {\n return createDayList(\n this.parsedStart,\n this.parsedEnd,\n this.times.today,\n this.weekdaySkips\n )\n },\n dayFormatter (): VTimestampFormatter {\n if (this.dayFormat) {\n return this.dayFormat as VTimestampFormatter\n }\n\n const options = { timeZone: 'UTC', day: 'numeric' }\n\n return createNativeLocaleFormatter(\n this.locale,\n (_tms, _short) => options\n )\n },\n weekdayFormatter (): VTimestampFormatter {\n if (this.weekdayFormat) {\n return this.weekdayFormat as VTimestampFormatter\n }\n\n const longOptions = { timeZone: 'UTC', weekday: 'long' }\n const shortOptions = { timeZone: 'UTC', weekday: 'short' }\n\n return createNativeLocaleFormatter(\n this.locale,\n (_tms, short) => short ? shortOptions : longOptions\n )\n }\n },\n\n methods: {\n getRelativeClasses (timestamp: VTimestamp, outside = false): object {\n return {\n 'v-present': timestamp.present,\n 'v-past': timestamp.past,\n 'v-future': timestamp.future,\n 'v-outside': outside\n }\n },\n getStartOfWeek (timestamp: VTimestamp): VTimestamp {\n return getStartOfWeek(timestamp, this.weekdays, this.times.today)\n },\n getEndOfWeek (timestamp: VTimestamp): VTimestamp {\n return getEndOfWeek(timestamp, this.weekdays, this.times.today)\n }\n }\n})\n"],"sourceRoot":""}
|