fix(api): use bcrypt directly instead of passlib for compatibility

This commit is contained in:
bwstudio
2026-05-21 22:18:36 +08:00
parent 7f51d200f1
commit 4651781bc3
23511 changed files with 2587254 additions and 8 deletions
@@ -0,0 +1,195 @@
import { Translator } from "../../../../hooks/use-locale/index.js";
import { DateCell } from "../types.js";
import { BasicDateTableEmits, BasicDateTableProps } from "../props/basic-date-table.js";
import * as _$vue from "vue";
import { SetupContext } from "vue";
import dayjs, { Dayjs } from "dayjs";
//#region ../../packages/components/date-picker-panel/src/composables/use-basic-date-table.d.ts
declare const useBasicDateTable: (props: BasicDateTableProps, emit: SetupContext<BasicDateTableEmits>["emit"]) => {
WEEKS: _$vue.ComputedRef<string[]>;
rows: _$vue.ComputedRef<DateCell[][] | {
column?: number | undefined;
customClass?: string | undefined;
disabled?: boolean | undefined;
end?: boolean | undefined;
inRange?: boolean | undefined;
row?: number | undefined;
selected?: {
clone: () => Dayjs;
isValid: () => boolean;
year: {
(): number;
(value: number): Dayjs;
};
month: {
(): number;
(value: number): Dayjs;
};
date: {
(): number;
(value: number): Dayjs;
};
day: {
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
(value: number): Dayjs;
};
hour: {
(): number;
(value: number): Dayjs;
};
minute: {
(): number;
(value: number): Dayjs;
};
second: {
(): number;
(value: number): Dayjs;
};
millisecond: {
(): number;
(value: number): Dayjs;
};
set: (unit: dayjs.UnitType, value: number) => Dayjs;
get: (unit: dayjs.UnitType) => number;
add: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
subtract: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
startOf: (unit: dayjs.OpUnitType) => Dayjs;
endOf: (unit: dayjs.OpUnitType) => Dayjs;
format: (template?: string) => string;
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
valueOf: () => number;
unix: () => number;
daysInMonth: () => number;
toDate: () => Date;
toJSON: () => string;
toISOString: () => string;
toString: () => string;
utcOffset: () => number;
isBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isSame: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
locale: {
(): string;
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
};
localeData: () => dayjs.InstanceLocaleDataReturn;
week: {
(): number;
(value: number): Dayjs;
};
weekYear: () => number;
dayOfYear: {
(): number;
(value: number): Dayjs;
};
isSameOrAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isSameOrBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
} | undefined;
isCurrent?: boolean | undefined;
isSelected?: boolean | undefined;
start?: boolean | undefined;
text?: number | undefined;
renderText?: string | undefined;
timestamp?: number | undefined;
date?: Date | undefined;
dayjs?: {
clone: () => Dayjs;
isValid: () => boolean;
year: {
(): number;
(value: number): Dayjs;
};
month: {
(): number;
(value: number): Dayjs;
};
date: {
(): number;
(value: number): Dayjs;
};
day: {
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
(value: number): Dayjs;
};
hour: {
(): number;
(value: number): Dayjs;
};
minute: {
(): number;
(value: number): Dayjs;
};
second: {
(): number;
(value: number): Dayjs;
};
millisecond: {
(): number;
(value: number): Dayjs;
};
set: (unit: dayjs.UnitType, value: number) => Dayjs;
get: (unit: dayjs.UnitType) => number;
add: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
subtract: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
startOf: (unit: dayjs.OpUnitType) => Dayjs;
endOf: (unit: dayjs.OpUnitType) => Dayjs;
format: (template?: string) => string;
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
valueOf: () => number;
unix: () => number;
daysInMonth: () => number;
toDate: () => Date;
toJSON: () => string;
toISOString: () => string;
toString: () => string;
utcOffset: () => number;
isBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isSame: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
locale: {
(): string;
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
};
localeData: () => dayjs.InstanceLocaleDataReturn;
week: {
(): number;
(value: number): Dayjs;
};
weekYear: () => number;
dayOfYear: {
(): number;
(value: number): Dayjs;
};
isSameOrAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isSameOrBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
} | undefined;
type?: ("today" | "normal" | "prev-month" | "next-month" | "week") | undefined;
}[][]>;
tbodyRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
currentCellRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
focus: () => Promise<void | undefined>;
isCurrent: (cell: DateCell) => boolean;
isWeekActive: (cell: DateCell) => boolean;
isSelectedCell: (cell: DateCell) => boolean | undefined;
handlePickDate: (event: FocusEvent | MouseEvent, isKeyboardMovement?: boolean) => void;
handleMouseUp: (event: MouseEvent) => void;
handleMouseDown: (event: MouseEvent) => void;
handleMouseMove: (event: MouseEvent) => void;
handleFocus: (event: FocusEvent) => void;
};
declare const useBasicDateTableDOM: (props: BasicDateTableProps, {
isCurrent,
isWeekActive
}: Pick<ReturnType<typeof useBasicDateTable>, "isCurrent" | "isWeekActive">) => {
tableKls: _$vue.ComputedRef<string[]>;
tableLabel: _$vue.ComputedRef<string>;
weekHeaderClass: string;
getCellClasses: (cell: DateCell) => string;
getRowKls: (cell: DateCell) => (string | {
current: boolean;
})[];
t: Translator;
};
//#endregion
export { useBasicDateTable, useBasicDateTableDOM };
@@ -0,0 +1,307 @@
import { isArray } from "../../../../utils/types.mjs";
import { castArray } from "../../../../utils/arrays.mjs";
import { useLocale } from "../../../../hooks/use-locale/index.mjs";
import { useNamespace } from "../../../../hooks/use-namespace/index.mjs";
import { buildPickerTable } from "../utils.mjs";
import { flatten } from "lodash-unified";
import { computed, nextTick, ref, unref, watch } from "vue";
import dayjs from "dayjs";
//#region ../../packages/components/date-picker-panel/src/composables/use-basic-date-table.ts
const isNormalDay = (type = "") => {
return ["normal", "today"].includes(type);
};
const useBasicDateTable = (props, emit) => {
const { lang } = useLocale();
const tbodyRef = ref();
const currentCellRef = ref();
const lastRow = ref();
const lastColumn = ref();
const tableRows = ref([
[],
[],
[],
[],
[],
[]
]);
let focusWithClick = false;
const firstDayOfWeek = props.date.$locale().weekStart || 7;
const WEEKS_CONSTANT = props.date.locale("en").localeData().weekdaysShort().map((_) => _.toLowerCase());
const offsetDay = computed(() => {
return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek;
});
const startDate = computed(() => {
const startDayOfMonth = props.date.startOf("month");
return startDayOfMonth.subtract(startDayOfMonth.day() || 7, "day");
});
const WEEKS = computed(() => {
return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(firstDayOfWeek, firstDayOfWeek + 7);
});
const hasCurrent = computed(() => {
return flatten(unref(rows)).some((row) => {
return row.isCurrent;
});
});
const days = computed(() => {
const startOfMonth = props.date.startOf("month");
return {
startOfMonthDay: startOfMonth.day() || 7,
dateCountOfMonth: startOfMonth.daysInMonth(),
dateCountOfLastMonth: startOfMonth.subtract(1, "month").daysInMonth()
};
});
const selectedDate = computed(() => {
return props.selectionMode === "dates" ? castArray(props.parsedValue) : [];
});
const setDateText = (cell, { count, rowIndex, columnIndex }) => {
const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } = unref(days);
const offset = unref(offsetDay);
if (rowIndex >= 0 && rowIndex <= 1) {
const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;
if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {
cell.text = count;
return true;
} else {
cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - columnIndex % 7) + 1 + rowIndex * 7;
cell.type = "prev-month";
}
} else {
if (count <= dateCountOfMonth) cell.text = count;
else {
cell.text = count - dateCountOfMonth;
cell.type = "next-month";
}
return true;
}
return false;
};
const setCellMetadata = (cell, { columnIndex, rowIndex }, count) => {
const { disabledDate, cellClassName } = props;
const _selectedDate = unref(selectedDate);
const shouldIncrement = setDateText(cell, {
count,
rowIndex,
columnIndex
});
const cellDate = cell.dayjs.toDate();
cell.selected = _selectedDate.find((d) => d.isSame(cell.dayjs, "day"));
cell.isSelected = !!cell.selected;
cell.isCurrent = isCurrent(cell);
cell.disabled = disabledDate?.(cellDate);
cell.customClass = cellClassName?.(cellDate);
return shouldIncrement;
};
const setRowMetadata = (row) => {
if (props.selectionMode === "week") {
const [start, end] = props.showWeekNumber ? [1, 7] : [0, 6];
const isActive = isWeekActive(row[start + 1]);
row[start].inRange = isActive;
row[start].start = isActive;
row[end].inRange = isActive;
row[end].end = isActive;
}
};
const rows = computed(() => {
const { minDate, maxDate, rangeState, showWeekNumber } = props;
const offset = unref(offsetDay);
const rows_ = unref(tableRows);
const dateUnit = "day";
let count = 1;
buildPickerTable({
row: 6,
column: 7
}, rows_, {
startDate: minDate,
columnIndexOffset: showWeekNumber ? 1 : 0,
nextEndDate: rangeState.endDate || maxDate || rangeState.selecting && minDate || null,
now: dayjs().locale(unref(lang)).startOf(dateUnit),
unit: dateUnit,
relativeDateGetter: (idx) => unref(startDate).add(idx - offset, dateUnit),
setCellMetadata: (...args) => {
if (setCellMetadata(...args, count)) count += 1;
},
setRowMetadata
});
if (showWeekNumber) {
for (let rowIndex = 0; rowIndex < 6; rowIndex++) if (rows_[rowIndex][1].dayjs) rows_[rowIndex][0] = {
type: "week",
text: rows_[rowIndex][1].dayjs.week()
};
}
return rows_;
});
watch(() => props.date, async () => {
if (unref(tbodyRef)?.contains(document.activeElement)) {
await nextTick();
await focus();
}
});
const focus = async () => unref(currentCellRef)?.focus();
const isCurrent = (cell) => {
return props.selectionMode === "date" && isNormalDay(cell.type) && cellMatchesDate(cell, props.parsedValue);
};
const cellMatchesDate = (cell, date) => {
if (!date) return false;
return dayjs(date).locale(unref(lang)).isSame(props.date.date(Number(cell.text)), "day");
};
const getDateOfCell = (row, column) => {
const startOfMonthDay = unref(days).startOfMonthDay;
const offset = unref(offsetDay);
const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;
const offsetFromStart = row * 7 + (column - (props.showWeekNumber ? 1 : 0));
return props.date.startOf("month").subtract(numberOfDaysFromPreviousMonth, "day").add(offsetFromStart, "day");
};
const handleMouseMove = (event) => {
if (!props.rangeState.selecting) return;
let target = event.target;
if (target.tagName === "SPAN") target = target.parentNode?.parentNode;
if (target.tagName === "DIV") target = target.parentNode;
if (target.tagName !== "TD") return;
const row = target.parentNode.rowIndex - 1;
const column = target.cellIndex;
if (unref(rows)[row][column].disabled) return;
if (row !== unref(lastRow) || column !== unref(lastColumn)) {
lastRow.value = row;
lastColumn.value = column;
emit("changerange", {
selecting: true,
endDate: getDateOfCell(row, column)
});
}
};
const isSelectedCell = (cell) => {
return !unref(hasCurrent) && cell?.text === 1 && isNormalDay(cell.type) || cell.isCurrent;
};
const handleFocus = (event) => {
if (focusWithClick || unref(hasCurrent) || props.selectionMode !== "date") return;
handlePickDate(event, true);
};
const handleMouseDown = (event) => {
if (!event.target.closest("td")) return;
focusWithClick = true;
};
const handleMouseUp = (event) => {
if (!event.target.closest("td")) return;
focusWithClick = false;
};
const handleRangePick = (newDate) => {
if (!props.rangeState.selecting || !props.minDate) {
emit("pick", {
minDate: newDate,
maxDate: null
});
emit("select", true);
} else {
if (newDate >= props.minDate) emit("pick", {
minDate: props.minDate,
maxDate: newDate
});
else emit("pick", {
minDate: newDate,
maxDate: props.minDate
});
emit("select", false);
}
};
const handleWeekPick = (newDate) => {
const weekNumber = newDate.week();
const value = `${newDate.year()}w${weekNumber}`;
emit("pick", {
year: newDate.year(),
week: weekNumber,
value,
date: newDate.startOf("week")
});
};
const handleDatesPick = (newDate, selected) => {
emit("pick", selected ? castArray(props.parsedValue).filter((d) => d?.valueOf() !== newDate.valueOf()) : castArray(props.parsedValue).concat([newDate]));
};
const handlePickDate = (event, isKeyboardMovement = false) => {
if (props.disabled) return;
const target = event.target.closest("td");
if (!target) return;
const row = target.parentNode.rowIndex - 1;
const column = target.cellIndex;
const cell = unref(rows)[row][column];
if (cell.disabled || cell.type === "week") return;
const newDate = getDateOfCell(row, column);
switch (props.selectionMode) {
case "range":
handleRangePick(newDate);
break;
case "date":
emit("pick", newDate, isKeyboardMovement);
break;
case "week":
handleWeekPick(newDate);
break;
case "dates":
handleDatesPick(newDate, !!cell.selected);
break;
default: break;
}
};
const isWeekActive = (cell) => {
if (props.selectionMode !== "week") return false;
let newDate = props.date.startOf("day");
if (cell.type === "prev-month") newDate = newDate.subtract(1, "month");
if (cell.type === "next-month") newDate = newDate.add(1, "month");
newDate = newDate.date(Number.parseInt(cell.text, 10));
if (props.parsedValue && !isArray(props.parsedValue)) {
const dayOffset = (props.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1;
return props.parsedValue.subtract(dayOffset, "day").isSame(newDate, "day");
}
return false;
};
return {
WEEKS,
rows,
tbodyRef,
currentCellRef,
focus,
isCurrent,
isWeekActive,
isSelectedCell,
handlePickDate,
handleMouseUp,
handleMouseDown,
handleMouseMove,
handleFocus
};
};
const useBasicDateTableDOM = (props, { isCurrent, isWeekActive }) => {
const ns = useNamespace("date-table");
const { t } = useLocale();
const tableKls = computed(() => [ns.b(), ns.is("week-mode", props.selectionMode === "week" && !props.disabled)]);
const tableLabel = computed(() => t("el.datepicker.dateTablePrompt"));
const getCellClasses = (cell) => {
const classes = [];
if (isNormalDay(cell.type) && !cell.disabled) {
classes.push("available");
if (cell.type === "today") classes.push("today");
} else classes.push(cell.type);
if (isCurrent(cell)) classes.push("current");
if (cell.inRange && (isNormalDay(cell.type) || props.selectionMode === "week")) {
classes.push("in-range");
if (cell.start) classes.push("start-date");
if (cell.end) classes.push("end-date");
}
if (cell.disabled || props.disabled) classes.push("disabled");
if (cell.selected) classes.push("selected");
if (cell.customClass) classes.push(cell.customClass);
return classes.join(" ");
};
const getRowKls = (cell) => [ns.e("row"), { current: isWeekActive(cell) }];
return {
tableKls,
tableLabel,
weekHeaderClass: ns.e("week-header"),
getCellClasses,
getRowKls,
t
};
};
//#endregion
export { useBasicDateTable, useBasicDateTableDOM };
//# sourceMappingURL=use-basic-date-table.mjs.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,25 @@
import * as _$vue from "vue";
import { Ref, ToRef } from "vue";
import { Dayjs } from "dayjs";
//#region ../../packages/components/date-picker-panel/src/composables/use-month-range-header.d.ts
declare const useMonthRangeHeader: ({
unlinkPanels,
leftDate,
rightDate
}: {
unlinkPanels: ToRef<boolean>;
leftDate: Ref<Dayjs>;
rightDate: Ref<Dayjs>;
}) => {
leftPrevYear: () => void;
rightNextYear: () => void;
leftNextYear: () => void;
rightPrevYear: () => void;
leftLabel: _$vue.ComputedRef<string>;
rightLabel: _$vue.ComputedRef<string>;
leftYear: _$vue.ComputedRef<number>;
rightYear: _$vue.ComputedRef<number>;
};
//#endregion
export { useMonthRangeHeader };
@@ -0,0 +1,42 @@
import { useLocale } from "../../../../hooks/use-locale/index.mjs";
import { computed } from "vue";
//#region ../../packages/components/date-picker-panel/src/composables/use-month-range-header.ts
const useMonthRangeHeader = ({ unlinkPanels, leftDate, rightDate }) => {
const { t } = useLocale();
const leftPrevYear = () => {
leftDate.value = leftDate.value.subtract(1, "year");
if (!unlinkPanels.value) rightDate.value = rightDate.value.subtract(1, "year");
};
const rightNextYear = () => {
if (!unlinkPanels.value) leftDate.value = leftDate.value.add(1, "year");
rightDate.value = rightDate.value.add(1, "year");
};
const leftNextYear = () => {
leftDate.value = leftDate.value.add(1, "year");
};
const rightPrevYear = () => {
rightDate.value = rightDate.value.subtract(1, "year");
};
return {
leftPrevYear,
rightNextYear,
leftNextYear,
rightPrevYear,
leftLabel: computed(() => {
return `${leftDate.value.year()} ${t("el.datepicker.year")}`;
}),
rightLabel: computed(() => {
return `${rightDate.value.year()} ${t("el.datepicker.year")}`;
}),
leftYear: computed(() => {
return leftDate.value.year();
}),
rightYear: computed(() => {
return rightDate.value.year() === leftDate.value.year() ? leftDate.value.year() + 1 : rightDate.value.year();
})
};
};
//#endregion
export { useMonthRangeHeader };
//# sourceMappingURL=use-month-range-header.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"use-month-range-header.mjs","names":[],"sources":["../../../../../../../packages/components/date-picker-panel/src/composables/use-month-range-header.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\n\nimport type { Ref, ToRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const useMonthRangeHeader = ({\n unlinkPanels,\n leftDate,\n rightDate,\n}: {\n unlinkPanels: ToRef<boolean>\n leftDate: Ref<Dayjs>\n rightDate: Ref<Dayjs>\n}) => {\n const { t } = useLocale()\n const leftPrevYear = () => {\n leftDate.value = leftDate.value.subtract(1, 'year')\n if (!unlinkPanels.value) {\n rightDate.value = rightDate.value.subtract(1, 'year')\n }\n }\n\n const rightNextYear = () => {\n if (!unlinkPanels.value) {\n leftDate.value = leftDate.value.add(1, 'year')\n }\n rightDate.value = rightDate.value.add(1, 'year')\n }\n\n const leftNextYear = () => {\n leftDate.value = leftDate.value.add(1, 'year')\n }\n\n const rightPrevYear = () => {\n rightDate.value = rightDate.value.subtract(1, 'year')\n }\n const leftLabel = computed(() => {\n return `${leftDate.value.year()} ${t('el.datepicker.year')}`\n })\n\n const rightLabel = computed(() => {\n return `${rightDate.value.year()} ${t('el.datepicker.year')}`\n })\n\n const leftYear = computed(() => {\n return leftDate.value.year()\n })\n\n const rightYear = computed(() => {\n return rightDate.value.year() === leftDate.value.year()\n ? leftDate.value.year() + 1\n : rightDate.value.year()\n })\n\n return {\n leftPrevYear,\n rightNextYear,\n leftNextYear,\n rightPrevYear,\n leftLabel,\n rightLabel,\n leftYear,\n rightYear,\n }\n}\n"],"mappings":";;;AAMA,MAAa,uBAAuB,EAClC,cACA,UACA,gBAKI;CACJ,MAAM,EAAE,MAAM,WAAW;CACzB,MAAM,qBAAqB;EACzB,SAAS,QAAQ,SAAS,MAAM,SAAS,GAAG,OAAO;EACnD,IAAI,CAAC,aAAa,OAChB,UAAU,QAAQ,UAAU,MAAM,SAAS,GAAG,OAAO;;CAIzD,MAAM,sBAAsB;EAC1B,IAAI,CAAC,aAAa,OAChB,SAAS,QAAQ,SAAS,MAAM,IAAI,GAAG,OAAO;EAEhD,UAAU,QAAQ,UAAU,MAAM,IAAI,GAAG,OAAO;;CAGlD,MAAM,qBAAqB;EACzB,SAAS,QAAQ,SAAS,MAAM,IAAI,GAAG,OAAO;;CAGhD,MAAM,sBAAsB;EAC1B,UAAU,QAAQ,UAAU,MAAM,SAAS,GAAG,OAAO;;CAoBvD,OAAO;EACL;EACA;EACA;EACA;EACA,WAvBgB,eAAe;GAC/B,OAAO,GAAG,SAAS,MAAM,MAAM,CAAC,GAAG,EAAE,qBAAqB;IAsBjD;EACT,YApBiB,eAAe;GAChC,OAAO,GAAG,UAAU,MAAM,MAAM,CAAC,GAAG,EAAE,qBAAqB;IAmBjD;EACV,UAjBe,eAAe;GAC9B,OAAO,SAAS,MAAM,MAAM;IAgBpB;EACR,WAdgB,eAAe;GAC/B,OAAO,UAAU,MAAM,MAAM,KAAK,SAAS,MAAM,MAAM,GACnD,SAAS,MAAM,MAAM,GAAG,IACxB,UAAU,MAAM,MAAM;IAWjB;EACV"}
@@ -0,0 +1,32 @@
import { PanelDateRangeProps } from "../props/panel-date-range.js";
import { ComputedRef, Ref } from "vue";
import { Dayjs } from "dayjs";
//#region ../../packages/components/date-picker-panel/src/composables/use-panel-date-range.d.ts
type CurrentView = 'date' | 'year' | 'month';
type CurrentViewRef = {
focus: () => void;
};
type Emits = (event: 'pick' | 'set-picker-option' | 'calendar-change' | 'panel-change', ...args: any[]) => void;
declare const usePanelDateRange: (props: PanelDateRangeProps, emit: Emits, leftDate: Ref<Dayjs>, rightDate: Ref<Dayjs>) => {
leftCurrentView: Ref<CurrentView, CurrentView>;
rightCurrentView: Ref<CurrentView, CurrentView>;
leftCurrentViewRef: Ref<CurrentViewRef | undefined, CurrentViewRef | undefined>;
rightCurrentViewRef: Ref<CurrentViewRef | undefined, CurrentViewRef | undefined>;
leftYear: ComputedRef<number>;
rightYear: ComputedRef<number>;
leftMonth: ComputedRef<number>;
rightMonth: ComputedRef<number>;
leftYearLabel: ComputedRef<string>;
rightYearLabel: ComputedRef<string>;
showLeftPicker: (view: "month" | "year") => Promise<void>;
showRightPicker: (view: "month" | "year") => Promise<void>;
handleLeftYearPick: (year: number) => Promise<void>;
handleRightYearPick: (year: number) => Promise<void>;
handleLeftMonthPick: (month: number) => Promise<void>;
handleRightMonthPick: (month: number) => Promise<void>;
handlePanelChange: (mode: "month" | "year") => void;
adjustDateByView: (currentView: CurrentView, date: Dayjs, forward: boolean) => Dayjs;
};
//#endregion
export { Emits, usePanelDateRange };
@@ -0,0 +1,90 @@
import { useLocale } from "../../../../hooks/use-locale/index.mjs";
import { PICKER_BASE_INJECTION_KEY } from "../../../time-picker/src/constants.mjs";
import { getValidDateOfMonth, getValidDateOfYear } from "../utils.mjs";
import { computed, inject, nextTick, ref } from "vue";
//#region ../../packages/components/date-picker-panel/src/composables/use-panel-date-range.ts
const usePanelDateRange = (props, emit, leftDate, rightDate) => {
const leftCurrentView = ref("date");
const leftCurrentViewRef = ref();
const rightCurrentView = ref("date");
const rightCurrentViewRef = ref();
const { disabledDate } = inject(PICKER_BASE_INJECTION_KEY).props;
const { t, lang } = useLocale();
const leftYear = computed(() => {
return leftDate.value.year();
});
const leftMonth = computed(() => {
return leftDate.value.month();
});
const rightYear = computed(() => {
return rightDate.value.year();
});
const rightMonth = computed(() => {
return rightDate.value.month();
});
function computedYearLabel(currentView, yearValue) {
const yearTranslation = t("el.datepicker.year");
if (currentView.value === "year") {
const startYear = Math.floor(yearValue.value / 10) * 10;
return yearTranslation ? `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}` : `${startYear} - ${startYear + 9}`;
}
return `${yearValue.value} ${yearTranslation}`;
}
function focusPicker(currentViewRef) {
currentViewRef?.focus();
}
async function showPicker(pickerType, view) {
if (props.disabled) return;
const currentView = pickerType === "left" ? leftCurrentView : rightCurrentView;
const currentViewRef = pickerType === "left" ? leftCurrentViewRef : rightCurrentViewRef;
currentView.value = view;
await nextTick();
focusPicker(currentViewRef.value);
}
async function handlePick(mode, pickerType, value) {
if (props.disabled) return;
const isLeftPicker = pickerType === "left";
const startDate = isLeftPicker ? leftDate : rightDate;
const endDate = isLeftPicker ? rightDate : leftDate;
const currentView = isLeftPicker ? leftCurrentView : rightCurrentView;
const currentViewRef = isLeftPicker ? leftCurrentViewRef : rightCurrentViewRef;
if (mode === "year") startDate.value = getValidDateOfYear(startDate.value.year(value), lang.value, disabledDate);
if (mode === "month") startDate.value = getValidDateOfMonth(startDate.value, startDate.value.year(), value, lang.value, disabledDate);
if (!props.unlinkPanels) endDate.value = pickerType === "left" ? startDate.value.add(1, "month") : startDate.value.subtract(1, "month");
currentView.value = mode === "year" ? "month" : "date";
await nextTick();
focusPicker(currentViewRef.value);
handlePanelChange(mode);
}
function handlePanelChange(mode) {
emit("panel-change", [leftDate.value.toDate(), rightDate.value.toDate()], mode);
}
function adjustDateByView(currentView, date, forward) {
const action = forward ? "add" : "subtract";
return currentView === "year" ? date[action](10, "year") : date[action](1, "year");
}
return {
leftCurrentView,
rightCurrentView,
leftCurrentViewRef,
rightCurrentViewRef,
leftYear,
rightYear,
leftMonth,
rightMonth,
leftYearLabel: computed(() => computedYearLabel(leftCurrentView, leftYear)),
rightYearLabel: computed(() => computedYearLabel(rightCurrentView, rightYear)),
showLeftPicker: (view) => showPicker("left", view),
showRightPicker: (view) => showPicker("right", view),
handleLeftYearPick: (year) => handlePick("year", "left", year),
handleRightYearPick: (year) => handlePick("year", "right", year),
handleLeftMonthPick: (month) => handlePick("month", "left", month),
handleRightMonthPick: (month) => handlePick("month", "right", month),
handlePanelChange,
adjustDateByView
};
};
//#endregion
export { usePanelDateRange };
//# sourceMappingURL=use-panel-date-range.mjs.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,222 @@
import { Translator } from "../../../../hooks/use-locale/index.js";
import { PanelRangeSharedProps, RangeState } from "../props/shared.js";
import { Shortcut } from "./use-shortcut.js";
import { DefaultValue } from "../utils.js";
import * as _$vue from "vue";
import { Ref } from "vue";
import dayjs, { Dayjs } from "dayjs";
//#region ../../packages/components/date-picker-panel/src/composables/use-range-picker.d.ts
type UseRangePickerProps = {
sortDates: (minDate: Dayjs | undefined, maxDate: Dayjs | undefined) => void;
defaultValue: Ref<DefaultValue>;
defaultTime?: Ref<DefaultValue>;
leftDate: Ref<Dayjs>;
rightDate: Ref<Dayjs>;
step?: number;
unit: 'month' | 'year';
};
declare const useRangePicker: (props: PanelRangeSharedProps, {
defaultValue,
defaultTime,
leftDate,
rightDate,
step,
unit,
sortDates
}: UseRangePickerProps) => {
minDate: Ref<dayjs.Dayjs | undefined, dayjs.Dayjs | undefined>;
maxDate: Ref<dayjs.Dayjs | undefined, dayjs.Dayjs | undefined>;
rangeState: Ref<{
endDate: {
clone: () => Dayjs;
isValid: () => boolean;
year: {
(): number;
(value: number): Dayjs;
};
month: {
(): number;
(value: number): Dayjs;
};
date: {
(): number;
(value: number): Dayjs;
};
day: {
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
(value: number): Dayjs;
};
hour: {
(): number;
(value: number): Dayjs;
};
minute: {
(): number;
(value: number): Dayjs;
};
second: {
(): number;
(value: number): Dayjs;
};
millisecond: {
(): number;
(value: number): Dayjs;
};
set: (unit: dayjs.UnitType, value: number) => Dayjs;
get: (unit: dayjs.UnitType) => number;
add: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
subtract: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
startOf: (unit: dayjs.OpUnitType) => Dayjs;
endOf: (unit: dayjs.OpUnitType) => Dayjs;
format: (template?: string) => string;
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
valueOf: () => number;
unix: () => number;
daysInMonth: () => number;
toDate: () => Date;
toJSON: () => string;
toISOString: () => string;
toString: () => string;
utcOffset: () => number;
isBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isSame: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
locale: {
(): string;
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
};
localeData: () => dayjs.InstanceLocaleDataReturn;
week: {
(): number;
(value: number): Dayjs;
};
weekYear: () => number;
dayOfYear: {
(): number;
(value: number): Dayjs;
};
isSameOrAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isSameOrBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
} | null;
selecting: boolean;
}, RangeState | {
endDate: {
clone: () => Dayjs;
isValid: () => boolean;
year: {
(): number;
(value: number): Dayjs;
};
month: {
(): number;
(value: number): Dayjs;
};
date: {
(): number;
(value: number): Dayjs;
};
day: {
(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
(value: number): Dayjs;
};
hour: {
(): number;
(value: number): Dayjs;
};
minute: {
(): number;
(value: number): Dayjs;
};
second: {
(): number;
(value: number): Dayjs;
};
millisecond: {
(): number;
(value: number): Dayjs;
};
set: (unit: dayjs.UnitType, value: number) => Dayjs;
get: (unit: dayjs.UnitType) => number;
add: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
subtract: (value: number, unit?: dayjs.ManipulateType) => Dayjs;
startOf: (unit: dayjs.OpUnitType) => Dayjs;
endOf: (unit: dayjs.OpUnitType) => Dayjs;
format: (template?: string) => string;
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
valueOf: () => number;
unix: () => number;
daysInMonth: () => number;
toDate: () => Date;
toJSON: () => string;
toISOString: () => string;
toString: () => string;
utcOffset: () => number;
isBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isSame: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
locale: {
(): string;
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
};
localeData: () => dayjs.InstanceLocaleDataReturn;
week: {
(): number;
(value: number): Dayjs;
};
weekYear: () => number;
dayOfYear: {
(): number;
(value: number): Dayjs;
};
isSameOrAfter: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
isSameOrBefore: (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType) => boolean;
} | null;
selecting: boolean;
}>;
lang: Ref<string, string>;
ppNs: {
namespace: _$vue.ComputedRef<string>;
b: (blockSuffix?: string) => string;
e: (element?: string) => string;
m: (modifier?: string) => string;
be: (blockSuffix?: string, element?: string) => string;
em: (element?: string, modifier?: string) => string;
bm: (blockSuffix?: string, modifier?: string) => string;
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
is: {
(name: string, state: boolean | undefined): string;
(name: string): string;
};
cssVar: (object: Record<string, string>) => Record<string, string>;
cssVarName: (name: string) => string;
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
cssVarBlockName: (name: string) => string;
};
drpNs: {
namespace: _$vue.ComputedRef<string>;
b: (blockSuffix?: string) => string;
e: (element?: string) => string;
m: (modifier?: string) => string;
be: (blockSuffix?: string, element?: string) => string;
em: (element?: string, modifier?: string) => string;
bm: (blockSuffix?: string, modifier?: string) => string;
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
is: {
(name: string, state: boolean | undefined): string;
(name: string): string;
};
cssVar: (object: Record<string, string>) => Record<string, string>;
cssVarName: (name: string) => string;
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
cssVarBlockName: (name: string) => string;
};
handleChangeRange: (val: RangeState) => void;
handleRangeConfirm: (visible?: boolean) => void;
handleShortcutClick: (shortcut: Shortcut) => void;
onSelect: (selecting: boolean) => void;
parseValue: (parsedValue: PanelRangeSharedProps["parsedValue"]) => void;
t: Translator;
};
//#endregion
export { useRangePicker };
@@ -0,0 +1,102 @@
import { isArray } from "../../../../utils/types.mjs";
import { useLocale } from "../../../../hooks/use-locale/index.mjs";
import { useNamespace } from "../../../../hooks/use-namespace/index.mjs";
import { ROOT_PICKER_INJECTION_KEY } from "../constants.mjs";
import { getDefaultValue, isValidRange } from "../utils.mjs";
import { useShortcut } from "./use-shortcut.mjs";
import { isEqual } from "lodash-unified";
import { getCurrentInstance, inject, ref, unref, watch } from "vue";
import dayjs from "dayjs";
//#region ../../packages/components/date-picker-panel/src/composables/use-range-picker.ts
const useRangePicker = (props, { defaultValue, defaultTime, leftDate, rightDate, step, unit, sortDates }) => {
const { emit } = getCurrentInstance();
const { pickerNs } = inject(ROOT_PICKER_INJECTION_KEY);
const drpNs = useNamespace("date-range-picker");
const { t, lang } = useLocale();
const handleShortcutClick = useShortcut(lang);
const minDate = ref();
const maxDate = ref();
const rangeState = ref({
endDate: null,
selecting: false
});
const handleChangeRange = (val) => {
rangeState.value = val;
};
const handleRangeConfirm = (visible = false) => {
const _minDate = unref(minDate);
const _maxDate = unref(maxDate);
if (isValidRange([_minDate, _maxDate])) emit("pick", [_minDate, _maxDate], visible);
};
const onSelect = (selecting) => {
rangeState.value.selecting = selecting;
if (!selecting) rangeState.value.endDate = null;
};
const parseValue = (parsedValue) => {
if (isArray(parsedValue) && parsedValue.length === 2) {
const [start, end] = parsedValue;
minDate.value = start;
leftDate.value = start;
maxDate.value = end;
sortDates(unref(minDate), unref(maxDate));
} else restoreDefault();
};
const restoreDefault = () => {
let [start, end] = getDefaultValue(unref(defaultValue), {
lang: unref(lang),
step,
unit,
unlinkPanels: props.unlinkPanels
});
const getShift = (day) => {
return day.diff(day.startOf("d"), "ms");
};
const maybeTimes = unref(defaultTime);
if (maybeTimes) {
let leftShift = 0;
let rightShift = 0;
if (isArray(maybeTimes)) {
const [timeStart, timeEnd] = maybeTimes.map(dayjs);
leftShift = getShift(timeStart);
rightShift = getShift(timeEnd);
} else {
const shift = getShift(dayjs(maybeTimes));
leftShift = shift;
rightShift = shift;
}
start = start.startOf("d").add(leftShift, "ms");
end = end.startOf("d").add(rightShift, "ms");
}
minDate.value = void 0;
maxDate.value = void 0;
leftDate.value = start;
rightDate.value = end;
};
watch(defaultValue, (val) => {
if (val) restoreDefault();
}, { immediate: true });
watch(() => props.parsedValue, (parsedValue) => {
if (!parsedValue?.length || !isEqual(parsedValue, [minDate.value, maxDate.value])) parseValue(parsedValue);
}, { immediate: true });
watch(() => props.visible, () => {
if (props.visible) parseValue(props.parsedValue);
}, { immediate: true });
return {
minDate,
maxDate,
rangeState,
lang,
ppNs: pickerNs,
drpNs,
handleChangeRange,
handleRangeConfirm,
handleShortcutClick,
onSelect,
parseValue,
t
};
};
//#endregion
export { useRangePicker };
//# sourceMappingURL=use-range-picker.mjs.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
import { useLocale } from "../../../../hooks/use-locale/index.js";
import { RangePickerSharedEmits } from "../props/shared.js";
import { SetupContext } from "vue";
//#region ../../packages/components/date-picker-panel/src/composables/use-shortcut.d.ts
type Shortcut = {
text: string;
value: [Date, Date] | (() => [Date, Date]);
onClick?: (ctx: Omit<SetupContext<RangePickerSharedEmits>, 'expose'>) => void;
};
declare const useShortcut: (lang: ReturnType<typeof useLocale>["lang"]) => (shortcut: Shortcut) => void;
//#endregion
export { Shortcut, useShortcut };
@@ -0,0 +1,26 @@
import { isFunction } from "../../../../utils/types.mjs";
import { getCurrentInstance, useAttrs, useSlots } from "vue";
import dayjs from "dayjs";
//#region ../../packages/components/date-picker-panel/src/composables/use-shortcut.ts
const useShortcut = (lang) => {
const { emit } = getCurrentInstance();
const attrs = useAttrs();
const slots = useSlots();
const handleShortcutClick = (shortcut) => {
const shortcutValues = isFunction(shortcut.value) ? shortcut.value() : shortcut.value;
if (shortcutValues) {
emit("pick", [dayjs(shortcutValues[0]).locale(lang.value), dayjs(shortcutValues[1]).locale(lang.value)]);
return;
}
if (shortcut.onClick) shortcut.onClick({
attrs,
slots,
emit
});
};
return handleShortcutClick;
};
//#endregion
export { useShortcut };
//# sourceMappingURL=use-shortcut.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"use-shortcut.mjs","names":[],"sources":["../../../../../../../packages/components/date-picker-panel/src/composables/use-shortcut.ts"],"sourcesContent":["import { getCurrentInstance, useAttrs, useSlots } from 'vue'\nimport dayjs from 'dayjs'\nimport { isFunction } from '@element-plus/utils'\n\nimport type { SetupContext } from 'vue'\nimport type { useLocale } from '@element-plus/hooks'\nimport type { RangePickerSharedEmits } from '../props/shared'\n\n// FIXME: extract this to `date-picker.ts`\nexport type Shortcut = {\n text: string\n value: [Date, Date] | (() => [Date, Date])\n onClick?: (ctx: Omit<SetupContext<RangePickerSharedEmits>, 'expose'>) => void\n}\n\nexport const useShortcut = (lang: ReturnType<typeof useLocale>['lang']) => {\n const { emit } = getCurrentInstance()!\n const attrs = useAttrs()\n const slots = useSlots()\n\n const handleShortcutClick = (shortcut: Shortcut) => {\n const shortcutValues = isFunction(shortcut.value)\n ? shortcut.value()\n : shortcut.value\n\n if (shortcutValues) {\n emit('pick', [\n dayjs(shortcutValues[0]).locale(lang.value),\n dayjs(shortcutValues[1]).locale(lang.value),\n ])\n return\n }\n if (shortcut.onClick) {\n shortcut.onClick({\n attrs,\n slots,\n emit,\n })\n }\n }\n\n return handleShortcutClick\n}\n"],"mappings":";;;;AAeA,MAAa,eAAe,SAA+C;CACzE,MAAM,EAAE,SAAS,oBAAoB;CACrC,MAAM,QAAQ,UAAU;CACxB,MAAM,QAAQ,UAAU;CAExB,MAAM,uBAAuB,aAAuB;EAClD,MAAM,iBAAiB,WAAW,SAAS,MAAM,GAC7C,SAAS,OAAO,GAChB,SAAS;EAEb,IAAI,gBAAgB;GAClB,KAAK,QAAQ,CACX,MAAM,eAAe,GAAG,CAAC,OAAO,KAAK,MAAM,EAC3C,MAAM,eAAe,GAAG,CAAC,OAAO,KAAK,MAAM,CAC5C,CAAC;GACF;;EAEF,IAAI,SAAS,SACX,SAAS,QAAQ;GACf;GACA;GACA;GACD,CAAC;;CAIN,OAAO"}
@@ -0,0 +1,25 @@
import * as _$vue from "vue";
import { Ref, ToRef } from "vue";
import { Dayjs } from "dayjs";
//#region ../../packages/components/date-picker-panel/src/composables/use-year-range-header.d.ts
declare const useYearRangeHeader: ({
unlinkPanels,
leftDate,
rightDate
}: {
unlinkPanels: ToRef<boolean>;
leftDate: Ref<Dayjs>;
rightDate: Ref<Dayjs>;
}) => {
leftPrevYear: () => void;
rightNextYear: () => void;
leftNextYear: () => void;
rightPrevYear: () => void;
leftLabel: _$vue.ComputedRef<string>;
rightLabel: _$vue.ComputedRef<string>;
leftYear: _$vue.ComputedRef<number>;
rightYear: _$vue.ComputedRef<number>;
};
//#endregion
export { useYearRangeHeader };
@@ -0,0 +1,42 @@
import { computed } from "vue";
//#region ../../packages/components/date-picker-panel/src/composables/use-year-range-header.ts
const useYearRangeHeader = ({ unlinkPanels, leftDate, rightDate }) => {
const leftPrevYear = () => {
leftDate.value = leftDate.value.subtract(10, "year");
if (!unlinkPanels.value) rightDate.value = rightDate.value.subtract(10, "year");
};
const rightNextYear = () => {
if (!unlinkPanels.value) leftDate.value = leftDate.value.add(10, "year");
rightDate.value = rightDate.value.add(10, "year");
};
const leftNextYear = () => {
leftDate.value = leftDate.value.add(10, "year");
};
const rightPrevYear = () => {
rightDate.value = rightDate.value.subtract(10, "year");
};
return {
leftPrevYear,
rightNextYear,
leftNextYear,
rightPrevYear,
leftLabel: computed(() => {
const leftStartDate = Math.floor(leftDate.value.year() / 10) * 10;
return `${leftStartDate}-${leftStartDate + 9}`;
}),
rightLabel: computed(() => {
const rightStartDate = Math.floor(rightDate.value.year() / 10) * 10;
return `${rightStartDate}-${rightStartDate + 9}`;
}),
leftYear: computed(() => {
return Math.floor(leftDate.value.year() / 10) * 10 + 9;
}),
rightYear: computed(() => {
return Math.floor(rightDate.value.year() / 10) * 10;
})
};
};
//#endregion
export { useYearRangeHeader };
//# sourceMappingURL=use-year-range-header.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"use-year-range-header.mjs","names":[],"sources":["../../../../../../../packages/components/date-picker-panel/src/composables/use-year-range-header.ts"],"sourcesContent":["import { computed } from 'vue'\n\nimport type { Ref, ToRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const useYearRangeHeader = ({\n unlinkPanels,\n leftDate,\n rightDate,\n}: {\n unlinkPanels: ToRef<boolean>\n leftDate: Ref<Dayjs>\n rightDate: Ref<Dayjs>\n}) => {\n const leftPrevYear = () => {\n leftDate.value = leftDate.value.subtract(10, 'year')\n if (!unlinkPanels.value) {\n rightDate.value = rightDate.value.subtract(10, 'year')\n }\n }\n\n const rightNextYear = () => {\n if (!unlinkPanels.value) {\n leftDate.value = leftDate.value.add(10, 'year')\n }\n rightDate.value = rightDate.value.add(10, 'year')\n }\n\n const leftNextYear = () => {\n leftDate.value = leftDate.value.add(10, 'year')\n }\n\n const rightPrevYear = () => {\n rightDate.value = rightDate.value.subtract(10, 'year')\n }\n\n const leftLabel = computed(() => {\n const leftStartDate = Math.floor(leftDate.value.year() / 10) * 10\n return `${leftStartDate}-${leftStartDate + 9}`\n })\n\n const rightLabel = computed(() => {\n const rightStartDate = Math.floor(rightDate.value.year() / 10) * 10\n return `${rightStartDate}-${rightStartDate + 9}`\n })\n\n const leftYear = computed(() => {\n const leftEndDate = Math.floor(leftDate.value.year() / 10) * 10 + 9\n return leftEndDate\n })\n\n const rightYear = computed(() => {\n const rightStartDate = Math.floor(rightDate.value.year() / 10) * 10\n return rightStartDate\n })\n\n return {\n leftPrevYear,\n rightNextYear,\n leftNextYear,\n rightPrevYear,\n leftLabel,\n rightLabel,\n leftYear,\n rightYear,\n }\n}\n"],"mappings":";;AAKA,MAAa,sBAAsB,EACjC,cACA,UACA,gBAKI;CACJ,MAAM,qBAAqB;EACzB,SAAS,QAAQ,SAAS,MAAM,SAAS,IAAI,OAAO;EACpD,IAAI,CAAC,aAAa,OAChB,UAAU,QAAQ,UAAU,MAAM,SAAS,IAAI,OAAO;;CAI1D,MAAM,sBAAsB;EAC1B,IAAI,CAAC,aAAa,OAChB,SAAS,QAAQ,SAAS,MAAM,IAAI,IAAI,OAAO;EAEjD,UAAU,QAAQ,UAAU,MAAM,IAAI,IAAI,OAAO;;CAGnD,MAAM,qBAAqB;EACzB,SAAS,QAAQ,SAAS,MAAM,IAAI,IAAI,OAAO;;CAGjD,MAAM,sBAAsB;EAC1B,UAAU,QAAQ,UAAU,MAAM,SAAS,IAAI,OAAO;;CAuBxD,OAAO;EACL;EACA;EACA;EACA;EACA,WAzBgB,eAAe;GAC/B,MAAM,gBAAgB,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG,GAAG,GAAG;GAC/D,OAAO,GAAG,cAAc,GAAG,gBAAgB;IAuBlC;EACT,YArBiB,eAAe;GAChC,MAAM,iBAAiB,KAAK,MAAM,UAAU,MAAM,MAAM,GAAG,GAAG,GAAG;GACjE,OAAO,GAAG,eAAe,GAAG,iBAAiB;IAmBnC;EACV,UAjBe,eAAe;GAE9B,OADoB,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG,GAAG,GAAG,KAAK;IAgB1D;EACR,WAbgB,eAAe;GAE/B,OADuB,KAAK,MAAM,UAAU,MAAM,MAAM,GAAG,GAAG,GAAG;IAYxD;EACV"}