nuxt-graphql-middleware 5.0.0-alpha.9 → 5.0.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.
Files changed (51) hide show
  1. package/README.md +101 -19
  2. package/dist/client/200.html +8 -8
  3. package/dist/client/404.html +8 -8
  4. package/dist/client/_nuxt/{CPyoLiCY.js → BM34SYth.js} +1 -1
  5. package/dist/client/_nuxt/CROlboVl.js +1 -0
  6. package/dist/client/_nuxt/D5hBL5aZ.js +25 -0
  7. package/dist/client/_nuxt/{BLvMh1Ga.js → FTbv7CO6.js} +1 -1
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/83f9fcd5-bd28-4608-b499-05e08fe0f7d0.json +1 -0
  10. package/dist/client/_nuxt/error-404.ehK72JOs.css +1 -0
  11. package/dist/client/_nuxt/error-500._g0akJim.css +1 -0
  12. package/dist/client/_nuxt/{C9pb_2rp.js → lIgCBhS_.js} +2 -2
  13. package/dist/client/index.html +8 -8
  14. package/dist/client-options.d.mts +6 -0
  15. package/dist/client-options.mjs +5 -0
  16. package/dist/module.d.mts +63 -181
  17. package/dist/module.json +3 -3
  18. package/dist/module.mjs +338 -90
  19. package/dist/runtime/components/CodeFrame.vue +19 -28
  20. package/dist/runtime/components/CodeFrame.vue.d.ts +7 -0
  21. package/dist/runtime/components/DevModeOverlay.vue +25 -33
  22. package/dist/runtime/components/DevModeOverlay.vue.d.ts +3 -0
  23. package/dist/runtime/components/ErrorExtensions.vue +9 -11
  24. package/dist/runtime/components/ErrorExtensions.vue.d.ts +5 -0
  25. package/dist/runtime/components/ErrorGroup.vue +28 -39
  26. package/dist/runtime/components/ErrorGroup.vue.d.ts +9 -0
  27. package/dist/runtime/server/api/mutation.js +2 -1
  28. package/dist/runtime/server/api/query.js +2 -1
  29. package/dist/runtime/server/utils/doGraphqlRequest.js +5 -4
  30. package/dist/runtime/types.d.ts +2 -2
  31. package/dist/server-options.d.mts +8 -0
  32. package/dist/server-options.mjs +5 -0
  33. package/dist/shared/nuxt-graphql-middleware.cXfDI4U3.d.mts +517 -0
  34. package/dist/types.d.mts +1 -7
  35. package/dist/utils.d.mts +15 -0
  36. package/dist/utils.mjs +18 -0
  37. package/package.json +34 -30
  38. package/dist/client/_nuxt/CBwfSTyQ.js +0 -1
  39. package/dist/client/_nuxt/VpkRx2_e.js +0 -25
  40. package/dist/client/_nuxt/builds/meta/826a43da-d42c-4fbf-8dfd-2572141eaf8f.json +0 -1
  41. package/dist/client/_nuxt/error-404.BJkSn6RI.css +0 -1
  42. package/dist/client/_nuxt/error-500.TOCKLquH.css +0 -1
  43. package/dist/module.cjs +0 -5
  44. package/dist/module.d.ts +0 -210
  45. package/dist/runtime/clientOptions/index.d.ts +0 -2
  46. package/dist/runtime/clientOptions/index.js +0 -3
  47. package/dist/runtime/serverOptions/defineGraphqlServerOptions.d.ts +0 -4
  48. package/dist/runtime/serverOptions/defineGraphqlServerOptions.js +0 -3
  49. package/dist/runtime/serverOptions/index.d.ts +0 -2
  50. package/dist/runtime/serverOptions/index.js +0 -2
  51. package/dist/types.d.ts +0 -7
package/README.md CHANGED
@@ -1,9 +1,8 @@
1
1
  ![nuxt-graphql-middleware banner](docs/banner.png?raw=true 'Nuxt GraphQL Middleware - Expose queries and mutations as fully typed API routes.')
2
2
 
3
- # Nuxt GraphQL Middleware
3
+ # nuxt-graphql-middleware
4
4
 
5
- Keep your GraphQL server private: Expose GraphQL queries and mutations as fully
6
- typed API routes.
5
+ A GraphQL client for Nuxt 3.
7
6
 
8
7
  **[Documentation](https://nuxt-graphql-middleware.dulnan.net)** –
9
8
  **[npm](https://www.npmjs.com/package/nuxt-graphql-middleware)** –
@@ -13,19 +12,20 @@ typed API routes.
13
12
 
14
13
  ## Features
15
14
 
16
- - Exposes each query and mutation as an API route
17
- - GraphQL requests are only done on the server side
18
- - No GraphQL documents in client bundle
19
- - Includes composables to perform queries or mutations
20
- - Modify request headers, responses and handle errors
21
- - HMR for all GraphQL files
22
- - Integration with [Nuxt DevTools](https://devtools.nuxtjs.org)
23
- - Full TypeScript integration for schema, queries, mutations and fragments using
24
- [graphql-code-generator](https://github.com/dotansimha/graphql-code-generator)
15
+ - Exposes each query and mutation as an **API route**
16
+ - GraphQL requests are done **only on the server side**
17
+ - Includes **composables** to perform queries or mutations
18
+ - **No GraphQL documents** in client bundle
19
+ - Super fast **TypeScript code generation** using
20
+ **[graphql-typescript-deluxe](https://github.com/dulnan/graphql-typescript-deluxe)**
21
+ - **HMR** for all GraphQL files
22
+ - Optional **Client side caching** for query operations
23
+ - Modify **request headers**, responses and handle errors
24
+ - Integration with **[Nuxt DevTools](https://devtools.nuxtjs.org)**
25
25
 
26
- # Setup
26
+ ## Setup
27
27
 
28
- ## Install
28
+ ### Install
29
29
 
30
30
  ```bash
31
31
  npx nuxi@latest module add nuxt-graphql-middleware
@@ -42,6 +42,9 @@ export default defineNuxtConfig({
42
42
  })
43
43
  ```
44
44
 
45
+ See
46
+ [all configuration options](https://nuxt-graphql-middleware.dulnan.net/configuration/module)
47
+
45
48
  ## Usage
46
49
 
47
50
  Write your first query, e.g. in pages/films.query.graphql:
@@ -59,7 +62,7 @@ query films {
59
62
  Your query is now available via the useGraphqlQuery() composable:
60
63
 
61
64
  ```typescript
62
- const { data } = await useGraphqlQuery('films')
65
+ const { data, errors } = await useGraphqlQuery('films')
63
66
  console.log(data.allFilms.films)
64
67
  ```
65
68
 
@@ -70,12 +73,91 @@ const { data } = await useAsyncGraphqlQuery('films')
70
73
  console.log(data.value.allFilms.films)
71
74
  ```
72
75
 
73
- Alternatively you can also call
74
- `http://localhost:3000/api/graphql_middleware/query/films` to get the same
75
- result.
76
+ Alternatively you can also directly call the API route to get the same result:
77
+
78
+ ```typescript
79
+ const response = await $fetch('/api/graphql_middleware/query/films')
80
+ ```
81
+
82
+ Or using `useFetch`:
83
+
84
+ ```typescript
85
+ const { data } = await useFetch('/api/graphql_middleware/query/films')
86
+ ```
76
87
 
77
88
  ## Nuxt 2
78
89
 
79
90
  The 3.x releases are only compatible with Nuxt 3. The
80
91
  [2.x branch](https://github.com/dulnan/nuxt-graphql-middleware/tree/2.x) and
81
- releases on npm are compatible with Nuxt 2.
92
+ releases on npm are compatible with Nuxt 2. However this version is not
93
+ maintained anymore.
94
+
95
+ ## Development
96
+
97
+ The module uses the default Nuxt module authoring setup where the module itself
98
+ is located in `./src`, with a playground located in `./playground/`.
99
+
100
+ ### Setup
101
+
102
+ #### Install dependencies
103
+
104
+ Install the dependencies of the module and playground:
105
+
106
+ ```sh
107
+ npm install
108
+ ```
109
+
110
+ #### Prepare Types
111
+
112
+ This will generate all the types needed to start developing:
113
+
114
+ ```sh
115
+ npm run dev:prepare
116
+ ```
117
+
118
+ #### Start Apollo Server
119
+
120
+ The playground uses an Apollo server that needs to be built separately.
121
+
122
+ ```sh
123
+ cd apollo
124
+ npm install
125
+ npm run compile
126
+ npm run start
127
+ ```
128
+
129
+ ### Start the Playground
130
+
131
+ ```sh
132
+ npm run dev
133
+ ```
134
+
135
+ You can now open http://localhost:3000 to start developing.
136
+
137
+ ### Testing
138
+
139
+ #### Lint / Code Style
140
+
141
+ ```sh
142
+ npm run lint
143
+ npm run prettier
144
+ ```
145
+
146
+ #### Unit Tests (Vitest)
147
+
148
+ Unit tests are done using Vitest.
149
+
150
+ ```sh
151
+ npm run test:ci
152
+ ```
153
+
154
+ #### E2E (Cypress)
155
+
156
+ We use Cypress to run some E2E tests. The tests are executed against the
157
+ playground **build**:
158
+
159
+ ```sh
160
+ npm run dev:build
161
+ npm run dev:start
162
+ npm run cypress
163
+ ```
@@ -1,11 +1,11 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
  <link rel="stylesheet" href="/__nuxt-graphql-middleware/_nuxt/entry.Cn9qfNGa.css" crossorigin>
4
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/VpkRx2_e.js">
5
- <link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-404.BJkSn6RI.css">
6
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CPyoLiCY.js">
7
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/BLvMh1Ga.js">
8
- <link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500.TOCKLquH.css">
9
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CBwfSTyQ.js">
10
- <script type="module" src="/__nuxt-graphql-middleware/_nuxt/VpkRx2_e.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},1743590024448,false]</script>
11
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"826a43da-d42c-4fbf-8dfd-2572141eaf8f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
4
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/D5hBL5aZ.js">
5
+ <link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-404.ehK72JOs.css">
6
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/BM34SYth.js">
7
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/FTbv7CO6.js">
8
+ <link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500._g0akJim.css">
9
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CROlboVl.js">
10
+ <script type="module" src="/__nuxt-graphql-middleware/_nuxt/D5hBL5aZ.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},1745571069504,false]</script>
11
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"83f9fcd5-bd28-4608-b499-05e08fe0f7d0",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -1,11 +1,11 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
  <link rel="stylesheet" href="/__nuxt-graphql-middleware/_nuxt/entry.Cn9qfNGa.css" crossorigin>
4
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/VpkRx2_e.js">
5
- <link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-404.BJkSn6RI.css">
6
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CPyoLiCY.js">
7
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/BLvMh1Ga.js">
8
- <link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500.TOCKLquH.css">
9
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CBwfSTyQ.js">
10
- <script type="module" src="/__nuxt-graphql-middleware/_nuxt/VpkRx2_e.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},1743590024448,false]</script>
11
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"826a43da-d42c-4fbf-8dfd-2572141eaf8f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
4
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/D5hBL5aZ.js">
5
+ <link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-404.ehK72JOs.css">
6
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/BM34SYth.js">
7
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/FTbv7CO6.js">
8
+ <link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500._g0akJim.css">
9
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CROlboVl.js">
10
+ <script type="module" src="/__nuxt-graphql-middleware/_nuxt/D5hBL5aZ.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},1745571069504,false]</script>
11
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"83f9fcd5-bd28-4608-b499-05e08fe0f7d0",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -1 +1 @@
1
- import{u as P,d as B,r as q,a as N,o as I,b as U,c as T,e as H,f as V,h as A,g as L,p as F,i as z,j as x,k as O,l as M,m as D,n as $,w as W,q as G,s as K,_ as Q,t as J,v as X,x as S,y as C,z as Y,A as Z,B as ee}from"./VpkRx2_e.js";import{u as te}from"./BLvMh1Ga.js";async function E(t,n=P()){const{path:d,matched:h}=n.resolve(t);if(!h.length||(n._routePreloaded||(n._routePreloaded=new Set),n._routePreloaded.has(d)))return;const v=n._preloadPromises||(n._preloadPromises=[]);if(v.length>4)return Promise.all(v).then(()=>E(t,n));n._routePreloaded.add(d);const e=h.map(a=>{var u;return(u=a.components)==null?void 0:u.default}).filter(a=>typeof a=="function");for(const a of e){const u=Promise.resolve(a()).catch(()=>{}).finally(()=>v.splice(v.indexOf(u)));v.push(u)}await Promise.all(v)}const ne=(...t)=>t.find(n=>n!==void 0);function ae(t){const n=t.componentName||"NuxtLink";function d(e){return typeof e=="string"&&e.startsWith("#")}function h(e,a){if(!e||t.trailingSlash!=="append"&&t.trailingSlash!=="remove")return e;if(typeof e=="string")return j(e,t.trailingSlash);const u="path"in e&&e.path!==void 0?e.path:a(e).path;return{...e,name:void 0,path:j(u,t.trailingSlash)}}function v(e){const a=P(),u=D(),s=x(()=>!!e.target&&e.target!=="_self"),p=x(()=>{const f=e.to||e.href||"";return typeof f=="string"&&O(f,{acceptRelative:!0})}),_=L("RouterLink"),b=typeof _!="string"?_.useLink:void 0,m=x(()=>{if(e.external)return!0;const f=e.to||e.href||"";return typeof f=="object"?!1:f===""||p.value}),r=x(()=>{const f=e.to||e.href||"";return m.value?f:h(f,a.resolve)}),c=m.value||b==null?void 0:b({...e,to:r}),y=x(()=>{var f;if(!r.value||p.value||d(r.value))return r.value;if(m.value){const k=typeof r.value=="object"&&"path"in r.value?z(r.value):r.value,w=typeof k=="object"?a.resolve(k).href:k;return h(w,a.resolve)}return typeof r.value=="object"?((f=a.resolve(r.value))==null?void 0:f.href)??null:h(M(u.app.baseURL,r.value),a.resolve)});return{to:r,hasTarget:s,isAbsoluteUrl:p,isExternal:m,href:y,isActive:(c==null?void 0:c.isActive)??x(()=>r.value===a.currentRoute.value.path),isExactActive:(c==null?void 0:c.isExactActive)??x(()=>r.value===a.currentRoute.value.path),route:(c==null?void 0:c.route)??x(()=>a.resolve(r.value)),async navigate(f){await $(y.value,{replace:e.replace,external:m.value||s.value})}}}return B({name:n,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}},useLink:v,setup(e,{slots:a}){const u=P(),{to:s,href:p,navigate:_,isExternal:b,hasTarget:m,isAbsoluteUrl:r}=v(e),c=q(!1),y=q(null),f=o=>{var l;y.value=e.custom?(l=o==null?void 0:o.$el)==null?void 0:l.nextElementSibling:o==null?void 0:o.$el};function k(o){var l,i;return!c.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===o:((l=e.prefetchOn)==null?void 0:l[o])??((i=t.prefetchOn)==null?void 0:i[o]))&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!se()}async function w(o=N()){if(c.value)return;c.value=!0;const l=typeof s.value=="string"?s.value:b.value?z(s.value):u.resolve(s.value).fullPath,i=b.value?new URL(l,window.location.href).href:l;await Promise.all([o.hooks.callHook("link:prefetch",i).catch(()=>{}),!b.value&&!m.value&&E(s.value,u).catch(()=>{})])}if(k("visibility")){const o=N();let l,i=null;I(()=>{const g=oe();U(()=>{l=T(()=>{var R;(R=y==null?void 0:y.value)!=null&&R.tagName&&(i=g.observe(y.value,async()=>{i==null||i(),i=null,await w(o)}))})})}),H(()=>{l&&V(l),i==null||i(),i=null})}return()=>{var i;if(!b.value&&!m.value&&!d(s.value)){const g={ref:f,to:s.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")&&(g.onPointerenter=w.bind(null,void 0),g.onFocus=w.bind(null,void 0)),c.value&&(g.class=e.prefetchedClass||t.prefetchedClass),g.rel=e.rel||void 0),A(L("RouterLink"),g,a.default)}const o=e.target||null,l=ne(e.noRel?"":e.rel,t.externalRelAttribute,r.value||m.value?"noopener noreferrer":"")||null;return e.custom?a.default?a.default({href:p.value,navigate:_,prefetch:w,get route(){if(!p.value)return;const g=new URL(p.value,window.location.href);return{path:g.pathname,fullPath:g.pathname,get query(){return F(g.search)},hash:g.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:p.value}},rel:l,target:o,isExternal:b.value||m.value,isActive:!1,isExactActive:!1}):null:A("a",{ref:y,href:p.value||null,rel:l,target:o},(i=a.default)==null?void 0:i.call(a))}}})}const re=ae(K);function j(t,n){const d=n==="append"?W:G;return O(t)&&!t.startsWith("http")?t:d(t,!0)}function oe(){const t=N();if(t._observer)return t._observer;let n=null;const d=new Map,h=(e,a)=>(n||(n=new IntersectionObserver(u=>{for(const s of u){const p=d.get(s.target);(s.isIntersecting||s.intersectionRatio>0)&&p&&p()}})),d.set(e,a),n.observe(e),()=>{d.delete(e),n==null||n.unobserve(e),d.size===0&&(n==null||n.disconnect(),n=null)});return t._observer={observe:h}}const ie=/2g/;function se(){const t=navigator.connection;return!!(t&&(t.saveData||ie.test(t.effectiveType)))}const le={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},ue={class:"max-w-520px text-center z-20"},ce=["textContent"],fe=["textContent"],de={class:"flex items-center justify-center w-full"},he={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"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 n=t;return te({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{children:`!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:[{children:'*,: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{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,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: }'}]}),(d,h)=>{const v=re;return X(),J("div",le,[h[0]||(h[0]=S("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),S("div",ue,[S("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:C(t.statusCode)},null,8,ce),S("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:C(t.description)},null,8,fe),S("div",de,[Y(v,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:Z(()=>[ee(C(t.backHome),1)]),_:1})])])])}}},ge=Q(he,[["__scopeId","data-v-460438a1"]]);export{ge as default};
1
+ import{u as P,d as B,r as R,a as N,o as T,b as H,c as I,e as U,f as M,h as q,g as A,p as V,i as z,j as x,k as O,l as F,m as D,n as $,w as W,q as G,s as K,_ as Q,t as J,v as X,x as S,y as C,z as Y,A as Z,B as ee}from"./D5hBL5aZ.js";import{u as te}from"./FTbv7CO6.js";async function E(t,n=P()){const{path:d,matched:h}=n.resolve(t);if(!h.length||(n._routePreloaded||(n._routePreloaded=new Set),n._routePreloaded.has(d)))return;const v=n._preloadPromises||(n._preloadPromises=[]);if(v.length>4)return Promise.all(v).then(()=>E(t,n));n._routePreloaded.add(d);const e=h.map(a=>{var u;return(u=a.components)==null?void 0:u.default}).filter(a=>typeof a=="function");for(const a of e){const u=Promise.resolve(a()).catch(()=>{}).finally(()=>v.splice(v.indexOf(u)));v.push(u)}await Promise.all(v)}const ne=(...t)=>t.find(n=>n!==void 0);function ae(t){const n=t.componentName||"NuxtLink";function d(e){return typeof e=="string"&&e.startsWith("#")}function h(e,a){if(!e||t.trailingSlash!=="append"&&t.trailingSlash!=="remove")return e;if(typeof e=="string")return j(e,t.trailingSlash);const u="path"in e&&e.path!==void 0?e.path:a(e).path;return{...e,name:void 0,path:j(u,t.trailingSlash)}}function v(e){const a=P(),u=D(),s=x(()=>!!e.target&&e.target!=="_self"),p=x(()=>{const f=e.to||e.href||"";return typeof f=="string"&&O(f,{acceptRelative:!0})}),_=A("RouterLink"),b=typeof _!="string"?_.useLink:void 0,m=x(()=>{if(e.external)return!0;const f=e.to||e.href||"";return typeof f=="object"?!1:f===""||p.value}),r=x(()=>{const f=e.to||e.href||"";return m.value?f:h(f,a.resolve)}),c=m.value||b==null?void 0:b({...e,to:r}),y=x(()=>{var f;if(!r.value||p.value||d(r.value))return r.value;if(m.value){const k=typeof r.value=="object"&&"path"in r.value?z(r.value):r.value,w=typeof k=="object"?a.resolve(k).href:k;return h(w,a.resolve)}return typeof r.value=="object"?((f=a.resolve(r.value))==null?void 0:f.href)??null:h(F(u.app.baseURL,r.value),a.resolve)});return{to:r,hasTarget:s,isAbsoluteUrl:p,isExternal:m,href:y,isActive:(c==null?void 0:c.isActive)??x(()=>r.value===a.currentRoute.value.path),isExactActive:(c==null?void 0:c.isExactActive)??x(()=>r.value===a.currentRoute.value.path),route:(c==null?void 0:c.route)??x(()=>a.resolve(r.value)),async navigate(f){await $(y.value,{replace:e.replace,external:m.value||s.value})}}}return B({name:n,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}},useLink:v,setup(e,{slots:a}){const u=P(),{to:s,href:p,navigate:_,isExternal:b,hasTarget:m,isAbsoluteUrl:r}=v(e),c=R(!1),y=R(null),f=o=>{var l;y.value=e.custom?(l=o==null?void 0:o.$el)==null?void 0:l.nextElementSibling:o==null?void 0:o.$el};function k(o){var l,i;return!c.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===o:((l=e.prefetchOn)==null?void 0:l[o])??((i=t.prefetchOn)==null?void 0:i[o]))&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!se()}async function w(o=N()){if(c.value)return;c.value=!0;const l=typeof s.value=="string"?s.value:b.value?z(s.value):u.resolve(s.value).fullPath,i=b.value?new URL(l,window.location.href).href:l;await Promise.all([o.hooks.callHook("link:prefetch",i).catch(()=>{}),!b.value&&!m.value&&E(s.value,u).catch(()=>{})])}if(k("visibility")){const o=N();let l,i=null;T(()=>{const g=oe();H(()=>{l=I(()=>{var L;(L=y==null?void 0:y.value)!=null&&L.tagName&&(i=g.observe(y.value,async()=>{i==null||i(),i=null,await w(o)}))})})}),U(()=>{l&&M(l),i==null||i(),i=null})}return()=>{var i;if(!b.value&&!m.value&&!d(s.value)){const g={ref:f,to:s.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")&&(g.onPointerenter=w.bind(null,void 0),g.onFocus=w.bind(null,void 0)),c.value&&(g.class=e.prefetchedClass||t.prefetchedClass),g.rel=e.rel||void 0),q(A("RouterLink"),g,a.default)}const o=e.target||null,l=ne(e.noRel?"":e.rel,t.externalRelAttribute,r.value||m.value?"noopener noreferrer":"")||null;return e.custom?a.default?a.default({href:p.value,navigate:_,prefetch:w,get route(){if(!p.value)return;const g=new URL(p.value,window.location.href);return{path:g.pathname,fullPath:g.pathname,get query(){return V(g.search)},hash:g.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:p.value}},rel:l,target:o,isExternal:b.value||m.value,isActive:!1,isExactActive:!1}):null:q("a",{ref:y,href:p.value||null,rel:l,target:o},(i=a.default)==null?void 0:i.call(a))}}})}const re=ae(K);function j(t,n){const d=n==="append"?W:G;return O(t)&&!t.startsWith("http")?t:d(t,!0)}function oe(){const t=N();if(t._observer)return t._observer;let n=null;const d=new Map,h=(e,a)=>(n||(n=new IntersectionObserver(u=>{for(const s of u){const p=d.get(s.target);(s.isIntersecting||s.intersectionRatio>0)&&p&&p()}})),d.set(e,a),n.observe(e),()=>{d.delete(e),n==null||n.unobserve(e),d.size===0&&(n==null||n.disconnect(),n=null)});return t._observer={observe:h}}const ie=/2g/;function se(){const t=navigator.connection;return!!(t&&(t.saveData||ie.test(t.effectiveType)))}const le={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},ue={class:"max-w-520px text-center z-20"},ce=["textContent"],fe=["textContent"],de={class:"flex items-center justify-center w-full"},he={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"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 n=t;return te({title:`${n.statusCode} - ${n.statusMessage} | ${n.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{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,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: }'}]}),(d,h)=>{const v=re;return X(),J("div",le,[h[0]||(h[0]=S("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),S("div",ue,[S("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:C(t.statusCode)},null,8,ce),S("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:C(t.description)},null,8,fe),S("div",de,[Y(v,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:Z(()=>[ee(C(t.backHome),1)]),_:1})])])])}}},ge=Q(he,[["__scopeId","data-v-1c9f6778"]]);export{ge as default};
@@ -0,0 +1 @@
1
+ import{_ as s,t as a,v as i,x as e,y as o}from"./D5hBL5aZ.js";import{u}from"./FTbv7CO6.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return u({title:`${r.statusCode} - ${r.statusMessage} | ${r.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{font-size:inherit;font-weight:inherit}h1,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: }'}]}),(g,n)=>(i(),a("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.statusCode)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},h=s(f,[["__scopeId","data-v-da29cbe1"]]);export{h as default};