@untestutils/nuxt 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/config/index.d.mts +58 -0
- package/dist/config/index.d.ts +59 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.mjs +323 -0
- package/dist/config/utils.d.mts +12 -0
- package/dist/config/utils.d.ts +13 -0
- package/dist/config/utils.d.ts.map +1 -0
- package/dist/config/utils.mjs +79 -0
- package/dist/environment/index.d.mts +22 -0
- package/dist/environment/index.d.ts +23 -0
- package/dist/environment/index.d.ts.map +1 -0
- package/dist/environment/index.mjs +129 -0
- package/dist/index.d.mts +36 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +355 -0
- package/dist/module/index.d.mts +3 -0
- package/dist/module/index.d.ts +4 -0
- package/dist/module/index.d.ts.map +1 -0
- package/dist/module/index.mjs +294 -0
- package/dist/runtime/browser-entry.d.mts +5 -0
- package/dist/runtime/browser-entry.d.ts +6 -0
- package/dist/runtime/browser-entry.d.ts.map +1 -0
- package/dist/runtime/browser-entry.mjs +2 -0
- package/dist/runtime/entry.d.mts +1 -0
- package/dist/runtime/entry.d.ts +2 -0
- package/dist/runtime/entry.d.ts.map +1 -0
- package/dist/runtime/entry.mjs +9 -0
- package/dist/runtime/index.d.mts +81 -0
- package/dist/runtime/index.d.ts +82 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.mjs +156 -0
- package/dist/runtime/mocks/vue-devtools.d.mts +12 -0
- package/dist/runtime/mocks/vue-devtools.d.ts +13 -0
- package/dist/runtime/mocks/vue-devtools.d.ts.map +1 -0
- package/dist/runtime/mocks/vue-devtools.mjs +12 -0
- package/dist/runtime/nuxt-root.d.mts +3 -0
- package/dist/runtime/nuxt-root.d.ts +4 -0
- package/dist/runtime/nuxt-root.d.ts.map +1 -0
- package/dist/runtime/nuxt-root.mjs +29 -0
- package/dist/runtime/shared/environment.d.mts +52 -0
- package/dist/runtime/shared/environment.d.ts +53 -0
- package/dist/runtime/shared/environment.d.ts.map +1 -0
- package/dist/runtime/shared/environment.mjs +79 -0
- package/dist/runtime/shared/h3-v1.d.mts +7 -0
- package/dist/runtime/shared/h3-v1.d.ts +8 -0
- package/dist/runtime/shared/h3-v1.d.ts.map +1 -0
- package/dist/runtime/shared/h3-v1.mjs +50 -0
- package/dist/runtime/shared/h3-v2.d.mts +7 -0
- package/dist/runtime/shared/h3-v2.d.ts +8 -0
- package/dist/runtime/shared/h3-v2.d.ts.map +1 -0
- package/dist/runtime/shared/h3-v2.mjs +32 -0
- package/dist/runtime/shared/h3.d.mts +4 -0
- package/dist/runtime/shared/h3.d.ts +5 -0
- package/dist/runtime/shared/h3.d.ts.map +1 -0
- package/dist/runtime/shared/h3.mjs +3 -0
- package/dist/runtime/shared/nuxt.d.mts +2 -0
- package/dist/runtime/shared/nuxt.d.ts +3 -0
- package/dist/runtime/shared/nuxt.d.ts.map +1 -0
- package/dist/runtime/shared/nuxt.mjs +17 -0
- package/dist/runtime/shared/vue-wrapper-plugin.d.mts +12 -0
- package/dist/runtime/shared/vue-wrapper-plugin.d.ts +13 -0
- package/dist/runtime/shared/vue-wrapper-plugin.d.ts.map +1 -0
- package/dist/runtime/shared/vue-wrapper-plugin.mjs +42 -0
- package/dist/runtime/suspended.d.mts +45 -0
- package/dist/runtime/suspended.d.ts +46 -0
- package/dist/runtime/suspended.d.ts.map +1 -0
- package/dist/runtime/suspended.mjs +259 -0
- package/package.json +150 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const functions: never[];
|
|
2
|
+
declare function createRpcServer(): void;
|
|
3
|
+
declare const devtools: {
|
|
4
|
+
init: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare function addCustomCommand(): void;
|
|
7
|
+
declare function addCustomTab(): void;
|
|
8
|
+
declare function onDevToolsClientConnected(): void;
|
|
9
|
+
declare function onDevToolsConnected(): void;
|
|
10
|
+
declare function removeCustomCommand(): void;
|
|
11
|
+
declare function setupDevToolsPlugin(): void;
|
|
12
|
+
export { addCustomCommand, addCustomTab, createRpcServer, devtools, functions, onDevToolsClientConnected, onDevToolsConnected, removeCustomCommand, setupDevToolsPlugin };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const functions: never[];
|
|
2
|
+
declare function createRpcServer(): void;
|
|
3
|
+
declare const devtools: {
|
|
4
|
+
init: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare function addCustomCommand(): void;
|
|
7
|
+
declare function addCustomTab(): void;
|
|
8
|
+
declare function onDevToolsClientConnected(): void;
|
|
9
|
+
declare function onDevToolsConnected(): void;
|
|
10
|
+
declare function removeCustomCommand(): void;
|
|
11
|
+
declare function setupDevToolsPlugin(): void;
|
|
12
|
+
export { addCustomCommand, addCustomTab, createRpcServer, devtools, functions, onDevToolsClientConnected, onDevToolsConnected, removeCustomCommand, setupDevToolsPlugin, };
|
|
13
|
+
//# sourceMappingURL=vue-devtools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue-devtools.d.ts","sourceRoot":"","sources":["../../../src/runtime/mocks/vue-devtools.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,SAAS,EAAE,KAAK,EAAO,CAAC;AAC9B,iBAAS,eAAe,IAAI,IAAI,CAAG;AACnC,QAAA,MAAM,QAAQ,EAAE;IAAE,IAAI,EAAE,MAAM,IAAI,CAAA;CAAwB,CAAC;AAC3D,iBAAS,gBAAgB,IAAI,IAAI,CAAG;AACpC,iBAAS,YAAY,IAAI,IAAI,CAAG;AAChC,iBAAS,yBAAyB,IAAI,IAAI,CAAG;AAC7C,iBAAS,mBAAmB,IAAI,IAAI,CAAG;AACvC,iBAAS,mBAAmB,IAAI,IAAI,CAAG;AACvC,iBAAS,mBAAmB,IAAI,IAAI,CAAG;AAEvC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,SAAS,EACT,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/runtime/mocks/vue-devtools.ts
|
|
2
|
+
const functions = [];
|
|
3
|
+
function createRpcServer() {}
|
|
4
|
+
const devtools = { init() {} };
|
|
5
|
+
function addCustomCommand() {}
|
|
6
|
+
function addCustomTab() {}
|
|
7
|
+
function onDevToolsClientConnected() {}
|
|
8
|
+
function onDevToolsConnected() {}
|
|
9
|
+
function removeCustomCommand() {}
|
|
10
|
+
function setupDevToolsPlugin() {}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { addCustomCommand, addCustomTab, createRpcServer, devtools, functions, onDevToolsClientConnected, onDevToolsConnected, removeCustomCommand, setupDevToolsPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nuxt-root.d.ts","sourceRoot":"","sources":["../../src/runtime/nuxt-root.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,eAAe,EAA2C,MAAM,KAAK,CAAC;AAgCzF,QAAA,MAAM,iBAAiB,EAAE,UAAU,CAAC,OAAO,eAAe,CAkBxD,CAAC;AAEH,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import { Suspense, defineComponent, h, onErrorCaptured, provide } from "vue";
|
|
3
|
+
import { isNuxtError, useNuxtApp, useRoute } from "#imports";
|
|
4
|
+
import { PageRouteSymbol } from "#app/components/injections";
|
|
5
|
+
|
|
6
|
+
function reportVueErrorHook(nuxtApp, err, target, info) {
|
|
7
|
+
const result = nuxtApp.hooks.callHook("vue:error", err, target, info);
|
|
8
|
+
if (result === null || result === undefined || typeof result.then !== "function") return;
|
|
9
|
+
result.catch((hookError) => console.error("[nuxt] Error in `vue:error` hook", hookError));
|
|
10
|
+
}
|
|
11
|
+
function isFatalOrUnhandledNuxtError(err) {
|
|
12
|
+
if (!isNuxtError(err)) return false;
|
|
13
|
+
return "fatal" in err && Boolean(err.fatal) || "unhandled" in err && Boolean(err.unhandled);
|
|
14
|
+
}
|
|
15
|
+
//#region src/runtime/nuxt-root.ts
|
|
16
|
+
const nuxt_root_default = defineComponent({ setup(_options, { slots }) {
|
|
17
|
+
const nuxtApp = useNuxtApp();
|
|
18
|
+
provide(PageRouteSymbol, useRoute());
|
|
19
|
+
const done = nuxtApp.deferHydration();
|
|
20
|
+
const results = nuxtApp.hooks.callHookWith((hooks) => hooks.map((hook) => hook()), "vue:setup", []);
|
|
21
|
+
if (import.meta.dev && results && results.some((i) => i && "then" in i)) console.error("[nuxt] Error in `vue:setup`. Callbacks must be synchronous.");
|
|
22
|
+
onErrorCaptured((err, target, info) => {
|
|
23
|
+
reportVueErrorHook(nuxtApp, err, target, info);
|
|
24
|
+
if (isFatalOrUnhandledNuxtError(err)) return false;
|
|
25
|
+
});
|
|
26
|
+
return () => h(Suspense, { onResolve: done }, slots.default?.());
|
|
27
|
+
} });
|
|
28
|
+
//#endregion
|
|
29
|
+
export { nuxt_root_default as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createFetchForH3V1 } from "./h3-v1.mjs";
|
|
2
|
+
import { createFetchForH3V2 } from "./h3-v2.mjs";
|
|
3
|
+
type RuntimeConfig = {
|
|
4
|
+
public?: Record<string, unknown>;
|
|
5
|
+
app?: {
|
|
6
|
+
baseURL?: string;
|
|
7
|
+
buildAssetsDir?: string;
|
|
8
|
+
buildId?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type NuxtRuntimeWindow = Window & typeof globalThis & {
|
|
14
|
+
URLSearchParams: typeof globalThis.URLSearchParams;
|
|
15
|
+
Request: typeof globalThis.Request;
|
|
16
|
+
Headers: typeof globalThis.Headers;
|
|
17
|
+
IntersectionObserver?: typeof IntersectionObserver;
|
|
18
|
+
indexedDB?: IDBFactory;
|
|
19
|
+
__NUXT_VITEST_ENVIRONMENT__?: boolean;
|
|
20
|
+
__NUXT__?: {
|
|
21
|
+
serverRendered: boolean;
|
|
22
|
+
config: RuntimeConfig;
|
|
23
|
+
data: Record<string, unknown>;
|
|
24
|
+
state: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
__registry?: Set<string>;
|
|
27
|
+
__app?: Awaited<ReturnType<typeof createFetchForH3V1>>["h3App"] | Awaited<ReturnType<typeof createFetchForH3V2>>["h3App"];
|
|
28
|
+
};
|
|
29
|
+
export type EnvironmentOptions = {
|
|
30
|
+
nuxtRuntimeConfig?: RuntimeConfig;
|
|
31
|
+
nuxtAppConfig?: {
|
|
32
|
+
rootTag?: string;
|
|
33
|
+
rootAttrs?: Record<string, string | number | boolean | null | undefined>;
|
|
34
|
+
teleportTag?: string;
|
|
35
|
+
teleportAttrs?: Record<string, string | number | boolean | null | undefined>;
|
|
36
|
+
};
|
|
37
|
+
nuxt: {
|
|
38
|
+
rootId?: string;
|
|
39
|
+
h3Version?: 1 | 2;
|
|
40
|
+
url?: string;
|
|
41
|
+
domEnvironment?: "happy-dom" | "jsdom";
|
|
42
|
+
mock?: {
|
|
43
|
+
intersectionObserver?: boolean;
|
|
44
|
+
indexedDb?: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
nuxtRouteRules?: Record<string, unknown>;
|
|
48
|
+
};
|
|
49
|
+
type SetupWindowCleanup = () => void;
|
|
50
|
+
declare function setupWindow(win: NuxtRuntimeWindow, environmentOptions: EnvironmentOptions): Promise<SetupWindowCleanup>;
|
|
51
|
+
export { setupWindow };
|
|
52
|
+
export type { RuntimeConfig };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createFetchForH3V1 } from './h3-v1';
|
|
2
|
+
import { createFetchForH3V2 } from './h3-v2';
|
|
3
|
+
type RuntimeConfig = {
|
|
4
|
+
public?: Record<string, unknown>;
|
|
5
|
+
app?: {
|
|
6
|
+
baseURL?: string;
|
|
7
|
+
buildAssetsDir?: string;
|
|
8
|
+
buildId?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type NuxtRuntimeWindow = Window & typeof globalThis & {
|
|
14
|
+
URLSearchParams: typeof globalThis.URLSearchParams;
|
|
15
|
+
Request: typeof globalThis.Request;
|
|
16
|
+
Headers: typeof globalThis.Headers;
|
|
17
|
+
IntersectionObserver?: typeof IntersectionObserver;
|
|
18
|
+
indexedDB?: IDBFactory;
|
|
19
|
+
__NUXT_VITEST_ENVIRONMENT__?: boolean;
|
|
20
|
+
__NUXT__?: {
|
|
21
|
+
serverRendered: boolean;
|
|
22
|
+
config: RuntimeConfig;
|
|
23
|
+
data: Record<string, unknown>;
|
|
24
|
+
state: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
__registry?: Set<string>;
|
|
27
|
+
__app?: Awaited<ReturnType<typeof createFetchForH3V1>>['h3App'] | Awaited<ReturnType<typeof createFetchForH3V2>>['h3App'];
|
|
28
|
+
};
|
|
29
|
+
export type EnvironmentOptions = {
|
|
30
|
+
nuxtRuntimeConfig?: RuntimeConfig;
|
|
31
|
+
nuxtAppConfig?: {
|
|
32
|
+
rootTag?: string;
|
|
33
|
+
rootAttrs?: Record<string, string | number | boolean | null | undefined>;
|
|
34
|
+
teleportTag?: string;
|
|
35
|
+
teleportAttrs?: Record<string, string | number | boolean | null | undefined>;
|
|
36
|
+
};
|
|
37
|
+
nuxt: {
|
|
38
|
+
rootId?: string;
|
|
39
|
+
h3Version?: 1 | 2;
|
|
40
|
+
url?: string;
|
|
41
|
+
domEnvironment?: 'happy-dom' | 'jsdom';
|
|
42
|
+
mock?: {
|
|
43
|
+
intersectionObserver?: boolean;
|
|
44
|
+
indexedDb?: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
nuxtRouteRules?: Record<string, unknown>;
|
|
48
|
+
};
|
|
49
|
+
type SetupWindowCleanup = () => void;
|
|
50
|
+
declare function setupWindow(win: NuxtRuntimeWindow, environmentOptions: EnvironmentOptions): Promise<SetupWindowCleanup>;
|
|
51
|
+
export { setupWindow };
|
|
52
|
+
export type { RuntimeConfig };
|
|
53
|
+
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/runtime/shared/environment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,GAAG,CAAC,EAAE;QACJ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,UAAU,GAAG;IAC3D,eAAe,EAAE,OAAO,UAAU,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,OAAO,UAAU,CAAC,OAAO,CAAC;IACnC,OAAO,EAAE,OAAO,UAAU,CAAC,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,oBAAoB,CAAC;IACnD,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,EAAE;QACT,cAAc,EAAE,OAAO,CAAC;QACxB,MAAM,EAAE,aAAa,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;IACF,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;CAC3H,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,aAAa,CAAC,EAAE;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;QACzE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;KAC9E,CAAC;IACF,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;QAClB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,cAAc,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;QACvC,IAAI,CAAC,EAAE;YACL,oBAAoB,CAAC,EAAE,OAAO,CAAC;YAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;SACrB,CAAC;KACH,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C,CAAC;AACF,KAAK,kBAAkB,GAAG,MAAM,IAAI,CAAC;AAGrC,iBAAe,WAAW,CACxB,GAAG,EAAE,iBAAiB,EACtB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,kBAAkB,CAAC,CAsF7B;AAcD,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineEventHandler } from "./h3.mjs";
|
|
2
|
+
import { createFetchForH3V1 } from "./h3-v1.mjs";
|
|
3
|
+
import { createFetchForH3V2 } from "./h3-v2.mjs";
|
|
4
|
+
import { createFetch } from "ofetch";
|
|
5
|
+
import { joinURL } from "ufo";
|
|
6
|
+
import { createRouter, exportMatcher, toRouteMatcher } from "radix3";
|
|
7
|
+
//#region src/runtime/shared/environment.ts
|
|
8
|
+
async function setupWindow(win, environmentOptions) {
|
|
9
|
+
win.__NUXT_VITEST_ENVIRONMENT__ = true;
|
|
10
|
+
win.__NUXT__ = {
|
|
11
|
+
serverRendered: false,
|
|
12
|
+
config: {
|
|
13
|
+
public: {},
|
|
14
|
+
app: { baseURL: "/" },
|
|
15
|
+
...environmentOptions?.nuxtRuntimeConfig
|
|
16
|
+
},
|
|
17
|
+
data: {},
|
|
18
|
+
state: {}
|
|
19
|
+
};
|
|
20
|
+
const consoleInfo = console.info;
|
|
21
|
+
console.info = (...args) => {
|
|
22
|
+
if (args[0] === "<Suspense> is an experimental feature and its API will likely change.") return;
|
|
23
|
+
return consoleInfo(...args);
|
|
24
|
+
};
|
|
25
|
+
const appConfig = environmentOptions.nuxtAppConfig;
|
|
26
|
+
createElementAndAppend(win, appConfig?.rootTag || "div", {
|
|
27
|
+
...appConfig?.rootAttrs,
|
|
28
|
+
id: environmentOptions.nuxt.rootId || appConfig?.rootAttrs?.id || "nuxt-test"
|
|
29
|
+
});
|
|
30
|
+
createElementAndAppend(win, appConfig?.teleportTag || "div", appConfig?.teleportAttrs || { id: "teleports" });
|
|
31
|
+
if (!win.fetch || !("Request" in win)) {
|
|
32
|
+
await import("node-fetch-native/polyfill");
|
|
33
|
+
win.URLSearchParams = globalThis.URLSearchParams;
|
|
34
|
+
win.Request ??= class Request extends globalThis.Request {
|
|
35
|
+
constructor(input, init) {
|
|
36
|
+
if (typeof input === "string") super(new URL(input, win.location.origin), init);
|
|
37
|
+
else super(input, init);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const res = environmentOptions.nuxt.h3Version === 2 ? await createFetchForH3V2() : await createFetchForH3V1();
|
|
42
|
+
win.fetch = res.fetch;
|
|
43
|
+
|
|
44
|
+
Reflect.set(win, "$fetch", createFetch({
|
|
45
|
+
fetch: win.fetch,
|
|
46
|
+
Headers: win.Headers
|
|
47
|
+
}));
|
|
48
|
+
win.__registry = res.registry;
|
|
49
|
+
win.__app = res.h3App;
|
|
50
|
+
const timestamp = Date.now();
|
|
51
|
+
const routeRulesMatcher = toRouteMatcher(createRouter({ routes: environmentOptions.nuxtRouteRules || {} }));
|
|
52
|
+
const matcher = exportMatcher(routeRulesMatcher);
|
|
53
|
+
const manifestOutputPath = joinURL(environmentOptions.nuxtRuntimeConfig?.app?.baseURL || "/", environmentOptions.nuxtRuntimeConfig?.app?.buildAssetsDir || "_nuxt", "builds");
|
|
54
|
+
const manifestBaseRoutePath = joinURL("/_", manifestOutputPath);
|
|
55
|
+
const buildId = win.__NUXT__?.config.app?.buildId || "test";
|
|
56
|
+
res.h3App.use(`${manifestBaseRoutePath}/latest.json`, defineEventHandler(() => ({
|
|
57
|
+
id: buildId,
|
|
58
|
+
timestamp
|
|
59
|
+
})));
|
|
60
|
+
res.h3App.use(`${manifestBaseRoutePath}/meta/${buildId}.json`, defineEventHandler(() => ({
|
|
61
|
+
id: buildId,
|
|
62
|
+
timestamp,
|
|
63
|
+
matcher,
|
|
64
|
+
prerendered: []
|
|
65
|
+
})));
|
|
66
|
+
res.registry.add(`${manifestOutputPath}/latest.json`);
|
|
67
|
+
res.registry.add(`${manifestOutputPath}/meta/${buildId}.json`);
|
|
68
|
+
return () => {
|
|
69
|
+
console.info = consoleInfo;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function createElementAndAppend(win, tag, attrs) {
|
|
73
|
+
if (attrs?.id && win.document.getElementById(String(attrs.id))) return;
|
|
74
|
+
const element = win.document.createElement(tag);
|
|
75
|
+
for (const [key, value] of Object.entries(attrs ?? {})) if (value !== false && value !== null && value !== undefined) element.setAttribute(key, value === true ? "" : String(value));
|
|
76
|
+
win.document.body.appendChild(element);
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { setupWindow };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type H3V1FetchResult = {
|
|
2
|
+
h3App: Awaited<ReturnType<typeof import('h3')['createApp']>>;
|
|
3
|
+
registry: Set<string>;
|
|
4
|
+
fetch: typeof fetch;
|
|
5
|
+
};
|
|
6
|
+
export declare function createFetchForH3V1(): Promise<H3V1FetchResult>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=h3-v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h3-v1.d.ts","sourceRoot":"","sources":["../../../src/runtime/shared/h3-v1.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,cAAc,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC7D,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;AAEF,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC,CAsCnE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export async function createFetchForH3V1() {
|
|
2
|
+
const [{ createApp, toNodeListener, splitCookiesString }, { fetchNodeRequestHandler }] = await Promise.all([import("h3"), import("node-mock-http")]);
|
|
3
|
+
const h3App = createApp();
|
|
4
|
+
const nodeHandler = toNodeListener(h3App);
|
|
5
|
+
const registry = new Set();
|
|
6
|
+
const _fetch = fetch;
|
|
7
|
+
const h3Fetch = async (input, _init) => {
|
|
8
|
+
let url;
|
|
9
|
+
let init = _init;
|
|
10
|
+
if (typeof input === "string") url = input;
|
|
11
|
+
else if (input instanceof URL) url = input.toString();
|
|
12
|
+
else {
|
|
13
|
+
url = input.url;
|
|
14
|
+
init = {
|
|
15
|
+
method: init?.method ?? input.method,
|
|
16
|
+
body: init?.body ?? input.body,
|
|
17
|
+
headers: init?.headers ?? input.headers
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const base = url.split("?")[0];
|
|
21
|
+
if (registry.has(base) || registry.has(url)) url = "/_" + url;
|
|
22
|
+
if (url.startsWith("/")) return normalizeFetchResponse(await fetchNodeRequestHandler(nodeHandler, url, init), splitCookiesString);
|
|
23
|
+
return _fetch(input, _init);
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
h3App,
|
|
27
|
+
registry,
|
|
28
|
+
fetch: h3Fetch
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function normalizeFetchResponse(response, splitCookiesString) {
|
|
32
|
+
if (!response.headers.has("set-cookie")) return response;
|
|
33
|
+
return new Response(response.body, {
|
|
34
|
+
status: response.status,
|
|
35
|
+
statusText: response.statusText,
|
|
36
|
+
headers: normalizeCookieHeaders(response.headers, splitCookiesString)
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function normalizeCookieHeaders(headers, splitCookiesString) {
|
|
40
|
+
const outgoingHeaders = new Headers();
|
|
41
|
+
for (const [name, header] of headers) {
|
|
42
|
+
if (name === "set-cookie") {
|
|
43
|
+
for (const cookie of splitCookiesString(joinHeaders(header))) outgoingHeaders.append("set-cookie", cookie);
|
|
44
|
+
} else outgoingHeaders.set(name, joinHeaders(header));
|
|
45
|
+
}
|
|
46
|
+
return outgoingHeaders;
|
|
47
|
+
}
|
|
48
|
+
function joinHeaders(value) {
|
|
49
|
+
return Array.isArray(value) ? value.join(", ") : String(value);
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h3-v2.d.ts","sourceRoot":"","sources":["../../../src/runtime/shared/h3-v2.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,YAAY,CAAC,cAAc,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;AAEF,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC,CAgCnE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export async function createFetchForH3V2() {
|
|
2
|
+
const { H3 } = await import("h3-next/generic");
|
|
3
|
+
const h3App = new H3();
|
|
4
|
+
const registry = new Set();
|
|
5
|
+
const _fetch = fetch;
|
|
6
|
+
const h3Fetch = async (input, _init) => {
|
|
7
|
+
let url;
|
|
8
|
+
let init = _init;
|
|
9
|
+
if (typeof input === "string") url = input;
|
|
10
|
+
else if (input instanceof URL) url = input.toString();
|
|
11
|
+
else {
|
|
12
|
+
url = input.url;
|
|
13
|
+
init = {
|
|
14
|
+
method: init?.method ?? input.method,
|
|
15
|
+
body: init?.body ?? input.body,
|
|
16
|
+
headers: init?.headers ?? input.headers
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const base = url.split("?")[0];
|
|
20
|
+
if (registry.has(base) || registry.has(url)) return h3App.fetch(new Request("/_" + url, init));
|
|
21
|
+
if (url.startsWith("/")) return new Response("Not Found", {
|
|
22
|
+
status: 404,
|
|
23
|
+
statusText: "Not Found"
|
|
24
|
+
});
|
|
25
|
+
return _fetch(input, _init);
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
h3App,
|
|
29
|
+
registry,
|
|
30
|
+
fetch: h3Fetch
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h3.d.ts","sourceRoot":"","sources":["../../../src/runtime/shared/h3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAEvC,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,YAAY,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG;IAAE,cAAc,EAAE,IAAI,CAAA;CAAE,CAEnG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nuxt.d.ts","sourceRoot":"","sources":["../../../src/runtime/shared/nuxt.ts"],"names":[],"mappings":"AAQA,kGAAkG;AAClG,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAe/C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { getVueWrapperPlugin } from "./vue-wrapper-plugin.mjs";
|
|
3
|
+
|
|
4
|
+
export async function setupNuxt() {
|
|
5
|
+
const { useRouter, useNuxtApp } = await import("#imports");
|
|
6
|
+
await import("#app/nuxt-vitest-app-entry").then((r) => r.default());
|
|
7
|
+
const nuxtApp = useNuxtApp();
|
|
8
|
+
function sync() {
|
|
9
|
+
return nuxtApp._route.sync ? nuxtApp._route.sync() : nuxtApp.callHook("page:finish");
|
|
10
|
+
}
|
|
11
|
+
const { hasNuxtPage } = getVueWrapperPlugin();
|
|
12
|
+
useRouter().afterEach(() => {
|
|
13
|
+
if (hasNuxtPage()) return;
|
|
14
|
+
return sync();
|
|
15
|
+
});
|
|
16
|
+
return sync();
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VueWrapper } from "@vue/test-utils";
|
|
2
|
+
declare const PLUGIN_NAME = "nuxt-test-utils";
|
|
3
|
+
type VueWrapperPluginOptions = {
|
|
4
|
+
_name: typeof PLUGIN_NAME;
|
|
5
|
+
_instances: WeakRef<VueWrapper>[];
|
|
6
|
+
readonly instances: VueWrapper[];
|
|
7
|
+
addInstance: (instance: VueWrapper) => void;
|
|
8
|
+
hasNuxtPage: () => boolean;
|
|
9
|
+
_hasComponent: (componentName: string) => boolean;
|
|
10
|
+
};
|
|
11
|
+
declare function getVueWrapperPlugin(): Pick<VueWrapperPluginOptions, "hasNuxtPage">;
|
|
12
|
+
export { getVueWrapperPlugin };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { VueWrapper } from '@vue/test-utils';
|
|
2
|
+
declare const PLUGIN_NAME = "nuxt-test-utils";
|
|
3
|
+
type VueWrapperPluginOptions = {
|
|
4
|
+
_name: typeof PLUGIN_NAME;
|
|
5
|
+
_instances: WeakRef<VueWrapper>[];
|
|
6
|
+
readonly instances: VueWrapper[];
|
|
7
|
+
addInstance: (instance: VueWrapper) => void;
|
|
8
|
+
hasNuxtPage: () => boolean;
|
|
9
|
+
_hasComponent: (componentName: string) => boolean;
|
|
10
|
+
};
|
|
11
|
+
declare function getVueWrapperPlugin(): Pick<VueWrapperPluginOptions, 'hasNuxtPage'>;
|
|
12
|
+
export { getVueWrapperPlugin };
|
|
13
|
+
//# sourceMappingURL=vue-wrapper-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue-wrapper-plugin.d.ts","sourceRoot":"","sources":["../../../src/runtime/shared/vue-wrapper-plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,QAAA,MAAM,WAAW,oBAAoB,CAAC;AAEtC,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,OAAO,WAAW,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC;IACjC,WAAW,EAAE,CAAC,QAAQ,EAAE,UAAU,KAAK,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,aAAa,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC;CACnD,CAAC;AAEF,iBAAS,mBAAmB,IAAI,IAAI,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAY3E;AA+BD,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const PLUGIN_NAME = "nuxt-test-utils";
|
|
2
|
+
const config = await import("@vue/test-utils").then((r) => r.config).catch(() => void 0);
|
|
3
|
+
function getVueWrapperPlugin() {
|
|
4
|
+
if (!config) return { hasNuxtPage: () => false };
|
|
5
|
+
const installed = config.plugins.VueWrapper.installedPlugins.find(({ options }) => options?._name === PLUGIN_NAME);
|
|
6
|
+
if (installed) return installed.options;
|
|
7
|
+
const options = createPluginOptions();
|
|
8
|
+
config.plugins.VueWrapper.install((instance, options) => {
|
|
9
|
+
options.addInstance(instance);
|
|
10
|
+
return {};
|
|
11
|
+
}, options);
|
|
12
|
+
return options;
|
|
13
|
+
}
|
|
14
|
+
function createPluginOptions() {
|
|
15
|
+
const options = {
|
|
16
|
+
_name: PLUGIN_NAME,
|
|
17
|
+
_instances: [],
|
|
18
|
+
get instances() {
|
|
19
|
+
const instances = [];
|
|
20
|
+
options._instances = options._instances.filter((ref) => {
|
|
21
|
+
const instance = ref.deref();
|
|
22
|
+
if (!instance) return false;
|
|
23
|
+
instances.push(instance);
|
|
24
|
+
return true;
|
|
25
|
+
});
|
|
26
|
+
return instances;
|
|
27
|
+
},
|
|
28
|
+
addInstance(instance) {
|
|
29
|
+
if (options.instances.includes(instance)) return;
|
|
30
|
+
options._instances.push(new WeakRef(instance));
|
|
31
|
+
},
|
|
32
|
+
hasNuxtPage() {
|
|
33
|
+
return options._hasComponent("NuxtPage");
|
|
34
|
+
},
|
|
35
|
+
_hasComponent(componentName) {
|
|
36
|
+
return options.instances.some((v) => v.exists() && v.findComponent({ name: componentName }).exists());
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return options;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { getVueWrapperPlugin };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type App, type Component, type VNode } from "vue";
|
|
2
|
+
type SetupState = Record<string, unknown>;
|
|
3
|
+
type Cleanup = () => void;
|
|
4
|
+
type MountingLikeOptions = import("@vue/test-utils").MountingOptions<Component> & {
|
|
5
|
+
route?: import("vue-router").RouteLocationRaw | false;
|
|
6
|
+
scoped?: boolean;
|
|
7
|
+
spy?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type WrapperFn = (component: Component, options?: unknown) => unknown;
|
|
10
|
+
type WrapperSuspendedConfig = {
|
|
11
|
+
wrapperFn: WrapperFn;
|
|
12
|
+
wrappedRender?: (render: () => VNode) => () => VNode;
|
|
13
|
+
suspendedHelperName: string;
|
|
14
|
+
clonedComponentName: string;
|
|
15
|
+
stubRouterLink?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type WrapperSuspendedResult<TWrapper> = {
|
|
18
|
+
wrapper: TWrapper & {
|
|
19
|
+
setupState: SetupState;
|
|
20
|
+
};
|
|
21
|
+
setProps: (props: Record<string, unknown>) => void;
|
|
22
|
+
cleanup: Cleanup;
|
|
23
|
+
};
|
|
24
|
+
type VueAppWithInternals = App<Element> & Record<string, unknown>;
|
|
25
|
+
type NuxtUnctx = {
|
|
26
|
+
get: (name: "nuxt-app") => {
|
|
27
|
+
tryUse: () => {
|
|
28
|
+
vueApp: VueAppWithInternals;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
declare global {
|
|
33
|
+
interface Window {
|
|
34
|
+
__cleanup?: Cleanup[];
|
|
35
|
+
}
|
|
36
|
+
var __unctx__: NuxtUnctx;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* `wrapper.setProps` delegates to this `@vue/test-utils` internal when the wrapper is the mount
|
|
40
|
+
* root, which is the case for the component we mount around the suspended component.
|
|
41
|
+
*/
|
|
42
|
+
declare function patchWrapperSetProps(wrapper: object, setProps: (props: Record<string, unknown>) => void): void;
|
|
43
|
+
declare function cleanupAll(): void;
|
|
44
|
+
declare function wrapperSuspended<TWrapper>(component: Component, options: MountingLikeOptions | undefined, { wrapperFn, wrappedRender, suspendedHelperName, clonedComponentName, stubRouterLink }: WrapperSuspendedConfig): Promise<WrapperSuspendedResult<TWrapper>>;
|
|
45
|
+
export { cleanupAll, patchWrapperSetProps, wrapperSuspended };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type App, type Component, type VNode } from 'vue';
|
|
2
|
+
type SetupState = Record<string, unknown>;
|
|
3
|
+
type Cleanup = () => void;
|
|
4
|
+
type MountingLikeOptions = import('@vue/test-utils').MountingOptions<Component> & {
|
|
5
|
+
route?: import('vue-router').RouteLocationRaw | false;
|
|
6
|
+
scoped?: boolean;
|
|
7
|
+
spy?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type WrapperFn = (component: Component, options?: unknown) => unknown;
|
|
10
|
+
type WrapperSuspendedConfig = {
|
|
11
|
+
wrapperFn: WrapperFn;
|
|
12
|
+
wrappedRender?: (render: () => VNode) => () => VNode;
|
|
13
|
+
suspendedHelperName: string;
|
|
14
|
+
clonedComponentName: string;
|
|
15
|
+
stubRouterLink?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type WrapperSuspendedResult<TWrapper> = {
|
|
18
|
+
wrapper: TWrapper & {
|
|
19
|
+
setupState: SetupState;
|
|
20
|
+
};
|
|
21
|
+
setProps: (props: Record<string, unknown>) => void;
|
|
22
|
+
cleanup: Cleanup;
|
|
23
|
+
};
|
|
24
|
+
type VueAppWithInternals = App<Element> & Record<string, unknown>;
|
|
25
|
+
type NuxtUnctx = {
|
|
26
|
+
get: (name: 'nuxt-app') => {
|
|
27
|
+
tryUse: () => {
|
|
28
|
+
vueApp: VueAppWithInternals;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
declare global {
|
|
33
|
+
interface Window {
|
|
34
|
+
__cleanup?: Cleanup[];
|
|
35
|
+
}
|
|
36
|
+
var __unctx__: NuxtUnctx;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* `wrapper.setProps` delegates to this `@vue/test-utils` internal when the wrapper is the mount
|
|
40
|
+
* root, which is the case for the component we mount around the suspended component.
|
|
41
|
+
*/
|
|
42
|
+
declare function patchWrapperSetProps(wrapper: object, setProps: (props: Record<string, unknown>) => void): void;
|
|
43
|
+
declare function cleanupAll(): void;
|
|
44
|
+
declare function wrapperSuspended<TWrapper>(component: Component, options: MountingLikeOptions | undefined, { wrapperFn, wrappedRender, suspendedHelperName, clonedComponentName, stubRouterLink, }: WrapperSuspendedConfig): Promise<WrapperSuspendedResult<TWrapper>>;
|
|
45
|
+
export { cleanupAll, patchWrapperSetProps, wrapperSuspended };
|
|
46
|
+
//# sourceMappingURL=suspended.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suspended.d.ts","sourceRoot":"","sources":["../../src/runtime/suspended.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,GAAG,EACR,KAAK,SAAS,EAKd,KAAK,KAAK,EAMX,MAAM,KAAK,CAAC;AAKb,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1C,KAAK,OAAO,GAAG,MAAM,IAAI,CAAC;AAE1B,KAAK,mBAAmB,GAAG,OAAO,iBAAiB,EAAE,eAAe,CAAC,SAAS,CAAC,GAAG;IAChF,KAAK,CAAC,EAAE,OAAO,YAAY,EAAE,gBAAgB,GAAG,KAAK,CAAC;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AACF,KAAK,SAAS,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;AACtE,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,KAAK,MAAM,KAAK,CAAC;IACrD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AACF,KAAK,sBAAsB,CAAC,QAAQ,IAAI;IACtC,OAAO,EAAE,QAAQ,GAAG;QAAE,UAAU,EAAE,UAAU,CAAA;KAAE,CAAC;IAC/C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACnD,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AACF,KAAK,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAQlE,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK;QAAE,MAAM,EAAE,MAAM;YAAE,MAAM,EAAE,mBAAmB,CAAA;SAAE,CAAA;KAAE,CAAC;CAC9E,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;KACvB;IAID,IAAI,SAAS,EAAE,SAAS,CAAC;CAC1B;AAwFD;;;GAGG;AACH,iBAAS,oBAAoB,CAC3B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GACjD,IAAI,CAEN;AACD,iBAAS,UAAU,IAAI,IAAI,CAE1B;AAcD,iBAAS,gBAAgB,CAAC,QAAQ,EAChC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,mBAAmB,GAAG,SAAc,EAC7C,EACE,SAAS,EACT,aAAuC,EACvC,mBAAmB,EACnB,mBAAmB,EACnB,cAAqB,GACtB,EAAE,sBAAsB,GACxB,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,CAmJ3C;AAuDD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC"}
|