vuetify.js 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245
  1. import {
  2. defaultRtl,
  3. en_default
  4. } from "./chunk-QJIII4WD.js";
  5. import {
  6. DefaultsSymbol,
  7. IN_BROWSER,
  8. IconSymbol,
  9. RGBtoHex,
  10. SUPPORTS_TOUCH,
  11. consoleError,
  12. consoleWarn,
  13. createDefaults,
  14. createIcons,
  15. createRange,
  16. darken,
  17. defineComponent,
  18. getCurrentInstance,
  19. getLuma,
  20. getObjectValueByPath,
  21. getUid,
  22. lighten,
  23. mergeDeep,
  24. parseColor,
  25. propsFactory,
  26. toKebabCase,
  27. useDefaults,
  28. useToggleScope
  29. } from "./chunk-S3H25MSG.js";
  30. import {
  31. computed,
  32. inject,
  33. nextTick,
  34. reactive,
  35. ref,
  36. shallowRef,
  37. toRaw,
  38. toRefs,
  39. watch,
  40. watchEffect
  41. } from "./chunk-J6475X5X.js";
  42. import "./chunk-SSYGV25P.js";
  43. // node_modules/vuetify/lib/composables/display.mjs
  44. var DisplaySymbol = Symbol.for("vuetify:display");
  45. var defaultDisplayOptions = {
  46. mobileBreakpoint: "lg",
  47. thresholds: {
  48. xs: 0,
  49. sm: 600,
  50. md: 960,
  51. lg: 1280,
  52. xl: 1920,
  53. xxl: 2560
  54. }
  55. };
  56. var parseDisplayOptions = function() {
  57. let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : defaultDisplayOptions;
  58. return mergeDeep(defaultDisplayOptions, options);
  59. };
  60. function getClientWidth(ssr) {
  61. return IN_BROWSER && !ssr ? window.innerWidth : typeof ssr === "object" && ssr.clientWidth || 0;
  62. }
  63. function getClientHeight(ssr) {
  64. return IN_BROWSER && !ssr ? window.innerHeight : typeof ssr === "object" && ssr.clientHeight || 0;
  65. }
  66. function getPlatform(ssr) {
  67. const userAgent = IN_BROWSER && !ssr ? window.navigator.userAgent : "ssr";
  68. function match(regexp) {
  69. return Boolean(userAgent.match(regexp));
  70. }
  71. const android = match(/android/i);
  72. const ios = match(/iphone|ipad|ipod/i);
  73. const cordova = match(/cordova/i);
  74. const electron = match(/electron/i);
  75. const chrome = match(/chrome/i);
  76. const edge = match(/edge/i);
  77. const firefox = match(/firefox/i);
  78. const opera = match(/opera/i);
  79. const win = match(/win/i);
  80. const mac = match(/mac/i);
  81. const linux = match(/linux/i);
  82. return {
  83. android,
  84. ios,
  85. cordova,
  86. electron,
  87. chrome,
  88. edge,
  89. firefox,
  90. opera,
  91. win,
  92. mac,
  93. linux,
  94. touch: SUPPORTS_TOUCH,
  95. ssr: userAgent === "ssr"
  96. };
  97. }
  98. function createDisplay(options, ssr) {
  99. const {
  100. thresholds,
  101. mobileBreakpoint
  102. } = parseDisplayOptions(options);
  103. const height = shallowRef(getClientHeight(ssr));
  104. const platform = shallowRef(getPlatform(ssr));
  105. const state = reactive({});
  106. const width = shallowRef(getClientWidth(ssr));
  107. function updateSize() {
  108. height.value = getClientHeight();
  109. width.value = getClientWidth();
  110. }
  111. function update() {
  112. updateSize();
  113. platform.value = getPlatform();
  114. }
  115. watchEffect(() => {
  116. const xs = width.value < thresholds.sm;
  117. const sm = width.value < thresholds.md && !xs;
  118. const md = width.value < thresholds.lg && !(sm || xs);
  119. const lg = width.value < thresholds.xl && !(md || sm || xs);
  120. const xl = width.value < thresholds.xxl && !(lg || md || sm || xs);
  121. const xxl = width.value >= thresholds.xxl;
  122. const name = xs ? "xs" : sm ? "sm" : md ? "md" : lg ? "lg" : xl ? "xl" : "xxl";
  123. const breakpointValue = typeof mobileBreakpoint === "number" ? mobileBreakpoint : thresholds[mobileBreakpoint];
  124. const mobile = width.value < breakpointValue;
  125. state.xs = xs;
  126. state.sm = sm;
  127. state.md = md;
  128. state.lg = lg;
  129. state.xl = xl;
  130. state.xxl = xxl;
  131. state.smAndUp = !xs;
  132. state.mdAndUp = !(xs || sm);
  133. state.lgAndUp = !(xs || sm || md);
  134. state.xlAndUp = !(xs || sm || md || lg);
  135. state.smAndDown = !(md || lg || xl || xxl);
  136. state.mdAndDown = !(lg || xl || xxl);
  137. state.lgAndDown = !(xl || xxl);
  138. state.xlAndDown = !xxl;
  139. state.name = name;
  140. state.height = height.value;
  141. state.width = width.value;
  142. state.mobile = mobile;
  143. state.mobileBreakpoint = mobileBreakpoint;
  144. state.platform = platform.value;
  145. state.thresholds = thresholds;
  146. });
  147. if (IN_BROWSER) {
  148. window.addEventListener("resize", updateSize, {
  149. passive: true
  150. });
  151. }
  152. return {
  153. ...toRefs(state),
  154. update,
  155. ssr: !!ssr
  156. };
  157. }
  158. function useDisplay() {
  159. const display = inject(DisplaySymbol);
  160. if (!display)
  161. throw new Error("Could not find Vuetify display injection");
  162. return display;
  163. }
  164. // node_modules/vuetify/lib/composables/proxiedModel.mjs
  165. function useProxiedModel(props, prop, defaultValue) {
  166. let transformIn = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : (v) => v;
  167. let transformOut = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : (v) => v;
  168. const vm = getCurrentInstance("useProxiedModel");
  169. const internal = ref(props[prop] !== void 0 ? props[prop] : defaultValue);
  170. const kebabProp = toKebabCase(prop);
  171. const checkKebab = kebabProp !== prop;
  172. const isControlled = checkKebab ? computed(() => {
  173. var _a, _b, _c, _d;
  174. void props[prop];
  175. return !!((((_a = vm.vnode.props) == null ? void 0 : _a.hasOwnProperty(prop)) || ((_b = vm.vnode.props) == null ? void 0 : _b.hasOwnProperty(kebabProp))) && (((_c = vm.vnode.props) == null ? void 0 : _c.hasOwnProperty(`onUpdate:${prop}`)) || ((_d = vm.vnode.props) == null ? void 0 : _d.hasOwnProperty(`onUpdate:${kebabProp}`))));
  176. }) : computed(() => {
  177. var _a, _b;
  178. void props[prop];
  179. return !!(((_a = vm.vnode.props) == null ? void 0 : _a.hasOwnProperty(prop)) && ((_b = vm.vnode.props) == null ? void 0 : _b.hasOwnProperty(`onUpdate:${prop}`)));
  180. });
  181. useToggleScope(() => !isControlled.value, () => {
  182. watch(() => props[prop], (val) => {
  183. internal.value = val;
  184. });
  185. });
  186. const model = computed({
  187. get() {
  188. const externalValue = props[prop];
  189. return transformIn(isControlled.value ? externalValue : internal.value);
  190. },
  191. set(internalValue) {
  192. const newValue = transformOut(internalValue);
  193. const value = toRaw(isControlled.value ? props[prop] : internal.value);
  194. if (value === newValue || transformIn(value) === internalValue) {
  195. return;
  196. }
  197. internal.value = newValue;
  198. vm == null ? void 0 : vm.emit(`update:${prop}`, newValue);
  199. }
  200. });
  201. Object.defineProperty(model, "externalValue", {
  202. get: () => isControlled.value ? props[prop] : internal.value
  203. });
  204. return model;
  205. }
  206. // node_modules/vuetify/lib/locale/adapters/vuetify.mjs
  207. var LANG_PREFIX = "$vuetify.";
  208. var replace = (str, params) => {
  209. return str.replace(/\{(\d+)\}/g, (match, index) => {
  210. return String(params[+index]);
  211. });
  212. };
  213. var createTranslateFunction = (current, fallback, messages) => {
  214. return function(key) {
  215. for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  216. params[_key - 1] = arguments[_key];
  217. }
  218. if (!key.startsWith(LANG_PREFIX)) {
  219. return replace(key, params);
  220. }
  221. const shortKey = key.replace(LANG_PREFIX, "");
  222. const currentLocale = current.value && messages.value[current.value];
  223. const fallbackLocale = fallback.value && messages.value[fallback.value];
  224. let str = getObjectValueByPath(currentLocale, shortKey, null);
  225. if (!str) {
  226. consoleWarn(`Translation key "${key}" not found in "${current.value}", trying fallback locale`);
  227. str = getObjectValueByPath(fallbackLocale, shortKey, null);
  228. }
  229. if (!str) {
  230. consoleError(`Translation key "${key}" not found in fallback`);
  231. str = key;
  232. }
  233. if (typeof str !== "string") {
  234. consoleError(`Translation key "${key}" has a non-string value`);
  235. str = key;
  236. }
  237. return replace(str, params);
  238. };
  239. };
  240. function createNumberFunction(current, fallback) {
  241. return (value, options) => {
  242. const numberFormat = new Intl.NumberFormat([current.value, fallback.value], options);
  243. return numberFormat.format(value);
  244. };
  245. }
  246. function useProvided(props, prop, provided) {
  247. const internal = useProxiedModel(props, prop, props[prop] ?? provided.value);
  248. internal.value = props[prop] ?? provided.value;
  249. watch(provided, (v) => {
  250. if (props[prop] == null) {
  251. internal.value = provided.value;
  252. }
  253. });
  254. return internal;
  255. }
  256. function createProvideFunction(state) {
  257. return (props) => {
  258. const current = useProvided(props, "locale", state.current);
  259. const fallback = useProvided(props, "fallback", state.fallback);
  260. const messages = useProvided(props, "messages", state.messages);
  261. return {
  262. name: "vuetify",
  263. current,
  264. fallback,
  265. messages,
  266. t: createTranslateFunction(current, fallback, messages),
  267. n: createNumberFunction(current, fallback),
  268. provide: createProvideFunction({
  269. current,
  270. fallback,
  271. messages
  272. })
  273. };
  274. };
  275. }
  276. function createVuetifyAdapter(options) {
  277. const current = shallowRef((options == null ? void 0 : options.locale) ?? "en");
  278. const fallback = shallowRef((options == null ? void 0 : options.fallback) ?? "en");
  279. const messages = ref({
  280. en: en_default,
  281. ...options == null ? void 0 : options.messages
  282. });
  283. return {
  284. name: "vuetify",
  285. current,
  286. fallback,
  287. messages,
  288. t: createTranslateFunction(current, fallback, messages),
  289. n: createNumberFunction(current, fallback),
  290. provide: createProvideFunction({
  291. current,
  292. fallback,
  293. messages
  294. })
  295. };
  296. }
  297. // node_modules/vuetify/lib/composables/locale.mjs
  298. var LocaleSymbol = Symbol.for("vuetify:locale");
  299. function isLocaleInstance(obj) {
  300. return obj.name != null;
  301. }
  302. function createLocale(options) {
  303. const i18n = (options == null ? void 0 : options.adapter) && isLocaleInstance(options == null ? void 0 : options.adapter) ? options == null ? void 0 : options.adapter : createVuetifyAdapter(options);
  304. const rtl = createRtl(i18n, options);
  305. return {
  306. ...i18n,
  307. ...rtl
  308. };
  309. }
  310. function useLocale() {
  311. const locale = inject(LocaleSymbol);
  312. if (!locale)
  313. throw new Error("[Vuetify] Could not find injected locale instance");
  314. return locale;
  315. }
  316. var RtlSymbol = Symbol.for("vuetify:rtl");
  317. function createRtl(i18n, options) {
  318. const rtl = ref((options == null ? void 0 : options.rtl) ?? defaultRtl);
  319. const isRtl = computed(() => rtl.value[i18n.current.value] ?? false);
  320. return {
  321. isRtl,
  322. rtl,
  323. rtlClasses: computed(() => `v-locale--is-${isRtl.value ? "rtl" : "ltr"}`)
  324. };
  325. }
  326. function useRtl() {
  327. const locale = inject(LocaleSymbol);
  328. if (!locale)
  329. throw new Error("[Vuetify] Could not find injected rtl instance");
  330. return {
  331. isRtl: locale.isRtl,
  332. rtlClasses: locale.rtlClasses
  333. };
  334. }
  335. // node_modules/vuetify/lib/util/color/APCA.mjs
  336. var mainTRC = 2.4;
  337. var Rco = 0.2126729;
  338. var Gco = 0.7151522;
  339. var Bco = 0.072175;
  340. var normBG = 0.55;
  341. var normTXT = 0.58;
  342. var revTXT = 0.57;
  343. var revBG = 0.62;
  344. var blkThrs = 0.03;
  345. var blkClmp = 1.45;
  346. var deltaYmin = 5e-4;
  347. var scaleBoW = 1.25;
  348. var scaleWoB = 1.25;
  349. var loConThresh = 0.078;
  350. var loConFactor = 12.82051282051282;
  351. var loConOffset = 0.06;
  352. var loClip = 1e-3;
  353. function APCAcontrast(text, background) {
  354. const Rtxt = (text.r / 255) ** mainTRC;
  355. const Gtxt = (text.g / 255) ** mainTRC;
  356. const Btxt = (text.b / 255) ** mainTRC;
  357. const Rbg = (background.r / 255) ** mainTRC;
  358. const Gbg = (background.g / 255) ** mainTRC;
  359. const Bbg = (background.b / 255) ** mainTRC;
  360. let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;
  361. let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
  362. if (Ytxt <= blkThrs)
  363. Ytxt += (blkThrs - Ytxt) ** blkClmp;
  364. if (Ybg <= blkThrs)
  365. Ybg += (blkThrs - Ybg) ** blkClmp;
  366. if (Math.abs(Ybg - Ytxt) < deltaYmin)
  367. return 0;
  368. let outputContrast;
  369. if (Ybg > Ytxt) {
  370. const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;
  371. outputContrast = SAPC < loClip ? 0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;
  372. } else {
  373. const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
  374. outputContrast = SAPC > -loClip ? 0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
  375. }
  376. return outputContrast * 100;
  377. }
  378. // node_modules/vuetify/lib/composables/theme.mjs
  379. var ThemeSymbol = Symbol.for("vuetify:theme");
  380. var makeThemeProps = propsFactory({
  381. theme: String
  382. }, "theme");
  383. var defaultThemeOptions = {
  384. defaultTheme: "light",
  385. variations: {
  386. colors: [],
  387. lighten: 0,
  388. darken: 0
  389. },
  390. themes: {
  391. light: {
  392. dark: false,
  393. colors: {
  394. background: "#FFFFFF",
  395. surface: "#FFFFFF",
  396. "surface-variant": "#424242",
  397. "on-surface-variant": "#EEEEEE",
  398. primary: "#6200EE",
  399. "primary-darken-1": "#3700B3",
  400. secondary: "#03DAC6",
  401. "secondary-darken-1": "#018786",
  402. error: "#B00020",
  403. info: "#2196F3",
  404. success: "#4CAF50",
  405. warning: "#FB8C00"
  406. },
  407. variables: {
  408. "border-color": "#000000",
  409. "border-opacity": 0.12,
  410. "high-emphasis-opacity": 0.87,
  411. "medium-emphasis-opacity": 0.6,
  412. "disabled-opacity": 0.38,
  413. "idle-opacity": 0.04,
  414. "hover-opacity": 0.04,
  415. "focus-opacity": 0.12,
  416. "selected-opacity": 0.08,
  417. "activated-opacity": 0.12,
  418. "pressed-opacity": 0.12,
  419. "dragged-opacity": 0.08,
  420. "theme-kbd": "#212529",
  421. "theme-on-kbd": "#FFFFFF",
  422. "theme-code": "#F5F5F5",
  423. "theme-on-code": "#000000"
  424. }
  425. },
  426. dark: {
  427. dark: true,
  428. colors: {
  429. background: "#121212",
  430. surface: "#212121",
  431. "surface-variant": "#BDBDBD",
  432. "on-surface-variant": "#424242",
  433. primary: "#BB86FC",
  434. "primary-darken-1": "#3700B3",
  435. secondary: "#03DAC5",
  436. "secondary-darken-1": "#03DAC5",
  437. error: "#CF6679",
  438. info: "#2196F3",
  439. success: "#4CAF50",
  440. warning: "#FB8C00"
  441. },
  442. variables: {
  443. "border-color": "#FFFFFF",
  444. "border-opacity": 0.12,
  445. "high-emphasis-opacity": 1,
  446. "medium-emphasis-opacity": 0.7,
  447. "disabled-opacity": 0.5,
  448. "idle-opacity": 0.1,
  449. "hover-opacity": 0.04,
  450. "focus-opacity": 0.12,
  451. "selected-opacity": 0.08,
  452. "activated-opacity": 0.12,
  453. "pressed-opacity": 0.16,
  454. "dragged-opacity": 0.08,
  455. "theme-kbd": "#212529",
  456. "theme-on-kbd": "#FFFFFF",
  457. "theme-code": "#343434",
  458. "theme-on-code": "#CCCCCC"
  459. }
  460. }
  461. }
  462. };
  463. function parseThemeOptions() {
  464. var _a, _b;
  465. let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : defaultThemeOptions;
  466. if (!options)
  467. return {
  468. ...defaultThemeOptions,
  469. isDisabled: true
  470. };
  471. const themes = {};
  472. for (const [key, theme] of Object.entries(options.themes ?? {})) {
  473. const defaultTheme = theme.dark || key === "dark" ? (_a = defaultThemeOptions.themes) == null ? void 0 : _a.dark : (_b = defaultThemeOptions.themes) == null ? void 0 : _b.light;
  474. themes[key] = mergeDeep(defaultTheme, theme);
  475. }
  476. return mergeDeep(defaultThemeOptions, {
  477. ...options,
  478. themes
  479. });
  480. }
  481. function createTheme(options) {
  482. const parsedOptions = parseThemeOptions(options);
  483. const name = ref(parsedOptions.defaultTheme);
  484. const themes = ref(parsedOptions.themes);
  485. const computedThemes = computed(() => {
  486. const acc = {};
  487. for (const [name2, original] of Object.entries(themes.value)) {
  488. const theme = acc[name2] = {
  489. ...original,
  490. colors: {
  491. ...original.colors
  492. }
  493. };
  494. if (parsedOptions.variations) {
  495. for (const name3 of parsedOptions.variations.colors) {
  496. const color = theme.colors[name3];
  497. if (!color)
  498. continue;
  499. for (const variation of ["lighten", "darken"]) {
  500. const fn = variation === "lighten" ? lighten : darken;
  501. for (const amount of createRange(parsedOptions.variations[variation], 1)) {
  502. theme.colors[`${name3}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
  503. }
  504. }
  505. }
  506. }
  507. for (const color of Object.keys(theme.colors)) {
  508. if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`])
  509. continue;
  510. const onColor = `on-${color}`;
  511. const colorVal = parseColor(theme.colors[color]);
  512. const blackContrast = Math.abs(APCAcontrast(parseColor(0), colorVal));
  513. const whiteContrast = Math.abs(APCAcontrast(parseColor(16777215), colorVal));
  514. theme.colors[onColor] = whiteContrast > Math.min(blackContrast, 50) ? "#fff" : "#000";
  515. }
  516. }
  517. return acc;
  518. });
  519. const current = computed(() => computedThemes.value[name.value]);
  520. const styles = computed(() => {
  521. const lines = [];
  522. if (current.value.dark) {
  523. createCssClass(lines, ":root", ["color-scheme: dark"]);
  524. }
  525. createCssClass(lines, ":root", genCssVariables(current.value));
  526. for (const [themeName, theme] of Object.entries(computedThemes.value)) {
  527. createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? "dark" : "normal"}`, ...genCssVariables(theme)]);
  528. }
  529. const bgLines = [];
  530. const fgLines = [];
  531. const colors = new Set(Object.values(computedThemes.value).flatMap((theme) => Object.keys(theme.colors)));
  532. for (const key of colors) {
  533. if (/^on-[a-z]/.test(key)) {
  534. createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);
  535. } else {
  536. createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`]);
  537. createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);
  538. createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`]);
  539. }
  540. }
  541. lines.push(...bgLines, ...fgLines);
  542. return lines.map((str, i) => i === 0 ? str : ` ${str}`).join("");
  543. });
  544. function getHead() {
  545. return {
  546. style: [{
  547. children: styles.value,
  548. id: "vuetify-theme-stylesheet",
  549. nonce: parsedOptions.cspNonce || false
  550. }]
  551. };
  552. }
  553. function install(app) {
  554. if (parsedOptions.isDisabled)
  555. return;
  556. const head = app._context.provides.usehead;
  557. if (head) {
  558. if (head.push) {
  559. const entry = head.push(getHead);
  560. if (IN_BROWSER) {
  561. watch(styles, () => {
  562. entry.patch(getHead);
  563. });
  564. }
  565. } else {
  566. if (IN_BROWSER) {
  567. head.addHeadObjs(computed(getHead));
  568. watchEffect(() => head.updateDOM());
  569. } else {
  570. head.addHeadObjs(getHead());
  571. }
  572. }
  573. } else {
  574. let updateStyles = function() {
  575. if (typeof document !== "undefined" && !styleEl) {
  576. const el = document.createElement("style");
  577. el.type = "text/css";
  578. el.id = "vuetify-theme-stylesheet";
  579. if (parsedOptions.cspNonce)
  580. el.setAttribute("nonce", parsedOptions.cspNonce);
  581. styleEl = el;
  582. document.head.appendChild(styleEl);
  583. }
  584. if (styleEl)
  585. styleEl.innerHTML = styles.value;
  586. };
  587. let styleEl = IN_BROWSER ? document.getElementById("vuetify-theme-stylesheet") : null;
  588. if (IN_BROWSER) {
  589. watch(styles, updateStyles, {
  590. immediate: true
  591. });
  592. } else {
  593. updateStyles();
  594. }
  595. }
  596. }
  597. const themeClasses = computed(() => parsedOptions.isDisabled ? void 0 : `v-theme--${name.value}`);
  598. return {
  599. install,
  600. isDisabled: parsedOptions.isDisabled,
  601. name,
  602. themes,
  603. current,
  604. computedThemes,
  605. themeClasses,
  606. styles,
  607. global: {
  608. name,
  609. current
  610. }
  611. };
  612. }
  613. function useTheme() {
  614. getCurrentInstance("useTheme");
  615. const theme = inject(ThemeSymbol, null);
  616. if (!theme)
  617. throw new Error("Could not find Vuetify theme injection");
  618. return theme;
  619. }
  620. function createCssClass(lines, selector, content) {
  621. lines.push(`${selector} {
  622. `, ...content.map((line) => ` ${line};
  623. `), "}\n");
  624. }
  625. function genCssVariables(theme) {
  626. const lightOverlay = theme.dark ? 2 : 1;
  627. const darkOverlay = theme.dark ? 1 : 2;
  628. const variables = [];
  629. for (const [key, value] of Object.entries(theme.colors)) {
  630. const rgb = parseColor(value);
  631. variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
  632. if (!key.startsWith("on-")) {
  633. variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
  634. }
  635. }
  636. for (const [key, value] of Object.entries(theme.variables)) {
  637. const color = typeof value === "string" && value.startsWith("#") ? parseColor(value) : void 0;
  638. const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : void 0;
  639. variables.push(`--v-${key}: ${rgb ?? value}`);
  640. }
  641. return variables;
  642. }
  643. // node_modules/vuetify/lib/labs/date/adapters/vuetify.mjs
  644. var firstDay = {
  645. "001": 1,
  646. AD: 1,
  647. AE: 6,
  648. AF: 6,
  649. AG: 0,
  650. AI: 1,
  651. AL: 1,
  652. AM: 1,
  653. AN: 1,
  654. AR: 1,
  655. AS: 0,
  656. AT: 1,
  657. AU: 1,
  658. AX: 1,
  659. AZ: 1,
  660. BA: 1,
  661. BD: 0,
  662. BE: 1,
  663. BG: 1,
  664. BH: 6,
  665. BM: 1,
  666. BN: 1,
  667. BR: 0,
  668. BS: 0,
  669. BT: 0,
  670. BW: 0,
  671. BY: 1,
  672. BZ: 0,
  673. CA: 0,
  674. CH: 1,
  675. CL: 1,
  676. CM: 1,
  677. CN: 1,
  678. CO: 0,
  679. CR: 1,
  680. CY: 1,
  681. CZ: 1,
  682. DE: 1,
  683. DJ: 6,
  684. DK: 1,
  685. DM: 0,
  686. DO: 0,
  687. DZ: 6,
  688. EC: 1,
  689. EE: 1,
  690. EG: 6,
  691. ES: 1,
  692. ET: 0,
  693. FI: 1,
  694. FJ: 1,
  695. FO: 1,
  696. FR: 1,
  697. GB: 1,
  698. "GB-alt-variant": 0,
  699. GE: 1,
  700. GF: 1,
  701. GP: 1,
  702. GR: 1,
  703. GT: 0,
  704. GU: 0,
  705. HK: 0,
  706. HN: 0,
  707. HR: 1,
  708. HU: 1,
  709. ID: 0,
  710. IE: 1,
  711. IL: 0,
  712. IN: 0,
  713. IQ: 6,
  714. IR: 6,
  715. IS: 1,
  716. IT: 1,
  717. JM: 0,
  718. JO: 6,
  719. JP: 0,
  720. KE: 0,
  721. KG: 1,
  722. KH: 0,
  723. KR: 0,
  724. KW: 6,
  725. KZ: 1,
  726. LA: 0,
  727. LB: 1,
  728. LI: 1,
  729. LK: 1,
  730. LT: 1,
  731. LU: 1,
  732. LV: 1,
  733. LY: 6,
  734. MC: 1,
  735. MD: 1,
  736. ME: 1,
  737. MH: 0,
  738. MK: 1,
  739. MM: 0,
  740. MN: 1,
  741. MO: 0,
  742. MQ: 1,
  743. MT: 0,
  744. MV: 5,
  745. MX: 0,
  746. MY: 1,
  747. MZ: 0,
  748. NI: 0,
  749. NL: 1,
  750. NO: 1,
  751. NP: 0,
  752. NZ: 1,
  753. OM: 6,
  754. PA: 0,
  755. PE: 0,
  756. PH: 0,
  757. PK: 0,
  758. PL: 1,
  759. PR: 0,
  760. PT: 0,
  761. PY: 0,
  762. QA: 6,
  763. RE: 1,
  764. RO: 1,
  765. RS: 1,
  766. RU: 1,
  767. SA: 0,
  768. SD: 6,
  769. SE: 1,
  770. SG: 0,
  771. SI: 1,
  772. SK: 1,
  773. SM: 1,
  774. SV: 0,
  775. SY: 6,
  776. TH: 0,
  777. TJ: 1,
  778. TM: 1,
  779. TR: 1,
  780. TT: 0,
  781. TW: 0,
  782. UA: 1,
  783. UM: 0,
  784. US: 0,
  785. UY: 1,
  786. UZ: 1,
  787. VA: 1,
  788. VE: 0,
  789. VI: 0,
  790. VN: 1,
  791. WS: 0,
  792. XK: 1,
  793. YE: 0,
  794. ZA: 0,
  795. ZW: 0
  796. };
  797. function getWeekArray(date2, locale) {
  798. const weeks = [];
  799. let currentWeek = [];
  800. const firstDayOfMonth = startOfMonth(date2);
  801. const lastDayOfMonth = endOfMonth(date2);
  802. const firstDayWeekIndex = firstDayOfMonth.getDay() - firstDay[locale.slice(-2).toUpperCase()];
  803. const lastDayWeekIndex = lastDayOfMonth.getDay() - firstDay[locale.slice(-2).toUpperCase()];
  804. for (let i = 0; i < firstDayWeekIndex; i++) {
  805. const adjacentDay = new Date(firstDayOfMonth);
  806. adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i));
  807. currentWeek.push(adjacentDay);
  808. }
  809. for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
  810. const day = new Date(date2.getFullYear(), date2.getMonth(), i);
  811. currentWeek.push(day);
  812. if (currentWeek.length === 7) {
  813. weeks.push(currentWeek);
  814. currentWeek = [];
  815. }
  816. }
  817. for (let i = 1; i < 7 - lastDayWeekIndex; i++) {
  818. const adjacentDay = new Date(lastDayOfMonth);
  819. adjacentDay.setDate(adjacentDay.getDate() + i);
  820. currentWeek.push(adjacentDay);
  821. }
  822. weeks.push(currentWeek);
  823. return weeks;
  824. }
  825. function startOfMonth(date2) {
  826. return new Date(date2.getFullYear(), date2.getMonth(), 1);
  827. }
  828. function endOfMonth(date2) {
  829. return new Date(date2.getFullYear(), date2.getMonth() + 1, 0);
  830. }
  831. function parseLocalDate(value) {
  832. const parts = value.split("-").map(Number);
  833. return new Date(parts[0], parts[1] - 1, parts[2]);
  834. }
  835. var _YYYMMDD = /([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))/;
  836. function date(value) {
  837. if (value == null)
  838. return /* @__PURE__ */ new Date();
  839. if (value instanceof Date)
  840. return value;
  841. if (typeof value === "string") {
  842. let parsed;
  843. if (_YYYMMDD.test(value)) {
  844. return parseLocalDate(value);
  845. } else {
  846. parsed = Date.parse(value);
  847. }
  848. if (!isNaN(parsed))
  849. return new Date(parsed);
  850. }
  851. return null;
  852. }
  853. var sundayJanuarySecond2000 = new Date(2e3, 0, 2);
  854. function getWeekdays(locale) {
  855. const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
  856. return createRange(7).map((i) => {
  857. const weekday = new Date(sundayJanuarySecond2000);
  858. weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
  859. return new Intl.DateTimeFormat(locale, {
  860. weekday: "short"
  861. }).format(weekday);
  862. });
  863. }
  864. function format(value, formatString, locale) {
  865. const date2 = new Date(value);
  866. let options = {};
  867. switch (formatString) {
  868. case "fullDateWithWeekday":
  869. options = {
  870. weekday: "long",
  871. day: "numeric",
  872. month: "long",
  873. year: "numeric"
  874. };
  875. break;
  876. case "normalDateWithWeekday":
  877. options = {
  878. weekday: "short",
  879. day: "numeric",
  880. month: "short"
  881. };
  882. break;
  883. case "keyboardDate":
  884. options = {};
  885. break;
  886. case "monthAndDate":
  887. options = {
  888. month: "long",
  889. day: "numeric"
  890. };
  891. break;
  892. case "monthAndYear":
  893. options = {
  894. month: "long",
  895. year: "numeric"
  896. };
  897. break;
  898. case "dayOfMonth":
  899. options = {
  900. day: "numeric"
  901. };
  902. break;
  903. default:
  904. options = {
  905. timeZone: "UTC",
  906. timeZoneName: "short"
  907. };
  908. }
  909. return new Intl.DateTimeFormat(locale, options).format(date2);
  910. }
  911. function addDays(date2, amount) {
  912. const d = new Date(date2);
  913. d.setDate(d.getDate() + amount);
  914. return d;
  915. }
  916. function addMonths(date2, amount) {
  917. const d = new Date(date2);
  918. d.setMonth(d.getMonth() + amount);
  919. return d;
  920. }
  921. function getYear(date2) {
  922. return date2.getFullYear();
  923. }
  924. function getMonth(date2) {
  925. return date2.getMonth();
  926. }
  927. function startOfYear(date2) {
  928. return new Date(date2.getFullYear(), 0, 1);
  929. }
  930. function endOfYear(date2) {
  931. return new Date(date2.getFullYear(), 11, 31);
  932. }
  933. function isWithinRange(date2, range) {
  934. return isAfter(date2, range[0]) && isBefore(date2, range[1]);
  935. }
  936. function isValid(date2) {
  937. const d = new Date(date2);
  938. return d instanceof Date && !isNaN(d.getTime());
  939. }
  940. function isAfter(date2, comparing) {
  941. return date2.getTime() > comparing.getTime();
  942. }
  943. function isBefore(date2, comparing) {
  944. return date2.getTime() < comparing.getTime();
  945. }
  946. function isEqual(date2, comparing) {
  947. return date2.getTime() === comparing.getTime();
  948. }
  949. function isSameDay(date2, comparing) {
  950. return date2.getDate() === comparing.getDate() && date2.getMonth() === comparing.getMonth() && date2.getFullYear() === comparing.getFullYear();
  951. }
  952. function isSameMonth(date2, comparing) {
  953. return date2.getMonth() === comparing.getMonth() && date2.getFullYear() === comparing.getFullYear();
  954. }
  955. function getDiff(date2, comparing, unit) {
  956. const d = new Date(date2);
  957. const c = new Date(comparing);
  958. if (unit === "month") {
  959. return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;
  960. }
  961. return Math.floor((d.getTime() - c.getTime()) / (1e3 * 60 * 60 * 24));
  962. }
  963. function setYear(date2, year) {
  964. const d = new Date(date2);
  965. d.setFullYear(year);
  966. return d;
  967. }
  968. var VuetifyDateAdapter = class {
  969. constructor(options) {
  970. this.locale = options.locale;
  971. }
  972. date(value) {
  973. return date(value);
  974. }
  975. toJsDate(date2) {
  976. return date2;
  977. }
  978. addDays(date2, amount) {
  979. return addDays(date2, amount);
  980. }
  981. addMonths(date2, amount) {
  982. return addMonths(date2, amount);
  983. }
  984. getWeekArray(date2) {
  985. return getWeekArray(date2, this.locale);
  986. }
  987. startOfMonth(date2) {
  988. return startOfMonth(date2);
  989. }
  990. endOfMonth(date2) {
  991. return endOfMonth(date2);
  992. }
  993. format(date2, formatString) {
  994. return format(date2, formatString, this.locale);
  995. }
  996. isEqual(date2, comparing) {
  997. return isEqual(date2, comparing);
  998. }
  999. isValid(date2) {
  1000. return isValid(date2);
  1001. }
  1002. isWithinRange(date2, range) {
  1003. return isWithinRange(date2, range);
  1004. }
  1005. isAfter(date2, comparing) {
  1006. return isAfter(date2, comparing);
  1007. }
  1008. isBefore(date2, comparing) {
  1009. return !isAfter(date2, comparing) && !isEqual(date2, comparing);
  1010. }
  1011. isSameDay(date2, comparing) {
  1012. return isSameDay(date2, comparing);
  1013. }
  1014. isSameMonth(date2, comparing) {
  1015. return isSameMonth(date2, comparing);
  1016. }
  1017. setYear(date2, year) {
  1018. return setYear(date2, year);
  1019. }
  1020. getDiff(date2, comparing, unit) {
  1021. return getDiff(date2, comparing, unit);
  1022. }
  1023. getWeekdays() {
  1024. return getWeekdays(this.locale);
  1025. }
  1026. getYear(date2) {
  1027. return getYear(date2);
  1028. }
  1029. getMonth(date2) {
  1030. return getMonth(date2);
  1031. }
  1032. startOfYear(date2) {
  1033. return startOfYear(date2);
  1034. }
  1035. endOfYear(date2) {
  1036. return endOfYear(date2);
  1037. }
  1038. };
  1039. // node_modules/vuetify/lib/labs/date/date.mjs
  1040. var DateAdapterSymbol = Symbol.for("vuetify:date-adapter");
  1041. function createDate(options) {
  1042. return mergeDeep({
  1043. adapter: VuetifyDateAdapter,
  1044. locale: {
  1045. af: "af-ZA",
  1046. // ar: '', # not the same value for all variants
  1047. bg: "bg-BG",
  1048. ca: "ca-ES",
  1049. ckb: "",
  1050. cs: "",
  1051. de: "de-DE",
  1052. el: "el-GR",
  1053. en: "en-US",
  1054. // es: '', # not the same value for all variants
  1055. et: "et-EE",
  1056. fa: "fa-IR",
  1057. fi: "fi-FI",
  1058. // fr: '', #not the same value for all variants
  1059. hr: "hr-HR",
  1060. hu: "hu-HU",
  1061. he: "he-IL",
  1062. id: "id-ID",
  1063. it: "it-IT",
  1064. ja: "ja-JP",
  1065. ko: "ko-KR",
  1066. lv: "lv-LV",
  1067. lt: "lt-LT",
  1068. nl: "nl-NL",
  1069. no: "nn-NO",
  1070. pl: "pl-PL",
  1071. pt: "pt-PT",
  1072. ro: "ro-RO",
  1073. ru: "ru-RU",
  1074. sk: "sk-SK",
  1075. sl: "sl-SI",
  1076. srCyrl: "sr-SP",
  1077. srLatn: "sr-SP",
  1078. sv: "sv-SE",
  1079. th: "th-TH",
  1080. tr: "tr-TR",
  1081. az: "az-AZ",
  1082. uk: "uk-UA",
  1083. vi: "vi-VN",
  1084. zhHans: "zh-CN",
  1085. zhHant: "zh-TW"
  1086. }
  1087. }, options);
  1088. }
  1089. var makeDateProps = propsFactory({
  1090. displayDate: {
  1091. type: Object,
  1092. default: /* @__PURE__ */ new Date()
  1093. },
  1094. hideAdjacentMonths: Boolean,
  1095. modelValue: {
  1096. type: null,
  1097. default: () => []
  1098. }
  1099. }, "date");
  1100. // node_modules/vuetify/lib/composables/layout.mjs
  1101. var VuetifyLayoutKey = Symbol.for("vuetify:layout");
  1102. var VuetifyLayoutItemKey = Symbol.for("vuetify:layout-item");
  1103. var makeLayoutProps = propsFactory({
  1104. overlaps: {
  1105. type: Array,
  1106. default: () => []
  1107. },
  1108. fullHeight: Boolean
  1109. }, "layout");
  1110. var makeLayoutItemProps = propsFactory({
  1111. name: {
  1112. type: String
  1113. },
  1114. order: {
  1115. type: [Number, String],
  1116. default: 0
  1117. },
  1118. absolute: Boolean
  1119. }, "layout-item");
  1120. function useLayout() {
  1121. const layout = inject(VuetifyLayoutKey);
  1122. if (!layout)
  1123. throw new Error("[Vuetify] Could not find injected layout");
  1124. return {
  1125. getLayoutItem: layout.getLayoutItem,
  1126. mainRect: layout.mainRect,
  1127. mainStyles: layout.mainStyles
  1128. };
  1129. }
  1130. // node_modules/vuetify/lib/framework.mjs
  1131. function createVuetify() {
  1132. let vuetify = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  1133. const {
  1134. blueprint,
  1135. ...rest
  1136. } = vuetify;
  1137. const options = mergeDeep(blueprint, rest);
  1138. const {
  1139. aliases = {},
  1140. components = {},
  1141. directives = {}
  1142. } = options;
  1143. const defaults = createDefaults(options.defaults);
  1144. const display = createDisplay(options.display, options.ssr);
  1145. const theme = createTheme(options.theme);
  1146. const icons = createIcons(options.icons);
  1147. const locale = createLocale(options.locale);
  1148. const date2 = createDate(options.date);
  1149. const install = (app) => {
  1150. for (const key in directives) {
  1151. app.directive(key, directives[key]);
  1152. }
  1153. for (const key in components) {
  1154. app.component(key, components[key]);
  1155. }
  1156. for (const key in aliases) {
  1157. app.component(key, defineComponent({
  1158. ...aliases[key],
  1159. name: key,
  1160. aliasName: aliases[key].name
  1161. }));
  1162. }
  1163. theme.install(app);
  1164. app.provide(DefaultsSymbol, defaults);
  1165. app.provide(DisplaySymbol, display);
  1166. app.provide(ThemeSymbol, theme);
  1167. app.provide(IconSymbol, icons);
  1168. app.provide(LocaleSymbol, locale);
  1169. app.provide(DateAdapterSymbol, date2);
  1170. if (IN_BROWSER && options.ssr) {
  1171. if (app.$nuxt) {
  1172. app.$nuxt.hook("app:suspense:resolve", () => {
  1173. display.update();
  1174. });
  1175. } else {
  1176. const {
  1177. mount
  1178. } = app;
  1179. app.mount = function() {
  1180. const vm = mount(...arguments);
  1181. nextTick(() => display.update());
  1182. app.mount = mount;
  1183. return vm;
  1184. };
  1185. }
  1186. }
  1187. getUid.reset();
  1188. if (typeof __VUE_OPTIONS_API__ !== "boolean" || __VUE_OPTIONS_API__) {
  1189. app.mixin({
  1190. computed: {
  1191. $vuetify() {
  1192. return reactive({
  1193. defaults: inject2.call(this, DefaultsSymbol),
  1194. display: inject2.call(this, DisplaySymbol),
  1195. theme: inject2.call(this, ThemeSymbol),
  1196. icons: inject2.call(this, IconSymbol),
  1197. locale: inject2.call(this, LocaleSymbol),
  1198. date: inject2.call(this, DateAdapterSymbol)
  1199. });
  1200. }
  1201. }
  1202. });
  1203. }
  1204. };
  1205. return {
  1206. install,
  1207. defaults,
  1208. display,
  1209. theme,
  1210. icons,
  1211. locale,
  1212. date: date2
  1213. };
  1214. }
  1215. var version = "3.3.11";
  1216. createVuetify.version = version;
  1217. function inject2(key) {
  1218. var _a, _b;
  1219. const vm = this.$;
  1220. const provides = ((_a = vm.parent) == null ? void 0 : _a.provides) ?? ((_b = vm.vnode.appContext) == null ? void 0 : _b.provides);
  1221. if (provides && key in provides) {
  1222. return provides[key];
  1223. }
  1224. }
  1225. export {
  1226. createVuetify,
  1227. useDefaults,
  1228. useDisplay,
  1229. useLayout,
  1230. useLocale,
  1231. useRtl,
  1232. useTheme,
  1233. version
  1234. };
  1235. //# sourceMappingURL=vuetify.js.map