nuxt-graphql-middleware 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/200.html +7 -7
- package/dist/client/404.html +7 -7
- package/dist/client/_nuxt/4Fsya3Lb.js +1 -0
- package/dist/client/_nuxt/{CYI2eNUl.js → BKIQXJNq.js} +1 -1
- package/dist/client/_nuxt/BMPkTe12.js +25 -0
- package/dist/client/_nuxt/CghSORGW.js +2 -0
- package/dist/client/_nuxt/{u1b7LyOw.js → CyXF4zpN.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/85b9c065-c702-4b67-9fa8-2d27fbcda8e3.json +1 -0
- package/dist/client/_nuxt/{entry.Cn9qfNGa.css → entry.BBgLZ1Jk.css} +1 -1
- package/dist/client/index.html +7 -7
- package/dist/module.json +1 -1
- package/dist/module.mjs +20 -13
- package/dist/runtime/composables/nuxtApp.d.ts +5 -1
- package/dist/runtime/composables/nuxtApp.js +5 -9
- package/dist/runtime/composables/useAsyncGraphqlQuery.js +10 -2
- package/dist/runtime/helpers/ClientCache.d.ts +3 -1
- package/dist/runtime/helpers/ClientCache.js +23 -5
- package/dist/runtime/helpers/composables.d.ts +0 -4
- package/dist/runtime/helpers/composables.js +0 -8
- package/dist/runtime/helpers/queryEncoding.d.ts +5 -1
- package/dist/runtime/helpers/queryEncoding.js +10 -2
- package/package.json +4 -4
- package/dist/client/_nuxt/CPiV13Ng.js +0 -2
- package/dist/client/_nuxt/CQCiRbEL.js +0 -1
- package/dist/client/_nuxt/UAIVpYSK.js +0 -25
- package/dist/client/_nuxt/builds/meta/48332277-c4ad-4d6a-8f09-7a58a109c32d.json +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as L,x as w,y as g,J as I,K as ze,r as W,L as ie,k as O,M as ae,N as T,O as he,P as Ie,Q as x,z as v,R as fe,S as me,T as P,U as F,A as V,s as Fe,V as Ve,W as B,X as ne,B as N,C as Y,D as re,Y as Te,_ as Me}from"./BMPkTe12.js";const pe=L({__name:"NIcon",props:{icon:{}},setup(o){return(e,t)=>(g(),w("div",{class:I(["n-icon",e.icon])},null,2))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Oe=o=>typeof o<"u";function Le(o){return JSON.parse(JSON.stringify(o))}function _e(o,e,t,n={}){var s,i,r;const{clone:c=!1,passive:l=!1,eventName:d,deep:u=!1,defaultValue:a,shouldEmit:f}=n,m=ze(),p=t||(m==null?void 0:m.emit)||((s=m==null?void 0:m.$emit)==null?void 0:s.bind(m))||((r=(i=m==null?void 0:m.proxy)==null?void 0:i.$emit)==null?void 0:r.bind(m==null?void 0:m.proxy));let h=d;e||(e="modelValue"),h=h||`update:${e.toString()}`;const _=S=>c?typeof c=="function"?c(S):Le(S):S,k=()=>Oe(o[e])?_(o[e]):a,b=S=>{f?f(S)&&p(h,S):p(h,S)};if(l){const S=k(),$=W(S);let z=!1;return ie(()=>o[e],C=>{z||(z=!0,$.value=_(C),ae(()=>z=!1))}),ie($,C=>{!z&&(C!==o[e]||u)&&b(C)},{deep:u}),$}else return O({get(){return k()},set(S){b(S)}})}const $e={class:"n-text-input flex flex items-center border n-border-base rounded py-1 pl-1 pr-2 focus-within:n-focus-base focus-within:border-context n-bg-base"},Ee=L({__name:"NTextInput",props:{modelValue:{default:""},icon:{},placeholder:{},disabled:{type:Boolean},autofocus:{type:Boolean},autocomplete:{},readonly:{type:Boolean},type:{default:"text"}},emits:["keydown","keyup","change"],setup(o,{emit:e}){const s=_e(o,"modelValue",e,{passive:!0});return(i,r)=>{const c=pe;return g(),w("div",$e,[T(i.$slots,"icon",{},()=>[i.icon?(g(),P(c,{key:0,icon:i.icon,class:"ml-0.3em mr-0.1em text-1.1em op50"},null,8,["icon"])):F("",!0)]),he(v("input",fe({"onUpdate:modelValue":r[0]||(r[0]=l=>me(s)?s.value=l:null)},i.$props,{class:"ml-0.4em w-full flex-auto n-bg-base !outline-none"}),null,16),[[Ie,x(s)]])])}}}),ge=L({__name:"Tag",props:{green:{type:Boolean},orange:{type:Boolean},text:{}},setup(o){const e=o,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,s)=>(g(),w("span",{class:I(["mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs inline-block",x(t)])},V(n.text),3))}});let E;const j=[];function ve(o){if(j.push(o),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&j.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&j.forEach(t=>t(e))},get(){return E.value},configurable:!0}),()=>{j.splice(j.indexOf(o),1)}}function De(){E||(E=Fe(),ve(e));function o(){E&&Ve(E)}function e(t){E.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",o)}return E}const Ne=De(),Ae=["innerHTML"],Pe=["textContent"],Be=L({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},inline:{type:Boolean},grammarContextCode:{},transformRendered:{}},emits:["loaded"],setup(o,{emit:e}){const t=o,n=e,s=O(()=>{var c;const r=t.lang==="text"?{code:t.code,supported:!1}:((c=Ne.value)==null?void 0:c.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}),i=O(()=>["n-code-block shiki",t.lines&&!t.inline?"n-code-block-lines":""]);return(r,c)=>r.lang&&s.value.supported?(g(),w("pre",{key:0,class:I(i.value)},[v("code",{innerHTML:s.value.code},null,8,Ae)],2)):(g(),w("pre",{key:1,class:I(i.value)},[v("code",null,[(g(!0),w(B,null,ne(r.code.split(`
|
|
2
|
+
`),(l,d)=>(g(),w(B,{key:d},[v("span",{class:"line",textContent:V(l)},null,8,Pe),c[0]||(c[0]=v("br",null,null,-1))],64))),128))])],2))}}),Re={flex:"~ gap-3","items-center":""},je=L({__name:"NIconTitle",props:{icon:{},text:{}},setup(o){return(e,t)=>(g(),w("div",Re,[e.icon?(g(),w("div",{key:0,class:I(e.icon)},null,2)):F("",!0),T(e.$slots,"default",{},()=>[v("div",null,V(e.text),1)])]))}}),We=["open"],Ue={"text-base":""},Je={key:0,"text-sm":"",op50:""},Qe=L({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(o){const t=_e(o,"open",void 0,{passive:!0});function n(s){t.value=s.target.open}return(s,i)=>{const r=pe,c=je;return g(),w(B,null,[v("details",{open:x(t),onToggle:i[0]||(i[0]=(...l)=>n&&n(...l))},[v("summary",{class:I(["cursor-pointer select-none hover:bg-active p4",s.collapse?"":"pointer-events-none"])},[N(c,{icon:s.icon,text:s.text,"text-xl":"",transition:"",class:I([x(t)?"op100":"op60",s.headerClass])},{default:Y(()=>[v("div",null,[v("div",Ue,[T(s.$slots,"text",{},()=>[re(V(s.text),1)],!0)]),s.description||s.$slots.description?(g(),w("div",Je,[T(s.$slots,"description",{},()=>[re(V(s.description),1)],!0)])):F("",!0)]),i[1]||(i[1]=v("div",{class:"flex-auto"},null,-1)),T(s.$slots,"actions",{},void 0,!0),s.collapse?(g(),P(r,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):F("",!0)]),_:3,__:[1]},8,["icon","text","class"])],2),i._lazyshow1||x(t)?(i._lazyshow1=!0,g(),w(B,null,[he(v("div",{class:I(["flex flex-col flex-gap2 pb6 pt2",typeof s.padding=="string"?s.padding:s.padding?"px4":""])},[T(s.$slots,"details",{},void 0,!0),v("div",{class:I([s.containerClass,"mt1"])},[T(s.$slots,"default",{},void 0,!0)],2),T(s.$slots,"footer",{},void 0,!0)],2),[[Te,x(t)]])],64)):F("v-show-if",!0)],40,We),i[2]||(i[2]=v("div",{class:"x-divider"},null,-1))],64)}}}),qe=Me(Qe,[["__scopeId","data-v-f3591bcd"]]),Ge={class:"h-full of-auto p2"},Ke={class:"p5"},Xe={class:"font-mono mb4 font-bold text-3xl"},He={key:0,class:"mb3"},Ye=["href"],Ze={key:0,class:"font-mono bg-red-900 text-red-100 p2"},et=L({__name:"DocumentDetail",props:{id:{},timestamp:{},source:{},name:{},identifier:{},filePath:{},serverApiPrefix:{}},setup(o){const e=o,t=O(()=>[]),n=O(()=>e.identifier!=="fragment"?`${e.serverApiPrefix}/${e.identifier}/${e.name}`:null);return(s,i)=>{const r=ge,c=Be,l=qe;return g(),w("div",Ge,[v("div",Ke,[v("h2",Xe,V(s.name),1),x(n)?(g(),w("div",He,[s.identifier==="query"?(g(),P(r,{key:0,green:"",text:"GET"})):(g(),P(r,{key:1,orange:"",text:"POST"})),v("a",{class:"n-transition n-link n-link-base hover:n-link-hover ml2",target:"_blank",href:x(n)},V(x(n)),9,Ye)])):F("",!0)]),N(l,{text:"Document",description:s.filePath,padding:"px4"},{default:Y(()=>[N(c,{code:s.source,lang:"graphql"},null,8,["code"])]),_:1},8,["description"]),N(l,{text:"Errors",description:x(t).length+" errors",padding:"px4"},{default:Y(()=>[x(t).length?(g(),w("div",Ze,[(g(!0),w(B,null,ne(x(t),(d,u)=>(g(),w("div",{key:u},V(d),1))),128))])):F("",!0)]),_:1},8,["description"])])}}}),tt="ENTRIES",we="KEYS",ye="VALUES",y="";class q{constructor(e,t){const n=e._tree,s=Array.from(n.keys());this.set=e,this._type=t,this._path=s.length>0?[{node:n,keys:s}]:[]}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}=D(this._path);if(D(t)===y)return{done:!1,value:this.result()};const n=e.get(D(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=D(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>D(e)).filter(e=>e!==y).join("")}value(){return D(this._path).node.get(y)}result(){switch(this._type){case ye:return this.value();case we:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const D=o=>o[o.length-1],nt=(o,e,t)=>{const n=new Map;if(e===void 0)return n;const s=e.length+1,i=s+t,r=new Uint8Array(i*s).fill(t+1);for(let c=0;c<s;++c)r[c]=c;for(let c=1;c<i;++c)r[c*s]=c;return xe(o,e,t,n,r,1,s,""),n},xe=(o,e,t,n,s,i,r,c)=>{const l=i*r;e:for(const d of o.keys())if(d===y){const u=s[l-1];u<=t&&n.set(c,[o.get(d),u])}else{let u=i;for(let a=0;a<d.length;++a,++u){const f=d[a],m=r*u,p=m-r;let h=s[m];const _=Math.max(0,u-t-1),k=Math.min(r-1,u+t);for(let b=_;b<k;++b){const S=f!==e[b],$=s[p+b]+ +S,z=s[p+b+1]+1,C=s[m+b]+1,R=s[m+b+1]=Math.min($,z,C);R<h&&(h=R)}if(h>t)continue e}xe(o.get(d),e,t,n,s,u,r,c+d)}};class M{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]=Q(this._tree,e.slice(this._prefix.length));if(t===void 0){const[s,i]=se(n);for(const r of s.keys())if(r!==y&&r.startsWith(i)){const c=new Map;return c.set(r.slice(i.length),s.get(r)),new M(c,e)}}return new M(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,st(this._tree,e)}entries(){return new q(this,tt)}forEach(e){for(const[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return nt(this._tree,e,t)}get(e){const t=Z(this._tree,e);return t!==void 0?t.get(y):void 0}has(e){const t=Z(this._tree,e);return t!==void 0&&t.has(y)}keys(){return new q(this,we)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,G(this._tree,e).set(y,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=G(this._tree,e);return n.set(y,t(n.get(y))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=G(this._tree,e);let s=n.get(y);return s===void 0&&n.set(y,s=t()),s}values(){return new q(this,ye)}[Symbol.iterator](){return this.entries()}static from(e){const t=new M;for(const[n,s]of e)t.set(n,s);return t}static fromObject(e){return M.from(Object.entries(e))}}const Q=(o,e,t=[])=>{if(e.length===0||o==null)return[o,t];for(const n of o.keys())if(n!==y&&e.startsWith(n))return t.push([o,n]),Q(o.get(n),e.slice(n.length),t);return t.push([o,e]),Q(void 0,"",t)},Z=(o,e)=>{if(e.length===0||o==null)return o;for(const t of o.keys())if(t!==y&&e.startsWith(t))return Z(o.get(t),e.slice(t.length))},G=(o,e)=>{const t=e.length;e:for(let n=0;o&&n<t;){for(const i of o.keys())if(i!==y&&e[n]===i[0]){const r=Math.min(t-n,i.length);let c=1;for(;c<r&&e[n+c]===i[c];)++c;const l=o.get(i);if(c===i.length)o=l;else{const d=new Map;d.set(i.slice(c),l),o.set(e.slice(n,n+c),d),o.delete(i),o=d}n+=c;continue e}const s=new Map;return o.set(e.slice(n),s),s}return o},st=(o,e)=>{const[t,n]=Q(o,e);if(t!==void 0){if(t.delete(y),t.size===0)be(n);else if(t.size===1){const[s,i]=t.entries().next().value;Se(n,s,i)}}},be=o=>{if(o.length===0)return;const[e,t]=se(o);if(e.delete(t),e.size===0)be(o.slice(0,-1));else if(e.size===1){const[n,s]=e.entries().next().value;n!==y&&Se(o.slice(0,-1),n,s)}},Se=(o,e,t)=>{if(o.length===0)return;const[n,s]=se(o);n.set(s+e,t),n.delete(s)},se=o=>o[o.length-1],oe="or",ke="and",ot="and_not";class A{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?H:e.autoVacuum;this._options={...X,...e,autoVacuum:t,searchOptions:{...ce,...e.searchOptions||{}},autoSuggestOptions:{...dt,...e.autoSuggestOptions||{}}},this._index=new M,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=te,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:n,processTerm:s,fields:i,idField:r}=this._options,c=t(e,r);if(c==null)throw new Error(`MiniSearch: document does not have ID field "${r}"`);if(this._idToShortId.has(c))throw new Error(`MiniSearch: duplicate ID ${c}`);const l=this.addDocumentId(c);this.saveStoredFields(l,e);for(const d of i){const u=t(e,d);if(u==null)continue;const a=n(u.toString(),d),f=this._fieldIds[d],m=new Set(a).size;this.addFieldLength(l,f,this._documentCount-1,m);for(const p of a){const h=s(p,d);if(Array.isArray(h))for(const _ of h)this.addTerm(f,l,_);else h&&this.addTerm(f,l,h)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:n=10}=t,s={chunk:[],promise:Promise.resolve()},{chunk:i,promise:r}=e.reduce(({chunk:c,promise:l},d,u)=>(c.push(d),(u+1)%n===0?{chunk:[],promise:l.then(()=>new Promise(a=>setTimeout(a,0))).then(()=>this.addAll(c))}:{chunk:c,promise:l}),s);return r.then(()=>this.addAll(i))}remove(e){const{tokenize:t,processTerm:n,extractField:s,fields:i,idField:r}=this._options,c=s(e,r);if(c==null)throw new Error(`MiniSearch: document does not have ID field "${r}"`);const l=this._idToShortId.get(c);if(l==null)throw new Error(`MiniSearch: cannot remove document with ID ${c}: it is not in the index`);for(const d of i){const u=s(e,d);if(u==null)continue;const a=t(u.toString(),d),f=this._fieldIds[d],m=new Set(a).size;this.removeFieldLength(l,f,this._documentCount,m);for(const p of a){const h=n(p,d);if(Array.isArray(h))for(const _ of h)this.removeTerm(f,l,_);else h&&this.removeTerm(f,l,h)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(c),this._fieldLength.delete(l),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 M,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,s)=>{this.removeFieldLength(t,s,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:s}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:s},{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,s=n(e,t);this.discard(s),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=te,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 s=e.batchSize||ee.batchSize,i=e.batchWait||ee.batchWait;let r=1;for(const[c,l]of this._index){for(const[d,u]of l)for(const[a]of u)this._documentIds.has(a)||(u.size<=1?l.delete(d):u.delete(a));this._index.get(c).size===0&&this._index.delete(c),r%s===0&&await new Promise(d=>setTimeout(d,i)),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||H.minDirtCount,n=n||H.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,s={...n,...t},i=this.executeQuery(e,t),r=[];for(const[c,{score:l,terms:d,match:u}]of i){const a=d.length||1,f={id:this._documentIds.get(c),score:l*a,terms:Object.keys(u),queryTerms:d,match:u};Object.assign(f,this._storedFields.get(c)),(s.filter==null||s.filter(f))&&r.push(f)}return e===A.wildcard&&s.boostDocument==null||r.sort(de),r}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const n=new Map;for(const{score:i,terms:r}of this.search(e,t)){const c=r.join(" "),l=n.get(c);l!=null?(l.score+=i,l.count+=1):n.set(c,{score:i,terms:r,count:1})}const s=[];for(const[i,{score:r,terms:c,count:l}]of n)s.push({suggestion:i,terms:c,score:r/l});return s.sort(de),s}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(X.hasOwnProperty(e))return K(X,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:n,documentIds:s,fieldLength:i,storedFields:r,serializationVersion:c}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=U(s),l._fieldLength=U(i),l._storedFields=U(r);for(const[d,u]of l._documentIds)l._idToShortId.set(u,d);for(const[d,u]of n){const a=new Map;for(const f of Object.keys(u)){let m=u[f];c===1&&(m=m.ds),a.set(parseInt(f,10),U(m))}l._index.set(d,a)}return l}static async loadJSAsync(e,t){const{index:n,documentIds:s,fieldLength:i,storedFields:r,serializationVersion:c}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await J(s),l._fieldLength=await J(i),l._storedFields=await J(r);for(const[u,a]of l._documentIds)l._idToShortId.set(a,u);let d=0;for(const[u,a]of n){const f=new Map;for(const m of Object.keys(a)){let p=a[m];c===1&&(p=p.ds),f.set(parseInt(m,10),await J(p))}++d%1e3===0&&await Ce(0),l._index.set(u,f)}return l}static instantiateMiniSearch(e,t){const{documentCount:n,nextId:s,fieldIds:i,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 A(t);return d._documentCount=n,d._nextId=s,d._idToShortId=new Map,d._fieldIds=i,d._avgFieldLength=r,d._dirtCount=c||0,d._index=new M,d}executeQuery(e,t={}){if(e===A.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f={...t,...e,queries:void 0},m=e.queries.map(p=>this.executeQuery(p,f));return this.combineResults(m,f.combineWith)}const{tokenize:n,processTerm:s,searchOptions:i}=this._options,r={tokenize:n,processTerm:s,...i,...t},{tokenize:c,processTerm:l}=r,a=c(e).flatMap(f=>l(f)).filter(f=>!!f).map(lt(r)).map(f=>this.executeQuerySpec(f,r));return this.combineResults(a,r.combineWith)}executeQuerySpec(e,t){const n={...this._options.searchOptions,...t},s=(n.fields||this._options.fields).reduce((h,_)=>({...h,[_]:K(n.boost,_)||1}),{}),{boostDocument:i,weights:r,maxFuzzy:c,bm25:l}=n,{fuzzy:d,prefix:u}={...ce.weights,...r},a=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,a,s,i,l);let m,p;if(e.prefix&&(m=this._index.atPrefix(e.term)),e.fuzzy){const h=e.fuzzy===!0?.2:e.fuzzy,_=h<1?Math.min(c,Math.round(e.term.length*h)):h;_&&(p=this._index.fuzzyGet(e.term,_))}if(m)for(const[h,_]of m){const k=h.length-e.term.length;if(!k)continue;p==null||p.delete(h);const b=u*h.length/(h.length+.3*k);this.termResults(e.term,h,b,e.termBoost,_,s,i,l,f)}if(p)for(const h of p.keys()){const[_,k]=p.get(h);if(!k)continue;const b=d*h.length/(h.length+k);this.termResults(e.term,h,b,e.termBoost,_,s,i,l,f)}return f}executeWildcardQuery(e){const t=new Map,n={...this._options.searchOptions,...e};for(const[s,i]of this._documentIds){const r=n.boostDocument?n.boostDocument(i,"",this._storedFields.get(s)):1;t.set(s,{score:r,terms:[],match:{}})}return t}combineResults(e,t=oe){if(e.length===0)return new Map;const n=t.toLowerCase(),s=it[n];if(!s)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(s)||new Map}toJSON(){const e=[];for(const[t,n]of this._index){const s={};for(const[i,r]of n)s[i]=Object.fromEntries(r);e.push([t,s])}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,s,i,r,c,l,d=new Map){if(i==null)return d;for(const u of Object.keys(r)){const a=r[u],f=this._fieldIds[u],m=i.get(f);if(m==null)continue;let p=m.size;const h=this._avgFieldLength[f];for(const _ of m.keys()){if(!this._documentIds.has(_)){this.removeTerm(f,_,t),p-=1;continue}const k=c?c(this._documentIds.get(_),t,this._storedFields.get(_)):1;if(!k)continue;const b=m.get(_),S=this._fieldLength.get(_)[f],$=ct(b,p,this._documentCount,S,h,l),z=n*s*a*k*$,C=d.get(_);if(C){C.score+=z,ut(C.terms,e);const R=K(C.match,t);R?R.push(u):C.match[t]=[u]}else d.set(_,{score:z,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,n){const s=this._index.fetch(n,ue);let i=s.get(e);if(i==null)i=new Map,i.set(t,1),s.set(e,i);else{const r=i.get(t);i.set(t,(r||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}const s=this._index.fetch(n,ue),i=s.get(e);i==null||i.get(t)==null?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?s.delete(e):i.delete(t):i.set(t,i.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(const s of Object.keys(this._fieldIds))if(this._fieldIds[s]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${s}". 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,s){let i=this._fieldLength.get(e);i==null&&this._fieldLength.set(e,i=[]),i[t]=s;const c=(this._avgFieldLength[t]||0)*n+s;this._avgFieldLength[t]=c/(n+1)}removeFieldLength(e,t,n,s){if(n===1){this._avgFieldLength[t]=0;return}const i=this._avgFieldLength[t]*n-s;this._avgFieldLength[t]=i/(n-1)}saveStoredFields(e,t){const{storeFields:n,extractField:s}=this._options;if(n==null||n.length===0)return;let i=this._storedFields.get(e);i==null&&this._storedFields.set(e,i={});for(const r of n){const c=s(t,r);c!==void 0&&(i[r]=c)}}}A.wildcard=Symbol("*");const K=(o,e)=>Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0,it={[oe]:(o,e)=>{for(const t of e.keys()){const n=o.get(t);if(n==null)o.set(t,e.get(t));else{const{score:s,terms:i,match:r}=e.get(t);n.score=n.score+s,n.match=Object.assign(n.match,r),le(n.terms,i)}}return o},[ke]:(o,e)=>{const t=new Map;for(const n of e.keys()){const s=o.get(n);if(s==null)continue;const{score:i,terms:r,match:c}=e.get(n);le(s.terms,r),t.set(n,{score:s.score+i,terms:s.terms,match:Object.assign(s.match,c)})}return t},[ot]:(o,e)=>{for(const t of e.keys())o.delete(t);return o}},rt={k:1.2,b:.7,d:.5},ct=(o,e,t,n,s,i)=>{const{k:r,b:c,d:l}=i;return Math.log(1+(t-e+.5)/(e+.5))*(l+o*(r+1)/(o+r*(1-c+c*n/s)))},lt=o=>(e,t,n)=>{const s=typeof o.fuzzy=="function"?o.fuzzy(e,t,n):o.fuzzy||!1,i=typeof o.prefix=="function"?o.prefix(e,t,n):o.prefix===!0,r=typeof o.boostTerm=="function"?o.boostTerm(e,t,n):1;return{term:e,fuzzy:s,prefix:i,termBoost:r}},X={idField:"id",extractField:(o,e)=>o[e],tokenize:o=>o.split(at),processTerm:o=>o.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(o,e)=>{typeof(console==null?void 0:console[o])=="function"&&console[o](e)},autoVacuum:!0},ce={combineWith:oe,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:rt},dt={combineWith:ke,prefix:(o,e,t)=>e===t.length-1},ee={batchSize:1e3,batchWait:10},te={minDirtFactor:.1,minDirtCount:20},H={...ee,...te},ut=(o,e)=>{o.includes(e)||o.push(e)},le=(o,e)=>{for(const t of e)o.includes(t)||o.push(t)},de=({score:o},{score:e})=>e-o,ue=()=>new Map,U=o=>{const e=new Map;for(const t of Object.keys(o))e.set(parseInt(t,10),o[t]);return e},J=async o=>{const e=new Map;let t=0;for(const n of Object.keys(o))e.set(parseInt(n,10),o[n]),++t%1e3===0&&await Ce(0);return e},Ce=o=>new Promise(e=>setTimeout(e,o)),at=/[\n\r\p{Z}\p{P}]+/u,ht={class:"relative",style:{height:"100vh"}},ft={class:"flex h-full"},mt={class:"h-full border-r border-r-gray-800 of-auto","h-full":"",style:{width:"22rem","min-width":"0",flex:"0 0 auto"}},pt={flex:"~ col gap2",border:"b base",class:"border-b-gray-800 p3 flex-1"},_t=["onClick"],gt={style:{width:"6rem"},class:"text-left"},vt=["onClick"],wt={key:0,class:"h-full relative w-full of-auto"},yt="nuxt-graphql-middleware",bt=L({__name:"index",setup(o){const e=new A({fields:["id","source","name","filePath","identifier"],storeFields:["id","source","name","identifier","filePath"],searchOptions:{fuzzy:.7}}),t=W(""),n=W([]),s=W(""),i=W(""),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 a=u.devtools.extendClientRpc(yt,{showNotification(){},documentsUpdated(p){c(p)}}),f=await a.getDocuments();c(f);const m=await a.getModuleOptions();i.value=m.serverApiPrefix});function l(u){const a=document.createElement("textarea");a.value=u.source,a.style.top="0",a.style.left="0",a.style.position="fixed",document.body.appendChild(a),a.focus(),a.select();try{document.execCommand("copy")}catch{}document.body.removeChild(a)}const d=O(()=>s.value?e.search(s.value):n.value);return(u,a)=>{const f=Ee,m=ge,p=et;return g(),w("div",ht,[v("div",ft,[v("div",mt,[v("div",pt,[N(f,{modelValue:x(s),"onUpdate:modelValue":a[0]||(a[0]=h=>me(s)?s.value=h:null),placeholder:"Search documents...",icon:"carbon-search",class:"w-full"},null,8,["modelValue"])]),(g(!0),w(B,null,ne(x(d),h=>(g(),w("div",{key:h.id,class:"relative group"},[v("button",{class:"text-secondary hover:n-bg-hover flex select-none truncate px2 py2 font-mono text-sm w-full",onClick:_=>t.value=h.id},[v("div",gt,[h.identifier==="query"?(g(),P(m,{key:0,green:"",text:"Query"})):h.identifier==="mutation"?(g(),P(m,{key:1,orange:"",text:"Mutation"})):F("",!0)]),v("div",null,V(h.name),1)],8,_t),v("button",{class:"absolute right-0 top-0 text-sm h-full flex items-center opacity-0 group-hover:opacity-100 pr2",onClick:_=>l(h)},a[1]||(a[1]=[v("span",null,"Copy",-1)]),8,vt)]))),128))]),a[2]||(a[2]=v("div",{class:"splitpanes__splitter"},null,-1)),x(r)?(g(),w("div",wt,[N(p,fe(x(r),{"server-api-prefix":x(i)}),null,16,["server-api-prefix"])])):F("",!0)])])}}});export{bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{E as a,F as s,G as r,H as o,I as i}from"./BMPkTe12.js";function u(n){var t;const e=n||s();return((t=e==null?void 0:e.ssrContext)==null?void 0:t.head)||(e==null?void 0:e.runWithContext(()=>{if(r())return o(i)}))}function d(n,e={}){const t=u(e.nuxt);if(t)return a(n,{head:t,...e})}export{d as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"85b9c065-c702-4b67-9fa8-2d27fbcda8e3","timestamp":1751274166516}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"85b9c065-c702-4b67-9fa8-2d27fbcda8e3","timestamp":1751274166516,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--nui-c-context:125,125,125}html{background-color:#fff}html.dark{background-color:#151515;color:#fff;color-scheme:dark}::-moz-selection{background:#8884}::selection{background:#8884}.shiki .line{display:inline-block;position:relative;width:100%}.shiki.diff .line>span{filter:saturate(.75);opacity:.75}.shiki.diff .line-added,.shiki.diff .line-removed{scroll-margin:5em}.shiki.diff .line-added>span,.shiki.diff .line-removed>span{opacity:1!important;position:inherit;scroll-margin:20px;z-index:100}.shiki.diff .line-added>span{color:#218c3b!important}.shiki.diff .line-removed>span{color:#d15547!important}.shiki .line-added:after{background-color:#43885420}.shiki .line-added:after,.shiki .line-removed:after{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.shiki .line-removed:after{background-color:#8f4c3926}::view-transition-new(root),::view-transition-old(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:2147483646}.dark::view-transition-old(root){z-index:2147483646}.dark::view-transition-new(root){z-index:1}*,:after,:before{border-color:var(--un-default-border-color, #e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content: ""}:host,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;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*,: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: }::backdrop{--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: }@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthSQBK6PYK3EXw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRR232RmYJp8I5zzw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRSW32RmYJp8I5.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}.carbon-chevron-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z'/%3E%3C/svg%3E");background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.carbon-search{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29ZM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9'/%3E%3C/svg%3E");background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.n-icon{flex:none}.n-border-base{border-color:#9ca3af33}.dark .n-bg-base{--un-bg-opacity:1;background-color:rgb(21 21 21 / var(--un-bg-opacity))}.n-bg-base,.n-code-block{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .n-code-block{--un-bg-opacity:1;background-color:rgb(18 18 18 / var(--un-bg-opacity))}.hover\:n-bg-hover:hover{background-color:#9ca3af08}.hover\:n-link-hover:hover{--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));-webkit-text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;--un-line-opacity:1 !important;opacity:1!important;text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;text-decoration-style:dotted}.n-link-base{text-decoration-color:#0003;text-decoration-line:underline;text-underline-offset:2px}.dark .n-link-base{text-decoration-color:#fff6}.focus-within\:n-focus-base:focus-within{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.5) }.n-transition{transition-duration:.15s;transition-duration:.2s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-bottom-1\/2{bottom:-50%}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-20{z-index:20}.grid{display:grid}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mb-16{margin-bottom:4rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb3{margin-bottom:.75rem}.mb4{margin-bottom:1rem}.ml-0\.3em{margin-left:.3em}.ml-0\.4em{margin-left:.4em}.ml2{margin-left:.5rem}.mr-0\.1em{margin-right:.1em}.mt1{margin-top:.25rem}.inline,[inline=""]{display:inline}.inline-block{display:inline-block}.h-1\/2{height:50%}.h-auto{height:auto}.h-full,[h-full=""]{height:100%}.h1{height:.25rem}.h2{height:.5rem}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.w-full{width:100%}.flex,[flex~="~"]{display:flex}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-col,[flex~=col]{flex-direction:column}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.place-content-center{place-content:center}.place-self-start,[place-self-start=""]{place-self:start}.items-center,[items-center=""]{align-items:center}.justify-center{justify-content:center}.flex-gap2,.gap2,[flex~=gap2]{gap:.5rem}.gap-3,[flex~=gap-3]{gap:.75rem}.of-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.b,.border{border-width:1px}.border-r{border-right-width:1px}[border~=b]{border-bottom-width:1px}.focus-within\:border-context:focus-within{--un-border-opacity:1;border-color:rgba(var(--nui-c-context),var(--un-border-opacity))}.border-b-gray-800{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(31 41 55 / var(--un-border-bottom-opacity))}.border-r-gray-800{--un-border-opacity:1;--un-border-right-opacity:var(--un-border-opacity);border-right-color:rgb(31 41 55 / var(--un-border-right-opacity))}.rounded{border-radius:.25rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.bg-black\/5{background-color:#0000000d}.bg-gray-400\:10{background-color:#9ca3af1a}.bg-green-400\:10{background-color:#4ade801a}.bg-orange-400\:10{background-color:#fb923c1a}.bg-red-900{--un-bg-opacity:1;background-color:rgb(127 29 29 / var(--un-bg-opacity))}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .dark\:bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0 / var(--un-bg-opacity))}.dark .dark\:bg-white\/10{background-color:#ffffff1a}.p-8{padding:2rem}.p2{padding:.5rem}.p3{padding:.75rem}.p4{padding:1rem}.p5{padding:1.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-4,.px4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.px2{padding-left:.5rem;padding-right:.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2,.py2{padding-bottom:.5rem;padding-top:.5rem}.pb6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pr-2,.pr2{padding-right:.5rem}.pt-14{padding-top:3.5rem}.pt2{padding-top:.5rem}.text-center{text-align:center}.text-left{text-align:left}.text-1\.1em{font-size:1.1em}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-base,[text-base=""]{font-size:1rem;line-height:1.5rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.dark .dark\:text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.text-black{--un-text-opacity:1;color:rgb(0 0 0 / var(--un-text-opacity))}.text-gray{--un-text-opacity:1;color:rgb(156 163 175 / var(--un-text-opacity))}.text-green-400{--un-text-opacity:1;color:rgb(74 222 128 / var(--un-text-opacity))}.text-orange-400{--un-text-opacity:1;color:rgb(251 146 60 / var(--un-text-opacity))}.text-red-100{--un-text-opacity:1;color:rgb(254 226 226 / var(--un-text-opacity))}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-mono{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:DM Sans,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}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.group:hover .group-hover\:opacity-100,.op100{opacity:1}.op50,[op50=""]{opacity:.5}.op60{opacity:.6}.op75,[op75=""]{opacity:.75}.opacity-0{opacity:0}.\!outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.transition,[transition=""]{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500,[duration-500=""]{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:640px){.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-8xl{font-size:6rem;line-height:1}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}
|
|
1
|
+
:root{--nui-c-context:125,125,125}html{background-color:#fff}html.dark{background-color:#151515;color:#fff;color-scheme:dark}::-moz-selection{background:#8884}::selection{background:#8884}.shiki .line{display:inline-block;position:relative;width:100%}.shiki.diff .line>span{filter:saturate(.75);opacity:.75}.shiki.diff .line-added,.shiki.diff .line-removed{scroll-margin:5em}.shiki.diff .line-added>span,.shiki.diff .line-removed>span{opacity:1!important;position:inherit;scroll-margin:20px;z-index:100}.shiki.diff .line-added>span{color:#218c3b!important}.shiki.diff .line-removed>span{color:#d15547!important}.shiki .line-added:after{background-color:#43885420}.shiki .line-added:after,.shiki .line-removed:after{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.shiki .line-removed:after{background-color:#8f4c3926}::view-transition-new(root),::view-transition-old(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:2147483646}.dark::view-transition-old(root){z-index:2147483646}.dark::view-transition-new(root){z-index:1}*,:after,:before{border-color:var(--un-default-border-color, #e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content: ""}:host,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;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*,: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: }::backdrop{--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: }@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v15/aFTU7PB1QTsUX8KYthSQBK6PYK3EXw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v15/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v16/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRR232RmYJp8I5zzw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v16/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRSW32RmYJp8I5.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}.carbon-chevron-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z'/%3E%3C/svg%3E");background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.carbon-search{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29ZM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9'/%3E%3C/svg%3E");background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.n-icon{flex:none}.n-border-base{border-color:#9ca3af33}.dark .n-bg-base{--un-bg-opacity:1;background-color:rgb(21 21 21 / var(--un-bg-opacity))}.n-bg-base,.n-code-block{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .n-code-block{--un-bg-opacity:1;background-color:rgb(18 18 18 / var(--un-bg-opacity))}.hover\:n-bg-hover:hover{background-color:#9ca3af08}.hover\:n-link-hover:hover{--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));-webkit-text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;--un-line-opacity:1 !important;opacity:1!important;text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;text-decoration-style:dotted}.n-link-base{text-decoration-color:#0003;text-decoration-line:underline;text-underline-offset:2px}.dark .n-link-base{text-decoration-color:#fff6}.focus-within\:n-focus-base:focus-within{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.5) }.n-transition{transition-duration:.15s;transition-duration:.2s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-bottom-1\/2{bottom:-50%}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-20{z-index:20}.grid{display:grid}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mb-16{margin-bottom:4rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb3{margin-bottom:.75rem}.mb4{margin-bottom:1rem}.ml-0\.3em{margin-left:.3em}.ml-0\.4em{margin-left:.4em}.ml2{margin-left:.5rem}.mr-0\.1em{margin-right:.1em}.mt1{margin-top:.25rem}.inline,[inline=""]{display:inline}.inline-block{display:inline-block}.h-1\/2{height:50%}.h-auto{height:auto}.h-full,[h-full=""]{height:100%}.h1{height:.25rem}.h2{height:.5rem}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.w-full{width:100%}.flex,[flex~="~"]{display:flex}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-col,[flex~=col]{flex-direction:column}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.place-content-center{place-content:center}.place-self-start,[place-self-start=""]{place-self:start}.items-center,[items-center=""]{align-items:center}.justify-center{justify-content:center}.flex-gap2,.gap2,[flex~=gap2]{gap:.5rem}.gap-3,[flex~=gap-3]{gap:.75rem}.of-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.b,.border{border-width:1px}.border-r{border-right-width:1px}[border~=b]{border-bottom-width:1px}.focus-within\:border-context:focus-within{--un-border-opacity:1;border-color:rgba(var(--nui-c-context),var(--un-border-opacity))}.border-b-gray-800{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(31 41 55 / var(--un-border-bottom-opacity))}.border-r-gray-800{--un-border-opacity:1;--un-border-right-opacity:var(--un-border-opacity);border-right-color:rgb(31 41 55 / var(--un-border-right-opacity))}.rounded{border-radius:.25rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.bg-black\/5{background-color:#0000000d}.bg-gray-400\:10{background-color:#9ca3af1a}.bg-green-400\:10{background-color:#4ade801a}.bg-orange-400\:10{background-color:#fb923c1a}.bg-red-900{--un-bg-opacity:1;background-color:rgb(127 29 29 / var(--un-bg-opacity))}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .dark\:bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0 / var(--un-bg-opacity))}.dark .dark\:bg-white\/10{background-color:#ffffff1a}.p-8{padding:2rem}.p2{padding:.5rem}.p3{padding:.75rem}.p4{padding:1rem}.p5{padding:1.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-4,.px4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.px2{padding-left:.5rem;padding-right:.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2,.py2{padding-bottom:.5rem;padding-top:.5rem}.pb6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pr-2,.pr2{padding-right:.5rem}.pt-14{padding-top:3.5rem}.pt2{padding-top:.5rem}.text-center{text-align:center}.text-left{text-align:left}.text-1\.1em{font-size:1.1em}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-base,[text-base=""]{font-size:1rem;line-height:1.5rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.dark .dark\:text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.text-black{--un-text-opacity:1;color:rgb(0 0 0 / var(--un-text-opacity))}.text-gray{--un-text-opacity:1;color:rgb(156 163 175 / var(--un-text-opacity))}.text-green-400{--un-text-opacity:1;color:rgb(74 222 128 / var(--un-text-opacity))}.text-orange-400{--un-text-opacity:1;color:rgb(251 146 60 / var(--un-text-opacity))}.text-red-100{--un-text-opacity:1;color:rgb(254 226 226 / var(--un-text-opacity))}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-mono{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:DM Sans,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}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.group:hover .group-hover\:opacity-100,.op100{opacity:1}.op50,[op50=""]{opacity:.5}.op60{opacity:.6}.op75,[op75=""]{opacity:.75}.opacity-0{opacity:0}.\!outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.transition,[transition=""]{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500,[duration-500=""]{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:640px){.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-8xl{font-size:6rem;line-height:1}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}
|
package/dist/client/index.html
CHANGED
|
@@ -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
|
-
<link rel="stylesheet" href="/__nuxt-graphql-middleware/_nuxt/entry.
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/
|
|
3
|
+
<link rel="stylesheet" href="/__nuxt-graphql-middleware/_nuxt/entry.BBgLZ1Jk.css" crossorigin>
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/BMPkTe12.js">
|
|
5
5
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-404.Bbd2eCoc.css">
|
|
6
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/
|
|
7
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/
|
|
6
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/4Fsya3Lb.js">
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CyXF4zpN.js">
|
|
8
8
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500.Cd2cwFc3.css">
|
|
9
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/
|
|
10
|
-
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/
|
|
11
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"
|
|
9
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/BKIQXJNq.js">
|
|
10
|
+
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/BMPkTe12.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},1751274168721,false]</script>
|
|
11
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"85b9c065-c702-4b67-9fa8-2d27fbcda8e3",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import { existsSync as existsSync$1 } from 'fs';
|
|
|
20
20
|
import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
|
|
21
21
|
|
|
22
22
|
const name = "nuxt-graphql-middleware";
|
|
23
|
-
const version = "5.
|
|
23
|
+
const version = "5.2.0";
|
|
24
24
|
|
|
25
25
|
const logger = useLogger("nuxt-graphql-middleware");
|
|
26
26
|
const defaultOptions = {
|
|
@@ -1167,7 +1167,7 @@ const GraphqlConfig = defineStaticTemplate(
|
|
|
1167
1167
|
)
|
|
1168
1168
|
);
|
|
1169
1169
|
return `
|
|
1170
|
-
import { hookFiles } from './hook-files'
|
|
1170
|
+
import { hookFiles } from './hook-files.js'
|
|
1171
1171
|
|
|
1172
1172
|
const schema = ${JSON.stringify(schemaPath)}
|
|
1173
1173
|
|
|
@@ -1347,9 +1347,7 @@ const OperationVariables = defineGeneratorTemplate(
|
|
|
1347
1347
|
const operations = output.getCollectedOperations().reduce((acc, collectedOperation) => {
|
|
1348
1348
|
const node = collectedOperation.node;
|
|
1349
1349
|
const operationName = collectedOperation.graphqlName;
|
|
1350
|
-
const variables = (node.variableDefinitions || []).map(
|
|
1351
|
-
(v) => v.variable.name.value
|
|
1352
|
-
);
|
|
1350
|
+
const variables = (node.variableDefinitions || []).map((v) => v.variable.name.value).sort();
|
|
1353
1351
|
acc[operationName] = variables;
|
|
1354
1352
|
return acc;
|
|
1355
1353
|
}, {});
|
|
@@ -1513,6 +1511,7 @@ class DevModeHandler {
|
|
|
1513
1511
|
nitro = null;
|
|
1514
1512
|
viteWebSocket = null;
|
|
1515
1513
|
operationsToReload = /* @__PURE__ */ new Set();
|
|
1514
|
+
emitBroadcastEventTimeout = null;
|
|
1516
1515
|
init() {
|
|
1517
1516
|
this.nuxt.hooks.hookOnce("ready", this.onReady.bind(this));
|
|
1518
1517
|
this.nuxt.hooks.hookOnce(
|
|
@@ -1580,15 +1579,23 @@ class DevModeHandler {
|
|
|
1580
1579
|
);
|
|
1581
1580
|
}
|
|
1582
1581
|
if (this.devToolsRpc) {
|
|
1583
|
-
|
|
1584
|
-
this.
|
|
1585
|
-
...this.collector.rpcItems.values()
|
|
1586
|
-
]);
|
|
1587
|
-
} catch {
|
|
1588
|
-
logger.info(
|
|
1589
|
-
"Failed to update GraphQL documents in dev tools. The documents might be stale."
|
|
1590
|
-
);
|
|
1582
|
+
if (this.emitBroadcastEventTimeout) {
|
|
1583
|
+
globalThis.clearTimeout(this.emitBroadcastEventTimeout);
|
|
1591
1584
|
}
|
|
1585
|
+
this.emitBroadcastEventTimeout = globalThis.setTimeout(() => {
|
|
1586
|
+
if (!this.devToolsRpc) {
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
try {
|
|
1590
|
+
this.devToolsRpc.broadcast.documentsUpdated([
|
|
1591
|
+
...this.collector.rpcItems.values()
|
|
1592
|
+
]);
|
|
1593
|
+
} catch {
|
|
1594
|
+
logger.info(
|
|
1595
|
+
"Failed to update GraphQL documents in dev tools. The documents might be stale."
|
|
1596
|
+
);
|
|
1597
|
+
}
|
|
1598
|
+
}, 1e3);
|
|
1592
1599
|
}
|
|
1593
1600
|
}
|
|
1594
1601
|
onViteServerCreated(server) {
|
|
@@ -30,7 +30,11 @@ overrideClientContext: Record<string, any>,
|
|
|
30
30
|
/**
|
|
31
31
|
* The cache options set on the composable.
|
|
32
32
|
*/
|
|
33
|
-
cacheOptions: RequestCacheOptions
|
|
33
|
+
cacheOptions: RequestCacheOptions,
|
|
34
|
+
/**
|
|
35
|
+
* The async data key.
|
|
36
|
+
*/
|
|
37
|
+
asyncDataKey?: string): Promise<GraphqlResponse<T>>;
|
|
34
38
|
declare module '#app' {
|
|
35
39
|
interface NuxtApp {
|
|
36
40
|
$graphqlCache?: GraphqlMiddlewareCache;
|
|
@@ -7,14 +7,10 @@ import {
|
|
|
7
7
|
clientCacheEnabledAtBuild,
|
|
8
8
|
importMetaClient
|
|
9
9
|
} from "#nuxt-graphql-middleware/config";
|
|
10
|
-
import { encodeVariables } from "../helpers/queryEncoding.js";
|
|
11
|
-
import {
|
|
12
|
-
encodeContext,
|
|
13
|
-
getOrCreateClientCache,
|
|
14
|
-
sortQueryParams
|
|
15
|
-
} from "../helpers/composables.js";
|
|
10
|
+
import { encodeVariables, sortQueryParams } from "../helpers/queryEncoding.js";
|
|
11
|
+
import { encodeContext, getOrCreateClientCache } from "../helpers/composables.js";
|
|
16
12
|
import { OPERATION_HASH_PREFIX } from "../settings/index.js";
|
|
17
|
-
export function performRequest(operation, operationName, variablesOrBody, overrideFetchOptions, globalClientContext, overrideClientContext, cacheOptions) {
|
|
13
|
+
export function performRequest(operation, operationName, variablesOrBody, overrideFetchOptions, globalClientContext, overrideClientContext, cacheOptions, asyncDataKey) {
|
|
18
14
|
const state = useGraphqlState();
|
|
19
15
|
const app = useNuxtApp();
|
|
20
16
|
const config = useAppConfig();
|
|
@@ -89,7 +85,7 @@ export function performRequest(operation, operationName, variablesOrBody, overri
|
|
|
89
85
|
}
|
|
90
86
|
)
|
|
91
87
|
).then((v) => {
|
|
92
|
-
if (import.meta.dev && v
|
|
88
|
+
if (import.meta.dev && v?.errors?.length) {
|
|
93
89
|
app.callHook("nuxt-graphql-middleware:errors", {
|
|
94
90
|
operation,
|
|
95
91
|
operationName,
|
|
@@ -103,7 +99,7 @@ export function performRequest(operation, operationName, variablesOrBody, overri
|
|
|
103
99
|
});
|
|
104
100
|
});
|
|
105
101
|
if (importMetaClient && cacheKey && app.$graphqlCache && clientCacheEnabledAtBuild) {
|
|
106
|
-
app.$graphqlCache.set(cacheKey, promise);
|
|
102
|
+
app.$graphqlCache.set(cacheKey, promise, asyncDataKey);
|
|
107
103
|
}
|
|
108
104
|
return promise;
|
|
109
105
|
}
|
|
@@ -16,6 +16,7 @@ export function useAsyncGraphqlQuery(name, ...args) {
|
|
|
16
16
|
const vars = isRef(variables) ? variables.value : variables;
|
|
17
17
|
return `useAsyncGraphqlQuery:${name}:${hash(vars)}`;
|
|
18
18
|
});
|
|
19
|
+
let prevKey = "";
|
|
19
20
|
const config = useAppConfig();
|
|
20
21
|
const app = useNuxtApp();
|
|
21
22
|
if (importMetaClient) {
|
|
@@ -39,13 +40,19 @@ export function useAsyncGraphqlQuery(name, ...args) {
|
|
|
39
40
|
asyncDataOptions.getCachedData = function(key, app2, ctx) {
|
|
40
41
|
if (ctx.cause === "initial") {
|
|
41
42
|
return app2.payload.data[key] ?? app2.$graphqlCache?.get(key);
|
|
43
|
+
} else if (ctx.cause === "refresh:manual" || ctx.cause === "refresh:hook") {
|
|
44
|
+
if (app2.$graphqlCache) {
|
|
45
|
+
app2.$graphqlCache.purgeAsyncDataKey(key);
|
|
46
|
+
app2.$graphqlCache.purgeAsyncDataKey(prevKey);
|
|
47
|
+
}
|
|
42
48
|
}
|
|
43
49
|
};
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
const result = useAsyncData(
|
|
47
|
-
asyncDataKey,
|
|
53
|
+
asyncDataKey.value,
|
|
48
54
|
() => {
|
|
55
|
+
prevKey = asyncDataKey.value;
|
|
49
56
|
const globalClientContext = clientOptions && clientOptions.buildClientContext ? clientOptions.buildClientContext() : {};
|
|
50
57
|
return performRequest(
|
|
51
58
|
"query",
|
|
@@ -54,7 +61,8 @@ export function useAsyncGraphqlQuery(name, ...args) {
|
|
|
54
61
|
asyncDataOptions.fetchOptions || {},
|
|
55
62
|
globalClientContext,
|
|
56
63
|
asyncDataOptions.clientContext || {},
|
|
57
|
-
asyncDataOptions.graphqlCaching || {}
|
|
64
|
+
asyncDataOptions.graphqlCaching || {},
|
|
65
|
+
asyncDataKey.value
|
|
58
66
|
);
|
|
59
67
|
},
|
|
60
68
|
asyncDataOptions
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class GraphqlMiddlewareCache {
|
|
8
8
|
cache: Record<string, unknown>;
|
|
9
|
+
asyncDataKeyMap: Record<string, string[]>;
|
|
9
10
|
keys: string[];
|
|
10
11
|
maxSize: number;
|
|
11
12
|
constructor(maxSize?: number);
|
|
12
|
-
set(key: string, value: unknown): void;
|
|
13
|
+
set(key: string, value: unknown, asyncDataKey?: string): void;
|
|
13
14
|
get<T>(key: string): T | undefined;
|
|
14
15
|
purge(): void;
|
|
16
|
+
purgeAsyncDataKey(asyncDataKey: string): void;
|
|
15
17
|
remove(key: string): boolean;
|
|
16
18
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export class GraphqlMiddlewareCache {
|
|
2
|
-
cache;
|
|
3
|
-
|
|
2
|
+
cache = {};
|
|
3
|
+
asyncDataKeyMap = {};
|
|
4
|
+
keys = [];
|
|
4
5
|
maxSize;
|
|
5
6
|
constructor(maxSize = 100) {
|
|
6
|
-
this.cache = {};
|
|
7
|
-
this.keys = [];
|
|
8
7
|
this.maxSize = maxSize;
|
|
9
8
|
}
|
|
10
|
-
set(key, value) {
|
|
9
|
+
set(key, value, asyncDataKey) {
|
|
11
10
|
if (Object.prototype.hasOwnProperty.call(this.cache, key)) {
|
|
12
11
|
const index = this.keys.indexOf(key);
|
|
13
12
|
if (index > -1) {
|
|
@@ -17,10 +16,20 @@ export class GraphqlMiddlewareCache {
|
|
|
17
16
|
const oldestKey = this.keys.shift();
|
|
18
17
|
if (oldestKey !== void 0) {
|
|
19
18
|
delete this.cache[oldestKey];
|
|
19
|
+
delete this.asyncDataKeyMap[oldestKey];
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
this.cache[key] = value;
|
|
23
23
|
this.keys.push(key);
|
|
24
|
+
if (asyncDataKey) {
|
|
25
|
+
if (!Object.prototype.hasOwnProperty.call(
|
|
26
|
+
this.asyncDataKeyMap,
|
|
27
|
+
asyncDataKey
|
|
28
|
+
)) {
|
|
29
|
+
this.asyncDataKeyMap[asyncDataKey] = [];
|
|
30
|
+
}
|
|
31
|
+
this.asyncDataKeyMap[asyncDataKey].push(key);
|
|
32
|
+
}
|
|
24
33
|
}
|
|
25
34
|
get(key) {
|
|
26
35
|
const value = this.cache[key];
|
|
@@ -37,6 +46,15 @@ export class GraphqlMiddlewareCache {
|
|
|
37
46
|
purge() {
|
|
38
47
|
this.cache = {};
|
|
39
48
|
this.keys = [];
|
|
49
|
+
this.asyncDataKeyMap = {};
|
|
50
|
+
}
|
|
51
|
+
purgeAsyncDataKey(asyncDataKey) {
|
|
52
|
+
const keys = this.asyncDataKeyMap[asyncDataKey];
|
|
53
|
+
if (keys && keys.length) {
|
|
54
|
+
keys.forEach((key) => {
|
|
55
|
+
this.remove(key);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
40
58
|
}
|
|
41
59
|
remove(key) {
|
|
42
60
|
if (Object.prototype.hasOwnProperty.call(this.cache, key)) {
|
|
@@ -41,8 +41,4 @@ export type MutationObjectArgs<K extends keyof Mutation, M extends Mutation[K] =
|
|
|
41
41
|
export type PickFrom<T, K extends Array<string>> = T extends Array<any> ? T : T extends Record<string, any> ? keyof T extends K[number] ? T : K[number] extends never ? T : Pick<T, K[number]> : T;
|
|
42
42
|
export type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;
|
|
43
43
|
export declare function encodeContext(context: Record<string, string | null | undefined>): Record<string, string>;
|
|
44
|
-
/**
|
|
45
|
-
* Sort an object defining query params alphabetically.
|
|
46
|
-
*/
|
|
47
|
-
export declare function sortQueryParams(obj: Record<string, string>): Record<string, string>;
|
|
48
44
|
export declare function getOrCreateClientCache(app: NuxtApp, config: AppConfig): GraphqlMiddlewareCache | undefined;
|
|
@@ -15,14 +15,6 @@ export function encodeContext(context) {
|
|
|
15
15
|
{}
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
export function sortQueryParams(obj) {
|
|
19
|
-
const sortedKeys = Object.keys(obj).sort();
|
|
20
|
-
const sortedObj = {};
|
|
21
|
-
for (const key of sortedKeys) {
|
|
22
|
-
sortedObj[key] = obj[key];
|
|
23
|
-
}
|
|
24
|
-
return sortedObj;
|
|
25
|
-
}
|
|
26
18
|
export function getOrCreateClientCache(app, config) {
|
|
27
19
|
if (importMetaServer || !clientCacheEnabledAtBuild) {
|
|
28
20
|
return;
|
|
@@ -8,4 +8,8 @@ export declare function encodeVariables(variables?: Record<string, any> | null):
|
|
|
8
8
|
* In complex cases, the entire variables are sent as a JSON encoded string:
|
|
9
9
|
* ?__variables=%7B%22foobar%22:%7B%22path%22:%22%22%7D%7D
|
|
10
10
|
*/
|
|
11
|
-
export declare function decodeVariables(query: Record<string, any>, validKeys?: string[]): any
|
|
11
|
+
export declare function decodeVariables(query: Record<string, any>, validKeys?: string[]): Record<string, any>;
|
|
12
|
+
/**
|
|
13
|
+
* Sort an object defining query params alphabetically.
|
|
14
|
+
*/
|
|
15
|
+
export declare function sortQueryParams(obj: Record<string, string>): Record<string, string>;
|
|
@@ -49,7 +49,7 @@ function filterValidKeys(validKeys, obj) {
|
|
|
49
49
|
export function decodeVariables(query, validKeys) {
|
|
50
50
|
try {
|
|
51
51
|
if (query.__variables && typeof query.__variables === "string") {
|
|
52
|
-
return JSON.parse(query.__variables);
|
|
52
|
+
return sortQueryParams(JSON.parse(query.__variables));
|
|
53
53
|
}
|
|
54
54
|
} catch {
|
|
55
55
|
}
|
|
@@ -85,5 +85,13 @@ export function decodeVariables(query, validKeys) {
|
|
|
85
85
|
result[key] = query[key];
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
return result;
|
|
88
|
+
return sortQueryParams(result);
|
|
89
|
+
}
|
|
90
|
+
export function sortQueryParams(obj) {
|
|
91
|
+
const sortedKeys = Object.keys(obj).sort();
|
|
92
|
+
const sortedObj = {};
|
|
93
|
+
for (const key of sortedKeys) {
|
|
94
|
+
sortedObj[key] = obj[key];
|
|
95
|
+
}
|
|
96
|
+
return sortedObj;
|
|
89
97
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-graphql-middleware",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Module to perform GraphQL requests as a server middleware.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -82,16 +82,16 @@
|
|
|
82
82
|
"@nuxt/devtools": "^2.4.0",
|
|
83
83
|
"@nuxt/devtools-ui-kit": "^2.4.0",
|
|
84
84
|
"@nuxt/eslint": "^1.2.0",
|
|
85
|
-
"@nuxt/kit": "^3.17.
|
|
85
|
+
"@nuxt/kit": "^3.17.5",
|
|
86
86
|
"@nuxt/module-builder": "^1.0.1",
|
|
87
|
-
"@nuxt/schema": "^3.17.
|
|
87
|
+
"@nuxt/schema": "^3.17.5",
|
|
88
88
|
"@types/micromatch": "^4.0.9",
|
|
89
89
|
"cypress": "^13.12.0",
|
|
90
90
|
"eslint": "^9.23.0",
|
|
91
91
|
"eslint-config-prettier": "^10.1.1",
|
|
92
92
|
"eslint-plugin-prettier": "^5.2.3",
|
|
93
93
|
"mermaid": "^11.5.0",
|
|
94
|
-
"nuxt": "^3.17.
|
|
94
|
+
"nuxt": "^3.17.5",
|
|
95
95
|
"postcss": "^8.5.3",
|
|
96
96
|
"postcss-cli": "^11.0.1",
|
|
97
97
|
"postcss-import": "^16.1.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as L,t as w,v as g,H as z,I as Ie,r as W,J as ie,j as O,K as ae,L as T,M as he,N as ze,O as x,x as v,P as fe,Q as me,R as P,S as F,y as V,T as Fe,U as Ve,V as B,W as ne,z as N,A as Y,B as re,X as Te,_ as Me}from"./UAIVpYSK.js";const pe=L({__name:"NIcon",props:{icon:{}},setup(o){return(e,t)=>(g(),w("div",{class:z(["n-icon",e.icon])},null,2))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Oe=o=>typeof o<"u";function Le(o){return JSON.parse(JSON.stringify(o))}function _e(o,e,t,n={}){var s,i,r;const{clone:c=!1,passive:l=!1,eventName:d,deep:u=!1,defaultValue:a,shouldEmit:f}=n,m=Ie(),p=t||(m==null?void 0:m.emit)||((s=m==null?void 0:m.$emit)==null?void 0:s.bind(m))||((r=(i=m==null?void 0:m.proxy)==null?void 0:i.$emit)==null?void 0:r.bind(m==null?void 0:m.proxy));let h=d;e||(e="modelValue"),h=h||`update:${e.toString()}`;const _=S=>c?typeof c=="function"?c(S):Le(S):S,k=()=>Oe(o[e])?_(o[e]):a,b=S=>{f?f(S)&&p(h,S):p(h,S)};if(l){const S=k(),$=W(S);let I=!1;return ie(()=>o[e],C=>{I||(I=!0,$.value=_(C),ae(()=>I=!1))}),ie($,C=>{!I&&(C!==o[e]||u)&&b(C)},{deep:u}),$}else return O({get(){return k()},set(S){b(S)}})}const $e={class:"n-text-input flex flex items-center border n-border-base rounded py-1 pl-1 pr-2 focus-within:n-focus-base focus-within:border-context n-bg-base"},Ee=L({__name:"NTextInput",props:{modelValue:{default:""},icon:{},placeholder:{},disabled:{type:Boolean},autofocus:{type:Boolean},autocomplete:{},readonly:{type:Boolean},type:{default:"text"}},emits:["keydown","keyup","change"],setup(o,{emit:e}){const s=_e(o,"modelValue",e,{passive:!0});return(i,r)=>{const c=pe;return g(),w("div",$e,[T(i.$slots,"icon",{},()=>[i.icon?(g(),P(c,{key:0,icon:i.icon,class:"ml-0.3em mr-0.1em text-1.1em op50"},null,8,["icon"])):F("",!0)]),he(v("input",fe({"onUpdate:modelValue":r[0]||(r[0]=l=>me(s)?s.value=l:null)},i.$props,{class:"ml-0.4em w-full flex-auto n-bg-base !outline-none"}),null,16),[[ze,x(s)]])])}}}),ge=L({__name:"Tag",props:{green:{type:Boolean},orange:{type:Boolean},text:{}},setup(o){const e=o,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,s)=>(g(),w("span",{class:z(["mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs inline-block",x(t)])},V(n.text),3))}});let E;const j=[];function ve(o){if(j.push(o),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&j.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&j.forEach(t=>t(e))},get(){return E.value},configurable:!0}),()=>{j.splice(j.indexOf(o),1)}}function De(){E||(E=Fe(),ve(e));function o(){E&&Ve(E)}function e(t){E.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",o)}return E}const Ne=De(),Ae=["innerHTML"],Pe=["textContent"],Be=L({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},inline:{type:Boolean},grammarContextCode:{},transformRendered:{}},emits:["loaded"],setup(o,{emit:e}){const t=o,n=e,s=O(()=>{var c;const r=t.lang==="text"?{code:t.code,supported:!1}:((c=Ne.value)==null?void 0:c.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}),i=O(()=>["n-code-block shiki",t.lines&&!t.inline?"n-code-block-lines":""]);return(r,c)=>r.lang&&s.value.supported?(g(),w("pre",{key:0,class:z(i.value)},[v("code",{innerHTML:s.value.code},null,8,Ae)],2)):(g(),w("pre",{key:1,class:z(i.value)},[v("code",null,[(g(!0),w(B,null,ne(r.code.split(`
|
|
2
|
-
`),(l,d)=>(g(),w(B,{key:d},[v("span",{class:"line",textContent:V(l)},null,8,Pe),c[0]||(c[0]=v("br",null,null,-1))],64))),128))])],2))}}),Re={flex:"~ gap-3","items-center":""},je=L({__name:"NIconTitle",props:{icon:{},text:{}},setup(o){return(e,t)=>(g(),w("div",Re,[e.icon?(g(),w("div",{key:0,class:z(e.icon)},null,2)):F("",!0),T(e.$slots,"default",{},()=>[v("div",null,V(e.text),1)])]))}}),We=["open"],Ue={"text-base":""},Je={key:0,"text-sm":"",op50:""},Qe=L({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(o){const t=_e(o,"open",void 0,{passive:!0});function n(s){t.value=s.target.open}return(s,i)=>{const r=pe,c=je;return g(),w(B,null,[v("details",{open:x(t),onToggle:i[0]||(i[0]=(...l)=>n&&n(...l))},[v("summary",{class:z(["cursor-pointer select-none hover:bg-active p4",s.collapse?"":"pointer-events-none"])},[N(c,{icon:s.icon,text:s.text,"text-xl":"",transition:"",class:z([x(t)?"op100":"op60",s.headerClass])},{default:Y(()=>[v("div",null,[v("div",Ue,[T(s.$slots,"text",{},()=>[re(V(s.text),1)],!0)]),s.description||s.$slots.description?(g(),w("div",Je,[T(s.$slots,"description",{},()=>[re(V(s.description),1)],!0)])):F("",!0)]),i[1]||(i[1]=v("div",{class:"flex-auto"},null,-1)),T(s.$slots,"actions",{},void 0,!0),s.collapse?(g(),P(r,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):F("",!0)]),_:3},8,["icon","text","class"])],2),i._lazyshow1||x(t)?(i._lazyshow1=!0,g(),w(B,null,[he(v("div",{class:z(["flex flex-col flex-gap2 pb6 pt2",typeof s.padding=="string"?s.padding:s.padding?"px4":""])},[T(s.$slots,"details",{},void 0,!0),v("div",{class:z([s.containerClass,"mt1"])},[T(s.$slots,"default",{},void 0,!0)],2),T(s.$slots,"footer",{},void 0,!0)],2),[[Te,x(t)]])],64)):F("v-show-if",!0)],40,We),i[2]||(i[2]=v("div",{class:"x-divider"},null,-1))],64)}}}),qe=Me(Qe,[["__scopeId","data-v-f3591bcd"]]),Ge={class:"h-full of-auto p2"},He={class:"p5"},Ke={class:"font-mono mb4 font-bold text-3xl"},Xe={key:0,class:"mb3"},Ye=["href"],Ze={key:0,class:"font-mono bg-red-900 text-red-100 p2"},et=L({__name:"DocumentDetail",props:{id:{},timestamp:{},source:{},name:{},identifier:{},filePath:{},serverApiPrefix:{}},setup(o){const e=o,t=O(()=>[]),n=O(()=>e.identifier!=="fragment"?`${e.serverApiPrefix}/${e.identifier}/${e.name}`:null);return(s,i)=>{const r=ge,c=Be,l=qe;return g(),w("div",Ge,[v("div",He,[v("h2",Ke,V(s.name),1),x(n)?(g(),w("div",Xe,[s.identifier==="query"?(g(),P(r,{key:0,green:"",text:"GET"})):(g(),P(r,{key:1,orange:"",text:"POST"})),v("a",{class:"n-transition n-link n-link-base hover:n-link-hover ml2",target:"_blank",href:x(n)},V(x(n)),9,Ye)])):F("",!0)]),N(l,{text:"Document",description:s.filePath,padding:"px4"},{default:Y(()=>[N(c,{code:s.source,lang:"graphql"},null,8,["code"])]),_:1},8,["description"]),N(l,{text:"Errors",description:x(t).length+" errors",padding:"px4"},{default:Y(()=>[x(t).length?(g(),w("div",Ze,[(g(!0),w(B,null,ne(x(t),(d,u)=>(g(),w("div",{key:u},V(d),1))),128))])):F("",!0)]),_:1},8,["description"])])}}}),tt="ENTRIES",we="KEYS",ye="VALUES",y="";class q{constructor(e,t){const n=e._tree,s=Array.from(n.keys());this.set=e,this._type=t,this._path=s.length>0?[{node:n,keys:s}]:[]}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}=D(this._path);if(D(t)===y)return{done:!1,value:this.result()};const n=e.get(D(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=D(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>D(e)).filter(e=>e!==y).join("")}value(){return D(this._path).node.get(y)}result(){switch(this._type){case ye:return this.value();case we:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const D=o=>o[o.length-1],nt=(o,e,t)=>{const n=new Map;if(e===void 0)return n;const s=e.length+1,i=s+t,r=new Uint8Array(i*s).fill(t+1);for(let c=0;c<s;++c)r[c]=c;for(let c=1;c<i;++c)r[c*s]=c;return xe(o,e,t,n,r,1,s,""),n},xe=(o,e,t,n,s,i,r,c)=>{const l=i*r;e:for(const d of o.keys())if(d===y){const u=s[l-1];u<=t&&n.set(c,[o.get(d),u])}else{let u=i;for(let a=0;a<d.length;++a,++u){const f=d[a],m=r*u,p=m-r;let h=s[m];const _=Math.max(0,u-t-1),k=Math.min(r-1,u+t);for(let b=_;b<k;++b){const S=f!==e[b],$=s[p+b]+ +S,I=s[p+b+1]+1,C=s[m+b]+1,R=s[m+b+1]=Math.min($,I,C);R<h&&(h=R)}if(h>t)continue e}xe(o.get(d),e,t,n,s,u,r,c+d)}};class M{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]=Q(this._tree,e.slice(this._prefix.length));if(t===void 0){const[s,i]=se(n);for(const r of s.keys())if(r!==y&&r.startsWith(i)){const c=new Map;return c.set(r.slice(i.length),s.get(r)),new M(c,e)}}return new M(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,st(this._tree,e)}entries(){return new q(this,tt)}forEach(e){for(const[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return nt(this._tree,e,t)}get(e){const t=Z(this._tree,e);return t!==void 0?t.get(y):void 0}has(e){const t=Z(this._tree,e);return t!==void 0&&t.has(y)}keys(){return new q(this,we)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,G(this._tree,e).set(y,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=G(this._tree,e);return n.set(y,t(n.get(y))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=G(this._tree,e);let s=n.get(y);return s===void 0&&n.set(y,s=t()),s}values(){return new q(this,ye)}[Symbol.iterator](){return this.entries()}static from(e){const t=new M;for(const[n,s]of e)t.set(n,s);return t}static fromObject(e){return M.from(Object.entries(e))}}const Q=(o,e,t=[])=>{if(e.length===0||o==null)return[o,t];for(const n of o.keys())if(n!==y&&e.startsWith(n))return t.push([o,n]),Q(o.get(n),e.slice(n.length),t);return t.push([o,e]),Q(void 0,"",t)},Z=(o,e)=>{if(e.length===0||o==null)return o;for(const t of o.keys())if(t!==y&&e.startsWith(t))return Z(o.get(t),e.slice(t.length))},G=(o,e)=>{const t=e.length;e:for(let n=0;o&&n<t;){for(const i of o.keys())if(i!==y&&e[n]===i[0]){const r=Math.min(t-n,i.length);let c=1;for(;c<r&&e[n+c]===i[c];)++c;const l=o.get(i);if(c===i.length)o=l;else{const d=new Map;d.set(i.slice(c),l),o.set(e.slice(n,n+c),d),o.delete(i),o=d}n+=c;continue e}const s=new Map;return o.set(e.slice(n),s),s}return o},st=(o,e)=>{const[t,n]=Q(o,e);if(t!==void 0){if(t.delete(y),t.size===0)be(n);else if(t.size===1){const[s,i]=t.entries().next().value;Se(n,s,i)}}},be=o=>{if(o.length===0)return;const[e,t]=se(o);if(e.delete(t),e.size===0)be(o.slice(0,-1));else if(e.size===1){const[n,s]=e.entries().next().value;n!==y&&Se(o.slice(0,-1),n,s)}},Se=(o,e,t)=>{if(o.length===0)return;const[n,s]=se(o);n.set(s+e,t),n.delete(s)},se=o=>o[o.length-1],oe="or",ke="and",ot="and_not";class A{constructor(e){if((e==null?void 0: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:{...dt,...e.autoSuggestOptions||{}}},this._index=new M,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=te,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:n,processTerm:s,fields:i,idField:r}=this._options,c=t(e,r);if(c==null)throw new Error(`MiniSearch: document does not have ID field "${r}"`);if(this._idToShortId.has(c))throw new Error(`MiniSearch: duplicate ID ${c}`);const l=this.addDocumentId(c);this.saveStoredFields(l,e);for(const d of i){const u=t(e,d);if(u==null)continue;const a=n(u.toString(),d),f=this._fieldIds[d],m=new Set(a).size;this.addFieldLength(l,f,this._documentCount-1,m);for(const p of a){const h=s(p,d);if(Array.isArray(h))for(const _ of h)this.addTerm(f,l,_);else h&&this.addTerm(f,l,h)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:n=10}=t,s={chunk:[],promise:Promise.resolve()},{chunk:i,promise:r}=e.reduce(({chunk:c,promise:l},d,u)=>(c.push(d),(u+1)%n===0?{chunk:[],promise:l.then(()=>new Promise(a=>setTimeout(a,0))).then(()=>this.addAll(c))}:{chunk:c,promise:l}),s);return r.then(()=>this.addAll(i))}remove(e){const{tokenize:t,processTerm:n,extractField:s,fields:i,idField:r}=this._options,c=s(e,r);if(c==null)throw new Error(`MiniSearch: document does not have ID field "${r}"`);const l=this._idToShortId.get(c);if(l==null)throw new Error(`MiniSearch: cannot remove document with ID ${c}: it is not in the index`);for(const d of i){const u=s(e,d);if(u==null)continue;const a=t(u.toString(),d),f=this._fieldIds[d],m=new Set(a).size;this.removeFieldLength(l,f,this._documentCount,m);for(const p of a){const h=n(p,d);if(Array.isArray(h))for(const _ of h)this.removeTerm(f,l,_);else h&&this.removeTerm(f,l,h)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(c),this._fieldLength.delete(l),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 M,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,s)=>{this.removeFieldLength(t,s,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:s}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:s},{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,s=n(e,t);this.discard(s),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=te,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 s=e.batchSize||ee.batchSize,i=e.batchWait||ee.batchWait;let r=1;for(const[c,l]of this._index){for(const[d,u]of l)for(const[a]of u)this._documentIds.has(a)||(u.size<=1?l.delete(d):u.delete(a));this._index.get(c).size===0&&this._index.delete(c),r%s===0&&await new Promise(d=>setTimeout(d,i)),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,s={...n,...t},i=this.executeQuery(e,t),r=[];for(const[c,{score:l,terms:d,match:u}]of i){const a=d.length||1,f={id:this._documentIds.get(c),score:l*a,terms:Object.keys(u),queryTerms:d,match:u};Object.assign(f,this._storedFields.get(c)),(s.filter==null||s.filter(f))&&r.push(f)}return e===A.wildcard&&s.boostDocument==null||r.sort(de),r}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const n=new Map;for(const{score:i,terms:r}of this.search(e,t)){const c=r.join(" "),l=n.get(c);l!=null?(l.score+=i,l.count+=1):n.set(c,{score:i,terms:r,count:1})}const s=[];for(const[i,{score:r,terms:c,count:l}]of n)s.push({suggestion:i,terms:c,score:r/l});return s.sort(de),s}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 H(K,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:n,documentIds:s,fieldLength:i,storedFields:r,serializationVersion:c}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=U(s),l._fieldLength=U(i),l._storedFields=U(r);for(const[d,u]of l._documentIds)l._idToShortId.set(u,d);for(const[d,u]of n){const a=new Map;for(const f of Object.keys(u)){let m=u[f];c===1&&(m=m.ds),a.set(parseInt(f,10),U(m))}l._index.set(d,a)}return l}static async loadJSAsync(e,t){const{index:n,documentIds:s,fieldLength:i,storedFields:r,serializationVersion:c}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await J(s),l._fieldLength=await J(i),l._storedFields=await J(r);for(const[u,a]of l._documentIds)l._idToShortId.set(a,u);let d=0;for(const[u,a]of n){const f=new Map;for(const m of Object.keys(a)){let p=a[m];c===1&&(p=p.ds),f.set(parseInt(m,10),await J(p))}++d%1e3===0&&await Ce(0),l._index.set(u,f)}return l}static instantiateMiniSearch(e,t){const{documentCount:n,nextId:s,fieldIds:i,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 A(t);return d._documentCount=n,d._nextId=s,d._idToShortId=new Map,d._fieldIds=i,d._avgFieldLength=r,d._dirtCount=c||0,d._index=new M,d}executeQuery(e,t={}){if(e===A.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f={...t,...e,queries:void 0},m=e.queries.map(p=>this.executeQuery(p,f));return this.combineResults(m,f.combineWith)}const{tokenize:n,processTerm:s,searchOptions:i}=this._options,r={tokenize:n,processTerm:s,...i,...t},{tokenize:c,processTerm:l}=r,a=c(e).flatMap(f=>l(f)).filter(f=>!!f).map(lt(r)).map(f=>this.executeQuerySpec(f,r));return this.combineResults(a,r.combineWith)}executeQuerySpec(e,t){const n={...this._options.searchOptions,...t},s=(n.fields||this._options.fields).reduce((h,_)=>({...h,[_]:H(n.boost,_)||1}),{}),{boostDocument:i,weights:r,maxFuzzy:c,bm25:l}=n,{fuzzy:d,prefix:u}={...ce.weights,...r},a=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,a,s,i,l);let m,p;if(e.prefix&&(m=this._index.atPrefix(e.term)),e.fuzzy){const h=e.fuzzy===!0?.2:e.fuzzy,_=h<1?Math.min(c,Math.round(e.term.length*h)):h;_&&(p=this._index.fuzzyGet(e.term,_))}if(m)for(const[h,_]of m){const k=h.length-e.term.length;if(!k)continue;p==null||p.delete(h);const b=u*h.length/(h.length+.3*k);this.termResults(e.term,h,b,e.termBoost,_,s,i,l,f)}if(p)for(const h of p.keys()){const[_,k]=p.get(h);if(!k)continue;const b=d*h.length/(h.length+k);this.termResults(e.term,h,b,e.termBoost,_,s,i,l,f)}return f}executeWildcardQuery(e){const t=new Map,n={...this._options.searchOptions,...e};for(const[s,i]of this._documentIds){const r=n.boostDocument?n.boostDocument(i,"",this._storedFields.get(s)):1;t.set(s,{score:r,terms:[],match:{}})}return t}combineResults(e,t=oe){if(e.length===0)return new Map;const n=t.toLowerCase(),s=it[n];if(!s)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(s)||new Map}toJSON(){const e=[];for(const[t,n]of this._index){const s={};for(const[i,r]of n)s[i]=Object.fromEntries(r);e.push([t,s])}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,s,i,r,c,l,d=new Map){if(i==null)return d;for(const u of Object.keys(r)){const a=r[u],f=this._fieldIds[u],m=i.get(f);if(m==null)continue;let p=m.size;const h=this._avgFieldLength[f];for(const _ of m.keys()){if(!this._documentIds.has(_)){this.removeTerm(f,_,t),p-=1;continue}const k=c?c(this._documentIds.get(_),t,this._storedFields.get(_)):1;if(!k)continue;const b=m.get(_),S=this._fieldLength.get(_)[f],$=ct(b,p,this._documentCount,S,h,l),I=n*s*a*k*$,C=d.get(_);if(C){C.score+=I,ut(C.terms,e);const R=H(C.match,t);R?R.push(u):C.match[t]=[u]}else d.set(_,{score:I,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,n){const s=this._index.fetch(n,ue);let i=s.get(e);if(i==null)i=new Map,i.set(t,1),s.set(e,i);else{const r=i.get(t);i.set(t,(r||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}const s=this._index.fetch(n,ue),i=s.get(e);i==null||i.get(t)==null?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?s.delete(e):i.delete(t):i.set(t,i.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(const s of Object.keys(this._fieldIds))if(this._fieldIds[s]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${s}". 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,s){let i=this._fieldLength.get(e);i==null&&this._fieldLength.set(e,i=[]),i[t]=s;const c=(this._avgFieldLength[t]||0)*n+s;this._avgFieldLength[t]=c/(n+1)}removeFieldLength(e,t,n,s){if(n===1){this._avgFieldLength[t]=0;return}const i=this._avgFieldLength[t]*n-s;this._avgFieldLength[t]=i/(n-1)}saveStoredFields(e,t){const{storeFields:n,extractField:s}=this._options;if(n==null||n.length===0)return;let i=this._storedFields.get(e);i==null&&this._storedFields.set(e,i={});for(const r of n){const c=s(t,r);c!==void 0&&(i[r]=c)}}}A.wildcard=Symbol("*");const H=(o,e)=>Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0,it={[oe]:(o,e)=>{for(const t of e.keys()){const n=o.get(t);if(n==null)o.set(t,e.get(t));else{const{score:s,terms:i,match:r}=e.get(t);n.score=n.score+s,n.match=Object.assign(n.match,r),le(n.terms,i)}}return o},[ke]:(o,e)=>{const t=new Map;for(const n of e.keys()){const s=o.get(n);if(s==null)continue;const{score:i,terms:r,match:c}=e.get(n);le(s.terms,r),t.set(n,{score:s.score+i,terms:s.terms,match:Object.assign(s.match,c)})}return t},[ot]:(o,e)=>{for(const t of e.keys())o.delete(t);return o}},rt={k:1.2,b:.7,d:.5},ct=(o,e,t,n,s,i)=>{const{k:r,b:c,d:l}=i;return Math.log(1+(t-e+.5)/(e+.5))*(l+o*(r+1)/(o+r*(1-c+c*n/s)))},lt=o=>(e,t,n)=>{const s=typeof o.fuzzy=="function"?o.fuzzy(e,t,n):o.fuzzy||!1,i=typeof o.prefix=="function"?o.prefix(e,t,n):o.prefix===!0,r=typeof o.boostTerm=="function"?o.boostTerm(e,t,n):1;return{term:e,fuzzy:s,prefix:i,termBoost:r}},K={idField:"id",extractField:(o,e)=>o[e],tokenize:o=>o.split(at),processTerm:o=>o.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(o,e)=>{typeof(console==null?void 0:console[o])=="function"&&console[o](e)},autoVacuum:!0},ce={combineWith:oe,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:rt},dt={combineWith:ke,prefix:(o,e,t)=>e===t.length-1},ee={batchSize:1e3,batchWait:10},te={minDirtFactor:.1,minDirtCount:20},X={...ee,...te},ut=(o,e)=>{o.includes(e)||o.push(e)},le=(o,e)=>{for(const t of e)o.includes(t)||o.push(t)},de=({score:o},{score:e})=>e-o,ue=()=>new Map,U=o=>{const e=new Map;for(const t of Object.keys(o))e.set(parseInt(t,10),o[t]);return e},J=async o=>{const e=new Map;let t=0;for(const n of Object.keys(o))e.set(parseInt(n,10),o[n]),++t%1e3===0&&await Ce(0);return e},Ce=o=>new Promise(e=>setTimeout(e,o)),at=/[\n\r\p{Z}\p{P}]+/u,ht={class:"relative",style:{height:"100vh"}},ft={class:"flex h-full"},mt={class:"h-full border-r border-r-gray-800 of-auto","h-full":"",style:{width:"22rem","min-width":"0",flex:"0 0 auto"}},pt={flex:"~ col gap2",border:"b base",class:"border-b-gray-800 p3 flex-1"},_t=["onClick"],gt={style:{width:"6rem"},class:"text-left"},vt=["onClick"],wt={key:0,class:"h-full relative w-full of-auto"},yt="nuxt-graphql-middleware",bt=L({__name:"index",setup(o){const e=new A({fields:["id","source","name","filePath","identifier"],storeFields:["id","source","name","identifier","filePath"],searchOptions:{fuzzy:.7}}),t=W(""),n=W([]),s=W(""),i=W(""),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 a=u.devtools.extendClientRpc(yt,{showNotification(){},documentsUpdated(p){c(p)}}),f=await a.getDocuments();c(f);const m=await a.getModuleOptions();i.value=m.serverApiPrefix});function l(u){const a=document.createElement("textarea");a.value=u.source,a.style.top="0",a.style.left="0",a.style.position="fixed",document.body.appendChild(a),a.focus(),a.select();try{document.execCommand("copy")}catch{}document.body.removeChild(a)}const d=O(()=>s.value?e.search(s.value):n.value);return(u,a)=>{const f=Ee,m=ge,p=et;return g(),w("div",ht,[v("div",ft,[v("div",mt,[v("div",pt,[N(f,{modelValue:x(s),"onUpdate:modelValue":a[0]||(a[0]=h=>me(s)?s.value=h:null),placeholder:"Search documents...",icon:"carbon-search",class:"w-full"},null,8,["modelValue"])]),(g(!0),w(B,null,ne(x(d),h=>(g(),w("div",{key:h.id,class:"relative group"},[v("button",{class:"text-secondary hover:n-bg-hover flex select-none truncate px2 py2 font-mono text-sm w-full",onClick:_=>t.value=h.id},[v("div",gt,[h.identifier==="query"?(g(),P(m,{key:0,green:"",text:"Query"})):h.identifier==="mutation"?(g(),P(m,{key:1,orange:"",text:"Mutation"})):F("",!0)]),v("div",null,V(h.name),1)],8,_t),v("button",{class:"absolute right-0 top-0 text-sm h-full flex items-center opacity-0 group-hover:opacity-100 pr2",onClick:_=>l(h)},a[1]||(a[1]=[v("span",null,"Copy",-1)]),8,vt)]))),128))]),a[2]||(a[2]=v("div",{class:"splitpanes__splitter"},null,-1)),x(r)?(g(),w("div",wt,[N(p,fe(x(r),{"server-api-prefix":x(i)}),null,16,["server-api-prefix"])])):F("",!0)])])}}});export{bt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as N,d as T,r as q,a as L,o as B,b as H,c as I,e as U,f as M,h as A,g as z,p as V,i as j,j as k,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 _,y as P,z as Y,A as Z,B as ee}from"./UAIVpYSK.js";import{u as te}from"./u1b7LyOw.js";async function E(t,n=N()){const{path:h,matched:g}=n.resolve(t);if(!g.length||(n._routePreloaded||(n._routePreloaded=new Set),n._routePreloaded.has(h)))return;const v=n._preloadPromises||(n._preloadPromises=[]);if(v.length>4)return Promise.all(v).then(()=>E(t,n));n._routePreloaded.add(h);const e=g.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 h(e){return typeof e=="string"&&e.startsWith("#")}function g(e,a,u){const r=u??t.trailingSlash;if(!e||r!=="append"&&r!=="remove")return e;if(typeof e=="string")return C(e,r);const c="path"in e&&e.path!==void 0?e.path:a(e).path;return{...e,name:void 0,path:C(c,r)}}function v(e){const a=N(),u=D(),r=k(()=>!!e.target&&e.target!=="_self"),c=k(()=>{const d=e.to||e.href||"";return typeof d=="string"&&O(d,{acceptRelative:!0})}),w=z("RouterLink"),b=typeof w!="string"?w.useLink:void 0,m=k(()=>{if(e.external)return!0;const d=e.to||e.href||"";return typeof d=="object"?!1:d===""||c.value}),o=k(()=>{const d=e.to||e.href||"";return m.value?d:g(d,a.resolve,e.trailingSlash)}),f=m.value||b==null?void 0:b({...e,to:o}),y=k(()=>{var S;const d=e.trailingSlash??t.trailingSlash;if(!o.value||c.value||h(o.value))return o.value;if(m.value){const x=typeof o.value=="object"&&"path"in o.value?j(o.value):o.value,i=typeof x=="object"?a.resolve(x).href:x;return C(i,d)}return typeof o.value=="object"?((S=a.resolve(o.value))==null?void 0:S.href)??null:C(F(u.app.baseURL,o.value),d)});return{to:o,hasTarget:r,isAbsoluteUrl:c,isExternal:m,href:y,isActive:(f==null?void 0:f.isActive)??k(()=>o.value===a.currentRoute.value.path),isExactActive:(f==null?void 0:f.isExactActive)??k(()=>o.value===a.currentRoute.value.path),route:(f==null?void 0:f.route)??k(()=>a.resolve(o.value)),async navigate(d){await $(y.value,{replace:e.replace,external:m.value||r.value})}}}return T({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},trailingSlash:{type:String,default:void 0,required:!1}},useLink:v,setup(e,{slots:a}){const u=N(),{to:r,href:c,navigate:w,isExternal:b,hasTarget:m,isAbsoluteUrl:o}=v(e),f=q(!1),y=q(null),d=i=>{var l;y.value=e.custom?(l=i==null?void 0:i.$el)==null?void 0:l.nextElementSibling:i==null?void 0:i.$el};function S(i){var l,s;return!f.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===i:((l=e.prefetchOn)==null?void 0:l[i])??((s=t.prefetchOn)==null?void 0:s[i]))&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!se()}async function x(i=L()){if(f.value)return;f.value=!0;const l=typeof r.value=="string"?r.value:b.value?j(r.value):u.resolve(r.value).fullPath,s=b.value?new URL(l,window.location.href).href:l;await Promise.all([i.hooks.callHook("link:prefetch",s).catch(()=>{}),!b.value&&!m.value&&E(r.value,u).catch(()=>{})])}if(S("visibility")){const i=L();let l,s=null;B(()=>{const p=ie();H(()=>{l=I(()=>{var R;(R=y==null?void 0:y.value)!=null&&R.tagName&&(s=p.observe(y.value,async()=>{s==null||s(),s=null,await x(i)}))})})}),U(()=>{l&&M(l),s==null||s(),s=null})}return()=>{var s;if(!b.value&&!m.value&&!h(r.value)){const p={ref:d,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||(S("interaction")&&(p.onPointerenter=x.bind(null,void 0),p.onFocus=x.bind(null,void 0)),f.value&&(p.class=e.prefetchedClass||t.prefetchedClass),p.rel=e.rel||void 0),A(z("RouterLink"),p,a.default)}const i=e.target||null,l=ne(e.noRel?"":e.rel,t.externalRelAttribute,o.value||m.value?"noopener noreferrer":"")||null;return e.custom?a.default?a.default({href:c.value,navigate:w,prefetch:x,get route(){if(!c.value)return;const p=new URL(c.value,window.location.href);return{path:p.pathname,fullPath:p.pathname,get query(){return V(p.search)},hash:p.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:c.value}},rel:l,target:i,isExternal:b.value||m.value,isActive:!1,isExactActive:!1}):null:A("a",{ref:y,href:c.value||null,rel:l,target:i},(s=a.default)==null?void 0:s.call(a))}}})}const re=ae(K);function C(t,n){const h=n==="append"?W:G;return O(t)&&!t.startsWith("http")?t:h(t,!0)}function ie(){const t=L();if(t._observer)return t._observer;let n=null;const h=new Map,g=(e,a)=>(n||(n=new IntersectionObserver(u=>{for(const r of u){const c=h.get(r.target);(r.isIntersecting||r.intersectionRatio>0)&&c&&c()}})),h.set(e,a),n.observe(e),()=>{h.delete(e),n==null||n.unobserve(e),h.size===0&&(n==null||n.disconnect(),n=null)});return t._observer={observe:g}}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-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: }'}]}),(h,g)=>{const v=re;return X(),J("div",le,[g[0]||(g[0]=_("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),_("div",ue,[_("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:P(t.statusCode)},null,8,ce),_("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:P(t.description)},null,8,fe),_("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(P(t.backHome),1)]),_:1})])])])}}},ge=Q(he,[["__scopeId","data-v-3f6a44b2"]]);export{ge as default};
|