quasar
Version:
Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
1,598 lines • 939 kB
JavaScript
/*!
* Quasar Framework v2.19.3
* (c) 2015-present Razvan Stoenescu
* Released under the MIT License.
*/
(function(vue) {
//#region \0rolldown/runtime.js
var __defProp = Object.defineProperty;
var __exportAll = (all, no_symbols) => {
let target = {};
for (var name in all) __defProp(target, name, {
get: all[name],
enumerable: true
});
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
return target;
};
//#endregion
//#region src/utils/private.inject-obj-prop/inject-obj-prop.js
function injectProp(target, propName, get, set) {
Object.defineProperty(target, propName, {
get,
set,
enumerable: true
});
return target;
}
function injectMultipleProps(target, props) {
for (const key in props) injectProp(target, key, props[key]);
return target;
}
//#endregion
//#region src/plugins/platform/Platform.js
/**
* __ QUASAR_SSR __ -> runs on SSR on client or server
* __ QUASAR_SSR_SERVER __ -> runs on SSR on server
* __ QUASAR_SSR_CLIENT __ -> runs on SSR on client
* __ QUASAR_SSR_PWA __ -> built with SSR+PWA; may run on SSR on client or on PWA client
* (needs runtime detection)
*/
const isRuntimeSsrPreHydration = (0, vue.ref)(false);
let preHydrationBrowser;
function getMatch(userAgent, platformMatch) {
const match = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(userAgent) || /(opr)[\/]([\w.]+)/.exec(userAgent) || /(vivaldi)[\/]([\w.]+)/.exec(userAgent) || /(chrome|crios)[\/]([\w.]+)/.exec(userAgent) || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent) || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent) || /(firefox|fxios)[\/]([\w.]+)/.exec(userAgent) || /(webkit)[\/]([\w.]+)/.exec(userAgent) || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(userAgent) || [];
return {
browser: match[5] || match[3] || match[1] || "",
version: match[4] || match[2] || "0",
platform: platformMatch[0] || ""
};
}
function getPlatformMatch(userAgent) {
return /(ipad)/.exec(userAgent) || /(ipod)/.exec(userAgent) || /(windows phone)/.exec(userAgent) || /(iphone)/.exec(userAgent) || /(kindle)/.exec(userAgent) || /(silk)/.exec(userAgent) || /(android)/.exec(userAgent) || /(win)/.exec(userAgent) || /(mac)/.exec(userAgent) || /(linux)/.exec(userAgent) || /(cros)/.exec(userAgent) || /(playbook)/.exec(userAgent) || /(bb)/.exec(userAgent) || /(blackberry)/.exec(userAgent) || [];
}
const hasTouch = "ontouchstart" in window || window.navigator.maxTouchPoints > 0;
function getPlatform(UA) {
const userAgent = UA.toLowerCase();
const matched = getMatch(userAgent, getPlatformMatch(userAgent));
const browser = {
mobile: false,
desktop: false,
cordova: false,
capacitor: false,
nativeMobile: false,
electron: false,
bex: false,
linux: false,
mac: false,
win: false,
cros: false,
chrome: false,
firefox: false,
opera: false,
safari: false,
vivaldi: false,
edge: false,
edgeChromium: false,
ie: false,
webkit: false,
android: false,
ios: false,
ipad: false,
iphone: false,
ipod: false,
kindle: false,
winphone: false,
blackberry: false,
playbook: false,
silk: false
};
if (matched.browser) {
browser[matched.browser] = true;
browser.version = matched.version;
browser.versionNumber = parseInt(matched.version, 10);
}
if (matched.platform) browser[matched.platform] = true;
const knownMobiles = browser.android || browser.ios || browser.bb || browser.blackberry || browser.ipad || browser.iphone || browser.ipod || browser.kindle || browser.playbook || browser.silk || browser["windows phone"];
if (knownMobiles === true || userAgent.indexOf("mobile") !== -1) browser.mobile = true;
else browser.desktop = true;
if (browser["windows phone"]) {
browser.winphone = true;
delete browser["windows phone"];
}
if (browser.edga || browser.edgios || browser.edg) {
browser.edge = true;
matched.browser = "edge";
} else if (browser.crios) {
browser.chrome = true;
matched.browser = "chrome";
} else if (browser.fxios) {
browser.firefox = true;
matched.browser = "firefox";
}
if (browser.ipod || browser.ipad || browser.iphone) browser.ios = true;
if (browser.vivaldi) {
matched.browser = "vivaldi";
browser.vivaldi = true;
}
if (browser.chrome || browser.opr || browser.safari || browser.vivaldi || browser.mobile === true && browser.ios !== true && knownMobiles !== true) browser.webkit = true;
if (browser.opr) {
matched.browser = "opera";
browser.opera = true;
}
if (browser.safari) {
if (browser.blackberry || browser.bb) {
matched.browser = "blackberry";
browser.blackberry = true;
} else if (browser.playbook) {
matched.browser = "playbook";
browser.playbook = true;
} else if (browser.android) {
matched.browser = "android";
browser.android = true;
} else if (browser.kindle) {
matched.browser = "kindle";
browser.kindle = true;
} else if (browser.silk) {
matched.browser = "silk";
browser.silk = true;
}
}
browser.name = matched.browser;
browser.platform = matched.platform;
if (userAgent.indexOf("electron") !== -1) browser.electron = true;
else if (document.location.href.indexOf("-extension://") !== -1) browser.bex = true;
else {
if (window.Capacitor !== void 0) {
browser.capacitor = true;
browser.nativeMobile = true;
browser.nativeMobileWrapper = "capacitor";
} else if (window._cordovaNative !== void 0 || window.cordova !== void 0) {
browser.cordova = true;
browser.nativeMobile = true;
browser.nativeMobileWrapper = "cordova";
}
if (isRuntimeSsrPreHydration.value === true) preHydrationBrowser = { is: { ...browser } };
if (hasTouch === true && browser.mac === true && (browser.desktop === true && browser.safari === true || browser.nativeMobile === true && browser.android !== true && browser.ios !== true && browser.ipad !== true)) {
delete browser.mac;
delete browser.desktop;
const platform = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone";
Object.assign(browser, {
mobile: true,
ios: true,
platform,
[platform]: true
});
}
if (browser.mobile !== true && window.navigator.userAgentData && window.navigator.userAgentData.mobile) {
delete browser.desktop;
browser.mobile = true;
}
}
return browser;
}
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
const ssrClient = {
has: {
touch: false,
webStorage: false
},
within: { iframe: false }
};
const client = {
userAgent,
is: getPlatform(userAgent),
has: { touch: hasTouch },
within: { iframe: window.self !== window.top }
};
const Platform = { install(opts) {
const { $q } = opts;
if (isRuntimeSsrPreHydration.value === true) {
opts.onSSRHydrated.push(() => {
Object.assign($q.platform, client);
isRuntimeSsrPreHydration.value = false;
});
$q.platform = (0, vue.reactive)(this);
} else $q.platform = this;
} };
{
let hasWebStorage;
injectProp(client.has, "webStorage", () => {
if (hasWebStorage !== void 0) return hasWebStorage;
try {
if (window.localStorage) {
hasWebStorage = true;
return true;
}
} catch {}
hasWebStorage = false;
return false;
});
Object.assign(Platform, client);
if (isRuntimeSsrPreHydration.value === true) {
Object.assign(Platform, preHydrationBrowser, ssrClient);
preHydrationBrowser = null;
}
}
//#endregion
//#region src/utils/private.create/create.js
function createComponent(raw) {
return (0, vue.markRaw)((0, vue.defineComponent)(raw));
}
function createDirective(raw) {
return (0, vue.markRaw)(raw);
}
const createReactivePlugin = (state, plugin) => {
const reactiveState = (0, vue.reactive)(state);
for (const name in state) injectProp(plugin, name, () => reactiveState[name], (val) => {
reactiveState[name] = val;
});
return plugin;
};
//#endregion
//#region src/utils/event/event.js
const listenOpts = {
hasPassive: false,
passiveCapture: true,
notPassiveCapture: true
};
try {
const opts = Object.defineProperty({}, "passive", { get() {
Object.assign(listenOpts, {
hasPassive: true,
passive: { passive: true },
notPassive: { passive: false },
passiveCapture: {
passive: true,
capture: true
},
notPassiveCapture: {
passive: false,
capture: true
}
});
} });
window.addEventListener("qtest", null, opts);
window.removeEventListener("qtest", null, opts);
} catch {}
function noop() {}
function leftClick(e) {
return e.button === 0;
}
function middleClick(e) {
return e.button === 1;
}
function rightClick(e) {
return e.button === 2;
}
function position(e) {
if (e.touches && e.touches[0]) e = e.touches[0];
else if (e.changedTouches && e.changedTouches[0]) e = e.changedTouches[0];
else if (e.targetTouches && e.targetTouches[0]) e = e.targetTouches[0];
return {
top: e.clientY,
left: e.clientX
};
}
function getEventPath(e) {
if (e.path) return e.path;
if (e.composedPath) return e.composedPath();
const path = [];
let el = e.target;
while (el) {
path.push(el);
if (el.tagName === "HTML") {
path.push(document);
path.push(window);
return path;
}
el = el.parentElement;
}
}
const LINE_HEIGHT = 40, PAGE_HEIGHT = 800;
function getMouseWheelDistance(e) {
let x = e.deltaX, y = e.deltaY;
if ((x || y) && e.deltaMode) {
const multiplier = e.deltaMode === 1 ? LINE_HEIGHT : PAGE_HEIGHT;
x *= multiplier;
y *= multiplier;
}
if (e.shiftKey && !x) [y, x] = [x, y];
return {
x,
y
};
}
function stop(e) {
e.stopPropagation();
}
function prevent(e) {
if (e.cancelable !== false) e.preventDefault();
}
function stopAndPrevent(e) {
if (e.cancelable !== false) e.preventDefault();
e.stopPropagation();
}
function preventDraggable(el, status) {
if (el === void 0 || status === true && el.__dragPrevented === true) return;
const fn = status === true ? (element) => {
element.__dragPrevented = true;
element.addEventListener("dragstart", prevent, listenOpts.notPassiveCapture);
} : (element) => {
delete element.__dragPrevented;
element.removeEventListener("dragstart", prevent, listenOpts.notPassiveCapture);
};
el.querySelectorAll("a, img").forEach(fn);
}
function addEvt(ctx, targetName, events) {
const name = `__q_${targetName}_evt`;
ctx[name] = ctx[name] !== void 0 ? ctx[name].concat(events) : events;
events.forEach((evt) => {
evt[0].addEventListener(evt[1], ctx[evt[2]], listenOpts[evt[3]]);
});
}
function cleanEvt(ctx, targetName) {
const name = `__q_${targetName}_evt`;
if (ctx[name] !== void 0) {
ctx[name].forEach((evt) => {
evt[0].removeEventListener(evt[1], ctx[evt[2]], listenOpts[evt[3]]);
});
ctx[name] = void 0;
}
}
var event_default = {
listenOpts,
leftClick,
middleClick,
rightClick,
position,
getEventPath,
getMouseWheelDistance,
stop,
prevent,
stopAndPrevent,
preventDraggable
};
//#endregion
//#region src/utils/debounce/debounce.js
function debounce(fn, wait = 250, immediate) {
let timer = null;
function debounced() {
const args = arguments;
const later = () => {
timer = null;
if (immediate !== true) fn.apply(this, args);
};
if (timer !== null) clearTimeout(timer);
else if (immediate === true) fn.apply(this, args);
timer = setTimeout(later, wait);
}
debounced.cancel = () => {
if (timer !== null) clearTimeout(timer);
};
return debounced;
}
//#endregion
//#region src/plugins/screen/Screen.js
const SIZE_LIST = [
"sm",
"md",
"lg",
"xl"
];
const { passive: passive$4 } = listenOpts;
var Screen_default = createReactivePlugin({
width: 0,
height: 0,
name: "xs",
sizes: {
sm: 600,
md: 1024,
lg: 1440,
xl: 1920
},
lt: {
sm: true,
md: true,
lg: true,
xl: true
},
gt: {
xs: false,
sm: false,
md: false,
lg: false
},
xs: true,
sm: false,
md: false,
lg: false,
xl: false
}, {
setSizes: noop,
setDebounce: noop,
install({ $q, onSSRHydrated }) {
$q.screen = this;
if (this.__installed === true) {
if ($q.config.screen !== void 0) if ($q.config.screen.bodyClasses === false) document.body.classList.remove(`screen--${this.name}`);
else this.__update(true);
return;
}
const { visualViewport } = window;
const target = visualViewport || window;
const scrollingElement = document.scrollingElement || document.documentElement;
const getSize = visualViewport === void 0 || client.is.mobile === true ? () => [Math.max(window.innerWidth, scrollingElement.clientWidth), Math.max(window.innerHeight, scrollingElement.clientHeight)] : () => [visualViewport.width * visualViewport.scale + window.innerWidth - scrollingElement.clientWidth, visualViewport.height * visualViewport.scale + window.innerHeight - scrollingElement.clientHeight];
const classes = $q.config.screen?.bodyClasses === true;
this.__update = (force) => {
const [w, h] = getSize();
if (h !== this.height) this.height = h;
if (w !== this.width) this.width = w;
else if (force !== true) return;
let s = this.sizes;
this.gt.xs = w >= s.sm;
this.gt.sm = w >= s.md;
this.gt.md = w >= s.lg;
this.gt.lg = w >= s.xl;
this.lt.sm = w < s.sm;
this.lt.md = w < s.md;
this.lt.lg = w < s.lg;
this.lt.xl = w < s.xl;
this.xs = this.lt.sm;
this.sm = this.gt.xs === true && this.lt.md === true;
this.md = this.gt.sm === true && this.lt.lg === true;
this.lg = this.gt.md === true && this.lt.xl === true;
this.xl = this.gt.lg;
s = this.xs === true && "xs" || this.sm === true && "sm" || this.md === true && "md" || this.lg === true && "lg" || "xl";
if (s !== this.name) {
if (classes === true) {
document.body.classList.remove(`screen--${this.name}`);
document.body.classList.add(`screen--${s}`);
}
this.name = s;
}
};
let updateEvt, updateSizes = {}, updateDebounce = 16;
this.setSizes = (sizes) => {
SIZE_LIST.forEach((name) => {
if (sizes[name] !== void 0) updateSizes[name] = sizes[name];
});
};
this.setDebounce = (deb) => {
updateDebounce = deb;
};
const start = () => {
const style = getComputedStyle(document.body);
if (style.getPropertyValue("--q-size-sm")) SIZE_LIST.forEach((name) => {
this.sizes[name] = parseInt(style.getPropertyValue(`--q-size-${name}`), 10);
});
this.setSizes = (sizes) => {
SIZE_LIST.forEach((name) => {
if (sizes[name]) this.sizes[name] = sizes[name];
});
this.__update(true);
};
this.setDebounce = (delay) => {
if (updateEvt !== void 0) target.removeEventListener("resize", updateEvt, passive$4);
updateEvt = delay > 0 ? debounce(this.__update, delay) : this.__update;
target.addEventListener("resize", updateEvt, passive$4);
};
this.setDebounce(updateDebounce);
if (Object.keys(updateSizes).length !== 0) {
this.setSizes(updateSizes);
updateSizes = void 0;
} else this.__update();
if (classes === true && this.name === "xs") document.body.classList.add("screen--xs");
};
if (isRuntimeSsrPreHydration.value === true) onSSRHydrated.push(start);
else start();
}
});
//#endregion
//#region src/plugins/dark/Dark.js
const Plugin$9 = createReactivePlugin({
isActive: false,
mode: false
}, {
__media: void 0,
set(val) {
Plugin$9.mode = val;
if (val === "auto") {
if (Plugin$9.__media === void 0) {
Plugin$9.__media = window.matchMedia("(prefers-color-scheme: dark)");
Plugin$9.__updateMedia = () => {
Plugin$9.set("auto");
};
Plugin$9.__media.addListener(Plugin$9.__updateMedia);
}
val = Plugin$9.__media.matches;
} else if (Plugin$9.__media !== void 0) {
Plugin$9.__media.removeListener(Plugin$9.__updateMedia);
Plugin$9.__media = void 0;
}
Plugin$9.isActive = val === true;
document.body.classList.remove(`body--${val === true ? "light" : "dark"}`);
document.body.classList.add(`body--${val === true ? "dark" : "light"}`);
},
toggle() {
Plugin$9.set(Plugin$9.isActive === false);
},
install({ $q, ssrContext }) {
const dark = $q.config.dark;
$q.dark = this;
if (this.__installed !== true) this.set(dark !== void 0 ? dark : false);
}
});
//#endregion
//#region src/utils/css-var/set-css-var.js
function setCssVar(propName, value, element = document.body) {
if (typeof propName !== "string") throw new TypeError("Expected a string as propName");
if (typeof value !== "string") throw new TypeError("Expected a string as value");
if (!(element instanceof Element)) throw new TypeError("Expected a DOM element");
element.style.setProperty(`--q-${propName}`, value);
}
//#endregion
//#region src/utils/private.keyboard/key-composition.js
let lastKeyCompositionStatus = false;
function onKeyDownComposition(evt) {
lastKeyCompositionStatus = evt.isComposing === true;
}
function shouldIgnoreKey(evt) {
return lastKeyCompositionStatus === true || evt !== Object(evt) || evt.isComposing === true || evt.qKeyEvent === true;
}
function isKeyCode(evt, keyCodes) {
return shouldIgnoreKey(evt) === true ? false : [].concat(keyCodes).includes(evt.keyCode);
}
//#endregion
//#region src/plugins/private.body/Body.js
function getMobilePlatform(is) {
if (is.ios === true) return "ios";
if (is.android === true) return "android";
}
function getBodyClasses({ is, has, within }, cfg) {
const cls = [is.desktop === true ? "desktop" : "mobile", `${has.touch === false ? "no-" : ""}touch`];
if (is.mobile === true) {
const mobile = getMobilePlatform(is);
if (mobile !== void 0) cls.push("platform-" + mobile);
}
if (is.nativeMobile === true) {
const type = is.nativeMobileWrapper;
cls.push(type);
cls.push("native-mobile");
if (is.ios === true && (cfg[type] === void 0 || cfg[type].iosStatusBarPadding !== false)) cls.push("q-ios-padding");
} else if (is.electron === true) cls.push("electron");
else if (is.bex === true) cls.push("bex");
if (within.iframe === true) cls.push("within-iframe");
return cls;
}
function applyClientSsrCorrections() {
const { is } = client;
const classes = document.body.className;
const classList = new Set(classes.replace(/ {2}/g, " ").split(" "));
if (is.nativeMobile !== true && is.electron !== true && is.bex !== true) {
if (is.desktop === true) {
classList.delete("mobile");
classList.delete("platform-ios");
classList.delete("platform-android");
classList.add("desktop");
} else if (is.mobile === true) {
classList.delete("desktop");
classList.add("mobile");
classList.delete("platform-ios");
classList.delete("platform-android");
const mobile = getMobilePlatform(is);
if (mobile !== void 0) classList.add(`platform-${mobile}`);
}
}
if (client.has.touch === true) {
classList.delete("no-touch");
classList.add("touch");
}
if (client.within.iframe === true) classList.add("within-iframe");
const newCls = Array.from(classList).join(" ");
if (classes !== newCls) document.body.className = newCls;
}
function setColors(brand) {
for (const color in brand) setCssVar(color, brand[color]);
}
var Body_default = { install(opts) {
if (this.__installed === true) return;
if (isRuntimeSsrPreHydration.value === true) applyClientSsrCorrections();
else {
const { $q } = opts;
if ($q.config.brand !== void 0) setColors($q.config.brand);
const cls = getBodyClasses(client, $q.config);
document.body.classList.add.apply(document.body.classList, cls);
}
if (client.is.ios === true) document.body.addEventListener("touchstart", noop);
window.addEventListener("keydown", onKeyDownComposition, true);
} };
//#endregion
//#region src/plugins/private.history/History.js
const getTrue = () => true;
function filterInvalidPath(path) {
return typeof path === "string" && path !== "" && path !== "/" && path !== "#/";
}
function normalizeExitPath(path) {
if (path.startsWith("#") === true) path = path.substring(1);
if (path.startsWith("/") === false) path = "/" + path;
if (path.endsWith("/") === true) path = path.substring(0, path.length - 1);
return "#" + path;
}
function getShouldExitFn(cfg) {
if (cfg.backButtonExit === false) return () => false;
if (cfg.backButtonExit === "*") return getTrue;
const exitPaths = ["#/"];
if (Array.isArray(cfg.backButtonExit) === true) exitPaths.push(...cfg.backButtonExit.filter(filterInvalidPath).map(normalizeExitPath));
return () => exitPaths.includes(window.location.hash);
}
var History_default = {
__history: [],
add: noop,
remove: noop,
install({ $q }) {
if (this.__installed === true) return;
const { cordova, capacitor } = client.is;
if (cordova !== true && capacitor !== true) return;
const qConf = $q.config[cordova === true ? "cordova" : "capacitor"];
if (qConf?.backButton === false) return;
if (capacitor === true && (window.Capacitor === void 0 || window.Capacitor.Plugins.App === void 0)) return;
this.add = (entry) => {
if (entry.condition === void 0) entry.condition = getTrue;
this.__history.push(entry);
};
this.remove = (entry) => {
const index = this.__history.indexOf(entry);
if (index >= 0) this.__history.splice(index, 1);
};
const shouldExit = getShouldExitFn(Object.assign({ backButtonExit: true }, qConf));
const backHandler = () => {
if (this.__history.length) {
const entry = this.__history[this.__history.length - 1];
if (entry.condition() === true) {
this.__history.pop();
entry.handler();
}
} else if (shouldExit() === true) navigator.app.exitApp();
else window.history.back();
};
if (cordova === true) document.addEventListener("deviceready", () => {
document.addEventListener("backbutton", backHandler, false);
});
else window.Capacitor.Plugins.App.addListener("backButton", backHandler);
}
};
//#endregion
//#region lang/en-US.js
var en_US_default = {
isoName: "en-US",
nativeName: "English (US)",
label: {
clear: "Clear",
ok: "OK",
cancel: "Cancel",
close: "Close",
set: "Set",
select: "Select",
reset: "Reset",
remove: "Remove",
update: "Update",
create: "Create",
search: "Search",
filter: "Filter",
refresh: "Refresh",
expand: (label) => label ? `Expand "${label}"` : "Expand",
collapse: (label) => label ? `Collapse "${label}"` : "Collapse"
},
date: {
days: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
daysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
firstDayOfWeek: 0,
format24h: false,
pluralDay: "days",
prevMonth: "Previous month",
nextMonth: "Next month",
prevYear: "Previous year",
nextYear: "Next year",
today: "Today",
prevRangeYears: (range) => `Previous ${range} years`,
nextRangeYears: (range) => `Next ${range} years`
},
table: {
noData: "No data available",
noResults: "No matching records found",
loading: "Loading...",
selectedRecords: (rows) => rows === 1 ? "1 record selected." : (rows === 0 ? "No" : rows) + " records selected.",
recordsPerPage: "Records per page:",
allRows: "All",
pagination: (start, end, total) => start + "-" + end + " of " + total,
columns: "Columns"
},
pagination: {
first: "First page",
prev: "Previous page",
next: "Next page",
last: "Last page"
},
editor: {
url: "URL",
bold: "Bold",
italic: "Italic",
strikethrough: "Strikethrough",
underline: "Underline",
unorderedList: "Unordered List",
orderedList: "Ordered List",
subscript: "Subscript",
superscript: "Superscript",
hyperlink: "Hyperlink",
toggleFullscreen: "Toggle Fullscreen",
quote: "Quote",
left: "Left align",
center: "Center align",
right: "Right align",
justify: "Justify align",
print: "Print",
outdent: "Decrease indentation",
indent: "Increase indentation",
removeFormat: "Remove formatting",
formatting: "Formatting",
fontSize: "Font Size",
align: "Align",
hr: "Insert Horizontal Rule",
undo: "Undo",
redo: "Redo",
heading1: "Heading 1",
heading2: "Heading 2",
heading3: "Heading 3",
heading4: "Heading 4",
heading5: "Heading 5",
heading6: "Heading 6",
paragraph: "Paragraph",
code: "Code",
size1: "Very small",
size2: "A bit small",
size3: "Normal",
size4: "Medium-large",
size5: "Big",
size6: "Very big",
size7: "Maximum",
defaultFont: "Default Font",
viewSource: "View Source"
},
tree: {
noNodes: "No nodes available",
noResults: "No matching nodes found"
}
};
//#endregion
//#region src/plugins/lang/Lang.js
function getLocale() {
const val = Array.isArray(navigator.languages) === true && navigator.languages.length !== 0 ? navigator.languages[0] : navigator.language;
if (typeof val === "string") return val.split(/[-_]/).map((v, i) => i === 0 ? v.toLowerCase() : i > 1 || v.length < 4 ? v.toUpperCase() : v[0].toUpperCase() + v.slice(1).toLowerCase()).join("-");
}
const Plugin$8 = createReactivePlugin({ __qLang: {} }, {
getLocale,
set(langObject = en_US_default, ssrContext) {
const lang = {
...langObject,
rtl: langObject.rtl === true,
getLocale
};
lang.set = Plugin$8.set;
if (Plugin$8.__langConfig === void 0 || Plugin$8.__langConfig.noHtmlAttrs !== true) {
const el = document.documentElement;
el.setAttribute("dir", lang.rtl === true ? "rtl" : "ltr");
el.setAttribute("lang", lang.isoName);
}
Object.assign(Plugin$8.__qLang, lang);
},
install({ $q, lang, ssrContext }) {
$q.lang = Plugin$8.__qLang;
Plugin$8.__langConfig = $q.config.lang;
if (this.__installed === true) {
if (lang !== void 0) this.set(lang);
} else {
this.props = new Proxy(this.__qLang, {
get() {
return Reflect.get(...arguments);
},
ownKeys(target) {
return Reflect.ownKeys(target).filter((key) => key !== "set" && key !== "getLocale");
}
});
this.set(lang || en_US_default);
}
}
});
//#endregion
//#region icon-set/material-icons.js
var material_icons_default = {
name: "material-icons",
type: {
positive: "check_circle",
negative: "warning",
info: "info",
warning: "priority_high"
},
arrow: {
up: "arrow_upward",
right: "arrow_forward",
down: "arrow_downward",
left: "arrow_back",
dropdown: "arrow_drop_down"
},
chevron: {
left: "chevron_left",
right: "chevron_right"
},
colorPicker: {
spectrum: "gradient",
tune: "tune",
palette: "style"
},
pullToRefresh: { icon: "refresh" },
carousel: {
left: "chevron_left",
right: "chevron_right",
up: "keyboard_arrow_up",
down: "keyboard_arrow_down",
navigationIcon: "lens"
},
chip: {
remove: "cancel",
selected: "check"
},
datetime: {
arrowLeft: "chevron_left",
arrowRight: "chevron_right",
now: "access_time",
today: "today"
},
editor: {
bold: "format_bold",
italic: "format_italic",
strikethrough: "strikethrough_s",
underline: "format_underlined",
unorderedList: "format_list_bulleted",
orderedList: "format_list_numbered",
subscript: "vertical_align_bottom",
superscript: "vertical_align_top",
hyperlink: "link",
toggleFullscreen: "fullscreen",
quote: "format_quote",
left: "format_align_left",
center: "format_align_center",
right: "format_align_right",
justify: "format_align_justify",
print: "print",
outdent: "format_indent_decrease",
indent: "format_indent_increase",
removeFormat: "format_clear",
formatting: "text_format",
fontSize: "format_size",
align: "format_align_left",
hr: "remove",
undo: "undo",
redo: "redo",
heading: "format_size",
code: "code",
size: "format_size",
font: "font_download",
viewSource: "code"
},
expansionItem: {
icon: "keyboard_arrow_down",
denseIcon: "arrow_drop_down"
},
fab: {
icon: "add",
activeIcon: "close"
},
field: {
clear: "cancel",
error: "error"
},
pagination: {
first: "first_page",
prev: "keyboard_arrow_left",
next: "keyboard_arrow_right",
last: "last_page"
},
rating: { icon: "grade" },
stepper: {
done: "check",
active: "edit",
error: "warning"
},
tabs: {
left: "chevron_left",
right: "chevron_right",
up: "keyboard_arrow_up",
down: "keyboard_arrow_down"
},
table: {
arrowUp: "arrow_upward",
warning: "warning",
firstPage: "first_page",
prevPage: "chevron_left",
nextPage: "chevron_right",
lastPage: "last_page"
},
tree: { icon: "play_arrow" },
uploader: {
done: "done",
clear: "clear",
add: "add_box",
upload: "cloud_upload",
removeQueue: "clear_all",
removeUploaded: "done_all"
}
};
//#endregion
//#region src/plugins/icon-set/IconSet.js
const Plugin$7 = createReactivePlugin({
iconMapFn: null,
__qIconSet: {}
}, {
set(setObject, ssrContext) {
const def = { ...setObject };
def.set = Plugin$7.set;
Object.assign(Plugin$7.__qIconSet, def);
},
install({ $q, iconSet, ssrContext }) {
if ($q.config.iconMapFn !== void 0) this.iconMapFn = $q.config.iconMapFn;
$q.iconSet = this.__qIconSet;
injectProp($q, "iconMapFn", () => this.iconMapFn, (val) => {
this.iconMapFn = val;
});
if (this.__installed === true) {
if (iconSet !== void 0) this.set(iconSet);
} else {
this.props = new Proxy(this.__qIconSet, {
get() {
return Reflect.get(...arguments);
},
ownKeys(target) {
return Reflect.ownKeys(target).filter((key) => key !== "set");
}
});
this.set(iconSet || material_icons_default);
}
}
});
//#endregion
//#region src/utils/private.symbols/symbols.js
const timelineKey = "_q_t_";
const stepperKey = "_q_s_";
const layoutKey = "_q_l_";
const pageContainerKey = "_q_pc_";
const fabKey = "_q_f_";
const formKey = "_q_fo_";
const tabsKey = "_q_tabs_";
const uploaderKey = "_q_u_";
function emptyRenderFn() {}
//#endregion
//#region src/utils/private.config/instance-config.js
const globalConfig = {};
let globalConfigIsFrozen = false;
function freezeGlobalConfig() {
globalConfigIsFrozen = true;
}
//#endregion
//#region src/utils/is/is.js
function isDeepEqual(a, b) {
if (a === b) return true;
if (a !== null && b !== null && typeof a === "object" && typeof b === "object") {
if (a.constructor !== b.constructor) return false;
let length, i;
if (a.constructor === Array) {
length = a.length;
if (length !== b.length) return false;
for (i = length; i-- !== 0;) if (isDeepEqual(a[i], b[i]) !== true) return false;
return true;
}
if (a.constructor === Map) {
if (a.size !== b.size) return false;
let iter = a.entries();
i = iter.next();
while (i.done !== true) {
if (b.has(i.value[0]) !== true) return false;
i = iter.next();
}
iter = a.entries();
i = iter.next();
while (i.done !== true) {
if (isDeepEqual(i.value[1], b.get(i.value[0])) !== true) return false;
i = iter.next();
}
return true;
}
if (a.constructor === Set) {
if (a.size !== b.size) return false;
const iter = a.entries();
i = iter.next();
while (i.done !== true) {
if (b.has(i.value[0]) !== true) return false;
i = iter.next();
}
return true;
}
if (a.buffer != null && a.buffer.constructor === ArrayBuffer) {
length = a.length;
if (length !== b.length) return false;
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
return true;
}
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
const keys = Object.keys(a).filter((key) => a[key] !== void 0);
length = keys.length;
if (length !== Object.keys(b).filter((key) => b[key] !== void 0).length) return false;
for (i = length; i-- !== 0;) {
const key = keys[i];
if (isDeepEqual(a[key], b[key]) !== true) return false;
}
return true;
}
return a !== a && b !== b;
}
function isObject(v) {
return v !== null && typeof v === "object" && Array.isArray(v) !== true;
}
function isDate(v) {
return Object.prototype.toString.call(v) === "[object Date]";
}
function isRegexp(v) {
return Object.prototype.toString.call(v) === "[object RegExp]";
}
function isNumber(v) {
return typeof v === "number" && isFinite(v);
}
var is_default = {
deepEqual: isDeepEqual,
object: isObject,
date: isDate,
regexp: isRegexp,
number: isNumber
};
//#endregion
//#region src/install-quasar.js
/**
* If the list below changes, make sure
* to also edit /ui/testing/specs/generators/generator.plugin.js
* on the "autoInstalledPlugins" array
*/
const autoInstalledPlugins = [
Platform,
Body_default,
Plugin$9,
Screen_default,
History_default,
Plugin$8,
Plugin$7
];
function createChildApp(appCfg, parentApp) {
const app = (0, vue.createApp)(appCfg);
app.config.globalProperties = parentApp.config.globalProperties;
const { reload, ...appContext } = parentApp._context;
Object.assign(app._context, appContext);
return app;
}
function installPlugins(pluginOpts, pluginList) {
pluginList.forEach((Plugin) => {
Plugin.install(pluginOpts);
Plugin.__installed = true;
});
}
function prepareApp(app, uiOpts, pluginOpts) {
app.config.globalProperties.$q = pluginOpts.$q;
app.provide("_q_", pluginOpts.$q);
installPlugins(pluginOpts, autoInstalledPlugins);
if (uiOpts.components !== void 0) Object.values(uiOpts.components).forEach((c) => {
if (isObject(c) === true && c.name !== void 0) app.component(c.name, c);
});
if (uiOpts.directives !== void 0) Object.values(uiOpts.directives).forEach((d) => {
if (isObject(d) === true && d.name !== void 0) app.directive(d.name, d);
});
if (uiOpts.plugins !== void 0) installPlugins(pluginOpts, Object.values(uiOpts.plugins).filter((p) => typeof p.install === "function" && autoInstalledPlugins.includes(p) === false));
if (isRuntimeSsrPreHydration.value === true) pluginOpts.$q.onSSRHydrated = () => {
pluginOpts.onSSRHydrated.forEach((fn) => {
fn();
});
pluginOpts.$q.onSSRHydrated = () => {};
};
}
var install_quasar_default = function installQuasar(parentApp, opts = {}) {
const $q = { version: "2.19.3" };
if (globalConfigIsFrozen === false) {
if (opts.config !== void 0) Object.assign(globalConfig, opts.config);
$q.config = { ...globalConfig };
freezeGlobalConfig();
} else $q.config = opts.config || {};
prepareApp(parentApp, opts, {
parentApp,
$q,
lang: opts.lang,
iconSet: opts.iconSet,
onSSRHydrated: []
});
};
//#endregion
//#region src/utils/format/format.js
const units = [
"B",
"KB",
"MB",
"GB",
"TB",
"PB"
];
function humanStorageSize(bytes, decimals = 1) {
let u = 0;
while (parseInt(bytes, 10) >= 1024 && u < units.length - 1) {
bytes /= 1024;
++u;
}
return `${bytes.toFixed(decimals)}${units[u]}`;
}
function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
function between(v, min, max) {
return max <= min ? min : Math.min(max, Math.max(min, v));
}
function normalizeToInterval(v, min, max) {
if (max <= min) return min;
const size = max - min + 1;
let index = min + (v - min) % size;
if (index < min) index = size + index;
return index === 0 ? 0 : index;
}
function pad(v, length = 2, char = "0") {
if (v === void 0 || v === null) return v;
const val = String(v);
return val.length >= length ? val : new Array(length - val.length + 1).join(char) + val;
}
var format_default = {
humanStorageSize,
capitalize,
between,
normalizeToInterval,
pad
};
//#endregion
//#region src/components/ajax-bar/QAjaxBar.js
const xhr = XMLHttpRequest, open = xhr.prototype.open, positionValues = [
"top",
"right",
"bottom",
"left"
];
let stack = [];
let highjackCount = 0;
function translate({ p, pos, active, horiz, reverse, dir }) {
let x = 1, y = 1;
if (horiz === true) {
if (reverse === true) x = -1;
if (pos === "bottom") y = -1;
return { transform: `translate3d(${x * (p - 100)}%,${active ? 0 : y * -200}%,0)` };
}
if (reverse === true) y = -1;
if (pos === "right") x = -1;
return { transform: `translate3d(${active ? 0 : dir * x * -200}%,${y * (p - 100)}%,0)` };
}
function inc(p, amount) {
if (typeof amount !== "number") if (p < 25) amount = Math.random() * 3 + 3;
else if (p < 65) amount = Math.random() * 3;
else if (p < 85) amount = Math.random() * 2;
else if (p < 99) amount = .6;
else amount = 0;
return between(p + amount, 0, 100);
}
function highjackAjax(stackEntry) {
highjackCount++;
stack.push(stackEntry);
if (highjackCount > 1) return;
xhr.prototype.open = function qOpen(_, url) {
const stopStack = [];
const loadStart = () => {
stack.forEach((entry) => {
if (entry.hijackFilter.value === null || entry.hijackFilter.value(url) === true) {
entry.start();
stopStack.push(entry.stop);
}
});
};
const loadEnd = () => {
stopStack.forEach((stop) => {
stop();
});
};
this.addEventListener("loadstart", loadStart, { once: true });
this.addEventListener("loadend", loadEnd, { once: true });
open.apply(this, arguments);
};
}
function restoreAjax(start) {
stack = stack.filter((entry) => entry.start !== start);
highjackCount = Math.max(0, highjackCount - 1);
if (highjackCount === 0) xhr.prototype.open = open;
}
var QAjaxBar_default = createComponent({
name: "QAjaxBar",
props: {
position: {
type: String,
default: "top",
validator: (val) => positionValues.includes(val)
},
size: {
type: String,
default: "2px"
},
color: String,
skipHijack: Boolean,
reverse: Boolean,
hijackFilter: Function
},
emits: ["start", "stop"],
setup(props, { emit }) {
const { proxy } = (0, vue.getCurrentInstance)();
const progress = (0, vue.ref)(0);
const onScreen = (0, vue.ref)(false);
const animate = (0, vue.ref)(true);
let sessions = 0, timer = null, speed;
const classes = (0, vue.computed)(() => `q-loading-bar q-loading-bar--${props.position}` + (props.color !== void 0 ? ` bg-${props.color}` : "") + (animate.value === true ? "" : " no-transition"));
const horizontal = (0, vue.computed)(() => props.position === "top" || props.position === "bottom");
const sizeProp = (0, vue.computed)(() => horizontal.value === true ? "height" : "width");
const style = (0, vue.computed)(() => {
const active = onScreen.value;
const obj = translate({
p: progress.value,
pos: props.position,
active,
horiz: horizontal.value,
reverse: proxy.$q.lang.rtl === true && ["top", "bottom"].includes(props.position) ? props.reverse === false : props.reverse,
dir: proxy.$q.lang.rtl === true ? -1 : 1
});
obj[sizeProp.value] = props.size;
obj.opacity = active ? 1 : 0;
return obj;
});
const attributes = (0, vue.computed)(() => onScreen.value === true ? {
role: "progressbar",
"aria-valuemin": 0,
"aria-valuemax": 100,
"aria-valuenow": progress.value
} : { "aria-hidden": "true" });
function start(newSpeed = 300) {
const oldSpeed = speed;
speed = Math.max(0, newSpeed) || 0;
sessions++;
if (sessions > 1) {
if (oldSpeed === 0 && newSpeed > 0) planNextStep();
else if (timer !== null && oldSpeed > 0 && newSpeed <= 0) {
clearTimeout(timer);
timer = null;
}
return sessions;
}
if (timer !== null) clearTimeout(timer);
emit("start");
progress.value = 0;
/**
* We're trying to avoid side effects if start() is called inside a watchEffect()
* so we're accessing the _value property directly (under the covers implementation detail of ref())
*
* Otherwise, any refs() accessed here would be marked as deps for the watchEffect()
* -- and we are changing them below, which would cause an infinite loop
*/
timer = setTimeout(() => {
timer = null;
animate.value = true;
if (newSpeed > 0) planNextStep();
}, onScreen._value === true ? 500 : 1);
if (onScreen._value !== true) {
onScreen.value = true;
animate.value = false;
}
return sessions;
}
function increment(amount) {
if (sessions > 0) progress.value = inc(progress.value, amount);
return sessions;
}
function stop() {
sessions = Math.max(0, sessions - 1);
if (sessions > 0) return sessions;
if (timer !== null) {
clearTimeout(timer);
timer = null;
}
emit("stop");
const end = () => {
animate.value = true;
progress.value = 100;
timer = setTimeout(() => {
timer = null;
onScreen.value = false;
}, 1e3);
};
if (progress.value === 0) timer = setTimeout(end, 1);
else end();
return sessions;
}
function planNextStep() {
if (progress.value < 100) timer = setTimeout(() => {
timer = null;
increment();
planNextStep();
}, speed);
}
let hijacked;
(0, vue.onMounted)(() => {
if (props.skipHijack !== true) {
hijacked = true;
highjackAjax({
start,
stop,
hijackFilter: (0, vue.computed)(() => props.hijackFilter || null)
});
}
});
(0, vue.onBeforeUnmount)(() => {
if (timer !== null) clearTimeout(timer);
if (hijacked === true) restoreAjax(start);
});
Object.assign(proxy, {
start,
stop,
increment
});
return () => (0, vue.h)("div", {
class: classes.value,
style: style.value,
...attributes.value
});
}
});
//#endregion
//#region src/composables/private.use-size/use-size.js
const useSizeDefaults = {
xs: 18,
sm: 24,
md: 32,
lg: 38,
xl: 46
};
const useSizeProps = { size: String };
function useSize(props, sizes = useSizeDefaults) {
return (0, vue.computed)(() => props.size !== void 0 ? { fontSize: props.size in sizes ? `${sizes[props.size]}px` : props.size } : null);
}
//#endregion
//#region src/utils/private.render/render.js
function hSlot(slot, otherwise) {
return slot !== void 0 ? slot() || otherwise : otherwise;
}
function hUniqueSlot(slot, otherwise) {
if (slot !== void 0) {
const vnode = slot();
if (vnode !== void 0 && vnode !== null) return vnode.slice();
}
return otherwise;
}
/**
* Source definitely exists,
* so it's merged with the possible slot
*/
function hMergeSlot(slot, source) {
return slot !== void 0 ? source.concat(slot()) : source;
}
/**
* Merge with possible slot,
* even if source might not exist
*/
function hMergeSlotSafely(slot, source) {
if (slot === void 0) return source;
return source !== void 0 ? source.concat(slot()) : slot();
}
function hDir(tag, data, children, key, condition, getDirsFn) {
data.key = key + condition;
const vnode = (0, vue.h)(tag, data, children);
return condition === true ? (0, vue.withDirectives)(vnode, getDirsFn()) : vnode;
}
//#endregion
//#region src/components/icon/QIcon.js
const defaultViewBox = "0 0 24 24";
const sameFn = (i) => i;
const ionFn = (i) => `ionicons ${i}`;
const libMap = {
"mdi-": (i) => `mdi ${i}`,
"icon-": sameFn,
"bt-": (i) => `bt ${i}`,
"eva-": (i) => `eva ${i}`,
"ion-md": ionFn,
"ion-ios": ionFn,
"ion-logo": ionFn,
"iconfont ": sameFn,
"ti-": (i) => `themify-icon ${i}`,
"bi-": (i) => `bootstrap-icons ${i}`,
"i-": sameFn
};
const matMap = {
o_: "-outlined",
r_: "-round",
s_: "-sharp"
};
const symMap = {
sym_o_: "-outlined",
sym_r_: "-rounded",
sym_s_: "-sharp"
};
const libRE = new RegExp("^(" + Object.keys(libMap).join("|") + ")");
const matRE = new RegExp("^(" + Object.keys(matMap).join("|") + ")");
const symRE = new RegExp("^(" + Object.keys(symMap).join("|") + ")");
const mRE = /^[Mm]\s?[-+]?\.?\d/;
const imgRE = /^img:/;
const svgUseRE = /^svguse:/;
const ionRE = /^ion-/;
const faRE = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /;
var QIcon_default = createComponent({
name: "QIcon",
props: {
...useSizeProps,
tag: {
type: String,
default: "i"
},
name: String,
color: String,
left: Boolean,
right: Boolean
},
setup(props, { slots }) {
const { proxy: { $q } } = (0, vue.getCurrentInstance)();
const sizeStyle = useSize(props);
const classes = (0, vue.computed)(() => "q-icon" + (props.left === true ? " on-left" : "") + (props.right === true ? " on-right" : "") + (props.color !== void 0 ? ` text-${props.color}` : ""));
const type = (0, vue.computed)(() => {
let cls;
let icon = props.name;
if (icon === "none" || !icon) return { none: true };
if ($q.iconMapFn !== null) {
const res = $q.iconMapFn(icon);
if (res !== void 0) if (res.icon !== void 0) {
icon = res.icon;
if (icon === "none" || !icon) return { none: true };
} else return {
cls: res.cls,
content: res.content !== void 0 ? res.content : " "
};
}
if (mRE.test(icon) === true) {
const [def, viewBox = defaultViewBox] = icon.split("|");
return {
svg: true,
viewBox,
nodes: def.split("&&").map((path) => {
const [d, style, transform] = path.split("@@");
return (0, vue.h)("path", {
style,
d,
transform
});
})
};
}
if (imgRE.test(icon) === true) return {
img: true,
src: icon.substring(4)
};
if (svgUseRE.test(icon) === true) {
const [def, viewBox = defaultViewBox] = icon.split("|");
return {
svguse: true,
src: def.substring(7),
viewBox
};
}
let content = " ";
const matches = icon.match(libRE);
if (matches !== null) cls = libMap[matches[1]](icon);
else if (faRE.test(icon) === true) cls = icon;
else if (ionRE.test(icon) === true) cls = `ionicons ion-${$q.platform.is.ios === true ? "ios" : "md"}${icon.substring(3)}`;
else if (symRE.test(icon) === true) {
cls = "notranslate material-symbols";
const symMatches = icon.match(symRE);
if (symMatches !== null) {
icon = icon.substring(6);
cls += symMap[symMatches[1]];
}
content = icon;
} else {
cls = "notranslate material-icons";
const matMatches = icon.match(matRE);
if (matMatches !== null) {
icon = icon.substring(2);
cls += matMap[matMatches[1]];
}
content = icon;
}
return {
cls,
content
};
});
return () => {
const data = {
class: classes.value,
style: sizeStyle.value,
"aria-hidden": "true"
};
if (type.value.none === true) return (0, vue.h)(props.tag, data, hSlot(slots.default));
if (type.value.img === true) return (0, vue.h)(props.tag, data, hMergeSlot(slots.default, [(0, vue.h)("img", { src: type.value.src })]));
if (type.value.svg === true) return (0, vue.h)(props.tag, data, hMergeSlot(slots.default, [(0, vue.h)("svg", { viewBox: type.value.viewBox || "0 0 24 24" }, type.value.nodes)]));
if (type.value.svguse === true) return (0, vue.h)(props.tag, data, hMergeSlot(slots.default, [(0, vue.h)("svg", { viewBox: type.value.viewBox }, [(0, vue.h)("use", { "xlink:href": type.value.src })])]));
if (type.value.cls !== void 0) data.class += " " + type.value.cls;
return (0, vue.h)(props.tag, data, hMergeSlot(slots.default, [type.value.content]));
};
}
});
//#endregion
//#region src/components/avatar/QAvatar.js
var QAvatar_default = createComponent({
name: "QAvatar",
props: {
...useSizeProps,
fontSize: String,
color: String,
textColor: String,
icon: String,
square: Boolean,
rounded: Boolean
},
setup(props, { slots }) {
const sizeStyle = useSize(props);
const classes = (0, vue.computed)(() => "q-avatar" + (props.color ? ` bg-${props.color}` : "") + (props.textColor ? ` text-${props.textColor} q-chip--colored` : "") + (props.square === true ? " q-avatar--square" : props.rounded === true ? " rounded-borders" : ""));
const contentStyle = (0, vue.computed)(() => props.fontSize ? { fontSize: props.fontSize } : null);
return () => {
const icon = props.icon !== void 0 ? [(0, vue.h)(QIcon_default, { name: props.icon })] : void 0;
return (0, vue.h)("div", {
class: classes.value,
style: sizeStyle.value
}, [(0, vue.h)("div", {
class: "q-avatar__content row flex-center overflow-hidden",
style: contentStyle.value
}, hMergeSlotSafely(slots.default, icon))]);
};
}
});
//#endregion
//#region src/components/badge/QBadge.js
const alignValues$3 = [
"top",
"middle",
"bottom"
];
var QBadge_default = createComponent({
name: "QBadge",
props: {
color: String,
textColor: String,
floating: Boolean,
transparent: Boolean,
multiLine: Boolean,
outline: Boolean,
rounded: Boolean,
label: [Number, String],
align: {
type: String,
validator: (v) => alignValues$3.includes(v)
}
},
setup(props, { slots }) {
const style = (0, vue.computed)(() => props.align !== void 0 ? { verticalAlign: props.align } : null);
const classes = (0, vue.computed)(() => {
const text = props.outline === true ? props.color || props.textColor : props.textColor;
return `q-badge flex inline items-center no-wrap q-badge--${props.multiLine === true ? "multi" : "single"}-line` + (props.outline === true ? " q-badge--outline" : props.color !== void 0 ? ` b