Vulture/VApp/node_modules/.vite/deps/chunk-44S2JOLY.js

340 lines
9.9 KiB
JavaScript

import {
makeRoundedProps,
useRounded
} from "./chunk-24LK52JF.js";
import {
useBackgroundColor,
useTextColor
} from "./chunk-ZZ55KHRR.js";
import {
useRtl
} from "./chunk-IR5437QA.js";
import {
useProxiedModel
} from "./chunk-PVQHDZXM.js";
import {
makeTagProps
} from "./chunk-DJRL4NAD.js";
import {
makeThemeProps,
provideTheme
} from "./chunk-CYOEVGGH.js";
import {
SUPPORTS_INTERSECTION,
convertToUnit,
genericComponent,
getCurrentInstanceName,
makeComponentProps,
parseAnchor,
propsFactory,
useRender
} from "./chunk-I4KGD5X4.js";
import {
Transition,
computed,
createVNode,
onBeforeUnmount,
ref,
shallowRef,
watch
} from "./chunk-PD2AWGJV.js";
// node_modules/vuetify/lib/composables/location.mjs
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.mjs
import "C:/Users/Jeremy/Documents/Dev/Projects.cloudsucks.net/Vulture/VApp/node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.css";
// node_modules/vuetify/lib/composables/intersectionObserver.mjs
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);
onBeforeUnmount(() => {
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.mjs
var makeVProgressLinearProps = propsFactory({
absolute: Boolean,
active: {
type: Boolean,
default: true
},
bgColor: String,
bgOpacity: [Number, String],
bufferValue: {
type: [Number, String],
default: 0
},
clickable: Boolean,
color: String,
height: {
type: [Number, String],
default: 4
},
indeterminate: Boolean,
max: {
type: [Number, String],
default: 100
},
modelValue: {
type: [Number, String],
default: 0
},
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) {
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(computed(() => props.bgColor || props.color));
const {
backgroundColorClasses: barColorClasses,
backgroundColorStyles: barColorStyles
} = useBackgroundColor(props, "color");
const {
roundedClasses
} = useRounded(props);
const {
intersectionRef,
isIntersecting
} = useIntersectionObserver();
const max = computed(() => parseInt(props.max, 10));
const height = computed(() => parseInt(props.height, 10));
const normalizedBuffer = computed(() => parseFloat(props.bufferValue) / max.value * 100);
const normalizedValue = computed(() => parseFloat(progress.value) / max.value * 100);
const isReversed = computed(() => isRtl.value !== props.reverse);
const transition = computed(() => props.indeterminate ? "fade-transition" : "slide-x-transition");
const opacity = computed(() => {
return props.bgOpacity == null ? props.bgOpacity : parseFloat(props.bgOpacity);
});
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": ["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
}, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],
"style": [{
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),
...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 : normalizedValue.value,
"onClick": props.clickable && handleClick
}, {
default: () => [props.stream && createVNode("div", {
"key": "stream",
"class": ["v-progress-linear__stream", textColorClasses.value],
"style": {
...textColorStyles.value,
[isReversed.value ? "left" : "right"]: convertToUnit(-height.value),
borderTop: `${convertToUnit(height.value / 2)} dotted`,
opacity: opacity.value,
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), createVNode("div", {
"class": ["v-progress-linear__background", backgroundColorClasses.value],
"style": [backgroundColorStyles.value, {
opacity: opacity.value,
width: convertToUnit(!props.stream ? 100 : normalizedBuffer.value, "%")
}]
}, null), createVNode(Transition, {
"name": transition.value
}, {
default: () => [!props.indeterminate ? createVNode("div", {
"class": ["v-progress-linear__determinate", barColorClasses.value],
"style": [barColorStyles.value, {
width: convertToUnit(normalizedValue.value, "%")
}]
}, null) : createVNode("div", {
"class": "v-progress-linear__indeterminate"
}, [["long", "short"].map((bar) => createVNode("div", {
"key": bar,
"class": ["v-progress-linear__indeterminate", bar, barColorClasses.value],
"style": barColorStyles.value
}, null))])]
}), slots.default && createVNode("div", {
"class": "v-progress-linear__content"
}, [slots.default({
value: normalizedValue.value,
buffer: normalizedBuffer.value
})])]
}));
return {};
}
});
// node_modules/vuetify/lib/composables/loader.mjs
var makeLoaderProps = propsFactory({
loading: [Boolean, String]
}, "loader");
function useLoader(props) {
let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName();
const loaderClasses = computed(() => ({
[`${name}--loading`]: props.loading
}));
return {
loaderClasses
};
}
function LoaderSlot(props, _ref) {
var _a;
let {
slots
} = _ref;
return createVNode("div", {
"class": `${props.name}__loader`
}, [((_a = slots.default) == null ? void 0 : _a.call(slots, {
color: props.color,
isActive: props.active
})) || createVNode(VProgressLinear, {
"absolute": props.absolute,
"active": props.active,
"color": props.color,
"height": "2",
"indeterminate": true
}, null)]);
}
export {
useIntersectionObserver,
makeLocationProps,
useLocation,
makeLoaderProps,
useLoader,
LoaderSlot
};
//# sourceMappingURL=chunk-44S2JOLY.js.map