nuxt-graphql-middleware 4.0.0-beta.9 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +10 -2
  2. package/dist/client/200.html +10 -16
  3. package/dist/client/404.html +10 -16
  4. package/dist/client/_nuxt/Bk31qVW4.js +1 -0
  5. package/dist/client/_nuxt/CHM3Rz8p.js +1 -0
  6. package/dist/client/_nuxt/CUKk0hSk.js +24 -0
  7. package/dist/client/_nuxt/Ca6k-hEN.js +2 -0
  8. package/dist/client/_nuxt/KmIjpfWJ.js +1 -0
  9. package/dist/client/_nuxt/builds/latest.json +1 -0
  10. package/dist/client/_nuxt/builds/meta/debd7d31-13de-43c8-a23f-9d618b1b6aee.json +1 -0
  11. package/dist/client/_nuxt/entry.BMcZ91J5.css +1 -0
  12. package/dist/client/_nuxt/error-404.CjTTbIxB.css +1 -0
  13. package/dist/client/_nuxt/error-500.B4KzowuE.css +1 -0
  14. package/dist/client/_nuxt/index.DCCKx2Zk.css +1 -0
  15. package/dist/client/index.html +10 -16
  16. package/dist/module.d.mts +71 -10
  17. package/dist/module.d.ts +71 -10
  18. package/dist/module.json +6 -2
  19. package/dist/module.mjs +241 -156
  20. package/dist/runtime/composables/nuxtApp.d.ts +9 -4
  21. package/dist/runtime/composables/nuxtApp.js +47 -0
  22. package/dist/runtime/composables/server.d.ts +4 -3
  23. package/dist/runtime/composables/{server.mjs → server.js} +2 -2
  24. package/dist/runtime/composables/shared.d.ts +12 -7
  25. package/dist/runtime/composables/useAsyncGraphqlQuery.d.ts +22 -0
  26. package/dist/runtime/composables/useAsyncGraphqlQuery.js +43 -0
  27. package/dist/runtime/composables/useGraphqlMutation.d.ts +3 -2
  28. package/dist/runtime/composables/{useGraphqlMutation.mjs → useGraphqlMutation.js} +2 -2
  29. package/dist/runtime/composables/useGraphqlQuery.d.ts +3 -2
  30. package/dist/runtime/composables/useGraphqlQuery.js +20 -0
  31. package/dist/runtime/composables/useGraphqlState.d.ts +1 -1
  32. package/dist/runtime/composables/{useGraphqlState.mjs → useGraphqlState.js} +1 -1
  33. package/dist/runtime/composables/useGraphqlUploadMutation.d.ts +7 -0
  34. package/dist/runtime/composables/useGraphqlUploadMutation.js +57 -0
  35. package/dist/runtime/helpers/ClientCache.d.ts +15 -0
  36. package/dist/runtime/helpers/ClientCache.js +40 -0
  37. package/dist/runtime/helpers/{index.mjs → index.js} +1 -1
  38. package/dist/runtime/plugins/provideState.d.ts +1 -1
  39. package/dist/runtime/plugins/provideState.js +17 -0
  40. package/dist/runtime/serverHandler/helpers/index.d.ts +6 -4
  41. package/dist/runtime/serverHandler/helpers/{index.mjs → index.js} +2 -2
  42. package/dist/runtime/serverHandler/{index.mjs → index.js} +3 -3
  43. package/dist/runtime/serverHandler/upload.d.ts +2 -0
  44. package/dist/runtime/serverHandler/upload.js +101 -0
  45. package/dist/runtime/serverOptions/defineGraphqlServerOptions.d.ts +2 -2
  46. package/dist/runtime/serverOptions/index.d.ts +1 -1
  47. package/dist/runtime/serverOptions/{index.mjs → index.js} +1 -1
  48. package/dist/runtime/types.d.ts +24 -0
  49. package/dist/runtime/types.js +0 -0
  50. package/dist/types.d.mts +2 -8
  51. package/dist/types.d.ts +2 -8
  52. package/package.json +50 -36
  53. package/dist/client/_nuxt/_plugin-vue_export-helper.c27b6911.js +0 -1
  54. package/dist/client/_nuxt/entry.1bc811cf.css +0 -1
  55. package/dist/client/_nuxt/entry.ea5ff097.js +0 -7
  56. package/dist/client/_nuxt/error-404.0c27f143.js +0 -1
  57. package/dist/client/_nuxt/error-404.a6f724cc.css +0 -1
  58. package/dist/client/_nuxt/error-500.0ea30584.js +0 -1
  59. package/dist/client/_nuxt/error-500.d92554dd.css +0 -1
  60. package/dist/client/_nuxt/index.3f9296a3.css +0 -1
  61. package/dist/client/_nuxt/index.e982558e.js +0 -2
  62. package/dist/client/_nuxt/vue.f36acd1f.b03bdbb5.js +0 -1
  63. package/dist/runtime/composables/nuxtApp.mjs +0 -15
  64. package/dist/runtime/composables/useGraphqlQuery.mjs +0 -9
  65. package/dist/runtime/plugins/provideState.mjs +0 -7
  66. /package/dist/runtime/composables/{shared.mjs → shared.js} +0 -0
  67. /package/dist/runtime/serverHandler/{debug.mjs → debug.js} +0 -0
  68. /package/dist/runtime/serverOptions/{defineGraphqlServerOptions.mjs → defineGraphqlServerOptions.js} +0 -0
  69. /package/dist/runtime/settings/{index.mjs → index.js} +0 -0
@@ -1 +0,0 @@
1
- import{u as i}from"./vue.f36acd1f.b03bdbb5.js";import{_ as r}from"./_plugin-vue_export-helper.c27b6911.js";import{m as a,q as n,s as e,t as s,z as l,A as d}from"./entry.ea5ff097.js";const c=t=>(l("data-v-5741bfc2"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},f=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),m={class:"max-w-520px text-center"},h=["textContent"],g=["textContent"],b={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return i({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(x,u)=>(a(),n("div",p,[f,e("div",m,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,h),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,g)])]))}},S=r(b,[["__scopeId","data-v-5741bfc2"]]);export{S as default};
@@ -1 +0,0 @@
1
- .spotlight[data-v-5741bfc2]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.bg-white[data-v-5741bfc2]{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.grid[data-v-5741bfc2]{display:grid}.place-content-center[data-v-5741bfc2]{place-content:center}.font-sans[data-v-5741bfc2]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-medium[data-v-5741bfc2]{font-weight:500}.font-light[data-v-5741bfc2]{font-weight:300}.h-1\/2[data-v-5741bfc2]{height:50%}.text-8xl[data-v-5741bfc2]{font-size:6rem;line-height:1}.text-xl[data-v-5741bfc2]{font-size:1.25rem;line-height:1.75rem}.leading-tight[data-v-5741bfc2]{line-height:1.25}.mb-8[data-v-5741bfc2]{margin-bottom:2rem}.mb-16[data-v-5741bfc2]{margin-bottom:4rem}.max-w-520px[data-v-5741bfc2]{max-width:520px}.min-h-screen[data-v-5741bfc2]{min-height:100vh}.overflow-hidden[data-v-5741bfc2]{overflow:hidden}.px-8[data-v-5741bfc2]{padding-left:2rem;padding-right:2rem}.fixed[data-v-5741bfc2]{position:fixed}.left-0[data-v-5741bfc2]{left:0}.right-0[data-v-5741bfc2]{right:0}.-bottom-1\/2[data-v-5741bfc2]{bottom:-50%}.text-center[data-v-5741bfc2]{text-align:center}.text-black[data-v-5741bfc2]{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.antialiased[data-v-5741bfc2]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:640px){.sm\:text-4xl[data-v-5741bfc2]{font-size:2.25rem;line-height:2.5rem}.sm\:text-10xl[data-v-5741bfc2]{font-size:10rem;line-height:1}.sm\:px-0[data-v-5741bfc2]{padding-left:0;padding-right:0}}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-5741bfc2]{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark\:text-white[data-v-5741bfc2]{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}}
@@ -1 +0,0 @@
1
- .n-code-block-lines .shiki code{counter-increment:step calc(var(--start, 1) - 1);counter-reset:step}.n-code-block-lines .shiki code .line:before{color:#a3a3a380;content:counter(step);counter-increment:step;display:inline-block;margin-right:.5rem;padding-right:.5rem;text-align:right;width:2.5rem}details[data-v-f53dd400]{border-style:none}summary[data-v-f53dd400]{border-style:none;list-style:none}details[open] summary[data-v-f53dd400]{border-style:none}details summary[data-v-f53dd400]::-webkit-details-marker{display:none}details[open] .chevron[data-v-f53dd400]{opacity:.75;transform:rotate(180deg)}
@@ -1,2 +0,0 @@
1
- import{d as H,m as E,q as B,I as U,r as ne,D as xe,J as Ae,c as K,H as Pe,K as G,L as Se,M as Ue,N as T,s as M,O as ze,P as Ee,Q as j,R,t as J,S as We,T as Re,U as ee,V as ye,v as Z,x as he,y as we,W as Je,z as Qe,A as Ge}from"./entry.ea5ff097.js";import{_ as He}from"./_plugin-vue_export-helper.c27b6911.js";const De=H({__name:"NIcon",props:{icon:{}},setup(i){return(e,t)=>(E(),B("div",{class:U(["n-icon",e.icon])},null,2))}}),Ke=i=>typeof i<"u";function Xe(i){return JSON.parse(JSON.stringify(i))}function Ve(i,e,t,o={}){var r,n,a;const{clone:u=!1,passive:l=!1,eventName:s,deep:c=!1,defaultValue:f,shouldEmit:d}=o,h=Pe(),y=t||(h==null?void 0:h.emit)||((r=h==null?void 0:h.$emit)==null?void 0:r.bind(h))||((a=(n=h==null?void 0:h.proxy)==null?void 0:n.$emit)==null?void 0:a.bind(h==null?void 0:h.proxy));let v=s;e||(e="modelValue"),v=v||`update:${e.toString()}`;const m=p=>u?typeof u=="function"?u(p):Xe(p):p,g=()=>Ke(i[e])?m(i[e]):f,x=p=>{d?d(p)&&y(v,p):y(v,p)};if(l){const p=g(),A=ne(p);let b=!1;return xe(()=>i[e],S=>{b||(b=!0,A.value=m(S),Ae(()=>b=!1))}),xe(A,S=>{!b&&(S!==i[e]||c)&&x(S)},{deep:c}),A}else return K({get(){return g()},set(p){x(p)}})}const Ye={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"},qe=H({__name:"NTextInput",props:{modelValue:{default:""},icon:{},placeholder:{},disabled:{type:Boolean},autofocus:{type:Boolean},type:{default:"text"}},setup(i,{emit:e}){const o=Ve(i,"modelValue",e,{passive:!0});return(r,n)=>{const a=De;return E(),B("div",Ye,[G(r.$slots,"icon",{},()=>[r.icon?(E(),j(a,{key:0,icon:r.icon,class:"ml-0.3em mr-0.1em text-1.1em op50"},null,8,["icon"])):R("",!0)]),Se(M("input",ze({"onUpdate:modelValue":n[0]||(n[0]=u=>Ee(o)?o.value=u:null)},r.$props,{class:"ml-0.4em w-full flex-auto n-bg-base !outline-none"}),null,16),[[Ue,T(o)]])])}}}),Me=H({__name:"Tag",props:{green:{type:Boolean},orange:{type:Boolean},text:{}},setup(i){const e=i,t=K(()=>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(o,r)=>(E(),B("span",{class:U(["mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs inline-block",T(t)])},J(o.text),3))}});let q;const te=[];function Oe(i){if(te.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&te.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&te.forEach(t=>t(e))},get(){return q.value},configurable:!0}),()=>{te.splice(te.indexOf(i),1)}}function Ze(){q||(q=We(),Oe(e));function i(){Re(q)}function e(t){q.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return q}const je=Ze(),et=["innerHTML"],tt={class:"shiki"},rt=["textContent"],nt=M("br",null,null,-1),it=H({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(i,{emit:e}){const t=i,o=K(()=>{var n;const r=t.lang==="text"?{code:t.code,supported:!1}:((n=je.value)==null?void 0:n.devtools.renderCodeHighlight(t.code,t.lang))||{code:t.code,supported:!1};return r.supported&&t.transformRendered&&(r.code=t.transformRendered(r.code)),r.supported&&Ae(()=>e("loaded")),r});return(r,n)=>r.lang&&o.value.supported?(E(),B("pre",{key:0,class:U(["n-code-block",r.lines?"n-code-block-lines":""]),innerHTML:o.value.code},null,10,et)):(E(),B("pre",{key:1,class:U(["n-code-block",r.lines?"n-code-block-lines":""])},[M("pre",tt,[M("code",null,[(E(!0),B(ee,null,ye(r.code.split(`
2
- `),(a,u)=>(E(),B(ee,{key:u},[M("span",{class:"line",textContent:J(a)},null,8,rt),nt],64))),128))])])],2))}});const ot={flex:"~ gap-3","items-center":""},at=H({__name:"NIconTitle",props:{icon:{},text:{}},setup(i){return(e,t)=>(E(),B("div",ot,[e.icon?(E(),B("div",{key:0,class:U(e.icon)},null,2)):R("",!0),G(e.$slots,"default",{},()=>[M("div",null,J(e.text),1)])]))}}),ke=i=>(Qe("data-v-f53dd400"),i=i(),Ge(),i),ut=["open"],lt={"text-base":""},st={key:0,"text-sm":"",op50:""},ct=ke(()=>M("div",{class:"flex-auto"},null,-1)),ft=ke(()=>M("div",{class:"x-divider"},null,-1)),ht=H({__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(i){const t=Ve(i,"open",void 0,{passive:!0});function o(r){t.value=r.target.open}return(r,n)=>{const a=De,u=at;return E(),B(ee,null,[M("details",{open:T(t),onToggle:o},[M("summary",{class:U(["cursor-pointer select-none hover:bg-active p4",r.collapse?"":"pointer-events-none"])},[Z(u,{icon:r.icon,text:r.text,"text-xl":"",transition:"",class:U([T(t)?"op100":"op60",r.headerClass])},{default:he(()=>[M("div",null,[M("div",lt,[G(r.$slots,"text",{},()=>[we(J(r.text),1)],!0)]),r.description||r.$slots.description?(E(),B("div",st,[G(r.$slots,"description",{},()=>[we(J(r.description),1)],!0)])):R("",!0)]),ct,G(r.$slots,"actions",{},void 0,!0),r.collapse?(E(),j(a,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):R("",!0)]),_:3},8,["icon","text","class"])],2),n._lazyshow1||T(t)?(n._lazyshow1=!0,E(),B(ee,null,[Se(M("div",{class:U(["flex flex-col flex-gap2 pb6 pt2",typeof r.padding=="string"?r.padding:r.padding?"px4":""])},[G(r.$slots,"details",{},void 0,!0),M("div",{class:U([r.containerClass,"mt1"])},[G(r.$slots,"default",{},void 0,!0)],2),G(r.$slots,"footer",{},void 0,!0)],2),[[Je,T(t)]])],64)):R("v-show-if",!0)],40,ut),ft],64)}}});const dt=He(ht,[["__scopeId","data-v-f53dd400"]]),vt={class:"h-full of-auto p2"},pt={class:"p5"},yt={class:"font-mono mb4 font-bold text-3xl"},mt={key:0,class:"mb3"},gt=["href"],xt={key:0,class:"font-mono bg-red-900 text-red-100 p2"},wt=H({__name:"DocumentDetail",props:{id:{},content:{},isValid:{type:Boolean},errors:{},filename:{},relativePath:{},name:{},operation:{},serverApiPrefix:{}},setup(i){const e=i,t=K(()=>(e.errors||[]).map(r=>r.message)),o=K(()=>{if(e.operation)return`${e.serverApiPrefix}/${e.operation}/${e.name}`});return(r,n)=>{const a=Me,u=it,l=dt;return E(),B("div",vt,[M("div",pt,[M("h2",yt,J(r.name),1),T(o)?(E(),B("div",mt,[r.operation==="query"?(E(),j(a,{key:0,green:"",text:"GET"})):(E(),j(a,{key:1,orange:"",text:"POST"})),M("a",{class:"n-transition n-link n-link-base hover:n-link-hover ml2",target:"_blank",href:T(o)},J(T(o)),9,gt)])):R("",!0)]),Z(l,{text:"Document",description:r.relativePath,padding:"px4"},{default:he(()=>[Z(u,{code:r.content,lang:"graphql"},null,8,["code"])]),_:1},8,["description"]),Z(l,{text:"Errors",description:T(t).length+" errors",padding:"px4"},{default:he(()=>[T(t).length?(E(),B("div",xt,[(E(!0),B(ee,null,ye(T(t),(s,c)=>(E(),B("div",{key:c},J(s),1))),128))])):R("",!0)]),_:1},8,["description"])])}}});var k=function(){return k=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},k.apply(this,arguments)};function _t(i,e,t,o){function r(n){return n instanceof t?n:new t(function(a){a(n)})}return new(t||(t=Promise))(function(n,a){function u(c){try{s(o.next(c))}catch(f){a(f)}}function l(c){try{s(o.throw(c))}catch(f){a(f)}}function s(c){c.done?n(c.value):r(c.value).then(u,l)}s((o=o.apply(i,e||[])).next())})}function Ft(i,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(t=0)),t;)try{if(o=1,r&&(n=s[0]&2?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[s[0]&2,n.value]),s[0]){case 0:case 1:n=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,r=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(n=t.trys,!(n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){t.label=s[1];break}if(s[0]===6&&t.label<n[1]){t.label=n[1],n=s;break}if(n&&t.label<n[2]){t.label=n[2],t.ops.push(s);break}n[2]&&t.ops.pop(),t.trys.pop();continue}s=e.call(i,t)}catch(c){s=[6,c],r=0}finally{o=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function w(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],o=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&o>=i.length&&(i=void 0),{value:i&&i[o++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function I(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var o=t.call(i),r,n=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(u){a={error:u}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(a)throw a.error}}return n}var bt="ENTRIES",Le="KEYS",Be="VALUES",$="",ae=function(){function i(e,t){var o=e._tree,r=Array.from(o.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:o,keys:r}]:[]}return i.prototype.next=function(){var e=this.dive();return this.backtrack(),e},i.prototype.dive=function(){if(this._path.length===0)return{done:!0,value:void 0};var e=Y(this._path),t=e.node,o=e.keys;if(Y(o)===$)return{done:!1,value:this.result()};var r=t.get(Y(o));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()},i.prototype.backtrack=function(){if(this._path.length!==0){var e=Y(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},i.prototype.key=function(){return this.set._prefix+this._path.map(function(e){var t=e.keys;return Y(t)}).filter(function(e){return e!==$}).join("")},i.prototype.value=function(){return Y(this._path).node.get($)},i.prototype.result=function(){switch(this._type){case Be:return this.value();case Le:return this.key();default:return[this.key(),this.value()]}},i.prototype[Symbol.iterator]=function(){return this},i}(),Y=function(i){return i[i.length-1]},Ct=function(i,e,t){var o=new Map;if(e===void 0)return o;for(var r=e.length+1,n=r+t,a=new Uint8Array(n*r).fill(t+1),u=0;u<r;++u)a[u]=u;for(var l=1;l<n;++l)a[l*r]=l;return Ie(i,e,t,o,a,1,r,""),o},Ie=function(i,e,t,o,r,n,a,u){var l,s,c=n*a;try{e:for(var f=w(i.keys()),d=f.next();!d.done;d=f.next()){var h=d.value;if(h===$){var y=r[c-1];y<=t&&o.set(u,[i.get(h),y])}else{for(var v=n,m=0;m<h.length;++m,++v){for(var g=h[m],x=a*v,p=x-a,A=r[x],b=Math.max(0,v-t-1),S=Math.min(a-1,v+t),_=b;_<S;++_){var C=g!==e[_],z=r[p+_]+ +C,D=r[p+_+1]+1,O=r[x+_]+1,F=r[x+_+1]=Math.min(z,D,O);F<A&&(A=F)}if(A>t)continue e}Ie(i.get(h),e,t,o,r,v,a,u+h)}}}catch(L){l={error:L}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(l)throw l.error}}},ue=function(){function i(e,t){e===void 0&&(e=new Map),t===void 0&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return i.prototype.atPrefix=function(e){var t,o;if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");var r=I(oe(this._tree,e.slice(this._prefix.length)),2),n=r[0],a=r[1];if(n===void 0){var u=I(me(a),2),l=u[0],s=u[1];try{for(var c=w(l.keys()),f=c.next();!f.done;f=c.next()){var d=f.value;if(d!==$&&d.startsWith(s)){var h=new Map;return h.set(d.slice(s.length),l.get(d)),new i(h,e)}}}catch(y){t={error:y}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(t)throw t.error}}}return new i(n,e)},i.prototype.clear=function(){this._size=void 0,this._tree.clear()},i.prototype.delete=function(e){return this._size=void 0,At(this._tree,e)},i.prototype.entries=function(){return new ae(this,bt)},i.prototype.forEach=function(e){var t,o;try{for(var r=w(this),n=r.next();!n.done;n=r.next()){var a=I(n.value,2),u=a[0],l=a[1];e(u,l,this)}}catch(s){t={error:s}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(t)throw t.error}}},i.prototype.fuzzyGet=function(e,t){return Ct(this._tree,e,t)},i.prototype.get=function(e){var t=de(this._tree,e);return t!==void 0?t.get($):void 0},i.prototype.has=function(e){var t=de(this._tree,e);return t!==void 0&&t.has($)},i.prototype.keys=function(){return new ae(this,Le)},i.prototype.set=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var o=le(this._tree,e);return o.set($,t),this},Object.defineProperty(i.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),i.prototype.update=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var o=le(this._tree,e);return o.set($,t(o.get($))),this},i.prototype.fetch=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var o=le(this._tree,e),r=o.get($);return r===void 0&&o.set($,r=t()),r},i.prototype.values=function(){return new ae(this,Be)},i.prototype[Symbol.iterator]=function(){return this.entries()},i.from=function(e){var t,o,r=new i;try{for(var n=w(e),a=n.next();!a.done;a=n.next()){var u=I(a.value,2),l=u[0],s=u[1];r.set(l,s)}}catch(c){t={error:c}}finally{try{a&&!a.done&&(o=n.return)&&o.call(n)}finally{if(t)throw t.error}}return r},i.fromObject=function(e){return i.from(Object.entries(e))},i}(),oe=function(i,e,t){var o,r;if(t===void 0&&(t=[]),e.length===0||i==null)return[i,t];try{for(var n=w(i.keys()),a=n.next();!a.done;a=n.next()){var u=a.value;if(u!==$&&e.startsWith(u))return t.push([i,u]),oe(i.get(u),e.slice(u.length),t)}}catch(l){o={error:l}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return t.push([i,e]),oe(void 0,"",t)},de=function(i,e){var t,o;if(e.length===0||i==null)return i;try{for(var r=w(i.keys()),n=r.next();!n.done;n=r.next()){var a=n.value;if(a!==$&&e.startsWith(a))return de(i.get(a),e.slice(a.length))}}catch(u){t={error:u}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(t)throw t.error}}},le=function(i,e){var t,o,r=e.length;e:for(var n=0;i&&n<r;){try{for(var a=(t=void 0,w(i.keys())),u=a.next();!u.done;u=a.next()){var l=u.value;if(l!==$&&e[n]===l[0]){for(var s=Math.min(r-n,l.length),c=1;c<s&&e[n+c]===l[c];)++c;var f=i.get(l);if(c===l.length)i=f;else{var d=new Map;d.set(l.slice(c),f),i.set(e.slice(n,n+c),d),i.delete(l),i=d}n+=c;continue e}}}catch(y){t={error:y}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}var h=new Map;return i.set(e.slice(n),h),h}return i},At=function(i,e){var t=I(oe(i,e),2),o=t[0],r=t[1];if(o!==void 0){if(o.delete($),o.size===0)$e(r);else if(o.size===1){var n=I(o.entries().next().value,2),a=n[0],u=n[1];Te(r,a,u)}}},$e=function(i){if(i.length!==0){var e=I(me(i),2),t=e[0],o=e[1];if(t.delete(o),t.size===0)$e(i.slice(0,-1));else if(t.size===1){var r=I(t.entries().next().value,2),n=r[0],a=r[1];n!==$&&Te(i.slice(0,-1),n,a)}}},Te=function(i,e,t){if(i.length!==0){var o=I(me(i),2),r=o[0],n=o[1];r.set(n+e,t),r.delete(n)}},me=function(i){return i[i.length-1]},re,ge="or",Ne="and",St="and_not",zt=function(){function i(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');var t=e.autoVacuum==null||e.autoVacuum===!0?fe:e.autoVacuum;this._options=k(k(k({},ce),e),{autoVacuum:t,searchOptions:k(k({},_e),e.searchOptions||{}),autoSuggestOptions:k(k({},Ot),e.autoSuggestOptions||{})}),this._index=new ue,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=pe,this.addFields(this._options.fields)}return i.prototype.add=function(e){var t,o,r,n,a,u,l=this._options,s=l.extractField,c=l.tokenize,f=l.processTerm,d=l.fields,h=l.idField,y=s(e,h);if(y==null)throw new Error('MiniSearch: document does not have ID field "'.concat(h,'"'));if(this._idToShortId.has(y))throw new Error("MiniSearch: duplicate ID ".concat(y));var v=this.addDocumentId(y);this.saveStoredFields(v,e);try{for(var m=w(d),g=m.next();!g.done;g=m.next()){var x=g.value,p=s(e,x);if(p!=null){var A=c(p.toString(),x),b=this._fieldIds[x],S=new Set(A).size;this.addFieldLength(v,b,this._documentCount-1,S);try{for(var _=(r=void 0,w(A)),C=_.next();!C.done;C=_.next()){var z=C.value,D=f(z,x);if(Array.isArray(D))try{for(var O=(a=void 0,w(D)),F=O.next();!F.done;F=O.next()){var L=F.value;this.addTerm(b,v,L)}}catch(V){a={error:V}}finally{try{F&&!F.done&&(u=O.return)&&u.call(O)}finally{if(a)throw a.error}}else D&&this.addTerm(b,v,D)}}catch(V){r={error:V}}finally{try{C&&!C.done&&(n=_.return)&&n.call(_)}finally{if(r)throw r.error}}}}}catch(V){t={error:V}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(t)throw t.error}}},i.prototype.addAll=function(e){var t,o;try{for(var r=w(e),n=r.next();!n.done;n=r.next()){var a=n.value;this.add(a)}}catch(u){t={error:u}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(t)throw t.error}}},i.prototype.addAllAsync=function(e,t){var o=this;t===void 0&&(t={});var r=t.chunkSize,n=r===void 0?10:r,a={chunk:[],promise:Promise.resolve()},u=e.reduce(function(c,f,d){var h=c.chunk,y=c.promise;return h.push(f),(d+1)%n===0?{chunk:[],promise:y.then(function(){return new Promise(function(v){return setTimeout(v,0)})}).then(function(){return o.addAll(h)})}:{chunk:h,promise:y}},a),l=u.chunk,s=u.promise;return s.then(function(){return o.addAll(l)})},i.prototype.remove=function(e){var t,o,r,n,a,u,l=this._options,s=l.tokenize,c=l.processTerm,f=l.extractField,d=l.fields,h=l.idField,y=f(e,h);if(y==null)throw new Error('MiniSearch: document does not have ID field "'.concat(h,'"'));var v=this._idToShortId.get(y);if(v==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(y,": it is not in the index"));try{for(var m=w(d),g=m.next();!g.done;g=m.next()){var x=g.value,p=f(e,x);if(p!=null){var A=s(p.toString(),x),b=this._fieldIds[x],S=new Set(A).size;this.removeFieldLength(v,b,this._documentCount,S);try{for(var _=(r=void 0,w(A)),C=_.next();!C.done;C=_.next()){var z=C.value,D=c(z,x);if(Array.isArray(D))try{for(var O=(a=void 0,w(D)),F=O.next();!F.done;F=O.next()){var L=F.value;this.removeTerm(b,v,L)}}catch(V){a={error:V}}finally{try{F&&!F.done&&(u=O.return)&&u.call(O)}finally{if(a)throw a.error}}else D&&this.removeTerm(b,v,D)}}catch(V){r={error:V}}finally{try{C&&!C.done&&(n=_.return)&&n.call(_)}finally{if(r)throw r.error}}}}}catch(V){t={error:V}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(t)throw t.error}}this._storedFields.delete(v),this._documentIds.delete(v),this._idToShortId.delete(y),this._fieldLength.delete(v),this._documentCount-=1},i.prototype.removeAll=function(e){var t,o;if(e)try{for(var r=w(e),n=r.next();!n.done;n=r.next()){var a=n.value;this.remove(a)}}catch(u){t={error:u}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new ue,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},i.prototype.discard=function(e){var t=this,o=this._idToShortId.get(e);if(o==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(o),this._storedFields.delete(o),(this._fieldLength.get(o)||[]).forEach(function(r,n){t.removeFieldLength(o,n,t._documentCount,r)}),this._fieldLength.delete(o),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()},i.prototype.maybeAutoVacuum=function(){if(this._options.autoVacuum!==!1){var e=this._options.autoVacuum,t=e.minDirtFactor,o=e.minDirtCount,r=e.batchSize,n=e.batchWait;this.conditionalVacuum({batchSize:r,batchWait:n},{minDirtCount:o,minDirtFactor:t})}},i.prototype.discardAll=function(e){var t,o,r=this._options.autoVacuum;try{this._options.autoVacuum=!1;try{for(var n=w(e),a=n.next();!a.done;a=n.next()){var u=a.value;this.discard(u)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(o=n.return)&&o.call(n)}finally{if(t)throw t.error}}}finally{this._options.autoVacuum=r}this.maybeAutoVacuum()},i.prototype.replace=function(e){var t=this._options,o=t.idField,r=t.extractField,n=r(e,o);this.discard(n),this.add(e)},i.prototype.vacuum=function(e){return e===void 0&&(e={}),this.conditionalVacuum(e)},i.prototype.conditionalVacuum=function(e,t){var o=this;return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(function(){var r=o._enqueuedVacuumConditions;return o._enqueuedVacuumConditions=pe,o.performVacuuming(e,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)},i.prototype.performVacuuming=function(e,t){return _t(this,void 0,void 0,function(){var o,r,n,a,u,l,s,c,f,d,h,y,v,m,g,x,p,A,b,S,_,C,z,D,O;return Ft(this,function(F){switch(F.label){case 0:if(o=this._dirtCount,!this.vacuumConditionsMet(t))return[3,10];r=e.batchSize||ve.batchSize,n=e.batchWait||ve.batchWait,a=1,F.label=1;case 1:F.trys.push([1,7,8,9]),u=w(this._index),l=u.next(),F.label=2;case 2:if(l.done)return[3,6];s=I(l.value,2),c=s[0],f=s[1];try{for(d=(C=void 0,w(f)),h=d.next();!h.done;h=d.next()){y=I(h.value,2),v=y[0],m=y[1];try{for(g=(D=void 0,w(m)),x=g.next();!x.done;x=g.next())p=I(x.value,1),A=p[0],!this._documentIds.has(A)&&(m.size<=1?f.delete(v):m.delete(A))}catch(L){D={error:L}}finally{try{x&&!x.done&&(O=g.return)&&O.call(g)}finally{if(D)throw D.error}}}}catch(L){C={error:L}}finally{try{h&&!h.done&&(z=d.return)&&z.call(d)}finally{if(C)throw C.error}}return this._index.get(c).size===0&&this._index.delete(c),a%r!==0?[3,4]:[4,new Promise(function(L){return setTimeout(L,n)})];case 3:F.sent(),F.label=4;case 4:a+=1,F.label=5;case 5:return l=u.next(),[3,2];case 6:return[3,9];case 7:return b=F.sent(),S={error:b},[3,9];case 8:try{l&&!l.done&&(_=u.return)&&_.call(u)}finally{if(S)throw S.error}return[7];case 9:this._dirtCount-=o,F.label=10;case 10:return[4,null];case 11:return F.sent(),this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null,[2]}})})},i.prototype.vacuumConditionsMet=function(e){if(e==null)return!0;var t=e.minDirtCount,o=e.minDirtFactor;return t=t||fe.minDirtCount,o=o||fe.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=o},Object.defineProperty(i.prototype,"isVacuuming",{get:function(){return this._currentVacuum!=null},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dirtCount",{get:function(){return this._dirtCount},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dirtFactor",{get:function(){return this._dirtCount/(1+this._documentCount+this._dirtCount)},enumerable:!1,configurable:!0}),i.prototype.has=function(e){return this._idToShortId.has(e)},i.prototype.getStoredFields=function(e){var t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)},i.prototype.search=function(e,t){var o,r;t===void 0&&(t={});var n=this.executeQuery(e,t),a=[];try{for(var u=w(n),l=u.next();!l.done;l=u.next()){var s=I(l.value,2),c=s[0],f=s[1],d=f.score,h=f.terms,y=f.match,v=h.length,m={id:this._documentIds.get(c),score:d*v,terms:Object.keys(y),match:y};Object.assign(m,this._storedFields.get(c)),(t.filter==null||t.filter(m))&&a.push(m)}}catch(g){o={error:g}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(o)throw o.error}}return a.sort(be),a},i.prototype.autoSuggest=function(e,t){var o,r,n,a;t===void 0&&(t={}),t=k(k({},this._options.autoSuggestOptions),t);var u=new Map;try{for(var l=w(this.search(e,t)),s=l.next();!s.done;s=l.next()){var c=s.value,f=c.score,d=c.terms,h=d.join(" "),y=u.get(h);y!=null?(y.score+=f,y.count+=1):u.set(h,{score:f,terms:d,count:1})}}catch(b){o={error:b}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(o)throw o.error}}var v=[];try{for(var m=w(u),g=m.next();!g.done;g=m.next()){var x=I(g.value,2),y=x[0],p=x[1],f=p.score,d=p.terms,A=p.count;v.push({suggestion:y,terms:d,score:f/A})}}catch(b){n={error:b}}finally{try{g&&!g.done&&(a=m.return)&&a.call(m)}finally{if(n)throw n.error}}return v.sort(be),v},Object.defineProperty(i.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"termCount",{get:function(){return this._index.size},enumerable:!1,configurable:!0}),i.loadJSON=function(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)},i.getDefault=function(e){if(ce.hasOwnProperty(e))return se(ce,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},i.loadJS=function(e,t){var o,r,n,a,u,l,s=e.index,c=e.documentCount,f=e.nextId,d=e.documentIds,h=e.fieldIds,y=e.fieldLength,v=e.averageFieldLength,m=e.storedFields,g=e.dirtCount,x=e.serializationVersion;if(x!==1&&x!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var p=new i(t);p._documentCount=c,p._nextId=f,p._documentIds=ie(d),p._idToShortId=new Map,p._fieldIds=h,p._fieldLength=ie(y),p._avgFieldLength=v,p._storedFields=ie(m),p._dirtCount=g||0,p._index=new ue;try{for(var A=w(p._documentIds),b=A.next();!b.done;b=A.next()){var S=I(b.value,2),_=S[0],C=S[1];p._idToShortId.set(C,_)}}catch(W){o={error:W}}finally{try{b&&!b.done&&(r=A.return)&&r.call(A)}finally{if(o)throw o.error}}try{for(var z=w(s),D=z.next();!D.done;D=z.next()){var O=I(D.value,2),F=O[0],L=O[1],V=new Map;try{for(var P=(u=void 0,w(Object.keys(L))),N=P.next();!N.done;N=P.next()){var Q=N.value,X=L[Q];x===1&&(X=X.ds),V.set(parseInt(Q,10),ie(X))}}catch(W){u={error:W}}finally{try{N&&!N.done&&(l=P.return)&&l.call(P)}finally{if(u)throw u.error}}p._index.set(F,V)}}catch(W){n={error:W}}finally{try{D&&!D.done&&(a=z.return)&&a.call(z)}finally{if(n)throw n.error}}return p},i.prototype.executeQuery=function(e,t){var o=this;if(t===void 0&&(t={}),typeof e!="string"){var r=k(k(k({},t),e),{queries:void 0}),n=e.queries.map(function(m){return o.executeQuery(m,r)});return this.combineResults(n,r.combineWith)}var a=this._options,u=a.tokenize,l=a.processTerm,s=a.searchOptions,c=k(k({tokenize:u,processTerm:l},s),t),f=c.tokenize,d=c.processTerm,h=f(e).flatMap(function(m){return d(m)}).filter(function(m){return!!m}),y=h.map(Mt(c)),v=y.map(function(m){return o.executeQuerySpec(m,c)});return this.combineResults(v,c.combineWith)},i.prototype.executeQuerySpec=function(e,t){var o,r,n,a,u=k(k({},this._options.searchOptions),t),l=(u.fields||this._options.fields).reduce(function(Q,X){var W;return k(k({},Q),(W={},W[X]=se(u.boost,X)||1,W))},{}),s=u.boostDocument,c=u.weights,f=u.maxFuzzy,d=u.bm25,h=k(k({},_e.weights),c),y=h.fuzzy,v=h.prefix,m=this._index.get(e.term),g=this.termResults(e.term,e.term,1,m,l,s,d),x,p;if(e.prefix&&(x=this._index.atPrefix(e.term)),e.fuzzy){var A=e.fuzzy===!0?.2:e.fuzzy,b=A<1?Math.min(f,Math.round(e.term.length*A)):A;b&&(p=this._index.fuzzyGet(e.term,b))}if(x)try{for(var S=w(x),_=S.next();!_.done;_=S.next()){var C=I(_.value,2),z=C[0],D=C[1],O=z.length-e.term.length;if(O){p==null||p.delete(z);var F=v*z.length/(z.length+.3*O);this.termResults(e.term,z,F,D,l,s,d,g)}}}catch(Q){o={error:Q}}finally{try{_&&!_.done&&(r=S.return)&&r.call(S)}finally{if(o)throw o.error}}if(p)try{for(var L=w(p.keys()),V=L.next();!V.done;V=L.next()){var z=V.value,P=I(p.get(z),2),N=P[0],O=P[1];if(O){var F=y*z.length/(z.length+O);this.termResults(e.term,z,F,N,l,s,d,g)}}}catch(Q){n={error:Q}}finally{try{V&&!V.done&&(a=L.return)&&a.call(L)}finally{if(n)throw n.error}}return g},i.prototype.combineResults=function(e,t){if(t===void 0&&(t=ge),e.length===0)return new Map;var o=t.toLowerCase();return e.reduce(Et[o])||new Map},i.prototype.toJSON=function(){var e,t,o,r,n=[];try{for(var a=w(this._index),u=a.next();!u.done;u=a.next()){var l=I(u.value,2),s=l[0],c=l[1],f={};try{for(var d=(o=void 0,w(c)),h=d.next();!h.done;h=d.next()){var y=I(h.value,2),v=y[0],m=y[1];f[v]=Object.fromEntries(m)}}catch(g){o={error:g}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(o)throw o.error}}n.push([s,f])}}catch(g){e={error:g}}finally{try{u&&!u.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}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:n,serializationVersion:2}},i.prototype.termResults=function(e,t,o,r,n,a,u,l){var s,c,f,d,h;if(l===void 0&&(l=new Map),r==null)return l;try{for(var y=w(Object.keys(n)),v=y.next();!v.done;v=y.next()){var m=v.value,g=n[m],x=this._fieldIds[m],p=r.get(x);if(p!=null){var A=p.size,b=this._avgFieldLength[x];try{for(var S=(f=void 0,w(p.keys())),_=S.next();!_.done;_=S.next()){var C=_.value;if(!this._documentIds.has(C)){this.removeTerm(x,C,t),A-=1;continue}var z=a?a(this._documentIds.get(C),t,this._storedFields.get(C)):1;if(z){var D=p.get(C),O=this._fieldLength.get(C)[x],F=Vt(D,A,this._documentCount,O,b,u),L=o*g*z*F,V=l.get(C);if(V){V.score+=L,kt(V.terms,e);var P=se(V.match,t);P?P.push(m):V.match[t]=[m]}else l.set(C,{score:L,terms:[e],match:(h={},h[t]=[m],h)})}}}catch(N){f={error:N}}finally{try{_&&!_.done&&(d=S.return)&&d.call(S)}finally{if(f)throw f.error}}}}}catch(N){s={error:N}}finally{try{v&&!v.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}return l},i.prototype.addTerm=function(e,t,o){var r=this._index.fetch(o,Ce),n=r.get(e);if(n==null)n=new Map,n.set(t,1),r.set(e,n);else{var a=n.get(t);n.set(t,(a||0)+1)}},i.prototype.removeTerm=function(e,t,o){if(!this._index.has(o)){this.warnDocumentChanged(t,e,o);return}var r=this._index.fetch(o,Ce),n=r.get(e);n==null||n.get(t)==null?this.warnDocumentChanged(t,e,o):n.get(t)<=1?n.size<=1?r.delete(e):n.delete(t):n.set(t,n.get(t)-1),this._index.get(o).size===0&&this._index.delete(o)},i.prototype.warnDocumentChanged=function(e,t,o){var r,n;try{for(var a=w(Object.keys(this._fieldIds)),u=a.next();!u.done;u=a.next()){var l=u.value;if(this._fieldIds[l]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(o,'" was not present in field "').concat(l,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}},i.prototype.addDocumentId=function(e){var t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},i.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},i.prototype.addFieldLength=function(e,t,o,r){var n=this._fieldLength.get(e);n==null&&this._fieldLength.set(e,n=[]),n[t]=r;var a=this._avgFieldLength[t]||0,u=a*o+r;this._avgFieldLength[t]=u/(o+1)},i.prototype.removeFieldLength=function(e,t,o,r){if(o===1){this._avgFieldLength[t]=0;return}var n=this._avgFieldLength[t]*o-r;this._avgFieldLength[t]=n/(o-1)},i.prototype.saveStoredFields=function(e,t){var o,r,n=this._options,a=n.storeFields,u=n.extractField;if(!(a==null||a.length===0)){var l=this._storedFields.get(e);l==null&&this._storedFields.set(e,l={});try{for(var s=w(a),c=s.next();!c.done;c=s.next()){var f=c.value,d=u(t,f);d!==void 0&&(l[f]=d)}}catch(h){o={error:h}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}}},i}(),se=function(i,e){return Object.prototype.hasOwnProperty.call(i,e)?i[e]:void 0},Et=(re={},re[ge]=function(i,e){var t,o;try{for(var r=w(e.keys()),n=r.next();!n.done;n=r.next()){var a=n.value,u=i.get(a);if(u==null)i.set(a,e.get(a));else{var l=e.get(a),s=l.score,c=l.terms,f=l.match;u.score=u.score+s,u.match=Object.assign(u.match,f),Fe(u.terms,c)}}}catch(d){t={error:d}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(t)throw t.error}}return i},re[Ne]=function(i,e){var t,o,r=new Map;try{for(var n=w(e.keys()),a=n.next();!a.done;a=n.next()){var u=a.value,l=i.get(u);if(l!=null){var s=e.get(u),c=s.score,f=s.terms,d=s.match;Fe(l.terms,f),r.set(u,{score:l.score+c,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(o=n.return)&&o.call(n)}finally{if(t)throw t.error}}return r},re[St]=function(i,e){var t,o;try{for(var r=w(e.keys()),n=r.next();!n.done;n=r.next()){var a=n.value;i.delete(a)}}catch(u){t={error:u}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(t)throw t.error}}return i},re),Dt={k:1.2,b:.7,d:.5},Vt=function(i,e,t,o,r,n){var a=n.k,u=n.b,l=n.d,s=Math.log(1+(t-e+.5)/(e+.5));return s*(l+i*(a+1)/(i+a*(1-u+u*o/r)))},Mt=function(i){return function(e,t,o){var r=typeof i.fuzzy=="function"?i.fuzzy(e,t,o):i.fuzzy||!1,n=typeof i.prefix=="function"?i.prefix(e,t,o):i.prefix===!0;return{term:e,fuzzy:r,prefix:n}}},ce={idField:"id",extractField:function(i,e){return i[e]},tokenize:function(i,e){return i.split(Lt)},processTerm:function(i,e){return i.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[],logger:function(i,e,t){return console!=null&&console.warn!=null&&console[i](e)},autoVacuum:!0},_e={combineWith:ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Dt},Ot={combineWith:Ne,prefix:function(i,e,t){return e===t.length-1}},ve={batchSize:1e3,batchWait:10},pe={minDirtFactor:.1,minDirtCount:20},fe=k(k({},ve),pe),kt=function(i,e){i.includes(e)||i.push(e)},Fe=function(i,e){var t,o;try{for(var r=w(e),n=r.next();!n.done;n=r.next()){var a=n.value;i.includes(a)||i.push(a)}}catch(u){t={error:u}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(t)throw t.error}}},be=function(i,e){var t=i.score,o=e.score;return o-t},Ce=function(){return new Map},ie=function(i){var e,t,o=new Map;try{for(var r=w(Object.keys(i)),n=r.next();!n.done;n=r.next()){var a=n.value;o.set(parseInt(a,10),i[a])}}catch(u){e={error:u}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return o},Lt=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;const Bt={class:"relative",style:{height:"100vh"}},It={class:"flex h-full"},$t={class:"h-full border-r border-r-gray-800 of-auto","h-full":"",style:{width:"22rem","min-width":"0",flex:"0 0 auto"}},Tt={flex:"~ col gap2",border:"b base",class:"border-b-gray-800 p3 flex-1"},Nt=["onClick"],Pt={style:{width:"6rem"},class:"text-left"},Ut=["onClick"],Wt=M("span",null,"Copy",-1),Rt=[Wt],Jt=M("div",{class:"splitpanes__splitter"},null,-1),Qt={key:0,class:"h-full relative w-full of-auto"},Gt="nuxt-graphql-middleware",Xt=H({__name:"index",setup(i){let e=new zt({fields:["content","name","filename"],storeFields:["id","content","isValid","errors","filename","relativePath","name","operation"],searchOptions:{fuzzy:.7}});const t=ne(""),o=ne([]),r=ne(""),n=ne(""),a=K(()=>{if(t.value)return o.value.find(c=>c.id===t.value)});async function u(c){e.removeAll(),o.value=c.filter(f=>!!f.operation),await e.addAll(c)}Oe(async c=>{const f=c.devtools.extendClientRpc(Gt,{documentsUpdated(y){u(y)}}),d=await f.getDocuments();u(d);const h=await f.getModuleOptions();n.value=h.serverApiPrefix});function l(c){const f=document.createElement("textarea");f.value=c.content,f.style.top="0",f.style.left="0",f.style.position="fixed",document.body.appendChild(f),f.focus(),f.select();try{const d=document.execCommand("copy")}catch{}document.body.removeChild(f)}const s=K(()=>r.value?e.search(r.value):o.value);return(c,f)=>{const d=qe,h=Me,y=wt;return E(),B("div",Bt,[M("div",It,[M("div",$t,[M("div",Tt,[Z(d,{modelValue:T(r),"onUpdate:modelValue":f[0]||(f[0]=v=>Ee(r)?r.value=v:null),placeholder:"Search documents...",icon:"carbon-search",class:"w-full"},null,8,["modelValue"])]),(E(!0),B(ee,null,ye(T(s),v=>(E(),B("div",{key:v.content,class:"relative group"},[M("button",{class:U(["text-secondary hover:n-bg-hover flex select-none truncate px2 py2 font-mono text-sm w-full",{"text-red-500":!v.isValid}]),onClick:m=>t.value=v.id},[M("div",Pt,[v.operation==="query"?(E(),j(h,{key:0,green:"",text:"Query"})):v.operation==="mutation"?(E(),j(h,{key:1,orange:"",text:"Mutation"})):R("",!0)]),M("div",null,J(v.name),1)],10,Nt),M("button",{class:"absolute right-0 top-0 text-sm h-full flex items-center opacity-0 group-hover:opacity-100 pr2",onClick:m=>l(v)},Rt,8,Ut)]))),128))]),Jt,T(a)?(E(),B("div",Qt,[Z(y,ze(T(a),{"server-api-prefix":T(n)}),null,16,["server-api-prefix"])])):R("",!0)])])}}});export{Xt as default};
@@ -1 +0,0 @@
1
- import{B as o,r as u,C as f,D as d,e as v,E as l,F as i,G as h,H as m}from"./entry.ea5ff097.js";function U(t,a={}){const e=a.head||o();if(e)return e.ssr?e.push(t,a):p(e,t,a)}function p(t,a,e={}){const s=u(!1),n=u({});f(()=>{n.value=s.value?{}:h(a)});const r=t.push(n.value,e);return d(n,c=>{r.patch(c)}),m()&&(v(()=>{r.dispose()}),l(()=>{s.value=!0}),i(()=>{s.value=!1})),r}export{U as u};
@@ -1,15 +0,0 @@
1
- import { useGraphqlState } from "./useGraphqlState.mjs";
2
- import { getEndpoint } from "./shared.mjs";
3
- export function performRequest(operation, operationName, method, options) {
4
- const state = useGraphqlState();
5
- return $fetch(getEndpoint(operation, operationName), {
6
- ...state && state.fetchOptions ? state.fetchOptions : {},
7
- ...options,
8
- method
9
- }).then((v) => {
10
- return {
11
- data: v.data,
12
- errors: v.errors || []
13
- };
14
- });
15
- }
@@ -1,9 +0,0 @@
1
- import { buildRequestParams } from "./../helpers/index.mjs";
2
- import { performRequest } from "./nuxtApp.mjs";
3
- export function useGraphqlQuery(...args) {
4
- const [name, variables, fetchOptions = {}] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].name, args[0].variables, args[0].fetchOptions];
5
- return performRequest("query", name, "get", {
6
- params: buildRequestParams(variables),
7
- ...fetchOptions
8
- });
9
- }
@@ -1,7 +0,0 @@
1
- import { defineNuxtPlugin } from "nuxt/app";
2
- export default defineNuxtPlugin((app) => {
3
- const state = {
4
- fetchOptions: {}
5
- };
6
- app.provide("graphqlState", state);
7
- });
File without changes