import { useScopeId } from "./chunk-35WI6QQQ.js"; import { forwardRefs } from "./chunk-DOBNCX34.js"; import { makeDimensionProps, useDimension } from "./chunk-O7EUYO3B.js"; import { VDefaultsProvider } from "./chunk-D42AK3WB.js"; import { useBackButton, useRouter } from "./chunk-PCNFKUUR.js"; import { VDialogTransition } from "./chunk-JVZUVJAC.js"; import { MaybeTransition, makeTransitionProps } from "./chunk-XRWT7YWI.js"; import { useBackgroundColor } from "./chunk-ZZ55KHRR.js"; import { useDisplay } from "./chunk-O5EKZW2J.js"; import { useRtl } from "./chunk-IR5437QA.js"; import { useProxiedModel, useToggleScope } from "./chunk-PVQHDZXM.js"; import { makeThemeProps, provideTheme } from "./chunk-CYOEVGGH.js"; import { Box, IN_BROWSER, animate, attachedRoot, bindProps, clamp, consoleError, convertToUnit, defer, destructComputed, flipAlign, flipCorner, flipSide, focusChild, focusableChildren, genericComponent, getAxis, getCurrentInstance, getNextElement, getOverflow, getScrollParent, getScrollParents, getTargetBox, getUid, hasScrollbar, isFixedPosition, makeComponentProps, matchesSelector, nullifyTransforms, omit, parseAnchor, propsFactory, refElement, standardEasing, unbindProps, useRender } from "./chunk-I4KGD5X4.js"; import { Fragment, Teleport, Transition, computed, createVNode, effectScope, inject, mergeProps, nextTick, onBeforeUnmount, onMounted, onScopeDispose, provide, reactive, readonly, ref, resolveDirective, shallowRef, toRaw, toRef, vShow, warn, watch, watchEffect, withDirectives } from "./chunk-PD2AWGJV.js"; // node_modules/vuetify/lib/components/VMenu/VMenu.mjs import "C:/Users/Jeremy/Documents/Dev/Projects.cloudsucks.net/Vulture/VApp/node_modules/vuetify/lib/components/VMenu/VMenu.css"; // node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs import "C:/Users/Jeremy/Documents/Dev/Projects.cloudsucks.net/Vulture/VApp/node_modules/vuetify/lib/components/VOverlay/VOverlay.css"; // node_modules/vuetify/lib/components/VOverlay/util/point.mjs function elementToViewport(point, offset) { return { x: point.x + offset.x, y: point.y + offset.y }; } function getOffset(a, b) { return { x: a.x - b.x, y: a.y - b.y }; } function anchorToPoint(anchor, box) { if (anchor.side === "top" || anchor.side === "bottom") { const { side, align } = anchor; const x = align === "left" ? 0 : align === "center" ? box.width / 2 : align === "right" ? box.width : align; const y = side === "top" ? 0 : side === "bottom" ? box.height : side; return elementToViewport({ x, y }, box); } else if (anchor.side === "left" || anchor.side === "right") { const { side, align } = anchor; const x = side === "left" ? 0 : side === "right" ? box.width : side; const y = align === "top" ? 0 : align === "center" ? box.height / 2 : align === "bottom" ? box.height : align; return elementToViewport({ x, y }, box); } return elementToViewport({ x: box.width / 2, y: box.height / 2 }, box); } // node_modules/vuetify/lib/components/VOverlay/locationStrategies.mjs var locationStrategies = { static: staticLocationStrategy, // specific viewport position, usually centered connected: connectedLocationStrategy // connected to a certain element }; var makeLocationStrategyProps = propsFactory({ locationStrategy: { type: [String, Function], default: "static", validator: (val) => typeof val === "function" || val in locationStrategies }, location: { type: String, default: "bottom" }, origin: { type: String, default: "auto" }, offset: [Number, String, Array] }, "VOverlay-location-strategies"); function useLocationStrategies(props, data) { const contentStyles = ref({}); const updateLocation = ref(); if (IN_BROWSER) { useToggleScope(() => !!(data.isActive.value && props.locationStrategy), (reset) => { var _a, _b; watch(() => props.locationStrategy, reset); onScopeDispose(() => { window.removeEventListener("resize", onResize); updateLocation.value = void 0; }); window.addEventListener("resize", onResize, { passive: true }); if (typeof props.locationStrategy === "function") { updateLocation.value = (_a = props.locationStrategy(data, props, contentStyles)) == null ? void 0 : _a.updateLocation; } else { updateLocation.value = (_b = locationStrategies[props.locationStrategy](data, props, contentStyles)) == null ? void 0 : _b.updateLocation; } }); } function onResize(e) { var _a; (_a = updateLocation.value) == null ? void 0 : _a.call(updateLocation, e); } return { contentStyles, updateLocation }; } function staticLocationStrategy() { } function getIntrinsicSize(el, isRtl) { if (isRtl) { el.style.removeProperty("left"); } else { el.style.removeProperty("right"); } const contentBox = nullifyTransforms(el); if (isRtl) { contentBox.x += parseFloat(el.style.right || 0); } else { contentBox.x -= parseFloat(el.style.left || 0); } contentBox.y -= parseFloat(el.style.top || 0); return contentBox; } function connectedLocationStrategy(data, props, contentStyles) { const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value); if (activatorFixed) { Object.assign(contentStyles.value, { position: "fixed", top: 0, [data.isRtl.value ? "right" : "left"]: 0 }); } const { preferredAnchor, preferredOrigin } = destructComputed(() => { const parsedAnchor = parseAnchor(props.location, data.isRtl.value); const parsedOrigin = props.origin === "overlap" ? parsedAnchor : props.origin === "auto" ? flipSide(parsedAnchor) : parseAnchor(props.origin, data.isRtl.value); if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) { return { preferredAnchor: flipCorner(parsedAnchor), preferredOrigin: flipCorner(parsedOrigin) }; } else { return { preferredAnchor: parsedAnchor, preferredOrigin: parsedOrigin }; } }); const [minWidth, minHeight, maxWidth, maxHeight] = ["minWidth", "minHeight", "maxWidth", "maxHeight"].map((key) => { return computed(() => { const val = parseFloat(props[key]); return isNaN(val) ? Infinity : val; }); }); const offset = computed(() => { if (Array.isArray(props.offset)) { return props.offset; } if (typeof props.offset === "string") { const offset2 = props.offset.split(" ").map(parseFloat); if (offset2.length < 2) offset2.push(0); return offset2; } return typeof props.offset === "number" ? [props.offset, 0] : [0, 0]; }); let observe = false; const observer = new ResizeObserver(() => { if (observe) updateLocation(); }); watch([data.target, data.contentEl], (_ref, _ref2) => { let [newTarget, newContentEl] = _ref; let [oldTarget, oldContentEl] = _ref2; if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget); if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget); if (oldContentEl) observer.unobserve(oldContentEl); if (newContentEl) observer.observe(newContentEl); }, { immediate: true }); onScopeDispose(() => { observer.disconnect(); }); function updateLocation() { observe = false; requestAnimationFrame(() => observe = true); if (!data.target.value || !data.contentEl.value) return; const targetBox = getTargetBox(data.target.value); const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value); const scrollParents = getScrollParents(data.contentEl.value); const viewportMargin = 12; if (!scrollParents.length) { scrollParents.push(document.documentElement); if (!(data.contentEl.value.style.top && data.contentEl.value.style.left)) { contentBox.x -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x") || 0); contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y") || 0); } } const viewport = scrollParents.reduce((box, el) => { const rect = el.getBoundingClientRect(); const scrollBox = new Box({ x: el === document.documentElement ? 0 : rect.x, y: el === document.documentElement ? 0 : rect.y, width: el.clientWidth, height: el.clientHeight }); if (box) { return new Box({ x: Math.max(box.left, scrollBox.left), y: Math.max(box.top, scrollBox.top), width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left), height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top) }); } return scrollBox; }, void 0); viewport.x += viewportMargin; viewport.y += viewportMargin; viewport.width -= viewportMargin * 2; viewport.height -= viewportMargin * 2; let placement = { anchor: preferredAnchor.value, origin: preferredOrigin.value }; function checkOverflow(_placement) { const box = new Box(contentBox); const targetPoint = anchorToPoint(_placement.anchor, targetBox); const contentPoint = anchorToPoint(_placement.origin, box); let { x: x2, y: y2 } = getOffset(targetPoint, contentPoint); switch (_placement.anchor.side) { case "top": y2 -= offset.value[0]; break; case "bottom": y2 += offset.value[0]; break; case "left": x2 -= offset.value[0]; break; case "right": x2 += offset.value[0]; break; } switch (_placement.anchor.align) { case "top": y2 -= offset.value[1]; break; case "bottom": y2 += offset.value[1]; break; case "left": x2 -= offset.value[1]; break; case "right": x2 += offset.value[1]; break; } box.x += x2; box.y += y2; box.width = Math.min(box.width, maxWidth.value); box.height = Math.min(box.height, maxHeight.value); const overflows = getOverflow(box, viewport); return { overflows, x: x2, y: y2 }; } let x = 0; let y = 0; const available = { x: 0, y: 0 }; const flipped = { x: false, y: false }; let resets = -1; while (true) { if (resets++ > 10) { consoleError("Infinite loop detected in connectedLocationStrategy"); break; } const { x: _x, y: _y, overflows } = checkOverflow(placement); x += _x; y += _y; contentBox.x += _x; contentBox.y += _y; { const axis2 = getAxis(placement.anchor); const hasOverflowX = overflows.x.before || overflows.x.after; const hasOverflowY = overflows.y.before || overflows.y.after; let reset = false; ["x", "y"].forEach((key) => { if (key === "x" && hasOverflowX && !flipped.x || key === "y" && hasOverflowY && !flipped.y) { const newPlacement = { anchor: { ...placement.anchor }, origin: { ...placement.origin } }; const flip = key === "x" ? axis2 === "y" ? flipAlign : flipSide : axis2 === "y" ? flipSide : flipAlign; newPlacement.anchor = flip(newPlacement.anchor); newPlacement.origin = flip(newPlacement.origin); const { overflows: newOverflows } = checkOverflow(newPlacement); if (newOverflows[key].before <= overflows[key].before && newOverflows[key].after <= overflows[key].after || newOverflows[key].before + newOverflows[key].after < (overflows[key].before + overflows[key].after) / 2) { placement = newPlacement; reset = flipped[key] = true; } } }); if (reset) continue; } if (overflows.x.before) { x += overflows.x.before; contentBox.x += overflows.x.before; } if (overflows.x.after) { x -= overflows.x.after; contentBox.x -= overflows.x.after; } if (overflows.y.before) { y += overflows.y.before; contentBox.y += overflows.y.before; } if (overflows.y.after) { y -= overflows.y.after; contentBox.y -= overflows.y.after; } { const overflows2 = getOverflow(contentBox, viewport); available.x = viewport.width - overflows2.x.before - overflows2.x.after; available.y = viewport.height - overflows2.y.before - overflows2.y.after; x += overflows2.x.before; contentBox.x += overflows2.x.before; y += overflows2.y.before; contentBox.y += overflows2.y.before; } break; } const axis = getAxis(placement.anchor); Object.assign(contentStyles.value, { "--v-overlay-anchor-origin": `${placement.anchor.side} ${placement.anchor.align}`, transformOrigin: `${placement.origin.side} ${placement.origin.align}`, // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`, top: convertToUnit(pixelRound(y)), left: data.isRtl.value ? void 0 : convertToUnit(pixelRound(x)), right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : void 0, minWidth: convertToUnit(axis === "y" ? Math.min(minWidth.value, targetBox.width) : minWidth.value), maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))), maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value))) }); return { available, contentBox }; } watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation()); nextTick(() => { const result = updateLocation(); if (!result) return; const { available, contentBox } = result; if (contentBox.height > available.y) { requestAnimationFrame(() => { updateLocation(); requestAnimationFrame(() => { updateLocation(); }); }); } }); return { updateLocation }; } function pixelRound(val) { return Math.round(val * devicePixelRatio) / devicePixelRatio; } function pixelCeil(val) { return Math.ceil(val * devicePixelRatio) / devicePixelRatio; } // node_modules/vuetify/lib/components/VOverlay/requestNewFrame.mjs var clean = true; var frames = []; function requestNewFrame(cb) { if (!clean || frames.length) { frames.push(cb); run(); } else { clean = false; cb(); run(); } } var raf = -1; function run() { cancelAnimationFrame(raf); raf = requestAnimationFrame(() => { const frame = frames.shift(); if (frame) frame(); if (frames.length) run(); else clean = true; }); } // node_modules/vuetify/lib/components/VOverlay/scrollStrategies.mjs var scrollStrategies = { none: null, close: closeScrollStrategy, block: blockScrollStrategy, reposition: repositionScrollStrategy }; var makeScrollStrategyProps = propsFactory({ scrollStrategy: { type: [String, Function], default: "block", validator: (val) => typeof val === "function" || val in scrollStrategies } }, "VOverlay-scroll-strategies"); function useScrollStrategies(props, data) { if (!IN_BROWSER) return; let scope; watchEffect(async () => { scope == null ? void 0 : scope.stop(); if (!(data.isActive.value && props.scrollStrategy)) return; scope = effectScope(); await nextTick(); scope.active && scope.run(() => { var _a; if (typeof props.scrollStrategy === "function") { props.scrollStrategy(data, props, scope); } else { (_a = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _a.call(scrollStrategies, data, props, scope); } }); }); onScopeDispose(() => { scope == null ? void 0 : scope.stop(); }); } function closeScrollStrategy(data) { function onScroll(e) { data.isActive.value = false; } bindScroll(data.targetEl.value ?? data.contentEl.value, onScroll); } function blockScrollStrategy(data, props) { var _a; const offsetParent = (_a = data.root.value) == null ? void 0 : _a.offsetParent; const scrollElements = [.../* @__PURE__ */ new Set([...getScrollParents(data.targetEl.value, props.contained ? offsetParent : void 0), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : void 0)])].filter((el) => !el.classList.contains("v-overlay-scroll-blocked")); const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth; const scrollableParent = ((el) => hasScrollbar(el) && el)(offsetParent || document.documentElement); if (scrollableParent) { data.root.value.classList.add("v-overlay--scroll-blocked"); } scrollElements.forEach((el, i) => { el.style.setProperty("--v-body-scroll-x", convertToUnit(-el.scrollLeft)); el.style.setProperty("--v-body-scroll-y", convertToUnit(-el.scrollTop)); if (el !== document.documentElement) { el.style.setProperty("--v-scrollbar-offset", convertToUnit(scrollbarWidth)); } el.classList.add("v-overlay-scroll-blocked"); }); onScopeDispose(() => { scrollElements.forEach((el, i) => { const x = parseFloat(el.style.getPropertyValue("--v-body-scroll-x")); const y = parseFloat(el.style.getPropertyValue("--v-body-scroll-y")); const scrollBehavior = el.style.scrollBehavior; el.style.scrollBehavior = "auto"; el.style.removeProperty("--v-body-scroll-x"); el.style.removeProperty("--v-body-scroll-y"); el.style.removeProperty("--v-scrollbar-offset"); el.classList.remove("v-overlay-scroll-blocked"); el.scrollLeft = -x; el.scrollTop = -y; el.style.scrollBehavior = scrollBehavior; }); if (scrollableParent) { data.root.value.classList.remove("v-overlay--scroll-blocked"); } }); } function repositionScrollStrategy(data, props, scope) { let slow = false; let raf2 = -1; let ric = -1; function update(e) { requestNewFrame(() => { var _a, _b; const start = performance.now(); (_b = (_a = data.updateLocation).value) == null ? void 0 : _b.call(_a, e); const time = performance.now() - start; slow = time / (1e3 / 60) > 2; }); } ric = (typeof requestIdleCallback === "undefined" ? (cb) => cb() : requestIdleCallback)(() => { scope.run(() => { bindScroll(data.targetEl.value ?? data.contentEl.value, (e) => { if (slow) { cancelAnimationFrame(raf2); raf2 = requestAnimationFrame(() => { raf2 = requestAnimationFrame(() => { update(e); }); }); } else { update(e); } }); }); }); onScopeDispose(() => { typeof cancelIdleCallback !== "undefined" && cancelIdleCallback(ric); cancelAnimationFrame(raf2); }); } function bindScroll(el, onScroll) { const scrollElements = [document, ...getScrollParents(el)]; scrollElements.forEach((el2) => { el2.addEventListener("scroll", onScroll, { passive: true }); }); onScopeDispose(() => { scrollElements.forEach((el2) => { el2.removeEventListener("scroll", onScroll); }); }); } // node_modules/vuetify/lib/components/VMenu/shared.mjs var VMenuSymbol = Symbol.for("vuetify:v-menu"); // node_modules/vuetify/lib/composables/delay.mjs var makeDelayProps = propsFactory({ closeDelay: [Number, String], openDelay: [Number, String] }, "delay"); function useDelay(props, cb) { let clearDelay = () => { }; function runDelay(isOpening) { clearDelay == null ? void 0 : clearDelay(); const delay = Number(isOpening ? props.openDelay : props.closeDelay); return new Promise((resolve) => { clearDelay = defer(delay, () => { cb == null ? void 0 : cb(isOpening); resolve(isOpening); }); }); } function runOpenDelay() { return runDelay(true); } function runCloseDelay() { return runDelay(false); } return { clearDelay, runOpenDelay, runCloseDelay }; } // node_modules/vuetify/lib/components/VOverlay/useActivator.mjs var makeActivatorProps = propsFactory({ target: [String, Object], activator: [String, Object], activatorProps: { type: Object, default: () => ({}) }, openOnClick: { type: Boolean, default: void 0 }, openOnHover: Boolean, openOnFocus: { type: Boolean, default: void 0 }, closeOnContentClick: Boolean, ...makeDelayProps() }, "VOverlay-activator"); function useActivator(props, _ref) { let { isActive, isTop } = _ref; const vm = getCurrentInstance("useActivator"); const activatorEl = ref(); let isHovered = false; let isFocused = false; let firstEnter = true; const openOnFocus = computed(() => props.openOnFocus || props.openOnFocus == null && props.openOnHover); const openOnClick = computed(() => props.openOnClick || props.openOnClick == null && !props.openOnHover && !openOnFocus.value); const { runOpenDelay, runCloseDelay } = useDelay(props, (value) => { if (value === (props.openOnHover && isHovered || openOnFocus.value && isFocused) && !(props.openOnHover && isActive.value && !isTop.value)) { if (isActive.value !== value) { firstEnter = true; } isActive.value = value; } }); const cursorTarget = ref(); const availableEvents = { onClick: (e) => { e.stopPropagation(); activatorEl.value = e.currentTarget || e.target; if (!isActive.value) { cursorTarget.value = [e.clientX, e.clientY]; } isActive.value = !isActive.value; }, onMouseenter: (e) => { var _a; if ((_a = e.sourceCapabilities) == null ? void 0 : _a.firesTouchEvents) return; isHovered = true; activatorEl.value = e.currentTarget || e.target; runOpenDelay(); }, onMouseleave: (e) => { isHovered = false; runCloseDelay(); }, onFocus: (e) => { if (matchesSelector(e.target, ":focus-visible") === false) return; isFocused = true; e.stopPropagation(); activatorEl.value = e.currentTarget || e.target; runOpenDelay(); }, onBlur: (e) => { isFocused = false; e.stopPropagation(); runCloseDelay(); } }; const activatorEvents = computed(() => { const events = {}; if (openOnClick.value) { events.onClick = availableEvents.onClick; } if (props.openOnHover) { events.onMouseenter = availableEvents.onMouseenter; events.onMouseleave = availableEvents.onMouseleave; } if (openOnFocus.value) { events.onFocus = availableEvents.onFocus; events.onBlur = availableEvents.onBlur; } return events; }); const contentEvents = computed(() => { const events = {}; if (props.openOnHover) { events.onMouseenter = () => { isHovered = true; runOpenDelay(); }; events.onMouseleave = () => { isHovered = false; runCloseDelay(); }; } if (openOnFocus.value) { events.onFocusin = () => { isFocused = true; runOpenDelay(); }; events.onFocusout = () => { isFocused = false; runCloseDelay(); }; } if (props.closeOnContentClick) { const menu = inject(VMenuSymbol, null); events.onClick = () => { isActive.value = false; menu == null ? void 0 : menu.closeParents(); }; } return events; }); const scrimEvents = computed(() => { const events = {}; if (props.openOnHover) { events.onMouseenter = () => { if (firstEnter) { isHovered = true; firstEnter = false; runOpenDelay(); } }; events.onMouseleave = () => { isHovered = false; runCloseDelay(); }; } return events; }); watch(isTop, (val) => { if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered))) { isActive.value = false; } }); watch(isActive, (val) => { if (!val) { setTimeout(() => { cursorTarget.value = void 0; }); } }, { flush: "post" }); const activatorRef = ref(); watchEffect(() => { if (!activatorRef.value) return; nextTick(() => { activatorEl.value = refElement(activatorRef.value); }); }); const targetRef = ref(); const target = computed(() => { if (props.target === "cursor" && cursorTarget.value) return cursorTarget.value; if (targetRef.value) return refElement(targetRef.value); return getTarget(props.target, vm) || activatorEl.value; }); const targetEl = computed(() => { return Array.isArray(target.value) ? void 0 : target.value; }); let scope; watch(() => !!props.activator, (val) => { if (val && IN_BROWSER) { scope = effectScope(); scope.run(() => { _useActivator(props, vm, { activatorEl, activatorEvents }); }); } else if (scope) { scope.stop(); } }, { flush: "post", immediate: true }); onScopeDispose(() => { scope == null ? void 0 : scope.stop(); }); return { activatorEl, activatorRef, target, targetEl, targetRef, activatorEvents, contentEvents, scrimEvents }; } function _useActivator(props, vm, _ref2) { let { activatorEl, activatorEvents } = _ref2; watch(() => props.activator, (val, oldVal) => { if (oldVal && val !== oldVal) { const activator = getActivator(oldVal); activator && unbindActivatorProps(activator); } if (val) { nextTick(() => bindActivatorProps()); } }, { immediate: true }); watch(() => props.activatorProps, () => { bindActivatorProps(); }); onScopeDispose(() => { unbindActivatorProps(); }); function bindActivatorProps() { let el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getActivator(); let _props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : props.activatorProps; if (!el) return; bindProps(el, mergeProps(activatorEvents.value, _props)); } function unbindActivatorProps() { let el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getActivator(); let _props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : props.activatorProps; if (!el) return; unbindProps(el, mergeProps(activatorEvents.value, _props)); } function getActivator() { let selector = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : props.activator; const activator = getTarget(selector, vm); activatorEl.value = (activator == null ? void 0 : activator.nodeType) === Node.ELEMENT_NODE ? activator : void 0; return activatorEl.value; } } function getTarget(selector, vm) { var _a, _b; if (!selector) return; let target; if (selector === "parent") { let el = (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$el) == null ? void 0 : _b.parentNode; while (el == null ? void 0 : el.hasAttribute("data-no-activator")) { el = el.parentNode; } target = el; } else if (typeof selector === "string") { target = document.querySelector(selector); } else if ("$el" in selector) { target = selector.$el; } else { target = selector; } return target; } // node_modules/vuetify/lib/composables/hydration.mjs function useHydration() { if (!IN_BROWSER) return shallowRef(false); const { ssr } = useDisplay(); if (ssr) { const isMounted = shallowRef(false); onMounted(() => { isMounted.value = true; }); return isMounted; } else { return shallowRef(true); } } // node_modules/vuetify/lib/composables/lazy.mjs var makeLazyProps = propsFactory({ eager: Boolean }, "lazy"); function useLazy(props, active) { const isBooted = shallowRef(false); const hasContent = computed(() => isBooted.value || props.eager || active.value); watch(active, () => isBooted.value = true); function onAfterLeave() { if (!props.eager) isBooted.value = false; } return { isBooted, hasContent, onAfterLeave }; } // node_modules/vuetify/lib/composables/stack.mjs var StackSymbol = Symbol.for("vuetify:stack"); var globalStack = reactive([]); function useStack(isActive, zIndex, disableGlobalStack) { const vm = getCurrentInstance("useStack"); const createStackEntry = !disableGlobalStack; const parent = inject(StackSymbol, void 0); const stack = reactive({ activeChildren: /* @__PURE__ */ new Set() }); provide(StackSymbol, stack); const _zIndex = shallowRef(+zIndex.value); useToggleScope(isActive, () => { var _a; const lastZIndex = (_a = globalStack.at(-1)) == null ? void 0 : _a[1]; _zIndex.value = lastZIndex ? lastZIndex + 10 : +zIndex.value; if (createStackEntry) { globalStack.push([vm.uid, _zIndex.value]); } parent == null ? void 0 : parent.activeChildren.add(vm.uid); onScopeDispose(() => { if (createStackEntry) { const idx = toRaw(globalStack).findIndex((v) => v[0] === vm.uid); globalStack.splice(idx, 1); } parent == null ? void 0 : parent.activeChildren.delete(vm.uid); }); }); const globalTop = shallowRef(true); if (createStackEntry) { watchEffect(() => { var _a; const _isTop = ((_a = globalStack.at(-1)) == null ? void 0 : _a[0]) === vm.uid; setTimeout(() => globalTop.value = _isTop); }); } const localTop = computed(() => !stack.activeChildren.size); return { globalTop: readonly(globalTop), localTop, stackStyles: computed(() => ({ zIndex: _zIndex.value })) }; } // node_modules/vuetify/lib/composables/teleport.mjs function useTeleport(target) { const teleportTarget = computed(() => { const _target = target.value; if (_target === true || !IN_BROWSER) return void 0; const targetElement = _target === false ? document.body : typeof _target === "string" ? document.querySelector(_target) : _target; if (targetElement == null) { warn(`Unable to locate target ${_target}`); return void 0; } let container = targetElement.querySelector(":scope > .v-overlay-container"); if (!container) { container = document.createElement("div"); container.className = "v-overlay-container"; targetElement.appendChild(container); } return container; }); return { teleportTarget }; } // node_modules/vuetify/lib/directives/click-outside/index.mjs function defaultConditional() { return true; } function checkEvent(e, el, binding) { if (!e || checkIsActive(e, binding) === false) return false; const root = attachedRoot(el); if (typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot && root.host === e.target) return false; const elements = (typeof binding.value === "object" && binding.value.include || (() => []))(); elements.push(el); return !elements.some((el2) => el2 == null ? void 0 : el2.contains(e.target)); } function checkIsActive(e, binding) { const isActive = typeof binding.value === "object" && binding.value.closeConditional || defaultConditional; return isActive(e); } function directive(e, el, binding) { const handler = typeof binding.value === "function" ? binding.value : binding.value.handler; el._clickOutside.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => { checkIsActive(e, binding) && handler && handler(e); }, 0); } function handleShadow(el, callback) { const root = attachedRoot(el); callback(document); if (typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot) { callback(root); } } var ClickOutside = { // [data-app] may not be found // if using bind, inserted makes // sure that the root element is // available, iOS does not support // clicks on body mounted(el, binding) { const onClick = (e) => directive(e, el, binding); const onMousedown = (e) => { el._clickOutside.lastMousedownWasOutside = checkEvent(e, el, binding); }; handleShadow(el, (app) => { app.addEventListener("click", onClick, true); app.addEventListener("mousedown", onMousedown, true); }); if (!el._clickOutside) { el._clickOutside = { lastMousedownWasOutside: false }; } el._clickOutside[binding.instance.$.uid] = { onClick, onMousedown }; }, unmounted(el, binding) { if (!el._clickOutside) return; handleShadow(el, (app) => { var _a; if (!app || !((_a = el._clickOutside) == null ? void 0 : _a[binding.instance.$.uid])) return; const { onClick, onMousedown } = el._clickOutside[binding.instance.$.uid]; app.removeEventListener("click", onClick, true); app.removeEventListener("mousedown", onMousedown, true); }); delete el._clickOutside[binding.instance.$.uid]; } }; // node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs function Scrim(props) { const { modelValue, color, ...rest } = props; return createVNode(Transition, { "name": "fade-transition", "appear": true }, { default: () => [props.modelValue && createVNode("div", mergeProps({ "class": ["v-overlay__scrim", props.color.backgroundColorClasses.value], "style": props.color.backgroundColorStyles.value }, rest), null)] }); } var makeVOverlayProps = propsFactory({ absolute: Boolean, attach: [Boolean, String, Object], closeOnBack: { type: Boolean, default: true }, contained: Boolean, contentClass: null, contentProps: null, disabled: Boolean, opacity: [Number, String], noClickAnimation: Boolean, modelValue: Boolean, persistent: Boolean, scrim: { type: [Boolean, String], default: true }, zIndex: { type: [Number, String], default: 2e3 }, ...makeActivatorProps(), ...makeComponentProps(), ...makeDimensionProps(), ...makeLazyProps(), ...makeLocationStrategyProps(), ...makeScrollStrategyProps(), ...makeThemeProps(), ...makeTransitionProps() }, "VOverlay"); var VOverlay = genericComponent()({ name: "VOverlay", directives: { ClickOutside }, inheritAttrs: false, props: { _disableGlobalStack: Boolean, ...makeVOverlayProps() }, emits: { "click:outside": (e) => true, "update:modelValue": (value) => true, afterLeave: () => true }, setup(props, _ref) { let { slots, attrs, emit } = _ref; const model = useProxiedModel(props, "modelValue"); const isActive = computed({ get: () => model.value, set: (v) => { if (!(v && props.disabled)) model.value = v; } }); const { teleportTarget } = useTeleport(computed(() => props.attach || props.contained)); const { themeClasses } = provideTheme(props); const { rtlClasses, isRtl } = useRtl(); const { hasContent, onAfterLeave: _onAfterLeave } = useLazy(props, isActive); const scrimColor = useBackgroundColor(computed(() => { return typeof props.scrim === "string" ? props.scrim : null; })); const { globalTop, localTop, stackStyles } = useStack(isActive, toRef(props, "zIndex"), props._disableGlobalStack); const { activatorEl, activatorRef, target, targetEl, targetRef, activatorEvents, contentEvents, scrimEvents } = useActivator(props, { isActive, isTop: localTop }); const { dimensionStyles } = useDimension(props); const isMounted = useHydration(); const { scopeId } = useScopeId(); watch(() => props.disabled, (v) => { if (v) isActive.value = false; }); const root = ref(); const contentEl = ref(); const { contentStyles, updateLocation } = useLocationStrategies(props, { isRtl, contentEl, target, isActive }); useScrollStrategies(props, { root, contentEl, targetEl, isActive, updateLocation }); function onClickOutside(e) { emit("click:outside", e); if (!props.persistent) isActive.value = false; else animateClick(); } function closeConditional() { return isActive.value && globalTop.value; } IN_BROWSER && watch(isActive, (val) => { if (val) { window.addEventListener("keydown", onKeydown); } else { window.removeEventListener("keydown", onKeydown); } }, { immediate: true }); onBeforeUnmount(() => { if (!IN_BROWSER) return; window.removeEventListener("keydown", onKeydown); }); function onKeydown(e) { var _a, _b; if (e.key === "Escape" && globalTop.value) { if (!props.persistent) { isActive.value = false; if ((_a = contentEl.value) == null ? void 0 : _a.contains(document.activeElement)) { (_b = activatorEl.value) == null ? void 0 : _b.focus(); } } else animateClick(); } } const router = useRouter(); useToggleScope(() => props.closeOnBack, () => { useBackButton(router, (next) => { if (globalTop.value && isActive.value) { next(false); if (!props.persistent) isActive.value = false; else animateClick(); } else { next(); } }); }); const top = ref(); watch(() => isActive.value && (props.absolute || props.contained) && teleportTarget.value == null, (val) => { if (val) { const scrollParent = getScrollParent(root.value); if (scrollParent && scrollParent !== document.scrollingElement) { top.value = scrollParent.scrollTop; } } }); function animateClick() { if (props.noClickAnimation) return; contentEl.value && animate(contentEl.value, [{ transformOrigin: "center" }, { transform: "scale(1.03)" }, { transformOrigin: "center" }], { duration: 150, easing: standardEasing }); } function onAfterLeave() { _onAfterLeave(); emit("afterLeave"); } useRender(() => { var _a; return createVNode(Fragment, null, [(_a = slots.activator) == null ? void 0 : _a.call(slots, { isActive: isActive.value, props: mergeProps({ ref: activatorRef, targetRef }, activatorEvents.value, props.activatorProps) }), isMounted.value && hasContent.value && createVNode(Teleport, { "disabled": !teleportTarget.value, "to": teleportTarget.value }, { default: () => [createVNode("div", mergeProps({ "class": ["v-overlay", { "v-overlay--absolute": props.absolute || props.contained, "v-overlay--active": isActive.value, "v-overlay--contained": props.contained }, themeClasses.value, rtlClasses.value, props.class], "style": [stackStyles.value, { "--v-overlay-opacity": props.opacity, top: convertToUnit(top.value) }, props.style], "ref": root }, scopeId, attrs), [createVNode(Scrim, mergeProps({ "color": scrimColor, "modelValue": isActive.value && !!props.scrim }, scrimEvents.value), null), createVNode(MaybeTransition, { "appear": true, "persisted": true, "transition": props.transition, "target": target.value, "onAfterLeave": onAfterLeave }, { default: () => { var _a2; return [withDirectives(createVNode("div", mergeProps({ "ref": contentEl, "class": ["v-overlay__content", props.contentClass], "style": [dimensionStyles.value, contentStyles.value] }, contentEvents.value, props.contentProps), [(_a2 = slots.default) == null ? void 0 : _a2.call(slots, { isActive })]), [[vShow, isActive.value], [resolveDirective("click-outside"), { handler: onClickOutside, closeConditional, include: () => [activatorEl.value] }]])]; } })])] })]); }); return { activatorEl, target, animateClick, contentEl, globalTop, localTop, updateLocation }; } }); // node_modules/vuetify/lib/components/VMenu/VMenu.mjs var makeVMenuProps = propsFactory({ // TODO // disableKeys: Boolean, id: String, ...omit(makeVOverlayProps({ closeDelay: 250, closeOnContentClick: true, locationStrategy: "connected", openDelay: 300, scrim: false, scrollStrategy: "reposition", transition: { component: VDialogTransition } }), ["absolute"]) }, "VMenu"); var VMenu = genericComponent()({ name: "VMenu", props: makeVMenuProps(), emits: { "update:modelValue": (value) => true }, setup(props, _ref) { let { slots } = _ref; const isActive = useProxiedModel(props, "modelValue"); const { scopeId } = useScopeId(); const uid = getUid(); const id = computed(() => props.id || `v-menu-${uid}`); const overlay = ref(); const parent = inject(VMenuSymbol, null); const openChildren = shallowRef(0); provide(VMenuSymbol, { register() { ++openChildren.value; }, unregister() { --openChildren.value; }, closeParents() { setTimeout(() => { if (!openChildren.value) { isActive.value = false; parent == null ? void 0 : parent.closeParents(); } }, 40); } }); async function onFocusIn(e) { var _a, _b, _c; const before = e.relatedTarget; const after = e.target; await nextTick(); if (isActive.value && before !== after && ((_a = overlay.value) == null ? void 0 : _a.contentEl) && // We're the topmost menu ((_b = overlay.value) == null ? void 0 : _b.globalTop) && // It isn't the document or the menu body ![document, overlay.value.contentEl].includes(after) && // It isn't inside the menu body !overlay.value.contentEl.contains(after)) { const focusable = focusableChildren(overlay.value.contentEl); (_c = focusable[0]) == null ? void 0 : _c.focus(); } } watch(isActive, (val) => { if (val) { parent == null ? void 0 : parent.register(); document.addEventListener("focusin", onFocusIn, { once: true }); } else { parent == null ? void 0 : parent.unregister(); document.removeEventListener("focusin", onFocusIn); } }); function onClickOutside() { parent == null ? void 0 : parent.closeParents(); } function onKeydown(e) { var _a, _b, _c; if (props.disabled) return; if (e.key === "Tab") { const nextElement = getNextElement(focusableChildren((_a = overlay.value) == null ? void 0 : _a.contentEl, false), e.shiftKey ? "prev" : "next", (el) => el.tabIndex >= 0); if (!nextElement) { isActive.value = false; (_c = (_b = overlay.value) == null ? void 0 : _b.activatorEl) == null ? void 0 : _c.focus(); } } } function onActivatorKeydown(e) { var _a; if (props.disabled) return; const el = (_a = overlay.value) == null ? void 0 : _a.contentEl; if (el && isActive.value) { if (e.key === "ArrowDown") { e.preventDefault(); focusChild(el, "next"); } else if (e.key === "ArrowUp") { e.preventDefault(); focusChild(el, "prev"); } } else if (["ArrowDown", "ArrowUp"].includes(e.key)) { isActive.value = true; e.preventDefault(); setTimeout(() => setTimeout(() => onActivatorKeydown(e))); } } const activatorProps = computed(() => mergeProps({ "aria-haspopup": "menu", "aria-expanded": String(isActive.value), "aria-owns": id.value, onKeydown: onActivatorKeydown }, props.activatorProps)); useRender(() => { const overlayProps = VOverlay.filterProps(props); return createVNode(VOverlay, mergeProps({ "ref": overlay, "id": id.value, "class": ["v-menu", props.class], "style": props.style }, overlayProps, { "modelValue": isActive.value, "onUpdate:modelValue": ($event) => isActive.value = $event, "absolute": true, "activatorProps": activatorProps.value, "onClick:outside": onClickOutside, "onKeydown": onKeydown }, scopeId), { activator: slots.activator, default: function() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return createVNode(VDefaultsProvider, { "root": "VMenu" }, { default: () => { var _a; return [(_a = slots.default) == null ? void 0 : _a.call(slots, ...args)]; } }); } }); }); return forwardRefs({ id, ΨopenChildren: openChildren }, overlay); } }); export { VMenu }; //# sourceMappingURL=chunk-7GUKMFNW.js.map