13202 lines
409 KiB
JavaScript
13202 lines
409 KiB
JavaScript
import {
|
||
VCombobox
|
||
} from "./chunk-244ON7Z6.js";
|
||
import {
|
||
VForm
|
||
} from "./chunk-5LZQZ6A5.js";
|
||
import {
|
||
VTextarea
|
||
} from "./chunk-T4XKRUDE.js";
|
||
import "./chunk-4MMPKXON.js";
|
||
import "./chunk-F6LZGKE2.js";
|
||
import {
|
||
VBottomNavigation
|
||
} from "./chunk-LFKLAYDH.js";
|
||
import {
|
||
VToolbarItems
|
||
} from "./chunk-RH43OVWP.js";
|
||
import {
|
||
VAlert,
|
||
VAlertTitle,
|
||
makeIconSizeProps,
|
||
useIconSizes
|
||
} from "./chunk-QMLWKRPM.js";
|
||
import {
|
||
VExpansionPanel,
|
||
VExpansionPanelText,
|
||
VExpansionPanelTitle,
|
||
VExpansionPanels
|
||
} from "./chunk-SCY7DFFY.js";
|
||
import {
|
||
VSlider,
|
||
VSliderThumb,
|
||
VSliderTrack,
|
||
getOffset,
|
||
makeSliderProps,
|
||
useSlider,
|
||
useSteps
|
||
} from "./chunk-WGWEQK64.js";
|
||
import {
|
||
VSheet,
|
||
makeVSheetProps
|
||
} from "./chunk-7M5DDQ46.js";
|
||
import {
|
||
VCard,
|
||
VCardActions,
|
||
VCardItem,
|
||
VCardSubtitle,
|
||
VCardText,
|
||
VCardTitle
|
||
} from "./chunk-3NOJ7Z44.js";
|
||
import {
|
||
VDataTable,
|
||
VDataTableFooter,
|
||
VDataTableHeaders,
|
||
VDataTableRow,
|
||
VDataTableRows,
|
||
VDataTableServer,
|
||
VDataTableVirtual,
|
||
VPagination,
|
||
VTable,
|
||
createPagination,
|
||
createSort,
|
||
makeDataTableExpandProps,
|
||
makeDataTableGroupProps,
|
||
makeDataTablePaginateProps,
|
||
makeDataTableSelectProps,
|
||
makeDataTableSortProps,
|
||
provideExpanded,
|
||
provideGroupBy,
|
||
providePagination,
|
||
provideSelection,
|
||
provideSort,
|
||
useGroupedItems,
|
||
useOptions,
|
||
usePaginatedItems,
|
||
useSortedItems
|
||
} from "./chunk-FCTFWI5H.js";
|
||
import {
|
||
highlightResult,
|
||
makeFilterProps,
|
||
useFilter
|
||
} from "./chunk-RB6DAYHX.js";
|
||
import "./chunk-QV3QXWPM.js";
|
||
import {
|
||
VSelect,
|
||
VVirtualScroll,
|
||
makeSelectProps,
|
||
useMenuActivator,
|
||
useScrolling
|
||
} from "./chunk-IZDIYS2S.js";
|
||
import {
|
||
VTextField,
|
||
makeVTextFieldProps
|
||
} from "./chunk-6MO6MKTY.js";
|
||
import "./chunk-IZQZFEAL.js";
|
||
import {
|
||
VCheckbox,
|
||
VCheckboxBtn
|
||
} from "./chunk-6HLLVLOR.js";
|
||
import {
|
||
VDialog,
|
||
makeVDialogProps
|
||
} from "./chunk-RWSHRKUK.js";
|
||
import {
|
||
VFileInput
|
||
} from "./chunk-EKMPZMZF.js";
|
||
import "./chunk-OI3EYDCB.js";
|
||
import {
|
||
VCounter,
|
||
VField,
|
||
VFieldLabel,
|
||
makeVFieldProps
|
||
} from "./chunk-ITO3JWXJ.js";
|
||
import {
|
||
VChip,
|
||
VChipGroup,
|
||
VSlideGroup,
|
||
VSlideGroupSymbol,
|
||
makeVSlideGroupProps
|
||
} from "./chunk-PLNIG6WP.js";
|
||
import {
|
||
VMenu,
|
||
makeVMenuProps
|
||
} from "./chunk-LPDOFVDK.js";
|
||
import {
|
||
VSnackbar,
|
||
makeVSnackbarProps
|
||
} from "./chunk-CCNWGDBL.js";
|
||
import {
|
||
VAppBar,
|
||
VAppBarNavIcon,
|
||
VAppBarTitle
|
||
} from "./chunk-P6EQK5CJ.js";
|
||
import {
|
||
VToolbar,
|
||
VToolbarTitle
|
||
} from "./chunk-H2QFYTJQ.js";
|
||
import {
|
||
VCol,
|
||
VContainer,
|
||
VRow,
|
||
VSpacer
|
||
} from "./chunk-CMTCIV56.js";
|
||
import {
|
||
VList,
|
||
VListGroup,
|
||
VListImg,
|
||
VListItem,
|
||
VListItemAction,
|
||
VListItemMedia,
|
||
VListItemSubtitle,
|
||
VListItemTitle,
|
||
VListSubheader,
|
||
makeVListGroupProps,
|
||
makeVListItemProps,
|
||
makeVListProps,
|
||
useItems,
|
||
useListItems
|
||
} from "./chunk-MQSMF5CI.js";
|
||
import {
|
||
VAvatar
|
||
} from "./chunk-SXI5CS7S.js";
|
||
import {
|
||
VDivider
|
||
} from "./chunk-X3WY3J75.js";
|
||
import {
|
||
VMain
|
||
} from "./chunk-Q5BHIW5H.js";
|
||
import {
|
||
VNavigationDrawer
|
||
} from "./chunk-ZB5S5BI5.js";
|
||
import {
|
||
VImg,
|
||
VResponsive,
|
||
makeVImgProps
|
||
} from "./chunk-TTIGZHWR.js";
|
||
import {
|
||
useSsrBoot
|
||
} from "./chunk-PCKQGDLK.js";
|
||
import {
|
||
VBreadcrumbs,
|
||
VBreadcrumbsDivider,
|
||
VBreadcrumbsItem
|
||
} from "./chunk-TN4XZECZ.js";
|
||
import {
|
||
VSwitch
|
||
} from "./chunk-L7BQJLEW.js";
|
||
import {
|
||
VSelectionControl,
|
||
VSelectionControlGroup,
|
||
makeSelectionControlGroupProps,
|
||
makeVSelectionControlProps
|
||
} from "./chunk-KHWE4FHS.js";
|
||
import {
|
||
VInput,
|
||
VLabel,
|
||
VMessages,
|
||
makeFocusProps,
|
||
makeVInputProps,
|
||
makeValidationProps,
|
||
useFocus,
|
||
useInputIcon,
|
||
useValidation
|
||
} from "./chunk-IK67YVHF.js";
|
||
import {
|
||
useForm
|
||
} from "./chunk-GAYXO4FM.js";
|
||
import {
|
||
VDialogBottomTransition,
|
||
VDialogTopTransition,
|
||
VDialogTransition,
|
||
VExpandTransition,
|
||
VExpandXTransition,
|
||
VFabTransition,
|
||
VFadeTransition,
|
||
VScaleTransition,
|
||
VScrollXReverseTransition,
|
||
VScrollXTransition,
|
||
VScrollYReverseTransition,
|
||
VScrollYTransition,
|
||
VSlideXReverseTransition,
|
||
VSlideXTransition,
|
||
VSlideYReverseTransition,
|
||
VSlideYTransition
|
||
} from "./chunk-B4JFJDWM.js";
|
||
import {
|
||
createDateRange,
|
||
daysDiff,
|
||
splitKeyCombination,
|
||
splitKeySequence,
|
||
useDate
|
||
} from "./chunk-WGYWYQOA.js";
|
||
import "./chunk-NJV3GUE4.js";
|
||
import {
|
||
resize_default,
|
||
touch_default
|
||
} from "./chunk-2AYDXCXT.js";
|
||
import {
|
||
VTooltip
|
||
} from "./chunk-EXUNAYJA.js";
|
||
import {
|
||
VOverlay,
|
||
useHydration
|
||
} from "./chunk-CL6G3ICF.js";
|
||
import {
|
||
makeLazyProps,
|
||
useLazy
|
||
} from "./chunk-YGX2Z63P.js";
|
||
import {
|
||
makeDelayProps,
|
||
useDelay,
|
||
useScopeId
|
||
} from "./chunk-BVUPSGRF.js";
|
||
import {
|
||
intersect_default
|
||
} from "./chunk-5ONGSJQ2.js";
|
||
import {
|
||
forwardRefs
|
||
} from "./chunk-GUNW7S2L.js";
|
||
import {
|
||
MaybeTransition,
|
||
makeTransitionProps
|
||
} from "./chunk-CAGZXMOS.js";
|
||
import {
|
||
makeDisplayProps,
|
||
useDisplay
|
||
} from "./chunk-N4LJHDYD.js";
|
||
import {
|
||
VApp
|
||
} from "./chunk-47GEKY7C.js";
|
||
import {
|
||
createLayout,
|
||
makeLayoutItemProps,
|
||
makeLayoutProps,
|
||
useLayoutItem
|
||
} from "./chunk-KQXZAEJP.js";
|
||
import "./chunk-MVBFAXEB.js";
|
||
import {
|
||
VBtn,
|
||
makeVBtnProps
|
||
} from "./chunk-UQALH6SL.js";
|
||
import {
|
||
VBtnGroup,
|
||
VBtnToggle
|
||
} from "./chunk-5AQLTWWS.js";
|
||
import {
|
||
makeGroupItemProps,
|
||
makeGroupProps,
|
||
useGroup,
|
||
useGroupItem
|
||
} from "./chunk-W6DJL42A.js";
|
||
import {
|
||
makePositionProps,
|
||
usePosition
|
||
} from "./chunk-HOEZWRBG.js";
|
||
import {
|
||
genOverlays,
|
||
makeVariantProps,
|
||
useVariant
|
||
} from "./chunk-ADXDXPPR.js";
|
||
import {
|
||
makeBorderProps,
|
||
useBorder
|
||
} from "./chunk-X7YBE6PF.js";
|
||
import {
|
||
makeElevationProps,
|
||
useElevation
|
||
} from "./chunk-YJD2PNP6.js";
|
||
import "./chunk-GSWLJLRT.js";
|
||
import {
|
||
VProgressCircular
|
||
} from "./chunk-MH76ZJYE.js";
|
||
import {
|
||
LoaderSlot
|
||
} from "./chunk-UXZ55AO7.js";
|
||
import {
|
||
VProgressLinear
|
||
} from "./chunk-6RFSM2OD.js";
|
||
import {
|
||
useIntersectionObserver
|
||
} from "./chunk-AJ7MUB7M.js";
|
||
import {
|
||
makeLocationProps,
|
||
useLocation
|
||
} from "./chunk-KTTVT6V2.js";
|
||
import {
|
||
makeDensityProps,
|
||
useDensity
|
||
} from "./chunk-TM3MIDYC.js";
|
||
import {
|
||
VIcon
|
||
} from "./chunk-4XZHKYGH.js";
|
||
import {
|
||
makeSizeProps,
|
||
useSize
|
||
} from "./chunk-PIT7IT55.js";
|
||
import {
|
||
makeRoundedProps,
|
||
useRounded
|
||
} from "./chunk-AQK3CYVW.js";
|
||
import {
|
||
VDefaultsProvider
|
||
} from "./chunk-PAT7NP2Z.js";
|
||
import {
|
||
makeTagProps
|
||
} from "./chunk-2HZIACSB.js";
|
||
import {
|
||
IconValue,
|
||
VClassIcon,
|
||
VComponentIcon,
|
||
VLigatureIcon,
|
||
VSvgIcon
|
||
} from "./chunk-OJDZBU5D.js";
|
||
import "./chunk-573D4TYC.js";
|
||
import {
|
||
ripple_default
|
||
} from "./chunk-DS4J67XG.js";
|
||
import {
|
||
computeColor,
|
||
useBackgroundColor,
|
||
useTextColor
|
||
} from "./chunk-BHV5Z34M.js";
|
||
import {
|
||
makeDimensionProps,
|
||
useDimension
|
||
} from "./chunk-6EZKHCRW.js";
|
||
import {
|
||
useResizeObserver
|
||
} from "./chunk-XDSAO7OT.js";
|
||
import {
|
||
provideLocale,
|
||
useLocale,
|
||
useRtl
|
||
} from "./chunk-ENTLCOCZ.js";
|
||
import {
|
||
useProxiedModel,
|
||
useToggleScope
|
||
} from "./chunk-KA77II4V.js";
|
||
import {
|
||
makeThemeProps,
|
||
provideTheme,
|
||
useTheme
|
||
} from "./chunk-3DSR7NCB.js";
|
||
import {
|
||
EventProp,
|
||
HSLtoHSV,
|
||
HSVtoCSS,
|
||
HSVtoHSL,
|
||
HSVtoHex,
|
||
HSVtoRGB,
|
||
HexToHSV,
|
||
IN_BROWSER,
|
||
PREFERS_REDUCED_MOTION,
|
||
RGBtoCSS,
|
||
RGBtoHSV,
|
||
SUPPORTS_EYE_DROPPER,
|
||
animate,
|
||
checkPrintable,
|
||
clamp,
|
||
consoleWarn,
|
||
convertToUnit,
|
||
createRange,
|
||
createSimpleFunctional,
|
||
debounce,
|
||
deepEqual,
|
||
deepToRaw,
|
||
defineComponent,
|
||
ensureValidVNode,
|
||
escapeForRegex,
|
||
extractNumber,
|
||
filterInputAttrs,
|
||
focusChild,
|
||
genericComponent,
|
||
getContrast,
|
||
getEventCoordinates,
|
||
getIndentLines,
|
||
getPrefixedEventHandlers,
|
||
getPropertyFromItem,
|
||
getScrollParent,
|
||
has,
|
||
isObject,
|
||
makeComponentProps,
|
||
matchesSelector,
|
||
mergeDeep,
|
||
noop,
|
||
omit,
|
||
parseColor,
|
||
pick,
|
||
pickWithRest,
|
||
propsFactory,
|
||
provideDefaults,
|
||
renderSlot,
|
||
standardEasing,
|
||
templateRef,
|
||
useRender,
|
||
wrapInArray
|
||
} from "./chunk-LZ5T2ERG.js";
|
||
import {
|
||
Fragment,
|
||
computed,
|
||
createBaseVNode,
|
||
createTextVNode,
|
||
createVNode,
|
||
effectScope,
|
||
guardReactiveProps,
|
||
inject,
|
||
mergeProps,
|
||
nextTick,
|
||
normalizeClass,
|
||
normalizeProps,
|
||
normalizeStyle,
|
||
onBeforeMount,
|
||
onBeforeUnmount,
|
||
onMounted,
|
||
onScopeDispose,
|
||
onUnmounted,
|
||
onUpdated,
|
||
provide,
|
||
reactive,
|
||
ref,
|
||
shallowRef,
|
||
toDisplayString,
|
||
toRaw,
|
||
toRef,
|
||
toRefs,
|
||
useId,
|
||
vShow,
|
||
watch,
|
||
watchEffect,
|
||
withDirectives
|
||
} from "./chunk-2MKFL3BX.js";
|
||
|
||
// node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.css";
|
||
var makeVAutocompleteProps = propsFactory({
|
||
autoSelectFirst: {
|
||
type: [Boolean, String]
|
||
},
|
||
clearOnSelect: Boolean,
|
||
search: String,
|
||
...makeFilterProps({
|
||
filterKeys: ["title"]
|
||
}),
|
||
...makeSelectProps(),
|
||
...omit(makeVTextFieldProps({
|
||
modelValue: null,
|
||
role: "combobox"
|
||
}), ["validationValue", "dirty"])
|
||
}, "VAutocomplete");
|
||
var VAutocomplete = genericComponent()({
|
||
name: "VAutocomplete",
|
||
props: makeVAutocompleteProps(),
|
||
emits: {
|
||
"update:focused": (focused) => true,
|
||
"update:search": (value) => true,
|
||
"update:modelValue": (value) => true,
|
||
"update:menu": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const vTextFieldRef = ref();
|
||
const isFocused = shallowRef(false);
|
||
const isPristine = shallowRef(true);
|
||
const listHasFocus = shallowRef(false);
|
||
const vMenuRef = ref();
|
||
const vVirtualScrollRef = ref();
|
||
const selectionIndex = shallowRef(-1);
|
||
const _searchLock = shallowRef(null);
|
||
const {
|
||
items,
|
||
transformIn,
|
||
transformOut
|
||
} = useItems(props);
|
||
const {
|
||
textColorClasses,
|
||
textColorStyles
|
||
} = useTextColor(() => vTextFieldRef.value?.color);
|
||
const {
|
||
InputIcon
|
||
} = useInputIcon(props);
|
||
const search = useProxiedModel(props, "search", "");
|
||
const model = useProxiedModel(props, "modelValue", [], (v) => transformIn(v === null ? [null] : wrapInArray(v)), (v) => {
|
||
const transformed = transformOut(v);
|
||
return props.multiple ? transformed : transformed[0] ?? null;
|
||
});
|
||
const counterValue = computed(() => {
|
||
return typeof props.counterValue === "function" ? props.counterValue(model.value) : typeof props.counterValue === "number" ? props.counterValue : model.value.length;
|
||
});
|
||
const form = useForm(props);
|
||
const {
|
||
filteredItems,
|
||
getMatches
|
||
} = useFilter(props, items, () => _searchLock.value ?? (isPristine.value ? "" : search.value));
|
||
const displayItems = computed(() => {
|
||
if (props.hideSelected && _searchLock.value === null) {
|
||
return filteredItems.value.filter((filteredItem) => !model.value.some((s) => s.value === filteredItem.value));
|
||
}
|
||
return filteredItems.value;
|
||
});
|
||
const closableChips = toRef(() => props.closableChips && !form.isReadonly.value && !form.isDisabled.value);
|
||
const hasChips = computed(() => !!(props.chips || slots.chip));
|
||
const hasSelectionSlot = computed(() => hasChips.value || !!slots.selection);
|
||
const selectedValues = computed(() => model.value.map((selection) => selection.props.value));
|
||
const firstSelectableItem = computed(() => displayItems.value.find((x) => x.type === "item" && !x.props.disabled));
|
||
const highlightFirst = computed(() => {
|
||
const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === "exact" && search.value === firstSelectableItem.value?.title;
|
||
return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
|
||
});
|
||
const menuDisabled = computed(() => props.hideNoData && !displayItems.value.length || form.isReadonly.value || form.isDisabled.value);
|
||
const _menu = useProxiedModel(props, "menu");
|
||
const menu = computed({
|
||
get: () => _menu.value,
|
||
set: (v) => {
|
||
if (_menu.value && !v && vMenuRef.value?.ΨopenChildren.size) return;
|
||
if (v && menuDisabled.value) return;
|
||
_menu.value = v;
|
||
}
|
||
});
|
||
const {
|
||
menuId,
|
||
ariaExpanded,
|
||
ariaControls
|
||
} = useMenuActivator(props, menu);
|
||
const listRef = ref();
|
||
const listEvents = useScrolling(listRef, vTextFieldRef);
|
||
function onClear(e) {
|
||
if (props.openOnClear) {
|
||
menu.value = true;
|
||
}
|
||
search.value = "";
|
||
}
|
||
function onMousedownControl() {
|
||
if (menuDisabled.value) return;
|
||
menu.value = true;
|
||
}
|
||
function onMousedownMenuIcon(e) {
|
||
if (menuDisabled.value) return;
|
||
if (isFocused.value) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
}
|
||
menu.value = !menu.value;
|
||
}
|
||
function onListKeydown(e) {
|
||
if (checkPrintable(e) || e.key === "Backspace") {
|
||
vTextFieldRef.value?.focus();
|
||
}
|
||
}
|
||
function onKeydown(e) {
|
||
if (form.isReadonly.value) return;
|
||
const selectionStart = vTextFieldRef.value?.selectionStart;
|
||
const length = model.value.length;
|
||
if (["Enter", "ArrowDown", "ArrowUp"].includes(e.key)) {
|
||
e.preventDefault();
|
||
}
|
||
if (["Enter", "ArrowDown"].includes(e.key)) {
|
||
menu.value = true;
|
||
}
|
||
if (["Escape"].includes(e.key)) {
|
||
menu.value = false;
|
||
}
|
||
if (highlightFirst.value && ["Enter", "Tab"].includes(e.key) && firstSelectableItem.value && !model.value.some((_ref2) => {
|
||
let {
|
||
value
|
||
} = _ref2;
|
||
return value === firstSelectableItem.value.value;
|
||
})) {
|
||
select(firstSelectableItem.value);
|
||
}
|
||
if (e.key === "ArrowDown" && highlightFirst.value) {
|
||
listRef.value?.focus("next");
|
||
}
|
||
if (["Backspace", "Delete"].includes(e.key)) {
|
||
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
||
if (~selectionIndex.value) {
|
||
e.preventDefault();
|
||
const originalSelectionIndex = selectionIndex.value;
|
||
select(model.value[selectionIndex.value], false);
|
||
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
||
} else if (e.key === "Backspace" && !search.value) {
|
||
selectionIndex.value = length - 1;
|
||
}
|
||
return;
|
||
}
|
||
if (!props.multiple) return;
|
||
if (e.key === "ArrowLeft") {
|
||
if (selectionIndex.value < 0 && selectionStart && selectionStart > 0) return;
|
||
const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
|
||
if (model.value[prev]) {
|
||
selectionIndex.value = prev;
|
||
} else {
|
||
const searchLength = search.value?.length ?? null;
|
||
selectionIndex.value = -1;
|
||
vTextFieldRef.value?.setSelectionRange(searchLength, searchLength);
|
||
}
|
||
} else if (e.key === "ArrowRight") {
|
||
if (selectionIndex.value < 0) return;
|
||
const next = selectionIndex.value + 1;
|
||
if (model.value[next]) {
|
||
selectionIndex.value = next;
|
||
} else {
|
||
selectionIndex.value = -1;
|
||
vTextFieldRef.value?.setSelectionRange(0, 0);
|
||
}
|
||
} else if (~selectionIndex.value && checkPrintable(e)) {
|
||
selectionIndex.value = -1;
|
||
}
|
||
}
|
||
function onChange(e) {
|
||
if (matchesSelector(vTextFieldRef.value, ":autofill") || matchesSelector(vTextFieldRef.value, ":-webkit-autofill")) {
|
||
const item = items.value.find((item2) => item2.title === e.target.value);
|
||
if (item) {
|
||
select(item);
|
||
}
|
||
}
|
||
}
|
||
function onAfterEnter() {
|
||
if (props.eager) {
|
||
vVirtualScrollRef.value?.calculateVisibleItems();
|
||
}
|
||
}
|
||
function onAfterLeave() {
|
||
if (isFocused.value) {
|
||
isPristine.value = true;
|
||
vTextFieldRef.value?.focus();
|
||
}
|
||
_searchLock.value = null;
|
||
}
|
||
function onFocusin(e) {
|
||
isFocused.value = true;
|
||
setTimeout(() => {
|
||
listHasFocus.value = true;
|
||
});
|
||
}
|
||
function onFocusout(e) {
|
||
listHasFocus.value = false;
|
||
}
|
||
function onUpdateModelValue(v) {
|
||
if (v == null || v === "" && !props.multiple && !hasSelectionSlot.value) model.value = [];
|
||
}
|
||
const isSelecting = shallowRef(false);
|
||
function select(item) {
|
||
let set = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
||
if (!item || item.props.disabled) return;
|
||
if (props.multiple) {
|
||
const index = model.value.findIndex((selection) => (props.valueComparator || deepEqual)(selection.value, item.value));
|
||
const add = set == null ? !~index : set;
|
||
if (~index) {
|
||
const value = add ? [...model.value, item] : [...model.value];
|
||
value.splice(index, 1);
|
||
model.value = value;
|
||
} else if (add) {
|
||
model.value = [...model.value, item];
|
||
}
|
||
if (props.clearOnSelect) {
|
||
search.value = "";
|
||
}
|
||
} else {
|
||
const add = set !== false;
|
||
model.value = add ? [item] : [];
|
||
_searchLock.value = isPristine.value ? "" : search.value ?? "";
|
||
search.value = add && !hasSelectionSlot.value ? item.title : "";
|
||
nextTick(() => {
|
||
menu.value = false;
|
||
isPristine.value = true;
|
||
});
|
||
}
|
||
}
|
||
watch(isFocused, (val, oldVal) => {
|
||
if (val === oldVal) return;
|
||
if (val) {
|
||
isSelecting.value = true;
|
||
search.value = props.multiple || hasSelectionSlot.value ? "" : String(model.value.at(-1)?.props.title ?? "");
|
||
isPristine.value = true;
|
||
nextTick(() => isSelecting.value = false);
|
||
} else {
|
||
if (!props.multiple && search.value == null) model.value = [];
|
||
menu.value = false;
|
||
if (!isPristine.value && search.value) {
|
||
_searchLock.value = search.value;
|
||
}
|
||
search.value = "";
|
||
selectionIndex.value = -1;
|
||
}
|
||
});
|
||
watch(search, (val) => {
|
||
if (!isFocused.value || isSelecting.value) return;
|
||
if (val) menu.value = true;
|
||
isPristine.value = !val;
|
||
});
|
||
watch(menu, (val) => {
|
||
if (!props.hideSelected && val && model.value.length && isPristine.value) {
|
||
const index = displayItems.value.findIndex((item) => model.value.some((s) => item.value === s.value));
|
||
IN_BROWSER && window.requestAnimationFrame(() => {
|
||
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
||
});
|
||
}
|
||
if (val) _searchLock.value = null;
|
||
});
|
||
watch(items, (newVal, oldVal) => {
|
||
if (menu.value) return;
|
||
if (isFocused.value && !oldVal.length && newVal.length) {
|
||
menu.value = true;
|
||
}
|
||
});
|
||
useRender(() => {
|
||
const hasList = !!(!props.hideNoData || displayItems.value.length || slots["prepend-item"] || slots["append-item"] || slots["no-data"]);
|
||
const isDirty = model.value.length > 0;
|
||
const textFieldProps = VTextField.filterProps(props);
|
||
return createVNode(VTextField, mergeProps({
|
||
"ref": vTextFieldRef
|
||
}, textFieldProps, {
|
||
"modelValue": search.value,
|
||
"onUpdate:modelValue": [($event) => search.value = $event, onUpdateModelValue],
|
||
"focused": isFocused.value,
|
||
"onUpdate:focused": ($event) => isFocused.value = $event,
|
||
"validationValue": model.externalValue,
|
||
"counterValue": counterValue.value,
|
||
"dirty": isDirty,
|
||
"onChange": onChange,
|
||
"class": ["v-autocomplete", `v-autocomplete--${props.multiple ? "multiple" : "single"}`, {
|
||
"v-autocomplete--active-menu": menu.value,
|
||
"v-autocomplete--chips": !!props.chips,
|
||
"v-autocomplete--selection-slot": !!hasSelectionSlot.value,
|
||
"v-autocomplete--selecting-index": selectionIndex.value > -1
|
||
}, props.class],
|
||
"style": props.style,
|
||
"readonly": form.isReadonly.value,
|
||
"placeholder": isDirty ? void 0 : props.placeholder,
|
||
"onClick:clear": onClear,
|
||
"onMousedown:control": onMousedownControl,
|
||
"onKeydown": onKeydown,
|
||
"aria-expanded": ariaExpanded.value,
|
||
"aria-controls": ariaControls.value
|
||
}), {
|
||
...slots,
|
||
default: (_ref3) => {
|
||
let {
|
||
id
|
||
} = _ref3;
|
||
return createBaseVNode(Fragment, null, [createVNode(VMenu, mergeProps({
|
||
"id": menuId.value,
|
||
"ref": vMenuRef,
|
||
"modelValue": menu.value,
|
||
"onUpdate:modelValue": ($event) => menu.value = $event,
|
||
"activator": "parent",
|
||
"contentClass": "v-autocomplete__content",
|
||
"disabled": menuDisabled.value,
|
||
"eager": props.eager,
|
||
"maxHeight": 310,
|
||
"openOnClick": false,
|
||
"closeOnContentClick": false,
|
||
"onAfterEnter": onAfterEnter,
|
||
"onAfterLeave": onAfterLeave
|
||
}, props.menuProps), {
|
||
default: () => [hasList && createVNode(VList, mergeProps({
|
||
"ref": listRef,
|
||
"filterable": true,
|
||
"selected": selectedValues.value,
|
||
"selectStrategy": props.multiple ? "independent" : "single-independent",
|
||
"onMousedown": (e) => e.preventDefault(),
|
||
"onKeydown": onListKeydown,
|
||
"onFocusin": onFocusin,
|
||
"onFocusout": onFocusout,
|
||
"tabindex": "-1",
|
||
"selectable": true,
|
||
"aria-live": "polite",
|
||
"aria-labelledby": `${id.value}-label`,
|
||
"aria-multiselectable": props.multiple,
|
||
"color": props.itemColor ?? props.color
|
||
}, listEvents, props.listProps), {
|
||
default: () => [slots["prepend-item"]?.(), !displayItems.value.length && !props.hideNoData && (slots["no-data"]?.() ?? createVNode(VListItem, {
|
||
"key": "no-data",
|
||
"title": t(props.noDataText)
|
||
}, null)), createVNode(VVirtualScroll, {
|
||
"ref": vVirtualScrollRef,
|
||
"renderless": true,
|
||
"items": displayItems.value,
|
||
"itemKey": "value"
|
||
}, {
|
||
default: (_ref4) => {
|
||
let {
|
||
item,
|
||
index,
|
||
itemRef
|
||
} = _ref4;
|
||
const itemProps = mergeProps(item.props, {
|
||
ref: itemRef,
|
||
key: item.value,
|
||
active: highlightFirst.value && item === firstSelectableItem.value ? true : void 0,
|
||
onClick: () => select(item, null),
|
||
"aria-posinset": index + 1,
|
||
"aria-setsize": displayItems.value.length
|
||
});
|
||
if (item.type === "divider") {
|
||
return slots.divider?.({
|
||
props: item.raw,
|
||
index
|
||
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
||
"key": `divider-${index}`
|
||
}), null);
|
||
}
|
||
if (item.type === "subheader") {
|
||
return slots.subheader?.({
|
||
props: item.raw,
|
||
index
|
||
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
||
"key": `subheader-${index}`
|
||
}), null);
|
||
}
|
||
return slots.item?.({
|
||
item,
|
||
index,
|
||
props: itemProps
|
||
}) ?? createVNode(VListItem, mergeProps(itemProps, {
|
||
"role": "option"
|
||
}), {
|
||
prepend: (_ref5) => {
|
||
let {
|
||
isSelected
|
||
} = _ref5;
|
||
return createBaseVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
||
"key": item.value,
|
||
"modelValue": isSelected,
|
||
"ripple": false,
|
||
"tabindex": "-1",
|
||
"aria-hidden": true,
|
||
"onClick": (event) => event.preventDefault()
|
||
}, null) : void 0, item.props.prependAvatar && createVNode(VAvatar, {
|
||
"image": item.props.prependAvatar
|
||
}, null), item.props.prependIcon && createVNode(VIcon, {
|
||
"icon": item.props.prependIcon
|
||
}, null)]);
|
||
},
|
||
title: () => {
|
||
return isPristine.value ? item.title : highlightResult("v-autocomplete", item.title, getMatches(item)?.title);
|
||
}
|
||
});
|
||
}
|
||
}), slots["append-item"]?.()]
|
||
})]
|
||
}), model.value.map((item, index) => {
|
||
function onChipClose(e) {
|
||
e.stopPropagation();
|
||
e.preventDefault();
|
||
select(item, false);
|
||
}
|
||
const slotProps = mergeProps(VChip.filterProps(item.props), {
|
||
"onClick:close": onChipClose,
|
||
onKeydown(e) {
|
||
if (e.key !== "Enter" && e.key !== " ") return;
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
onChipClose(e);
|
||
},
|
||
onMousedown(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
},
|
||
modelValue: true,
|
||
"onUpdate:modelValue": void 0
|
||
});
|
||
const hasSlot = hasChips.value ? !!slots.chip : !!slots.selection;
|
||
const slotContent = hasSlot ? ensureValidVNode(hasChips.value ? slots.chip({
|
||
item,
|
||
index,
|
||
props: slotProps
|
||
}) : slots.selection({
|
||
item,
|
||
index
|
||
})) : void 0;
|
||
if (hasSlot && !slotContent) return void 0;
|
||
return createBaseVNode("div", {
|
||
"key": item.value,
|
||
"class": normalizeClass(["v-autocomplete__selection", index === selectionIndex.value && ["v-autocomplete__selection--selected", textColorClasses.value]]),
|
||
"style": normalizeStyle(index === selectionIndex.value ? textColorStyles.value : {})
|
||
}, [hasChips.value ? !slots.chip ? createVNode(VChip, mergeProps({
|
||
"key": "chip",
|
||
"closable": closableChips.value,
|
||
"size": "small",
|
||
"text": item.title,
|
||
"disabled": item.props.disabled
|
||
}, slotProps), null) : createVNode(VDefaultsProvider, {
|
||
"key": "chip-defaults",
|
||
"defaults": {
|
||
VChip: {
|
||
closable: closableChips.value,
|
||
size: "small",
|
||
text: item.title
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slotContent]
|
||
}) : slotContent ?? createBaseVNode("span", {
|
||
"class": "v-autocomplete__selection-text"
|
||
}, [item.title, props.multiple && index < model.value.length - 1 && createBaseVNode("span", {
|
||
"class": "v-autocomplete__selection-comma"
|
||
}, [createTextVNode(",")])])]);
|
||
})]);
|
||
},
|
||
"append-inner": function() {
|
||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
return createBaseVNode(Fragment, null, [slots["append-inner"]?.(...args), props.menuIcon ? createVNode(VIcon, {
|
||
"class": "v-autocomplete__menu-icon",
|
||
"color": vTextFieldRef.value?.fieldIconColor,
|
||
"icon": props.menuIcon,
|
||
"onMousedown": onMousedownMenuIcon,
|
||
"onClick": noop,
|
||
"aria-hidden": true,
|
||
"tabindex": "-1"
|
||
}, null) : void 0, props.appendInnerIcon && createVNode(InputIcon, {
|
||
"key": "append-icon",
|
||
"name": "appendInner",
|
||
"color": args[0].iconColor.value
|
||
}, null)]);
|
||
}
|
||
});
|
||
});
|
||
return forwardRefs({
|
||
isFocused,
|
||
isPristine,
|
||
menu,
|
||
search,
|
||
filteredItems,
|
||
select
|
||
}, vTextFieldRef);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VBadge/VBadge.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VBadge/VBadge.css";
|
||
var makeVBadgeProps = propsFactory({
|
||
bordered: Boolean,
|
||
color: String,
|
||
content: [Number, String],
|
||
dot: Boolean,
|
||
floating: Boolean,
|
||
icon: IconValue,
|
||
inline: Boolean,
|
||
label: {
|
||
type: String,
|
||
default: "$vuetify.badge"
|
||
},
|
||
max: [Number, String],
|
||
modelValue: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
offsetX: [Number, String],
|
||
offsetY: [Number, String],
|
||
textColor: String,
|
||
...makeComponentProps(),
|
||
...makeLocationProps({
|
||
location: "top end"
|
||
}),
|
||
...makeRoundedProps(),
|
||
...makeTagProps(),
|
||
...makeThemeProps(),
|
||
...makeTransitionProps({
|
||
transition: "scale-rotate-transition"
|
||
}),
|
||
...makeDimensionProps()
|
||
}, "VBadge");
|
||
var VBadge = genericComponent()({
|
||
name: "VBadge",
|
||
inheritAttrs: false,
|
||
props: makeVBadgeProps(),
|
||
setup(props, ctx) {
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.color);
|
||
const {
|
||
roundedClasses
|
||
} = useRounded(props);
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const {
|
||
textColorClasses,
|
||
textColorStyles
|
||
} = useTextColor(() => props.textColor);
|
||
const {
|
||
themeClasses
|
||
} = useTheme();
|
||
const {
|
||
locationStyles
|
||
} = useLocation(props, true, (side) => {
|
||
const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;
|
||
return base + (["top", "bottom"].includes(side) ? Number(props.offsetY ?? 0) : ["left", "right"].includes(side) ? Number(props.offsetX ?? 0) : 0);
|
||
});
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
useRender(() => {
|
||
const value = Number(props.content);
|
||
const content = !props.max || isNaN(value) ? props.content : value <= Number(props.max) ? value : `${props.max}+`;
|
||
const [badgeAttrs, attrs] = pickWithRest(ctx.attrs, ["aria-atomic", "aria-label", "aria-live", "role", "title"]);
|
||
return createVNode(props.tag, mergeProps({
|
||
"class": ["v-badge", {
|
||
"v-badge--bordered": props.bordered,
|
||
"v-badge--dot": props.dot,
|
||
"v-badge--floating": props.floating,
|
||
"v-badge--inline": props.inline
|
||
}, props.class]
|
||
}, attrs, {
|
||
"style": props.style
|
||
}), {
|
||
default: () => [createBaseVNode("div", {
|
||
"class": "v-badge__wrapper"
|
||
}, [ctx.slots.default?.(), createVNode(MaybeTransition, {
|
||
"transition": props.transition
|
||
}, {
|
||
default: () => [withDirectives(createBaseVNode("span", mergeProps({
|
||
"class": ["v-badge__badge", themeClasses.value, backgroundColorClasses.value, roundedClasses.value, textColorClasses.value],
|
||
"style": [backgroundColorStyles.value, textColorStyles.value, dimensionStyles.value, props.inline ? {} : locationStyles.value],
|
||
"aria-atomic": "true",
|
||
"aria-label": t(props.label, value),
|
||
"aria-live": "polite",
|
||
"role": "status"
|
||
}, badgeAttrs), [props.dot ? void 0 : ctx.slots.badge ? ctx.slots.badge?.() : props.icon ? createVNode(VIcon, {
|
||
"icon": props.icon
|
||
}, null) : content]), [[vShow, props.modelValue]])]
|
||
})])]
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VBanner/VBanner.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VBanner/VBanner.css";
|
||
|
||
// node_modules/vuetify/lib/components/VBanner/VBannerActions.js
|
||
var makeVBannerActionsProps = propsFactory({
|
||
color: String,
|
||
density: String,
|
||
...makeComponentProps()
|
||
}, "VBannerActions");
|
||
var VBannerActions = genericComponent()({
|
||
name: "VBannerActions",
|
||
props: makeVBannerActionsProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
provideDefaults({
|
||
VBtn: {
|
||
color: props.color,
|
||
density: props.density,
|
||
slim: true,
|
||
variant: "text"
|
||
}
|
||
});
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-banner-actions", props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, [slots.default?.()]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VBanner/VBannerText.js
|
||
var VBannerText = createSimpleFunctional("v-banner-text");
|
||
|
||
// node_modules/vuetify/lib/components/VBanner/VBanner.js
|
||
var makeVBannerProps = propsFactory({
|
||
avatar: String,
|
||
bgColor: String,
|
||
color: String,
|
||
icon: IconValue,
|
||
lines: String,
|
||
stacked: Boolean,
|
||
sticky: Boolean,
|
||
text: String,
|
||
...makeBorderProps(),
|
||
...makeComponentProps(),
|
||
...makeDensityProps(),
|
||
...makeDimensionProps(),
|
||
...makeDisplayProps({
|
||
mobile: null
|
||
}),
|
||
...makeElevationProps(),
|
||
...makeLocationProps(),
|
||
...makePositionProps(),
|
||
...makeRoundedProps(),
|
||
...makeTagProps(),
|
||
...makeThemeProps()
|
||
}, "VBanner");
|
||
var VBanner = genericComponent()({
|
||
name: "VBanner",
|
||
props: makeVBannerProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.bgColor);
|
||
const {
|
||
borderClasses
|
||
} = useBorder(props);
|
||
const {
|
||
densityClasses
|
||
} = useDensity(props);
|
||
const {
|
||
displayClasses,
|
||
mobile
|
||
} = useDisplay(props);
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
const {
|
||
elevationClasses
|
||
} = useElevation(props);
|
||
const {
|
||
locationStyles
|
||
} = useLocation(props);
|
||
const {
|
||
positionClasses
|
||
} = usePosition(props);
|
||
const {
|
||
roundedClasses
|
||
} = useRounded(props);
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const color = toRef(() => props.color);
|
||
const density = toRef(() => props.density);
|
||
provideDefaults({
|
||
VBannerActions: {
|
||
color,
|
||
density
|
||
}
|
||
});
|
||
useRender(() => {
|
||
const hasText = !!(props.text || slots.text);
|
||
const hasPrependMedia = !!(props.avatar || props.icon);
|
||
const hasPrepend = !!(hasPrependMedia || slots.prepend);
|
||
return createVNode(props.tag, {
|
||
"class": normalizeClass(["v-banner", {
|
||
"v-banner--stacked": props.stacked || mobile.value,
|
||
"v-banner--sticky": props.sticky,
|
||
[`v-banner--${props.lines}-line`]: !!props.lines
|
||
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, densityClasses.value, displayClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, props.class]),
|
||
"style": normalizeStyle([backgroundColorStyles.value, dimensionStyles.value, locationStyles.value, props.style]),
|
||
"role": "banner"
|
||
}, {
|
||
default: () => [hasPrepend && createBaseVNode("div", {
|
||
"key": "prepend",
|
||
"class": "v-banner__prepend"
|
||
}, [!slots.prepend ? createVNode(VAvatar, {
|
||
"key": "prepend-avatar",
|
||
"color": color.value,
|
||
"density": density.value,
|
||
"icon": props.icon,
|
||
"image": props.avatar
|
||
}, null) : createVNode(VDefaultsProvider, {
|
||
"key": "prepend-defaults",
|
||
"disabled": !hasPrependMedia,
|
||
"defaults": {
|
||
VAvatar: {
|
||
color: color.value,
|
||
density: density.value,
|
||
icon: props.icon,
|
||
image: props.avatar
|
||
}
|
||
}
|
||
}, slots.prepend)]), createBaseVNode("div", {
|
||
"class": "v-banner__content"
|
||
}, [hasText && createVNode(VBannerText, {
|
||
"key": "text"
|
||
}, {
|
||
default: () => [slots.text?.() ?? props.text]
|
||
}), slots.default?.()]), slots.actions && createVNode(VBannerActions, {
|
||
"key": "actions"
|
||
}, slots.actions)]
|
||
});
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VBottomSheet/VBottomSheet.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VBottomSheet/VBottomSheet.css";
|
||
var makeVBottomSheetProps = propsFactory({
|
||
inset: Boolean,
|
||
...makeVDialogProps({
|
||
transition: "bottom-sheet-transition"
|
||
})
|
||
}, "VBottomSheet");
|
||
var VBottomSheet = genericComponent()({
|
||
name: "VBottomSheet",
|
||
props: makeVBottomSheetProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const isActive = useProxiedModel(props, "modelValue");
|
||
useRender(() => {
|
||
const dialogProps = VDialog.filterProps(props);
|
||
return createVNode(VDialog, mergeProps(dialogProps, {
|
||
"contentClass": ["v-bottom-sheet__content", props.contentClass],
|
||
"modelValue": isActive.value,
|
||
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
||
"class": ["v-bottom-sheet", {
|
||
"v-bottom-sheet--inset": props.inset
|
||
}, props.class],
|
||
"style": props.style
|
||
}), slots);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/VCalendar.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCalendar/VCalendarCategory.css";
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCalendar/VCalendarDaily.css";
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCalendar/VCalendarWeekly.css";
|
||
|
||
// node_modules/vuetify/lib/labs/VIconBtn/VIconBtn.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/labs/VIconBtn/VIconBtn.css";
|
||
var makeVIconBtnProps = propsFactory({
|
||
active: {
|
||
type: Boolean,
|
||
default: void 0
|
||
},
|
||
activeColor: String,
|
||
activeIcon: [String, Function, Object],
|
||
activeVariant: String,
|
||
baseVariant: {
|
||
type: String,
|
||
default: "tonal"
|
||
},
|
||
disabled: Boolean,
|
||
height: [Number, String],
|
||
width: [Number, String],
|
||
hideOverlay: Boolean,
|
||
icon: [String, Function, Object],
|
||
iconColor: String,
|
||
loading: Boolean,
|
||
opacity: [Number, String],
|
||
readonly: Boolean,
|
||
rotate: [Number, String],
|
||
size: {
|
||
type: [Number, String],
|
||
default: "default"
|
||
},
|
||
sizes: {
|
||
type: Array,
|
||
default: () => [["x-small", 16], ["small", 24], ["default", 40], ["large", 48], ["x-large", 56]]
|
||
},
|
||
text: {
|
||
type: [String, Number, Boolean],
|
||
default: void 0
|
||
},
|
||
...makeBorderProps(),
|
||
...makeComponentProps(),
|
||
...makeElevationProps(),
|
||
...makeIconSizeProps(),
|
||
...makeRoundedProps(),
|
||
...makeTagProps({
|
||
tag: "button"
|
||
}),
|
||
...makeThemeProps(),
|
||
...makeVariantProps({
|
||
variant: "flat"
|
||
})
|
||
}, "VIconBtn");
|
||
var VIconBtn = genericComponent()({
|
||
name: "VIconBtn",
|
||
props: makeVIconBtnProps(),
|
||
emits: {
|
||
"update:active": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
attrs,
|
||
slots
|
||
} = _ref;
|
||
const isActive = useProxiedModel(props, "active");
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
borderClasses
|
||
} = useBorder(props);
|
||
const {
|
||
elevationClasses
|
||
} = useElevation(props);
|
||
const {
|
||
roundedClasses
|
||
} = useRounded(props);
|
||
const {
|
||
colorClasses,
|
||
colorStyles,
|
||
variantClasses
|
||
} = useVariant(() => ({
|
||
color: (() => {
|
||
if (props.disabled) return void 0;
|
||
if (!isActive.value) return props.color;
|
||
return props.activeColor ?? props.color ?? "surface-variant";
|
||
})(),
|
||
variant: (() => {
|
||
if (isActive.value === void 0) return props.variant;
|
||
if (isActive.value) return props.activeVariant ?? props.variant;
|
||
return props.baseVariant ?? props.variant;
|
||
})()
|
||
}));
|
||
const btnSizeMap = new Map(props.sizes);
|
||
function onClick() {
|
||
if (props.disabled || props.readonly || isActive.value === void 0 || props.tag === "a" && attrs.href) return;
|
||
isActive.value = !isActive.value;
|
||
}
|
||
useRender(() => {
|
||
const icon = isActive.value ? props.activeIcon ?? props.icon : props.icon;
|
||
const _btnSize = props.size;
|
||
const hasNamedSize = btnSizeMap.has(_btnSize);
|
||
const btnSize = hasNamedSize ? btnSizeMap.get(_btnSize) : _btnSize;
|
||
const btnHeight = props.height ?? btnSize;
|
||
const btnWidth = props.width ?? btnSize;
|
||
const {
|
||
iconSize
|
||
} = useIconSizes(props, () => new Map(props.iconSizes).get(_btnSize));
|
||
const iconProps = {
|
||
icon,
|
||
size: iconSize.value,
|
||
color: props.iconColor,
|
||
opacity: props.opacity
|
||
};
|
||
return createVNode(props.tag, {
|
||
"type": props.tag === "button" ? "button" : void 0,
|
||
"class": normalizeClass([{
|
||
"v-icon-btn": true,
|
||
"v-icon-btn--active": isActive.value,
|
||
"v-icon-btn--disabled": props.disabled,
|
||
"v-icon-btn--loading": props.loading,
|
||
"v-icon-btn--readonly": props.readonly,
|
||
[`v-icon-btn--${props.size}`]: true
|
||
}, themeClasses.value, colorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, variantClasses.value, props.class]),
|
||
"style": normalizeStyle([{
|
||
"--v-icon-btn-rotate": convertToUnit(props.rotate, "deg"),
|
||
"--v-icon-btn-height": convertToUnit(btnHeight),
|
||
"--v-icon-btn-width": convertToUnit(btnWidth)
|
||
}, colorStyles.value, props.style]),
|
||
"tabindex": props.disabled || props.readonly ? -1 : 0,
|
||
"onClick": onClick
|
||
}, {
|
||
default: () => [genOverlays(!props.hideOverlay, "v-icon-btn"), createBaseVNode("div", {
|
||
"class": "v-icon-btn__content",
|
||
"data-no-activator": ""
|
||
}, [!slots.default && icon ? createVNode(VIcon, mergeProps({
|
||
"key": "content-icon"
|
||
}, iconProps), null) : createVNode(VDefaultsProvider, {
|
||
"key": "content-defaults",
|
||
"disabled": !icon,
|
||
"defaults": {
|
||
VIcon: {
|
||
...iconProps
|
||
}
|
||
}
|
||
}, {
|
||
default: () => slots.default?.() ?? toDisplayString(props.text)
|
||
})]), !!props.loading && createBaseVNode("span", {
|
||
"key": "loader",
|
||
"class": "v-icon-btn__loader"
|
||
}, [slots.loader?.() ?? createVNode(VProgressCircular, {
|
||
"color": typeof props.loading === "boolean" ? void 0 : props.loading,
|
||
"indeterminate": "disable-shrink",
|
||
"width": "2",
|
||
"size": iconSize.value
|
||
}, null)])]
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/util/dateTimeUtils.js
|
||
function isLeapYear(year) {
|
||
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/util/timestamp.js
|
||
var PARSE_REGEX = /^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/;
|
||
var PARSE_TIME = /(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/;
|
||
var DAYS_IN_MONTH = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||
var DAYS_IN_MONTH_LEAP = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||
var DAYS_IN_MONTH_MIN = 28;
|
||
var DAYS_IN_MONTH_MAX = 31;
|
||
var MONTH_MAX = 12;
|
||
var MONTH_MIN = 1;
|
||
var DAY_MIN = 1;
|
||
var DAYS_IN_WEEK = 7;
|
||
var MINUTES_IN_HOUR = 60;
|
||
var MINUTE_MAX = 59;
|
||
var MINUTES_IN_DAY = 24 * 60;
|
||
var HOURS_IN_DAY = 24;
|
||
var HOUR_MAX = 23;
|
||
var FIRST_HOUR = 0;
|
||
var OFFSET_YEAR = 1e4;
|
||
var OFFSET_MONTH = 100;
|
||
var OFFSET_HOUR = 100;
|
||
var OFFSET_TIME = 1e4;
|
||
function getStartOfWeek(timestamp, weekdays, today) {
|
||
const start = copyTimestamp(timestamp);
|
||
findWeekday(start, weekdays[0], prevDay);
|
||
updateFormatted(start);
|
||
if (today) {
|
||
updateRelative(start, today, start.hasTime);
|
||
}
|
||
return start;
|
||
}
|
||
function getEndOfWeek(timestamp, weekdays, today) {
|
||
const end = copyTimestamp(timestamp);
|
||
findWeekday(end, weekdays[weekdays.length - 1]);
|
||
updateFormatted(end);
|
||
if (today) {
|
||
updateRelative(end, today, end.hasTime);
|
||
}
|
||
return end;
|
||
}
|
||
function getStartOfMonth(timestamp) {
|
||
const start = copyTimestamp(timestamp);
|
||
start.day = DAY_MIN;
|
||
updateWeekday(start);
|
||
updateFormatted(start);
|
||
return start;
|
||
}
|
||
function getEndOfMonth(timestamp) {
|
||
const end = copyTimestamp(timestamp);
|
||
end.day = daysInMonth(end.year, end.month);
|
||
updateWeekday(end);
|
||
updateFormatted(end);
|
||
return end;
|
||
}
|
||
function validateNumber(input) {
|
||
return isFinite(parseInt(input));
|
||
}
|
||
function validateTime(input) {
|
||
return typeof input === "number" && isFinite(input) || !!PARSE_TIME.exec(input) || typeof input === "object" && isFinite(input.hour) && isFinite(input.minute);
|
||
}
|
||
function parseTime(input) {
|
||
if (typeof input === "number") {
|
||
return input;
|
||
} else if (typeof input === "string") {
|
||
const parts = PARSE_TIME.exec(input);
|
||
if (!parts) {
|
||
return false;
|
||
}
|
||
return parseInt(parts[1]) * 60 + parseInt(parts[3] || 0);
|
||
} else if (typeof input === "object") {
|
||
if (typeof input.hour !== "number" || typeof input.minute !== "number") {
|
||
return false;
|
||
}
|
||
return input.hour * 60 + input.minute;
|
||
} else {
|
||
return false;
|
||
}
|
||
}
|
||
function validateTimestamp(input) {
|
||
return typeof input === "number" && isFinite(input) || typeof input === "string" && !!PARSE_REGEX.exec(input) || input instanceof Date;
|
||
}
|
||
function parseTimestamp(input) {
|
||
let required = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
||
let now = arguments.length > 2 ? arguments[2] : void 0;
|
||
if (typeof input === "number" && isFinite(input)) {
|
||
input = new Date(input);
|
||
}
|
||
if (input instanceof Date) {
|
||
const date = parseDate(input);
|
||
if (now) {
|
||
updateRelative(date, now, date.hasTime);
|
||
}
|
||
return date;
|
||
}
|
||
if (typeof input !== "string") {
|
||
if (required) {
|
||
throw new Error(`${input} is not a valid timestamp. It must be a Date, number of milliseconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.`);
|
||
}
|
||
return null;
|
||
}
|
||
const parts = PARSE_REGEX.exec(input);
|
||
if (!parts) {
|
||
if (required) {
|
||
throw new Error(`${input} is not a valid timestamp. It must be a Date, number of milliseconds since Epoch, or a string in the format of YYYY-MM-DD or YYYY-MM-DD hh:mm. Zero-padding is optional and seconds are ignored.`);
|
||
}
|
||
return null;
|
||
}
|
||
const timestamp = {
|
||
date: input,
|
||
time: "",
|
||
year: parseInt(parts[1]),
|
||
month: parseInt(parts[2]),
|
||
day: parseInt(parts[4]) || 1,
|
||
hour: parseInt(parts[6]) || 0,
|
||
minute: parseInt(parts[8]) || 0,
|
||
weekday: 0,
|
||
hasDay: !!parts[4],
|
||
hasTime: !!(parts[6] && parts[8]),
|
||
past: false,
|
||
present: false,
|
||
future: false
|
||
};
|
||
updateWeekday(timestamp);
|
||
updateFormatted(timestamp);
|
||
if (now) {
|
||
updateRelative(timestamp, now, timestamp.hasTime);
|
||
}
|
||
return timestamp;
|
||
}
|
||
function parseDate(date) {
|
||
return updateFormatted({
|
||
date: "",
|
||
time: "",
|
||
year: date.getFullYear(),
|
||
month: date.getMonth() + 1,
|
||
day: date.getDate(),
|
||
weekday: date.getDay(),
|
||
hour: date.getHours(),
|
||
minute: date.getMinutes(),
|
||
hasDay: true,
|
||
hasTime: true,
|
||
past: false,
|
||
present: true,
|
||
future: false
|
||
});
|
||
}
|
||
function getDayIdentifier(timestamp) {
|
||
return timestamp.year * OFFSET_YEAR + timestamp.month * OFFSET_MONTH + timestamp.day;
|
||
}
|
||
function getTimeIdentifier(timestamp) {
|
||
return timestamp.hour * OFFSET_HOUR + timestamp.minute;
|
||
}
|
||
function getTimestampIdentifier(timestamp) {
|
||
return getDayIdentifier(timestamp) * OFFSET_TIME + getTimeIdentifier(timestamp);
|
||
}
|
||
function updateRelative(timestamp, now) {
|
||
let time = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
||
let a = getDayIdentifier(now);
|
||
let b = getDayIdentifier(timestamp);
|
||
let present = a === b;
|
||
if (timestamp.hasTime && time && present) {
|
||
a = getTimeIdentifier(now);
|
||
b = getTimeIdentifier(timestamp);
|
||
present = a === b;
|
||
}
|
||
timestamp.past = b < a;
|
||
timestamp.present = present;
|
||
timestamp.future = b > a;
|
||
return timestamp;
|
||
}
|
||
function isTimedless(input) {
|
||
return input instanceof Date || typeof input === "number" && isFinite(input);
|
||
}
|
||
function updateHasTime(timestamp, hasTime, now) {
|
||
if (timestamp.hasTime !== hasTime) {
|
||
timestamp.hasTime = hasTime;
|
||
if (!hasTime) {
|
||
timestamp.hour = HOUR_MAX;
|
||
timestamp.minute = MINUTE_MAX;
|
||
timestamp.time = getTime(timestamp);
|
||
}
|
||
if (now) {
|
||
updateRelative(timestamp, now, timestamp.hasTime);
|
||
}
|
||
}
|
||
return timestamp;
|
||
}
|
||
function updateMinutes(timestamp, minutes, now) {
|
||
timestamp.hasTime = true;
|
||
timestamp.hour = 0;
|
||
timestamp.minute = 0;
|
||
nextMinutes(timestamp, minutes);
|
||
updateFormatted(timestamp);
|
||
if (now) {
|
||
updateRelative(timestamp, now, true);
|
||
}
|
||
return timestamp;
|
||
}
|
||
function updateWeekday(timestamp) {
|
||
timestamp.weekday = getWeekday(timestamp);
|
||
return timestamp;
|
||
}
|
||
function updateFormatted(timestamp) {
|
||
timestamp.time = getTime(timestamp);
|
||
timestamp.date = getDate(timestamp);
|
||
return timestamp;
|
||
}
|
||
function getWeekday(timestamp) {
|
||
if (timestamp.hasDay) {
|
||
const _ = Math.floor;
|
||
const k = timestamp.day;
|
||
const m = (timestamp.month + 9) % MONTH_MAX + 1;
|
||
const C = _(timestamp.year / 100);
|
||
const Y = timestamp.year % 100 - (timestamp.month <= 2 ? 1 : 0);
|
||
return ((k + _(2.6 * m - 0.2) - 2 * C + Y + _(Y / 4) + _(C / 4)) % 7 + 7) % 7;
|
||
}
|
||
return timestamp.weekday;
|
||
}
|
||
function daysInMonth(year, month) {
|
||
return isLeapYear(year) ? DAYS_IN_MONTH_LEAP[month] : DAYS_IN_MONTH[month];
|
||
}
|
||
function copyTimestamp(timestamp) {
|
||
if (timestamp == null) return null;
|
||
const {
|
||
date,
|
||
time,
|
||
year,
|
||
month,
|
||
day,
|
||
weekday,
|
||
hour,
|
||
minute,
|
||
hasDay,
|
||
hasTime,
|
||
past,
|
||
present,
|
||
future
|
||
} = timestamp;
|
||
return {
|
||
date,
|
||
time,
|
||
year,
|
||
month,
|
||
day,
|
||
weekday,
|
||
hour,
|
||
minute,
|
||
hasDay,
|
||
hasTime,
|
||
past,
|
||
present,
|
||
future
|
||
};
|
||
}
|
||
function padNumber(x, length) {
|
||
let padded = String(x);
|
||
while (padded.length < length) {
|
||
padded = "0" + padded;
|
||
}
|
||
return padded;
|
||
}
|
||
function getDate(timestamp) {
|
||
let str = `${padNumber(timestamp.year, 4)}-${padNumber(timestamp.month, 2)}`;
|
||
if (timestamp.hasDay) str += `-${padNumber(timestamp.day, 2)}`;
|
||
return str;
|
||
}
|
||
function getTime(timestamp) {
|
||
if (!timestamp.hasTime) {
|
||
return "";
|
||
}
|
||
return `${padNumber(timestamp.hour, 2)}:${padNumber(timestamp.minute, 2)}`;
|
||
}
|
||
function nextMinutes(timestamp, minutes) {
|
||
timestamp.minute += minutes;
|
||
while (timestamp.minute >= MINUTES_IN_HOUR) {
|
||
timestamp.minute -= MINUTES_IN_HOUR;
|
||
timestamp.hour++;
|
||
if (timestamp.hour >= HOURS_IN_DAY) {
|
||
nextDay(timestamp);
|
||
timestamp.hour = FIRST_HOUR;
|
||
}
|
||
}
|
||
return timestamp;
|
||
}
|
||
function nextDay(timestamp) {
|
||
timestamp.day++;
|
||
timestamp.weekday = (timestamp.weekday + 1) % DAYS_IN_WEEK;
|
||
if (timestamp.day > DAYS_IN_MONTH_MIN && timestamp.day > daysInMonth(timestamp.year, timestamp.month)) {
|
||
timestamp.day = DAY_MIN;
|
||
timestamp.month++;
|
||
if (timestamp.month > MONTH_MAX) {
|
||
timestamp.month = MONTH_MIN;
|
||
timestamp.year++;
|
||
}
|
||
}
|
||
return timestamp;
|
||
}
|
||
function prevDay(timestamp) {
|
||
timestamp.day--;
|
||
timestamp.weekday = (timestamp.weekday + 6) % DAYS_IN_WEEK;
|
||
if (timestamp.day < DAY_MIN) {
|
||
timestamp.month--;
|
||
if (timestamp.month < MONTH_MIN) {
|
||
timestamp.year--;
|
||
timestamp.month = MONTH_MAX;
|
||
}
|
||
timestamp.day = daysInMonth(timestamp.year, timestamp.month);
|
||
}
|
||
return timestamp;
|
||
}
|
||
function relativeDays(timestamp) {
|
||
let mover = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : nextDay;
|
||
let days = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
||
while (--days >= 0) mover(timestamp);
|
||
return timestamp;
|
||
}
|
||
function diffMinutes(min, max) {
|
||
const Y = (max.year - min.year) * 525600;
|
||
const M = (max.month - min.month) * 43800;
|
||
const D = (max.day - min.day) * 1440;
|
||
const h = (max.hour - min.hour) * 60;
|
||
const m = max.minute - min.minute;
|
||
return Y + M + D + h + m;
|
||
}
|
||
function findWeekday(timestamp, weekday) {
|
||
let mover = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : nextDay;
|
||
let maxDays = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 6;
|
||
while (timestamp.weekday !== weekday && --maxDays >= 0) mover(timestamp);
|
||
return timestamp;
|
||
}
|
||
function getWeekdaySkips(weekdays) {
|
||
const skips = [1, 1, 1, 1, 1, 1, 1];
|
||
const filled = [0, 0, 0, 0, 0, 0, 0];
|
||
for (let i = 0; i < weekdays.length; i++) {
|
||
filled[weekdays[i]] = 1;
|
||
}
|
||
for (let k = 0; k < DAYS_IN_WEEK; k++) {
|
||
let skip = 1;
|
||
for (let j = 1; j < DAYS_IN_WEEK; j++) {
|
||
const next = (k + j) % DAYS_IN_WEEK;
|
||
if (filled[next]) {
|
||
break;
|
||
}
|
||
skip++;
|
||
}
|
||
skips[k] = filled[k] * skip;
|
||
}
|
||
return skips;
|
||
}
|
||
function timestampToDate(timestamp) {
|
||
const time = `${padNumber(timestamp.hour, 2)}:${padNumber(timestamp.minute, 2)}`;
|
||
const date = timestamp.date;
|
||
return /* @__PURE__ */ new Date(`${date}T${time}:00+00:00`);
|
||
}
|
||
function createDayList(start, end, now, weekdaySkips) {
|
||
let max = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 42;
|
||
let min = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
|
||
const stop = getDayIdentifier(end);
|
||
const days = [];
|
||
let current = copyTimestamp(start);
|
||
let currentIdentifier = 0;
|
||
let stopped = currentIdentifier === stop;
|
||
if (stop < getDayIdentifier(start)) {
|
||
throw new Error("End date is earlier than start date.");
|
||
}
|
||
while ((!stopped || days.length < min) && days.length < max) {
|
||
currentIdentifier = getDayIdentifier(current);
|
||
stopped = stopped || currentIdentifier === stop;
|
||
if (weekdaySkips[current.weekday] === 0) {
|
||
current = nextDay(current);
|
||
continue;
|
||
}
|
||
const day = copyTimestamp(current);
|
||
updateFormatted(day);
|
||
updateRelative(day, now);
|
||
days.push(day);
|
||
current = relativeDays(current, nextDay, weekdaySkips[current.weekday]);
|
||
}
|
||
if (!days.length) throw new Error("No dates found using specified start date, end date, and weekdays.");
|
||
return days;
|
||
}
|
||
function createIntervalList(timestamp, first, minutes, count, now) {
|
||
const intervals = [];
|
||
for (let i = 0; i < count; i++) {
|
||
const mins = first + i * minutes;
|
||
const int2 = copyTimestamp(timestamp);
|
||
intervals.push(updateMinutes(int2, mins, now));
|
||
}
|
||
return intervals;
|
||
}
|
||
function createNativeLocaleFormatter(locale, getOptions) {
|
||
const emptyFormatter = (_t, _s) => "";
|
||
if (typeof Intl === "undefined" || typeof Intl.DateTimeFormat === "undefined") {
|
||
return emptyFormatter;
|
||
}
|
||
return (timestamp, short) => {
|
||
try {
|
||
const intlFormatter = new Intl.DateTimeFormat(locale || void 0, getOptions(timestamp, short));
|
||
return intlFormatter.format(timestampToDate(timestamp));
|
||
} catch (e) {
|
||
return "";
|
||
}
|
||
};
|
||
}
|
||
function validateWeekdays(input) {
|
||
if (typeof input === "string") {
|
||
input = input.split(",");
|
||
}
|
||
if (Array.isArray(input)) {
|
||
const ints = input.map((x) => parseInt(x));
|
||
if (ints.length > DAYS_IN_WEEK || ints.length === 0) {
|
||
return false;
|
||
}
|
||
const visited = {};
|
||
let wrapped = false;
|
||
for (let i = 0; i < ints.length; i++) {
|
||
const x = ints[i];
|
||
if (!isFinite(x) || x < 0 || x >= DAYS_IN_WEEK) {
|
||
return false;
|
||
}
|
||
if (i > 0) {
|
||
const d = x - ints[i - 1];
|
||
if (d < 0) {
|
||
if (wrapped) {
|
||
return false;
|
||
}
|
||
wrapped = true;
|
||
} else if (d === 0) {
|
||
return false;
|
||
}
|
||
}
|
||
if (visited[x]) {
|
||
return false;
|
||
}
|
||
visited[x] = true;
|
||
}
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/composables/times.js
|
||
function useTimes(props) {
|
||
const times = reactive({
|
||
now: parseTimestamp("0000-00-00 00:00", true),
|
||
today: parseTimestamp("0000-00-00", true)
|
||
});
|
||
const parsedNow = computed(() => {
|
||
return props.now && validateTimestamp(props.now) ? parseTimestamp(props.now, true) : null;
|
||
});
|
||
function setPresent() {
|
||
times.now.present = times.today.present = true;
|
||
times.now.past = times.today.past = false;
|
||
times.now.future = times.today.future = false;
|
||
}
|
||
function getNow() {
|
||
return parseDate(/* @__PURE__ */ new Date());
|
||
}
|
||
function updateDay(now, target) {
|
||
if (now.date !== target.date) {
|
||
target.year = now.year;
|
||
target.month = now.month;
|
||
target.day = now.day;
|
||
target.weekday = now.weekday;
|
||
target.date = now.date;
|
||
}
|
||
}
|
||
function updateTime(now, target) {
|
||
if (now.time !== target.time) {
|
||
target.hour = now.hour;
|
||
target.minute = now.minute;
|
||
target.time = now.time;
|
||
}
|
||
}
|
||
function updateTimes() {
|
||
const now = parsedNow.value || getNow();
|
||
updateDay(now, times.now);
|
||
updateTime(now, times.now);
|
||
updateDay(now, times.today);
|
||
}
|
||
watch(parsedNow, updateTimes);
|
||
updateTimes();
|
||
setPresent();
|
||
return {
|
||
times,
|
||
parsedNow,
|
||
updateTimes,
|
||
setPresent,
|
||
getNow,
|
||
updateDay,
|
||
updateTime
|
||
};
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/composables/calendarBase.js
|
||
var makeCalendarBaseProps = propsFactory({
|
||
start: {
|
||
type: [String, Number, Date],
|
||
validate: validateTimestamp,
|
||
default: () => parseDate(/* @__PURE__ */ new Date()).date
|
||
},
|
||
end: {
|
||
type: [String, Number, Date],
|
||
validate: validateTimestamp
|
||
},
|
||
weekdays: {
|
||
type: [Array, String],
|
||
default: () => [0, 1, 2, 3, 4, 5, 6],
|
||
validate: validateWeekdays
|
||
},
|
||
firstDayOfWeek: [Number, String],
|
||
firstDayOfYear: [Number, String],
|
||
weekdayFormat: {
|
||
type: Function,
|
||
default: null
|
||
},
|
||
dayFormat: {
|
||
type: Function,
|
||
default: null
|
||
},
|
||
locale: String,
|
||
now: {
|
||
type: String,
|
||
validator: validateTimestamp
|
||
},
|
||
type: {
|
||
type: String,
|
||
default: "month"
|
||
}
|
||
}, "VCalendar-base");
|
||
function useCalendarBase(props) {
|
||
const {
|
||
times,
|
||
updateTimes
|
||
} = useTimes({
|
||
now: props.now
|
||
});
|
||
const locale = provideLocale(props);
|
||
const adapter = useDate();
|
||
const parsedStart = computed(() => {
|
||
if (props.type === "month") {
|
||
return getStartOfMonth(parseTimestamp(props.start, true));
|
||
}
|
||
return parseTimestamp(props.start, true);
|
||
});
|
||
const parsedEnd = computed(() => {
|
||
const start = parsedStart.value;
|
||
const end = props.end ? parseTimestamp(props.end) || start : start;
|
||
const value = getTimestampIdentifier(end) < getTimestampIdentifier(start) ? start : end;
|
||
if (props.type === "month") {
|
||
return getEndOfMonth(value);
|
||
}
|
||
return value;
|
||
});
|
||
const parsedValue = computed(() => {
|
||
return validateTimestamp(props.modelValue) ? parseTimestamp(props.modelValue, true) : parsedStart.value || times.today;
|
||
});
|
||
const parsedWeekdays = computed(() => {
|
||
const weekdays = Array.isArray(props.weekdays) ? props.weekdays : (props.weekdays || "").split(",").map((x) => parseInt(x, 10));
|
||
const first = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay();
|
||
return [...weekdays.toSorted().filter((v) => v >= first), ...weekdays.toSorted().filter((v) => v < first)];
|
||
});
|
||
const effectiveWeekdays = computed(() => {
|
||
const start = parsedValue.value;
|
||
const days2 = parseInt(String(props.categoryDays)) || 1;
|
||
switch (props.type) {
|
||
case "day":
|
||
return [start.weekday];
|
||
case "4day":
|
||
return [start.weekday, (start.weekday + 1) % 7, (start.weekday + 2) % 7, (start.weekday + 3) % 7];
|
||
case "category":
|
||
return Array.from({
|
||
length: days2
|
||
}, (_, i) => (start.weekday + i) % 7);
|
||
default:
|
||
return parsedWeekdays.value;
|
||
}
|
||
});
|
||
const weekdaySkips = computed(() => {
|
||
return getWeekdaySkips(parsedWeekdays.value);
|
||
});
|
||
const days = computed(() => {
|
||
return createDayList(parsedStart.value, parsedEnd.value, times.today, weekdaySkips.value);
|
||
});
|
||
const dayFormatter = computed(() => {
|
||
if (props.dayFormat) {
|
||
return props.dayFormat;
|
||
}
|
||
return createNativeLocaleFormatter(locale.current.value, () => ({
|
||
timeZone: "UTC",
|
||
day: "numeric"
|
||
}));
|
||
});
|
||
const weekdayFormatter = computed(() => {
|
||
if (props.weekdayFormat) {
|
||
return props.weekdayFormat;
|
||
}
|
||
return createNativeLocaleFormatter(locale.current.value, (_tms, short) => ({
|
||
timeZone: "UTC",
|
||
weekday: short ? "short" : "long"
|
||
}));
|
||
});
|
||
function getColorProps(colors) {
|
||
return computeColor(colors);
|
||
}
|
||
function getRelativeClasses(timestamp) {
|
||
let outside = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
||
return {
|
||
"v-present": timestamp.present,
|
||
"v-past": timestamp.past,
|
||
"v-future": timestamp.future,
|
||
"v-outside": outside
|
||
};
|
||
}
|
||
function getWeekNumber(timestamp) {
|
||
return adapter.getWeek(adapter.date(timestamp.date), props.firstDayOfWeek, props.firstDayOfYear);
|
||
}
|
||
function _getStartOfWeek(timestamp) {
|
||
return getStartOfWeek(timestamp, parsedWeekdays.value, times.today);
|
||
}
|
||
function _getEndOfWeek(timestamp) {
|
||
return getEndOfWeek(timestamp, parsedWeekdays.value, times.today);
|
||
}
|
||
function getFormatter(options) {
|
||
return createNativeLocaleFormatter(locale.current.value, () => options);
|
||
}
|
||
return {
|
||
times,
|
||
locale,
|
||
parsedValue,
|
||
parsedWeekdays,
|
||
effectiveWeekdays,
|
||
weekdaySkips,
|
||
parsedStart,
|
||
parsedEnd,
|
||
days,
|
||
dayFormatter,
|
||
weekdayFormatter,
|
||
getColorProps,
|
||
getRelativeClasses,
|
||
getWeekNumber,
|
||
getStartOfWeek: _getStartOfWeek,
|
||
getEndOfWeek: _getEndOfWeek,
|
||
getFormatter,
|
||
updateTimes
|
||
};
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/composables/calendarWithIntervals.js
|
||
var makeCalendarWithIntervalsProps = propsFactory({
|
||
maxDays: {
|
||
type: Number,
|
||
default: 7
|
||
},
|
||
intervalHeight: {
|
||
type: [Number, String],
|
||
default: 48,
|
||
validate: validateNumber
|
||
},
|
||
intervalWidth: {
|
||
type: [Number, String],
|
||
default: 60,
|
||
validate: validateNumber
|
||
},
|
||
intervalMinutes: {
|
||
type: [Number, String],
|
||
default: 60,
|
||
validate: validateNumber
|
||
},
|
||
firstInterval: {
|
||
type: [Number, String],
|
||
default: 0,
|
||
validate: validateNumber
|
||
},
|
||
firstTime: {
|
||
type: [Number, String, Object],
|
||
validate: validateTime
|
||
},
|
||
intervalCount: {
|
||
type: [Number, String],
|
||
default: 24,
|
||
validate: validateNumber
|
||
},
|
||
intervalFormat: {
|
||
type: Function,
|
||
default: null
|
||
},
|
||
intervalStyle: {
|
||
type: Function,
|
||
default: null
|
||
},
|
||
showIntervalLabel: {
|
||
type: Function,
|
||
default: null
|
||
}
|
||
}, "VCalendar-intervals");
|
||
function useCalendarWithIntervals(props) {
|
||
const base = useCalendarBase(props);
|
||
const scrollAreaRef = shallowRef();
|
||
const parsedFirstInterval = computed(() => {
|
||
return parseInt(String(props.firstInterval || 0));
|
||
});
|
||
const parsedIntervalMinutes = computed(() => {
|
||
return parseInt(String(props.intervalMinutes || 60));
|
||
});
|
||
const parsedIntervalCount = computed(() => {
|
||
return parseInt(String(props.intervalCount || 24));
|
||
});
|
||
const parsedIntervalHeight = computed(() => {
|
||
return parseFloat(String(props.intervalHeight || 48));
|
||
});
|
||
const parsedFirstTime = computed(() => {
|
||
return parseTime(props.firstTime);
|
||
});
|
||
const firstMinute = computed(() => {
|
||
const time = parsedFirstTime.value;
|
||
return time !== false && time >= 0 && time <= MINUTES_IN_DAY ? time : parsedFirstInterval.value * parsedIntervalMinutes.value;
|
||
});
|
||
const bodyHeight = computed(() => {
|
||
return parsedIntervalCount.value * parsedIntervalHeight.value;
|
||
});
|
||
const days = computed(() => {
|
||
return createDayList(base.parsedStart.value, base.parsedEnd.value, base.times.today, base.weekdaySkips.value, props.maxDays);
|
||
});
|
||
const intervals = computed(() => {
|
||
const daysValue = days.value;
|
||
const first = firstMinute.value;
|
||
const minutes = parsedIntervalMinutes.value;
|
||
const count = parsedIntervalCount.value;
|
||
const now = base.times.now;
|
||
return daysValue.map((d) => createIntervalList(d, first, minutes, count, now));
|
||
});
|
||
const intervalFormatter = computed(() => {
|
||
if (props.intervalFormat) {
|
||
return props.intervalFormat;
|
||
}
|
||
return createNativeLocaleFormatter(base.locale.current.value, (tms, short) => !short ? {
|
||
timeZone: "UTC",
|
||
hour: "2-digit",
|
||
minute: "2-digit"
|
||
} : tms.minute === 0 ? {
|
||
timeZone: "UTC",
|
||
hour: "numeric"
|
||
} : {
|
||
timeZone: "UTC",
|
||
hour: "numeric",
|
||
minute: "2-digit"
|
||
});
|
||
});
|
||
function showIntervalLabelDefault(interval) {
|
||
const first = intervals.value[0][0];
|
||
const isFirst = first.hour === interval.hour && first.minute === interval.minute;
|
||
return !isFirst;
|
||
}
|
||
function intervalStyleDefault(_interval) {
|
||
return void 0;
|
||
}
|
||
function getTimestampAtEvent(e, day) {
|
||
const timestamp = copyTimestamp(day);
|
||
const bounds = e.currentTarget.getBoundingClientRect();
|
||
const baseMinutes = firstMinute.value;
|
||
const touchEvent = e;
|
||
const mouseEvent = e;
|
||
const touches = touchEvent.changedTouches || touchEvent.touches;
|
||
const clientY = touches && touches[0] ? touches[0].clientY : mouseEvent.clientY;
|
||
const addIntervals = (clientY - bounds.top) / parsedIntervalHeight.value;
|
||
const addMinutes = Math.floor(addIntervals * parsedIntervalMinutes.value);
|
||
const minutes = baseMinutes + addMinutes;
|
||
return updateMinutes(timestamp, minutes, base.times.now);
|
||
}
|
||
function getSlotScope(timestamp) {
|
||
const scope = copyTimestamp(timestamp);
|
||
scope.timeToY = timeToY;
|
||
scope.timeDelta = timeDelta;
|
||
scope.minutesToPixels = minutesToPixels;
|
||
scope.week = days.value;
|
||
scope.intervalRange = [firstMinute.value, firstMinute.value + parsedIntervalCount.value * parsedIntervalMinutes.value];
|
||
return scope;
|
||
}
|
||
function scrollToTime(time) {
|
||
const y = timeToY(time);
|
||
const pane = scrollAreaRef.value;
|
||
if (y === false || !pane) {
|
||
return false;
|
||
}
|
||
pane.scrollTop = y;
|
||
return true;
|
||
}
|
||
function minutesToPixels(minutes) {
|
||
return minutes / parsedIntervalMinutes.value * parsedIntervalHeight.value;
|
||
}
|
||
function timeToY(time) {
|
||
let targetDateOrClamp = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
||
const clamp2 = targetDateOrClamp !== false;
|
||
const targetDate = typeof targetDateOrClamp !== "boolean" ? targetDateOrClamp : void 0;
|
||
let y = timeDelta(time, targetDate);
|
||
if (y === false) return y;
|
||
y *= bodyHeight.value;
|
||
if (clamp2) {
|
||
if (y < 0) {
|
||
y = 0;
|
||
} else if (y > bodyHeight.value) {
|
||
y = bodyHeight.value;
|
||
}
|
||
} else {
|
||
if (y < 0) {
|
||
y = y + bodyHeight.value;
|
||
} else if (y > bodyHeight.value) {
|
||
y = y - bodyHeight.value;
|
||
}
|
||
}
|
||
return y;
|
||
}
|
||
function timeDelta(time, targetDate) {
|
||
let minutes = parseTime(time);
|
||
if (minutes === false) {
|
||
return false;
|
||
}
|
||
const gap = parsedIntervalCount.value * parsedIntervalMinutes.value;
|
||
if (targetDate && typeof time === "object" && "day" in time) {
|
||
const a = getDayIdentifier(time);
|
||
const b = getDayIdentifier(targetDate);
|
||
minutes += (a - b) * gap;
|
||
}
|
||
const min = firstMinute.value;
|
||
return (minutes - min) / gap;
|
||
}
|
||
return {
|
||
...base,
|
||
scrollAreaRef,
|
||
parsedFirstInterval,
|
||
parsedIntervalMinutes,
|
||
parsedIntervalCount,
|
||
parsedIntervalHeight,
|
||
parsedFirstTime,
|
||
firstMinute,
|
||
bodyHeight,
|
||
days,
|
||
intervals,
|
||
intervalFormatter,
|
||
showIntervalLabelDefault,
|
||
intervalStyleDefault,
|
||
getTimestampAtEvent,
|
||
getSlotScope,
|
||
scrollToTime,
|
||
minutesToPixels,
|
||
timeToY,
|
||
timeDelta
|
||
};
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/VCalendarDaily.js
|
||
var VCalendarDaily = defineComponent({
|
||
name: "VCalendarDaily",
|
||
directives: {
|
||
vResize: resize_default
|
||
},
|
||
props: {
|
||
color: String,
|
||
shortWeekdays: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
shortIntervals: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
hideHeader: Boolean,
|
||
...makeCalendarBaseProps(),
|
||
...makeCalendarWithIntervalsProps()
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
attrs
|
||
} = _ref;
|
||
const scrollPush = ref(0);
|
||
const pane = ref();
|
||
const base = useCalendarWithIntervals(props);
|
||
function init() {
|
||
nextTick(onResize);
|
||
}
|
||
function onResize() {
|
||
scrollPush.value = getScrollPush();
|
||
}
|
||
function getScrollPush() {
|
||
return base.scrollAreaRef.value && pane.value ? base.scrollAreaRef.value.offsetWidth - pane.value.offsetWidth : 0;
|
||
}
|
||
function genHead() {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-daily__head",
|
||
"style": {
|
||
marginRight: scrollPush.value + "px"
|
||
}
|
||
}, [genHeadIntervals(), genHeadDays()]);
|
||
}
|
||
function genHeadIntervals() {
|
||
const width = convertToUnit(props.intervalWidth);
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-daily__intervals-head",
|
||
"style": {
|
||
width
|
||
}
|
||
}, [slots["interval-header"]?.()]);
|
||
}
|
||
function genHeadDays() {
|
||
return base.days.value.map(genHeadDay);
|
||
}
|
||
function genHeadDay(day, index) {
|
||
const events = getPrefixedEventHandlers(attrs, ":day", (nativeEvent) => ({
|
||
nativeEvent,
|
||
...base.getSlotScope(day)
|
||
}));
|
||
return createBaseVNode("div", mergeProps({
|
||
"key": day.date,
|
||
"class": ["v-calendar-daily_head-day", base.getRelativeClasses(day)]
|
||
}, events), [genHeadWeekday(day), genHeadDayLabel(day), genDayHeader(day, index)]);
|
||
}
|
||
function genDayHeader(day, index) {
|
||
return slots["day-header"]?.({
|
||
week: base.days.value,
|
||
...day,
|
||
index
|
||
}) ?? [];
|
||
}
|
||
function genHeadWeekday(day) {
|
||
const color = day.present ? props.color : void 0;
|
||
return createBaseVNode("div", mergeProps(base.getColorProps({
|
||
text: color
|
||
}), {
|
||
"class": "v-calendar-daily_head-weekday"
|
||
}), [base.weekdayFormatter.value(day, props.shortWeekdays)]);
|
||
}
|
||
function genHeadDayLabel(day) {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-daily_head-day-label"
|
||
}, [slots["day-label-header"]?.(day) ?? genHeadDayButton(day)]);
|
||
}
|
||
function genHeadDayButton(day) {
|
||
const events = getPrefixedEventHandlers(attrs, ":date", (nativeEvent) => ({
|
||
nativeEvent,
|
||
...day
|
||
}));
|
||
return createVNode(VIconBtn, mergeProps({
|
||
"active": day.present,
|
||
"activeColor": props.color,
|
||
"variant": "outlined",
|
||
"baseVariant": "text",
|
||
"onUpdate:active": noop
|
||
}, events), {
|
||
default: () => [base.dayFormatter.value(day, false)]
|
||
});
|
||
}
|
||
function genBody() {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-daily__body"
|
||
}, [genScrollArea()]);
|
||
}
|
||
function genScrollArea() {
|
||
return createBaseVNode("div", {
|
||
"ref": base.scrollAreaRef,
|
||
"class": "v-calendar-daily__scroll-area"
|
||
}, [genPane()]);
|
||
}
|
||
function genPane() {
|
||
return createBaseVNode("div", {
|
||
"ref": pane,
|
||
"class": "v-calendar-daily__pane",
|
||
"style": {
|
||
height: convertToUnit(base.bodyHeight.value)
|
||
}
|
||
}, [genDayContainer()]);
|
||
}
|
||
function genDayContainer() {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-daily__day-container"
|
||
}, [genBodyIntervals(), slots.days?.() ?? genDays()]);
|
||
}
|
||
function genDays() {
|
||
return base.days.value.map((day, index) => {
|
||
const events = getPrefixedEventHandlers(attrs, ":time", (nativeEvent) => ({
|
||
nativeEvent,
|
||
...base.getSlotScope(base.getTimestampAtEvent(nativeEvent, day))
|
||
}));
|
||
return createBaseVNode("div", mergeProps({
|
||
"key": day.date,
|
||
"class": ["v-calendar-daily__day", base.getRelativeClasses(day)]
|
||
}, events), [genDayIntervals(index), genDayBody(day)]);
|
||
});
|
||
}
|
||
function genDayBody(day) {
|
||
return slots["day-body"]?.(base.getSlotScope(day)) ?? [];
|
||
}
|
||
function genDayIntervals(index) {
|
||
return base.intervals.value[index].map(genDayInterval);
|
||
}
|
||
function genDayInterval(interval) {
|
||
const height = convertToUnit(props.intervalHeight);
|
||
const styler = props.intervalStyle || base.intervalStyleDefault;
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-daily__day-interval",
|
||
"key": interval.time,
|
||
"style": normalizeStyle([{
|
||
height
|
||
}, styler(interval)])
|
||
}, [slots.interval?.(base.getSlotScope(interval))]);
|
||
}
|
||
function genBodyIntervals() {
|
||
const width = convertToUnit(props.intervalWidth);
|
||
const events = getPrefixedEventHandlers(attrs, ":interval", (nativeEvent) => ({
|
||
nativeEvent,
|
||
...base.getTimestampAtEvent(nativeEvent, base.parsedStart.value)
|
||
}));
|
||
return createBaseVNode("div", mergeProps({
|
||
"class": "v-calendar-daily__intervals-body",
|
||
"style": {
|
||
width
|
||
}
|
||
}, events), [genIntervalLabels()]);
|
||
}
|
||
function genIntervalLabels() {
|
||
if (!base.intervals.value.length) return null;
|
||
return base.intervals.value[0].map(genIntervalLabel);
|
||
}
|
||
function genIntervalLabel(interval) {
|
||
const height = convertToUnit(props.intervalHeight);
|
||
const short = props.shortIntervals;
|
||
const shower = props.showIntervalLabel || base.showIntervalLabelDefault;
|
||
const show = shower(interval);
|
||
const label = show ? base.intervalFormatter.value(interval, short) : void 0;
|
||
return createBaseVNode("div", {
|
||
"key": interval.time,
|
||
"class": "v-calendar-daily__interval",
|
||
"style": {
|
||
height
|
||
}
|
||
}, [createBaseVNode("div", {
|
||
"class": "v-calendar-daily__interval-text"
|
||
}, [label])]);
|
||
}
|
||
onMounted(init);
|
||
useRender(() => withDirectives(createBaseVNode("div", {
|
||
"class": normalizeClass(["v-calendar-daily", attrs.class]),
|
||
"onDragstart": (e) => e.preventDefault()
|
||
}, [!props.hideHeader ? genHead() : void 0, genBody()]), [[resize_default, onResize, void 0, {
|
||
quiet: true
|
||
}]]));
|
||
return {
|
||
...base,
|
||
scrollPush,
|
||
pane,
|
||
init,
|
||
onResize,
|
||
getScrollPush
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/util/parser.js
|
||
function parsedCategoryText(category, categoryText) {
|
||
return typeof categoryText === "function" ? categoryText(category) : typeof categoryText === "string" && typeof category === "object" && category ? category[categoryText] : typeof category === "string" ? category : "";
|
||
}
|
||
function getParsedCategories(categories, categoryText) {
|
||
if (typeof categories === "string") return categories.split(/\s*,\s/);
|
||
if (Array.isArray(categories)) {
|
||
return categories.map((category) => {
|
||
if (typeof category === "string") return category;
|
||
const categoryName = typeof category.categoryName === "string" ? category.categoryName : parsedCategoryText(category, categoryText);
|
||
return {
|
||
...category,
|
||
categoryName
|
||
};
|
||
});
|
||
}
|
||
return [];
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/VCalendarCategory.js
|
||
var VCalendarCategory = defineComponent({
|
||
name: "VCalendarCategory",
|
||
props: {
|
||
categories: {
|
||
type: [Array, String],
|
||
default: ""
|
||
},
|
||
categoryText: [String, Function],
|
||
categoryForInvalid: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
...makeCalendarBaseProps(),
|
||
...makeCalendarWithIntervalsProps()
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
attrs
|
||
} = _ref;
|
||
const base = useCalendarWithIntervals(props);
|
||
const parsedCategories = computed(() => {
|
||
return getParsedCategories(props.categories, props.categoryText);
|
||
});
|
||
function getCategoryScope(scope, category) {
|
||
const cat = typeof category === "object" && category && category.categoryName === props.categoryForInvalid ? null : category;
|
||
return {
|
||
...scope,
|
||
category: cat
|
||
};
|
||
}
|
||
function genDayHeader(scope) {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-category__columns"
|
||
}, [parsedCategories.value.map((category) => {
|
||
return genDayHeaderCategory(scope, getCategoryScope(scope, category));
|
||
})]);
|
||
}
|
||
function genDayHeaderCategory(day, scope) {
|
||
const headerTitle = typeof scope.category === "object" ? scope.category.categoryName : scope.category;
|
||
const events = getPrefixedEventHandlers(attrs, ":dayCategory", () => {
|
||
return getCategoryScope(base.getSlotScope(day) || day, scope.category);
|
||
});
|
||
return createBaseVNode("div", mergeProps({
|
||
"class": "v-calendar-category__column-header"
|
||
}, events), [slots.category?.(scope) ?? genDayHeaderCategoryTitle(headerTitle), slots["day-header"]?.(scope)]);
|
||
}
|
||
function genDayHeaderCategoryTitle(categoryName) {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-category__category"
|
||
}, [categoryName === null ? props.categoryForInvalid : categoryName]);
|
||
}
|
||
function genDays() {
|
||
const days = [];
|
||
base.days.value.forEach((d, j) => {
|
||
const day = new Array(parsedCategories.value.length || 1);
|
||
day.fill(d);
|
||
days.push(...day.map((v, i) => genDay(v, j, i)));
|
||
});
|
||
return days;
|
||
}
|
||
function genDay(day, index, categoryIndex) {
|
||
const category = parsedCategories.value[categoryIndex];
|
||
const events = getPrefixedEventHandlers(attrs, ":time", (e) => {
|
||
return base.getSlotScope(base.getTimestampAtEvent(e, day));
|
||
});
|
||
return createBaseVNode("div", mergeProps({
|
||
"key": day.date + "-" + categoryIndex,
|
||
"class": ["v-calendar-daily__day", base.getRelativeClasses(day)]
|
||
}, events), [genDayIntervals(index, category), genDayBody(day, category)]);
|
||
}
|
||
function genDayIntervals(index, category) {
|
||
return base.intervals.value[index].map((v) => genDayInterval(v, category));
|
||
}
|
||
function genDayInterval(interval, category) {
|
||
const height = convertToUnit(props.intervalHeight);
|
||
const styler = props.intervalStyle || base.intervalStyleDefault;
|
||
return createBaseVNode("div", {
|
||
"key": interval.time,
|
||
"class": "v-calendar-daily__day-interval",
|
||
"style": normalizeStyle([{
|
||
height
|
||
}, styler({
|
||
...interval,
|
||
category
|
||
})])
|
||
}, [slots.interval?.(getCategoryScope(base.getSlotScope(interval), category))]);
|
||
}
|
||
function genDayBody(day, category) {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-category__columns"
|
||
}, [genDayBodyCategory(day, category)]);
|
||
}
|
||
function genDayBodyCategory(day, category) {
|
||
const events = getPrefixedEventHandlers(attrs, ":timeCategory", (e) => {
|
||
return getCategoryScope(base.getSlotScope(base.getTimestampAtEvent(e, day)), category);
|
||
});
|
||
return createBaseVNode("div", mergeProps({
|
||
"class": "v-calendar-category__column"
|
||
}, events), [slots["day-body"]?.(getCategoryScope(base.getSlotScope(day), category))]);
|
||
}
|
||
useRender(() => createVNode(VCalendarDaily, mergeProps({
|
||
"class": ["v-calendar-daily", "v-calendar-category"]
|
||
}, props), {
|
||
...slots,
|
||
days: genDays,
|
||
"day-header": genDayHeader
|
||
}));
|
||
return {
|
||
...base,
|
||
parsedCategories
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/VCalendarWeekly.js
|
||
var VCalendarWeekly = defineComponent({
|
||
name: "VCalendarWeekly",
|
||
props: {
|
||
minWeeks: {
|
||
validate: validateNumber,
|
||
default: 1
|
||
},
|
||
monthFormat: Function,
|
||
showWeek: Boolean,
|
||
color: String,
|
||
shortWeekdays: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
showMonthOnFirst: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
shortMonths: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
hideHeader: Boolean,
|
||
...makeCalendarBaseProps()
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
attrs
|
||
} = _ref;
|
||
const base = useCalendarBase(props);
|
||
const theme = useTheme();
|
||
const parsedMinWeeks = computed(() => {
|
||
return parseInt(String(props.minWeeks));
|
||
});
|
||
const days = computed(() => {
|
||
const minDays = parsedMinWeeks.value * base.parsedWeekdays.value.length;
|
||
const start = base.getStartOfWeek(base.parsedStart.value);
|
||
const end = base.getEndOfWeek(base.parsedEnd.value);
|
||
return createDayList(start, end, base.times.today, base.weekdaySkips.value, Number.MAX_SAFE_INTEGER, minDays);
|
||
});
|
||
const todayWeek = computed(() => {
|
||
const today = base.times.today;
|
||
const start = base.getStartOfWeek(today);
|
||
const end = base.getEndOfWeek(today);
|
||
return createDayList(start, end, today, base.weekdaySkips.value, base.parsedWeekdays.value.length, base.parsedWeekdays.value.length);
|
||
});
|
||
const monthFormatter = computed(() => {
|
||
if (props.monthFormat) {
|
||
return props.monthFormat;
|
||
}
|
||
return createNativeLocaleFormatter(base.locale.current.value, (_tms, short) => ({
|
||
timeZone: "UTC",
|
||
month: short ? "short" : "long"
|
||
}));
|
||
});
|
||
function isOutside(day) {
|
||
const dayIdentifier = getDayIdentifier(day);
|
||
return dayIdentifier < getDayIdentifier(base.parsedStart.value) || dayIdentifier > getDayIdentifier(base.parsedEnd.value);
|
||
}
|
||
function genHead() {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-weekly__head",
|
||
"role": "row"
|
||
}, [genHeadDays()]);
|
||
}
|
||
function genHeadDays() {
|
||
const header = todayWeek.value.map(genHeadDay);
|
||
if (props.showWeek) {
|
||
header.unshift(createBaseVNode("div", {
|
||
"class": "v-calendar-weekly__head-weeknumber"
|
||
}, null));
|
||
}
|
||
return header;
|
||
}
|
||
function genHeadDay(day, index) {
|
||
const outside = isOutside(days.value[index]);
|
||
const color = day.present ? props.color : void 0;
|
||
return createBaseVNode("div", mergeProps(base.getColorProps({
|
||
text: color
|
||
}), {
|
||
"key": day.date,
|
||
"class": ["v-calendar-weekly__head-weekday", base.getRelativeClasses(day, outside)],
|
||
"role": "columnheader"
|
||
}), [base.weekdayFormatter.value(day, props.shortWeekdays)]);
|
||
}
|
||
function genWeeks() {
|
||
const daysValue = days.value;
|
||
const weekDays = base.parsedWeekdays.value.length;
|
||
const weeks = [];
|
||
for (let i = 0; i < daysValue.length; i += weekDays) {
|
||
weeks.push(genWeek(daysValue.slice(i, i + weekDays), getWeekNumber(daysValue[i])));
|
||
}
|
||
return weeks;
|
||
}
|
||
function genWeek(week, weekNumber) {
|
||
const weekNodes = week.map((day, index) => genDay(day, index, week));
|
||
if (props.showWeek) {
|
||
weekNodes.unshift(genWeekNumber(weekNumber));
|
||
}
|
||
return createBaseVNode("div", {
|
||
"key": week[0].date,
|
||
"class": "v-calendar-weekly__week",
|
||
"role": "row"
|
||
}, [weekNodes]);
|
||
}
|
||
function getWeekNumber(determineDay) {
|
||
return base.getWeekNumber(determineDay);
|
||
}
|
||
function genWeekNumber(weekNumber) {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-weekly__weeknumber"
|
||
}, [createBaseVNode("small", null, [String(weekNumber)])]);
|
||
}
|
||
function genDay(day, index, week) {
|
||
const outside = isOutside(day);
|
||
const events = getPrefixedEventHandlers(attrs, ":day", (nativeEvent) => {
|
||
return {
|
||
nativeEvent,
|
||
...day
|
||
};
|
||
});
|
||
return createBaseVNode("div", mergeProps({
|
||
"key": day.date,
|
||
"class": ["v-calendar-weekly__day", base.getRelativeClasses(day, outside)],
|
||
"role": "cell"
|
||
}, events), [genDayLabel(day), slots.day?.({
|
||
outside,
|
||
index,
|
||
week,
|
||
...day
|
||
})]);
|
||
}
|
||
function genDayLabel(day) {
|
||
return createBaseVNode("div", {
|
||
"class": "v-calendar-weekly__day-label"
|
||
}, [slots["day-label"]?.(day) ?? genDayLabelButton(day)]);
|
||
}
|
||
function genDayLabelButton(day) {
|
||
const hasMonth = day.day === 1 && props.showMonthOnFirst;
|
||
const events = getPrefixedEventHandlers(attrs, ":date", (nativeEvent) => ({
|
||
nativeEvent,
|
||
...day
|
||
}));
|
||
return createVNode(VIconBtn, mergeProps({
|
||
"active": day.present,
|
||
"activeColor": props.color,
|
||
"variant": "outlined",
|
||
"baseVariant": "text",
|
||
"onUpdate:active": noop
|
||
}, events), {
|
||
default: () => [hasMonth ? monthFormatter.value(day, props.shortMonths) + " " + base.dayFormatter.value(day, false) : base.dayFormatter.value(day, false)]
|
||
});
|
||
}
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-calendar-weekly", theme.themeClasses.value]),
|
||
"onDragstart": (e) => e.preventDefault()
|
||
}, [!props.hideHeader ? genHead() : void 0, genWeeks()]));
|
||
return {
|
||
...base,
|
||
days,
|
||
todayWeek,
|
||
monthFormatter,
|
||
isOutside
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/composables/calendarWithEvents.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCalendar/composables/calendarWithEvents.css";
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/modes/common.js
|
||
var MILLIS_IN_DAY = 864e5;
|
||
function getVisuals(events) {
|
||
let minStart = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
||
const visuals = events.map((event) => ({
|
||
event,
|
||
columnCount: 0,
|
||
column: 0,
|
||
left: 0,
|
||
width: 100
|
||
}));
|
||
visuals.sort((a, b) => {
|
||
return Math.max(minStart, a.event.startTimestampIdentifier) - Math.max(minStart, b.event.startTimestampIdentifier) || b.event.endTimestampIdentifier - a.event.endTimestampIdentifier;
|
||
});
|
||
return visuals;
|
||
}
|
||
function hasOverlap(s0, e0, s1, e1) {
|
||
let exclude = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;
|
||
return exclude ? !(s0 >= e1 || e0 <= s1) : !(s0 > e1 || e0 < s1);
|
||
}
|
||
function setColumnCount(groups) {
|
||
groups.forEach((group) => {
|
||
group.visuals.forEach((groupVisual) => {
|
||
groupVisual.columnCount = groups.length;
|
||
});
|
||
});
|
||
}
|
||
function getRange(event) {
|
||
return [event.startTimestampIdentifier, event.endTimestampIdentifier];
|
||
}
|
||
function getDayRange(event) {
|
||
return [event.startIdentifier, event.endIdentifier];
|
||
}
|
||
function getNormalizedRange(event, dayStart) {
|
||
return [Math.max(dayStart, event.startTimestampIdentifier), Math.min(dayStart + MILLIS_IN_DAY, event.endTimestampIdentifier)];
|
||
}
|
||
function getOpenGroup(groups, start, end, timed) {
|
||
for (let i = 0; i < groups.length; i++) {
|
||
const group = groups[i];
|
||
let intersected = false;
|
||
if (hasOverlap(start, end, group.start, group.end, timed)) {
|
||
for (let k = 0; k < group.visuals.length; k++) {
|
||
const groupVisual = group.visuals[k];
|
||
const [groupStart, groupEnd] = timed ? getRange(groupVisual.event) : getDayRange(groupVisual.event);
|
||
if (hasOverlap(start, end, groupStart, groupEnd, timed)) {
|
||
intersected = true;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
if (!intersected) {
|
||
return i;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function getOverlapGroupHandler(firstWeekday) {
|
||
const handler = {
|
||
groups: [],
|
||
min: -1,
|
||
max: -1,
|
||
reset: () => {
|
||
handler.groups = [];
|
||
handler.min = handler.max = -1;
|
||
},
|
||
getVisuals: function(day, dayEvents, timed) {
|
||
let reset = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
||
if (day.weekday === firstWeekday || reset) {
|
||
handler.reset();
|
||
}
|
||
const dayStart = getTimestampIdentifier(day);
|
||
const visuals = getVisuals(dayEvents, dayStart);
|
||
visuals.forEach((visual) => {
|
||
const [start, end] = timed ? getRange(visual.event) : getDayRange(visual.event);
|
||
if (handler.groups.length > 0 && !hasOverlap(start, end, handler.min, handler.max, timed)) {
|
||
setColumnCount(handler.groups);
|
||
handler.reset();
|
||
}
|
||
let targetGroup = getOpenGroup(handler.groups, start, end, timed);
|
||
if (targetGroup === -1) {
|
||
targetGroup = handler.groups.length;
|
||
handler.groups.push({
|
||
start,
|
||
end,
|
||
visuals: []
|
||
});
|
||
}
|
||
const target = handler.groups[targetGroup];
|
||
target.visuals.push(visual);
|
||
target.start = Math.min(target.start, start);
|
||
target.end = Math.max(target.end, end);
|
||
visual.column = targetGroup;
|
||
if (handler.min === -1) {
|
||
handler.min = start;
|
||
handler.max = end;
|
||
} else {
|
||
handler.min = Math.min(handler.min, start);
|
||
handler.max = Math.max(handler.max, end);
|
||
}
|
||
});
|
||
setColumnCount(handler.groups);
|
||
if (timed) {
|
||
handler.reset();
|
||
}
|
||
return visuals;
|
||
}
|
||
};
|
||
return handler;
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/modes/column.js
|
||
var FULL_WIDTH = 100;
|
||
var column = (events, firstWeekday, overlapThreshold) => {
|
||
const handler = getOverlapGroupHandler(firstWeekday);
|
||
return (day, dayEvents, timed, reset) => {
|
||
const visuals = handler.getVisuals(day, dayEvents, timed, reset);
|
||
if (timed) {
|
||
visuals.forEach((visual) => {
|
||
visual.left = visual.column * FULL_WIDTH / visual.columnCount;
|
||
visual.width = FULL_WIDTH / visual.columnCount;
|
||
});
|
||
}
|
||
return visuals;
|
||
};
|
||
};
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/modes/stack.js
|
||
var FULL_WIDTH2 = 100;
|
||
var DEFAULT_OFFSET = 5;
|
||
var WIDTH_MULTIPLIER = 1.7;
|
||
var stack = (events, firstWeekday, overlapThreshold) => {
|
||
const handler = getOverlapGroupHandler(firstWeekday);
|
||
return (day, dayEvents, timed, reset) => {
|
||
if (!timed) {
|
||
return handler.getVisuals(day, dayEvents, timed, reset);
|
||
}
|
||
const dayStart = getTimestampIdentifier(day);
|
||
const visuals = getVisuals(dayEvents, dayStart);
|
||
const groups = getGroups(visuals, dayStart);
|
||
for (const group of groups) {
|
||
const nodes = [];
|
||
for (const visual of group.visuals) {
|
||
const child = getNode(visual, dayStart);
|
||
const index = getNextIndex(child, nodes);
|
||
if (index === false) {
|
||
const parent = getParent(child, nodes);
|
||
if (parent) {
|
||
child.parent = parent;
|
||
child.sibling = hasOverlap(child.start, child.end, parent.start, addTime(parent.start, overlapThreshold));
|
||
child.index = parent.index + 1;
|
||
parent.children.push(child);
|
||
}
|
||
} else {
|
||
const [parent] = getOverlappingRange(child, nodes, index - 1, index - 1);
|
||
const children = getOverlappingRange(child, nodes, index + 1, index + nodes.length, true);
|
||
child.children = children;
|
||
child.index = index;
|
||
if (parent) {
|
||
child.parent = parent;
|
||
child.sibling = hasOverlap(child.start, child.end, parent.start, addTime(parent.start, overlapThreshold));
|
||
parent.children.push(child);
|
||
}
|
||
for (const grand of children) {
|
||
if (grand.parent === parent) {
|
||
grand.parent = child;
|
||
}
|
||
const grandNext = grand.index - child.index <= 1;
|
||
if (grandNext && child.sibling && hasOverlap(child.start, addTime(child.start, overlapThreshold), grand.start, grand.end)) {
|
||
grand.sibling = true;
|
||
}
|
||
}
|
||
}
|
||
nodes.push(child);
|
||
}
|
||
calculateBounds(nodes, overlapThreshold);
|
||
}
|
||
visuals.sort((a, b) => a.left - b.left || a.event.startTimestampIdentifier - b.event.startTimestampIdentifier);
|
||
return visuals;
|
||
};
|
||
};
|
||
function calculateBounds(nodes, overlapThreshold) {
|
||
for (const node of nodes) {
|
||
const {
|
||
visual,
|
||
parent
|
||
} = node;
|
||
const columns = getMaxChildIndex(node) + 1;
|
||
const spaceLeft = parent ? parent.visual.left : 0;
|
||
const spaceWidth = FULL_WIDTH2 - spaceLeft;
|
||
const offset = Math.min(DEFAULT_OFFSET, FULL_WIDTH2 / columns);
|
||
const columnWidthMultiplier = getColumnWidthMultiplier(node, nodes);
|
||
const columnOffset = spaceWidth / (columns - node.index + 1);
|
||
const columnWidth = spaceWidth / (columns - node.index + (node.sibling ? 1 : 0)) * columnWidthMultiplier;
|
||
if (parent) {
|
||
visual.left = node.sibling ? spaceLeft + columnOffset : spaceLeft + offset;
|
||
}
|
||
visual.width = hasFullWidth(node, nodes, overlapThreshold) ? FULL_WIDTH2 - visual.left : Math.min(FULL_WIDTH2 - visual.left, columnWidth * WIDTH_MULTIPLIER);
|
||
}
|
||
}
|
||
function getColumnWidthMultiplier(node, nodes) {
|
||
if (!node.children.length) {
|
||
return 1;
|
||
}
|
||
const maxColumn = node.index + nodes.length;
|
||
const minColumn = node.children.reduce((min, c) => Math.min(min, c.index), maxColumn);
|
||
return minColumn - node.index;
|
||
}
|
||
function getOverlappingIndices(node, nodes) {
|
||
const indices = [];
|
||
for (const other of nodes) {
|
||
if (hasOverlap(node.start, node.end, other.start, other.end)) {
|
||
indices.push(other.index);
|
||
}
|
||
}
|
||
return indices;
|
||
}
|
||
function getNextIndex(node, nodes) {
|
||
const indices = getOverlappingIndices(node, nodes);
|
||
indices.sort();
|
||
for (let i = 0; i < indices.length; i++) {
|
||
if (i < indices[i]) {
|
||
return i;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function getOverlappingRange(node, nodes, indexMin, indexMax) {
|
||
let returnFirstColumn = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
||
const overlapping = [];
|
||
for (const other of nodes) {
|
||
if (other.index >= indexMin && other.index <= indexMax && hasOverlap(node.start, node.end, other.start, other.end)) {
|
||
overlapping.push(other);
|
||
}
|
||
}
|
||
if (returnFirstColumn && overlapping.length > 0) {
|
||
const first = overlapping.reduce((min, n) => Math.min(min, n.index), overlapping[0].index);
|
||
return overlapping.filter((n) => n.index === first);
|
||
}
|
||
return overlapping;
|
||
}
|
||
function getParent(node, nodes) {
|
||
let parent = null;
|
||
for (const other of nodes) {
|
||
if (hasOverlap(node.start, node.end, other.start, other.end) && (parent === null || other.index > parent.index)) {
|
||
parent = other;
|
||
}
|
||
}
|
||
return parent;
|
||
}
|
||
function hasFullWidth(node, nodes, overlapThreshold) {
|
||
for (const other of nodes) {
|
||
if (other !== node && other.index > node.index && hasOverlap(node.start, addTime(node.start, overlapThreshold), other.start, other.end)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function getGroups(visuals, dayStart) {
|
||
const groups = [];
|
||
for (const visual of visuals) {
|
||
const [start, end] = getNormalizedRange(visual.event, dayStart);
|
||
let added = false;
|
||
for (const group of groups) {
|
||
if (hasOverlap(start, end, group.start, group.end)) {
|
||
group.visuals.push(visual);
|
||
group.end = Math.max(group.end, end);
|
||
added = true;
|
||
break;
|
||
}
|
||
}
|
||
if (!added) {
|
||
groups.push({
|
||
start,
|
||
end,
|
||
visuals: [visual]
|
||
});
|
||
}
|
||
}
|
||
return groups;
|
||
}
|
||
function getNode(visual, dayStart) {
|
||
const [start, end] = getNormalizedRange(visual.event, dayStart);
|
||
return {
|
||
parent: null,
|
||
sibling: true,
|
||
index: 0,
|
||
visual,
|
||
start,
|
||
end,
|
||
children: []
|
||
};
|
||
}
|
||
function getMaxChildIndex(node) {
|
||
let max = node.index;
|
||
for (const child of node.children) {
|
||
const childMax = getMaxChildIndex(child);
|
||
if (childMax > max) {
|
||
max = childMax;
|
||
}
|
||
}
|
||
return max;
|
||
}
|
||
function addTime(identifier, minutes) {
|
||
const removeMinutes = identifier % 100;
|
||
const totalMinutes = removeMinutes + minutes;
|
||
const addHours = Math.floor(totalMinutes / 60);
|
||
const addMinutes = totalMinutes % 60;
|
||
return identifier - removeMinutes + addHours * 100 + addMinutes;
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/modes/index.js
|
||
var CalendarEventOverlapModes = {
|
||
stack,
|
||
column
|
||
};
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/util/events.js
|
||
function parseEvent(input, index, startProperty, endProperty) {
|
||
let timed = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
||
let category = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
||
const startInput = input[startProperty];
|
||
const endInput = input[endProperty];
|
||
const startParsed = parseTimestamp(startInput, true);
|
||
const endParsed = endInput ? parseTimestamp(endInput, true) : startParsed;
|
||
const start = isTimedless(startInput) ? updateHasTime(startParsed, timed) : startParsed;
|
||
const end = isTimedless(endInput) ? updateHasTime(endParsed, timed) : endParsed;
|
||
const startIdentifier = getDayIdentifier(start);
|
||
const startTimestampIdentifier = getTimestampIdentifier(start);
|
||
const endIdentifier = getDayIdentifier(end);
|
||
const endOffset = start.hasTime ? 0 : 2359;
|
||
const endTimestampIdentifier = getTimestampIdentifier(end) + endOffset;
|
||
const allDay = !start.hasTime;
|
||
return {
|
||
input,
|
||
start,
|
||
startIdentifier,
|
||
startTimestampIdentifier,
|
||
end,
|
||
endIdentifier,
|
||
endTimestampIdentifier,
|
||
allDay,
|
||
index,
|
||
category
|
||
};
|
||
}
|
||
function isEventOn(event, dayIdentifier) {
|
||
return dayIdentifier >= event.startIdentifier && dayIdentifier <= event.endIdentifier;
|
||
}
|
||
function isEventOnDay(event, day, inRange) {
|
||
if (inRange) {
|
||
const dayStart = nextMinutes(copyTimestamp(day), inRange[0]);
|
||
const dayEnd = nextMinutes(copyTimestamp(day), inRange[1]);
|
||
const starts = event.startTimestampIdentifier < getTimestampIdentifier(dayEnd);
|
||
const ends = event.endTimestampIdentifier > getTimestampIdentifier(dayStart);
|
||
return starts && ends;
|
||
}
|
||
return isEventOn(event, getDayIdentifier(day));
|
||
}
|
||
function isEventHiddenOn(event, day) {
|
||
return event.end.time === "00:00" && event.end.date === day.date && event.start.date !== day.date;
|
||
}
|
||
function isEventStart(event, day, dayIdentifier, firstWeekday) {
|
||
return dayIdentifier === event.startIdentifier || firstWeekday === day.weekday && isEventOn(event, dayIdentifier);
|
||
}
|
||
function isEventOverlapping(event, startIdentifier, endIdentifier) {
|
||
return startIdentifier <= event.endIdentifier && endIdentifier >= event.startIdentifier;
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/composables/calendarWithEvents.js
|
||
var WIDTH_FULL = 100;
|
||
var WIDTH_START = 95;
|
||
var makeCalendarWithEventsProps = propsFactory({
|
||
events: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
eventStart: {
|
||
type: String,
|
||
default: "start"
|
||
},
|
||
eventEnd: {
|
||
type: String,
|
||
default: "end"
|
||
},
|
||
eventTimed: {
|
||
type: [String, Function],
|
||
default: "timed"
|
||
},
|
||
eventCategory: {
|
||
type: [String, Function],
|
||
default: "category"
|
||
},
|
||
eventHeight: {
|
||
type: Number,
|
||
default: 20
|
||
},
|
||
eventColor: {
|
||
type: [String, Function],
|
||
default: "primary"
|
||
},
|
||
eventTextColor: {
|
||
type: [String, Function]
|
||
},
|
||
eventName: {
|
||
type: [String, Function],
|
||
default: "name"
|
||
},
|
||
eventOverlapThreshold: {
|
||
type: [String, Number],
|
||
default: 60
|
||
},
|
||
eventOverlapMode: {
|
||
type: [String, Function],
|
||
default: "stack",
|
||
validate: (mode) => mode in CalendarEventOverlapModes || typeof mode === "function"
|
||
},
|
||
eventMore: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
eventMoreText: {
|
||
type: String,
|
||
default: "$vuetify.calendar.moreEvents"
|
||
},
|
||
eventRipple: {
|
||
type: [Boolean, Object],
|
||
default: null
|
||
},
|
||
eventMarginBottom: {
|
||
type: Number,
|
||
default: 1
|
||
}
|
||
}, "VCalendar-events");
|
||
function useCalendarWithEvents(props, slots, attrs) {
|
||
const base = useCalendarBase(props);
|
||
const noEvents = computed(() => {
|
||
return !Array.isArray(props.events) || props.events.length === 0;
|
||
});
|
||
const categoryMode = computed(() => {
|
||
return props.type === "category";
|
||
});
|
||
const eventTimedFunction = computed(() => {
|
||
return typeof props.eventTimed === "function" ? props.eventTimed : (event) => !!event[props.eventTimed];
|
||
});
|
||
const eventCategoryFunction = computed(() => {
|
||
return typeof props.eventCategory === "function" ? props.eventCategory : (event) => event[props.eventCategory];
|
||
});
|
||
const parsedEvents = computed(() => {
|
||
if (!props.events) return [];
|
||
return props.events.map((event, index) => parseEvent(event, index, props.eventStart || "", props.eventEnd || "", eventTimedFunction.value(event), categoryMode.value ? eventCategoryFunction.value(event) : false));
|
||
});
|
||
const parsedEventOverlapThreshold = computed(() => {
|
||
return parseInt(String(props.eventOverlapThreshold || 0));
|
||
});
|
||
const eventTextColorFunction = computed(() => {
|
||
return typeof props.eventTextColor === "function" ? props.eventTextColor : () => props.eventTextColor;
|
||
});
|
||
const eventNameFunction = computed(() => {
|
||
return typeof props.eventName === "function" ? props.eventName : (event, timedEvent) => event.input[props.eventName] || "";
|
||
});
|
||
const eventModeFunction = computed(() => {
|
||
return typeof props.eventOverlapMode === "function" ? props.eventOverlapMode : CalendarEventOverlapModes[props.eventOverlapMode];
|
||
});
|
||
const eventWeekdays = computed(() => {
|
||
return base.effectiveWeekdays.value;
|
||
});
|
||
function eventColorFunction(e) {
|
||
return typeof props.eventColor === "function" ? props.eventColor(e) : e.color || props.eventColor;
|
||
}
|
||
const eventsRef = ref([]);
|
||
function updateEventVisibility() {
|
||
if (noEvents.value || !props.eventMore) {
|
||
return;
|
||
}
|
||
const eventHeight = props.eventHeight || 0;
|
||
const eventsMap = getEventsMap();
|
||
for (const date in eventsMap) {
|
||
const {
|
||
parent,
|
||
events,
|
||
more
|
||
} = eventsMap[date];
|
||
if (!more) {
|
||
break;
|
||
}
|
||
const parentBounds = parent.getBoundingClientRect();
|
||
const last = events.length - 1;
|
||
const eventsSorted = events.map((event) => ({
|
||
event,
|
||
bottom: event.getBoundingClientRect().bottom
|
||
})).sort((a, b) => a.bottom - b.bottom);
|
||
let hidden = 0;
|
||
for (let i = 0; i <= last; i++) {
|
||
const bottom = eventsSorted[i].bottom;
|
||
const hide = i === last ? bottom > parentBounds.bottom : bottom + eventHeight > parentBounds.bottom;
|
||
if (hide) {
|
||
eventsSorted[i].event.style.display = "none";
|
||
hidden++;
|
||
}
|
||
}
|
||
if (hidden) {
|
||
more.style.display = "";
|
||
more.innerHTML = base.locale.t(props.eventMoreText, hidden);
|
||
} else {
|
||
more.style.display = "none";
|
||
}
|
||
}
|
||
}
|
||
function getEventsMap() {
|
||
const eventsMap = {};
|
||
const elements = eventsRef.value;
|
||
if (!elements || !elements.length) {
|
||
return eventsMap;
|
||
}
|
||
elements.forEach((el) => {
|
||
const date = el.getAttribute("data-date");
|
||
if (el.parentElement && date) {
|
||
if (!(date in eventsMap)) {
|
||
eventsMap[date] = {
|
||
parent: el.parentElement,
|
||
more: null,
|
||
events: []
|
||
};
|
||
}
|
||
if (el.getAttribute("data-more")) {
|
||
eventsMap[date].more = el;
|
||
} else {
|
||
eventsMap[date].events.push(el);
|
||
el.style.display = "";
|
||
}
|
||
}
|
||
});
|
||
return eventsMap;
|
||
}
|
||
function genDayEvent(_ref, day) {
|
||
let {
|
||
event
|
||
} = _ref;
|
||
const eventHeight = props.eventHeight || 0;
|
||
const eventMarginBottom = props.eventMarginBottom || 0;
|
||
const dayIdentifier = getDayIdentifier(day);
|
||
const week = day.week;
|
||
const start = dayIdentifier === event.startIdentifier;
|
||
let end = dayIdentifier === event.endIdentifier;
|
||
let width = WIDTH_START;
|
||
if (!categoryMode.value) {
|
||
for (let i = day.index + 1; i < week.length; i++) {
|
||
const weekdayIdentifier = getDayIdentifier(week[i]);
|
||
if (event.endIdentifier >= weekdayIdentifier) {
|
||
width += WIDTH_FULL;
|
||
end = end || weekdayIdentifier === event.endIdentifier;
|
||
} else {
|
||
end = true;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
const scope = {
|
||
eventParsed: event,
|
||
day,
|
||
start,
|
||
end,
|
||
timed: false
|
||
};
|
||
return genEvent(event, scope, false, {
|
||
class: ["v-event", {
|
||
"v-event-start": start,
|
||
"v-event-end": end
|
||
}],
|
||
style: {
|
||
height: `${eventHeight}px`,
|
||
width: `${width}%`,
|
||
marginBottom: `${eventMarginBottom}px`
|
||
},
|
||
"data-date": day.date
|
||
});
|
||
}
|
||
function genTimedEvent(_ref2, day) {
|
||
let {
|
||
event,
|
||
left,
|
||
width
|
||
} = _ref2;
|
||
const startDelta = day.timeDelta(event.start, day);
|
||
const endDelta = day.timeDelta(event.end, day);
|
||
if (endDelta === false || startDelta === false || endDelta < 0 || startDelta >= 1 || isEventHiddenOn(event, day)) {
|
||
return false;
|
||
}
|
||
const dayIdentifier = getDayIdentifier(day);
|
||
const start = event.startIdentifier >= dayIdentifier;
|
||
const end = event.endIdentifier > dayIdentifier;
|
||
const top = day.timeToY(event.start, day);
|
||
const bottom = day.timeToY(event.end, day);
|
||
const height = Math.max(props.eventHeight || 0, bottom - top);
|
||
const scope = {
|
||
eventParsed: event,
|
||
day,
|
||
start,
|
||
end,
|
||
timed: true
|
||
};
|
||
return genEvent(event, scope, true, {
|
||
class: "v-event-timed",
|
||
style: {
|
||
top: `${top}px`,
|
||
height: `${height}px`,
|
||
left: `${left}%`,
|
||
width: `${width}%`
|
||
}
|
||
});
|
||
}
|
||
function genEvent(event, scopeInput, timedEvent, data) {
|
||
const slot = slots.event;
|
||
const text = eventTextColorFunction.value(event.input);
|
||
const background = eventColorFunction(event.input);
|
||
const overlapsNoon = event.start.hour < 12 && event.end.hour >= 12;
|
||
const singline = diffMinutes(event.start, event.end) <= parsedEventOverlapThreshold.value;
|
||
const formatTime = (withTime, ampm) => {
|
||
const formatter = base.getFormatter({
|
||
timeZone: "UTC",
|
||
hour: "numeric",
|
||
minute: withTime.minute > 0 ? "numeric" : void 0
|
||
});
|
||
return formatter(withTime, true);
|
||
};
|
||
const timeSummary = () => formatTime(event.start, overlapsNoon) + " - " + formatTime(event.end, true);
|
||
const eventSummary = () => {
|
||
const name = eventNameFunction.value(event, timedEvent);
|
||
if (event.start.hasTime) {
|
||
if (timedEvent) {
|
||
const time = timeSummary();
|
||
const delimiter = singline ? ", " : createBaseVNode("br", null, null);
|
||
return createBaseVNode("span", {
|
||
"class": "v-event-summary"
|
||
}, [createBaseVNode("strong", null, [name]), delimiter, time]);
|
||
} else {
|
||
const time = formatTime(event.start, true);
|
||
return createBaseVNode("span", {
|
||
"class": "v-event-summary"
|
||
}, [createBaseVNode("strong", null, [time]), createTextVNode(" "), name]);
|
||
}
|
||
}
|
||
return createBaseVNode("span", {
|
||
"class": "v-event-summary"
|
||
}, [name]);
|
||
};
|
||
const scope = {
|
||
...scopeInput,
|
||
event: event.input,
|
||
outside: scopeInput.day.outside,
|
||
singline,
|
||
overlapsNoon,
|
||
formatTime,
|
||
timeSummary,
|
||
eventSummary
|
||
};
|
||
const events = getPrefixedEventHandlers(attrs, ":event", (nativeEvent) => ({
|
||
...scope,
|
||
nativeEvent
|
||
}));
|
||
return withDirectives(createBaseVNode("div", mergeProps(base.getColorProps({
|
||
text,
|
||
background
|
||
}), events, data, {
|
||
"ref_for": true,
|
||
"ref": eventsRef
|
||
}), [slot?.(scope) ?? genName(eventSummary)]), [[ripple_default, props.eventRipple ?? true]]);
|
||
}
|
||
function genName(eventSummary) {
|
||
return createBaseVNode("div", {
|
||
"class": "pl-1"
|
||
}, [eventSummary()]);
|
||
}
|
||
function genPlaceholder(day) {
|
||
const height = (props.eventHeight || 0) + (props.eventMarginBottom || 0);
|
||
return createBaseVNode("div", {
|
||
"style": {
|
||
height: `${height}px`
|
||
},
|
||
"data-date": day.date,
|
||
"ref_for": true,
|
||
"ref": eventsRef
|
||
}, null);
|
||
}
|
||
function genMore(day) {
|
||
const eventHeight = props.eventHeight || 0;
|
||
const eventMarginBottom = props.eventMarginBottom || 0;
|
||
const events = getPrefixedEventHandlers(attrs, ":more", (nativeEvent) => ({
|
||
nativeEvent,
|
||
...day
|
||
}));
|
||
return withDirectives(createBaseVNode("div", mergeProps({
|
||
"class": ["v-event-more pl-1", {
|
||
"v-outside": day.outside
|
||
}],
|
||
"data-date": day.date,
|
||
"data-more": "1",
|
||
"style": {
|
||
display: "none",
|
||
height: `${eventHeight}px`,
|
||
marginBottom: `${eventMarginBottom}px`
|
||
},
|
||
"ref_for": true,
|
||
"ref": eventsRef
|
||
}, events), null), [[ripple_default, props.eventRipple ?? true]]);
|
||
}
|
||
function getVisibleEvents() {
|
||
const days = base.days.value;
|
||
const start = getDayIdentifier(days[0]);
|
||
const end = getDayIdentifier(days[days.length - 1]);
|
||
return parsedEvents.value.filter((event) => isEventOverlapping(event, start, end));
|
||
}
|
||
function isEventForCategory(event, category) {
|
||
return !categoryMode.value || typeof category === "object" && category.categoryName && category.categoryName === event.category || typeof event.category === "string" && category === event.category || typeof event.category !== "string" && category === null;
|
||
}
|
||
function getEventsForDay(day) {
|
||
const identifier = getDayIdentifier(day);
|
||
const firstWeekday = eventWeekdays.value[0];
|
||
return parsedEvents.value.filter((event) => isEventStart(event, day, identifier, firstWeekday));
|
||
}
|
||
function getEventsForDayAll(day) {
|
||
const identifier = getDayIdentifier(day);
|
||
const firstWeekday = eventWeekdays.value[0];
|
||
return parsedEvents.value.filter((event) => event.allDay && (categoryMode.value ? isEventOn(event, identifier) : isEventStart(event, day, identifier, firstWeekday)) && isEventForCategory(event, day.category));
|
||
}
|
||
function getEventsForDayTimed(day) {
|
||
return parsedEvents.value.filter((event) => !event.allDay && isEventOnDay(event, day, day.intervalRange) && isEventForCategory(event, day.category));
|
||
}
|
||
function getScopedSlots() {
|
||
if (noEvents.value) {
|
||
return {
|
||
...slots
|
||
};
|
||
}
|
||
const mode = eventModeFunction.value(parsedEvents.value, eventWeekdays.value[0], parsedEventOverlapThreshold.value);
|
||
const isNode = (input) => !!input;
|
||
const getSlotChildren = (day, getter, mapper, timed) => {
|
||
const events = getter(day);
|
||
const visuals = mode(day, events, timed, categoryMode.value);
|
||
if (timed) {
|
||
return visuals.map((visual) => mapper(visual, day)).filter(isNode);
|
||
}
|
||
const children = [];
|
||
visuals.forEach((visual, index) => {
|
||
while (children.length < visual.column) {
|
||
children.push(genPlaceholder(day));
|
||
}
|
||
const mapped = mapper(visual, day);
|
||
if (mapped) {
|
||
children.push(mapped);
|
||
}
|
||
});
|
||
return children;
|
||
};
|
||
return {
|
||
...slots,
|
||
day: (day) => {
|
||
let children = getSlotChildren(day, getEventsForDay, genDayEvent, false);
|
||
if (children && children.length > 0 && props.eventMore) {
|
||
children.push(genMore(day));
|
||
}
|
||
if (slots.day) {
|
||
const slot = slots.day(day);
|
||
if (slot) {
|
||
children = children ? children.concat(slot) : slot;
|
||
}
|
||
}
|
||
return children;
|
||
},
|
||
"day-header": (day) => {
|
||
let children = getSlotChildren(day, getEventsForDayAll, genDayEvent, false);
|
||
if (slots["day-header"]) {
|
||
const slot = slots["day-header"](day);
|
||
if (slot) {
|
||
children = children ? children.concat(slot) : slot;
|
||
}
|
||
}
|
||
return children;
|
||
},
|
||
"day-body": (day) => {
|
||
const events = getSlotChildren(day, getEventsForDayTimed, genTimedEvent, true);
|
||
let children = [createBaseVNode("div", {
|
||
"class": "v-event-timed-container"
|
||
}, [events])];
|
||
if (slots["day-body"]) {
|
||
const slot = slots["day-body"](day);
|
||
if (slot) {
|
||
children = children.concat(slot);
|
||
}
|
||
}
|
||
return children;
|
||
}
|
||
};
|
||
}
|
||
return {
|
||
...base,
|
||
noEvents,
|
||
parsedEvents,
|
||
parsedEventOverlapThreshold,
|
||
eventTimedFunction,
|
||
eventCategoryFunction,
|
||
eventTextColorFunction,
|
||
eventNameFunction,
|
||
eventModeFunction,
|
||
eventWeekdays,
|
||
categoryMode,
|
||
eventColorFunction,
|
||
eventsRef,
|
||
updateEventVisibility,
|
||
getEventsMap,
|
||
genDayEvent,
|
||
genTimedEvent,
|
||
genEvent,
|
||
genName,
|
||
genPlaceholder,
|
||
genMore,
|
||
getVisibleEvents,
|
||
isEventForCategory,
|
||
getEventsForDay,
|
||
getEventsForDayAll,
|
||
getEventsForDayTimed,
|
||
getScopedSlots
|
||
};
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VCalendar/VCalendar.js
|
||
var VCalendar = genericComponent()({
|
||
name: "VCalendar",
|
||
directives: {
|
||
vResize: resize_default
|
||
},
|
||
props: {
|
||
modelValue: {
|
||
type: [String, Number, Date],
|
||
validate: validateTimestamp
|
||
},
|
||
categoryDays: {
|
||
type: [Number, String],
|
||
default: 1,
|
||
validate: (x) => isFinite(parseInt(x)) && parseInt(x) > 0
|
||
},
|
||
categories: {
|
||
type: [Array, String],
|
||
default: ""
|
||
},
|
||
categoryText: {
|
||
type: [String, Function]
|
||
},
|
||
maxDays: {
|
||
type: Number,
|
||
default: 7
|
||
},
|
||
categoryHideDynamic: {
|
||
type: Boolean
|
||
},
|
||
categoryShowAll: {
|
||
type: Boolean
|
||
},
|
||
categoryForInvalid: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
...makeCalendarBaseProps(),
|
||
...makeCalendarWithEventsProps()
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
attrs,
|
||
emit
|
||
} = _ref;
|
||
const root = ref();
|
||
const base = useCalendarWithEvents(props, slots, attrs);
|
||
const lastStart = ref(null);
|
||
const lastEnd = ref(null);
|
||
const parsedCategoryDays = computed(() => {
|
||
return parseInt(String(props.categoryDays)) || 1;
|
||
});
|
||
const parsedCategories = computed(() => {
|
||
return getParsedCategories(props.categories, props.categoryText);
|
||
});
|
||
const renderProps = computed(() => {
|
||
const around = base.parsedValue.value;
|
||
let component = null;
|
||
let maxDays = props.maxDays;
|
||
let categories = parsedCategories.value;
|
||
let start = around;
|
||
let end = around;
|
||
switch (props.type) {
|
||
case "month":
|
||
component = VCalendarWeekly;
|
||
start = getStartOfMonth(around);
|
||
end = getEndOfMonth(around);
|
||
break;
|
||
case "week":
|
||
component = VCalendarDaily;
|
||
start = base.getStartOfWeek(around);
|
||
end = base.getEndOfWeek(around);
|
||
maxDays = 7;
|
||
break;
|
||
case "day":
|
||
component = VCalendarDaily;
|
||
maxDays = 1;
|
||
break;
|
||
case "4day":
|
||
component = VCalendarDaily;
|
||
end = relativeDays(copyTimestamp(end), nextDay, 3);
|
||
updateFormatted(end);
|
||
maxDays = 4;
|
||
break;
|
||
case "custom-weekly":
|
||
component = VCalendarWeekly;
|
||
start = base.parsedStart.value || around;
|
||
end = base.parsedEnd.value;
|
||
break;
|
||
case "custom-daily":
|
||
component = VCalendarDaily;
|
||
start = base.parsedStart.value || around;
|
||
end = base.parsedEnd.value;
|
||
break;
|
||
case "category":
|
||
const days = parsedCategoryDays.value;
|
||
component = VCalendarCategory;
|
||
end = relativeDays(copyTimestamp(end), nextDay, days);
|
||
updateFormatted(end);
|
||
maxDays = days;
|
||
categories = getCategoryList(categories);
|
||
break;
|
||
default:
|
||
const type = props.type;
|
||
throw new Error(`${type} is not a valid Calendar type`);
|
||
}
|
||
return {
|
||
component,
|
||
start,
|
||
end,
|
||
maxDays,
|
||
categories
|
||
};
|
||
});
|
||
const eventWeekdays = computed(() => {
|
||
return base.effectiveWeekdays.value;
|
||
});
|
||
const categoryMode = computed(() => {
|
||
return props.type === "category";
|
||
});
|
||
const monthLongFormatter = computed(() => {
|
||
return base.getFormatter({
|
||
timeZone: "UTC",
|
||
month: "long"
|
||
});
|
||
});
|
||
const monthShortFormatter = computed(() => {
|
||
return base.getFormatter({
|
||
timeZone: "UTC",
|
||
month: "short"
|
||
});
|
||
});
|
||
const title = computed(() => {
|
||
const {
|
||
start,
|
||
end
|
||
} = renderProps.value;
|
||
const spanYears = start.year !== end.year;
|
||
const spanMonths = spanYears || start.month !== end.month;
|
||
if (spanYears) {
|
||
return monthShortFormatter.value(start, true) + " " + start.year + " - " + monthShortFormatter.value(end, true) + " " + end.year;
|
||
}
|
||
if (spanMonths) {
|
||
return monthShortFormatter.value(start, true) + " - " + monthShortFormatter.value(end, true) + " " + end.year;
|
||
} else {
|
||
return monthLongFormatter.value(start, false) + " " + start.year;
|
||
}
|
||
});
|
||
function checkChange() {
|
||
const {
|
||
start,
|
||
end
|
||
} = renderProps.value;
|
||
if (!lastStart.value || !lastEnd.value || start.date !== lastStart.value.date || end.date !== lastEnd.value.date) {
|
||
lastStart.value = start;
|
||
lastEnd.value = end;
|
||
emit("change", {
|
||
start,
|
||
end
|
||
});
|
||
}
|
||
}
|
||
function move() {
|
||
let amount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
||
const moved = copyTimestamp(base.parsedValue.value);
|
||
const forward = amount > 0;
|
||
const mover = forward ? nextDay : prevDay;
|
||
const limit = forward ? DAYS_IN_MONTH_MAX : DAY_MIN;
|
||
let times = forward ? amount : -amount;
|
||
while (--times >= 0) {
|
||
switch (props.type) {
|
||
case "month":
|
||
moved.day = limit;
|
||
mover(moved);
|
||
break;
|
||
case "week":
|
||
relativeDays(moved, mover, DAYS_IN_WEEK);
|
||
break;
|
||
case "day":
|
||
relativeDays(moved, mover, 1);
|
||
break;
|
||
case "4day":
|
||
relativeDays(moved, mover, 4);
|
||
break;
|
||
case "category":
|
||
relativeDays(moved, mover, parsedCategoryDays.value);
|
||
break;
|
||
}
|
||
}
|
||
updateWeekday(moved);
|
||
updateFormatted(moved);
|
||
updateRelative(moved, base.times.now);
|
||
if (props.modelValue instanceof Date) {
|
||
emit("update:modelValue", timestampToDate(moved));
|
||
} else if (typeof props.modelValue === "number") {
|
||
emit("update:modelValue", timestampToDate(moved).getTime());
|
||
} else {
|
||
emit("update:modelValue", moved.date);
|
||
}
|
||
emit("moved", moved);
|
||
}
|
||
function next() {
|
||
let amount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
||
move(amount);
|
||
}
|
||
function prev() {
|
||
let amount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
||
move(-amount);
|
||
}
|
||
function getCategoryList(categories) {
|
||
if (!base.noEvents.value) {
|
||
const categoryMap = categories.reduce((map, category, index) => {
|
||
if (typeof category === "object" && category.categoryName) map[category.categoryName] = {
|
||
index,
|
||
count: 0
|
||
};
|
||
else if (typeof category === "string") map[category] = {
|
||
index,
|
||
count: 0
|
||
};
|
||
return map;
|
||
}, {});
|
||
if (!props.categoryHideDynamic || !props.categoryShowAll) {
|
||
let categoryLength = categories.length;
|
||
base.parsedEvents.value.forEach((ev) => {
|
||
let category = ev.category;
|
||
if (typeof category !== "string") {
|
||
category = props.categoryForInvalid;
|
||
}
|
||
if (!category) {
|
||
return;
|
||
}
|
||
if (category in categoryMap) {
|
||
categoryMap[category].count++;
|
||
} else if (!props.categoryHideDynamic) {
|
||
categoryMap[category] = {
|
||
index: categoryLength++,
|
||
count: 1
|
||
};
|
||
}
|
||
});
|
||
}
|
||
if (!props.categoryShowAll) {
|
||
for (const category in categoryMap) {
|
||
if (categoryMap[category].count === 0) {
|
||
delete categoryMap[category];
|
||
}
|
||
}
|
||
}
|
||
categories = categories.filter((category) => {
|
||
if (typeof category === "object" && category.categoryName) {
|
||
return categoryMap.hasOwnProperty(category.categoryName);
|
||
} else if (typeof category === "string") {
|
||
return categoryMap.hasOwnProperty(category);
|
||
}
|
||
return false;
|
||
});
|
||
}
|
||
return categories;
|
||
}
|
||
watch(renderProps, checkChange);
|
||
onMounted(() => {
|
||
base.updateEventVisibility();
|
||
checkChange();
|
||
});
|
||
onUpdated(() => {
|
||
window.requestAnimationFrame(base.updateEventVisibility);
|
||
});
|
||
useRender(() => {
|
||
const {
|
||
start,
|
||
end,
|
||
maxDays,
|
||
component: Component,
|
||
categories
|
||
} = renderProps.value;
|
||
return withDirectives(createVNode(Component, mergeProps({
|
||
"ref": root,
|
||
"class": ["v-calendar", {
|
||
"v-calendar-events": !base.noEvents.value
|
||
}],
|
||
"role": "grid"
|
||
}, Component.filterProps(props), {
|
||
"start": start.date,
|
||
"end": end.date,
|
||
"maxDays": maxDays,
|
||
"weekdays": base.effectiveWeekdays.value,
|
||
"categories": categories,
|
||
"onClick:date": (e, day) => {
|
||
if (attrs["onUpdate:modelValue"]) emit("update:modelValue", day.date);
|
||
}
|
||
}), base.getScopedSlots()), [[resize_default, base.updateEventVisibility, void 0, {
|
||
quiet: true
|
||
}]]);
|
||
});
|
||
return forwardRefs({
|
||
...base,
|
||
lastStart,
|
||
lastEnd,
|
||
parsedCategoryDays,
|
||
renderProps,
|
||
eventWeekdays,
|
||
categoryMode,
|
||
title,
|
||
monthLongFormatter,
|
||
monthShortFormatter,
|
||
parsedCategories,
|
||
checkChange,
|
||
move,
|
||
next,
|
||
prev,
|
||
getCategoryList
|
||
}, root);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCarousel/VCarousel.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCarousel/VCarousel.css";
|
||
|
||
// node_modules/vuetify/lib/components/VWindow/VWindow.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VWindow/VWindow.css";
|
||
var VWindowSymbol = /* @__PURE__ */ Symbol.for("vuetify:v-window");
|
||
var VWindowGroupSymbol = /* @__PURE__ */ Symbol.for("vuetify:v-window-group");
|
||
var makeVWindowProps = propsFactory({
|
||
continuous: Boolean,
|
||
nextIcon: {
|
||
type: [Boolean, String, Function, Object],
|
||
default: "$next"
|
||
},
|
||
prevIcon: {
|
||
type: [Boolean, String, Function, Object],
|
||
default: "$prev"
|
||
},
|
||
reverse: Boolean,
|
||
showArrows: {
|
||
type: [Boolean, String],
|
||
validator: (v) => typeof v === "boolean" || v === "hover"
|
||
},
|
||
verticalArrows: [Boolean, String],
|
||
touch: {
|
||
type: [Object, Boolean],
|
||
default: void 0
|
||
},
|
||
direction: {
|
||
type: String,
|
||
default: "horizontal"
|
||
},
|
||
modelValue: null,
|
||
disabled: Boolean,
|
||
selectedClass: {
|
||
type: String,
|
||
default: "v-window-item--active"
|
||
},
|
||
// TODO: mandatory should probably not be exposed but do this for now
|
||
mandatory: {
|
||
type: [Boolean, String],
|
||
default: "force"
|
||
},
|
||
crossfade: Boolean,
|
||
transitionDuration: Number,
|
||
...makeComponentProps(),
|
||
...makeTagProps(),
|
||
...makeThemeProps()
|
||
}, "VWindow");
|
||
var VWindow = genericComponent()({
|
||
name: "VWindow",
|
||
directives: {
|
||
vTouch: touch_default
|
||
},
|
||
props: makeVWindowProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
isRtl
|
||
} = useRtl();
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const group = useGroup(props, VWindowGroupSymbol);
|
||
const rootRef = ref();
|
||
const isRtlReverse = computed(() => isRtl.value ? !props.reverse : props.reverse);
|
||
const isReversed = shallowRef(false);
|
||
const transition = computed(() => {
|
||
if (props.crossfade) {
|
||
return "v-window-crossfade-transition";
|
||
}
|
||
const axis = props.direction === "vertical" ? "y" : "x";
|
||
const reverse = isRtlReverse.value ? !isReversed.value : isReversed.value;
|
||
const direction = reverse ? "-reverse" : "";
|
||
return `v-window-${axis}${direction}-transition`;
|
||
});
|
||
const transitionCount = shallowRef(0);
|
||
const transitionHeight = ref(void 0);
|
||
const activeIndex = computed(() => {
|
||
return group.items.value.findIndex((item) => group.selected.value.includes(item.id));
|
||
});
|
||
watch(activeIndex, (newVal, oldVal) => {
|
||
let scrollableParent;
|
||
const savedScrollPosition = {
|
||
left: 0,
|
||
top: 0
|
||
};
|
||
if (IN_BROWSER && oldVal >= 0) {
|
||
scrollableParent = getScrollParent(rootRef.value);
|
||
savedScrollPosition.left = scrollableParent?.scrollLeft;
|
||
savedScrollPosition.top = scrollableParent?.scrollTop;
|
||
}
|
||
const itemsLength = group.items.value.length;
|
||
const lastIndex = itemsLength - 1;
|
||
if (itemsLength <= 2) {
|
||
isReversed.value = newVal < oldVal;
|
||
} else if (newVal === lastIndex && oldVal === 0) {
|
||
isReversed.value = false;
|
||
} else if (newVal === 0 && oldVal === lastIndex) {
|
||
isReversed.value = true;
|
||
} else {
|
||
isReversed.value = newVal < oldVal;
|
||
}
|
||
nextTick(() => {
|
||
if (!IN_BROWSER || !scrollableParent) return;
|
||
const currentScrollY = scrollableParent.scrollTop;
|
||
if (currentScrollY !== savedScrollPosition.top) {
|
||
scrollableParent.scrollTo({
|
||
...savedScrollPosition,
|
||
behavior: "instant"
|
||
});
|
||
}
|
||
requestAnimationFrame(() => {
|
||
if (!scrollableParent) return;
|
||
const rafScrollY = scrollableParent.scrollTop;
|
||
if (rafScrollY !== savedScrollPosition.top) {
|
||
scrollableParent.scrollTo({
|
||
...savedScrollPosition,
|
||
behavior: "instant"
|
||
});
|
||
}
|
||
});
|
||
});
|
||
}, {
|
||
flush: "sync"
|
||
});
|
||
provide(VWindowSymbol, {
|
||
transition,
|
||
isReversed,
|
||
transitionCount,
|
||
transitionHeight,
|
||
rootRef
|
||
});
|
||
const canMoveBack = toRef(() => props.continuous || activeIndex.value !== 0);
|
||
const canMoveForward = toRef(() => props.continuous || activeIndex.value !== group.items.value.length - 1);
|
||
function prev() {
|
||
canMoveBack.value && group.prev();
|
||
}
|
||
function next() {
|
||
canMoveForward.value && group.next();
|
||
}
|
||
const arrows = computed(() => {
|
||
const arrows2 = [];
|
||
const prevProps = {
|
||
icon: isRtl.value ? props.nextIcon : props.prevIcon,
|
||
class: `v-window__${isRtlReverse.value ? "right" : "left"}`,
|
||
onClick: group.prev,
|
||
"aria-label": t("$vuetify.carousel.prev")
|
||
};
|
||
arrows2.push(canMoveBack.value ? slots.prev ? slots.prev({
|
||
props: prevProps
|
||
}) : createVNode(VBtn, prevProps, null) : createBaseVNode("div", null, null));
|
||
const nextProps = {
|
||
icon: isRtl.value ? props.prevIcon : props.nextIcon,
|
||
class: `v-window__${isRtlReverse.value ? "left" : "right"}`,
|
||
onClick: group.next,
|
||
"aria-label": t("$vuetify.carousel.next")
|
||
};
|
||
arrows2.push(canMoveForward.value ? slots.next ? slots.next({
|
||
props: nextProps
|
||
}) : createVNode(VBtn, nextProps, null) : createBaseVNode("div", null, null));
|
||
return arrows2;
|
||
});
|
||
const touchOptions = computed(() => {
|
||
if (props.touch === false) return props.touch;
|
||
const options = {
|
||
left: () => {
|
||
isRtlReverse.value ? prev() : next();
|
||
},
|
||
right: () => {
|
||
isRtlReverse.value ? next() : prev();
|
||
},
|
||
start: (_ref2) => {
|
||
let {
|
||
originalEvent
|
||
} = _ref2;
|
||
originalEvent.stopPropagation();
|
||
}
|
||
};
|
||
return {
|
||
...options,
|
||
...props.touch === true ? {} : props.touch
|
||
};
|
||
});
|
||
useRender(() => withDirectives(createVNode(props.tag, {
|
||
"ref": rootRef,
|
||
"class": normalizeClass(["v-window", {
|
||
"v-window--show-arrows-on-hover": props.showArrows === "hover",
|
||
"v-window--vertical-arrows": !!props.verticalArrows,
|
||
"v-window--crossfade": !!props.crossfade
|
||
}, themeClasses.value, props.class]),
|
||
"style": normalizeStyle([props.style, {
|
||
"--v-window-transition-duration": !PREFERS_REDUCED_MOTION() ? convertToUnit(props.transitionDuration, "ms") : null
|
||
}])
|
||
}, {
|
||
default: () => [createBaseVNode("div", {
|
||
"class": "v-window__container",
|
||
"style": {
|
||
height: transitionHeight.value
|
||
}
|
||
}, [slots.default?.({
|
||
group
|
||
}), props.showArrows !== false && createBaseVNode("div", {
|
||
"class": normalizeClass(["v-window__controls", {
|
||
"v-window__controls--left": props.verticalArrows === "left" || props.verticalArrows === true
|
||
}, {
|
||
"v-window__controls--right": props.verticalArrows === "right"
|
||
}])
|
||
}, [arrows.value])]), slots.additional?.({
|
||
group
|
||
})]
|
||
}), [[touch_default, touchOptions.value]]));
|
||
return {
|
||
group
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCarousel/VCarousel.js
|
||
var makeVCarouselProps = propsFactory({
|
||
color: String,
|
||
cycle: Boolean,
|
||
delimiterIcon: {
|
||
type: IconValue,
|
||
default: "$delimiter"
|
||
},
|
||
height: {
|
||
type: [Number, String],
|
||
default: 500
|
||
},
|
||
hideDelimiters: Boolean,
|
||
hideDelimiterBackground: Boolean,
|
||
interval: {
|
||
type: [Number, String],
|
||
default: 6e3,
|
||
validator: (value) => Number(value) > 0
|
||
},
|
||
progress: [Boolean, String],
|
||
verticalDelimiters: [Boolean, String],
|
||
...makeVWindowProps({
|
||
continuous: true,
|
||
mandatory: "force",
|
||
showArrows: true
|
||
})
|
||
}, "VCarousel");
|
||
var VCarousel = genericComponent()({
|
||
name: "VCarousel",
|
||
props: makeVCarouselProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const model = useProxiedModel(props, "modelValue");
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const windowRef = ref();
|
||
let slideTimeout = -1;
|
||
watch(model, restartTimeout);
|
||
watch(() => props.interval, restartTimeout);
|
||
watch(() => props.cycle, (val) => {
|
||
if (val) restartTimeout();
|
||
else window.clearTimeout(slideTimeout);
|
||
});
|
||
onMounted(startTimeout);
|
||
function startTimeout() {
|
||
if (!props.cycle || !windowRef.value) return;
|
||
slideTimeout = window.setTimeout(windowRef.value.group.next, Number(props.interval) > 0 ? Number(props.interval) : 6e3);
|
||
}
|
||
function restartTimeout() {
|
||
window.clearTimeout(slideTimeout);
|
||
window.requestAnimationFrame(startTimeout);
|
||
}
|
||
useRender(() => {
|
||
const windowProps = VWindow.filterProps(props);
|
||
return createVNode(VWindow, mergeProps({
|
||
"ref": windowRef
|
||
}, windowProps, {
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||
"class": ["v-carousel", {
|
||
"v-carousel--hide-delimiter-background": props.hideDelimiterBackground,
|
||
"v-carousel--vertical-delimiters": props.verticalDelimiters
|
||
}, props.class],
|
||
"style": [{
|
||
height: convertToUnit(props.height)
|
||
}, props.style]
|
||
}), {
|
||
default: slots.default,
|
||
additional: (_ref2) => {
|
||
let {
|
||
group
|
||
} = _ref2;
|
||
return createBaseVNode(Fragment, null, [!props.hideDelimiters && createBaseVNode("div", {
|
||
"class": "v-carousel__controls",
|
||
"style": {
|
||
left: props.verticalDelimiters === "left" && props.verticalDelimiters ? 0 : "auto",
|
||
right: props.verticalDelimiters === "right" ? 0 : "auto"
|
||
}
|
||
}, [group.items.value.length > 0 && createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VBtn: {
|
||
color: props.color,
|
||
icon: props.delimiterIcon,
|
||
size: "x-small",
|
||
variant: "text"
|
||
}
|
||
},
|
||
"scoped": true
|
||
}, {
|
||
default: () => [group.items.value.map((item, index) => {
|
||
const props2 = {
|
||
id: `carousel-item-${item.id}`,
|
||
"aria-label": t("$vuetify.carousel.ariaLabel.delimiter", index + 1, group.items.value.length),
|
||
class: ["v-carousel__controls__item", group.isSelected(item.id) && "v-btn--active"],
|
||
onClick: () => group.select(item.id, true)
|
||
};
|
||
return slots.item ? slots.item({
|
||
props: props2,
|
||
item
|
||
}) : createVNode(VBtn, mergeProps(item, props2), null);
|
||
})]
|
||
})]), props.progress && createVNode(VProgressLinear, {
|
||
"absolute": true,
|
||
"class": "v-carousel__progress",
|
||
"color": typeof props.progress === "string" ? props.progress : void 0,
|
||
"modelValue": (group.getItemIndex(model.value) + 1) / group.items.value.length * 100
|
||
}, null)]);
|
||
},
|
||
prev: slots.prev,
|
||
next: slots.next
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VWindow/VWindowItem.js
|
||
var makeVWindowItemProps = propsFactory({
|
||
reverseTransition: {
|
||
type: [Boolean, String],
|
||
default: void 0
|
||
},
|
||
transition: {
|
||
type: [Boolean, String],
|
||
default: void 0
|
||
},
|
||
...makeComponentProps(),
|
||
...makeGroupItemProps(),
|
||
...makeLazyProps()
|
||
}, "VWindowItem");
|
||
var VWindowItem = genericComponent()({
|
||
name: "VWindowItem",
|
||
directives: {
|
||
vTouch: touch_default
|
||
},
|
||
props: makeVWindowItemProps(),
|
||
emits: {
|
||
"group:selected": (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const window2 = inject(VWindowSymbol);
|
||
const groupItem = useGroupItem(props, VWindowGroupSymbol);
|
||
const {
|
||
isBooted
|
||
} = useSsrBoot();
|
||
if (!window2 || !groupItem) throw new Error("[Vuetify] VWindowItem must be used inside VWindow");
|
||
const isTransitioning = shallowRef(false);
|
||
const hasTransition = computed(() => isBooted.value && (window2.isReversed.value ? props.reverseTransition !== false : props.transition !== false));
|
||
function onAfterTransition() {
|
||
if (!isTransitioning.value || !window2) {
|
||
return;
|
||
}
|
||
isTransitioning.value = false;
|
||
if (window2.transitionCount.value > 0) {
|
||
window2.transitionCount.value -= 1;
|
||
if (window2.transitionCount.value === 0) {
|
||
window2.transitionHeight.value = void 0;
|
||
}
|
||
}
|
||
}
|
||
function onBeforeTransition() {
|
||
if (isTransitioning.value || !window2) {
|
||
return;
|
||
}
|
||
isTransitioning.value = true;
|
||
if (window2.transitionCount.value === 0) {
|
||
window2.transitionHeight.value = convertToUnit(window2.rootRef.value?.clientHeight);
|
||
}
|
||
window2.transitionCount.value += 1;
|
||
}
|
||
function onTransitionCancelled() {
|
||
onAfterTransition();
|
||
}
|
||
function onEnterTransition(el) {
|
||
if (!isTransitioning.value) {
|
||
return;
|
||
}
|
||
nextTick(() => {
|
||
if (!hasTransition.value || !isTransitioning.value || !window2) {
|
||
return;
|
||
}
|
||
window2.transitionHeight.value = convertToUnit(el.clientHeight);
|
||
});
|
||
}
|
||
const transition = computed(() => {
|
||
const name = window2.isReversed.value ? props.reverseTransition : props.transition;
|
||
return !hasTransition.value ? false : {
|
||
name: typeof name !== "string" ? window2.transition.value : name,
|
||
onBeforeEnter: onBeforeTransition,
|
||
onAfterEnter: onAfterTransition,
|
||
onEnterCancelled: onTransitionCancelled,
|
||
onBeforeLeave: onBeforeTransition,
|
||
onAfterLeave: onAfterTransition,
|
||
onLeaveCancelled: onTransitionCancelled,
|
||
onEnter: onEnterTransition
|
||
};
|
||
});
|
||
const {
|
||
hasContent
|
||
} = useLazy(props, groupItem.isSelected);
|
||
useRender(() => createVNode(MaybeTransition, {
|
||
"transition": transition.value,
|
||
"disabled": !isBooted.value
|
||
}, {
|
||
default: () => [withDirectives(createBaseVNode("div", {
|
||
"class": normalizeClass(["v-window-item", groupItem.selectedClass.value, props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, [hasContent.value && slots.default?.()]), [[vShow, groupItem.isSelected.value]])]
|
||
}));
|
||
return {
|
||
groupItem
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCarousel/VCarouselItem.js
|
||
var makeVCarouselItemProps = propsFactory({
|
||
...makeVImgProps(),
|
||
...makeVWindowItemProps()
|
||
}, "VCarouselItem");
|
||
var VCarouselItem = genericComponent()({
|
||
name: "VCarouselItem",
|
||
inheritAttrs: false,
|
||
props: makeVCarouselItemProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
attrs
|
||
} = _ref;
|
||
useRender(() => {
|
||
const imgProps = VImg.filterProps(props);
|
||
const windowItemProps = VWindowItem.filterProps(props);
|
||
return createVNode(VWindowItem, mergeProps({
|
||
"class": ["v-carousel-item", props.class]
|
||
}, windowItemProps), {
|
||
default: () => [createVNode(VImg, mergeProps(attrs, imgProps), slots)]
|
||
});
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VCode/index.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCode/VCode.css";
|
||
var VCode = createSimpleFunctional("v-code", "code");
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/VColorPicker.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VColorPicker/VColorPicker.css";
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/VColorPickerCanvas.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VColorPicker/VColorPickerCanvas.css";
|
||
var makeVColorPickerCanvasProps = propsFactory({
|
||
color: {
|
||
type: Object
|
||
},
|
||
disabled: Boolean,
|
||
dotSize: {
|
||
type: [Number, String],
|
||
default: 10
|
||
},
|
||
height: {
|
||
type: [Number, String],
|
||
default: 150
|
||
},
|
||
width: {
|
||
type: [Number, String],
|
||
default: 300
|
||
},
|
||
...makeComponentProps()
|
||
}, "VColorPickerCanvas");
|
||
var VColorPickerCanvas = defineComponent({
|
||
name: "VColorPickerCanvas",
|
||
props: makeVColorPickerCanvasProps(),
|
||
emits: {
|
||
"update:color": (color) => true,
|
||
"update:position": (hue) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit
|
||
} = _ref;
|
||
const isInteracting = shallowRef(false);
|
||
const canvasRef = ref();
|
||
const canvasWidth = shallowRef(parseFloat(props.width));
|
||
const canvasHeight = shallowRef(parseFloat(props.height));
|
||
const _dotPosition = ref({
|
||
x: 0,
|
||
y: 0
|
||
});
|
||
const dotPosition = computed({
|
||
get: () => _dotPosition.value,
|
||
set(val) {
|
||
if (!canvasRef.value) return;
|
||
const {
|
||
x,
|
||
y
|
||
} = val;
|
||
_dotPosition.value = val;
|
||
emit("update:color", {
|
||
h: props.color?.h ?? 0,
|
||
s: clamp(x, 0, canvasWidth.value) / canvasWidth.value,
|
||
v: 1 - clamp(y, 0, canvasHeight.value) / canvasHeight.value,
|
||
a: props.color?.a ?? 1
|
||
});
|
||
}
|
||
});
|
||
const dotStyles = computed(() => {
|
||
const {
|
||
x,
|
||
y
|
||
} = dotPosition.value;
|
||
const radius = parseInt(props.dotSize, 10) / 2;
|
||
return {
|
||
width: convertToUnit(props.dotSize),
|
||
height: convertToUnit(props.dotSize),
|
||
transform: `translate(${convertToUnit(x - radius)}, ${convertToUnit(y - radius)})`
|
||
};
|
||
});
|
||
const {
|
||
resizeRef
|
||
} = useResizeObserver((entries) => {
|
||
if (!resizeRef.el?.offsetParent) return;
|
||
const {
|
||
width,
|
||
height
|
||
} = entries[0].contentRect;
|
||
canvasWidth.value = width;
|
||
canvasHeight.value = height;
|
||
});
|
||
function updateDotPosition(x, y, rect) {
|
||
const {
|
||
left,
|
||
top,
|
||
width,
|
||
height
|
||
} = rect;
|
||
dotPosition.value = {
|
||
x: clamp(x - left, 0, width),
|
||
y: clamp(y - top, 0, height)
|
||
};
|
||
}
|
||
function handleMouseDown(e) {
|
||
if (e.type === "mousedown") {
|
||
e.preventDefault();
|
||
}
|
||
if (props.disabled) return;
|
||
handleMouseMove(e);
|
||
window.addEventListener("mousemove", handleMouseMove);
|
||
window.addEventListener("mouseup", handleMouseUp);
|
||
window.addEventListener("touchmove", handleMouseMove);
|
||
window.addEventListener("touchend", handleMouseUp);
|
||
}
|
||
function handleMouseMove(e) {
|
||
if (props.disabled || !canvasRef.value) return;
|
||
isInteracting.value = true;
|
||
const coords = getEventCoordinates(e);
|
||
updateDotPosition(coords.clientX, coords.clientY, canvasRef.value.getBoundingClientRect());
|
||
}
|
||
function handleMouseUp() {
|
||
window.removeEventListener("mousemove", handleMouseMove);
|
||
window.removeEventListener("mouseup", handleMouseUp);
|
||
window.removeEventListener("touchmove", handleMouseMove);
|
||
window.removeEventListener("touchend", handleMouseUp);
|
||
}
|
||
function updateCanvas() {
|
||
if (!canvasRef.value) return;
|
||
const canvas = canvasRef.value;
|
||
const ctx = canvas.getContext("2d");
|
||
if (!ctx) return;
|
||
const saturationGradient = ctx.createLinearGradient(0, 0, canvas.width, 0);
|
||
saturationGradient.addColorStop(0, "hsla(0, 0%, 100%, 1)");
|
||
saturationGradient.addColorStop(1, `hsla(${props.color?.h ?? 0}, 100%, 50%, 1)`);
|
||
ctx.fillStyle = saturationGradient;
|
||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||
const valueGradient = ctx.createLinearGradient(0, 0, 0, canvas.height);
|
||
valueGradient.addColorStop(0, "hsla(0, 0%, 0%, 0)");
|
||
valueGradient.addColorStop(1, "hsla(0, 0%, 0%, 1)");
|
||
ctx.fillStyle = valueGradient;
|
||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||
}
|
||
watch(() => props.color?.h, updateCanvas, {
|
||
immediate: true
|
||
});
|
||
watch(() => [canvasWidth.value, canvasHeight.value], (newVal, oldVal) => {
|
||
updateCanvas();
|
||
_dotPosition.value = {
|
||
x: dotPosition.value.x * newVal[0] / oldVal[0],
|
||
y: dotPosition.value.y * newVal[1] / oldVal[1]
|
||
};
|
||
}, {
|
||
flush: "post"
|
||
});
|
||
watch(() => props.color, () => {
|
||
if (isInteracting.value) {
|
||
isInteracting.value = false;
|
||
return;
|
||
}
|
||
_dotPosition.value = props.color ? {
|
||
x: props.color.s * canvasWidth.value,
|
||
y: (1 - props.color.v) * canvasHeight.value
|
||
} : {
|
||
x: 0,
|
||
y: 0
|
||
};
|
||
}, {
|
||
deep: true,
|
||
immediate: true
|
||
});
|
||
onMounted(() => updateCanvas());
|
||
useRender(() => createBaseVNode("div", {
|
||
"ref": resizeRef,
|
||
"class": normalizeClass(["v-color-picker-canvas", props.class]),
|
||
"style": normalizeStyle(props.style),
|
||
"onMousedown": handleMouseDown,
|
||
"onTouchstartPassive": handleMouseDown
|
||
}, [createBaseVNode("canvas", {
|
||
"ref": canvasRef,
|
||
"width": canvasWidth.value,
|
||
"height": canvasHeight.value
|
||
}, null), props.color && createBaseVNode("div", {
|
||
"class": normalizeClass(["v-color-picker-canvas__dot", {
|
||
"v-color-picker-canvas__dot--disabled": props.disabled
|
||
}]),
|
||
"style": normalizeStyle(dotStyles.value)
|
||
}, null)]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/VColorPickerEdit.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VColorPicker/VColorPickerEdit.css";
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/util/index.js
|
||
function stripAlpha(color, stripAlpha2) {
|
||
if (stripAlpha2) {
|
||
const {
|
||
a,
|
||
...rest
|
||
} = color;
|
||
return rest;
|
||
}
|
||
return color;
|
||
}
|
||
function extractColor(color, input) {
|
||
if (input == null || typeof input === "string") {
|
||
const hasA = color.a !== 1;
|
||
if (input?.startsWith("rgb(")) {
|
||
const {
|
||
r,
|
||
g,
|
||
b,
|
||
a
|
||
} = HSVtoRGB(color);
|
||
return `rgb(${r} ${g} ${b}` + (hasA ? ` / ${a})` : ")");
|
||
} else if (input?.startsWith("hsl(")) {
|
||
const {
|
||
h,
|
||
s,
|
||
l,
|
||
a
|
||
} = HSVtoHSL(color);
|
||
return `hsl(${h} ${Math.round(s * 100)} ${Math.round(l * 100)}` + (hasA ? ` / ${a})` : ")");
|
||
}
|
||
const hex2 = HSVtoHex(color);
|
||
if (color.a === 1) return hex2.slice(0, 7);
|
||
else return hex2;
|
||
}
|
||
if (typeof input === "object") {
|
||
let converted;
|
||
if (has(input, ["r", "g", "b"])) converted = HSVtoRGB(color);
|
||
else if (has(input, ["h", "s", "l"])) converted = HSVtoHSL(color);
|
||
else if (has(input, ["h", "s", "v"])) converted = color;
|
||
return stripAlpha(converted, !has(input, ["a"]) && color.a === 1);
|
||
}
|
||
return color;
|
||
}
|
||
var nullColor = {
|
||
h: 0,
|
||
s: 0,
|
||
v: 0,
|
||
a: 1
|
||
};
|
||
var rgba = {
|
||
inputProps: {
|
||
type: "number",
|
||
min: 0
|
||
},
|
||
inputs: [{
|
||
label: "R",
|
||
max: 255,
|
||
step: 1,
|
||
getValue: (c) => Math.round(c.r),
|
||
getColor: (c, v) => ({
|
||
...c,
|
||
r: Number(v)
|
||
}),
|
||
localeKey: "redInput"
|
||
}, {
|
||
label: "G",
|
||
max: 255,
|
||
step: 1,
|
||
getValue: (c) => Math.round(c.g),
|
||
getColor: (c, v) => ({
|
||
...c,
|
||
g: Number(v)
|
||
}),
|
||
localeKey: "greenInput"
|
||
}, {
|
||
label: "B",
|
||
max: 255,
|
||
step: 1,
|
||
getValue: (c) => Math.round(c.b),
|
||
getColor: (c, v) => ({
|
||
...c,
|
||
b: Number(v)
|
||
}),
|
||
localeKey: "blueInput"
|
||
}, {
|
||
label: "A",
|
||
max: 1,
|
||
step: 0.01,
|
||
getValue: (_ref) => {
|
||
let {
|
||
a
|
||
} = _ref;
|
||
return a != null ? Math.round(a * 100) / 100 : 1;
|
||
},
|
||
getColor: (c, v) => ({
|
||
...c,
|
||
a: Number(v)
|
||
}),
|
||
localeKey: "alphaInput"
|
||
}],
|
||
to: HSVtoRGB,
|
||
from: RGBtoHSV
|
||
};
|
||
var rgb = {
|
||
...rgba,
|
||
inputs: rgba.inputs?.slice(0, 3)
|
||
};
|
||
var hsla = {
|
||
inputProps: {
|
||
type: "number",
|
||
min: 0
|
||
},
|
||
inputs: [{
|
||
label: "H",
|
||
max: 360,
|
||
step: 1,
|
||
getValue: (c) => Math.round(c.h),
|
||
getColor: (c, v) => ({
|
||
...c,
|
||
h: Number(v)
|
||
}),
|
||
localeKey: "hueInput"
|
||
}, {
|
||
label: "S",
|
||
max: 1,
|
||
step: 0.01,
|
||
getValue: (c) => Math.round(c.s * 100) / 100,
|
||
getColor: (c, v) => ({
|
||
...c,
|
||
s: Number(v)
|
||
}),
|
||
localeKey: "saturationInput"
|
||
}, {
|
||
label: "L",
|
||
max: 1,
|
||
step: 0.01,
|
||
getValue: (c) => Math.round(c.l * 100) / 100,
|
||
getColor: (c, v) => ({
|
||
...c,
|
||
l: Number(v)
|
||
}),
|
||
localeKey: "lightnessInput"
|
||
}, {
|
||
label: "A",
|
||
max: 1,
|
||
step: 0.01,
|
||
getValue: (_ref2) => {
|
||
let {
|
||
a
|
||
} = _ref2;
|
||
return a != null ? Math.round(a * 100) / 100 : 1;
|
||
},
|
||
getColor: (c, v) => ({
|
||
...c,
|
||
a: Number(v)
|
||
}),
|
||
localeKey: "alphaInput"
|
||
}],
|
||
to: HSVtoHSL,
|
||
from: HSLtoHSV
|
||
};
|
||
var hsl = {
|
||
...hsla,
|
||
inputs: hsla.inputs.slice(0, 3)
|
||
};
|
||
var hexa = {
|
||
inputProps: {
|
||
type: "text"
|
||
},
|
||
inputs: [{
|
||
label: "HEXA",
|
||
getValue: (c) => c,
|
||
getColor: (c, v) => v,
|
||
localeKey: "hexaInput"
|
||
}],
|
||
to: HSVtoHex,
|
||
from: HexToHSV
|
||
};
|
||
var hex = {
|
||
...hexa,
|
||
inputs: [{
|
||
label: "HEX",
|
||
getValue: (c) => c.slice(0, 7),
|
||
getColor: (c, v) => v,
|
||
localeKey: "hexInput"
|
||
}]
|
||
};
|
||
var modes = {
|
||
rgb,
|
||
rgba,
|
||
hsl,
|
||
hsla,
|
||
hex,
|
||
hexa
|
||
};
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/VColorPickerEdit.js
|
||
var VColorPickerInput = (_ref) => {
|
||
let {
|
||
label,
|
||
...rest
|
||
} = _ref;
|
||
return createBaseVNode("div", {
|
||
"class": "v-color-picker-edit__input"
|
||
}, [createBaseVNode("input", normalizeProps(guardReactiveProps(rest)), null), createBaseVNode("span", null, [label])]);
|
||
};
|
||
var makeVColorPickerEditProps = propsFactory({
|
||
color: Object,
|
||
disabled: Boolean,
|
||
mode: {
|
||
type: String,
|
||
default: "rgba",
|
||
validator: (v) => Object.keys(modes).includes(v)
|
||
},
|
||
modes: {
|
||
type: Array,
|
||
default: () => Object.keys(modes),
|
||
validator: (v) => Array.isArray(v) && v.every((m) => Object.keys(modes).includes(m))
|
||
},
|
||
...makeComponentProps()
|
||
}, "VColorPickerEdit");
|
||
var VColorPickerEdit = defineComponent({
|
||
name: "VColorPickerEdit",
|
||
props: makeVColorPickerEditProps(),
|
||
emits: {
|
||
"update:color": (color) => true,
|
||
"update:mode": (mode) => true
|
||
},
|
||
setup(props, _ref2) {
|
||
let {
|
||
emit
|
||
} = _ref2;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const enabledModes = computed(() => {
|
||
return props.modes.map((key) => ({
|
||
...modes[key],
|
||
name: key
|
||
}));
|
||
});
|
||
const inputs = computed(() => {
|
||
const mode = enabledModes.value.find((m) => m.name === props.mode);
|
||
if (!mode) return [];
|
||
const color = props.color ? mode.to(props.color) : null;
|
||
return mode.inputs?.map((_ref3) => {
|
||
let {
|
||
getValue,
|
||
getColor,
|
||
localeKey,
|
||
...inputProps
|
||
} = _ref3;
|
||
return {
|
||
...mode.inputProps,
|
||
...inputProps,
|
||
ariaLabel: t(`$vuetify.colorPicker.ariaLabel.${localeKey}`),
|
||
disabled: props.disabled,
|
||
value: color && getValue(color),
|
||
onChange: (e) => {
|
||
const target = e.target;
|
||
if (!target) return;
|
||
emit("update:color", mode.from(getColor(color ?? mode.to(nullColor), target.value)));
|
||
}
|
||
};
|
||
});
|
||
});
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-color-picker-edit", props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, [inputs.value?.map((props2) => createVNode(VColorPickerInput, props2, null)), enabledModes.value.length > 1 && createVNode(VBtn, {
|
||
"icon": "$unfold",
|
||
"size": "x-small",
|
||
"variant": "plain",
|
||
"aria-label": t("$vuetify.colorPicker.ariaLabel.changeFormat"),
|
||
"onClick": () => {
|
||
const mi = enabledModes.value.findIndex((m) => m.name === props.mode);
|
||
emit("update:mode", enabledModes.value[(mi + 1) % enabledModes.value.length].name);
|
||
}
|
||
}, null)]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/VColorPickerPreview.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VColorPicker/VColorPickerPreview.css";
|
||
var makeVColorPickerPreviewProps = propsFactory({
|
||
color: {
|
||
type: Object
|
||
},
|
||
disabled: Boolean,
|
||
hideAlpha: Boolean,
|
||
hideEyeDropper: Boolean,
|
||
eyeDropperIcon: {
|
||
type: IconValue,
|
||
default: "$eyeDropper"
|
||
},
|
||
...makeComponentProps()
|
||
}, "VColorPickerPreview");
|
||
var VColorPickerPreview = defineComponent({
|
||
name: "VColorPickerPreview",
|
||
props: makeVColorPickerPreviewProps(),
|
||
emits: {
|
||
"update:color": (color) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const abortController = new AbortController();
|
||
onUnmounted(() => abortController.abort());
|
||
async function openEyeDropper() {
|
||
if (!SUPPORTS_EYE_DROPPER || props.disabled) return;
|
||
const eyeDropper = new window.EyeDropper();
|
||
try {
|
||
const result = await eyeDropper.open({
|
||
signal: abortController.signal
|
||
});
|
||
const colorHexValue = RGBtoHSV(parseColor(result.sRGBHex));
|
||
emit("update:color", {
|
||
...props.color ?? nullColor,
|
||
...colorHexValue
|
||
});
|
||
} catch (e) {
|
||
}
|
||
}
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-color-picker-preview", {
|
||
"v-color-picker-preview--hide-alpha": props.hideAlpha
|
||
}, props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, [SUPPORTS_EYE_DROPPER && !props.hideEyeDropper && createBaseVNode("div", {
|
||
"class": "v-color-picker-preview__eye-dropper",
|
||
"key": "eyeDropper"
|
||
}, [createVNode(VBtn, {
|
||
"aria-label": t("$vuetify.colorPicker.ariaLabel.eyedropper"),
|
||
"density": "comfortable",
|
||
"disabled": props.disabled,
|
||
"icon": props.eyeDropperIcon,
|
||
"variant": "plain",
|
||
"onClick": openEyeDropper
|
||
}, null)]), createBaseVNode("div", {
|
||
"class": "v-color-picker-preview__dot"
|
||
}, [createBaseVNode("div", {
|
||
"style": {
|
||
background: HSVtoCSS(props.color ?? nullColor)
|
||
}
|
||
}, null)]), createBaseVNode("div", {
|
||
"class": "v-color-picker-preview__sliders"
|
||
}, [createVNode(VSlider, {
|
||
"class": "v-color-picker-preview__track v-color-picker-preview__hue",
|
||
"aria-label": t("$vuetify.colorPicker.ariaLabel.hueSlider"),
|
||
"modelValue": props.color?.h,
|
||
"onUpdate:modelValue": (h) => emit("update:color", {
|
||
...props.color ?? nullColor,
|
||
h
|
||
}),
|
||
"step": 1,
|
||
"min": 0,
|
||
"max": 360,
|
||
"disabled": props.disabled,
|
||
"thumbSize": 14,
|
||
"trackSize": 8,
|
||
"trackFillColor": "white",
|
||
"hideDetails": true
|
||
}, null), !props.hideAlpha && createVNode(VSlider, {
|
||
"class": "v-color-picker-preview__track v-color-picker-preview__alpha",
|
||
"aria-label": t("$vuetify.colorPicker.ariaLabel.alphaSlider"),
|
||
"modelValue": props.color?.a ?? 1,
|
||
"onUpdate:modelValue": (a) => emit("update:color", {
|
||
...props.color ?? nullColor,
|
||
a
|
||
}),
|
||
"step": 0.01,
|
||
"min": 0,
|
||
"max": 1,
|
||
"disabled": props.disabled,
|
||
"thumbSize": 14,
|
||
"trackSize": 8,
|
||
"trackFillColor": "white",
|
||
"hideDetails": true
|
||
}, null)])]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/VColorPickerSwatches.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VColorPicker/VColorPickerSwatches.css";
|
||
|
||
// node_modules/vuetify/lib/util/colors.js
|
||
var red = {
|
||
base: "#f44336",
|
||
lighten5: "#ffebee",
|
||
lighten4: "#ffcdd2",
|
||
lighten3: "#ef9a9a",
|
||
lighten2: "#e57373",
|
||
lighten1: "#ef5350",
|
||
darken1: "#e53935",
|
||
darken2: "#d32f2f",
|
||
darken3: "#c62828",
|
||
darken4: "#b71c1c",
|
||
accent1: "#ff8a80",
|
||
accent2: "#ff5252",
|
||
accent3: "#ff1744",
|
||
accent4: "#d50000"
|
||
};
|
||
var pink = {
|
||
base: "#e91e63",
|
||
lighten5: "#fce4ec",
|
||
lighten4: "#f8bbd0",
|
||
lighten3: "#f48fb1",
|
||
lighten2: "#f06292",
|
||
lighten1: "#ec407a",
|
||
darken1: "#d81b60",
|
||
darken2: "#c2185b",
|
||
darken3: "#ad1457",
|
||
darken4: "#880e4f",
|
||
accent1: "#ff80ab",
|
||
accent2: "#ff4081",
|
||
accent3: "#f50057",
|
||
accent4: "#c51162"
|
||
};
|
||
var purple = {
|
||
base: "#9c27b0",
|
||
lighten5: "#f3e5f5",
|
||
lighten4: "#e1bee7",
|
||
lighten3: "#ce93d8",
|
||
lighten2: "#ba68c8",
|
||
lighten1: "#ab47bc",
|
||
darken1: "#8e24aa",
|
||
darken2: "#7b1fa2",
|
||
darken3: "#6a1b9a",
|
||
darken4: "#4a148c",
|
||
accent1: "#ea80fc",
|
||
accent2: "#e040fb",
|
||
accent3: "#d500f9",
|
||
accent4: "#aa00ff"
|
||
};
|
||
var deepPurple = {
|
||
base: "#673ab7",
|
||
lighten5: "#ede7f6",
|
||
lighten4: "#d1c4e9",
|
||
lighten3: "#b39ddb",
|
||
lighten2: "#9575cd",
|
||
lighten1: "#7e57c2",
|
||
darken1: "#5e35b1",
|
||
darken2: "#512da8",
|
||
darken3: "#4527a0",
|
||
darken4: "#311b92",
|
||
accent1: "#b388ff",
|
||
accent2: "#7c4dff",
|
||
accent3: "#651fff",
|
||
accent4: "#6200ea"
|
||
};
|
||
var indigo = {
|
||
base: "#3f51b5",
|
||
lighten5: "#e8eaf6",
|
||
lighten4: "#c5cae9",
|
||
lighten3: "#9fa8da",
|
||
lighten2: "#7986cb",
|
||
lighten1: "#5c6bc0",
|
||
darken1: "#3949ab",
|
||
darken2: "#303f9f",
|
||
darken3: "#283593",
|
||
darken4: "#1a237e",
|
||
accent1: "#8c9eff",
|
||
accent2: "#536dfe",
|
||
accent3: "#3d5afe",
|
||
accent4: "#304ffe"
|
||
};
|
||
var blue = {
|
||
base: "#2196f3",
|
||
lighten5: "#e3f2fd",
|
||
lighten4: "#bbdefb",
|
||
lighten3: "#90caf9",
|
||
lighten2: "#64b5f6",
|
||
lighten1: "#42a5f5",
|
||
darken1: "#1e88e5",
|
||
darken2: "#1976d2",
|
||
darken3: "#1565c0",
|
||
darken4: "#0d47a1",
|
||
accent1: "#82b1ff",
|
||
accent2: "#448aff",
|
||
accent3: "#2979ff",
|
||
accent4: "#2962ff"
|
||
};
|
||
var lightBlue = {
|
||
base: "#03a9f4",
|
||
lighten5: "#e1f5fe",
|
||
lighten4: "#b3e5fc",
|
||
lighten3: "#81d4fa",
|
||
lighten2: "#4fc3f7",
|
||
lighten1: "#29b6f6",
|
||
darken1: "#039be5",
|
||
darken2: "#0288d1",
|
||
darken3: "#0277bd",
|
||
darken4: "#01579b",
|
||
accent1: "#80d8ff",
|
||
accent2: "#40c4ff",
|
||
accent3: "#00b0ff",
|
||
accent4: "#0091ea"
|
||
};
|
||
var cyan = {
|
||
base: "#00bcd4",
|
||
lighten5: "#e0f7fa",
|
||
lighten4: "#b2ebf2",
|
||
lighten3: "#80deea",
|
||
lighten2: "#4dd0e1",
|
||
lighten1: "#26c6da",
|
||
darken1: "#00acc1",
|
||
darken2: "#0097a7",
|
||
darken3: "#00838f",
|
||
darken4: "#006064",
|
||
accent1: "#84ffff",
|
||
accent2: "#18ffff",
|
||
accent3: "#00e5ff",
|
||
accent4: "#00b8d4"
|
||
};
|
||
var teal = {
|
||
base: "#009688",
|
||
lighten5: "#e0f2f1",
|
||
lighten4: "#b2dfdb",
|
||
lighten3: "#80cbc4",
|
||
lighten2: "#4db6ac",
|
||
lighten1: "#26a69a",
|
||
darken1: "#00897b",
|
||
darken2: "#00796b",
|
||
darken3: "#00695c",
|
||
darken4: "#004d40",
|
||
accent1: "#a7ffeb",
|
||
accent2: "#64ffda",
|
||
accent3: "#1de9b6",
|
||
accent4: "#00bfa5"
|
||
};
|
||
var green = {
|
||
base: "#4caf50",
|
||
lighten5: "#e8f5e9",
|
||
lighten4: "#c8e6c9",
|
||
lighten3: "#a5d6a7",
|
||
lighten2: "#81c784",
|
||
lighten1: "#66bb6a",
|
||
darken1: "#43a047",
|
||
darken2: "#388e3c",
|
||
darken3: "#2e7d32",
|
||
darken4: "#1b5e20",
|
||
accent1: "#b9f6ca",
|
||
accent2: "#69f0ae",
|
||
accent3: "#00e676",
|
||
accent4: "#00c853"
|
||
};
|
||
var lightGreen = {
|
||
base: "#8bc34a",
|
||
lighten5: "#f1f8e9",
|
||
lighten4: "#dcedc8",
|
||
lighten3: "#c5e1a5",
|
||
lighten2: "#aed581",
|
||
lighten1: "#9ccc65",
|
||
darken1: "#7cb342",
|
||
darken2: "#689f38",
|
||
darken3: "#558b2f",
|
||
darken4: "#33691e",
|
||
accent1: "#ccff90",
|
||
accent2: "#b2ff59",
|
||
accent3: "#76ff03",
|
||
accent4: "#64dd17"
|
||
};
|
||
var lime = {
|
||
base: "#cddc39",
|
||
lighten5: "#f9fbe7",
|
||
lighten4: "#f0f4c3",
|
||
lighten3: "#e6ee9c",
|
||
lighten2: "#dce775",
|
||
lighten1: "#d4e157",
|
||
darken1: "#c0ca33",
|
||
darken2: "#afb42b",
|
||
darken3: "#9e9d24",
|
||
darken4: "#827717",
|
||
accent1: "#f4ff81",
|
||
accent2: "#eeff41",
|
||
accent3: "#c6ff00",
|
||
accent4: "#aeea00"
|
||
};
|
||
var yellow = {
|
||
base: "#ffeb3b",
|
||
lighten5: "#fffde7",
|
||
lighten4: "#fff9c4",
|
||
lighten3: "#fff59d",
|
||
lighten2: "#fff176",
|
||
lighten1: "#ffee58",
|
||
darken1: "#fdd835",
|
||
darken2: "#fbc02d",
|
||
darken3: "#f9a825",
|
||
darken4: "#f57f17",
|
||
accent1: "#ffff8d",
|
||
accent2: "#ffff00",
|
||
accent3: "#ffea00",
|
||
accent4: "#ffd600"
|
||
};
|
||
var amber = {
|
||
base: "#ffc107",
|
||
lighten5: "#fff8e1",
|
||
lighten4: "#ffecb3",
|
||
lighten3: "#ffe082",
|
||
lighten2: "#ffd54f",
|
||
lighten1: "#ffca28",
|
||
darken1: "#ffb300",
|
||
darken2: "#ffa000",
|
||
darken3: "#ff8f00",
|
||
darken4: "#ff6f00",
|
||
accent1: "#ffe57f",
|
||
accent2: "#ffd740",
|
||
accent3: "#ffc400",
|
||
accent4: "#ffab00"
|
||
};
|
||
var orange = {
|
||
base: "#ff9800",
|
||
lighten5: "#fff3e0",
|
||
lighten4: "#ffe0b2",
|
||
lighten3: "#ffcc80",
|
||
lighten2: "#ffb74d",
|
||
lighten1: "#ffa726",
|
||
darken1: "#fb8c00",
|
||
darken2: "#f57c00",
|
||
darken3: "#ef6c00",
|
||
darken4: "#e65100",
|
||
accent1: "#ffd180",
|
||
accent2: "#ffab40",
|
||
accent3: "#ff9100",
|
||
accent4: "#ff6d00"
|
||
};
|
||
var deepOrange = {
|
||
base: "#ff5722",
|
||
lighten5: "#fbe9e7",
|
||
lighten4: "#ffccbc",
|
||
lighten3: "#ffab91",
|
||
lighten2: "#ff8a65",
|
||
lighten1: "#ff7043",
|
||
darken1: "#f4511e",
|
||
darken2: "#e64a19",
|
||
darken3: "#d84315",
|
||
darken4: "#bf360c",
|
||
accent1: "#ff9e80",
|
||
accent2: "#ff6e40",
|
||
accent3: "#ff3d00",
|
||
accent4: "#dd2c00"
|
||
};
|
||
var brown = {
|
||
base: "#795548",
|
||
lighten5: "#efebe9",
|
||
lighten4: "#d7ccc8",
|
||
lighten3: "#bcaaa4",
|
||
lighten2: "#a1887f",
|
||
lighten1: "#8d6e63",
|
||
darken1: "#6d4c41",
|
||
darken2: "#5d4037",
|
||
darken3: "#4e342e",
|
||
darken4: "#3e2723"
|
||
};
|
||
var blueGrey = {
|
||
base: "#607d8b",
|
||
lighten5: "#eceff1",
|
||
lighten4: "#cfd8dc",
|
||
lighten3: "#b0bec5",
|
||
lighten2: "#90a4ae",
|
||
lighten1: "#78909c",
|
||
darken1: "#546e7a",
|
||
darken2: "#455a64",
|
||
darken3: "#37474f",
|
||
darken4: "#263238"
|
||
};
|
||
var grey = {
|
||
base: "#9e9e9e",
|
||
lighten5: "#fafafa",
|
||
lighten4: "#f5f5f5",
|
||
lighten3: "#eeeeee",
|
||
lighten2: "#e0e0e0",
|
||
lighten1: "#bdbdbd",
|
||
darken1: "#757575",
|
||
darken2: "#616161",
|
||
darken3: "#424242",
|
||
darken4: "#212121"
|
||
};
|
||
var shades = {
|
||
black: "#000000",
|
||
white: "#ffffff",
|
||
transparent: "#ffffff00"
|
||
};
|
||
var colors_default = {
|
||
red,
|
||
pink,
|
||
purple,
|
||
deepPurple,
|
||
indigo,
|
||
blue,
|
||
lightBlue,
|
||
cyan,
|
||
teal,
|
||
green,
|
||
lightGreen,
|
||
lime,
|
||
yellow,
|
||
amber,
|
||
orange,
|
||
deepOrange,
|
||
brown,
|
||
blueGrey,
|
||
grey,
|
||
shades
|
||
};
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/VColorPickerSwatches.js
|
||
var makeVColorPickerSwatchesProps = propsFactory({
|
||
swatches: {
|
||
type: Array,
|
||
default: () => parseDefaultColors(colors_default)
|
||
},
|
||
disabled: Boolean,
|
||
color: Object,
|
||
maxHeight: [Number, String],
|
||
...makeComponentProps()
|
||
}, "VColorPickerSwatches");
|
||
function parseDefaultColors(colors) {
|
||
return Object.keys(colors).map((key) => {
|
||
const color = colors[key];
|
||
return color.base ? [color.base, color.darken4, color.darken3, color.darken2, color.darken1, color.lighten1, color.lighten2, color.lighten3, color.lighten4, color.lighten5] : [color.black, color.white, color.transparent];
|
||
});
|
||
}
|
||
var VColorPickerSwatches = defineComponent({
|
||
name: "VColorPickerSwatches",
|
||
props: makeVColorPickerSwatchesProps(),
|
||
emits: {
|
||
"update:color": (color) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit
|
||
} = _ref;
|
||
function onSwatchClick(hsva) {
|
||
if (props.disabled || !hsva) {
|
||
return;
|
||
}
|
||
emit("update:color", hsva);
|
||
}
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-color-picker-swatches", props.class]),
|
||
"style": normalizeStyle([{
|
||
maxHeight: convertToUnit(props.maxHeight)
|
||
}, props.style])
|
||
}, [createBaseVNode("div", null, [props.swatches.map((swatch) => createBaseVNode("div", {
|
||
"class": "v-color-picker-swatches__swatch"
|
||
}, [swatch.map((color) => {
|
||
const rgba2 = parseColor(color);
|
||
const hsva = RGBtoHSV(rgba2);
|
||
const background = RGBtoCSS(rgba2);
|
||
return createBaseVNode("div", {
|
||
"class": normalizeClass(["v-color-picker-swatches__color", {
|
||
"v-color-picker-swatches__color--disabled": props.disabled
|
||
}]),
|
||
"onClick": () => onSwatchClick(hsva)
|
||
}, [createBaseVNode("div", {
|
||
"style": {
|
||
background
|
||
}
|
||
}, [props.color && deepEqual(props.color, hsva) ? createVNode(VIcon, {
|
||
"size": "x-small",
|
||
"icon": "$success",
|
||
"color": getContrast(color, "#FFFFFF") > 2 ? "white" : "black"
|
||
}, null) : void 0])]);
|
||
})]))])]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/labs/VPicker/VPicker.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/labs/VPicker/VPicker.css";
|
||
|
||
// node_modules/vuetify/lib/labs/VPicker/VPickerTitle.js
|
||
var VPickerTitle = createSimpleFunctional("v-picker-title");
|
||
|
||
// node_modules/vuetify/lib/labs/VPicker/VPicker.js
|
||
var makeVPickerProps = propsFactory({
|
||
bgColor: String,
|
||
divided: Boolean,
|
||
landscape: Boolean,
|
||
title: String,
|
||
hideHeader: Boolean,
|
||
hideTitle: Boolean,
|
||
...makeVSheetProps()
|
||
}, "VPicker");
|
||
var VPicker = genericComponent()({
|
||
name: "VPicker",
|
||
props: makeVPickerProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.color);
|
||
useRender(() => {
|
||
const sheetProps = VSheet.filterProps(props);
|
||
const hasTitle = !props.hideTitle && !!(props.title || slots.title);
|
||
return createVNode(VSheet, mergeProps(sheetProps, {
|
||
"color": props.bgColor,
|
||
"class": ["v-picker", {
|
||
"v-picker--divided": props.divided,
|
||
"v-picker--landscape": props.landscape,
|
||
"v-picker--with-actions": !!slots.actions
|
||
}, props.class],
|
||
"style": props.style
|
||
}), {
|
||
default: () => [!props.hideHeader && createBaseVNode("div", {
|
||
"key": "header",
|
||
"class": normalizeClass(["v-picker__header-wrapper", backgroundColorClasses.value]),
|
||
"style": normalizeStyle([backgroundColorStyles.value])
|
||
}, [hasTitle && createVNode(VPickerTitle, {
|
||
"key": "picker-title"
|
||
}, {
|
||
default: () => [slots.title?.() ?? props.title]
|
||
}), slots.header && createBaseVNode("div", {
|
||
"class": "v-picker__header"
|
||
}, [slots.header()])]), createBaseVNode("div", {
|
||
"class": "v-picker__body"
|
||
}, [slots.default?.()]), slots.actions && createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VBtn: {
|
||
slim: true,
|
||
variant: "text"
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [createBaseVNode("div", {
|
||
"class": "v-picker__actions"
|
||
}, [slots.actions()])]
|
||
})]
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VColorPicker/VColorPicker.js
|
||
var makeVColorPickerProps = propsFactory({
|
||
canvasHeight: {
|
||
type: [String, Number],
|
||
default: 150
|
||
},
|
||
disabled: Boolean,
|
||
dotSize: {
|
||
type: [Number, String],
|
||
default: 10
|
||
},
|
||
hideCanvas: Boolean,
|
||
hideSliders: Boolean,
|
||
hideInputs: Boolean,
|
||
mode: {
|
||
type: String,
|
||
default: "rgba",
|
||
validator: (v) => Object.keys(modes).includes(v)
|
||
},
|
||
modes: {
|
||
type: Array,
|
||
default: () => Object.keys(modes),
|
||
validator: (v) => Array.isArray(v) && v.every((m) => Object.keys(modes).includes(m))
|
||
},
|
||
showSwatches: Boolean,
|
||
swatches: Array,
|
||
swatchesMaxHeight: {
|
||
type: [Number, String],
|
||
default: 150
|
||
},
|
||
modelValue: {
|
||
type: [Object, String]
|
||
},
|
||
...makeVPickerProps({
|
||
hideHeader: true
|
||
}),
|
||
...pick(makeVColorPickerPreviewProps(), ["hideEyeDropper", "eyeDropperIcon"])
|
||
}, "VColorPicker");
|
||
var VColorPicker = defineComponent({
|
||
name: "VColorPicker",
|
||
props: makeVColorPickerProps(),
|
||
emits: {
|
||
"update:modelValue": (color) => true,
|
||
"update:mode": (mode) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const mode = useProxiedModel(props, "mode");
|
||
const hue = ref(null);
|
||
const model = useProxiedModel(props, "modelValue", void 0, (v) => {
|
||
if (v == null || v === "") return null;
|
||
let c;
|
||
try {
|
||
c = RGBtoHSV(parseColor(v));
|
||
} catch (err) {
|
||
consoleWarn(err);
|
||
return null;
|
||
}
|
||
return c;
|
||
}, (v) => {
|
||
if (!v) return null;
|
||
return extractColor(v, props.modelValue);
|
||
});
|
||
const currentColor = computed(() => {
|
||
return model.value ? {
|
||
...model.value,
|
||
h: hue.value ?? model.value.h
|
||
} : null;
|
||
});
|
||
const {
|
||
rtlClasses
|
||
} = useRtl();
|
||
let externalChange = true;
|
||
watch(model, (v) => {
|
||
if (!externalChange) {
|
||
externalChange = true;
|
||
return;
|
||
}
|
||
if (!v) return;
|
||
hue.value = v.h;
|
||
}, {
|
||
immediate: true
|
||
});
|
||
const updateColor = (hsva) => {
|
||
externalChange = false;
|
||
hue.value = hsva.h;
|
||
model.value = hsva;
|
||
};
|
||
onBeforeMount(() => {
|
||
if (!props.modes.includes(mode.value)) mode.value = props.modes[0];
|
||
});
|
||
provideDefaults({
|
||
VSlider: {
|
||
color: void 0,
|
||
trackColor: void 0,
|
||
trackFillColor: void 0
|
||
}
|
||
});
|
||
useRender(() => {
|
||
const pickerProps = VPicker.filterProps(props);
|
||
return createVNode(VPicker, mergeProps(pickerProps, {
|
||
"class": ["v-color-picker", rtlClasses.value, props.class],
|
||
"style": [{
|
||
"--v-color-picker-color-hsv": HSVtoCSS({
|
||
...currentColor.value ?? nullColor,
|
||
a: 1
|
||
})
|
||
}, props.style]
|
||
}), {
|
||
...slots,
|
||
default: () => createBaseVNode(Fragment, null, [!props.hideCanvas && createVNode(VColorPickerCanvas, {
|
||
"key": "canvas",
|
||
"color": currentColor.value,
|
||
"onUpdate:color": updateColor,
|
||
"disabled": props.disabled,
|
||
"dotSize": props.dotSize,
|
||
"width": props.width,
|
||
"height": props.canvasHeight
|
||
}, null), (!props.hideSliders || !props.hideInputs) && createBaseVNode("div", {
|
||
"key": "controls",
|
||
"class": "v-color-picker__controls"
|
||
}, [!props.hideSliders && createVNode(VColorPickerPreview, {
|
||
"key": "preview",
|
||
"color": currentColor.value,
|
||
"onUpdate:color": updateColor,
|
||
"hideAlpha": !mode.value.endsWith("a"),
|
||
"disabled": props.disabled,
|
||
"hideEyeDropper": props.hideEyeDropper,
|
||
"eyeDropperIcon": props.eyeDropperIcon
|
||
}, null), !props.hideInputs && createVNode(VColorPickerEdit, {
|
||
"key": "edit",
|
||
"modes": props.modes,
|
||
"mode": mode.value,
|
||
"onUpdate:mode": (m) => mode.value = m,
|
||
"color": currentColor.value,
|
||
"onUpdate:color": updateColor,
|
||
"disabled": props.disabled
|
||
}, null)]), props.showSwatches && createVNode(VColorPickerSwatches, {
|
||
"key": "swatches",
|
||
"color": currentColor.value,
|
||
"onUpdate:color": updateColor,
|
||
"maxHeight": props.swatchesMaxHeight,
|
||
"swatches": props.swatches,
|
||
"disabled": props.disabled
|
||
}, null)])
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VConfirmEdit/VConfirmEdit.js
|
||
var makeVConfirmEditProps = propsFactory({
|
||
modelValue: null,
|
||
color: String,
|
||
cancelText: {
|
||
type: String,
|
||
default: "$vuetify.confirmEdit.cancel"
|
||
},
|
||
okText: {
|
||
type: String,
|
||
default: "$vuetify.confirmEdit.ok"
|
||
},
|
||
disabled: {
|
||
type: [Boolean, Array],
|
||
default: void 0
|
||
},
|
||
hideActions: Boolean
|
||
}, "VConfirmEdit");
|
||
var VConfirmEdit = genericComponent()({
|
||
name: "VConfirmEdit",
|
||
props: makeVConfirmEditProps(),
|
||
emits: {
|
||
cancel: () => true,
|
||
save: (value) => true,
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const model = useProxiedModel(props, "modelValue");
|
||
const internalModel = ref();
|
||
watchEffect(() => {
|
||
internalModel.value = structuredClone(deepToRaw(model.value));
|
||
});
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const isPristine = computed(() => {
|
||
return deepEqual(model.value, internalModel.value);
|
||
});
|
||
function isActionDisabled(action) {
|
||
if (typeof props.disabled === "boolean") {
|
||
return props.disabled;
|
||
}
|
||
if (Array.isArray(props.disabled)) {
|
||
return props.disabled.includes(action);
|
||
}
|
||
return isPristine.value;
|
||
}
|
||
const isSaveDisabled = computed(() => isActionDisabled("save"));
|
||
const isCancelDisabled = computed(() => isActionDisabled("cancel"));
|
||
function save() {
|
||
model.value = internalModel.value;
|
||
emit("save", internalModel.value);
|
||
}
|
||
function cancel() {
|
||
internalModel.value = structuredClone(deepToRaw(model.value));
|
||
emit("cancel");
|
||
}
|
||
function actions(actionsProps) {
|
||
return createBaseVNode(Fragment, null, [createVNode(VBtn, mergeProps({
|
||
"disabled": isCancelDisabled.value,
|
||
"variant": "text",
|
||
"color": props.color,
|
||
"onClick": cancel,
|
||
"text": t(props.cancelText)
|
||
}, actionsProps), null), createVNode(VBtn, mergeProps({
|
||
"disabled": isSaveDisabled.value,
|
||
"variant": "text",
|
||
"color": props.color,
|
||
"onClick": save,
|
||
"text": t(props.okText)
|
||
}, actionsProps), null)]);
|
||
}
|
||
let actionsUsed = false;
|
||
useRender(() => {
|
||
return createBaseVNode(Fragment, null, [slots.default?.({
|
||
model: internalModel,
|
||
save,
|
||
cancel,
|
||
isPristine: isPristine.value,
|
||
get actions() {
|
||
actionsUsed = true;
|
||
return actions;
|
||
}
|
||
}), !props.hideActions && !actionsUsed && actions()]);
|
||
});
|
||
return {
|
||
save,
|
||
cancel,
|
||
isPristine
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VDataIterator/composables/items.js
|
||
var makeDataIteratorItemsProps = propsFactory({
|
||
items: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
itemValue: {
|
||
type: [String, Array, Function],
|
||
default: "id"
|
||
},
|
||
itemSelectable: {
|
||
type: [String, Array, Function],
|
||
default: null
|
||
},
|
||
returnObject: Boolean
|
||
}, "DataIterator-items");
|
||
function transformItem(props, item) {
|
||
const value = props.returnObject ? item : getPropertyFromItem(item, props.itemValue);
|
||
const selectable = getPropertyFromItem(item, props.itemSelectable, true);
|
||
return {
|
||
type: "item",
|
||
value,
|
||
selectable,
|
||
raw: item
|
||
};
|
||
}
|
||
function transformItems(props, items) {
|
||
const array = [];
|
||
for (const item of items) {
|
||
array.push(transformItem(props, item));
|
||
}
|
||
return array;
|
||
}
|
||
function useDataIteratorItems(props) {
|
||
const items = computed(() => transformItems(props, props.items));
|
||
return {
|
||
items
|
||
};
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VDataIterator/VDataIterator.js
|
||
var makeVDataIteratorProps = propsFactory({
|
||
search: String,
|
||
loading: Boolean,
|
||
...makeComponentProps(),
|
||
...makeDataIteratorItemsProps(),
|
||
...makeDataTableSelectProps(),
|
||
...makeDataTableSortProps(),
|
||
...makeDataTablePaginateProps({
|
||
itemsPerPage: 5
|
||
}),
|
||
...makeDataTableExpandProps(),
|
||
...makeDataTableGroupProps(),
|
||
...makeFilterProps(),
|
||
...makeTagProps(),
|
||
...makeTransitionProps({
|
||
transition: {
|
||
component: VFadeTransition,
|
||
hideOnLeave: true
|
||
}
|
||
})
|
||
}, "VDataIterator");
|
||
var VDataIterator = genericComponent()({
|
||
name: "VDataIterator",
|
||
props: makeVDataIteratorProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true,
|
||
"update:groupBy": (value) => true,
|
||
"update:page": (value) => true,
|
||
"update:itemsPerPage": (value) => true,
|
||
"update:sortBy": (value) => true,
|
||
"update:options": (value) => true,
|
||
"update:expanded": (value) => true,
|
||
"update:currentItems": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const groupBy = useProxiedModel(props, "groupBy");
|
||
const search = toRef(() => props.search);
|
||
const {
|
||
items
|
||
} = useDataIteratorItems(props);
|
||
const {
|
||
filteredItems
|
||
} = useFilter(props, items, search, {
|
||
transform: (item) => item.raw
|
||
});
|
||
const {
|
||
initialSortOrder,
|
||
sortBy,
|
||
multiSort,
|
||
mustSort
|
||
} = createSort(props);
|
||
const {
|
||
page,
|
||
itemsPerPage
|
||
} = createPagination(props);
|
||
const {
|
||
toggleSort
|
||
} = provideSort({
|
||
initialSortOrder,
|
||
sortBy,
|
||
multiSort,
|
||
mustSort,
|
||
page
|
||
});
|
||
const {
|
||
sortByWithGroups,
|
||
opened,
|
||
extractRows,
|
||
isGroupOpen,
|
||
toggleGroup
|
||
} = provideGroupBy({
|
||
groupBy,
|
||
sortBy
|
||
});
|
||
const {
|
||
sortedItems
|
||
} = useSortedItems(props, filteredItems, sortByWithGroups, {
|
||
transform: (item) => item.raw
|
||
});
|
||
const {
|
||
flatItems
|
||
} = useGroupedItems(sortedItems, groupBy, opened, false);
|
||
const itemsLength = toRef(() => flatItems.value.length);
|
||
const {
|
||
startIndex,
|
||
stopIndex,
|
||
pageCount,
|
||
prevPage,
|
||
nextPage,
|
||
setItemsPerPage,
|
||
setPage
|
||
} = providePagination({
|
||
page,
|
||
itemsPerPage,
|
||
itemsLength
|
||
});
|
||
const {
|
||
paginatedItems
|
||
} = usePaginatedItems({
|
||
items: flatItems,
|
||
startIndex,
|
||
stopIndex,
|
||
itemsPerPage
|
||
});
|
||
const paginatedItemsWithoutGroups = computed(() => extractRows(paginatedItems.value));
|
||
const {
|
||
isSelected,
|
||
select,
|
||
selectAll,
|
||
toggleSelect
|
||
} = provideSelection(props, {
|
||
allItems: items,
|
||
currentPage: paginatedItemsWithoutGroups
|
||
});
|
||
const {
|
||
isExpanded,
|
||
toggleExpand
|
||
} = provideExpanded(props);
|
||
useOptions({
|
||
page,
|
||
itemsPerPage,
|
||
sortBy,
|
||
groupBy,
|
||
search
|
||
});
|
||
const slotProps = computed(() => ({
|
||
page: page.value,
|
||
itemsPerPage: itemsPerPage.value,
|
||
sortBy: sortBy.value,
|
||
pageCount: pageCount.value,
|
||
toggleSort,
|
||
prevPage,
|
||
nextPage,
|
||
setPage,
|
||
setItemsPerPage,
|
||
isSelected,
|
||
select,
|
||
selectAll,
|
||
toggleSelect,
|
||
isExpanded,
|
||
toggleExpand,
|
||
isGroupOpen,
|
||
toggleGroup,
|
||
items: paginatedItemsWithoutGroups.value,
|
||
itemsCount: filteredItems.value.length,
|
||
groupedItems: paginatedItems.value
|
||
}));
|
||
useRender(() => createVNode(props.tag, {
|
||
"class": normalizeClass(["v-data-iterator", {
|
||
"v-data-iterator--loading": props.loading
|
||
}, props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, {
|
||
default: () => [slots.header?.(slotProps.value), createVNode(MaybeTransition, {
|
||
"transition": props.transition
|
||
}, {
|
||
default: () => [props.loading ? createVNode(LoaderSlot, {
|
||
"key": "loader",
|
||
"name": "v-data-iterator",
|
||
"active": true
|
||
}, {
|
||
default: (slotProps2) => slots.loader?.(slotProps2)
|
||
}) : createBaseVNode("div", {
|
||
"key": "items"
|
||
}, [!paginatedItems.value.length ? slots["no-data"]?.() : slots.default?.(slotProps.value)])]
|
||
}), slots.footer?.(slotProps.value)]
|
||
}));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VDatePicker/VDatePicker.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VDatePicker/VDatePicker.css";
|
||
|
||
// node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.css";
|
||
var makeVDatePickerControlsProps = propsFactory({
|
||
active: {
|
||
type: [String, Array],
|
||
default: void 0
|
||
},
|
||
controlHeight: [Number, String],
|
||
controlVariant: {
|
||
type: String,
|
||
default: "docked"
|
||
},
|
||
noMonthPicker: Boolean,
|
||
disabled: {
|
||
type: [Boolean, String, Array],
|
||
default: null
|
||
},
|
||
nextIcon: {
|
||
type: IconValue,
|
||
default: "$next"
|
||
},
|
||
prevIcon: {
|
||
type: IconValue,
|
||
default: "$prev"
|
||
},
|
||
modeIcon: {
|
||
type: IconValue,
|
||
default: "$subgroup"
|
||
},
|
||
text: String,
|
||
monthText: String,
|
||
yearText: String,
|
||
viewMode: {
|
||
type: String,
|
||
default: "month"
|
||
}
|
||
}, "VDatePickerControls");
|
||
var VDatePickerControls = genericComponent()({
|
||
name: "VDatePickerControls",
|
||
props: makeVDatePickerControlsProps(),
|
||
emits: {
|
||
"click:year": () => true,
|
||
"click:month": () => true,
|
||
"click:prev": () => true,
|
||
"click:next": () => true,
|
||
"click:prev-year": () => true,
|
||
"click:next-year": () => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const disableMonth = computed(() => {
|
||
return Array.isArray(props.disabled) ? props.disabled.includes("text") : !!props.disabled;
|
||
});
|
||
const disableYear = computed(() => {
|
||
return Array.isArray(props.disabled) ? props.disabled.includes("mode") : !!props.disabled;
|
||
});
|
||
const disablePrevMonth = computed(() => {
|
||
return Array.isArray(props.disabled) ? props.disabled.includes("prev-month") : !!props.disabled;
|
||
});
|
||
const disableNextMonth = computed(() => {
|
||
return Array.isArray(props.disabled) ? props.disabled.includes("next-month") : !!props.disabled;
|
||
});
|
||
const disablePrevYear = computed(() => {
|
||
return Array.isArray(props.disabled) ? props.disabled.includes("prev-year") : !!props.disabled;
|
||
});
|
||
const disableNextYear = computed(() => {
|
||
return Array.isArray(props.disabled) ? props.disabled.includes("next-year") : !!props.disabled;
|
||
});
|
||
function onClickPrevMonth() {
|
||
emit("click:prev");
|
||
}
|
||
function onClickNextMonth() {
|
||
emit("click:next");
|
||
}
|
||
function onClickPrevYear() {
|
||
emit("click:prev-year");
|
||
}
|
||
function onClickNextYear() {
|
||
emit("click:next-year");
|
||
}
|
||
function onClickYear() {
|
||
emit("click:year");
|
||
}
|
||
function onClickMonth() {
|
||
emit("click:month");
|
||
}
|
||
useRender(() => {
|
||
const innerDefaults = {
|
||
VBtn: {
|
||
density: "comfortable",
|
||
variant: "text"
|
||
}
|
||
};
|
||
const prevMonth = createVNode(VBtn, {
|
||
"data-testid": "prev-month",
|
||
"disabled": disablePrevMonth.value,
|
||
"icon": props.prevIcon,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.previousMonth"),
|
||
"onClick": onClickPrevMonth
|
||
}, null);
|
||
const nextMonth = createVNode(VBtn, {
|
||
"data-testid": "next-month",
|
||
"disabled": disableNextMonth.value,
|
||
"icon": props.nextIcon,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.nextMonth"),
|
||
"onClick": onClickNextMonth
|
||
}, null);
|
||
const prevYear = createVNode(VBtn, {
|
||
"data-testid": "prev-year",
|
||
"disabled": disablePrevYear.value,
|
||
"icon": props.prevIcon,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.previousYear"),
|
||
"onClick": onClickPrevYear
|
||
}, null);
|
||
const nextYear = createVNode(VBtn, {
|
||
"data-testid": "next-year",
|
||
"disabled": disableNextYear.value,
|
||
"icon": props.nextIcon,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.nextYear"),
|
||
"onClick": onClickNextYear
|
||
}, null);
|
||
const onlyMonthBtn = createVNode(VBtn, {
|
||
"class": "v-date-picker-controls__only-month-btn",
|
||
"data-testid": "month-btn",
|
||
"density": "default",
|
||
"disabled": disableMonth.value,
|
||
"text": props.monthText,
|
||
"appendIcon": props.modeIcon,
|
||
"rounded": true,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.selectMonth"),
|
||
"onClick": onClickMonth
|
||
}, null);
|
||
const onlyYearBtn = createVNode(VBtn, {
|
||
"class": "v-date-picker-controls__only-year-btn",
|
||
"data-testid": "year-btn",
|
||
"density": "default",
|
||
"disabled": disableYear.value,
|
||
"text": props.yearText,
|
||
"appendIcon": props.modeIcon,
|
||
"rounded": true,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.selectYear"),
|
||
"onClick": onClickYear
|
||
}, null);
|
||
const monthYearBtn = createVNode(VBtn, {
|
||
"class": "v-date-picker-controls__year-btn",
|
||
"data-testid": "year-btn",
|
||
"density": "default",
|
||
"disabled": disableYear.value,
|
||
"text": props.text,
|
||
"appendIcon": props.modeIcon,
|
||
"rounded": true,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.selectYear"),
|
||
"onClick": onClickYear
|
||
}, null);
|
||
const monthYearSplit = createBaseVNode(Fragment, null, [createVNode(VBtn, {
|
||
"class": "v-date-picker-controls__month-btn",
|
||
"data-testid": "month-btn",
|
||
"height": "36",
|
||
"disabled": disableMonth.value,
|
||
"text": props.text,
|
||
"rounded": true,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.selectMonth"),
|
||
"onClick": onClickMonth
|
||
}, null), createVNode(VBtn, {
|
||
"class": "v-date-picker-controls__mode-btn",
|
||
"data-testid": "year-btn",
|
||
"disabled": disableYear.value,
|
||
"icon": props.modeIcon,
|
||
"aria-label": t("$vuetify.datePicker.ariaLabel.selectYear"),
|
||
"onClick": onClickYear
|
||
}, null)]);
|
||
const slotProps = {
|
||
viewMode: props.viewMode,
|
||
disabled: Array.isArray(props.disabled) ? props.disabled : [],
|
||
monthYearText: props.text ?? "",
|
||
monthText: props.monthText ?? "",
|
||
yearText: props.yearText ?? "",
|
||
openMonths: onClickMonth,
|
||
openYears: onClickYear,
|
||
prevMonth: onClickPrevMonth,
|
||
nextMonth: onClickNextMonth,
|
||
prevYear: onClickPrevYear,
|
||
nextYear: onClickNextYear
|
||
};
|
||
const modalControls = createBaseVNode(Fragment, null, [props.noMonthPicker ? monthYearBtn : monthYearSplit, createVNode(VSpacer, null, null), createBaseVNode("div", {
|
||
"class": "v-date-picker-controls__month"
|
||
}, [prevMonth, nextMonth])]);
|
||
const dockedControls = createBaseVNode(Fragment, null, [createBaseVNode("div", {
|
||
"class": "v-date-picker-controls__month"
|
||
}, [prevMonth, onlyMonthBtn, nextMonth]), createVNode(VSpacer, null, null), createBaseVNode("div", {
|
||
"class": "v-date-picker-controls__year"
|
||
}, [prevYear, onlyYearBtn, nextYear])]);
|
||
return createVNode(VDefaultsProvider, {
|
||
"defaults": innerDefaults
|
||
}, {
|
||
default: () => [createBaseVNode("div", {
|
||
"class": normalizeClass(["v-date-picker-controls", `v-date-picker-controls--variant-${props.controlVariant}`]),
|
||
"style": {
|
||
"--v-date-picker-controls-height": convertToUnit(props.controlHeight)
|
||
}
|
||
}, [slots.default?.(slotProps) ?? createBaseVNode(Fragment, null, [props.controlVariant === "modal" && modalControls, props.controlVariant === "docked" && dockedControls])])]
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VDatePicker/VDatePickerHeader.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VDatePicker/VDatePickerHeader.css";
|
||
var makeVDatePickerHeaderProps = propsFactory({
|
||
appendIcon: IconValue,
|
||
color: String,
|
||
header: String,
|
||
transition: String,
|
||
onClick: EventProp()
|
||
}, "VDatePickerHeader");
|
||
var VDatePickerHeader = genericComponent()({
|
||
name: "VDatePickerHeader",
|
||
props: makeVDatePickerHeaderProps(),
|
||
emits: {
|
||
click: () => true,
|
||
"click:append": () => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.color);
|
||
function onClick() {
|
||
emit("click");
|
||
}
|
||
function onClickAppend() {
|
||
emit("click:append");
|
||
}
|
||
useRender(() => {
|
||
const hasContent = !!(slots.default || props.header);
|
||
const hasAppend = !!(slots.append || props.appendIcon);
|
||
return createBaseVNode("div", {
|
||
"class": normalizeClass(["v-date-picker-header", {
|
||
"v-date-picker-header--clickable": !!props.onClick
|
||
}, backgroundColorClasses.value]),
|
||
"style": normalizeStyle(backgroundColorStyles.value),
|
||
"onClick": onClick
|
||
}, [slots.prepend && createBaseVNode("div", {
|
||
"key": "prepend",
|
||
"class": "v-date-picker-header__prepend"
|
||
}, [slots.prepend()]), hasContent && createVNode(MaybeTransition, {
|
||
"key": "content",
|
||
"name": props.transition
|
||
}, {
|
||
default: () => [createBaseVNode("div", {
|
||
"key": props.header,
|
||
"class": "v-date-picker-header__content"
|
||
}, [slots.default?.() ?? props.header])]
|
||
}), hasAppend && createBaseVNode("div", {
|
||
"class": "v-date-picker-header__append"
|
||
}, [!slots.append ? createVNode(VBtn, {
|
||
"key": "append-btn",
|
||
"icon": props.appendIcon,
|
||
"variant": "text",
|
||
"onClick": onClickAppend
|
||
}, null) : createVNode(VDefaultsProvider, {
|
||
"key": "append-defaults",
|
||
"disabled": !props.appendIcon,
|
||
"defaults": {
|
||
VBtn: {
|
||
icon: props.appendIcon,
|
||
variant: "text"
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.append?.()]
|
||
})])]);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonth.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonth.css";
|
||
|
||
// node_modules/vuetify/lib/composables/calendar.js
|
||
var makeCalendarProps = propsFactory({
|
||
allowedDates: [Array, Function],
|
||
disabled: {
|
||
type: Boolean,
|
||
default: null
|
||
},
|
||
displayValue: null,
|
||
modelValue: Array,
|
||
month: [Number, String],
|
||
max: null,
|
||
min: null,
|
||
showAdjacentMonths: Boolean,
|
||
year: [Number, String],
|
||
weekdays: {
|
||
type: Array,
|
||
default: () => [0, 1, 2, 3, 4, 5, 6]
|
||
},
|
||
weeksInMonth: {
|
||
type: String,
|
||
default: "dynamic"
|
||
},
|
||
firstDayOfWeek: {
|
||
type: [Number, String],
|
||
default: void 0
|
||
},
|
||
firstDayOfYear: {
|
||
type: [Number, String],
|
||
default: void 0
|
||
},
|
||
weekdayFormat: String
|
||
}, "calendar");
|
||
function useCalendar(props) {
|
||
const adapter = useDate();
|
||
const model = useProxiedModel(props, "modelValue", [], (v) => wrapInArray(v).map((i) => adapter.date(i)));
|
||
const displayValue = computed(() => {
|
||
if (props.displayValue) return adapter.date(props.displayValue);
|
||
if (model.value.length > 0) return adapter.date(model.value[0]);
|
||
if (props.min) return adapter.date(props.min);
|
||
if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0]);
|
||
return adapter.date();
|
||
});
|
||
const year = useProxiedModel(props, "year", void 0, (v) => {
|
||
const value = v != null ? Number(v) : adapter.getYear(displayValue.value);
|
||
return adapter.startOfYear(adapter.setYear(adapter.date(), value));
|
||
}, (v) => adapter.getYear(v));
|
||
const month = useProxiedModel(props, "month", void 0, (v) => {
|
||
const value = v != null ? Number(v) : adapter.getMonth(displayValue.value);
|
||
const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value));
|
||
return adapter.setMonth(date, value);
|
||
}, (v) => adapter.getMonth(v));
|
||
const weekdayLabels = computed(() => {
|
||
const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay();
|
||
return adapter.getWeekdays(props.firstDayOfWeek, props.weekdayFormat).filter((_, i) => props.weekdays.includes((i + firstDayOfWeek) % 7));
|
||
});
|
||
const weeksInMonth = computed(() => {
|
||
const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek);
|
||
const days = weeks.flat();
|
||
const daysInMonth3 = 6 * 7;
|
||
if (props.weeksInMonth === "static" && days.length < daysInMonth3) {
|
||
const lastDay = days[days.length - 1];
|
||
let week = [];
|
||
for (let day = 1; day <= daysInMonth3 - days.length; day++) {
|
||
week.push(adapter.addDays(lastDay, day));
|
||
if (day % 7 === 0) {
|
||
weeks.push(week);
|
||
week = [];
|
||
}
|
||
}
|
||
}
|
||
return weeks;
|
||
});
|
||
function genDays(days, today) {
|
||
return days.filter((date) => {
|
||
return props.weekdays.includes(adapter.toJsDate(date).getDay());
|
||
}).map((date, index) => {
|
||
const isoDate = adapter.toISO(date);
|
||
const isAdjacent = !adapter.isSameMonth(date, month.value);
|
||
const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value));
|
||
const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value));
|
||
const isSame = adapter.isSameDay(date, month.value);
|
||
const weekdaysCount = props.weekdays.length;
|
||
return {
|
||
date,
|
||
formatted: adapter.format(date, "keyboardDate"),
|
||
isAdjacent,
|
||
isDisabled: isDisabled(date),
|
||
isEnd,
|
||
isHidden: isAdjacent && !props.showAdjacentMonths,
|
||
isSame,
|
||
isSelected: model.value.some((value) => adapter.isSameDay(date, value)),
|
||
isStart,
|
||
isToday: adapter.isSameDay(date, today),
|
||
isWeekEnd: index % weekdaysCount === weekdaysCount - 1,
|
||
isWeekStart: index % weekdaysCount === 0,
|
||
isoDate,
|
||
localized: adapter.format(date, "dayOfMonth"),
|
||
month: adapter.getMonth(date),
|
||
year: adapter.getYear(date)
|
||
};
|
||
});
|
||
}
|
||
const daysInWeek = computed(() => {
|
||
const lastDay = adapter.startOfWeek(displayValue.value, props.firstDayOfWeek);
|
||
const week = [];
|
||
for (let day = 0; day <= 6; day++) {
|
||
week.push(adapter.addDays(lastDay, day));
|
||
}
|
||
const today = adapter.date();
|
||
return genDays(week, today);
|
||
});
|
||
const daysInMonth2 = computed(() => {
|
||
const days = weeksInMonth.value.flat();
|
||
const today = adapter.date();
|
||
return genDays(days, today);
|
||
});
|
||
const weekNumbers = computed(() => {
|
||
return weeksInMonth.value.map((week) => {
|
||
return week.length ? adapter.getWeek(week[0], props.firstDayOfWeek, props.firstDayOfYear) : null;
|
||
});
|
||
});
|
||
const {
|
||
minDate,
|
||
maxDate
|
||
} = useCalendarRange(props);
|
||
function isDisabled(value) {
|
||
if (props.disabled) return true;
|
||
const date = adapter.date(value);
|
||
if (minDate.value && adapter.isBefore(adapter.endOfDay(date), minDate.value)) return true;
|
||
if (maxDate.value && adapter.isAfter(date, maxDate.value)) return true;
|
||
if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {
|
||
return !props.allowedDates.some((d) => adapter.isSameDay(adapter.date(d), date));
|
||
}
|
||
if (typeof props.allowedDates === "function") {
|
||
return !props.allowedDates(date);
|
||
}
|
||
return false;
|
||
}
|
||
return {
|
||
displayValue,
|
||
daysInMonth: daysInMonth2,
|
||
daysInWeek,
|
||
genDays,
|
||
model,
|
||
weeksInMonth,
|
||
weekdayLabels,
|
||
weekNumbers
|
||
};
|
||
}
|
||
function useCalendarRange(props) {
|
||
const adapter = useDate();
|
||
const minDate = computed(() => {
|
||
if (!props.min) return null;
|
||
const date = adapter.date(props.min);
|
||
return adapter.isValid(date) ? date : null;
|
||
});
|
||
const maxDate = computed(() => {
|
||
if (!props.max) return null;
|
||
const date = adapter.date(props.max);
|
||
return adapter.isValid(date) ? date : null;
|
||
});
|
||
function clampDate(date) {
|
||
if (minDate.value && adapter.isBefore(date, minDate.value)) {
|
||
return minDate.value;
|
||
}
|
||
if (maxDate.value && adapter.isAfter(date, maxDate.value)) {
|
||
return maxDate.value;
|
||
}
|
||
return date;
|
||
}
|
||
function isInAllowedRange(date) {
|
||
return (!minDate.value || adapter.isAfter(date, minDate.value)) && (!maxDate.value || adapter.isBefore(date, maxDate.value));
|
||
}
|
||
return {
|
||
minDate,
|
||
maxDate,
|
||
clampDate,
|
||
isInAllowedRange
|
||
};
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonth.js
|
||
var makeVDatePickerMonthProps = propsFactory({
|
||
color: String,
|
||
hideWeekdays: Boolean,
|
||
multiple: [Boolean, Number, String],
|
||
showWeek: Boolean,
|
||
transition: {
|
||
type: String,
|
||
default: "picker-transition"
|
||
},
|
||
reverseTransition: {
|
||
type: String,
|
||
default: "picker-reverse-transition"
|
||
},
|
||
events: {
|
||
type: [Array, Function, Object],
|
||
default: () => null
|
||
},
|
||
eventColor: {
|
||
type: [Array, Function, Object, String],
|
||
default: () => null
|
||
},
|
||
...omit(makeCalendarProps(), ["displayValue"])
|
||
}, "VDatePickerMonth");
|
||
var VDatePickerMonth = genericComponent()({
|
||
name: "VDatePickerMonth",
|
||
props: makeVDatePickerMonthProps(),
|
||
emits: {
|
||
"update:modelValue": (date) => true,
|
||
"update:month": (date) => true,
|
||
"update:year": (date) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const daysRef = ref();
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const {
|
||
daysInMonth: daysInMonth2,
|
||
model,
|
||
weekNumbers,
|
||
weekdayLabels
|
||
} = useCalendar(props);
|
||
const adapter = useDate();
|
||
const rangeStart = shallowRef();
|
||
const rangeStop = shallowRef();
|
||
const isReverse = shallowRef(false);
|
||
const transition = toRef(() => {
|
||
return !isReverse.value ? props.transition : props.reverseTransition;
|
||
});
|
||
if (props.multiple === "range" && model.value.length > 0) {
|
||
rangeStart.value = model.value[0];
|
||
if (model.value.length > 1) {
|
||
rangeStop.value = model.value[model.value.length - 1];
|
||
}
|
||
}
|
||
const atMax = computed(() => {
|
||
const max = ["number", "string"].includes(typeof props.multiple) ? Number(props.multiple) : Infinity;
|
||
return model.value.length >= max;
|
||
});
|
||
watch(daysInMonth2, (val, oldVal) => {
|
||
if (!oldVal) return;
|
||
isReverse.value = adapter.isBefore(val[0].date, oldVal[0].date);
|
||
});
|
||
function onRangeClick(value) {
|
||
const _value = adapter.startOfDay(value);
|
||
if (model.value.length === 0) {
|
||
rangeStart.value = void 0;
|
||
} else if (model.value.length === 1) {
|
||
rangeStart.value = model.value[0];
|
||
rangeStop.value = void 0;
|
||
}
|
||
if (!rangeStart.value) {
|
||
rangeStart.value = _value;
|
||
model.value = [rangeStart.value];
|
||
} else if (!rangeStop.value) {
|
||
if (adapter.isSameDay(_value, rangeStart.value)) {
|
||
rangeStart.value = void 0;
|
||
model.value = [];
|
||
return;
|
||
} else if (adapter.isBefore(_value, rangeStart.value)) {
|
||
rangeStop.value = adapter.endOfDay(rangeStart.value);
|
||
rangeStart.value = _value;
|
||
} else {
|
||
rangeStop.value = adapter.endOfDay(_value);
|
||
}
|
||
model.value = createDateRange(adapter, rangeStart.value, rangeStop.value);
|
||
} else {
|
||
rangeStart.value = value;
|
||
rangeStop.value = void 0;
|
||
model.value = [rangeStart.value];
|
||
}
|
||
}
|
||
function getDateAriaLabel(item) {
|
||
const fullDate = adapter.format(item.date, "fullDateWithWeekday");
|
||
const localeKey = item.isToday ? "currentDate" : "selectDate";
|
||
return t(`$vuetify.datePicker.ariaLabel.${localeKey}`, fullDate);
|
||
}
|
||
function onMultipleClick(value) {
|
||
const index = model.value.findIndex((selection) => adapter.isSameDay(selection, value));
|
||
if (index === -1) {
|
||
model.value = [...model.value, value];
|
||
} else {
|
||
const value2 = [...model.value];
|
||
value2.splice(index, 1);
|
||
model.value = value2;
|
||
}
|
||
}
|
||
function onClick(value) {
|
||
if (props.multiple === "range") {
|
||
onRangeClick(value);
|
||
} else if (props.multiple) {
|
||
onMultipleClick(value);
|
||
} else {
|
||
model.value = [value];
|
||
}
|
||
}
|
||
function getEventColors(date) {
|
||
const {
|
||
events,
|
||
eventColor
|
||
} = props;
|
||
let eventData;
|
||
let eventColors = [];
|
||
if (Array.isArray(events)) {
|
||
eventData = events.includes(date);
|
||
} else if (events instanceof Function) {
|
||
eventData = events(date) || false;
|
||
} else if (events) {
|
||
eventData = events[date] || false;
|
||
} else {
|
||
eventData = false;
|
||
}
|
||
if (!eventData) {
|
||
return [];
|
||
} else if (eventData !== true) {
|
||
eventColors = wrapInArray(eventData);
|
||
} else if (typeof eventColor === "string") {
|
||
eventColors = [eventColor];
|
||
} else if (typeof eventColor === "function") {
|
||
eventColors = wrapInArray(eventColor(date));
|
||
} else if (Array.isArray(eventColor)) {
|
||
eventColors = eventColor;
|
||
} else if (typeof eventColor === "object" && eventColor !== null) {
|
||
eventColors = wrapInArray(eventColor[date]);
|
||
}
|
||
return !eventColors.length ? ["surface-variant"] : eventColors.filter(Boolean).map((color) => typeof color === "string" ? color : "surface-variant");
|
||
}
|
||
function genEvents(date) {
|
||
const eventColors = getEventColors(date);
|
||
if (!eventColors.length) return null;
|
||
return createBaseVNode("div", {
|
||
"class": "v-date-picker-month__events"
|
||
}, [eventColors.map((color) => createVNode(VBadge, {
|
||
"dot": true,
|
||
"color": color
|
||
}, null))]);
|
||
}
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": "v-date-picker-month",
|
||
"style": {
|
||
"--v-date-picker-days-in-week": props.weekdays.length
|
||
}
|
||
}, [props.showWeek && createBaseVNode("div", {
|
||
"key": "weeks",
|
||
"class": "v-date-picker-month__weeks"
|
||
}, [!props.hideWeekdays && createBaseVNode("div", {
|
||
"key": "hide-week-days",
|
||
"class": "v-date-picker-month__day"
|
||
}, [createTextVNode(" ")]), weekNumbers.value.map((week) => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-date-picker-month__day", "v-date-picker-month__day--adjacent"])
|
||
}, [week]))]), createVNode(MaybeTransition, {
|
||
"name": transition.value
|
||
}, {
|
||
default: () => [createBaseVNode("div", {
|
||
"ref": daysRef,
|
||
"key": daysInMonth2.value[0].date?.toString(),
|
||
"class": "v-date-picker-month__days"
|
||
}, [!props.hideWeekdays && weekdayLabels.value.map((weekDay) => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-date-picker-month__day", "v-date-picker-month__weekday"])
|
||
}, [weekDay])), daysInMonth2.value.map((item, i) => {
|
||
const slotProps = {
|
||
props: {
|
||
class: "v-date-picker-month__day-btn",
|
||
color: item.isSelected || item.isToday ? props.color : void 0,
|
||
disabled: item.isDisabled,
|
||
icon: true,
|
||
ripple: false,
|
||
variant: item.isSelected ? "flat" : item.isToday ? "outlined" : "text",
|
||
"aria-label": getDateAriaLabel(item),
|
||
"aria-current": item.isToday ? "date" : void 0,
|
||
onClick: () => onClick(item.date)
|
||
},
|
||
item,
|
||
i
|
||
};
|
||
if (atMax.value && !item.isSelected) {
|
||
item.isDisabled = true;
|
||
}
|
||
return createBaseVNode("div", {
|
||
"class": normalizeClass(["v-date-picker-month__day", {
|
||
"v-date-picker-month__day--adjacent": item.isAdjacent,
|
||
"v-date-picker-month__day--hide-adjacent": item.isHidden,
|
||
"v-date-picker-month__day--selected": item.isSelected,
|
||
"v-date-picker-month__day--week-end": item.isWeekEnd,
|
||
"v-date-picker-month__day--week-start": item.isWeekStart
|
||
}]),
|
||
"data-v-date": !item.isDisabled ? item.isoDate : void 0
|
||
}, [(props.showAdjacentMonths || !item.isAdjacent) && (slots.day?.(slotProps) ?? createVNode(VBtn, slotProps.props, {
|
||
default: () => [item.localized, genEvents(item.isoDate)]
|
||
}))]);
|
||
})])]
|
||
})]));
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonths.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VDatePicker/VDatePickerMonths.css";
|
||
var makeVDatePickerMonthsProps = propsFactory({
|
||
color: String,
|
||
height: [String, Number],
|
||
min: null,
|
||
max: null,
|
||
modelValue: Number,
|
||
year: Number,
|
||
allowedMonths: [Array, Function]
|
||
}, "VDatePickerMonths");
|
||
var VDatePickerMonths = genericComponent()({
|
||
name: "VDatePickerMonths",
|
||
props: makeVDatePickerMonthsProps(),
|
||
emits: {
|
||
"update:modelValue": (date) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const adapter = useDate();
|
||
const model = useProxiedModel(props, "modelValue");
|
||
const months = computed(() => {
|
||
let date = adapter.startOfYear(adapter.date());
|
||
if (props.year) {
|
||
date = adapter.setYear(date, props.year);
|
||
}
|
||
return createRange(12).map((i) => {
|
||
const text = adapter.format(date, "monthShort");
|
||
const label = adapter.format(date, "month");
|
||
const isDisabled = !!(!isMonthAllowed(i) || props.min && adapter.isAfter(adapter.startOfMonth(adapter.date(props.min)), date) || props.max && adapter.isAfter(date, adapter.startOfMonth(adapter.date(props.max))));
|
||
date = adapter.getNextMonth(date);
|
||
return {
|
||
isDisabled,
|
||
text,
|
||
label,
|
||
value: i
|
||
};
|
||
});
|
||
});
|
||
watchEffect(() => {
|
||
model.value = model.value ?? adapter.getMonth(adapter.date());
|
||
});
|
||
function isMonthAllowed(month) {
|
||
if (Array.isArray(props.allowedMonths) && props.allowedMonths.length) {
|
||
return props.allowedMonths.includes(month);
|
||
}
|
||
if (typeof props.allowedMonths === "function") {
|
||
return props.allowedMonths(month);
|
||
}
|
||
return true;
|
||
}
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": "v-date-picker-months",
|
||
"style": {
|
||
height: convertToUnit(props.height)
|
||
}
|
||
}, [createBaseVNode("div", {
|
||
"class": "v-date-picker-months__content"
|
||
}, [months.value.map((month, i) => {
|
||
const btnProps = {
|
||
active: model.value === i,
|
||
ariaLabel: month.label,
|
||
color: model.value === i ? props.color : void 0,
|
||
disabled: month.isDisabled,
|
||
rounded: true,
|
||
text: month.text,
|
||
variant: model.value === month.value ? "flat" : "text",
|
||
onClick: () => onClick(i)
|
||
};
|
||
function onClick(i2) {
|
||
if (model.value === i2) {
|
||
emit("update:modelValue", model.value);
|
||
return;
|
||
}
|
||
model.value = i2;
|
||
}
|
||
return slots.month?.({
|
||
month,
|
||
i,
|
||
props: btnProps
|
||
}) ?? createVNode(VBtn, mergeProps({
|
||
"key": "month"
|
||
}, btnProps), null);
|
||
})])]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VDatePicker/VDatePickerYears.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VDatePicker/VDatePickerYears.css";
|
||
var makeVDatePickerYearsProps = propsFactory({
|
||
color: String,
|
||
height: [String, Number],
|
||
min: null,
|
||
max: null,
|
||
modelValue: Number,
|
||
allowedYears: [Array, Function]
|
||
}, "VDatePickerYears");
|
||
var VDatePickerYears = genericComponent()({
|
||
name: "VDatePickerYears",
|
||
props: makeVDatePickerYearsProps(),
|
||
directives: {
|
||
vIntersect: intersect_default
|
||
},
|
||
emits: {
|
||
"update:modelValue": (year) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const adapter = useDate();
|
||
const model = useProxiedModel(props, "modelValue");
|
||
const hasFocusedItem = shallowRef(false);
|
||
const years = computed(() => {
|
||
const year = adapter.getYear(adapter.date());
|
||
let min = year - 100;
|
||
let max = year + 52;
|
||
if (props.min) {
|
||
min = adapter.getYear(adapter.date(props.min));
|
||
}
|
||
if (props.max) {
|
||
max = adapter.getYear(adapter.date(props.max));
|
||
}
|
||
let date = adapter.startOfYear(adapter.date());
|
||
date = adapter.setYear(date, min);
|
||
return createRange(max - min + 1, min).map((i) => {
|
||
const text = adapter.format(date, "year");
|
||
date = adapter.setYear(date, adapter.getYear(date) + 1);
|
||
return {
|
||
text,
|
||
value: i,
|
||
isDisabled: !isYearAllowed(i)
|
||
};
|
||
});
|
||
});
|
||
watchEffect(() => {
|
||
model.value = model.value ?? adapter.getYear(adapter.date());
|
||
});
|
||
const yearRef = templateRef();
|
||
function focusSelectedYear() {
|
||
yearRef.el?.scrollIntoView({
|
||
block: "center"
|
||
});
|
||
}
|
||
function isYearAllowed(year) {
|
||
if (Array.isArray(props.allowedYears) && props.allowedYears.length) {
|
||
return props.allowedYears.includes(year);
|
||
}
|
||
if (typeof props.allowedYears === "function") {
|
||
return props.allowedYears(year);
|
||
}
|
||
return true;
|
||
}
|
||
useRender(() => withDirectives(createBaseVNode("div", {
|
||
"class": "v-date-picker-years",
|
||
"style": {
|
||
height: convertToUnit(props.height)
|
||
}
|
||
}, [createBaseVNode("div", {
|
||
"class": "v-date-picker-years__content",
|
||
"onFocus": () => yearRef.el?.focus(),
|
||
"onFocusin": () => hasFocusedItem.value = true,
|
||
"onFocusout": () => hasFocusedItem.value = false,
|
||
"tabindex": hasFocusedItem.value ? -1 : 0
|
||
}, [years.value.map((year, i) => {
|
||
const btnProps = {
|
||
ref: model.value === year.value ? yearRef : void 0,
|
||
active: model.value === year.value,
|
||
color: model.value === year.value ? props.color : void 0,
|
||
rounded: true,
|
||
text: year.text,
|
||
disabled: year.isDisabled,
|
||
variant: model.value === year.value ? "flat" : "text",
|
||
onClick: () => {
|
||
if (model.value === year.value) {
|
||
emit("update:modelValue", model.value);
|
||
return;
|
||
}
|
||
model.value = year.value;
|
||
}
|
||
};
|
||
return slots.year?.({
|
||
year,
|
||
i,
|
||
props: btnProps
|
||
}) ?? createVNode(VBtn, mergeProps({
|
||
"key": "month"
|
||
}, btnProps), null);
|
||
})])]), [[intersect_default, {
|
||
handler: focusSelectedYear
|
||
}, null, {
|
||
once: true
|
||
}]]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VDatePicker/VDatePicker.js
|
||
var makeVDatePickerProps = propsFactory({
|
||
// TODO: implement in v3.5
|
||
// calendarIcon: {
|
||
// type: String,
|
||
// default: '$calendar',
|
||
// },
|
||
// keyboardIcon: {
|
||
// type: String,
|
||
// default: '$edit',
|
||
// },
|
||
// inputMode: {
|
||
// type: String as PropType<'calendar' | 'keyboard'>,
|
||
// default: 'calendar',
|
||
// },
|
||
// inputText: {
|
||
// type: String,
|
||
// default: '$vuetify.datePicker.input.placeholder',
|
||
// },
|
||
// inputPlaceholder: {
|
||
// type: String,
|
||
// default: 'dd/mm/yyyy',
|
||
// },
|
||
header: {
|
||
type: String,
|
||
default: "$vuetify.datePicker.header"
|
||
},
|
||
headerColor: String,
|
||
headerDateFormat: {
|
||
type: String,
|
||
default: "normalDateWithWeekday"
|
||
},
|
||
landscapeHeaderWidth: [Number, String],
|
||
...omit(makeVDatePickerControlsProps(), ["active", "monthText", "yearText"]),
|
||
...makeVDatePickerMonthProps({
|
||
weeksInMonth: "static"
|
||
}),
|
||
...omit(makeVDatePickerMonthsProps(), ["modelValue"]),
|
||
...omit(makeVDatePickerYearsProps(), ["modelValue"]),
|
||
...makeVPickerProps({
|
||
title: "$vuetify.datePicker.title"
|
||
}),
|
||
modelValue: null
|
||
}, "VDatePicker");
|
||
var VDatePicker = genericComponent()({
|
||
name: "VDatePicker",
|
||
props: makeVDatePickerProps(),
|
||
emits: {
|
||
"update:modelValue": (date) => true,
|
||
"update:month": (date) => true,
|
||
"update:year": (date) => true,
|
||
// 'update:inputMode': (date: any) => true,
|
||
"update:viewMode": (date) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const adapter = useDate();
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const {
|
||
rtlClasses
|
||
} = useRtl();
|
||
const model = useProxiedModel(props, "modelValue", void 0, (v) => wrapInArray(v).map((i) => adapter.date(i)), (v) => props.multiple ? v : v[0]);
|
||
const viewMode = useProxiedModel(props, "viewMode");
|
||
const {
|
||
minDate,
|
||
maxDate,
|
||
clampDate
|
||
} = useCalendarRange(props);
|
||
const internal = computed(() => {
|
||
const today = adapter.date();
|
||
const value = model.value?.[0] ? adapter.date(model.value[0]) : clampDate(today);
|
||
return value && adapter.isValid(value) ? value : today;
|
||
});
|
||
const headerColor = toRef(() => props.headerColor ?? props.color);
|
||
const _month = useProxiedModel(props, "month");
|
||
const month = computed({
|
||
get: () => Number(_month.value ?? adapter.getMonth(adapter.startOfMonth(internal.value))),
|
||
set: (v) => _month.value = v
|
||
});
|
||
const _year = useProxiedModel(props, "year");
|
||
const year = computed({
|
||
get: () => Number(_year.value ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))),
|
||
set: (v) => _year.value = v
|
||
});
|
||
const isReversing = shallowRef(false);
|
||
const header = computed(() => {
|
||
if (props.multiple && model.value.length > 1) {
|
||
return t("$vuetify.datePicker.itemsSelected", model.value.length);
|
||
}
|
||
const formattedDate = model.value[0] && adapter.isValid(model.value[0]) ? adapter.format(adapter.date(model.value[0]), props.headerDateFormat) : t(props.header);
|
||
return props.landscape && formattedDate.split(" ").length === 3 ? formattedDate.replace(" ", "\n") : formattedDate;
|
||
});
|
||
const monthStart = toRef(() => {
|
||
let date = adapter.date();
|
||
date = adapter.setDate(date, 1);
|
||
date = adapter.setMonth(date, month.value);
|
||
date = adapter.setYear(date, year.value);
|
||
return date;
|
||
});
|
||
const monthYearText = toRef(() => adapter.format(monthStart.value, "monthAndYear"));
|
||
const monthText = toRef(() => adapter.format(monthStart.value, "monthShort"));
|
||
const yearText = toRef(() => adapter.format(monthStart.value, "year"));
|
||
const headerTransition = toRef(() => `date-picker-header${isReversing.value ? "-reverse" : ""}-transition`);
|
||
const disabled = computed(() => {
|
||
if (props.disabled) return true;
|
||
const targets = [];
|
||
if (viewMode.value !== "month") {
|
||
targets.push(...["prev-month", "next-month", "prev-year", "next-year"]);
|
||
} else {
|
||
let _date = adapter.date();
|
||
_date = adapter.startOfMonth(_date);
|
||
_date = adapter.setMonth(_date, month.value);
|
||
_date = adapter.setYear(_date, year.value);
|
||
if (minDate.value) {
|
||
const prevMonthEnd = adapter.addDays(adapter.startOfMonth(_date), -1);
|
||
const prevYearEnd = adapter.addDays(adapter.startOfYear(_date), -1);
|
||
adapter.isAfter(minDate.value, prevMonthEnd) && targets.push("prev-month");
|
||
adapter.isAfter(minDate.value, prevYearEnd) && targets.push("prev-year");
|
||
}
|
||
if (maxDate.value) {
|
||
const nextMonthStart = adapter.addDays(adapter.endOfMonth(_date), 1);
|
||
const nextYearStart = adapter.addDays(adapter.endOfYear(_date), 1);
|
||
adapter.isAfter(nextMonthStart, maxDate.value) && targets.push("next-month");
|
||
adapter.isAfter(nextYearStart, maxDate.value) && targets.push("next-year");
|
||
}
|
||
}
|
||
return targets;
|
||
});
|
||
const allowedYears = computed(() => {
|
||
return props.allowedYears || isYearAllowed;
|
||
});
|
||
const allowedMonths = computed(() => {
|
||
return props.allowedMonths || isMonthAllowed;
|
||
});
|
||
function isAllowedInRange(start, end) {
|
||
const allowedDates = props.allowedDates;
|
||
if (typeof allowedDates !== "function") return true;
|
||
const days = 1 + daysDiff(adapter, start, end);
|
||
for (let i = 0; i < days; i++) {
|
||
if (allowedDates(adapter.addDays(start, i))) return true;
|
||
}
|
||
return false;
|
||
}
|
||
function isYearAllowed(year2) {
|
||
if (typeof props.allowedDates === "function") {
|
||
const startOfYear = adapter.parseISO(`${year2}-01-01`);
|
||
return isAllowedInRange(startOfYear, adapter.endOfYear(startOfYear));
|
||
}
|
||
if (Array.isArray(props.allowedDates) && props.allowedDates.length) {
|
||
for (const date of props.allowedDates) {
|
||
if (adapter.getYear(adapter.date(date)) === year2) return true;
|
||
}
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function isMonthAllowed(month2) {
|
||
if (typeof props.allowedDates === "function") {
|
||
const monthTwoDigits = String(month2 + 1).padStart(2, "0");
|
||
const startOfMonth = adapter.parseISO(`${year.value}-${monthTwoDigits}-01`);
|
||
return isAllowedInRange(startOfMonth, adapter.endOfMonth(startOfMonth));
|
||
}
|
||
if (Array.isArray(props.allowedDates) && props.allowedDates.length) {
|
||
for (const date of props.allowedDates) {
|
||
if (adapter.getYear(adapter.date(date)) === year.value && adapter.getMonth(adapter.date(date)) === month2) return true;
|
||
}
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function onClickNextMonth() {
|
||
if (month.value < 11) {
|
||
month.value++;
|
||
} else {
|
||
year.value++;
|
||
month.value = 0;
|
||
onUpdateYear();
|
||
}
|
||
onUpdateMonth();
|
||
}
|
||
function onClickPrevMonth() {
|
||
if (month.value > 0) {
|
||
month.value--;
|
||
} else {
|
||
year.value--;
|
||
month.value = 11;
|
||
onUpdateYear();
|
||
}
|
||
onUpdateMonth();
|
||
}
|
||
function onClickNextYear() {
|
||
year.value++;
|
||
if (maxDate.value) {
|
||
const monthTwoDigits = String(month.value + 1).padStart(2, "0");
|
||
const monthStart2 = adapter.parseISO(`${year.value}-${monthTwoDigits}-01`);
|
||
if (adapter.isAfter(monthStart2, maxDate.value)) {
|
||
month.value = adapter.getMonth(maxDate.value);
|
||
}
|
||
}
|
||
onUpdateYear();
|
||
}
|
||
function onClickPrevYear() {
|
||
year.value--;
|
||
if (minDate.value) {
|
||
const monthTwoDigits = String(month.value + 1).padStart(2, "0");
|
||
const monthStart2 = adapter.endOfMonth(adapter.parseISO(`${year.value}-${monthTwoDigits}-01`));
|
||
if (adapter.isAfter(minDate.value, monthStart2)) {
|
||
month.value = adapter.getMonth(minDate.value);
|
||
}
|
||
}
|
||
onUpdateYear();
|
||
}
|
||
function onClickDate() {
|
||
viewMode.value = "month";
|
||
}
|
||
function onClickMonth() {
|
||
viewMode.value = viewMode.value === "months" ? "month" : "months";
|
||
}
|
||
function onClickYear() {
|
||
viewMode.value = viewMode.value === "year" ? "month" : "year";
|
||
}
|
||
function onUpdateMonth() {
|
||
if (viewMode.value === "months") onClickMonth();
|
||
}
|
||
function onUpdateYear() {
|
||
if (viewMode.value === "year") onClickYear();
|
||
}
|
||
watch(model, (val, oldVal) => {
|
||
const arrBefore = wrapInArray(oldVal);
|
||
const arrAfter = wrapInArray(val);
|
||
if (!arrAfter.length) return;
|
||
const before = adapter.date(arrBefore[arrBefore.length - 1]);
|
||
const after = adapter.date(arrAfter[arrAfter.length - 1]);
|
||
if (adapter.isSameDay(before, after)) return;
|
||
const newMonth = adapter.getMonth(after);
|
||
const newYear = adapter.getYear(after);
|
||
if (newMonth !== month.value) {
|
||
month.value = newMonth;
|
||
onUpdateMonth();
|
||
}
|
||
if (newYear !== year.value) {
|
||
year.value = newYear;
|
||
onUpdateYear();
|
||
}
|
||
isReversing.value = adapter.isBefore(before, after);
|
||
});
|
||
useRender(() => {
|
||
const pickerProps = VPicker.filterProps(props);
|
||
const datePickerControlsProps = omit(VDatePickerControls.filterProps(props), ["viewMode"]);
|
||
const datePickerHeaderProps = VDatePickerHeader.filterProps(props);
|
||
const datePickerMonthProps = VDatePickerMonth.filterProps(props);
|
||
const datePickerMonthsProps = omit(VDatePickerMonths.filterProps(props), ["modelValue"]);
|
||
const datePickerYearsProps = omit(VDatePickerYears.filterProps(props), ["modelValue"]);
|
||
const headerProps = {
|
||
color: headerColor.value,
|
||
header: header.value,
|
||
transition: headerTransition.value
|
||
};
|
||
return createVNode(VPicker, mergeProps(pickerProps, {
|
||
"color": headerColor.value,
|
||
"class": ["v-date-picker", `v-date-picker--${viewMode.value}`, {
|
||
"v-date-picker--show-week": props.showWeek
|
||
}, rtlClasses.value, props.class],
|
||
"style": [{
|
||
"--v-date-picker-landscape-header-width": convertToUnit(props.landscapeHeaderWidth)
|
||
}, props.style]
|
||
}), {
|
||
title: () => slots.title?.() ?? createBaseVNode("div", {
|
||
"class": "v-date-picker__title"
|
||
}, [t(props.title)]),
|
||
header: () => slots.header ? createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VDatePickerHeader: {
|
||
...headerProps
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.header?.(headerProps)]
|
||
}) : createVNode(VDatePickerHeader, mergeProps({
|
||
"key": "header"
|
||
}, datePickerHeaderProps, headerProps, {
|
||
"onClick": viewMode.value !== "month" ? onClickDate : void 0
|
||
}), {
|
||
prepend: slots.prepend,
|
||
append: slots.append
|
||
}),
|
||
default: () => createBaseVNode(Fragment, null, [createVNode(VDatePickerControls, mergeProps(datePickerControlsProps, {
|
||
"disabled": disabled.value,
|
||
"viewMode": viewMode.value,
|
||
"text": monthYearText.value,
|
||
"monthText": monthText.value,
|
||
"yearText": yearText.value,
|
||
"onClick:next": onClickNextMonth,
|
||
"onClick:prev": onClickPrevMonth,
|
||
"onClick:nextYear": onClickNextYear,
|
||
"onClick:prevYear": onClickPrevYear,
|
||
"onClick:month": onClickMonth,
|
||
"onClick:year": onClickYear
|
||
}), {
|
||
default: slots.controls
|
||
}), createVNode(VFadeTransition, {
|
||
"hideOnLeave": true
|
||
}, {
|
||
default: () => [viewMode.value === "months" ? createVNode(VDatePickerMonths, mergeProps({
|
||
"key": "date-picker-months"
|
||
}, datePickerMonthsProps, {
|
||
"modelValue": month.value,
|
||
"onUpdate:modelValue": [($event) => month.value = $event, onUpdateMonth],
|
||
"min": minDate.value,
|
||
"max": maxDate.value,
|
||
"year": year.value,
|
||
"allowedMonths": allowedMonths.value
|
||
}), {
|
||
month: slots.month
|
||
}) : viewMode.value === "year" ? createVNode(VDatePickerYears, mergeProps({
|
||
"key": "date-picker-years"
|
||
}, datePickerYearsProps, {
|
||
"modelValue": year.value,
|
||
"onUpdate:modelValue": [($event) => year.value = $event, onUpdateYear],
|
||
"min": minDate.value,
|
||
"max": maxDate.value,
|
||
"allowedYears": allowedYears.value
|
||
}), {
|
||
year: slots.year
|
||
}) : createVNode(VDatePickerMonth, mergeProps({
|
||
"key": "date-picker-month"
|
||
}, datePickerMonthProps, {
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||
"month": month.value,
|
||
"onUpdate:month": [($event) => month.value = $event, onUpdateMonth],
|
||
"year": year.value,
|
||
"onUpdate:year": [($event) => year.value = $event, onUpdateYear],
|
||
"min": minDate.value,
|
||
"max": maxDate.value
|
||
}), {
|
||
day: slots.day
|
||
})]
|
||
})]),
|
||
actions: slots.actions
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VEmptyState/VEmptyState.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VEmptyState/VEmptyState.css";
|
||
var makeVEmptyStateProps = propsFactory({
|
||
actionText: String,
|
||
bgColor: String,
|
||
color: String,
|
||
icon: IconValue,
|
||
image: String,
|
||
justify: {
|
||
type: String,
|
||
default: "center"
|
||
},
|
||
headline: String,
|
||
title: String,
|
||
text: String,
|
||
textWidth: {
|
||
type: [Number, String],
|
||
default: 500
|
||
},
|
||
href: String,
|
||
to: String,
|
||
...makeComponentProps(),
|
||
...makeDimensionProps(),
|
||
...makeSizeProps({
|
||
size: void 0
|
||
}),
|
||
...makeThemeProps()
|
||
}, "VEmptyState");
|
||
var VEmptyState = genericComponent()({
|
||
name: "VEmptyState",
|
||
props: makeVEmptyStateProps(),
|
||
emits: {
|
||
"click:action": (e) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.bgColor);
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
const {
|
||
displayClasses
|
||
} = useDisplay();
|
||
function onClickAction(e) {
|
||
emit("click:action", e);
|
||
}
|
||
useRender(() => {
|
||
const hasActions = !!(slots.actions || props.actionText);
|
||
const hasHeadline = !!(slots.headline || props.headline);
|
||
const hasTitle = !!(slots.title || props.title);
|
||
const hasText = !!(slots.text || props.text);
|
||
const hasMedia = !!(slots.media || props.image || props.icon);
|
||
const size = props.size || (props.image ? 200 : 96);
|
||
return createBaseVNode("div", {
|
||
"class": normalizeClass(["v-empty-state", {
|
||
[`v-empty-state--${props.justify}`]: true
|
||
}, themeClasses.value, backgroundColorClasses.value, displayClasses.value, props.class]),
|
||
"style": normalizeStyle([backgroundColorStyles.value, dimensionStyles.value, props.style])
|
||
}, [hasMedia && createBaseVNode("div", {
|
||
"key": "media",
|
||
"class": "v-empty-state__media"
|
||
}, [!slots.media ? createBaseVNode(Fragment, null, [props.image ? createVNode(VImg, {
|
||
"key": "image",
|
||
"src": props.image,
|
||
"height": size
|
||
}, null) : props.icon ? createVNode(VIcon, {
|
||
"key": "icon",
|
||
"color": props.color,
|
||
"size": size,
|
||
"icon": props.icon
|
||
}, null) : void 0]) : createVNode(VDefaultsProvider, {
|
||
"key": "media-defaults",
|
||
"defaults": {
|
||
VImg: {
|
||
src: props.image,
|
||
height: size
|
||
},
|
||
VIcon: {
|
||
size,
|
||
icon: props.icon
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.media()]
|
||
})]), hasHeadline && createBaseVNode("div", {
|
||
"key": "headline",
|
||
"class": "v-empty-state__headline"
|
||
}, [slots.headline?.() ?? props.headline]), hasTitle && createBaseVNode("div", {
|
||
"key": "title",
|
||
"class": "v-empty-state__title"
|
||
}, [slots.title?.() ?? props.title]), hasText && createBaseVNode("div", {
|
||
"key": "text",
|
||
"class": "v-empty-state__text",
|
||
"style": {
|
||
maxWidth: convertToUnit(props.textWidth)
|
||
}
|
||
}, [slots.text?.() ?? props.text]), slots.default && createBaseVNode("div", {
|
||
"key": "content",
|
||
"class": "v-empty-state__content"
|
||
}, [slots.default()]), hasActions && createBaseVNode("div", {
|
||
"key": "actions",
|
||
"class": "v-empty-state__actions"
|
||
}, [createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VBtn: {
|
||
class: "v-empty-state__action-btn",
|
||
color: props.color ?? "surface-variant",
|
||
href: props.href,
|
||
text: props.actionText,
|
||
to: props.to
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.actions?.({
|
||
props: {
|
||
onClick: onClickAction
|
||
}
|
||
}) ?? createVNode(VBtn, {
|
||
"onClick": onClickAction
|
||
}, null)]
|
||
})])]);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VFab/VFab.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VFab/VFab.css";
|
||
var makeVFabProps = propsFactory({
|
||
app: Boolean,
|
||
appear: Boolean,
|
||
extended: Boolean,
|
||
layout: Boolean,
|
||
offset: Boolean,
|
||
modelValue: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
...omit(makeVBtnProps({
|
||
active: true
|
||
}), ["location", "spaced"]),
|
||
...makeLayoutItemProps(),
|
||
...makeLocationProps(),
|
||
...makeTransitionProps({
|
||
transition: "fab-transition"
|
||
})
|
||
}, "VFab");
|
||
var VFab = genericComponent()({
|
||
name: "VFab",
|
||
props: makeVFabProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const model = useProxiedModel(props, "modelValue");
|
||
const height = shallowRef(56);
|
||
const layoutItemStyles = ref();
|
||
const {
|
||
resizeRef
|
||
} = useResizeObserver((entries) => {
|
||
if (!entries.length) return;
|
||
height.value = entries[0].target.clientHeight;
|
||
});
|
||
const hasPosition = toRef(() => props.app || props.absolute);
|
||
const position = computed(() => {
|
||
if (!hasPosition.value) return false;
|
||
return props.location?.split(" ").shift() ?? "bottom";
|
||
});
|
||
const orientation = computed(() => {
|
||
if (!hasPosition.value) return false;
|
||
return props.location?.split(" ")[1] ?? "end";
|
||
});
|
||
useToggleScope(() => props.app, () => {
|
||
const layout = useLayoutItem({
|
||
id: props.name,
|
||
order: computed(() => parseInt(props.order, 10)),
|
||
position,
|
||
layoutSize: computed(() => props.layout ? height.value + 24 : 0),
|
||
elementSize: computed(() => height.value + 24),
|
||
active: computed(() => props.app && model.value),
|
||
absolute: toRef(() => props.absolute)
|
||
});
|
||
watchEffect(() => {
|
||
layoutItemStyles.value = layout.layoutItemStyles.value;
|
||
});
|
||
});
|
||
const vFabRef = ref();
|
||
useRender(() => {
|
||
const btnProps = VBtn.filterProps(props);
|
||
return createBaseVNode("div", {
|
||
"ref": vFabRef,
|
||
"class": normalizeClass(["v-fab", {
|
||
"v-fab--absolute": props.absolute,
|
||
"v-fab--app": !!props.app,
|
||
"v-fab--extended": props.extended,
|
||
"v-fab--offset": props.offset,
|
||
[`v-fab--${position.value}`]: hasPosition.value,
|
||
[`v-fab--${orientation.value}`]: hasPosition.value
|
||
}, props.class]),
|
||
"style": normalizeStyle([props.app ? {
|
||
...layoutItemStyles.value
|
||
} : {
|
||
height: props.absolute ? "100%" : "inherit"
|
||
}, props.style])
|
||
}, [createBaseVNode("div", {
|
||
"class": "v-fab__container"
|
||
}, [createVNode(MaybeTransition, {
|
||
"appear": props.appear,
|
||
"transition": props.transition
|
||
}, {
|
||
default: () => [withDirectives(createVNode(VBtn, mergeProps({
|
||
"ref": resizeRef
|
||
}, btnProps, {
|
||
"active": void 0,
|
||
"location": void 0
|
||
}), slots), [[vShow, props.active]])]
|
||
})])]);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VFooter/VFooter.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VFooter/VFooter.css";
|
||
var makeVFooterProps = propsFactory({
|
||
app: Boolean,
|
||
color: String,
|
||
height: {
|
||
type: [Number, String],
|
||
default: "auto"
|
||
},
|
||
...makeBorderProps(),
|
||
...makeComponentProps(),
|
||
...makeElevationProps(),
|
||
...makeLayoutItemProps(),
|
||
...makeRoundedProps(),
|
||
...makeTagProps({
|
||
tag: "footer"
|
||
}),
|
||
...makeThemeProps()
|
||
}, "VFooter");
|
||
var VFooter = genericComponent()({
|
||
name: "VFooter",
|
||
props: makeVFooterProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const layoutItemStyles = ref();
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.color);
|
||
const {
|
||
borderClasses
|
||
} = useBorder(props);
|
||
const {
|
||
elevationClasses
|
||
} = useElevation(props);
|
||
const {
|
||
roundedClasses
|
||
} = useRounded(props);
|
||
const autoHeight = shallowRef(32);
|
||
const {
|
||
resizeRef
|
||
} = useResizeObserver((entries) => {
|
||
if (!entries.length) return;
|
||
autoHeight.value = entries[0].target.clientHeight;
|
||
});
|
||
const height = computed(() => props.height === "auto" ? autoHeight.value : parseInt(props.height, 10));
|
||
useToggleScope(() => props.app, () => {
|
||
const layout = useLayoutItem({
|
||
id: props.name,
|
||
order: computed(() => parseInt(props.order, 10)),
|
||
position: toRef(() => "bottom"),
|
||
layoutSize: height,
|
||
elementSize: computed(() => props.height === "auto" ? void 0 : height.value),
|
||
active: toRef(() => props.app),
|
||
absolute: toRef(() => props.absolute)
|
||
});
|
||
watchEffect(() => {
|
||
layoutItemStyles.value = layout.layoutItemStyles.value;
|
||
});
|
||
});
|
||
useRender(() => createVNode(props.tag, {
|
||
"ref": resizeRef,
|
||
"class": normalizeClass(["v-footer", themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
||
"style": normalizeStyle([backgroundColorStyles.value, props.app ? layoutItemStyles.value : {
|
||
height: convertToUnit(props.height)
|
||
}, props.style])
|
||
}, slots));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VHotkey/VHotkey.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VHotkey/VHotkey.css";
|
||
|
||
// node_modules/vuetify/lib/components/VKbd/index.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VKbd/VKbd.css";
|
||
|
||
// node_modules/vuetify/lib/components/VKbd/VKbd.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VKbd/VKbd.css";
|
||
var makeVKbdProps = propsFactory({
|
||
color: String,
|
||
...makeBorderProps(),
|
||
...makeComponentProps(),
|
||
...makeRoundedProps(),
|
||
...makeTagProps({
|
||
tag: "kbd"
|
||
}),
|
||
...makeThemeProps(),
|
||
...makeElevationProps()
|
||
}, "VKbd");
|
||
var VKbd = genericComponent()({
|
||
name: "VKbd",
|
||
props: makeVKbdProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
borderClasses
|
||
} = useBorder(props);
|
||
const {
|
||
roundedClasses
|
||
} = useRounded(props);
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.color);
|
||
const {
|
||
elevationClasses
|
||
} = useElevation(props);
|
||
useRender(() => createVNode(props.tag, {
|
||
"class": normalizeClass(["v-kbd", themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
||
"style": normalizeStyle([backgroundColorStyles.value, props.style])
|
||
}, slots));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VHotkey/VHotkey.js
|
||
function processKey(config, requestedMode, isMac) {
|
||
const keyCfg = isMac && config.mac ? config.mac : config.default;
|
||
const mode = (() => {
|
||
if (requestedMode === "icon" && !keyCfg.icon) return "text";
|
||
if (requestedMode === "symbol" && !keyCfg.symbol) return "text";
|
||
return requestedMode;
|
||
})();
|
||
let value = keyCfg[mode] ?? keyCfg.text;
|
||
if (mode === "text" && typeof value === "string" && value.startsWith("$") && !value.startsWith("$vuetify.")) {
|
||
value = value.slice(1).toUpperCase();
|
||
}
|
||
return mode === "icon" ? ["icon", value] : [mode, value];
|
||
}
|
||
var hotkeyMap = {
|
||
ctrl: {
|
||
mac: {
|
||
symbol: "⌃",
|
||
icon: "$ctrl",
|
||
text: "$vuetify.hotkey.ctrl"
|
||
},
|
||
default: {
|
||
text: "Ctrl"
|
||
}
|
||
},
|
||
meta: {
|
||
mac: {
|
||
symbol: "⌘",
|
||
icon: "$command",
|
||
text: "$vuetify.hotkey.command"
|
||
},
|
||
default: {
|
||
text: "Ctrl"
|
||
}
|
||
},
|
||
cmd: {
|
||
mac: {
|
||
symbol: "⌘",
|
||
icon: "$command",
|
||
text: "$vuetify.hotkey.command"
|
||
},
|
||
default: {
|
||
text: "Ctrl"
|
||
}
|
||
},
|
||
shift: {
|
||
mac: {
|
||
symbol: "⇧",
|
||
icon: "$shift",
|
||
text: "$vuetify.hotkey.shift"
|
||
},
|
||
default: {
|
||
text: "Shift"
|
||
}
|
||
},
|
||
alt: {
|
||
mac: {
|
||
symbol: "⌥",
|
||
icon: "$alt",
|
||
text: "$vuetify.hotkey.option"
|
||
},
|
||
default: {
|
||
text: "Alt"
|
||
}
|
||
},
|
||
enter: {
|
||
default: {
|
||
symbol: "↵",
|
||
icon: "$enter",
|
||
text: "$vuetify.hotkey.enter"
|
||
}
|
||
},
|
||
arrowup: {
|
||
default: {
|
||
symbol: "↑",
|
||
icon: "$arrowup",
|
||
text: "$vuetify.hotkey.upArrow"
|
||
}
|
||
},
|
||
arrowdown: {
|
||
default: {
|
||
symbol: "↓",
|
||
icon: "$arrowdown",
|
||
text: "$vuetify.hotkey.downArrow"
|
||
}
|
||
},
|
||
arrowleft: {
|
||
default: {
|
||
symbol: "←",
|
||
icon: "$arrowleft",
|
||
text: "$vuetify.hotkey.leftArrow"
|
||
}
|
||
},
|
||
arrowright: {
|
||
default: {
|
||
symbol: "→",
|
||
icon: "$arrowright",
|
||
text: "$vuetify.hotkey.rightArrow"
|
||
}
|
||
},
|
||
backspace: {
|
||
default: {
|
||
symbol: "⌫",
|
||
icon: "$backspace",
|
||
text: "$vuetify.hotkey.backspace"
|
||
}
|
||
},
|
||
escape: {
|
||
default: {
|
||
text: "$vuetify.hotkey.escape"
|
||
}
|
||
},
|
||
" ": {
|
||
mac: {
|
||
symbol: "␣",
|
||
icon: "$space",
|
||
text: "$vuetify.hotkey.space"
|
||
},
|
||
default: {
|
||
text: "$vuetify.hotkey.space"
|
||
}
|
||
},
|
||
"-": {
|
||
default: {
|
||
text: "-"
|
||
}
|
||
}
|
||
};
|
||
var makeVHotkeyProps = propsFactory({
|
||
// String representing keyboard shortcuts (e.g., "ctrl+k", "meta+shift+p")
|
||
keys: String,
|
||
// How to display keys: 'symbol' uses special characters (⌘, ⌃), 'icon' uses SVG icons, 'text' uses words
|
||
displayMode: {
|
||
type: String,
|
||
default: "icon"
|
||
},
|
||
// Custom key mapping configuration. Users can import and modify the exported hotkeyMap as needed
|
||
keyMap: {
|
||
type: Object,
|
||
default: () => hotkeyMap
|
||
},
|
||
platform: {
|
||
type: String,
|
||
default: "auto"
|
||
},
|
||
inline: Boolean,
|
||
disabled: Boolean,
|
||
prefix: String,
|
||
suffix: String,
|
||
variant: {
|
||
type: String,
|
||
default: "elevated",
|
||
validator: (v) => ["elevated", "flat", "tonal", "outlined", "text", "plain", "contained"].includes(v)
|
||
},
|
||
...makeComponentProps(),
|
||
...makeThemeProps(),
|
||
...makeBorderProps(),
|
||
...makeRoundedProps(),
|
||
...makeElevationProps(),
|
||
color: String
|
||
}, "VHotkey");
|
||
var AND_DELINEATOR = /* @__PURE__ */ Symbol("VHotkey:AND_DELINEATOR");
|
||
var SLASH_DELINEATOR = /* @__PURE__ */ Symbol("VHotkey:SLASH_DELINEATOR");
|
||
var THEN_DELINEATOR = /* @__PURE__ */ Symbol("VHotkey:THEN_DELINEATOR");
|
||
function getKeyText(keyMap, key, isMac) {
|
||
const lowerKey = key.toLowerCase();
|
||
if (lowerKey in keyMap) {
|
||
const result = processKey(keyMap[lowerKey], "text", isMac);
|
||
return typeof result[1] === "string" ? result[1] : String(result[1]);
|
||
}
|
||
return key.toUpperCase();
|
||
}
|
||
function applyDisplayModeToKey(keyMap, mode, key, isMac) {
|
||
const lowerKey = key.toLowerCase();
|
||
if (lowerKey in keyMap) {
|
||
const result = processKey(keyMap[lowerKey], mode, isMac);
|
||
if (result[0] === "text" && typeof result[1] === "string" && result[1].startsWith("$") && !result[1].startsWith("$vuetify.")) {
|
||
return ["text", result[1].replace("$", "").toUpperCase(), key];
|
||
}
|
||
return [...result, key];
|
||
}
|
||
return ["text", key.toUpperCase(), key];
|
||
}
|
||
var VHotkey = genericComponent()({
|
||
name: "VHotkey",
|
||
props: makeVHotkeyProps(),
|
||
setup(props) {
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
rtlClasses
|
||
} = useRtl();
|
||
const {
|
||
borderClasses
|
||
} = useBorder(props);
|
||
const {
|
||
roundedClasses
|
||
} = useRounded(props);
|
||
const {
|
||
elevationClasses
|
||
} = useElevation(props);
|
||
const {
|
||
colorClasses,
|
||
colorStyles,
|
||
variantClasses
|
||
} = useVariant(() => ({
|
||
color: props.color,
|
||
variant: props.variant === "contained" ? "elevated" : props.variant
|
||
}));
|
||
const isMac = computed(() => props.platform === "auto" ? typeof navigator !== "undefined" && /macintosh/i.test(navigator.userAgent) : props.platform === "mac");
|
||
const keyCombinations = computed(() => {
|
||
if (!props.keys) return [];
|
||
return props.keys.split(" ").map((combination) => {
|
||
const result = [];
|
||
const sequenceGroups = splitKeySequence(combination);
|
||
for (let i = 0; i < sequenceGroups.length; i++) {
|
||
const group = sequenceGroups[i];
|
||
if (i > 0) result.push(THEN_DELINEATOR);
|
||
const {
|
||
keys: keyParts,
|
||
separators
|
||
} = splitKeyCombination(group);
|
||
for (let j = 0; j < keyParts.length; j++) {
|
||
const part = keyParts[j];
|
||
if (j > 0) {
|
||
result.push(separators[j - 1] === "/" ? SLASH_DELINEATOR : AND_DELINEATOR);
|
||
}
|
||
result.push(applyDisplayModeToKey(props.keyMap, props.displayMode, part, isMac.value));
|
||
}
|
||
}
|
||
return result;
|
||
});
|
||
});
|
||
const accessibleLabel = computed(() => {
|
||
if (!props.keys) return "";
|
||
const readableShortcuts = keyCombinations.value.map((combination) => {
|
||
const readableParts = [];
|
||
for (const key of combination) {
|
||
if (Array.isArray(key)) {
|
||
const textKey = key[0] === "icon" || key[0] === "symbol" ? applyDisplayModeToKey(mergeDeep(hotkeyMap, props.keyMap), "text", String(key[1]), isMac.value)[1] : key[1];
|
||
readableParts.push(translateKey(textKey));
|
||
} else {
|
||
if (key === AND_DELINEATOR) {
|
||
readableParts.push(t("$vuetify.hotkey.plus"));
|
||
} else if (key === SLASH_DELINEATOR) {
|
||
readableParts.push(t("$vuetify.hotkey.or"));
|
||
} else if (key === THEN_DELINEATOR) {
|
||
readableParts.push(t("$vuetify.hotkey.then"));
|
||
}
|
||
}
|
||
}
|
||
return readableParts.join(" ");
|
||
});
|
||
const shortcutText = readableShortcuts.join(", ");
|
||
return t("$vuetify.hotkey.shortcut", shortcutText);
|
||
});
|
||
function translateKey(key) {
|
||
return key.startsWith("$vuetify.") ? t(key) : key;
|
||
}
|
||
function getKeyTooltip(key) {
|
||
if (props.displayMode === "text") return void 0;
|
||
const textKey = getKeyText(props.keyMap, String(key[2]), isMac.value);
|
||
return translateKey(textKey);
|
||
}
|
||
function renderKey(key, keyIndex) {
|
||
const isContained = props.variant === "contained";
|
||
const KeyComponent = isContained ? "kbd" : VKbd;
|
||
const keyClasses = ["v-hotkey__key", `v-hotkey__key-${key[0]}`, ...isContained ? ["v-hotkey__key--nested"] : [borderClasses.value, roundedClasses.value, elevationClasses.value, colorClasses.value]];
|
||
return createVNode(KeyComponent, {
|
||
"key": keyIndex,
|
||
"class": normalizeClass(keyClasses),
|
||
"style": normalizeStyle(isContained ? void 0 : colorStyles.value),
|
||
"aria-hidden": "true",
|
||
"title": getKeyTooltip(key)
|
||
}, {
|
||
default: () => [key[0] === "icon" ? createVNode(VIcon, {
|
||
"icon": key[1],
|
||
"aria-hidden": "true"
|
||
}, null) : translateKey(key[1])]
|
||
});
|
||
}
|
||
function renderDivider(key, keyIndex) {
|
||
return createBaseVNode("span", {
|
||
"key": keyIndex,
|
||
"class": "v-hotkey__divider",
|
||
"aria-hidden": "true"
|
||
}, [key === AND_DELINEATOR ? "+" : key === SLASH_DELINEATOR ? "/" : t("$vuetify.hotkey.then")]);
|
||
}
|
||
useRender(() => {
|
||
const content = createBaseVNode(Fragment, null, [props.prefix && createBaseVNode("span", {
|
||
"key": "prefix",
|
||
"class": "v-hotkey__prefix"
|
||
}, [props.prefix]), keyCombinations.value.map((combination, comboIndex) => createBaseVNode("span", {
|
||
"class": "v-hotkey__combination",
|
||
"key": comboIndex
|
||
}, [combination.map((key, keyIndex) => Array.isArray(key) ? renderKey(key, keyIndex) : renderDivider(key, keyIndex)), comboIndex < keyCombinations.value.length - 1 && createBaseVNode("span", {
|
||
"aria-hidden": "true"
|
||
}, [createTextVNode(" ")])])), props.suffix && createBaseVNode("span", {
|
||
"key": "suffix",
|
||
"class": "v-hotkey__suffix"
|
||
}, [props.suffix])]);
|
||
return createBaseVNode("div", {
|
||
"class": normalizeClass(["v-hotkey", {
|
||
"v-hotkey--disabled": props.disabled,
|
||
"v-hotkey--inline": props.inline,
|
||
"v-hotkey--contained": props.variant === "contained"
|
||
}, themeClasses.value, rtlClasses.value, variantClasses.value, props.class]),
|
||
"style": normalizeStyle(props.style),
|
||
"role": "img",
|
||
"aria-label": accessibleLabel.value
|
||
}, [props.variant !== "contained" ? content : createVNode(VKbd, {
|
||
"key": "contained",
|
||
"class": normalizeClass(["v-hotkey__contained-wrapper", borderClasses.value, roundedClasses.value, elevationClasses.value, colorClasses.value]),
|
||
"style": normalizeStyle(colorStyles.value),
|
||
"aria-hidden": "true"
|
||
}, {
|
||
default: () => [content]
|
||
})]);
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VHover/VHover.js
|
||
var makeVHoverProps = propsFactory({
|
||
disabled: Boolean,
|
||
modelValue: {
|
||
type: Boolean,
|
||
default: null
|
||
},
|
||
...makeDelayProps()
|
||
}, "VHover");
|
||
var VHover = genericComponent()({
|
||
name: "VHover",
|
||
props: makeVHoverProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const isHovering = useProxiedModel(props, "modelValue");
|
||
const {
|
||
runOpenDelay,
|
||
runCloseDelay
|
||
} = useDelay(props, (value) => !props.disabled && (isHovering.value = value));
|
||
return () => slots.default?.({
|
||
isHovering: isHovering.value,
|
||
props: {
|
||
onMouseenter: runOpenDelay,
|
||
onMouseleave: runCloseDelay
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VInfiniteScroll/VInfiniteScroll.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VInfiniteScroll/VInfiniteScroll.css";
|
||
var makeVInfiniteScrollProps = propsFactory({
|
||
color: String,
|
||
direction: {
|
||
type: String,
|
||
default: "vertical",
|
||
validator: (v) => ["vertical", "horizontal"].includes(v)
|
||
},
|
||
side: {
|
||
type: String,
|
||
default: "end",
|
||
validator: (v) => ["start", "end", "both"].includes(v)
|
||
},
|
||
mode: {
|
||
type: String,
|
||
default: "intersect",
|
||
validator: (v) => ["intersect", "manual"].includes(v)
|
||
},
|
||
margin: [Number, String],
|
||
loadMoreText: {
|
||
type: String,
|
||
default: "$vuetify.infiniteScroll.loadMore"
|
||
},
|
||
emptyText: {
|
||
type: String,
|
||
default: "$vuetify.infiniteScroll.empty"
|
||
},
|
||
...makeDimensionProps(),
|
||
...makeTagProps()
|
||
}, "VInfiniteScroll");
|
||
var VInfiniteScrollIntersect = defineComponent({
|
||
name: "VInfiniteScrollIntersect",
|
||
props: {
|
||
side: {
|
||
type: String,
|
||
required: true
|
||
},
|
||
rootMargin: String
|
||
},
|
||
emits: {
|
||
intersect: (side, isIntersecting) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit
|
||
} = _ref;
|
||
const {
|
||
intersectionRef,
|
||
isIntersecting
|
||
} = useIntersectionObserver();
|
||
watch(isIntersecting, async (val) => {
|
||
emit("intersect", props.side, val);
|
||
});
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": "v-infinite-scroll-intersect",
|
||
"style": {
|
||
"--v-infinite-margin-size": props.rootMargin
|
||
},
|
||
"ref": intersectionRef
|
||
}, [createTextVNode(" ")]));
|
||
return {};
|
||
}
|
||
});
|
||
var VInfiniteScroll = genericComponent()({
|
||
name: "VInfiniteScroll",
|
||
props: makeVInfiniteScrollProps(),
|
||
emits: {
|
||
load: (options) => true
|
||
},
|
||
setup(props, _ref2) {
|
||
let {
|
||
slots,
|
||
emit
|
||
} = _ref2;
|
||
const rootEl = ref();
|
||
const startStatus = shallowRef("ok");
|
||
const endStatus = shallowRef("ok");
|
||
const margin = computed(() => convertToUnit(props.margin));
|
||
const isIntersecting = shallowRef(false);
|
||
function setScrollAmount(amount) {
|
||
if (!rootEl.value) return;
|
||
const property = props.direction === "vertical" ? "scrollTop" : "scrollLeft";
|
||
rootEl.value[property] = amount;
|
||
}
|
||
function getScrollAmount() {
|
||
if (!rootEl.value) return 0;
|
||
const property = props.direction === "vertical" ? "scrollTop" : "scrollLeft";
|
||
return rootEl.value[property];
|
||
}
|
||
function getScrollSize() {
|
||
if (!rootEl.value) return 0;
|
||
const property = props.direction === "vertical" ? "scrollHeight" : "scrollWidth";
|
||
return rootEl.value[property];
|
||
}
|
||
function getContainerSize() {
|
||
if (!rootEl.value) return 0;
|
||
const property = props.direction === "vertical" ? "clientHeight" : "clientWidth";
|
||
return rootEl.value[property];
|
||
}
|
||
onMounted(() => {
|
||
if (!rootEl.value) return;
|
||
if (props.side === "start") {
|
||
setScrollAmount(getScrollSize());
|
||
} else if (props.side === "both") {
|
||
setScrollAmount(getScrollSize() / 2 - getContainerSize() / 2);
|
||
}
|
||
});
|
||
function setStatus(side, status) {
|
||
if (side === "start") {
|
||
startStatus.value = status;
|
||
} else if (side === "end") {
|
||
endStatus.value = status;
|
||
} else if (side === "both") {
|
||
startStatus.value = status;
|
||
endStatus.value = status;
|
||
}
|
||
}
|
||
function getStatus(side) {
|
||
return side === "start" ? startStatus.value : endStatus.value;
|
||
}
|
||
let previousScrollSize = 0;
|
||
function handleIntersect(side, _isIntersecting) {
|
||
isIntersecting.value = _isIntersecting;
|
||
if (isIntersecting.value) {
|
||
intersecting(side);
|
||
}
|
||
}
|
||
function intersecting(side) {
|
||
if (props.mode !== "manual" && !isIntersecting.value) return;
|
||
const status = getStatus(side);
|
||
if (!rootEl.value || ["empty", "loading"].includes(status)) return;
|
||
previousScrollSize = getScrollSize();
|
||
setStatus(side, "loading");
|
||
function done(status2) {
|
||
setStatus(side, status2);
|
||
nextTick(() => {
|
||
if (status2 === "empty" || status2 === "error") return;
|
||
if (status2 === "ok" && side === "start") {
|
||
setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
|
||
}
|
||
if (props.mode !== "manual") {
|
||
nextTick(() => {
|
||
window.requestAnimationFrame(() => {
|
||
window.requestAnimationFrame(() => {
|
||
window.requestAnimationFrame(() => {
|
||
intersecting(side);
|
||
});
|
||
});
|
||
});
|
||
});
|
||
}
|
||
});
|
||
}
|
||
emit("load", {
|
||
side,
|
||
done
|
||
});
|
||
}
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
function renderSide(side, status) {
|
||
if (props.side !== side && props.side !== "both") return;
|
||
const onClick = () => intersecting(side);
|
||
const slotProps = {
|
||
side,
|
||
props: {
|
||
onClick,
|
||
color: props.color
|
||
}
|
||
};
|
||
if (status === "error") return slots.error?.(slotProps);
|
||
if (status === "empty") return slots.empty?.(slotProps) ?? createBaseVNode("div", null, [t(props.emptyText)]);
|
||
if (props.mode === "manual") {
|
||
if (status === "loading") {
|
||
return slots.loading?.(slotProps) ?? createVNode(VProgressCircular, {
|
||
"indeterminate": true,
|
||
"color": props.color
|
||
}, null);
|
||
}
|
||
return slots["load-more"]?.(slotProps) ?? createVNode(VBtn, {
|
||
"variant": "outlined",
|
||
"color": props.color,
|
||
"onClick": onClick
|
||
}, {
|
||
default: () => [t(props.loadMoreText)]
|
||
});
|
||
}
|
||
return slots.loading?.(slotProps) ?? createVNode(VProgressCircular, {
|
||
"indeterminate": true,
|
||
"color": props.color
|
||
}, null);
|
||
}
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
useRender(() => {
|
||
const Tag = props.tag;
|
||
const hasStartIntersect = props.side === "start" || props.side === "both";
|
||
const hasEndIntersect = props.side === "end" || props.side === "both";
|
||
const intersectMode = props.mode === "intersect";
|
||
return createVNode(Tag, {
|
||
"ref": rootEl,
|
||
"class": normalizeClass(["v-infinite-scroll", `v-infinite-scroll--${props.direction}`, {
|
||
"v-infinite-scroll--start": hasStartIntersect,
|
||
"v-infinite-scroll--end": hasEndIntersect
|
||
}]),
|
||
"style": normalizeStyle(dimensionStyles.value)
|
||
}, {
|
||
default: () => [createBaseVNode("div", {
|
||
"class": "v-infinite-scroll__side"
|
||
}, [renderSide("start", startStatus.value)]), hasStartIntersect && intersectMode && createVNode(VInfiniteScrollIntersect, {
|
||
"key": "start",
|
||
"side": "start",
|
||
"onIntersect": handleIntersect,
|
||
"rootMargin": margin.value
|
||
}, null), slots.default?.(), hasEndIntersect && intersectMode && createVNode(VInfiniteScrollIntersect, {
|
||
"key": "end",
|
||
"side": "end",
|
||
"onIntersect": handleIntersect,
|
||
"rootMargin": margin.value
|
||
}, null), createBaseVNode("div", {
|
||
"class": "v-infinite-scroll__side"
|
||
}, [renderSide("end", endStatus.value)])]
|
||
});
|
||
});
|
||
function reset(side) {
|
||
const effectiveSide = side ?? props.side;
|
||
setStatus(effectiveSide, "ok");
|
||
nextTick(() => {
|
||
if (effectiveSide !== "end") {
|
||
setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
|
||
}
|
||
if (props.mode !== "manual") {
|
||
nextTick(() => {
|
||
window.requestAnimationFrame(() => {
|
||
window.requestAnimationFrame(() => {
|
||
window.requestAnimationFrame(() => {
|
||
if (effectiveSide === "both") {
|
||
intersecting("start");
|
||
intersecting("end");
|
||
} else {
|
||
intersecting(effectiveSide);
|
||
}
|
||
});
|
||
});
|
||
});
|
||
});
|
||
}
|
||
});
|
||
}
|
||
return {
|
||
reset
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VItemGroup/VItemGroup.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VItemGroup/VItemGroup.css";
|
||
var VItemGroupSymbol = /* @__PURE__ */ Symbol.for("vuetify:v-item-group");
|
||
var makeVItemGroupProps = propsFactory({
|
||
...makeComponentProps(),
|
||
...makeGroupProps({
|
||
selectedClass: "v-item--selected"
|
||
}),
|
||
...makeTagProps(),
|
||
...makeThemeProps()
|
||
}, "VItemGroup");
|
||
var VItemGroup = genericComponent()({
|
||
name: "VItemGroup",
|
||
props: makeVItemGroupProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
isSelected,
|
||
select,
|
||
next,
|
||
prev,
|
||
selected
|
||
} = useGroup(props, VItemGroupSymbol);
|
||
return () => createVNode(props.tag, {
|
||
"class": normalizeClass(["v-item-group", themeClasses.value, props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, {
|
||
default: () => [slots.default?.({
|
||
isSelected,
|
||
select,
|
||
next,
|
||
prev,
|
||
selected: selected.value
|
||
})]
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VItemGroup/VItem.js
|
||
var VItem = genericComponent()({
|
||
name: "VItem",
|
||
props: makeGroupItemProps(),
|
||
emits: {
|
||
"group:selected": (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
isSelected,
|
||
select,
|
||
toggle,
|
||
selectedClass,
|
||
value,
|
||
disabled
|
||
} = useGroupItem(props, VItemGroupSymbol);
|
||
return () => slots.default?.({
|
||
isSelected: isSelected.value,
|
||
selectedClass: selectedClass.value,
|
||
select,
|
||
toggle,
|
||
value: value.value,
|
||
disabled: disabled.value
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VLayout/VLayout.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VLayout/VLayout.css";
|
||
var makeVLayoutProps = propsFactory({
|
||
...makeComponentProps(),
|
||
...makeDimensionProps(),
|
||
...makeLayoutProps()
|
||
}, "VLayout");
|
||
var VLayout = genericComponent()({
|
||
name: "VLayout",
|
||
props: makeVLayoutProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
layoutClasses,
|
||
layoutStyles,
|
||
getLayoutItem,
|
||
items,
|
||
layoutRef
|
||
} = createLayout(props);
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
useRender(() => createBaseVNode("div", {
|
||
"ref": layoutRef,
|
||
"class": normalizeClass([layoutClasses.value, props.class]),
|
||
"style": normalizeStyle([dimensionStyles.value, layoutStyles.value, props.style])
|
||
}, [slots.default?.()]));
|
||
return {
|
||
getLayoutItem,
|
||
items
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VLayout/VLayoutItem.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VLayout/VLayoutItem.css";
|
||
var makeVLayoutItemProps = propsFactory({
|
||
position: {
|
||
type: String,
|
||
required: true
|
||
},
|
||
size: {
|
||
type: [Number, String],
|
||
default: 300
|
||
},
|
||
modelValue: Boolean,
|
||
...makeComponentProps(),
|
||
...makeLayoutItemProps()
|
||
}, "VLayoutItem");
|
||
var VLayoutItem = genericComponent()({
|
||
name: "VLayoutItem",
|
||
props: makeVLayoutItemProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
layoutItemStyles
|
||
} = useLayoutItem({
|
||
id: props.name,
|
||
order: computed(() => parseInt(props.order, 10)),
|
||
position: toRef(() => props.position),
|
||
elementSize: toRef(() => props.size),
|
||
layoutSize: toRef(() => props.size),
|
||
active: toRef(() => props.modelValue),
|
||
absolute: toRef(() => props.absolute)
|
||
});
|
||
return () => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-layout-item", props.class]),
|
||
"style": normalizeStyle([layoutItemStyles.value, props.style])
|
||
}, [slots.default?.()]);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VLazy/VLazy.js
|
||
var makeVLazyProps = propsFactory({
|
||
modelValue: Boolean,
|
||
options: {
|
||
type: Object,
|
||
// For more information on types, navigate to:
|
||
// https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
|
||
default: () => ({
|
||
root: void 0,
|
||
rootMargin: void 0,
|
||
threshold: void 0
|
||
})
|
||
},
|
||
...makeComponentProps(),
|
||
...makeDimensionProps(),
|
||
...makeTagProps(),
|
||
...makeTransitionProps({
|
||
transition: "fade-transition"
|
||
})
|
||
}, "VLazy");
|
||
var VLazy = genericComponent()({
|
||
name: "VLazy",
|
||
directives: {
|
||
vIntersect: intersect_default
|
||
},
|
||
props: makeVLazyProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
const isActive = useProxiedModel(props, "modelValue");
|
||
function onIntersect(isIntersecting) {
|
||
if (isActive.value) return;
|
||
isActive.value = isIntersecting;
|
||
}
|
||
useRender(() => withDirectives(createVNode(props.tag, {
|
||
"class": normalizeClass(["v-lazy", props.class]),
|
||
"style": normalizeStyle([dimensionStyles.value, props.style])
|
||
}, {
|
||
default: () => [isActive.value && createVNode(MaybeTransition, {
|
||
"transition": props.transition,
|
||
"appear": true
|
||
}, {
|
||
default: () => [slots.default?.()]
|
||
})]
|
||
}), [[intersect_default, {
|
||
handler: onIntersect,
|
||
options: props.options
|
||
}, null]]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VLocaleProvider/VLocaleProvider.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VLocaleProvider/VLocaleProvider.css";
|
||
var makeVLocaleProviderProps = propsFactory({
|
||
locale: String,
|
||
fallbackLocale: String,
|
||
messages: Object,
|
||
rtl: {
|
||
type: Boolean,
|
||
default: void 0
|
||
},
|
||
...makeComponentProps()
|
||
}, "VLocaleProvider");
|
||
var VLocaleProvider = genericComponent()({
|
||
name: "VLocaleProvider",
|
||
props: makeVLocaleProviderProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
rtlClasses
|
||
} = provideLocale(props);
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-locale-provider", rtlClasses.value, props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, [slots.default?.()]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VNoSsr/VNoSsr.js
|
||
var VNoSsr = defineComponent({
|
||
name: "VNoSsr",
|
||
setup(_, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const show = useHydration();
|
||
return () => show.value && slots.default?.();
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VNumberInput/VNumberInput.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VNumberInput/VNumberInput.css";
|
||
|
||
// node_modules/vuetify/lib/components/VNumberInput/hold.js
|
||
var HOLD_REPEAT = 50;
|
||
var HOLD_DELAY = 500;
|
||
function useHold(_ref) {
|
||
let {
|
||
toggleUpDown
|
||
} = _ref;
|
||
let timeout = -1;
|
||
let interval = -1;
|
||
onScopeDispose(holdStop);
|
||
function holdStart(value) {
|
||
holdStop();
|
||
tick(value);
|
||
window.addEventListener("pointerup", holdStop);
|
||
document.addEventListener("blur", holdStop);
|
||
timeout = window.setTimeout(() => {
|
||
interval = window.setInterval(() => tick(value), HOLD_REPEAT);
|
||
}, HOLD_DELAY);
|
||
}
|
||
function holdStop() {
|
||
window.clearTimeout(timeout);
|
||
window.clearInterval(interval);
|
||
window.removeEventListener("pointerup", holdStop);
|
||
document.removeEventListener("blur", holdStop);
|
||
}
|
||
onScopeDispose(holdStop);
|
||
function tick(value) {
|
||
toggleUpDown(value === "up");
|
||
}
|
||
return {
|
||
holdStart,
|
||
holdStop
|
||
};
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VNumberInput/VNumberInput.js
|
||
var makeVNumberInputProps = propsFactory({
|
||
controlVariant: {
|
||
type: String,
|
||
default: "default"
|
||
},
|
||
inset: Boolean,
|
||
hideInput: Boolean,
|
||
modelValue: {
|
||
type: Number,
|
||
default: null
|
||
},
|
||
min: {
|
||
type: Number,
|
||
default: Number.MIN_SAFE_INTEGER
|
||
},
|
||
max: {
|
||
type: Number,
|
||
default: Number.MAX_SAFE_INTEGER
|
||
},
|
||
step: {
|
||
type: Number,
|
||
default: 1
|
||
},
|
||
precision: {
|
||
type: Number,
|
||
default: 0
|
||
},
|
||
minFractionDigits: {
|
||
type: Number,
|
||
default: null
|
||
},
|
||
decimalSeparator: {
|
||
type: String,
|
||
validator: (v) => !v || v.length === 1
|
||
},
|
||
...omit(makeVTextFieldProps(), ["modelValue", "validationValue"])
|
||
}, "VNumberInput");
|
||
var VNumberInput = genericComponent()({
|
||
name: "VNumberInput",
|
||
props: {
|
||
...makeVNumberInputProps()
|
||
},
|
||
emits: {
|
||
"update:focused": (val) => true,
|
||
"update:modelValue": (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const vTextFieldRef = ref();
|
||
const {
|
||
holdStart,
|
||
holdStop
|
||
} = useHold({
|
||
toggleUpDown
|
||
});
|
||
const form = useForm(props);
|
||
const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
|
||
const isFocused = shallowRef(props.focused);
|
||
const {
|
||
decimalSeparator: decimalSeparatorFromLocale
|
||
} = useLocale();
|
||
const decimalSeparator = computed(() => props.decimalSeparator?.[0] || decimalSeparatorFromLocale.value);
|
||
function correctPrecision(val) {
|
||
let precision = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : props.precision;
|
||
let trim = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
|
||
const fixed = precision == null ? String(val) : val.toFixed(precision);
|
||
if (isFocused.value && trim) {
|
||
return Number(fixed).toString().replace(".", decimalSeparator.value);
|
||
}
|
||
if (props.minFractionDigits === null || precision !== null && precision < props.minFractionDigits) {
|
||
return fixed.replace(".", decimalSeparator.value);
|
||
}
|
||
let [baseDigits, fractionDigits] = fixed.split(".");
|
||
fractionDigits = (fractionDigits ?? "").padEnd(props.minFractionDigits, "0").replace(new RegExp(`(?<=\\d{${props.minFractionDigits}})0+$`, "g"), "");
|
||
return [baseDigits, fractionDigits].filter(Boolean).join(decimalSeparator.value);
|
||
}
|
||
const model = useProxiedModel(props, "modelValue", null, (val) => val ?? null, (val) => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
|
||
const _inputText = shallowRef(null);
|
||
const _lastParsedValue = shallowRef(null);
|
||
watch(model, (val) => {
|
||
if (isFocused.value && !controlsDisabled.value && Number(_inputText.value?.replace(decimalSeparator.value, ".")) === val) {
|
||
} else if (val == null) {
|
||
_inputText.value = null;
|
||
_lastParsedValue.value = null;
|
||
} else if (!isNaN(val)) {
|
||
_inputText.value = correctPrecision(val);
|
||
_lastParsedValue.value = Number(_inputText.value.replace(decimalSeparator.value, "."));
|
||
}
|
||
}, {
|
||
immediate: true
|
||
});
|
||
const inputText = computed({
|
||
get: () => _inputText.value,
|
||
set(val) {
|
||
if (val === null || val === "") {
|
||
model.value = null;
|
||
_inputText.value = null;
|
||
_lastParsedValue.value = null;
|
||
return;
|
||
}
|
||
const parsedValue = Number(val.replace(decimalSeparator.value, "."));
|
||
if (!isNaN(parsedValue)) {
|
||
_inputText.value = val;
|
||
_lastParsedValue.value = parsedValue;
|
||
if (parsedValue <= props.max && parsedValue >= props.min) {
|
||
model.value = parsedValue;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
const isOutOfRange = computed(() => {
|
||
if (_lastParsedValue.value === null) return false;
|
||
const numberFromText = Number(_inputText.value?.replace(decimalSeparator.value, "."));
|
||
return numberFromText !== clamp(numberFromText, props.min, props.max);
|
||
});
|
||
const canIncrease = computed(() => {
|
||
if (controlsDisabled.value) return false;
|
||
return (model.value ?? 0) + props.step <= props.max;
|
||
});
|
||
const canDecrease = computed(() => {
|
||
if (controlsDisabled.value) return false;
|
||
return (model.value ?? 0) - props.step >= props.min;
|
||
});
|
||
const controlVariant = computed(() => {
|
||
return props.hideInput ? "stacked" : props.controlVariant;
|
||
});
|
||
const incrementIcon = toRef(() => controlVariant.value === "split" ? "$plus" : "$collapse");
|
||
const decrementIcon = toRef(() => controlVariant.value === "split" ? "$minus" : "$expand");
|
||
const controlNodeSize = toRef(() => controlVariant.value === "split" ? "default" : "small");
|
||
const controlNodeDefaultHeight = toRef(() => controlVariant.value === "stacked" ? "auto" : "100%");
|
||
const incrementSlotProps = {
|
||
props: {
|
||
onClick: onControlClick,
|
||
onPointerup: onControlMouseup,
|
||
onPointerdown: onUpControlMousedown,
|
||
onPointercancel: onControlMouseup
|
||
}
|
||
};
|
||
const decrementSlotProps = {
|
||
props: {
|
||
onClick: onControlClick,
|
||
onPointerup: onControlMouseup,
|
||
onPointerdown: onDownControlMousedown,
|
||
onPointercancel: onControlMouseup
|
||
}
|
||
};
|
||
watch(() => props.precision, () => formatInputValue());
|
||
watch(() => props.minFractionDigits, () => formatInputValue());
|
||
onMounted(() => {
|
||
clampModel();
|
||
});
|
||
function inferPrecision(value) {
|
||
if (value == null) return 0;
|
||
const str = value.toString();
|
||
const idx = str.indexOf(".");
|
||
return ~idx ? str.length - idx : 0;
|
||
}
|
||
function toggleUpDown() {
|
||
let increment = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
||
if (controlsDisabled.value) return;
|
||
if (model.value == null) {
|
||
inputText.value = correctPrecision(clamp(0, props.min, props.max));
|
||
return;
|
||
}
|
||
let inferredPrecision = Math.max(inferPrecision(model.value), inferPrecision(props.step));
|
||
if (props.precision != null) inferredPrecision = Math.max(inferredPrecision, props.precision);
|
||
if (increment) {
|
||
if (canIncrease.value) inputText.value = correctPrecision(model.value + props.step, inferredPrecision);
|
||
} else {
|
||
if (canDecrease.value) inputText.value = correctPrecision(model.value - props.step, inferredPrecision);
|
||
}
|
||
}
|
||
function onBeforeinput(e) {
|
||
if (!e.data) return;
|
||
const inputElement = e.target;
|
||
const {
|
||
value: existingTxt,
|
||
selectionStart,
|
||
selectionEnd
|
||
} = inputElement ?? {};
|
||
const potentialNewInputVal = existingTxt ? existingTxt.slice(0, selectionStart) + e.data + existingTxt.slice(selectionEnd) : e.data;
|
||
const potentialNewNumber = extractNumber(potentialNewInputVal, props.precision, decimalSeparator.value);
|
||
if (!new RegExp(`^-?\\d*${escapeForRegex(decimalSeparator.value)}?\\d*$`).test(potentialNewInputVal)) {
|
||
e.preventDefault();
|
||
inputElement.value = potentialNewNumber;
|
||
nextTick(() => inputText.value = potentialNewNumber);
|
||
}
|
||
if (props.precision == null) return;
|
||
if (potentialNewInputVal.split(decimalSeparator.value)[1]?.length > props.precision) {
|
||
e.preventDefault();
|
||
inputElement.value = potentialNewNumber;
|
||
nextTick(() => inputText.value = potentialNewNumber);
|
||
const cursorPosition = (selectionStart ?? 0) + e.data.length;
|
||
inputElement.setSelectionRange(cursorPosition, cursorPosition);
|
||
}
|
||
if (props.precision === 0 && potentialNewInputVal.endsWith(decimalSeparator.value)) {
|
||
e.preventDefault();
|
||
inputElement.value = potentialNewNumber;
|
||
nextTick(() => inputText.value = potentialNewNumber);
|
||
}
|
||
}
|
||
async function onKeydown(e) {
|
||
if (["Enter", "ArrowLeft", "ArrowRight", "Backspace", "Delete", "Tab"].includes(e.key) || e.ctrlKey) return;
|
||
if (["ArrowDown", "ArrowUp"].includes(e.key)) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
clampModel();
|
||
await nextTick();
|
||
if (e.key === "ArrowDown") {
|
||
toggleUpDown(false);
|
||
} else {
|
||
toggleUpDown();
|
||
}
|
||
}
|
||
}
|
||
function onControlClick(e) {
|
||
e.stopPropagation();
|
||
}
|
||
function onControlMouseup(e) {
|
||
const el = e.currentTarget;
|
||
el?.releasePointerCapture(e.pointerId);
|
||
e.preventDefault();
|
||
holdStop();
|
||
}
|
||
function onUpControlMousedown(e) {
|
||
const el = e.currentTarget;
|
||
el?.setPointerCapture(e.pointerId);
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
holdStart("up");
|
||
}
|
||
function onDownControlMousedown(e) {
|
||
const el = e.currentTarget;
|
||
el?.setPointerCapture(e.pointerId);
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
holdStart("down");
|
||
}
|
||
function clampModel() {
|
||
if (controlsDisabled.value) return;
|
||
if (!vTextFieldRef.value) return;
|
||
const actualText = vTextFieldRef.value.value;
|
||
const parsedValue = Number(actualText.replace(decimalSeparator.value, "."));
|
||
if (actualText && !isNaN(parsedValue)) {
|
||
inputText.value = correctPrecision(clamp(parsedValue, props.min, props.max));
|
||
} else {
|
||
inputText.value = null;
|
||
}
|
||
}
|
||
function formatInputValue() {
|
||
if (controlsDisabled.value) return;
|
||
inputText.value = model.value !== null && !isNaN(model.value) ? correctPrecision(model.value, props.precision, false) : null;
|
||
}
|
||
function trimDecimalZeros() {
|
||
if (controlsDisabled.value) return;
|
||
if (model.value === null || isNaN(model.value)) {
|
||
inputText.value = null;
|
||
return;
|
||
}
|
||
inputText.value = model.value.toString().replace(".", decimalSeparator.value);
|
||
}
|
||
function onFocus() {
|
||
trimDecimalZeros();
|
||
}
|
||
function onBlur() {
|
||
clampModel();
|
||
}
|
||
useRender(() => {
|
||
const {
|
||
modelValue: _,
|
||
type,
|
||
...textFieldProps
|
||
} = VTextField.filterProps(props);
|
||
function incrementControlNode() {
|
||
return !slots.increment ? createVNode(VBtn, {
|
||
"aria-hidden": "true",
|
||
"data-testid": "increment",
|
||
"disabled": !canIncrease.value,
|
||
"height": controlNodeDefaultHeight.value,
|
||
"icon": incrementIcon.value,
|
||
"key": "increment-btn",
|
||
"onClick": onControlClick,
|
||
"onPointerdown": onUpControlMousedown,
|
||
"onPointerup": onControlMouseup,
|
||
"onPointercancel": onControlMouseup,
|
||
"size": controlNodeSize.value,
|
||
"variant": "text",
|
||
"tabindex": "-1"
|
||
}, null) : createVNode(VDefaultsProvider, {
|
||
"key": "increment-defaults",
|
||
"defaults": {
|
||
VBtn: {
|
||
disabled: !canIncrease.value,
|
||
height: controlNodeDefaultHeight.value,
|
||
size: controlNodeSize.value,
|
||
icon: incrementIcon.value,
|
||
variant: "text"
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.increment(incrementSlotProps)]
|
||
});
|
||
}
|
||
function decrementControlNode() {
|
||
return !slots.decrement ? createVNode(VBtn, {
|
||
"aria-hidden": "true",
|
||
"data-testid": "decrement",
|
||
"disabled": !canDecrease.value,
|
||
"height": controlNodeDefaultHeight.value,
|
||
"icon": decrementIcon.value,
|
||
"key": "decrement-btn",
|
||
"onClick": onControlClick,
|
||
"onPointerdown": onDownControlMousedown,
|
||
"onPointerup": onControlMouseup,
|
||
"onPointercancel": onControlMouseup,
|
||
"size": controlNodeSize.value,
|
||
"variant": "text",
|
||
"tabindex": "-1"
|
||
}, null) : createVNode(VDefaultsProvider, {
|
||
"key": "decrement-defaults",
|
||
"defaults": {
|
||
VBtn: {
|
||
disabled: !canDecrease.value,
|
||
height: controlNodeDefaultHeight.value,
|
||
size: controlNodeSize.value,
|
||
icon: decrementIcon.value,
|
||
variant: "text"
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.decrement(decrementSlotProps)]
|
||
});
|
||
}
|
||
function controlNode() {
|
||
return createBaseVNode("div", {
|
||
"class": "v-number-input__control"
|
||
}, [decrementControlNode(), createVNode(VDivider, {
|
||
"vertical": controlVariant.value !== "stacked"
|
||
}, null), incrementControlNode()]);
|
||
}
|
||
function dividerNode() {
|
||
return !props.hideInput && !props.inset ? createVNode(VDivider, {
|
||
"vertical": true
|
||
}, null) : void 0;
|
||
}
|
||
const appendInnerControl = controlVariant.value === "split" ? createBaseVNode("div", {
|
||
"class": "v-number-input__control"
|
||
}, [createVNode(VDivider, {
|
||
"vertical": true
|
||
}, null), incrementControlNode()]) : props.reverse || controlVariant.value === "hidden" ? void 0 : createBaseVNode(Fragment, null, [dividerNode(), controlNode()]);
|
||
const hasAppendInner = slots["append-inner"] || appendInnerControl;
|
||
const prependInnerControl = controlVariant.value === "split" ? createBaseVNode("div", {
|
||
"class": "v-number-input__control"
|
||
}, [decrementControlNode(), createVNode(VDivider, {
|
||
"vertical": true
|
||
}, null)]) : props.reverse && controlVariant.value !== "hidden" ? createBaseVNode(Fragment, null, [controlNode(), dividerNode()]) : void 0;
|
||
const hasPrependInner = slots["prepend-inner"] || prependInnerControl;
|
||
return createVNode(VTextField, mergeProps({
|
||
"ref": vTextFieldRef
|
||
}, textFieldProps, {
|
||
"modelValue": inputText.value,
|
||
"onUpdate:modelValue": ($event) => inputText.value = $event,
|
||
"focused": isFocused.value,
|
||
"onUpdate:focused": ($event) => isFocused.value = $event,
|
||
"validationValue": model.value,
|
||
"error": props.error || isOutOfRange.value || void 0,
|
||
"onBeforeinput": onBeforeinput,
|
||
"onFocus": onFocus,
|
||
"onBlur": onBlur,
|
||
"onKeydown": onKeydown,
|
||
"class": ["v-number-input", {
|
||
"v-number-input--default": controlVariant.value === "default",
|
||
"v-number-input--hide-input": props.hideInput,
|
||
"v-number-input--inset": props.inset,
|
||
"v-number-input--reverse": props.reverse,
|
||
"v-number-input--split": controlVariant.value === "split",
|
||
"v-number-input--stacked": controlVariant.value === "stacked"
|
||
}, props.class],
|
||
"style": props.style,
|
||
"inputmode": "decimal"
|
||
}), {
|
||
...slots,
|
||
"append-inner": hasAppendInner ? function() {
|
||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
return createBaseVNode(Fragment, null, [slots["append-inner"]?.(...args), appendInnerControl]);
|
||
} : void 0,
|
||
"prepend-inner": hasPrependInner ? function() {
|
||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||
args[_key2] = arguments[_key2];
|
||
}
|
||
return createBaseVNode(Fragment, null, [prependInnerControl, slots["prepend-inner"]?.(...args)]);
|
||
} : void 0
|
||
});
|
||
});
|
||
return forwardRefs({}, vTextFieldRef);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VOtpInput/VOtpInput.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VOtpInput/VOtpInput.css";
|
||
var makeVOtpInputProps = propsFactory({
|
||
autofocus: Boolean,
|
||
divider: String,
|
||
focusAll: Boolean,
|
||
label: {
|
||
type: String,
|
||
default: "$vuetify.input.otp"
|
||
},
|
||
length: {
|
||
type: [Number, String],
|
||
default: 6
|
||
},
|
||
modelValue: {
|
||
type: [Number, String],
|
||
default: void 0
|
||
},
|
||
placeholder: String,
|
||
type: {
|
||
type: String,
|
||
default: "number"
|
||
},
|
||
...makeDimensionProps(),
|
||
...makeFocusProps(),
|
||
...pick(makeVFieldProps({
|
||
variant: "outlined"
|
||
}), ["baseColor", "bgColor", "class", "color", "disabled", "error", "loading", "rounded", "style", "theme", "variant"])
|
||
}, "VOtpInput");
|
||
var VOtpInput = genericComponent()({
|
||
name: "VOtpInput",
|
||
props: makeVOtpInputProps(),
|
||
emits: {
|
||
finish: (val) => true,
|
||
"update:focused": (val) => true,
|
||
"update:modelValue": (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
attrs,
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
const {
|
||
isFocused,
|
||
focus,
|
||
blur
|
||
} = useFocus(props);
|
||
const model = useProxiedModel(props, "modelValue", "", (val) => val == null ? [] : String(val).split(""), (val) => val.join(""));
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const length = computed(() => Number(props.length));
|
||
const fields = computed(() => Array(length.value).fill(0));
|
||
const focusIndex = ref(-1);
|
||
const contentRef = ref();
|
||
const inputRef = ref([]);
|
||
const current = computed(() => inputRef.value[focusIndex.value]);
|
||
let _isComposing = false;
|
||
useToggleScope(() => props.autofocus, () => {
|
||
const intersectScope = effectScope();
|
||
intersectScope.run(() => {
|
||
const {
|
||
intersectionRef,
|
||
isIntersecting
|
||
} = useIntersectionObserver();
|
||
watchEffect(() => {
|
||
intersectionRef.value = inputRef.value[0];
|
||
});
|
||
watch(isIntersecting, (v) => {
|
||
if (!v) return;
|
||
intersectionRef.value?.focus();
|
||
intersectScope.stop();
|
||
});
|
||
});
|
||
});
|
||
function onInput() {
|
||
if (isValidNumber(current.value.value)) {
|
||
current.value.value = "";
|
||
return;
|
||
}
|
||
if (_isComposing) return;
|
||
const array = model.value.slice();
|
||
const value = current.value.value;
|
||
array[focusIndex.value] = value;
|
||
let target = null;
|
||
if (focusIndex.value > model.value.length) {
|
||
target = model.value.length + 1;
|
||
} else if (focusIndex.value + 1 !== length.value) {
|
||
target = "next";
|
||
}
|
||
model.value = array;
|
||
if (target) focusChild(contentRef.value, target);
|
||
}
|
||
function onCompositionend() {
|
||
_isComposing = false;
|
||
onInput();
|
||
}
|
||
function onKeydown(e) {
|
||
const array = model.value.slice();
|
||
const index = focusIndex.value;
|
||
let target = null;
|
||
if (!["ArrowLeft", "ArrowRight", "Backspace", "Delete"].includes(e.key)) return;
|
||
e.preventDefault();
|
||
if (e.key === "ArrowLeft") {
|
||
target = "prev";
|
||
} else if (e.key === "ArrowRight") {
|
||
target = "next";
|
||
} else if (["Backspace", "Delete"].includes(e.key)) {
|
||
array[focusIndex.value] = "";
|
||
model.value = array;
|
||
if (focusIndex.value > 0 && e.key === "Backspace") {
|
||
target = "prev";
|
||
} else {
|
||
requestAnimationFrame(() => {
|
||
inputRef.value[index]?.select();
|
||
});
|
||
}
|
||
}
|
||
requestAnimationFrame(() => {
|
||
if (target != null) {
|
||
focusChild(contentRef.value, target);
|
||
}
|
||
});
|
||
}
|
||
function onPaste(index, e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
const clipboardText = e?.clipboardData?.getData("Text").trim().slice(0, length.value) ?? "";
|
||
const finalIndex = clipboardText.length - 1 === -1 ? index : clipboardText.length - 1;
|
||
if (isValidNumber(clipboardText)) return;
|
||
model.value = clipboardText.split("");
|
||
focusIndex.value = finalIndex;
|
||
}
|
||
function reset() {
|
||
model.value = [];
|
||
}
|
||
function onFocus(e, index) {
|
||
focus();
|
||
focusIndex.value = index;
|
||
}
|
||
function onBlur() {
|
||
blur();
|
||
focusIndex.value = -1;
|
||
}
|
||
function isValidNumber(value) {
|
||
return props.type === "number" && /[^0-9]/g.test(value);
|
||
}
|
||
provideDefaults({
|
||
VField: {
|
||
color: toRef(() => props.color),
|
||
bgColor: toRef(() => props.color),
|
||
baseColor: toRef(() => props.baseColor),
|
||
disabled: toRef(() => props.disabled),
|
||
error: toRef(() => props.error),
|
||
variant: toRef(() => props.variant),
|
||
rounded: toRef(() => props.rounded)
|
||
}
|
||
}, {
|
||
scoped: true
|
||
});
|
||
watch(model, (val) => {
|
||
if (val.length === length.value) {
|
||
emit("finish", val.join(""));
|
||
}
|
||
}, {
|
||
deep: true
|
||
});
|
||
watch(focusIndex, (val) => {
|
||
if (val < 0) return;
|
||
nextTick(() => {
|
||
inputRef.value[val]?.select();
|
||
});
|
||
});
|
||
useRender(() => {
|
||
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
||
return createBaseVNode("div", mergeProps({
|
||
"class": ["v-otp-input", {
|
||
"v-otp-input--divided": !!props.divider
|
||
}, props.class],
|
||
"style": [props.style]
|
||
}, rootAttrs), [createBaseVNode("div", {
|
||
"ref": contentRef,
|
||
"class": "v-otp-input__content",
|
||
"style": normalizeStyle([dimensionStyles.value])
|
||
}, [fields.value.map((_, i) => createBaseVNode(Fragment, null, [props.divider && i !== 0 && createBaseVNode("span", {
|
||
"class": "v-otp-input__divider"
|
||
}, [props.divider]), createVNode(VField, {
|
||
"focused": isFocused.value && props.focusAll || focusIndex.value === i,
|
||
"key": i
|
||
}, {
|
||
...slots,
|
||
loader: void 0,
|
||
default: () => {
|
||
return createBaseVNode("input", {
|
||
"ref": (val) => inputRef.value[i] = val,
|
||
"aria-label": t(props.label, i + 1),
|
||
"autofocus": i === 0 && props.autofocus,
|
||
"autocomplete": "one-time-code",
|
||
"class": normalizeClass(["v-otp-input__field"]),
|
||
"disabled": props.disabled,
|
||
"inputmode": props.type === "number" ? "numeric" : "text",
|
||
"min": props.type === "number" ? 0 : void 0,
|
||
"maxlength": i === 0 ? length.value : "1",
|
||
"placeholder": props.placeholder,
|
||
"type": props.type === "number" ? "text" : props.type,
|
||
"value": model.value[i],
|
||
"onInput": onInput,
|
||
"onFocus": (e) => onFocus(e, i),
|
||
"onBlur": onBlur,
|
||
"onKeydown": onKeydown,
|
||
"onCompositionstart": () => _isComposing = true,
|
||
"onCompositionend": onCompositionend,
|
||
"onPaste": (event) => onPaste(i, event)
|
||
}, null);
|
||
}
|
||
})])), createBaseVNode("input", mergeProps({
|
||
"class": "v-otp-input-input",
|
||
"type": "hidden"
|
||
}, inputAttrs, {
|
||
"value": model.value.join("")
|
||
}), null), createVNode(VOverlay, {
|
||
"contained": true,
|
||
"contentClass": "v-otp-input__loader",
|
||
"modelValue": !!props.loading,
|
||
"persistent": true
|
||
}, {
|
||
default: () => [slots.loader?.() ?? createVNode(VProgressCircular, {
|
||
"color": typeof props.loading === "boolean" ? void 0 : props.loading,
|
||
"indeterminate": true,
|
||
"size": "24",
|
||
"width": "2"
|
||
}, null)]
|
||
}), slots.default?.()])]);
|
||
});
|
||
return {
|
||
blur: () => {
|
||
inputRef.value?.some((input) => input.blur());
|
||
},
|
||
focus: () => {
|
||
inputRef.value?.[0].focus();
|
||
},
|
||
reset,
|
||
isFocused
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VParallax/VParallax.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VParallax/VParallax.css";
|
||
function floor(val) {
|
||
return Math.floor(Math.abs(val)) * Math.sign(val);
|
||
}
|
||
var makeVParallaxProps = propsFactory({
|
||
scale: {
|
||
type: [Number, String],
|
||
default: 0.5
|
||
},
|
||
...makeComponentProps()
|
||
}, "VParallax");
|
||
var VParallax = genericComponent()({
|
||
name: "VParallax",
|
||
props: makeVParallaxProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
intersectionRef,
|
||
isIntersecting
|
||
} = useIntersectionObserver();
|
||
const {
|
||
resizeRef,
|
||
contentRect
|
||
} = useResizeObserver();
|
||
const {
|
||
height: displayHeight
|
||
} = useDisplay();
|
||
const root = ref();
|
||
watchEffect(() => {
|
||
intersectionRef.value = resizeRef.value = root.value?.$el;
|
||
});
|
||
let scrollParent;
|
||
watch(isIntersecting, (val) => {
|
||
if (val) {
|
||
scrollParent = getScrollParent(intersectionRef.value);
|
||
scrollParent = scrollParent === document.scrollingElement ? document : scrollParent;
|
||
scrollParent.addEventListener("scroll", onScroll, {
|
||
passive: true
|
||
});
|
||
onScroll();
|
||
} else {
|
||
scrollParent.removeEventListener("scroll", onScroll);
|
||
}
|
||
});
|
||
onBeforeUnmount(() => {
|
||
scrollParent?.removeEventListener("scroll", onScroll);
|
||
});
|
||
watch(displayHeight, onScroll);
|
||
watch(() => contentRect.value?.height, onScroll);
|
||
const scale = computed(() => {
|
||
return 1 - clamp(Number(props.scale));
|
||
});
|
||
let frame = -1;
|
||
function onScroll() {
|
||
if (!isIntersecting.value || PREFERS_REDUCED_MOTION()) return;
|
||
cancelAnimationFrame(frame);
|
||
frame = requestAnimationFrame(() => {
|
||
const el = (root.value?.$el).querySelector(".v-img__img");
|
||
if (!el) return;
|
||
const scrollHeight = scrollParent instanceof Document ? document.documentElement.clientHeight : scrollParent.clientHeight;
|
||
const scrollPos = scrollParent instanceof Document ? window.scrollY : scrollParent.scrollTop;
|
||
const top = intersectionRef.value.getBoundingClientRect().top + scrollPos;
|
||
const height = contentRect.value.height;
|
||
const center = top + (height - scrollHeight) / 2;
|
||
const translate = floor((scrollPos - center) * scale.value);
|
||
const sizeScale = Math.max(1, (scale.value * (scrollHeight - height) + height) / height);
|
||
el.style.setProperty("transform", `translateY(${translate}px) scale(${sizeScale})`);
|
||
});
|
||
}
|
||
useRender(() => createVNode(VImg, {
|
||
"class": normalizeClass(["v-parallax", {
|
||
"v-parallax--active": isIntersecting.value
|
||
}, props.class]),
|
||
"style": normalizeStyle(props.style),
|
||
"ref": root,
|
||
"cover": true,
|
||
"onLoadstart": onScroll,
|
||
"onLoad": onScroll
|
||
}, slots));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VRadio/VRadio.js
|
||
var makeVRadioProps = propsFactory({
|
||
...makeVSelectionControlProps({
|
||
falseIcon: "$radioOff",
|
||
trueIcon: "$radioOn"
|
||
})
|
||
}, "VRadio");
|
||
var VRadio = genericComponent()({
|
||
name: "VRadio",
|
||
props: makeVRadioProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
useRender(() => {
|
||
const controlProps = VSelectionControl.filterProps(props);
|
||
return createVNode(VSelectionControl, mergeProps(controlProps, {
|
||
"class": ["v-radio", props.class],
|
||
"style": props.style,
|
||
"type": "radio"
|
||
}), slots);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VRadioGroup/VRadioGroup.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VRadioGroup/VRadioGroup.css";
|
||
var makeVRadioGroupProps = propsFactory({
|
||
height: {
|
||
type: [Number, String],
|
||
default: "auto"
|
||
},
|
||
...makeVInputProps(),
|
||
...omit(makeSelectionControlGroupProps(), ["multiple"]),
|
||
trueIcon: {
|
||
type: IconValue,
|
||
default: "$radioOn"
|
||
},
|
||
falseIcon: {
|
||
type: IconValue,
|
||
default: "$radioOff"
|
||
},
|
||
type: {
|
||
type: String,
|
||
default: "radio"
|
||
}
|
||
}, "VRadioGroup");
|
||
var VRadioGroup = genericComponent()({
|
||
name: "VRadioGroup",
|
||
inheritAttrs: false,
|
||
props: makeVRadioGroupProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
attrs,
|
||
slots
|
||
} = _ref;
|
||
const uid = useId();
|
||
const id = computed(() => props.id || `radio-group-${uid}`);
|
||
const model = useProxiedModel(props, "modelValue");
|
||
const inputRef = ref();
|
||
useRender(() => {
|
||
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
||
const inputProps = VInput.filterProps(props);
|
||
const controlProps = VSelectionControl.filterProps(props);
|
||
const label = slots.label ? slots.label({
|
||
label: props.label,
|
||
props: {
|
||
for: id.value
|
||
}
|
||
}) : props.label;
|
||
return createVNode(VInput, mergeProps({
|
||
"ref": inputRef,
|
||
"class": ["v-radio-group", props.class],
|
||
"style": props.style
|
||
}, rootAttrs, inputProps, {
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||
"id": id.value
|
||
}), {
|
||
...slots,
|
||
default: (_ref2) => {
|
||
let {
|
||
id: id2,
|
||
messagesId,
|
||
isDisabled,
|
||
isReadonly
|
||
} = _ref2;
|
||
return createBaseVNode(Fragment, null, [label && createVNode(VLabel, {
|
||
"id": id2.value
|
||
}, {
|
||
default: () => [label]
|
||
}), createVNode(VSelectionControlGroup, mergeProps(controlProps, {
|
||
"id": id2.value,
|
||
"aria-describedby": messagesId.value,
|
||
"defaultsTarget": "VRadio",
|
||
"trueIcon": props.trueIcon,
|
||
"falseIcon": props.falseIcon,
|
||
"type": props.type,
|
||
"disabled": isDisabled.value,
|
||
"readonly": isReadonly.value,
|
||
"aria-labelledby": label ? id2.value : void 0,
|
||
"multiple": false
|
||
}, controlAttrs, {
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event
|
||
}), slots)]);
|
||
}
|
||
});
|
||
});
|
||
return forwardRefs({}, inputRef);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VRangeSlider/VRangeSlider.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSlider/VSlider.css";
|
||
var makeVRangeSliderProps = propsFactory({
|
||
...makeFocusProps(),
|
||
...makeVInputProps(),
|
||
...makeSliderProps(),
|
||
strict: Boolean,
|
||
modelValue: {
|
||
type: Array,
|
||
default: () => [0, 0]
|
||
}
|
||
}, "VRangeSlider");
|
||
var VRangeSlider = genericComponent()({
|
||
name: "VRangeSlider",
|
||
inheritAttrs: false,
|
||
props: makeVRangeSliderProps(),
|
||
emits: {
|
||
"update:focused": (value) => true,
|
||
"update:modelValue": (value) => true,
|
||
end: (value) => true,
|
||
start: (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
emit,
|
||
attrs
|
||
} = _ref;
|
||
const startThumbRef = ref();
|
||
const stopThumbRef = ref();
|
||
const inputRef = ref();
|
||
const {
|
||
rtlClasses
|
||
} = useRtl();
|
||
function getActiveThumb(e) {
|
||
if (!startThumbRef.value || !stopThumbRef.value) return;
|
||
const startOffset = getOffset(e, startThumbRef.value.$el, props.direction);
|
||
const stopOffset = getOffset(e, stopThumbRef.value.$el, props.direction);
|
||
const a = Math.abs(startOffset);
|
||
const b = Math.abs(stopOffset);
|
||
return a < b || a === b && startOffset < 0 ? startThumbRef.value.$el : stopThumbRef.value.$el;
|
||
}
|
||
const steps = useSteps(props);
|
||
const model = useProxiedModel(props, "modelValue", void 0, (arr) => {
|
||
if (!arr?.length) return [0, 0];
|
||
return arr.map((value) => steps.roundValue(value));
|
||
});
|
||
const {
|
||
activeThumbRef,
|
||
hasLabels,
|
||
max,
|
||
min,
|
||
mousePressed,
|
||
onSliderMousedown,
|
||
onSliderTouchstart,
|
||
position,
|
||
trackContainerRef,
|
||
disabled,
|
||
readonly
|
||
} = useSlider({
|
||
props,
|
||
steps,
|
||
onSliderStart: () => {
|
||
if (disabled.value || readonly.value) {
|
||
activeThumbRef.value?.blur();
|
||
return;
|
||
}
|
||
emit("start", model.value);
|
||
},
|
||
onSliderEnd: (_ref2) => {
|
||
let {
|
||
value
|
||
} = _ref2;
|
||
if (disabled.value || readonly.value) {
|
||
activeThumbRef.value?.blur();
|
||
} else {
|
||
const newValue = activeThumbRef.value === startThumbRef.value?.$el ? [value, model.value[1]] : [model.value[0], value];
|
||
if (!props.strict && newValue[0] < newValue[1]) {
|
||
model.value = newValue;
|
||
}
|
||
}
|
||
emit("end", model.value);
|
||
},
|
||
onSliderMove: (_ref3) => {
|
||
let {
|
||
value
|
||
} = _ref3;
|
||
const [start, stop] = model.value;
|
||
if (disabled.value || readonly.value) {
|
||
activeThumbRef.value?.blur();
|
||
return;
|
||
}
|
||
if (!props.strict && start === stop && start !== min.value) {
|
||
activeThumbRef.value = value > start ? stopThumbRef.value?.$el : startThumbRef.value?.$el;
|
||
activeThumbRef.value?.focus();
|
||
}
|
||
if (activeThumbRef.value === startThumbRef.value?.$el) {
|
||
model.value = [Math.min(value, stop), stop];
|
||
} else {
|
||
model.value = [start, Math.max(start, value)];
|
||
}
|
||
},
|
||
getActiveThumb
|
||
});
|
||
const {
|
||
isFocused,
|
||
focus,
|
||
blur
|
||
} = useFocus(props);
|
||
const trackStart = computed(() => position(model.value[0]));
|
||
const trackStop = computed(() => position(model.value[1]));
|
||
useRender(() => {
|
||
const inputProps = VInput.filterProps(props);
|
||
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
||
const hasPrepend = !!(props.label || slots.label || slots.prepend);
|
||
return createVNode(VInput, mergeProps({
|
||
"class": ["v-slider", "v-range-slider", {
|
||
"v-slider--has-labels": !!slots["tick-label"] || hasLabels.value,
|
||
"v-slider--focused": isFocused.value,
|
||
"v-slider--pressed": mousePressed.value,
|
||
"v-slider--disabled": disabled.value
|
||
}, rtlClasses.value, props.class],
|
||
"style": props.style,
|
||
"ref": inputRef
|
||
}, inputProps, rootAttrs, {
|
||
"focused": isFocused.value
|
||
}), {
|
||
...slots,
|
||
prepend: hasPrepend ? (slotProps) => createBaseVNode(Fragment, null, [slots.label?.(slotProps) ?? (props.label ? createVNode(VLabel, {
|
||
"class": "v-slider__label",
|
||
"text": props.label
|
||
}, null) : void 0), slots.prepend?.(slotProps)]) : void 0,
|
||
default: (_ref4) => {
|
||
let {
|
||
id,
|
||
messagesId
|
||
} = _ref4;
|
||
return createBaseVNode("div", {
|
||
"class": "v-slider__container",
|
||
"onMousedown": !readonly.value ? onSliderMousedown : void 0,
|
||
"onTouchstartPassive": !readonly.value ? onSliderTouchstart : void 0
|
||
}, [createBaseVNode("input", {
|
||
"id": `${id.value}_start`,
|
||
"name": props.name || id.value,
|
||
"disabled": disabled.value,
|
||
"readonly": readonly.value,
|
||
"tabindex": "-1",
|
||
"value": model.value[0]
|
||
}, null), createBaseVNode("input", {
|
||
"id": `${id.value}_stop`,
|
||
"name": props.name || id.value,
|
||
"disabled": disabled.value,
|
||
"readonly": readonly.value,
|
||
"tabindex": "-1",
|
||
"value": model.value[1]
|
||
}, null), createVNode(VSliderTrack, {
|
||
"ref": trackContainerRef,
|
||
"start": trackStart.value,
|
||
"stop": trackStop.value
|
||
}, {
|
||
"tick-label": slots["tick-label"]
|
||
}), createVNode(VSliderThumb, mergeProps({
|
||
"ref": startThumbRef,
|
||
"aria-describedby": messagesId.value,
|
||
"focused": isFocused && activeThumbRef.value === startThumbRef.value?.$el,
|
||
"modelValue": model.value[0],
|
||
"onUpdate:modelValue": (v) => model.value = [v, model.value[1]],
|
||
"onFocus": (e) => {
|
||
focus();
|
||
activeThumbRef.value = startThumbRef.value?.$el;
|
||
if (max.value !== min.value && model.value[0] === model.value[1] && model.value[1] === min.value && e.relatedTarget !== stopThumbRef.value?.$el) {
|
||
startThumbRef.value?.$el.blur();
|
||
stopThumbRef.value?.$el.focus();
|
||
}
|
||
},
|
||
"onBlur": () => {
|
||
blur();
|
||
activeThumbRef.value = void 0;
|
||
},
|
||
"min": min.value,
|
||
"max": model.value[1],
|
||
"position": trackStart.value,
|
||
"ripple": props.ripple
|
||
}, inputAttrs), {
|
||
"thumb-label": slots["thumb-label"]
|
||
}), createVNode(VSliderThumb, mergeProps({
|
||
"ref": stopThumbRef,
|
||
"aria-describedby": messagesId.value,
|
||
"focused": isFocused && activeThumbRef.value === stopThumbRef.value?.$el,
|
||
"modelValue": model.value[1],
|
||
"onUpdate:modelValue": (v) => model.value = [model.value[0], v],
|
||
"onFocus": (e) => {
|
||
focus();
|
||
activeThumbRef.value = stopThumbRef.value?.$el;
|
||
if (max.value !== min.value && model.value[0] === model.value[1] && model.value[0] === max.value && e.relatedTarget !== startThumbRef.value?.$el) {
|
||
stopThumbRef.value?.$el.blur();
|
||
startThumbRef.value?.$el.focus();
|
||
}
|
||
},
|
||
"onBlur": () => {
|
||
blur();
|
||
activeThumbRef.value = void 0;
|
||
},
|
||
"min": model.value[0],
|
||
"max": max.value,
|
||
"position": trackStop.value,
|
||
"ripple": props.ripple
|
||
}, inputAttrs), {
|
||
"thumb-label": slots["thumb-label"]
|
||
})]);
|
||
}
|
||
});
|
||
});
|
||
return forwardRefs({
|
||
focus: () => startThumbRef.value?.$el.focus()
|
||
}, inputRef);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VRating/VRating.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VRating/VRating.css";
|
||
var makeVRatingProps = propsFactory({
|
||
name: String,
|
||
itemAriaLabel: {
|
||
type: String,
|
||
default: "$vuetify.rating.ariaLabel.item"
|
||
},
|
||
activeColor: String,
|
||
color: String,
|
||
clearable: Boolean,
|
||
disabled: Boolean,
|
||
emptyIcon: {
|
||
type: IconValue,
|
||
default: "$ratingEmpty"
|
||
},
|
||
fullIcon: {
|
||
type: IconValue,
|
||
default: "$ratingFull"
|
||
},
|
||
halfIncrements: Boolean,
|
||
hover: Boolean,
|
||
length: {
|
||
type: [Number, String],
|
||
default: 5
|
||
},
|
||
readonly: Boolean,
|
||
modelValue: {
|
||
type: [Number, String],
|
||
default: 0
|
||
},
|
||
itemLabels: Array,
|
||
itemLabelPosition: {
|
||
type: String,
|
||
default: "top",
|
||
validator: (v) => ["top", "bottom"].includes(v)
|
||
},
|
||
ripple: Boolean,
|
||
...makeComponentProps(),
|
||
...makeDensityProps(),
|
||
...makeSizeProps(),
|
||
...makeTagProps(),
|
||
...makeThemeProps()
|
||
}, "VRating");
|
||
var VRating = genericComponent()({
|
||
name: "VRating",
|
||
props: makeVRatingProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const root = ref();
|
||
const rating = useProxiedModel(props, "modelValue");
|
||
const normalizedValue = computed(() => clamp(parseFloat(rating.value), 0, Number(props.length)));
|
||
const range = computed(() => createRange(Number(props.length), 1));
|
||
const increments = computed(() => range.value.flatMap((v) => props.halfIncrements ? [v - 0.5, v] : [v]));
|
||
const hoverIndex = shallowRef(-1);
|
||
const itemState = computed(() => increments.value.map((value) => {
|
||
const isHovering = props.hover && hoverIndex.value > -1;
|
||
const isFilled = normalizedValue.value >= value;
|
||
const isHovered = hoverIndex.value >= value;
|
||
const isFullIcon = isHovering ? isHovered : isFilled;
|
||
const icon = isFullIcon ? props.fullIcon : props.emptyIcon;
|
||
const activeColor = props.activeColor ?? props.color;
|
||
const color = isFilled || isHovered ? activeColor : props.color;
|
||
return {
|
||
isFilled,
|
||
isHovered,
|
||
icon,
|
||
color
|
||
};
|
||
}));
|
||
const eventState = computed(() => [0, ...increments.value].map((value) => {
|
||
function onMouseenter() {
|
||
hoverIndex.value = value;
|
||
}
|
||
function onMouseleave() {
|
||
hoverIndex.value = -1;
|
||
}
|
||
function onClick() {
|
||
if (props.disabled || props.readonly) return;
|
||
rating.value = normalizedValue.value === value && props.clearable ? 0 : value;
|
||
}
|
||
return {
|
||
onMouseenter: props.hover ? onMouseenter : void 0,
|
||
onMouseleave: props.hover ? onMouseleave : void 0,
|
||
onClick
|
||
};
|
||
}));
|
||
const currentItemIndex = computed(() => {
|
||
return props.halfIncrements ? 1 + Math.floor(Math.max(0, Number(rating.value ?? 0) - 0.5)) * 2 : Math.floor(Math.max(0, Number(rating.value ?? 0) - 1));
|
||
});
|
||
function moveCurrentFocus() {
|
||
const currentItem = root.value?.querySelector('[tabindex="0"]');
|
||
currentItem?.focus();
|
||
}
|
||
function onItemKeydown(event) {
|
||
if (props.disabled || props.readonly) return;
|
||
if (event.ctrlKey || event.altKey) return;
|
||
const step = props.halfIncrements ? 0.5 : 1;
|
||
if (event.key === "ArrowRight") {
|
||
const newValue = Math.min(Number(props.length), Number(rating.value ?? 0) + step);
|
||
rating.value = newValue;
|
||
nextTick(() => moveCurrentFocus());
|
||
}
|
||
if (event.key === "ArrowLeft") {
|
||
const newValue = Math.max(0, Number(rating.value ?? 0) - step);
|
||
rating.value = newValue;
|
||
nextTick(() => moveCurrentFocus());
|
||
}
|
||
}
|
||
const uid = useId();
|
||
const name = computed(() => props.name ?? `v-rating-${uid}`);
|
||
function VRatingItem(_ref2) {
|
||
let {
|
||
value,
|
||
index,
|
||
showStar = true
|
||
} = _ref2;
|
||
const {
|
||
onMouseenter,
|
||
onMouseleave,
|
||
onClick
|
||
} = eventState.value[index + 1];
|
||
const id = `${name.value}-${String(value).replace(".", "-")}`;
|
||
const isFocusable = index === currentItemIndex.value;
|
||
const btnProps = {
|
||
color: itemState.value[index]?.color,
|
||
density: props.density,
|
||
disabled: props.disabled,
|
||
icon: itemState.value[index]?.icon,
|
||
ripple: props.ripple,
|
||
size: props.size,
|
||
variant: "plain",
|
||
tabindex: isFocusable ? 0 : -1,
|
||
onKeydown: onItemKeydown
|
||
};
|
||
return createBaseVNode(Fragment, null, [createBaseVNode("label", {
|
||
"for": id,
|
||
"class": normalizeClass({
|
||
"v-rating__item--half": props.halfIncrements && value % 1 > 0,
|
||
"v-rating__item--full": props.halfIncrements && value % 1 === 0
|
||
}),
|
||
"onMouseenter": onMouseenter,
|
||
"onMouseleave": onMouseleave,
|
||
"onClick": onClick
|
||
}, [createBaseVNode("span", {
|
||
"class": "v-rating__hidden"
|
||
}, [t(props.itemAriaLabel, value, props.length)]), !showStar ? void 0 : slots.item ? slots.item({
|
||
...itemState.value[index],
|
||
props: btnProps,
|
||
value,
|
||
index,
|
||
rating: normalizedValue.value
|
||
}) : createVNode(VBtn, mergeProps({
|
||
"aria-label": t(props.itemAriaLabel, value, props.length)
|
||
}, btnProps), null)]), createBaseVNode("input", {
|
||
"class": "v-rating__hidden",
|
||
"name": name.value,
|
||
"id": id,
|
||
"type": "radio",
|
||
"value": value,
|
||
"checked": normalizedValue.value === value,
|
||
"tabindex": -1,
|
||
"readonly": props.readonly,
|
||
"disabled": props.disabled
|
||
}, null)]);
|
||
}
|
||
function createLabel(labelProps) {
|
||
if (slots["item-label"]) return slots["item-label"](labelProps);
|
||
if (labelProps.label) return createBaseVNode("span", null, [labelProps.label]);
|
||
return createBaseVNode("span", null, [createTextVNode(" ")]);
|
||
}
|
||
useRender(() => {
|
||
const hasLabels = !!props.itemLabels?.length || slots["item-label"];
|
||
return createVNode(props.tag, {
|
||
"class": normalizeClass(["v-rating", {
|
||
"v-rating--hover": props.hover,
|
||
"v-rating--readonly": props.readonly
|
||
}, themeClasses.value, props.class]),
|
||
"style": normalizeStyle(props.style),
|
||
"ref": root
|
||
}, {
|
||
default: () => [createVNode(VRatingItem, {
|
||
"value": 0,
|
||
"index": -1,
|
||
"showStar": false
|
||
}, null), range.value.map((value, i) => createBaseVNode("div", {
|
||
"class": "v-rating__wrapper"
|
||
}, [hasLabels && props.itemLabelPosition === "top" ? createLabel({
|
||
value,
|
||
index: i,
|
||
label: props.itemLabels?.[i]
|
||
}) : void 0, createBaseVNode("div", {
|
||
"class": "v-rating__item"
|
||
}, [props.halfIncrements ? createBaseVNode(Fragment, null, [createVNode(VRatingItem, {
|
||
"value": value - 0.5,
|
||
"index": i * 2
|
||
}, null), createVNode(VRatingItem, {
|
||
"value": value,
|
||
"index": i * 2 + 1
|
||
}, null)]) : createVNode(VRatingItem, {
|
||
"value": value,
|
||
"index": i
|
||
}, null)]), hasLabels && props.itemLabelPosition === "bottom" ? createLabel({
|
||
value,
|
||
index: i,
|
||
label: props.itemLabels?.[i]
|
||
}) : void 0]))]
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VSkeletonLoader/VSkeletonLoader.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSkeletonLoader/VSkeletonLoader.css";
|
||
var rootTypes = {
|
||
actions: "button@2",
|
||
article: "heading, paragraph",
|
||
avatar: "avatar",
|
||
button: "button",
|
||
card: "image, heading",
|
||
"card-avatar": "image, list-item-avatar",
|
||
chip: "chip",
|
||
"date-picker": "list-item, heading, divider, date-picker-options, date-picker-days, actions",
|
||
"date-picker-options": "text, avatar@2",
|
||
"date-picker-days": "avatar@28",
|
||
divider: "divider",
|
||
heading: "heading",
|
||
image: "image",
|
||
"list-item": "text",
|
||
"list-item-avatar": "avatar, text",
|
||
"list-item-two-line": "sentences",
|
||
"list-item-avatar-two-line": "avatar, sentences",
|
||
"list-item-three-line": "paragraph",
|
||
"list-item-avatar-three-line": "avatar, paragraph",
|
||
ossein: "ossein",
|
||
paragraph: "text@3",
|
||
sentences: "text@2",
|
||
subtitle: "text",
|
||
table: "table-heading, table-thead, table-tbody, table-tfoot",
|
||
"table-heading": "chip, text",
|
||
"table-thead": "heading@6",
|
||
"table-tbody": "table-row-divider@6",
|
||
"table-row-divider": "table-row, divider",
|
||
"table-row": "text@6",
|
||
"table-tfoot": "text@2, avatar@2",
|
||
text: "text"
|
||
};
|
||
function genBone(type) {
|
||
let children = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
||
return createBaseVNode("div", {
|
||
"class": normalizeClass(["v-skeleton-loader__bone", `v-skeleton-loader__${type}`])
|
||
}, [children]);
|
||
}
|
||
function genBones(bone) {
|
||
const [type, length] = bone.split("@");
|
||
return Array.from({
|
||
length
|
||
}).map(() => genStructure(type));
|
||
}
|
||
function genStructure(type) {
|
||
let children = [];
|
||
if (!type) return children;
|
||
const bone = rootTypes[type];
|
||
if (type === bone) {
|
||
} else if (type.includes(",")) return mapBones(type);
|
||
else if (type.includes("@")) return genBones(type);
|
||
else if (bone.includes(",")) children = mapBones(bone);
|
||
else if (bone.includes("@")) children = genBones(bone);
|
||
else if (bone) children.push(genStructure(bone));
|
||
return [genBone(type, children)];
|
||
}
|
||
function mapBones(bones) {
|
||
return bones.replace(/\s/g, "").split(",").map(genStructure);
|
||
}
|
||
var makeVSkeletonLoaderProps = propsFactory({
|
||
boilerplate: Boolean,
|
||
color: String,
|
||
loading: Boolean,
|
||
loadingText: {
|
||
type: String,
|
||
default: "$vuetify.loading"
|
||
},
|
||
type: {
|
||
type: [String, Array],
|
||
default: "ossein"
|
||
},
|
||
...makeDimensionProps(),
|
||
...makeElevationProps(),
|
||
...makeThemeProps()
|
||
}, "VSkeletonLoader");
|
||
var VSkeletonLoader = genericComponent()({
|
||
name: "VSkeletonLoader",
|
||
inheritAttrs: false,
|
||
props: makeVSkeletonLoaderProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
attrs,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.color);
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
const {
|
||
elevationClasses
|
||
} = useElevation(props);
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const items = computed(() => genStructure(wrapInArray(props.type).join(",")));
|
||
useRender(() => {
|
||
const isLoading = !slots.default || props.loading;
|
||
const loadingProps = props.boilerplate || !isLoading ? {} : {
|
||
ariaLive: "polite",
|
||
ariaLabel: t(props.loadingText),
|
||
role: "alert"
|
||
};
|
||
return isLoading ? createBaseVNode("div", mergeProps({
|
||
"class": ["v-skeleton-loader", {
|
||
"v-skeleton-loader--boilerplate": props.boilerplate
|
||
}, themeClasses.value, backgroundColorClasses.value, elevationClasses.value],
|
||
"style": [backgroundColorStyles.value, dimensionStyles.value]
|
||
}, loadingProps, attrs), [items.value]) : createBaseVNode(Fragment, null, [slots.default?.()]);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VSlideGroup/VSlideGroupItem.js
|
||
var VSlideGroupItem = genericComponent()({
|
||
name: "VSlideGroupItem",
|
||
props: makeGroupItemProps(),
|
||
emits: {
|
||
"group:selected": (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const slideGroupItem = useGroupItem(props, VSlideGroupSymbol);
|
||
return () => slots.default?.({
|
||
isSelected: slideGroupItem.isSelected.value,
|
||
select: slideGroupItem.select,
|
||
toggle: slideGroupItem.toggle,
|
||
selectedClass: slideGroupItem.selectedClass.value
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VSnackbarQueue/VSnackbarQueue.js
|
||
var makeVSnackbarQueueProps = propsFactory({
|
||
// TODO: Port this to Snackbar on dev
|
||
closable: [Boolean, String],
|
||
closeText: {
|
||
type: String,
|
||
default: "$vuetify.dismiss"
|
||
},
|
||
modelValue: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
...omit(makeVSnackbarProps(), ["modelValue"])
|
||
}, "VSnackbarQueue");
|
||
var VSnackbarQueue = genericComponent()({
|
||
name: "VSnackbarQueue",
|
||
props: makeVSnackbarQueueProps(),
|
||
emits: {
|
||
"update:modelValue": (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const isActive = shallowRef(false);
|
||
const isVisible = shallowRef(false);
|
||
const current = shallowRef();
|
||
watch(() => props.modelValue.length, (val, oldVal) => {
|
||
if (!isVisible.value && val > oldVal) {
|
||
showNext();
|
||
}
|
||
});
|
||
watch(isActive, (val) => {
|
||
if (val) isVisible.value = true;
|
||
});
|
||
function onAfterLeave() {
|
||
if (props.modelValue.length) {
|
||
showNext();
|
||
} else {
|
||
current.value = void 0;
|
||
isVisible.value = false;
|
||
}
|
||
}
|
||
function showNext() {
|
||
const [next, ...rest] = props.modelValue;
|
||
emit("update:modelValue", rest);
|
||
current.value = typeof next === "string" ? {
|
||
text: next
|
||
} : next;
|
||
nextTick(() => {
|
||
isActive.value = true;
|
||
});
|
||
}
|
||
function onClickClose() {
|
||
isActive.value = false;
|
||
}
|
||
const btnProps = computed(() => ({
|
||
color: typeof props.closable === "string" ? props.closable : void 0,
|
||
text: t(props.closeText)
|
||
}));
|
||
useRender(() => {
|
||
const hasActions = !!(props.closable || slots.actions);
|
||
const {
|
||
modelValue: _,
|
||
...snackbarProps
|
||
} = VSnackbar.filterProps(props);
|
||
return createBaseVNode(Fragment, null, [isVisible.value && !!current.value && (slots.default ? createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VSnackbar: current.value
|
||
}
|
||
}, {
|
||
default: () => [slots.default({
|
||
item: current.value
|
||
})]
|
||
}) : createVNode(VSnackbar, mergeProps(snackbarProps, current.value, {
|
||
"modelValue": isActive.value,
|
||
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
||
"onAfterLeave": onAfterLeave
|
||
}), {
|
||
text: slots.text ? () => slots.text?.({
|
||
item: current.value
|
||
}) : void 0,
|
||
actions: hasActions ? () => createBaseVNode(Fragment, null, [!slots.actions ? createVNode(VBtn, mergeProps(btnProps.value, {
|
||
"onClick": onClickClose
|
||
}), null) : createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VBtn: btnProps.value
|
||
}
|
||
}, {
|
||
default: () => [slots.actions({
|
||
item: current.value,
|
||
props: {
|
||
onClick: onClickClose
|
||
}
|
||
})]
|
||
})]) : void 0
|
||
}))]);
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VSparkline/util/line.js
|
||
var makeLineProps = propsFactory({
|
||
autoDraw: Boolean,
|
||
autoDrawDuration: [Number, String],
|
||
autoDrawEasing: {
|
||
type: String,
|
||
default: "ease"
|
||
},
|
||
color: String,
|
||
gradient: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
gradientDirection: {
|
||
type: String,
|
||
validator: (val) => ["top", "bottom", "left", "right"].includes(val),
|
||
default: "top"
|
||
},
|
||
height: {
|
||
type: [String, Number],
|
||
default: 75
|
||
},
|
||
labels: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
labelSize: {
|
||
type: [Number, String],
|
||
default: 7
|
||
},
|
||
lineWidth: {
|
||
type: [String, Number],
|
||
default: 4
|
||
},
|
||
id: String,
|
||
itemValue: {
|
||
type: String,
|
||
default: "value"
|
||
},
|
||
modelValue: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
min: [String, Number],
|
||
max: [String, Number],
|
||
padding: {
|
||
type: [String, Number],
|
||
default: 8
|
||
},
|
||
showLabels: Boolean,
|
||
smooth: [Boolean, String, Number],
|
||
width: {
|
||
type: [Number, String],
|
||
default: 300
|
||
}
|
||
}, "Line");
|
||
|
||
// node_modules/vuetify/lib/components/VSparkline/VBarline.js
|
||
var makeVBarlineProps = propsFactory({
|
||
autoLineWidth: Boolean,
|
||
...makeLineProps()
|
||
}, "VBarline");
|
||
var VBarline = genericComponent()({
|
||
name: "VBarline",
|
||
props: makeVBarlineProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const uid = useId();
|
||
const id = computed(() => props.id || `barline-${uid}`);
|
||
const autoDrawDuration = computed(() => Number(props.autoDrawDuration) || 500);
|
||
const hasLabels = computed(() => {
|
||
return Boolean(props.showLabels || props.labels.length > 0 || !!slots?.label);
|
||
});
|
||
const lineWidth = computed(() => parseFloat(props.lineWidth) || 4);
|
||
const totalWidth = computed(() => Math.max(props.modelValue.length * lineWidth.value, Number(props.width)));
|
||
const boundary = computed(() => {
|
||
return {
|
||
minX: 0,
|
||
maxX: totalWidth.value,
|
||
minY: 0,
|
||
maxY: parseInt(props.height, 10)
|
||
};
|
||
});
|
||
const items = computed(() => props.modelValue.map((item) => getPropertyFromItem(item, props.itemValue, item)));
|
||
function genBars(values, boundary2) {
|
||
const {
|
||
minX,
|
||
maxX,
|
||
minY,
|
||
maxY
|
||
} = boundary2;
|
||
const totalValues = values.length;
|
||
let maxValue = props.max != null ? Number(props.max) : Math.max(...values);
|
||
let minValue = props.min != null ? Number(props.min) : Math.min(...values);
|
||
if (minValue > 0 && props.min == null) minValue = 0;
|
||
if (maxValue < 0 && props.max == null) maxValue = 0;
|
||
const gridX = maxX / (totalValues === 1 ? 2 : totalValues);
|
||
const gridY = (maxY - minY) / (maxValue - minValue || 1);
|
||
const horizonY = maxY - Math.abs(minValue * gridY);
|
||
return values.map((value, index) => {
|
||
const height = Math.abs(gridY * value);
|
||
return {
|
||
x: minX + index * gridX,
|
||
y: horizonY - height + Number(value < 0) * height,
|
||
height,
|
||
value
|
||
};
|
||
});
|
||
}
|
||
const parsedLabels = computed(() => {
|
||
const labels = [];
|
||
const points = genBars(items.value, boundary.value);
|
||
const len = points.length;
|
||
for (let i = 0; labels.length < len; i++) {
|
||
const item = points[i];
|
||
let value = props.labels[i];
|
||
if (!value) {
|
||
value = typeof item === "object" ? item.value : item;
|
||
}
|
||
labels.push({
|
||
x: item.x,
|
||
value: String(value)
|
||
});
|
||
}
|
||
return labels;
|
||
});
|
||
const bars = computed(() => genBars(items.value, boundary.value));
|
||
const offsetX = computed(() => bars.value.length === 1 ? (boundary.value.maxX - lineWidth.value) / 2 : (Math.abs(bars.value[0].x - bars.value[1].x) - lineWidth.value) / 2);
|
||
const smooth = computed(() => typeof props.smooth === "boolean" ? props.smooth ? 2 : 0 : Number(props.smooth));
|
||
useRender(() => {
|
||
const gradientData = !props.gradient.slice().length ? [""] : props.gradient.slice().reverse();
|
||
return createBaseVNode("svg", {
|
||
"display": "block"
|
||
}, [createBaseVNode("defs", null, [createBaseVNode("linearGradient", {
|
||
"id": id.value,
|
||
"gradientUnits": "userSpaceOnUse",
|
||
"x1": props.gradientDirection === "left" ? "100%" : "0",
|
||
"y1": props.gradientDirection === "top" ? "100%" : "0",
|
||
"x2": props.gradientDirection === "right" ? "100%" : "0",
|
||
"y2": props.gradientDirection === "bottom" ? "100%" : "0"
|
||
}, [gradientData.map((color, index) => createBaseVNode("stop", {
|
||
"offset": index / Math.max(gradientData.length - 1, 1),
|
||
"stop-color": color || "currentColor"
|
||
}, null))])]), createBaseVNode("clipPath", {
|
||
"id": `${id.value}-clip`
|
||
}, [bars.value.map((item) => createBaseVNode("rect", {
|
||
"x": item.x + offsetX.value,
|
||
"y": item.y,
|
||
"width": lineWidth.value,
|
||
"height": item.height,
|
||
"rx": smooth.value,
|
||
"ry": smooth.value
|
||
}, [props.autoDraw && !PREFERS_REDUCED_MOTION() && createBaseVNode(Fragment, null, [createBaseVNode("animate", {
|
||
"attributeName": "y",
|
||
"from": item.y + item.height,
|
||
"to": item.y,
|
||
"dur": `${autoDrawDuration.value}ms`,
|
||
"fill": "freeze"
|
||
}, null), createBaseVNode("animate", {
|
||
"attributeName": "height",
|
||
"from": "0",
|
||
"to": item.height,
|
||
"dur": `${autoDrawDuration.value}ms`,
|
||
"fill": "freeze"
|
||
}, null)])]))]), hasLabels.value && createBaseVNode("g", {
|
||
"key": "labels",
|
||
"style": {
|
||
textAnchor: "middle",
|
||
dominantBaseline: "mathematical",
|
||
fill: "currentColor"
|
||
}
|
||
}, [parsedLabels.value.map((item, i) => createBaseVNode("text", {
|
||
"x": item.x + offsetX.value + lineWidth.value / 2,
|
||
"y": parseInt(props.height, 10) - 2 + (parseInt(props.labelSize, 10) || 7 * 0.75),
|
||
"font-size": Number(props.labelSize) || 7
|
||
}, [slots.label?.({
|
||
index: i,
|
||
value: item.value
|
||
}) ?? item.value]))]), createBaseVNode("g", {
|
||
"clip-path": `url(#${id.value}-clip)`,
|
||
"fill": `url(#${id.value})`
|
||
}, [createBaseVNode("rect", {
|
||
"x": 0,
|
||
"y": 0,
|
||
"width": Math.max(props.modelValue.length * lineWidth.value, Number(props.width)),
|
||
"height": props.height
|
||
}, null)])]);
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VSparkline/util/path.js
|
||
function genPath(points, radius) {
|
||
let fill = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
||
let height = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 75;
|
||
if (points.length === 0) return "";
|
||
const start = points.shift();
|
||
const end = points[points.length - 1];
|
||
return (fill ? `M${start.x} ${height - start.x + 2} L${start.x} ${start.y}` : `M${start.x} ${start.y}`) + points.map((point, index) => {
|
||
const next = points[index + 1];
|
||
const prev = points[index - 1] || start;
|
||
const isCollinear = next && checkCollinear(next, point, prev);
|
||
if (!next || isCollinear) {
|
||
return `L${point.x} ${point.y}`;
|
||
}
|
||
const threshold = Math.min(getDistance(prev, point), getDistance(next, point));
|
||
const isTooCloseForRadius = threshold / 2 < radius;
|
||
const radiusForPoint = isTooCloseForRadius ? threshold / 2 : radius;
|
||
const before = moveTo(prev, point, radiusForPoint);
|
||
const after = moveTo(next, point, radiusForPoint);
|
||
return `L${before.x} ${before.y}S${point.x} ${point.y} ${after.x} ${after.y}`;
|
||
}).join("") + (fill ? `L${end.x} ${height - start.x + 2} Z` : "");
|
||
}
|
||
function int(value) {
|
||
return parseInt(value, 10);
|
||
}
|
||
function checkCollinear(p0, p1, p2) {
|
||
return int(p0.x + p2.x) === int(2 * p1.x) && int(p0.y + p2.y) === int(2 * p1.y);
|
||
}
|
||
function getDistance(p1, p2) {
|
||
return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
|
||
}
|
||
function moveTo(to, from, radius) {
|
||
const vector = {
|
||
x: to.x - from.x,
|
||
y: to.y - from.y
|
||
};
|
||
const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
|
||
const unitVector = {
|
||
x: vector.x / length,
|
||
y: vector.y / length
|
||
};
|
||
return {
|
||
x: from.x + unitVector.x * radius,
|
||
y: from.y + unitVector.y * radius
|
||
};
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VSparkline/VTrendline.js
|
||
var makeVTrendlineProps = propsFactory({
|
||
fill: Boolean,
|
||
...makeLineProps()
|
||
}, "VTrendline");
|
||
var VTrendline = genericComponent()({
|
||
name: "VTrendline",
|
||
props: makeVTrendlineProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const uid = useId();
|
||
const id = computed(() => props.id || `trendline-${uid}`);
|
||
const autoDrawDuration = computed(() => Number(props.autoDrawDuration) || (props.fill ? 500 : 2e3));
|
||
const lastLength = ref(0);
|
||
const path = ref(null);
|
||
function genPoints(values, boundary2) {
|
||
const {
|
||
minX,
|
||
maxX,
|
||
minY,
|
||
maxY
|
||
} = boundary2;
|
||
if (values.length === 1) {
|
||
values = [values[0], values[0]];
|
||
}
|
||
const totalValues = values.length;
|
||
const maxValue = props.max != null ? Number(props.max) : Math.max(...values);
|
||
const minValue = props.min != null ? Number(props.min) : Math.min(...values);
|
||
const gridX = (maxX - minX) / (totalValues - 1);
|
||
const gridY = (maxY - minY) / (maxValue - minValue || 1);
|
||
return values.map((value, index) => {
|
||
return {
|
||
x: minX + index * gridX,
|
||
y: maxY - (value - minValue) * gridY,
|
||
value
|
||
};
|
||
});
|
||
}
|
||
const hasLabels = computed(() => {
|
||
return Boolean(props.showLabels || props.labels.length > 0 || !!slots?.label);
|
||
});
|
||
const lineWidth = computed(() => {
|
||
return parseFloat(props.lineWidth) || 4;
|
||
});
|
||
const totalWidth = computed(() => Number(props.width));
|
||
const boundary = computed(() => {
|
||
const padding = Number(props.padding);
|
||
return {
|
||
minX: padding,
|
||
maxX: totalWidth.value - padding,
|
||
minY: padding,
|
||
maxY: parseInt(props.height, 10) - padding
|
||
};
|
||
});
|
||
const items = computed(() => props.modelValue.map((item) => getPropertyFromItem(item, props.itemValue, item)));
|
||
const parsedLabels = computed(() => {
|
||
const labels = [];
|
||
const points = genPoints(items.value, boundary.value);
|
||
const len = points.length;
|
||
for (let i = 0; labels.length < len; i++) {
|
||
const item = points[i];
|
||
let value = props.labels[i];
|
||
if (!value) {
|
||
value = typeof item === "object" ? item.value : item;
|
||
}
|
||
labels.push({
|
||
x: item.x,
|
||
value: String(value)
|
||
});
|
||
}
|
||
return labels;
|
||
});
|
||
watch(() => props.modelValue, async () => {
|
||
await nextTick();
|
||
if (!props.autoDraw || !path.value || PREFERS_REDUCED_MOTION()) return;
|
||
const pathRef = path.value;
|
||
const length = pathRef.getTotalLength();
|
||
if (!props.fill) {
|
||
pathRef.style.strokeDasharray = `${length}`;
|
||
pathRef.style.strokeDashoffset = `${length}`;
|
||
pathRef.getBoundingClientRect();
|
||
pathRef.style.transition = `stroke-dashoffset ${autoDrawDuration.value}ms ${props.autoDrawEasing}`;
|
||
pathRef.style.strokeDashoffset = "0";
|
||
} else {
|
||
pathRef.style.transformOrigin = "bottom center";
|
||
pathRef.style.transition = "none";
|
||
pathRef.style.transform = `scaleY(0)`;
|
||
pathRef.getBoundingClientRect();
|
||
pathRef.style.transition = `transform ${autoDrawDuration.value}ms ${props.autoDrawEasing}`;
|
||
pathRef.style.transform = `scaleY(1)`;
|
||
}
|
||
lastLength.value = length;
|
||
}, {
|
||
immediate: true
|
||
});
|
||
function genPath2(fill) {
|
||
const smoothValue = typeof props.smooth === "boolean" ? props.smooth ? 8 : 0 : Number(props.smooth);
|
||
return genPath(genPoints(items.value, boundary.value), smoothValue, fill, parseInt(props.height, 10));
|
||
}
|
||
useRender(() => {
|
||
const gradientData = !props.gradient.slice().length ? [""] : props.gradient.slice().reverse();
|
||
return createBaseVNode("svg", {
|
||
"display": "block",
|
||
"stroke-width": parseFloat(props.lineWidth) ?? 4
|
||
}, [createBaseVNode("defs", null, [createBaseVNode("linearGradient", {
|
||
"id": id.value,
|
||
"gradientUnits": "userSpaceOnUse",
|
||
"x1": props.gradientDirection === "left" ? "100%" : "0",
|
||
"y1": props.gradientDirection === "top" ? "100%" : "0",
|
||
"x2": props.gradientDirection === "right" ? "100%" : "0",
|
||
"y2": props.gradientDirection === "bottom" ? "100%" : "0"
|
||
}, [gradientData.map((color, index) => createBaseVNode("stop", {
|
||
"offset": index / Math.max(gradientData.length - 1, 1),
|
||
"stop-color": color || "currentColor"
|
||
}, null))])]), hasLabels.value && createBaseVNode("g", {
|
||
"key": "labels",
|
||
"style": {
|
||
textAnchor: "middle",
|
||
dominantBaseline: "mathematical",
|
||
fill: "currentColor"
|
||
}
|
||
}, [parsedLabels.value.map((item, i) => createBaseVNode("text", {
|
||
"x": item.x + lineWidth.value / 2 + lineWidth.value / 2,
|
||
"y": parseInt(props.height, 10) - 4 + (parseInt(props.labelSize, 10) || 7 * 0.75),
|
||
"font-size": Number(props.labelSize) || 7
|
||
}, [slots.label?.({
|
||
index: i,
|
||
value: item.value
|
||
}) ?? item.value]))]), createBaseVNode("path", {
|
||
"ref": path,
|
||
"d": genPath2(props.fill),
|
||
"fill": props.fill ? `url(#${id.value})` : "none",
|
||
"stroke": props.fill ? "none" : `url(#${id.value})`
|
||
}, null), props.fill && createBaseVNode("path", {
|
||
"d": genPath2(false),
|
||
"fill": "none",
|
||
"stroke": props.color ?? props.gradient?.[0]
|
||
}, null)]);
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VSparkline/VSparkline.js
|
||
var makeVSparklineProps = propsFactory({
|
||
type: {
|
||
type: String,
|
||
default: "trend"
|
||
},
|
||
...makeVBarlineProps(),
|
||
...makeVTrendlineProps()
|
||
}, "VSparkline");
|
||
var VSparkline = genericComponent()({
|
||
name: "VSparkline",
|
||
props: makeVSparklineProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
textColorClasses,
|
||
textColorStyles
|
||
} = useTextColor(() => props.color);
|
||
const hasLabels = computed(() => {
|
||
return Boolean(props.showLabels || props.labels.length > 0 || !!slots?.label);
|
||
});
|
||
const totalHeight = computed(() => {
|
||
let height = parseInt(props.height, 10);
|
||
if (hasLabels.value) height += parseInt(props.labelSize, 10) * 1.5;
|
||
return height;
|
||
});
|
||
useRender(() => {
|
||
const Tag = props.type === "trend" ? VTrendline : VBarline;
|
||
const lineProps = props.type === "trend" ? VTrendline.filterProps(props) : VBarline.filterProps(props);
|
||
return createVNode(Tag, mergeProps({
|
||
"key": props.type,
|
||
"class": textColorClasses.value,
|
||
"style": textColorStyles.value,
|
||
"viewBox": `0 0 ${props.width} ${parseInt(totalHeight.value, 10)}`
|
||
}, lineProps), slots);
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VSpeedDial/VSpeedDial.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSpeedDial/VSpeedDial.css";
|
||
var makeVSpeedDialProps = propsFactory({
|
||
...makeComponentProps(),
|
||
...makeVMenuProps({
|
||
offset: 8,
|
||
minWidth: 0,
|
||
openDelay: 0,
|
||
closeDelay: 100,
|
||
location: "top center",
|
||
transition: "scale-transition"
|
||
})
|
||
}, "VSpeedDial");
|
||
var VSpeedDial = genericComponent()({
|
||
name: "VSpeedDial",
|
||
props: makeVSpeedDialProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const model = useProxiedModel(props, "modelValue");
|
||
const menuRef = ref();
|
||
const location = computed(() => {
|
||
const [y, x = "center"] = props.location?.split(" ") ?? [];
|
||
return `${y} ${x}`;
|
||
});
|
||
const locationClasses = computed(() => ({
|
||
[`v-speed-dial__content--${location.value.replace(" ", "-")}`]: true
|
||
}));
|
||
useRender(() => {
|
||
const menuProps = VMenu.filterProps(props);
|
||
return createVNode(VMenu, mergeProps(menuProps, {
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||
"class": props.class,
|
||
"style": props.style,
|
||
"contentClass": ["v-speed-dial__content", locationClasses.value, props.contentClass],
|
||
"location": location.value,
|
||
"ref": menuRef,
|
||
"transition": "fade-transition"
|
||
}), {
|
||
...slots,
|
||
default: (slotProps) => createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VBtn: {
|
||
size: "small"
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [createVNode(MaybeTransition, {
|
||
"appear": true,
|
||
"group": true,
|
||
"transition": props.transition
|
||
}, {
|
||
default: () => [slots.default?.(slotProps)]
|
||
})]
|
||
})
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VStepper/VStepper.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VStepper/VStepper.css";
|
||
|
||
// node_modules/vuetify/lib/components/VStepper/shared.js
|
||
var VStepperSymbol = /* @__PURE__ */ Symbol.for("vuetify:v-stepper");
|
||
|
||
// node_modules/vuetify/lib/components/VStepper/VStepperActions.js
|
||
var makeVStepperActionsProps = propsFactory({
|
||
color: String,
|
||
disabled: {
|
||
type: [Boolean, String],
|
||
default: false
|
||
},
|
||
prevText: {
|
||
type: String,
|
||
default: "$vuetify.stepper.prev"
|
||
},
|
||
nextText: {
|
||
type: String,
|
||
default: "$vuetify.stepper.next"
|
||
}
|
||
}, "VStepperActions");
|
||
var VStepperActions = genericComponent()({
|
||
name: "VStepperActions",
|
||
props: makeVStepperActionsProps(),
|
||
emits: {
|
||
"click:prev": () => true,
|
||
"click:next": () => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
function onClickPrev() {
|
||
emit("click:prev");
|
||
}
|
||
function onClickNext() {
|
||
emit("click:next");
|
||
}
|
||
useRender(() => {
|
||
const prevSlotProps = {
|
||
onClick: onClickPrev
|
||
};
|
||
const nextSlotProps = {
|
||
onClick: onClickNext
|
||
};
|
||
return createBaseVNode("div", {
|
||
"class": "v-stepper-actions"
|
||
}, [createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VBtn: {
|
||
disabled: ["prev", true].includes(props.disabled),
|
||
text: t(props.prevText),
|
||
variant: "text"
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.prev?.({
|
||
props: prevSlotProps
|
||
}) ?? createVNode(VBtn, prevSlotProps, null)]
|
||
}), createVNode(VDefaultsProvider, {
|
||
"defaults": {
|
||
VBtn: {
|
||
color: props.color,
|
||
disabled: ["next", true].includes(props.disabled),
|
||
text: t(props.nextText),
|
||
variant: "tonal"
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.next?.({
|
||
props: nextSlotProps
|
||
}) ?? createVNode(VBtn, nextSlotProps, null)]
|
||
})]);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VStepper/VStepperHeader.js
|
||
var VStepperHeader = createSimpleFunctional("v-stepper-header");
|
||
|
||
// node_modules/vuetify/lib/components/VStepper/VStepperItem.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VStepper/VStepperItem.css";
|
||
var makeStepperItemProps = propsFactory({
|
||
color: String,
|
||
title: String,
|
||
subtitle: String,
|
||
complete: Boolean,
|
||
completeIcon: {
|
||
type: IconValue,
|
||
default: "$complete"
|
||
},
|
||
editable: Boolean,
|
||
editIcon: {
|
||
type: IconValue,
|
||
default: "$edit"
|
||
},
|
||
error: Boolean,
|
||
errorIcon: {
|
||
type: IconValue,
|
||
default: "$error"
|
||
},
|
||
icon: IconValue,
|
||
ripple: {
|
||
type: [Boolean, Object],
|
||
default: true
|
||
},
|
||
rules: {
|
||
type: Array,
|
||
default: () => []
|
||
}
|
||
}, "StepperItem");
|
||
var makeVStepperItemProps = propsFactory({
|
||
...makeStepperItemProps(),
|
||
...makeGroupItemProps()
|
||
}, "VStepperItem");
|
||
var VStepperItem = genericComponent()({
|
||
name: "VStepperItem",
|
||
directives: {
|
||
vRipple: ripple_default
|
||
},
|
||
props: makeVStepperItemProps(),
|
||
emits: {
|
||
"group:selected": (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const group = useGroupItem(props, VStepperSymbol, true);
|
||
const step = computed(() => group?.value.value ?? props.value);
|
||
const isValid = computed(() => props.rules.every((handler) => handler() === true));
|
||
const isClickable = computed(() => !props.disabled && props.editable);
|
||
const canEdit = computed(() => !props.disabled && props.editable);
|
||
const hasError = computed(() => props.error || !isValid.value);
|
||
const hasCompleted = computed(() => props.complete || props.rules.length > 0 && isValid.value);
|
||
const icon = computed(() => {
|
||
if (hasError.value) return props.errorIcon;
|
||
if (hasCompleted.value) return props.completeIcon;
|
||
if (group.isSelected.value && props.editable) return props.editIcon;
|
||
return props.icon;
|
||
});
|
||
const slotProps = computed(() => ({
|
||
canEdit: canEdit.value,
|
||
hasError: hasError.value,
|
||
hasCompleted: hasCompleted.value,
|
||
title: props.title,
|
||
subtitle: props.subtitle,
|
||
step: step.value,
|
||
value: props.value
|
||
}));
|
||
useRender(() => {
|
||
const hasColor = (!group || group.isSelected.value || hasCompleted.value || canEdit.value) && !hasError.value && !props.disabled;
|
||
const hasTitle = !!(props.title != null || slots.title);
|
||
const hasSubtitle = !!(props.subtitle != null || slots.subtitle);
|
||
function onClick() {
|
||
group?.toggle();
|
||
}
|
||
return withDirectives(createBaseVNode("button", {
|
||
"class": normalizeClass(["v-stepper-item", {
|
||
"v-stepper-item--complete": hasCompleted.value,
|
||
"v-stepper-item--disabled": props.disabled,
|
||
"v-stepper-item--error": hasError.value
|
||
}, group?.selectedClass.value]),
|
||
"disabled": !props.editable,
|
||
"type": "button",
|
||
"onClick": onClick
|
||
}, [isClickable.value && genOverlays(true, "v-stepper-item"), createVNode(VAvatar, {
|
||
"key": "stepper-avatar",
|
||
"class": "v-stepper-item__avatar",
|
||
"color": hasColor ? props.color : void 0,
|
||
"size": 24
|
||
}, {
|
||
default: () => [slots.icon?.(slotProps.value) ?? (icon.value ? createVNode(VIcon, {
|
||
"icon": icon.value
|
||
}, null) : step.value)]
|
||
}), createBaseVNode("div", {
|
||
"class": "v-stepper-item__content"
|
||
}, [hasTitle && createBaseVNode("div", {
|
||
"key": "title",
|
||
"class": "v-stepper-item__title"
|
||
}, [slots.title?.(slotProps.value) ?? props.title]), hasSubtitle && createBaseVNode("div", {
|
||
"key": "subtitle",
|
||
"class": "v-stepper-item__subtitle"
|
||
}, [slots.subtitle?.(slotProps.value) ?? props.subtitle]), slots.default?.(slotProps.value)])]), [[ripple_default, props.editable && props.ripple, null]]);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VStepper/VStepperWindow.js
|
||
var makeVStepperWindowProps = propsFactory({
|
||
...omit(makeVWindowProps(), ["continuous", "nextIcon", "prevIcon", "showArrows", "touch", "mandatory"])
|
||
}, "VStepperWindow");
|
||
var VStepperWindow = genericComponent()({
|
||
name: "VStepperWindow",
|
||
props: makeVStepperWindowProps(),
|
||
emits: {
|
||
"update:modelValue": (v) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const group = inject(VStepperSymbol, null);
|
||
const _model = useProxiedModel(props, "modelValue");
|
||
const model = computed({
|
||
get() {
|
||
if (_model.value != null || !group) return _model.value;
|
||
return group.items.value.find((item) => group.selected.value.includes(item.id))?.value;
|
||
},
|
||
set(val) {
|
||
_model.value = val;
|
||
}
|
||
});
|
||
useRender(() => {
|
||
const windowProps = VWindow.filterProps(props);
|
||
return createVNode(VWindow, mergeProps({
|
||
"_as": "VStepperWindow"
|
||
}, windowProps, {
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||
"class": ["v-stepper-window", props.class],
|
||
"style": props.style,
|
||
"mandatory": false,
|
||
"touch": false
|
||
}), slots);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VStepper/VStepperWindowItem.js
|
||
var makeVStepperWindowItemProps = propsFactory({
|
||
...makeVWindowItemProps()
|
||
}, "VStepperWindowItem");
|
||
var VStepperWindowItem = genericComponent()({
|
||
name: "VStepperWindowItem",
|
||
props: makeVStepperWindowItemProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
useRender(() => {
|
||
const windowItemProps = VWindowItem.filterProps(props);
|
||
return createVNode(VWindowItem, mergeProps({
|
||
"_as": "VStepperWindowItem"
|
||
}, windowItemProps, {
|
||
"class": ["v-stepper-window-item", props.class],
|
||
"style": props.style
|
||
}), slots);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VStepper/VStepper.js
|
||
var makeStepperProps = propsFactory({
|
||
altLabels: Boolean,
|
||
bgColor: String,
|
||
completeIcon: IconValue,
|
||
editIcon: IconValue,
|
||
editable: Boolean,
|
||
errorIcon: IconValue,
|
||
hideActions: Boolean,
|
||
items: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
itemTitle: {
|
||
type: [String, Array, Function],
|
||
default: "title"
|
||
},
|
||
itemValue: {
|
||
type: [String, Array, Function],
|
||
default: "value"
|
||
},
|
||
itemProps: {
|
||
type: [Boolean, String, Array, Function],
|
||
default: "props"
|
||
},
|
||
nonLinear: Boolean,
|
||
flat: Boolean,
|
||
...makeDisplayProps()
|
||
}, "Stepper");
|
||
var makeVStepperProps = propsFactory({
|
||
...makeStepperProps(),
|
||
...makeGroupProps({
|
||
mandatory: "force",
|
||
selectedClass: "v-stepper-item--selected"
|
||
}),
|
||
...makeVSheetProps(),
|
||
...pick(makeVStepperActionsProps(), ["prevText", "nextText"])
|
||
}, "VStepper");
|
||
var VStepper = genericComponent()({
|
||
name: "VStepper",
|
||
props: makeVStepperProps(),
|
||
emits: {
|
||
"update:modelValue": (v) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
items: _items,
|
||
next,
|
||
prev,
|
||
selected
|
||
} = useGroup(props, VStepperSymbol);
|
||
const {
|
||
displayClasses,
|
||
mobile
|
||
} = useDisplay(props);
|
||
const {
|
||
completeIcon,
|
||
editIcon,
|
||
errorIcon,
|
||
color,
|
||
editable,
|
||
prevText,
|
||
nextText
|
||
} = toRefs(props);
|
||
const items = computed(() => props.items.map((item, index) => {
|
||
const title = getPropertyFromItem(item, props.itemTitle, item);
|
||
const value = getPropertyFromItem(item, props.itemValue, index + 1);
|
||
const itemProps = props.itemProps === true ? item : getPropertyFromItem(item, props.itemProps);
|
||
const _props = {
|
||
title,
|
||
value,
|
||
...itemProps
|
||
};
|
||
return {
|
||
title: _props.title,
|
||
value: _props.value,
|
||
props: _props,
|
||
raw: item
|
||
};
|
||
}));
|
||
const activeIndex = computed(() => {
|
||
return _items.value.findIndex((item) => selected.value.includes(item.id));
|
||
});
|
||
const disabled = computed(() => {
|
||
if (props.disabled) return props.disabled;
|
||
if (activeIndex.value === 0) return "prev";
|
||
if (activeIndex.value === _items.value.length - 1) return "next";
|
||
return false;
|
||
});
|
||
provideDefaults({
|
||
VStepperItem: {
|
||
editable,
|
||
errorIcon,
|
||
completeIcon,
|
||
editIcon,
|
||
prevText,
|
||
nextText
|
||
},
|
||
VStepperActions: {
|
||
color,
|
||
disabled,
|
||
prevText,
|
||
nextText
|
||
}
|
||
});
|
||
useRender(() => {
|
||
const sheetProps = VSheet.filterProps(props);
|
||
const hasHeader = !!(slots.header || props.items.length);
|
||
const hasWindow = props.items.length > 0;
|
||
const hasActions = !props.hideActions && !!(hasWindow || slots.actions);
|
||
return createVNode(VSheet, mergeProps(sheetProps, {
|
||
"color": props.bgColor,
|
||
"class": ["v-stepper", {
|
||
"v-stepper--alt-labels": props.altLabels,
|
||
"v-stepper--flat": props.flat,
|
||
"v-stepper--non-linear": props.nonLinear,
|
||
"v-stepper--mobile": mobile.value
|
||
}, displayClasses.value, props.class],
|
||
"style": props.style
|
||
}), {
|
||
default: () => [hasHeader && createVNode(VStepperHeader, {
|
||
"key": "stepper-header"
|
||
}, {
|
||
default: () => [items.value.map((_ref2, index) => {
|
||
let {
|
||
raw,
|
||
...item
|
||
} = _ref2;
|
||
return createBaseVNode(Fragment, null, [!!index && createVNode(VDivider, null, null), createVNode(VStepperItem, item.props, {
|
||
default: slots[`header-item.${item.value}`] ?? slots.header,
|
||
icon: slots.icon,
|
||
title: slots.title,
|
||
subtitle: slots.subtitle
|
||
})]);
|
||
})]
|
||
}), hasWindow && createVNode(VStepperWindow, {
|
||
"key": "stepper-window"
|
||
}, {
|
||
default: () => [items.value.map((item) => createVNode(VStepperWindowItem, {
|
||
"value": item.value
|
||
}, {
|
||
default: () => slots[`item.${item.value}`]?.(item) ?? slots.item?.(item)
|
||
}))]
|
||
}), slots.default?.({
|
||
prev,
|
||
next
|
||
}), hasActions && (slots.actions?.({
|
||
next,
|
||
prev
|
||
}) ?? createVNode(VStepperActions, {
|
||
"key": "stepper-actions",
|
||
"onClick:prev": prev,
|
||
"onClick:next": next
|
||
}, slots))]
|
||
});
|
||
});
|
||
return {
|
||
prev,
|
||
next
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VSystemBar/VSystemBar.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSystemBar/VSystemBar.css";
|
||
var makeVSystemBarProps = propsFactory({
|
||
color: String,
|
||
height: [Number, String],
|
||
window: Boolean,
|
||
...makeComponentProps(),
|
||
...makeElevationProps(),
|
||
...makeLayoutItemProps(),
|
||
...makeRoundedProps(),
|
||
...makeTagProps(),
|
||
...makeThemeProps()
|
||
}, "VSystemBar");
|
||
var VSystemBar = genericComponent()({
|
||
name: "VSystemBar",
|
||
props: makeVSystemBarProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.color);
|
||
const {
|
||
elevationClasses
|
||
} = useElevation(props);
|
||
const {
|
||
roundedClasses
|
||
} = useRounded(props);
|
||
const {
|
||
ssrBootStyles
|
||
} = useSsrBoot();
|
||
const height = computed(() => props.height ?? (props.window ? 32 : 24));
|
||
const {
|
||
layoutItemStyles
|
||
} = useLayoutItem({
|
||
id: props.name,
|
||
order: computed(() => parseInt(props.order, 10)),
|
||
position: shallowRef("top"),
|
||
layoutSize: height,
|
||
elementSize: height,
|
||
active: computed(() => true),
|
||
absolute: toRef(() => props.absolute)
|
||
});
|
||
useRender(() => createVNode(props.tag, {
|
||
"class": normalizeClass(["v-system-bar", {
|
||
"v-system-bar--window": props.window
|
||
}, themeClasses.value, backgroundColorClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
||
"style": normalizeStyle([backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, props.style])
|
||
}, slots));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTabs/VTab.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTabs/VTab.css";
|
||
|
||
// node_modules/vuetify/lib/components/VTabs/shared.js
|
||
var VTabsSymbol = /* @__PURE__ */ Symbol.for("vuetify:v-tabs");
|
||
|
||
// node_modules/vuetify/lib/components/VTabs/VTab.js
|
||
var makeVTabProps = propsFactory({
|
||
fixed: Boolean,
|
||
sliderColor: String,
|
||
sliderTransition: String,
|
||
sliderTransitionDuration: [String, Number],
|
||
hideSlider: Boolean,
|
||
inset: Boolean,
|
||
direction: {
|
||
type: String,
|
||
default: "horizontal"
|
||
},
|
||
...omit(makeVBtnProps({
|
||
selectedClass: "v-tab--selected",
|
||
variant: "text"
|
||
}), ["active", "block", "flat", "location", "position", "symbol"])
|
||
}, "VTab");
|
||
var VTab = genericComponent()({
|
||
name: "VTab",
|
||
props: makeVTabProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
attrs
|
||
} = _ref;
|
||
const {
|
||
textColorClasses: sliderColorClasses,
|
||
textColorStyles: sliderColorStyles
|
||
} = useTextColor(() => props.sliderColor);
|
||
const {
|
||
backgroundColorClasses: insetColorClasses,
|
||
backgroundColorStyles: insetColorStyles
|
||
} = useBackgroundColor(() => props.sliderColor);
|
||
const rootEl = ref();
|
||
const sliderEl = ref();
|
||
const isHorizontal = computed(() => props.direction === "horizontal");
|
||
const isSelected = computed(() => rootEl.value?.group?.isSelected.value ?? false);
|
||
function fade(nextEl, prevEl) {
|
||
return {
|
||
opacity: [0, 1]
|
||
};
|
||
}
|
||
function grow(nextEl, prevEl) {
|
||
return props.direction === "vertical" ? {
|
||
transform: ["scaleY(0)", "scaleY(1)"]
|
||
} : {
|
||
transform: ["scaleX(0)", "scaleX(1)"]
|
||
};
|
||
}
|
||
function shift(nextEl, prevEl) {
|
||
const prevBox = prevEl.getBoundingClientRect();
|
||
const nextBox = nextEl.getBoundingClientRect();
|
||
const xy = isHorizontal.value ? "x" : "y";
|
||
const XY = isHorizontal.value ? "X" : "Y";
|
||
const rightBottom = isHorizontal.value ? "right" : "bottom";
|
||
const widthHeight = isHorizontal.value ? "width" : "height";
|
||
const prevPos = prevBox[xy];
|
||
const nextPos = nextBox[xy];
|
||
const delta = prevPos > nextPos ? prevBox[rightBottom] - nextBox[rightBottom] : prevBox[xy] - nextBox[xy];
|
||
const origin = Math.sign(delta) > 0 ? isHorizontal.value ? "right" : "bottom" : Math.sign(delta) < 0 ? isHorizontal.value ? "left" : "top" : "center";
|
||
const size = Math.abs(delta) + (Math.sign(delta) < 0 ? prevBox[widthHeight] : nextBox[widthHeight]);
|
||
const scale = size / Math.max(prevBox[widthHeight], nextBox[widthHeight]) || 0;
|
||
const initialScale = prevBox[widthHeight] / nextBox[widthHeight] || 0;
|
||
const sigma = 1.5;
|
||
return {
|
||
transform: [`translate${XY}(${delta}px) scale${XY}(${initialScale})`, `translate${XY}(${delta / sigma}px) scale${XY}(${(scale - 1) / sigma + 1})`, "none"],
|
||
transformOrigin: Array(3).fill(origin)
|
||
};
|
||
}
|
||
function updateSlider(_ref2) {
|
||
let {
|
||
value
|
||
} = _ref2;
|
||
if (value) {
|
||
const prevEl = rootEl.value?.$el.parentElement?.querySelector(".v-tab--selected .v-tab__slider");
|
||
const nextEl = sliderEl.value;
|
||
if (!prevEl || !nextEl) return;
|
||
const color = getComputedStyle(prevEl).color;
|
||
const keyframes = {
|
||
fade,
|
||
grow,
|
||
shift
|
||
}[props.sliderTransition ?? "shift"] ?? shift;
|
||
const duration = Number(props.sliderTransitionDuration) || ({
|
||
fade: 400,
|
||
grow: 350,
|
||
shift: 225
|
||
}[props.sliderTransition ?? "shift"] ?? 225);
|
||
animate(nextEl, {
|
||
backgroundColor: [color, "currentcolor"],
|
||
...keyframes(nextEl, prevEl)
|
||
}, {
|
||
duration,
|
||
easing: standardEasing
|
||
});
|
||
}
|
||
}
|
||
useRender(() => {
|
||
const btnProps = VBtn.filterProps(props);
|
||
return createVNode(VBtn, mergeProps({
|
||
"symbol": VTabsSymbol,
|
||
"ref": rootEl,
|
||
"class": ["v-tab", props.class, isSelected.value && props.inset ? insetColorClasses.value : []],
|
||
"style": [props.style, isSelected.value && props.inset ? insetColorStyles.value : []],
|
||
"tabindex": isSelected.value ? 0 : -1,
|
||
"role": "tab",
|
||
"aria-selected": String(isSelected.value),
|
||
"active": false
|
||
}, btnProps, attrs, {
|
||
"block": props.fixed,
|
||
"maxWidth": props.fixed ? 300 : void 0,
|
||
"onGroup:selected": updateSlider
|
||
}), {
|
||
...slots,
|
||
default: () => createBaseVNode(Fragment, null, [slots.default?.() ?? props.text, !props.hideSlider && createBaseVNode("div", {
|
||
"ref": sliderEl,
|
||
"class": normalizeClass(["v-tab__slider", sliderColorClasses.value]),
|
||
"style": normalizeStyle(sliderColorStyles.value)
|
||
}, null)])
|
||
});
|
||
});
|
||
return forwardRefs({}, rootEl);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTabs/VTabs.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTabs/VTabs.css";
|
||
|
||
// node_modules/vuetify/lib/components/VTabs/VTabsWindow.js
|
||
var makeVTabsWindowProps = propsFactory({
|
||
...omit(makeVWindowProps(), ["continuous", "nextIcon", "prevIcon", "showArrows", "touch", "mandatory"])
|
||
}, "VTabsWindow");
|
||
var VTabsWindow = genericComponent()({
|
||
name: "VTabsWindow",
|
||
props: makeVTabsWindowProps(),
|
||
emits: {
|
||
"update:modelValue": (v) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const group = inject(VTabsSymbol, null);
|
||
const _model = useProxiedModel(props, "modelValue");
|
||
const model = computed({
|
||
get() {
|
||
if (_model.value != null || !group) return _model.value;
|
||
return group.items.value.find((item) => group.selected.value.includes(item.id))?.value;
|
||
},
|
||
set(val) {
|
||
_model.value = val;
|
||
}
|
||
});
|
||
useRender(() => {
|
||
const windowProps = VWindow.filterProps(props);
|
||
return createVNode(VWindow, mergeProps({
|
||
"_as": "VTabsWindow"
|
||
}, windowProps, {
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||
"class": ["v-tabs-window", props.class],
|
||
"style": props.style,
|
||
"mandatory": false,
|
||
"touch": false
|
||
}), slots);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTabs/VTabsWindowItem.js
|
||
var makeVTabsWindowItemProps = propsFactory({
|
||
...makeVWindowItemProps()
|
||
}, "VTabsWindowItem");
|
||
var VTabsWindowItem = genericComponent()({
|
||
name: "VTabsWindowItem",
|
||
props: makeVTabsWindowItemProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
useRender(() => {
|
||
const windowItemProps = VWindowItem.filterProps(props);
|
||
return createVNode(VWindowItem, mergeProps({
|
||
"_as": "VTabsWindowItem"
|
||
}, windowItemProps, {
|
||
"class": ["v-tabs-window-item", props.class],
|
||
"style": props.style
|
||
}), slots);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTabs/VTabs.js
|
||
function parseItems(items) {
|
||
if (!items) return [];
|
||
return items.map((item) => {
|
||
if (!isObject(item)) return {
|
||
text: item,
|
||
value: item
|
||
};
|
||
return item;
|
||
});
|
||
}
|
||
var makeVTabsProps = propsFactory({
|
||
alignTabs: {
|
||
type: String,
|
||
default: "start"
|
||
},
|
||
color: String,
|
||
fixedTabs: Boolean,
|
||
items: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
stacked: Boolean,
|
||
bgColor: String,
|
||
grow: Boolean,
|
||
height: {
|
||
type: [Number, String],
|
||
default: void 0
|
||
},
|
||
hideSlider: Boolean,
|
||
inset: Boolean,
|
||
insetPadding: [String, Number],
|
||
insetRadius: [String, Number],
|
||
sliderColor: String,
|
||
...pick(makeVTabProps(), ["spaced", "sliderTransition", "sliderTransitionDuration"]),
|
||
...makeVSlideGroupProps({
|
||
mandatory: "force",
|
||
selectedClass: "v-tab-item--selected"
|
||
}),
|
||
...makeDensityProps(),
|
||
...makeTagProps()
|
||
}, "VTabs");
|
||
var VTabs = genericComponent()({
|
||
name: "VTabs",
|
||
props: makeVTabsProps(),
|
||
emits: {
|
||
"update:modelValue": (v) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
attrs,
|
||
slots
|
||
} = _ref;
|
||
const model = useProxiedModel(props, "modelValue");
|
||
const items = computed(() => parseItems(props.items));
|
||
const {
|
||
densityClasses
|
||
} = useDensity(props);
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.bgColor);
|
||
const {
|
||
scopeId
|
||
} = useScopeId();
|
||
provideDefaults({
|
||
VTab: {
|
||
color: toRef(props, "color"),
|
||
direction: toRef(props, "direction"),
|
||
stacked: toRef(props, "stacked"),
|
||
fixed: toRef(props, "fixedTabs"),
|
||
inset: toRef(props, "inset"),
|
||
sliderColor: toRef(props, "sliderColor"),
|
||
sliderTransition: toRef(props, "sliderTransition"),
|
||
sliderTransitionDuration: toRef(props, "sliderTransitionDuration"),
|
||
hideSlider: toRef(props, "hideSlider")
|
||
}
|
||
});
|
||
useRender(() => {
|
||
const slideGroupProps = VSlideGroup.filterProps(props);
|
||
const hasWindow = !!(slots.window || props.items.length > 0);
|
||
return createBaseVNode(Fragment, null, [createVNode(VSlideGroup, mergeProps(slideGroupProps, {
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||
"class": ["v-tabs", `v-tabs--${props.direction}`, `v-tabs--align-tabs-${props.alignTabs}`, {
|
||
"v-tabs--fixed-tabs": props.fixedTabs,
|
||
"v-tabs--grow": props.grow,
|
||
"v-tabs--inset": props.inset,
|
||
"v-tabs--stacked": props.stacked
|
||
}, densityClasses.value, backgroundColorClasses.value, props.class],
|
||
"style": [{
|
||
"--v-tabs-height": convertToUnit(props.height),
|
||
"--v-tabs-inset-padding": props.inset ? convertToUnit(props.insetPadding) : void 0,
|
||
"--v-tabs-inset-radius": props.inset ? convertToUnit(props.insetRadius) : void 0
|
||
}, backgroundColorStyles.value, props.style],
|
||
"role": "tablist",
|
||
"symbol": VTabsSymbol
|
||
}, scopeId, attrs), {
|
||
default: slots.default ?? (() => items.value.map((item) => slots.tab?.({
|
||
item
|
||
}) ?? createVNode(VTab, mergeProps(item, {
|
||
"key": item.text,
|
||
"value": item.value,
|
||
"spaced": props.spaced
|
||
}), {
|
||
default: slots[`tab.${item.value}`] ? () => slots[`tab.${item.value}`]?.({
|
||
item
|
||
}) : void 0
|
||
}))),
|
||
prev: slots.prev,
|
||
next: slots.next
|
||
}), hasWindow && createVNode(VTabsWindow, mergeProps({
|
||
"modelValue": model.value,
|
||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||
"key": "tabs-window"
|
||
}, scopeId), {
|
||
default: () => [items.value.map((item) => slots.item?.({
|
||
item
|
||
}) ?? createVNode(VTabsWindowItem, {
|
||
"value": item.value
|
||
}, {
|
||
default: () => slots[`item.${item.value}`]?.({
|
||
item
|
||
})
|
||
})), slots.window?.()]
|
||
})]);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VThemeProvider/VThemeProvider.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VThemeProvider/VThemeProvider.css";
|
||
var makeVThemeProviderProps = propsFactory({
|
||
withBackground: Boolean,
|
||
...makeComponentProps(),
|
||
...makeThemeProps(),
|
||
...makeTagProps()
|
||
}, "VThemeProvider");
|
||
var VThemeProvider = genericComponent()({
|
||
name: "VThemeProvider",
|
||
props: makeVThemeProviderProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
return () => {
|
||
if (!props.withBackground) return slots.default?.();
|
||
return createVNode(props.tag, {
|
||
"class": normalizeClass(["v-theme-provider", themeClasses.value, props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, {
|
||
default: () => [slots.default?.()]
|
||
});
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTimeline/VTimeline.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTimeline/VTimeline.css";
|
||
|
||
// node_modules/vuetify/lib/components/VTimeline/VTimelineDivider.js
|
||
var makeVTimelineDividerProps = propsFactory({
|
||
dotColor: String,
|
||
fillDot: Boolean,
|
||
hideDot: Boolean,
|
||
icon: IconValue,
|
||
iconColor: String,
|
||
lineColor: String,
|
||
...makeComponentProps(),
|
||
...makeRoundedProps(),
|
||
...makeSizeProps(),
|
||
...makeElevationProps()
|
||
}, "VTimelineDivider");
|
||
var VTimelineDivider = genericComponent()({
|
||
name: "VTimelineDivider",
|
||
props: makeVTimelineDividerProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
sizeClasses,
|
||
sizeStyles
|
||
} = useSize(props, "v-timeline-divider__dot");
|
||
const {
|
||
backgroundColorStyles,
|
||
backgroundColorClasses
|
||
} = useBackgroundColor(() => props.dotColor);
|
||
const {
|
||
roundedClasses
|
||
} = useRounded(props, "v-timeline-divider__dot");
|
||
const {
|
||
elevationClasses
|
||
} = useElevation(props);
|
||
const {
|
||
backgroundColorClasses: lineColorClasses,
|
||
backgroundColorStyles: lineColorStyles
|
||
} = useBackgroundColor(() => props.lineColor);
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-timeline-divider", {
|
||
"v-timeline-divider--fill-dot": props.fillDot
|
||
}, props.class]),
|
||
"style": normalizeStyle(props.style)
|
||
}, [createBaseVNode("div", {
|
||
"class": normalizeClass(["v-timeline-divider__before", lineColorClasses.value]),
|
||
"style": normalizeStyle(lineColorStyles.value)
|
||
}, null), !props.hideDot && createBaseVNode("div", {
|
||
"key": "dot",
|
||
"class": normalizeClass(["v-timeline-divider__dot", elevationClasses.value, roundedClasses.value, sizeClasses.value]),
|
||
"style": normalizeStyle(sizeStyles.value)
|
||
}, [createBaseVNode("div", {
|
||
"class": normalizeClass(["v-timeline-divider__inner-dot", backgroundColorClasses.value, roundedClasses.value]),
|
||
"style": normalizeStyle(backgroundColorStyles.value)
|
||
}, [!slots.default ? createVNode(VIcon, {
|
||
"key": "icon",
|
||
"color": props.iconColor,
|
||
"icon": props.icon,
|
||
"size": props.size
|
||
}, null) : createVNode(VDefaultsProvider, {
|
||
"key": "icon-defaults",
|
||
"disabled": !props.icon,
|
||
"defaults": {
|
||
VIcon: {
|
||
color: props.iconColor,
|
||
icon: props.icon,
|
||
size: props.size
|
||
}
|
||
}
|
||
}, slots.default)])]), createBaseVNode("div", {
|
||
"class": normalizeClass(["v-timeline-divider__after", lineColorClasses.value]),
|
||
"style": normalizeStyle(lineColorStyles.value)
|
||
}, null)]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTimeline/VTimelineItem.js
|
||
var makeVTimelineItemProps = propsFactory({
|
||
density: String,
|
||
dotColor: String,
|
||
fillDot: Boolean,
|
||
hideDot: Boolean,
|
||
hideOpposite: {
|
||
type: Boolean,
|
||
default: void 0
|
||
},
|
||
icon: IconValue,
|
||
iconColor: String,
|
||
lineInset: [Number, String],
|
||
side: {
|
||
type: String,
|
||
validator: (v) => v == null || ["start", "end"].includes(v)
|
||
},
|
||
...makeComponentProps(),
|
||
...makeDimensionProps(),
|
||
...makeElevationProps(),
|
||
...makeRoundedProps(),
|
||
...makeSizeProps(),
|
||
...makeTagProps()
|
||
}, "VTimelineItem");
|
||
var VTimelineItem = genericComponent()({
|
||
name: "VTimelineItem",
|
||
props: makeVTimelineItemProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
dimensionStyles
|
||
} = useDimension(props);
|
||
const dotSize = shallowRef(0);
|
||
const dotRef = ref();
|
||
watch(dotRef, (newValue) => {
|
||
if (!newValue) return;
|
||
dotSize.value = newValue.$el.querySelector(".v-timeline-divider__dot")?.getBoundingClientRect().width ?? 0;
|
||
}, {
|
||
flush: "post"
|
||
});
|
||
useRender(() => createBaseVNode("div", {
|
||
"class": normalizeClass(["v-timeline-item", {
|
||
"v-timeline-item--fill-dot": props.fillDot,
|
||
"v-timeline-item--side-start": props.side === "start",
|
||
"v-timeline-item--side-end": props.side === "end"
|
||
}, props.class]),
|
||
"style": normalizeStyle([{
|
||
"--v-timeline-dot-size": convertToUnit(dotSize.value),
|
||
"--v-timeline-line-inset": props.lineInset ? `calc(var(--v-timeline-dot-size) / 2 + ${convertToUnit(props.lineInset)})` : convertToUnit(0)
|
||
}, props.style])
|
||
}, [createBaseVNode("div", {
|
||
"class": "v-timeline-item__body",
|
||
"style": normalizeStyle(dimensionStyles.value)
|
||
}, [slots.default?.()]), createVNode(VTimelineDivider, {
|
||
"ref": dotRef,
|
||
"hideDot": props.hideDot,
|
||
"icon": props.icon,
|
||
"iconColor": props.iconColor,
|
||
"size": props.size,
|
||
"elevation": props.elevation,
|
||
"dotColor": props.dotColor,
|
||
"fillDot": props.fillDot,
|
||
"rounded": props.rounded
|
||
}, {
|
||
default: slots.icon
|
||
}), props.density !== "compact" && createBaseVNode("div", {
|
||
"class": "v-timeline-item__opposite"
|
||
}, [!props.hideOpposite && slots.opposite?.()])]));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTimeline/VTimeline.js
|
||
var makeVTimelineProps = propsFactory({
|
||
align: {
|
||
type: String,
|
||
default: "center",
|
||
validator: (v) => ["center", "start"].includes(v)
|
||
},
|
||
direction: {
|
||
type: String,
|
||
default: "vertical",
|
||
validator: (v) => ["vertical", "horizontal"].includes(v)
|
||
},
|
||
justify: {
|
||
type: String,
|
||
default: "auto",
|
||
validator: (v) => ["auto", "center"].includes(v)
|
||
},
|
||
side: {
|
||
type: String,
|
||
validator: (v) => v == null || ["start", "end"].includes(v)
|
||
},
|
||
lineThickness: {
|
||
type: [String, Number],
|
||
default: 2
|
||
},
|
||
lineColor: String,
|
||
truncateLine: {
|
||
type: String,
|
||
validator: (v) => ["start", "end", "both"].includes(v)
|
||
},
|
||
...pick(makeVTimelineItemProps({
|
||
lineInset: 0
|
||
}), ["dotColor", "fillDot", "hideOpposite", "iconColor", "lineInset", "size"]),
|
||
...makeComponentProps(),
|
||
...makeDensityProps(),
|
||
...makeTagProps(),
|
||
...makeThemeProps()
|
||
}, "VTimeline");
|
||
var VTimeline = genericComponent()({
|
||
name: "VTimeline",
|
||
props: makeVTimelineProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
themeClasses
|
||
} = provideTheme(props);
|
||
const {
|
||
densityClasses
|
||
} = useDensity(props);
|
||
const {
|
||
rtlClasses
|
||
} = useRtl();
|
||
provideDefaults({
|
||
VTimelineDivider: {
|
||
lineColor: toRef(() => props.lineColor)
|
||
},
|
||
VTimelineItem: {
|
||
density: toRef(() => props.density),
|
||
dotColor: toRef(() => props.dotColor),
|
||
fillDot: toRef(() => props.fillDot),
|
||
hideOpposite: toRef(() => props.hideOpposite),
|
||
iconColor: toRef(() => props.iconColor),
|
||
lineColor: toRef(() => props.lineColor),
|
||
lineInset: toRef(() => props.lineInset),
|
||
size: toRef(() => props.size)
|
||
}
|
||
});
|
||
const sideClasses = computed(() => {
|
||
const side = props.side ? props.side : props.density !== "default" ? "end" : null;
|
||
return side && `v-timeline--side-${side}`;
|
||
});
|
||
const truncateClasses = computed(() => {
|
||
const classes = ["v-timeline--truncate-line-start", "v-timeline--truncate-line-end"];
|
||
switch (props.truncateLine) {
|
||
case "both":
|
||
return classes;
|
||
case "start":
|
||
return classes[0];
|
||
case "end":
|
||
return classes[1];
|
||
default:
|
||
return null;
|
||
}
|
||
});
|
||
useRender(() => createVNode(props.tag, {
|
||
"class": normalizeClass(["v-timeline", `v-timeline--${props.direction}`, `v-timeline--align-${props.align}`, `v-timeline--justify-${props.justify}`, truncateClasses.value, {
|
||
"v-timeline--inset-line": !!props.lineInset
|
||
}, themeClasses.value, densityClasses.value, sideClasses.value, rtlClasses.value, props.class]),
|
||
"style": normalizeStyle([{
|
||
"--v-timeline-line-thickness": convertToUnit(props.lineThickness)
|
||
}, props.style])
|
||
}, slots));
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTimePicker/VTimePicker.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTimePicker/VTimePicker.css";
|
||
|
||
// node_modules/vuetify/lib/components/VTimePicker/VTimePickerClock.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTimePicker/VTimePickerClock.css";
|
||
var makeVTimePickerClockProps = propsFactory({
|
||
allowedValues: Function,
|
||
ampm: Boolean,
|
||
color: String,
|
||
disabled: Boolean,
|
||
displayedValue: null,
|
||
double: Boolean,
|
||
format: {
|
||
type: Function,
|
||
default: (val) => val
|
||
},
|
||
max: {
|
||
type: Number,
|
||
required: true
|
||
},
|
||
min: {
|
||
type: Number,
|
||
required: true
|
||
},
|
||
scrollable: Boolean,
|
||
readonly: Boolean,
|
||
rotate: {
|
||
type: Number,
|
||
default: 0
|
||
},
|
||
step: {
|
||
type: Number,
|
||
default: 1
|
||
},
|
||
modelValue: {
|
||
type: Number
|
||
}
|
||
}, "VTimePickerClock");
|
||
var VTimePickerClock = genericComponent()({
|
||
name: "VTimePickerClock",
|
||
props: makeVTimePickerClockProps(),
|
||
emits: {
|
||
change: (val) => true,
|
||
input: (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit
|
||
} = _ref;
|
||
const clockRef = ref(null);
|
||
const innerClockRef = ref(null);
|
||
const inputValue = ref(void 0);
|
||
const isDragging = ref(false);
|
||
const valueOnMouseDown = ref(null);
|
||
const valueOnMouseUp = ref(null);
|
||
const emitChangeDebounced = debounce((value) => emit("change", value), 750);
|
||
const {
|
||
textColorClasses,
|
||
textColorStyles
|
||
} = useTextColor(() => props.color);
|
||
const {
|
||
backgroundColorClasses,
|
||
backgroundColorStyles
|
||
} = useBackgroundColor(() => props.color);
|
||
const count = computed(() => props.max - props.min + 1);
|
||
const roundCount = computed(() => props.double ? count.value / 2 : count.value);
|
||
const degreesPerUnit = computed(() => 360 / roundCount.value);
|
||
const degrees = computed(() => degreesPerUnit.value * Math.PI / 180);
|
||
const displayedValue = computed(() => props.modelValue == null ? props.min : props.modelValue);
|
||
const innerRadiusScale = computed(() => 0.62);
|
||
const genChildren = computed(() => {
|
||
const children = [];
|
||
for (let value = props.min; value <= props.max; value = value + props.step) {
|
||
children.push(value);
|
||
}
|
||
return children;
|
||
});
|
||
watch(() => props.modelValue, (val) => {
|
||
inputValue.value = val;
|
||
});
|
||
function update(value) {
|
||
if (inputValue.value !== value) {
|
||
inputValue.value = value;
|
||
}
|
||
emit("input", value);
|
||
}
|
||
function isAllowed(value) {
|
||
return !props.allowedValues || props.allowedValues(value);
|
||
}
|
||
function wheel(e) {
|
||
if (!props.scrollable || props.disabled) return;
|
||
e.preventDefault();
|
||
const delta = Math.sign(-e.deltaY || 1);
|
||
let value = displayedValue.value;
|
||
do {
|
||
value = value + delta;
|
||
value = (value - props.min + count.value) % count.value + props.min;
|
||
} while (!isAllowed(value) && value !== displayedValue.value);
|
||
if (value !== props.displayedValue) {
|
||
update(value);
|
||
}
|
||
emitChangeDebounced(value);
|
||
}
|
||
function isInner(value) {
|
||
return props.double && value - props.min >= roundCount.value;
|
||
}
|
||
function handScale(value) {
|
||
return isInner(value) ? innerRadiusScale.value : 1;
|
||
}
|
||
function getPosition(value) {
|
||
const rotateRadians = props.rotate * Math.PI / 180;
|
||
return {
|
||
x: Math.sin((value - props.min) * degrees.value + rotateRadians) * handScale(value),
|
||
y: -Math.cos((value - props.min) * degrees.value + rotateRadians) * handScale(value)
|
||
};
|
||
}
|
||
function angleToValue(angle2, insideClick) {
|
||
const value = (Math.round(angle2 / degreesPerUnit.value) + (insideClick ? roundCount.value : 0)) % count.value + props.min;
|
||
if (angle2 < 360 - degreesPerUnit.value / 2) return value;
|
||
return insideClick ? props.max - roundCount.value + 1 : props.min;
|
||
}
|
||
function getTransform(i) {
|
||
const {
|
||
x,
|
||
y
|
||
} = getPosition(i);
|
||
return {
|
||
left: `${Math.round(50 + x * 50)}%`,
|
||
top: `${Math.round(50 + y * 50)}%`
|
||
};
|
||
}
|
||
function euclidean(p0, p1) {
|
||
const dx = p1.x - p0.x;
|
||
const dy = p1.y - p0.y;
|
||
return Math.sqrt(dx * dx + dy * dy);
|
||
}
|
||
function angle(center, p1) {
|
||
const value = 2 * Math.atan2(p1.y - center.y - euclidean(center, p1), p1.x - center.x);
|
||
return Math.abs(value * 180 / Math.PI);
|
||
}
|
||
function setMouseDownValue(value) {
|
||
if (valueOnMouseDown.value === null) {
|
||
valueOnMouseDown.value = value;
|
||
}
|
||
valueOnMouseUp.value = value;
|
||
update(value);
|
||
}
|
||
function onDragMove(e) {
|
||
e.preventDefault();
|
||
if (!isDragging.value && e.type !== "click" || !clockRef.value) return;
|
||
const {
|
||
width,
|
||
top,
|
||
left
|
||
} = clockRef.value?.getBoundingClientRect();
|
||
const {
|
||
width: innerWidth
|
||
} = innerClockRef.value?.getBoundingClientRect() ?? {
|
||
width: 0
|
||
};
|
||
const {
|
||
clientX,
|
||
clientY
|
||
} = "touches" in e ? e.touches[0] : e;
|
||
const center = {
|
||
x: width / 2,
|
||
y: -width / 2
|
||
};
|
||
const coords = {
|
||
x: clientX - left,
|
||
y: top - clientY
|
||
};
|
||
const handAngle = Math.round(angle(center, coords) - props.rotate + 360) % 360;
|
||
const insideClick = props.double && euclidean(center, coords) < (innerWidth + innerWidth * innerRadiusScale.value) / 4;
|
||
const checksCount = Math.ceil(15 / degreesPerUnit.value);
|
||
let value;
|
||
for (let i = 0; i < checksCount; i++) {
|
||
value = angleToValue(handAngle + i * degreesPerUnit.value, insideClick);
|
||
if (isAllowed(value)) return setMouseDownValue(value);
|
||
value = angleToValue(handAngle - i * degreesPerUnit.value, insideClick);
|
||
if (isAllowed(value)) return setMouseDownValue(value);
|
||
}
|
||
}
|
||
function onMouseDown(e) {
|
||
if (props.disabled) return;
|
||
e.preventDefault();
|
||
window.addEventListener("mousemove", onDragMove);
|
||
window.addEventListener("touchmove", onDragMove);
|
||
window.addEventListener("mouseup", onMouseUp);
|
||
window.addEventListener("touchend", onMouseUp);
|
||
valueOnMouseDown.value = null;
|
||
valueOnMouseUp.value = null;
|
||
isDragging.value = true;
|
||
onDragMove(e);
|
||
}
|
||
function onMouseUp(e) {
|
||
e.stopPropagation();
|
||
removeListeners();
|
||
isDragging.value = false;
|
||
if (valueOnMouseUp.value !== null && isAllowed(valueOnMouseUp.value)) {
|
||
emit("change", valueOnMouseUp.value);
|
||
}
|
||
}
|
||
function removeListeners() {
|
||
window.removeEventListener("mousemove", onDragMove);
|
||
window.removeEventListener("touchmove", onDragMove);
|
||
window.removeEventListener("mouseup", onMouseUp);
|
||
window.removeEventListener("touchend", onMouseUp);
|
||
}
|
||
onScopeDispose(removeListeners);
|
||
useRender(() => {
|
||
return createBaseVNode("div", {
|
||
"class": normalizeClass([{
|
||
"v-time-picker-clock": true,
|
||
"v-time-picker-clock--indeterminate": props.modelValue == null,
|
||
"v-time-picker-clock--readonly": props.readonly
|
||
}]),
|
||
"onMousedown": onMouseDown,
|
||
"onTouchstart": onMouseDown,
|
||
"onWheel": wheel,
|
||
"ref": clockRef
|
||
}, [createBaseVNode("div", {
|
||
"class": "v-time-picker-clock__inner",
|
||
"ref": innerClockRef
|
||
}, [createBaseVNode("div", {
|
||
"class": normalizeClass([{
|
||
"v-time-picker-clock__hand": true,
|
||
"v-time-picker-clock__hand--inner": isInner(props.modelValue)
|
||
}, textColorClasses.value]),
|
||
"style": normalizeStyle([{
|
||
transform: `rotate(${props.rotate + degreesPerUnit.value * (displayedValue.value - props.min)}deg) scaleY(${handScale(displayedValue.value)})`
|
||
}, textColorStyles.value])
|
||
}, null), genChildren.value.map((value) => {
|
||
const isActive = value === displayedValue.value;
|
||
return createBaseVNode("div", {
|
||
"class": normalizeClass([{
|
||
"v-time-picker-clock__item": true,
|
||
"v-time-picker-clock__item--active": isActive,
|
||
"v-time-picker-clock__item--disabled": props.disabled || !isAllowed(value)
|
||
}, isActive && backgroundColorClasses.value]),
|
||
"style": normalizeStyle([getTransform(value), isActive && backgroundColorStyles.value])
|
||
}, [createBaseVNode("span", null, [props.format(value)])]);
|
||
})])]);
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTimePicker/VTimePickerControls.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTimePicker/VTimePickerControls.css";
|
||
|
||
// node_modules/vuetify/lib/components/VTimePicker/VTimePickerField.js
|
||
var makeVTimePickerFieldProps = propsFactory({
|
||
active: Boolean,
|
||
color: String,
|
||
disabled: Boolean,
|
||
label: String,
|
||
modelValue: String,
|
||
readonly: Boolean
|
||
}, "VTimePickerField");
|
||
var VTimePickerField = genericComponent()({
|
||
name: "VTimePickerField",
|
||
inheritAttrs: false,
|
||
props: makeVTimePickerFieldProps(),
|
||
emits: {
|
||
"update:modelValue": (v) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
attrs
|
||
} = _ref;
|
||
const {
|
||
textColorClasses,
|
||
textColorStyles
|
||
} = useTextColor(() => props.color);
|
||
const vTextInputRef = ref();
|
||
const isFocused = shallowRef(false);
|
||
function onKeydown(e) {
|
||
if (["Backspace", "Delete"].includes(e.key)) {
|
||
e.preventDefault();
|
||
const target = e.target;
|
||
target.value = "";
|
||
emit("update:modelValue", null);
|
||
}
|
||
}
|
||
useRender(() => {
|
||
return createBaseVNode("div", null, [createVNode(VTextField, mergeProps({
|
||
"ref": vTextInputRef,
|
||
"_as": "VTimePickerField",
|
||
"autocomplete": "off",
|
||
"class": ["v-time-picker-controls__time__field", {
|
||
"v-time-picker-controls__time__field--active": props.active
|
||
}, props.active ? textColorClasses.value : []],
|
||
"style": props.active ? textColorStyles.value : [],
|
||
"disabled": props.disabled,
|
||
"variant": "solo-filled",
|
||
"inputmode": "numeric",
|
||
"hideDetails": true,
|
||
"flat": true,
|
||
"modelValue": props.modelValue ?? (isFocused.value ? "" : "--"),
|
||
"onUpdate:modelValue": (v) => emit("update:modelValue", v),
|
||
"onKeydown": onKeydown,
|
||
"onFocus": () => isFocused.value = true,
|
||
"onBlur": () => isFocused.value = false
|
||
}, attrs), null), createBaseVNode("div", {
|
||
"class": "v-time-picker-controls__field-label"
|
||
}, [props.label])]);
|
||
});
|
||
return forwardRefs({}, vTextInputRef);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTimePicker/util.js
|
||
function pad(n) {
|
||
let length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
|
||
return String(n).padStart(length, "0");
|
||
}
|
||
function convert24to12(hour) {
|
||
return hour ? (hour - 1) % 12 + 1 : 12;
|
||
}
|
||
function convert12to24(hour, period) {
|
||
return hour % 12 + (period === "pm" ? 12 : 0);
|
||
}
|
||
function extractInteger(v) {
|
||
const digits = v.replaceAll(/\D/g, "");
|
||
return digits.length > 0 ? Number(digits) : null;
|
||
}
|
||
function incrementHour(hour, increment, period) {
|
||
if (period) {
|
||
if (hour === 12 && increment) {
|
||
return {
|
||
value: 1
|
||
};
|
||
}
|
||
if (hour === 11 && increment) {
|
||
return {
|
||
value: 12,
|
||
togglePeriod: true
|
||
};
|
||
}
|
||
if (hour === 12 && !increment) {
|
||
return {
|
||
value: 11,
|
||
togglePeriod: true
|
||
};
|
||
}
|
||
if (hour === 1 && !increment) {
|
||
return {
|
||
value: 12
|
||
};
|
||
}
|
||
} else {
|
||
if (hour === 23 && increment) {
|
||
return {
|
||
value: 0
|
||
};
|
||
}
|
||
if (hour === 0 && !increment) {
|
||
return {
|
||
value: 23
|
||
};
|
||
}
|
||
}
|
||
return {
|
||
value: hour + (increment ? 1 : -1)
|
||
};
|
||
}
|
||
function incrementMinuteOrSecond(val, increment) {
|
||
if (val === 59 && increment) return 0;
|
||
if (val === 0 && !increment) return 59;
|
||
return val + (increment ? 1 : -1);
|
||
}
|
||
|
||
// node_modules/vuetify/lib/components/VTimePicker/VTimePickerControls.js
|
||
var makeVTimePickerControlsProps = propsFactory({
|
||
ampm: Boolean,
|
||
color: String,
|
||
disabled: Boolean,
|
||
hour: [Number, String],
|
||
minute: [Number, String],
|
||
second: [Number, String],
|
||
period: String,
|
||
readonly: Boolean,
|
||
useSeconds: Boolean,
|
||
value: Number,
|
||
viewMode: String
|
||
}, "VTimePickerControls");
|
||
var VTimePickerControls = genericComponent()({
|
||
name: "VTimePickerControls",
|
||
props: makeVTimePickerControlsProps(),
|
||
emits: {
|
||
"update:period": (data) => true,
|
||
"update:viewMode": (data) => true,
|
||
"update:hour": (v) => true,
|
||
"update:minute": (v) => true,
|
||
"update:second": (v) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const transformHours = {
|
||
in: (v) => {
|
||
if (v == null || isNaN(Number(v))) return null;
|
||
const val = Number(v);
|
||
return props.ampm ? pad(convert24to12(val)) : pad(val);
|
||
},
|
||
out: (v) => {
|
||
if (isNaN(Number(v)) || v == null || v === "") return null;
|
||
const val = typeof v === "string" ? extractInteger(v) : Number(v);
|
||
if (val === null) return null;
|
||
return props.ampm ? convert12to24(val, props.period ?? "am") : clamp(val, 0, 23);
|
||
}
|
||
};
|
||
const hour = useProxiedModel(props, "hour", void 0, transformHours.in, transformHours.out);
|
||
const transformMinutesOrSeconds = {
|
||
in: (v) => v != null && !isNaN(Number(v)) ? pad(`${v}`) : null,
|
||
out: (v) => {
|
||
if (isNaN(Number(v)) || v == null || v === "") return null;
|
||
const val = typeof v === "string" ? extractInteger(v) : Number(v);
|
||
return val !== null ? clamp(val, 0, 59) : null;
|
||
}
|
||
};
|
||
const minute = useProxiedModel(props, "minute", void 0, transformMinutesOrSeconds.in, transformMinutesOrSeconds.out);
|
||
const second = useProxiedModel(props, "second", void 0, transformMinutesOrSeconds.in, transformMinutesOrSeconds.out);
|
||
function onHourFieldKeydown(e) {
|
||
if (!["ArrowUp", "ArrowDown"].includes(e.key)) return;
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
const current = Number(hour.value ?? 0);
|
||
const period = props.ampm ? props.period ?? "am" : null;
|
||
const {
|
||
value,
|
||
togglePeriod
|
||
} = incrementHour(current, e.key === "ArrowUp", period);
|
||
hour.value = pad(value);
|
||
if (togglePeriod) {
|
||
emit("update:period", props.period === "am" ? "pm" : "am");
|
||
}
|
||
}
|
||
function onMinuteFieldKeydown(e) {
|
||
if (!["ArrowUp", "ArrowDown"].includes(e.key)) return;
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
minute.value = incrementMinuteOrSecond(Number(minute.value), e.key === "ArrowUp");
|
||
}
|
||
function onSecondFieldKeydown(e) {
|
||
if (!["ArrowUp", "ArrowDown"].includes(e.key)) return;
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
second.value = incrementMinuteOrSecond(Number(second.value), e.key === "ArrowUp");
|
||
}
|
||
function createInputInterceptor(valueTransformOut, compare, apply) {
|
||
return (e) => {
|
||
if (!e.data) return;
|
||
const inputElement = e.target;
|
||
const {
|
||
value: existingTxt,
|
||
selectionStart,
|
||
selectionEnd
|
||
} = inputElement ?? {};
|
||
if (extractInteger(e.data) === null) {
|
||
e.preventDefault();
|
||
return;
|
||
}
|
||
const potentialNewInputVal = existingTxt ? existingTxt.slice(0, selectionStart) + e.data + existingTxt.slice(selectionEnd) : e.data;
|
||
if (potentialNewInputVal.length > 2) {
|
||
if (selectionStart === selectionEnd && selectionEnd === 0 && e.data.trim().startsWith("0")) {
|
||
e.preventDefault();
|
||
inputElement.value = potentialNewInputVal.trim().substring(0, 2);
|
||
apply(inputElement.value);
|
||
if (e.data.trim().length === 1) {
|
||
inputElement.setSelectionRange(1, 1);
|
||
}
|
||
return;
|
||
}
|
||
if (selectionStart === selectionEnd && selectionEnd === 1 && existingTxt.startsWith("0")) {
|
||
e.preventDefault();
|
||
inputElement.value = potentialNewInputVal.trim().substring(0, 2);
|
||
apply(inputElement.value);
|
||
return;
|
||
}
|
||
const maxValue = props.viewMode === "hour" ? props.ampm ? 12 : 23 : 59;
|
||
const value = extractInteger(potentialNewInputVal);
|
||
if (value > maxValue) {
|
||
e.preventDefault();
|
||
inputElement.value = pad(String(extractInteger(e.data)).substring(0, 2));
|
||
apply(inputElement.value);
|
||
return;
|
||
}
|
||
}
|
||
const potentialNewNumber = valueTransformOut(potentialNewInputVal);
|
||
if (compare(potentialNewNumber)) {
|
||
e.preventDefault();
|
||
}
|
||
};
|
||
}
|
||
const hourInputRef = ref();
|
||
const minuteInputRef = ref();
|
||
const secondInputRef = ref();
|
||
watch(() => props.viewMode, (_, old) => {
|
||
switch (old) {
|
||
case "hour":
|
||
hourInputRef.value.blur();
|
||
break;
|
||
case "minute":
|
||
minuteInputRef.value.blur();
|
||
break;
|
||
case "second":
|
||
secondInputRef.value.blur();
|
||
break;
|
||
}
|
||
});
|
||
const hourInputFilter = createInputInterceptor(transformHours.out, (v) => transformHours.in(v) === hour.value, (v) => hour.value = v);
|
||
const minuteInputFilter = createInputInterceptor(transformMinutesOrSeconds.out, (v) => transformMinutesOrSeconds.in(v) === minute.value, (v) => minute.value = v);
|
||
const secondInputFilter = createInputInterceptor(transformMinutesOrSeconds.out, (v) => transformMinutesOrSeconds.in(v) === second.value, (v) => second.value = v);
|
||
useRender(() => {
|
||
return createBaseVNode("div", {
|
||
"class": "v-time-picker-controls"
|
||
}, [createBaseVNode("div", {
|
||
"class": normalizeClass({
|
||
"v-time-picker-controls__time": true,
|
||
"v-time-picker-controls__time--with-ampm": props.ampm,
|
||
"v-time-picker-controls__time--with-seconds": props.useSeconds
|
||
})
|
||
}, [createVNode(VTimePickerField, {
|
||
"ref": hourInputRef,
|
||
"active": props.viewMode === "hour",
|
||
"color": props.color,
|
||
"disabled": props.disabled,
|
||
"label": t("$vuetify.timePicker.hour"),
|
||
"modelValue": hour.value,
|
||
"onUpdate:modelValue": (v) => hour.value = v,
|
||
"onKeydown": onHourFieldKeydown,
|
||
"onBeforeinput": hourInputFilter,
|
||
"onFocus": () => emit("update:viewMode", "hour")
|
||
}, null), createBaseVNode("span", {
|
||
"class": "v-time-picker-controls__time__separator"
|
||
}, [createTextVNode(":")]), createVNode(VTimePickerField, {
|
||
"ref": minuteInputRef,
|
||
"active": props.viewMode === "minute",
|
||
"color": props.color,
|
||
"disabled": props.disabled,
|
||
"label": t("$vuetify.timePicker.minute"),
|
||
"modelValue": minute.value,
|
||
"onUpdate:modelValue": (v) => minute.value = v,
|
||
"onKeydown": onMinuteFieldKeydown,
|
||
"onBeforeinput": minuteInputFilter,
|
||
"onFocus": () => emit("update:viewMode", "minute")
|
||
}, null), props.useSeconds && createBaseVNode("span", {
|
||
"key": "secondsDivider",
|
||
"class": "v-time-picker-controls__time__separator"
|
||
}, [createTextVNode(":")]), props.useSeconds && createVNode(VTimePickerField, {
|
||
"key": "secondsVal",
|
||
"ref": secondInputRef,
|
||
"active": props.viewMode === "second",
|
||
"color": props.color,
|
||
"disabled": props.disabled,
|
||
"label": t("$vuetify.timePicker.second"),
|
||
"modelValue": second.value,
|
||
"onUpdate:modelValue": (v) => second.value = v,
|
||
"onKeydown": onSecondFieldKeydown,
|
||
"onBeforeinput": secondInputFilter,
|
||
"onFocus": () => emit("update:viewMode", "second")
|
||
}, null), props.ampm && createBaseVNode("div", {
|
||
"class": "v-time-picker-controls__ampm"
|
||
}, [createVNode(VBtn, {
|
||
"active": props.period === "am",
|
||
"color": props.period === "am" ? props.color : void 0,
|
||
"class": normalizeClass({
|
||
"v-time-picker-controls__ampm__am": true,
|
||
"v-time-picker-controls__ampm__btn": true,
|
||
"v-time-picker-controls__ampm__btn__active": props.period === "am"
|
||
}),
|
||
"disabled": props.disabled,
|
||
"text": t("$vuetify.timePicker.am"),
|
||
"variant": props.disabled && props.period === "am" ? "elevated" : "tonal",
|
||
"onClick": () => props.period !== "am" ? emit("update:period", "am") : null
|
||
}, null), createVNode(VBtn, {
|
||
"active": props.period === "pm",
|
||
"color": props.period === "pm" ? props.color : void 0,
|
||
"class": normalizeClass({
|
||
"v-time-picker-controls__ampm__pm": true,
|
||
"v-time-picker-controls__ampm__btn": true,
|
||
"v-time-picker-controls__ampm__btn__active": props.period === "pm"
|
||
}),
|
||
"disabled": props.disabled,
|
||
"text": t("$vuetify.timePicker.pm"),
|
||
"variant": props.disabled && props.period === "pm" ? "elevated" : "tonal",
|
||
"onClick": () => props.period !== "pm" ? emit("update:period", "pm") : null
|
||
}, null)])])]);
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTimePicker/VTimePicker.js
|
||
var rangeHours24 = createRange(24);
|
||
var rangeHours12am = createRange(12);
|
||
var rangeHours12pm = rangeHours12am.map((v) => v + 12);
|
||
var range60 = createRange(60);
|
||
var makeVTimePickerProps = propsFactory({
|
||
allowedHours: [Function, Array],
|
||
allowedMinutes: [Function, Array],
|
||
allowedSeconds: [Function, Array],
|
||
disabled: Boolean,
|
||
format: {
|
||
type: String,
|
||
default: "ampm"
|
||
},
|
||
max: String,
|
||
min: String,
|
||
viewMode: {
|
||
type: String,
|
||
default: "hour"
|
||
},
|
||
period: {
|
||
type: String,
|
||
default: "am",
|
||
validator: (v) => ["am", "pm"].includes(v)
|
||
},
|
||
modelValue: null,
|
||
readonly: Boolean,
|
||
scrollable: Boolean,
|
||
useSeconds: Boolean,
|
||
variant: {
|
||
type: String,
|
||
default: "dial"
|
||
},
|
||
...omit(makeVPickerProps({
|
||
title: "$vuetify.timePicker.title"
|
||
}), ["landscape"]),
|
||
...makeDensityProps()
|
||
}, "VTimePicker");
|
||
var VTimePicker = genericComponent()({
|
||
name: "VTimePicker",
|
||
props: makeVTimePickerProps(),
|
||
emits: {
|
||
"update:hour": (val) => true,
|
||
"update:minute": (val) => true,
|
||
"update:period": (val) => true,
|
||
"update:second": (val) => true,
|
||
"update:modelValue": (val) => true,
|
||
"update:viewMode": (val) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
emit,
|
||
slots
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const {
|
||
densityClasses
|
||
} = useDensity(props);
|
||
const inputHour = ref(null);
|
||
const inputMinute = ref(null);
|
||
const inputSecond = ref(null);
|
||
const lazyInputHour = ref(null);
|
||
const lazyInputMinute = ref(null);
|
||
const lazyInputSecond = ref(null);
|
||
const period = useProxiedModel(props, "period", "am");
|
||
const viewMode = useProxiedModel(props, "viewMode", "hour");
|
||
const controlsRef = ref(null);
|
||
const clockRef = ref(null);
|
||
const isAllowedHourCb = computed(() => {
|
||
let cb;
|
||
if (props.allowedHours instanceof Array) {
|
||
cb = (val) => props.allowedHours.includes(val);
|
||
} else {
|
||
cb = props.allowedHours;
|
||
}
|
||
if (!props.min && !props.max) return cb;
|
||
const minHour = props.min ? Number(props.min.split(":")[0]) : 0;
|
||
const maxHour = props.max ? Number(props.max.split(":")[0]) : 23;
|
||
return (val) => {
|
||
return val >= Number(minHour) && val <= Number(maxHour) && (!cb || cb(val));
|
||
};
|
||
});
|
||
const isAllowedMinuteCb = computed(() => {
|
||
let cb;
|
||
const isHourAllowed = !isAllowedHourCb.value || inputHour.value === null || isAllowedHourCb.value(inputHour.value);
|
||
if (props.allowedMinutes instanceof Array) {
|
||
cb = (val) => props.allowedMinutes.includes(val);
|
||
} else {
|
||
cb = props.allowedMinutes;
|
||
}
|
||
if (!props.min && !props.max) {
|
||
return isHourAllowed ? cb : () => false;
|
||
}
|
||
const [minHour, minMinute] = props.min ? props.min.split(":").map(Number) : [0, 0];
|
||
const [maxHour, maxMinute] = props.max ? props.max.split(":").map(Number) : [23, 59];
|
||
const minTime = minHour * 60 + Number(minMinute);
|
||
const maxTime = maxHour * 60 + Number(maxMinute);
|
||
return (val) => {
|
||
const time = 60 * inputHour.value + val;
|
||
return time >= minTime && time <= maxTime && isHourAllowed && (!cb || cb(val));
|
||
};
|
||
});
|
||
const isAllowedSecondCb = computed(() => {
|
||
let cb;
|
||
const isHourAllowed = !isAllowedHourCb.value || inputHour.value === null || isAllowedHourCb.value(inputHour.value);
|
||
const isMinuteAllowed = isHourAllowed && (!isAllowedMinuteCb.value || inputMinute.value === null || isAllowedMinuteCb.value(inputMinute.value));
|
||
if (props.allowedSeconds instanceof Array) {
|
||
cb = (val) => props.allowedSeconds.includes(val);
|
||
} else {
|
||
cb = props.allowedSeconds;
|
||
}
|
||
if (!props.min && !props.max) {
|
||
return isMinuteAllowed ? cb : () => false;
|
||
}
|
||
const [minHour, minMinute, minSecond] = props.min ? props.min.split(":").map(Number) : [0, 0, 0];
|
||
const [maxHour, maxMinute, maxSecond] = props.max ? props.max.split(":").map(Number) : [23, 59, 59];
|
||
const minTime = minHour * 3600 + minMinute * 60 + Number(minSecond || 0);
|
||
const maxTime = maxHour * 3600 + maxMinute * 60 + Number(maxSecond || 0);
|
||
return (val) => {
|
||
const time = 3600 * inputHour.value + 60 * inputMinute.value + val;
|
||
return time >= minTime && time <= maxTime && isMinuteAllowed && (!cb || cb(val));
|
||
};
|
||
});
|
||
const isAmPm = computed(() => {
|
||
return props.format === "ampm";
|
||
});
|
||
const shouldClear = toRef(() => {
|
||
return props.modelValue !== null && inputHour.value === null && inputMinute.value === null && (!props.useSeconds || inputSecond.value === null);
|
||
});
|
||
function emitValue() {
|
||
const value = genValue();
|
||
if (value !== null && value !== props.modelValue) {
|
||
emit("update:modelValue", value);
|
||
}
|
||
if (shouldClear.value) {
|
||
emit("update:modelValue", null);
|
||
}
|
||
}
|
||
watch(inputHour, emitValue);
|
||
watch(inputMinute, emitValue);
|
||
watch(inputSecond, emitValue);
|
||
watch(() => props.period, (val) => setPeriod(val));
|
||
watch(() => props.modelValue, (val) => setInputData(val));
|
||
watch(() => props.useSeconds, (val, old) => {
|
||
if (old && !val && viewMode.value === "second") {
|
||
viewMode.value = "minute";
|
||
}
|
||
if (!val && inputSecond.value !== null) {
|
||
inputSecond.value = null;
|
||
}
|
||
});
|
||
onMounted(() => {
|
||
setInputData(props.modelValue);
|
||
});
|
||
function genValue() {
|
||
if (inputHour.value != null && inputMinute.value != null && (!props.useSeconds || inputSecond.value != null)) {
|
||
return `${pad(inputHour.value)}:${pad(inputMinute.value)}` + (props.useSeconds ? `:${pad(inputSecond.value)}` : "");
|
||
}
|
||
return null;
|
||
}
|
||
function setInputData(value) {
|
||
if (value == null || value === "") {
|
||
inputHour.value = null;
|
||
inputMinute.value = null;
|
||
inputSecond.value = null;
|
||
} else if (value instanceof Date) {
|
||
inputHour.value = value.getHours();
|
||
inputMinute.value = value.getMinutes();
|
||
inputSecond.value = value.getSeconds();
|
||
} else {
|
||
const [hour, , minute, , second, period2] = value.trim().toLowerCase().match(/^(\d+):(\d+)(:(\d+))?([ap]m)?$/) || new Array(6);
|
||
inputHour.value = period2 ? convert12to24(parseInt(hour, 10), period2) : parseInt(hour, 10);
|
||
inputMinute.value = parseInt(minute, 10);
|
||
inputSecond.value = parseInt(second || 0, 10);
|
||
}
|
||
period.value = inputHour.value == null || inputHour.value < 12 ? "am" : "pm";
|
||
}
|
||
function firstAllowed(type, value) {
|
||
const allowedFn = type === "hour" ? isAllowedHourCb.value : type === "minute" ? isAllowedMinuteCb.value : isAllowedSecondCb.value;
|
||
if (!allowedFn) return value;
|
||
const range = type === "minute" ? range60 : type === "second" ? range60 : isAmPm.value ? value < 12 ? rangeHours12am : rangeHours12pm : rangeHours24;
|
||
const first = range.find((v) => allowedFn((v + value) % range.length + range[0]));
|
||
return ((first || 0) + value) % range.length + range[0];
|
||
}
|
||
function setPeriod(val) {
|
||
period.value = val;
|
||
if (inputHour.value != null) {
|
||
const newHour = inputHour.value + (period.value === "am" ? -12 : 12);
|
||
inputHour.value = firstAllowed("hour", newHour);
|
||
}
|
||
emit("update:period", val);
|
||
emitValue();
|
||
return true;
|
||
}
|
||
function onInput(value) {
|
||
if (viewMode.value === "hour") {
|
||
inputHour.value = isAmPm.value ? convert12to24(value, period.value) : value;
|
||
} else if (viewMode.value === "minute") {
|
||
inputMinute.value = value;
|
||
} else {
|
||
inputSecond.value = value;
|
||
}
|
||
}
|
||
function onChange(value) {
|
||
switch (viewMode.value || "hour") {
|
||
case "hour":
|
||
emit("update:hour", value);
|
||
break;
|
||
case "minute":
|
||
emit("update:minute", value);
|
||
break;
|
||
case "second":
|
||
emit("update:second", value);
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
const emitChange = inputHour.value !== null && inputMinute.value !== null && (props.useSeconds ? inputSecond.value !== null : true);
|
||
if (viewMode.value === "hour") {
|
||
viewMode.value = "minute";
|
||
} else if (props.useSeconds && viewMode.value === "minute") {
|
||
viewMode.value = "second";
|
||
}
|
||
if (inputHour.value === lazyInputHour.value && inputMinute.value === lazyInputMinute.value && (!props.useSeconds || inputSecond.value === lazyInputSecond.value)) return;
|
||
const time = genValue();
|
||
if (time === null) return;
|
||
lazyInputHour.value = inputHour.value;
|
||
lazyInputMinute.value = inputMinute.value;
|
||
props.useSeconds && (lazyInputSecond.value = inputSecond.value);
|
||
emitChange && emitValue();
|
||
}
|
||
useRender(() => {
|
||
const pickerProps = omit(VPicker.filterProps(props), ["hideHeader"]);
|
||
const timePickerControlsProps = VTimePickerControls.filterProps(props);
|
||
const timePickerClockProps = VTimePickerClock.filterProps(omit(props, ["format", "modelValue", "min", "max"]));
|
||
return createVNode(VPicker, mergeProps(pickerProps, {
|
||
"color": void 0,
|
||
"class": ["v-time-picker", `v-time-picker--variant-${props.variant}`, props.class, densityClasses.value],
|
||
"hideHeader": props.hideHeader && props.variant !== "input",
|
||
"style": props.style
|
||
}), {
|
||
title: () => slots.title?.() ?? createBaseVNode("div", {
|
||
"class": "v-time-picker__title"
|
||
}, [t(props.title)]),
|
||
header: () => createVNode(VTimePickerControls, mergeProps(timePickerControlsProps, {
|
||
"ampm": isAmPm.value,
|
||
"hour": inputHour.value,
|
||
"minute": inputMinute.value,
|
||
"period": period.value,
|
||
"second": inputSecond.value,
|
||
"viewMode": viewMode.value,
|
||
"onUpdate:hour": (val) => inputHour.value = val,
|
||
"onUpdate:minute": (val) => inputMinute.value = val,
|
||
"onUpdate:period": (val) => setPeriod(val),
|
||
"onUpdate:second": (val) => inputSecond.value = val,
|
||
"onUpdate:viewMode": (value) => viewMode.value = value,
|
||
"ref": controlsRef
|
||
}), null),
|
||
default: () => createVNode(VTimePickerClock, mergeProps(timePickerClockProps, {
|
||
"allowedValues": viewMode.value === "hour" ? isAllowedHourCb.value : viewMode.value === "minute" ? isAllowedMinuteCb.value : isAllowedSecondCb.value,
|
||
"double": viewMode.value === "hour" && !isAmPm.value,
|
||
"format": viewMode.value === "hour" ? isAmPm.value ? convert24to12 : (val) => val : (val) => pad(val, 2),
|
||
"max": viewMode.value === "hour" ? isAmPm.value && period.value === "am" ? 11 : 23 : 59,
|
||
"min": viewMode.value === "hour" && isAmPm.value && period.value === "pm" ? 12 : 0,
|
||
"size": 20,
|
||
"step": viewMode.value === "hour" ? 1 : 5,
|
||
"modelValue": viewMode.value === "hour" ? inputHour.value : viewMode.value === "minute" ? inputMinute.value : inputSecond.value,
|
||
"onChange": onChange,
|
||
"onInput": onInput,
|
||
"ref": clockRef
|
||
}), null),
|
||
actions: slots.actions
|
||
});
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTreeview/VTreeviewGroup.js
|
||
var makeVTreeviewGroupProps = propsFactory({
|
||
...omit(makeVListGroupProps({
|
||
collapseIcon: "$treeviewCollapse",
|
||
expandIcon: "$treeviewExpand"
|
||
}), ["subgroup"])
|
||
}, "VTreeviewGroup");
|
||
var VTreeviewGroup = genericComponent()({
|
||
name: "VTreeviewGroup",
|
||
props: makeVTreeviewGroupProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const vListGroupRef = ref();
|
||
const toggleIcon = computed(() => vListGroupRef.value?.isOpen ? props.collapseIcon : props.expandIcon);
|
||
const activatorDefaults = computed(() => ({
|
||
VTreeviewItem: {
|
||
prependIcon: void 0,
|
||
appendIcon: void 0,
|
||
toggleIcon: toggleIcon.value
|
||
}
|
||
}));
|
||
useRender(() => {
|
||
const listGroupProps = VListGroup.filterProps(props);
|
||
return createVNode(VListGroup, mergeProps(listGroupProps, {
|
||
"ref": vListGroupRef,
|
||
"class": ["v-treeview-group", props.class],
|
||
"subgroup": true
|
||
}), {
|
||
...slots,
|
||
activator: slots.activator ? (slotProps) => createBaseVNode(Fragment, null, [createVNode(VDefaultsProvider, {
|
||
"defaults": activatorDefaults.value
|
||
}, {
|
||
default: () => [slots.activator?.(slotProps)]
|
||
})]) : void 0
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTreeview/VTreeviewItem.js
|
||
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTreeview/VTreeviewItem.css";
|
||
|
||
// node_modules/vuetify/lib/components/VTreeview/shared.js
|
||
var VTreeviewSymbol = /* @__PURE__ */ Symbol.for("vuetify:v-treeview");
|
||
|
||
// node_modules/vuetify/lib/components/VTreeview/VTreeviewItem.js
|
||
var makeVTreeviewItemProps = propsFactory({
|
||
loading: Boolean,
|
||
hideActions: Boolean,
|
||
hasCustomPrepend: Boolean,
|
||
indentLines: Array,
|
||
toggleIcon: IconValue,
|
||
...makeVListItemProps({
|
||
slim: true
|
||
})
|
||
}, "VTreeviewItem");
|
||
var VTreeviewItem = genericComponent()({
|
||
name: "VTreeviewItem",
|
||
props: makeVTreeviewItemProps(),
|
||
emits: {
|
||
toggleExpand: (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
emit
|
||
} = _ref;
|
||
const visibleIds = inject(VTreeviewSymbol, {
|
||
visibleIds: ref()
|
||
}).visibleIds;
|
||
const vListItemRef = ref();
|
||
const isActivatableGroupActivator = computed(() => vListItemRef.value?.root.activatable.value && vListItemRef.value?.isGroupActivator);
|
||
const vListItemRefIsClickable = computed(() => vListItemRef.value?.link.isClickable.value || props.value != null && !!vListItemRef.value?.list);
|
||
const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || vListItemRefIsClickable.value || isActivatableGroupActivator.value));
|
||
const isFiltered = computed(() => visibleIds.value && !visibleIds.value.has(toRaw(vListItemRef.value?.id)));
|
||
function activateGroupActivator(e) {
|
||
if (isClickable.value && isActivatableGroupActivator.value) {
|
||
vListItemRef.value?.activate(!vListItemRef.value?.isActivated, e);
|
||
}
|
||
}
|
||
function onClickAction(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
emit("toggleExpand", e);
|
||
}
|
||
useRender(() => {
|
||
const listItemProps = VListItem.filterProps(props);
|
||
const hasPrepend = slots.prepend || props.toggleIcon || props.indentLines || props.prependIcon || props.prependAvatar;
|
||
return createVNode(VListItem, mergeProps({
|
||
"ref": vListItemRef
|
||
}, listItemProps, {
|
||
"active": vListItemRef.value?.isActivated || void 0,
|
||
"class": ["v-treeview-item", {
|
||
"v-treeview-item--activatable-group-activator": isActivatableGroupActivator.value,
|
||
"v-treeview-item--filtered": isFiltered.value
|
||
}, props.class],
|
||
"ripple": false,
|
||
"onClick": activateGroupActivator
|
||
}), {
|
||
...slots,
|
||
prepend: hasPrepend ? (slotProps) => {
|
||
return createBaseVNode(Fragment, null, [props.indentLines && props.indentLines.length > 0 ? createBaseVNode("div", {
|
||
"key": "indent-lines",
|
||
"class": "v-treeview-indent-lines",
|
||
"style": {
|
||
"--v-indent-parts": props.indentLines.length
|
||
}
|
||
}, [props.indentLines.map((type) => createBaseVNode("div", {
|
||
"class": normalizeClass(`v-treeview-indent-line v-treeview-indent-line--${type}`)
|
||
}, null))]) : "", !props.hideActions && createVNode(VListItemAction, {
|
||
"start": true
|
||
}, {
|
||
default: () => [props.toggleIcon ? createBaseVNode(Fragment, null, [!slots.toggle ? createVNode(VBtn, {
|
||
"key": "prepend-toggle",
|
||
"density": "compact",
|
||
"icon": props.toggleIcon,
|
||
"loading": props.loading,
|
||
"variant": "text",
|
||
"onClick": onClickAction
|
||
}, {
|
||
loader: () => createVNode(VProgressCircular, {
|
||
"indeterminate": "disable-shrink",
|
||
"size": "20",
|
||
"width": "2"
|
||
}, null)
|
||
}) : createVNode(VDefaultsProvider, {
|
||
"key": "prepend-defaults",
|
||
"defaults": {
|
||
VBtn: {
|
||
density: "compact",
|
||
icon: props.toggleIcon,
|
||
variant: "text",
|
||
loading: props.loading
|
||
},
|
||
VProgressCircular: {
|
||
indeterminate: "disable-shrink",
|
||
size: 20,
|
||
width: 2
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.toggle({
|
||
...slotProps,
|
||
loading: props.loading,
|
||
props: {
|
||
onClick: onClickAction
|
||
}
|
||
})]
|
||
})]) : createBaseVNode("div", {
|
||
"class": "v-treeview-item__level"
|
||
}, null)]
|
||
}), !props.hasCustomPrepend ? createBaseVNode(Fragment, null, [slots.prepend?.(slotProps), props.prependAvatar && createVNode(VAvatar, {
|
||
"key": "prepend-avatar",
|
||
"density": props.density,
|
||
"image": props.prependAvatar
|
||
}, null), props.prependIcon && createVNode(VIcon, {
|
||
"key": "prepend-icon",
|
||
"density": props.density,
|
||
"icon": props.prependIcon
|
||
}, null)]) : createVNode(VDefaultsProvider, {
|
||
"key": "prepend-defaults",
|
||
"defaults": {
|
||
VAvatar: {
|
||
density: props.density,
|
||
image: props.appendAvatar
|
||
},
|
||
VIcon: {
|
||
density: props.density,
|
||
icon: props.appendIcon
|
||
},
|
||
VListItemAction: {
|
||
start: true
|
||
}
|
||
}
|
||
}, {
|
||
default: () => [slots.prepend?.(slotProps)]
|
||
})]);
|
||
} : void 0
|
||
});
|
||
});
|
||
return forwardRefs({}, vListItemRef);
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTreeview/VTreeviewChildren.js
|
||
var makeVTreeviewChildrenProps = propsFactory({
|
||
fluid: Boolean,
|
||
disabled: Boolean,
|
||
loadChildren: Function,
|
||
loadingIcon: {
|
||
type: String,
|
||
default: "$loading"
|
||
},
|
||
items: Array,
|
||
openOnClick: {
|
||
type: Boolean,
|
||
default: void 0
|
||
},
|
||
indeterminateIcon: {
|
||
type: IconValue,
|
||
default: "$checkboxIndeterminate"
|
||
},
|
||
falseIcon: IconValue,
|
||
trueIcon: IconValue,
|
||
returnObject: Boolean,
|
||
activatable: Boolean,
|
||
selectable: Boolean,
|
||
selectedColor: String,
|
||
selectStrategy: [String, Function, Object],
|
||
index: Number,
|
||
isLastGroup: Boolean,
|
||
separateRoots: Boolean,
|
||
parentIndentLines: Array,
|
||
indentLinesVariant: String,
|
||
path: {
|
||
type: Array,
|
||
default: () => []
|
||
},
|
||
...pick(makeVTreeviewItemProps(), ["hideActions"]),
|
||
...makeDensityProps()
|
||
}, "VTreeviewChildren");
|
||
var VTreeviewChildren = genericComponent()({
|
||
name: "VTreeviewChildren",
|
||
props: makeVTreeviewChildrenProps(),
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const isLoading = reactive(/* @__PURE__ */ new Set());
|
||
const activatorItems = ref([]);
|
||
const isClickOnOpen = computed(() => !props.disabled && (props.openOnClick != null ? props.openOnClick : props.selectable && !props.activatable));
|
||
async function checkChildren(item) {
|
||
try {
|
||
if (!props.items?.length || !props.loadChildren) return;
|
||
if (item?.children?.length === 0) {
|
||
isLoading.add(item.value);
|
||
await props.loadChildren(item.raw);
|
||
}
|
||
} finally {
|
||
isLoading.delete(item.value);
|
||
}
|
||
}
|
||
function selectItem(select, isSelected) {
|
||
if (props.selectable) {
|
||
select(isSelected);
|
||
}
|
||
}
|
||
return () => slots.default?.() ?? props.items?.map((item, index, items) => {
|
||
const {
|
||
children,
|
||
props: itemProps
|
||
} = item;
|
||
const loading = isLoading.has(item.value);
|
||
const nextItemHasChildren = !!items.at(index + 1)?.children;
|
||
const depth = props.path?.length ?? 0;
|
||
const isLast = items.length - 1 === index;
|
||
const treeItemProps = {
|
||
index,
|
||
depth,
|
||
isFirst: index === 0,
|
||
isLast,
|
||
path: [...props.path, index],
|
||
hideAction: props.hideActions
|
||
};
|
||
const indentLines = getIndentLines({
|
||
depth,
|
||
isLast,
|
||
isLastGroup: props.isLastGroup,
|
||
leafLinks: !props.hideActions && !props.fluid,
|
||
separateRoots: props.separateRoots,
|
||
parentIndentLines: props.parentIndentLines,
|
||
variant: props.indentLinesVariant
|
||
});
|
||
const slotsWithItem = {
|
||
toggle: slots.toggle ? (slotProps) => slots.toggle?.({
|
||
...slotProps,
|
||
...treeItemProps,
|
||
item: item.raw,
|
||
internalItem: item,
|
||
loading
|
||
}) : void 0,
|
||
prepend: (slotProps) => createBaseVNode(Fragment, null, [props.selectable && (!children || children && !["leaf", "single-leaf"].includes(props.selectStrategy)) && createVNode(VListItemAction, {
|
||
"start": true
|
||
}, {
|
||
default: () => [createVNode(VCheckboxBtn, {
|
||
"key": item.value,
|
||
"modelValue": slotProps.isSelected,
|
||
"disabled": props.disabled || itemProps.disabled,
|
||
"loading": loading,
|
||
"color": props.selectedColor,
|
||
"density": props.density,
|
||
"indeterminate": slotProps.isIndeterminate,
|
||
"indeterminateIcon": props.indeterminateIcon,
|
||
"falseIcon": props.falseIcon,
|
||
"trueIcon": props.trueIcon,
|
||
"onUpdate:modelValue": (v) => selectItem(slotProps.select, v),
|
||
"onClick": (e) => e.stopPropagation(),
|
||
"onKeydown": (e) => {
|
||
if (!["Enter", "Space"].includes(e.key)) return;
|
||
e.stopPropagation();
|
||
selectItem(slotProps.select, slotProps.isSelected);
|
||
}
|
||
}, null)]
|
||
}), slots.prepend?.({
|
||
...slotProps,
|
||
...treeItemProps,
|
||
item: item.raw,
|
||
internalItem: item
|
||
})]),
|
||
append: slots.append ? (slotProps) => slots.append?.({
|
||
...slotProps,
|
||
...treeItemProps,
|
||
item: item.raw,
|
||
internalItem: item
|
||
}) : void 0,
|
||
title: slots.title ? (slotProps) => slots.title?.({
|
||
...slotProps,
|
||
item: item.raw,
|
||
internalItem: item
|
||
}) : void 0,
|
||
subtitle: slots.subtitle ? (slotProps) => slots.subtitle?.({
|
||
...slotProps,
|
||
item: item.raw,
|
||
internalItem: item
|
||
}) : void 0
|
||
};
|
||
const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);
|
||
const treeviewChildrenProps = VTreeviewChildren.filterProps({
|
||
...props,
|
||
...treeItemProps
|
||
});
|
||
const footerProps = {
|
||
hideActions: props.hideActions,
|
||
indentLines: indentLines.footer
|
||
};
|
||
return children ? createVNode(VTreeviewGroup, mergeProps(treeviewGroupProps, {
|
||
"value": props.returnObject ? item.raw : treeviewGroupProps?.value,
|
||
"rawId": treeviewGroupProps?.value
|
||
}), {
|
||
activator: (_ref2) => {
|
||
let {
|
||
props: activatorProps
|
||
} = _ref2;
|
||
const listItemProps = {
|
||
...itemProps,
|
||
...activatorProps,
|
||
value: itemProps?.value,
|
||
hideActions: props.hideActions,
|
||
indentLines: indentLines.node,
|
||
onToggleExpand: [() => checkChildren(item), activatorProps.onClick],
|
||
onClick: props.disabled || itemProps.disabled ? void 0 : isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : () => selectItem(activatorItems.value[index]?.select, !activatorItems.value[index]?.isSelected)
|
||
};
|
||
return renderSlot(slots.header, {
|
||
props: listItemProps,
|
||
item: item.raw,
|
||
internalItem: item,
|
||
loading
|
||
}, () => createVNode(VTreeviewItem, mergeProps({
|
||
"ref": (el) => activatorItems.value[index] = el
|
||
}, listItemProps, {
|
||
"hasCustomPrepend": !!slots.prepend,
|
||
"value": props.returnObject ? item.raw : itemProps.value,
|
||
"loading": loading
|
||
}), slotsWithItem));
|
||
},
|
||
default: () => createBaseVNode(Fragment, null, [createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
|
||
"items": children,
|
||
"indentLinesVariant": props.indentLinesVariant,
|
||
"parentIndentLines": indentLines.children,
|
||
"isLastGroup": nextItemHasChildren,
|
||
"returnObject": props.returnObject
|
||
}), slots), slots.footer?.({
|
||
props: footerProps,
|
||
item: item.raw,
|
||
internalItem: item,
|
||
loading
|
||
})])
|
||
}) : renderSlot(slots.item, {
|
||
props: itemProps,
|
||
item: item.raw,
|
||
internalItem: item
|
||
}, () => {
|
||
if (item.type === "divider") {
|
||
return renderSlot(slots.divider, {
|
||
props: item.raw
|
||
}, () => createVNode(VDivider, item.props, null));
|
||
}
|
||
if (item.type === "subheader") {
|
||
return renderSlot(slots.subheader, {
|
||
props: item.raw
|
||
}, () => createVNode(VListSubheader, item.props, null));
|
||
}
|
||
return createVNode(VTreeviewItem, mergeProps(itemProps, {
|
||
"hasCustomPrepend": !!slots.prepend,
|
||
"hideActions": props.hideActions,
|
||
"indentLines": indentLines.leaf,
|
||
"value": props.returnObject ? toRaw(item.raw) : itemProps.value
|
||
}), slotsWithItem);
|
||
});
|
||
});
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VTreeview/VTreeview.js
|
||
function flatten(items) {
|
||
let flat = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
||
for (const item of items) {
|
||
flat.push(item);
|
||
if (item.children) flatten(item.children, flat);
|
||
}
|
||
return flat;
|
||
}
|
||
var makeVTreeviewProps = propsFactory({
|
||
openAll: Boolean,
|
||
indentLines: [Boolean, String],
|
||
search: String,
|
||
hideNoData: Boolean,
|
||
noDataText: {
|
||
type: String,
|
||
default: "$vuetify.noDataText"
|
||
},
|
||
...makeFilterProps({
|
||
filterKeys: ["title"]
|
||
}),
|
||
...omit(makeVTreeviewChildrenProps(), ["index", "path", "indentLinesVariant", "parentIndentLines", "isLastGroup"]),
|
||
...omit(makeVListProps({
|
||
collapseIcon: "$treeviewCollapse",
|
||
expandIcon: "$treeviewExpand",
|
||
slim: true
|
||
}), ["nav", "openStrategy"]),
|
||
modelValue: Array
|
||
}, "VTreeview");
|
||
var VTreeview = genericComponent()({
|
||
name: "VTreeview",
|
||
props: makeVTreeviewProps(),
|
||
emits: {
|
||
"update:opened": (val) => true,
|
||
"update:activated": (val) => true,
|
||
"update:selected": (val) => true,
|
||
"update:modelValue": (val) => true,
|
||
"click:open": (value) => true,
|
||
"click:select": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots,
|
||
emit
|
||
} = _ref;
|
||
const {
|
||
t
|
||
} = useLocale();
|
||
const {
|
||
items
|
||
} = useListItems(props);
|
||
const activeColor = toRef(() => props.activeColor);
|
||
const baseColor = toRef(() => props.baseColor);
|
||
const color = toRef(() => props.color);
|
||
const activated = useProxiedModel(props, "activated");
|
||
const _selected = useProxiedModel(props, "selected");
|
||
const selected = computed({
|
||
get: () => props.modelValue ?? _selected.value,
|
||
set(val) {
|
||
_selected.value = val;
|
||
emit("update:modelValue", val);
|
||
}
|
||
});
|
||
const vListRef = ref();
|
||
const opened = computed(() => props.openAll ? openAll(items.value) : props.opened);
|
||
const flatItems = computed(() => flatten(items.value));
|
||
const search = toRef(() => props.search);
|
||
const {
|
||
filteredItems
|
||
} = useFilter(props, flatItems, search);
|
||
const visibleIds = computed(() => {
|
||
if (!search.value) return null;
|
||
const getPath = vListRef.value?.getPath;
|
||
if (!getPath) return null;
|
||
return new Set(filteredItems.value.flatMap((item) => {
|
||
const itemVal = props.returnObject ? item.raw : item.props.value;
|
||
return [...getPath(itemVal), ...getChildren(itemVal)].map(toRaw);
|
||
}));
|
||
});
|
||
function getChildren(id) {
|
||
const arr = [];
|
||
const queue = (vListRef.value?.children.get(id) ?? []).slice();
|
||
while (queue.length) {
|
||
const child = queue.shift();
|
||
if (!child) continue;
|
||
arr.push(child);
|
||
queue.push(...(vListRef.value?.children.get(child) ?? []).slice());
|
||
}
|
||
return arr;
|
||
}
|
||
function openAll(items2) {
|
||
let ids = [];
|
||
for (const i of items2) {
|
||
if (!i.children) continue;
|
||
ids.push(props.returnObject ? toRaw(i.raw) : i.value);
|
||
if (i.children) {
|
||
ids = ids.concat(openAll(i.children));
|
||
}
|
||
}
|
||
return ids;
|
||
}
|
||
provide(VTreeviewSymbol, {
|
||
visibleIds
|
||
});
|
||
provideDefaults({
|
||
VTreeviewGroup: {
|
||
activeColor,
|
||
baseColor,
|
||
color,
|
||
collapseIcon: toRef(() => props.collapseIcon),
|
||
expandIcon: toRef(() => props.expandIcon)
|
||
},
|
||
VTreeviewItem: {
|
||
activeClass: toRef(() => props.activeClass),
|
||
activeColor,
|
||
baseColor,
|
||
color,
|
||
density: toRef(() => props.density),
|
||
disabled: toRef(() => props.disabled),
|
||
lines: toRef(() => props.lines),
|
||
variant: toRef(() => props.variant)
|
||
}
|
||
});
|
||
useRender(() => {
|
||
const listProps = VList.filterProps(props);
|
||
const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
|
||
const indentLinesVariant = typeof props.indentLines === "boolean" ? "default" : props.indentLines;
|
||
return createVNode(VList, mergeProps({
|
||
"ref": vListRef
|
||
}, listProps, {
|
||
"class": ["v-treeview", {
|
||
"v-treeview--fluid": props.fluid
|
||
}, props.class],
|
||
"openStrategy": "multiple",
|
||
"style": props.style,
|
||
"opened": opened.value,
|
||
"activated": activated.value,
|
||
"onUpdate:activated": ($event) => activated.value = $event,
|
||
"selected": selected.value,
|
||
"onUpdate:selected": ($event) => selected.value = $event
|
||
}), {
|
||
default: () => [visibleIds.value?.size === 0 && !props.hideNoData && (slots["no-data"]?.() ?? createVNode(VListItem, {
|
||
"key": "no-data",
|
||
"title": t(props.noDataText)
|
||
}, null)), createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
|
||
"density": props.density,
|
||
"returnObject": props.returnObject,
|
||
"items": items.value,
|
||
"parentIndentLines": props.indentLines ? [] : void 0,
|
||
"indentLinesVariant": indentLinesVariant
|
||
}), slots)]
|
||
});
|
||
});
|
||
return {};
|
||
}
|
||
});
|
||
|
||
// node_modules/vuetify/lib/components/VValidation/VValidation.js
|
||
var VValidation = genericComponent()({
|
||
name: "VValidation",
|
||
props: makeValidationProps(),
|
||
emits: {
|
||
"update:modelValue": (value) => true
|
||
},
|
||
setup(props, _ref) {
|
||
let {
|
||
slots
|
||
} = _ref;
|
||
const validation = useValidation(props, "validation");
|
||
return () => slots.default?.(validation);
|
||
}
|
||
});
|
||
export {
|
||
VAlert,
|
||
VAlertTitle,
|
||
VApp,
|
||
VAppBar,
|
||
VAppBarNavIcon,
|
||
VAppBarTitle,
|
||
VAutocomplete,
|
||
VAvatar,
|
||
VBadge,
|
||
VBanner,
|
||
VBannerActions,
|
||
VBannerText,
|
||
VBottomNavigation,
|
||
VBottomSheet,
|
||
VBreadcrumbs,
|
||
VBreadcrumbsDivider,
|
||
VBreadcrumbsItem,
|
||
VBtn,
|
||
VBtnGroup,
|
||
VBtnToggle,
|
||
VCalendar,
|
||
VCard,
|
||
VCardActions,
|
||
VCardItem,
|
||
VCardSubtitle,
|
||
VCardText,
|
||
VCardTitle,
|
||
VCarousel,
|
||
VCarouselItem,
|
||
VCheckbox,
|
||
VCheckboxBtn,
|
||
VChip,
|
||
VChipGroup,
|
||
VClassIcon,
|
||
VCode,
|
||
VCol,
|
||
VColorPicker,
|
||
VCombobox,
|
||
VComponentIcon,
|
||
VConfirmEdit,
|
||
VContainer,
|
||
VCounter,
|
||
VDataIterator,
|
||
VDataTable,
|
||
VDataTableFooter,
|
||
VDataTableHeaders,
|
||
VDataTableRow,
|
||
VDataTableRows,
|
||
VDataTableServer,
|
||
VDataTableVirtual,
|
||
VDatePicker,
|
||
VDatePickerControls,
|
||
VDatePickerHeader,
|
||
VDatePickerMonth,
|
||
VDatePickerMonths,
|
||
VDatePickerYears,
|
||
VDefaultsProvider,
|
||
VDialog,
|
||
VDialogBottomTransition,
|
||
VDialogTopTransition,
|
||
VDialogTransition,
|
||
VDivider,
|
||
VEmptyState,
|
||
VExpandTransition,
|
||
VExpandXTransition,
|
||
VExpansionPanel,
|
||
VExpansionPanelText,
|
||
VExpansionPanelTitle,
|
||
VExpansionPanels,
|
||
VFab,
|
||
VFabTransition,
|
||
VFadeTransition,
|
||
VField,
|
||
VFieldLabel,
|
||
VFileInput,
|
||
VFooter,
|
||
VForm,
|
||
VHotkey,
|
||
VHover,
|
||
VIcon,
|
||
VImg,
|
||
VInfiniteScroll,
|
||
VInput,
|
||
VItem,
|
||
VItemGroup,
|
||
VKbd,
|
||
VLabel,
|
||
VLayout,
|
||
VLayoutItem,
|
||
VLazy,
|
||
VLigatureIcon,
|
||
VList,
|
||
VListGroup,
|
||
VListImg,
|
||
VListItem,
|
||
VListItemAction,
|
||
VListItemMedia,
|
||
VListItemSubtitle,
|
||
VListItemTitle,
|
||
VListSubheader,
|
||
VLocaleProvider,
|
||
VMain,
|
||
VMenu,
|
||
VMessages,
|
||
VNavigationDrawer,
|
||
VNoSsr,
|
||
VNumberInput,
|
||
VOtpInput,
|
||
VOverlay,
|
||
VPagination,
|
||
VParallax,
|
||
VProgressCircular,
|
||
VProgressLinear,
|
||
VRadio,
|
||
VRadioGroup,
|
||
VRangeSlider,
|
||
VRating,
|
||
VResponsive,
|
||
VRow,
|
||
VScaleTransition,
|
||
VScrollXReverseTransition,
|
||
VScrollXTransition,
|
||
VScrollYReverseTransition,
|
||
VScrollYTransition,
|
||
VSelect,
|
||
VSelectionControl,
|
||
VSelectionControlGroup,
|
||
VSheet,
|
||
VSkeletonLoader,
|
||
VSlideGroup,
|
||
VSlideGroupItem,
|
||
VSlideXReverseTransition,
|
||
VSlideXTransition,
|
||
VSlideYReverseTransition,
|
||
VSlideYTransition,
|
||
VSlider,
|
||
VSnackbar,
|
||
VSnackbarQueue,
|
||
VSpacer,
|
||
VSparkline,
|
||
VSpeedDial,
|
||
VStepper,
|
||
VStepperActions,
|
||
VStepperHeader,
|
||
VStepperItem,
|
||
VStepperWindow,
|
||
VStepperWindowItem,
|
||
VSvgIcon,
|
||
VSwitch,
|
||
VSystemBar,
|
||
VTab,
|
||
VTable,
|
||
VTabs,
|
||
VTabsWindow,
|
||
VTabsWindowItem,
|
||
VTextField,
|
||
VTextarea,
|
||
VThemeProvider,
|
||
VTimePicker,
|
||
VTimePickerClock,
|
||
VTimePickerControls,
|
||
VTimeline,
|
||
VTimelineItem,
|
||
VToolbar,
|
||
VToolbarItems,
|
||
VToolbarTitle,
|
||
VTooltip,
|
||
VTreeview,
|
||
VTreeviewGroup,
|
||
VTreeviewItem,
|
||
VValidation,
|
||
VVirtualScroll,
|
||
VWindow,
|
||
VWindowItem
|
||
};
|
||
//# sourceMappingURL=vuetify_components.js.map
|