���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
.output.1
/
server
/
chunks
/
build
/
Viewing: server.mjs
import { hasInjectionContext, inject, version, ref, watchEffect, watch, getCurrentInstance, shallowRef, toRef, onServerPrefetch, isRef, defineComponent, provide, createElementBlock, defineAsyncComponent, h, computed, unref, shallowReactive, Suspense, nextTick, Fragment, Transition, useSSRContext, useAttrs, toValue, resolveComponent, mergeProps, createVNode, resolveDynamicComponent, withCtx, renderSlot, openBlock, createBlock, createCommentVNode, toDisplayString as toDisplayString$1, createApp, effectScope, reactive, getCurrentScope, isReactive, toRaw, onErrorCaptured, onScopeDispose, isReadonly, toRefs, markRaw, Text, isShallow, createSlots, renderList } from 'vue'; import { $ as $fetch$1, l as klona, p as parse$1, m as getRequestHeader, n as defuFn, o as defu, q as sanitizeStatusCode, r as destr, t as isEqual$1, v as setCookie, w as getCookie, x as deleteCookie, y as createDefu, z as createHooks, h as createError$1, A as getRequestHeaders, B as toRouteMatcher, C as createRouter$1 } from '../runtime.mjs'; import { b as baseURL } from '../routes/renderer.mjs'; import { CapoPlugin, getActiveHead } from 'unhead'; import { defineHeadPlugin, composableNames } from '@unhead/shared'; import { useRoute as useRoute$1, RouterView, createMemoryHistory, createRouter, START_LOCATION } from 'vue-router'; import { createSharedComposable, useTimestamp } from '@vueuse/core'; import { extendTailwindMerge, twMerge, twJoin } from 'tailwind-merge'; import { Icon, getIcon, loadIcons, _api, disableCache, addAPIProvider } from '@iconify/vue'; import { ssrRenderComponent, ssrRenderAttrs, ssrRenderVNode, ssrRenderClass, ssrInterpolate, ssrRenderSlot, ssrRenderList, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport } from 'vue/server-renderer'; import { getIconCSS } from '@iconify/utils/lib/css/icon'; import 'node:http'; import 'node:https'; import 'fs'; import 'path'; import 'node:fs'; import 'node:url'; import '@iconify/utils'; import 'consola/core'; import 'vue-bundle-renderer/runtime'; import 'devalue'; import '@unhead/ssr'; function createContext$1(opts = {}) { let currentInstance; let isSingleton = false; const checkConflict = (instance) => { if (currentInstance && currentInstance !== instance) { throw new Error("Context conflict"); } }; let als; if (opts.asyncContext) { const _AsyncLocalStorage = opts.AsyncLocalStorage || globalThis.AsyncLocalStorage; if (_AsyncLocalStorage) { als = new _AsyncLocalStorage(); } else { console.warn("[unctx] `AsyncLocalStorage` is not provided."); } } const _getCurrentInstance = () => { if (als && currentInstance === void 0) { const instance = als.getStore(); if (instance !== void 0) { return instance; } } return currentInstance; }; return { use: () => { const _instance = _getCurrentInstance(); if (_instance === void 0) { throw new Error("Context is not available"); } return _instance; }, tryUse: () => { return _getCurrentInstance(); }, set: (instance, replace) => { if (!replace) { checkConflict(instance); } currentInstance = instance; isSingleton = true; }, unset: () => { currentInstance = void 0; isSingleton = false; }, call: (instance, callback) => { checkConflict(instance); currentInstance = instance; try { return als ? als.run(instance, callback) : callback(); } finally { if (!isSingleton) { currentInstance = void 0; } } }, async callAsync(instance, callback) { currentInstance = instance; const onRestore = () => { currentInstance = instance; }; const onLeave = () => currentInstance === instance ? onRestore : void 0; asyncHandlers$1.add(onLeave); try { const r = als ? als.run(instance, callback) : callback(); if (!isSingleton) { currentInstance = void 0; } return await r; } finally { asyncHandlers$1.delete(onLeave); } } }; } function createNamespace$1(defaultOpts = {}) { const contexts = {}; return { get(key, opts = {}) { if (!contexts[key]) { contexts[key] = createContext$1({ ...defaultOpts, ...opts }); } contexts[key]; return contexts[key]; } }; } const _globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : {}; const globalKey$2 = "__unctx__"; const defaultNamespace = _globalThis[globalKey$2] || (_globalThis[globalKey$2] = createNamespace$1()); const getContext = (key, opts = {}) => defaultNamespace.get(key, opts); const asyncHandlersKey$1 = "__unctx_async_handlers__"; const asyncHandlers$1 = _globalThis[asyncHandlersKey$1] || (_globalThis[asyncHandlersKey$1] = /* @__PURE__ */ new Set()); if (!globalThis.$fetch) { globalThis.$fetch = $fetch$1.create({ baseURL: baseURL() }); } const appLayoutTransition = false; const appPageTransition = false; const appKeepalive = false; const nuxtLinkDefaults = { "componentName": "NuxtLink", "prefetch": true, "prefetchOn": { "visibility": true } }; const asyncDataDefaults = { "value": null, "errorValue": null, "deep": true }; const fetchDefaults = {}; const appId = "nuxt-app"; function getNuxtAppCtx(id = appId) { return getContext(id, { asyncContext: false }); } const NuxtPluginIndicator = "__nuxt_plugin"; function createNuxtApp(options) { let hydratingCount = 0; const nuxtApp = { _id: options.id || appId || "nuxt-app", _scope: effectScope(), provide: void 0, globalName: "nuxt", versions: { get nuxt() { return "3.13.0"; }, get vue() { return nuxtApp.vueApp.version; } }, payload: shallowReactive({ data: shallowReactive({}), state: reactive({}), once: /* @__PURE__ */ new Set(), _errors: shallowReactive({}) }), static: { data: {} }, runWithContext(fn) { if (nuxtApp._scope.active && !getCurrentScope()) { return nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn)); } return callWithNuxt(nuxtApp, fn); }, isHydrating: false, deferHydration() { if (!nuxtApp.isHydrating) { return () => { }; } hydratingCount++; let called = false; return () => { if (called) { return; } called = true; hydratingCount--; if (hydratingCount === 0) { nuxtApp.isHydrating = false; return nuxtApp.callHook("app:suspense:resolve"); } }; }, _asyncDataPromises: {}, _asyncData: shallowReactive({}), _payloadRevivers: {}, ...options }; { nuxtApp.payload.serverRendered = true; } nuxtApp.hooks = createHooks(); nuxtApp.hook = nuxtApp.hooks.hook; { const contextCaller = async function(hooks, args) { for (const hook of hooks) { await nuxtApp.runWithContext(() => hook(...args)); } }; nuxtApp.hooks.callHook = (name, ...args) => nuxtApp.hooks.callHookWith(contextCaller, name, ...args); } nuxtApp.callHook = nuxtApp.hooks.callHook; nuxtApp.provide = (name, value) => { const $name = "$" + name; defineGetter$1(nuxtApp, $name, value); defineGetter$1(nuxtApp.vueApp.config.globalProperties, $name, value); }; defineGetter$1(nuxtApp.vueApp, "$nuxt", nuxtApp); defineGetter$1(nuxtApp.vueApp.config.globalProperties, "$nuxt", nuxtApp); { if (nuxtApp.ssrContext) { nuxtApp.ssrContext.nuxt = nuxtApp; nuxtApp.ssrContext._payloadReducers = {}; nuxtApp.payload.path = nuxtApp.ssrContext.url; } nuxtApp.ssrContext = nuxtApp.ssrContext || {}; if (nuxtApp.ssrContext.payload) { Object.assign(nuxtApp.payload, nuxtApp.ssrContext.payload); } nuxtApp.ssrContext.payload = nuxtApp.payload; nuxtApp.ssrContext.config = { public: options.ssrContext.runtimeConfig.public, app: options.ssrContext.runtimeConfig.app }; } const runtimeConfig = options.ssrContext.runtimeConfig; nuxtApp.provide("config", runtimeConfig); return nuxtApp; } function registerPluginHooks(nuxtApp, plugin2) { if (plugin2.hooks) { nuxtApp.hooks.addHooks(plugin2.hooks); } } async function applyPlugin(nuxtApp, plugin2) { if (typeof plugin2 === "function") { const { provide: provide2 } = await nuxtApp.runWithContext(() => plugin2(nuxtApp)) || {}; if (provide2 && typeof provide2 === "object") { for (const key in provide2) { nuxtApp.provide(key, provide2[key]); } } } } async function applyPlugins(nuxtApp, plugins2) { var _a, _b, _c, _d; const resolvedPlugins = []; const unresolvedPlugins = []; const parallels = []; const errors = []; let promiseDepth = 0; async function executePlugin(plugin2) { var _a2; const unresolvedPluginsForThisPlugin = ((_a2 = plugin2.dependsOn) == null ? void 0 : _a2.filter((name) => plugins2.some((p) => p._name === name) && !resolvedPlugins.includes(name))) ?? []; if (unresolvedPluginsForThisPlugin.length > 0) { unresolvedPlugins.push([new Set(unresolvedPluginsForThisPlugin), plugin2]); } else { const promise = applyPlugin(nuxtApp, plugin2).then(async () => { if (plugin2._name) { resolvedPlugins.push(plugin2._name); await Promise.all(unresolvedPlugins.map(async ([dependsOn, unexecutedPlugin]) => { if (dependsOn.has(plugin2._name)) { dependsOn.delete(plugin2._name); if (dependsOn.size === 0) { promiseDepth++; await executePlugin(unexecutedPlugin); } } })); } }); if (plugin2.parallel) { parallels.push(promise.catch((e) => errors.push(e))); } else { await promise; } } } for (const plugin2 of plugins2) { if (((_a = nuxtApp.ssrContext) == null ? void 0 : _a.islandContext) && ((_b = plugin2.env) == null ? void 0 : _b.islands) === false) { continue; } registerPluginHooks(nuxtApp, plugin2); } for (const plugin2 of plugins2) { if (((_c = nuxtApp.ssrContext) == null ? void 0 : _c.islandContext) && ((_d = plugin2.env) == null ? void 0 : _d.islands) === false) { continue; } await executePlugin(plugin2); } await Promise.all(parallels); if (promiseDepth) { for (let i = 0; i < promiseDepth; i++) { await Promise.all(parallels); } } if (errors.length) { throw errors[0]; } } // @__NO_SIDE_EFFECTS__ function defineNuxtPlugin(plugin2) { if (typeof plugin2 === "function") { return plugin2; } const _name = plugin2._name || plugin2.name; delete plugin2.name; return Object.assign(plugin2.setup || (() => { }), plugin2, { [NuxtPluginIndicator]: true, _name }); } function callWithNuxt(nuxt, setup, args) { const fn = () => setup(); const nuxtAppCtx = getNuxtAppCtx(nuxt._id); { return nuxt.vueApp.runWithContext(() => nuxtAppCtx.callAsync(nuxt, fn)); } } function tryUseNuxtApp(id) { var _a; let nuxtAppInstance; if (hasInjectionContext()) { nuxtAppInstance = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app.$nuxt; } nuxtAppInstance = nuxtAppInstance || getNuxtAppCtx(id).tryUse(); return nuxtAppInstance || null; } function useNuxtApp(id) { const nuxtAppInstance = tryUseNuxtApp(id); if (!nuxtAppInstance) { { throw new Error("[nuxt] instance unavailable"); } } return nuxtAppInstance; } // @__NO_SIDE_EFFECTS__ function useRuntimeConfig(_event) { return useNuxtApp().$config; } function defineGetter$1(obj, key, val) { Object.defineProperty(obj, key, { get: () => val }); } const HASH_RE = /#/g; const AMPERSAND_RE = /&/g; const SLASH_RE = /\//g; const EQUAL_RE = /=/g; const PLUS_RE = /\+/g; const ENC_CARET_RE = /%5e/gi; const ENC_BACKTICK_RE = /%60/gi; const ENC_PIPE_RE = /%7c/gi; const ENC_SPACE_RE = /%20/gi; function encode(text) { return encodeURI("" + text).replace(ENC_PIPE_RE, "|"); } function encodeQueryValue(input2) { return encode(typeof input2 === "string" ? input2 : JSON.stringify(input2)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F"); } function encodeQueryKey(text) { return encodeQueryValue(text).replace(EQUAL_RE, "%3D"); } function decode(text = "") { try { return decodeURIComponent("" + text); } catch { return "" + text; } } function decodeQueryKey(text) { return decode(text.replace(PLUS_RE, " ")); } function decodeQueryValue(text) { return decode(text.replace(PLUS_RE, " ")); } function parseQuery(parametersString = "") { const object = {}; if (parametersString[0] === "?") { parametersString = parametersString.slice(1); } for (const parameter of parametersString.split("&")) { const s = parameter.match(/([^=]+)=?(.*)/) || []; if (s.length < 2) { continue; } const key = decodeQueryKey(s[1]); if (key === "__proto__" || key === "constructor") { continue; } const value = decodeQueryValue(s[2] || ""); if (object[key] === void 0) { object[key] = value; } else if (Array.isArray(object[key])) { object[key].push(value); } else { object[key] = [object[key], value]; } } return object; } function encodeQueryItem(key, value) { if (typeof value === "number" || typeof value === "boolean") { value = String(value); } if (!value) { return encodeQueryKey(key); } if (Array.isArray(value)) { return value.map((_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`).join("&"); } return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`; } function stringifyQuery(query) { return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&"); } const PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/; const PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/; const PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/; const PROTOCOL_SCRIPT_RE = /^[\s\0]*(blob|data|javascript|vbscript):$/i; const TRAILING_SLASH_RE = /\/$|\/\?|\/#/; const JOIN_LEADING_SLASH_RE = /^\.?\//; function hasProtocol(inputString, opts = {}) { if (typeof opts === "boolean") { opts = { acceptRelative: opts }; } if (opts.strict) { return PROTOCOL_STRICT_REGEX.test(inputString); } return PROTOCOL_REGEX.test(inputString) || (opts.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(inputString) : false); } function isScriptProtocol(protocol) { return !!protocol && PROTOCOL_SCRIPT_RE.test(protocol); } function hasTrailingSlash(input2 = "", respectQueryAndFragment) { if (!respectQueryAndFragment) { return input2.endsWith("/"); } return TRAILING_SLASH_RE.test(input2); } function withoutTrailingSlash(input2 = "", respectQueryAndFragment) { if (!respectQueryAndFragment) { return (hasTrailingSlash(input2) ? input2.slice(0, -1) : input2) || "/"; } if (!hasTrailingSlash(input2, true)) { return input2 || "/"; } let path = input2; let fragment = ""; const fragmentIndex = input2.indexOf("#"); if (fragmentIndex >= 0) { path = input2.slice(0, fragmentIndex); fragment = input2.slice(fragmentIndex); } const [s0, ...s] = path.split("?"); const cleanPath = s0.endsWith("/") ? s0.slice(0, -1) : s0; return (cleanPath || "/") + (s.length > 0 ? `?${s.join("?")}` : "") + fragment; } function withTrailingSlash(input2 = "", respectQueryAndFragment) { if (!respectQueryAndFragment) { return input2.endsWith("/") ? input2 : input2 + "/"; } if (hasTrailingSlash(input2, true)) { return input2 || "/"; } let path = input2; let fragment = ""; const fragmentIndex = input2.indexOf("#"); if (fragmentIndex >= 0) { path = input2.slice(0, fragmentIndex); fragment = input2.slice(fragmentIndex); if (!path) { return fragment; } } const [s0, ...s] = path.split("?"); return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment; } function hasLeadingSlash(input2 = "") { return input2.startsWith("/"); } function withLeadingSlash(input2 = "") { return hasLeadingSlash(input2) ? input2 : "/" + input2; } function withQuery(input2, query) { const parsed = parseURL(input2); const mergedQuery = { ...parseQuery(parsed.search), ...query }; parsed.search = stringifyQuery(mergedQuery); return stringifyParsedURL(parsed); } function isNonEmptyURL(url) { return url && url !== "/"; } function joinURL(base, ...input2) { let url = base || ""; for (const segment of input2.filter((url2) => isNonEmptyURL(url2))) { if (url) { const _segment = segment.replace(JOIN_LEADING_SLASH_RE, ""); url = withTrailingSlash(url) + _segment; } else { url = segment; } } return url; } function isEqual(a, b, options = {}) { if (!options.trailingSlash) { a = withTrailingSlash(a); b = withTrailingSlash(b); } if (!options.leadingSlash) { a = withLeadingSlash(a); b = withLeadingSlash(b); } if (!options.encoding) { a = decode(a); b = decode(b); } return a === b; } const protocolRelative = Symbol.for("ufo:protocolRelative"); function parseURL(input2 = "", defaultProto) { const _specialProtoMatch = input2.match( /^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i ); if (_specialProtoMatch) { const [, _proto, _pathname = ""] = _specialProtoMatch; return { protocol: _proto.toLowerCase(), pathname: _pathname, href: _proto + _pathname, auth: "", host: "", search: "", hash: "" }; } if (!hasProtocol(input2, { acceptRelative: true })) { return parsePath(input2); } const [, protocol = "", auth, hostAndPath = ""] = input2.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || []; let [, host = "", path = ""] = hostAndPath.match(/([^#/?]*)(.*)?/) || []; if (protocol === "file:") { path = path.replace(/\/(?=[A-Za-z]:)/, ""); } const { pathname, search, hash } = parsePath(path); return { protocol: protocol.toLowerCase(), auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : "", host, pathname, search, hash, [protocolRelative]: !protocol }; } function parsePath(input2 = "") { const [pathname = "", search = "", hash = ""] = (input2.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1); return { pathname, search, hash }; } function stringifyParsedURL(parsed) { const pathname = parsed.pathname || ""; const search = parsed.search ? (parsed.search.startsWith("?") ? "" : "?") + parsed.search : ""; const hash = parsed.hash || ""; const auth = parsed.auth ? parsed.auth + "@" : ""; const host = parsed.host || ""; const proto = parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || "") + "//" : ""; return proto + auth + host + pathname + search + hash; } const LayoutMetaSymbol = Symbol("layout-meta"); const PageRouteSymbol = Symbol("route"); const useRouter = () => { var _a; return (_a = useNuxtApp()) == null ? void 0 : _a.$router; }; const useRoute = () => { if (hasInjectionContext()) { return inject(PageRouteSymbol, useNuxtApp()._route); } return useNuxtApp()._route; }; // @__NO_SIDE_EFFECTS__ function defineNuxtRouteMiddleware(middleware) { return middleware; } const addRouteMiddleware = (name, middleware, options = {}) => { const nuxtApp = useNuxtApp(); const global2 = options.global || typeof name !== "string"; const mw = middleware; if (!mw) { console.warn("[nuxt] No route middleware passed to `addRouteMiddleware`.", name); return; } if (global2) { nuxtApp._middleware.global.push(mw); } else { nuxtApp._middleware.named[name] = mw; } }; const isProcessingMiddleware = () => { try { if (useNuxtApp()._processingMiddleware) { return true; } } catch { return false; } return false; }; const navigateTo = (to, options) => { if (!to) { to = "/"; } const toPath = typeof to === "string" ? to : "path" in to ? resolveRouteObject(to) : useRouter().resolve(to).href; const isExternalHost = hasProtocol(toPath, { acceptRelative: true }); const isExternal = (options == null ? void 0 : options.external) || isExternalHost; if (isExternal) { if (!(options == null ? void 0 : options.external)) { throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`."); } const { protocol } = new URL(toPath, "http://localhost"); if (protocol && isScriptProtocol(protocol)) { throw new Error(`Cannot navigate to a URL with '${protocol}' protocol.`); } } const inMiddleware = isProcessingMiddleware(); const router = useRouter(); const nuxtApp = useNuxtApp(); { if (nuxtApp.ssrContext) { const fullPath = typeof to === "string" || isExternal ? toPath : router.resolve(to).fullPath || "/"; const location2 = isExternal ? toPath : joinURL((/* @__PURE__ */ useRuntimeConfig()).app.baseURL, fullPath); const redirect = async function(response) { await nuxtApp.callHook("app:redirected"); const encodedLoc = location2.replace(/"/g, "%22"); const encodedHeader = encodeURL(location2, isExternalHost); nuxtApp.ssrContext._renderResponse = { statusCode: sanitizeStatusCode((options == null ? void 0 : options.redirectCode) || 302, 302), body: `<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${encodedLoc}"></head></html>`, headers: { location: encodedHeader } }; return response; }; if (!isExternal && inMiddleware) { router.afterEach((final) => final.fullPath === fullPath ? redirect(false) : void 0); return to; } return redirect(!inMiddleware ? void 0 : ( /* abort route navigation */ false )); } } if (isExternal) { nuxtApp._scope.stop(); if (options == null ? void 0 : options.replace) { (void 0).replace(toPath); } else { (void 0).href = toPath; } if (inMiddleware) { if (!nuxtApp.isHydrating) { return false; } return new Promise(() => { }); } return Promise.resolve(); } return (options == null ? void 0 : options.replace) ? router.replace(to) : router.push(to); }; function resolveRouteObject(to) { return withQuery(to.path || "", to.query || {}) + (to.hash || ""); } function encodeURL(location2, isExternalHost = false) { const url = new URL(location2, "http://localhost"); if (!isExternalHost) { return url.pathname + url.search + url.hash; } if (location2.startsWith("//")) { return url.toString().replace(url.protocol, ""); } return url.toString(); } const NUXT_ERROR_SIGNATURE = "__nuxt_error"; const useError = () => toRef(useNuxtApp().payload, "error"); const showError = (error) => { const nuxtError = createError(error); try { const nuxtApp = useNuxtApp(); const error2 = useError(); if (false) ; error2.value = error2.value || nuxtError; } catch { throw nuxtError; } return nuxtError; }; const isNuxtError = (error) => !!error && typeof error === "object" && NUXT_ERROR_SIGNATURE in error; const createError = (error) => { const nuxtError = createError$1(error); Object.defineProperty(nuxtError, NUXT_ERROR_SIGNATURE, { value: true, configurable: false, writable: false }); return nuxtError; }; version[0] === "3"; function resolveUnref(r) { return typeof r === "function" ? r() : unref(r); } function resolveUnrefHeadInput(ref2) { if (ref2 instanceof Promise) return ref2; const root = resolveUnref(ref2); if (!ref2 || !root) return root; if (Array.isArray(root)) return root.map((r) => resolveUnrefHeadInput(r)); if (typeof root === "object") { const resolved = {}; for (const k in root) { if (!Object.prototype.hasOwnProperty.call(root, k)) { continue; } if (k === "titleTemplate" || k[0] === "o" && k[1] === "n") { resolved[k] = unref(root[k]); continue; } resolved[k] = resolveUnrefHeadInput(root[k]); } return resolved; } return root; } defineHeadPlugin({ hooks: { "entries:resolve": (ctx) => { for (const entry2 of ctx.entries) entry2.resolvedInput = resolveUnrefHeadInput(entry2.input); } } }); const headSymbol = "usehead"; const _global = typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; const globalKey$1 = "__unhead_injection_handler__"; function setHeadInjectionHandler(handler) { _global[globalKey$1] = handler; } function injectHead() { if (globalKey$1 in _global) { return _global[globalKey$1](); } const head = inject(headSymbol); if (!head && "production" !== "production") console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."); return head || getActiveHead(); } function useHead(input2, options = {}) { const head = options.head || injectHead(); if (head) { if (!head.ssr) return clientUseHead(head, input2, options); return head.push(input2, options); } } function clientUseHead(head, input2, options = {}) { const deactivated = ref(false); const resolvedInput = ref({}); watchEffect(() => { resolvedInput.value = deactivated.value ? {} : resolveUnrefHeadInput(input2); }); const entry2 = head.push(resolvedInput.value, options); watch(resolvedInput, (e) => { entry2.patch(e); }); getCurrentInstance(); return entry2; } const coreComposableNames = [ "injectHead" ]; ({ "@unhead/vue": [...coreComposableNames, ...composableNames] }); [CapoPlugin({ track: true })]; const unhead_KgADcZ0jPj = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:head", enforce: "pre", setup(nuxtApp) { const head = nuxtApp.ssrContext.head; setHeadInjectionHandler( // need a fresh instance of the nuxt app to avoid parallel requests interfering with each other () => useNuxtApp().vueApp._context.provides.usehead ); nuxtApp.vueApp.use(head); } }); function createContext(opts = {}) { let currentInstance; let isSingleton = false; const checkConflict = (instance) => { if (currentInstance && currentInstance !== instance) { throw new Error("Context conflict"); } }; let als; if (opts.asyncContext) { const _AsyncLocalStorage = opts.AsyncLocalStorage || globalThis.AsyncLocalStorage; if (_AsyncLocalStorage) { als = new _AsyncLocalStorage(); } else { console.warn("[unctx] `AsyncLocalStorage` is not provided."); } } const _getCurrentInstance = () => { if (als && currentInstance === void 0) { const instance = als.getStore(); if (instance !== void 0) { return instance; } } return currentInstance; }; return { use: () => { const _instance = _getCurrentInstance(); if (_instance === void 0) { throw new Error("Context is not available"); } return _instance; }, tryUse: () => { return _getCurrentInstance(); }, set: (instance, replace) => { if (!replace) { checkConflict(instance); } currentInstance = instance; isSingleton = true; }, unset: () => { currentInstance = void 0; isSingleton = false; }, call: (instance, callback) => { checkConflict(instance); currentInstance = instance; try { return als ? als.run(instance, callback) : callback(); } finally { if (!isSingleton) { currentInstance = void 0; } } }, async callAsync(instance, callback) { currentInstance = instance; const onRestore = () => { currentInstance = instance; }; const onLeave = () => currentInstance === instance ? onRestore : void 0; asyncHandlers.add(onLeave); try { const r = als ? als.run(instance, callback) : callback(); if (!isSingleton) { currentInstance = void 0; } return await r; } finally { asyncHandlers.delete(onLeave); } } }; } function createNamespace(defaultOpts = {}) { const contexts = {}; return { get(key, opts = {}) { if (!contexts[key]) { contexts[key] = createContext({ ...defaultOpts, ...opts }); } contexts[key]; return contexts[key]; } }; } const _globalThis$1 = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : {}; const globalKey = "__unctx__"; _globalThis$1[globalKey] || (_globalThis$1[globalKey] = createNamespace()); const asyncHandlersKey = "__unctx_async_handlers__"; const asyncHandlers = _globalThis$1[asyncHandlersKey] || (_globalThis$1[asyncHandlersKey] = /* @__PURE__ */ new Set()); function executeAsync(function_) { const restores = []; for (const leaveHandler of asyncHandlers) { const restore2 = leaveHandler(); if (restore2) { restores.push(restore2); } } const restore = () => { for (const restore2 of restores) { restore2(); } }; let awaitable = function_(); if (awaitable && typeof awaitable === "object" && "catch" in awaitable) { awaitable = awaitable.catch((error) => { restore(); throw error; }); } return [awaitable, restore]; } const interpolatePath = (route, match) => { return match.path.replace(/(:\w+)\([^)]+\)/g, "$1").replace(/(:\w+)[?+*]/g, "$1").replace(/:\w+/g, (r) => { var _a; return ((_a = route.params[r.slice(1)]) == null ? void 0 : _a.toString()) || ""; }); }; const generateRouteKey$1 = (routeProps, override) => { const matchedRoute = routeProps.route.matched.find((m) => { var _a; return ((_a = m.components) == null ? void 0 : _a.default) === routeProps.Component.type; }); const source = override ?? (matchedRoute == null ? void 0 : matchedRoute.meta.key) ?? (matchedRoute && interpolatePath(routeProps.route, matchedRoute)); return typeof source === "function" ? source(routeProps.route) : source; }; const wrapInKeepAlive = (props, children) => { return { default: () => children }; }; function toArray(value) { return Array.isArray(value) ? value : [value]; } async function getRouteRules(url) { { const _routeRulesMatcher = toRouteMatcher( createRouter$1({ routes: (/* @__PURE__ */ useRuntimeConfig()).nitro.routeRules }) ); return defu({}, ..._routeRulesMatcher.matchAll(url).reverse()); } } const __nuxt_page_meta$i = { middleware: ["auth"], title: "" }; const __nuxt_page_meta$h = { title: "", middleware: ["auth"] }; const __nuxt_page_meta$g = { title: "", layout: "with-out-footer", middleware: ["auth"] }; const __nuxt_page_meta$f = { title: "start", middleware: ["auth"] }; const __nuxt_page_meta$e = { middleware: ["auth"], title: "" }; const __nuxt_page_meta$d = { layout: "auth-login", title: "analysis_cabinet" }; const __nuxt_page_meta$c = { layout: "auth-login", title: "analysis_cabinet" }; const __nuxt_page_meta$b = { layout: "auth" }; const __nuxt_page_meta$a = { title: "Payment", middleware: ["auth"], layout: "auth" }; const __nuxt_page_meta$9 = { title: "Project Details", layout: "with-out-footer", middleware: ["auth"] }; const __nuxt_page_meta$8 = { title: "", layout: "with-out-footer", middleware: ["auth"] }; const __nuxt_page_meta$7 = { title: "", layout: "with-out-footer", middleware: ["auth"] }; const __nuxt_page_meta$6 = { title: "", middleware: ["auth"] }; const __nuxt_page_meta$5 = { title: "", layout: "with-out-footer", middleware: ["auth"] }; const __nuxt_page_meta$4 = { title: "", layout: "with-out-footer", middleware: ["auth"] }; const __nuxt_page_meta$3 = { title: "", middleware: ["auth"] }; const __nuxt_page_meta$2 = { title: "", middleware: ["auth"] }; const __nuxt_page_meta$1 = { title: "", middleware: ["auth"] }; const __nuxt_page_meta = { middleware: ["auth"], title: "Unit Selection" }; const _routes = [ { name: "analyze-category___fa___default", path: "/analyze/category", meta: __nuxt_page_meta$i || {}, component: () => import('./category-CuafqiNA.mjs').then((m) => m.default || m) }, { name: "analyze-category___fa", path: "/fa/analyze/category", meta: __nuxt_page_meta$i || {}, component: () => import('./category-CuafqiNA.mjs').then((m) => m.default || m) }, { name: "analyze-category___en", path: "/en/analyze/category", meta: __nuxt_page_meta$i || {}, component: () => import('./category-CuafqiNA.mjs').then((m) => m.default || m) }, { name: "analyze-dimensions___fa___default", path: "/analyze/dimensions", meta: __nuxt_page_meta$h || {}, component: () => import('./dimensions-Bdd2neCq.mjs').then((m) => m.default || m) }, { name: "analyze-dimensions___fa", path: "/fa/analyze/dimensions", meta: __nuxt_page_meta$h || {}, component: () => import('./dimensions-Bdd2neCq.mjs').then((m) => m.default || m) }, { name: "analyze-dimensions___en", path: "/en/analyze/dimensions", meta: __nuxt_page_meta$h || {}, component: () => import('./dimensions-Bdd2neCq.mjs').then((m) => m.default || m) }, { name: "analyze-list___fa___default", path: "/analyze/list", meta: __nuxt_page_meta$g || {}, component: () => import('./list-EEeIDcxM.mjs').then((m) => m.default || m) }, { name: "analyze-list___fa", path: "/fa/analyze/list", meta: __nuxt_page_meta$g || {}, component: () => import('./list-EEeIDcxM.mjs').then((m) => m.default || m) }, { name: "analyze-list___en", path: "/en/analyze/list", meta: __nuxt_page_meta$g || {}, component: () => import('./list-EEeIDcxM.mjs').then((m) => m.default || m) }, { name: "analyze-start___fa___default", path: "/analyze/start", meta: __nuxt_page_meta$f || {}, component: () => import('./start-Bspg9_qN.mjs').then((m) => m.default || m) }, { name: "analyze-start___fa", path: "/fa/analyze/start", meta: __nuxt_page_meta$f || {}, component: () => import('./start-Bspg9_qN.mjs').then((m) => m.default || m) }, { name: "analyze-start___en", path: "/en/analyze/start", meta: __nuxt_page_meta$f || {}, component: () => import('./start-Bspg9_qN.mjs').then((m) => m.default || m) }, { name: "index___fa___default", path: "/", meta: __nuxt_page_meta$e || {}, component: () => import('./index-D76f4n6e.mjs').then((m) => m.default || m) }, { name: "index___fa", path: "/fa", meta: __nuxt_page_meta$e || {}, component: () => import('./index-D76f4n6e.mjs').then((m) => m.default || m) }, { name: "index___en", path: "/en", meta: __nuxt_page_meta$e || {}, component: () => import('./index-D76f4n6e.mjs').then((m) => m.default || m) }, { name: "login___fa___default", path: "/login", meta: __nuxt_page_meta$d || {}, component: () => import('./index-x-C888a_.mjs').then((m) => m.default || m) }, { name: "login___fa", path: "/fa/login", meta: __nuxt_page_meta$d || {}, component: () => import('./index-x-C888a_.mjs').then((m) => m.default || m) }, { name: "login___en", path: "/en/login", meta: __nuxt_page_meta$d || {}, component: () => import('./index-x-C888a_.mjs').then((m) => m.default || m) }, { name: "login-register-otp___fa___default", path: "/login/register-otp", meta: __nuxt_page_meta$c || {}, component: () => import('./register-otp-fRwH_sMT.mjs').then((m) => m.default || m) }, { name: "login-register-otp___fa", path: "/fa/login/register-otp", meta: __nuxt_page_meta$c || {}, component: () => import('./register-otp-fRwH_sMT.mjs').then((m) => m.default || m) }, { name: "login-register-otp___en", path: "/en/login/register-otp", meta: __nuxt_page_meta$c || {}, component: () => import('./register-otp-fRwH_sMT.mjs').then((m) => m.default || m) }, { name: "logout___fa___default", path: "/logout", meta: __nuxt_page_meta$b || {}, component: () => import('./logout-DP3y7xhq.mjs').then((m) => m.default || m) }, { name: "logout___fa", path: "/fa/logout", meta: __nuxt_page_meta$b || {}, component: () => import('./logout-DP3y7xhq.mjs').then((m) => m.default || m) }, { name: "logout___en", path: "/en/logout", meta: __nuxt_page_meta$b || {}, component: () => import('./logout-DP3y7xhq.mjs').then((m) => m.default || m) }, { name: "payment___fa___default", path: "/payment", meta: __nuxt_page_meta$a || {}, component: () => import('./payment-T6Xgp432.mjs').then((m) => m.default || m) }, { name: "payment___fa", path: "/fa/payment", meta: __nuxt_page_meta$a || {}, component: () => import('./payment-T6Xgp432.mjs').then((m) => m.default || m) }, { name: "payment___en", path: "/en/payment", meta: __nuxt_page_meta$a || {}, component: () => import('./payment-T6Xgp432.mjs').then((m) => m.default || m) }, { name: "projects-id___fa___default", path: "/projects/:id()", meta: __nuxt_page_meta$9 || {}, component: () => import('./_id_-Dw-48A2f.mjs').then((m) => m.default || m) }, { name: "projects-id___fa", path: "/fa/projects/:id()", meta: __nuxt_page_meta$9 || {}, component: () => import('./_id_-Dw-48A2f.mjs').then((m) => m.default || m) }, { name: "projects-id___en", path: "/en/projects/:id()", meta: __nuxt_page_meta$9 || {}, component: () => import('./_id_-Dw-48A2f.mjs').then((m) => m.default || m) }, { name: "projects___fa___default", path: "/projects", meta: __nuxt_page_meta$8 || {}, component: () => import('./index-DwAHSgES.mjs').then((m) => m.default || m) }, { name: "projects___fa", path: "/fa/projects", meta: __nuxt_page_meta$8 || {}, component: () => import('./index-DwAHSgES.mjs').then((m) => m.default || m) }, { name: "projects___en", path: "/en/projects", meta: __nuxt_page_meta$8 || {}, component: () => import('./index-DwAHSgES.mjs').then((m) => m.default || m) }, { name: "projects-list___fa___default", path: "/projects/list", meta: __nuxt_page_meta$7 || {}, component: () => import('./list-DoPpIFDw.mjs').then((m) => m.default || m) }, { name: "projects-list___fa", path: "/fa/projects/list", meta: __nuxt_page_meta$7 || {}, component: () => import('./list-DoPpIFDw.mjs').then((m) => m.default || m) }, { name: "projects-list___en", path: "/en/projects/list", meta: __nuxt_page_meta$7 || {}, component: () => import('./list-DoPpIFDw.mjs').then((m) => m.default || m) }, { name: "settings___fa___default", path: "/settings", meta: __nuxt_page_meta$6 || {}, component: () => import('./settings-BhaNuX4m.mjs').then((m) => m.default || m) }, { name: "settings___fa", path: "/fa/settings", meta: __nuxt_page_meta$6 || {}, component: () => import('./settings-BhaNuX4m.mjs').then((m) => m.default || m) }, { name: "settings___en", path: "/en/settings", meta: __nuxt_page_meta$6 || {}, component: () => import('./settings-BhaNuX4m.mjs').then((m) => m.default || m) }, { name: "unit-id___fa___default", path: "/unit/:id()", meta: __nuxt_page_meta$5 || {}, component: () => import('./_id_-CX-ijQnF.mjs').then((m) => m.default || m) }, { name: "unit-id___fa", path: "/fa/unit/:id()", meta: __nuxt_page_meta$5 || {}, component: () => import('./_id_-CX-ijQnF.mjs').then((m) => m.default || m) }, { name: "unit-id___en", path: "/en/unit/:id()", meta: __nuxt_page_meta$5 || {}, component: () => import('./_id_-CX-ijQnF.mjs').then((m) => m.default || m) }, { name: "unit-edit-id___fa___default", path: "/unit/edit/:id()", meta: __nuxt_page_meta$4 || {}, component: () => import('./_id_-Z6Qzp50-.mjs').then((m) => m.default || m) }, { name: "unit-edit-id___fa", path: "/fa/unit/edit/:id()", meta: __nuxt_page_meta$4 || {}, component: () => import('./_id_-Z6Qzp50-.mjs').then((m) => m.default || m) }, { name: "unit-edit-id___en", path: "/en/unit/edit/:id()", meta: __nuxt_page_meta$4 || {}, component: () => import('./_id_-Z6Qzp50-.mjs').then((m) => m.default || m) }, { name: "unit-make-create___fa___default", path: "/unit/make/create", meta: __nuxt_page_meta$3 || {}, component: () => import('./create-BWgFM5qp.mjs').then((m) => m.default || m) }, { name: "unit-make-create___fa", path: "/fa/unit/make/create", meta: __nuxt_page_meta$3 || {}, component: () => import('./create-BWgFM5qp.mjs').then((m) => m.default || m) }, { name: "unit-make-create___en", path: "/en/unit/make/create", meta: __nuxt_page_meta$3 || {}, component: () => import('./create-BWgFM5qp.mjs').then((m) => m.default || m) }, { name: "unit-make-update-id___fa___default", path: "/unit/make/update/:id()", meta: __nuxt_page_meta$2 || {}, component: () => import('./_id_-vtELm6OR.mjs').then((m) => m.default || m) }, { name: "unit-make-update-id___fa", path: "/fa/unit/make/update/:id()", meta: __nuxt_page_meta$2 || {}, component: () => import('./_id_-vtELm6OR.mjs').then((m) => m.default || m) }, { name: "unit-make-update-id___en", path: "/en/unit/make/update/:id()", meta: __nuxt_page_meta$2 || {}, component: () => import('./_id_-vtELm6OR.mjs').then((m) => m.default || m) }, { name: "unit-settings-id___fa___default", path: "/unit/settings/:id()", meta: __nuxt_page_meta$1 || {}, component: () => import('./_id_-fRTtMPQX.mjs').then((m) => m.default || m) }, { name: "unit-settings-id___fa", path: "/fa/unit/settings/:id()", meta: __nuxt_page_meta$1 || {}, component: () => import('./_id_-fRTtMPQX.mjs').then((m) => m.default || m) }, { name: "unit-settings-id___en", path: "/en/unit/settings/:id()", meta: __nuxt_page_meta$1 || {}, component: () => import('./_id_-fRTtMPQX.mjs').then((m) => m.default || m) }, { name: "units___fa___default", path: "/units", meta: __nuxt_page_meta || {}, component: () => import('./units-B-ntkMEu.mjs').then((m) => m.default || m) }, { name: "units___fa", path: "/fa/units", meta: __nuxt_page_meta || {}, component: () => import('./units-B-ntkMEu.mjs').then((m) => m.default || m) }, { name: "units___en", path: "/en/units", meta: __nuxt_page_meta || {}, component: () => import('./units-B-ntkMEu.mjs').then((m) => m.default || m) } ]; const _wrapIf = (component, props, slots) => { props = props === true ? {} : props; return { default: () => { var _a; return props ? h(component, props, slots) : (_a = slots.default) == null ? void 0 : _a.call(slots); } }; }; function generateRouteKey(route) { const source = (route == null ? void 0 : route.meta.key) ?? route.path.replace(/(:\w+)\([^)]+\)/g, "$1").replace(/(:\w+)[?+*]/g, "$1").replace(/:\w+/g, (r) => { var _a; return ((_a = route.params[r.slice(1)]) == null ? void 0 : _a.toString()) || ""; }); return typeof source === "function" ? source(route) : source; } function isChangingPage(to, from) { if (to === from || from === START_LOCATION) { return false; } if (generateRouteKey(to) !== generateRouteKey(from)) { return true; } const areComponentsSame = to.matched.every( (comp, index2) => { var _a, _b; return comp.components && comp.components.default === ((_b = (_a = from.matched[index2]) == null ? void 0 : _a.components) == null ? void 0 : _b.default); } ); if (areComponentsSame) { return false; } return true; } const routerOptions0 = { scrollBehavior(to, from, savedPosition) { var _a; const nuxtApp = useNuxtApp(); const behavior = ((_a = useRouter().options) == null ? void 0 : _a.scrollBehaviorType) ?? "auto"; let position = savedPosition || void 0; const routeAllowsScrollToTop = typeof to.meta.scrollToTop === "function" ? to.meta.scrollToTop(to, from) : to.meta.scrollToTop; if (!position && from && to && routeAllowsScrollToTop !== false && isChangingPage(to, from)) { position = { left: 0, top: 0 }; } if (to.path === from.path) { if (from.hash && !to.hash) { return { left: 0, top: 0 }; } if (to.hash) { return { el: to.hash, top: _getHashElementScrollMarginTop(to.hash), behavior }; } return false; } const hasTransition = (route) => !!(route.meta.pageTransition ?? appPageTransition); const hookToWait = hasTransition(from) && hasTransition(to) ? "page:transition:finish" : "page:finish"; return new Promise((resolve2) => { nuxtApp.hooks.hookOnce(hookToWait, async () => { await new Promise((resolve22) => setTimeout(resolve22, 0)); if (to.hash) { position = { el: to.hash, top: _getHashElementScrollMarginTop(to.hash), behavior }; } resolve2(position); }); }); } }; function _getHashElementScrollMarginTop(selector) { try { const elem = (void 0).querySelector(selector); if (elem) { return (Number.parseFloat(getComputedStyle(elem).scrollMarginTop) || 0) + (Number.parseFloat(getComputedStyle((void 0).documentElement).scrollPaddingTop) || 0); } } catch { } return 0; } const configRouterOptions = { hashMode: false, scrollBehaviorType: "auto" }; const routerOptions = { ...configRouterOptions, ...routerOptions0 }; const validate = /* @__PURE__ */ defineNuxtRouteMiddleware(async (to) => { var _a; let __temp, __restore; if (!((_a = to.meta) == null ? void 0 : _a.validate)) { return; } const nuxtApp = useNuxtApp(); const router = useRouter(); const result = ([__temp, __restore] = executeAsync(() => Promise.resolve(to.meta.validate(to))), __temp = await __temp, __restore(), __temp); if (result === true) { return; } const error = createError({ statusCode: result && result.statusCode || 404, statusMessage: result && result.statusMessage || `Page Not Found: ${to.fullPath}`, data: { path: to.fullPath } }); const unsub = router.beforeResolve((final) => { unsub(); if (final === to) { const unsub2 = router.afterEach(async () => { unsub2(); await nuxtApp.runWithContext(() => showError(error)); }); return false; } }); }); const manifest_45route_45rule = /* @__PURE__ */ defineNuxtRouteMiddleware(async (to) => { { return; } }); const globalMiddleware = [ validate, manifest_45route_45rule ]; const namedMiddleware = { auth: () => import('./auth-ChyuJTDa.mjs') }; const plugin$1 = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:router", enforce: "pre", async setup(nuxtApp) { var _a, _b, _c; let __temp, __restore; let routerBase = (/* @__PURE__ */ useRuntimeConfig()).app.baseURL; if (routerOptions.hashMode && !routerBase.includes("#")) { routerBase += "#"; } const history = ((_a = routerOptions.history) == null ? void 0 : _a.call(routerOptions, routerBase)) ?? createMemoryHistory(routerBase); const routes = routerOptions.routes ? ([__temp, __restore] = executeAsync(() => routerOptions.routes(_routes)), __temp = await __temp, __restore(), __temp) ?? _routes : _routes; let startPosition; const router = createRouter({ ...routerOptions, scrollBehavior: (to, from, savedPosition) => { if (from === START_LOCATION) { startPosition = savedPosition; return; } if (routerOptions.scrollBehavior) { router.options.scrollBehavior = routerOptions.scrollBehavior; if ("scrollRestoration" in (void 0).history) { const unsub = router.beforeEach(() => { unsub(); (void 0).history.scrollRestoration = "manual"; }); } return routerOptions.scrollBehavior(to, START_LOCATION, startPosition || savedPosition); } }, history, routes }); nuxtApp.vueApp.use(router); const previousRoute = shallowRef(router.currentRoute.value); router.afterEach((_to, from) => { previousRoute.value = from; }); Object.defineProperty(nuxtApp.vueApp.config.globalProperties, "previousRoute", { get: () => previousRoute.value }); const initialURL = nuxtApp.ssrContext.url; const _route = shallowRef(router.currentRoute.value); const syncCurrentRoute = () => { _route.value = router.currentRoute.value; }; nuxtApp.hook("page:finish", syncCurrentRoute); router.afterEach((to, from) => { var _a2, _b2, _c2, _d; if (((_b2 = (_a2 = to.matched[0]) == null ? void 0 : _a2.components) == null ? void 0 : _b2.default) === ((_d = (_c2 = from.matched[0]) == null ? void 0 : _c2.components) == null ? void 0 : _d.default)) { syncCurrentRoute(); } }); const route = {}; for (const key in _route.value) { Object.defineProperty(route, key, { get: () => _route.value[key] }); } nuxtApp._route = shallowReactive(route); nuxtApp._middleware = nuxtApp._middleware || { global: [], named: {} }; useError(); if (!((_b = nuxtApp.ssrContext) == null ? void 0 : _b.islandContext)) { router.afterEach(async (to, _from, failure) => { delete nuxtApp._processingMiddleware; if (failure) { await nuxtApp.callHook("page:loading:end"); } if ((failure == null ? void 0 : failure.type) === 4) { return; } if (to.matched.length === 0) { await nuxtApp.runWithContext(() => showError(createError$1({ statusCode: 404, fatal: false, statusMessage: `Page not found: ${to.fullPath}`, data: { path: to.fullPath } }))); } else if (to.redirectedFrom && to.fullPath !== initialURL) { await nuxtApp.runWithContext(() => navigateTo(to.fullPath || "/")); } }); } try { if (true) { ; [__temp, __restore] = executeAsync(() => router.push(initialURL)), await __temp, __restore(); ; } ; [__temp, __restore] = executeAsync(() => router.isReady()), await __temp, __restore(); ; } catch (error2) { [__temp, __restore] = executeAsync(() => nuxtApp.runWithContext(() => showError(error2))), await __temp, __restore(); } const resolvedInitialRoute = router.currentRoute.value; syncCurrentRoute(); if ((_c = nuxtApp.ssrContext) == null ? void 0 : _c.islandContext) { return { provide: { router } }; } const initialLayout = nuxtApp.payload.state._layout; router.beforeEach(async (to, from) => { var _a2, _b2; await nuxtApp.callHook("page:loading:start"); to.meta = reactive(to.meta); if (nuxtApp.isHydrating && initialLayout && !isReadonly(to.meta.layout)) { to.meta.layout = initialLayout; } nuxtApp._processingMiddleware = true; if (!((_a2 = nuxtApp.ssrContext) == null ? void 0 : _a2.islandContext)) { const middlewareEntries = /* @__PURE__ */ new Set([...globalMiddleware, ...nuxtApp._middleware.global]); for (const component of to.matched) { const componentMiddleware = component.meta.middleware; if (!componentMiddleware) { continue; } for (const entry2 of toArray(componentMiddleware)) { middlewareEntries.add(entry2); } } { const routeRules = await nuxtApp.runWithContext(() => getRouteRules(to.path)); if (routeRules.appMiddleware) { for (const key in routeRules.appMiddleware) { if (routeRules.appMiddleware[key]) { middlewareEntries.add(key); } else { middlewareEntries.delete(key); } } } } for (const entry2 of middlewareEntries) { const middleware = typeof entry2 === "string" ? nuxtApp._middleware.named[entry2] || await ((_b2 = namedMiddleware[entry2]) == null ? void 0 : _b2.call(namedMiddleware).then((r) => r.default || r)) : entry2; if (!middleware) { throw new Error(`Unknown route middleware: '${entry2}'.`); } const result = await nuxtApp.runWithContext(() => middleware(to, from)); { if (result === false || result instanceof Error) { const error2 = result || createError$1({ statusCode: 404, statusMessage: `Page Not Found: ${initialURL}` }); await nuxtApp.runWithContext(() => showError(error2)); return false; } } if (result === true) { continue; } if (result || result === false) { return result; } } } }); router.onError(async () => { delete nuxtApp._processingMiddleware; await nuxtApp.callHook("page:loading:end"); }); nuxtApp.hooks.hookOnce("app:created", async () => { try { if ("name" in resolvedInitialRoute) { resolvedInitialRoute.name = void 0; } await router.replace({ ...resolvedInitialRoute, force: true }); router.options.scrollBehavior = routerOptions.scrollBehavior; } catch (error2) { await nuxtApp.runWithContext(() => showError(error2)); } }); return { provide: { router } }; } }); function definePayloadReducer(name, reduce) { { useNuxtApp().ssrContext._payloadReducers[name] = reduce; } } const reducers = { NuxtError: (data) => isNuxtError(data) && data.toJSON(), EmptyShallowRef: (data) => isRef(data) && isShallow(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_"), EmptyRef: (data) => isRef(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_"), ShallowRef: (data) => isRef(data) && isShallow(data) && data.value, ShallowReactive: (data) => isReactive(data) && isShallow(data) && toRaw(data), Ref: (data) => isRef(data) && data.value, Reactive: (data) => isReactive(data) && toRaw(data) }; const revive_payload_server_eJ33V7gbc6 = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:revive-payload:server", setup() { for (const reducer in reducers) { definePayloadReducer(reducer, reducers[reducer]); } } }); const isVue2 = false; /*! * pinia v2.2.2 * (c) 2024 Eduardo San Martin Morote * @license MIT */ let activePinia; const setActivePinia = (pinia) => activePinia = pinia; const piniaSymbol = ( /* istanbul ignore next */ Symbol() ); function isPlainObject$1(o) { return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function"; } var MutationType; (function(MutationType2) { MutationType2["direct"] = "direct"; MutationType2["patchObject"] = "patch object"; MutationType2["patchFunction"] = "patch function"; })(MutationType || (MutationType = {})); function createPinia() { const scope = effectScope(true); const state = scope.run(() => ref({})); let _p = []; let toBeInstalled = []; const pinia = markRaw({ install(app) { setActivePinia(pinia); { pinia._a = app; app.provide(piniaSymbol, pinia); app.config.globalProperties.$pinia = pinia; toBeInstalled.forEach((plugin2) => _p.push(plugin2)); toBeInstalled = []; } }, use(plugin2) { if (!this._a && !isVue2) { toBeInstalled.push(plugin2); } else { _p.push(plugin2); } return this; }, _p, // it's actually undefined here // @ts-expect-error _a: null, _e: scope, _s: /* @__PURE__ */ new Map(), state }); return pinia; } const noop = () => { }; function addSubscription(subscriptions, callback, detached, onCleanup = noop) { subscriptions.push(callback); const removeSubscription = () => { const idx = subscriptions.indexOf(callback); if (idx > -1) { subscriptions.splice(idx, 1); onCleanup(); } }; if (!detached && getCurrentScope()) { onScopeDispose(removeSubscription); } return removeSubscription; } function triggerSubscriptions(subscriptions, ...args) { subscriptions.slice().forEach((callback) => { callback(...args); }); } const fallbackRunWithContext = (fn) => fn(); const ACTION_MARKER = Symbol(); const ACTION_NAME = Symbol(); function mergeReactiveObjects(target, patchToApply) { if (target instanceof Map && patchToApply instanceof Map) { patchToApply.forEach((value, key) => target.set(key, value)); } else if (target instanceof Set && patchToApply instanceof Set) { patchToApply.forEach(target.add, target); } for (const key in patchToApply) { if (!patchToApply.hasOwnProperty(key)) continue; const subPatch = patchToApply[key]; const targetValue = target[key]; if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) { target[key] = mergeReactiveObjects(targetValue, subPatch); } else { target[key] = subPatch; } } return target; } const skipHydrateSymbol = ( /* istanbul ignore next */ Symbol() ); function shouldHydrate(obj) { return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol); } const { assign: assign$2 } = Object; function isComputed(o) { return !!(isRef(o) && o.effect); } function createOptionsStore(id, options, pinia, hot) { const { state, actions, getters } = options; const initialState = pinia.state.value[id]; let store; function setup() { if (!initialState && (!("production" !== "production"))) { { pinia.state.value[id] = state ? state() : {}; } } const localState = toRefs(pinia.state.value[id]); return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => { computedGetters[name] = markRaw(computed(() => { setActivePinia(pinia); const store2 = pinia._s.get(id); return getters[name].call(store2, store2); })); return computedGetters; }, {})); } store = createSetupStore(id, setup, options, pinia, hot, true); return store; } function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) { let scope; const optionsForPlugin = assign$2({ actions: {} }, options); const $subscribeOptions = { deep: true }; let isListening; let isSyncListening; let subscriptions = []; let actionSubscriptions = []; let debuggerEvents; const initialState = pinia.state.value[$id]; if (!isOptionsStore && !initialState && (!("production" !== "production"))) { { pinia.state.value[$id] = {}; } } ref({}); let activeListener; function $patch(partialStateOrMutator) { let subscriptionMutation; isListening = isSyncListening = false; if (typeof partialStateOrMutator === "function") { partialStateOrMutator(pinia.state.value[$id]); subscriptionMutation = { type: MutationType.patchFunction, storeId: $id, events: debuggerEvents }; } else { mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator); subscriptionMutation = { type: MutationType.patchObject, payload: partialStateOrMutator, storeId: $id, events: debuggerEvents }; } const myListenerId = activeListener = Symbol(); nextTick().then(() => { if (activeListener === myListenerId) { isListening = true; } }); isSyncListening = true; triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]); } const $reset = isOptionsStore ? function $reset2() { const { state } = options; const newState = state ? state() : {}; this.$patch(($state) => { assign$2($state, newState); }); } : ( /* istanbul ignore next */ noop ); function $dispose() { scope.stop(); subscriptions = []; actionSubscriptions = []; pinia._s.delete($id); } const action = (fn, name = "") => { if (ACTION_MARKER in fn) { fn[ACTION_NAME] = name; return fn; } const wrappedAction = function() { setActivePinia(pinia); const args = Array.from(arguments); const afterCallbackList = []; const onErrorCallbackList = []; function after(callback) { afterCallbackList.push(callback); } function onError(callback) { onErrorCallbackList.push(callback); } triggerSubscriptions(actionSubscriptions, { args, name: wrappedAction[ACTION_NAME], store, after, onError }); let ret; try { ret = fn.apply(this && this.$id === $id ? this : store, args); } catch (error) { triggerSubscriptions(onErrorCallbackList, error); throw error; } if (ret instanceof Promise) { return ret.then((value) => { triggerSubscriptions(afterCallbackList, value); return value; }).catch((error) => { triggerSubscriptions(onErrorCallbackList, error); return Promise.reject(error); }); } triggerSubscriptions(afterCallbackList, ret); return ret; }; wrappedAction[ACTION_MARKER] = true; wrappedAction[ACTION_NAME] = name; return wrappedAction; }; const partialStore = { _p: pinia, // _s: scope, $id, $onAction: addSubscription.bind(null, actionSubscriptions), $patch, $reset, $subscribe(callback, options2 = {}) { const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher()); const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => { if (options2.flush === "sync" ? isSyncListening : isListening) { callback({ storeId: $id, type: MutationType.direct, events: debuggerEvents }, state); } }, assign$2({}, $subscribeOptions, options2))); return removeSubscription; }, $dispose }; const store = reactive(partialStore); pinia._s.set($id, store); const runWithContext = pinia._a && pinia._a.runWithContext || fallbackRunWithContext; const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action })))); for (const key in setupStore) { const prop = setupStore[key]; if (isRef(prop) && !isComputed(prop) || isReactive(prop)) { if (!isOptionsStore) { if (initialState && shouldHydrate(prop)) { if (isRef(prop)) { prop.value = initialState[key]; } else { mergeReactiveObjects(prop, initialState[key]); } } { pinia.state.value[$id][key] = prop; } } } else if (typeof prop === "function") { const actionValue = action(prop, key); { setupStore[key] = actionValue; } optionsForPlugin.actions[key] = prop; } else ; } { assign$2(store, setupStore); assign$2(toRaw(store), setupStore); } Object.defineProperty(store, "$state", { get: () => pinia.state.value[$id], set: (state) => { $patch(($state) => { assign$2($state, state); }); } }); pinia._p.forEach((extender) => { { assign$2(store, scope.run(() => extender({ store, app: pinia._a, pinia, options: optionsForPlugin }))); } }); if (initialState && isOptionsStore && options.hydrate) { options.hydrate(store.$state, initialState); } isListening = true; isSyncListening = true; return store; } // @__NO_SIDE_EFFECTS__ function defineStore(idOrOptions, setup, setupOptions) { let id; let options; const isSetupStore = typeof setup === "function"; { id = idOrOptions; options = isSetupStore ? setupOptions : setup; } function useStore(pinia, hot) { const hasContext = hasInjectionContext(); pinia = // in test mode, ignore the argument provided as we can always retrieve a // pinia instance with getActivePinia() (pinia) || (hasContext ? inject(piniaSymbol, null) : null); if (pinia) setActivePinia(pinia); pinia = activePinia; if (!pinia._s.has(id)) { if (isSetupStore) { createSetupStore(id, setup, options, pinia); } else { createOptionsStore(id, options, pinia); } } const store = pinia._s.get(id); return store; } useStore.$id = id; return useStore; } const isDefer = (dedupe) => dedupe === "defer" || dedupe === false; function useAsyncData(...args) { var _b; const autoKey = typeof args[args.length - 1] === "string" ? args.pop() : void 0; if (typeof args[0] !== "string") { args.unshift(autoKey); } let [key, _handler, options = {}] = args; if (typeof key !== "string") { throw new TypeError("[nuxt] [asyncData] key must be a string."); } if (typeof _handler !== "function") { throw new TypeError("[nuxt] [asyncData] handler must be a function."); } const nuxtApp = useNuxtApp(); const handler = _handler ; const getDefault = () => asyncDataDefaults.value; const getDefaultCachedData = () => nuxtApp.isHydrating ? nuxtApp.payload.data[key] : nuxtApp.static.data[key]; options.server = options.server ?? true; options.default = options.default ?? getDefault; options.getCachedData = options.getCachedData ?? getDefaultCachedData; options.lazy = options.lazy ?? false; options.immediate = options.immediate ?? true; options.deep = options.deep ?? asyncDataDefaults.deep; options.dedupe = options.dedupe ?? "cancel"; const initialCachedData = options.getCachedData(key, nuxtApp); const hasCachedData = initialCachedData != null; if (!nuxtApp._asyncData[key] || !options.immediate) { (_b = nuxtApp.payload._errors)[key] ?? (_b[key] = asyncDataDefaults.errorValue); const _ref = options.deep ? ref : shallowRef; nuxtApp._asyncData[key] = { data: _ref(hasCachedData ? initialCachedData : options.default()), pending: ref(!hasCachedData), error: toRef(nuxtApp.payload._errors, key), status: ref("idle"), _default: options.default }; } const asyncData = { ...nuxtApp._asyncData[key] }; delete asyncData._default; asyncData.refresh = asyncData.execute = (opts = {}) => { if (nuxtApp._asyncDataPromises[key]) { if (isDefer(opts.dedupe ?? options.dedupe)) { return nuxtApp._asyncDataPromises[key]; } nuxtApp._asyncDataPromises[key].cancelled = true; } if (opts._initial || nuxtApp.isHydrating && opts._initial !== false) { const cachedData = opts._initial ? initialCachedData : options.getCachedData(key, nuxtApp); if (cachedData != null) { return Promise.resolve(cachedData); } } asyncData.pending.value = true; asyncData.status.value = "pending"; const promise = new Promise( (resolve2, reject) => { try { resolve2(handler(nuxtApp)); } catch (err) { reject(err); } } ).then(async (_result) => { if (promise.cancelled) { return nuxtApp._asyncDataPromises[key]; } let result = _result; if (options.transform) { result = await options.transform(_result); } if (options.pick) { result = pick(result, options.pick); } nuxtApp.payload.data[key] = result; asyncData.data.value = result; asyncData.error.value = asyncDataDefaults.errorValue; asyncData.status.value = "success"; }).catch((error) => { if (promise.cancelled) { return nuxtApp._asyncDataPromises[key]; } asyncData.error.value = createError(error); asyncData.data.value = unref(options.default()); asyncData.status.value = "error"; }).finally(() => { if (promise.cancelled) { return; } asyncData.pending.value = false; delete nuxtApp._asyncDataPromises[key]; }); nuxtApp._asyncDataPromises[key] = promise; return nuxtApp._asyncDataPromises[key]; }; asyncData.clear = () => clearNuxtDataByKey(nuxtApp, key); const initialFetch = () => asyncData.refresh({ _initial: true }); const fetchOnServer = options.server !== false && nuxtApp.payload.serverRendered; if (fetchOnServer && options.immediate) { const promise = initialFetch(); if (getCurrentInstance()) { onServerPrefetch(() => promise); } else { nuxtApp.hook("app:created", async () => { await promise; }); } } const asyncDataPromise = Promise.resolve(nuxtApp._asyncDataPromises[key]).then(() => asyncData); Object.assign(asyncDataPromise, asyncData); return asyncDataPromise; } function clearNuxtDataByKey(nuxtApp, key) { if (key in nuxtApp.payload.data) { nuxtApp.payload.data[key] = void 0; } if (key in nuxtApp.payload._errors) { nuxtApp.payload._errors[key] = asyncDataDefaults.errorValue; } if (nuxtApp._asyncData[key]) { nuxtApp._asyncData[key].data.value = void 0; nuxtApp._asyncData[key].error.value = asyncDataDefaults.errorValue; nuxtApp._asyncData[key].pending.value = false; nuxtApp._asyncData[key].status.value = "idle"; } if (key in nuxtApp._asyncDataPromises) { if (nuxtApp._asyncDataPromises[key]) { nuxtApp._asyncDataPromises[key].cancelled = true; } nuxtApp._asyncDataPromises[key] = void 0; } } function pick(obj, keys) { const newObj = {}; for (const key of keys) { newObj[key] = obj[key]; } return newObj; } const useStateKeyPrefix = "$s"; function useState(...args) { const autoKey = typeof args[args.length - 1] === "string" ? args.pop() : void 0; if (typeof args[0] !== "string") { args.unshift(autoKey); } const [_key, init] = args; if (!_key || typeof _key !== "string") { throw new TypeError("[nuxt] [useState] key must be a string: " + _key); } if (init !== void 0 && typeof init !== "function") { throw new Error("[nuxt] [useState] init must be a function: " + init); } const key = useStateKeyPrefix + _key; const nuxtApp = useNuxtApp(); const state = toRef(nuxtApp.payload.state, key); if (state.value === void 0 && init) { const initialValue = init(); if (isRef(initialValue)) { nuxtApp.payload.state[key] = initialValue; return initialValue; } state.value = initialValue; } return state; } function useRequestEvent(nuxtApp = useNuxtApp()) { var _a; return (_a = nuxtApp.ssrContext) == null ? void 0 : _a.event; } function useRequestHeaders(include) { const event = useRequestEvent(); const _headers = event ? getRequestHeaders(event) : {}; if (!include || !event) { return _headers; } const headers = /* @__PURE__ */ Object.create(null); for (const _key of include) { const key = _key.toLowerCase(); const header = _headers[key]; if (header) { headers[key] = header; } } return headers; } function useRequestFetch() { var _a; return ((_a = useRequestEvent()) == null ? void 0 : _a.$fetch) || globalThis.$fetch; } const CookieDefaults = { path: "/", watch: true, decode: (val) => destr(decodeURIComponent(val)), encode: (val) => encodeURIComponent(typeof val === "string" ? val : JSON.stringify(val)) }; function useCookie(name, _opts) { var _a; const opts = { ...CookieDefaults, ..._opts }; opts.filter ?? (opts.filter = (key) => key === name); const cookies = readRawCookies(opts) || {}; let delay; if (opts.maxAge !== void 0) { delay = opts.maxAge * 1e3; } else if (opts.expires) { delay = opts.expires.getTime() - Date.now(); } const hasExpired = delay !== void 0 && delay <= 0; const cookieValue = klona(hasExpired ? void 0 : cookies[name] ?? ((_a = opts.default) == null ? void 0 : _a.call(opts))); const cookie = ref(cookieValue); { const nuxtApp = useNuxtApp(); const writeFinalCookieValue = () => { if (opts.readonly || isEqual$1(cookie.value, cookies[name])) { return; } nuxtApp._cookies || (nuxtApp._cookies = {}); if (name in nuxtApp._cookies) { if (isEqual$1(cookie.value, nuxtApp._cookies[name])) { return; } } nuxtApp._cookies[name] = cookie.value; writeServerCookie(useRequestEvent(nuxtApp), name, cookie.value, opts); }; const unhook = nuxtApp.hooks.hookOnce("app:rendered", writeFinalCookieValue); nuxtApp.hooks.hookOnce("app:error", () => { unhook(); return writeFinalCookieValue(); }); } return cookie; } function readRawCookies(opts = {}) { { return parse$1(getRequestHeader(useRequestEvent(), "cookie") || "", opts); } } function writeServerCookie(event, name, value, opts = {}) { if (event) { if (value !== null && value !== void 0) { return setCookie(event, name, value, opts); } if (getCookie(event, name) !== void 0) { return deleteCookie(event, name, opts); } } } async function preloadRouteComponents(to, router = useRouter()) { { return; } } const clientOnlySymbol = Symbol.for("nuxt:client-only"); const __nuxt_component_2$3 = defineComponent({ name: "ClientOnly", inheritAttrs: false, props: ["fallback", "placeholder", "placeholderTag", "fallbackTag"], setup(_, { slots, attrs }) { const mounted = ref(false); provide(clientOnlySymbol, true); return (props) => { var _a; if (mounted.value) { return (_a = slots.default) == null ? void 0 : _a.call(slots); } const slot = slots.fallback || slots.placeholder; if (slot) { return slot(); } const fallbackStr = props.fallback || props.placeholder || ""; const fallbackTag = props.fallbackTag || props.placeholderTag || "span"; return createElementBlock(fallbackTag, attrs, fallbackStr); }; } }); const firstNonUndefined = (...args) => args.find((arg) => arg !== void 0); // @__NO_SIDE_EFFECTS__ function defineNuxtLink(options) { const componentName = options.componentName || "NuxtLink"; function resolveTrailingSlashBehavior(to, resolve2) { if (!to || options.trailingSlash !== "append" && options.trailingSlash !== "remove") { return to; } if (typeof to === "string") { return applyTrailingSlashBehavior(to, options.trailingSlash); } const path = "path" in to && to.path !== void 0 ? to.path : resolve2(to).path; const resolvedPath = { ...to, name: void 0, // named routes would otherwise always override trailing slash behavior path: applyTrailingSlashBehavior(path, options.trailingSlash) }; return resolvedPath; } function useNuxtLink(props) { const router = useRouter(); const config2 = /* @__PURE__ */ useRuntimeConfig(); const hasTarget = computed(() => !!props.target && props.target !== "_self"); const isAbsoluteUrl = computed(() => { const path = props.to || props.href || ""; return typeof path === "string" && hasProtocol(path, { acceptRelative: true }); }); const builtinRouterLink = resolveComponent("RouterLink"); const useBuiltinLink = builtinRouterLink && typeof builtinRouterLink !== "string" ? builtinRouterLink.useLink : void 0; const isExternal = computed(() => { if (props.external) { return true; } const path = props.to || props.href || ""; if (typeof path === "object") { return false; } return path === "" || isAbsoluteUrl.value; }); const to = computed(() => { const path = props.to || props.href || ""; if (isExternal.value) { return path; } return resolveTrailingSlashBehavior(path, router.resolve); }); const link = isExternal.value ? void 0 : useBuiltinLink == null ? void 0 : useBuiltinLink({ ...props, to }); const href = computed(() => { var _a; if (!to.value || isAbsoluteUrl.value) { return to.value; } if (isExternal.value) { const path = typeof to.value === "object" && "path" in to.value ? resolveRouteObject(to.value) : to.value; const href2 = typeof path === "object" ? router.resolve(path).href : path; return resolveTrailingSlashBehavior( href2, router.resolve /* will not be called */ ); } if (typeof to.value === "object") { return ((_a = router.resolve(to.value)) == null ? void 0 : _a.href) ?? null; } return resolveTrailingSlashBehavior( joinURL(config2.app.baseURL, to.value), router.resolve /* will not be called */ ); }); return { to, hasTarget, isAbsoluteUrl, isExternal, // href, isActive: (link == null ? void 0 : link.isActive) ?? computed(() => to.value === router.currentRoute.value.path), isExactActive: (link == null ? void 0 : link.isExactActive) ?? computed(() => to.value === router.currentRoute.value.path), route: (link == null ? void 0 : link.route) ?? computed(() => router.resolve(to.value)), async navigate() { await navigateTo(href.value, { replace: props.replace, external: isExternal.value || hasTarget.value }); } }; } return defineComponent({ name: componentName, props: { // Routing to: { type: [String, Object], default: void 0, required: false }, href: { type: [String, Object], default: void 0, required: false }, // Attributes target: { type: String, default: void 0, required: false }, rel: { type: String, default: void 0, required: false }, noRel: { type: Boolean, default: void 0, required: false }, // Prefetching prefetch: { type: Boolean, default: void 0, required: false }, prefetchOn: { type: [String, Object], default: void 0, required: false }, noPrefetch: { type: Boolean, default: void 0, required: false }, // Styling activeClass: { type: String, default: void 0, required: false }, exactActiveClass: { type: String, default: void 0, required: false }, prefetchedClass: { type: String, default: void 0, required: false }, // Vue Router's `<RouterLink>` additional props replace: { type: Boolean, default: void 0, required: false }, ariaCurrentValue: { type: String, default: void 0, required: false }, // Edge cases handling external: { type: Boolean, default: void 0, required: false }, // Slot API custom: { type: Boolean, default: void 0, required: false } }, useLink: useNuxtLink, setup(props, { slots }) { const router = useRouter(); const { to, href, navigate: navigate2, isExternal, hasTarget, isAbsoluteUrl } = useNuxtLink(props); const prefetched = ref(false); const el = void 0; const elRef = void 0; function shouldPrefetch(mode) { var _a, _b; return !prefetched.value && (typeof props.prefetchOn === "string" ? props.prefetchOn === mode : ((_a = props.prefetchOn) == null ? void 0 : _a[mode]) ?? ((_b = options.prefetchOn) == null ? void 0 : _b[mode])) && (props.prefetch ?? options.prefetch) !== false && props.noPrefetch !== true && props.target !== "_blank" && !isSlowConnection(); } async function prefetch(nuxtApp = useNuxtApp()) { if (prefetched.value) { return; } prefetched.value = true; const path = typeof to.value === "string" ? to.value : isExternal.value ? resolveRouteObject(to.value) : router.resolve(to.value).fullPath; await Promise.all([ nuxtApp.hooks.callHook("link:prefetch", path).catch(() => { }), !isExternal.value && !hasTarget.value && preloadRouteComponents(to.value, router).catch(() => { }) ]); } return () => { var _a; if (!isExternal.value && !hasTarget.value) { const routerLinkProps = { ref: elRef, to: to.value, activeClass: props.activeClass || options.activeClass, exactActiveClass: props.exactActiveClass || options.exactActiveClass, replace: props.replace, ariaCurrentValue: props.ariaCurrentValue, custom: props.custom, onPointerenter: shouldPrefetch("interaction") ? prefetch.bind(null, void 0) : void 0, onFocus: shouldPrefetch("interaction") ? prefetch.bind(null, void 0) : void 0 }; if (!props.custom) { if (prefetched.value) { routerLinkProps.class = props.prefetchedClass || options.prefetchedClass; } routerLinkProps.rel = props.rel || void 0; } return h( resolveComponent("RouterLink"), routerLinkProps, slots.default ); } const target = props.target || null; const rel = firstNonUndefined( // converts `""` to `null` to prevent the attribute from being added as empty (`rel=""`) props.noRel ? "" : props.rel, options.externalRelAttribute, /* * A fallback rel of `noopener noreferrer` is applied for external links or links that open in a new tab. * This solves a reverse tabnapping security flaw in browsers pre-2021 as well as improving privacy. */ isAbsoluteUrl.value || hasTarget.value ? "noopener noreferrer" : "" ) || null; if (props.custom) { if (!slots.default) { return null; } return slots.default({ href: href.value, navigate: navigate2, get route() { if (!href.value) { return void 0; } const url = new URL(href.value, "http://localhost"); return { path: url.pathname, fullPath: url.pathname, get query() { return parseQuery(url.search); }, hash: url.hash, params: {}, name: void 0, matched: [], redirectedFrom: void 0, meta: {}, href: href.value }; }, rel, target, isExternal: isExternal.value || hasTarget.value, isActive: false, isExactActive: false }); } return h("a", { ref: el, href: href.value || null, rel, target }, (_a = slots.default) == null ? void 0 : _a.call(slots)); }; } }); } const __nuxt_component_0$3 = /* @__PURE__ */ defineNuxtLink(nuxtLinkDefaults); function applyTrailingSlashBehavior(to, trailingSlash) { const normalizeFn = trailingSlash === "append" ? withTrailingSlash : withoutTrailingSlash; const hasProtocolDifferentFromHttp = hasProtocol(to) && !to.startsWith("http"); if (hasProtocolDifferentFromHttp) { return to; } return normalizeFn(to, true); } function isSlowConnection() { { return; } } const inlineConfig = { "nuxt": {}, "icon": { "provider": "server", "class": "", "aliases": {}, "iconifyApiEndpoint": "https://api.iconify.design", "localApiEndpoint": "/api/_nuxt_icon", "fallbackToApi": true, "cssSelectorPrefix": "i-", "cssWherePseudo": true, "mode": "css", "attrs": { "aria-hidden": true }, "collections": [ "academicons", "akar-icons", "ant-design", "arcticons", "basil", "bi", "bitcoin-icons", "bpmn", "brandico", "bx", "bxl", "bxs", "bytesize", "carbon", "catppuccin", "cbi", "charm", "ci", "cib", "cif", "cil", "circle-flags", "circum", "clarity", "codicon", "covid", "cryptocurrency", "cryptocurrency-color", "dashicons", "devicon", "devicon-plain", "ei", "el", "emojione", "emojione-monotone", "emojione-v1", "entypo", "entypo-social", "eos-icons", "ep", "et", "eva", "f7", "fa", "fa-brands", "fa-regular", "fa-solid", "fa6-brands", "fa6-regular", "fa6-solid", "fad", "fe", "feather", "file-icons", "flag", "flagpack", "flat-color-icons", "flat-ui", "flowbite", "fluent", "fluent-emoji", "fluent-emoji-flat", "fluent-emoji-high-contrast", "fluent-mdl2", "fontelico", "fontisto", "formkit", "foundation", "fxemoji", "gala", "game-icons", "geo", "gg", "gis", "gravity-ui", "gridicons", "grommet-icons", "guidance", "healthicons", "heroicons", "heroicons-outline", "heroicons-solid", "hugeicons", "humbleicons", "ic", "icomoon-free", "icon-park", "icon-park-outline", "icon-park-solid", "icon-park-twotone", "iconamoon", "iconoir", "icons8", "il", "ion", "iwwa", "jam", "la", "lets-icons", "line-md", "logos", "ls", "lucide", "lucide-lab", "mage", "majesticons", "maki", "map", "marketeq", "material-symbols", "material-symbols-light", "mdi", "mdi-light", "medical-icon", "memory", "meteocons", "mi", "mingcute", "mono-icons", "mynaui", "nimbus", "nonicons", "noto", "noto-v1", "octicon", "oi", "ooui", "openmoji", "oui", "pajamas", "pepicons", "pepicons-pencil", "pepicons-pop", "pepicons-print", "ph", "pixelarticons", "prime", "ps", "quill", "radix-icons", "raphael", "ri", "rivet-icons", "si-glyph", "simple-icons", "simple-line-icons", "skill-icons", "solar", "streamline", "streamline-emojis", "subway", "svg-spinners", "system-uicons", "tabler", "tdesign", "teenyicons", "token", "token-branded", "topcoat", "twemoji", "typcn", "uil", "uim", "uis", "uit", "uiw", "unjs", "vaadin", "vs", "vscode-icons", "websymbol", "weui", "whh", "wi", "wpf", "zmdi", "zondicons" ], "fetchTimeout": 500 }, "ui": { "primary": "green", "gray": "cool", "colors": [ "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "main", "primary" ], "strategy": "merge" } }; const appConfig = /* @__PURE__ */ defuFn(inlineConfig); function useAppConfig() { const nuxtApp = useNuxtApp(); if (!nuxtApp._appConfig) { nuxtApp._appConfig = klona(appConfig); } return nuxtApp._appConfig; } const plugin = /* @__PURE__ */ defineNuxtPlugin((nuxtApp) => { const pinia = createPinia(); nuxtApp.vueApp.use(pinia); setActivePinia(pinia); { nuxtApp.payload.pinia = pinia.state.value; } return { provide: { pinia } }; }); const LazyIcon = defineAsyncComponent(() => Promise.resolve().then(function() { return index; }).then((r) => r["default"] || r.default || r)); const lazyGlobalComponents = [ ["Icon", LazyIcon] ]; const components_plugin_KR1HBZs4kY = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:global-components", setup(nuxtApp) { for (const [name, component] of lazyGlobalComponents) { nuxtApp.vueApp.component(name, component); nuxtApp.vueApp.component("Lazy" + name, component); } } }); /*! * shared v9.14.0 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ const inBrowser = false; const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name); const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source }); const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"); const isNumber = (val) => typeof val === "number" && isFinite(val); const isDate = (val) => toTypeString(val) === "[object Date]"; const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0; const assign = Object.assign; function escapeHtml(rawText) { return rawText.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"); } const hasOwnProperty = Object.prototype.hasOwnProperty; function hasOwn(obj, key) { return hasOwnProperty.call(obj, key); } const isArray = Array.isArray; const isFunction = (val) => typeof val === "function"; const isString = (val) => typeof val === "string"; const isBoolean = (val) => typeof val === "boolean"; const isSymbol = (val) => typeof val === "symbol"; const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { return isObject(val) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const isPlainObject = (val) => { if (!isObject(val)) return false; const proto = Object.getPrototypeOf(val); return proto === null || proto.constructor === Object; }; const toDisplayString = (val) => { return val == null ? "" : isArray(val) || isPlainObject(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val); }; function join(items, separator = "") { return items.reduce((str, item, index2) => index2 === 0 ? str + item : str + separator + item, ""); } function incrementer(code2) { let current = code2; return () => ++current; } function warn(msg, err) { if (typeof console !== "undefined") { console.warn(`[intlify] ` + msg); if (err) { console.warn(err.stack); } } } const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val); function deepCopy(src, des) { if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) { throw new Error("Invalid value"); } const stack = [{ src, des }]; while (stack.length) { const { src: src2, des: des2 } = stack.pop(); Object.keys(src2).forEach((key) => { if (isNotObjectOrIsArray(src2[key]) || isNotObjectOrIsArray(des2[key])) { des2[key] = src2[key]; } else { stack.push({ src: src2[key], des: des2[key] }); } }); } } function isHTTPS(req, trustProxy = true) { const _xForwardedProto = trustProxy && req.headers ? req.headers["x-forwarded-proto"] : void 0; const protoCheck = typeof _xForwardedProto === "string" ? _xForwardedProto.includes("https") : void 0; if (protoCheck) { return true; } const _encrypted = req.connection ? req.connection.encrypted : void 0; const encryptedCheck = _encrypted !== void 0 ? _encrypted === true : void 0; if (encryptedCheck) { return true; } if (protoCheck === void 0 && encryptedCheck === void 0) { return void 0; } return false; } const resource$1 = { "analysis_cabinet": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آنالیز کابینت" } }, "main_title": { "t": 0, "b": { "t": 1, "c": [{ "t": 2, "i": [{ "t": 3 }], "s": "آنالیز کابینت" }, { "t": 2, "i": [{ "t": 3 }], "s": "اپلیکیشن تخصصی آنالیز و برش قطعات چوبی " }] } }, "meta_description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " آنالیز کابینت اپلیکیشن تخصصی آنالیز و برش قطعات چوبی" } }, "author": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " آنالیز کابینت" } }, "contact_us": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ارتباط با ما" } }, "logo_name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " آنالیز کابینت" } }, "home": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خانه" } }, "h1tag": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آنالیز کابینت" } }, "key": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آنالیز کابینت,اپلیکیشن آنالیز کابینت,طراحی داخلی,طراحی آشپزخانه,کابینت" } }, "search": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "جستجو" } }, "lang": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "زبان" } }, "welcome": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خوش آمدید" } }, "B": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "به" } }, "enterNumber": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "لطفا شماره موبایل خود را وارد کنید " } }, "phoneNumber": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "شماره موبایل" } }, "rules_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " ورود به منزله قبول کردن " } }, "rules_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "قوانین و مقررات" } }, "rules_3": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "می باشد" } }, "Login": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " ثبت نام / ورود " } }, "Thank": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "از صبر و شکیبایی شما متشکریم" } }, "activation_code": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "کد فعالسازی را وارد کنید" } }, "send_code_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "کد ارسال شده به شماره همراه" } }, "send_code_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "را وارد کنید" } }, "edit_phone": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "اصلاح شماره" } }, "Confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تایید کد" } }, "incorrect_code": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "کد وارد شده صحیح نمیباشد." } }, "not_access_log": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "شما دسترسی لازم برای وارد شدن به سیستم را ندارید" } }, "refresh": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "صفحه را رفرش نموده و مجددا امتحان نمایید" } }, "payment_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "استفاده از اپلیکیشن آنالیز کابینت شامل هزینه می باشد!" } }, "payment_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "برای ورود به اپلیکیشن باید یکی از مراحل زیر را انتخاب کنید؛" } }, "payment_3_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "توجه داشته باشید که" } }, "payment_3_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "با وارد کردن کد معرف" } }, "payment_3_3": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "از تخفیف ویژه برخوردار می شوید." } }, "payment_4": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "وارد کردن کد معرف" } }, "registration": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ثبت " } }, "payment_5": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ثبت " } }, "payment_6": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پرداخت بدون کد" } }, "payment_7": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "کد معرف خود را وارد نمایید ..." } }, "payment_8_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "هزینه استفاده از اپلیکیشن بدون کد معرف" } }, "payment_8_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ریال می باشد." } }, "payment_9": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " مشاهده امکانات اپلیکیشن " } }, "validate_mobile": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد شماره موبایل الزامی می باشد" } }, "validate_code": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "کد 5 رقمی الزامی می باشد" } }, "page_units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "یونیت ها" } }, "Cabinet Analyze": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آنالیز کابینت" } }, "Settings": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تنظیمات" } }, "Exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خروج" } }, "new_analysis": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آنالیز جدید" } }, "last_project_units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "یونیت های آخرین پروژه" } }, "projects_list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "لیست پروژه ها" } }, "support_and_training": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پشتیبانی و آموزش" } }, "select_category": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "انتخاب دسته بندی" } }, "Unit Selection": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "انتخاب یونیت" } }, "Depth": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عمق" } }, "Width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض" } }, "Height": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ارتفاع" } }, "Fixed Width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض ثابتی" } }, "Door Color": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "رنگ درب" } }, "Computing": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "محاسبه" } }, "Recalculate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "محاسبه مجدد" } }, "Door 1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "درب 1" } }, "Door 2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "درب 2" } }, "Number_Units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تعداد یونیت" } }, "length_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد طول الزامی است" } }, "width_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد عرض الزامی است" } }, "height_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد ارتفاع الزامی است" } }, "color_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد رنگ الزامی است" } }, "count_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد تعداد حداقل باید مقدار 1 باشد" } }, "Add Unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "افزودن یونیت" } }, "final_approval": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تایید نهایی" } }, "project_name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "نام پروژه" } }, "Sheet Name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "نام ورق" } }, "Sheet Width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض ورق" } }, "Sheet Length": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "طول ورق" } }, "Width Strip": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض نوار" } }, "Thickness Strip": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ضخامت نوار" } }, "Name Employer": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " نام کارفرما" } }, "description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "توضیحات" } }, "Cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "انصراف" } }, "Select": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "انتخاب کنید" } }, "Single": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تک" } }, "Double": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "دوبل" } }, "1 Mile": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "1 میل" } }, "2 Mile": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "2 میل" } }, "Length_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد طول الزامی می باشد" } }, "Number_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد تعداد الزامی می باشد" } }, "Width_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد عرض الزامی می باشد" } }, "Material_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد متریال الزامی می باشد" } }, "desired_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "لطفا مجددا قطعه مورد نظر را انتخاب کنید" } }, "Free": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آزاد" } }, "Strip": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "نوار" } }, "Farsi": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فارسی" } }, "Groove": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "شیار" } }, "none": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "هیچکدام" } }, "Edit the piece": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ویرایش قطعه " } }, "Variable One": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "متغیر یک" } }, "Variable Two": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "متغیر دو" } }, "number": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "شماره" } }, "Name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "نام" } }, "material": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "متریال" } }, "Top": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "بالا" } }, "Down": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پایین" } }, "Left": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "چپ" } }, "Right": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "راست" } }, "Projects": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پروژه ها" } }, "View_Details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "مشاهده جزییات" } }, "New Project": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پروژه جدید " } }, "Main Page": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "صفحه اصلی " } }, "employer_name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "نام کارفرما" } }, "Edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ویرایش" } }, "project_name_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد نام پروژه الزامی می باشد" } }, "employer_name_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد نام کارفرما الزامی می باشد" } }, "refresh page": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "لطفا صفحه را رفرش کرده و مجدد درخواست خود را ارسال نمایید" } }, "Project Details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "جزییات پروژه" } }, "project_information": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "اطلاعات پروژه " } }, "outputs": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خروجی ها" } }, "exports": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خروجی ها" } }, "View cutting map": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "مشاهده نقشه برش" } }, "Download Opticut output": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "دانلود خروجی اپتی کات" } }, "preparing": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "در حال آماده سازی" } }, "Allowed to exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "شما مجاز به خروجی گرفتن برای این دستگاه نیستید " } }, "order size": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "سایز سفارش در محدوده مجاز نبوده است " } }, "View list units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "مشاهده لیست یونیت ها " } }, "unit analysis list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " لیست آنالیز یونیت ها" } }, "currently active project": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "درحال حاضر پروژه فعالی ندارید" } }, "thickness tape": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد ضخامت نوار الزامی می باشد" } }, "width tape required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد عرض نوار الزامی می باشد" } }, "Description required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد توضیحات الزامی می باشد" } }, "View order form": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "مشاهده فرم سفارش" } }, "Edit settings": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " ویرایش تنظیمات " } }, "Settings Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تنظیمات با موفقیت ویرایش شد" } }, "Payment": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پرداخت" } }, "Representative": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد کد معرف الزامی می باشد" } }, "account renewed": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "حساب شما با موفقیت تمدید گردید" } }, "Support": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پشتیبانی" } }, "support": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پشتیبانی" } }, "pay_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "استفاده از اپلیکیشن آنالیز یونیت شامل هزینه می باشد!" } }, "pay_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "برای ورود به اپلیکیشن باید یکی از مراحل زیر را انتخاب کنید؛" } }, "pay_3": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "وارد کردن کد معرف " } }, "pay_4": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "کد معرف خود را وارد نمایید ..." } }, "pay_5": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پرداخت بدون کد " } }, "pay_6": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " هزینه استفاده از اپلیکیشن بدون کد معرف" } }, "pay_7": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ریال می باشد." } }, "pay_8": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "مشاهده امکانات اپلیکیشن " } }, "start": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "شروع" } }, "save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ذخیره" } }, "Dimensions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ابعاد" } }, "usable_sheets_dimensions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ابعاد ورق های مصرفی" } }, "advanced_settings": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تنظیمات پیشرفته" } }, "choose_unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "انتخاب یونیت" } }, "Sheet Name ": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ورق " } }, "Sheet color 1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ورق رنگ 1" } }, "Sheet color 2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ورق رنگ 2" } }, "Sheet color 3": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ورق رنگ 3" } }, "Sheet color 4": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ورق رنگ 4" } }, "Sheet 3 mil": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ورق سه میل" } }, "Sheet fomize 16 mil": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ورق فومیزه 16 میل" } }, "Sheet fomize 3 mil": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ورق فومیزه 3 میل" } }, "active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فعال" } }, "inactive": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "غیرفعال" } }, "rotation": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "چرخش" } }, "Air unit door": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "درب یونیت هوایی" } }, "difference unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تفاوت ارتفاع درب نسبت به یونیت" } }, "difference width unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تفاوت عرض درب نسبت به یونیت" } }, "Ground unit door": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "درب یونیت زمینی" } }, "Project name field is required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد نام پروژه الزامی می باشد" } }, "Description field is required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد توضیحات الزامی می باشد" } }, "First, complete the section on the dimensions of the sheets to be used": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ابتدا بخش ابعاد ورق های مصرفی را تکمیل نمایید" } }, "First, complete the project information section": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ابتدا بخش اطلاعات پروژه را تکمیل نمایید" } }, "Section ": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "بخش " } }, " is the ": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " " } }, " of the required sheet": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " الزامی می باشد" } }, "title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عنوان" } }, "width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض" } }, "length": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "طول" } }, "add_piece": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "افزودن تکه " } }, "Edit piece": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ویرایش تکه " } }, "Sheet name and code": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " نام و کد ورق " } }, "sheet width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض ورق" } }, "sheet length": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "طول ورق" } }, "Total rotation of parts": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "چرخش کل قطعات" } }, "add_row": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "افزودن سطر" } }, "reduce_row": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "کاهش سطر" } }, "width two": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض دو" } }, "width one": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض یک" } }, "length two": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "طول دو" } }, "length one": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "طول یک" } }, "sheet width field is required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد عرض ورق الزامی می باشد" } }, "sheet length field is required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "فیلد طول ورق الزامی می باشد" } }, "Custom Slice": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تکه جدید" } }, "delete_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "حذف همه" } }, "back": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " بازگشت" } }, "Showing": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "نمایش" } }, "to": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "از" } }, "of": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "در" } }, "Entries": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "رکورد" } }, "Prev": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "صفحه قبلی" } }, "Next": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "صفحه بعدی" } }, "contact_us_ticket_not_active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "در حال حاضر امکان ارسال تیکت به پشتیبانی وجود ندارد؛ لذا مستقیما تماس حاصل فرمایید" } }, "contact_support": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ارتباط با پشتیبانی" } }, "in": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "در" } }, "count": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "تعداد" } }, "operation": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عملیات" } }, "unit_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عنوان تکه" } }, "are_you_sure_to_continue": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آیا برای ادامه عملیات اطمینان دارید؟" } }, "are_you_sure_of_the_dimensions_of_your_used_sheets": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آیا از ابعاد ورق های مصرفی خود اطمینان دارید؟" } }, "yes": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "بله" } }, "no": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خیر" } }, "add_unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "افزودن تکه" } }, "overhead": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "هوایی" } }, "sliding": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "کشویی" } }, "refrigerator": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "یخچال" } }, "height_unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "قدی" } }, "ground_unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "زمینی" } }, "Select Category": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "انتخاب دسته بندی" } }, "length_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "طول 1" } }, "length_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "طول 2" } }, "width_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض 1" } }, "width_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عرض 2" } }, "edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ویرایش" } }, "delete": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "حذف" } }, "remove": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "حذف" } }, "row_number": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ردیف" } }, "Failed to fetch": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خطا در گرفتن اطلاعات از سرور؛ دوباره تلاش کنید" } }, "if your are using vpn, disable it and try again": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "اگر از VPN استفاده می کنید، VPN را خاموش و دوباره تلاش کنید" } }, "data not exists": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "داده ای موجود نیست" } }, "project_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "پروژه 1" } }, "please_wait": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "لطفا صبر کنید" } }, "403": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "403: شما به این قسمت از اپلیکیشن دسترسی ندارید" } }, "404": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "404: اطلاعات یا صفحه ی مورد نظر یافت نشد" } }, "500": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "500: خطای سمت سرور؛ با توسعه دهنده یا مدیر سرور تماس بگیرید" } }, "slice_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عنوان تکه" } }, "operation_successful": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "عملیات با موفقیت انجام شد" } }, "fetch failed": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "بروز مشکل در دریافت اطلاعات از سرور" } }, "request_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خطای ارسال درخواست" } }, "response_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خطای دریافت پاسخ" } }, "there_is_no_record_to_showing": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "رکوردی برای نمایش وجود ندارد" } }, "are_you_sure_to_do_this_operation": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "آیا از این عملیات اطمینان دارید؟" } }, "sign_out": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "خروج" } }, "view_details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "مشاهده جزئیات" } }, "unit_analysis_list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "لیست آنالیز یونیت" } }, "increase_row": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "+سطر" } }, "decrease_row": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "-سطر" } }, "analysis_list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "لیست آنالیز" } } }; const resource = { "analysis_cabinet": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Analysis Cabinet" } }, "main_title": { "t": 0, "b": { "t": 1, "c": [{ "t": 2, "i": [{ "t": 3 }], "s": "cabinet analysis" }, { "t": 2, "i": [{ "t": 3 }], "s": "specialized application for analyzing and cutting wooden parts" }] } }, "meta_description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Cabinet analysis, a specialized application for analysis and cutting of wooden parts" } }, "author": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "cabinet analysis" } }, "contact_us": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Contact Us" } }, "logo_name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " cabinet analysis" } }, "home": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Home" } }, "h1tag": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Cabinet Analysis" } }, "key": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "cabinet analysis, cabinet analysis application, interior design, kitchen design, cabinet" } }, "search": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Search" } }, "lang": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Language" } }, "welcome": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Welcome" } }, "B": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "to" } }, "Failed to fetch": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Failed to fetch data from server" } }, "enterNumber": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Please enter your mobile number" } }, "phoneNumber": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "mobile number" } }, "rules_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "login means accept" } }, "rules_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "rules and regulations" } }, "rules_3": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "is" } }, "Login": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Register/login" } }, "Thank": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Thank you for your patience" } }, "activation_code": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enter activation code" } }, "send_code_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "code sent to mobile number" } }, "send_code_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enter " } }, "edit_phone": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "edit number" } }, "Confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Confirm code" } }, "incorrect_code": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "The entered code is not correct." } }, "not_access_log": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "You do not have access to log in" } }, "refresh": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Refresh the page and try again" } }, "payment_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Using the cabinet analysis application includes a fee!" } }, "payment_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "To enter the application, you must choose one of the following steps;" } }, "payment_3_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Note that" } }, "payment_3_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "by entering the identification code" } }, "payment_3_3": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "You will get a special discount." } }, "payment_4": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enter identification code" } }, "registration": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Registration" } }, "payment_6": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Payment without code" } }, "payment_7": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enter your identification code..." } }, "payment_8_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "The cost of using the application without an identifier code" } }, "payment_8_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "is Rial." } }, "payment_9": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "view the features of the application" } }, "validate_mobile": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "mobile number field is required" } }, "validate_code": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "5-digit code is required" } }, "page_units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "units" } }, "Cabinet Analyze": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Cabinet Analyze" } }, "Exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Exit" } }, "new_analysis": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "New Analysis" } }, "uc_new_analysis": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "NEW ANALYSIS" } }, "uc_last_project_units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "LAST PROJECT UNITS" } }, "last_project_units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Last Project Units" } }, "projects_list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Projects Lists" } }, "uc_projects_list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "PROJECTS LIST" } }, "support_and_training": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Support and Training" } }, "uc_support_and_training": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "SUPPORT AND TRAINING" } }, "select_category": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Select Category" } }, "Unit Selection": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Unit Selection" } }, "Depth": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Depth" } }, "Height": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Height" } }, "Fixed Width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "fixed width" } }, "Door Color": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Door color" } }, "Computing": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Calculation" } }, "Recalculate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Recalculate" } }, "Door 1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Door 1" } }, "Door 2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Derb 2" } }, "403": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "403: You are not allowing to access to this apart of application" } }, "404": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "404: Data or page not found" } }, "500": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "500: Server error, contact developer or server manager" } }, "Number_Units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Number of units" } }, "length_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Length field is required" } }, "width_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Width field is required" } }, "height_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Height field is required" } }, "color_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Color field is required" } }, "count_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Count field must be at least 1" } }, "Add Unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add Unit" } }, "final_approval": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Final approval" } }, "project_name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Project Name" } }, "sheet name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet Name" } }, "Sheet Width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet Width" } }, "Sheet Length": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet Length" } }, "Width Strip": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Width Strip" } }, "Thickness Strip": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Thickness Strip" } }, "Name Employer": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Employer name" } }, "description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Description" } }, "Cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Cancel" } }, "Select": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Select" } }, "Single": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Single" } }, "Double": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Double" } }, "1 Mile": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "1 Mile" } }, "2 Mile": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "2 Mile" } }, "Length_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Length field is required" } }, "Number_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Number field is required" } }, "Width_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Width field is required" } }, "Material_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Material field is required" } }, "desired_Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Please select the desired item again" } }, "Free": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Free" } }, "Strip": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Strip" } }, "Farsi": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Farsi" } }, "Groove": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Groove" } }, "none": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "None" } }, "Edit the piece": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Edit the piece" } }, "length": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Length" } }, "width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Width" } }, "Variable One": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Variable One" } }, "Variable Two": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Variable Two" } }, "number": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Number" } }, "Name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Name" } }, "material": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Material" } }, "Top": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Top" } }, "Down": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Down" } }, "Left": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Left" } }, "Right": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Right" } }, "Projects": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Projects" } }, "view_details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "View Details" } }, "New Project": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "New Project" } }, "Main Page": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "main page" } }, "employer_name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Employer name" } }, "Edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Edit" } }, "project_name_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "The project name field is required" } }, "employer_name_is_required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Employer name field is required" } }, "refresh page": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Please refresh the page and submit your request again" } }, "Project Details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Project Details" } }, "project_information": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Project Information" } }, "outputs": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Outputs" } }, "exports": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Exports" } }, "View cutting map": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "View cutting map" } }, "Download Opticut output": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Download Opticut output" } }, "preparing": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Preparing" } }, "Allowed to exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "You are not allowed to exit for this device" } }, "order size": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "the order size was not within the allowed range" } }, "View list units": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "View the list of units" } }, "unit analysis list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Unit Analysis List" } }, "currently active project": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "You currently do not have an active project" } }, "thickness tape": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "The tape thickness field is required" } }, "width tape required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "The tape width field is required" } }, "Description required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Description field is required" } }, "View order form": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Viewing the form " } }, "Edit settings": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "edit settings" } }, "Settings": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Settings" } }, "Settings Alert": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Settings edited successfully" } }, "Payment": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Payment" } }, "Representative": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Representative code field is required" } }, "account renewed": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Your account has been renewed successfully" } }, "Support": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Support" } }, "pay_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Using the Unit Analysis application includes a fee!" } }, "pay_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "To enter the application, you must choose one of the following steps;" } }, "pay_3": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enter identifier code" } }, "pay_4": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enter your identification code..." } }, "pay_5": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Payment without code" } }, "pay_6": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "The cost of using the application without an identifier code" } }, "pay_7": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "It is Rial." } }, "pay_8": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "view the features of the application" } }, "start": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Start" } }, "save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Save" } }, "dimensions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Dimensions" } }, "usable_sheets_dimensions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Usable Sheets Dimensions" } }, "advanced_settings": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Advanced Settings" } }, "choose_unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Choose Unit" } }, "Sheet Name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet" } }, "Sheet color 1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet color 1" } }, "Sheet color 2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet color 2" } }, "Sheet color 3": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet color 3" } }, "Sheet color 4": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet color 4" } }, "Sheet 3 mil": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet three mil" } }, "Sheet fomize 16 mil": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Fomize sheet 16 mil" } }, "Sheet fomize 3 mil": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Fomize sheet 3 mil" } }, "active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Active" } }, "inactive": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Inactive" } }, "rotation": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Rotation" } }, "Air unit door": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Air unit door" } }, "difference unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "door height difference compared to the unit" } }, "difference width unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "The difference in the width of the door compared to the unit" } }, "Ground unit door": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ground unit door" } }, "Project name field is required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Project name field is required" } }, "Description field is required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Description field is required" } }, "First, complete the section on the dimensions of the sheets to be used": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "First, complete the section on the dimensions of the sheets to be used" } }, "Section ": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Section " } }, " is the ": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": " is the " } }, "of the required sheet": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "of the required sheet" } }, "Add piece": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add a piece" } }, "Sheet name and code": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sheet name and code" } }, "sheet width": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "sheet width" } }, "sheet length": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "sheet length" } }, "Total rotation of parts": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Total rotation of parts" } }, "add_row": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add Row" } }, "reduce_row": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Reduce line" } }, "width two": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "width two" } }, "width one": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "width one" } }, "length two": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "length two" } }, "length one": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "length one" } }, "support": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Support" } }, "title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Title" } }, "contact_us_ticket_not_active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Our contact ticket system is not active" } }, "contact_support": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Contact Support" } }, "in": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "in" } }, "count": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Count" } }, "operation": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Operation" } }, "unit_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Unit Title" } }, "are_you_sure_to_continue": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Are you sure to continue?" } }, "are_you_sure_of_the_dimensions_of_your_used_sheets": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Are you sure of the dimensions of your used sheets?" } }, "yes": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Yes" } }, "no": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "No" } }, "back": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Back" } }, "add_unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add Unit" } }, "overhead": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Overhead" } }, "sliding": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sliding" } }, "refrigerator": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Refrigerator" } }, "height_unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Height" } }, "ground_unit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ground" } }, "add_piece": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add Piece" } }, "length_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Length 1" } }, "length_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Length 2" } }, "width_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Width 1" } }, "width_2": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Width 2" } }, "edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Edit" } }, "delete": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Delete" } }, "remove": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Remove" } }, "row_number": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "No" } }, "delete_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Delete All" } }, "if your are using vpn, disable it and try again": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "If you are using VPN, disable it and try again" } }, "data not exists": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Data not exists" } }, "project_1": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Project 1" } }, "please_wait": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Please Wait" } }, "slice_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Slice Title" } }, "operation_successful": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Operation successful" } }, "fetch failed": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Fetch data from the server failed" } }, "request_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Request error" } }, "response_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Response error" } }, "there_is_no_record_to_showing": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "There is no record to showing" } }, "are_you_sure_to_do_this_operation": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Are you sure to do this operation?" } }, "sign_out": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sign Out" } }, "analysis_list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Analysis List" } }, "unit_analysis_list": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Unit analysis list" } }, "increase_row": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "+Row" } }, "decrease_row": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "-Row" } } }; const localeCodes = [ "fa", "en" ]; const localeLoaders = { "fa": [{ key: "../locales/fa/index.js", load: () => Promise.resolve(resource$1), cache: true }], "en": [{ key: "../locales/en/index.js", load: () => Promise.resolve(resource), cache: true }] }; const vueI18nConfigs = []; const normalizedLocales = [ { "code": "fa", "language": "ir-IR", "dir": "rtl", "files": [ { "path": "/home/cutunixc/analyze.cutunix.com/locales/fa/index.js" } ] }, { "code": "en", "language": "en-US", "dir": "ltr", "files": [ { "path": "/home/cutunixc/analyze.cutunix.com/locales/en/index.js" } ] } ]; const NUXT_I18N_MODULE_ID = "@nuxtjs/i18n"; const parallelPlugin = false; const isSSG = false; const DEFAULT_DYNAMIC_PARAMS_KEY = "nuxtI18n"; const DEFAULT_COOKIE_KEY = "i18n_redirected"; const SWITCH_LOCALE_PATH_LINK_IDENTIFIER = "nuxt-i18n-slp"; function getNormalizedLocales(locales) { locales = locales || []; const normalized = []; for (const locale of locales) { if (isString(locale)) { normalized.push({ code: locale }); } else { normalized.push(locale); } } return normalized; } function isI18nInstance(i18n) { return i18n != null && "global" in i18n && "mode" in i18n; } function isComposer(target) { return target != null && !("__composer" in target) && "locale" in target && isRef(target.locale); } function isVueI18n(target) { return target != null && "__composer" in target; } function getI18nTarget(i18n) { return isI18nInstance(i18n) ? i18n.global : i18n; } function getComposer$3(i18n) { const target = getI18nTarget(i18n); if (isComposer(target)) return target; if (isVueI18n(target)) return target.__composer; return target; } function getLocale$1(i18n) { return unref(getI18nTarget(i18n).locale); } function getLocales(i18n) { return unref(getI18nTarget(i18n).locales); } function getLocaleCodes(i18n) { return unref(getI18nTarget(i18n).localeCodes); } function setLocale(i18n, locale) { const target = getI18nTarget(i18n); if (isRef(target.locale)) { target.locale.value = locale; } else { target.locale = locale; } } function getRouteName(routeName) { if (isString(routeName)) return routeName; if (isSymbol(routeName)) return routeName.toString(); return "(null)"; } function getLocaleRouteName(routeName, locale, { defaultLocale, strategy, routesNameSeparator, defaultLocaleRouteNameSuffix, differentDomains }) { const localizedRoutes = strategy !== "no_prefix" || differentDomains; let name = getRouteName(routeName) + (localizedRoutes ? routesNameSeparator + locale : ""); if (locale === defaultLocale && strategy === "prefix_and_default") { name += routesNameSeparator + defaultLocaleRouteNameSuffix; } return name; } function resolveBaseUrl(baseUrl, context) { if (isFunction(baseUrl)) { return baseUrl(context); } return baseUrl; } function matchBrowserLocale(locales, browserLocales) { const matchedLocales = []; for (const [index2, browserCode] of browserLocales.entries()) { const matchedLocale = locales.find((l) => l.language.toLowerCase() === browserCode.toLowerCase()); if (matchedLocale) { matchedLocales.push({ code: matchedLocale.code, score: 1 - index2 / browserLocales.length }); break; } } for (const [index2, browserCode] of browserLocales.entries()) { const languageCode = browserCode.split("-")[0].toLowerCase(); const matchedLocale = locales.find((l) => l.language.split("-")[0].toLowerCase() === languageCode); if (matchedLocale) { matchedLocales.push({ code: matchedLocale.code, score: 0.999 - index2 / browserLocales.length }); break; } } return matchedLocales; } const DefaultBrowserLocaleMatcher = matchBrowserLocale; function compareBrowserLocale(a, b) { if (a.score === b.score) { return b.code.length - a.code.length; } return b.score - a.score; } const DefaultBrowerLocaleComparer = compareBrowserLocale; function findBrowserLocale(locales, browserLocales, { matcher = DefaultBrowserLocaleMatcher, comparer = DefaultBrowerLocaleComparer } = {}) { const normalizedLocales2 = []; for (const l of locales) { const { code: code2 } = l; const language = l.language || code2; normalizedLocales2.push({ code: code2, language }); } const matchedLocales = matcher(normalizedLocales2, browserLocales); if (matchedLocales.length > 1) { matchedLocales.sort(comparer); } return matchedLocales.length ? matchedLocales[0].code : ""; } function getLocalesRegex(localeCodes2) { return new RegExp(`^/(${localeCodes2.join("|")})(?:/|$)`, "i"); } const cacheMessages = /* @__PURE__ */ new Map(); async function loadVueI18nOptions(vueI18nConfigs2, nuxt) { const vueI18nOptions = { messages: {} }; for (const configFile of vueI18nConfigs2) { const { default: resolver } = await configFile(); const resolved = isFunction(resolver) ? await nuxt.runWithContext(async () => await resolver()) : resolver; deepCopy(resolved, vueI18nOptions); } return vueI18nOptions; } function makeFallbackLocaleCodes(fallback, locales) { let fallbackLocales = []; if (isArray(fallback)) { fallbackLocales = fallback; } else if (isObject(fallback)) { const targets = [...locales, "default"]; for (const locale of targets) { if (fallback[locale]) { fallbackLocales = [...fallbackLocales, ...fallback[locale].filter(Boolean)]; } } } else if (isString(fallback) && locales.every((locale) => locale !== fallback)) { fallbackLocales.push(fallback); } return fallbackLocales; } async function loadInitialMessages(messages, localeLoaders2, options) { const { defaultLocale, initialLocale, localeCodes: localeCodes2, fallbackLocale, lazy } = options; if (lazy && fallbackLocale) { const fallbackLocales = makeFallbackLocaleCodes(fallbackLocale, [defaultLocale, initialLocale]); await Promise.all(fallbackLocales.map((locale) => loadAndSetLocaleMessages(locale, localeLoaders2, messages))); } const locales = lazy ? [...(/* @__PURE__ */ new Set()).add(defaultLocale).add(initialLocale)] : localeCodes2; await Promise.all(locales.map((locale) => loadAndSetLocaleMessages(locale, localeLoaders2, messages))); return messages; } async function loadMessage(locale, { key, load }) { let message = null; try { const getter = await load().then((r) => r.default || r); if (isFunction(getter)) { message = await getter(locale); } else { message = getter; if (message != null && cacheMessages) { cacheMessages.set(key, message); } } } catch (e) { console.error("Failed locale loading: " + e.message); } return message; } async function loadLocale(locale, localeLoaders2, setter) { const loaders = localeLoaders2[locale]; if (loaders == null) { console.warn("Could not find messages for locale code: " + locale); return; } const targetMessage = {}; for (const loader of loaders) { let message = null; if (cacheMessages && cacheMessages.has(loader.key) && loader.cache) { message = cacheMessages.get(loader.key); } else { message = await loadMessage(locale, loader); } if (message != null) { deepCopy(message, targetMessage); } } setter(locale, targetMessage); } async function loadAndSetLocaleMessages(locale, localeLoaders2, messages) { const setter = (locale2, message) => { const base = messages[locale2] || {}; deepCopy(message, base); messages[locale2] = base; }; await loadLocale(locale, localeLoaders2, setter); } function split(str, index2) { const result = [str.slice(0, index2), str.slice(index2)]; return result; } function routeToObject(route) { const { fullPath, query, hash, name, path, params, meta, redirectedFrom, matched } = route; return { fullPath, params, query, hash, name, path, meta, matched, redirectedFrom }; } function resolve({ router }, route, strategy, locale) { var _a, _b; if (strategy !== "prefix") { return router.resolve(route); } const [rootSlash, restPath] = split(route.path, 1); const targetPath = `${rootSlash}${locale}${restPath === "" ? restPath : `/${restPath}`}`; const _route = (_b = (_a = router.options) == null ? void 0 : _a.routes) == null ? void 0 : _b.find((r) => r.path === targetPath); if (_route == null) { return route; } const _resolvableRoute = assign({}, route, _route); _resolvableRoute.path = targetPath; return router.resolve(_resolvableRoute); } const RESOLVED_PREFIXED = /* @__PURE__ */ new Set(["prefix_and_default", "prefix_except_default"]); function prefixable(options) { const { currentLocale, defaultLocale, strategy } = options; const isDefaultLocale = currentLocale === defaultLocale; return !(isDefaultLocale && RESOLVED_PREFIXED.has(strategy)) && // no prefix for any language !(strategy === "no_prefix"); } const DefaultPrefixable = prefixable; function getRouteBaseName(common, givenRoute) { const { routesNameSeparator } = common.runtimeConfig.public.i18n; const route = unref(givenRoute); if (route == null || !route.name) { return; } const name = getRouteName(route.name); return name.split(routesNameSeparator)[0]; } function localePath(common, route, locale) { var _a; if (typeof route === "string" && hasProtocol(route, { acceptRelative: true })) { return route; } const localizedRoute = resolveRoute(common, route, locale); return localizedRoute == null ? "" : ((_a = localizedRoute.redirectedFrom) == null ? void 0 : _a.fullPath) || localizedRoute.fullPath; } function localeRoute(common, route, locale) { const resolved = resolveRoute(common, route, locale); return resolved ?? void 0; } function localeLocation(common, route, locale) { const resolved = resolveRoute(common, route, locale); return resolved ?? void 0; } function resolveRoute(common, route, locale) { const { router, i18n } = common; const _locale = locale || getLocale$1(i18n); const { defaultLocale, strategy, trailingSlash } = common.runtimeConfig.public.i18n; const prefixable2 = extendPrefixable(common.runtimeConfig); let _route; if (isString(route)) { if (route[0] === "/") { const { pathname: path, search, hash } = parsePath(route); const query = parseQuery(search); _route = { path, query, hash }; } else { _route = { name: route }; } } else { _route = route; } let localizedRoute = assign({}, _route); const isRouteLocationPathRaw = (val) => "path" in val && !!val.path && !("name" in val); if (isRouteLocationPathRaw(localizedRoute)) { const resolvedRoute = resolve(common, localizedRoute, strategy, _locale); const resolvedRouteName = getRouteBaseName(common, resolvedRoute); if (isString(resolvedRouteName)) { localizedRoute = { name: getLocaleRouteName(resolvedRouteName, _locale, common.runtimeConfig.public.i18n), // @ts-ignore // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- FIXME params: resolvedRoute.params, query: resolvedRoute.query, hash: resolvedRoute.hash }; localizedRoute.state = resolvedRoute.state; } else { if (prefixable2({ currentLocale: _locale, defaultLocale, strategy })) { localizedRoute.path = `/${_locale}${localizedRoute.path}`; } localizedRoute.path = trailingSlash ? withTrailingSlash(localizedRoute.path, true) : withoutTrailingSlash(localizedRoute.path, true); } } else { if (!localizedRoute.name && !("path" in localizedRoute)) { localizedRoute.name = getRouteBaseName(common, router.currentRoute.value); } localizedRoute.name = getLocaleRouteName(localizedRoute.name, _locale, common.runtimeConfig.public.i18n); } try { const resolvedRoute = router.resolve(localizedRoute); if (resolvedRoute.name) { return resolvedRoute; } return router.resolve(route); } catch (e) { if (typeof e === "object" && "type" in e && e.type === 1) { return null; } } } const DefaultSwitchLocalePathIntercepter = (path) => path; function getLocalizableMetaFromDynamicParams(common, route) { var _a; if (common.runtimeConfig.public.i18n.experimental.switchLocalePathLinkSSR) { return unref(common.metaState.value); } const meta = route.meta || {}; return ((_a = unref(meta)) == null ? void 0 : _a[DEFAULT_DYNAMIC_PARAMS_KEY]) || {}; } function switchLocalePath(common, locale, _route) { const route = _route ?? common.router.currentRoute.value; const name = getRouteBaseName(common, route); if (!name) { return ""; } const switchLocalePathIntercepter = extendSwitchLocalePathIntercepter(common.runtimeConfig); const routeCopy = routeToObject(route); const resolvedParams = getLocalizableMetaFromDynamicParams(common, route)[locale]; const baseRoute = { ...routeCopy, name, params: { ...routeCopy.params, ...resolvedParams } }; const path = localePath(common, baseRoute, locale); return switchLocalePathIntercepter(path, locale); } function localeHead(common, { addDirAttribute = false, addSeoAttributes: seoAttributes = true, identifierAttribute: idAttribute = "hid" }) { const { defaultDirection } = (/* @__PURE__ */ useRuntimeConfig()).public.i18n; const i18n = getComposer$3(common.i18n); const metaObject = { htmlAttrs: {}, link: [], meta: [] }; if (unref(i18n.locales) == null || unref(i18n.baseUrl) == null) { return metaObject; } const locale = getLocale$1(common.i18n); const locales = getLocales(common.i18n); const currentLocale = getNormalizedLocales(locales).find((l) => l.code === locale) || { code: locale }; const currentLanguage = currentLocale.language; const currentDir = currentLocale.dir || defaultDirection; if (addDirAttribute) { metaObject.htmlAttrs.dir = currentDir; } if (seoAttributes && locale && unref(i18n.locales)) { if (currentLanguage) { metaObject.htmlAttrs.lang = currentLanguage; } metaObject.link.push( ...getHreflangLinks(common, unref(locales), idAttribute), ...getCanonicalLink(common, idAttribute, seoAttributes) ); metaObject.meta.push( ...getOgUrl(common, idAttribute, seoAttributes), ...getCurrentOgLocale(currentLocale, currentLanguage, idAttribute), ...getAlternateOgLocales(unref(locales), currentLanguage, idAttribute) ); } return metaObject; } function getBaseUrl() { const nuxtApp = useNuxtApp(); const i18n = getComposer$3(nuxtApp.$i18n); return joinURL(unref(i18n.baseUrl), nuxtApp.$config.app.baseURL); } function getHreflangLinks(common, locales, idAttribute) { const baseUrl = getBaseUrl(); const { defaultLocale, strategy } = (/* @__PURE__ */ useRuntimeConfig()).public.i18n; const links = []; if (strategy === "no_prefix") return links; const localeMap = /* @__PURE__ */ new Map(); for (const locale of locales) { const localeLanguage = locale.language; if (!localeLanguage) { console.warn("Locale `language` ISO code is required to generate alternate link"); continue; } const [language, region] = localeLanguage.split("-"); if (language && region && (locale.isCatchallLocale || !localeMap.has(language))) { localeMap.set(language, locale); } localeMap.set(localeLanguage, locale); } for (const [language, mapLocale] of localeMap.entries()) { const localePath2 = switchLocalePath(common, mapLocale.code); if (localePath2) { links.push({ [idAttribute]: `i18n-alt-${language}`, rel: "alternate", href: toAbsoluteUrl(localePath2, baseUrl), hreflang: language }); } } if (defaultLocale) { const localePath2 = switchLocalePath(common, defaultLocale); if (localePath2) { links.push({ [idAttribute]: "i18n-xd", rel: "alternate", href: toAbsoluteUrl(localePath2, baseUrl), hreflang: "x-default" }); } } return links; } function getCanonicalUrl(common, baseUrl, seoAttributes) { const route = common.router.currentRoute.value; const currentRoute = localeRoute(common, { ...route, path: void 0, name: getRouteBaseName(common, route) }); if (!currentRoute) return ""; let href = toAbsoluteUrl(currentRoute.path, baseUrl); const canonicalQueries = isObject(seoAttributes) && seoAttributes.canonicalQueries || []; const currentRouteQueryParams = currentRoute.query; const params = new URLSearchParams(); for (const queryParamName of canonicalQueries) { if (queryParamName in currentRouteQueryParams) { const queryParamValue = currentRouteQueryParams[queryParamName]; if (isArray(queryParamValue)) { queryParamValue.forEach((v) => params.append(queryParamName, v || "")); } else { params.append(queryParamName, queryParamValue || ""); } } } const queryString = params.toString(); if (queryString) { href = `${href}?${queryString}`; } return href; } function getCanonicalLink(common, idAttribute, seoAttributes) { const baseUrl = getBaseUrl(); const href = getCanonicalUrl(common, baseUrl, seoAttributes); if (!href) return []; return [{ [idAttribute]: "i18n-can", rel: "canonical", href }]; } function getOgUrl(common, idAttribute, seoAttributes) { const baseUrl = getBaseUrl(); const href = getCanonicalUrl(common, baseUrl, seoAttributes); if (!href) return []; return [{ [idAttribute]: "i18n-og-url", property: "og:url", content: href }]; } function getCurrentOgLocale(currentLocale, currentLanguage, idAttribute) { if (!currentLocale || !currentLanguage) return []; return [{ [idAttribute]: "i18n-og", property: "og:locale", content: hypenToUnderscore(currentLanguage) }]; } function getAlternateOgLocales(locales, currentLanguage, idAttribute) { const alternateLocales = locales.filter((locale) => locale.language && locale.language !== currentLanguage); return alternateLocales.map((locale) => ({ [idAttribute]: `i18n-og-alt-${locale.language}`, property: "og:locale:alternate", content: hypenToUnderscore(locale.language) })); } function hypenToUnderscore(str) { return (str || "").replace(/-/g, "_"); } function toAbsoluteUrl(urlOrPath, baseUrl) { if (urlOrPath.match(/^https?:\/\//)) return urlOrPath; return joinURL(baseUrl, urlOrPath); } function createLocaleFromRouteGetter() { const { routesNameSeparator, defaultLocaleRouteNameSuffix } = (/* @__PURE__ */ useRuntimeConfig()).public.i18n; const localesPattern = `(${localeCodes.join("|")})`; const defaultSuffixPattern = `(?:${routesNameSeparator}${defaultLocaleRouteNameSuffix})?`; const regexpName = new RegExp(`${routesNameSeparator}${localesPattern}${defaultSuffixPattern}$`, "i"); const regexpPath = getLocalesRegex(localeCodes); const getLocaleFromRoute = (route) => { if (isObject(route)) { if (route.name) { const name = isString(route.name) ? route.name : route.name.toString(); const matches = name.match(regexpName); if (matches && matches.length > 1) { return matches[1]; } } else if (route.path) { const matches = route.path.match(regexpPath); if (matches && matches.length > 1) { return matches[1]; } } } else if (isString(route)) { const matches = route.match(regexpPath); if (matches && matches.length > 1) { return matches[1]; } } return ""; }; return getLocaleFromRoute; } function setCookieLocale(i18n, locale) { return callVueI18nInterfaces(i18n, "setLocaleCookie", locale); } function mergeLocaleMessage(i18n, locale, messages) { return callVueI18nInterfaces(i18n, "mergeLocaleMessage", locale, messages); } async function onBeforeLanguageSwitch(i18n, oldLocale, newLocale, initial, context) { return callVueI18nInterfaces(i18n, "onBeforeLanguageSwitch", oldLocale, newLocale, initial, context); } function onLanguageSwitched(i18n, oldLocale, newLocale) { return callVueI18nInterfaces(i18n, "onLanguageSwitched", oldLocale, newLocale); } function initCommonComposableOptions(i18n) { return { i18n: i18n ?? useNuxtApp().$i18n, router: useRouter(), runtimeConfig: /* @__PURE__ */ useRuntimeConfig(), metaState: useState("nuxt-i18n-meta", () => ({})) }; } async function loadAndSetLocale(newLocale, i18n, runtimeI18n, initial = false) { const { differentDomains, skipSettingLocaleOnNavigate, lazy } = runtimeI18n; const opts = runtimeDetectBrowserLanguage(runtimeI18n); const nuxtApp = useNuxtApp(); const oldLocale = getLocale$1(i18n); const localeCodes2 = getLocaleCodes(i18n); function syncCookie(locale = oldLocale) { if (opts === false || !opts.useCookie) return; if (skipSettingLocaleOnNavigate) return; setCookieLocale(i18n, locale); } if (!newLocale) { syncCookie(); return false; } if (!initial && differentDomains) { syncCookie(); return false; } if (oldLocale === newLocale) { syncCookie(); return false; } const localeOverride = await onBeforeLanguageSwitch(i18n, oldLocale, newLocale, initial, nuxtApp); if (localeOverride && localeCodes2.includes(localeOverride)) { if (oldLocale === localeOverride) { syncCookie(); return false; } newLocale = localeOverride; } if (lazy) { const i18nFallbackLocales = getVueI18nPropertyValue(i18n, "fallbackLocale"); const setter = (locale, message) => mergeLocaleMessage(i18n, locale, message); if (i18nFallbackLocales) { const fallbackLocales = makeFallbackLocaleCodes(i18nFallbackLocales, [newLocale]); await Promise.all(fallbackLocales.map((locale) => loadLocale(locale, localeLoaders, setter))); } await loadLocale(newLocale, localeLoaders, setter); } if (skipSettingLocaleOnNavigate) { return false; } syncCookie(newLocale); setLocale(i18n, newLocale); await onLanguageSwitched(i18n, oldLocale, newLocale); return true; } function createLogger(label) { return { log: console.log.bind(console, `${label}:`) // change to this after implementing logger across runtime code // log: console.log.bind(console, `[i18n:${label}]`) }; } function detectLocale(route, routeLocaleGetter, initialLocaleLoader, detectLocaleContext, runtimeI18n) { const { strategy, defaultLocale, differentDomains, multiDomainLocales } = runtimeI18n; const { localeCookie } = detectLocaleContext; const _detectBrowserLanguage = runtimeDetectBrowserLanguage(runtimeI18n); createLogger("detectLocale"); const initialLocale = isFunction(initialLocaleLoader) ? initialLocaleLoader() : initialLocaleLoader; const detectedBrowser = detectBrowserLanguage(route, detectLocaleContext, initialLocale); if (detectedBrowser.reason === DetectFailure.SSG_IGNORE) { return initialLocale; } if (detectedBrowser.locale && detectedBrowser.from != null) { return detectedBrowser.locale; } let detected = ""; if (differentDomains || multiDomainLocales) { detected || (detected = getLocaleDomain(normalizedLocales, strategy, route)); } else if (strategy !== "no_prefix") { detected || (detected = routeLocaleGetter(route)); } const cookieLocale = _detectBrowserLanguage && _detectBrowserLanguage.useCookie && localeCookie; detected || (detected = cookieLocale || initialLocale || defaultLocale || ""); return detected; } function detectRedirect({ route, targetLocale, routeLocaleGetter, calledWithRouting = false }) { const nuxtApp = useNuxtApp(); const common = initCommonComposableOptions(); const { strategy, differentDomains } = common.runtimeConfig.public.i18n; let redirectPath = ""; const { fullPath: toFullPath } = route.to; if (!differentDomains && (calledWithRouting || strategy !== "no_prefix") && routeLocaleGetter(route.to) !== targetLocale) { const routePath = nuxtApp.$switchLocalePath(targetLocale) || nuxtApp.$localePath(toFullPath, targetLocale); if (isString(routePath) && routePath && !isEqual(routePath, toFullPath) && !routePath.startsWith("//")) { redirectPath = !(route.from && route.from.fullPath === routePath) ? routePath : ""; } } if ((differentDomains || isSSG) && routeLocaleGetter(route.to) !== targetLocale) { const routePath = switchLocalePath(common, targetLocale, route.to); if (isString(routePath) && routePath && !isEqual(routePath, toFullPath) && !routePath.startsWith("//")) { redirectPath = routePath; } } return redirectPath; } function isRootRedirectOptions(rootRedirect) { return isObject(rootRedirect) && "path" in rootRedirect && "statusCode" in rootRedirect; } const useRedirectState = () => useState(NUXT_I18N_MODULE_ID + ":redirect", () => ""); function _navigate(redirectPath, status) { return navigateTo(redirectPath, { redirectCode: status }); } async function navigate(args, { status = 302, enableNavigate = false } = {}) { const { nuxtApp, i18n, locale, route } = args; const { rootRedirect, differentDomains, multiDomainLocales, skipSettingLocaleOnNavigate, configLocales, strategy } = nuxtApp.$config.public.i18n; let { redirectPath } = args; if (route.path === "/" && rootRedirect) { if (isString(rootRedirect)) { redirectPath = "/" + rootRedirect; } else if (isRootRedirectOptions(rootRedirect)) { redirectPath = "/" + rootRedirect.path; status = rootRedirect.statusCode; } redirectPath = nuxtApp.$localePath(redirectPath, locale); return _navigate(redirectPath, status); } if (multiDomainLocales && strategy === "prefix_except_default") { const host = getHost(); const currentDomain = configLocales.find((locale2) => { var _a; if (typeof locale2 !== "string") { return (_a = locale2.defaultForDomains) == null ? void 0 : _a.find((domain) => domain === host); } return false; }); const defaultLocaleForDomain = typeof currentDomain !== "string" ? currentDomain == null ? void 0 : currentDomain.code : void 0; if (route.path.startsWith(`/${defaultLocaleForDomain}`)) { return _navigate(route.path.replace(`/${defaultLocaleForDomain}`, ""), status); } else if (!route.path.startsWith(`/${locale}`) && locale !== defaultLocaleForDomain) { const getLocaleFromRoute = createLocaleFromRouteGetter(); const oldLocale = getLocaleFromRoute(route.path); if (oldLocale !== "") { return _navigate(`/${locale + route.path.replace(`/${oldLocale}`, "")}`, status); } else { return _navigate(`/${locale + (route.path === "/" ? "" : route.path)}`, status); } } else if (redirectPath && route.path !== redirectPath) { return _navigate(redirectPath, status); } return; } if (!differentDomains) { if (redirectPath) { return _navigate(redirectPath, status); } } else { const state = useRedirectState(); if (state.value && state.value !== redirectPath) { { state.value = redirectPath; } } } } function injectNuxtHelpers(nuxt, i18n) { defineGetter(nuxt, "$i18n", getI18nTarget(i18n)); defineGetter(nuxt, "$getRouteBaseName", wrapComposable(getRouteBaseName)); defineGetter(nuxt, "$localePath", wrapComposable(localePath)); defineGetter(nuxt, "$localeRoute", wrapComposable(localeRoute)); defineGetter(nuxt, "$switchLocalePath", wrapComposable(switchLocalePath)); defineGetter(nuxt, "$localeHead", wrapComposable(localeHead)); } function extendPrefixable(runtimeConfig = /* @__PURE__ */ useRuntimeConfig()) { return (opts) => { return DefaultPrefixable(opts) && !runtimeConfig.public.i18n.differentDomains; }; } function extendSwitchLocalePathIntercepter(runtimeConfig = /* @__PURE__ */ useRuntimeConfig()) { return (path, locale) => { if (runtimeConfig.public.i18n.differentDomains) { const domain = getDomainFromLocale(locale); if (domain) { return joinURL(domain, path); } else { return path; } } else { return DefaultSwitchLocalePathIntercepter(path); } }; } function extendBaseUrl() { return () => { const ctx = useNuxtApp(); const { baseUrl, defaultLocale, differentDomains } = ctx.$config.public.i18n; if (isFunction(baseUrl)) { const baseUrlResult = baseUrl(ctx); return baseUrlResult; } const localeCode = isFunction(defaultLocale) ? defaultLocale() : defaultLocale; if (differentDomains && localeCode) { const domain = getDomainFromLocale(localeCode); if (domain) { return domain; } } if (baseUrl) { return baseUrl; } return baseUrl; }; } function formatMessage(message) { return NUXT_I18N_MODULE_ID + " " + message; } function callVueI18nInterfaces(i18n, name, ...args) { const target = getI18nTarget(i18n); const [obj, method] = [target, target[name]]; return Reflect.apply(method, obj, [...args]); } function getVueI18nPropertyValue(i18n, name) { const target = getI18nTarget(i18n); return unref(target[name]); } function defineGetter(obj, key, val) { Object.defineProperty(obj, key, { get: () => val }); } function wrapComposable(fn, common = initCommonComposableOptions()) { return (...args) => fn(common, ...args); } function parseAcceptLanguage(input2) { return input2.split(",").map((tag) => tag.split(";")[0]); } function getBrowserLocale() { let ret; { const header = useRequestHeaders(["accept-language"]); const accept = header["accept-language"]; if (accept) { ret = findBrowserLocale(normalizedLocales, parseAcceptLanguage(accept)); } } return ret; } function getI18nCookie() { const detect = runtimeDetectBrowserLanguage(); const cookieKey = detect && detect.cookieKey || DEFAULT_COOKIE_KEY; const date = /* @__PURE__ */ new Date(); const cookieOptions = { expires: new Date(date.setDate(date.getDate() + 365)), path: "/", sameSite: detect && detect.cookieCrossOrigin ? "none" : "lax", secure: detect && detect.cookieCrossOrigin || detect && detect.cookieSecure }; if (detect && detect.cookieDomain) { cookieOptions.domain = detect.cookieDomain; } return useCookie(cookieKey, cookieOptions); } function getLocaleCookie(cookieRef, detect, defaultLocale) { if (detect === false || !detect.useCookie) { return; } const localeCode = cookieRef.value ?? void 0; if (localeCode == null) { return; } if (localeCodes.includes(localeCode)) { return localeCode; } if (defaultLocale) { cookieRef.value = defaultLocale; return defaultLocale; } cookieRef.value = void 0; return; } function setLocaleCookie(cookieRef, locale, detect) { if (detect === false || !detect.useCookie) { return; } cookieRef.value = locale; } var DetectFailure = /* @__PURE__ */ ((DetectFailure2) => { DetectFailure2["NOT_FOUND"] = "not_found_match"; DetectFailure2["FIRST_ACCESS"] = "first_access_only"; DetectFailure2["NO_REDIRECT_ROOT"] = "not_redirect_on_root"; DetectFailure2["NO_REDIRECT_NO_PREFIX"] = "not_redirect_on_no_prefix"; DetectFailure2["SSG_IGNORE"] = "detect_ignore_on_ssg"; return DetectFailure2; })(DetectFailure || {}); const DefaultDetectBrowserLanguageFromResult = { locale: "" }; function detectBrowserLanguage(route, detectLocaleContext, locale = "") { createLogger("detectBrowserLanguage"); const _detect = runtimeDetectBrowserLanguage(); if (!_detect) { return DefaultDetectBrowserLanguageFromResult; } const { strategy } = (/* @__PURE__ */ useRuntimeConfig()).public.i18n; const { ssg, callType, firstAccess, localeCookie } = detectLocaleContext; if (!firstAccess) { return { locale: strategy === "no_prefix" ? locale : "", reason: "first_access_only" /* FIRST_ACCESS */ }; } const { redirectOn, alwaysRedirect, useCookie: useCookie2, fallbackLocale } = _detect; const path = isString(route) ? route : route.path; if (strategy !== "no_prefix") { if (redirectOn === "root" && path !== "/") { return { locale: "", reason: "not_redirect_on_root" /* NO_REDIRECT_ROOT */ }; } if (redirectOn === "no prefix" && !alwaysRedirect && path.match(getLocalesRegex(localeCodes))) { return { locale: "", reason: "not_redirect_on_no_prefix" /* NO_REDIRECT_NO_PREFIX */ }; } } let from; const cookieMatch = useCookie2 && localeCookie || void 0; if (useCookie2) { from = "cookie"; } const browserMatch = getBrowserLocale(); if (!cookieMatch) { from = "navigator_or_header"; } const matchedLocale = cookieMatch || browserMatch; const resolved = matchedLocale || fallbackLocale || ""; if (!matchedLocale && fallbackLocale) { from = "fallback"; } return { locale: resolved, from }; } function getHost() { let host; { const header = useRequestHeaders(["x-forwarded-host", "host"]); let detectedHost; if ("x-forwarded-host" in header) { detectedHost = header["x-forwarded-host"]; } else if ("host" in header) { detectedHost = header["host"]; } host = isArray(detectedHost) ? detectedHost[0] : detectedHost; } return host; } function getLocaleDomain(locales, strategy, route) { let host = getHost() || ""; if (host) { let matchingLocale; const matchingLocales = locales.filter((locale) => { if (locale && locale.domain) { let domain = locale.domain; if (hasProtocol(locale.domain)) { domain = locale.domain.replace(/(http|https):\/\//, ""); } return domain === host; } else if (Array.isArray(locale == null ? void 0 : locale.domains)) { return locale.domains.includes(host); } return false; }); if (matchingLocales.length === 1) { matchingLocale = matchingLocales[0]; } else if (matchingLocales.length > 1) { if (strategy === "no_prefix") { console.warn( formatMessage( "Multiple matching domains found! This is not supported for no_prefix strategy in combination with differentDomains!" ) ); matchingLocale = matchingLocales[0]; } else { if (route) { const routePath = isObject(route) ? route.path : isString(route) ? route : ""; if (routePath && routePath !== "") { const matches = routePath.match(getLocalesRegex(matchingLocales.map((l) => l.code))); if (matches && matches.length > 1) { matchingLocale = matchingLocales.find((l) => l.code === matches[1]); } } } if (!matchingLocale) { matchingLocale = matchingLocales.find( (l) => Array.isArray(l.defaultForDomains) ? l.defaultForDomains.includes(host) : l.domainDefault ); } } } if (matchingLocale) { return matchingLocale.code; } else { host = ""; } } return host; } function getDomainFromLocale(localeCode) { var _a, _b, _c, _d, _e, _f; const runtimeConfig = /* @__PURE__ */ useRuntimeConfig(); const nuxtApp = useNuxtApp(); const host = getHost(); const config2 = runtimeConfig.public.i18n; const lang = normalizedLocales.find((locale) => locale.code === localeCode); const domain = ((_b = (_a = config2 == null ? void 0 : config2.locales) == null ? void 0 : _a[localeCode]) == null ? void 0 : _b.domain) || (lang == null ? void 0 : lang.domain) || ((_e = (_d = (_c = config2 == null ? void 0 : config2.locales) == null ? void 0 : _c[localeCode]) == null ? void 0 : _d.domains) == null ? void 0 : _e.find((v) => v === host)) || ((_f = lang == null ? void 0 : lang.domains) == null ? void 0 : _f.find((v) => v === host)); if (domain) { if (hasProtocol(domain, { strict: true })) { return domain; } let protocol; { const { node: { req } } = useRequestEvent(nuxtApp); protocol = req && isHTTPS(req) ? "https:" : "http:"; } return protocol + "//" + domain; } console.warn(formatMessage("Could not find domain name for locale " + localeCode)); } const runtimeDetectBrowserLanguage = (opts = (/* @__PURE__ */ useRuntimeConfig()).public.i18n) => { if ((opts == null ? void 0 : opts.detectBrowserLanguage) === false) return false; return opts == null ? void 0 : opts.detectBrowserLanguage; }; /*! * message-compiler v9.14.0 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ function createPosition(line, column, offset) { return { line, column, offset }; } function createLocation(start, end, source) { const loc = { start, end }; return loc; } const CompileWarnCodes = { USE_MODULO_SYNTAX: 1, __EXTEND_POINT__: 2 }; function createCompileWarn(code2, loc, ...args) { const msg = code2; const message = { message: String(msg), code: code2 }; if (loc) { message.location = loc; } return message; } const CompileErrorCodes = { // tokenizer error codes EXPECTED_TOKEN: 1, INVALID_TOKEN_IN_PLACEHOLDER: 2, UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3, UNKNOWN_ESCAPE_SEQUENCE: 4, INVALID_UNICODE_ESCAPE_SEQUENCE: 5, UNBALANCED_CLOSING_BRACE: 6, UNTERMINATED_CLOSING_BRACE: 7, EMPTY_PLACEHOLDER: 8, NOT_ALLOW_NEST_PLACEHOLDER: 9, INVALID_LINKED_FORMAT: 10, // parser error codes MUST_HAVE_MESSAGES_IN_PLURAL: 11, UNEXPECTED_EMPTY_LINKED_MODIFIER: 12, UNEXPECTED_EMPTY_LINKED_KEY: 13, UNEXPECTED_LEXICAL_ANALYSIS: 14, // generator error codes UNHANDLED_CODEGEN_NODE_TYPE: 15, // minifier error codes UNHANDLED_MINIFIER_NODE_TYPE: 16, // Special value for higher-order compilers to pick up the last code // to avoid collision of error codes. This should always be kept as the last // item. __EXTEND_POINT__: 17 }; function createCompileError(code2, loc, options = {}) { const { domain, messages, args } = options; const msg = code2; const error = new SyntaxError(String(msg)); error.code = code2; if (loc) { error.location = loc; } error.domain = domain; return error; } function defaultOnError(error) { throw error; } const CHAR_SP = " "; const CHAR_CR = "\r"; const CHAR_LF = "\n"; const CHAR_LS = String.fromCharCode(8232); const CHAR_PS = String.fromCharCode(8233); function createScanner(str) { const _buf = str; let _index = 0; let _line = 1; let _column = 1; let _peekOffset = 0; const isCRLF = (index22) => _buf[index22] === CHAR_CR && _buf[index22 + 1] === CHAR_LF; const isLF = (index22) => _buf[index22] === CHAR_LF; const isPS = (index22) => _buf[index22] === CHAR_PS; const isLS = (index22) => _buf[index22] === CHAR_LS; const isLineEnd = (index22) => isCRLF(index22) || isLF(index22) || isPS(index22) || isLS(index22); const index2 = () => _index; const line = () => _line; const column = () => _column; const peekOffset = () => _peekOffset; const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset]; const currentChar = () => charAt(_index); const currentPeek = () => charAt(_index + _peekOffset); function next() { _peekOffset = 0; if (isLineEnd(_index)) { _line++; _column = 0; } if (isCRLF(_index)) { _index++; } _index++; _column++; return _buf[_index]; } function peek() { if (isCRLF(_index + _peekOffset)) { _peekOffset++; } _peekOffset++; return _buf[_index + _peekOffset]; } function reset() { _index = 0; _line = 1; _column = 1; _peekOffset = 0; } function resetPeek(offset = 0) { _peekOffset = offset; } function skipToPeek() { const target = _index + _peekOffset; while (target !== _index) { next(); } _peekOffset = 0; } return { index: index2, line, column, peekOffset, charAt, currentChar, currentPeek, next, peek, reset, resetPeek, skipToPeek }; } const EOF = void 0; const DOT = "."; const LITERAL_DELIMITER = "'"; const ERROR_DOMAIN$3 = "tokenizer"; function createTokenizer(source, options = {}) { const location = options.location !== false; const _scnr = createScanner(source); const currentOffset = () => _scnr.index(); const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index()); const _initLoc = currentPosition(); const _initOffset = currentOffset(); const _context = { currentType: 14, offset: _initOffset, startLoc: _initLoc, endLoc: _initLoc, lastType: 14, lastOffset: _initOffset, lastStartLoc: _initLoc, lastEndLoc: _initLoc, braceNest: 0, inLinked: false, text: "" }; const context = () => _context; const { onError } = options; function emitError(code2, pos, offset, ...args) { const ctx = context(); pos.column += offset; pos.offset += offset; if (onError) { const loc = location ? createLocation(ctx.startLoc, pos) : null; const err = createCompileError(code2, loc, { domain: ERROR_DOMAIN$3, args }); onError(err); } } function getToken(context2, type, value) { context2.endLoc = currentPosition(); context2.currentType = type; const token = { type }; if (location) { token.loc = createLocation(context2.startLoc, context2.endLoc); } if (value != null) { token.value = value; } return token; } const getEndToken = (context2) => getToken( context2, 14 /* TokenTypes.EOF */ ); function eat(scnr, ch) { if (scnr.currentChar() === ch) { scnr.next(); return ch; } else { emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch); return ""; } } function peekSpaces(scnr) { let buf = ""; while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) { buf += scnr.currentPeek(); scnr.peek(); } return buf; } function skipSpaces(scnr) { const buf = peekSpaces(scnr); scnr.skipToPeek(); return buf; } function isIdentifierStart(ch) { if (ch === EOF) { return false; } const cc = ch.charCodeAt(0); return cc >= 97 && cc <= 122 || // a-z cc >= 65 && cc <= 90 || // A-Z cc === 95; } function isNumberStart(ch) { if (ch === EOF) { return false; } const cc = ch.charCodeAt(0); return cc >= 48 && cc <= 57; } function isNamedIdentifierStart(scnr, context2) { const { currentType } = context2; if (currentType !== 2) { return false; } peekSpaces(scnr); const ret = isIdentifierStart(scnr.currentPeek()); scnr.resetPeek(); return ret; } function isListIdentifierStart(scnr, context2) { const { currentType } = context2; if (currentType !== 2) { return false; } peekSpaces(scnr); const ch = scnr.currentPeek() === "-" ? scnr.peek() : scnr.currentPeek(); const ret = isNumberStart(ch); scnr.resetPeek(); return ret; } function isLiteralStart(scnr, context2) { const { currentType } = context2; if (currentType !== 2) { return false; } peekSpaces(scnr); const ret = scnr.currentPeek() === LITERAL_DELIMITER; scnr.resetPeek(); return ret; } function isLinkedDotStart(scnr, context2) { const { currentType } = context2; if (currentType !== 8) { return false; } peekSpaces(scnr); const ret = scnr.currentPeek() === "."; scnr.resetPeek(); return ret; } function isLinkedModifierStart(scnr, context2) { const { currentType } = context2; if (currentType !== 9) { return false; } peekSpaces(scnr); const ret = isIdentifierStart(scnr.currentPeek()); scnr.resetPeek(); return ret; } function isLinkedDelimiterStart(scnr, context2) { const { currentType } = context2; if (!(currentType === 8 || currentType === 12)) { return false; } peekSpaces(scnr); const ret = scnr.currentPeek() === ":"; scnr.resetPeek(); return ret; } function isLinkedReferStart(scnr, context2) { const { currentType } = context2; if (currentType !== 10) { return false; } const fn = () => { const ch = scnr.currentPeek(); if (ch === "{") { return isIdentifierStart(scnr.peek()); } else if (ch === "@" || ch === "%" || ch === "|" || ch === ":" || ch === "." || ch === CHAR_SP || !ch) { return false; } else if (ch === CHAR_LF) { scnr.peek(); return fn(); } else { return isTextStart(scnr, false); } }; const ret = fn(); scnr.resetPeek(); return ret; } function isPluralStart(scnr) { peekSpaces(scnr); const ret = scnr.currentPeek() === "|"; scnr.resetPeek(); return ret; } function detectModuloStart(scnr) { const spaces = peekSpaces(scnr); const ret = scnr.currentPeek() === "%" && scnr.peek() === "{"; scnr.resetPeek(); return { isModulo: ret, hasSpace: spaces.length > 0 }; } function isTextStart(scnr, reset = true) { const fn = (hasSpace = false, prev = "", detectModulo = false) => { const ch = scnr.currentPeek(); if (ch === "{") { return prev === "%" ? false : hasSpace; } else if (ch === "@" || !ch) { return prev === "%" ? true : hasSpace; } else if (ch === "%") { scnr.peek(); return fn(hasSpace, "%", true); } else if (ch === "|") { return prev === "%" || detectModulo ? true : !(prev === CHAR_SP || prev === CHAR_LF); } else if (ch === CHAR_SP) { scnr.peek(); return fn(true, CHAR_SP, detectModulo); } else if (ch === CHAR_LF) { scnr.peek(); return fn(true, CHAR_LF, detectModulo); } else { return true; } }; const ret = fn(); reset && scnr.resetPeek(); return ret; } function takeChar(scnr, fn) { const ch = scnr.currentChar(); if (ch === EOF) { return EOF; } if (fn(ch)) { scnr.next(); return ch; } return null; } function isIdentifier(ch) { const cc = ch.charCodeAt(0); return cc >= 97 && cc <= 122 || // a-z cc >= 65 && cc <= 90 || // A-Z cc >= 48 && cc <= 57 || // 0-9 cc === 95 || // _ cc === 36; } function takeIdentifierChar(scnr) { return takeChar(scnr, isIdentifier); } function isNamedIdentifier(ch) { const cc = ch.charCodeAt(0); return cc >= 97 && cc <= 122 || // a-z cc >= 65 && cc <= 90 || // A-Z cc >= 48 && cc <= 57 || // 0-9 cc === 95 || // _ cc === 36 || // $ cc === 45; } function takeNamedIdentifierChar(scnr) { return takeChar(scnr, isNamedIdentifier); } function isDigit(ch) { const cc = ch.charCodeAt(0); return cc >= 48 && cc <= 57; } function takeDigit(scnr) { return takeChar(scnr, isDigit); } function isHexDigit(ch) { const cc = ch.charCodeAt(0); return cc >= 48 && cc <= 57 || // 0-9 cc >= 65 && cc <= 70 || // A-F cc >= 97 && cc <= 102; } function takeHexDigit(scnr) { return takeChar(scnr, isHexDigit); } function getDigits(scnr) { let ch = ""; let num = ""; while (ch = takeDigit(scnr)) { num += ch; } return num; } function readModulo(scnr) { skipSpaces(scnr); const ch = scnr.currentChar(); if (ch !== "%") { emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch); } scnr.next(); return "%"; } function readText(scnr) { let buf = ""; while (true) { const ch = scnr.currentChar(); if (ch === "{" || ch === "}" || ch === "@" || ch === "|" || !ch) { break; } else if (ch === "%") { if (isTextStart(scnr)) { buf += ch; scnr.next(); } else { break; } } else if (ch === CHAR_SP || ch === CHAR_LF) { if (isTextStart(scnr)) { buf += ch; scnr.next(); } else if (isPluralStart(scnr)) { break; } else { buf += ch; scnr.next(); } } else { buf += ch; scnr.next(); } } return buf; } function readNamedIdentifier(scnr) { skipSpaces(scnr); let ch = ""; let name = ""; while (ch = takeNamedIdentifierChar(scnr)) { name += ch; } if (scnr.currentChar() === EOF) { emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0); } return name; } function readListIdentifier(scnr) { skipSpaces(scnr); let value = ""; if (scnr.currentChar() === "-") { scnr.next(); value += `-${getDigits(scnr)}`; } else { value += getDigits(scnr); } if (scnr.currentChar() === EOF) { emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0); } return value; } function isLiteral2(ch) { return ch !== LITERAL_DELIMITER && ch !== CHAR_LF; } function readLiteral(scnr) { skipSpaces(scnr); eat(scnr, `'`); let ch = ""; let literal = ""; while (ch = takeChar(scnr, isLiteral2)) { if (ch === "\\") { literal += readEscapeSequence(scnr); } else { literal += ch; } } const current = scnr.currentChar(); if (current === CHAR_LF || current === EOF) { emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0); if (current === CHAR_LF) { scnr.next(); eat(scnr, `'`); } return literal; } eat(scnr, `'`); return literal; } function readEscapeSequence(scnr) { const ch = scnr.currentChar(); switch (ch) { case "\\": case `'`: scnr.next(); return `\\${ch}`; case "u": return readUnicodeEscapeSequence(scnr, ch, 4); case "U": return readUnicodeEscapeSequence(scnr, ch, 6); default: emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch); return ""; } } function readUnicodeEscapeSequence(scnr, unicode, digits) { eat(scnr, unicode); let sequence = ""; for (let i = 0; i < digits; i++) { const ch = takeHexDigit(scnr); if (!ch) { emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`); break; } sequence += ch; } return `\\${unicode}${sequence}`; } function isInvalidIdentifier(ch) { return ch !== "{" && ch !== "}" && ch !== CHAR_SP && ch !== CHAR_LF; } function readInvalidIdentifier(scnr) { skipSpaces(scnr); let ch = ""; let identifiers = ""; while (ch = takeChar(scnr, isInvalidIdentifier)) { identifiers += ch; } return identifiers; } function readLinkedModifier(scnr) { let ch = ""; let name = ""; while (ch = takeIdentifierChar(scnr)) { name += ch; } return name; } function readLinkedRefer(scnr) { const fn = (buf) => { const ch = scnr.currentChar(); if (ch === "{" || ch === "%" || ch === "@" || ch === "|" || ch === "(" || ch === ")" || !ch) { return buf; } else if (ch === CHAR_SP) { return buf; } else if (ch === CHAR_LF || ch === DOT) { buf += ch; scnr.next(); return fn(buf); } else { buf += ch; scnr.next(); return fn(buf); } }; return fn(""); } function readPlural(scnr) { skipSpaces(scnr); const plural = eat( scnr, "|" /* TokenChars.Pipe */ ); skipSpaces(scnr); return plural; } function readTokenInPlaceholder(scnr, context2) { let token = null; const ch = scnr.currentChar(); switch (ch) { case "{": if (context2.braceNest >= 1) { emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0); } scnr.next(); token = getToken( context2, 2, "{" /* TokenChars.BraceLeft */ ); skipSpaces(scnr); context2.braceNest++; return token; case "}": if (context2.braceNest > 0 && context2.currentType === 2) { emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0); } scnr.next(); token = getToken( context2, 3, "}" /* TokenChars.BraceRight */ ); context2.braceNest--; context2.braceNest > 0 && skipSpaces(scnr); if (context2.inLinked && context2.braceNest === 0) { context2.inLinked = false; } return token; case "@": if (context2.braceNest > 0) { emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0); } token = readTokenInLinked(scnr, context2) || getEndToken(context2); context2.braceNest = 0; return token; default: { let validNamedIdentifier = true; let validListIdentifier = true; let validLiteral = true; if (isPluralStart(scnr)) { if (context2.braceNest > 0) { emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0); } token = getToken(context2, 1, readPlural(scnr)); context2.braceNest = 0; context2.inLinked = false; return token; } if (context2.braceNest > 0 && (context2.currentType === 5 || context2.currentType === 6 || context2.currentType === 7)) { emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0); context2.braceNest = 0; return readToken(scnr, context2); } if (validNamedIdentifier = isNamedIdentifierStart(scnr, context2)) { token = getToken(context2, 5, readNamedIdentifier(scnr)); skipSpaces(scnr); return token; } if (validListIdentifier = isListIdentifierStart(scnr, context2)) { token = getToken(context2, 6, readListIdentifier(scnr)); skipSpaces(scnr); return token; } if (validLiteral = isLiteralStart(scnr, context2)) { token = getToken(context2, 7, readLiteral(scnr)); skipSpaces(scnr); return token; } if (!validNamedIdentifier && !validListIdentifier && !validLiteral) { token = getToken(context2, 13, readInvalidIdentifier(scnr)); emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value); skipSpaces(scnr); return token; } break; } } return token; } function readTokenInLinked(scnr, context2) { const { currentType } = context2; let token = null; const ch = scnr.currentChar(); if ((currentType === 8 || currentType === 9 || currentType === 12 || currentType === 10) && (ch === CHAR_LF || ch === CHAR_SP)) { emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0); } switch (ch) { case "@": scnr.next(); token = getToken( context2, 8, "@" /* TokenChars.LinkedAlias */ ); context2.inLinked = true; return token; case ".": skipSpaces(scnr); scnr.next(); return getToken( context2, 9, "." /* TokenChars.LinkedDot */ ); case ":": skipSpaces(scnr); scnr.next(); return getToken( context2, 10, ":" /* TokenChars.LinkedDelimiter */ ); default: if (isPluralStart(scnr)) { token = getToken(context2, 1, readPlural(scnr)); context2.braceNest = 0; context2.inLinked = false; return token; } if (isLinkedDotStart(scnr, context2) || isLinkedDelimiterStart(scnr, context2)) { skipSpaces(scnr); return readTokenInLinked(scnr, context2); } if (isLinkedModifierStart(scnr, context2)) { skipSpaces(scnr); return getToken(context2, 12, readLinkedModifier(scnr)); } if (isLinkedReferStart(scnr, context2)) { skipSpaces(scnr); if (ch === "{") { return readTokenInPlaceholder(scnr, context2) || token; } else { return getToken(context2, 11, readLinkedRefer(scnr)); } } if (currentType === 8) { emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0); } context2.braceNest = 0; context2.inLinked = false; return readToken(scnr, context2); } } function readToken(scnr, context2) { let token = { type: 14 /* TokenTypes.EOF */ }; if (context2.braceNest > 0) { return readTokenInPlaceholder(scnr, context2) || getEndToken(context2); } if (context2.inLinked) { return readTokenInLinked(scnr, context2) || getEndToken(context2); } const ch = scnr.currentChar(); switch (ch) { case "{": return readTokenInPlaceholder(scnr, context2) || getEndToken(context2); case "}": emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0); scnr.next(); return getToken( context2, 3, "}" /* TokenChars.BraceRight */ ); case "@": return readTokenInLinked(scnr, context2) || getEndToken(context2); default: { if (isPluralStart(scnr)) { token = getToken(context2, 1, readPlural(scnr)); context2.braceNest = 0; context2.inLinked = false; return token; } const { isModulo, hasSpace } = detectModuloStart(scnr); if (isModulo) { return hasSpace ? getToken(context2, 0, readText(scnr)) : getToken(context2, 4, readModulo(scnr)); } if (isTextStart(scnr)) { return getToken(context2, 0, readText(scnr)); } break; } } return token; } function nextToken() { const { currentType, offset, startLoc, endLoc } = _context; _context.lastType = currentType; _context.lastOffset = offset; _context.lastStartLoc = startLoc; _context.lastEndLoc = endLoc; _context.offset = currentOffset(); _context.startLoc = currentPosition(); if (_scnr.currentChar() === EOF) { return getToken( _context, 14 /* TokenTypes.EOF */ ); } return readToken(_scnr, _context); } return { nextToken, currentOffset, currentPosition, context }; } const ERROR_DOMAIN$2 = "parser"; const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g; function fromEscapeSequence(match, codePoint4, codePoint6) { switch (match) { case `\\\\`: return `\\`; case `\\'`: return `'`; default: { const codePoint = parseInt(codePoint4 || codePoint6, 16); if (codePoint <= 55295 || codePoint >= 57344) { return String.fromCodePoint(codePoint); } return "�"; } } } function createParser(options = {}) { const location = options.location !== false; const { onError, onWarn } = options; function emitError(tokenzer, code2, start, offset, ...args) { const end = tokenzer.currentPosition(); end.offset += offset; end.column += offset; if (onError) { const loc = location ? createLocation(start, end) : null; const err = createCompileError(code2, loc, { domain: ERROR_DOMAIN$2, args }); onError(err); } } function emitWarn(tokenzer, code2, start, offset, ...args) { const end = tokenzer.currentPosition(); end.offset += offset; end.column += offset; if (onWarn) { const loc = location ? createLocation(start, end) : null; onWarn(createCompileWarn(code2, loc, args)); } } function startNode(type, offset, loc) { const node = { type }; if (location) { node.start = offset; node.end = offset; node.loc = { start: loc, end: loc }; } return node; } function endNode(node, offset, pos, type) { if (location) { node.end = offset; if (node.loc) { node.loc.end = pos; } } } function parseText(tokenizer, value) { const context = tokenizer.context(); const node = startNode(3, context.offset, context.startLoc); node.value = value; endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition()); return node; } function parseList(tokenizer, index2) { const context = tokenizer.context(); const { lastOffset: offset, lastStartLoc: loc } = context; const node = startNode(5, offset, loc); node.index = parseInt(index2, 10); tokenizer.nextToken(); endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition()); return node; } function parseNamed(tokenizer, key, modulo) { const context = tokenizer.context(); const { lastOffset: offset, lastStartLoc: loc } = context; const node = startNode(4, offset, loc); node.key = key; if (modulo === true) { node.modulo = true; } tokenizer.nextToken(); endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition()); return node; } function parseLiteral(tokenizer, value) { const context = tokenizer.context(); const { lastOffset: offset, lastStartLoc: loc } = context; const node = startNode(9, offset, loc); node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence); tokenizer.nextToken(); endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition()); return node; } function parseLinkedModifier(tokenizer) { const token = tokenizer.nextToken(); const context = tokenizer.context(); const { lastOffset: offset, lastStartLoc: loc } = context; const node = startNode(8, offset, loc); if (token.type !== 12) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0); node.value = ""; endNode(node, offset, loc); return { nextConsumeToken: token, node }; } if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } node.value = token.value || ""; endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition()); return { node }; } function parseLinkedKey(tokenizer, value) { const context = tokenizer.context(); const node = startNode(7, context.offset, context.startLoc); node.value = value; endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition()); return node; } function parseLinked(tokenizer) { const context = tokenizer.context(); const linkedNode = startNode(6, context.offset, context.startLoc); let token = tokenizer.nextToken(); if (token.type === 9) { const parsed = parseLinkedModifier(tokenizer); linkedNode.modifier = parsed.node; token = parsed.nextConsumeToken || tokenizer.nextToken(); } if (token.type !== 10) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } token = tokenizer.nextToken(); if (token.type === 2) { token = tokenizer.nextToken(); } switch (token.type) { case 11: if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } linkedNode.key = parseLinkedKey(tokenizer, token.value || ""); break; case 5: if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } linkedNode.key = parseNamed(tokenizer, token.value || ""); break; case 6: if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } linkedNode.key = parseList(tokenizer, token.value || ""); break; case 7: if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } linkedNode.key = parseLiteral(tokenizer, token.value || ""); break; default: { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0); const nextContext = tokenizer.context(); const emptyLinkedKeyNode = startNode(7, nextContext.offset, nextContext.startLoc); emptyLinkedKeyNode.value = ""; endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc); linkedNode.key = emptyLinkedKeyNode; endNode(linkedNode, nextContext.offset, nextContext.startLoc); return { nextConsumeToken: token, node: linkedNode }; } } endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition()); return { node: linkedNode }; } function parseMessage(tokenizer) { const context = tokenizer.context(); const startOffset = context.currentType === 1 ? tokenizer.currentOffset() : context.offset; const startLoc = context.currentType === 1 ? context.endLoc : context.startLoc; const node = startNode(2, startOffset, startLoc); node.items = []; let nextToken = null; let modulo = null; do { const token = nextToken || tokenizer.nextToken(); nextToken = null; switch (token.type) { case 0: if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } node.items.push(parseText(tokenizer, token.value || "")); break; case 6: if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } node.items.push(parseList(tokenizer, token.value || "")); break; case 4: modulo = true; break; case 5: if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } node.items.push(parseNamed(tokenizer, token.value || "", !!modulo)); if (modulo) { emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token)); modulo = null; } break; case 7: if (token.value == null) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token)); } node.items.push(parseLiteral(tokenizer, token.value || "")); break; case 8: { const parsed = parseLinked(tokenizer); node.items.push(parsed.node); nextToken = parsed.nextConsumeToken || null; break; } } } while (context.currentType !== 14 && context.currentType !== 1); const endOffset = context.currentType === 1 ? context.lastOffset : tokenizer.currentOffset(); const endLoc = context.currentType === 1 ? context.lastEndLoc : tokenizer.currentPosition(); endNode(node, endOffset, endLoc); return node; } function parsePlural(tokenizer, offset, loc, msgNode) { const context = tokenizer.context(); let hasEmptyMessage = msgNode.items.length === 0; const node = startNode(1, offset, loc); node.cases = []; node.cases.push(msgNode); do { const msg = parseMessage(tokenizer); if (!hasEmptyMessage) { hasEmptyMessage = msg.items.length === 0; } node.cases.push(msg); } while (context.currentType !== 14); if (hasEmptyMessage) { emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0); } endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition()); return node; } function parseResource(tokenizer) { const context = tokenizer.context(); const { offset, startLoc } = context; const msgNode = parseMessage(tokenizer); if (context.currentType === 14) { return msgNode; } else { return parsePlural(tokenizer, offset, startLoc, msgNode); } } function parse2(source) { const tokenizer = createTokenizer(source, assign({}, options)); const context = tokenizer.context(); const node = startNode(0, context.offset, context.startLoc); if (location && node.loc) { node.loc.source = source; } node.body = parseResource(tokenizer); if (options.onCacheKey) { node.cacheKey = options.onCacheKey(source); } if (context.currentType !== 14) { emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || ""); } endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition()); return node; } return { parse: parse2 }; } function getTokenCaption(token) { if (token.type === 14) { return "EOF"; } const name = (token.value || "").replace(/\r?\n/gu, "\\n"); return name.length > 10 ? name.slice(0, 9) + "…" : name; } function createTransformer(ast, options = {}) { const _context = { ast, helpers: /* @__PURE__ */ new Set() }; const context = () => _context; const helper = (name) => { _context.helpers.add(name); return name; }; return { context, helper }; } function traverseNodes(nodes, transformer) { for (let i = 0; i < nodes.length; i++) { traverseNode(nodes[i], transformer); } } function traverseNode(node, transformer) { switch (node.type) { case 1: traverseNodes(node.cases, transformer); transformer.helper( "plural" /* HelperNameMap.PLURAL */ ); break; case 2: traverseNodes(node.items, transformer); break; case 6: { const linked = node; traverseNode(linked.key, transformer); transformer.helper( "linked" /* HelperNameMap.LINKED */ ); transformer.helper( "type" /* HelperNameMap.TYPE */ ); break; } case 5: transformer.helper( "interpolate" /* HelperNameMap.INTERPOLATE */ ); transformer.helper( "list" /* HelperNameMap.LIST */ ); break; case 4: transformer.helper( "interpolate" /* HelperNameMap.INTERPOLATE */ ); transformer.helper( "named" /* HelperNameMap.NAMED */ ); break; } } function transform(ast, options = {}) { const transformer = createTransformer(ast); transformer.helper( "normalize" /* HelperNameMap.NORMALIZE */ ); ast.body && traverseNode(ast.body, transformer); const context = transformer.context(); ast.helpers = Array.from(context.helpers); } function optimize(ast) { const body = ast.body; if (body.type === 2) { optimizeMessageNode(body); } else { body.cases.forEach((c) => optimizeMessageNode(c)); } return ast; } function optimizeMessageNode(message) { if (message.items.length === 1) { const item = message.items[0]; if (item.type === 3 || item.type === 9) { message.static = item.value; delete item.value; } } else { const values = []; for (let i = 0; i < message.items.length; i++) { const item = message.items[i]; if (!(item.type === 3 || item.type === 9)) { break; } if (item.value == null) { break; } values.push(item.value); } if (values.length === message.items.length) { message.static = join(values); for (let i = 0; i < message.items.length; i++) { const item = message.items[i]; if (item.type === 3 || item.type === 9) { delete item.value; } } } } } function minify(node) { node.t = node.type; switch (node.type) { case 0: { const resource2 = node; minify(resource2.body); resource2.b = resource2.body; delete resource2.body; break; } case 1: { const plural = node; const cases = plural.cases; for (let i = 0; i < cases.length; i++) { minify(cases[i]); } plural.c = cases; delete plural.cases; break; } case 2: { const message = node; const items = message.items; for (let i = 0; i < items.length; i++) { minify(items[i]); } message.i = items; delete message.items; if (message.static) { message.s = message.static; delete message.static; } break; } case 3: case 9: case 8: case 7: { const valueNode = node; if (valueNode.value) { valueNode.v = valueNode.value; delete valueNode.value; } break; } case 6: { const linked = node; minify(linked.key); linked.k = linked.key; delete linked.key; if (linked.modifier) { minify(linked.modifier); linked.m = linked.modifier; delete linked.modifier; } break; } case 5: { const list = node; list.i = list.index; delete list.index; break; } case 4: { const named = node; named.k = named.key; delete named.key; break; } } delete node.type; } function createCodeGenerator(ast, options) { const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options; const location = options.location !== false; const _context = { filename, code: "", column: 1, line: 1, offset: 0, map: void 0, breakLineCode, needIndent: _needIndent, indentLevel: 0 }; if (location && ast.loc) { _context.source = ast.loc.source; } const context = () => _context; function push(code2, node) { _context.code += code2; } function _newline(n, withBreakLine = true) { const _breakLineCode = withBreakLine ? breakLineCode : ""; push(_needIndent ? _breakLineCode + ` `.repeat(n) : _breakLineCode); } function indent(withNewLine = true) { const level = ++_context.indentLevel; withNewLine && _newline(level); } function deindent(withNewLine = true) { const level = --_context.indentLevel; withNewLine && _newline(level); } function newline() { _newline(_context.indentLevel); } const helper = (key) => `_${key}`; const needIndent = () => _context.needIndent; return { context, push, indent, deindent, newline, helper, needIndent }; } function generateLinkedNode(generator, node) { const { helper } = generator; generator.push(`${helper( "linked" /* HelperNameMap.LINKED */ )}(`); generateNode(generator, node.key); if (node.modifier) { generator.push(`, `); generateNode(generator, node.modifier); generator.push(`, _type`); } else { generator.push(`, undefined, _type`); } generator.push(`)`); } function generateMessageNode(generator, node) { const { helper, needIndent } = generator; generator.push(`${helper( "normalize" /* HelperNameMap.NORMALIZE */ )}([`); generator.indent(needIndent()); const length = node.items.length; for (let i = 0; i < length; i++) { generateNode(generator, node.items[i]); if (i === length - 1) { break; } generator.push(", "); } generator.deindent(needIndent()); generator.push("])"); } function generatePluralNode(generator, node) { const { helper, needIndent } = generator; if (node.cases.length > 1) { generator.push(`${helper( "plural" /* HelperNameMap.PLURAL */ )}([`); generator.indent(needIndent()); const length = node.cases.length; for (let i = 0; i < length; i++) { generateNode(generator, node.cases[i]); if (i === length - 1) { break; } generator.push(", "); } generator.deindent(needIndent()); generator.push(`])`); } } function generateResource(generator, node) { if (node.body) { generateNode(generator, node.body); } else { generator.push("null"); } } function generateNode(generator, node) { const { helper } = generator; switch (node.type) { case 0: generateResource(generator, node); break; case 1: generatePluralNode(generator, node); break; case 2: generateMessageNode(generator, node); break; case 6: generateLinkedNode(generator, node); break; case 8: generator.push(JSON.stringify(node.value), node); break; case 7: generator.push(JSON.stringify(node.value), node); break; case 5: generator.push(`${helper( "interpolate" /* HelperNameMap.INTERPOLATE */ )}(${helper( "list" /* HelperNameMap.LIST */ )}(${node.index}))`, node); break; case 4: generator.push(`${helper( "interpolate" /* HelperNameMap.INTERPOLATE */ )}(${helper( "named" /* HelperNameMap.NAMED */ )}(${JSON.stringify(node.key)}))`, node); break; case 9: generator.push(JSON.stringify(node.value), node); break; case 3: generator.push(JSON.stringify(node.value), node); break; } } const generate = (ast, options = {}) => { const mode = isString(options.mode) ? options.mode : "normal"; const filename = isString(options.filename) ? options.filename : "message.intl"; const sourceMap = !!options.sourceMap; const breakLineCode = options.breakLineCode != null ? options.breakLineCode : mode === "arrow" ? ";" : "\n"; const needIndent = options.needIndent ? options.needIndent : mode !== "arrow"; const helpers = ast.helpers || []; const generator = createCodeGenerator(ast, { mode, filename, sourceMap, breakLineCode, needIndent }); generator.push(mode === "normal" ? `function __msg__ (ctx) {` : `(ctx) => {`); generator.indent(needIndent); if (helpers.length > 0) { generator.push(`const { ${join(helpers.map((s) => `${s}: _${s}`), ", ")} } = ctx`); generator.newline(); } generator.push(`return `); generateNode(generator, ast); generator.deindent(needIndent); generator.push(`}`); delete ast.helpers; const { code: code2, map } = generator.context(); return { ast, code: code2, map: map ? map.toJSON() : void 0 // eslint-disable-line @typescript-eslint/no-explicit-any }; }; function baseCompile$1(source, options = {}) { const assignedOptions = assign({}, options); const jit = !!assignedOptions.jit; const enalbeMinify = !!assignedOptions.minify; const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize; const parser = createParser(assignedOptions); const ast = parser.parse(source); if (!jit) { transform(ast, assignedOptions); return generate(ast, assignedOptions); } else { enambeOptimize && optimize(ast); enalbeMinify && minify(ast); return { ast, code: "" }; } } const pathStateMachine = []; pathStateMachine[ 0 /* States.BEFORE_PATH */ ] = { [ "w" /* PathCharTypes.WORKSPACE */ ]: [ 0 /* States.BEFORE_PATH */ ], [ "i" /* PathCharTypes.IDENT */ ]: [ 3, 0 /* Actions.APPEND */ ], [ "[" /* PathCharTypes.LEFT_BRACKET */ ]: [ 4 /* States.IN_SUB_PATH */ ], [ "o" /* PathCharTypes.END_OF_FAIL */ ]: [ 7 /* States.AFTER_PATH */ ] }; pathStateMachine[ 1 /* States.IN_PATH */ ] = { [ "w" /* PathCharTypes.WORKSPACE */ ]: [ 1 /* States.IN_PATH */ ], [ "." /* PathCharTypes.DOT */ ]: [ 2 /* States.BEFORE_IDENT */ ], [ "[" /* PathCharTypes.LEFT_BRACKET */ ]: [ 4 /* States.IN_SUB_PATH */ ], [ "o" /* PathCharTypes.END_OF_FAIL */ ]: [ 7 /* States.AFTER_PATH */ ] }; pathStateMachine[ 2 /* States.BEFORE_IDENT */ ] = { [ "w" /* PathCharTypes.WORKSPACE */ ]: [ 2 /* States.BEFORE_IDENT */ ], [ "i" /* PathCharTypes.IDENT */ ]: [ 3, 0 /* Actions.APPEND */ ], [ "0" /* PathCharTypes.ZERO */ ]: [ 3, 0 /* Actions.APPEND */ ] }; pathStateMachine[ 3 /* States.IN_IDENT */ ] = { [ "i" /* PathCharTypes.IDENT */ ]: [ 3, 0 /* Actions.APPEND */ ], [ "0" /* PathCharTypes.ZERO */ ]: [ 3, 0 /* Actions.APPEND */ ], [ "w" /* PathCharTypes.WORKSPACE */ ]: [ 1, 1 /* Actions.PUSH */ ], [ "." /* PathCharTypes.DOT */ ]: [ 2, 1 /* Actions.PUSH */ ], [ "[" /* PathCharTypes.LEFT_BRACKET */ ]: [ 4, 1 /* Actions.PUSH */ ], [ "o" /* PathCharTypes.END_OF_FAIL */ ]: [ 7, 1 /* Actions.PUSH */ ] }; pathStateMachine[ 4 /* States.IN_SUB_PATH */ ] = { [ "'" /* PathCharTypes.SINGLE_QUOTE */ ]: [ 5, 0 /* Actions.APPEND */ ], [ '"' /* PathCharTypes.DOUBLE_QUOTE */ ]: [ 6, 0 /* Actions.APPEND */ ], [ "[" /* PathCharTypes.LEFT_BRACKET */ ]: [ 4, 2 /* Actions.INC_SUB_PATH_DEPTH */ ], [ "]" /* PathCharTypes.RIGHT_BRACKET */ ]: [ 1, 3 /* Actions.PUSH_SUB_PATH */ ], [ "o" /* PathCharTypes.END_OF_FAIL */ ]: 8, [ "l" /* PathCharTypes.ELSE */ ]: [ 4, 0 /* Actions.APPEND */ ] }; pathStateMachine[ 5 /* States.IN_SINGLE_QUOTE */ ] = { [ "'" /* PathCharTypes.SINGLE_QUOTE */ ]: [ 4, 0 /* Actions.APPEND */ ], [ "o" /* PathCharTypes.END_OF_FAIL */ ]: 8, [ "l" /* PathCharTypes.ELSE */ ]: [ 5, 0 /* Actions.APPEND */ ] }; pathStateMachine[ 6 /* States.IN_DOUBLE_QUOTE */ ] = { [ '"' /* PathCharTypes.DOUBLE_QUOTE */ ]: [ 4, 0 /* Actions.APPEND */ ], [ "o" /* PathCharTypes.END_OF_FAIL */ ]: 8, [ "l" /* PathCharTypes.ELSE */ ]: [ 6, 0 /* Actions.APPEND */ ] }; const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/; function isLiteral(exp) { return literalValueRE.test(exp); } function stripQuotes(str) { const a = str.charCodeAt(0); const b = str.charCodeAt(str.length - 1); return a === b && (a === 34 || a === 39) ? str.slice(1, -1) : str; } function getPathCharType(ch) { if (ch === void 0 || ch === null) { return "o"; } const code2 = ch.charCodeAt(0); switch (code2) { case 91: case 93: case 46: case 34: case 39: return ch; case 95: case 36: case 45: return "i"; case 9: case 10: case 13: case 160: case 65279: case 8232: case 8233: return "w"; } return "i"; } function formatSubPath(path) { const trimmed = path.trim(); if (path.charAt(0) === "0" && isNaN(parseInt(path))) { return false; } return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed; } function parse(path) { const keys = []; let index2 = -1; let mode = 0; let subPathDepth = 0; let c; let key; let newChar; let type; let transition; let action; let typeMap; const actions = []; actions[ 0 /* Actions.APPEND */ ] = () => { if (key === void 0) { key = newChar; } else { key += newChar; } }; actions[ 1 /* Actions.PUSH */ ] = () => { if (key !== void 0) { keys.push(key); key = void 0; } }; actions[ 2 /* Actions.INC_SUB_PATH_DEPTH */ ] = () => { actions[ 0 /* Actions.APPEND */ ](); subPathDepth++; }; actions[ 3 /* Actions.PUSH_SUB_PATH */ ] = () => { if (subPathDepth > 0) { subPathDepth--; mode = 4; actions[ 0 /* Actions.APPEND */ ](); } else { subPathDepth = 0; if (key === void 0) { return false; } key = formatSubPath(key); if (key === false) { return false; } else { actions[ 1 /* Actions.PUSH */ ](); } } }; function maybeUnescapeQuote() { const nextChar = path[index2 + 1]; if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') { index2++; newChar = "\\" + nextChar; actions[ 0 /* Actions.APPEND */ ](); return true; } } while (mode !== null) { index2++; c = path[index2]; if (c === "\\" && maybeUnescapeQuote()) { continue; } type = getPathCharType(c); typeMap = pathStateMachine[mode]; transition = typeMap[type] || typeMap[ "l" /* PathCharTypes.ELSE */ ] || 8; if (transition === 8) { return; } mode = transition[0]; if (transition[1] !== void 0) { action = actions[transition[1]]; if (action) { newChar = c; if (action() === false) { return; } } } if (mode === 7) { return keys; } } } const cache = /* @__PURE__ */ new Map(); function resolveWithKeyValue(obj, path) { return isObject(obj) ? obj[path] : null; } function resolveValue(obj, path) { if (!isObject(obj)) { return null; } let hit = cache.get(path); if (!hit) { hit = parse(path); if (hit) { cache.set(path, hit); } } if (!hit) { return null; } const len = hit.length; let last = obj; let i = 0; while (i < len) { const val = last[hit[i]]; if (val === void 0) { return null; } if (isFunction(last)) { return null; } last = val; i++; } return last; } const DEFAULT_MODIFIER = (str) => str; const DEFAULT_MESSAGE = (ctx) => ""; const DEFAULT_MESSAGE_DATA_TYPE = "text"; const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : join(values); const DEFAULT_INTERPOLATE = toDisplayString; function pluralDefault(choice, choicesLength) { choice = Math.abs(choice); if (choicesLength === 2) { return choice ? choice > 1 ? 1 : 0 : 1; } return choice ? Math.min(choice, 2) : 0; } function getPluralIndex(options) { const index2 = isNumber(options.pluralIndex) ? options.pluralIndex : -1; return options.named && (isNumber(options.named.count) || isNumber(options.named.n)) ? isNumber(options.named.count) ? options.named.count : isNumber(options.named.n) ? options.named.n : index2 : index2; } function normalizeNamed(pluralIndex, props) { if (!props.count) { props.count = pluralIndex; } if (!props.n) { props.n = pluralIndex; } } function createMessageContext(options = {}) { const locale = options.locale; const pluralIndex = getPluralIndex(options); const pluralRule = isObject(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault; const orgPluralRule = isObject(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? pluralDefault : void 0; const plural = (messages) => { return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)]; }; const _list = options.list || []; const list = (index2) => _list[index2]; const _named = options.named || {}; isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named); const named = (key) => _named[key]; function message(key) { const msg = isFunction(options.messages) ? options.messages(key) : isObject(options.messages) ? options.messages[key] : false; return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg; } const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER; const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE; const interpolate = isPlainObject(options.processor) && isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE; const type = isPlainObject(options.processor) && isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE; const linked = (key, ...args) => { const [arg1, arg2] = args; let type2 = "text"; let modifier = ""; if (args.length === 1) { if (isObject(arg1)) { modifier = arg1.modifier || modifier; type2 = arg1.type || type2; } else if (isString(arg1)) { modifier = arg1 || modifier; } } else if (args.length === 2) { if (isString(arg1)) { modifier = arg1 || modifier; } if (isString(arg2)) { type2 = arg2 || type2; } } const ret = message(key)(ctx); const msg = ( // The message in vnode resolved with linked are returned as an array by processor.nomalize type2 === "vnode" && isArray(ret) && modifier ? ret[0] : ret ); return modifier ? _modifier(modifier)(msg, type2) : msg; }; const ctx = { [ "list" /* HelperNameMap.LIST */ ]: list, [ "named" /* HelperNameMap.NAMED */ ]: named, [ "plural" /* HelperNameMap.PLURAL */ ]: plural, [ "linked" /* HelperNameMap.LINKED */ ]: linked, [ "message" /* HelperNameMap.MESSAGE */ ]: message, [ "type" /* HelperNameMap.TYPE */ ]: type, [ "interpolate" /* HelperNameMap.INTERPOLATE */ ]: interpolate, [ "normalize" /* HelperNameMap.NORMALIZE */ ]: normalize, [ "values" /* HelperNameMap.VALUES */ ]: assign({}, _list, _named) }; return ctx; } const code$1$1 = CompileWarnCodes.__EXTEND_POINT__; const inc$1$1 = incrementer(code$1$1); const CoreWarnCodes = { NOT_FOUND_KEY: code$1$1, // 2 FALLBACK_TO_TRANSLATE: inc$1$1(), // 3 CANNOT_FORMAT_NUMBER: inc$1$1(), // 4 FALLBACK_TO_NUMBER_FORMAT: inc$1$1(), // 5 CANNOT_FORMAT_DATE: inc$1$1(), // 6 FALLBACK_TO_DATE_FORMAT: inc$1$1(), // 7 EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1$1(), // 8 __EXTEND_POINT__: inc$1$1() // 9 }; const code$2 = CompileErrorCodes.__EXTEND_POINT__; const inc$2 = incrementer(code$2); const CoreErrorCodes = { INVALID_ARGUMENT: code$2, // 17 INVALID_DATE_ARGUMENT: inc$2(), // 18 INVALID_ISO_DATE_ARGUMENT: inc$2(), // 19 NOT_SUPPORT_NON_STRING_MESSAGE: inc$2(), // 20 NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc$2(), // 21 NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc$2(), // 22 NOT_SUPPORT_LOCALE_TYPE: inc$2(), // 23 __EXTEND_POINT__: inc$2() // 24 }; function createCoreError(code2) { return createCompileError(code2, null, void 0); } function getLocale(context, options) { return options.locale != null ? resolveLocale(options.locale) : resolveLocale(context.locale); } let _resolveLocale; function resolveLocale(locale) { if (isString(locale)) { return locale; } else { if (isFunction(locale)) { if (locale.resolvedOnce && _resolveLocale != null) { return _resolveLocale; } else if (locale.constructor.name === "Function") { const resolve2 = locale(); if (isPromise(resolve2)) { throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE); } return _resolveLocale = resolve2; } else { throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION); } } else { throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE); } } } function fallbackWithSimple(ctx, fallback, start) { return [.../* @__PURE__ */ new Set([ start, ...isArray(fallback) ? fallback : isObject(fallback) ? Object.keys(fallback) : isString(fallback) ? [fallback] : [start] ])]; } function fallbackWithLocaleChain(ctx, fallback, start) { const startLocale = isString(start) ? start : DEFAULT_LOCALE; const context = ctx; if (!context.__localeChainCache) { context.__localeChainCache = /* @__PURE__ */ new Map(); } let chain = context.__localeChainCache.get(startLocale); if (!chain) { chain = []; let block = [start]; while (isArray(block)) { block = appendBlockToChain(chain, block, fallback); } const defaults = isArray(fallback) || !isPlainObject(fallback) ? fallback : fallback["default"] ? fallback["default"] : null; block = isString(defaults) ? [defaults] : defaults; if (isArray(block)) { appendBlockToChain(chain, block, false); } context.__localeChainCache.set(startLocale, chain); } return chain; } function appendBlockToChain(chain, block, blocks) { let follow = true; for (let i = 0; i < block.length && isBoolean(follow); i++) { const locale = block[i]; if (isString(locale)) { follow = appendLocaleToChain(chain, block[i], blocks); } } return follow; } function appendLocaleToChain(chain, locale, blocks) { let follow; const tokens = locale.split("-"); do { const target = tokens.join("-"); follow = appendItemToChain(chain, target, blocks); tokens.splice(-1, 1); } while (tokens.length && follow === true); return follow; } function appendItemToChain(chain, target, blocks) { let follow = false; if (!chain.includes(target)) { follow = true; if (target) { follow = target[target.length - 1] !== "!"; const locale = target.replace(/!/g, ""); chain.push(locale); if ((isArray(blocks) || isPlainObject(blocks)) && blocks[locale]) { follow = blocks[locale]; } } } return follow; } const VERSION$1 = "9.14.0"; const NOT_REOSLVED = -1; const DEFAULT_LOCALE = "en-US"; const MISSING_RESOLVE_VALUE = ""; const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`; function getDefaultLinkedModifiers() { return { upper: (val, type) => { return type === "text" && isString(val) ? val.toUpperCase() : type === "vnode" && isObject(val) && "__v_isVNode" in val ? val.children.toUpperCase() : val; }, lower: (val, type) => { return type === "text" && isString(val) ? val.toLowerCase() : type === "vnode" && isObject(val) && "__v_isVNode" in val ? val.children.toLowerCase() : val; }, capitalize: (val, type) => { return type === "text" && isString(val) ? capitalize(val) : type === "vnode" && isObject(val) && "__v_isVNode" in val ? capitalize(val.children) : val; } }; } let _compiler; function registerMessageCompiler(compiler) { _compiler = compiler; } let _resolver; function registerMessageResolver(resolver) { _resolver = resolver; } let _fallbacker; function registerLocaleFallbacker(fallbacker) { _fallbacker = fallbacker; } const setAdditionalMeta = /* @__NO_SIDE_EFFECTS__ */ (meta) => { }; let _fallbackContext = null; const setFallbackContext = (context) => { _fallbackContext = context; }; const getFallbackContext = () => _fallbackContext; let _cid = 0; function createCoreContext(options = {}) { const onWarn = isFunction(options.onWarn) ? options.onWarn : warn; const version2 = isString(options.version) ? options.version : VERSION$1; const locale = isString(options.locale) || isFunction(options.locale) ? options.locale : DEFAULT_LOCALE; const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale; const fallbackLocale = isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale; const messages = isPlainObject(options.messages) ? options.messages : { [_locale]: {} }; const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale]: {} }; const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale]: {} }; const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers()); const pluralRules = options.pluralRules || {}; const missing = isFunction(options.missing) ? options.missing : null; const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true; const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true; const fallbackFormat = !!options.fallbackFormat; const unresolving = !!options.unresolving; const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null; const processor = isPlainObject(options.processor) ? options.processor : null; const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; const escapeParameter = !!options.escapeParameter; const messageCompiler = isFunction(options.messageCompiler) ? options.messageCompiler : _compiler; const messageResolver = isFunction(options.messageResolver) ? options.messageResolver : _resolver || resolveWithKeyValue; const localeFallbacker = isFunction(options.localeFallbacker) ? options.localeFallbacker : _fallbacker || fallbackWithSimple; const fallbackContext = isObject(options.fallbackContext) ? options.fallbackContext : void 0; const internalOptions = options; const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map(); const __numberFormatters = isObject(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map(); const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {}; _cid++; const context = { version: version2, cid: _cid, locale, fallbackLocale, messages, modifiers, pluralRules, missing, missingWarn, fallbackWarn, fallbackFormat, unresolving, postTranslation, processor, warnHtmlMessage, escapeParameter, messageCompiler, messageResolver, localeFallbacker, fallbackContext, onWarn, __meta }; { context.datetimeFormats = datetimeFormats; context.numberFormats = numberFormats; context.__datetimeFormatters = __datetimeFormatters; context.__numberFormatters = __numberFormatters; } return context; } function handleMissing(context, key, locale, missingWarn, type) { const { missing, onWarn } = context; if (missing !== null) { const ret = missing(context, locale, key, type); return isString(ret) ? ret : key; } else { return key; } } function updateFallbackLocale(ctx, locale, fallback) { const context = ctx; context.__localeChainCache = /* @__PURE__ */ new Map(); ctx.localeFallbacker(ctx, fallback, locale); } function isAlmostSameLocale(locale, compareLocale) { if (locale === compareLocale) return false; return locale.split("-")[0] === compareLocale.split("-")[0]; } function isImplicitFallback(targetLocale, locales) { const index2 = locales.indexOf(targetLocale); if (index2 === -1) { return false; } for (let i = index2 + 1; i < locales.length; i++) { if (isAlmostSameLocale(targetLocale, locales[i])) { return true; } } return false; } function format(ast) { const msg = (ctx) => formatParts(ctx, ast); return msg; } function formatParts(ctx, ast) { const body = ast.b || ast.body; if ((body.t || body.type) === 1) { const plural = body; const cases = plural.c || plural.cases; return ctx.plural(cases.reduce((messages, c) => [ ...messages, formatMessageParts(ctx, c) ], [])); } else { return formatMessageParts(ctx, body); } } function formatMessageParts(ctx, node) { const _static = node.s || node.static; if (_static) { return ctx.type === "text" ? _static : ctx.normalize([_static]); } else { const messages = (node.i || node.items).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []); return ctx.normalize(messages); } } function formatMessagePart(ctx, node) { const type = node.t || node.type; switch (type) { case 3: { const text = node; return text.v || text.value; } case 9: { const literal = node; return literal.v || literal.value; } case 4: { const named = node; return ctx.interpolate(ctx.named(named.k || named.key)); } case 5: { const list = node; return ctx.interpolate(ctx.list(list.i != null ? list.i : list.index)); } case 6: { const linked = node; const modifier = linked.m || linked.modifier; return ctx.linked(formatMessagePart(ctx, linked.k || linked.key), modifier ? formatMessagePart(ctx, modifier) : void 0, ctx.type); } case 7: { const linkedKey = node; return linkedKey.v || linkedKey.value; } case 8: { const linkedModifier = node; return linkedModifier.v || linkedModifier.value; } default: throw new Error(`unhandled node type on format message part: ${type}`); } } const defaultOnCacheKey = (message) => message; let compileCache = /* @__PURE__ */ Object.create(null); const isMessageAST = (val) => isObject(val) && (val.t === 0 || val.type === 0) && ("b" in val || "body" in val); function baseCompile(message, options = {}) { let detectError = false; const onError = options.onError || defaultOnError; options.onError = (err) => { detectError = true; onError(err); }; return { ...baseCompile$1(message, options), detectError }; } function compile(message, context) { if (isString(message)) { isBoolean(context.warnHtmlMessage) ? context.warnHtmlMessage : true; const onCacheKey = context.onCacheKey || defaultOnCacheKey; const cacheKey = onCacheKey(message); const cached = compileCache[cacheKey]; if (cached) { return cached; } const { ast, detectError } = baseCompile(message, { ...context, location: "production" !== "production", jit: true }); const msg = format(ast); return !detectError ? compileCache[cacheKey] = msg : msg; } else { const cacheKey = message.cacheKey; if (cacheKey) { const cached = compileCache[cacheKey]; if (cached) { return cached; } return compileCache[cacheKey] = format(message); } else { return format(message); } } } const NOOP_MESSAGE_FUNCTION = () => ""; const isMessageFunction = (val) => isFunction(val); function translate(context, ...args) { const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context; const [key, options] = parseTranslateArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter; const resolvedMessage = !!options.resolvedMessage; const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : !messageCompiler ? () => key : key : fallbackFormat ? !messageCompiler ? () => key : key : ""; const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== ""; const locale = getLocale(context, options); escapeParameter && escapeParams(options); let [formatScope, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [ key, locale, messages[locale] || {} ]; let format2 = formatScope; let cacheBaseKey = key; if (!resolvedMessage && !(isString(format2) || isMessageAST(format2) || isMessageFunction(format2))) { if (enableDefaultMsg) { format2 = defaultMsgOrKey; cacheBaseKey = format2; } } if (!resolvedMessage && (!(isString(format2) || isMessageAST(format2) || isMessageFunction(format2)) || !isString(targetLocale))) { return unresolving ? NOT_REOSLVED : key; } let occurred = false; const onError = () => { occurred = true; }; const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, onError) : format2; if (occurred) { return format2; } const ctxOptions = getMessageContextOptions(context, targetLocale, message, options); const msgContext = createMessageContext(ctxOptions); const messaged = evaluateMessage(context, msg, msgContext); const ret = postTranslation ? postTranslation(messaged, key) : messaged; return ret; } function escapeParams(options) { if (isArray(options.list)) { options.list = options.list.map((item) => isString(item) ? escapeHtml(item) : item); } else if (isObject(options.named)) { Object.keys(options.named).forEach((key) => { if (isString(options.named[key])) { options.named[key] = escapeHtml(options.named[key]); } }); } } function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) { const { messages, onWarn, messageResolver: resolveValue2, localeFallbacker } = context; const locales = localeFallbacker(context, fallbackLocale, locale); let message = {}; let targetLocale; let format2 = null; const type = "translate"; for (let i = 0; i < locales.length; i++) { targetLocale = locales[i]; message = messages[targetLocale] || {}; if ((format2 = resolveValue2(message, key)) === null) { format2 = message[key]; } if (isString(format2) || isMessageAST(format2) || isMessageFunction(format2)) { break; } if (!isImplicitFallback(targetLocale, locales)) { const missingRet = handleMissing( context, // eslint-disable-line @typescript-eslint/no-explicit-any key, targetLocale, missingWarn, type ); if (missingRet !== key) { format2 = missingRet; } } } return [format2, targetLocale, message]; } function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, onError) { const { messageCompiler, warnHtmlMessage } = context; if (isMessageFunction(format2)) { const msg2 = format2; msg2.locale = msg2.locale || targetLocale; msg2.key = msg2.key || key; return msg2; } if (messageCompiler == null) { const msg2 = () => format2; msg2.locale = targetLocale; msg2.key = key; return msg2; } const msg = messageCompiler(format2, getCompileContext(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, onError)); msg.locale = targetLocale; msg.key = key; msg.source = format2; return msg; } function evaluateMessage(context, msg, msgCtx) { const messaged = msg(msgCtx); return messaged; } function parseTranslateArgs(...args) { const [arg1, arg2, arg3] = args; const options = {}; if (!isString(arg1) && !isNumber(arg1) && !isMessageFunction(arg1) && !isMessageAST(arg1)) { throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT); } const key = isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1; if (isNumber(arg2)) { options.plural = arg2; } else if (isString(arg2)) { options.default = arg2; } else if (isPlainObject(arg2) && !isEmptyObject(arg2)) { options.named = arg2; } else if (isArray(arg2)) { options.list = arg2; } if (isNumber(arg3)) { options.plural = arg3; } else if (isString(arg3)) { options.default = arg3; } else if (isPlainObject(arg3)) { assign(options, arg3); } return [key, options]; } function getCompileContext(context, locale, key, source, warnHtmlMessage, onError) { return { locale, key, warnHtmlMessage, onError: (err) => { onError && onError(err); { throw err; } }, onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2) }; } function getMessageContextOptions(context, locale, message, options) { const { modifiers, pluralRules, messageResolver: resolveValue2, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context; const resolveMessage = (key) => { let val = resolveValue2(message, key); if (val == null && fallbackContext) { const [, , message2] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn); val = resolveValue2(message2, key); } if (isString(val) || isMessageAST(val)) { let occurred = false; const onError = () => { occurred = true; }; const msg = compileMessageFormat(context, key, locale, val, key, onError); return !occurred ? msg : NOOP_MESSAGE_FUNCTION; } else if (isMessageFunction(val)) { return val; } else { return NOOP_MESSAGE_FUNCTION; } }; const ctxOptions = { locale, modifiers, pluralRules, messages: resolveMessage }; if (context.processor) { ctxOptions.processor = context.processor; } if (options.list) { ctxOptions.list = options.list; } if (options.named) { ctxOptions.named = options.named; } if (isNumber(options.plural)) { ctxOptions.pluralIndex = options.plural; } return ctxOptions; } function datetime(context, ...args) { const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context; const { __datetimeFormatters } = context; const [key, value, options, overrides] = parseDateTimeArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const part = !!options.part; const locale = getLocale(context, options); const locales = localeFallbacker( context, // eslint-disable-line @typescript-eslint/no-explicit-any fallbackLocale, locale ); if (!isString(key) || key === "") { return new Intl.DateTimeFormat(locale, overrides).format(value); } let datetimeFormat = {}; let targetLocale; let format2 = null; const type = "datetime format"; for (let i = 0; i < locales.length; i++) { targetLocale = locales[i]; datetimeFormat = datetimeFormats[targetLocale] || {}; format2 = datetimeFormat[key]; if (isPlainObject(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type); } if (!isPlainObject(format2) || !isString(targetLocale)) { return unresolving ? NOT_REOSLVED : key; } let id = `${targetLocale}__${key}`; if (!isEmptyObject(overrides)) { id = `${id}__${JSON.stringify(overrides)}`; } let formatter = __datetimeFormatters.get(id); if (!formatter) { formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides)); __datetimeFormatters.set(id, formatter); } return !part ? formatter.format(value) : formatter.formatToParts(value); } const DATETIME_FORMAT_OPTIONS_KEYS = [ "localeMatcher", "weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName", "formatMatcher", "hour12", "timeZone", "dateStyle", "timeStyle", "calendar", "dayPeriod", "numberingSystem", "hourCycle", "fractionalSecondDigits" ]; function parseDateTimeArgs(...args) { const [arg1, arg2, arg3, arg4] = args; const options = {}; let overrides = {}; let value; if (isString(arg1)) { const matches = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/); if (!matches) { throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT); } const dateTime = matches[3] ? matches[3].trim().startsWith("T") ? `${matches[1].trim()}${matches[3].trim()}` : `${matches[1].trim()}T${matches[3].trim()}` : matches[1].trim(); value = new Date(dateTime); try { value.toISOString(); } catch (e) { throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT); } } else if (isDate(arg1)) { if (isNaN(arg1.getTime())) { throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT); } value = arg1; } else if (isNumber(arg1)) { value = arg1; } else { throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT); } if (isString(arg2)) { options.key = arg2; } else if (isPlainObject(arg2)) { Object.keys(arg2).forEach((key) => { if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) { overrides[key] = arg2[key]; } else { options[key] = arg2[key]; } }); } if (isString(arg3)) { options.locale = arg3; } else if (isPlainObject(arg3)) { overrides = arg3; } if (isPlainObject(arg4)) { overrides = arg4; } return [options.key || "", value, options, overrides]; } function clearDateTimeFormat(ctx, locale, format2) { const context = ctx; for (const key in format2) { const id = `${locale}__${key}`; if (!context.__datetimeFormatters.has(id)) { continue; } context.__datetimeFormatters.delete(id); } } function number(context, ...args) { const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context; const { __numberFormatters } = context; const [key, value, options, overrides] = parseNumberArgs(...args); const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; const part = !!options.part; const locale = getLocale(context, options); const locales = localeFallbacker( context, // eslint-disable-line @typescript-eslint/no-explicit-any fallbackLocale, locale ); if (!isString(key) || key === "") { return new Intl.NumberFormat(locale, overrides).format(value); } let numberFormat = {}; let targetLocale; let format2 = null; const type = "number format"; for (let i = 0; i < locales.length; i++) { targetLocale = locales[i]; numberFormat = numberFormats[targetLocale] || {}; format2 = numberFormat[key]; if (isPlainObject(format2)) break; handleMissing(context, key, targetLocale, missingWarn, type); } if (!isPlainObject(format2) || !isString(targetLocale)) { return unresolving ? NOT_REOSLVED : key; } let id = `${targetLocale}__${key}`; if (!isEmptyObject(overrides)) { id = `${id}__${JSON.stringify(overrides)}`; } let formatter = __numberFormatters.get(id); if (!formatter) { formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides)); __numberFormatters.set(id, formatter); } return !part ? formatter.format(value) : formatter.formatToParts(value); } const NUMBER_FORMAT_OPTIONS_KEYS = [ "localeMatcher", "style", "currency", "currencyDisplay", "currencySign", "useGrouping", "minimumIntegerDigits", "minimumFractionDigits", "maximumFractionDigits", "minimumSignificantDigits", "maximumSignificantDigits", "compactDisplay", "notation", "signDisplay", "unit", "unitDisplay", "roundingMode", "roundingPriority", "roundingIncrement", "trailingZeroDisplay" ]; function parseNumberArgs(...args) { const [arg1, arg2, arg3, arg4] = args; const options = {}; let overrides = {}; if (!isNumber(arg1)) { throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT); } const value = arg1; if (isString(arg2)) { options.key = arg2; } else if (isPlainObject(arg2)) { Object.keys(arg2).forEach((key) => { if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) { overrides[key] = arg2[key]; } else { options[key] = arg2[key]; } }); } if (isString(arg3)) { options.locale = arg3; } else if (isPlainObject(arg3)) { overrides = arg3; } if (isPlainObject(arg4)) { overrides = arg4; } return [options.key || "", value, options, overrides]; } function clearNumberFormat(ctx, locale, format2) { const context = ctx; for (const key in format2) { const id = `${locale}__${key}`; if (!context.__numberFormatters.has(id)) { continue; } context.__numberFormatters.delete(id); } } /*! * vue-i18n v9.14.0 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ const VERSION = "9.14.0"; const code$1 = CoreWarnCodes.__EXTEND_POINT__; const inc$1 = incrementer(code$1); ({ FALLBACK_TO_ROOT: code$1, // 9 NOT_SUPPORTED_PRESERVE: inc$1(), // 10 NOT_SUPPORTED_FORMATTER: inc$1(), // 11 NOT_SUPPORTED_PRESERVE_DIRECTIVE: inc$1(), // 12 NOT_SUPPORTED_GET_CHOICE_INDEX: inc$1(), // 13 COMPONENT_NAME_LEGACY_COMPATIBLE: inc$1(), // 14 NOT_FOUND_PARENT_SCOPE: inc$1(), // 15 IGNORE_OBJ_FLATTEN: inc$1(), // 16 NOTICE_DROP_ALLOW_COMPOSITION: inc$1(), // 17 NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG: inc$1() // 18 }); const code = CoreErrorCodes.__EXTEND_POINT__; const inc = incrementer(code); const I18nErrorCodes = { // composer module errors UNEXPECTED_RETURN_TYPE: code, // 24 // legacy module errors INVALID_ARGUMENT: inc(), // 25 // i18n module errors MUST_BE_CALL_SETUP_TOP: inc(), // 26 NOT_INSTALLED: inc(), // 27 NOT_AVAILABLE_IN_LEGACY_MODE: inc(), // 28 // directive module errors REQUIRED_VALUE: inc(), // 29 INVALID_VALUE: inc(), // 30 // vue-devtools errors CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: inc(), // 31 NOT_INSTALLED_WITH_PROVIDE: inc(), // 32 // unexpected error UNEXPECTED_ERROR: inc(), // 33 // not compatible legacy vue-i18n constructor NOT_COMPATIBLE_LEGACY_VUE_I18N: inc(), // 34 // bridge support vue 2.x only BRIDGE_SUPPORT_VUE_2_ONLY: inc(), // 35 // need to define `i18n` option in `allowComposition: true` and `useScope: 'local' at `useI18n`` MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION: inc(), // 36 // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly NOT_AVAILABLE_COMPOSITION_IN_LEGACY: inc(), // 37 // for enhancement __EXTEND_POINT__: inc() // 38 }; function createI18nError(code2, ...args) { return createCompileError(code2, null, void 0); } const TranslateVNodeSymbol = /* @__PURE__ */ makeSymbol("__translateVNode"); const DatetimePartsSymbol = /* @__PURE__ */ makeSymbol("__datetimeParts"); const NumberPartsSymbol = /* @__PURE__ */ makeSymbol("__numberParts"); const SetPluralRulesSymbol = makeSymbol("__setPluralRules"); const InejctWithOptionSymbol = /* @__PURE__ */ makeSymbol("__injectWithOption"); const DisposeSymbol = /* @__PURE__ */ makeSymbol("__dispose"); function handleFlatJson(obj) { if (!isObject(obj)) { return obj; } for (const key in obj) { if (!hasOwn(obj, key)) { continue; } if (!key.includes(".")) { if (isObject(obj[key])) { handleFlatJson(obj[key]); } } else { const subKeys = key.split("."); const lastIndex = subKeys.length - 1; let currentObj = obj; let hasStringValue = false; for (let i = 0; i < lastIndex; i++) { if (!(subKeys[i] in currentObj)) { currentObj[subKeys[i]] = {}; } if (!isObject(currentObj[subKeys[i]])) { hasStringValue = true; break; } currentObj = currentObj[subKeys[i]]; } if (!hasStringValue) { currentObj[subKeys[lastIndex]] = obj[key]; delete obj[key]; } if (isObject(currentObj[subKeys[lastIndex]])) { handleFlatJson(currentObj[subKeys[lastIndex]]); } } } return obj; } function getLocaleMessages(locale, options) { const { messages, __i18n, messageResolver, flatJson } = options; const ret = isPlainObject(messages) ? messages : isArray(__i18n) ? {} : { [locale]: {} }; if (isArray(__i18n)) { __i18n.forEach((custom) => { if ("locale" in custom && "resource" in custom) { const { locale: locale2, resource: resource2 } = custom; if (locale2) { ret[locale2] = ret[locale2] || {}; deepCopy(resource2, ret[locale2]); } else { deepCopy(resource2, ret); } } else { isString(custom) && deepCopy(JSON.parse(custom), ret); } }); } if (messageResolver == null && flatJson) { for (const key in ret) { if (hasOwn(ret, key)) { handleFlatJson(ret[key]); } } } return ret; } function getComponentOptions(instance) { return instance.type; } function adjustI18nResources(gl, options, componentOptions) { let messages = isObject(options.messages) ? options.messages : {}; if ("__i18nGlobal" in componentOptions) { messages = getLocaleMessages(gl.locale.value, { messages, __i18n: componentOptions.__i18nGlobal }); } const locales = Object.keys(messages); if (locales.length) { locales.forEach((locale) => { gl.mergeLocaleMessage(locale, messages[locale]); }); } { if (isObject(options.datetimeFormats)) { const locales2 = Object.keys(options.datetimeFormats); if (locales2.length) { locales2.forEach((locale) => { gl.mergeDateTimeFormat(locale, options.datetimeFormats[locale]); }); } } if (isObject(options.numberFormats)) { const locales2 = Object.keys(options.numberFormats); if (locales2.length) { locales2.forEach((locale) => { gl.mergeNumberFormat(locale, options.numberFormats[locale]); }); } } } } function createTextNode(key) { return createVNode(Text, null, key, 0); } const DEVTOOLS_META = "__INTLIFY_META__"; const NOOP_RETURN_ARRAY = () => []; const NOOP_RETURN_FALSE = () => false; let composerID = 0; function defineCoreMissingHandler(missing) { return (ctx, locale, key, type) => { return missing(locale, key, getCurrentInstance() || void 0, type); }; } const getMetaInfo = /* @__NO_SIDE_EFFECTS__ */ () => { const instance = getCurrentInstance(); let meta = null; return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META]) ? { [DEVTOOLS_META]: meta } : null; }; function createComposer(options = {}, VueI18nLegacy) { const { __root, __injectWithOption } = options; const _isGlobal = __root === void 0; const flatJson = options.flatJson; const _ref = shallowRef; const translateExistCompatible = !!options.translateExistCompatible; let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true; const _locale = _ref( // prettier-ignore __root && _inheritLocale ? __root.locale.value : isString(options.locale) ? options.locale : DEFAULT_LOCALE ); const _fallbackLocale = _ref( // prettier-ignore __root && _inheritLocale ? __root.fallbackLocale.value : isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value ); const _messages = _ref(getLocaleMessages(_locale.value, options)); const _datetimeFormats = _ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} }); const _numberFormats = _ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} }); let _missingWarn = __root ? __root.missingWarn : isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true; let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true; let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true; let _fallbackFormat = !!options.fallbackFormat; let _missing = isFunction(options.missing) ? options.missing : null; let _runtimeMissing = isFunction(options.missing) ? defineCoreMissingHandler(options.missing) : null; let _postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null; let _warnHtmlMessage = __root ? __root.warnHtmlMessage : isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; let _escapeParameter = !!options.escapeParameter; const _modifiers = __root ? __root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {}; let _pluralRules = options.pluralRules || __root && __root.pluralRules; let _context; const getCoreContext = () => { _isGlobal && setFallbackContext(null); const ctxOptions = { version: VERSION, locale: _locale.value, fallbackLocale: _fallbackLocale.value, messages: _messages.value, modifiers: _modifiers, pluralRules: _pluralRules, missing: _runtimeMissing === null ? void 0 : _runtimeMissing, missingWarn: _missingWarn, fallbackWarn: _fallbackWarn, fallbackFormat: _fallbackFormat, unresolving: true, postTranslation: _postTranslation === null ? void 0 : _postTranslation, warnHtmlMessage: _warnHtmlMessage, escapeParameter: _escapeParameter, messageResolver: options.messageResolver, messageCompiler: options.messageCompiler, __meta: { framework: "vue" } }; { ctxOptions.datetimeFormats = _datetimeFormats.value; ctxOptions.numberFormats = _numberFormats.value; ctxOptions.__datetimeFormatters = isPlainObject(_context) ? _context.__datetimeFormatters : void 0; ctxOptions.__numberFormatters = isPlainObject(_context) ? _context.__numberFormatters : void 0; } const ctx = createCoreContext(ctxOptions); _isGlobal && setFallbackContext(ctx); return ctx; }; _context = getCoreContext(); updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); function trackReactivityValues() { return [ _locale.value, _fallbackLocale.value, _messages.value, _datetimeFormats.value, _numberFormats.value ]; } const locale = computed({ get: () => _locale.value, set: (val) => { _locale.value = val; _context.locale = _locale.value; } }); const fallbackLocale = computed({ get: () => _fallbackLocale.value, set: (val) => { _fallbackLocale.value = val; _context.fallbackLocale = _fallbackLocale.value; updateFallbackLocale(_context, _locale.value, val); } }); const messages = computed(() => _messages.value); const datetimeFormats = /* @__PURE__ */ computed(() => _datetimeFormats.value); const numberFormats = /* @__PURE__ */ computed(() => _numberFormats.value); function getPostTranslationHandler() { return isFunction(_postTranslation) ? _postTranslation : null; } function setPostTranslationHandler(handler) { _postTranslation = handler; _context.postTranslation = handler; } function getMissingHandler() { return _missing; } function setMissingHandler(handler) { if (handler !== null) { _runtimeMissing = defineCoreMissingHandler(handler); } _missing = handler; _context.missing = _runtimeMissing; } const wrapWithDeps = (fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) => { trackReactivityValues(); let ret; try { if ("production" !== "production" || false) ; if (!_isGlobal) { _context.fallbackContext = __root ? getFallbackContext() : void 0; } ret = fn(_context); } finally { if (!_isGlobal) { _context.fallbackContext = void 0; } } if (warnType !== "translate exists" && // for not `te` (e.g `t`) isNumber(ret) && ret === NOT_REOSLVED || warnType === "translate exists" && !ret) { const [key, arg2] = argumentParser(); return __root && _fallbackRoot ? fallbackSuccess(__root) : fallbackFail(key); } else if (successCondition(ret)) { return ret; } else { throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE); } }; function t(...args) { return wrapWithDeps((context) => Reflect.apply(translate, null, [context, ...args]), () => parseTranslateArgs(...args), "translate", (root) => Reflect.apply(root.t, root, [...args]), (key) => key, (val) => isString(val)); } function rt(...args) { const [arg1, arg2, arg3] = args; if (arg3 && !isObject(arg3)) { throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT); } return t(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]); } function d(...args) { return wrapWithDeps((context) => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), "datetime format", (root) => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, (val) => isString(val)); } function n(...args) { return wrapWithDeps((context) => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), "number format", (root) => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, (val) => isString(val)); } function normalize(values) { return values.map((val) => isString(val) || isNumber(val) || isBoolean(val) ? createTextNode(String(val)) : val); } const interpolate = (val) => val; const processor = { normalize, interpolate, type: "vnode" }; function translateVNode(...args) { return wrapWithDeps( (context) => { let ret; const _context2 = context; try { _context2.processor = processor; ret = Reflect.apply(translate, null, [_context2, ...args]); } finally { _context2.processor = null; } return ret; }, () => parseTranslateArgs(...args), "translate", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[TranslateVNodeSymbol](...args), (key) => [createTextNode(key)], (val) => isArray(val) ); } function numberParts(...args) { return wrapWithDeps( (context) => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), "number format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, (val) => isString(val) || isArray(val) ); } function datetimeParts(...args) { return wrapWithDeps( (context) => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), "datetime format", // eslint-disable-next-line @typescript-eslint/no-explicit-any (root) => root[DatetimePartsSymbol](...args), NOOP_RETURN_ARRAY, (val) => isString(val) || isArray(val) ); } function setPluralRules(rules) { _pluralRules = rules; _context.pluralRules = _pluralRules; } function te(key, locale2) { return wrapWithDeps(() => { if (!key) { return false; } const targetLocale = isString(locale2) ? locale2 : _locale.value; const message = getLocaleMessage(targetLocale); const resolved = _context.messageResolver(message, key); return !translateExistCompatible ? isMessageAST(resolved) || isMessageFunction(resolved) || isString(resolved) : resolved != null; }, () => [key], "translate exists", (root) => { return Reflect.apply(root.te, root, [key, locale2]); }, NOOP_RETURN_FALSE, (val) => isBoolean(val)); } function resolveMessages(key) { let messages2 = null; const locales = fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value); for (let i = 0; i < locales.length; i++) { const targetLocaleMessages = _messages.value[locales[i]] || {}; const messageValue = _context.messageResolver(targetLocaleMessages, key); if (messageValue != null) { messages2 = messageValue; break; } } return messages2; } function tm(key) { const messages2 = resolveMessages(key); return messages2 != null ? messages2 : __root ? __root.tm(key) || {} : {}; } function getLocaleMessage(locale2) { return _messages.value[locale2] || {}; } function setLocaleMessage(locale2, message) { if (flatJson) { const _message = { [locale2]: message }; for (const key in _message) { if (hasOwn(_message, key)) { handleFlatJson(_message[key]); } } message = _message[locale2]; } _messages.value[locale2] = message; _context.messages = _messages.value; } function mergeLocaleMessage2(locale2, message) { _messages.value[locale2] = _messages.value[locale2] || {}; const _message = { [locale2]: message }; if (flatJson) { for (const key in _message) { if (hasOwn(_message, key)) { handleFlatJson(_message[key]); } } } message = _message[locale2]; deepCopy(message, _messages.value[locale2]); _context.messages = _messages.value; } function getDateTimeFormat(locale2) { return _datetimeFormats.value[locale2] || {}; } function setDateTimeFormat(locale2, format2) { _datetimeFormats.value[locale2] = format2; _context.datetimeFormats = _datetimeFormats.value; clearDateTimeFormat(_context, locale2, format2); } function mergeDateTimeFormat(locale2, format2) { _datetimeFormats.value[locale2] = assign(_datetimeFormats.value[locale2] || {}, format2); _context.datetimeFormats = _datetimeFormats.value; clearDateTimeFormat(_context, locale2, format2); } function getNumberFormat(locale2) { return _numberFormats.value[locale2] || {}; } function setNumberFormat(locale2, format2) { _numberFormats.value[locale2] = format2; _context.numberFormats = _numberFormats.value; clearNumberFormat(_context, locale2, format2); } function mergeNumberFormat(locale2, format2) { _numberFormats.value[locale2] = assign(_numberFormats.value[locale2] || {}, format2); _context.numberFormats = _numberFormats.value; clearNumberFormat(_context, locale2, format2); } composerID++; if (__root && inBrowser) { watch(__root.locale, (val) => { if (_inheritLocale) { _locale.value = val; _context.locale = val; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }); watch(__root.fallbackLocale, (val) => { if (_inheritLocale) { _fallbackLocale.value = val; _context.fallbackLocale = val; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }); } const composer = { id: composerID, locale, fallbackLocale, get inheritLocale() { return _inheritLocale; }, set inheritLocale(val) { _inheritLocale = val; if (val && __root) { _locale.value = __root.locale.value; _fallbackLocale.value = __root.fallbackLocale.value; updateFallbackLocale(_context, _locale.value, _fallbackLocale.value); } }, get availableLocales() { return Object.keys(_messages.value).sort(); }, messages, get modifiers() { return _modifiers; }, get pluralRules() { return _pluralRules || {}; }, get isGlobal() { return _isGlobal; }, get missingWarn() { return _missingWarn; }, set missingWarn(val) { _missingWarn = val; _context.missingWarn = _missingWarn; }, get fallbackWarn() { return _fallbackWarn; }, set fallbackWarn(val) { _fallbackWarn = val; _context.fallbackWarn = _fallbackWarn; }, get fallbackRoot() { return _fallbackRoot; }, set fallbackRoot(val) { _fallbackRoot = val; }, get fallbackFormat() { return _fallbackFormat; }, set fallbackFormat(val) { _fallbackFormat = val; _context.fallbackFormat = _fallbackFormat; }, get warnHtmlMessage() { return _warnHtmlMessage; }, set warnHtmlMessage(val) { _warnHtmlMessage = val; _context.warnHtmlMessage = val; }, get escapeParameter() { return _escapeParameter; }, set escapeParameter(val) { _escapeParameter = val; _context.escapeParameter = val; }, t, getLocaleMessage, setLocaleMessage, mergeLocaleMessage: mergeLocaleMessage2, getPostTranslationHandler, setPostTranslationHandler, getMissingHandler, setMissingHandler, [SetPluralRulesSymbol]: setPluralRules }; { composer.datetimeFormats = datetimeFormats; composer.numberFormats = numberFormats; composer.rt = rt; composer.te = te; composer.tm = tm; composer.d = d; composer.n = n; composer.getDateTimeFormat = getDateTimeFormat; composer.setDateTimeFormat = setDateTimeFormat; composer.mergeDateTimeFormat = mergeDateTimeFormat; composer.getNumberFormat = getNumberFormat; composer.setNumberFormat = setNumberFormat; composer.mergeNumberFormat = mergeNumberFormat; composer[InejctWithOptionSymbol] = __injectWithOption; composer[TranslateVNodeSymbol] = translateVNode; composer[DatetimePartsSymbol] = datetimeParts; composer[NumberPartsSymbol] = numberParts; } return composer; } const baseFormatProps = { tag: { type: [String, Object] }, locale: { type: String }, scope: { type: String, // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050 validator: (val) => val === "parent" || val === "global", default: "parent" /* ComponentI18nScope */ }, i18n: { type: Object } }; function getInterpolateArg({ slots }, keys) { if (keys.length === 1 && keys[0] === "default") { const ret = slots.default ? slots.default() : []; return ret.reduce((slot, current) => { return [ ...slot, // prettier-ignore ...current.type === Fragment ? current.children : [current] ]; }, []); } else { return keys.reduce((arg, key) => { const slot = slots[key]; if (slot) { arg[key] = slot(); } return arg; }, {}); } } function getFragmentableTag(tag) { return Fragment; } const TranslationImpl = /* @__PURE__ */ defineComponent({ /* eslint-disable */ name: "i18n-t", props: assign({ keypath: { type: String, required: true }, plural: { type: [Number, String], // eslint-disable-next-line @typescript-eslint/no-explicit-any validator: (val) => isNumber(val) || !isNaN(val) } }, baseFormatProps), /* eslint-enable */ // eslint-disable-next-line @typescript-eslint/no-explicit-any setup(props, context) { const { slots, attrs } = context; const i18n = props.i18n || useI18n({ useScope: props.scope, __useComponent: true }); return () => { const keys = Object.keys(slots).filter((key) => key !== "_"); const options = {}; if (props.locale) { options.locale = props.locale; } if (props.plural !== void 0) { options.plural = isString(props.plural) ? +props.plural : props.plural; } const arg = getInterpolateArg(context, keys); const children = i18n[TranslateVNodeSymbol](props.keypath, arg, options); const assignedAttrs = assign({}, attrs); const tag = isString(props.tag) || isObject(props.tag) ? props.tag : getFragmentableTag(); return h(tag, assignedAttrs, children); }; } }); const Translation = TranslationImpl; function isVNode(target) { return isArray(target) && !isString(target[0]); } function renderFormatter(props, context, slotKeys, partFormatter) { const { slots, attrs } = context; return () => { const options = { part: true }; let overrides = {}; if (props.locale) { options.locale = props.locale; } if (isString(props.format)) { options.key = props.format; } else if (isObject(props.format)) { if (isString(props.format.key)) { options.key = props.format.key; } overrides = Object.keys(props.format).reduce((options2, prop) => { return slotKeys.includes(prop) ? assign({}, options2, { [prop]: props.format[prop] }) : options2; }, {}); } const parts = partFormatter(...[props.value, options, overrides]); let children = [options.key]; if (isArray(parts)) { children = parts.map((part, index2) => { const slot = slots[part.type]; const node = slot ? slot({ [part.type]: part.value, index: index2, parts }) : [part.value]; if (isVNode(node)) { node[0].key = `${part.type}-${index2}`; } return node; }); } else if (isString(parts)) { children = [parts]; } const assignedAttrs = assign({}, attrs); const tag = isString(props.tag) || isObject(props.tag) ? props.tag : getFragmentableTag(); return h(tag, assignedAttrs, children); }; } const NumberFormatImpl = /* @__PURE__ */ defineComponent({ /* eslint-disable */ name: "i18n-n", props: assign({ value: { type: Number, required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ // eslint-disable-next-line @typescript-eslint/no-explicit-any setup(props, context) { const i18n = props.i18n || useI18n({ useScope: props.scope, __useComponent: true }); return renderFormatter(props, context, NUMBER_FORMAT_OPTIONS_KEYS, (...args) => ( // eslint-disable-next-line @typescript-eslint/no-explicit-any i18n[NumberPartsSymbol](...args) )); } }); const NumberFormat = NumberFormatImpl; const DatetimeFormatImpl = /* @__PURE__ */ defineComponent({ /* eslint-disable */ name: "i18n-d", props: assign({ value: { type: [Number, Date], required: true }, format: { type: [String, Object] } }, baseFormatProps), /* eslint-enable */ // eslint-disable-next-line @typescript-eslint/no-explicit-any setup(props, context) { const i18n = props.i18n || useI18n({ useScope: props.scope, __useComponent: true }); return renderFormatter(props, context, DATETIME_FORMAT_OPTIONS_KEYS, (...args) => ( // eslint-disable-next-line @typescript-eslint/no-explicit-any i18n[DatetimePartsSymbol](...args) )); } }); const DatetimeFormat = DatetimeFormatImpl; function getComposer$2(i18n, instance) { const i18nInternal = i18n; if (i18n.mode === "composition") { return i18nInternal.__getInstance(instance) || i18n.global; } else { const vueI18n = i18nInternal.__getInstance(instance); return vueI18n != null ? vueI18n.__composer : i18n.global.__composer; } } function vTDirective(i18n) { const _process = (binding) => { const { instance, modifiers, value } = binding; if (!instance || !instance.$) { throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR); } const composer = getComposer$2(i18n, instance.$); const parsedValue = parseValue(value); return [ Reflect.apply(composer.t, composer, [...makeParams(parsedValue)]), composer ]; }; const register = (el, binding) => { const [textContent, composer] = _process(binding); el.__composer = composer; el.textContent = textContent; }; const unregister = (el) => { if (el.__composer) { el.__composer = void 0; delete el.__composer; } }; const update = (el, { value }) => { if (el.__composer) { const composer = el.__composer; const parsedValue = parseValue(value); el.textContent = Reflect.apply(composer.t, composer, [ ...makeParams(parsedValue) ]); } }; const getSSRProps = (binding) => { const [textContent] = _process(binding); return { textContent }; }; return { created: register, unmounted: unregister, beforeUpdate: update, getSSRProps }; } function parseValue(value) { if (isString(value)) { return { path: value }; } else if (isPlainObject(value)) { if (!("path" in value)) { throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, "path"); } return value; } else { throw createI18nError(I18nErrorCodes.INVALID_VALUE); } } function makeParams(value) { const { path, locale, args, choice, plural } = value; const options = {}; const named = args || {}; if (isString(locale)) { options.locale = locale; } if (isNumber(choice)) { options.plural = choice; } if (isNumber(plural)) { options.plural = plural; } return [path, named, options]; } function apply(app, i18n, ...options) { const pluginOptions = isPlainObject(options[0]) ? options[0] : {}; const useI18nComponentName = !!pluginOptions.useI18nComponentName; const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true; if (globalInstall) { [!useI18nComponentName ? Translation.name : "i18n", "I18nT"].forEach((name) => app.component(name, Translation)); [NumberFormat.name, "I18nN"].forEach((name) => app.component(name, NumberFormat)); [DatetimeFormat.name, "I18nD"].forEach((name) => app.component(name, DatetimeFormat)); } { app.directive("t", vTDirective(i18n)); } } const I18nInjectionKey = /* @__PURE__ */ makeSymbol("global-vue-i18n"); function createI18n(options = {}, VueI18nLegacy) { const __globalInjection = isBoolean(options.globalInjection) ? options.globalInjection : true; const __allowComposition = true; const __instances = /* @__PURE__ */ new Map(); const [globalScope, __global] = createGlobal(options); const symbol = /* @__PURE__ */ makeSymbol(""); function __getInstance(component) { return __instances.get(component) || null; } function __setInstance(component, instance) { __instances.set(component, instance); } function __deleteInstance(component) { __instances.delete(component); } { const i18n = { // mode get mode() { return "composition"; }, // allowComposition get allowComposition() { return __allowComposition; }, // install plugin async install(app, ...options2) { app.__VUE_I18N_SYMBOL__ = symbol; app.provide(app.__VUE_I18N_SYMBOL__, i18n); if (isPlainObject(options2[0])) { const opts = options2[0]; i18n.__composerExtend = opts.__composerExtend; i18n.__vueI18nExtend = opts.__vueI18nExtend; } let globalReleaseHandler = null; if (__globalInjection) { globalReleaseHandler = injectGlobalFields(app, i18n.global); } { apply(app, i18n, ...options2); } const unmountApp = app.unmount; app.unmount = () => { globalReleaseHandler && globalReleaseHandler(); i18n.dispose(); unmountApp(); }; }, // global accessor get global() { return __global; }, dispose() { globalScope.stop(); }, // @internal __instances, // @internal __getInstance, // @internal __setInstance, // @internal __deleteInstance }; return i18n; } } function useI18n(options = {}) { const instance = getCurrentInstance(); if (instance == null) { throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP); } if (!instance.isCE && instance.appContext.app != null && !instance.appContext.app.__VUE_I18N_SYMBOL__) { throw createI18nError(I18nErrorCodes.NOT_INSTALLED); } const i18n = getI18nInstance(instance); const gl = getGlobalComposer(i18n); const componentOptions = getComponentOptions(instance); const scope = getScope(options, componentOptions); if (scope === "global") { adjustI18nResources(gl, options, componentOptions); return gl; } if (scope === "parent") { let composer2 = getComposer(i18n, instance, options.__useComponent); if (composer2 == null) { composer2 = gl; } return composer2; } const i18nInternal = i18n; let composer = i18nInternal.__getInstance(instance); if (composer == null) { const composerOptions = assign({}, options); if ("__i18n" in componentOptions) { composerOptions.__i18n = componentOptions.__i18n; } if (gl) { composerOptions.__root = gl; } composer = createComposer(composerOptions); if (i18nInternal.__composerExtend) { composer[DisposeSymbol] = i18nInternal.__composerExtend(composer); } i18nInternal.__setInstance(instance, composer); } return composer; } function createGlobal(options, legacyMode, VueI18nLegacy) { const scope = effectScope(); { const obj = scope.run(() => createComposer(options)); if (obj == null) { throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR); } return [scope, obj]; } } function getI18nInstance(instance) { { const i18n = inject(!instance.isCE ? instance.appContext.app.__VUE_I18N_SYMBOL__ : I18nInjectionKey); if (!i18n) { throw createI18nError(!instance.isCE ? I18nErrorCodes.UNEXPECTED_ERROR : I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE); } return i18n; } } function getScope(options, componentOptions) { return isEmptyObject(options) ? "__i18n" in componentOptions ? "local" : "global" : !options.useScope ? "local" : options.useScope; } function getGlobalComposer(i18n) { return i18n.mode === "composition" ? i18n.global : i18n.global.__composer; } function getComposer(i18n, target, useComponent = false) { let composer = null; const root = target.root; let current = getParentComponentInstance(target, useComponent); while (current != null) { const i18nInternal = i18n; if (i18n.mode === "composition") { composer = i18nInternal.__getInstance(current); } if (composer != null) { break; } if (root === current) { break; } current = current.parent; } return composer; } function getParentComponentInstance(target, useComponent = false) { if (target == null) { return null; } { return !useComponent ? target.parent : target.vnode.ctx || target.parent; } } const globalExportProps = [ "locale", "fallbackLocale", "availableLocales" ]; const globalExportMethods = ["t", "rt", "d", "n", "tm", "te"]; function injectGlobalFields(app, composer) { const i18n = /* @__PURE__ */ Object.create(null); globalExportProps.forEach((prop) => { const desc = Object.getOwnPropertyDescriptor(composer, prop); if (!desc) { throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR); } const wrap = isRef(desc.value) ? { get() { return desc.value.value; }, // eslint-disable-next-line @typescript-eslint/no-explicit-any set(val) { desc.value.value = val; } } : { get() { return desc.get && desc.get(); } }; Object.defineProperty(i18n, prop, wrap); }); app.config.globalProperties.$i18n = i18n; globalExportMethods.forEach((method) => { const desc = Object.getOwnPropertyDescriptor(composer, method); if (!desc || !desc.value) { throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR); } Object.defineProperty(app.config.globalProperties, `$${method}`, desc); }); const dispose = () => { delete app.config.globalProperties.$i18n; globalExportMethods.forEach((method) => { delete app.config.globalProperties[`$${method}`]; }); }; return dispose; } { registerMessageCompiler(compile); } registerMessageResolver(resolveValue); registerLocaleFallbacker(fallbackWithLocaleChain); function useLocaleHead({ addDirAttribute = false, addSeoAttributes = false, identifierAttribute = "hid" } = {}) { const common = initCommonComposableOptions(); const metaObject = ref({ htmlAttrs: {}, link: [], meta: [] }); function updateMeta() { metaObject.value = localeHead(common, { addDirAttribute, addSeoAttributes, identifierAttribute }); } { updateMeta(); } return metaObject; } function useLocalePath() { return wrapComposable(localePath); } function useSwitchLocalePath() { return wrapComposable(switchLocalePath); } const switch_locale_path_ssr_5csfIgkrBP = /* @__PURE__ */ defineNuxtPlugin({ name: "i18n:plugin:switch-locale-path-ssr", dependsOn: ["i18n:plugin"], setup(nuxt) { if (nuxt.$config.public.i18n.experimental.switchLocalePathLinkSSR !== true) return; const switchLocalePath2 = useSwitchLocalePath(); const switchLocalePathLinkWrapperExpr = new RegExp( [ `<!--${SWITCH_LOCALE_PATH_LINK_IDENTIFIER}-\\[(\\w+)\\]-->`, `.+?`, `<!--/${SWITCH_LOCALE_PATH_LINK_IDENTIFIER}-->` ].join(""), "g" ); nuxt.hook("app:rendered", (ctx) => { var _a; if (((_a = ctx.renderResult) == null ? void 0 : _a.html) == null) return; ctx.renderResult.html = ctx.renderResult.html.replaceAll( switchLocalePathLinkWrapperExpr, (match, p1) => match.replace(/href="([^"]+)"/, `href="${encodeURI(switchLocalePath2(p1 ?? ""))}"`) ); }); } }); function extendI18n(i18n, { locales = [], localeCodes: localeCodes2 = [], baseUrl = "", hooks = {}, context = {} } = {}) { const scope = effectScope(); const orgInstall = i18n.install; i18n.install = (vue, ...options) => { const pluginOptions = isPluginOptions(options[0]) ? assign({}, options[0]) : { inject: true }; if (pluginOptions.inject == null) { pluginOptions.inject = true; } const orgComposerExtend = pluginOptions.__composerExtend; pluginOptions.__composerExtend = (localComposer) => { const globalComposer2 = getComposer$3(i18n); localComposer.locales = computed(() => globalComposer2.locales.value); localComposer.localeCodes = computed(() => globalComposer2.localeCodes.value); localComposer.baseUrl = computed(() => globalComposer2.baseUrl.value); let orgComposerDispose; if (isFunction(orgComposerExtend)) { orgComposerDispose = Reflect.apply(orgComposerExtend, pluginOptions, [localComposer]); } return () => { orgComposerDispose && orgComposerDispose(); }; }; if (i18n.mode === "legacy") { const orgVueI18nExtend = pluginOptions.__vueI18nExtend; pluginOptions.__vueI18nExtend = (vueI18n) => { extendVueI18n(vueI18n, hooks.onExtendVueI18n); let orgVueI18nDispose; if (isFunction(orgVueI18nExtend)) { orgVueI18nDispose = Reflect.apply(orgVueI18nExtend, pluginOptions, [vueI18n]); } return () => { orgVueI18nDispose && orgVueI18nDispose(); }; }; } options[0] = pluginOptions; Reflect.apply(orgInstall, i18n, [vue, ...options]); const globalComposer = getComposer$3(i18n); scope.run(() => { extendComposer(globalComposer, { locales, localeCodes: localeCodes2, baseUrl, hooks, context }); if (i18n.mode === "legacy" && isVueI18n(i18n.global)) { extendVueI18n(i18n.global, hooks.onExtendVueI18n); } }); const app = vue; const exported = i18n.mode === "composition" ? app.config.globalProperties.$i18n : null; if (exported) { extendExportedGlobal(exported, globalComposer, hooks.onExtendExportedGlobal); } if (pluginOptions.inject) { const common = initCommonComposableOptions(i18n); vue.mixin({ methods: { getRouteBaseName: wrapComposable(getRouteBaseName, common), resolveRoute: wrapComposable(resolveRoute, common), localePath: wrapComposable(localePath, common), localeRoute: wrapComposable(localeRoute, common), localeLocation: wrapComposable(localeLocation, common), switchLocalePath: wrapComposable(switchLocalePath, common), localeHead: wrapComposable(localeHead, common) } }); } if (app.unmount) { const unmountApp = app.unmount; app.unmount = () => { scope.stop(); unmountApp(); }; } }; return scope; } function extendComposer(composer, options) { const { locales, localeCodes: localeCodes2, baseUrl, context } = options; const _locales = ref(locales); const _localeCodes = ref(localeCodes2); const _baseUrl = ref(""); composer.locales = computed(() => _locales.value); composer.localeCodes = computed(() => _localeCodes.value); composer.baseUrl = computed(() => _baseUrl.value); { _baseUrl.value = resolveBaseUrl(baseUrl, context); } if (options.hooks && options.hooks.onExtendComposer) { options.hooks.onExtendComposer(composer); } } function extendPropertyDescriptors(composer, exported, hook) { const properties = [ { locales: { get() { return composer.locales.value; } }, localeCodes: { get() { return composer.localeCodes.value; } }, baseUrl: { get() { return composer.baseUrl.value; } } } ]; hook && properties.push(hook(composer)); for (const property of properties) { for (const [key, descriptor] of Object.entries(property)) { Object.defineProperty(exported, key, descriptor); } } } function extendExportedGlobal(exported, g, hook) { extendPropertyDescriptors(g, exported, hook); } function extendVueI18n(vueI18n, hook) { const c = getComposer$3(vueI18n); extendPropertyDescriptors(c, vueI18n, hook); } function isPluginOptions(options) { return isObject(options) && ("inject" in options || "__composerExtend" in options || "__vueI18nExtend" in options); } const i18n_sq1MuCrqbC = /* @__PURE__ */ defineNuxtPlugin({ name: "i18n:plugin", parallel: parallelPlugin, async setup(nuxt) { let __temp, __restore; const route = useRoute(); const { vueApp: app } = nuxt; const nuxtContext = nuxt; const host = getHost(); const { configLocales, defaultLocale, multiDomainLocales, strategy } = nuxtContext.$config.public.i18n; const hasDefaultForDomains = configLocales.some( (l) => typeof l !== "string" && Array.isArray(l.defaultForDomains) ); let defaultLocaleDomain; if (defaultLocale) { defaultLocaleDomain = defaultLocale; } else if (hasDefaultForDomains) { const findDefaultLocale = configLocales.find( (l) => typeof l === "string" || !Array.isArray(l.defaultForDomains) ? false : l.defaultForDomains.includes(host ?? "") ); defaultLocaleDomain = (findDefaultLocale == null ? void 0 : findDefaultLocale.code) ?? ""; } else { defaultLocaleDomain = ""; } if (multiDomainLocales && (strategy === "prefix_except_default" || strategy === "prefix_and_default")) { const router = useRouter(); router.getRoutes().forEach((route2) => { var _a; if ((_a = route2.name) == null ? void 0 : _a.toString().includes("___default")) { const routeNameLocale = route2.name.toString().split("___")[1]; if (routeNameLocale !== defaultLocaleDomain) { router.removeRoute(route2.name); } else { const newRouteName = route2.name.toString().replace("___default", ""); route2.name = newRouteName; } } }); } const runtimeI18n = { ...nuxtContext.$config.public.i18n, defaultLocale: defaultLocaleDomain }; runtimeI18n.baseUrl = extendBaseUrl(); const _detectBrowserLanguage = runtimeDetectBrowserLanguage(); const vueI18nOptions = ([__temp, __restore] = executeAsync(() => loadVueI18nOptions(vueI18nConfigs, useNuxtApp())), __temp = await __temp, __restore(), __temp); vueI18nOptions.messages = vueI18nOptions.messages || {}; vueI18nOptions.fallbackLocale = vueI18nOptions.fallbackLocale ?? false; const getLocaleFromRoute = createLocaleFromRouteGetter(); const getDefaultLocale = (locale) => locale || vueI18nOptions.locale || "en-US"; const localeCookie = getI18nCookie(); let initialLocale = detectLocale( route, getLocaleFromRoute, getDefaultLocale(runtimeI18n.defaultLocale), { ssg: "normal", callType: "setup", firstAccess: true, localeCookie: getLocaleCookie(localeCookie, _detectBrowserLanguage, runtimeI18n.defaultLocale) }, runtimeI18n ); vueI18nOptions.messages = ([__temp, __restore] = executeAsync(() => loadInitialMessages(vueI18nOptions.messages, localeLoaders, { localeCodes, initialLocale, lazy: runtimeI18n.lazy, defaultLocale: runtimeI18n.defaultLocale, fallbackLocale: vueI18nOptions.fallbackLocale })), __temp = await __temp, __restore(), __temp); initialLocale = getDefaultLocale(initialLocale); const i18n = createI18n({ ...vueI18nOptions, locale: initialLocale }); let notInitialSetup = true; const isInitialLocaleSetup = (locale) => initialLocale !== locale && notInitialSetup; extendI18n(i18n, { locales: runtimeI18n.configLocales, localeCodes, baseUrl: runtimeI18n.baseUrl, context: nuxtContext, hooks: { onExtendComposer(composer) { composer.strategy = runtimeI18n.strategy; composer.localeProperties = computed( () => normalizedLocales.find((l) => l.code === composer.locale.value) || { code: composer.locale.value } ); composer.setLocale = async (locale) => { const localeSetup = isInitialLocaleSetup(locale); const modified = await loadAndSetLocale(locale, i18n, runtimeI18n, localeSetup); if (modified && localeSetup) { notInitialSetup = false; } const redirectPath = await nuxtContext.runWithContext( () => detectRedirect({ route: { to: route }, targetLocale: locale, routeLocaleGetter: getLocaleFromRoute }) ); await nuxtContext.runWithContext( async () => await navigate( { nuxtApp: nuxtContext, i18n, redirectPath, locale, route }, { enableNavigate: true } ) ); }; composer.loadLocaleMessages = async (locale) => { const setter = (locale2, message) => mergeLocaleMessage(i18n, locale2, message); await loadLocale(locale, localeLoaders, setter); }; composer.differentDomains = runtimeI18n.differentDomains; composer.defaultLocale = runtimeI18n.defaultLocale; composer.getBrowserLocale = () => getBrowserLocale(); composer.getLocaleCookie = () => getLocaleCookie(localeCookie, _detectBrowserLanguage, runtimeI18n.defaultLocale); composer.setLocaleCookie = (locale) => setLocaleCookie(localeCookie, locale, _detectBrowserLanguage); composer.onBeforeLanguageSwitch = (oldLocale, newLocale, initialSetup, context) => nuxt.callHook("i18n:beforeLocaleSwitch", { oldLocale, newLocale, initialSetup, context }); composer.onLanguageSwitched = (oldLocale, newLocale) => nuxt.callHook("i18n:localeSwitched", { oldLocale, newLocale }); composer.finalizePendingLocaleChange = async () => { if (!i18n.__pendingLocale) { return; } setLocale(i18n, i18n.__pendingLocale); if (i18n.__resolvePendingLocalePromise) { await i18n.__resolvePendingLocalePromise(); } i18n.__pendingLocale = void 0; }; composer.waitForPendingLocaleChange = async () => { if (i18n.__pendingLocale && i18n.__pendingLocalePromise) { await i18n.__pendingLocalePromise; } }; }, onExtendExportedGlobal(g) { return { strategy: { get() { return g.strategy; } }, localeProperties: { get() { return g.localeProperties.value; } }, setLocale: { get() { return async (locale) => Reflect.apply(g.setLocale, g, [locale]); } }, differentDomains: { get() { return g.differentDomains; } }, defaultLocale: { get() { return g.defaultLocale; } }, getBrowserLocale: { get() { return () => Reflect.apply(g.getBrowserLocale, g, []); } }, getLocaleCookie: { get() { return () => Reflect.apply(g.getLocaleCookie, g, []); } }, setLocaleCookie: { get() { return (locale) => Reflect.apply(g.setLocaleCookie, g, [locale]); } }, onBeforeLanguageSwitch: { get() { return (oldLocale, newLocale, initialSetup, context) => Reflect.apply(g.onBeforeLanguageSwitch, g, [oldLocale, newLocale, initialSetup, context]); } }, onLanguageSwitched: { get() { return (oldLocale, newLocale) => Reflect.apply(g.onLanguageSwitched, g, [oldLocale, newLocale]); } }, finalizePendingLocaleChange: { get() { return () => Reflect.apply(g.finalizePendingLocaleChange, g, []); } }, waitForPendingLocaleChange: { get() { return () => Reflect.apply(g.waitForPendingLocaleChange, g, []); } } }; }, onExtendVueI18n(composer) { return { strategy: { get() { return composer.strategy; } }, localeProperties: { get() { return composer.localeProperties.value; } }, setLocale: { get() { return async (locale) => Reflect.apply(composer.setLocale, composer, [locale]); } }, loadLocaleMessages: { get() { return async (locale) => Reflect.apply(composer.loadLocaleMessages, composer, [locale]); } }, differentDomains: { get() { return composer.differentDomains; } }, defaultLocale: { get() { return composer.defaultLocale; } }, getBrowserLocale: { get() { return () => Reflect.apply(composer.getBrowserLocale, composer, []); } }, getLocaleCookie: { get() { return () => Reflect.apply(composer.getLocaleCookie, composer, []); } }, setLocaleCookie: { get() { return (locale) => Reflect.apply(composer.setLocaleCookie, composer, [locale]); } }, onBeforeLanguageSwitch: { get() { return (oldLocale, newLocale, initialSetup, context) => Reflect.apply(composer.onBeforeLanguageSwitch, composer, [ oldLocale, newLocale, initialSetup, context ]); } }, onLanguageSwitched: { get() { return (oldLocale, newLocale) => Reflect.apply(composer.onLanguageSwitched, composer, [oldLocale, newLocale]); } }, finalizePendingLocaleChange: { get() { return () => Reflect.apply(composer.finalizePendingLocaleChange, composer, []); } }, waitForPendingLocaleChange: { get() { return () => Reflect.apply(composer.waitForPendingLocaleChange, composer, []); } } }; } } }); const pluginOptions = { __composerExtend: (c) => { const g = getComposer$3(i18n); c.strategy = g.strategy; c.localeProperties = computed(() => g.localeProperties.value); c.setLocale = g.setLocale; c.differentDomains = g.differentDomains; c.getBrowserLocale = g.getBrowserLocale; c.getLocaleCookie = g.getLocaleCookie; c.setLocaleCookie = g.setLocaleCookie; c.onBeforeLanguageSwitch = g.onBeforeLanguageSwitch; c.onLanguageSwitched = g.onLanguageSwitched; c.finalizePendingLocaleChange = g.finalizePendingLocaleChange; c.waitForPendingLocaleChange = g.waitForPendingLocaleChange; return () => { }; } }; app.use(i18n, pluginOptions); injectNuxtHelpers(nuxtContext, i18n); let routeChangeCount = 0; addRouteMiddleware( "locale-changing", /* @__PURE__ */ defineNuxtRouteMiddleware(async (to, from) => { let __temp2, __restore2; const locale = detectLocale( to, getLocaleFromRoute, () => { return getLocale$1(i18n) || getDefaultLocale(runtimeI18n.defaultLocale); }, { ssg: "normal", callType: "routing", firstAccess: routeChangeCount === 0, localeCookie: getLocaleCookie(localeCookie, _detectBrowserLanguage, runtimeI18n.defaultLocale) }, runtimeI18n ); const localeSetup = isInitialLocaleSetup(locale); const modified = ([__temp2, __restore2] = executeAsync(() => loadAndSetLocale(locale, i18n, runtimeI18n, localeSetup)), __temp2 = await __temp2, __restore2(), __temp2); if (modified && localeSetup) { notInitialSetup = false; } const redirectPath = ([__temp2, __restore2] = executeAsync(() => nuxtContext.runWithContext( () => detectRedirect({ route: { to, from }, targetLocale: locale, routeLocaleGetter: runtimeI18n.strategy === "no_prefix" ? () => locale : getLocaleFromRoute, calledWithRouting: true }) )), __temp2 = await __temp2, __restore2(), __temp2); routeChangeCount++; return [__temp2, __restore2] = executeAsync(() => nuxtContext.runWithContext( async () => navigate({ nuxtApp: nuxtContext, i18n, redirectPath, locale, route: to }) )), __temp2 = await __temp2, __restore2(), __temp2; }), { global: true } ); } }); const slidOverInjectionKey = Symbol("nuxt-ui.slideover"); function _useSlideover() { const slideoverState = inject(slidOverInjectionKey); const isOpen = ref(false); function open(component, props) { if (!slideoverState) { throw new Error("useSlideover() is called without provider"); } slideoverState.value = { component, props: props ?? {} }; isOpen.value = true; } async function close() { if (!slideoverState) return; isOpen.value = false; } function reset() { slideoverState.value = { component: "div", props: {} }; } function patch(props) { if (!slideoverState) return; slideoverState.value = { ...slideoverState.value, props: { ...slideoverState.value.props, ...props } }; } return { open, close, reset, patch, isOpen }; } createSharedComposable(_useSlideover); const slideovers_X7whXyrIWR = /* @__PURE__ */ defineNuxtPlugin((nuxtApp) => { const slideoverState = shallowRef({ component: "div", props: {} }); nuxtApp.vueApp.provide(slidOverInjectionKey, slideoverState); }); const modalInjectionKey = Symbol("nuxt-ui.modal"); function _useModal() { const modalState = inject(modalInjectionKey); const isOpen = ref(false); function open(component, props) { if (!modalState) { throw new Error("useModal() is called without provider"); } modalState.value = { component, props: props ?? {} }; isOpen.value = true; } async function close() { if (!modalState) return; isOpen.value = false; } function reset() { modalState.value = { component: "div", props: {} }; } function patch(props) { if (!modalState) return; modalState.value = { ...modalState.value, props: { ...modalState.value.props, ...props } }; } return { open, close, reset, patch, isOpen }; } createSharedComposable(_useModal); const modals_oqljskDzoR = /* @__PURE__ */ defineNuxtPlugin((nuxtApp) => { const modalState = shallowRef({ component: "div", props: {} }); nuxtApp.vueApp.provide(modalInjectionKey, modalState); }); function omit(object, keysToOmit) { const result = { ...object }; for (const key of keysToOmit) { delete result[key]; } return result; } function get(object, path, defaultValue) { if (typeof path === "string") { path = path.split(".").map((key) => { const numKey = Number(key); return isNaN(numKey) ? key : numKey; }); } let result = object; for (const key of path) { if (result === void 0 || result === null) { return defaultValue; } result = result[key]; } return result !== void 0 ? result : defaultValue; } const nuxtLinkProps = { to: { type: [String, Object], default: void 0, required: false }, href: { type: [String, Object], default: void 0, required: false }, // Attributes target: { type: String, default: void 0, required: false }, rel: { type: String, default: void 0, required: false }, noRel: { type: Boolean, default: void 0, required: false }, // Prefetching prefetch: { type: Boolean, default: void 0, required: false }, noPrefetch: { type: Boolean, default: void 0, required: false }, // Styling activeClass: { type: String, default: void 0, required: false }, exactActiveClass: { type: String, default: void 0, required: false }, prefetchedClass: { type: String, default: void 0, required: false }, // Vue Router's `<RouterLink>` additional props replace: { type: Boolean, default: void 0, required: false }, ariaCurrentValue: { type: String, default: void 0, required: false }, // Edge cases handling external: { type: Boolean, default: void 0, required: false } }; const getNuxtLinkProps = (props) => { const keys = Object.keys(nuxtLinkProps); return keys.reduce((acc, key) => { if (props[key] !== void 0) { acc[key] = props[key]; } return acc; }, {}); }; const customTwMerge = extendTailwindMerge({ extend: { classGroups: { icons: [(classPart) => /^i-/.test(classPart)] } } }); const defuTwMerge = createDefu((obj, key, value, namespace) => { if (namespace === "default" || namespace.startsWith("default.")) { return false; } if (namespace === "popper" || namespace.startsWith("popper.")) { return false; } if (namespace.endsWith("avatar") && key === "size") { return false; } if (namespace.endsWith("chip") && key === "size") { return false; } if (namespace.endsWith("badge") && key === "size" || key === "color" || key === "variant") { return false; } if (typeof obj[key] === "string" && typeof value === "string" && obj[key] && value) { obj[key] = customTwMerge(obj[key], value); return true; } }); function mergeConfig(strategy, ...configs) { if (strategy === "override") { return defu({}, ...configs); } return defuTwMerge({}, ...configs); } function hexToRgb(hex) { const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; hex = hex.replace(shorthandRegex, function(_, r, g, b) { return r + r + g + g + b + b; }); const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return result ? `${parseInt(result[1], 16)} ${parseInt(result[2], 16)} ${parseInt(result[3], 16)}` : null; } function looseToNumber(val) { const n = parseFloat(val); return isNaN(n) ? val : n; } const _inherit = "inherit"; const _current = "currentColor"; const _transparent = "transparent"; const _black = "#000"; const _white = "#fff"; const _slate = { "50": "#f8fafc", "100": "#f1f5f9", "200": "#e2e8f0", "300": "#cbd5e1", "400": "#94a3b8", "500": "#64748b", "600": "#475569", "700": "#334155", "800": "#1e293b", "900": "#0f172a", "950": "#020617" }; const _gray = { "50": "rgb(var(--color-gray-50) / <alpha-value>)", "100": "rgb(var(--color-gray-100) / <alpha-value>)", "200": "rgb(var(--color-gray-200) / <alpha-value>)", "300": "rgb(var(--color-gray-300) / <alpha-value>)", "400": "rgb(var(--color-gray-400) / <alpha-value>)", "500": "rgb(var(--color-gray-500) / <alpha-value>)", "600": "rgb(var(--color-gray-600) / <alpha-value>)", "700": "rgb(var(--color-gray-700) / <alpha-value>)", "800": "rgb(var(--color-gray-800) / <alpha-value>)", "900": "rgb(var(--color-gray-900) / <alpha-value>)", "950": "rgb(var(--color-gray-950) / <alpha-value>)" }; const _zinc = { "50": "#fafafa", "100": "#f4f4f5", "200": "#e4e4e7", "300": "#d4d4d8", "400": "#a1a1aa", "500": "#71717a", "600": "#52525b", "700": "#3f3f46", "800": "#27272a", "900": "#18181b", "950": "#09090b" }; const _neutral = { "50": "#fafafa", "100": "#f5f5f5", "200": "#e5e5e5", "300": "#d4d4d4", "400": "#a3a3a3", "500": "#737373", "600": "#525252", "700": "#404040", "800": "#262626", "900": "#171717", "950": "#0a0a0a" }; const _stone = { "50": "#fafaf9", "100": "#f5f5f4", "200": "#e7e5e4", "300": "#d6d3d1", "400": "#a8a29e", "500": "#78716c", "600": "#57534e", "700": "#44403c", "800": "#292524", "900": "#1c1917", "950": "#0c0a09" }; const _red = { "50": "#fef2f2", "100": "#fee2e2", "200": "#fecaca", "300": "#fca5a5", "400": "#f87171", "500": "#ef4444", "600": "#dc2626", "700": "#b91c1c", "800": "#991b1b", "900": "#7f1d1d", "950": "#450a0a" }; const _orange = { "50": "#fff7ed", "100": "#ffedd5", "200": "#fed7aa", "300": "#fdba74", "400": "#fb923c", "500": "#f97316", "600": "#ea580c", "700": "#c2410c", "800": "#9a3412", "900": "#7c2d12", "950": "#431407" }; const _amber = { "50": "#fffbeb", "100": "#fef3c7", "200": "#fde68a", "300": "#fcd34d", "400": "#fbbf24", "500": "#f59e0b", "600": "#d97706", "700": "#b45309", "800": "#92400e", "900": "#78350f", "950": "#451a03" }; const _yellow = { "50": "#fefce8", "100": "#fef9c3", "200": "#fef08a", "300": "#fde047", "400": "#facc15", "500": "#eab308", "600": "#ca8a04", "700": "#a16207", "800": "#854d0e", "900": "#713f12", "950": "#422006" }; const _lime = { "50": "#f7fee7", "100": "#ecfccb", "200": "#d9f99d", "300": "#bef264", "400": "#a3e635", "500": "#84cc16", "600": "#65a30d", "700": "#4d7c0f", "800": "#3f6212", "900": "#365314", "950": "#1a2e05" }; const _green = { "50": "#f0fdf4", "100": "#dcfce7", "200": "#bbf7d0", "300": "#86efac", "400": "#4ade80", "500": "#22c55e", "600": "#16a34a", "700": "#15803d", "800": "#166534", "900": "#14532d", "950": "#052e16" }; const _emerald = { "50": "#ecfdf5", "100": "#d1fae5", "200": "#a7f3d0", "300": "#6ee7b7", "400": "#34d399", "500": "#10b981", "600": "#059669", "700": "#047857", "800": "#065f46", "900": "#064e3b", "950": "#022c22" }; const _teal = { "50": "#f0fdfa", "100": "#ccfbf1", "200": "#99f6e4", "300": "#5eead4", "400": "#2dd4bf", "500": "#14b8a6", "600": "#0d9488", "700": "#0f766e", "800": "#115e59", "900": "#134e4a", "950": "#042f2e" }; const _cyan = { "50": "#ecfeff", "100": "#cffafe", "200": "#a5f3fc", "300": "#67e8f9", "400": "#22d3ee", "500": "#06b6d4", "600": "#0891b2", "700": "#0e7490", "800": "#155e75", "900": "#164e63", "950": "#083344" }; const _sky = { "50": "#f0f9ff", "100": "#e0f2fe", "200": "#bae6fd", "300": "#7dd3fc", "400": "#38bdf8", "500": "#0ea5e9", "600": "#0284c7", "700": "#0369a1", "800": "#075985", "900": "#0c4a6e", "950": "#082f49" }; const _blue = { "50": "#eff6ff", "100": "#dbeafe", "200": "#bfdbfe", "300": "#93c5fd", "400": "#60a5fa", "500": "#3b82f6", "600": "#2563eb", "700": "#1d4ed8", "800": "#1e40af", "900": "#1e3a8a", "950": "#172554" }; const _indigo = { "50": "#eef2ff", "100": "#e0e7ff", "200": "#c7d2fe", "300": "#a5b4fc", "400": "#818cf8", "500": "#6366f1", "600": "#4f46e5", "700": "#4338ca", "800": "#3730a3", "900": "#312e81", "950": "#1e1b4b" }; const _violet = { "50": "#f5f3ff", "100": "#ede9fe", "200": "#ddd6fe", "300": "#c4b5fd", "400": "#a78bfa", "500": "#8b5cf6", "600": "#7c3aed", "700": "#6d28d9", "800": "#5b21b6", "900": "#4c1d95", "950": "#2e1065" }; const _purple = { "50": "#faf5ff", "100": "#f3e8ff", "200": "#e9d5ff", "300": "#d8b4fe", "400": "#c084fc", "500": "#a855f7", "600": "#9333ea", "700": "#7e22ce", "800": "#6b21a8", "900": "#581c87", "950": "#3b0764" }; const _fuchsia = { "50": "#fdf4ff", "100": "#fae8ff", "200": "#f5d0fe", "300": "#f0abfc", "400": "#e879f9", "500": "#d946ef", "600": "#c026d3", "700": "#a21caf", "800": "#86198f", "900": "#701a75", "950": "#4a044e" }; const _pink = { "50": "#fdf2f8", "100": "#fce7f3", "200": "#fbcfe8", "300": "#f9a8d4", "400": "#f472b6", "500": "#ec4899", "600": "#db2777", "700": "#be185d", "800": "#9d174d", "900": "#831843", "950": "#500724" }; const _rose = { "50": "#fff1f2", "100": "#ffe4e6", "200": "#fecdd3", "300": "#fda4af", "400": "#fb7185", "500": "#f43f5e", "600": "#e11d48", "700": "#be123c", "800": "#9f1239", "900": "#881337", "950": "#4c0519" }; const _main = { "600": "#ff6232", "700": "#ff5722" }; const _primary = { "50": "rgb(var(--color-primary-50) / <alpha-value>)", "100": "rgb(var(--color-primary-100) / <alpha-value>)", "200": "rgb(var(--color-primary-200) / <alpha-value>)", "300": "rgb(var(--color-primary-300) / <alpha-value>)", "400": "rgb(var(--color-primary-400) / <alpha-value>)", "500": "rgb(var(--color-primary-500) / <alpha-value>)", "600": "rgb(var(--color-primary-600) / <alpha-value>)", "700": "rgb(var(--color-primary-700) / <alpha-value>)", "800": "rgb(var(--color-primary-800) / <alpha-value>)", "900": "rgb(var(--color-primary-900) / <alpha-value>)", "950": "rgb(var(--color-primary-950) / <alpha-value>)", "DEFAULT": "rgb(var(--color-primary-DEFAULT) / <alpha-value>)" }; const _cool = { "50": "#f9fafb", "100": "#f3f4f6", "200": "#e5e7eb", "300": "#d1d5db", "400": "#9ca3af", "500": "#6b7280", "600": "#4b5563", "700": "#374151", "800": "#1f2937", "900": "#111827", "950": "#030712" }; const config$4 = { "inherit": _inherit, "current": _current, "transparent": _transparent, "black": _black, "white": _white, "slate": _slate, "gray": _gray, "zinc": _zinc, "neutral": _neutral, "stone": _stone, "red": _red, "orange": _orange, "amber": _amber, "yellow": _yellow, "lime": _lime, "green": _green, "emerald": _emerald, "teal": _teal, "cyan": _cyan, "sky": _sky, "blue": _blue, "indigo": _indigo, "violet": _violet, "purple": _purple, "fuchsia": _fuchsia, "pink": _pink, "rose": _rose, "main": _main, "primary": _primary, "cool": _cool }; const colors_ETtiVmZNmO = /* @__PURE__ */ defineNuxtPlugin(() => { const appConfig2 = useAppConfig(); useNuxtApp(); const root = computed(() => { const primary = get(config$4, appConfig2.ui.primary); const gray = get(config$4, appConfig2.ui.gray); if (!primary) { console.warn(`[@nuxt/ui] Primary color '${appConfig2.ui.primary}' not found in Tailwind config`); } if (!gray) { console.warn(`[@nuxt/ui] Gray color '${appConfig2.ui.gray}' not found in Tailwind config`); } return `:root { ${Object.entries(primary || config$4.green).map(([key, value]) => `--color-primary-${key}: ${hexToRgb(value)};`).join("\n")} --color-primary-DEFAULT: var(--color-primary-500); ${Object.entries(gray || config$4.cool).map(([key, value]) => `--color-gray-${key}: ${hexToRgb(value)};`).join("\n")} } .dark { --color-primary-DEFAULT: var(--color-primary-400); } `; }); const headData = { style: [{ innerHTML: () => root.value, tagPriority: -2, id: "nuxt-ui-colors" }] }; useHead(headData); }); const preference = "light"; const plugin_server_ano7jnMEqi = /* @__PURE__ */ defineNuxtPlugin((nuxtApp) => { var _a; const colorMode = ((_a = nuxtApp.ssrContext) == null ? void 0 : _a.islandContext) ? ref({}) : useState("color-mode", () => reactive({ preference, value: preference, unknown: true, forced: false })).value; const htmlAttrs = {}; { useHead({ htmlAttrs }); } useRouter().afterEach((to) => { const forcedColorMode = to.meta.colorMode; if (forcedColorMode && forcedColorMode !== "system") { colorMode.value = htmlAttrs["data-color-mode-forced"] = forcedColorMode; colorMode.forced = true; } else if (forcedColorMode === "system") { console.warn("You cannot force the colorMode to system at the page level."); } }); nuxtApp.provide("colorMode", colorMode); }); const plugin_WLsn00x1qh = /* @__PURE__ */ defineNuxtPlugin({ name: "@nuxt/icon", setup() { var _a, _b; const config2 = /* @__PURE__ */ useRuntimeConfig(); const options = useAppConfig().icon; _api.setFetch($fetch.native); disableCache("all"); const resources = []; if (options.provider === "server") { const baseURL2 = ((_b = (_a = config2.app) == null ? void 0 : _a.baseURL) == null ? void 0 : _b.replace(/\/$/, "")) ?? ""; resources.push(baseURL2 + (options.localApiEndpoint || "/api/_nuxt_icon")); if (options.fallbackToApi) { resources.push(options.iconifyApiEndpoint); } } else { resources.push(options.iconifyApiEndpoint); } addAPIProvider("", { resources }); } }); function useToast() { const notifications2 = useState("notifications", () => []); function add(notification2) { const body = { id: (/* @__PURE__ */ new Date()).getTime().toString(), ...notification2 }; const index2 = notifications2.value.findIndex((n) => n.id === body.id); if (index2 === -1) { notifications2.value.push(body); } return body; } function remove(id) { notifications2.value = notifications2.value.filter((n) => n.id !== id); } function update(id, notification2) { const index2 = notifications2.value.findIndex((n) => n.id === id); if (index2 !== -1) { const previous = notifications2.value[index2]; notifications2.value.splice(index2, 1, { ...previous, ...notification2 }); } } function clear() { notifications2.value = []; } return { add, remove, update, clear }; } const api_GFfDXud5Cr = /* @__PURE__ */ defineNuxtPlugin((nuxtApp) => { const token = useCookie("token"); const toast = useToast(); const localePath2 = useLocalePath(); const api = $fetch.create({ onRequest({ request, options, error }) { if (token.value) { const headers = options.headers || (options.headers = {}); if (Array.isArray(headers)) { headers.push(["Authorization", `Bearer ${token.value}`]); } else if (headers instanceof Headers) { headers.set("Authorization", `Bearer ${token.value}`); } else { headers.Authorization = `Bearer ${token.value}`; } } }, async onResponseError({ response, options }) { if (response.status == 401) { navigateTo(localePath2("/login")); } if (response.status == 403) { navigateTo(localePath2("/payment")); } else if (response.status === 422) { toast.add({ title: response.status + " : " + response._data.message, color: "red" }); } } }); return { provide: { api } }; }); const plugins = [ unhead_KgADcZ0jPj, plugin$1, revive_payload_server_eJ33V7gbc6, plugin, components_plugin_KR1HBZs4kY, switch_locale_path_ssr_5csfIgkrBP, i18n_sq1MuCrqbC, slideovers_X7whXyrIWR, modals_oqljskDzoR, colors_ETtiVmZNmO, plugin_server_ano7jnMEqi, plugin_WLsn00x1qh, api_GFfDXud5Cr ]; const pwaInfo = { "pwaInDevEnvironment": false, "webManifest": { "href": "/manifest.webmanifest", "useCredentials": false, "linkTag": '<link rel="manifest" href="/manifest.webmanifest">' } }; const __nuxt_component_0$2 = defineComponent({ async setup() { if (pwaInfo) { const meta = ref({ link: [] }); useHead(meta); const { webManifest } = pwaInfo; if (webManifest) { const { href, useCredentials } = webManifest; if (useCredentials) { meta.value.link.push({ rel: "manifest", href, crossorigin: "use-credentials" }); } else { meta.value.link.push({ rel: "manifest", href }); } } } return () => null; } }); function defaultEstimatedProgress(duration, elapsed) { const completionPercentage = elapsed / duration * 100; return 2 / Math.PI * 100 * Math.atan(completionPercentage / 50); } function createLoadingIndicator(opts = {}) { const { duration = 2e3, throttle = 200, hideDelay = 500, resetDelay = 400 } = opts; opts.estimatedProgress || defaultEstimatedProgress; const nuxtApp = useNuxtApp(); const progress = ref(0); const isLoading = ref(false); const error = ref(false); const start = () => { error.value = false; set2(0); }; function set2(at = 0) { if (nuxtApp.isHydrating) { return; } if (at >= 100) { return finish(); } progress.value = at < 0 ? 0 : at; if (throttle && false) { setTimeout(() => { isLoading.value = true; }, throttle); } else { isLoading.value = true; } } function finish(opts2 = {}) { progress.value = 100; if (opts2.error) { error.value = true; } if (opts2.force) { progress.value = 0; isLoading.value = false; } } function clear() { } let _cleanup = () => { }; return { _cleanup, progress: computed(() => progress.value), isLoading: computed(() => isLoading.value), error: computed(() => error.value), start, set: set2, finish, clear }; } function useLoadingIndicator(opts = {}) { const nuxtApp = useNuxtApp(); const indicator = nuxtApp._loadingIndicator = nuxtApp._loadingIndicator || createLoadingIndicator(opts); return indicator; } const __nuxt_component_1$1 = defineComponent({ name: "NuxtLoadingIndicator", props: { throttle: { type: Number, default: 200 }, duration: { type: Number, default: 2e3 }, height: { type: Number, default: 3 }, color: { type: [String, Boolean], default: "repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)" }, errorColor: { type: String, default: "repeating-linear-gradient(to right,#f87171 0%,#ef4444 100%)" }, estimatedProgress: { type: Function, required: false } }, setup(props, { slots, expose }) { const { progress, isLoading, error, start, finish, clear } = useLoadingIndicator({ duration: props.duration, throttle: props.throttle, estimatedProgress: props.estimatedProgress }); expose({ progress, isLoading, error, start, finish, clear }); return () => h("div", { class: "nuxt-loading-indicator", style: { position: "fixed", top: 0, right: 0, left: 0, pointerEvents: "none", width: "auto", height: `${props.height}px`, opacity: isLoading.value ? 1 : 0, background: error.value ? props.errorColor : props.color || void 0, backgroundSize: `${100 / progress.value * 100}% auto`, transform: `scaleX(${progress.value}%)`, transformOrigin: "left", transition: "transform 0.1s, height 0.4s, opacity 0.4s", zIndex: 999999 } }, slots); } }); const layouts = { "auth-login": () => import('./auth-login-GZw-0Dku.mjs').then((m) => m.default || m), auth: () => import('./auth-CFkUOwQU.mjs').then((m) => m.default || m), default: () => import('./default-BJ7_KlnX.mjs').then((m) => m.default || m), "with-out-footer": () => import('./withOutFooter-BNO_rQ4d.mjs').then((m) => m.default || m) }; const LayoutLoader = defineComponent({ name: "LayoutLoader", inheritAttrs: false, props: { name: String, layoutProps: Object }, async setup(props, context) { const LayoutComponent = await layouts[props.name]().then((r) => r.default || r); return () => h(LayoutComponent, props.layoutProps, context.slots); } }); const __nuxt_component_2$2 = defineComponent({ name: "NuxtLayout", inheritAttrs: false, props: { name: { type: [String, Boolean, Object], default: null }, fallback: { type: [String, Object], default: null } }, setup(props, context) { const nuxtApp = useNuxtApp(); const injectedRoute = inject(PageRouteSymbol); const route = injectedRoute === useRoute() ? useRoute$1() : injectedRoute; const layout = computed(() => { let layout2 = unref(props.name) ?? route.meta.layout ?? "default"; if (layout2 && !(layout2 in layouts)) { if (props.fallback) { layout2 = unref(props.fallback); } } return layout2; }); const layoutRef = ref(); context.expose({ layoutRef }); const done = nuxtApp.deferHydration(); return () => { const hasLayout = layout.value && layout.value in layouts; const transitionProps = route.meta.layoutTransition ?? appLayoutTransition; return _wrapIf(Transition, hasLayout && transitionProps, { default: () => h(Suspense, { suspensible: true, onResolve: () => { nextTick(done); } }, { default: () => h( LayoutProvider, { layoutProps: mergeProps(context.attrs, { ref: layoutRef }), key: layout.value || void 0, name: layout.value, shouldProvide: !props.name, hasTransition: !!transitionProps }, context.slots ) }) }).default(); }; } }); const LayoutProvider = defineComponent({ name: "NuxtLayoutProvider", inheritAttrs: false, props: { name: { type: [String, Boolean] }, layoutProps: { type: Object }, hasTransition: { type: Boolean }, shouldProvide: { type: Boolean } }, setup(props, context) { const name = props.name; if (props.shouldProvide) { provide(LayoutMetaSymbol, { isCurrent: (route) => name === (route.meta.layout ?? "default") }); } return () => { var _a, _b; if (!name || typeof name === "string" && !(name in layouts)) { return (_b = (_a = context.slots).default) == null ? void 0 : _b.call(_a); } return h( LayoutLoader, { key: name, layoutProps: props.layoutProps, name }, context.slots ); }; } }); const RouteProvider = defineComponent({ props: { vnode: { type: Object, required: true }, route: { type: Object, required: true }, vnodeRef: Object, renderKey: String, trackRootNodes: Boolean }, setup(props) { const previousKey = props.renderKey; const previousRoute = props.route; const route = {}; for (const key in props.route) { Object.defineProperty(route, key, { get: () => previousKey === props.renderKey ? props.route[key] : previousRoute[key] }); } provide(PageRouteSymbol, shallowReactive(route)); return () => { return h(props.vnode, { ref: props.vnodeRef }); }; } }); const __nuxt_component_3 = defineComponent({ name: "NuxtPage", inheritAttrs: false, props: { name: { type: String }, transition: { type: [Boolean, Object], default: void 0 }, keepalive: { type: [Boolean, Object], default: void 0 }, route: { type: Object }, pageKey: { type: [Function, String], default: null } }, setup(props, { attrs, slots, expose }) { const nuxtApp = useNuxtApp(); const pageRef = ref(); const forkRoute = inject(PageRouteSymbol, null); let previousPageKey; expose({ pageRef }); inject(LayoutMetaSymbol, null); let vnode; const done = nuxtApp.deferHydration(); if (props.pageKey) { watch(() => props.pageKey, (next, prev) => { if (next !== prev) { nuxtApp.callHook("page:loading:start"); } }); } return () => { return h(RouterView, { name: props.name, route: props.route, ...attrs }, { default: (routeProps) => { if (!routeProps.Component) { done(); return; } const key = generateRouteKey$1(routeProps, props.pageKey); if (!nuxtApp.isHydrating && !hasChildrenRoutes(forkRoute, routeProps.route, routeProps.Component) && previousPageKey === key) { nuxtApp.callHook("page:loading:end"); } previousPageKey = key; const hasTransition = !!(props.transition ?? routeProps.route.meta.pageTransition ?? appPageTransition); const transitionProps = hasTransition && _mergeTransitionProps([ props.transition, routeProps.route.meta.pageTransition, appPageTransition, { onAfterLeave: () => { nuxtApp.callHook("page:transition:finish", routeProps.Component); } } ].filter(Boolean)); const keepaliveConfig = props.keepalive ?? routeProps.route.meta.keepalive ?? appKeepalive; vnode = _wrapIf( Transition, hasTransition && transitionProps, wrapInKeepAlive( keepaliveConfig, h(Suspense, { suspensible: true, onPending: () => nuxtApp.callHook("page:start", routeProps.Component), onResolve: () => { nextTick(() => nuxtApp.callHook("page:finish", routeProps.Component).then(() => nuxtApp.callHook("page:loading:end")).finally(done)); } }, { default: () => { const providerVNode = h(RouteProvider, { key: key || void 0, vnode: slots.default ? h(Fragment, void 0, slots.default(routeProps)) : routeProps.Component, route: routeProps.route, renderKey: key || void 0, trackRootNodes: hasTransition, vnodeRef: pageRef }); return providerVNode; } }) ) ).default(); return vnode; } }); }; } }); function _mergeTransitionProps(routeProps) { const _props = routeProps.map((prop) => ({ ...prop, onAfterLeave: prop.onAfterLeave ? toArray(prop.onAfterLeave) : void 0 })); return defu(..._props); } function hasChildrenRoutes(fork, newRoute, Component) { if (!fork) { return false; } const index2 = newRoute.matched.findIndex((m) => { var _a; return ((_a = m.components) == null ? void 0 : _a.default) === (Component == null ? void 0 : Component.type); }); return index2 < newRoute.matched.length - 1; } async function loadIcon(name, timeout) { if (!name) return null; const _icon = getIcon(name); if (_icon) return _icon; const load = new Promise((resolve2) => loadIcons([name], () => resolve2())).catch(() => null); if (timeout > 0) await Promise.race([load, new Promise((resolve2) => setTimeout(() => resolve2(), timeout))]); else await load; return getIcon(name); } function useResolvedName(getName) { const options = useAppConfig().icon; const collections = (options.collections || []).sort((a, b) => b.length - a.length); return computed(() => { var _a; const name = getName(); const bare = name.startsWith(options.cssSelectorPrefix) ? name.slice(options.cssSelectorPrefix.length) : name; const resolved = ((_a = options.aliases) == null ? void 0 : _a[bare]) || bare; if (!resolved.includes(":")) { const collection = collections.find((c) => resolved.startsWith(c + "-")); return collection ? collection + ":" + resolved.slice(collection.length + 1) : resolved; } return resolved; }); } const SYMBOL_SERVER_CSS = "NUXT_ICONS_SERVER_CSS"; function escapeCssSelector(selector) { return selector.replace(/([^\w-])/g, "\\$1"); } const NuxtIconCss = /* @__PURE__ */ defineComponent({ name: "NuxtIconCss", props: { name: { type: String, required: true }, customize: { type: Function, required: false } }, setup(props) { var _a; const nuxt = useNuxtApp(); const options = useAppConfig().icon; const cssClass = computed(() => props.name ? options.cssSelectorPrefix + props.name : ""); const selector = computed(() => "." + escapeCssSelector(cssClass.value)); function getCSS(icon, withLayer = true) { let iconSelector = selector.value; if (options.cssWherePseudo) { iconSelector = `:where(${iconSelector})`; } const css = getIconCSS(icon, { iconSelector, format: "compressed", customise: props.customize }); if (options.cssLayer && withLayer) { return `@layer ${options.cssLayer} { ${css} }`; } return css; } { const configs = (/* @__PURE__ */ useRuntimeConfig()).icon || {}; if (!((_a = configs == null ? void 0 : configs.serverKnownCssClasses) == null ? void 0 : _a.includes(cssClass.value))) { onServerPrefetch(async () => { const icon = await loadIcon(props.name, options.fetchTimeout).catch(() => null); if (!icon) return null; let ssrCSS = nuxt.vueApp._context.provides[SYMBOL_SERVER_CSS]; if (!ssrCSS) { ssrCSS = nuxt.vueApp._context.provides[SYMBOL_SERVER_CSS] = /* @__PURE__ */ new Map(); nuxt.runWithContext(() => { useHead({ style: [ () => { const sep = ""; let css = Array.from(ssrCSS.values()).sort().join(sep); if (options.cssLayer) { css = `@layer ${options.cssLayer} {${sep}${css}${sep}}`; } return { innerHTML: css }; } ] }, { tagPriority: "low" }); }); } if (props.name && !ssrCSS.has(props.name)) { const css = getCSS(icon, false); ssrCSS.set(props.name, css); } return null; }); } } return () => h("span", { class: ["iconify", cssClass.value, options.class] }); } }); const NuxtIconSvg = /* @__PURE__ */ defineComponent({ name: "NuxtIconSvg", props: { name: { type: String, required: true }, customize: { type: Function, required: false } }, async setup(props, { slots }) { useNuxtApp(); const options = useAppConfig().icon; const name = useResolvedName(() => props.name); const storeKey = "i-" + name.value; if (name.value) { { useAsyncData( storeKey, () => loadIcon(name.value, options.fetchTimeout), { deep: false } ); } } return () => h(Icon, { icon: name.value, ssr: true, class: options.class, // Iconify uses `customise`, where we expose `customize` for consistency customise: props.customize }, slots); } }); const __nuxt_component_0$1 = defineComponent({ name: "NuxtIcon", props: { name: { type: String, required: true }, mode: { type: String, required: false, default: null }, size: { type: [Number, String], required: false, default: null }, customize: { type: Function, required: false } }, async setup(props, { slots }) { const nuxtApp = useNuxtApp(); const runtimeOptions = useAppConfig().icon; const name = useResolvedName(() => props.name); const component = computed( () => { var _a; return ((_a = nuxtApp.vueApp) == null ? void 0 : _a.component(name.value)) || ((props.mode || runtimeOptions.mode) === "svg" ? NuxtIconSvg : NuxtIconCss); } ); const style = computed(() => { const size = props.size || runtimeOptions.size; return size ? { fontSize: Number.isNaN(+size) ? size : size + "px" } : null; }); const customize = props.customize || runtimeOptions.customize; return () => h( component.value, { ...runtimeOptions.attrs, name: name.value, class: runtimeOptions.class, style: style.value, customize }, slots ); } }); const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __nuxt_component_0$1 }, Symbol.toStringTag, { value: "Module" })); const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const _sfc_main$8 = defineComponent({ props: { name: { type: String, required: true }, mode: { type: String, required: false, default: null }, size: { type: [Number, String], required: false, default: null }, customize: { type: Function, required: false, default: null } } }); function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { const _component_Icon = __nuxt_component_0$1; _push(ssrRenderComponent(_component_Icon, mergeProps(_ctx.$props, _attrs), null, _parent)); } const _sfc_setup$8 = _sfc_main$8.setup; _sfc_main$8.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/elements/Icon.vue"); return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0; }; const __nuxt_component_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["ssrRender", _sfc_ssrRender$6]]); const useUI = (key, $ui, $config, $wrapperClass, withAppConfig = false) => { const $attrs = useAttrs(); const appConfig2 = useAppConfig(); const ui = computed(() => { var _a; const _ui = toValue($ui); const _config = toValue($config); const _wrapperClass = toValue($wrapperClass); return mergeConfig( (_ui == null ? void 0 : _ui.strategy) || ((_a = appConfig2.ui) == null ? void 0 : _a.strategy), _wrapperClass ? { wrapper: _wrapperClass } : {}, _ui || {}, withAppConfig ? get(appConfig2.ui, key, {}) : {}, _config || {} ); }); const attrs = computed(() => omit($attrs, ["class"])); return { ui, attrs }; }; const avatar = { wrapper: "relative inline-flex items-center justify-center flex-shrink-0", background: "bg-gray-100 dark:bg-gray-800", rounded: "rounded-full", text: "font-medium leading-none text-gray-900 dark:text-white truncate", placeholder: "font-medium leading-none text-gray-500 dark:text-gray-400 truncate", size: { "3xs": "h-4 w-4 text-[8px]", "2xs": "h-5 w-5 text-[10px]", xs: "h-6 w-6 text-xs", sm: "h-8 w-8 text-sm", md: "h-10 w-10 text-base", lg: "h-12 w-12 text-lg", xl: "h-14 w-14 text-xl", "2xl": "h-16 w-16 text-2xl", "3xl": "h-20 w-20 text-3xl" }, chip: { base: "absolute rounded-full ring-1 ring-white dark:ring-gray-900 flex items-center justify-center text-white dark:text-gray-900 font-medium", background: "bg-{color}-500 dark:bg-{color}-400", position: { "top-right": "top-0 right-0", "bottom-right": "bottom-0 right-0", "top-left": "top-0 left-0", "bottom-left": "bottom-0 left-0" }, size: { "3xs": "h-[4px] min-w-[4px] text-[4px] p-px", "2xs": "h-[5px] min-w-[5px] text-[5px] p-px", xs: "h-1.5 min-w-[0.375rem] text-[6px] p-px", sm: "h-2 min-w-[0.5rem] text-[7px] p-0.5", md: "h-2.5 min-w-[0.625rem] text-[8px] p-0.5", lg: "h-3 min-w-[0.75rem] text-[10px] p-0.5", xl: "h-3.5 min-w-[0.875rem] text-[11px] p-1", "2xl": "h-4 min-w-[1rem] text-[12px] p-1", "3xl": "h-5 min-w-[1.25rem] text-[14px] p-1" } }, icon: { base: "text-gray-500 dark:text-gray-400 flex-shrink-0", size: { "3xs": "h-2 w-2", "2xs": "h-2.5 w-2.5", xs: "h-3 w-3", sm: "h-4 w-4", md: "h-5 w-5", lg: "h-6 w-6", xl: "h-7 w-7", "2xl": "h-8 w-8", "3xl": "h-10 w-10" } }, default: { size: "sm", icon: null, chipColor: null, chipPosition: "top-right" } }; const button = { base: "focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75 flex-shrink-0", font: "font-medium", rounded: "rounded-md", truncate: "text-left break-all line-clamp-1", block: "w-full flex justify-center items-center", inline: "inline-flex items-center", size: { "2xs": "text-xs", xs: "text-xs", sm: "text-sm", md: "text-sm", lg: "text-sm", xl: "text-base" }, gap: { "2xs": "gap-x-1", xs: "gap-x-1.5", sm: "gap-x-1.5", md: "gap-x-2", lg: "gap-x-2.5", xl: "gap-x-2.5" }, padding: { "2xs": "px-2 py-1", xs: "px-2.5 py-1.5", sm: "px-2.5 py-1.5", md: "px-3 py-2", lg: "px-3.5 py-2.5", xl: "px-3.5 py-2.5" }, square: { "2xs": "p-1", xs: "p-1.5", sm: "p-1.5", md: "p-2", lg: "p-2.5", xl: "p-2.5" }, color: { white: { solid: "shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white hover:bg-gray-50 disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800/50 dark:disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400", ghost: "text-gray-900 dark:text-white hover:bg-white dark:hover:bg-gray-900 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400" }, gray: { solid: "shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 hover:bg-gray-100 disabled:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400", ghost: "text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-800 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400", link: "text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400" }, black: { solid: "shadow-sm text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-800 disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-100 dark:disabled:bg-white focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400", link: "text-gray-900 dark:text-white underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400" } }, variant: { solid: "shadow-sm text-white dark:text-gray-900 bg-{color}-500 hover:bg-{color}-600 disabled:bg-{color}-500 dark:bg-{color}-400 dark:hover:bg-{color}-500 dark:disabled:bg-{color}-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-{color}-500 dark:focus-visible:outline-{color}-400", outline: "ring-1 ring-inset ring-current text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400", soft: "text-{color}-500 dark:text-{color}-400 bg-{color}-50 hover:bg-{color}-100 disabled:bg-{color}-50 dark:bg-{color}-950 dark:hover:bg-{color}-900 dark:disabled:bg-{color}-950 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400", ghost: "text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400", link: "text-{color}-500 hover:text-{color}-600 disabled:text-{color}-500 dark:text-{color}-400 dark:hover:text-{color}-500 dark:disabled:text-{color}-400 underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400" }, icon: { base: "flex-shrink-0", loading: "animate-spin", size: { "2xs": "h-4 w-4", xs: "h-4 w-4", sm: "h-5 w-5", md: "h-5 w-5", lg: "h-5 w-5", xl: "h-6 w-6" } }, default: { size: "sm", variant: "solid", color: "primary", loadingIcon: "i-heroicons-arrow-path-20-solid" } }; const arrow = { base: "invisible before:visible before:block before:rotate-45 before:z-[-1] before:w-2 before:h-2", ring: "before:ring-1 before:ring-gray-200 dark:before:ring-gray-800", rounded: "before:rounded-sm", background: "before:bg-gray-200 dark:before:bg-gray-800", shadow: "before:shadow", // eslint-disable-next-line quotes placement: `group-data-[popper-placement*='right']:-left-1 group-data-[popper-placement*='left']:-right-1 group-data-[popper-placement*='top']:-bottom-1 group-data-[popper-placement*='bottom']:-top-1` }; const input = { wrapper: "relative", base: "relative block w-full disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none border-0", form: "form-input", rounded: "rounded-md", placeholder: "placeholder-gray-400 dark:placeholder-gray-500", file: { base: "file:mr-1.5 file:font-medium file:text-gray-500 dark:file:text-gray-400 file:bg-transparent file:border-0 file:p-0 file:outline-none" }, size: { "2xs": "text-xs", xs: "text-xs", sm: "text-sm", md: "text-sm", lg: "text-sm", xl: "text-base" }, gap: { "2xs": "gap-x-1", xs: "gap-x-1.5", sm: "gap-x-1.5", md: "gap-x-2", lg: "gap-x-2.5", xl: "gap-x-2.5" }, padding: { "2xs": "px-2 py-1", xs: "px-2.5 py-1.5", sm: "px-2.5 py-1.5", md: "px-3 py-2", lg: "px-3.5 py-2.5", xl: "px-3.5 py-2.5" }, leading: { padding: { "2xs": "ps-7", xs: "ps-8", sm: "ps-9", md: "ps-10", lg: "ps-11", xl: "ps-12" } }, trailing: { padding: { "2xs": "pe-7", xs: "pe-8", sm: "pe-9", md: "pe-10", lg: "pe-11", xl: "pe-12" } }, color: { white: { outline: "shadow-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400" }, gray: { outline: "shadow-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400" } }, variant: { outline: "shadow-sm bg-transparent text-gray-900 dark:text-white ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 focus:ring-2 focus:ring-{color}-500 dark:focus:ring-{color}-400", none: "bg-transparent focus:ring-0 focus:shadow-none" }, icon: { base: "flex-shrink-0 text-gray-400 dark:text-gray-500", color: "text-{color}-500 dark:text-{color}-400", loading: "animate-spin", size: { "2xs": "h-4 w-4", xs: "h-4 w-4", sm: "h-5 w-5", md: "h-5 w-5", lg: "h-5 w-5", xl: "h-6 w-6" }, leading: { wrapper: "absolute inset-y-0 start-0 flex items-center", pointer: "pointer-events-none", padding: { "2xs": "px-2", xs: "px-2.5", sm: "px-2.5", md: "px-3", lg: "px-3.5", xl: "px-3.5" } }, trailing: { wrapper: "absolute inset-y-0 end-0 flex items-center", pointer: "pointer-events-none", padding: { "2xs": "px-2", xs: "px-2.5", sm: "px-2.5", md: "px-3", lg: "px-3.5", xl: "px-3.5" } } }, default: { size: "sm", color: "white", variant: "outline", loadingIcon: "i-heroicons-arrow-path-20-solid" } }; const inputMenu = { container: "z-20 group", trigger: "flex items-center w-full", width: "w-full", height: "max-h-60", base: "relative focus:outline-none overflow-y-auto scroll-py-1", background: "bg-white dark:bg-gray-800", shadow: "shadow-lg", rounded: "rounded-md", padding: "p-1", ring: "ring-1 ring-gray-200 dark:ring-gray-700", empty: "text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5", option: { base: "cursor-default select-none relative flex items-center justify-between gap-1", rounded: "rounded-md", padding: "px-1.5 py-1.5", size: "text-sm", color: "text-gray-900 dark:text-white", container: "flex items-center gap-1.5 min-w-0", active: "bg-gray-100 dark:bg-gray-900", inactive: "", selected: "pe-7", disabled: "cursor-not-allowed opacity-50", empty: "text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5", icon: { base: "flex-shrink-0 h-5 w-5", active: "text-gray-900 dark:text-white", inactive: "text-gray-400 dark:text-gray-500" }, selectedIcon: { wrapper: "absolute inset-y-0 end-0 flex items-center", padding: "pe-2", base: "h-5 w-5 text-gray-900 dark:text-white flex-shrink-0" }, avatar: { base: "flex-shrink-0", size: "2xs" }, chip: { base: "flex-shrink-0 w-2 h-2 mx-1 rounded-full" } }, // Syntax for `<Transition>` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions transition: { leaveActiveClass: "transition ease-in duration-100", leaveFromClass: "opacity-100", leaveToClass: "opacity-0" }, popper: { placement: "bottom-end" }, default: { selectedIcon: "i-heroicons-check-20-solid", trailingIcon: "i-heroicons-chevron-down-20-solid" }, arrow: { ...arrow, ring: "before:ring-1 before:ring-gray-200 dark:before:ring-gray-700", background: "before:bg-white dark:before:bg-gray-700" } }; const textarea = { ...input, form: "form-textarea", default: { size: "sm", color: "white", variant: "outline" } }; const select = { ...input, form: "form-select", placeholder: "text-gray-400 dark:text-gray-500", default: { size: "sm", color: "white", variant: "outline", loadingIcon: "i-heroicons-arrow-path-20-solid", trailingIcon: "i-heroicons-chevron-down-20-solid" } }; ({ ...inputMenu, select: "inline-flex items-center text-left cursor-default", input: "block w-[calc(100%+0.5rem)] focus:ring-transparent text-sm px-3 py-1.5 text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 border-0 border-b border-gray-200 dark:border-gray-700 sticky -top-1 -mt-1 mb-1 -mx-1 z-10 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none", required: "absolute inset-0 w-px opacity-0 cursor-default", label: "block truncate", option: { ...inputMenu.option, create: "block truncate" }, // Syntax for `<Transition>` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions transition: { leaveActiveClass: "transition ease-in duration-100", leaveFromClass: "opacity-100", leaveToClass: "opacity-0" }, popper: { placement: "bottom-end" }, default: { selectedIcon: "i-heroicons-check-20-solid", clearSearchOnClose: false, showCreateOptionWhen: "empty" }, arrow: { ...arrow, ring: "before:ring-1 before:ring-gray-200 dark:before:ring-gray-700", background: "before:bg-white dark:before:bg-gray-700" } }); const notification = { wrapper: "w-full pointer-events-auto", container: "relative overflow-hidden", inner: "w-0 flex-1", title: "text-sm font-medium text-gray-900 dark:text-white", description: "mt-1 text-sm leading-4 text-gray-500 dark:text-gray-400", actions: "flex items-center gap-2 mt-3 flex-shrink-0", background: "bg-white dark:bg-gray-900", shadow: "shadow-lg", rounded: "rounded-lg", padding: "p-4", gap: "gap-3", ring: "ring-1 ring-gray-200 dark:ring-gray-800", icon: { base: "flex-shrink-0 w-5 h-5", color: "text-{color}-500 dark:text-{color}-400" }, avatar: { base: "flex-shrink-0 self-center", size: "md" }, progress: { base: "absolute bottom-0 end-0 start-0 h-1", background: "bg-{color}-500 dark:bg-{color}-400" }, // Syntax for `<Transition>` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions transition: { enterActiveClass: "transform ease-out duration-300 transition", enterFromClass: "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2", enterToClass: "translate-y-0 opacity-100 sm:translate-x-0", leaveActiveClass: "transition ease-in duration-100", leaveFromClass: "opacity-100", leaveToClass: "opacity-0" }, default: { color: "primary", icon: null, timeout: 5e3, closeButton: { icon: "i-heroicons-x-mark-20-solid", color: "gray", variant: "link", padded: false }, actionButton: { size: "xs", color: "white" } } }; const notifications = { wrapper: "fixed flex flex-col justify-end z-[55]", position: "bottom-0 end-0", width: "w-full sm:w-96", container: "px-4 sm:px-6 py-6 space-y-3 overflow-y-auto" }; const config$3 = mergeConfig(appConfig.ui.strategy, appConfig.ui.avatar, avatar); const _sfc_main$7 = defineComponent({ components: { UIcon: __nuxt_component_2$1 }, inheritAttrs: false, props: { as: { type: [String, Object], default: "img" }, src: { type: [String, Boolean], default: null }, alt: { type: String, default: null }, text: { type: String, default: null }, icon: { type: String, default: () => config$3.default.icon }, size: { type: String, default: () => config$3.default.size, validator(value) { return Object.keys(config$3.size).includes(value); } }, chipColor: { type: String, default: () => config$3.default.chipColor, validator(value) { return ["gray", ...appConfig.ui.colors].includes(value); } }, chipPosition: { type: String, default: () => config$3.default.chipPosition, validator(value) { return Object.keys(config$3.chip.position).includes(value); } }, chipText: { type: [String, Number], default: null }, imgClass: { type: String, default: "" }, class: { type: [String, Object, Array], default: () => "" }, ui: { type: Object, default: () => ({}) } }, setup(props) { const { ui, attrs } = useUI("avatar", toRef(props, "ui"), config$3); const url = computed(() => { if (typeof props.src === "boolean") { return null; } return props.src; }); const placeholder = computed(() => { return (props.alt || "").split(" ").map((word) => word.charAt(0)).join("").substring(0, 2); }); const wrapperClass = computed(() => { return twMerge(twJoin( ui.value.wrapper, (error.value || !url.value) && ui.value.background, ui.value.rounded, ui.value.size[props.size] ), props.class); }); const imgClass = computed(() => { return twMerge(twJoin( ui.value.rounded, ui.value.size[props.size] ), props.imgClass); }); const iconClass = computed(() => { return twJoin( ui.value.icon.base, ui.value.icon.size[props.size] ); }); const chipClass = computed(() => { return twJoin( ui.value.chip.base, ui.value.chip.size[props.size], ui.value.chip.position[props.chipPosition], ui.value.chip.background.replaceAll("{color}", props.chipColor) ); }); const error = ref(false); watch(() => props.src, () => { if (error.value) { error.value = false; } }); function onError() { error.value = true; } return { // eslint-disable-next-line vue/no-dupe-keys ui, attrs, wrapperClass, // eslint-disable-next-line vue/no-dupe-keys imgClass, iconClass, chipClass, url, placeholder, error, onError }; } }); function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { const _component_UIcon = __nuxt_component_2$1; _push(`<span${ssrRenderAttrs(mergeProps({ class: _ctx.wrapperClass }, _attrs))}>`); if (_ctx.url && !_ctx.error) { ssrRenderVNode(_push, createVNode(resolveDynamicComponent(_ctx.as), mergeProps({ class: _ctx.imgClass, alt: _ctx.alt, src: _ctx.url }, _ctx.attrs, { onError: _ctx.onError }), null), _parent); } else if (_ctx.text) { _push(`<span class="${ssrRenderClass(_ctx.ui.text)}">${ssrInterpolate(_ctx.text)}</span>`); } else if (_ctx.icon) { _push(ssrRenderComponent(_component_UIcon, { name: _ctx.icon, class: _ctx.iconClass }, null, _parent)); } else if (_ctx.placeholder) { _push(`<span class="${ssrRenderClass(_ctx.ui.placeholder)}">${ssrInterpolate(_ctx.placeholder)}</span>`); } else { _push(`<!---->`); } if (_ctx.chipColor) { _push(`<span class="${ssrRenderClass(_ctx.chipClass)}">${ssrInterpolate(_ctx.chipText)}</span>`); } else { _push(`<!---->`); } ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent); _push(`</span>`); } const _sfc_setup$7 = _sfc_main$7.setup; _sfc_main$7.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/elements/Avatar.vue"); return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0; }; const __nuxt_component_2 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["ssrRender", _sfc_ssrRender$5]]); const _sfc_main$6 = defineComponent({ inheritAttrs: false, props: { ...nuxtLinkProps, as: { type: String, default: "button" }, type: { type: String, default: "button" }, disabled: { type: Boolean, default: null }, active: { type: Boolean, default: void 0 }, exact: { type: Boolean, default: false }, exactQuery: { type: Boolean, default: false }, exactHash: { type: Boolean, default: false }, inactiveClass: { type: String, default: void 0 } }, setup(props) { function resolveLinkClass(route, $route, { isActive, isExactActive }) { if (props.exactQuery && !isEqual$1(route.query, $route.query)) { return props.inactiveClass; } if (props.exactHash && route.hash !== $route.hash) { return props.inactiveClass; } if (props.exact && isExactActive) { return props.activeClass; } if (!props.exact && isActive) { return props.activeClass; } return props.inactiveClass; } return { resolveLinkClass }; } }); function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { const _component_NuxtLink = __nuxt_component_0$3; if (!_ctx.to) { ssrRenderVNode(_push, createVNode(resolveDynamicComponent(_ctx.as), mergeProps({ type: _ctx.type, disabled: _ctx.disabled }, _ctx.$attrs, { class: _ctx.active ? _ctx.activeClass : _ctx.inactiveClass }, _attrs), { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { ssrRenderSlot(_ctx.$slots, "default", { isActive: _ctx.active }, null, _push2, _parent2, _scopeId); } else { return [ renderSlot(_ctx.$slots, "default", { isActive: _ctx.active }) ]; } }), _: 3 }), _parent); } else { _push(ssrRenderComponent(_component_NuxtLink, mergeProps(_ctx.$props, { custom: "" }, _attrs), { default: withCtx(({ route, href, target, rel, navigate: navigate2, isActive, isExactActive, isExternal }, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<a${ssrRenderAttrs(mergeProps(_ctx.$attrs, { href: !_ctx.disabled ? href : void 0, "aria-disabled": _ctx.disabled ? "true" : void 0, role: _ctx.disabled ? "link" : void 0, rel, target, class: _ctx.active !== void 0 ? _ctx.active ? _ctx.activeClass : _ctx.inactiveClass : _ctx.resolveLinkClass(route, _ctx.$route, { isActive, isExactActive }) }))}${_scopeId}>`); ssrRenderSlot(_ctx.$slots, "default", { isActive: _ctx.active !== void 0 ? _ctx.active : _ctx.exact ? isExactActive : isActive }, null, _push2, _parent2, _scopeId); _push2(`</a>`); } else { return [ createVNode("a", mergeProps(_ctx.$attrs, { href: !_ctx.disabled ? href : void 0, "aria-disabled": _ctx.disabled ? "true" : void 0, role: _ctx.disabled ? "link" : void 0, rel, target, class: _ctx.active !== void 0 ? _ctx.active ? _ctx.activeClass : _ctx.inactiveClass : _ctx.resolveLinkClass(route, _ctx.$route, { isActive, isExactActive }), onClick: (e) => !isExternal && !_ctx.disabled && navigate2(e) }), [ renderSlot(_ctx.$slots, "default", { isActive: _ctx.active !== void 0 ? _ctx.active : _ctx.exact ? isExactActive : isActive }) ], 16, ["href", "aria-disabled", "role", "rel", "target", "onClick"]) ]; } }), _: 3 }, _parent)); } } const _sfc_setup$6 = _sfc_main$6.setup; _sfc_main$6.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/elements/Link.vue"); return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0; }; const __nuxt_component_1 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender$4]]); function useInjectButtonGroup({ ui, props }) { const instance = getCurrentInstance(); provide("ButtonGroupContextConsumer", true); const isParentPartOfGroup = inject("ButtonGroupContextConsumer", false); if (isParentPartOfGroup) { return { size: computed(() => props.size), rounded: computed(() => ui.value.rounded) }; } let parent = instance.parent; let groupContext; while (parent && !groupContext) { if (parent.type.name === "ButtonGroup") { groupContext = inject(`group-${parent.uid}`); break; } parent = parent.parent; } const positionInGroup = computed(() => groupContext == null ? void 0 : groupContext.value.children.indexOf(instance)); return { size: computed(() => { if (!(groupContext == null ? void 0 : groupContext.value)) return props.size; return (groupContext == null ? void 0 : groupContext.value.size) ?? ui.value.default.size; }), rounded: computed(() => { if (!groupContext || positionInGroup.value === -1) return ui.value.rounded; if (groupContext.value.children.length === 1) return groupContext.value.ui.rounded; if (positionInGroup.value === 0) return groupContext.value.rounded.start; if (positionInGroup.value === groupContext.value.children.length - 1) return groupContext.value.rounded.end; return "rounded-none"; }) }; } const config$2 = mergeConfig(appConfig.ui.strategy, appConfig.ui.button, button); const _sfc_main$5 = defineComponent({ components: { UIcon: __nuxt_component_2$1, ULink: __nuxt_component_1 }, inheritAttrs: false, props: { ...nuxtLinkProps, type: { type: String, default: "button" }, block: { type: Boolean, default: false }, label: { type: String, default: null }, loading: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, padded: { type: Boolean, default: true }, size: { type: String, default: () => config$2.default.size, validator(value) { return Object.keys(config$2.size).includes(value); } }, color: { type: String, default: () => config$2.default.color, validator(value) { return [...appConfig.ui.colors, ...Object.keys(config$2.color)].includes(value); } }, variant: { type: String, default: () => config$2.default.variant, validator(value) { return [ ...Object.keys(config$2.variant), ...Object.values(config$2.color).flatMap((value2) => Object.keys(value2)) ].includes(value); } }, icon: { type: String, default: null }, loadingIcon: { type: String, default: () => config$2.default.loadingIcon }, leadingIcon: { type: String, default: null }, trailingIcon: { type: String, default: null }, trailing: { type: Boolean, default: false }, leading: { type: Boolean, default: false }, square: { type: Boolean, default: false }, truncate: { type: Boolean, default: false }, class: { type: [String, Object, Array], default: () => "" }, ui: { type: Object, default: () => ({}) } }, setup(props, { slots }) { const { ui, attrs } = useUI("button", toRef(props, "ui"), config$2); const { size, rounded } = useInjectButtonGroup({ ui, props }); const isLeading = computed(() => { return props.icon && props.leading || props.icon && !props.trailing || props.loading && !props.trailing || props.leadingIcon; }); const isTrailing = computed(() => { return props.icon && props.trailing || props.loading && props.trailing || props.trailingIcon; }); const isSquare = computed(() => props.square || !slots.default && !props.label); const buttonClass = computed(() => { var _a, _b; const variant = ((_b = (_a = ui.value.color) == null ? void 0 : _a[props.color]) == null ? void 0 : _b[props.variant]) || ui.value.variant[props.variant]; return twMerge(twJoin( ui.value.base, ui.value.font, rounded.value, ui.value.size[size.value], ui.value.gap[size.value], props.padded && ui.value[isSquare.value ? "square" : "padding"][size.value], variant == null ? void 0 : variant.replaceAll("{color}", props.color), props.block ? ui.value.block : ui.value.inline ), props.class); }); const leadingIconName = computed(() => { if (props.loading) { return props.loadingIcon; } return props.leadingIcon || props.icon; }); const trailingIconName = computed(() => { if (props.loading && !isLeading.value) { return props.loadingIcon; } return props.trailingIcon || props.icon; }); const leadingIconClass = computed(() => { return twJoin( ui.value.icon.base, ui.value.icon.size[size.value], props.loading && ui.value.icon.loading ); }); const trailingIconClass = computed(() => { return twJoin( ui.value.icon.base, ui.value.icon.size[size.value], props.loading && !isLeading.value && ui.value.icon.loading ); }); const linkProps = computed(() => getNuxtLinkProps(props)); return { // eslint-disable-next-line vue/no-dupe-keys ui, attrs, isLeading, isTrailing, isSquare, buttonClass, leadingIconName, trailingIconName, leadingIconClass, trailingIconClass, linkProps }; } }); function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { const _component_ULink = __nuxt_component_1; const _component_UIcon = __nuxt_component_2$1; _push(ssrRenderComponent(_component_ULink, mergeProps({ type: _ctx.type, disabled: _ctx.disabled || _ctx.loading, class: _ctx.buttonClass }, { ..._ctx.linkProps, ..._ctx.attrs }, _attrs), { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { ssrRenderSlot(_ctx.$slots, "leading", { disabled: _ctx.disabled, loading: _ctx.loading }, () => { if (_ctx.isLeading && _ctx.leadingIconName) { _push2(ssrRenderComponent(_component_UIcon, { name: _ctx.leadingIconName, class: _ctx.leadingIconClass, "aria-hidden": "true" }, null, _parent2, _scopeId)); } else { _push2(`<!---->`); } }, _push2, _parent2, _scopeId); ssrRenderSlot(_ctx.$slots, "default", {}, () => { if (_ctx.label) { _push2(`<span class="${ssrRenderClass([_ctx.truncate ? _ctx.ui.truncate : ""])}"${_scopeId}>${ssrInterpolate(_ctx.label)}</span>`); } else { _push2(`<!---->`); } }, _push2, _parent2, _scopeId); ssrRenderSlot(_ctx.$slots, "trailing", { disabled: _ctx.disabled, loading: _ctx.loading }, () => { if (_ctx.isTrailing && _ctx.trailingIconName) { _push2(ssrRenderComponent(_component_UIcon, { name: _ctx.trailingIconName, class: _ctx.trailingIconClass, "aria-hidden": "true" }, null, _parent2, _scopeId)); } else { _push2(`<!---->`); } }, _push2, _parent2, _scopeId); } else { return [ renderSlot(_ctx.$slots, "leading", { disabled: _ctx.disabled, loading: _ctx.loading }, () => [ _ctx.isLeading && _ctx.leadingIconName ? (openBlock(), createBlock(_component_UIcon, { key: 0, name: _ctx.leadingIconName, class: _ctx.leadingIconClass, "aria-hidden": "true" }, null, 8, ["name", "class"])) : createCommentVNode("", true) ]), renderSlot(_ctx.$slots, "default", {}, () => [ _ctx.label ? (openBlock(), createBlock("span", { key: 0, class: [_ctx.truncate ? _ctx.ui.truncate : ""] }, toDisplayString$1(_ctx.label), 3)) : createCommentVNode("", true) ]), renderSlot(_ctx.$slots, "trailing", { disabled: _ctx.disabled, loading: _ctx.loading }, () => [ _ctx.isTrailing && _ctx.trailingIconName ? (openBlock(), createBlock(_component_UIcon, { key: 0, name: _ctx.trailingIconName, class: _ctx.trailingIconClass, "aria-hidden": "true" }, null, 8, ["name", "class"])) : createCommentVNode("", true) ]) ]; } }), _: 3 }, _parent)); } const _sfc_setup$5 = _sfc_main$5.setup; _sfc_main$5.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/elements/Button.vue"); return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0; }; const __nuxt_component_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["ssrRender", _sfc_ssrRender$3]]); function useTimer(cb, interval, options) { let timer = null; const { pause: tPause, resume: tResume, timestamp } = useTimestamp({ ...{}, controls: true }); const startTime = ref(null); const remaining = computed(() => { if (!startTime.value) { return 0; } return interval - (timestamp.value - startTime.value); }); function set2(...args) { timer = setTimeout(() => { timer = null; startTime.value = null; cb(...args); }, remaining.value); } function clear() { if (timer) { clearTimeout(timer); timer = null; } } function start() { startTime.value = Date.now(); set2(); } function stop() { clear(); tPause(); } function pause() { clear(); tPause(); } function resume() { set2(); tResume(); startTime.value = (startTime.value || 0) + (Date.now() - timestamp.value); } start(); return { start, stop, pause, resume, remaining }; } const config$1 = mergeConfig(appConfig.ui.strategy, appConfig.ui.notification, notification); const _sfc_main$4 = defineComponent({ components: { UIcon: __nuxt_component_2$1, UAvatar: __nuxt_component_2, UButton: __nuxt_component_4$1 }, inheritAttrs: false, props: { id: { type: [String, Number], required: true }, title: { type: String, default: null }, description: { type: String, default: null }, icon: { type: String, default: () => config$1.default.icon }, avatar: { type: Object, default: null }, closeButton: { type: Object, default: () => config$1.default.closeButton }, timeout: { type: Number, default: () => config$1.default.timeout }, actions: { type: Array, default: () => [] }, callback: { type: Function, default: null }, color: { type: String, default: () => config$1.default.color, validator(value) { return ["gray", ...appConfig.ui.colors].includes(value); } }, class: { type: [String, Object, Array], default: () => "" }, ui: { type: Object, default: () => ({}) } }, emits: ["close"], setup(props, { emit }) { const { ui, attrs } = useUI("notification", toRef(props, "ui"), config$1); let timer = null; const remaining = ref(props.timeout); const wrapperClass = computed(() => { var _a, _b; return twMerge(twJoin( ui.value.wrapper, (_a = ui.value.background) == null ? void 0 : _a.replaceAll("{color}", props.color), ui.value.rounded, ui.value.shadow, (_b = ui.value.ring) == null ? void 0 : _b.replaceAll("{color}", props.color) ), props.class); }); const progressClass = computed(() => { var _a; return twJoin( ui.value.progress.base, (_a = ui.value.progress.background) == null ? void 0 : _a.replaceAll("{color}", props.color) ); }); const progressStyle = computed(() => { const remainingPercent = remaining.value / props.timeout * 100; return { width: `${remainingPercent || 0}%` }; }); const iconClass = computed(() => { var _a; return twJoin( ui.value.icon.base, (_a = ui.value.icon.color) == null ? void 0 : _a.replaceAll("{color}", props.color) ); }); function onMouseover() { if (timer) { timer.pause(); } } function onMouseleave() { if (timer) { timer.resume(); } } function onClose() { if (timer) { timer.stop(); } if (props.callback) { props.callback(); } emit("close"); } function onAction(action) { if (timer) { timer.stop(); } if (action.click) { action.click(); } emit("close"); } function initTimer() { if (timer) { timer.stop(); } if (!props.timeout) { return; } timer = useTimer(() => { onClose(); }, props.timeout); watchEffect(() => { remaining.value = timer.remaining.value; }); } watch(() => props.timeout, initTimer); return { // eslint-disable-next-line vue/no-dupe-keys ui, attrs, wrapperClass, progressClass, progressStyle, iconClass, onMouseover, onMouseleave, onClose, onAction, twMerge }; } }); function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { const _component_UIcon = __nuxt_component_2$1; const _component_UAvatar = __nuxt_component_2; const _component_UButton = __nuxt_component_4$1; _push(`<template><div${ssrRenderAttrs(mergeProps({ class: _ctx.wrapperClass, role: "status" }, _ctx.attrs, _attrs))}><div class="${ssrRenderClass([_ctx.ui.container, _ctx.ui.rounded, _ctx.ui.ring])}"><div class="${ssrRenderClass([[_ctx.ui.padding, _ctx.ui.gap, { "items-start": _ctx.description || _ctx.$slots.description, "items-center": !_ctx.description && !_ctx.$slots.description }], "flex"])}">`); if (_ctx.icon) { _push(ssrRenderComponent(_component_UIcon, { name: _ctx.icon, class: _ctx.iconClass }, null, _parent)); } else { _push(`<!---->`); } if (_ctx.avatar) { _push(ssrRenderComponent(_component_UAvatar, mergeProps({ size: _ctx.ui.avatar.size, ..._ctx.avatar }, { class: _ctx.ui.avatar.base }), null, _parent)); } else { _push(`<!---->`); } _push(`<div class="${ssrRenderClass(_ctx.ui.inner)}">`); if (_ctx.title || _ctx.$slots.title) { _push(`<p class="${ssrRenderClass(_ctx.ui.title)}">`); ssrRenderSlot(_ctx.$slots, "title", { title: _ctx.title }, () => { _push(`${ssrInterpolate(_ctx.title)}`); }, _push, _parent); _push(`</p>`); } else { _push(`<!---->`); } if (_ctx.description || _ctx.$slots.description) { _push(`<div class="${ssrRenderClass(_ctx.twMerge(_ctx.ui.description, !_ctx.title && !_ctx.$slots.title && "mt-0 leading-5"))}">`); ssrRenderSlot(_ctx.$slots, "description", { description: _ctx.description }, () => { _push(`${ssrInterpolate(_ctx.description)}`); }, _push, _parent); _push(`</div>`); } else { _push(`<!---->`); } if ((_ctx.description || _ctx.$slots.description) && _ctx.actions.length) { _push(`<div class="${ssrRenderClass(_ctx.ui.actions)}"><!--[-->`); ssrRenderList(_ctx.actions, (action, index2) => { _push(ssrRenderComponent(_component_UButton, mergeProps({ key: index2, ref_for: true }, { ..._ctx.ui.default.actionButton || {}, ...action }, { onClick: ($event) => _ctx.onAction(action) }), null, _parent)); }); _push(`<!--]--></div>`); } else { _push(`<!---->`); } _push(`</div>`); if (_ctx.closeButton || !_ctx.description && !_ctx.$slots.description && _ctx.actions.length) { _push(`<div class="${ssrRenderClass(_ctx.twMerge(_ctx.ui.actions, "mt-0"))}">`); if (!_ctx.description && !_ctx.$slots.description && _ctx.actions.length) { _push(`<!--[-->`); ssrRenderList(_ctx.actions, (action, index2) => { _push(ssrRenderComponent(_component_UButton, mergeProps({ key: index2, ref_for: true }, { ..._ctx.ui.default.actionButton || {}, ...action }, { onClick: ($event) => _ctx.onAction(action) }), null, _parent)); }); _push(`<!--]-->`); } else { _push(`<!---->`); } if (_ctx.closeButton) { _push(ssrRenderComponent(_component_UButton, mergeProps({ "aria-label": "Close" }, { ..._ctx.ui.default.closeButton || {}, ..._ctx.closeButton }, { onClick: _ctx.onClose }), null, _parent)); } else { _push(`<!---->`); } _push(`</div>`); } else { _push(`<!---->`); } _push(`</div>`); if (_ctx.timeout) { _push(`<div class="${ssrRenderClass(_ctx.progressClass)}" style="${ssrRenderStyle(_ctx.progressStyle)}"></div>`); } else { _push(`<!---->`); } _push(`</div></div></template>`); } const _sfc_setup$4 = _sfc_main$4.setup; _sfc_main$4.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/overlays/Notification.vue"); return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0; }; const __nuxt_component_0 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["ssrRender", _sfc_ssrRender$2]]); const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.notifications, notifications); const _sfc_main$3 = defineComponent({ components: { UNotification: __nuxt_component_0 }, inheritAttrs: false, props: { class: { type: [String, Object, Array], default: () => "" }, ui: { type: Object, default: () => ({}) } }, setup(props) { const { ui, attrs } = useUI("notifications", toRef(props, "ui"), config); const toast = useToast(); const notifications2 = useState("notifications", () => []); const wrapperClass = computed(() => { return twMerge(twJoin( ui.value.wrapper, ui.value.position, ui.value.width ), props.class); }); return { // eslint-disable-next-line vue/no-dupe-keys ui, attrs, toast, notifications: notifications2, wrapperClass }; } }); function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { const _component_UNotification = __nuxt_component_0; ssrRenderTeleport(_push, (_push2) => { _push2(`<div${ssrRenderAttrs(mergeProps({ class: _ctx.wrapperClass, role: "region" }, _ctx.attrs))}>`); if (_ctx.notifications.length) { _push2(`<div class="${ssrRenderClass(_ctx.ui.container)}"><!--[-->`); ssrRenderList(_ctx.notifications, (notification2) => { _push2(`<div>`); _push2(ssrRenderComponent(_component_UNotification, mergeProps({ ref_for: true }, notification2, { class: notification2.click && "cursor-pointer", onClick: ($event) => notification2.click && notification2.click(notification2), onClose: ($event) => _ctx.toast.remove(notification2.id) }), createSlots({ _: 2 }, [ renderList(_ctx.$slots, (_, name) => { return { name, fn: withCtx((slotData, _push3, _parent2, _scopeId) => { if (_push3) { ssrRenderSlot(_ctx.$slots, name, mergeProps({ ref_for: true }, slotData), null, _push3, _parent2, _scopeId); } else { return [ renderSlot(_ctx.$slots, name, mergeProps({ ref_for: true }, slotData)) ]; } }) }; }) ]), _parent)); _push2(`</div>`); }); _push2(`<!--]--></div>`); } else { _push2(`<!---->`); } _push2(`</div>`); }, "body", false, _parent); } const _sfc_setup$3 = _sfc_main$3.setup; _sfc_main$3.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/overlays/Notifications.vue"); return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0; }; const __nuxt_component_4 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender$1]]); const _sfc_main$2 = {}; function _sfc_ssrRender(_ctx, _push, _parent, _attrs) { const _component_VitePwaManifest = __nuxt_component_0$2; const _component_NuxtLoadingIndicator = __nuxt_component_1$1; const _component_NuxtLayout = __nuxt_component_2$2; const _component_NuxtPage = __nuxt_component_3; const _component_UNotifications = __nuxt_component_4; _push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-screen w-full sm:w-9/12 md:w-7/12 lg:w-6/12 2xl:w-5/12 mx-auto sm:border" }, _attrs))}>`); _push(ssrRenderComponent(_component_VitePwaManifest, null, null, _parent)); _push(ssrRenderComponent(_component_NuxtLoadingIndicator, { color: "#ff5722" }, null, _parent)); _push(ssrRenderComponent(_component_NuxtLayout, null, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_NuxtPage, null, null, _parent2, _scopeId)); } else { return [ createVNode(_component_NuxtPage) ]; } }), _: 1 }, _parent)); _push(ssrRenderComponent(_component_UNotifications, { class: "bottom-auto top-0 right-0" }, null, _parent)); _push(`</div>`); } const _sfc_setup$2 = _sfc_main$2.setup; _sfc_main$2.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("app.vue"); return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0; }; const AppComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender]]); const _sfc_main$1 = { __name: "nuxt-error-page", __ssrInlineRender: true, props: { error: Object }, setup(__props) { const props = __props; const _error = props.error; _error.stack ? _error.stack.split("\n").splice(1).map((line) => { const text = line.replace("webpack:/", "").replace(".vue", ".js").trim(); return { text, internal: line.includes("node_modules") && !line.includes(".cache") || line.includes("internal") || line.includes("new Promise") }; }).map((i) => `<span class="stack${i.internal ? " internal" : ""}">${i.text}</span>`).join("\n") : ""; const statusCode = Number(_error.statusCode || 500); const is404 = statusCode === 404; const statusMessage = _error.statusMessage ?? (is404 ? "Page Not Found" : "Internal Server Error"); const description = _error.message || _error.toString(); const stack = void 0; const _Error404 = defineAsyncComponent(() => import('./error-404-D7nq31r2.mjs').then((r) => r.default || r)); const _Error = defineAsyncComponent(() => import('./error-500-DxJsyAh5.mjs').then((r) => r.default || r)); const ErrorTemplate = is404 ? _Error404 : _Error; return (_ctx, _push, _parent, _attrs) => { _push(ssrRenderComponent(unref(ErrorTemplate), mergeProps({ statusCode: unref(statusCode), statusMessage: unref(statusMessage), description: unref(description), stack: unref(stack) }, _attrs), null, _parent)); }; } }; const _sfc_setup$1 = _sfc_main$1.setup; _sfc_main$1.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/nuxt/dist/app/components/nuxt-error-page.vue"); return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0; }; const _sfc_main = { __name: "nuxt-root", __ssrInlineRender: true, setup(__props) { const IslandRenderer = () => null; const nuxtApp = useNuxtApp(); nuxtApp.deferHydration(); nuxtApp.ssrContext.url; const SingleRenderer = false; provide(PageRouteSymbol, useRoute()); nuxtApp.hooks.callHookWith((hooks) => hooks.map((hook) => hook()), "vue:setup"); const error = useError(); const abortRender = error.value && !nuxtApp.ssrContext.error; onErrorCaptured((err, target, info) => { nuxtApp.hooks.callHook("vue:error", err, target, info).catch((hookError) => console.error("[nuxt] Error in `vue:error` hook", hookError)); { const p = nuxtApp.runWithContext(() => showError(err)); onServerPrefetch(() => p); return false; } }); const islandContext = nuxtApp.ssrContext.islandContext; return (_ctx, _push, _parent, _attrs) => { ssrRenderSuspense(_push, { default: () => { if (unref(abortRender)) { _push(`<div></div>`); } else if (unref(error)) { _push(ssrRenderComponent(unref(_sfc_main$1), { error: unref(error) }, null, _parent)); } else if (unref(islandContext)) { _push(ssrRenderComponent(unref(IslandRenderer), { context: unref(islandContext) }, null, _parent)); } else if (unref(SingleRenderer)) { ssrRenderVNode(_push, createVNode(resolveDynamicComponent(unref(SingleRenderer)), null, null), _parent); } else { _push(ssrRenderComponent(unref(AppComponent), null, null, _parent)); } }, _: 1 }); }; } }; const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/nuxt/dist/app/components/nuxt-root.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; let entry; { entry = async function createNuxtAppServer(ssrContext) { const vueApp = createApp(_sfc_main); const nuxt = createNuxtApp({ vueApp, ssrContext }); try { await applyPlugins(nuxt, plugins); await nuxt.hooks.callHook("app:created", vueApp); } catch (error) { await nuxt.hooks.callHook("app:error", error); nuxt.payload.error = nuxt.payload.error || createError(error); } if (ssrContext == null ? void 0 : ssrContext._renderResponse) { throw new Error("skipping render"); } return vueApp; }; } const entry$1 = (ssrContext) => entry(ssrContext); export { select as A, input as B, fetchDefaults as C, useRequestFetch as D, defineStore as E, arrow as F, __nuxt_component_2 as G, getNuxtLinkProps as H, defineNuxtRouteMiddleware as I, useLocaleHead as J, _export_sfc as _, __nuxt_component_0$3 as a, useI18n as b, useRoute as c, useLocalePath as d, entry$1 as default, __nuxt_component_2$3 as e, appConfig as f, useUI as g, get as h, useState as i, useToast as j, __nuxt_component_4$1 as k, button as l, mergeConfig as m, navigateTo as n, __nuxt_component_1 as o, __nuxt_component_2$1 as p, useCookie as q, useRuntimeConfig as r, looseToNumber as s, textarea as t, useHead as u, useRouter as v, useNuxtApp as w, useAsyncData as x, useSwitchLocalePath as y, useInjectButtonGroup as z }; //# sourceMappingURL=server.mjs.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa