nuxt-graphql-middleware 5.3.2 → 5.4.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.
@@ -0,0 +1 @@
1
+ import{d as z,u as A,a as N,o as E,b as O,r as H,c as I,e as U,h as P,f as T,p as D,g as V,s as F,i as M,j as B,k as $,l as c,n as W,m,q as G,t as j,v as K,w as Q,x as J,y as X,_ as Y,z as Z,A as ee,B as _,C as R,D as te,E as ne,F as re}from"./COm8IXFv.js";import{u as ae}from"./DE0CPK20.js";const ie=(...t)=>t.find(i=>i!==void 0);function oe(t){const i=t.componentName||"NuxtLink";function f(e){return typeof e=="string"&&e.startsWith("#")}function C(e,o,h){const n=h??t.trailingSlash;if(!e||n!=="append"&&n!=="remove")return e;if(typeof e=="string")return L(e,n);const s="path"in e&&e.path!==void 0?e.path:o(e).path;return{...e,name:void 0,path:L(s,n)}}function S(e){const o=A(),h=K(),n=m(()=>!!c(e.target)&&c(e.target)!=="_self"),s=m(()=>{const l=c(e.to)||c(e.href)||"";return typeof l=="string"&&j(l,{acceptRelative:!0})}),b=T("RouterLink"),g=b&&typeof b!="string"?b.useLink:void 0,d=m(()=>{if(c(e.external))return!0;const l=c(e.to)||c(e.href)||"";return typeof l=="object"?!1:l===""||s.value}),a=m(()=>{const l=c(e.to)||c(e.href)||"";return d.value?l:C(l,o.resolve,c(e.trailingSlash))}),p=d.value?void 0:g?.({...e,to:a,viewTransition:c(e.viewTransition)}),y=m(()=>{const l=c(e.trailingSlash)??t.trailingSlash;if(!a.value||s.value||f(a.value))return a.value;if(d.value){const k=typeof a.value=="object"&&"path"in a.value?B(a.value):a.value,w=typeof k=="object"?o.resolve(k).href:k;return L(w,l)}return typeof a.value=="object"?o.resolve(a.value)?.href??null:L(G(h.app.baseURL,a.value),l)});return{to:a,hasTarget:n,isAbsoluteUrl:s,isExternal:d,href:y,isActive:p?.isActive??m(()=>a.value===o.currentRoute.value.path),isExactActive:p?.isExactActive??m(()=>a.value===o.currentRoute.value.path),route:p?.route??m(()=>o.resolve(a.value)),async navigate(l){await W(y.value,{replace:c(e.replace),external:d.value||n.value})}}}return z({name:i,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:S,setup(e,{slots:o}){const h=A(),{to:n,href:s,navigate:b,isExternal:g,hasTarget:d,isAbsoluteUrl:a}=S(e),p=F(!1),y=M(null),l=u=>{y.value=e.custom?u?.$el?.nextElementSibling:u?.$el};function k(u){return!p.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===u:e.prefetchOn?.[u]??t.prefetchOn?.[u])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!ce()}async function w(u=N()){if(p.value)return;p.value=!0;const v=typeof n.value=="string"?n.value:g.value?B(n.value):h.resolve(n.value).fullPath,r=g.value?new URL(v,window.location.href).href:v;await Promise.all([u.hooks.callHook("link:prefetch",r)?.catch(()=>{}),!g.value&&!d.value&&$(n.value,h).catch(()=>{})])}if(k("visibility")){const u=N();let v,r=null;E(()=>{const x=le();O(()=>{v=H(()=>{y?.value?.tagName&&(r=x.observe(y.value,async()=>{r?.(),r=null,await w(u)}))})})}),I(()=>{v&&U(v),r?.(),r=null})}return()=>{if(!g.value&&!d.value&&!f(n.value)){const r={ref:l,to:n.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(k("interaction")&&(r.onPointerenter=w.bind(null,void 0),r.onFocus=w.bind(null,void 0)),p.value&&(r.class=e.prefetchedClass||t.prefetchedClass),r.rel=e.rel||void 0),P(T("RouterLink"),r,o.default)}const u=e.target||null,v=ie(e.noRel?"":e.rel,t.externalRelAttribute,a.value||d.value?"noopener noreferrer":"")||null;return e.custom?o.default?o.default({href:s.value,navigate:b,prefetch:w,get route(){if(!s.value)return;const r=new URL(s.value,window.location.href);return{path:r.pathname,fullPath:r.pathname,get query(){return D(r.search)},hash:r.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:s.value}},rel:v,target:u,isExternal:g.value||d.value,isActive:!1,isExactActive:!1}):null:P("a",{ref:y,href:s.value||null,rel:v,target:u,onClick:async r=>{if(!(g.value||d.value)){r.preventDefault();try{const x=V(s.value);return await(e.replace?h.replace(x):h.push(x))}finally{if(f(n.value)){const x=n.value.slice(1);let q=x;try{q=decodeURIComponent(x)}catch{}document.getElementById(q)?.focus()}}}}},o.default?.())}}})}const se=oe(X);function L(t,i){const f=i==="append"?Q:J;return j(t)&&!t.startsWith("http")?t:f(t,!0)}function le(){const t=N();if(t._observer)return t._observer;let i=null;const f=new Map,C=(e,o)=>(i||=new IntersectionObserver(h=>{for(const n of h){const s=f.get(n.target);(n.isIntersecting||n.intersectionRatio>0)&&s&&s()}}),f.set(e,o),i.observe(e),()=>{f.delete(e),i?.unobserve(e),f.size===0&&(i?.disconnect(),i=null)});return t._observer={observe:C}}const ue=/2g/;function ce(){const t=navigator.connection;return!!(t&&(t.saveData||ue.test(t.effectiveType)))}const fe={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},de={class:"max-w-520px text-center"},he=["textContent"],ve=["textContent"],ge=["textContent"],pe={class:"flex items-center justify-center w-full"},me={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const i=t;return ae({title:`${i.status} - ${i.statusText} | ${i.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(f,C)=>{const S=se;return Z(),ee("div",fe,[_("div",de,[_("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:R(t.status)},null,8,he),_("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:R(t.statusText)},null,8,ve),_("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:R(t.description)},null,8,ge),_("div",pe,[te(S,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:ne(()=>[re(R(t.backHome),1)]),_:1})])])])}}},ke=Y(me,[["__scopeId","data-v-204d37bf"]]);export{ke as default};
@@ -1 +1 @@
1
- {"id":"2c5ed43d-9467-443e-93e6-e7235fa0768c","timestamp":1767614391495}
1
+ {"id":"4a6a9918-ee87-4546-828f-e61802bd94e6","timestamp":1775728425457}
@@ -0,0 +1 @@
1
+ {"id":"4a6a9918-ee87-4546-828f-e61802bd94e6","timestamp":1775728425457,"prerendered":[]}
@@ -0,0 +1 @@
1
+ .grid[data-v-204d37bf]{display:grid}.mb-2[data-v-204d37bf]{margin-bottom:.5rem}.mb-4[data-v-204d37bf]{margin-bottom:1rem}.max-w-520px[data-v-204d37bf]{max-width:520px}.min-h-screen[data-v-204d37bf]{min-height:100vh}.w-full[data-v-204d37bf]{width:100%}.flex[data-v-204d37bf]{display:flex}.place-content-center[data-v-204d37bf]{place-content:center}.items-center[data-v-204d37bf]{align-items:center}.justify-center[data-v-204d37bf]{justify-content:center}.overflow-hidden[data-v-204d37bf]{overflow:hidden}.bg-white[data-v-204d37bf]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-204d37bf]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-204d37bf]{text-align:center}.text-\[80px\][data-v-204d37bf]{font-size:80px}.text-2xl[data-v-204d37bf]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-204d37bf]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-204d37bf]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-204d37bf]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-204d37bf]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-204d37bf]{font-weight:500}.font-semibold[data-v-204d37bf]{font-weight:600}.leading-none[data-v-204d37bf]{line-height:1}.tracking-wide[data-v-204d37bf]{letter-spacing:.025em}.font-sans[data-v-204d37bf]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-204d37bf]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-204d37bf]{text-decoration-line:underline}.underline-offset-3[data-v-204d37bf]{text-underline-offset:3px}.antialiased[data-v-204d37bf]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-204d37bf]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-204d37bf]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-204d37bf]{font-size:110px}.sm\:text-3xl[data-v-204d37bf]{font-size:1.875rem;line-height:2.25rem}}
@@ -0,0 +1 @@
1
+ .grid[data-v-d349100d]{display:grid}.mb-2[data-v-d349100d]{margin-bottom:.5rem}.mb-4[data-v-d349100d]{margin-bottom:1rem}.max-w-520px[data-v-d349100d]{max-width:520px}.min-h-screen[data-v-d349100d]{min-height:100vh}.place-content-center[data-v-d349100d]{place-content:center}.overflow-hidden[data-v-d349100d]{overflow:hidden}.bg-white[data-v-d349100d]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-d349100d]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-d349100d]{text-align:center}.text-\[80px\][data-v-d349100d]{font-size:80px}.text-2xl[data-v-d349100d]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-d349100d]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-d349100d]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-d349100d]{font-weight:600}.leading-none[data-v-d349100d]{line-height:1}.tracking-wide[data-v-d349100d]{letter-spacing:.025em}.font-sans[data-v-d349100d]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-d349100d]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-d349100d]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-d349100d]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-d349100d]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-d349100d]{font-size:110px}.sm\:text-3xl[data-v-d349100d]{font-size:1.875rem;line-height:2.25rem}}
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-graphql-middleware/_nuxt/entry.Cyocd7ae.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/DrXVleME.js"><script type="module" src="/__nuxt-graphql-middleware/_nuxt/DrXVleME.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1767614393800,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"2c5ed43d-9467-443e-93e6-e7235fa0768c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-graphql-middleware/_nuxt/entry.Cyocd7ae.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/COm8IXFv.js"><script type="module" src="/__nuxt-graphql-middleware/_nuxt/COm8IXFv.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"4a6a9918-ee87-4546-828f-e61802bd94e6",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775728427431,false]</script></body></html>
package/dist/module.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import { M as ModuleContext, a as ModuleOptions } from './shared/nuxt-graphql-middleware.B34q074V.mjs';
2
+ import { M as ModuleContext, a as ModuleOptions } from './shared/nuxt-graphql-middleware.CEtZRi7d.mjs';
3
3
  import { OperationResponseError } from '../dist/runtime/types.js';
4
4
  import { HookResult } from 'nuxt/schema';
5
5
  import { GeneratorOutput } from 'graphql-typescript-deluxe';
@@ -33,7 +33,7 @@ declare module 'vite/types/customEvent.d.ts' {
33
33
  };
34
34
  }
35
35
  }
36
- declare module '@nuxt/schema' {
36
+ declare module 'nuxt/schema' {
37
37
  interface AppConfig {
38
38
  graphqlMiddleware: {
39
39
  /**
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-graphql-middleware",
3
3
  "configKey": "graphqlMiddleware",
4
- "version": "5.3.2",
4
+ "version": "5.4.0",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.17.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -17,11 +17,11 @@ import { ConfirmPrompt } from '@clack/core';
17
17
  import isUnicodeSupported from 'is-unicode-supported';
18
18
  import { hash } from 'ohash';
19
19
  import { existsSync as existsSync$1 } from 'fs';
20
- import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
20
+ import { addCustomTab, onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
21
21
  import { defineEventHandler, readBody, createError } from 'h3';
22
22
 
23
23
  const name = "nuxt-graphql-middleware";
24
- const version = "5.3.2";
24
+ const version = "5.4.0";
25
25
 
26
26
  const logger = useLogger("nuxt-graphql-middleware");
27
27
  const defaultOptions = {
@@ -1051,15 +1051,27 @@ class ModuleHelper {
1051
1051
  return this.options.downloadSchema;
1052
1052
  }
1053
1053
  /**
1054
- * Find the path to the graphqlMiddleware.serverOptions.ts file.
1054
+ * Find a file across all Nuxt layers. The first layer (main app) takes
1055
+ * precedence over extended layers.
1055
1056
  */
1057
+ findInLayers(fileName, getDir) {
1058
+ for (const layer of this.nuxt.options._layers) {
1059
+ const dir = getDir(layer);
1060
+ const resolver = createResolver(dir);
1061
+ const found = fileExists(resolver.resolve(fileName));
1062
+ if (found) {
1063
+ return found;
1064
+ }
1065
+ }
1066
+ return null;
1067
+ }
1056
1068
  findServerOptions() {
1057
- const newPath = this.resolvers.server.resolve(
1058
- "graphqlMiddleware.serverOptions"
1069
+ const found = this.findInLayers(
1070
+ "graphqlMiddleware.serverOptions",
1071
+ (layer) => layer.config.serverDir ?? layer.config.rootDir + "/server"
1059
1072
  );
1060
- const serverPath = fileExists(newPath);
1061
- if (serverPath) {
1062
- return serverPath;
1073
+ if (found) {
1074
+ return found;
1063
1075
  }
1064
1076
  const candidates = [
1065
1077
  this.resolvers.root.resolve("graphqlMiddleware.serverOptions"),
@@ -1081,13 +1093,10 @@ class ModuleHelper {
1081
1093
  return null;
1082
1094
  }
1083
1095
  findClientOptions() {
1084
- const clientOptionsPath = this.resolvers.app.resolve(
1085
- "graphqlMiddleware.clientOptions"
1096
+ return this.findInLayers(
1097
+ "graphqlMiddleware.clientOptions",
1098
+ (layer) => layer.config.appDir ?? layer.config.srcDir
1086
1099
  );
1087
- if (fileExists(clientOptionsPath)) {
1088
- return clientOptionsPath;
1089
- }
1090
- return null;
1091
1100
  }
1092
1101
  /**
1093
1102
  * Transform the path relative to the module's build directory.
@@ -1816,20 +1825,18 @@ function setupDevToolsUI(nuxt, clientPath) {
1816
1825
  };
1817
1826
  });
1818
1827
  }
1819
- nuxt.hook("devtools:customTabs", (tabs) => {
1820
- tabs.push({
1821
- // unique identifier
1822
- name: "nuxt-graphql-middleware",
1823
- // title to display in the tab
1824
- title: "GraphQL Middleware",
1825
- // any icon from Iconify, or a URL to an image
1826
- icon: "akar-icons:graphql-fill",
1827
- // iframe view
1828
- view: {
1829
- type: "iframe",
1830
- src: DEVTOOLS_UI_ROUTE
1831
- }
1832
- });
1828
+ addCustomTab({
1829
+ // unique identifier
1830
+ name: "nuxt-graphql-middleware",
1831
+ // title to display in the tab
1832
+ title: "GraphQL Middleware",
1833
+ // any icon from Iconify, or a URL to an image
1834
+ icon: "akar-icons:graphql-fill",
1835
+ // iframe view
1836
+ view: {
1837
+ type: "iframe",
1838
+ src: DEVTOOLS_UI_ROUTE
1839
+ }
1833
1840
  });
1834
1841
  }
1835
1842
 
@@ -20,12 +20,6 @@ export function useAsyncGraphqlQuery(name, ...args) {
20
20
  const config = useAppConfig();
21
21
  const app = useNuxtApp();
22
22
  if (importMetaClient) {
23
- if (variables && isRef(variables)) {
24
- if (!asyncDataOptions.watch) {
25
- asyncDataOptions.watch = [];
26
- }
27
- asyncDataOptions.watch.push(variables);
28
- }
29
23
  if (asyncDataOptions.graphqlCaching?.client && app.isHydrating) {
30
24
  const cache = getOrCreateClientCache(app, config);
31
25
  if (cache) {
@@ -50,7 +44,7 @@ export function useAsyncGraphqlQuery(name, ...args) {
50
44
  }
51
45
  }
52
46
  const result = useAsyncData(
53
- asyncDataKey.value,
47
+ asyncDataKey,
54
48
  () => {
55
49
  prevKey = asyncDataKey.value;
56
50
  const globalClientContext = clientOptions && clientOptions.buildClientContext ? clientOptions.buildClientContext() : {};
@@ -26,15 +26,15 @@ export async function doGraphqlRequest(body, context = null, providedEvent = nul
26
26
  runtimeConfig,
27
27
  serverOptions,
28
28
  event,
29
- null,
29
+ operation,
30
30
  operationName,
31
31
  context || null
32
32
  );
33
33
  const fetchOptions = await getFetchOptions(
34
34
  serverOptions,
35
35
  event,
36
- null,
37
- body.operationName || null,
36
+ operation,
37
+ operationName,
38
38
  context
39
39
  );
40
40
  return $fetch.raw(endpoint, {
@@ -357,8 +357,10 @@ declare class ModuleHelper {
357
357
  */
358
358
  shouldDownloadSchema(): boolean;
359
359
  /**
360
- * Find the path to the graphqlMiddleware.serverOptions.ts file.
360
+ * Find a file across all Nuxt layers. The first layer (main app) takes
361
+ * precedence over extended layers.
361
362
  */
363
+ private findInLayers;
362
364
  private findServerOptions;
363
365
  private findClientOptions;
364
366
  /**
package/dist/utils.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as ModuleContext } from './shared/nuxt-graphql-middleware.B34q074V.mjs';
1
+ import { M as ModuleContext } from './shared/nuxt-graphql-middleware.CEtZRi7d.mjs';
2
2
  import 'graphql';
3
3
  import 'nuxt/schema';
4
4
  import '@nuxt/kit';
@@ -34,6 +34,14 @@ export default defineGraphqlClientOptions({})
34
34
 
35
35
  :::
36
36
 
37
+ ### Nuxt Layers
38
+
39
+ The client options file is also discovered from
40
+ [Nuxt layers](https://nuxt.com/docs/getting-started/layers). The module checks
41
+ all layers in order, starting with the main app. The first layer that contains a
42
+ `graphqlMiddleware.clientOptions` file wins — options from multiple layers are
43
+ **not** merged.
44
+
37
45
  ## Defining Client Context
38
46
 
39
47
  Implement the `buildClientContext()` method to return an object with string
@@ -21,6 +21,14 @@ export default defineGraphqlServerOptions({
21
21
 
22
22
  :::
23
23
 
24
+ ### Nuxt Layers
25
+
26
+ The server options file is also discovered from
27
+ [Nuxt layers](https://nuxt.com/docs/getting-started/layers). The module checks
28
+ all layers in order, starting with the main app. The first layer that contains a
29
+ `graphqlMiddleware.serverOptions` file wins — options from multiple layers are
30
+ **not** merged.
31
+
24
32
  ## doGraphqlRequest
25
33
 
26
34
  Provide a custom method that performs the request to the GraphQL server. It
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-graphql-middleware",
3
- "version": "5.3.2",
3
+ "version": "5.4.0",
4
4
  "description": "Module to perform GraphQL requests as a server middleware.",
5
5
  "author": "Jan Hug <me@dulnan.net>",
6
6
  "license": "MIT",
@@ -103,7 +103,7 @@
103
103
  "@graphql-codegen/schema-ast": "^5.0.0",
104
104
  "@graphql-tools/load": "^8.1.0",
105
105
  "@graphql-tools/utils": "^10.11.0",
106
- "@nuxt/devtools-kit": "^3.1.1",
106
+ "@nuxt/devtools-kit": "^3.2.4",
107
107
  "graphql-typescript-deluxe": "^0.1.0",
108
108
  "is-unicode-supported": "^2.1.0",
109
109
  "micromatch": "^4.0.8",
@@ -133,9 +133,9 @@
133
133
  "@nuxt/devtools": "^3.1.1",
134
134
  "@nuxt/devtools-ui-kit": "^3.1.1",
135
135
  "@nuxt/eslint": "^1.12.1",
136
- "@nuxt/kit": "^4.2.2",
136
+ "@nuxt/kit": "^4.4.2",
137
137
  "@nuxt/module-builder": "^1.0.2",
138
- "@nuxt/schema": "^4.2.2",
138
+ "@nuxt/schema": "^4.4.2",
139
139
  "@nuxt/test-utils": "^3.21.0",
140
140
  "@nuxtjs/mcp-toolkit": "^0.5.2",
141
141
  "@types/micromatch": "^4.0.10",
@@ -148,7 +148,7 @@
148
148
  "eslint-plugin-prettier": "^5.5.4",
149
149
  "mermaid": "^11.12.2",
150
150
  "minisearch": "^7.2.0",
151
- "nuxt": "^4.2.2",
151
+ "nuxt": "^4.4.2",
152
152
  "postcss": "^8.5.6",
153
153
  "postcss-cli": "^11.0.1",
154
154
  "postcss-import": "^16.1.1",
@@ -1,2 +0,0 @@
1
- import{x,y as v,I as k,J as Ie,r as B,K as oe,k as O,L as ae,M as V,N as he,O as N,P as C,Q as ze,R as S,z as y,S as fe,T as me,d as te,A as I,s as Fe,U as Ve,V as A,W as ne,_ as Te,B as D,C as H,D as re,X as Oe}from"./DrXVleME.js";const pe={__name:"NIcon",props:{icon:{type:String,required:!1}},setup(s){return(e,t)=>(v(),x("div",{class:k(["n-icon",s.icon])},null,2))}};typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=s=>typeof s<"u";function $e(s){return JSON.parse(JSON.stringify(s))}function ge(s,e,t,n={}){var i,o;const{clone:r=!1,passive:c=!1,eventName:l,deep:d=!1,defaultValue:u,shouldEmit:h}=n,a=Ie(),f=t||a?.emit||(a==null||(i=a.$emit)===null||i===void 0?void 0:i.bind(a))||(a==null||(o=a.proxy)===null||o===void 0||(o=o.$emit)===null||o===void 0?void 0:o.bind(a?.proxy));let g=l;e||(e="modelValue"),g=g||`update:${e.toString()}`;const m=_=>r?typeof r=="function"?r(_):$e(_):_,p=()=>Me(s[e])?m(s[e]):u,w=_=>{h?h(_)&&f(g,_):f(g,_)};if(c){const _=B(p());let z=!1;return oe(()=>s[e],F=>{z||(z=!0,_.value=m(F),ae(()=>z=!1))}),oe(_,F=>{!z&&(F!==s[e]||d)&&w(F)},{deep:d}),_}else return O({get(){return p()},set(_){w(_)}})}const Le={class:"n-text-input flex flex items-center border n-border-base rounded n-bg-base py-1 pl-1 pr-2 focus-within:border-context focus-within:n-focus-base"},De={__name:"NTextInput",props:{modelValue:{type:[String,Number],required:!1,default:""},icon:{type:String,required:!1},placeholder:{type:String,required:!1},disabled:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},readonly:{type:Boolean,required:!1},type:{type:String,required:!1,default:"text"}},emits:["keydown","keyup","change"],setup(s,{emit:e}){const i=ge(s,"modelValue",e,{passive:!0});return(o,r)=>{const c=pe;return v(),x("div",Le,[V(o.$slots,"icon",{},()=>[s.icon?(v(),N(c,{key:0,icon:s.icon,class:"ml-0.3em mr-0.1em text-1.1em op50"},null,8,["icon"])):C("",!0)]),he(y("input",fe({"onUpdate:modelValue":r[0]||(r[0]=l=>me(i)?i.value=l:null)},o.$props,{class:"ml-0.4em w-full flex-auto n-bg-base !outline-none"}),null,16),[[ze,S(i)]])])}}},Ee=te({__name:"Tag",props:{green:{type:Boolean},orange:{type:Boolean},text:{}},setup(s){const e=s,t=O(()=>e.green?"bg-green-400:10 text-green-400":e.orange?"bg-orange-400:10 text-orange-400":"bg-gray-400:10 text-gray");return(n,i)=>(v(),x("span",{class:k(["mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs inline-block",S(t)])},I(s.text),3))}}),_e=Object.assign(Ee,{__name:"Tag"});let $;const P=[];function ve(s){if(P.push(s),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&P.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&P.forEach(t=>t(e))},get(){return $.value},configurable:!0}),()=>{P.splice(P.indexOf(s),1)}}function Ne(){$||($=Fe(),ve(e));function s(){$&&Ve($)}function e(t){$.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",s)}return $}const Ae=Ne(),qe=["innerHTML"],Pe=["textContent"],Be={__name:"NCodeBlock",props:{code:{type:String,required:!0},lang:{type:null,required:!1},lines:{type:Boolean,required:!1,default:!0},inline:{type:Boolean,required:!1},grammarContextCode:{type:String,required:!1},transformRendered:{type:Function,required:!1}},emits:["loaded"],setup(s,{emit:e}){const t=s,n=e,i=O(()=>{const r=t.lang==="text"?{code:t.code,supported:!1}:Ae.value?.devtools.renderCodeHighlight(t.code,t.lang,{grammarContextCode:t.grammarContextCode})||{code:t.code,supported:!1};return r.supported&&t.transformRendered&&(r.code=t.transformRendered(r.code)),r.supported&&ae(()=>n("loaded")),r}),o=O(()=>["n-code-block shiki",t.lines&&!t.inline?"n-code-block-lines":""]);return(r,c)=>s.lang&&i.value.supported?(v(),x("pre",{key:0,class:k(o.value)},[y("code",{innerHTML:i.value.code},null,8,qe)],2)):(v(),x("pre",{key:1,class:k(o.value)},[y("code",null,[(v(!0),x(A,null,ne(s.code.split(`
2
- `),(l,d)=>(v(),x(A,{key:d},[y("span",{class:"line",textContent:I(l)},null,8,Pe),c[0]||(c[0]=y("br",null,null,-1))],64))),128))])],2))}},Re={flex:"~ gap-3","items-center":""},je={__name:"NIconTitle",props:{icon:{type:String,required:!1},text:{type:String,required:!1}},setup(s){return(e,t)=>(v(),x("div",Re,[s.icon?(v(),x("div",{key:0,class:k(s.icon)},null,2)):C("",!0),V(e.$slots,"default",{},()=>[y("div",null,I(s.text),1)])]))}},We=["open"],Ue={"text-base":""},Je={key:0,"text-sm":"",op50:""},Qe={__name:"NSectionBlock",props:{icon:{type:String,required:!1},text:{type:String,required:!1},description:{type:String,required:!1},containerClass:{type:String,required:!1,default:""},headerClass:{type:String,required:!1},collapse:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1,default:!0},padding:{type:[Boolean,String],required:!1,default:!0}},setup(s){const t=ge(s,"open",void 0,{passive:!0});function n(i){t.value=i.target.open}return(i,o)=>{const r=pe,c=je;return v(),x(A,null,[y("details",{open:S(t),onToggle:n},[y("summary",{class:k(["cursor-pointer select-none p4 hover:bg-active",s.collapse?"":"pointer-events-none"])},[D(c,{icon:s.icon,text:s.text,"text-xl":"",transition:"",class:k([S(t)?"op100":"op60",s.headerClass])},{default:H(()=>[y("div",null,[y("div",Ue,[V(i.$slots,"text",{},()=>[re(I(s.text),1)],!0)]),s.description||i.$slots.description?(v(),x("div",Je,[V(i.$slots,"description",{},()=>[re(I(s.description),1)],!0)])):C("",!0)]),o[0]||(o[0]=y("div",{class:"flex-auto"},null,-1)),V(i.$slots,"actions",{},void 0,!0),s.collapse?(v(),N(r,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):C("",!0)]),_:3},8,["icon","text","class"])],2),o._lazyshow1||S(t)?(o._lazyshow1=!0,v(),x(A,null,[he(y("div",{class:k(["flex flex-col flex-gap2 pb6 pt2",typeof s.padding=="string"?s.padding:s.padding?"px4":""])},[V(i.$slots,"details",{},void 0,!0),y("div",{class:k([s.containerClass,"mt1"])},[V(i.$slots,"default",{},void 0,!0)],2),V(i.$slots,"footer",{},void 0,!0)],2),[[Oe,S(t)]])],64)):C("v-show-if",!0)],40,We),o[1]||(o[1]=y("div",{class:"x-divider"},null,-1))],64)}}},Ge=Te(Qe,[["__scopeId","data-v-45092635"]]),Ke={class:"h-full of-auto p2"},Xe={class:"p5"},He={class:"font-mono mb4 font-bold text-3xl"},Ye={key:0,class:"mb3"},Ze=["href"],et={key:0,class:"font-mono bg-red-900 text-red-100 p2"},tt=te({__name:"DocumentDetail",props:{id:{},timestamp:{},source:{},name:{},identifier:{},filePath:{},serverApiPrefix:{}},setup(s){const e=s,t=O(()=>[]),n=O(()=>e.identifier!=="fragment"?`${e.serverApiPrefix}/${e.identifier}/${e.name}`:null);return(i,o)=>{const r=_e,c=Be,l=Ge;return v(),x("div",Ke,[y("div",Xe,[y("h2",He,I(s.name),1),S(n)?(v(),x("div",Ye,[s.identifier==="query"?(v(),N(r,{key:0,green:"",text:"GET"})):(v(),N(r,{key:1,orange:"",text:"POST"})),y("a",{class:"n-transition n-link n-link-base hover:n-link-hover ml2",target:"_blank",href:S(n)},I(S(n)),9,Ze)])):C("",!0)]),D(l,{text:"Document",description:s.filePath,padding:"px4"},{default:H(()=>[D(c,{code:s.source,lang:"graphql"},null,8,["code"])]),_:1},8,["description"]),D(l,{text:"Errors",description:S(t).length+" errors",padding:"px4"},{default:H(()=>[S(t).length?(v(),x("div",et,[(v(!0),x(A,null,ne(S(t),(d,u)=>(v(),x("div",{key:u},I(d),1))),128))])):C("",!0)]),_:1},8,["description"])])}}}),nt=Object.assign(tt,{__name:"DocumentDetail"}),st="ENTRIES",ye="KEYS",xe="VALUES",b="";class J{constructor(e,t){const n=e._tree,i=Array.from(n.keys());this.set=e,this._type=t,this._path=i.length>0?[{node:n,keys:i}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=L(this._path);if(L(t)===b)return{done:!1,value:this.result()};const n=e.get(L(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=L(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>L(e)).filter(e=>e!==b).join("")}value(){return L(this._path).node.get(b)}result(){switch(this._type){case xe:return this.value();case ye:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const L=s=>s[s.length-1],it=(s,e,t)=>{const n=new Map;if(e===void 0)return n;const i=e.length+1,o=i+t,r=new Uint8Array(o*i).fill(t+1);for(let c=0;c<i;++c)r[c]=c;for(let c=1;c<o;++c)r[c*i]=c;return we(s,e,t,n,r,1,i,""),n},we=(s,e,t,n,i,o,r,c)=>{const l=o*r;e:for(const d of s.keys())if(d===b){const u=i[l-1];u<=t&&n.set(c,[s.get(d),u])}else{let u=o;for(let h=0;h<d.length;++h,++u){const a=d[h],f=r*u,g=f-r;let m=i[f];const p=Math.max(0,u-t-1),w=Math.min(r-1,u+t);for(let _=p;_<w;++_){const z=a!==e[_],F=i[g+_]+ +z,R=i[g+_+1]+1,M=i[f+_]+1,q=i[f+_+1]=Math.min(F,R,M);q<m&&(m=q)}if(m>t)continue e}we(s.get(d),e,t,n,i,u,r,c+d)}};class T{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,n]=U(this._tree,e.slice(this._prefix.length));if(t===void 0){const[i,o]=se(n);for(const r of i.keys())if(r!==b&&r.startsWith(o)){const c=new Map;return c.set(r.slice(o.length),i.get(r)),new T(c,e)}}return new T(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,ot(this._tree,e)}entries(){return new J(this,st)}forEach(e){for(const[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return it(this._tree,e,t)}get(e){const t=Y(this._tree,e);return t!==void 0?t.get(b):void 0}has(e){const t=Y(this._tree,e);return t!==void 0&&t.has(b)}keys(){return new J(this,ye)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,Q(this._tree,e).set(b,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=Q(this._tree,e);return n.set(b,t(n.get(b))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=Q(this._tree,e);let i=n.get(b);return i===void 0&&n.set(b,i=t()),i}values(){return new J(this,xe)}[Symbol.iterator](){return this.entries()}static from(e){const t=new T;for(const[n,i]of e)t.set(n,i);return t}static fromObject(e){return T.from(Object.entries(e))}}const U=(s,e,t=[])=>{if(e.length===0||s==null)return[s,t];for(const n of s.keys())if(n!==b&&e.startsWith(n))return t.push([s,n]),U(s.get(n),e.slice(n.length),t);return t.push([s,e]),U(void 0,"",t)},Y=(s,e)=>{if(e.length===0||s==null)return s;for(const t of s.keys())if(t!==b&&e.startsWith(t))return Y(s.get(t),e.slice(t.length))},Q=(s,e)=>{const t=e.length;e:for(let n=0;s&&n<t;){for(const o of s.keys())if(o!==b&&e[n]===o[0]){const r=Math.min(t-n,o.length);let c=1;for(;c<r&&e[n+c]===o[c];)++c;const l=s.get(o);if(c===o.length)s=l;else{const d=new Map;d.set(o.slice(c),l),s.set(e.slice(n,n+c),d),s.delete(o),s=d}n+=c;continue e}const i=new Map;return s.set(e.slice(n),i),i}return s},ot=(s,e)=>{const[t,n]=U(s,e);if(t!==void 0){if(t.delete(b),t.size===0)be(n);else if(t.size===1){const[i,o]=t.entries().next().value;Se(n,i,o)}}},be=s=>{if(s.length===0)return;const[e,t]=se(s);if(e.delete(t),e.size===0)be(s.slice(0,-1));else if(e.size===1){const[n,i]=e.entries().next().value;n!==b&&Se(s.slice(0,-1),n,i)}},Se=(s,e,t)=>{if(s.length===0)return;const[n,i]=se(s);n.set(i+e,t),n.delete(i)},se=s=>s[s.length-1],ie="or",ke="and",rt="and_not";class E{constructor(e){if(e?.fields==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?X:e.autoVacuum;this._options={...K,...e,autoVacuum:t,searchOptions:{...ce,...e.searchOptions||{}},autoSuggestOptions:{...at,...e.autoSuggestOptions||{}}},this._index=new T,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=ee,this.addFields(this._options.fields)}add(e){const{extractField:t,stringifyField:n,tokenize:i,processTerm:o,fields:r,idField:c}=this._options,l=t(e,c);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${c}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const d=this.addDocumentId(l);this.saveStoredFields(d,e);for(const u of r){const h=t(e,u);if(h==null)continue;const a=i(n(h,u),u),f=this._fieldIds[u],g=new Set(a).size;this.addFieldLength(d,f,this._documentCount-1,g);for(const m of a){const p=o(m,u);if(Array.isArray(p))for(const w of p)this.addTerm(f,d,w);else p&&this.addTerm(f,d,p)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:n=10}=t,i={chunk:[],promise:Promise.resolve()},{chunk:o,promise:r}=e.reduce(({chunk:c,promise:l},d,u)=>(c.push(d),(u+1)%n===0?{chunk:[],promise:l.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(c))}:{chunk:c,promise:l}),i);return r.then(()=>this.addAll(o))}remove(e){const{tokenize:t,processTerm:n,extractField:i,stringifyField:o,fields:r,idField:c}=this._options,l=i(e,c);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${c}"`);const d=this._idToShortId.get(l);if(d==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const u of r){const h=i(e,u);if(h==null)continue;const a=t(o(h,u),u),f=this._fieldIds[u],g=new Set(a).size;this.removeFieldLength(d,f,this._documentCount,g);for(const m of a){const p=n(m,u);if(Array.isArray(p))for(const w of p)this.removeTerm(f,d,w);else p&&this.removeTerm(f,d,p)}}this._storedFields.delete(d),this._documentIds.delete(d),this._idToShortId.delete(l),this._fieldLength.delete(d),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new T,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((n,i)=>{this.removeFieldLength(t,i,this._documentCount,n)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:n,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:i},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const n of e)this.discard(n)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:n}=this._options,i=n(e,t);this.discard(i),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const n=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=ee,this.performVacuuming(e,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const n=this._dirtCount;if(this.vacuumConditionsMet(t)){const i=e.batchSize||Z.batchSize,o=e.batchWait||Z.batchWait;let r=1;for(const[c,l]of this._index){for(const[d,u]of l)for(const[h]of u)this._documentIds.has(h)||(u.size<=1?l.delete(d):u.delete(h));this._index.get(c).size===0&&this._index.delete(c),r%i===0&&await new Promise(d=>setTimeout(d,o)),r+=1}this._dirtCount-=n}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:n}=e;return t=t||X.minDirtCount,n=n||X.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:n}=this._options,i={...n,...t},o=this.executeQuery(e,t),r=[];for(const[c,{score:l,terms:d,match:u}]of o){const h=d.length||1,a={id:this._documentIds.get(c),score:l*h,terms:Object.keys(u),queryTerms:d,match:u};Object.assign(a,this._storedFields.get(c)),(i.filter==null||i.filter(a))&&r.push(a)}return e===E.wildcard&&i.boostDocument==null||r.sort(de),r}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const n=new Map;for(const{score:o,terms:r}of this.search(e,t)){const c=r.join(" "),l=n.get(c);l!=null?(l.score+=o,l.count+=1):n.set(c,{score:o,terms:r,count:1})}const i=[];for(const[o,{score:r,terms:c,count:l}]of n)i.push({suggestion:o,terms:c,score:r/l});return i.sort(de),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(K.hasOwnProperty(e))return G(K,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:n,documentIds:i,fieldLength:o,storedFields:r,serializationVersion:c}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=j(i),l._fieldLength=j(o),l._storedFields=j(r);for(const[d,u]of l._documentIds)l._idToShortId.set(u,d);for(const[d,u]of n){const h=new Map;for(const a of Object.keys(u)){let f=u[a];c===1&&(f=f.ds),h.set(parseInt(a,10),j(f))}l._index.set(d,h)}return l}static async loadJSAsync(e,t){const{index:n,documentIds:i,fieldLength:o,storedFields:r,serializationVersion:c}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await W(i),l._fieldLength=await W(o),l._storedFields=await W(r);for(const[u,h]of l._documentIds)l._idToShortId.set(h,u);let d=0;for(const[u,h]of n){const a=new Map;for(const f of Object.keys(h)){let g=h[f];c===1&&(g=g.ds),a.set(parseInt(f,10),await W(g))}++d%1e3===0&&await Ce(0),l._index.set(u,a)}return l}static instantiateMiniSearch(e,t){const{documentCount:n,nextId:i,fieldIds:o,averageFieldLength:r,dirtCount:c,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const d=new E(t);return d._documentCount=n,d._nextId=i,d._idToShortId=new Map,d._fieldIds=o,d._avgFieldLength=r,d._dirtCount=c||0,d._index=new T,d}executeQuery(e,t={}){if(e===E.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const a={...t,...e,queries:void 0},f=e.queries.map(g=>this.executeQuery(g,a));return this.combineResults(f,a.combineWith)}const{tokenize:n,processTerm:i,searchOptions:o}=this._options,r={tokenize:n,processTerm:i,...o,...t},{tokenize:c,processTerm:l}=r,h=c(e).flatMap(a=>l(a)).filter(a=>!!a).map(ut(r)).map(a=>this.executeQuerySpec(a,r));return this.combineResults(h,r.combineWith)}executeQuerySpec(e,t){const n={...this._options.searchOptions,...t},i=(n.fields||this._options.fields).reduce((m,p)=>({...m,[p]:G(n.boost,p)||1}),{}),{boostDocument:o,weights:r,maxFuzzy:c,bm25:l}=n,{fuzzy:d,prefix:u}={...ce.weights,...r},h=this._index.get(e.term),a=this.termResults(e.term,e.term,1,e.termBoost,h,i,o,l);let f,g;if(e.prefix&&(f=this._index.atPrefix(e.term)),e.fuzzy){const m=e.fuzzy===!0?.2:e.fuzzy,p=m<1?Math.min(c,Math.round(e.term.length*m)):m;p&&(g=this._index.fuzzyGet(e.term,p))}if(f)for(const[m,p]of f){const w=m.length-e.term.length;if(!w)continue;g?.delete(m);const _=u*m.length/(m.length+.3*w);this.termResults(e.term,m,_,e.termBoost,p,i,o,l,a)}if(g)for(const m of g.keys()){const[p,w]=g.get(m);if(!w)continue;const _=d*m.length/(m.length+w);this.termResults(e.term,m,_,e.termBoost,p,i,o,l,a)}return a}executeWildcardQuery(e){const t=new Map,n={...this._options.searchOptions,...e};for(const[i,o]of this._documentIds){const r=n.boostDocument?n.boostDocument(o,"",this._storedFields.get(i)):1;t.set(i,{score:r,terms:[],match:{}})}return t}combineResults(e,t=ie){if(e.length===0)return new Map;const n=t.toLowerCase(),i=ct[n];if(!i)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(i)||new Map}toJSON(){const e=[];for(const[t,n]of this._index){const i={};for(const[o,r]of n)i[o]=Object.fromEntries(r);e.push([t,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,n,i,o,r,c,l,d=new Map){if(o==null)return d;for(const u of Object.keys(r)){const h=r[u],a=this._fieldIds[u],f=o.get(a);if(f==null)continue;let g=f.size;const m=this._avgFieldLength[a];for(const p of f.keys()){if(!this._documentIds.has(p)){this.removeTerm(a,p,t),g-=1;continue}const w=c?c(this._documentIds.get(p),t,this._storedFields.get(p)):1;if(!w)continue;const _=f.get(p),z=this._fieldLength.get(p)[a],F=dt(_,g,this._documentCount,z,m,l),R=n*i*h*w*F,M=d.get(p);if(M){M.score+=R,ht(M.terms,e);const q=G(M.match,t);q?q.push(u):M.match[t]=[u]}else d.set(p,{score:R,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,n){const i=this._index.fetch(n,ue);let o=i.get(e);if(o==null)o=new Map,o.set(t,1),i.set(e,o);else{const r=o.get(t);o.set(t,(r||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}const i=this._index.fetch(n,ue),o=i.get(e);o==null||o.get(t)==null?this.warnDocumentChanged(t,e,n):o.get(t)<=1?o.size<=1?i.delete(e):o.delete(t):o.set(t,o.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(const i of Object.keys(this._fieldIds))if(this._fieldIds[i]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${i}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,n,i){let o=this._fieldLength.get(e);o==null&&this._fieldLength.set(e,o=[]),o[t]=i;const c=(this._avgFieldLength[t]||0)*n+i;this._avgFieldLength[t]=c/(n+1)}removeFieldLength(e,t,n,i){if(n===1){this._avgFieldLength[t]=0;return}const o=this._avgFieldLength[t]*n-i;this._avgFieldLength[t]=o/(n-1)}saveStoredFields(e,t){const{storeFields:n,extractField:i}=this._options;if(n==null||n.length===0)return;let o=this._storedFields.get(e);o==null&&this._storedFields.set(e,o={});for(const r of n){const c=i(t,r);c!==void 0&&(o[r]=c)}}}E.wildcard=Symbol("*");const G=(s,e)=>Object.prototype.hasOwnProperty.call(s,e)?s[e]:void 0,ct={[ie]:(s,e)=>{for(const t of e.keys()){const n=s.get(t);if(n==null)s.set(t,e.get(t));else{const{score:i,terms:o,match:r}=e.get(t);n.score=n.score+i,n.match=Object.assign(n.match,r),le(n.terms,o)}}return s},[ke]:(s,e)=>{const t=new Map;for(const n of e.keys()){const i=s.get(n);if(i==null)continue;const{score:o,terms:r,match:c}=e.get(n);le(i.terms,r),t.set(n,{score:i.score+o,terms:i.terms,match:Object.assign(i.match,c)})}return t},[rt]:(s,e)=>{for(const t of e.keys())s.delete(t);return s}},lt={k:1.2,b:.7,d:.5},dt=(s,e,t,n,i,o)=>{const{k:r,b:c,d:l}=o;return Math.log(1+(t-e+.5)/(e+.5))*(l+s*(r+1)/(s+r*(1-c+c*n/i)))},ut=s=>(e,t,n)=>{const i=typeof s.fuzzy=="function"?s.fuzzy(e,t,n):s.fuzzy||!1,o=typeof s.prefix=="function"?s.prefix(e,t,n):s.prefix===!0,r=typeof s.boostTerm=="function"?s.boostTerm(e,t,n):1;return{term:e,fuzzy:i,prefix:o,termBoost:r}},K={idField:"id",extractField:(s,e)=>s[e],stringifyField:(s,e)=>s.toString(),tokenize:s=>s.split(ft),processTerm:s=>s.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(s,e)=>{typeof console?.[s]=="function"&&console[s](e)},autoVacuum:!0},ce={combineWith:ie,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:lt},at={combineWith:ke,prefix:(s,e,t)=>e===t.length-1},Z={batchSize:1e3,batchWait:10},ee={minDirtFactor:.1,minDirtCount:20},X={...Z,...ee},ht=(s,e)=>{s.includes(e)||s.push(e)},le=(s,e)=>{for(const t of e)s.includes(t)||s.push(t)},de=({score:s},{score:e})=>e-s,ue=()=>new Map,j=s=>{const e=new Map;for(const t of Object.keys(s))e.set(parseInt(t,10),s[t]);return e},W=async s=>{const e=new Map;let t=0;for(const n of Object.keys(s))e.set(parseInt(n,10),s[n]),++t%1e3===0&&await Ce(0);return e},Ce=s=>new Promise(e=>setTimeout(e,s)),ft=/[\n\r\p{Z}\p{P}]+/u,mt={class:"relative",style:{height:"100vh"}},pt={class:"flex h-full"},gt={class:"h-full border-r border-r-gray-800 of-auto","h-full":"",style:{width:"22rem","min-width":"0",flex:"0 0 auto"}},_t={flex:"~ col gap2",border:"b base",class:"border-b-gray-800 p3 flex-1"},vt=["onClick"],yt={style:{width:"6rem"},class:"text-left"},xt=["onClick"],wt={key:0,class:"h-full relative w-full of-auto"},bt="nuxt-graphql-middleware",kt=te({__name:"index",setup(s){const e=new E({fields:["id","source","name","filePath","identifier"],storeFields:["id","source","name","identifier","filePath"],searchOptions:{fuzzy:.7}}),t=B(""),n=B([]),i=B(""),o=B(""),r=O(()=>{if(t.value)return n.value.find(u=>u.id===t.value)});async function c(u){e.removeAll(),n.value=u,e.addAll(u)}ve(async u=>{const h=u.devtools.extendClientRpc(bt,{showNotification(){},documentsUpdated(g){c(g)}}),a=await h.getDocuments();c(a);const f=await h.getModuleOptions();o.value=f.serverApiPrefix});function l(u){const h=document.createElement("textarea");h.value=u.source,h.style.top="0",h.style.left="0",h.style.position="fixed",document.body.appendChild(h),h.focus(),h.select();try{document.execCommand("copy")}catch{}document.body.removeChild(h)}const d=O(()=>i.value?e.search(i.value):n.value);return(u,h)=>{const a=De,f=_e,g=nt;return v(),x("div",mt,[y("div",pt,[y("div",gt,[y("div",_t,[D(a,{modelValue:S(i),"onUpdate:modelValue":h[0]||(h[0]=m=>me(i)?i.value=m:null),placeholder:"Search documents...",icon:"carbon-search",class:"w-full"},null,8,["modelValue"])]),(v(!0),x(A,null,ne(S(d),m=>(v(),x("div",{key:m.id,class:"relative group"},[y("button",{class:"text-secondary hover:n-bg-hover flex select-none truncate px2 py2 font-mono text-sm w-full",onClick:p=>t.value=m.id},[y("div",yt,[m.identifier==="query"?(v(),N(f,{key:0,green:"",text:"Query"})):m.identifier==="mutation"?(v(),N(f,{key:1,orange:"",text:"Mutation"})):C("",!0)]),y("div",null,I(m.name),1)],8,vt),y("button",{class:"absolute right-0 top-0 text-sm h-full flex items-center opacity-0 group-hover:opacity-100 pr2",onClick:p=>l(m)},[...h[1]||(h[1]=[y("span",null,"Copy",-1)])],8,xt)]))),128))]),h[2]||(h[2]=y("div",{class:"splitpanes__splitter"},null,-1)),S(r)?(v(),x("div",wt,[D(g,fe(S(r),{"server-api-prefix":S(o)}),null,16,["server-api-prefix"])])):C("",!0)])])}}});export{kt as default};
@@ -1 +0,0 @@
1
- import{d as z,u as R,s as B,r as O,a as L,o as E,b as T,c as H,e as I,f as U,h as N,g as q,p as M,i as A,j as D,k as p,l as P,m as V,n as F,q as $,w as W,t as G,v as K,_ as Q,x as J,y as X,z as C,A as S,B as Y,C as Z,D as ee}from"./DrXVleME.js";import{u as te}from"./DZ-uq6Vd.js";const ne=(...t)=>t.find(o=>o!==void 0);function re(t){const o=t.componentName||"NuxtLink";function f(e){return typeof e=="string"&&e.startsWith("#")}function k(e,s,d){const r=d??t.trailingSlash;if(!e||r!=="append"&&r!=="remove")return e;if(typeof e=="string")return _(e,r);const i="path"in e&&e.path!==void 0?e.path:s(e).path;return{...e,name:void 0,path:_(i,r)}}function w(e){const s=R(),d=F(),r=p(()=>!!e.target&&e.target!=="_self"),i=p(()=>{const l=e.to||e.href||"";return typeof l=="string"&&P(l,{acceptRelative:!0})}),b=q("RouterLink"),h=b&&typeof b!="string"?b.useLink:void 0,c=p(()=>{if(e.external)return!0;const l=e.to||e.href||"";return typeof l=="object"?!1:l===""||i.value}),a=p(()=>{const l=e.to||e.href||"";return c.value?l:k(l,s.resolve,e.trailingSlash)}),g=c.value?void 0:h?.({...e,to:a}),m=p(()=>{const l=e.trailingSlash??t.trailingSlash;if(!a.value||i.value||f(a.value))return a.value;if(c.value){const y=typeof a.value=="object"&&"path"in a.value?A(a.value):a.value,x=typeof y=="object"?s.resolve(y).href:y;return _(x,l)}return typeof a.value=="object"?s.resolve(a.value)?.href??null:_(V(d.app.baseURL,a.value),l)});return{to:a,hasTarget:r,isAbsoluteUrl:i,isExternal:c,href:m,isActive:g?.isActive??p(()=>a.value===s.currentRoute.value.path),isExactActive:g?.isExactActive??p(()=>a.value===s.currentRoute.value.path),route:g?.route??p(()=>s.resolve(a.value)),async navigate(l){await $(m.value,{replace:e.replace,external:c.value||r.value})}}}return z({name:o,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:w,setup(e,{slots:s}){const d=R(),{to:r,href:i,navigate:b,isExternal:h,hasTarget:c,isAbsoluteUrl:a}=w(e),g=B(!1),m=O(null),l=u=>{m.value=e.custom?u?.$el?.nextElementSibling:u?.$el};function y(u){return!g.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===u:e.prefetchOn?.[u]??t.prefetchOn?.[u])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!se()}async function x(u=L()){if(g.value)return;g.value=!0;const v=typeof r.value=="string"?r.value:h.value?A(r.value):d.resolve(r.value).fullPath,n=h.value?new URL(v,window.location.href).href:v;await Promise.all([u.hooks.callHook("link:prefetch",n).catch(()=>{}),!h.value&&!c.value&&D(r.value,d).catch(()=>{})])}if(y("visibility")){const u=L();let v,n=null;E(()=>{const j=ie();T(()=>{v=H(()=>{m?.value?.tagName&&(n=j.observe(m.value,async()=>{n?.(),n=null,await x(u)}))})})}),I(()=>{v&&U(v),n?.(),n=null})}return()=>{if(!h.value&&!c.value&&!f(r.value)){const n={ref:l,to:r.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(y("interaction")&&(n.onPointerenter=x.bind(null,void 0),n.onFocus=x.bind(null,void 0)),g.value&&(n.class=e.prefetchedClass||t.prefetchedClass),n.rel=e.rel||void 0),N(q("RouterLink"),n,s.default)}const u=e.target||null,v=ne(e.noRel?"":e.rel,t.externalRelAttribute,a.value||c.value?"noopener noreferrer":"")||null;return e.custom?s.default?s.default({href:i.value,navigate:b,prefetch:x,get route(){if(!i.value)return;const n=new URL(i.value,window.location.href);return{path:n.pathname,fullPath:n.pathname,get query(){return M(n.search)},hash:n.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:i.value}},rel:v,target:u,isExternal:h.value||c.value,isActive:!1,isExactActive:!1}):null:N("a",{ref:m,href:i.value||null,rel:v,target:u,onClick:n=>{if(!(h.value||c.value))return n.preventDefault(),e.replace?d.replace(i.value):d.push(i.value)}},s.default?.())}}})}const ae=re(K);function _(t,o){const f=o==="append"?W:G;return P(t)&&!t.startsWith("http")?t:f(t,!0)}function ie(){const t=L();if(t._observer)return t._observer;let o=null;const f=new Map,k=(e,s)=>(o||=new IntersectionObserver(d=>{for(const r of d){const i=f.get(r.target);(r.isIntersecting||r.intersectionRatio>0)&&i&&i()}}),f.set(e,s),o.observe(e),()=>{f.delete(e),o?.unobserve(e),f.size===0&&(o?.disconnect(),o=null)});return t._observer={observe:k}}const oe=/2g/;function se(){const t=navigator.connection;return!!(t&&(t.saveData||oe.test(t.effectiveType)))}const le={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},ue={class:"max-w-520px text-center"},ce=["textContent"],fe=["textContent"],de=["textContent"],ve={class:"flex items-center justify-center w-full"},he={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return te({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(f,k)=>{const w=ae;return X(),J("div",le,[C("div",ue,[C("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:S(t.statusCode)},null,8,ce),C("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:S(t.statusMessage)},null,8,fe),C("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:S(t.description)},null,8,de),C("div",ve,[Y(w,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:Z(()=>[ee(S(t.backHome),1)]),_:1})])])])}}},be=Q(he,[["__scopeId","data-v-cd31e6b7"]]);export{be as default};