import { useProxiedModel, useRtl } from "./chunk-QN4ZFON4.js"; import { useBackgroundColor, useColor, useTextColor } from "./chunk-NW4NIPSU.js"; import { makeTagProps } from "./chunk-JH5IUXR2.js"; import { makeThemeProps, provideTheme } from "./chunk-ILOYNRQG.js"; import { IN_BROWSER, SUPPORTS_INTERSECTION, clamp, convertToUnit, deepEqual, genericComponent, getCurrentInstance, getCurrentInstanceName, hasEvent, makeComponentProps, parseAnchor, propsFactory, provideDefaults, useRender } from "./chunk-ADPJOAU6.js"; import { Fragment, Transition, computed, createBaseVNode, createVNode, isRef, nextTick, normalizeClass, normalizeStyle, onScopeDispose, reactive, ref, resolveDynamicComponent, shallowRef, toRef, toRefs, toValue, watch } from "./chunk-FIAHBV72.js"; // node_modules/vuetify/lib/composables/rounded.js var makeRoundedProps = propsFactory({ rounded: { type: [Boolean, Number, String], default: void 0 }, tile: Boolean }, "rounded"); function useRounded(props) { let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName(); const roundedClasses = computed(() => { const rounded = isRef(props) ? props.value : props.rounded; const tile = isRef(props) ? props.value : props.tile; const classes = []; if (rounded === true || rounded === "") { classes.push(`${name}--rounded`); } else if (typeof rounded === "string" || rounded === 0) { for (const value of String(rounded).split(" ")) { classes.push(`rounded-${value}`); } } else if (tile || rounded === false) { classes.push("rounded-0"); } return classes; }); return { roundedClasses }; } // node_modules/vuetify/lib/composables/variant.js var allowedVariants = ["elevated", "flat", "tonal", "outlined", "text", "plain"]; function genOverlays(isClickable, name) { return createBaseVNode(Fragment, null, [isClickable && createBaseVNode("span", { "key": "overlay", "class": normalizeClass(`${name}__overlay`) }, null), createBaseVNode("span", { "key": "underlay", "class": normalizeClass(`${name}__underlay`) }, null)]); } var makeVariantProps = propsFactory({ color: String, variant: { type: String, default: "elevated", validator: (v) => allowedVariants.includes(v) } }, "variant"); function useVariant(props) { let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName(); const variantClasses = toRef(() => { const { variant } = toValue(props); return `${name}--variant-${variant}`; }); const { colorClasses, colorStyles } = useColor(() => { const { variant, color } = toValue(props); return { [["elevated", "flat"].includes(variant) ? "background" : "text"]: color }; }); return { colorClasses, colorStyles, variantClasses }; } // node_modules/vuetify/lib/components/VDefaultsProvider/VDefaultsProvider.js var makeVDefaultsProviderProps = propsFactory({ defaults: Object, disabled: Boolean, reset: [Number, String], root: [Boolean, String], scoped: Boolean }, "VDefaultsProvider"); var VDefaultsProvider = genericComponent(false)({ name: "VDefaultsProvider", props: makeVDefaultsProviderProps(), setup(props, _ref) { let { slots } = _ref; const { defaults, disabled, reset, root, scoped } = toRefs(props); provideDefaults(defaults, { reset, root, scoped, disabled }); return () => { var _a; return (_a = slots.default) == null ? void 0 : _a.call(slots); }; } }); // node_modules/vuetify/lib/composables/location.js var oppositeMap = { center: "center", top: "bottom", bottom: "top", left: "right", right: "left" }; var makeLocationProps = propsFactory({ location: String }, "location"); function useLocation(props) { let opposite = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; let offset = arguments.length > 2 ? arguments[2] : void 0; const { isRtl } = useRtl(); const locationStyles = computed(() => { if (!props.location) return {}; const { side, align } = parseAnchor(props.location.split(" ").length > 1 ? props.location : `${props.location} center`, isRtl.value); function getOffset(side2) { return offset ? offset(side2) : 0; } const styles = {}; if (side !== "center") { if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`; else styles[side] = 0; } if (align !== "center") { if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`; else styles[align] = 0; } else { if (side === "center") styles.top = styles.left = "50%"; else { styles[{ top: "left", bottom: "left", left: "top", right: "top" }[side]] = "50%"; } styles.transform = { top: "translateX(-50%)", bottom: "translateX(-50%)", left: "translateY(-50%)", right: "translateY(-50%)", center: "translate(-50%, -50%)" }[side]; } return styles; }); return { locationStyles }; } // node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.js import "/Users/JasonJFraser/Desktop/apps/cmms/frontend/node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.css"; // node_modules/vuetify/lib/composables/intersectionObserver.js function useIntersectionObserver(callback, options) { const intersectionRef = ref(); const isIntersecting = shallowRef(false); if (SUPPORTS_INTERSECTION) { const observer = new IntersectionObserver((entries) => { callback == null ? void 0 : callback(entries, observer); isIntersecting.value = !!entries.find((entry) => entry.isIntersecting); }, options); onScopeDispose(() => { observer.disconnect(); }); watch(intersectionRef, (newValue, oldValue) => { if (oldValue) { observer.unobserve(oldValue); isIntersecting.value = false; } if (newValue) observer.observe(newValue); }, { flush: "post" }); } return { intersectionRef, isIntersecting }; } // node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.js var makeVProgressLinearProps = propsFactory({ absolute: Boolean, active: { type: Boolean, default: true }, bgColor: String, bgOpacity: [Number, String], bufferValue: { type: [Number, String], default: 0 }, bufferColor: String, bufferOpacity: [Number, String], clickable: Boolean, color: String, height: { type: [Number, String], default: 4 }, indeterminate: Boolean, max: { type: [Number, String], default: 100 }, modelValue: { type: [Number, String], default: 0 }, opacity: [Number, String], reverse: Boolean, stream: Boolean, striped: Boolean, roundedBar: Boolean, ...makeComponentProps(), ...makeLocationProps({ location: "top" }), ...makeRoundedProps(), ...makeTagProps(), ...makeThemeProps() }, "VProgressLinear"); var VProgressLinear = genericComponent()({ name: "VProgressLinear", props: makeVProgressLinearProps(), emits: { "update:modelValue": (value) => true }, setup(props, _ref) { var _a; let { slots } = _ref; const progress = useProxiedModel(props, "modelValue"); const { isRtl, rtlClasses } = useRtl(); const { themeClasses } = provideTheme(props); const { locationStyles } = useLocation(props); const { textColorClasses, textColorStyles } = useTextColor(() => props.color); const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(() => props.bgColor || props.color); const { backgroundColorClasses: bufferColorClasses, backgroundColorStyles: bufferColorStyles } = useBackgroundColor(() => props.bufferColor || props.bgColor || props.color); const { backgroundColorClasses: barColorClasses, backgroundColorStyles: barColorStyles } = useBackgroundColor(() => props.color); const { roundedClasses } = useRounded(props); const { intersectionRef, isIntersecting } = useIntersectionObserver(); const max = computed(() => parseFloat(props.max)); const height = computed(() => parseFloat(props.height)); const normalizedBuffer = computed(() => clamp(parseFloat(props.bufferValue) / max.value * 100, 0, 100)); const normalizedValue = computed(() => clamp(parseFloat(progress.value) / max.value * 100, 0, 100)); const isReversed = computed(() => isRtl.value !== props.reverse); const transition = computed(() => props.indeterminate ? "fade-transition" : "slide-x-transition"); const isForcedColorsModeActive = IN_BROWSER && ((_a = window.matchMedia) == null ? void 0 : _a.call(window, "(forced-colors: active)").matches); function handleClick(e) { if (!intersectionRef.value) return; const { left, right, width } = intersectionRef.value.getBoundingClientRect(); const value = isReversed.value ? width - e.clientX + (right - width) : e.clientX - left; progress.value = Math.round(value / width * max.value); } useRender(() => createVNode(props.tag, { "ref": intersectionRef, "class": normalizeClass(["v-progress-linear", { "v-progress-linear--absolute": props.absolute, "v-progress-linear--active": props.active && isIntersecting.value, "v-progress-linear--reverse": isReversed.value, "v-progress-linear--rounded": props.rounded, "v-progress-linear--rounded-bar": props.roundedBar, "v-progress-linear--striped": props.striped, "v-progress-linear--clickable": props.clickable }, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class]), "style": normalizeStyle([{ bottom: props.location === "bottom" ? 0 : void 0, top: props.location === "top" ? 0 : void 0, height: props.active ? convertToUnit(height.value) : 0, "--v-progress-linear-height": convertToUnit(height.value), ...props.absolute ? locationStyles.value : {} }, props.style]), "role": "progressbar", "aria-hidden": props.active ? "false" : "true", "aria-valuemin": "0", "aria-valuemax": props.max, "aria-valuenow": props.indeterminate ? void 0 : Math.min(parseFloat(progress.value), max.value), "onClick": props.clickable && handleClick }, { default: () => [props.stream && createBaseVNode("div", { "key": "stream", "class": normalizeClass(["v-progress-linear__stream", textColorClasses.value]), "style": { ...textColorStyles.value, [isReversed.value ? "left" : "right"]: convertToUnit(-height.value), borderTop: `${convertToUnit(height.value / 2)} dotted`, opacity: parseFloat(props.bufferOpacity), top: `calc(50% - ${convertToUnit(height.value / 4)})`, width: convertToUnit(100 - normalizedBuffer.value, "%"), "--v-progress-linear-stream-to": convertToUnit(height.value * (isReversed.value ? 1 : -1)) } }, null), createBaseVNode("div", { "class": normalizeClass(["v-progress-linear__background", !isForcedColorsModeActive ? backgroundColorClasses.value : void 0]), "style": normalizeStyle([backgroundColorStyles.value, { opacity: parseFloat(props.bgOpacity), width: props.stream ? 0 : void 0 }]) }, null), createBaseVNode("div", { "class": normalizeClass(["v-progress-linear__buffer", !isForcedColorsModeActive ? bufferColorClasses.value : void 0]), "style": normalizeStyle([bufferColorStyles.value, { opacity: parseFloat(props.bufferOpacity), width: convertToUnit(normalizedBuffer.value, "%") }]) }, null), createVNode(Transition, { "name": transition.value }, { default: () => [!props.indeterminate ? createBaseVNode("div", { "class": normalizeClass(["v-progress-linear__determinate", !isForcedColorsModeActive ? barColorClasses.value : void 0]), "style": normalizeStyle([barColorStyles.value, { width: convertToUnit(normalizedValue.value, "%") }]) }, null) : createBaseVNode("div", { "class": "v-progress-linear__indeterminate" }, [["long", "short"].map((bar) => createBaseVNode("div", { "key": bar, "class": normalizeClass(["v-progress-linear__indeterminate", bar, !isForcedColorsModeActive ? barColorClasses.value : void 0]), "style": normalizeStyle(barColorStyles.value) }, null))])] }), slots.default && createBaseVNode("div", { "class": "v-progress-linear__content" }, [slots.default({ value: normalizedValue.value, buffer: normalizedBuffer.value })])] })); return {}; } }); // node_modules/vuetify/lib/composables/position.js var positionValues = ["static", "relative", "fixed", "absolute", "sticky"]; var makePositionProps = propsFactory({ position: { type: String, validator: ( /* istanbul ignore next */ (v) => positionValues.includes(v) ) } }, "position"); function usePosition(props) { let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName(); const positionClasses = toRef(() => { return props.position ? `${name}--${props.position}` : void 0; }); return { positionClasses }; } // node_modules/vuetify/lib/composables/router.js function useRoute() { const vm = getCurrentInstance("useRoute"); return computed(() => { var _a; return (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$route; }); } function useRouter() { var _a, _b; return (_b = (_a = getCurrentInstance("useRouter")) == null ? void 0 : _a.proxy) == null ? void 0 : _b.$router; } function useLink(props, attrs) { var _a, _b; const RouterLink = resolveDynamicComponent("RouterLink"); const isLink = toRef(() => !!(props.href || props.to)); const isClickable = computed(() => { return (isLink == null ? void 0 : isLink.value) || hasEvent(attrs, "click") || hasEvent(props, "click"); }); if (typeof RouterLink === "string" || !("useLink" in RouterLink)) { const href2 = toRef(() => props.href); return { isLink, isClickable, href: href2, linkProps: reactive({ href: href2 }) }; } const routerLink = RouterLink.useLink({ to: toRef(() => props.to || ""), replace: toRef(() => props.replace) }); const link = computed(() => props.to ? routerLink : void 0); const route = useRoute(); const isActive = computed(() => { var _a2, _b2, _c; if (!link.value) return false; if (!props.exact) return ((_a2 = link.value.isActive) == null ? void 0 : _a2.value) ?? false; if (!route.value) return ((_b2 = link.value.isExactActive) == null ? void 0 : _b2.value) ?? false; return ((_c = link.value.isExactActive) == null ? void 0 : _c.value) && deepEqual(link.value.route.value.query, route.value.query); }); const href = computed(() => { var _a2; return props.to ? (_a2 = link.value) == null ? void 0 : _a2.route.value.href : props.href; }); return { isLink, isClickable, isActive, route: (_a = link.value) == null ? void 0 : _a.route, navigate: (_b = link.value) == null ? void 0 : _b.navigate, href, linkProps: reactive({ href, "aria-current": toRef(() => isActive.value ? "page" : void 0) }) }; } var makeRouterProps = propsFactory({ href: String, replace: Boolean, to: [String, Object], exact: Boolean }, "router"); var inTransition = false; function useBackButton(router, cb) { let popped = false; let removeBefore; let removeAfter; if (IN_BROWSER && (router == null ? void 0 : router.beforeEach)) { nextTick(() => { window.addEventListener("popstate", onPopstate); removeBefore = router.beforeEach((to, from, next) => { if (!inTransition) { setTimeout(() => popped ? cb(next) : next()); } else { popped ? cb(next) : next(); } inTransition = true; }); removeAfter = router == null ? void 0 : router.afterEach(() => { inTransition = false; }); }); onScopeDispose(() => { window.removeEventListener("popstate", onPopstate); removeBefore == null ? void 0 : removeBefore(); removeAfter == null ? void 0 : removeAfter(); }); } function onPopstate(e) { var _a; if ((_a = e.state) == null ? void 0 : _a.replaced) return; popped = true; setTimeout(() => popped = false); } } export { makeRoundedProps, useRounded, genOverlays, makeVariantProps, useVariant, VDefaultsProvider, useIntersectionObserver, makeLocationProps, useLocation, VProgressLinear, makePositionProps, usePosition, useRouter, useLink, makeRouterProps, useBackButton }; //# sourceMappingURL=chunk-2NYZXKZU.js.map