@nuxt/devtools-nightly 2.6.3-29263722.27f80d0 → 2.6.4-29305197.39a0677
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/chunks/module-main.mjs +1 -1
- package/dist/client/200.html +15 -15
- package/dist/client/404.html +15 -15
- package/dist/client/_nuxt/{analyze-build-eaofwqs6.js → analyze-build-h6dkidx5.js} +1 -1
- package/dist/client/_nuxt/{assets-li4rvm9c.js → assets-oe58zq0u.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/3619e6f2-9c27-4c4b-aada-2143e7348fa8.json +1 -0
- package/dist/client/_nuxt/{code-diff.vue-fg6nyny1.js → code-diff.vue-jy5btphl.js} +1 -1
- package/dist/client/_nuxt/{code-snippets.vue-ipuvag1k.js → code-snippets.vue-2de0d1wh.js} +1 -1
- package/dist/client/_nuxt/{components-s0i4nz6i.js → components-kyf9xy2m.js} +1 -1
- package/dist/client/_nuxt/{composable-item.vue-gbbt7qe8.js → composable-item.vue-lyurctn1.js} +1 -1
- package/dist/client/_nuxt/{custom-_name_-d6jrpxhp.js → custom-_name_-f0z5z5zf.js} +1 -1
- package/dist/client/_nuxt/{data-schema-button.vue-bbu4gevd.js → data-schema-button.vue-gj32e65l.js} +1 -1
- package/dist/client/_nuxt/{data-schema-drawer-kqj8jzub.js → data-schema-drawer-ikpfkbri.js} +1 -1
- package/dist/client/_nuxt/{debug-cq9xlqgi.js → debug-iof3atod.js} +1 -1
- package/dist/client/_nuxt/{default-c7jjv6zt.js → default-ck8sdk8k.js} +1 -1
- package/dist/client/_nuxt/{odmgfr63.js → dv0e79gh.js} +5 -5
- package/dist/client/_nuxt/{entry.css-ebiz9nsw.css → entry.css-ojy5yvlc.css} +1 -1
- package/dist/client/_nuxt/{error-404-0t3z1j8h.js → error-404-k23mnnj8.js} +1 -1
- package/dist/client/_nuxt/{error-500-ljshxmt4.js → error-500-ow1tk67n.js} +1 -1
- package/dist/client/_nuxt/{error-j4fy24bh.js → error-ego8bzbx.js} +1 -1
- package/dist/client/_nuxt/{filepath-item.vue-hpcppu31.js → filepath-item.vue-jvnnqntk.js} +1 -1
- package/dist/client/_nuxt/{full-owt5pl3t.js → full-iirjyjb5.js} +1 -1
- package/dist/client/_nuxt/{help-fab.vue-ig58rbwh.js → help-fab.vue-iiy912yv.js} +1 -1
- package/dist/client/_nuxt/{hooks-hx28mu5s.js → hooks-da40i97a.js} +1 -1
- package/dist/client/_nuxt/{imports-omkymdgh.js → imports-g8mxyxsz.js} +1 -1
- package/dist/client/_nuxt/{index-uadsdn3e.js → index-jpk6gpmk.js} +1 -1
- package/dist/client/_nuxt/{launch-page.vue-gbw3zxny.js → launch-page.vue-ej8n1nol.js} +1 -1
- package/dist/client/_nuxt/{modules-ip19b63u.js → modules-d9zqk5n1.js} +1 -1
- package/dist/client/_nuxt/{nbadge-ouy9nnut.js → nbadge-la51ie4t.js} +1 -1
- package/dist/client/_nuxt/{ncheckbox.vue-d8axpf9c.js → ncheckbox.vue-no3437wc.js} +1 -1
- package/dist/client/_nuxt/{ndrawer.vue-jzawtilq.js → ndrawer.vue-mok9ppy7.js} +1 -1
- package/dist/client/_nuxt/{ndropdown.vue-f1lydger.js → ndropdown.vue-o8t9ic70.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-lp3vn3wc.js → nlink.vue-ehelr39g.js} +1 -1
- package/dist/client/_nuxt/{nnavbar.vue-i0ef5lnu.js → nnavbar.vue-cybpsded.js} +1 -1
- package/dist/client/_nuxt/{none-i2ql0vw5.js → none-f0zl4gad.js} +1 -1
- package/dist/client/_nuxt/{nsection-block-dh0zlwt7.js → nsection-block-ddplx9pl.js} +1 -1
- package/dist/client/_nuxt/{nselect-tabs.vue-y188tsi8.js → nselect-tabs.vue-hiwwt2n0.js} +1 -1
- package/dist/client/_nuxt/{nselect.vue-ehwgo50w.js → nselect.vue-la95si0f.js} +1 -1
- package/dist/client/_nuxt/{open-graph-hbrfi9uf.js → open-graph-hwba5o86.js} +1 -1
- package/dist/client/_nuxt/{overview-liwfgxss.js → overview-oqtc1aqt.js} +1 -1
- package/dist/client/_nuxt/{pages-m5a5ne1h.js → pages-eenpqko4.js} +1 -1
- package/dist/client/_nuxt/{payload-cfcg3mx9.js → payload-mzuxzjh9.js} +1 -1
- package/dist/client/_nuxt/{pinia-b14w6pnq.js → pinia-ijohlgiz.js} +1 -1
- package/dist/client/_nuxt/{plugins-fiyqxx03.js → plugins-hyjhe79v.js} +1 -1
- package/dist/client/_nuxt/{render-tree-nu1ty4hn.js → render-tree-dr6gtec2.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs-m83wocch.js → runtime-configs-pahcy1o7.js} +1 -1
- package/dist/client/_nuxt/{server-discovery-hub44mua.js → server-discovery-b8na9z7g.js} +1 -1
- package/dist/client/_nuxt/{server-route-inputs.vue-imb8tsh1.js → server-route-inputs.vue-g0p9q870.js} +1 -1
- package/dist/client/_nuxt/{server-routes-mc7uz8ae.js → server-routes-mtcko0mi.js} +1 -1
- package/dist/client/_nuxt/{server-tasks-lsedd4hw.js → server-tasks-bll6cjth.js} +1 -1
- package/dist/client/_nuxt/{settings-n90odpuz.js → settings-dmjruw7n.js} +1 -1
- package/dist/client/_nuxt/{stacktrace-list.vue-npicjfex.js → stacktrace-list.vue-g3i6ukg0.js} +1 -1
- package/dist/client/_nuxt/{state-components-hr8hl4ox.js → state-components-hm1fypou.js} +1 -1
- package/dist/client/_nuxt/{state-editor.vue-o8zm8c0k.js → state-editor.vue-k2eynukh.js} +1 -1
- package/dist/client/_nuxt/{state-modules-rzxgoz7b.js → state-modules-frr7rpga.js} +1 -1
- package/dist/client/_nuxt/{storage-bwff5wn4.js → storage-m0qelhs8.js} +1 -1
- package/dist/client/_nuxt/{terminals-iputu54o.js → terminals-f4z14c3b.js} +1 -1
- package/dist/client/_nuxt/{timeline-mwamimms.js → timeline-n9pyujb3.js} +1 -1
- package/dist/client/_nuxt/{unocss-runtime-j2igqy12.js → unocss-runtime-eoln527w.js} +1 -1
- package/dist/client/_nuxt/vendor/{unocss-bo8tyd39.js → unocss-klvjhln7.js} +2 -2
- package/dist/client/_nuxt/{virtual-files-fmegnkwa.js → virtual-files-gffuaqhw.js} +1 -1
- package/dist/client/_nuxt/{vue-devtools-of66adw7.js → vue-devtools-fv9dekm9.js} +1 -1
- package/dist/client/index.html +15 -15
- package/dist/module.json +1 -1
- package/dist/runtime/auth/index.html +3 -3
- package/package.json +4 -4
- package/dist/client/_nuxt/builds/meta/2e955c77-8350-48e7-ae84-3f37556746f9.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as F,_ as H,w as J,x as S,a as X,y as Z,z as G,A as Q,B as Y,C as ee,D as te,r as oe,E as ne}from"./
|
|
1
|
+
import{v as F,_ as H,w as J,x as S,a as X,y as Z,z as G,A as Q,B as Y,C as ee,D as te,r as oe,E as ne}from"./dv0e79gh.js";import{_ as j}from"./nbadge-la51ie4t.js";import{p as L,k as A,q as x,Z as ae,J as a,U as k,$ as t,a0 as e,a8 as C,V as $,F as g,ag as I,a4 as M,al as se,a1 as N,X as _,ab as E,u as c,E as re,a3 as le}from"./vendor/json-editor-vue-nstwj98r.js";import{_ as z}from"./filepath-item.vue-jvnnqntk.js";import{_ as ue}from"./nsection-block-ddplx9pl.js";import{_ as ie}from"./launch-page.vue-ej8n1nol.js";import{_ as pe}from"./help-fab.vue-iiy912yv.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";import"./nicon-title.vue-mr03t3pg.js";import"./nmarkdown.vue-n5lhcplj.js";import"./client-hkqvtzyx.js";const de={block:"","cursor-pointer":""},ce={p2:""},me=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},_e=L({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(P,{emit:i}){const v=P,R=i,m=A([]),f=x(()=>{const r=w(v.route.path);return m.value=Array.from({length:r.length},()=>""),r});function w(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const y=x(()=>f.value.map((r,d)=>r[0]===":"?m.value[d]:r).join("").replace(/\/+/g,"/")),o=x(()=>v.route.path.includes(":"));function s(){R("navigate",y.value)}return(r,d)=>{const h=F,n=H,l=ae("VDropdown");return o.value?(t(),k(l,{key:1},{popper:$(({hide:b})=>[e("div",ce,[e("form",{flex:"~ col",onSubmit:se(()=>{s(),b()},["prevent"])},[o.value?(t(),a(g,{key:0},[d[0]||(d[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),a(g,null,I(f.value,(u,p)=>(t(),a(g,{key:p},[u[0]===":"?(t(),k(h,{key:0,modelValue:m.value[p],"onUpdate:modelValue":B=>m.value[p]=B,"w-20":"","n-sm":"",placeholder:u.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),a("span",he,C(u),1))],64))),128))])],64)):N("",!0),_(n,{type:"submit",block:"",n:"primary"},{default:$(()=>[...d[1]||(d[1]=[E(" Navigate ",-1)])]),_:1})],40,me)])]),default:$(()=>[e("code",de,[(t(!0),a(g,null,I(f.value,(b,u)=>(t(),a("span",{key:u,class:M(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},C(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),a("button",{key:0,onClick:s},[e("code",null,C(r.route.path),1)]))}}}),fe={"max-w-full":"","of-auto":""},ge={"w-full":""},ye={"w-20":"","pr-1":""},be={flex:"","items-center":"","justify-end":""},xe={"text-sm":""},ke={flex:"inline gap3","items-center":""},we={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},$e=["onClick"],Ce=["onClick"],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ee=["onClick"],Ie=L({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(P){const i=P,v=J(),R=S(),m=X(),f=x(()=>[...i.pages].sort((o,s)=>o.path.localeCompare(s.path)));function w(o){const s=i.layouts.find(r=>r.name===o);s&&v(s.file)}function y(o){if(typeof o=="string")return R.value?.middleware.find(s=>s.name===o)?.path}return(o,s)=>{const r=j,d=_e,h=z;return t(),a("div",fe,[e("table",ge,[s[4]||(s[4]=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1)),e("tbody",null,[(t(!0),a(g,null,I(f.value,n=>(t(),a("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ye,[e("div",be,[o.matched.find(l=>l.name===n.name)?(t(),k(r,{key:0,n:"green",title:"active",textContent:"active"})):o.matchedPending.find(l=>l.name===n.name)?(t(),k(r,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",xe,[e("div",ke,[_(d,{route:n,class:M(o.matched.find(l=>l.name===n.name)?"text-primary":o.matchedPending.find(l=>l.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=l=>o.$emit("navigate",l))},null,8,["route","class"]),e("div",we,[n.file||n.meta?.file?(t(),a("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>c(v)(n.file||n.meta?.file)},[...s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)])],8,$e)):N("",!0),n.file||n.meta?.file?(t(),a("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:l=>c(m)(n.file||n.meta?.file)},[...s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)])],8,Ce)):N("",!0)])])]),e("td",Ne,C(n.name),1),e("td",Re,[_(h,{filepath:y(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ve,[n.meta.layout===!1?(t(),a("span",Pe,"-")):n.meta.layout?(t(),a("button",{key:1,onClick:l=>w(n.meta.layout)},C(n.meta.layout),9,Ee)):(t(),a("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=l=>w("default"))}," (default) "))])]))),128))])])])}}}),Be={class:"markdown-body"},Te={__name:"pages",setup(P,{expose:i}){return i({frontmatter:{}}),(R,m)=>(t(),a("div",Be,[...m[0]||(m[0]=[e("h1",null,"Pages",-1),e("p",null,[E("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),E(" directory.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),e("hr",null,null,-1),e("h1",null,"Middlewares",-1),e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])]))}},Ae={key:0,"h-full":"","of-auto":""},Le={border:"b base",flex:"~ col gap1","n-navbar-glass":"",px4:"",py3:""},Me={"font-mono":""},De={key:1,op50:""},Fe={key:0,"text-orange":"",op75:""},Se={key:1,op50:""},je={"min-h-14":""},ze={key:1,class:"py-4 text-center"},Ue={"w-full":""},Ke={mr1:""},ot=L({__name:"pages",setup(P){const i=Z(),v=G(),R=Q(),m=S(),f=Y(),w=ee(),y=x(()=>m.value?.middleware||[]),o=A(""),s=A(0),r=x(()=>(y.value,o.value,f.value,s.value,i.value?.currentRoute?.value?.path));re(()=>{v.value&&(o.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(u=>{o.value=u.fullPath}),i.value?.afterEach(u=>{o.value=u.fullPath})});async function d(){o.value!==i.value?.currentRoute?.value?.path&&i.value.push(o.value||"/")}const h=x(()=>i.value.resolve(o.value||"/").matched);function n(u){i.value.push(u),o.value=u}const l=te(),b=x(()=>`./${l===4?"app/":""}pages/index.vue`);return(u,p)=>{const B=F,D=Ie,T=ue,U=j,K=z,O=ie,W=Te,q=pe;return t(),a(g,null,[c(R)?.pages&&c(i)?(t(),a("div",Ae,[e("div",Le,[e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[1]||(p[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",Me,C(r.value),1),p[2]||(p[2]=e("span",{op50:""}," to ",-1))],64)):(t(),a("span",De,"Current route"))]),_(B,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=V=>o.value=V),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:M(r.value===o.value?"":h.value.length?"text-green":"text-orange"),onKeydown:le(d,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[3]||(p[3]=e("span",null,[E("Press "),e("b",{"font-bold":""},"Enter"),E(" to navigate")],-1)),h.value.length?N("",!0):(t(),a("span",Fe," (no match)"))],64)):(t(),a("span",Se,"Edit path above to navigate"))])]),_(T,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:$(()=>[e("div",je,[h.value.length?(t(),k(D,{key:0,pages:h.value,layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),a("div",ze,[...p[4]||(p[4]=[e("span",{op50:""},"No routes matched",-1)])]))])]),_:1}),_(T,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c(w).length} routes registered in your application`,padding:"pr5"},{default:$(()=>[_(D,{pages:c(w),layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),y.value.length?(t(),k(T,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${y.value.length} middleware registered in your application`,padding:"px13"},{default:$(()=>[e("table",Ue,[p[5]||(p[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),a(g,null,I(y.value,V=>(t(),a("tr",{key:V.path,"h-7":""},[e("td",null,[e("span",Ke,C(V.name),1),V.global?(t(),k(U,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(K,{filepath:V.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(t(),k(O,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:`Create ${b.value} to enable routing`,actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in u?u.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in u?u.ensureDevAuthToken:c(ne))(),"enablePages")}}]},null,8,["description","actions"])),_(q,null,{default:$(()=>[_(W)]),_:1})],64)}}});export{ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as k}from"./state-editor.vue-
|
|
1
|
+
import{_ as k}from"./state-editor.vue-k2eynukh.js";import{p as x,J as i,$ as e,F as $,ag as N,U as d,V as a,W as B,Y as V,a0 as b,q as h,ai as w,a1 as _,X as o,u as F,ac as O,ab as E}from"./vendor/json-editor-vue-nstwj98r.js";import{_ as P}from"./nsection-block-ddplx9pl.js";import{f as R,_ as j}from"./dv0e79gh.js";import{_ as A}from"./help-fab.vue-iiy912yv.js";import"./data-schema-button.vue-gj32e65l.js";import"./nicon-title.vue-mr03t3pg.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=x({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(f){return(t,n)=>{const c=k;return e(),i("div",null,[t.state&&Object.keys(t.state).length>0?(e(),i("div",G,[(e(!0),i($,null,N(t.state,(s,r)=>(e(),d(c,{key:r,revision:t.revision,state:s,name:r.startsWith(t.prefix)?r.slice(t.prefix.length):r},{actions:a(l=>[B(t.$slots,"actions",V({ref_for:!0},l))]),_:2},1032,["revision","state","name"]))),128))])):(e(),i("div",H," No data "))])}}}),T={class:"markdown-body"},W={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(c,s)=>(e(),i("div",T,[...s[0]||(s[0]=[b("h1",null,"State & Async Data",-1),b("p",null,"// TODO",-1)])]))}},q={key:0},tt=x({__name:"payload",setup(f){const t=R(),n=h(()=>t.value?.nuxt.payload),c=h(()=>t.value?.revision.value);async function s(r){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",r)}return(r,l)=>{const m=K,p=P,v=j,S=k,g=W,D=A,C=w("tooltip");return e(),i($,null,[F(t)?(e(),i("div",q,[o(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(m,{state:n.value.state,revision:c.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),o(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(v,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:l[0]||(l[0]=y=>s())},{default:a(()=>[...l[1]||(l[1]=[E(" Re-fetch all data ",-1)])]),_:1})]),default:a(()=>[o(m,{state:n.value.data,revision:c.value},{actions:a(({isOpen:y,name:u})=>[y&&u?O((e(),d(v,{key:0,title:`Re-fetch '${u}'`,icon:"carbon-recycle",border:!1,onClick:J=>s([u])},null,8,["title","onClick"])),[[C,`Re-fetch '${u}'`,void 0,{bottom:!0}]]):_("",!0)]),_:1},8,["state","revision"])]),_:1}),n.value.functions&&Object.keys(n.value.functions).length?(e(),d(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o(S,{"ml--6":"",state:n.value.functions,revision:c.value},null,8,["state","revision"])]),_:1})):_("",!0)])):_("",!0),o(D,null,{default:a(()=>[o(g)]),_:1})],64)}}});export{tt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as r}from"./
|
|
1
|
+
import{F as r}from"./dv0e79gh.js";import{u as m,m as c}from"./vue-devtools-fv9dekm9.js";import{p,J as i,$ as e,U as o,u as n,V as _,ab as u}from"./vendor/json-editor-vue-nstwj98r.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";import"./vue-virtual-scroller.esm-kqx3l34g.js";const l={class:"h-full w-full"},h=p({__name:"pinia",setup(f){const{connected:s}=m();return(d,t)=>{const a=r;return e(),i("div",l,[n(s)?(e(),o(n(c),{key:0})):(e(),o(a,{key:1},{default:_(()=>[...t[0]||(t[0]=[u(" Connecting.... ",-1)])]),_:1}))])}}});export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as w}from"./nbadge-
|
|
1
|
+
import{_ as w}from"./nbadge-la51ie4t.js";import{_ as S}from"./filepath-item.vue-jvnnqntk.js";import{_ as k}from"./duration-display.vue-l0zz5iex.js";import{A as D,a3 as B,I as V,b as I,x as F,f as H}from"./dv0e79gh.js";import{p as v,q as h,J as _,$ as s,a0 as n,X as c,a1 as d,a8 as C,V as f,U as p,Z as W,W as P,ab as x,F as b,ag as E,a4 as A}from"./vendor/json-editor-vue-nstwj98r.js";import{_ as L}from"./nsection-block-ddplx9pl.js";import{_ as M}from"./help-fab.vue-iiy912yv.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";import"./nicon-title.vue-mr03t3pg.js";const j={flex:"~ gap2","items-center":""},q={w8:"","text-right":"","text-sm":"",op25:""},z={key:0,"flex-auto":"","text-right":""},J=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(m){const e=m,r=D(),a=h(()=>B(e.plugin.src,r.value?.rootDir||"").path);return(t,l)=>{const o=w,u=S,i=k;return s(),_("div",j,[n("div",q,C(t.index),1),c(u,{filepath:e.plugin.src,subpath:!0},{default:f(()=>[n("div",null,[a.value.startsWith("#")?(s(),p(o,{key:0,n:"rose",textContent:"virtual"})):a.value.startsWith(".")?d("",!0):(s(),p(o,{key:1,n:"gray",textContent:"module"})),t.plugin.mode==="server"?(s(),p(o,{key:2,n:"teal",textContent:"server"})):d("",!0),t.plugin.mode==="client"?(s(),p(o,{key:3,n:"orange",textContent:"client"})):d("",!0)])]),_:1},8,["filepath"]),t.plugin.metric?.duration!=null?(s(),_("div",z,[c(i,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),R={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},U={flex:"~ items-center gap-1","font-bold":""},X=v({__name:"HelpTip",props:{title:{},icon:{}},setup(m){return(e,r)=>{const a=V,t=W("ContentSlot");return s(),_("div",R,[n("div",U,[e.icon?(s(),p(a,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),n("div",null,C(e.title),1)]),n("div",null,[P(e.$slots,"default",{},()=>[c(t,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Y={};function Z(m,e){const r=X;return s(),p(r,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:f(()=>[P(m.$slots,"default")]),_:3})}const G=I(Y,[["render",Z]]),K={class:"markdown-body"},O={__name:"plugins",setup(m,{expose:e}){return e({frontmatter:{}}),(a,t)=>{const l=G;return s(),_("div",K,[t[1]||(t[1]=n("h1",null,"Plugins",-1)),t[2]||(t[2]=n("p",null,[x("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),n("code",null,"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),c(l,null,{default:f(()=>[...t[0]||(t[0]=[x(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ",-1)])]),_:1}),t[3]||(t[3]=n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])}}},Q={pt4:""},tt={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},pt=v({__name:"plugins",setup(m){const e=F(),r=H(),a=h(()=>{const l=e.value?.plugins||[],o=r.value?.metrics.clientPlugins()||[];return l.map(u=>{const i=typeof u=="string"?{src:u}:u;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),t=h(()=>{const l=r.value?.metrics.clientPlugins()||[],o=Math.min(...l.map(i=>i.start));return Math.max(...l.map(i=>i.end))-o});return(l,o)=>{const u=J,i=k,g=L,N=O,T=M;return s(),_(b,null,[c(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${a.value.length}`},{default:f(()=>[n("div",Q,[(s(!0),_(b,null,E(a.value,(y,$)=>(s(),p(u,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:A($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",tt,[o[0]||(o[0]=n("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1)),o[1]||(o[1]=n("span",{op50:""},"Total execution time:",-1)),c(i,{duration:t.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),c(T,null,{default:f(()=>[c(N)]),_:1})],64)}}});export{pt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as m,w as d,F as f}from"./
|
|
1
|
+
import{f as m,w as d,F as f}from"./dv0e79gh.js";import{u as c,f as _}from"./vue-devtools-fv9dekm9.js";import{p as v,J as C,$ as n,U as l,u as o,V as E,ab as I}from"./vendor/json-editor-vue-nstwj98r.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";import"./vue-virtual-scroller.esm-kqx3l34g.js";const k={class:"h-full w-full"},y=v({__name:"render-tree",setup(x){const{connected:a}=c(),t=m(),p=d();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=f;return n(),C("div",k,[o(a)?(n(),l(o(_),{key:0,onOnInspectComponentStart:e[0]||(e[0]=u=>s(!1)),onOnInspectComponentEnd:e[1]||(e[1]=u=>s(!0)),onOpenInEditor:o(p)},null,8,["onOpenInEditor"])):(n(),l(i,{key:1},{default:E(()=>[...e[2]||(e[2]=[I(" Connecting.... ",-1)])]),_:1}))])}}});export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as x}from"./state-editor.vue-
|
|
1
|
+
import{_ as x}from"./state-editor.vue-k2eynukh.js";import{_ as b}from"./nsection-block-ddplx9pl.js";import{J as u,$ as l,a0 as o,ab as d,p as y,q as c,a1 as C,X as e,u as f,V as a,F as k}from"./vendor/json-editor-vue-nstwj98r.js";import{_ as w}from"./help-fab.vue-iiy912yv.js";import{f as N,bl as R}from"./dv0e79gh.js";import"./data-schema-button.vue-gj32e65l.js";import"./nicon-title.vue-mr03t3pg.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";const T={class:"markdown-body"},V={__name:"runtime-configs",setup(_,{expose:t}){return t({frontmatter:{}}),(m,n)=>(l(),u("div",T,[...n[0]||(n[0]=[o("h1",null,"Runtime Configs",-1),o("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),o("p",null,[d("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),o("code",null,"nuxt.config.js"),d(" file, or check more details in the documentation.")],-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])]))}},$={key:0},H=y({__name:"runtime-configs",setup(_){const t=N(),p=R(),m=c(()=>t.value?.nuxt.payload),n=c(()=>t.value?.revision.value),g=c(()=>{const i={...p.value};return delete i.public,delete i.app,i});return(i,B)=>{const s=x,r=b,v=V,h=w;return l(),u(k,null,[f(t)?(l(),u("div",$,[e(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[e(s,{state:f(t).app.appConfig,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[e(s,{state:m.value.config?.public,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[e(s,{state:g.value,revision:n.value,readonly:""},null,8,["state","revision"])]),_:1})])):C("",!0),e(h,null,{default:a(()=>[e(v)]),_:1})],64)}}});export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b6 as S,r as k,E as M,bm as P}from"./odmgfr63.js";import{p as A,aD as R,E as L,M as C,J as U,$ as T,u as x}from"./vendor/json-editor-vue-nstwj98r.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-bo8tyd39.js";var H=class{listeners;constructor(){this.listeners=Object.create(null)}on(t,e){return this.listeners[t]={callback:e,next:this.listeners[t]||null},this}once(t,e){return this.on(t,function s(...a){e.apply(this,a),this.off(t,s)})}off(t,e){let s=this.listeners[t]||null,a=null;for(;s!==null;){if(s.callback===e){s.callback=null,a?a.next=s.next:this.listeners[t]=s.next;break}a=s,s=s.next}return this}emit(t,...e){let s=this.listeners[t]||null,a=!1;for(;s!==null;)typeof s.callback=="function"&&s.callback.apply(this,e),a=!0,s=s.next;return a}},u=class{subscriber;value;constructor(t,e){this.subscriber=null,this.value=t,this.shouldUpdate=typeof e=="function"?e:this.shouldUpdate}get readonly(){let t=this;return{subscribe:this.subscribe.bind(this),subscribeSync:this.subscribeSync.bind(this),unsubscribe:this.unsubscribe.bind(this),get value(){return t.value}}}subscribe(t){return this.subscriber={callback:t,subscriber:this.subscriber},()=>this.unsubscribe(t)}subscribeSync(t){let e=this.subscribe(t);return t(this.value,e),e}unsubscribe(t){let e=this,s=this.subscriber;for(;s!==null;){if(s.callback===t){s.callback=null,e.subscriber=s.subscriber;break}e=s,s=s.subscriber}}shouldUpdate(t,e){return t!==e}set(t){return this.#e(t)!==!1}asyncSet(t){let e=this.#e(t);return e===!1?Promise.resolve(!1):Promise.all(e).then(()=>!0)}#e(t){if(!this.shouldUpdate(t,this.value))return!1;let e=[],s=this.subscriber;for(this.value=t;s!==null;){let{callback:a}=s;a!==null&&e.push(a(t,()=>this.unsubscribe(a))),s=s.subscriber}return e}};function b(){return[performance.timeOrigin.toString(16),(1e4*performance.now()).toString(16),Math.random().toString(16).slice(2)].join("-")}new TextDecoder;var B=typeof Object.hasOwn=="function"?Object.hasOwn:(t,e)=>Object.hasOwnProperty.call(t,e),O={8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"};Uint8Array.from({length:2048},(t,e)=>B(O,e)?2:e<32?6:e<128?1:2);new Uint8Array(256).map((t,e)=>{for(let s=0;s<8;s++)t+=e>>s&1;return t});new TextDecoder("utf8",{ignoreBOM:!0});function j(t){try{return new URL(t,location.origin).origin===location.origin}catch{return!1}}function z(t){return t.ok}function D(t){return t.headers.get("x-file-encoded-size")||t.headers.get("content-length")}function E(t){return t.headers.get("x-file-size")||(j(t.url)&&!t.headers.get("content-encoding")?t.headers.get("content-length"):void 0)}function N(t){return t.headers.get("x-file-created-at")||t.headers.get("last-modified")||void 0}function I(t,e){if(t instanceof Response){let s=e?.isResponseOk||z,a=e?.getContentSize||E,n=e?.getContentEncodedSize||D,r=e?.getContentCreatedAt||N;if(s(t))return{type:"url",name:t.url,size:Number(a(t))||null,encodedSize:Number(n(t)),createdAt:r(t)}}if(t instanceof File)return{type:"file",name:t.name,size:t.size,createdAt:t.lastModified};if(t instanceof Blob)return{size:t.size};if(ArrayBuffer.isView(t))return{size:t.byteLength};if(typeof t=="string")return{size:t.length}}function $(t){let e=t;return(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e&&!(Symbol.iterator in e)&&!(Symbol.asyncIterator in e))&&(e=[e]),e&&Symbol.iterator in e?new Blob(e):t}function _(t){if(t instanceof ReadableStream)return t;if(t instanceof Response){if(t.body===null)throw new Error("Response has no body");return t.body}return t=$(t),t instanceof Blob?t.stream():new ReadableStream({start(){let e=t!==null&&typeof t=="object"&&Symbol.asyncIterator in t?t[Symbol.asyncIterator]:void 0;if(typeof e!="function")throw new Error("Bad value type (can't convert to a stream)");this.iterator=e()},async pull(e){let{value:s,done:a}=await this.iterator.next();a?(this.iterator=null,e.close()):e.enqueue(s)},cancel(){this.iterator=null}})}function W(t,e){let s=globalThis.location,a=[],n=({newURL:r,oldURL:i})=>{let o=new URL(r).hash||"#",c=new URL(i).hash||"#";o!==a.shift()&&(a.length=0,t(o,c))};return addEventListener("hashchange",n),{set(r,i){let o=r||"#";(s.hash||"#")!==o&&(a.push(r),i?s.replace(r):s.hash=r)},dispose(){removeEventListener("hashchange",n)}}}var p="[Discovery/embed-host]",g=()=>{},J=(()=>{try{let t=new ReadableStream;return new MessageChannel().port1.postMessage(t,[t]),!0}catch{return!1}})(),m=class extends H{window;id;actions;dataLoadToken;constructor(t,e,s){super(),this.window=t,this.id=e,this.actions=s,this.dataLoadToken=null}sendMessage(t,e,s){let a={id:this.id,from:"discoveryjs-app",type:t,payload:e||null};this.window.postMessage(a,"*",s)}destroy(){this.destroy=g,this.emit("destroy"),this.dataLoadToken=null,this.window=null,this.sendMessage=g}},V=class y extends m{publicApi;static createPublicApi(e){return Object.freeze({on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),defineAction(s,a){e.actions.set(s,a),e.sendMessage("defineAction",s)},setPageHash(s,a=!1){e.sendMessage("setPageHash",{hash:s,replace:a})},setRouterPreventLocationUpdate(s=!0){e.sendMessage("setRouterPreventLocationUpdate",s)}})}constructor(e,s,a){super(e,s,a),this.publicApi=y.createPublicApi(this)}processMessage(e){switch(e.type){case"loadingState":{this.emit("loadingStateChanged",e.payload);break}}}},q=class w extends m{commandMap;dataLoadToken;pageHash;pageId;pageRef;pageParams;pageAnchor;locationSync;colorScheme;publicApi;static createPublicApi(e){let s={primary:f("primary",e.sendMessage.bind(e),e.commandMap),secondary:f("secondary",e.sendMessage.bind(e),e.commandMap),menu:f("menu",e.sendMessage.bind(e),e.commandMap)};return Object.freeze({pageHash:e.pageHash.readonly,pageId:e.pageId.readonly,pageRef:e.pageRef.readonly,pageAnchor:e.pageAnchor.readonly,pageParams:e.pageParams.readonly,colorScheme:e.colorScheme.readonly,on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),nav:Object.assign(s.secondary,s),notify(a,n){e.sendMessage("notification",{name:a,details:n})},defineAction(a,n){e.actions.set(a,n),e.sendMessage("defineAction",a)},setPageHash(a,n=!1){e.sendMessage("setPageHash",{hash:a,replace:n})},setPageHashState(a,n=!1){e.sendMessage("setPageHashState",{...a,replace:n})},setPageHashStateWithAnchor(a,n=!1){e.sendMessage("setPageHashStateWithAnchor",{...a,replace:n})},setPage(a,n,r,i=!1){e.sendMessage("setPage",{id:a,ref:n,params:r,replace:i})},setPageRef(a,n=!1){e.sendMessage("setPageRef",{ref:a,replace:n})},setPageParams(a,n=!1){e.sendMessage("setPageParams",{params:a,replace:n})},setPageAnchor(a,n=!1){e.sendMessage("setPageAnchor",{anchor:a,replace:n})},setColorSchemeState(a){e.sendMessage("setColorSchemeState",a)},setRouterPreventLocationUpdate(a=!0){e.sendMessage("setRouterPreventLocationUpdate",a)},setLocationSync(a=!0){a&&!e.locationSync?(e.locationSync=W(n=>e.publicApi.setPageHash(n)),e.on("pageHashChanged",e.locationSync.set)):!a&&e.locationSync&&(e.off("pageHashChanged",e.locationSync.set),e.locationSync.dispose(),e.locationSync=null)},unloadData(){e.sendMessage("unloadData",null)},async uploadData(a,n){let r=b();e.dataLoadToken=r;try{return await G(e,a,n)}finally{e.dataLoadToken===r&&(e.dataLoadToken=null)}}})}constructor(e,s,a){super(e,s,a),this.commandMap=new Map,this.dataLoadToken=null,this.pageHash=new u("#"),this.pageId=new u(""),this.pageRef=new u(null),this.pageParams=new u({}),this.pageAnchor=new u(null),this.locationSync=null,this.colorScheme=new u({state:"unknown",value:"unknown"},(n,r)=>n.state!==r.state||n.value!==r.value),this.publicApi=w.createPublicApi(this)}async processMessage(e){switch(e.type){case"destroy":{this.destroy();break}case"action":{let{callId:s,name:a,args:n}=e.payload,r=this.actions.get(a);if(typeof r=="function")try{this.sendMessage("actionResult",{callId:s,value:await r(...n)})}catch(i){this.sendMessage("actionResult",{callId:s,error:i})}else console.warn(`${p} Action "${a}" was not found`);break}case"navMethod":{let s=this.commandMap.get(e.payload);typeof s=="function"?s():console.warn(`${p} Nav command "${e.payload}" was not found`);break}case"pageHashChanged":{let{replace:s,hash:a,id:n,ref:r,params:i,anchor:o}=e.payload||{},c=String(a).startsWith("#")?a:"#"+a;this.pageHash.set(c),this.pageId.set(n),this.pageRef.set(r),this.pageParams.set(i),this.pageAnchor.set(o),this.emit("pageHashChanged",c,s);break}case"colorSchemeChanged":{let s=e.payload;this.colorScheme.set(s),this.emit("colorSchemeChanged",s);break}case"unloadData":{this.emit("unloadData");break}case"data":{this.emit("data");break}case"loadingState":{this.emit("loadingStateChanged",e.payload);break}default:console.error(`${p} Unknown embed message type "${e.type}"`)}}destroy(){this.locationSync&&(this.locationSync.dispose(),this.locationSync=null),super.destroy()}};function F(t,e,s){let a=Object.assign(new Map,{id:""}),n=null,r,i=typeof e=="function"&&typeof s!="function"?{onPreinit:void 0,onConnect:e}:{onPreinit:e,onConnect:s};return addEventListener("message",c),()=>{removeEventListener("message",c),o()};function o(){n!==null&&(n.destroy(),typeof r=="function"&&r(),n=null,r=void 0)}async function c(d){let l=d.data||{};if(d.isTrusted&&(d.source===t.contentWindow||d.source===null)&&l.from==="discoveryjs-app"){if(l.type==="ready"){o(),a.id!==l.id&&(a.clear(),a.id=l.id);let{colorScheme:v,page:h}=l.payload;n=new q(t.contentWindow,l.id,a),n.pageHash.set(h.hash),n.pageId.set(h.id),n.pageRef.set(h.ref),n.pageParams.set(h.params),n.pageAnchor.set(h.anchor),n.colorScheme.set(v),n.once("destroy",o),r=i.onConnect(n.publicApi);return}if(l.type==="preinit"){o(),typeof i.onPreinit=="function"&&(a.id!==l.id&&(a.clear(),a.id=l.id),n=new V(t.contentWindow,l.id,a),n.once("destroy",o),r=i.onPreinit(n.publicApi));return}if(n?.id===l.id){n.processMessage(l);return}}}}async function G(t,e,s=I){let a=t.dataLoadToken,n=()=>{if(t?.dataLoadToken!==a)throw new Error("Data upload aborted")};if(!a)throw new Error("No acceptToken specified");let r=typeof e=="function"?await e():await e;n();let i=typeof s=="function"?s(r)||{}:{},o=_(r);if(J)t.sendMessage("dataStream",{stream:o,resource:i},[o]);else{let c=o.getReader();t.sendMessage("startChunkedDataUpload",{acceptToken:a,resource:i});try{for(;;){let{value:d,done:l}=await c.read();if(n(),t.sendMessage("dataChunk",{acceptToken:a,value:d,done:l},typeof d!="string"&&d?.buffer?[d.buffer]:void 0),l)break}}catch(d){throw t.sendMessage("cancelChunkedDataUpload",{acceptToken:a,error:d}),d}finally{c.releaseLock()}}}function f(t,e,s){function a(n){let r=[];return{commands:r,config:JSON.parse(JSON.stringify(n,(i,o)=>{if(typeof o=="function"){let c="nav-command-"+b();return r.push(c),s.set(c,o),c}return o}))}}return{insert(n,r,i){e("changeNavButtons",{section:t,action:"insert",name:i,position:r,...a(n)})},prepend(n){e("changeNavButtons",{section:t,action:"prepend",...a(n)})},append(n){e("changeNavButtons",{section:t,action:"append",...a(n)})},before(n,r){e("changeNavButtons",{section:t,action:"before",name:n,...a(r)})},after(n,r){e("changeNavButtons",{section:t,action:"after",name:n,...a(r)})},replace(n,r){e("changeNavButtons",{section:t,action:"replace",name:n,...a(r)})},remove(n){e("changeNavButtons",{section:t,action:"remove",name:n})}}}const Z=["src"],ee=A({__name:"server-discovery",setup(t){const s=S().app.baseURL,a=R("iframe");return L(()=>{const n=F(a.value,r=>((async()=>{const i=await k.getServerData(await M()),o=`{${Object.entries(i).map(([c,d])=>`"${c}": ${P(d)}`).join(",")}}`;r.uploadData(o)})(),()=>{}));C(()=>{n()})}),(n,r)=>(T(),U("iframe",{ref_key:"iframe",ref:a,src:`${x(s)}discovery/index.html`,"h-full":"","w-full":""},null,8,Z))}});export{ee as default};
|
|
1
|
+
import{b6 as S,r as k,E as M,bm as P}from"./dv0e79gh.js";import{p as A,aD as R,E as L,M as C,J as U,$ as T,u as x}from"./vendor/json-editor-vue-nstwj98r.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";var H=class{listeners;constructor(){this.listeners=Object.create(null)}on(t,e){return this.listeners[t]={callback:e,next:this.listeners[t]||null},this}once(t,e){return this.on(t,function s(...a){e.apply(this,a),this.off(t,s)})}off(t,e){let s=this.listeners[t]||null,a=null;for(;s!==null;){if(s.callback===e){s.callback=null,a?a.next=s.next:this.listeners[t]=s.next;break}a=s,s=s.next}return this}emit(t,...e){let s=this.listeners[t]||null,a=!1;for(;s!==null;)typeof s.callback=="function"&&s.callback.apply(this,e),a=!0,s=s.next;return a}},u=class{subscriber;value;constructor(t,e){this.subscriber=null,this.value=t,this.shouldUpdate=typeof e=="function"?e:this.shouldUpdate}get readonly(){let t=this;return{subscribe:this.subscribe.bind(this),subscribeSync:this.subscribeSync.bind(this),unsubscribe:this.unsubscribe.bind(this),get value(){return t.value}}}subscribe(t){return this.subscriber={callback:t,subscriber:this.subscriber},()=>this.unsubscribe(t)}subscribeSync(t){let e=this.subscribe(t);return t(this.value,e),e}unsubscribe(t){let e=this,s=this.subscriber;for(;s!==null;){if(s.callback===t){s.callback=null,e.subscriber=s.subscriber;break}e=s,s=s.subscriber}}shouldUpdate(t,e){return t!==e}set(t){return this.#e(t)!==!1}asyncSet(t){let e=this.#e(t);return e===!1?Promise.resolve(!1):Promise.all(e).then(()=>!0)}#e(t){if(!this.shouldUpdate(t,this.value))return!1;let e=[],s=this.subscriber;for(this.value=t;s!==null;){let{callback:a}=s;a!==null&&e.push(a(t,()=>this.unsubscribe(a))),s=s.subscriber}return e}};function b(){return[performance.timeOrigin.toString(16),(1e4*performance.now()).toString(16),Math.random().toString(16).slice(2)].join("-")}new TextDecoder;var B=typeof Object.hasOwn=="function"?Object.hasOwn:(t,e)=>Object.hasOwnProperty.call(t,e),O={8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"};Uint8Array.from({length:2048},(t,e)=>B(O,e)?2:e<32?6:e<128?1:2);new Uint8Array(256).map((t,e)=>{for(let s=0;s<8;s++)t+=e>>s&1;return t});new TextDecoder("utf8",{ignoreBOM:!0});function j(t){try{return new URL(t,location.origin).origin===location.origin}catch{return!1}}function z(t){return t.ok}function D(t){return t.headers.get("x-file-encoded-size")||t.headers.get("content-length")}function E(t){return t.headers.get("x-file-size")||(j(t.url)&&!t.headers.get("content-encoding")?t.headers.get("content-length"):void 0)}function N(t){return t.headers.get("x-file-created-at")||t.headers.get("last-modified")||void 0}function I(t,e){if(t instanceof Response){let s=e?.isResponseOk||z,a=e?.getContentSize||E,n=e?.getContentEncodedSize||D,r=e?.getContentCreatedAt||N;if(s(t))return{type:"url",name:t.url,size:Number(a(t))||null,encodedSize:Number(n(t)),createdAt:r(t)}}if(t instanceof File)return{type:"file",name:t.name,size:t.size,createdAt:t.lastModified};if(t instanceof Blob)return{size:t.size};if(ArrayBuffer.isView(t))return{size:t.byteLength};if(typeof t=="string")return{size:t.length}}function $(t){let e=t;return(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e&&!(Symbol.iterator in e)&&!(Symbol.asyncIterator in e))&&(e=[e]),e&&Symbol.iterator in e?new Blob(e):t}function _(t){if(t instanceof ReadableStream)return t;if(t instanceof Response){if(t.body===null)throw new Error("Response has no body");return t.body}return t=$(t),t instanceof Blob?t.stream():new ReadableStream({start(){let e=t!==null&&typeof t=="object"&&Symbol.asyncIterator in t?t[Symbol.asyncIterator]:void 0;if(typeof e!="function")throw new Error("Bad value type (can't convert to a stream)");this.iterator=e()},async pull(e){let{value:s,done:a}=await this.iterator.next();a?(this.iterator=null,e.close()):e.enqueue(s)},cancel(){this.iterator=null}})}function W(t,e){let s=globalThis.location,a=[],n=({newURL:r,oldURL:i})=>{let o=new URL(r).hash||"#",c=new URL(i).hash||"#";o!==a.shift()&&(a.length=0,t(o,c))};return addEventListener("hashchange",n),{set(r,i){let o=r||"#";(s.hash||"#")!==o&&(a.push(r),i?s.replace(r):s.hash=r)},dispose(){removeEventListener("hashchange",n)}}}var p="[Discovery/embed-host]",g=()=>{},J=(()=>{try{let t=new ReadableStream;return new MessageChannel().port1.postMessage(t,[t]),!0}catch{return!1}})(),m=class extends H{window;id;actions;dataLoadToken;constructor(t,e,s){super(),this.window=t,this.id=e,this.actions=s,this.dataLoadToken=null}sendMessage(t,e,s){let a={id:this.id,from:"discoveryjs-app",type:t,payload:e||null};this.window.postMessage(a,"*",s)}destroy(){this.destroy=g,this.emit("destroy"),this.dataLoadToken=null,this.window=null,this.sendMessage=g}},V=class y extends m{publicApi;static createPublicApi(e){return Object.freeze({on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),defineAction(s,a){e.actions.set(s,a),e.sendMessage("defineAction",s)},setPageHash(s,a=!1){e.sendMessage("setPageHash",{hash:s,replace:a})},setRouterPreventLocationUpdate(s=!0){e.sendMessage("setRouterPreventLocationUpdate",s)}})}constructor(e,s,a){super(e,s,a),this.publicApi=y.createPublicApi(this)}processMessage(e){switch(e.type){case"loadingState":{this.emit("loadingStateChanged",e.payload);break}}}},q=class w extends m{commandMap;dataLoadToken;pageHash;pageId;pageRef;pageParams;pageAnchor;locationSync;colorScheme;publicApi;static createPublicApi(e){let s={primary:f("primary",e.sendMessage.bind(e),e.commandMap),secondary:f("secondary",e.sendMessage.bind(e),e.commandMap),menu:f("menu",e.sendMessage.bind(e),e.commandMap)};return Object.freeze({pageHash:e.pageHash.readonly,pageId:e.pageId.readonly,pageRef:e.pageRef.readonly,pageAnchor:e.pageAnchor.readonly,pageParams:e.pageParams.readonly,colorScheme:e.colorScheme.readonly,on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),nav:Object.assign(s.secondary,s),notify(a,n){e.sendMessage("notification",{name:a,details:n})},defineAction(a,n){e.actions.set(a,n),e.sendMessage("defineAction",a)},setPageHash(a,n=!1){e.sendMessage("setPageHash",{hash:a,replace:n})},setPageHashState(a,n=!1){e.sendMessage("setPageHashState",{...a,replace:n})},setPageHashStateWithAnchor(a,n=!1){e.sendMessage("setPageHashStateWithAnchor",{...a,replace:n})},setPage(a,n,r,i=!1){e.sendMessage("setPage",{id:a,ref:n,params:r,replace:i})},setPageRef(a,n=!1){e.sendMessage("setPageRef",{ref:a,replace:n})},setPageParams(a,n=!1){e.sendMessage("setPageParams",{params:a,replace:n})},setPageAnchor(a,n=!1){e.sendMessage("setPageAnchor",{anchor:a,replace:n})},setColorSchemeState(a){e.sendMessage("setColorSchemeState",a)},setRouterPreventLocationUpdate(a=!0){e.sendMessage("setRouterPreventLocationUpdate",a)},setLocationSync(a=!0){a&&!e.locationSync?(e.locationSync=W(n=>e.publicApi.setPageHash(n)),e.on("pageHashChanged",e.locationSync.set)):!a&&e.locationSync&&(e.off("pageHashChanged",e.locationSync.set),e.locationSync.dispose(),e.locationSync=null)},unloadData(){e.sendMessage("unloadData",null)},async uploadData(a,n){let r=b();e.dataLoadToken=r;try{return await G(e,a,n)}finally{e.dataLoadToken===r&&(e.dataLoadToken=null)}}})}constructor(e,s,a){super(e,s,a),this.commandMap=new Map,this.dataLoadToken=null,this.pageHash=new u("#"),this.pageId=new u(""),this.pageRef=new u(null),this.pageParams=new u({}),this.pageAnchor=new u(null),this.locationSync=null,this.colorScheme=new u({state:"unknown",value:"unknown"},(n,r)=>n.state!==r.state||n.value!==r.value),this.publicApi=w.createPublicApi(this)}async processMessage(e){switch(e.type){case"destroy":{this.destroy();break}case"action":{let{callId:s,name:a,args:n}=e.payload,r=this.actions.get(a);if(typeof r=="function")try{this.sendMessage("actionResult",{callId:s,value:await r(...n)})}catch(i){this.sendMessage("actionResult",{callId:s,error:i})}else console.warn(`${p} Action "${a}" was not found`);break}case"navMethod":{let s=this.commandMap.get(e.payload);typeof s=="function"?s():console.warn(`${p} Nav command "${e.payload}" was not found`);break}case"pageHashChanged":{let{replace:s,hash:a,id:n,ref:r,params:i,anchor:o}=e.payload||{},c=String(a).startsWith("#")?a:"#"+a;this.pageHash.set(c),this.pageId.set(n),this.pageRef.set(r),this.pageParams.set(i),this.pageAnchor.set(o),this.emit("pageHashChanged",c,s);break}case"colorSchemeChanged":{let s=e.payload;this.colorScheme.set(s),this.emit("colorSchemeChanged",s);break}case"unloadData":{this.emit("unloadData");break}case"data":{this.emit("data");break}case"loadingState":{this.emit("loadingStateChanged",e.payload);break}default:console.error(`${p} Unknown embed message type "${e.type}"`)}}destroy(){this.locationSync&&(this.locationSync.dispose(),this.locationSync=null),super.destroy()}};function F(t,e,s){let a=Object.assign(new Map,{id:""}),n=null,r,i=typeof e=="function"&&typeof s!="function"?{onPreinit:void 0,onConnect:e}:{onPreinit:e,onConnect:s};return addEventListener("message",c),()=>{removeEventListener("message",c),o()};function o(){n!==null&&(n.destroy(),typeof r=="function"&&r(),n=null,r=void 0)}async function c(d){let l=d.data||{};if(d.isTrusted&&(d.source===t.contentWindow||d.source===null)&&l.from==="discoveryjs-app"){if(l.type==="ready"){o(),a.id!==l.id&&(a.clear(),a.id=l.id);let{colorScheme:v,page:h}=l.payload;n=new q(t.contentWindow,l.id,a),n.pageHash.set(h.hash),n.pageId.set(h.id),n.pageRef.set(h.ref),n.pageParams.set(h.params),n.pageAnchor.set(h.anchor),n.colorScheme.set(v),n.once("destroy",o),r=i.onConnect(n.publicApi);return}if(l.type==="preinit"){o(),typeof i.onPreinit=="function"&&(a.id!==l.id&&(a.clear(),a.id=l.id),n=new V(t.contentWindow,l.id,a),n.once("destroy",o),r=i.onPreinit(n.publicApi));return}if(n?.id===l.id){n.processMessage(l);return}}}}async function G(t,e,s=I){let a=t.dataLoadToken,n=()=>{if(t?.dataLoadToken!==a)throw new Error("Data upload aborted")};if(!a)throw new Error("No acceptToken specified");let r=typeof e=="function"?await e():await e;n();let i=typeof s=="function"?s(r)||{}:{},o=_(r);if(J)t.sendMessage("dataStream",{stream:o,resource:i},[o]);else{let c=o.getReader();t.sendMessage("startChunkedDataUpload",{acceptToken:a,resource:i});try{for(;;){let{value:d,done:l}=await c.read();if(n(),t.sendMessage("dataChunk",{acceptToken:a,value:d,done:l},typeof d!="string"&&d?.buffer?[d.buffer]:void 0),l)break}}catch(d){throw t.sendMessage("cancelChunkedDataUpload",{acceptToken:a,error:d}),d}finally{c.releaseLock()}}}function f(t,e,s){function a(n){let r=[];return{commands:r,config:JSON.parse(JSON.stringify(n,(i,o)=>{if(typeof o=="function"){let c="nav-command-"+b();return r.push(c),s.set(c,o),c}return o}))}}return{insert(n,r,i){e("changeNavButtons",{section:t,action:"insert",name:i,position:r,...a(n)})},prepend(n){e("changeNavButtons",{section:t,action:"prepend",...a(n)})},append(n){e("changeNavButtons",{section:t,action:"append",...a(n)})},before(n,r){e("changeNavButtons",{section:t,action:"before",name:n,...a(r)})},after(n,r){e("changeNavButtons",{section:t,action:"after",name:n,...a(r)})},replace(n,r){e("changeNavButtons",{section:t,action:"replace",name:n,...a(r)})},remove(n){e("changeNavButtons",{section:t,action:"remove",name:n})}}}const Z=["src"],ee=A({__name:"server-discovery",setup(t){const s=S().app.baseURL,a=R("iframe");return L(()=>{const n=F(a.value,r=>((async()=>{const i=await k.getServerData(await M()),o=`{${Object.entries(i).map(([c,d])=>`"${c}": ${P(d)}`).join(",")}}`;r.uploadData(o)})(),()=>{}));C(()=>{n()})}),(n,r)=>(T(),U("iframe",{ref_key:"iframe",ref:a,src:`${x(s)}discovery/index.html`,"h-full":"","w-full":""},null,8,Z))}});export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as j}from"./ncheckbox.vue-
|
|
1
|
+
import{_ as j}from"./ncheckbox.vue-no3437wc.js";import{H as O,_ as R,I as T,v as A}from"./dv0e79gh.js";import{_ as E}from"./nselect.vue-la95si0f.js";import{p as L,q as N,x as q,J as u,$ as s,a1 as b,W as m,F as c,ag as h,u as r,X as y,a0 as C,U as p,V,ab as U,a4 as v,a8 as z}from"./vendor/json-editor-vue-nstwj98r.js";const H={p4:"",flex:"~ col gap-4"},J={key:1,ml2:"",flex:""},K=["value"],M={key:0,flex:"","gap-4":""},Y=L({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(S,{emit:w}){const g=S,d=O(g,"modelValue",w,{passive:!0}),$=N(()=>[...g.keys,"active","key","value","type"]),B=N(()=>{const l={};for(const e of $.value)l[e]=g.default[e]||"";return l}),I=["string","number","boolean","file","date","time","datetime-local"];function D(l,e){const t=e.target;if(t.files&&t.files[0]){const i=t.files[0],f=new FileReader;f.readAsDataURL(i),f.onload=()=>{d.value[l].value=f.result}}}return q(()=>d,l=>{l.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const t=Number.parseFloat(e.value);e.value=Number.isNaN(t)?0:t}else e.type==="boolean"&&typeof e.value!="boolean"?e.value=!0:e.type==="file"&&typeof e.value!="object"?e.value="":e.type==="date"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}$/)?e.value=new Date().toISOString().slice(0,10):e.type==="time"&&typeof e.value=="string"&&!e.value.match(/^\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(11,16):e.type==="datetime-local"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(0,16):e.type==="string"&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(l,e)=>{const t=j,i=A,f=E,F=T,_=R;return s(),u("div",H,[(s(!0),u(c,null,h(r(d),(a,k)=>(s(),u("div",{key:k,flex:"~ gap-2","justify-around":""},[m(l.$slots,"input",{item:a}),(s(!0),u(c,null,h($.value,n=>(s(),u(c,{key:n},[a.type!==null&&n==="active"?(s(),p(t,{key:0,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,n:"sm primary",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):b("",!0),a.type!==null&&n==="key"?(s(),p(i,{key:1,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,placeholder:n,"flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):n==="value"?(s(),u(c,{key:2},[a.type==="file"?(s(),p(i,{key:0,type:"file",disabled:l.disabled,class:v(l.disabled?"op75":""),onChange:o=>D(k,o)},null,8,["disabled","class","onChange"])):a.type==="boolean"?(s(),u("div",J,[y(t,{modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,placeholder:"Value",n:"green lg",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(s(),p(i,{key:2,modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,type:a.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):n==="type"?(s(),p(f,{key:3,modelValue:a.type,"onUpdate:modelValue":o=>a.type=o,n:"sm green",class:v(l.disabled?"op75":""),disabled:l.disabled},{default:V(()=>[(s(),u(c,null,h(I,o=>C("option",{key:o,value:o},z(o),9,K)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):b("",!0)],64))),128)),m(l.$slots,"input-actions",{},()=>[y(_,{n:"red",disabled:l.disabled,class:v(l.disabled?"op0!":""),onClick:n=>r(d).splice(k,1)},{default:V(()=>[y(F,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),l.disabled?b("",!0):(s(),u("div",M,[m(l.$slots,"actions",{params:r(d)},()=>[y(_,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=a=>r(d).push({...B.value}))},{default:V(()=>[...e[2]||(e[2]=[U(" Add ",-1)])]),_:1}),e[4]||(e[4]=C("div",{"flex-auto":""},null,-1)),r(d).length?(s(),p(_,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=a=>r(d).splice(0,r(d).length))},{default:V(()=>[...e[3]||(e[3]=[U(" Remove All ",-1)])]),_:1})):b("",!0)])])),m(l.$slots,"default")])}}});export{Y as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{be as $e,b4 as se,I as De,bf as Ke,bg as Qe,b2 as Xe,a4 as Ye,A as Ze,f as et,w as tt,g as Ee,ay as ot,b3 as nt,a as at,v as lt,_ as je,M as st,j as Re,F as rt,bh as it,S as ut,n as dt,a8 as ct}from"./odmgfr63.js";import{_ as pt}from"./nnavbar.vue-i0ef5lnu.js";import{_ as Ve}from"./nbadge-ouy9nnut.js";import{p as ye,k as P,J as k,$ as r,a0 as u,W as ft,a1 as N,a4 as M,U as D,a8 as O,u as b,ab as K,a2 as vt,F as L,ag as H,D as me,x as Ie,b as Ue,C as mt,z as yt,r as ve,q as R,w as ht,ai as Oe,X as v,V as T,ac as Z,Y as gt,av as bt,K as _t}from"./vendor/json-editor-vue-nstwj98r.js";import{_ as kt}from"./nselect.vue-ehwgo50w.js";import{_ as Ne}from"./server-route-inputs.vue-imb8tsh1.js";import{_ as wt}from"./code-snippets.vue-ipuvag1k.js";import{_ as xt}from"./data-schema-button.vue-bbu4gevd.js";import{_ as Ct}from"./ncode-block.vue-j1bpwykw.js";import{C as xe,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-dh0zlwt7.js";import{_ as Tt}from"./ndrawer.vue-jzawtilq.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-bo8tyd39.js";import"./ncheckbox.vue-d8axpf9c.js";import"./client-hkqvtzyx.js";import"./nicon-title.vue-mr03t3pg.js";const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),n=$e();return(o,m)=>{const f=De,d=Ve,_=Pe;return r(),k("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":b(n)===o.item.filepath}]),style:vt({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),D(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),D(d,{key:1,class:M(b(se)(o.item.method||"*")),textContent:O((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(r(),D(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+O(o.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?ft(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,H(o.item.routes,h=>(r(),D(_,{key:h.filepath,item:h,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}});function $t(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=s||{},m=o.decode||Dt;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let _=e.indexOf(";",f);if(_===-1)_=e.length;else if(_<d){f=e.lastIndexOf(";",d-1)+1;continue}const h=e.slice(f,d).trim();if(o?.filter&&!o?.filter(h)){f=_+1;continue}if(n[h]===void 0){let i=e.slice(d+1,_).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[h]=Et(i,m)}f=_+1}return n}function Dt(e){return e.includes("%")?decodeURIComponent(e):e}function Et(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,n){const o=n||{},m=o.encode||encodeURIComponent;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=m(s);if(f&&!ae.test(f))throw new TypeError("argument val is invalid");let d=e+"="+f;if(o.maxAge!==void 0&&o.maxAge!==null){const _=o.maxAge-0;if(Number.isNaN(_)||!Number.isFinite(_))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(_)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!jt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function jt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function A(e){if(typeof e!="object")return e;var s,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(s in e)e.hasOwnProperty(s)&&n[s]!==e[s]&&(n[s]=A(e[s]))}else{n={};for(s in e)s==="__proto__"?Object.defineProperty(n,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):n[s]=A(e[s])}return n}if(o==="[object Array]"){for(s=e.length,n=Array(s);s--;)n[s]=A(e[s]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(m){n.add(A(m))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(m,f){n.set(A(f),A(m))}),n):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):o==="[object DataView]"?new e.constructor(A(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const Rt={path:"/",watch:!0,decode:e=>Ke(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=window.cookieStore;function Vt(e,s){const n={...Rt,...s};n.filter??=i=>i===e;const o=Se(n)||{};let m;n.maxAge!==void 0?m=n.maxAge*1e3:n.expires&&(m=n.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,d=f||o[e]===void 0||o[e]===null,_=A(f?void 0:o[e]??n.default?.()),h=m&&!f?Ot(_,m,n.watch&&n.watch!=="shallow"):P(_);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const E=(w=!1)=>{!w&&(n.readonly||Qe(h.value,o[e]))||(Ut(e,h.value,n),o[e]=A(h.value),i?.postMessage({value:n.encode(h.value)}))},I=w=>{const y=w.refresh?Se(n)?.[e]:n.decode(w.value);B=!0,h.value=y,o[e]=A(y),yt(()=>{B=!1})};let B=!1;const J=!!Ue();if(J&&me(()=>{B=!0,E(),i?.close()}),le){const w=y=>{const U=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);U&&I({value:U.value}),g&&I({value:null})};le.addEventListener("change",w),J&&me(()=>le.removeEventListener("change",w))}else i&&(i.onmessage=({data:w})=>I(w));n.watch&&Ie(h,()=>{B||E()},{deep:n.watch!=="shallow"}),d&&E(d)}return h}function Se(e={}){return $t(document.cookie,e)}function It(e,s,n={}){return s==null?Ce(e,s,{...n,maxAge:-1}):Ce(e,s,n)}function Ut(e,s,n={}){document.cookie=It(e,s,n)}const Te=2147483647;function Ot(e,s,n){let o,m,f=0;const d=n?P(e):{value:e};return Ue()&&me(()=>{m?.(),clearTimeout(o)}),mt((_,h)=>{n&&(m=Ie(d,h));function i(){f=0,clearTimeout(o);const E=s-f,I=E<Te?E:Te;o=setTimeout(()=>{if(f+=I,f<s)return i();d.value=void 0,h()},I)}return{get(){return _(),d.value},set(E){i(),d.value=E,h()}}})}const Nt={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},Pt={flex:"~ gap2 items-center"},At={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt={class:"hidden md:block"},Ft={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Jt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Gt={key:2},Kt={key:3,border:"b base",relative:"","n-code-block":""},Qt={flex:"~ wrap","w-full":""},Xt=["onClick"],Yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Zt={key:1,"text-xs":"",op50:""},eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},ao={border:"~ base",rounded:""},lo=["src"],so={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const n=e,o=s,[m,f]=Xe(),d=Ye(),_=Ze(),h=et(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=R(()=>i.contentType.includes("application/json")?"json":i.contentType.includes("text/html")?"html":i.contentType.includes("text/css")?"css":i.contentType.includes("text/javascript")?"javascript":i.contentType.includes("image")||i.contentType.includes("video")?"media":i.contentType.includes("text/xml")||i.contentType.includes("application/xml")?"xml":i.contentType.includes("application/pdf")?"pdf":"text"),I=R(()=>{if(E.value==="json")return JSON.stringify(i.data,null,2);if(E.value==="media"||E.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),w=tt(),y=R(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),U=R(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(n.route.method||"GET"),C=P({}),x=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=P({}),{inputDefaults:S,sendFrom:F}=Ee("serverRoutes"),Q=R(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=R(()=>ie.includes(g.value.toUpperCase())),c=P(),te=["input","json"],W=P(te[0]),ue=R({get:()=>x[c.value],set:a=>{x[c.value]=a}}),he=R(()=>({...G(S.value.query),...G(x.query)})),ge=R(()=>({...G(S.value.headers),...G(x.headers)})),de=R(()=>ee.value?W.value==="json"?{...G(S.value.body),...V.value}:{...G(S.value.body),...G(x.body)}:void 0),Ae=R(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=R(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(j=>(j.startsWith(":")||j.startsWith("**:"))&&C.value[j]||j).join("")||"")+a;let p=_.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=R(()=>Ae.value+oe.value);function G(a){const t=Object.fromEntries(a.filter(({active:p,key:j,value:$})=>p&&j&&$!==void 0).map(({key:p,value:j})=>[p,j]));return Object.entries(t).length?t:void 0}async function _e(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;st("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:de.value,onResponse({response:p}){i.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),i.statusCode=p.status,i.error=void 0},onResponseError(p){i.error=p.response._data,i.data=p.response._data}})}catch{}B.value=!1,i.fetchTime=Date.now()-a}const ke=R(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`,
|
|
1
|
+
import{be as $e,b4 as se,I as De,bf as Ke,bg as Qe,b2 as Xe,a4 as Ye,A as Ze,f as et,w as tt,g as Ee,ay as ot,b3 as nt,a as at,v as lt,_ as je,M as st,j as Re,F as rt,bh as it,S as ut,n as dt,a8 as ct}from"./dv0e79gh.js";import{_ as pt}from"./nnavbar.vue-cybpsded.js";import{_ as Ve}from"./nbadge-la51ie4t.js";import{p as ye,k as P,J as k,$ as r,a0 as u,W as ft,a1 as N,a4 as M,U as D,a8 as O,u as b,ab as K,a2 as vt,F as L,ag as H,D as me,x as Ie,b as Ue,C as mt,z as yt,r as ve,q as R,w as ht,ai as Oe,X as v,V as T,ac as Z,Y as gt,av as bt,K as _t}from"./vendor/json-editor-vue-nstwj98r.js";import{_ as kt}from"./nselect.vue-la95si0f.js";import{_ as Ne}from"./server-route-inputs.vue-g0p9q870.js";import{_ as wt}from"./code-snippets.vue-2de0d1wh.js";import{_ as xt}from"./data-schema-button.vue-gj32e65l.js";import{_ as Ct}from"./ncode-block.vue-j1bpwykw.js";import{C as xe,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-ddplx9pl.js";import{_ as Tt}from"./ndrawer.vue-mok9ppy7.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";import"./ncheckbox.vue-no3437wc.js";import"./client-hkqvtzyx.js";import"./nicon-title.vue-mr03t3pg.js";const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),n=$e();return(o,m)=>{const f=De,d=Ve,_=Pe;return r(),k("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":b(n)===o.item.filepath}]),style:vt({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),D(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),D(d,{key:1,class:M(b(se)(o.item.method||"*")),textContent:O((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(r(),D(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+O(o.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?ft(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,H(o.item.routes,h=>(r(),D(_,{key:h.filepath,item:h,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}});function $t(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=s||{},m=o.decode||Dt;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let _=e.indexOf(";",f);if(_===-1)_=e.length;else if(_<d){f=e.lastIndexOf(";",d-1)+1;continue}const h=e.slice(f,d).trim();if(o?.filter&&!o?.filter(h)){f=_+1;continue}if(n[h]===void 0){let i=e.slice(d+1,_).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[h]=Et(i,m)}f=_+1}return n}function Dt(e){return e.includes("%")?decodeURIComponent(e):e}function Et(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,n){const o=n||{},m=o.encode||encodeURIComponent;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=m(s);if(f&&!ae.test(f))throw new TypeError("argument val is invalid");let d=e+"="+f;if(o.maxAge!==void 0&&o.maxAge!==null){const _=o.maxAge-0;if(Number.isNaN(_)||!Number.isFinite(_))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(_)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!jt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function jt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function A(e){if(typeof e!="object")return e;var s,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(s in e)e.hasOwnProperty(s)&&n[s]!==e[s]&&(n[s]=A(e[s]))}else{n={};for(s in e)s==="__proto__"?Object.defineProperty(n,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):n[s]=A(e[s])}return n}if(o==="[object Array]"){for(s=e.length,n=Array(s);s--;)n[s]=A(e[s]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(m){n.add(A(m))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(m,f){n.set(A(f),A(m))}),n):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):o==="[object DataView]"?new e.constructor(A(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const Rt={path:"/",watch:!0,decode:e=>Ke(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=window.cookieStore;function Vt(e,s){const n={...Rt,...s};n.filter??=i=>i===e;const o=Se(n)||{};let m;n.maxAge!==void 0?m=n.maxAge*1e3:n.expires&&(m=n.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,d=f||o[e]===void 0||o[e]===null,_=A(f?void 0:o[e]??n.default?.()),h=m&&!f?Ot(_,m,n.watch&&n.watch!=="shallow"):P(_);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const E=(w=!1)=>{!w&&(n.readonly||Qe(h.value,o[e]))||(Ut(e,h.value,n),o[e]=A(h.value),i?.postMessage({value:n.encode(h.value)}))},I=w=>{const y=w.refresh?Se(n)?.[e]:n.decode(w.value);B=!0,h.value=y,o[e]=A(y),yt(()=>{B=!1})};let B=!1;const J=!!Ue();if(J&&me(()=>{B=!0,E(),i?.close()}),le){const w=y=>{const U=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);U&&I({value:U.value}),g&&I({value:null})};le.addEventListener("change",w),J&&me(()=>le.removeEventListener("change",w))}else i&&(i.onmessage=({data:w})=>I(w));n.watch&&Ie(h,()=>{B||E()},{deep:n.watch!=="shallow"}),d&&E(d)}return h}function Se(e={}){return $t(document.cookie,e)}function It(e,s,n={}){return s==null?Ce(e,s,{...n,maxAge:-1}):Ce(e,s,n)}function Ut(e,s,n={}){document.cookie=It(e,s,n)}const Te=2147483647;function Ot(e,s,n){let o,m,f=0;const d=n?P(e):{value:e};return Ue()&&me(()=>{m?.(),clearTimeout(o)}),mt((_,h)=>{n&&(m=Ie(d,h));function i(){f=0,clearTimeout(o);const E=s-f,I=E<Te?E:Te;o=setTimeout(()=>{if(f+=I,f<s)return i();d.value=void 0,h()},I)}return{get(){return _(),d.value},set(E){i(),d.value=E,h()}}})}const Nt={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},Pt={flex:"~ gap2 items-center"},At={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt={class:"hidden md:block"},Ft={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Jt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Gt={key:2},Kt={key:3,border:"b base",relative:"","n-code-block":""},Qt={flex:"~ wrap","w-full":""},Xt=["onClick"],Yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Zt={key:1,"text-xs":"",op50:""},eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},ao={border:"~ base",rounded:""},lo=["src"],so={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const n=e,o=s,[m,f]=Xe(),d=Ye(),_=Ze(),h=et(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=R(()=>i.contentType.includes("application/json")?"json":i.contentType.includes("text/html")?"html":i.contentType.includes("text/css")?"css":i.contentType.includes("text/javascript")?"javascript":i.contentType.includes("image")||i.contentType.includes("video")?"media":i.contentType.includes("text/xml")||i.contentType.includes("application/xml")?"xml":i.contentType.includes("application/pdf")?"pdf":"text"),I=R(()=>{if(E.value==="json")return JSON.stringify(i.data,null,2);if(E.value==="media"||E.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),w=tt(),y=R(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),U=R(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(n.route.method||"GET"),C=P({}),x=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=P({}),{inputDefaults:S,sendFrom:F}=Ee("serverRoutes"),Q=R(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=R(()=>ie.includes(g.value.toUpperCase())),c=P(),te=["input","json"],W=P(te[0]),ue=R({get:()=>x[c.value],set:a=>{x[c.value]=a}}),he=R(()=>({...G(S.value.query),...G(x.query)})),ge=R(()=>({...G(S.value.headers),...G(x.headers)})),de=R(()=>ee.value?W.value==="json"?{...G(S.value.body),...V.value}:{...G(S.value.body),...G(x.body)}:void 0),Ae=R(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=R(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(j=>(j.startsWith(":")||j.startsWith("**:"))&&C.value[j]||j).join("")||"")+a;let p=_.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=R(()=>Ae.value+oe.value);function G(a){const t=Object.fromEntries(a.filter(({active:p,key:j,value:$})=>p&&j&&$!==void 0).map(({key:p,value:j})=>[p,j]));return Object.entries(t).length?t:void 0}async function _e(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;st("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:de.value,onResponse({response:p}){i.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),i.statusCode=p.status,i.error=void 0},onResponseError(p){i.error=p.response._data,i.data=p.response._data}})}catch{}B.value=!1,i.fetchTime=Date.now()-a}const ke=R(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`,
|
|
2
2
|
`);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),p&&t.push(`headers: {
|
|
3
3
|
${p}
|
|
4
4
|
}`),de.value&&t.push(`body: ${JSON.stringify(de.value,null,2)}`);const j=t.length?`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b1 as ne,I as re,g as ue,b2 as xe,a4 as Oe,A as Te,w as we,ay as Se,b3 as Xe,a as Ee,_ as le,b4 as De,v as Ce,M as Me,j as ce,F as Ie,b5 as $e,S as Re,n as Ue,a8 as Le}from"./odmgfr63.js";import{_ as Ne}from"./nnavbar.vue-i0ef5lnu.js";import{_ as fe}from"./nbadge-ouy9nnut.js";import{a as Ae,p as K,k as B,q as R,J as I,$ as g,a0 as m,a1 as j,X as x,a8 as N,F as H,ag as Z,a4 as z,u as E,r as ie,w as Ve,ai as pe,U as A,ac as G,V as M,ab as P,Y as je,av as He,W as We,a2 as Be,K as Fe}from"./vendor/json-editor-vue-nstwj98r.js";import{_ as de}from"./server-route-inputs.vue-imb8tsh1.js";import{_ as qe}from"./ncode-block.vue-j1bpwykw.js";import{S as ve}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-dh0zlwt7.js";import{_ as Ye}from"./ndrawer.vue-jzawtilq.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-bo8tyd39.js";import"./ncheckbox.vue-d8axpf9c.js";import"./nselect.vue-ehwgo50w.js";import"./client-hkqvtzyx.js";import"./nicon-title.vue-mr03t3pg.js";var te={exports:{}},se;function ze(){return se||(se=1,(function(F,U){(function(O,w){F.exports=w()})(globalThis,()=>(()=>{var L={949:((b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),v=(function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a==="@reboot")return e=["@reboot","","","","","",""],e;if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(u){return u.trim()}).filter(function(u){return u!==""}).map(function(u){return isNaN(Number(u))?u:Number(u)}).filter(function(u){return u!==null&&u!==""});r.length===0&&r.push("*"),r.sort(function(u,i){return u!==null&&i!==null?u-i:0}),e[a]=r.map(function(u){return u!==null?u.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(l){var h=l.replace(/\D/,""),d=h;return e.dayOfWeekStartIndexZero?h=="7"&&(d="0"):d=(parseInt(h)-1).toString(),l.replace(h,d)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(l){var h=l.replace(/\D/,""),d=h;return e.monthStartIndexZero&&(d=(parseInt(h)+1).toString()),l.replace(h,d)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var u in n)t[4]=t[4].replace(new RegExp(u,"gi"),n[u].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(l){return l!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var s=null;switch(i){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null;break}if(s!==null){var f=t[i].split("/");t[i]="".concat(f[0],"-").concat(s,"/").concat(f[1])}}},y.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},y.prototype.validateAnyRanges=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.validateOnlyExpectedCharactersFound=function(t,e){var a=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(a&&a.length)throw new Error("Expression contains invalid values: '".concat(a.toString(),"'"))},y})();p.CronParser=v}),333:((b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),v=_(949),y=(function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,u=n===void 0?!0:n,i=r.verbose,s=i===void 0?!1:i,f=r.dayOfWeekStartIndexZero,l=f===void 0?!0:f,h=r.monthStartIndexZero,d=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,W=C===void 0?null:C,V={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:$,locale:W};V.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var X=new t(e,V);return X.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e,a,r="";try{var n=new v.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]==="@reboot")return((a=(e=this.i18n).atReboot)===null||a===void 0?void 0:a.call(e))||"Run once, at startup";var u=this.getTimeOfDayDescription(),i=this.getDayOfMonthDescription(),s=this.getMonthDescription(),f=this.getDayOfWeekDescription(),l=this.getYearDescription();r+=u+i+f+s+l,r=this.transformVerbosity(r,!!this.options.verbose),r=r.charAt(0).toLocaleUpperCase()+r.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)r=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return r},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var u=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,u[0],""),this.formatTime(r,u[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var s=0;s<i.length;s++)n+=" ",n+=this.formatTime(i[s],a,""),s<i.length-2&&(n+=","),s==i.length-2&&(n+=this.i18n.spaceAnd())}else{var f=this.getSecondsDescription(),l=this.getMinutesDescription(),h=this.getHoursDescription();if(n+=f,n&&l&&(n+=", "),n+=l,l===h)return n;n&&h&&(n+=", "),n+=h}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(u){return u},function(u){return o.StringUtilities.format(e.i18n.everyX0Minutes(u),u)},function(u){return e.i18n.minutesX0ThroughX1PastTheHour()},function(u){try{return u=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(u)<20?e.i18n.atX0MinutesPastTheHour(u):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(u)}catch{return e.i18n.atX0MinutesPastTheHour(u)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=0,n=[];a.split("/")[0].split(",").forEach(function(s){var f=s.split("-");f.length===2&&n.push({value:f[1],index:r+1}),r+=f.length});var u=0,i=this.getSegmentDescription(a,this.i18n.everyHour(),function(s){var f=n.find(function(h){return h.value===s&&h.index===u}),l=f&&e.expressionParts[1]!=="0";return u++,l?e.formatTime(s,"59",""):e.formatTime(s,"0","")},function(s){return o.StringUtilities.format(e.i18n.everyX0Hours(s),s)},function(s){return e.i18n.betweenX0AndX1()},function(s){return e.i18n.atX0()});return i},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,u){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var s=parseInt(i),f=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(u)[s]:a[s];if(n.indexOf("#")>-1){var l=null,h=n.substring(n.indexOf("#")+1),d=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(d);break;case"2":l=e.i18n.second(d);break;case"3":l=e.i18n.third(d);break;case"4":l=e.i18n.fourth(d);break;case"5":l=e.i18n.fifth(d);break}f=l+" "+f}return f},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var u=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(u):e.i18n.commaX0ThroughX1(u)},function(n){var u=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),s=n.substring(0,n.indexOf("#"));u=e.i18n.commaOnThe(i,s).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)u=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var f=e.expressionParts[3]!="*";u=f?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return u}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,u){return u&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(u)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var u=parseInt(n[0].replace("W","")),i=u==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),u.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var s=r.match(/L-(\d{1,2})/);if(s){var f=s[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(f),f);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(l){return l=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),l):l},function(l){return l=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(l)},function(l){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(l)},function(l){return e.i18n.commaOnDayX0OfTheMonth(l)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,u,i){var s=null,f=e.indexOf("/")>-1,l=e.indexOf("-")>-1,h=e.indexOf(",")>-1;if(!e)s="";else if(e==="*")s=a;else if(!f&&!l&&!h)s=o.StringUtilities.format(i(e),r(e));else if(h){for(var d=e.split(","),$="",C=0;C<d.length;C++)if(C>0&&d.length>2&&($+=",",C<d.length-1&&($+=" ")),C>0&&d.length>1&&(C==d.length-1||d.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),d[C].indexOf("/")>-1||d[C].indexOf("-")>-1){var W=d[C].indexOf("-")>-1&&d[C].indexOf("/")==-1,V=this.getSegmentDescription(d[C],a,r,n,W?this.i18n.commaX0ThroughX1:u,i);W&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(d[C],a,r,n,u,i):$+=r(d[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var d=e.split("/");if(s=o.StringUtilities.format(n(d[1]),d[1]),d[0].indexOf("-")>-1){var X=this.generateRangeSegmentDescription(d[0],u,r);X.indexOf(", ")!=0&&(s+=", "),s+=X}else if(d[0].indexOf("*")==-1){var Y=o.StringUtilities.format(i(d[0]),r(d[0]));Y=Y.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),Y)}}else l&&(s=this.generateRangeSegmentDescription(e,u,r));return s},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",u=e.split("-"),i=r(u[0],1),s=r(u[1],2),f=a(e);return n+=o.StringUtilities.format(f,i,s),n},t.prototype.formatTime=function(e,a,r){var n=0,u=0,i=parseInt(e)+n,s=parseInt(a)+u;s>=60?(s-=60,i+=1):s<0&&(s+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var f="",l=!1;this.options.use24HourTimeFormat||(l=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),f=l?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var h="";return r&&(h=":".concat(("00"+r).substring(r.length))),"".concat(l?f:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+s.toString()).substring(s.toString().length)).concat(h).concat(l?"":f)},t.prototype.transformVerbosity=function(e,a){if(!a&&(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var r=0,n=Object.entries(this.i18n.conciseVerbosityReplacements());r<n.length;r++){var u=n[r],i=u[0],s=u[1];e=e.replace(new RegExp(i,"g"),s)}return e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t})();p.ExpressionDescriptor=y}),747:((b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=_(486),v=(function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y})();p.enLocaleLoader=v}),486:((b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=(function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o.prototype.atReboot=function(){return"Run once, at startup"},o})();p.en=_}),515:((b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(v,y){if(!v)throw new Error(y)}var o=(function(){function v(){}return v.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},v.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},v.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},v.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},v.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},v.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},v})();p.default=o}),823:((b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=(function(){function o(){}return o.format=function(v){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return v.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(v,y){return y.some(function(t){return v.indexOf(t)>-1})},o})();p.StringUtilities=_})},O={};function w(b){var p=O[b];if(p!==void 0)return p.exports;var _=O[b]={exports:{}};return L[b](_,_.exports,w),_.exports}var S={};return(()=>{var b=S;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=w(333),_=w(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),S})())})(te)),te.exports}var Ge=ze();const Ze=Ae(Ge),Je=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(F){const U=F,L=ne(),O=B(!0),w=R(()=>Ze.toString(U.collection.cron));return(S,b)=>{const p=re,_=fe;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",p2:"","hover-bg-active":"",title:w.value,onClick:b[0]||(b[0]=o=>O.value=!O.value)},[m("div",Qe,[x(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":O.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[x(_,{class:"font-mono n-primary",textContent:N(S.collection.cron)},null,8,["textContent"]),m("span",et,N(w.value),1),m("span",tt,"("+N(S.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),O.value?(g(),I("ul",nt,[(g(!0),I(H,null,Z(S.collection.tasks,o=>(g(),I("li",{key:o},[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","pl-9":"","font-mono":"","hover-bg-active":"",class:z([{"bg-active":E(L)===o}]),onClick:v=>L.value=o},N(o),11,rt),b[1]||(b[1]=m("div",{"x-divider":""},null,-1))]))),128))])):j("",!0)])}}}),at={"h-full":"","w-full":"",flex:"~ col"},it={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},st={flex:"~ gap2 items-center"},ut={relative:"","w-full":""},lt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ct={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ft={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},dt={key:0,border:"b base",relative:"","n-code-block":""},vt={flex:"~ wrap","w-full":""},ht=["onClick"],mt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},yt={key:1,"text-xs":"",op50:""},gt=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(F,{emit:U}){const L=F,O=U,w=B({payload:{}}),{inputDefaults:S}=ue("serverRoutes"),[b,p]=xe(),_=Oe(),o=Te(),v=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>JSON.stringify(v.data,null,2)),t=R(()=>v.contentType.includes("application/json")?"json":"text"),e=B(!1),a=B(!1),r=we(),n=B(),u=["json"],i=B(u[0]),s=ie({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=R({get:()=>s[n.value],set:k=>{s[n.value]=k}}),l=R(()=>({...X(S.value.query),...X(s.query)})),h=R(()=>({...X(S.value.headers)})),d=R(()=>Object.keys(w.value?.payload??{}).length?{...w.value}:void 0),$=R(()=>d.value?"POST":"GET"),C=R(()=>{let k=window?.location.origin;return k.charAt(k.length-1)==="/"&&(k=k.slice(0,-1)),k}),W=R(()=>{let k=new URLSearchParams(l.value).toString();k&&(k=`?${k}`);const c=`/_nitro/tasks/${L.task.name}${k}`;let D=o.value?.app.baseURL||"";return(D==="./"||D===".")&&(D=""),D.endsWith("/")&&(D=D.slice(0,-1)),D+c}),V=R(()=>C.value+W.value);function X(k){const c=Object.fromEntries(k.filter(({active:D,key:q,value:J})=>D&&q&&J!==void 0).map(({key:D,value:q})=>[D,q]));return Object.entries(c).length?c:void 0}async function Y(){a.value=!0,e.value=!0;const k=Date.now();Me("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:d.value,onResponse({response:c}){v.contentType=(c.headers.get("content-type")||"").toString().toLowerCase().trim(),v.statusCode=c.status,v.error=void 0},onResponseError(c){v.error=c.response._data,v.data=c.response._data}})}catch{}e.value=!1,v.fetchTime=Date.now()-k}const me=R(()=>{const k=[];return k.push({name:"Query",slug:"query",length:s.query.length}),k.push({name:"Body",slug:"body",length:s.body.length}),k});Ve(()=>{if(i.value==="json"&&typeof w.value=="string")try{w.value=JSON.parse(w.value)}catch{}});const oe=Se("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const k=oe.value?.find(c=>c.task===L.task.name);if(k){n.value||(n.value=k.tab),k.tab!==n.value&&(k.tab=n.value);const{body:c,query:D,headers:q}=k.inputs;Object.assign(s,{body:c,query:D,headers:q})}else{const c={task:L.task.name,tab:"query",inputs:s};oe.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(k,c)=>{const D=le,q=Ce,J=re,ae=de,ge=ce,_e=Ie,ee=fe,be=qe,Q=pe("tooltip");return g(),I("div",at,[m("div",it,[m("div",st,[G((g(),I("div",null,[x(D,{class:z(["n-badge-base n-sm",E(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[P(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",ut,[x(q,{"model-value":W.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",lt,[G(x(D,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=T=>E(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(x(D,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=T=>E(r)(k.task.handler))},null,512),[[Q,"Open in Editor"]])])]),x(D,{"h-full":"",n:"primary solid",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"})]),_:1})])]),m("div",ct,[(g(!0),I(H,null,Z(me.value,T=>G((g(),A(D,{key:T.slug,class:z(n.value===T.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:ke=>n.value=T.slug},{default:M(()=>[x(J,{icon:E(ve)[T.slug]},null,8,["icon"]),m("div",ft,[P(N(T.name)+" "+N(T?.length?`(${T.length})`:"")+" ",1),m("span",null,N(E(S)[T.slug]?.length?`(${E(S)[T.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,T.name]])),128))]),x(E(b),null,{default:M(()=>[x(ae,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=T=>f.value=T),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[E(S)[n.value]?.length?(g(),I(H,{key:0},[m("div",pt,[c[6]||(c[6]=m("div",{"w-5":"","x-divider":""},null,-1)),c[7]||(c[7]=m("div",{"flex-none":""}," Default Inputs ",-1)),x(D,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=T=>O("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),x(ae,{modelValue:E(S)[n.value],"onUpdate:modelValue":c[3]||(c[3]=T=>E(S)[n.value]=T),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",dt,[n.value==="body"?(g(),I(H,{key:0},[m("div",vt,[(g(),I(H,null,Z(u,T=>m("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:z({"border-b":T!==i.value}),onClick:ke=>i.value=T},[m("div",{class:z({op30:T!==i.value}),"font-mono":""},N(T),3)],10,ht)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),A(E(p),{key:0})):i.value==="json"?(g(),A(E(He),je({key:1,modelValue:w.value,"onUpdate:modelValue":c[5]||(c[5]=T=>w.value=T),class:[E(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},k.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(E(p),{key:1}))])):j("",!0),a.value?e.value?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>[...c[11]||(c[11]=[P(" Running... ",-1)])]),_:1})):(g(),I(H,{key:3},[m("div",mt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),A(ee,{key:0,n:"red"},{default:M(()=>[...c[12]||(c[12]=[P(" Error ",-1)])]),_:1})):j("",!0),x(ee,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",yt,N(v.contentType),1)):j("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),x(ee,{n:"green"},{default:M(()=>[P(N(v.fetchTime)+" ms ",1)]),_:1})]),x(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:M(()=>[x(D,{n:"primary",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"}),c[10]||(c[10]=P(" Run task ",-1))]),_:1})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},he=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(F){const U=B(!0),L=ne();return(O,w)=>{const S=re,b=he;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:z([{"bg-active":E(L)===O.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${O.index*1.5}em)`}),onClick:w[0]||(w[0]=p=>{U.value=!U.value,L.value=O.item.name})},[m("div",_t,[O.item.type==="collection"?(g(),A(S,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),m("span",bt,[O.item.type==="collection"?(g(),A(S,{key:0,title:`${O.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(S,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+N(O.item.name),1)])],6),w[1]||(w[1]=m("div",{"x-divider":""},null,-1)),U.value?We(O.$slots,"default",{key:0},()=>[(g(!0),I(H,null,Z(O.item.tasks,p=>(g(),A(b,{key:p.name,item:p,index:O.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),kt={flex:"~ gap1","text-sm":""},xt={key:0,op50:""},Ot={op50:""},Vt=K({__name:"server-tasks",setup(F){const U=B(!1),L=$e(),O=R(()=>Object.keys(L.value?.tasks??{}).map(r=>({name:r,...L.value.tasks[r],type:"task"}))),w=R(()=>Object.entries(L.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),S=ne(),{view:b,selectedTask:p,inputDefaults:_}=ue("serverTasks"),o=R(()=>{!S.value&&p.value&&(S.value=p.value.name);const r=O.value.find(n=>n.name===S.value);return S.value!==p.value?.name&&r&&(p.value=r),r}),v=B(""),y=R(()=>new Re(O.value,{keys:["key","description"],shouldSort:!0})),t=R(()=>v.value?y.value.search(v.value).map(n=>n.item):O.value),e=R(()=>{const r=[],n=(i,s)=>{i.tasks||=[],i.tasks.push(s)},u=(i,s)=>{const f=s?s.tasks?.find(h=>h.name===i):r.find(h=>h.name===i);if(f)return{...f,type:"collection"};const l={name:i,handler:i,description:"",type:"collection",tasks:[]};return s?n(s,l):r.push(l),l};return t.value.forEach(i=>{let s;const f={...i,type:"task"},h=i.name.split(":").concat();h.length>0&&h[h.length-1].includes(".")&&h.pop(),h.forEach(d=>{s=u(d,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=le,i=Ne,s=ot,f=Le,l=gt,h=Ue,d=ce,$=de,C=Pe,W=Ye,V=pe("tooltip");return g(),I(H,null,[x(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[x(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[x(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=X=>v.value=X),pb2:""},{actions:M(()=>[G(x(u,{"text-lg":"",icon:E(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(x(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=X=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",kt,[v.value?(g(),I("span",xt,N(t.value.length)+" matched · ",1)):j("",!0),m("span",Ot,N(O.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(H,null,Z(E(b)==="tree"?e.value:t.value,X=>(g(),A(he,{key:X.name,item:X},null,8,["item"]))),128))]),right:M(()=>[n[6]||(n[6]=m("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),m("div",null,[m("ul",null,[(g(!0),I(H,null,Z(w.value,X=>(g(),I("li",{key:X.cron},[x(s,{collection:X},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),A(Fe,{max:10},[o.value?(g(),A(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=X=>U.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),A(d,{key:0},{default:M(()=>[x(h,{px6:"",py2:""},{default:M(()=>[...n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])]),_:1})]),_:1}))]),_:1}),x(W,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=X=>U.value=X),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=X=>U.value=!1)},{default:M(()=>[m("div",null,[n[8]||(n[8]=m("div",{p4:"",border:"b base"},[m("span",{"text-lg":""},"Default Inputs"),m("br"),m("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),x(C,{text:`Query ${E(_).query.length?`(${E(_).query.length})`:""}`,padding:!1,icon:E(ve).query},{default:M(()=>[x($,{modelValue:E(_).query,"onUpdate:modelValue":n[3]||(n[3]=X=>E(_).query=X),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default};
|
|
1
|
+
import{b1 as ne,I as re,g as ue,b2 as xe,a4 as Oe,A as Te,w as we,ay as Se,b3 as Xe,a as Ee,_ as le,b4 as De,v as Ce,M as Me,j as ce,F as Ie,b5 as $e,S as Re,n as Ue,a8 as Le}from"./dv0e79gh.js";import{_ as Ne}from"./nnavbar.vue-cybpsded.js";import{_ as fe}from"./nbadge-la51ie4t.js";import{a as Ae,p as K,k as B,q as R,J as I,$ as g,a0 as m,a1 as j,X as x,a8 as N,F as H,ag as Z,a4 as z,u as E,r as ie,w as Ve,ai as pe,U as A,ac as G,V as M,ab as P,Y as je,av as He,W as We,a2 as Be,K as Fe}from"./vendor/json-editor-vue-nstwj98r.js";import{_ as de}from"./server-route-inputs.vue-g0p9q870.js";import{_ as qe}from"./ncode-block.vue-j1bpwykw.js";import{S as ve}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-ddplx9pl.js";import{_ as Ye}from"./ndrawer.vue-mok9ppy7.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";import"./ncheckbox.vue-no3437wc.js";import"./nselect.vue-la95si0f.js";import"./client-hkqvtzyx.js";import"./nicon-title.vue-mr03t3pg.js";var te={exports:{}},se;function ze(){return se||(se=1,(function(F,U){(function(O,w){F.exports=w()})(globalThis,()=>(()=>{var L={949:((b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),v=(function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a==="@reboot")return e=["@reboot","","","","","",""],e;if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(u){return u.trim()}).filter(function(u){return u!==""}).map(function(u){return isNaN(Number(u))?u:Number(u)}).filter(function(u){return u!==null&&u!==""});r.length===0&&r.push("*"),r.sort(function(u,i){return u!==null&&i!==null?u-i:0}),e[a]=r.map(function(u){return u!==null?u.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(l){var h=l.replace(/\D/,""),d=h;return e.dayOfWeekStartIndexZero?h=="7"&&(d="0"):d=(parseInt(h)-1).toString(),l.replace(h,d)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(l){var h=l.replace(/\D/,""),d=h;return e.monthStartIndexZero&&(d=(parseInt(h)+1).toString()),l.replace(h,d)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var u in n)t[4]=t[4].replace(new RegExp(u,"gi"),n[u].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(l){return l!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var s=null;switch(i){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null;break}if(s!==null){var f=t[i].split("/");t[i]="".concat(f[0],"-").concat(s,"/").concat(f[1])}}},y.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},y.prototype.validateAnyRanges=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.validateOnlyExpectedCharactersFound=function(t,e){var a=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(a&&a.length)throw new Error("Expression contains invalid values: '".concat(a.toString(),"'"))},y})();p.CronParser=v}),333:((b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),v=_(949),y=(function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,u=n===void 0?!0:n,i=r.verbose,s=i===void 0?!1:i,f=r.dayOfWeekStartIndexZero,l=f===void 0?!0:f,h=r.monthStartIndexZero,d=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,W=C===void 0?null:C,V={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:$,locale:W};V.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var X=new t(e,V);return X.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e,a,r="";try{var n=new v.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]==="@reboot")return((a=(e=this.i18n).atReboot)===null||a===void 0?void 0:a.call(e))||"Run once, at startup";var u=this.getTimeOfDayDescription(),i=this.getDayOfMonthDescription(),s=this.getMonthDescription(),f=this.getDayOfWeekDescription(),l=this.getYearDescription();r+=u+i+f+s+l,r=this.transformVerbosity(r,!!this.options.verbose),r=r.charAt(0).toLocaleUpperCase()+r.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)r=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return r},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var u=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,u[0],""),this.formatTime(r,u[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var s=0;s<i.length;s++)n+=" ",n+=this.formatTime(i[s],a,""),s<i.length-2&&(n+=","),s==i.length-2&&(n+=this.i18n.spaceAnd())}else{var f=this.getSecondsDescription(),l=this.getMinutesDescription(),h=this.getHoursDescription();if(n+=f,n&&l&&(n+=", "),n+=l,l===h)return n;n&&h&&(n+=", "),n+=h}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(u){return u},function(u){return o.StringUtilities.format(e.i18n.everyX0Minutes(u),u)},function(u){return e.i18n.minutesX0ThroughX1PastTheHour()},function(u){try{return u=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(u)<20?e.i18n.atX0MinutesPastTheHour(u):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(u)}catch{return e.i18n.atX0MinutesPastTheHour(u)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=0,n=[];a.split("/")[0].split(",").forEach(function(s){var f=s.split("-");f.length===2&&n.push({value:f[1],index:r+1}),r+=f.length});var u=0,i=this.getSegmentDescription(a,this.i18n.everyHour(),function(s){var f=n.find(function(h){return h.value===s&&h.index===u}),l=f&&e.expressionParts[1]!=="0";return u++,l?e.formatTime(s,"59",""):e.formatTime(s,"0","")},function(s){return o.StringUtilities.format(e.i18n.everyX0Hours(s),s)},function(s){return e.i18n.betweenX0AndX1()},function(s){return e.i18n.atX0()});return i},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,u){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var s=parseInt(i),f=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(u)[s]:a[s];if(n.indexOf("#")>-1){var l=null,h=n.substring(n.indexOf("#")+1),d=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(d);break;case"2":l=e.i18n.second(d);break;case"3":l=e.i18n.third(d);break;case"4":l=e.i18n.fourth(d);break;case"5":l=e.i18n.fifth(d);break}f=l+" "+f}return f},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var u=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(u):e.i18n.commaX0ThroughX1(u)},function(n){var u=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),s=n.substring(0,n.indexOf("#"));u=e.i18n.commaOnThe(i,s).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)u=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var f=e.expressionParts[3]!="*";u=f?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return u}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,u){return u&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(u)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var u=parseInt(n[0].replace("W","")),i=u==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),u.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var s=r.match(/L-(\d{1,2})/);if(s){var f=s[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(f),f);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(l){return l=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),l):l},function(l){return l=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(l)},function(l){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(l)},function(l){return e.i18n.commaOnDayX0OfTheMonth(l)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,u,i){var s=null,f=e.indexOf("/")>-1,l=e.indexOf("-")>-1,h=e.indexOf(",")>-1;if(!e)s="";else if(e==="*")s=a;else if(!f&&!l&&!h)s=o.StringUtilities.format(i(e),r(e));else if(h){for(var d=e.split(","),$="",C=0;C<d.length;C++)if(C>0&&d.length>2&&($+=",",C<d.length-1&&($+=" ")),C>0&&d.length>1&&(C==d.length-1||d.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),d[C].indexOf("/")>-1||d[C].indexOf("-")>-1){var W=d[C].indexOf("-")>-1&&d[C].indexOf("/")==-1,V=this.getSegmentDescription(d[C],a,r,n,W?this.i18n.commaX0ThroughX1:u,i);W&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(d[C],a,r,n,u,i):$+=r(d[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var d=e.split("/");if(s=o.StringUtilities.format(n(d[1]),d[1]),d[0].indexOf("-")>-1){var X=this.generateRangeSegmentDescription(d[0],u,r);X.indexOf(", ")!=0&&(s+=", "),s+=X}else if(d[0].indexOf("*")==-1){var Y=o.StringUtilities.format(i(d[0]),r(d[0]));Y=Y.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),Y)}}else l&&(s=this.generateRangeSegmentDescription(e,u,r));return s},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",u=e.split("-"),i=r(u[0],1),s=r(u[1],2),f=a(e);return n+=o.StringUtilities.format(f,i,s),n},t.prototype.formatTime=function(e,a,r){var n=0,u=0,i=parseInt(e)+n,s=parseInt(a)+u;s>=60?(s-=60,i+=1):s<0&&(s+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var f="",l=!1;this.options.use24HourTimeFormat||(l=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),f=l?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var h="";return r&&(h=":".concat(("00"+r).substring(r.length))),"".concat(l?f:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+s.toString()).substring(s.toString().length)).concat(h).concat(l?"":f)},t.prototype.transformVerbosity=function(e,a){if(!a&&(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var r=0,n=Object.entries(this.i18n.conciseVerbosityReplacements());r<n.length;r++){var u=n[r],i=u[0],s=u[1];e=e.replace(new RegExp(i,"g"),s)}return e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t})();p.ExpressionDescriptor=y}),747:((b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=_(486),v=(function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y})();p.enLocaleLoader=v}),486:((b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=(function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o.prototype.atReboot=function(){return"Run once, at startup"},o})();p.en=_}),515:((b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(v,y){if(!v)throw new Error(y)}var o=(function(){function v(){}return v.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},v.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},v.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},v.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},v.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},v.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},v})();p.default=o}),823:((b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=(function(){function o(){}return o.format=function(v){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return v.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(v,y){return y.some(function(t){return v.indexOf(t)>-1})},o})();p.StringUtilities=_})},O={};function w(b){var p=O[b];if(p!==void 0)return p.exports;var _=O[b]={exports:{}};return L[b](_,_.exports,w),_.exports}var S={};return(()=>{var b=S;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=w(333),_=w(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),S})())})(te)),te.exports}var Ge=ze();const Ze=Ae(Ge),Je=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(F){const U=F,L=ne(),O=B(!0),w=R(()=>Ze.toString(U.collection.cron));return(S,b)=>{const p=re,_=fe;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",p2:"","hover-bg-active":"",title:w.value,onClick:b[0]||(b[0]=o=>O.value=!O.value)},[m("div",Qe,[x(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":O.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[x(_,{class:"font-mono n-primary",textContent:N(S.collection.cron)},null,8,["textContent"]),m("span",et,N(w.value),1),m("span",tt,"("+N(S.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),O.value?(g(),I("ul",nt,[(g(!0),I(H,null,Z(S.collection.tasks,o=>(g(),I("li",{key:o},[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","pl-9":"","font-mono":"","hover-bg-active":"",class:z([{"bg-active":E(L)===o}]),onClick:v=>L.value=o},N(o),11,rt),b[1]||(b[1]=m("div",{"x-divider":""},null,-1))]))),128))])):j("",!0)])}}}),at={"h-full":"","w-full":"",flex:"~ col"},it={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},st={flex:"~ gap2 items-center"},ut={relative:"","w-full":""},lt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ct={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ft={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},dt={key:0,border:"b base",relative:"","n-code-block":""},vt={flex:"~ wrap","w-full":""},ht=["onClick"],mt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},yt={key:1,"text-xs":"",op50:""},gt=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(F,{emit:U}){const L=F,O=U,w=B({payload:{}}),{inputDefaults:S}=ue("serverRoutes"),[b,p]=xe(),_=Oe(),o=Te(),v=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>JSON.stringify(v.data,null,2)),t=R(()=>v.contentType.includes("application/json")?"json":"text"),e=B(!1),a=B(!1),r=we(),n=B(),u=["json"],i=B(u[0]),s=ie({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=R({get:()=>s[n.value],set:k=>{s[n.value]=k}}),l=R(()=>({...X(S.value.query),...X(s.query)})),h=R(()=>({...X(S.value.headers)})),d=R(()=>Object.keys(w.value?.payload??{}).length?{...w.value}:void 0),$=R(()=>d.value?"POST":"GET"),C=R(()=>{let k=window?.location.origin;return k.charAt(k.length-1)==="/"&&(k=k.slice(0,-1)),k}),W=R(()=>{let k=new URLSearchParams(l.value).toString();k&&(k=`?${k}`);const c=`/_nitro/tasks/${L.task.name}${k}`;let D=o.value?.app.baseURL||"";return(D==="./"||D===".")&&(D=""),D.endsWith("/")&&(D=D.slice(0,-1)),D+c}),V=R(()=>C.value+W.value);function X(k){const c=Object.fromEntries(k.filter(({active:D,key:q,value:J})=>D&&q&&J!==void 0).map(({key:D,value:q})=>[D,q]));return Object.entries(c).length?c:void 0}async function Y(){a.value=!0,e.value=!0;const k=Date.now();Me("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:d.value,onResponse({response:c}){v.contentType=(c.headers.get("content-type")||"").toString().toLowerCase().trim(),v.statusCode=c.status,v.error=void 0},onResponseError(c){v.error=c.response._data,v.data=c.response._data}})}catch{}e.value=!1,v.fetchTime=Date.now()-k}const me=R(()=>{const k=[];return k.push({name:"Query",slug:"query",length:s.query.length}),k.push({name:"Body",slug:"body",length:s.body.length}),k});Ve(()=>{if(i.value==="json"&&typeof w.value=="string")try{w.value=JSON.parse(w.value)}catch{}});const oe=Se("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const k=oe.value?.find(c=>c.task===L.task.name);if(k){n.value||(n.value=k.tab),k.tab!==n.value&&(k.tab=n.value);const{body:c,query:D,headers:q}=k.inputs;Object.assign(s,{body:c,query:D,headers:q})}else{const c={task:L.task.name,tab:"query",inputs:s};oe.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(k,c)=>{const D=le,q=Ce,J=re,ae=de,ge=ce,_e=Ie,ee=fe,be=qe,Q=pe("tooltip");return g(),I("div",at,[m("div",it,[m("div",st,[G((g(),I("div",null,[x(D,{class:z(["n-badge-base n-sm",E(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[P(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",ut,[x(q,{"model-value":W.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",lt,[G(x(D,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=T=>E(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(x(D,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=T=>E(r)(k.task.handler))},null,512),[[Q,"Open in Editor"]])])]),x(D,{"h-full":"",n:"primary solid",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"})]),_:1})])]),m("div",ct,[(g(!0),I(H,null,Z(me.value,T=>G((g(),A(D,{key:T.slug,class:z(n.value===T.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:ke=>n.value=T.slug},{default:M(()=>[x(J,{icon:E(ve)[T.slug]},null,8,["icon"]),m("div",ft,[P(N(T.name)+" "+N(T?.length?`(${T.length})`:"")+" ",1),m("span",null,N(E(S)[T.slug]?.length?`(${E(S)[T.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,T.name]])),128))]),x(E(b),null,{default:M(()=>[x(ae,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=T=>f.value=T),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[E(S)[n.value]?.length?(g(),I(H,{key:0},[m("div",pt,[c[6]||(c[6]=m("div",{"w-5":"","x-divider":""},null,-1)),c[7]||(c[7]=m("div",{"flex-none":""}," Default Inputs ",-1)),x(D,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=T=>O("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),x(ae,{modelValue:E(S)[n.value],"onUpdate:modelValue":c[3]||(c[3]=T=>E(S)[n.value]=T),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",dt,[n.value==="body"?(g(),I(H,{key:0},[m("div",vt,[(g(),I(H,null,Z(u,T=>m("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:z({"border-b":T!==i.value}),onClick:ke=>i.value=T},[m("div",{class:z({op30:T!==i.value}),"font-mono":""},N(T),3)],10,ht)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),A(E(p),{key:0})):i.value==="json"?(g(),A(E(He),je({key:1,modelValue:w.value,"onUpdate:modelValue":c[5]||(c[5]=T=>w.value=T),class:[E(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},k.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(E(p),{key:1}))])):j("",!0),a.value?e.value?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>[...c[11]||(c[11]=[P(" Running... ",-1)])]),_:1})):(g(),I(H,{key:3},[m("div",mt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),A(ee,{key:0,n:"red"},{default:M(()=>[...c[12]||(c[12]=[P(" Error ",-1)])]),_:1})):j("",!0),x(ee,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",yt,N(v.contentType),1)):j("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),x(ee,{n:"green"},{default:M(()=>[P(N(v.fetchTime)+" ms ",1)]),_:1})]),x(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:M(()=>[x(D,{n:"primary",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"}),c[10]||(c[10]=P(" Run task ",-1))]),_:1})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},he=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(F){const U=B(!0),L=ne();return(O,w)=>{const S=re,b=he;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:z([{"bg-active":E(L)===O.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${O.index*1.5}em)`}),onClick:w[0]||(w[0]=p=>{U.value=!U.value,L.value=O.item.name})},[m("div",_t,[O.item.type==="collection"?(g(),A(S,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),m("span",bt,[O.item.type==="collection"?(g(),A(S,{key:0,title:`${O.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(S,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+N(O.item.name),1)])],6),w[1]||(w[1]=m("div",{"x-divider":""},null,-1)),U.value?We(O.$slots,"default",{key:0},()=>[(g(!0),I(H,null,Z(O.item.tasks,p=>(g(),A(b,{key:p.name,item:p,index:O.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),kt={flex:"~ gap1","text-sm":""},xt={key:0,op50:""},Ot={op50:""},Vt=K({__name:"server-tasks",setup(F){const U=B(!1),L=$e(),O=R(()=>Object.keys(L.value?.tasks??{}).map(r=>({name:r,...L.value.tasks[r],type:"task"}))),w=R(()=>Object.entries(L.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),S=ne(),{view:b,selectedTask:p,inputDefaults:_}=ue("serverTasks"),o=R(()=>{!S.value&&p.value&&(S.value=p.value.name);const r=O.value.find(n=>n.name===S.value);return S.value!==p.value?.name&&r&&(p.value=r),r}),v=B(""),y=R(()=>new Re(O.value,{keys:["key","description"],shouldSort:!0})),t=R(()=>v.value?y.value.search(v.value).map(n=>n.item):O.value),e=R(()=>{const r=[],n=(i,s)=>{i.tasks||=[],i.tasks.push(s)},u=(i,s)=>{const f=s?s.tasks?.find(h=>h.name===i):r.find(h=>h.name===i);if(f)return{...f,type:"collection"};const l={name:i,handler:i,description:"",type:"collection",tasks:[]};return s?n(s,l):r.push(l),l};return t.value.forEach(i=>{let s;const f={...i,type:"task"},h=i.name.split(":").concat();h.length>0&&h[h.length-1].includes(".")&&h.pop(),h.forEach(d=>{s=u(d,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=le,i=Ne,s=ot,f=Le,l=gt,h=Ue,d=ce,$=de,C=Pe,W=Ye,V=pe("tooltip");return g(),I(H,null,[x(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[x(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[x(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=X=>v.value=X),pb2:""},{actions:M(()=>[G(x(u,{"text-lg":"",icon:E(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(x(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=X=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",kt,[v.value?(g(),I("span",xt,N(t.value.length)+" matched · ",1)):j("",!0),m("span",Ot,N(O.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(H,null,Z(E(b)==="tree"?e.value:t.value,X=>(g(),A(he,{key:X.name,item:X},null,8,["item"]))),128))]),right:M(()=>[n[6]||(n[6]=m("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),m("div",null,[m("ul",null,[(g(!0),I(H,null,Z(w.value,X=>(g(),I("li",{key:X.cron},[x(s,{collection:X},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),A(Fe,{max:10},[o.value?(g(),A(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=X=>U.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),A(d,{key:0},{default:M(()=>[x(h,{px6:"",py2:""},{default:M(()=>[...n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])]),_:1})]),_:1}))]),_:1}),x(W,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=X=>U.value=X),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=X=>U.value=!1)},{default:M(()=>[m("div",null,[n[8]||(n[8]=m("div",{p4:"",border:"b base"},[m("span",{"text-lg":""},"Default Inputs"),m("br"),m("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),x(C,{text:`Query ${E(_).query.length?`(${E(_).query.length})`:""}`,padding:!1,icon:E(ve).query},{default:M(()=>[x($,{modelValue:E(_).query,"onUpdate:modelValue":n[3]||(n[3]=X=>E(_).query=X),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as h}from"./nicon-title.vue-mr03t3pg.js";import{_ as ee}from"./nswitch.vue-ihk2zmam.js";import{g as j,f as le,k as oe,l as ne,m as te,_ as ae,n as se,t as A,r as ie,o as ue}from"./
|
|
1
|
+
import{_ as h}from"./nicon-title.vue-mr03t3pg.js";import{_ as ee}from"./nswitch.vue-ihk2zmam.js";import{g as j,f as le,k as oe,l as ne,m as te,_ as ae,n as se,t as A,r as ie,o as ue}from"./dv0e79gh.js";import{_ as de}from"./nselect.vue-la95si0f.js";import{_ as re}from"./ncheckbox.vue-no3437wc.js";import{_ as pe}from"./nlink.vue-ehelr39g.js";import{p as me,w as P,J as m,$ as d,X as n,a0 as o,F as v,ag as k,u as t,V as a,ab as N,a8 as x,j as p,U as F,a1 as M,a4 as R}from"./vendor/json-editor-vue-nstwj98r.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-klvjhln7.js";const fe={px8:"",py6:""},ve={grid:"~ lg:cols-2 gap-x-10 gap-y-3","max-w-300":""},ge={flex:"~ col gap-2"},be={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},xe={capitalize:"",op75:""},ye={"flex-auto":"","overflow-hidden":"","text-ellipsis":"","ws-nowrap":""},ce={flex:"~ col gap-2"},Ve=["value"],_e=["value"],ke=["value"],Ce={flex:"~ gap-2"},we={flex:"~ gap-2"},Be=me({__name:"settings",setup(Se){const{interactionCloseOnOutsideClick:C,showPanel:I,showHelpButtons:$,scale:z,hiddenTabs:y,pinnedTabs:u,hiddenTabCategories:c,minimizePanelInactive:w,sidebarExpanded:S,sidebarScrollable:D}=j("ui"),{openInEditor:E}=j("behavior"),V=le(),W=[["Auto",void 0],["VS Code","vscode"],["VS Code Insider","vscode-insider"],["Cursor","cursor"],["Zed","zed"],["WebStorm","webstorm"],["Sublime Text","sublime"],["Atom","atom"],["Windsurf","windsurf"]],H=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],J=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],X=oe(ne());function Z(s,e){e?y.value=y.value.filter(r=>r!==s):y.value.push(s)}function q(s,e){e?c.value=c.value.filter(r=>r!==s):c.value.push(s)}function G(s){u.value.includes(s)?u.value=u.value.filter(e=>e!==s):u.value.push(s)}function L(s,e){const r=u.value.indexOf(s);if(r===-1)return;const g=r+e;if(g<0||g>=u.value.length)return;const _=[...u.value];_.splice(r,1),_.splice(g,0,s),u.value=_}async function K(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await ie.clearOptions(),V.value?.app?.reload?.(),window.location.reload())}return P(()=>{V.value&&(V.value.app.frameState.value.closeOnOutsideClick=C.value)}),P(()=>{V.value&&(V.value.app.frameState.value.minimizePanelInactive=w.value)}),(s,e)=>{const r=h,g=ee,_=ue,f=ae,T=se,Q=te,B=de,b=re,Y=pe;return d(),m("div",fe,[n(r,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),o("div",ve,[o("div",ge,[e[10]||(e[10]=o("h3",{"text-lg":""}," Tabs ",-1)),(d(!0),m(v,null,k(t(X),([l,O])=>(d(),m(v,{key:l},[O.length?(d(),F(T,{key:0,p3:"",flex:"~ col gap-1",class:R(t(c).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(g,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(c).includes(l),"onUpdate:modelValue":i=>q(l,i)},{default:a(()=>[o("div",be,[o("span",xe,x(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e[9]||(e[9]=o("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),(d(!0),m(v,null,k(O,i=>(d(),F(g,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(y).includes(i.name),"onUpdate:modelValue":U=>Z(i.name,U)},{default:a(()=>[o("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","of-hidden":"","pr-4":"",class:R(t(y).includes(i.name)?"op25":"")},[n(_,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),o("span",ye,x(i.title),1),t(u).includes(i.name)?(d(),m(v,{key:0},[n(f,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:U=>L(i.name,-1)},null,8,["disabled","onClick"]),n(f,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:U=>L(i.name,1)},null,8,["disabled","onClick"])],64)):M("",!0),n(f,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:U=>G(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):M("",!0)],64))),128))]),o("div",ce,[e[29]||(e[29]=o("h3",{"text-lg":""}," Appearance ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[o("div",null,[n(Q,null,{default:a(({toggle:l,isDark:O})=>[n(f,{n:"primary",onClick:l},{default:a(()=>[e[11]||(e[11]=o("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1)),N(" "+x(O.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),e[14]||(e[14]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[15]||(e[15]=o("p",null,"UI Scale",-1)),n(B,{modelValue:t(z),"onUpdate:modelValue":e[0]||(e[0]=l=>p(z)?z.value=l:null),n:"primary"},{default:a(()=>[(d(),m(v,null,k(H,l=>o("option",{key:l[0],value:l[1]},x(l[0]),9,Ve)),64))]),_:1},8,["modelValue"]),e[16]||(e[16]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),n(b,{modelValue:t(S),"onUpdate:modelValue":e[1]||(e[1]=l=>p(S)?S.value=l:null),"n-primary":""},{default:a(()=>[...e[12]||(e[12]=[o("span",null," Expand Sidebar ",-1)])]),_:1},8,["modelValue"]),n(b,{modelValue:t(D),"onUpdate:modelValue":e[2]||(e[2]=l=>p(D)?D.value=l:null),disabled:t(S),"n-primary":""},{default:a(()=>[...e[13]||(e[13]=[o("span",null," Scrollable Sidebar ",-1)])]),_:1},8,["modelValue","disabled"])]),_:1}),e[30]||(e[30]=o("h3",{mt2:"","text-lg":""}," Features ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(b,{modelValue:t(C),"onUpdate:modelValue":e[3]||(e[3]=l=>p(C)?C.value=l:null),"n-primary":""},{default:a(()=>[...e[17]||(e[17]=[o("span",null,"Close DevTools when clicking outside",-1)])]),_:1},8,["modelValue"]),n(b,{modelValue:t($),"onUpdate:modelValue":e[4]||(e[4]=l=>p($)?$.value=l:null),"n-primary":""},{default:a(()=>[...e[18]||(e[18]=[o("span",null,"Show help buttons",-1)])]),_:1},8,["modelValue"]),n(b,{modelValue:t(I),"onUpdate:modelValue":e[5]||(e[5]=l=>p(I)?I.value=l:null),"n-primary":""},{default:a(()=>[...e[19]||(e[19]=[o("span",null,"Show the floating panel",-1)])]),_:1},8,["modelValue"]),e[20]||(e[20]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[21]||(e[21]=o("p",null,"Minimize floating panel on inactive",-1)),n(B,{modelValue:t(w),"onUpdate:modelValue":e[6]||(e[6]=l=>p(w)?w.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(d(),m(v,null,k(J,l=>o("option",{key:l[0],value:l[1]},x(l[0]),9,_e)),64))]),_:1},8,["modelValue"]),e[22]||(e[22]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[23]||(e[23]=o("p",null,"Open In Editor",-1)),n(B,{modelValue:t(E),"onUpdate:modelValue":e[7]||(e[7]=l=>p(E)?E.value=l:null),"n-primary":""},{default:a(()=>[(d(),m(v,null,k(W,l=>o("option",{key:l[0],value:l[1]},x(l[0]),9,ke)),64))]),_:1},8,["modelValue"])]),_:1}),e[31]||(e[31]=o("h3",{mt2:"","text-lg":""}," Feedback ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(b,{modelValue:t(A),"onUpdate:modelValue":e[8]||(e[8]=l=>p(A)?A.value=l:null),"n-primary":""},{default:a(()=>[e[24]||(e[24]=o("span",null,"Send anonymous statistics, help us improving DevTools",-1)),n(Y,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),e[27]||(e[27]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),o("div",Ce,[n(f,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[...e[25]||(e[25]=[o("div",{"i-carbon-data-enrichment":""},null,-1),N(" Ideas & Suggestions ",-1)])]),_:1}),n(f,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[...e[26]||(e[26]=[o("div",{"i-carbon-debug":""},null,-1),N(" Bug Reports ",-1)])]),_:1})])]),_:1}),e[32]||(e[32]=o("h3",{mt2:"","text-lg":""}," Debug ",-1)),o("div",we,[n(f,{n:"orange",onClick:K},{default:a(()=>[...e[28]||(e[28]=[o("div",{"i-carbon-breaking-change":""},null,-1),N(" Reset Local Settings & State ",-1)])]),_:1})])])])])}}});export{Be as default};
|