import { useProxiedModel } from "./chunk-PVQHDZXM.js"; import { consoleError, consoleWarn, getObjectValueByPath } from "./chunk-I4KGD5X4.js"; import { computed, inject, ref, shallowRef, watch } from "./chunk-PD2AWGJV.js"; // node_modules/vuetify/lib/locale/en.mjs var en_default = { badge: "Badge", open: "Open", close: "Close", confirmEdit: { ok: "OK", cancel: "Cancel" }, dataIterator: { noResultsText: "No matching records found", loadingText: "Loading items..." }, dataTable: { itemsPerPageText: "Rows per page:", ariaLabel: { sortDescending: "Sorted descending.", sortAscending: "Sorted ascending.", sortNone: "Not sorted.", activateNone: "Activate to remove sorting.", activateDescending: "Activate to sort descending.", activateAscending: "Activate to sort ascending." }, sortBy: "Sort by" }, dataFooter: { itemsPerPageText: "Items per page:", itemsPerPageAll: "All", nextPage: "Next page", prevPage: "Previous page", firstPage: "First page", lastPage: "Last page", pageText: "{0}-{1} of {2}" }, dateRangeInput: { divider: "to" }, datePicker: { itemsSelected: "{0} selected", range: { title: "Select dates", header: "Enter dates" }, title: "Select date", header: "Enter date", input: { placeholder: "Enter date" } }, noDataText: "No data available", carousel: { prev: "Previous visual", next: "Next visual", ariaLabel: { delimiter: "Carousel slide {0} of {1}" } }, calendar: { moreEvents: "{0} more", today: "Today" }, input: { clear: "Clear {0}", prependAction: "{0} prepended action", appendAction: "{0} appended action", otp: "Please enter OTP character {0}" }, fileInput: { counter: "{0} files", counterSize: "{0} files ({1} in total)" }, timePicker: { am: "AM", pm: "PM" }, pagination: { ariaLabel: { root: "Pagination Navigation", next: "Next page", previous: "Previous page", page: "Go to page {0}", currentPage: "Page {0}, Current page", first: "First page", last: "Last page" } }, stepper: { next: "Next", prev: "Previous" }, rating: { ariaLabel: { item: "Rating {0} of {1}" } }, loading: "Loading...", infiniteScroll: { loadMore: "Load more", empty: "No more" } }; // node_modules/vuetify/lib/locale/adapters/vuetify.mjs var LANG_PREFIX = "$vuetify."; var replace = (str, params) => { return str.replace(/\{(\d+)\}/g, (match, index) => { return String(params[+index]); }); }; var createTranslateFunction = (current, fallback, messages) => { return function(key) { for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { params[_key - 1] = arguments[_key]; } if (!key.startsWith(LANG_PREFIX)) { return replace(key, params); } const shortKey = key.replace(LANG_PREFIX, ""); const currentLocale = current.value && messages.value[current.value]; const fallbackLocale = fallback.value && messages.value[fallback.value]; let str = getObjectValueByPath(currentLocale, shortKey, null); if (!str) { consoleWarn(`Translation key "${key}" not found in "${current.value}", trying fallback locale`); str = getObjectValueByPath(fallbackLocale, shortKey, null); } if (!str) { consoleError(`Translation key "${key}" not found in fallback`); str = key; } if (typeof str !== "string") { consoleError(`Translation key "${key}" has a non-string value`); str = key; } return replace(str, params); }; }; function createNumberFunction(current, fallback) { return (value, options) => { const numberFormat = new Intl.NumberFormat([current.value, fallback.value], options); return numberFormat.format(value); }; } function useProvided(props, prop, provided) { const internal = useProxiedModel(props, prop, props[prop] ?? provided.value); internal.value = props[prop] ?? provided.value; watch(provided, (v) => { if (props[prop] == null) { internal.value = provided.value; } }); return internal; } function createProvideFunction(state) { return (props) => { const current = useProvided(props, "locale", state.current); const fallback = useProvided(props, "fallback", state.fallback); const messages = useProvided(props, "messages", state.messages); return { name: "vuetify", current, fallback, messages, t: createTranslateFunction(current, fallback, messages), n: createNumberFunction(current, fallback), provide: createProvideFunction({ current, fallback, messages }) }; }; } function createVuetifyAdapter(options) { const current = shallowRef((options == null ? void 0 : options.locale) ?? "en"); const fallback = shallowRef((options == null ? void 0 : options.fallback) ?? "en"); const messages = ref({ en: en_default, ...options == null ? void 0 : options.messages }); return { name: "vuetify", current, fallback, messages, t: createTranslateFunction(current, fallback, messages), n: createNumberFunction(current, fallback), provide: createProvideFunction({ current, fallback, messages }) }; } // node_modules/vuetify/lib/composables/locale.mjs var LocaleSymbol = Symbol.for("vuetify:locale"); function isLocaleInstance(obj) { return obj.name != null; } function createLocale(options) { const i18n = (options == null ? void 0 : options.adapter) && isLocaleInstance(options == null ? void 0 : options.adapter) ? options == null ? void 0 : options.adapter : createVuetifyAdapter(options); const rtl = createRtl(i18n, options); return { ...i18n, ...rtl }; } function useLocale() { const locale = inject(LocaleSymbol); if (!locale) throw new Error("[Vuetify] Could not find injected locale instance"); return locale; } var RtlSymbol = Symbol.for("vuetify:rtl"); function genDefaults() { return { af: false, ar: true, bg: false, ca: false, ckb: false, cs: false, de: false, el: false, en: false, es: false, et: false, fa: true, fi: false, fr: false, hr: false, hu: false, he: true, id: false, it: false, ja: false, km: false, ko: false, lv: false, lt: false, nl: false, no: false, pl: false, pt: false, ro: false, ru: false, sk: false, sl: false, srCyrl: false, srLatn: false, sv: false, th: false, tr: false, az: false, uk: false, vi: false, zhHans: false, zhHant: false }; } function createRtl(i18n, options) { const rtl = ref((options == null ? void 0 : options.rtl) ?? genDefaults()); const isRtl = computed(() => rtl.value[i18n.current.value] ?? false); return { isRtl, rtl, rtlClasses: computed(() => `v-locale--is-${isRtl.value ? "rtl" : "ltr"}`) }; } function useRtl() { const locale = inject(LocaleSymbol); if (!locale) throw new Error("[Vuetify] Could not find injected rtl instance"); return { isRtl: locale.isRtl, rtlClasses: locale.rtlClasses }; } export { LocaleSymbol, createLocale, useLocale, useRtl }; //# sourceMappingURL=chunk-IR5437QA.js.map