@nuxt/devtools-nightly 2.6.5-29358579.0c258d4 → 3.0.0-29360567.be134cc
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 +4 -2
- package/dist/chunks/vite-inspect.mjs +3 -3
- package/dist/client/200.html +1 -30
- package/dist/client/404.html +1 -30
- package/dist/client/_nuxt/__blank-dhzpxa9h.js +1 -0
- package/dist/client/_nuxt/analyze-build-dxfrwjs2.js +1 -0
- package/dist/client/_nuxt/assets-ggrpdfgg.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/7b8688e5-a8b0-4f4b-a4da-ee76509e0e4d.json +1 -0
- package/dist/client/_nuxt/{client-kvgyopwa.js → client-miiq4qin.js} +1 -1
- package/dist/client/_nuxt/code-diff-ojhnq7lb.js +8 -0
- package/dist/client/_nuxt/code-snippets-io8vjgte.js +1 -0
- package/dist/client/_nuxt/components-o5ga7xgg.js +1 -0
- package/dist/client/_nuxt/composable-item-de2qbj5y.js +1 -0
- package/dist/client/_nuxt/custom-_name_-dycuaull.js +1 -0
- package/dist/client/_nuxt/data-schema-button-hqryewml.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-dkuw2njq.js +2 -0
- package/dist/client/_nuxt/debug-g72jf8td.js +1 -0
- package/dist/client/_nuxt/default-e5vbprq7.js +1 -0
- package/dist/client/_nuxt/duration-display-cjpkh71u.js +1 -0
- package/dist/client/_nuxt/entry.css-ffhdx367.css +1 -0
- package/dist/client/_nuxt/error-404-cdbiyik3.js +1 -0
- package/dist/client/_nuxt/error-404.css-da6qbpbu.css +1 -0
- package/dist/client/_nuxt/error-500-gpbyyx4i.js +1 -0
- package/dist/client/_nuxt/error-500.css-npck1tpq.css +1 -0
- package/dist/client/_nuxt/{error-kkczr13h.js → error-nlyf8sfu.js} +4 -4
- package/dist/client/_nuxt/filepath-item-owlv864w.js +1 -0
- package/dist/client/_nuxt/full-nc4uegnc.js +1 -0
- package/dist/client/_nuxt/help-fab-chg6ox1v.js +1 -0
- package/dist/client/_nuxt/hooks-bdni1pna.js +1 -0
- package/dist/client/_nuxt/imports-g9gkj6h5.js +1 -0
- package/dist/client/_nuxt/index-ixoyuhyc.js +1 -0
- package/dist/client/_nuxt/launch-page-l87i7ewv.js +1 -0
- package/dist/client/_nuxt/modules-b2uph06z.js +1 -0
- package/dist/client/_nuxt/n7jogww6.js +19 -0
- package/dist/client/_nuxt/nbadge-d24jlq2b.js +1 -0
- package/dist/client/_nuxt/ncheckbox-eijyrwcq.js +1 -0
- package/dist/client/_nuxt/ncode-block-pcw3yh3u.js +2 -0
- package/dist/client/_nuxt/ndrawer-ele5003c.js +1 -0
- package/dist/client/_nuxt/ndropdown-jcnxkt1n.js +1 -0
- package/dist/client/_nuxt/nicon-title-he6hzgyb.js +1 -0
- package/dist/client/_nuxt/nlink-fgjzhevk.js +1 -0
- package/dist/client/_nuxt/nmarkdown-n6zsr15e.js +1 -0
- package/dist/client/_nuxt/nnavbar-b4ap0r8w.js +1 -0
- package/dist/client/_nuxt/none-nn1bv7wk.js +1 -0
- package/dist/client/_nuxt/nsection-block-je23gs2w.js +1 -0
- package/dist/client/_nuxt/nsection-block.css-h05mpq8x.css +1 -0
- package/dist/client/_nuxt/nselect-nvb1idpm.js +1 -0
- package/dist/client/_nuxt/nselect-tabs-fwdas30r.js +1 -0
- package/dist/client/_nuxt/nswitch-ls95gzk4.js +1 -0
- package/dist/client/_nuxt/open-graph-ff3jeu6c.js +3 -0
- package/dist/client/_nuxt/overview-lig3s1bz.js +1 -0
- package/dist/client/_nuxt/pages-dmr2asyt.js +1 -0
- package/dist/client/_nuxt/payload-bdkpw143.js +1 -0
- package/dist/client/_nuxt/pinia-kd8wf1a6.js +1 -0
- package/dist/client/_nuxt/plugins-lq44vshs.js +1 -0
- package/dist/client/_nuxt/render-tree-fm7ron5d.js +1 -0
- package/dist/client/_nuxt/runtime-configs-ji0gzv5w.js +1 -0
- package/dist/client/_nuxt/{server-discovery-c0ik8ywv.js → server-discovery-ghan5iuq.js} +1 -1
- package/dist/client/_nuxt/server-route-inputs-e42a8bs5.js +1 -0
- package/dist/client/_nuxt/server-routes-ghxfugia.js +9 -0
- package/dist/client/_nuxt/server-tasks-bacl8zn2.js +1 -0
- package/dist/client/_nuxt/settings-cmn00bsb.js +1 -0
- package/dist/client/_nuxt/stacktrace-list-gp6s7nwa.js +1 -0
- package/dist/client/_nuxt/{state-components-i9ev6w42.js → state-components-8k7sf46m.js} +1 -1
- package/dist/client/_nuxt/state-editor-kisl1jyp.js +1 -0
- package/dist/client/_nuxt/state-modules-lzveckmy.js +1 -0
- package/dist/client/_nuxt/storage-ka8b5ieb.js +1 -0
- package/dist/client/_nuxt/terminals-ovo18kh9.js +1 -0
- package/dist/client/_nuxt/timeline-jy8c0bow.js +31 -0
- package/dist/client/_nuxt/{unocss-runtime-kbniizgc.js → unocss-runtime-e55sflvu.js} +1 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-ikjc812x.js +3902 -0
- package/dist/client/_nuxt/vendor/json-editor-vue.css-f8ezrn37.css +1 -0
- package/dist/client/_nuxt/vendor/{quicktype-core-jxekulwx.js → quicktype-core-i0qughny.js} +47 -47
- package/dist/client/_nuxt/vendor/{shiki-jxvjmls6.js → shiki-hpfujfi3.js} +1 -1
- package/dist/client/_nuxt/vendor/{unocss-la8bop5t.js → unocss-m9bn8yci.js} +3 -3
- package/dist/client/_nuxt/vendor/unocss.css-c5u30s53.css +1 -0
- package/dist/client/_nuxt/vendor/xterm.css-g1ekxkss.css +1 -0
- package/dist/client/_nuxt/virtual-files-csbkjodi.js +1 -0
- package/dist/client/_nuxt/vue-devtools-hb1vi95m.js +2 -0
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-oaume2n6.js → vue-virtual-scroller.esm-b0ym3ct8.js} +2 -2
- package/dist/client/discovery/index.html +1 -1
- package/dist/client/index.html +1 -30
- package/dist/module.json +1 -1
- package/dist/runtime/shared/hooks.js +7 -5
- package/dist/webcomponents/index.mjs +612 -586
- package/package.json +39 -39
- package/dist/client/_nuxt/__blank-oybwb9u0.js +0 -1
- package/dist/client/_nuxt/analyze-build-g8sjrv2z.js +0 -1
- package/dist/client/_nuxt/assets-d64fukbn.js +0 -16
- package/dist/client/_nuxt/builds/meta/6d949717-4f72-4b8f-ab4a-43add5c28ea2.json +0 -1
- package/dist/client/_nuxt/code-diff.vue-bq8bth0l.js +0 -8
- package/dist/client/_nuxt/code-snippets.vue-i2momvvn.js +0 -1
- package/dist/client/_nuxt/components-m69qhybz.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-bd0qe28q.js +0 -1
- package/dist/client/_nuxt/custom-_name_-d8xr5ols.js +0 -1
- package/dist/client/_nuxt/data-schema-button.vue-hwc5uuo4.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-m0642ay4.js +0 -2
- package/dist/client/_nuxt/debug-muc6hlrw.js +0 -1
- package/dist/client/_nuxt/default-c2nspeqr.js +0 -1
- package/dist/client/_nuxt/duration-display.vue-juecltgn.js +0 -1
- package/dist/client/_nuxt/entry.css-bgro2w4m.css +0 -1
- package/dist/client/_nuxt/error-404-bfza8pjy.js +0 -1
- package/dist/client/_nuxt/error-404.css-nxlugf5l.css +0 -1
- package/dist/client/_nuxt/error-500-gvq1ofsq.js +0 -1
- package/dist/client/_nuxt/error-500.css-bcokcrit.css +0 -1
- package/dist/client/_nuxt/filepath-item.vue-e693vfym.js +0 -1
- package/dist/client/_nuxt/full-g973cipt.js +0 -1
- package/dist/client/_nuxt/help-fab.vue-le7iybnb.js +0 -1
- package/dist/client/_nuxt/hooks-j17719nd.js +0 -1
- package/dist/client/_nuxt/imports-i9odkp1s.js +0 -1
- package/dist/client/_nuxt/index-ebrbbgwp.js +0 -1
- package/dist/client/_nuxt/launch-page.vue-mubr1qiq.js +0 -1
- package/dist/client/_nuxt/m8cyoooy.js +0 -15
- package/dist/client/_nuxt/modules-m73nzwro.js +0 -1
- package/dist/client/_nuxt/nbadge-hbh0pw7g.js +0 -1
- package/dist/client/_nuxt/ncheckbox.vue-cowm3nmm.js +0 -1
- package/dist/client/_nuxt/ncode-block.vue-nph7f5ph.js +0 -2
- package/dist/client/_nuxt/ndrawer.vue-bscihm5p.js +0 -1
- package/dist/client/_nuxt/ndropdown.vue-mt2skirs.js +0 -1
- package/dist/client/_nuxt/nicon-title.vue-l5va2e26.js +0 -1
- package/dist/client/_nuxt/nlink.vue-gjku6j2r.js +0 -1
- package/dist/client/_nuxt/nmarkdown.vue-ho3nn7tc.js +0 -1
- package/dist/client/_nuxt/nnavbar.vue-fe2vbqhk.js +0 -1
- package/dist/client/_nuxt/none-kod0wjii.js +0 -1
- package/dist/client/_nuxt/nsection-block-b1meb1ma.js +0 -1
- package/dist/client/_nuxt/nsection-block.css-h1lgpwgm.css +0 -1
- package/dist/client/_nuxt/nselect-tabs.vue-hb4dua1x.js +0 -1
- package/dist/client/_nuxt/nselect.vue-j457efs9.js +0 -1
- package/dist/client/_nuxt/nswitch.vue-m7rzt1v6.js +0 -1
- package/dist/client/_nuxt/open-graph-pe9i8d76.js +0 -3
- package/dist/client/_nuxt/overview-e9eewad2.js +0 -1
- package/dist/client/_nuxt/pages-lcwqvn9k.js +0 -1
- package/dist/client/_nuxt/payload-g490ej9a.js +0 -1
- package/dist/client/_nuxt/pinia-c8puw8i8.js +0 -1
- package/dist/client/_nuxt/plugins-nv3v13im.js +0 -1
- package/dist/client/_nuxt/render-tree-2ewluw8m.js +0 -1
- package/dist/client/_nuxt/runtime-configs-k8otipyv.js +0 -1
- package/dist/client/_nuxt/server-route-inputs.vue-m4ax1l4d.js +0 -1
- package/dist/client/_nuxt/server-routes-il1kr8mz.js +0 -9
- package/dist/client/_nuxt/server-tasks-oyf96fso.js +0 -1
- package/dist/client/_nuxt/settings-ll0xqgui.js +0 -1
- package/dist/client/_nuxt/stacktrace-list.vue-nfhbrir6.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-byiz4hoi.js +0 -1
- package/dist/client/_nuxt/state-modules-c2rs6wdq.js +0 -1
- package/dist/client/_nuxt/storage-c3flod4b.js +0 -1
- package/dist/client/_nuxt/terminals-et318vjt.js +0 -1
- package/dist/client/_nuxt/timeline-f40bnngi.js +0 -31
- package/dist/client/_nuxt/vendor/json-editor-vue-gd4lkf0o.js +0 -3902
- package/dist/client/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css +0 -1
- package/dist/client/_nuxt/vendor/unocss.css-mhvipxpl.css +0 -1
- package/dist/client/_nuxt/vendor/xterm.css-egmhki83.css +0 -32
- package/dist/client/_nuxt/virtual-files-dqv301q7.js +0 -1
- package/dist/client/_nuxt/vue-devtools-m76pi1vn.js +0 -2
- /package/dist/client/_nuxt/vendor/{xterm-elw8536o.js → xterm-nmc0lagr.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as n}from"#entry";import{J as s,Y as o,a0 as t}from"./vendor/json-editor-vue-ikjc812x.js";const a={},_={class:"n-badge"};function c(e,r){return o(),s("span",_,[t(e.$slots,"default")])}const f=Object.assign(n(a,[["render",c]]),{__name:"NBadge"});export{f as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as i,I as r}from"#entry";import{p,J as b,Y as u,ad as m,a3 as a,at as h,u as n,a6 as k,j as _,a1 as f,a0 as x,a7 as v}from"./vendor/json-editor-vue-ikjc812x.js";const V=["checked","disabled"],y=["disabled"],B={class:"n-checkbox-box n-transition n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base"},C=p({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(o,{emit:c}){const e=i(o,"modelValue",c,{passive:!0});return(l,s)=>{const d=r;return u(),b("label",{class:"n-checkbox select-none items-center hover:n-checkbox-hover n-disabled:n-disabled",checked:n(e)||null,disabled:o.disabled||null},[m(a("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>_(e)?e.value=t:null),type:"checkbox",class:"peer absolute op0",disabled:o.disabled,onKeypress:s[1]||(s[1]=k(t=>e.value=!n(e),["enter"]))},null,40,y),[[h,n(e)]]),a("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),a("span",{class:v([n(e)?"":"op50","n-transition"])},[x(l.$slots,"default")],2)],8,V)}}}),K=Object.assign(C,{__name:"NCheckbox"});export{K as _};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as g}from"./client-miiq4qin.js";import{p as k,q as c,z as _,J as o,Y as t,a7 as i,a3 as s,F as u,ah as x,ab as v}from"./vendor/json-editor-vue-ikjc812x.js";const B=["innerHTML"],y=["textContent"],b=k({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},inline:{type:Boolean},grammarContextCode:{},transformRendered:{}},emits:["loaded"],setup(a,{emit:p}){const e=a,m=p,l=c(()=>{const n=e.lang==="text"?{code:e.code,supported:!1}:g.value?.devtools.renderCodeHighlight(e.code,e.lang,{grammarContextCode:e.grammarContextCode})||{code:e.code,supported:!1};return n.supported&&e.transformRendered&&(n.code=e.transformRendered(n.code)),n.supported&&_(()=>m("loaded")),n}),r=c(()=>["n-code-block shiki",e.lines&&!e.inline?"n-code-block-lines":""]);return(n,d)=>a.lang&&l.value.supported?(t(),o("pre",{key:0,class:i(r.value)},[s("code",{innerHTML:l.value.code},null,8,B)],2)):(t(),o("pre",{key:1,class:i(r.value)},[s("code",null,[(t(!0),o(u,null,x(a.code.split(`
|
|
2
|
+
`),(C,f)=>(t(),o(u,{key:f},[s("span",{class:"line",textContent:v(C)},null,8,y),d[0]||(d[0]=s("br",null,null,-1))],64))),128))])],2))}}),H=Object.assign(b,{__name:"NCodeBlock"});export{H as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bk as l,a2 as g,_ as h}from"#entry";import{p as y,k as x,X as p,Y as i,$ as v,J as k,a4 as B,a2 as c,u as a,a1 as C,a3 as $,a0 as w,H as N}from"./vendor/json-editor-vue-ikjc812x.js";const V=["border"],_={relative:"","h-full":"","w-full":"","of-auto":""},z=y({__name:"NDrawer",props:{modelValue:{type:Boolean},top:{},left:{},autoClose:{type:Boolean},transition:{default:"right"}},emits:["close"],setup(t,{emit:m}){const e=t,f=m,s=x(),{height:u}=l(()=>e.top,void 0,{box:"border-box"}),n=typeof e.left=="string"&&e.left.startsWith("#")?document.querySelector(e.left)?.getBoundingClientRect().width:l(()=>e.left,void 0,{box:"border-box"}).width;g(s,()=>{e.modelValue&&e.autoClose&&f("close")},{ignore:["a","button","summary",'[role="dialog"]']});const d={right:{"enter-from-class":"transform translate-x-1/1","leave-to-class":"transform translate-x-1/1"},top:{"enter-from-class":"transform translate-y--1/1","leave-to-class":"transform translate-y--1/1"},bottom:{"enter-from-class":"transform translate-y-1/1","leave-to-class":"transform translate-y-1/1"}};return(o,r)=>{const b=h;return i(),p(N,c(d[t.transition],{"enter-active-class":"duration-200 ease-in","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100"}),{default:v(()=>[t.modelValue?(i(),k("div",c({key:0,ref_key:"el",ref:s,border:`${t.transition==="right"?"l":t.transition==="bottom"?"t":"b"} base`,flex:"~ col gap-1",class:{"right-0":t.transition==="right"||t.transition==="bottom"},absolute:"","bottom-0":"","z-10":"","z-20":"","of-auto":"","n-glass-effect":"","text-sm":"",style:{top:t.transition==="bottom"?"auto":`${a(u)}px`,left:t.transition==="right"&&!a(n)?"auto":`${a(n)}px`}},o.$attrs),[C(b,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",border:!1,onClick:r[0]||(r[0]=S=>o.$emit("close"))}),$("div",_,[w(o.$slots,"default")])],16,V)):B("",!0)]),_:3},16)}}}),O=Object.assign(z,{__name:"NDrawer"});export{O as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a2 as i,H as p,_ as u}from"#entry";import{p as c,k as m,J as _,Y as f,a0 as r,a3 as b,a1 as v,u as t,$ as k,ac as N,a7 as V}from"./vendor/json-editor-vue-ikjc812x.js";const g=c({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(a,{emit:l}){const e=p(a,"modelValue",l,{passive:!0}),n=m();return i(n,()=>{e.value=!1}),(s,o)=>{const d=u;return f(),_("div",{ref_key:"el",ref:n,class:"relative"},[r(s.$slots,"trigger",{enabled:t(e),click:()=>e.value=!t(e)},()=>[v(d,{onClick:o[0]||(o[0]=C=>e.value=!t(e))},{default:k(()=>[...o[1]||(o[1]=[N(" Dropdown ",-1)])]),_:1})]),b("div",{class:V(["absolute z-10 border n-border-base rounded n-bg-base shadow n-transition",[t(e)?"op-100":"op0 pointer-events-none -translate-y-1",a.direction==="end"?"right-0":"left-0"]])},[r(s.$slots,"default")],2)],512)}}}),y=Object.assign(g,{__name:"NDropdown"});export{y as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as o,J as t,Y as a,a4 as s,a0 as c,a7 as i,a3 as l,ab as r}from"./vendor/json-editor-vue-ikjc812x.js";const m={flex:"~ gap-3","items-center":""},_=o({__name:"NIconTitle",props:{icon:{},text:{}},setup(e){return(n,d)=>(a(),t("div",m,[e.icon?(a(),t("div",{key:0,class:i(e.icon)},null,2)):s("",!0),c(n.$slots,"default",{},()=>[l("div",null,r(e.text),1)])]))}}),p=Object.assign(_,{__name:"NIconTitle"});export{p as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as s}from"#entry";import{p as l,q as c,X as i,Y as a,a2 as u,$ as m,a0 as _,J as k,a4 as p}from"./vendor/json-editor-vue-ikjc812x.js";const d={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},f=l({__name:"NLink",props:{to:{},href:{},target:{},underline:{type:Boolean}},setup(e){const n=e,t=c(()=>n.href||n.to);return(o,h)=>{const r=s;return a(),i(r,u(t.value?{href:t.value,target:e.target,rel:e.target==="_blank"?"noopener noreferrer":void 0}:{},{class:{"n-link n-transition hover:n-link-hover n-link-base":t.value||e.underline}}),{default:m(()=>[_(o.$slots,"default"),t.value&&e.target==="_blank"?(a(),k("div",d)):p("",!0)]),_:3},16,["class"])}}}),x=Object.assign(f,{__name:"NLink"});export{x as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a}from"./client-miiq4qin.js";import{p as s,X as e,u as o,Y as t,ag as r,ab as d}from"./vendor/json-editor-vue-ikjc812x.js";const m=s({__name:"NMarkdown",props:{markdown:{},tag:{}},setup(n){return(c,k)=>n.markdown&&o(a)?.devtools?.renderMarkdown?(t(),e(r(n.tag||"span"),{key:0,class:"n-markdown",innerHTML:o(a).devtools.renderMarkdown(n.markdown)},null,8,["innerHTML"])):(t(),e(r(n.tag||"span"),{key:1,class:"n-markdown",textContent:d(n.markdown)},null,8,["textContent"]))}}),w=Object.assign(m,{__name:"NMarkdown"});export{w as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as i}from"#entry";import{p,J as d,Y as s,a7 as t,a3 as m,a0 as n,X as u,a4 as _}from"./vendor/json-editor-vue-ikjc812x.js";const h={flex:"~ gap4 wrap","items-center":""},f=p({__name:"NNavbar",props:{search:{},noPadding:{type:Boolean}},emits:["update:search"],setup(a,{emit:o}){const r=o;function c(e){r("update:search",e.target.value)}return(e,v)=>{const l=i;return s(),d("div",{flex:"~ col gap2 wrap",border:"b base","n-navbar-glass":"","flex-1":"",class:t([{p4:!a.noPadding}])},[m("div",h,[n(e.$slots,"search",{},()=>[a.search!==void 0?(s(),u(l,{key:0,placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:t({"px-3 py-2":!a.noPadding}),value:a.search,onInput:c},null,8,["class","value"])):_("",!0)]),n(e.$slots,"actions")]),n(e.$slots,"default")],2)}}}),x=Object.assign(f,{__name:"NNavbar"});export{x as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as o}from"#entry";import{J as t,Y as r,a0 as n}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";const s={},a={relative:"","w-full":""};function c(e,l){return r(),t("div",a,[n(e.$slots,"default")])}const d=o(s,[["render",c]]);export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as y,I as B,b}from"#entry";import{_ as C}from"./nicon-title-he6hzgyb.js";import{p as N,J as d,Y as l,F as p,a3 as s,a4 as c,a7 as i,a1 as $,u as r,$ as h,a0 as n,X as k,ac as m,ab as v,ad as w,ae as S}from"./vendor/json-editor-vue-ikjc812x.js";const V=["open"],I={"text-base":""},T={key:0,"text-sm":"",op50:""},z=N({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(e){const a=y(e,"open",void 0,{passive:!0});function u(t){a.value=t.target.open}return(t,o)=>{const f=B,x=C;return l(),d(p,null,[s("details",{open:r(a),onToggle:o[0]||(o[0]=(...g)=>u&&u(...g))},[s("summary",{class:i(["cursor-pointer select-none p4 hover:bg-active",e.collapse?"":"pointer-events-none"])},[$(x,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:i([r(a)?"op100":"op60",e.headerClass])},{default:h(()=>[s("div",null,[s("div",I,[n(t.$slots,"text",{},()=>[m(v(e.text),1)],!0)]),e.description||t.$slots.description?(l(),d("div",T,[n(t.$slots,"description",{},()=>[m(v(e.description),1)],!0)])):c("",!0)]),o[1]||(o[1]=s("div",{class:"flex-auto"},null,-1)),n(t.$slots,"actions",{},void 0,!0),e.collapse?(l(),k(f,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):c("",!0)]),_:3},8,["icon","text","class"])],2),o._lazyshow1||r(a)?(o._lazyshow1=!0,l(),d(p,null,[w(s("div",{class:i(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[n(t.$slots,"details",{},void 0,!0),s("div",{class:i([e.containerClass,"mt1"])},[n(t.$slots,"default",{},void 0,!0)],2),n(t.$slots,"footer",{},void 0,!0)],2),[[S,r(a)]])],64)):c("v-show-if",!0)],40,V),o[2]||(o[2]=s("div",{class:"x-divider"},null,-1))],64)}}}),H=Object.assign(b(z,[["__scopeId","data-v-95ac5573"]]),{__name:"NSectionBlock"});export{H as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
details[data-v-95ac5573],summary[data-v-95ac5573]{border-style:none}summary[data-v-95ac5573]{list-style:none}details[open] summary[data-v-95ac5573]{border-style:none}details summary[data-v-95ac5573]::-webkit-details-marker{display:none}details[open] .chevron[data-v-95ac5573]{opacity:.75;transform:rotate(180deg)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as m,H as b}from"#entry";import{p as f,J as n,Y as o,a7 as l,a0 as d,ad as p,X as h,a4 as c,aD as x,u as v,a3 as y,j as V,ab as g}from"./vendor/json-editor-vue-ikjc812x.js";const k=["disabled"],B={key:0,value:"",disabled:"",hidden:""},N=f({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(e,{emit:i}){const a=b(e,"modelValue",i,{passive:!0});return(t,s)=>{const r=m;return o(),n("div",{class:l(["n-select flex flex items-center border rounded n-bg-base px-2 py-1 focus-within:border-context focus-within:n-focus-base",e.disabled?"border-gray:10":"n-border-base"])},[d(t.$slots,"icon",{},()=>[e.icon?(o(),h(r,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):c("",!0)]),p(y("select",{"onUpdate:modelValue":s[0]||(s[0]=u=>V(a)?a.value=u:null),disabled:e.disabled,class:l(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),n("option",B,g(e.placeholder),1)):c("",!0),d(t.$slots,"default")],10,k),[[x,v(a)]])],2)}}}),D=Object.assign(N,{__name:"NSelect"});export{D as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as c,J as l,Y as t,F as p,ah as m,a7 as d,u as o,a3 as i,ad as v,ab as f,ax as _,j as x}from"./vendor/json-editor-vue-ikjc812x.js";import{H as g}from"#entry";const h={class:"n-select-tabs flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base"},y=["disabled","title"],V=["disabled","value","title"],B=c({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(s,{emit:r}){const a=g(s,"modelValue",r,{passive:!0});return(S,n)=>(t(),l("fieldset",h,[(t(!0),l(p,null,m(s.options,(e,b)=>(t(),l("label",{key:e.label,disabled:s.disabled,class:d(["relative n-border-base px-0.5em py-0.1em hover:n-bg-active",[b?"border-l n-border-base ml--1px":"",e.value===o(a)?"n-bg-active":""]]),title:e.label},[i("div",{class:d([e.value===o(a)?"":"op35"])},f(e.label),3),v(i("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>x(a)?a.value=u:null),type:"radio",disabled:s.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,V),[[_,o(a)]])],10,y))),128))]))}}),C=Object.assign(B,{__name:"NSelectTabs"});export{C as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as n,ar as i,as as o,J as c,Y as u,ad as r,a3 as t,a0 as h,at as b,a6 as m}from"./vendor/json-editor-vue-ikjc812x.js";const p=["checked","disabled"],v=["disabled"],f=n({__name:"NSwitch",props:i({disabled:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(a){const s=o(a,"modelValue");return(d,e)=>(u(),c("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:s.value||null,disabled:a.disabled||null},[r(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>s.value=l),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:e[1]||(e[1]=m(l=>s.value=!s.value,["enter"]))},null,40,v),[[b,s.value]]),e[2]||(e[2]=t("div",{class:"n-switch-slider n-transition n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base"},[t("div",{class:"n-switch-thumb n-transition n-checked:n-switch-thumb-checked"})],-1)),h(d.$slots,"default")],8,p))}}),w=Object.assign(f,{__name:"NSwitch"});export{w as _};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{at as ne,a as ae,w as H,n as J,_ as P,au as U,av as se,aw as re,ax as ie,b as V,ay as le,az as ce,c as de,y as pe,z as ue,C as me,aA as E,v as ge}from"#entry";import{_ as _e}from"./nnavbar-b4ap0r8w.js";import{_ as q}from"./nlink-fgjzhevk.js";import{_ as K}from"./nsection-block-je23gs2w.js";import{_ as he}from"./ncode-block-pcw3yh3u.js";import{p as O,q as C,k as j,X as A,a4 as k,Y as t,$ as h,a3 as e,J as n,F as S,ah as I,a7 as M,ab as p,a1 as c,ac as x,u as g,a5 as B,z as ve,aj as fe,ad as D,a6 as be}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as xe}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";import"./nicon-title-he6hzgyb.js";import"./client-miiq4qin.js";const Y=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"optional",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"optional",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"optional",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"optional",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],we={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ye=["onClick"],ke={key:0,"x-divider":""},$e={key:1,"x-divider":""},Te={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Se={"w-full":"",p2:"",op75:""},Ce={key:1,m4:"",flex:"~ col gap-2"},Oe={flex:"~ gap-1 wrap items-center"},Ne={key:1},Me={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Ae=O({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(a){const _=a,i=C(()=>Y.filter(d=>!_.tags?.some(o=>o.name===d.name))),l=C(()=>{let d={};const o={};i.value.forEach(m=>{m.seoMeta?Object.assign(o,m.seoMeta):d=ne(d,m.head)});const w=[];if(Object.keys(o).length){const m=JSON.stringify(o,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");w.push(`useSeoMeta(${m})`)}if(Object.keys(d).length){const m=JSON.stringify(d,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");w.push(`useHead(${m})`)}return w.join(`
|
|
2
|
+
|
|
3
|
+
`)}),u=ae(),$=H(),b=["Missing Tags","Code Snippet"],v=j(b[0]);return(d,o)=>{const w=q,m=J,T=P,N=he,L=K;return i.value.length?(t(),A(L,{key:0,text:"Missing Tags",description:`${i.value.length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:h(()=>[e("div",we,[(t(),n(S,null,I(b,(s,r)=>e("button",{key:r,px4:"",py2:"",border:"r t base",hover:"bg-active",class:M(s===v.value?"":"border-b"),onClick:f=>v.value=s},[e("div",{class:M(s===v.value?"":"op30"),capitalize:""},p(s),3)],10,ye)),64)),o[3]||(o[3]=e("div",{border:"b base","flex-auto":""},null,-1))]),v.value===b[0]?(t(),A(m,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,I(i.value,(s,r)=>(t(),n(S,{key:r},[r?(t(),n("div",ke)):k("",!0),r?(t(),n("div",$e)):k("",!0),e("div",Te,[o[4]||(o[4]=e("div",{"i-carbon-warning":"","text-orange":""},null,-1)),c(w,{"op-50":"",href:s.docs,target:"_blank",n:"orange"},{default:h(()=>[x(p(s.name),1)]),_:2},1032,["href"])]),e("div",Se,p(s.description),1)],64))),128))]),_:1})):(t(),n("div",Ce,[e("p",Oe,[c(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:o[0]||(o[0]=s=>g(u)(l.value,"open-graph-suggestion"))},{default:h(()=>[...o[5]||(o[5]=[x(" Copy ",-1)])]),_:1}),o[7]||(o[7]=x(" the following code snippet and paste it into your ",-1)),a.matchedRouteFilepath?(t(),A(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:o[1]||(o[1]=s=>g($)(a.matchedRouteFilepath))},{default:h(()=>[...o[6]||(o[6]=[x(" page component ",-1)])]),_:1})):(t(),n("span",Ne,"page component")),o[8]||(o[8]=x(" to full fill the missing tags. ",-1))]),c(m,{relative:"","n-code-block":""},{default:h(()=>[c(N,{code:l.value,lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",Me,[c(T,{icon:"carbon-copy",onClick:o[2]||(o[2]=s=>g(u)(l.value,"open-graph-suggestion"))},{default:h(()=>[...o[9]||(o[9]=[x(" Copy ",-1)])]),_:1})])]),_:1})]))]),_:1},8,["description"])):k("",!0)}}}),je=Object.assign(Ae,{__name:"OpenGraphMissingTabs"}),Ie={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Be={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Le={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Re={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Fe={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},ze={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},De=O({__name:"SocialFacebook",props:{card:{}},setup(a){return(_,i)=>(t(),n("div",Ie,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(a.card.image)})`})},null,4),e("div",Be,[e("div",Le,p(a.card.url),1),e("div",Re,[e("div",Fe,p(a.card.title),1),e("div",ze,p(a.card.description),1)])])]))}}),Ge=Object.assign(De,{__name:"SocialFacebook"}),Ee={class:"max-w-[438px] min-w-[438px] of-hidden border border-base rounded-[16px] bg-base -outline-offset-1",style:{"font-family":"TwitterChirp, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"}},He={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},Je={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Pe={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},Ue={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Ve=O({__name:"SocialTwitter",props:{tags:{}},setup(a){const _=a,i=C(()=>U(_.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),l=C(()=>i.value.image?_.tags.find(u=>u.tag==="meta"&&u.name==="twitter:card")?.value||"summary_large_image":"summary");return(u,$)=>(t(),n("div",Ee,[e("div",{class:M(["cursor-pointer overflow-hidden leading-[1.3em]",l.value==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[l.value==="summary_large_image"?(t(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(i.value.image)})`})},null,4)):(t(),n("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(i.value.image)})`})},null,4)),e("div",He,[e("div",Je,p(i.value.url),1),e("div",Pe,p(i.value.title),1),e("div",Ue,p(i.value.description),1)])],2)]))}}),qe=Object.assign(Ve,{__name:"SocialTwitter"}),Ke={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] bg-base shadow-md"},Ye={class:"break-words p-[10px] antialiased"},We={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Xe={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},Qe={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Ze=O({__name:"SocialLinkedin",props:{card:{}},setup(a){return(_,i)=>(t(),n("div",Ke,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(a.card.image)})`})},null,4),e("div",Ye,[e("div",We,[e("div",Xe,p(a.card.title),1),e("div",Qe,p(a.card.url),1)])])]))}}),et=Object.assign(Ze,{__name:"SocialLinkedin"}),tt={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 bg-base py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26]"},ot={class:"pl-[10px] pr-[8px]"},nt={class:"text-[#3390ec] leading-normal underline"},at={class:"quote w-full flex"},st={class:"flex flex-col gap-1"},rt={key:0,class:"my-[3px] overflow-hidden rounded"},it=["src"],lt={class:"cursor-pointer text-sm text-[#3390ec]"},ct={class:"cursor-pointer text-sm"},dt={class:"cursor-pointer text-sm"},pt={class:"flex justify-end text-xs text-[#707579]"},ut=O({__name:"SocialTelegram",props:{card:{}},setup(a){const _=se(),i=re(ie(),"HH:mm");return(l,u)=>(t(),n("div",tt,[e("div",ot,[e("div",nt,p(a.card.url),1),e("div",at,[e("div",st,[a.card.image?(t(),n("div",rt,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,it)])):k("",!0),e("div",lt,[e("strong",null,p(g(_).hostname),1)]),e("div",ct,[e("strong",null,p(a.card.title),1)]),e("div",dt,p(a.card.description),1)])]),e("div",pt,[e("span",null,p(g(i)),1)])]),u[0]||(u[0]=e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1))]))}}),mt=Object.assign(V(ut,[["__scopeId","data-v-4566448e"]]),{__name:"SocialTelegram"}),gt={flex:"~ col","w-full":""},_t={flex:"~ wrap","w-full":"","flex-none":""},ht=["onClick"],vt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},ft={key:0},bt={key:1},xt={key:2},wt={key:3},yt=O({__name:"SocialPreviewGroup",props:{tags:{}},setup(a){const _=a,i=["twitter","facebook","linkedin","telegram"],l=le("nuxt-devtools-social-preview-tab",i[0]),u=C(()=>U(_.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return($,b)=>{const v=Ge,d=qe,o=et,w=mt;return t(),n("div",gt,[e("div",_t,[(t(),n(S,null,I(i,(m,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:M(m===g(l)?"":"border-b"),onClick:N=>l.value=m},[e("div",{class:M(m===g(l)?"":"op30"),capitalize:""},p(m),3)],10,ht)),64)),b[0]||(b[0]=e("div",{border:"b base","flex-auto":""},null,-1))]),e("div",vt,[g(l)==="facebook"?(t(),n("div",ft,[c(v,{card:u.value},null,8,["card"])])):g(l)==="twitter"?(t(),n("div",bt,[c(d,{tags:a.tags},null,8,["tags"])])):g(l)==="linkedin"?(t(),n("div",xt,[c(o,{card:u.value},null,8,["card"])])):g(l)==="telegram"?(t(),n("div",wt,[c(w,{card:u.value},null,8,["card"])])):k("",!0)])])}}}),kt=Object.assign(yt,{__name:"SocialPreviewGroup"}),$t={},Tt={class:"markdown-body"};function St(a,_){return t(),n("div",Tt,[..._[0]||(_[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Open Graph"),e("p",null,[x("Nuxt provides several different ways to manage your meta tags using "),e("a",{href:"https://unhead.harlanzw.com/",target:"_blank",rel:"noopener"},[e("code",{"v-pre":""},"unhead")]),x(". Improve your Nuxt app’s SEO with powerful head config, composables and components.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/seo-meta",target:"_blank",rel:"noopener"},"Learn more on the documentation")]),e("hr"),e("p",null,"You can also find how open graph specs are defined in:"),e("ul",null,[e("li",null,[e("a",{href:"https://ogp.me/",target:"_blank",rel:"noopener"},"The Open Graph protocol")]),e("li",null,[e("a",{href:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started",target:"_blank",rel:"noopener"},"Twitter Cards")])])])],-1)])])}const Ct=V($t,[["render",St]]),Ot={grid:"~ lg:cols-2","h-full":"","w-full":"","of-hidden":""},Nt={"flex-auto":"","of-auto":""},Mt={"flex-none":"",flex:"~ gap2 items-center"},At={flex:"~ col"},jt={key:0,"x-divider":""},It={key:1,"x-divider":""},Bt={mr2:"",px4:"",py2:""},Vt=O({__name:"open-graph",setup(a){const _=j(0),i=ce(),l=de(async()=>(_.value,(await i.value?.resolveTags()).map(r=>{const f=r.props||{};return r.tag==="htmlAttrs"&&f.lang?{tag:"html",name:"lang",value:f.lang}:f.charset?{tag:"meta",name:"charset",value:f.charset}:{tag:r.tag,name:f.property??f.name??f.rel??r.tag,value:f.content??f.href??r.textContent??JSON.stringify(f)}})),[]),u=j(!0);function $(){_.value+=1}const b=pe(),v=ue(),d=j(""),o=me(),w=H();async function m(){d.value!==v.value.path&&b.value.push(d.value||"/")}const T=C(()=>d.value===v.value.path?[]:b.value.resolve(d.value||"/").matched),N=C(()=>{const s=o.value.find(r=>r.path===v.value?.matched?.[0]?.path);return s?.file||s?.meta?.file});function L(s){return Y.find(r=>r.name===s.name)?.docs}return E(v).toBeTruthy().then(s=>{d.value=s.path}),E(b).toBeTruthy().then(s=>{s.afterEach(()=>{ve(()=>{d.value=v.value.path,setTimeout($,200),setTimeout($,800)})})}),(s,r)=>{const f=ge,R=P,W=_e,G=q,X=J,Q=K,Z=je,ee=kt,te=Ct,oe=xe,F=fe("tooltip");return t(),n(S,null,[e("div",Ot,[e("div",Nt,[c(W,null,{search:h(()=>[c(f,{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=y=>d.value=y),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:M(["px-5 py-2",g(v)?.path===d.value?"":T.value.length?"text-green":"text-orange"]),onKeydown:be(m,["enter"])},null,8,["modelValue","class"])]),actions:h(()=>[e("div",Mt,[N.value?D((t(),A(R,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:r[1]||(r[1]=y=>g(w)(N.value))},null,512)),[[F,"Open file in editor"]]):k("",!0),D(c(R,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:$},null,512),[[F,"Refresh Data"]]),D(c(R,{"text-lg":"",border:!1,icon:u.value?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:r[2]||(r[2]=y=>u.value=!u.value)},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",At,[c(Q,{text:"Tags",icon:"carbon:tag-group"},{default:h(()=>[c(X,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,I(g(l),(y,z)=>(t(),n(S,{key:z},[z?(t(),n("div",jt)):k("",!0),z?(t(),n("div",It)):k("",!0),e("div",Bt,[c(G,{op50:"",href:L(y),target:"_blank",n:"primary"},{default:h(()=>[x(p(y.name),1)]),_:2},1032,["href"])]),c(G,{href:String(y.value).match(/^https?:\/\//)?y.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:h(()=>[x(p(y.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),c(Z,{tags:g(l),"matched-route-filepath":N.value},null,8,["tags","matched-route-filepath"])])]),u.value&&g(l)?.length?(t(),A(ee,{key:0,tags:g(l),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):k("",!0)]),c(oe,null,{default:h(()=>[c(te)]),_:1})],64)}}});export{Vt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as M,A as z,V as E,ab as O,ac as P,a6 as F,e as q,h as G,ad as g,ae as k,af as H,q as K,ag as $,_ as J,i as U,j as W,E as X}from"#entry";import{u as Y,_ as Q}from"./state-modules-lzveckmy.js";import{u as Z}from"./state-components-8k7sf46m.js";import{p as c,q as A,X as v,Y as s,$ as n,J as p,u as o,a3 as e,a1 as i,ab as a,a4 as u,F as f,ac as l}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";import"./nbadge-d24jlq2b.js";import"./ncode-block-pcw3yh3u.js";import"./client-miiq4qin.js";import"./ncheckbox-eijyrwcq.js";const h="3.0.0-29360567.be134cc",tt={key:0},et={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt={op40:""},st={flex:"~ gap2 wrap"},lt={key:5,"pointer-events-none":"","min-w-40":"","theme-card-lime":"",p4:"",flex:"~ auto gap-6"},it={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ut={"text-right":""},rt={"text-right":""},at={"text-right":""},dt={"text-right":""},pt={flex:"~ col gap2"},mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},xt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},vt={flex:"~ gap-1","items-center":""},ft={flex:"~ gap-1","items-center":""},jt=c({__name:"overview",setup(gt){const b=M(),m=z(),D=Z(),y=E(),j=Y(),V=O(),w=P(),B=F();function I(){W.value=!0,B.push("/")}const _=A(()=>b.value?.nuxt.vueApp.version),r=A(()=>b.value?.metrics.loading());function L(){X()}return(S,t)=>{const R=G,x=q,C=Q,N=K,d=J,T=U;return s(),v(T,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[o(m)?(s(),p("div",et,[t[40]||(t[40]=e("div",{"flex-auto":""},null,-1)),e("div",ot,[i(x,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(R,{"h-10":""})]),_:1}),e("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:I},[t[0]||(t[0]=e("span",{op40:""}," Nuxt DevTools ",-1)),e("code",nt,"v"+a(o(h)),1),i(C,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),e("div",st,[i(x,{to:"https://nuxt.com",target:"_blank","theme-card-green":"",p4:"",flex:"~ col auto"},{default:n(()=>[t[1]||(t[1]=e("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1)),i(C,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),_.value?(s(),v(x,{key:0,to:"https://vuejs.org",target:"_blank","theme-card-green":"",p4:"",flex:"~ col auto"},{default:n(()=>[t[2]||(t[2]=e("div",{"logos-vue":"","text-3xl":""},null,-1)),e("code",null,"v"+a(_.value),1)]),_:1})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(b)?(s(),v(x,{key:0,"min-w-40":"","theme-card-lime":"",p4:"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[t[3]||(t[3]=e("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(V).length,"page")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:1,"min-w-40":"","theme-card-lime":"",p4:"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[t[4]||(t[4]=e("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(D).length,"component")),1)]),_:1})):u("",!0),o(m)&&o(y)?(s(),v(x,{key:2,"min-w-40":"","theme-card-yellow":"",p4:"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[t[5]||(t[5]=e("div",{"carbon-function":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(y).imports.length,"import")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:3,"min-w-40":"","theme-card-purple":"",p4:"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[t[6]||(t[6]=e("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(j).length,"module")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:4,"min-w-40":"","theme-card-teal":"",p4:"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[t[7]||(t[7]=e("div",{"carbon-plug":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(m).plugins.length,"plugin")),1)]),_:1})):u("",!0),r.value?(s(),p("div",lt,[t[12]||(t[12]=e("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1)),e("div",it,[r.value.ssrStart?(s(),p(f,{key:0},[t[8]||(t[8]=e("div",{"text-sm":""}," SSR to full load ",-1)),e("div",ut,a(o(k)(r.value.appLoad-r.value.ssrStart)),1)],64)):u("",!0),t[10]||(t[10]=e("div",{"text-sm":""}," Page load ",-1)),e("div",rt,a(o(k)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(k)(r.value.pageEnd-r.value.pageStart)),1),r.value.hmrStart?(s(),p(f,{key:1},[t[9]||(t[9]=e("div",{"text-sm":""}," HMR ",-1)),e("div",dt,a(o(k)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(H)?(s(),v(N,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[...t[13]||(t[13]=[l(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ",-1)])]),_:1})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in S?S.isDevAuthed:o($))?u("",!0):(s(),v(N,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[...t[14]||(t[14]=[l(" Access from an untrusted browser, some features are limited. Click to authorize now. ",-1)])]),_:1}))])]),e("div",mt,[t[16]||(t[16]=e("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[e("div",{"i-carbon-star":""}),l(" Star on GitHub ")],-1)),t[17]||(t[17]=e("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[e("div",{"i-carbon-data-enrichment":""}),l(" Ideas & Suggestions ")],-1)),t[18]||(t[18]=e("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[e("div",{"i-carbon-plan":""}),l(" Project Roadmap ")],-1)),t[19]||(t[19]=e("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[e("div",{"i-carbon-debug":""}),l(" Bug Reports ")],-1)),i(x,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[...t[15]||(t[15]=[e("div",{"i-carbon-settings-adjust":""},null,-1),l(" Settings ",-1)])]),_:1})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[20]||(t[20]=[l(" ⌘ Cmd ",-1)])]),_:1}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[21]||(t[21]=[l(" K ",-1)])]),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[23]||(t[23]=[l(" Ctrl ",-1)])]),_:1}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[24]||(t[24]=[l(" K ",-1)])]),_:1})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette ",-1))]),e("div",ft,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[28]||(t[28]=[l(" ⇧ Shift ",-1)])]),_:1}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[29]||(t[29]=[l(" ⌥ Option ",-1)])]),_:1}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[30]||(t[30]=[l(" D ",-1)])]),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[33]||(t[33]=[l(" Shift ",-1)])]),_:1}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[34]||(t[34]=[l(" Alt ",-1)])]),_:1}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[35]||(t[35]=[l(" D ",-1)])]),_:1})],64)),t[38]||(t[38]=e("div",{"flex-auto":""},null,-1)),t[39]||(t[39]=e("div",null,"Toggle DevTools",-1))])])])):(s(),p("div",tt," Loading... "))]),_:1})}}});export{jt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as j,_ as H,w as J,x as F,a as X,b as Y,y as Z,z as G,A as Q,B as ee,C as te,D as ne,r as oe,E as ae}from"#entry";import{_ as S}from"./nbadge-d24jlq2b.js";import{p as D,k as A,q as k,Z as se,J as o,X as w,Y as t,a3 as e,ab as N,$ as C,F as g,ah as T,a7 as L,am as re,a4 as R,a1 as v,ac as I,u as c,D as le,a6 as ue}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as z}from"./filepath-item-owlv864w.js";import{_ as ie}from"./nsection-block-je23gs2w.js";import{_ as de}from"./launch-page-l87i7ewv.js";import{_ as pe}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";import"./nicon-title-he6hzgyb.js";import"./nmarkdown-n6zsr15e.js";import"./client-miiq4qin.js";const ce={block:"","cursor-pointer":""},me={p2:""},_e=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},fe=D({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(m,{emit:l}){const h=m,V=l,y=A([]),f=k(()=>{const r=$(h.route.path);return y.value=Array.from({length:r.length},()=>""),r});function $(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(p=>p[0]===":"?p.replace(/\(\)$/,"?"):p)}const x=k(()=>f.value.map((r,p)=>r[0]===":"?y.value[p]:r).join("").replace(/\/+/g,"/")),a=k(()=>h.route.path.includes(":"));function s(){V("navigate",x.value)}return(r,p)=>{const _=j,n=H,u=se("VDropdown");return a.value?(t(),w(u,{key:1},{popper:C(({hide:b})=>[e("div",me,[e("form",{flex:"~ col",onSubmit:re(()=>{s(),b()},["prevent"])},[a.value?(t(),o(g,{key:0},[p[0]||(p[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),o(g,null,T(f.value,(i,d)=>(t(),o(g,{key:d},[i[0]===":"?(t(),w(_,{key:0,modelValue:y.value[d],"onUpdate:modelValue":B=>y.value[d]=B,"w-20":"","n-sm":"",placeholder:i.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),o("span",he,N(i),1))],64))),128))])],64)):R("",!0),v(n,{type:"submit",block:"",n:"primary"},{default:C(()=>[...p[1]||(p[1]=[I(" Navigate ",-1)])]),_:1})],40,_e)])]),default:C(()=>[e("code",ce,[(t(!0),o(g,null,T(f.value,(b,i)=>(t(),o("span",{key:i,class:L(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},N(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),o("button",{key:0,onClick:s},[e("code",null,N(m.route.path),1)]))}}}),ge=Object.assign(fe,{__name:"RoutePathItem"}),ye={"max-w-full":"","of-auto":""},xe={"w-full":""},be={"w-20":"","pr-1":""},ke={flex:"","items-center":"","justify-end":""},we={"text-sm":""},$e={flex:"inline gap3","items-center":""},Ce={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},Ne=["onClick"],Re=["onClick"],Pe={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ie={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Te={key:0},Be=["onClick"],Ee=D({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(m){const l=m,h=J(),V=F(),y=X(),f=k(()=>[...l.pages].sort((a,s)=>a.path.localeCompare(s.path)));function $(a){const s=l.layouts.find(r=>r.name===a);s&&h(s.file)}function x(a){if(typeof a=="string")return V.value?.middleware.find(s=>s.name===a)?.path}return(a,s)=>{const r=S,p=ge,_=z;return t(),o("div",ye,[e("table",xe,[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),o(g,null,T(f.value,n=>(t(),o("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",be,[e("div",ke,[m.matched.find(u=>u.name===n.name)?(t(),w(r,{key:0,n:"green",title:"active",textContent:"active"})):m.matchedPending.find(u=>u.name===n.name)?(t(),w(r,{key:1,n:"teal",title:"next",textContent:"next"})):R("",!0)])]),e("td",we,[e("div",$e,[v(p,{route:n,class:L(m.matched.find(u=>u.name===n.name)?"text-primary":m.matchedPending.find(u=>u.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=u=>a.$emit("navigate",u))},null,8,["route","class"]),e("div",Ce,[n.file||n.meta?.file?(t(),o("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:u=>c(h)(n.file||n.meta?.file)},[...s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)])],8,Ne)):R("",!0),n.file||n.meta?.file?(t(),o("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:u=>c(y)(n.file||n.meta?.file)},[...s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)])],8,Re)):R("",!0)])])]),e("td",Pe,N(n.name),1),e("td",Ve,[v(_,{filepath:x(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ie,[n.meta.layout===!1?(t(),o("span",Te,"-")):n.meta.layout?(t(),o("button",{key:1,onClick:u=>$(n.meta.layout)},N(n.meta.layout),9,Be)):(t(),o("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=u=>$("default"))}," (default) "))])]))),128))])])])}}}),Ae=Object.assign(Ee,{__name:"RoutesTable"}),De={},Le={class:"markdown-body"};function Me(m,l){return t(),o("div",Le,[...l[0]||(l[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Pages"),e("p",null,[I("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",{"v-pre":""},"~/pages/"),I(" directory.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")]),e("hr"),e("h1",null,"Middlewares"),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."),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const je=Y(De,[["render",Me]]),Fe={key:0,"h-full":"","of-auto":""},Se={border:"b base",flex:"~ col gap1","n-navbar-glass":"",px4:"",py3:""},ze={"font-mono":""},Oe={key:1,op50:""},Ue={key:0,"text-orange":"",op75:""},Ke={key:1,op50:""},We={"min-h-14":""},qe={key:1,class:"py-4 text-center"},He={"w-full":""},Je={mr1:""},lt=D({__name:"pages",setup(m){const l=Z(),h=G(),V=Q(),y=F(),f=ee(),$=te(),x=k(()=>y.value?.middleware||[]),a=A(""),s=A(0),r=k(()=>(x.value,a.value,f.value,s.value,l.value?.currentRoute?.value?.path));le(()=>{h.value&&(a.value=l.value?.currentRoute?.value?.path),l.value?.beforeEach(i=>{a.value=i.fullPath}),l.value?.afterEach(i=>{a.value=i.fullPath})});async function p(){a.value!==l.value?.currentRoute?.value?.path&&l.value.push(a.value||"/")}const _=k(()=>l.value.resolve(a.value||"/").matched);function n(i){l.value.push(i),a.value=i}const u=ne(),b=k(()=>`./${u===4?"app/":""}pages/index.vue`);return(i,d)=>{const B=j,M=Ae,E=ie,O=S,U=z,K=de,W=je,q=pe;return t(),o(g,null,[c(V)?.pages&&c(l)?(t(),o("div",Fe,[e("div",Se,[e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[1]||(d[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",ze,N(r.value),1),d[2]||(d[2]=e("span",{op50:""}," to ",-1))],64)):(t(),o("span",Oe,"Current route"))]),v(B,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=P=>a.value=P),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(r.value===a.value?"":_.value.length?"text-green":"text-orange"),onKeydown:ue(p,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[3]||(d[3]=e("span",null,[I("Press "),e("b",{"font-bold":""},"Enter"),I(" to navigate")],-1)),_.value.length?R("",!0):(t(),o("span",Ue," (no match)"))],64)):(t(),o("span",Ke,"Edit path above to navigate"))])]),v(E,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:C(()=>[e("div",We,[_.value.length?(t(),w(M,{key:0,pages:_.value,layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),o("div",qe,[...d[4]||(d[4]=[e("span",{op50:""},"No routes matched",-1)])]))])]),_:1}),v(E,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c($).length} routes registered in your application`,padding:"pr5"},{default:C(()=>[v(M,{pages:c($),layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),x.value.length?(t(),w(E,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${x.value.length} middleware registered in your application`,padding:"px13"},{default:C(()=>[e("table",He,[d[5]||(d[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),o(g,null,T(x.value,P=>(t(),o("tr",{key:P.path,"h-7":""},[e("td",null,[e("span",Je,N(P.name),1),P.global?(t(),w(O,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):R("",!0)]),e("td",null,[v(U,{filepath:P.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):R("",!0)])):(t(),w(K,{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 i?i.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in i?i.ensureDevAuthToken:c(ae))(),"enablePages")}}]},null,8,["description","actions"])),v(q,null,{default:C(()=>[v(W)]),_:1})],64)}}});export{lt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as h}from"./state-editor-kisl1jyp.js";import{p as k,J as i,Y as t,F as $,ah as N,X as f,$ as a,a0 as B,a2 as w,a3 as d,q as b,aj as O,a4 as m,a1 as n,u as j,ad as F,ac as V}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as E}from"./nsection-block-je23gs2w.js";import{b as G,f as P,_ as R}from"#entry";import{_ as A}from"./help-fab-chg6ox1v.js";import"./data-schema-button-hqryewml.js";import"./nicon-title-he6hzgyb.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";const H={key:0,flex:"~ col gap-1"},K={key:1,mt2:"",px4:"",italic:"",op35:""},T=k({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(o){return(e,r)=>{const l=h;return t(),i("div",null,[o.state&&Object.keys(o.state).length>0?(t(),i("div",H,[(t(!0),i($,null,N(o.state,(u,s)=>(t(),f(l,{key:s,revision:o.revision,state:u,name:s.startsWith(o.prefix)?s.slice(o.prefix.length):s},{actions:a(c=>[B(e.$slots,"actions",w({ref_for:!0},c))]),_:3},8,["revision","state","name"]))),128))])):(t(),i("div",K," No data "))])}}}),q=Object.assign(T,{__name:"StateGroup"}),J={},L={class:"markdown-body"};function W(o,e){return t(),i("div",L,[...e[0]||(e[0]=[d("template",null,[d("div",{class:"markdown-body"},[d("h1",null,"State & Async Data"),d("p",null,"// TODO")])],-1)])])}const X=G(J,[["render",W]]),Y={key:0},at=k({__name:"payload",setup(o){const e=P(),r=b(()=>e.value?.nuxt.payload),l=b(()=>e.value?.revision.value);async function u(s){await e.value?.nuxt.hooks.callHookParallel("app:data:refresh",s)}return(s,c)=>{const v=q,p=E,x=R,S=h,g=X,D=A,C=O("tooltip");return t(),i($,null,[j(e)?(t(),i("div",Y,[n(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[n(v,{state:r.value.state,revision:l.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),n(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[n(x,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:c[0]||(c[0]=y=>u())},{default:a(()=>[...c[1]||(c[1]=[V(" Re-fetch all data ",-1)])]),_:1})]),default:a(()=>[n(v,{state:r.value.data,revision:l.value},{actions:a(({isOpen:y,name:_})=>[y&&_?F((t(),f(x,{key:0,title:`Re-fetch '${_}'`,icon:"carbon-recycle",border:!1,onClick:z=>u([_])},null,8,["title","onClick"])),[[C,`Re-fetch '${_}'`,void 0,{bottom:!0}]]):m("",!0)]),_:1},8,["state","revision"])]),_:1}),r.value.functions&&Object.keys(r.value.functions).length?(t(),f(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[n(S,{"ml--6":"",state:r.value.functions,revision:l.value},null,8,["state","revision"])]),_:1})):m("",!0)])):m("",!0),n(D,null,{default:a(()=>[n(g)]),_:1})],64)}}});export{at as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as r}from"#entry";import{u as c,m}from"./vue-devtools-hb1vi95m.js";import{p,J as i,Y as e,X as o,u as n,$ as _,ac as u}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";import"./vue-virtual-scroller.esm-b0ym3ct8.js";const l={class:"h-full w-full"},v=p({__name:"pinia",setup(f){const{connected:s}=c();return(d,t)=>{const a=r;return e(),i("div",l,[n(s)?(e(),o(n(m),{key:0})):(e(),o(a,{key:1},{default:_(()=>[...t[0]||(t[0]=[u(" Connecting.... ",-1)])]),_:1}))])}}});export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as S}from"./nbadge-d24jlq2b.js";import{_ as D}from"./filepath-item-owlv864w.js";import{_ as k}from"./duration-display-cjpkh71u.js";import{A as B,a3 as H,I,b as P,x as V,f as j}from"#entry";import{p as v,q as h,J as m,Y as s,a3 as n,a1 as l,a4 as _,ab as C,$ as d,X as u,Z as F,a0 as T,ac as x,F as b,ah as E,a7 as O}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as W}from"./nsection-block-je23gs2w.js";import{_ as A}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";import"./nicon-title-he6hzgyb.js";const L={flex:"~ gap2","items-center":""},M={w8:"","text-right":"","text-sm":"",op25:""},Y={key:0,"flex-auto":"","text-right":""},q=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(e){const t=e,a=B(),c=h(()=>H(t.plugin.src,a.value?.rootDir||"").path);return(f,p)=>{const o=S,r=D,i=k;return s(),m("div",L,[n("div",M,C(e.index),1),l(r,{filepath:t.plugin.src,subpath:!0},{default:d(()=>[n("div",null,[c.value.startsWith("#")?(s(),u(o,{key:0,n:"rose",textContent:"virtual"})):c.value.startsWith(".")?_("",!0):(s(),u(o,{key:1,n:"gray",textContent:"module"})),e.plugin.mode==="server"?(s(),u(o,{key:2,n:"teal",textContent:"server"})):_("",!0),e.plugin.mode==="client"?(s(),u(o,{key:3,n:"orange",textContent:"client"})):_("",!0)])]),_:1},8,["filepath"]),e.plugin.metric?.duration!=null?(s(),m("div",Y,[l(i,{duration:e.plugin.metric?.duration,factor:10},null,8,["duration"])])):_("",!0)])}}}),z=Object.assign(q,{__name:"PluginItem"}),J={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},R={flex:"~ items-center gap-1","font-bold":""},X=v({__name:"HelpTip",props:{title:{},icon:{}},setup(e){return(t,a)=>{const c=I,f=F("ContentSlot");return s(),m("div",J,[n("div",R,[e.icon?(s(),u(c,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):_("",!0),n("div",null,C(e.title),1)]),n("div",null,[T(t.$slots,"default",{},()=>[l(f,{use:t.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Z=Object.assign(X,{__name:"HelpTip"}),G={};function K(e,t){const a=Z;return s(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:d(()=>[T(e.$slots,"default")]),_:3})}const Q=Object.assign(P(G,[["render",K]]),{__name:"HelpTipPerformance"}),U={},tt={class:"markdown-body"},nt={class:"markdown-body"};function et(e,t){const a=Q;return s(),m("div",tt,[n("template",null,[n("div",nt,[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",{"v-pre":""},"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),l(a,null,{default:d(()=>[...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))])])])}const ot=P(U,[["render",et]]),st={pt4:""},it={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},gt=v({__name:"plugins",setup(e){const t=V(),a=j(),c=h(()=>{const p=t.value?.plugins||[],o=a.value?.metrics.clientPlugins()||[];return p.map(r=>{const i=typeof r=="string"?{src:r}:r;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),f=h(()=>{const p=a.value?.metrics.clientPlugins()||[],o=Math.min(...p.map(i=>i.start));return Math.max(...p.map(i=>i.end))-o});return(p,o)=>{const r=z,i=k,g=W,w=ot,N=A;return s(),m(b,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${c.value.length}`},{default:d(()=>[n("div",st,[(s(!0),m(b,null,E(c.value,(y,$)=>(s(),u(r,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:O($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",it,[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)),l(i,{duration:f.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:d(()=>[l(w)]),_:1})],64)}}});export{gt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as m,w as c,F as d}from"#entry";import{u as f,f as _}from"./vue-devtools-hb1vi95m.js";import{p as v,J as C,Y as n,X as l,u as o,$ as E,ac as I}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";import"./vue-virtual-scroller.esm-b0ym3ct8.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:a}=f(),t=m(),p=c();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=d;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{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as x}from"./state-editor-kisl1jyp.js";import{_ as b}from"./nsection-block-je23gs2w.js";import{b as y,f as C,bn as k}from"#entry";import{J as u,Y as l,a3 as e,ac as p,p as w,q as c,a4 as N,a1 as t,u as m,$ as i,F as R}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as T}from"./help-fab-chg6ox1v.js";import"./data-schema-button-hqryewml.js";import"./nicon-title-he6hzgyb.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";const B={},V={class:"markdown-body"};function D(d,n){return l(),u("div",V,[...n[0]||(n[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Runtime Configs"),e("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."),e("p",null,[p("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 "),e("code",{"v-pre":""},"nuxt.config.js"),p(" file, or check more details in the documentation.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const F=y(B,[["render",D]]),P={key:0},Y=w({__name:"runtime-configs",setup(d){const n=C(),_=k(),f=c(()=>n.value?.nuxt.payload),a=c(()=>n.value?.revision.value),v=c(()=>{const o={..._.value};return delete o.public,delete o.app,o});return(o,S)=>{const s=x,r=b,g=F,h=T;return l(),u(R,null,[m(n)?(l(),u("div",P,[t(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:i(()=>[t(s,{state:m(n).app.appConfig,revision:a.value},null,8,["state","revision"])]),_:1}),t(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:i(()=>[t(s,{state:f.value.config?.public,revision:a.value},null,8,["state","revision"])]),_:1}),t(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:i(()=>[t(s,{state:v.value,revision:a.value,readonly:""},null,8,["state","revision"])]),_:1})])):N("",!0),t(h,null,{default:i(()=>[t(g)]),_:1})],64)}}});export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b6 as S,r as k,E as M,bm as P}from"#entry";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-gd4lkf0o.js";import"./vendor/shiki-jxvjmls6.js";import"./vendor/unocss-la8bop5t.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{b8 as S,r as k,E as M,bo as P}from"#entry";import{p as A,aE as R,D as L,M as C,J as U,Y as T,u as x}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.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 Y=["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,Y))}});export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as D}from"./ncheckbox-eijyrwcq.js";import{H as F,v as O,_ as R,I as T}from"#entry";import{_ as A}from"./nselect-nvb1idpm.js";import{p as E,q as C,x as L,J as r,Y as o,a4 as m,a0 as y,F as v,ah as x,X as i,a7 as b,a1 as V,$ as g,a3 as S,ab as q,u as c,ac as $}from"./vendor/json-editor-vue-ikjc812x.js";const z={p4:"",flex:"~ col gap-4"},H={key:1,ml2:"",flex:""},J=["value"],K={key:0,flex:"","gap-4":""},M=E({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(n,{emit:U}){const _=n,d=F(_,"modelValue",U,{passive:!0}),N=C(()=>[..._.keys,"active","key","value","type"]),I=C(()=>{const t={};for(const e of N.value)t[e]=_.default[e]||"";return t}),w=["string","number","boolean","file","date","time","datetime-local"];function B(t,e){const u=e.target;if(u.files&&u.files[0]){const p=u.files[0],f=new FileReader;f.readAsDataURL(p),f.onload=()=>{d.value[t].value=f.result}}}return L(()=>d,t=>{t.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const u=Number.parseFloat(e.value);e.value=Number.isNaN(u)?0:u}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"}),(t,e)=>{const u=D,p=O,f=A,j=T,h=R;return o(),r("div",z,[(o(!0),r(v,null,x(c(d),(l,k)=>(o(),r("div",{key:k,flex:"~ gap-2","justify-around":""},[y(t.$slots,"input",{item:l}),(o(!0),r(v,null,x(N.value,s=>(o(),r(v,{key:s},[l.type!==null&&s==="active"?(o(),i(u,{key:0,modelValue:l[s],"onUpdate:modelValue":a=>l[s]=a,n:"sm primary",disabled:n.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):m("",!0),l.type!==null&&s==="key"?(o(),i(p,{key:1,modelValue:l[s],"onUpdate:modelValue":a=>l[s]=a,placeholder:s,"flex-1":"","font-mono":"",n:"sm primary",disabled:n.disabled,class:b(n.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):s==="value"?(o(),r(v,{key:2},[l.type==="file"?(o(),i(p,{key:0,type:"file",disabled:n.disabled,class:b(n.disabled?"op75":""),onChange:a=>B(k,a)},null,8,["disabled","class","onChange"])):l.type==="boolean"?(o(),r("div",H,[V(u,{modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,placeholder:"Value",n:"green lg",disabled:n.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(o(),i(p,{key:2,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,type:l.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:n.disabled,class:b(n.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):s==="type"?(o(),i(f,{key:3,modelValue:l.type,"onUpdate:modelValue":a=>l.type=a,n:"sm green",class:b(n.disabled?"op75":""),disabled:n.disabled},{default:g(()=>[(o(),r(v,null,x(w,a=>S("option",{key:a,value:a},q(a),9,J)),64))]),_:1},8,["modelValue","onUpdate:modelValue","class","disabled"])):m("",!0)],64))),128)),y(t.$slots,"input-actions",{},()=>[V(h,{n:"red",disabled:n.disabled,class:b(n.disabled?"op0!":""),onClick:s=>c(d).splice(k,1)},{default:g(()=>[V(j,{icon:"carbon:trash-can"})]),_:1},8,["disabled","class","onClick"])])]))),128)),n.disabled?m("",!0):(o(),r("div",K,[y(t.$slots,"actions",{params:c(d)},()=>[V(h,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=l=>c(d).push({...I.value}))},{default:g(()=>[...e[2]||(e[2]=[$(" Add ",-1)])]),_:1}),e[4]||(e[4]=S("div",{"flex-auto":""},null,-1)),c(d).length?(o(),i(h,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=l=>c(d).splice(0,c(d).length))},{default:g(()=>[...e[3]||(e[3]=[$(" Remove All ",-1)])]),_:1})):m("",!0)])])),y(t.$slots,"default")])}}}),W=Object.assign(M,{__name:"ServerRouteInputs"});export{W as _};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{bg as $e,I as Ee,b6 as se,bh as Ke,bi as Qe,b4 as Xe,a4 as Ye,A as Ze,f as et,w as tt,g as je,ay as ot,b5 as nt,a as at,_ as De,v as lt,i as Re,F as st,M as rt,bj as it,S as ut,n as ct,a8 as dt}from"#entry";import{_ as pt}from"./nnavbar-b4ap0r8w.js";import{_ as Ve}from"./nbadge-d24jlq2b.js";import{p as ye,k as P,J as x,Y as r,a3 as u,a0 as ft,a4 as N,a7 as M,X as E,ab as U,u as _,ac as K,a5 as vt,F as L,ah as H,E as me,x as Ie,d as Oe,C as mt,z as yt,r as ve,q as R,w as ht,aj as Ue,a1 as v,$ as T,ad as Z,a2 as gt,aw as _t,K as bt}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as xt}from"./nselect-nvb1idpm.js";import{_ as Ne}from"./server-route-inputs-e42a8bs5.js";import{_ as kt}from"./code-snippets-io8vjgte.js";import{_ as wt}from"./data-schema-button-hqryewml.js";import{_ as Ct}from"./ncode-block-pcw3yh3u.js";import{C as we,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-je23gs2w.js";import{_ as Tt}from"./ndrawer-ele5003c.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";import"./ncheckbox-eijyrwcq.js";import"./client-miiq4qin.js";import"./nicon-title-he6hzgyb.js";const $t=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),o=$e();return(n,m)=>{const f=Ee,c=Ve,b=Pe;return r(),x("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":_(o)===e.item.filepath}]),style:vt({paddingLeft:`calc(0.5rem + ${e.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,o.value=e.item.filepath})},[u("div",{class:M({"w-12":!e.item.routes}),"flex-none":"","text-left":""},[e.item.type==="collection"?(r(),E(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),E(c,{key:1,class:M(_(se)(e.item.method||"*")),textContent:U((e.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":e.item.routes}),"text-sm":"","font-mono":""},[e.item.type==="collection"?(r(),E(f,{key:0,title:`${e.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+U(e.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?ft(n.$slots,"default",{key:0},()=>[(r(!0),x(L,null,H(e.item.routes,h=>(r(),E(b,{key:h.filepath,item:h,index:e.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),Pe=Object.assign($t,{__name:"ServerRouteListItem"});function Et(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const o={},n=s||{},m=n.decode||jt;let f=0;for(;f<e.length;){const c=e.indexOf("=",f);if(c===-1)break;let b=e.indexOf(";",f);if(b===-1)b=e.length;else if(b<c){f=e.lastIndexOf(";",c-1)+1;continue}const h=e.slice(f,c).trim();if(n?.filter&&!n?.filter(h)){f=b+1;continue}if(o[h]===void 0){let i=e.slice(c+1,b).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),o[h]=Dt(i,m)}f=b+1}return o}function jt(e){return e.includes("%")?decodeURIComponent(e):e}function Dt(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,o){const n=o||{},m=n.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 c=e+"="+f;if(n.maxAge!==void 0&&n.maxAge!==null){const b=n.maxAge-0;if(Number.isNaN(b)||!Number.isFinite(b))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(b)}if(n.domain){if(!ae.test(n.domain))throw new TypeError("option domain is invalid");c+="; Domain="+n.domain}if(n.path){if(!ae.test(n.path))throw new TypeError("option path is invalid");c+="; Path="+n.path}if(n.expires){if(!Rt(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(c+="; HttpOnly"),n.secure&&(c+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{c+="; Priority=Low";break}case"medium":{c+="; Priority=Medium";break}case"high":{c+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{c+="; SameSite=Strict";break}case"lax":{c+="; SameSite=Lax";break}case"strict":{c+="; SameSite=Strict";break}case"none":{c+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(c+="; Partitioned"),c}function Rt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function A(e){if(typeof e!="object")return e;var s,o,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){o=new e.constructor;for(s in e)e.hasOwnProperty(s)&&o[s]!==e[s]&&(o[s]=A(e[s]))}else{o={};for(s in e)s==="__proto__"?Object.defineProperty(o,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):o[s]=A(e[s])}return o}if(n==="[object Array]"){for(s=e.length,o=Array(s);s--;)o[s]=A(e[s]);return o}return n==="[object Set]"?(o=new Set,e.forEach(function(m){o.add(A(m))}),o):n==="[object Map]"?(o=new Map,e.forEach(function(m,f){o.set(A(f),A(m))}),o):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(o=new RegExp(e.source,e.flags),o.lastIndex=e.lastIndex,o):n==="[object DataView]"?new e.constructor(A(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ke(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=globalThis.cookieStore;function It(e,s){const o={...Vt,...s};o.filter??=i=>i===e;const n=Se(o)||{};let m;o.maxAge!==void 0?m=o.maxAge*1e3:o.expires&&(m=o.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,c=f||n[e]===void 0||n[e]===null,b=A(f?void 0:n[e]??o.default?.()),h=m&&!f?Nt(b,m,o.watch&&o.watch!=="shallow"):P(b);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const j=(k=!1)=>{!k&&(o.readonly||Qe(h.value,n[e]))||(Ut(e,h.value,o),n[e]=A(h.value),i?.postMessage({value:o.encode(h.value)}))},I=k=>{const y=k.refresh?Se(o)?.[e]:o.decode(k.value);B=!0,h.value=y,n[e]=A(y),yt(()=>{B=!1})};let B=!1;const J=!!Oe();if(J&&me(()=>{B=!0,j(),i?.close()}),le){const k=y=>{const O=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);O&&I({value:O.value}),g&&I({value:null})};le.addEventListener("change",k),J&&me(()=>le.removeEventListener("change",k))}else i&&(i.onmessage=({data:k})=>I(k));o.watch&&Ie(h,()=>{B||j()},{deep:o.watch!=="shallow"}),c&&j(c)}return h}function Se(e={}){return Et(document.cookie,e)}function Ot(e,s,o={}){return s==null?Ce(e,s,{...o,maxAge:-1}):Ce(e,s,o)}function Ut(e,s,o={}){document.cookie=Ot(e,s,o)}const Te=2147483647;function Nt(e,s,o){let n,m,f=0;const c=o?P(e):{value:e};return Oe()&&me(()=>{m?.(),clearTimeout(n)}),mt((b,h)=>{o&&(m=Ie(c,h));function i(){f=0,clearTimeout(n);const j=s-f,I=j<Te?j:Te;n=setTimeout(()=>{if(f+=I,f<s)return i();c.value=void 0,h()},I)}return{get(){return b(),c.value},set(j){i(),c.value=j,h()}}})}const Lt={"h-full":"","w-full":"",flex:"~ col"},Pt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},At={flex:"~ gap2 items-center"},Bt={relative:"","w-full":""},qt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Mt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft={class:"hidden md:block"},zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Jt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt={key:2},Qt={key:3,border:"b base",relative:"","n-code-block":""},Xt={flex:"~ wrap","w-full":""},Yt=["onClick"],Zt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},eo={key:1,"text-xs":"",op50:""},to={key:0,"flex-auto":"","overflow-auto":""},oo={border:"~ base","h-full":"","w-full":"",rounded:""},no=["data"],ao={key:2,"flex-auto":"","overflow-auto":"",p4:""},lo={border:"~ base",rounded:""},so=["src"],ro={key:1,controls:"",rounded:""},io=["src"],uo=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const o=e,n=s,[m,f]=Xe(),c=Ye(),b=Ze(),h=et(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),j=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(j.value==="json")return JSON.stringify(i.data,null,2);if(j.value==="media"||j.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),k=tt(),y=R(()=>o.route.route?.split(/((?:\*\*)?:\w+)/g)),O=R(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(o.route.method||"GET"),C=P({}),w=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}=je("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())),d=P(),te=["input","json"],G=P(te[0]),ue=R({get:()=>w[d.value],set:a=>{w[d.value]=a}}),he=R(()=>({...W(S.value.query),...W(w.query)})),ge=R(()=>({...W(S.value.headers),...W(w.headers)})),ce=R(()=>ee.value?G.value==="json"?{...W(S.value.body),...V.value}:{...W(S.value.body),...W(w.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(D=>(D.startsWith(":")||D.startsWith("**:"))&&C.value[D]||D).join("")||"")+a;let p=b.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),_e=R(()=>Ae.value+oe.value);function W(a=[]){const t=Object.fromEntries(a.filter(({active:p,key:D,value:$})=>p&&D&&$!==void 0).map(({key:p,value:D})=>[p,D]));return Object.entries(t).length?t:void 0}async function be(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;rt("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(_e.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:ce.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 xe=R(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`,
|
|
2
|
+
`);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),p&&t.push(`headers: {
|
|
3
|
+
${p}
|
|
4
|
+
}`),ce.value&&t.push(`body: ${JSON.stringify(ce.value,null,2)}`);const D=t.length?`, {
|
|
5
|
+
${t.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map($=>` ${$}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return a.push({name:"useFetch",lang:"javascript",docs:we.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${D})`}),a.push({name:"$fetch",lang:"javascript",docs:we.nuxt.$fetch,code:`await $fetch('${oe.value}'${D})`}),a}),X=P(qe()),z=ve({key:"",value:""}),Be=R(()=>{const a=[];return O.value.length&&a.push({name:"Params",slug:"params",length:O.value.length}),a.push({name:"Query",slug:"query",length:w.query.length}),ee.value&&a.push({name:"Body",slug:"body",length:w.body.length}),a.push({name:"Headers",slug:"headers",length:w.headers.length}),a.push({name:"Cookies",slug:"cookies",length:X.value.length}),a.push({name:"Snippets",slug:"snippet"}),a});function qe(){return document.cookie.split("; ").map(a=>{const[t,p]=a.split("=");return{key:t,value:p}}).filter(a=>a.key)}function de(a,t){if(!a)return;const p=X.value.find($=>$.key===a),D=It(a);p!==void 0?t===void 0&&(X.value=X.value.filter($=>$.key!==a)):(X.value.push({key:a,value:t}),z.key="",z.value=""),D.value=t}ht(()=>{G.value==="json"&&typeof V.value=="string"&&(V.value=JSON.parse(V.value))});const pe=ot("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});nt([w,d],()=>{const a=pe.value?.find(t=>t.path===o.route.filepath);if(a){d.value||(d.value=a.tab),a.tab!==d.value&&(a.tab=d.value);const{body:t,query:p,headers:D,params:$}=a.inputs;Object.assign(w,{body:t,query:p,headers:D}),C.value=$}else{const t={path:o.route.filepath,tab:O.value.length?"params":"query",inputs:{...w,...O.value.length?{params:C.value}:{}}};pe.value.push(t),d.value||(d.value=t.tab)}},{immediate:!0,deep:!0,debounce:500});function Me(){pe.value=[],w.body=[],w.query=[],w.headers=[],C.value={},d.value=O.value.length?"params":"query"}const Fe=at();return(a,t)=>{const p=De,D=xt,$=lt,q=Ee,ke=Ne,ze=kt,He=Re,Je=st,fe=Ve,Ge=wt,We=Ct,ne=Ue("tooltip");return r(),x("div",Lt,[u("div",Pt,[u("div",At,[e.route.method?(r(),E(p,{key:0,class:M(["n-badge-base n-sm",_(se)(g.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:T(()=>[K(U(g.value.toUpperCase()),1)]),_:1},8,["class"])):(r(),E(D,{key:1,modelValue:g.value,"onUpdate:modelValue":t[0]||(t[0]=l=>g.value=l),class:M(["n-badge-base n-sm",_(se)(g.value)])},{default:T(()=>[(r(),x(L,null,H(re,l=>u("option",{key:l,class:M(_(se)(l))},U(l.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),u("div",Bt,[v($,{"model-value":oe.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),u("div",qt,[Z(v(p,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:t[1]||(t[1]=l=>_(Fe)(_e.value,"server-route-url"))},null,512),[[ne,"Copy URL"]]),Z(v(p,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:t[2]||(t[2]=l=>_(k)(e.route.filepath))},null,512),[[ne,"Open in Editor"]])])]),v(p,{"h-full":"",n:"primary solid",onClick:be},{default:T(()=>[v(q,{icon:"carbon:send"})]),_:1})])]),u("div",Mt,[(r(!0),x(L,null,H(Be.value,l=>Z((r(),E(p,{key:l.slug,class:M(d.value===l.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>d.value=l.slug},{default:T(()=>[v(q,{icon:_(Le)[l.slug]},null,8,["icon"]),u("div",Ft,[K(U(l.name)+" "+U(l?.length?`(${l.length})`:"")+" ",1),u("span",null,U(_(S)[l.slug]?.length?`(${_(S)[l.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[ne,l.name]])),128)),t[12]||(t[12]=u("div",{"flex-auto":""},null,-1)),t[13]||(t[13]=u("div",{"text-xs":"",op50:""}," Send from ",-1)),v(D,{modelValue:Q.value,"onUpdate:modelValue":t[3]||(t[3]=l=>Q.value=l),class:"n-xs",disabled:!_(h)?.app?.$fetch},{default:T(()=>[...t[11]||(t[11]=[u("option",{value:"app"}," App ",-1),u("option",{value:"devtools"}," DevTools ",-1)])]),_:1},8,["modelValue","disabled"]),Z(v(p,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Me},null,512),[[ne,"Clear Inputs Saved Cache"]])]),d.value==="params"?(r(),x("div",zt,[(r(!0),x(L,null,H(O.value,l=>(r(),x(L,{key:l},[u("div",Ht,U(l),1),v($,{modelValue:C.value[l],"onUpdate:modelValue":Y=>C.value[l]=Y,placeholder:l,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):N("",!0),d.value==="cookies"?(r(),x("div",Jt,[(r(!0),x(L,null,H(X.value,l=>(r(),x("div",{key:l.key,flex:"~ gap-4 items-center"},[v($,{placeholder:"Key...","model-value":l.key,disabled:"","op-70":""},null,8,["model-value"]),v($,{placeholder:"Value...","model-value":l.value,"flex-1":"",n:"primary",onInput:Y=>de(l.key,Y.target?.value)},null,8,["model-value","onInput"]),v(p,{title:"Delete",n:"red",onClick:Y=>de(l.key,void 0)},{default:T(()=>[v(q,{icon:"i-carbon-trash-can"})]),_:1},8,["onClick"])]))),128)),u("div",Gt,[v($,{modelValue:z.key,"onUpdate:modelValue":t[4]||(t[4]=l=>z.key=l),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v($,{modelValue:z.value,"onUpdate:modelValue":t[5]||(t[5]=l=>z.value=l),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(p,{title:"Add",n:"primary",onClick:t[6]||(t[6]=l=>de(z.key,z.value))},{default:T(()=>[v(q,{icon:"i-carbon-save"})]),_:1})])])):N("",!0),v(_(m),null,{default:T(()=>[v(ke,{modelValue:ue.value,"onUpdate:modelValue":t[9]||(t[9]=l=>ue.value=l),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:T(()=>[_(S)[d.value]?.length?(r(),x(L,{key:0},[u("div",Wt,[t[14]||(t[14]=u("div",{"w-5":"","x-divider":""},null,-1)),t[15]||(t[15]=u("div",{"flex-none":""}," Default Inputs ",-1)),v(p,{icon:"i-carbon-edit",border:!1,onClick:t[7]||(t[7]=l=>n("openDefaultInput"))}),t[16]||(t[16]=u("div",{"x-divider":""},null,-1))]),v(ke,{modelValue:_(S)[d.value],"onUpdate:modelValue":t[8]||(t[8]=l=>_(S)[d.value]=l),disabled:"",p0:""},null,8,["modelValue"])],64)):N("",!0)]),_:1},8,["modelValue"])]),_:1}),d.value==="snippet"?(r(),x("div",Kt,[xe.value.length?(r(),E(ze,{key:0,"code-snippets":xe.value},null,8,["code-snippets"])):N("",!0)])):ue.value?(r(),x("div",Qt,[d.value==="body"?(r(),x(L,{key:0},[u("div",Xt,[(r(),x(L,null,H(te,l=>u("button",{key:l,px4:"",py2:"",border:"r base",hover:"bg-active",class:M({"border-b":l!==G.value}),onClick:Y=>G.value=l},[u("div",{class:M({op30:l!==G.value}),"font-mono":""},U(l),3)],10,Yt)),64)),t[17]||(t[17]=u("div",{border:"b base","flex-auto":""},null,-1))]),G.value==="input"?(r(),E(_(f),{key:0})):G.value==="json"?(r(),E(_(_t),gt({key:1,modelValue:V.value,"onUpdate:modelValue":t[10]||(t[10]=l=>V.value=l),class:[_(c)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},a.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):N("",!0)],64)):(r(),E(_(f),{key:1}))])):N("",!0),J.value?B.value?(r(),E(Je,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:T(()=>[...t[19]||(t[19]=[K(" Fetching... ",-1)])]),_:1})):(r(),x(L,{key:6},[u("div",Zt,[t[21]||(t[21]=u("div",null,"Response",-1)),i.error?(r(),E(fe,{key:0,n:"red"},{default:T(()=>[...t[20]||(t[20]=[K(" Error ",-1)])]),_:1})):N("",!0),v(fe,{n:i.error?"orange":"green",textContent:U(i.statusCode)},null,8,["n","textContent"]),i.contentType?(r(),x("code",eo,U(i.contentType),1)):N("",!0),i.contentType==="application/json"?(r(),E(Ge,{key:2,getter:()=>({input:I.value})},null,8,["getter"])):N("",!0),t[22]||(t[22]=u("div",{"flex-auto":""},null,-1)),t[23]||(t[23]=u("div",{op50:""}," Request finished in ",-1)),v(fe,{n:"green"},{default:T(()=>[K(U(i.fetchTime)+" ms ",1)]),_:1})]),j.value==="pdf"?(r(),x("div",to,[u("div",oo,[u("object",{data:I.value,type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,no)])])):j.value!=="media"?(r(),E(We,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:I.value,lang:j.value},null,8,["code","lang"])):(r(),x("div",ao,[u("div",lo,[i.contentType.includes("image")?(r(),x("img",{key:0,rounded:"",src:I.value},null,8,so)):(r(),x("video",ro,[u("source",{src:I.value,type:"video/mp4"},null,8,io)]))])]))],64)):(r(),E(He,{key:4},{default:T(()=>[v(p,{n:"primary",onClick:be},{default:T(()=>[v(q,{icon:"carbon:send"}),t[18]||(t[18]=K(" Send request ",-1))]),_:1})]),_:1}))])}}}),co=Object.assign(uo,{__name:"ServerRouteDetails"}),po={flex:"~ gap1","text-sm":""},fo={key:0,op50:""},vo={op50:""},Vo=ye({__name:"server-routes",setup(e){const s=P(!1),o=it(),n=$e(),{selectedRoute:m,view:f,inputDefaults:c}=je("serverRoutes"),b=R(()=>{!n.value&&m.value&&(n.value=m.value.filepath);const k=o.value?.find(y=>y.filepath===n.value);return n.value!==m.value?.filepath&&k&&(m.value=k),k}),h=P(""),i=R(()=>new ut(o.value||[],{keys:["method","route"],shouldSort:!0})),j=R(()=>o.value?h.value?i.value.search(h.value).map(y=>y.item):o.value:[]),I=R(()=>{const k=[],y=(g,C)=>{g.routes=g.routes||[],g.routes.push(C)},O=(g,C)=>{const w=C?C.routes?.find(S=>S.route===g):k.find(S=>S.route===g);if(w)return w;const V={route:g,filepath:g.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return C?y(C,V):k.push(V),V};return j.value.forEach(g=>{let C,w;const V=g.filepath.split("/"),S=V.slice(V.indexOf("server")+1);if(g.type==="runtime"){S[0]="runtime";const F=V.indexOf("dist");F!==-1&&(C=V[F-1],C&&S.splice(1,0,C))}S.length>0&&S[S.length-1].includes(".")&&S.pop(),S.forEach(F=>{w=O(F,w)}),w?y(w,g):k.push(g)}),k});function B(){f.value=f.value==="tree"?"list":"tree"}function J(k){return k.charAt(0).toUpperCase()+k.slice(1)}return(k,y)=>{const O=De,g=pt,C=Pe,w=co,V=ct,S=Re,F=dt,Q=Ne,re=St,ie=Tt,ee=Ue("tooltip");return r(),x(L,null,[v(F,{"storage-key":"tab-server-routes"},{left:T(()=>[v(g,{search:h.value,"onUpdate:search":y[1]||(y[1]=d=>h.value=d),pb2:""},{actions:T(()=>[Z(v(O,{"text-lg":"",icon:_(f)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:B},null,8,["icon"]),[[ee,"Toggle View"]]),Z(v(O,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:y[0]||(y[0]=d=>s.value=!s.value)},null,512),[[ee,"Default Inputs"]])]),default:T(()=>[u("div",po,[h.value?(r(),x("span",fo,U(j.value.length)+" matched · ",1)):N("",!0),u("span",vo,U(_(o)?.length)+" routes in total",1)])]),_:1},8,["search"]),(r(!0),x(L,null,H(_(f)==="tree"?I.value:j.value,d=>(r(),E(C,{key:d.filepath,item:d},null,8,["item"]))),128))]),right:T(()=>[(r(),E(bt,{max:10},[b.value?(r(),E(w,{key:b.value.filepath,route:b.value,onOpenDefaultInput:y[2]||(y[2]=d=>s.value=!0)},null,8,["route"])):N("",!0)],1024)),b.value?N("",!0):(r(),E(S,{key:0},{default:T(()=>[v(V,{px6:"",py2:""},{default:T(()=>[...y[5]||(y[5]=[u("span",{op75:""},"Select a route to start",-1)])]),_:1})]),_:1}))]),_:1}),v(ie,{modelValue:s.value,"onUpdate:modelValue":y[3]||(y[3]=d=>s.value=d),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:y[4]||(y[4]=d=>s.value=!1)},{default:T(()=>[u("div",null,[y[6]||(y[6]=u("div",{p4:"",border:"b base"},[u("span",{"text-lg":""},"Default Inputs"),u("br"),u("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1)),(r(!0),x(L,null,H(Object.keys(_(c)),d=>(r(),E(re,{key:d,text:`${J(d)} ${_(c)[d]?.length?`(${_(c)[d].length})`:""}`,padding:!1,icon:_(Le)[d]},{default:T(()=>[v(Q,{modelValue:_(c)[d],"onUpdate:modelValue":te=>_(c)[d]=te,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Vo as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b3 as re,I as oe,g as le,b4 as ke,a4 as Oe,A as Te,w as Se,ay as we,b5 as Xe,a as Ee,_ as ce,b6 as De,v as Ce,i as fe,F as Me,M as Ie,b7 as $e,S as Le,n as Re,a8 as Ue}from"#entry";import{_ as Ae}from"./nnavbar-b4ap0r8w.js";import{_ as de}from"./nbadge-d24jlq2b.js";import{a as Ne,p as K,k as q,q as L,J as I,Y as g,a3 as m,a4 as H,a1 as k,ab as N,F as W,ah as Z,a7 as z,u as w,r as se,w as je,aj as pe,X as j,ad as G,$ as M,ac as Y,a2 as Ve,aw as He,a0 as We,a5 as Be,K as Fe}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as ve}from"./server-route-inputs-e42a8bs5.js";import{_ as qe}from"./ncode-block-pcw3yh3u.js";import{S as he}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-je23gs2w.js";import{_ as Ye}from"./ndrawer-ele5003c.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";import"./ncheckbox-eijyrwcq.js";import"./nselect-nvb1idpm.js";import"./client-miiq4qin.js";import"./nicon-title-he6hzgyb.js";var ne={exports:{}},ue;function ze(){return ue||(ue=1,(function(E,U){(function(R,T){E.exports=T()})(globalThis,()=>(()=>{var A={949:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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/,""),p=h;return e.dayOfWeekStartIndexZero?h=="7"&&(p="0"):p=(parseInt(h)-1).toString(),l.replace(h,p)}),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/,""),p=h;return e.monthStartIndexZero&&(p=(parseInt(h)+1).toString()),l.replace(h,p)});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})();d.CronParser=v}),333:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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,p=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,B=C===void 0?null:C,V=r.logicalAndDayFields,S=V===void 0?!1:V,F={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:p,use24HourTimeFormat:$,locale:B,logicalAndDayFields:S};F.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var ee=new t(e,F);return ee.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),p=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(p);break;case"2":l=e.i18n.second(p);break;case"3":l=e.i18n.third(p);break;case"4":l=e.i18n.fourth(p);break;case"5":l=e.i18n.fifth(p);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]!="*";f?e.options.logicalAndDayFields?u=e.i18n.commaOnlyOnX0(n):u=e.i18n.commaAndOnX0():u=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 p=e.split(","),$="",C=0;C<p.length;C++)if(C>0&&p.length>2&&($+=",",C<p.length-1&&($+=" ")),C>0&&p.length>1&&(C==p.length-1||p.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),p[C].indexOf("/")>-1||p[C].indexOf("-")>-1){var B=p[C].indexOf("-")>-1&&p[C].indexOf("/")==-1,V=this.getSegmentDescription(p[C],a,r,n,B?this.i18n.commaX0ThroughX1:u,i);B&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(p[C],a,r,n,u,i):$+=r(p[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var p=e.split("/");if(s=o.StringUtilities.format(n(p[1]),p[1]),p[0].indexOf("-")>-1){var S=this.generateRangeSegmentDescription(p[0],u,r);S.indexOf(", ")!=0&&(s+=", "),s+=S}else if(p[0].indexOf("*")==-1){var F=o.StringUtilities.format(i(p[0]),r(p[0]));F=F.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),F)}}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})();d.ExpressionDescriptor=y}),747:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.enLocaleLoader=void 0;var o=_(486),v=(function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y})();d.enLocaleLoader=v}),486:((b,d)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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})();d.en=_}),515:((b,d)=>{Object.defineProperty(d,"__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})();d.default=o}),823:((b,d)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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})();d.StringUtilities=_})},R={};function T(b){var d=R[b];if(d!==void 0)return d.exports;var _=R[b]={exports:{}};return A[b](_,_.exports,T),_.exports}var D={};return(()=>{var b=D;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var d=T(333),_=T(747);d.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=d.ExpressionDescriptor;var o=d.ExpressionDescriptor.toString;b.toString=o})(),D})())})(ne)),ne.exports}var Ge=ze();const Ze=Ne(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(E){const U=E,A=re(),R=q(!0),T=L(()=>Ze.toString(U.collection.cron));return(D,b)=>{const d=oe,_=de;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",p2:"","hover-bg-active":"",title:T.value,onClick:b[0]||(b[0]=o=>R.value=!R.value)},[m("div",Qe,[k(d,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":R.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[k(_,{class:"font-mono n-primary",textContent:N(E.collection.cron)},null,8,["textContent"]),m("span",et,N(T.value),1),m("span",tt,"("+N(E.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),R.value?(g(),I("ul",nt,[(g(!0),I(W,null,Z(E.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":w(A)===o}]),onClick:v=>A.value=o},N(o),11,rt),b[1]||(b[1]=m("div",{"x-divider":""},null,-1))]))),128))])):H("",!0)])}}}),at=Object.assign(ot,{__name:"CronCollection"}),it={"h-full":"","w-full":"",flex:"~ col"},st={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},ut={flex:"~ gap2 items-center"},lt={relative:"","w-full":""},ct={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ft={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},dt={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},vt={key:0,border:"b base",relative:"","n-code-block":""},ht={flex:"~ wrap","w-full":""},mt=["onClick"],yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},gt={key:1,"text-xs":"",op50:""},_t=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(E,{emit:U}){const A=E,R=U,T=q({payload:{}}),{inputDefaults:D}=le("serverRoutes"),[b,d]=ke(),_=Oe(),o=Te(),v=se({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=L(()=>JSON.stringify(v.data,null,2)),t=L(()=>v.contentType.includes("application/json")?"json":"text"),e=q(!1),a=q(!1),r=Se(),n=q(),u=["json"],i=q(u[0]),s=se({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=L({get:()=>s[n.value],set:x=>{s[n.value]=x}}),l=L(()=>({...S(D.value.query),...S(s.query)})),h=L(()=>({...S(D.value.headers)})),p=L(()=>Object.keys(T.value?.payload??{}).length?{...T.value}:void 0),$=L(()=>p.value?"POST":"GET"),C=L(()=>{let x=window?.location.origin;return x.charAt(x.length-1)==="/"&&(x=x.slice(0,-1)),x}),B=L(()=>{let x=new URLSearchParams(l.value).toString();x&&(x=`?${x}`);const c=`/_nitro/tasks/${A.task.name}${x}`;let X=o.value?.app.baseURL||"";return(X==="./"||X===".")&&(X=""),X.endsWith("/")&&(X=X.slice(0,-1)),X+c}),V=L(()=>C.value+B.value);function S(x=[]){const c=Object.fromEntries(x.filter(({active:X,key:P,value:J})=>X&&P&&J!==void 0).map(({key:X,value:P})=>[X,P]));return Object.entries(c).length?c:void 0}async function F(){a.value=!0,e.value=!0;const x=Date.now();Ie("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:p.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()-x}const ee=L(()=>{const x=[];return x.push({name:"Query",slug:"query",length:s.query.length}),x.push({name:"Body",slug:"body",length:s.body.length}),x});je(()=>{if(i.value==="json"&&typeof T.value=="string")try{T.value=JSON.parse(T.value)}catch{}});const ae=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const x=ae.value?.find(c=>c.task===A.task.name);if(x){n.value||(n.value=x.tab),x.tab!==n.value&&(x.tab=n.value);const{body:c,query:X,headers:P}=x.inputs;Object.assign(s,{body:c,query:X,headers:P})}else{const c={task:A.task.name,tab:"query",inputs:s};ae.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(x,c)=>{const X=ce,P=Ce,J=oe,ie=ve,ge=fe,_e=Me,te=de,be=qe,Q=pe("tooltip");return g(),I("div",it,[m("div",st,[m("div",ut,[G((g(),I("div",null,[k(X,{class:z(["n-badge-base n-sm",w(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[Y(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",lt,[k(P,{"model-value":B.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",ct,[G(k(X,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=O=>w(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(k(X,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=O=>w(r)(E.task.handler))},null,512),[[Q,"Open in Editor"]])])]),k(X,{"h-full":"",n:"primary solid",onClick:F},{default:M(()=>[k(J,{icon:"carbon:send"})]),_:1})])]),m("div",ft,[(g(!0),I(W,null,Z(ee.value,O=>G((g(),j(X,{key:O.slug,class:z(n.value===O.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:xe=>n.value=O.slug},{default:M(()=>[k(J,{icon:w(he)[O.slug]},null,8,["icon"]),m("div",dt,[Y(N(O.name)+" "+N(O?.length?`(${O.length})`:"")+" ",1),m("span",null,N(w(D)[O.slug]?.length?`(${w(D)[O.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,O.name]])),128))]),k(w(b),null,{default:M(()=>[k(ie,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=O=>f.value=O),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[w(D)[n.value]?.length?(g(),I(W,{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)),k(X,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=O=>R("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),k(ie,{modelValue:w(D)[n.value],"onUpdate:modelValue":c[3]||(c[3]=O=>w(D)[n.value]=O),disabled:"",p0:""},null,8,["modelValue"])],64)):H("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",vt,[n.value==="body"?(g(),I(W,{key:0},[m("div",ht,[(g(),I(W,null,Z(u,O=>m("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:z({"border-b":O!==i.value}),onClick:xe=>i.value=O},[m("div",{class:z({op30:O!==i.value}),"font-mono":""},N(O),3)],10,mt)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),j(w(d),{key:0})):i.value==="json"?(g(),j(w(He),Ve({key:1,modelValue:T.value,"onUpdate:modelValue":c[5]||(c[5]=O=>T.value=O),class:[w(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},x.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):H("",!0)],64)):(g(),j(w(d),{key:1}))])):H("",!0),a.value?e.value?(g(),j(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>[...c[11]||(c[11]=[Y(" Running... ",-1)])]),_:1})):(g(),I(W,{key:3},[m("div",yt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),j(te,{key:0,n:"red"},{default:M(()=>[...c[12]||(c[12]=[Y(" Error ",-1)])]),_:1})):H("",!0),k(te,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",gt,N(v.contentType),1)):H("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),k(te,{n:"green"},{default:M(()=>[Y(N(v.fetchTime)+" ms ",1)]),_:1})]),k(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),j(ge,{key:1},{default:M(()=>[k(X,{n:"primary",onClick:F},{default:M(()=>[k(J,{icon:"carbon:send"}),c[10]||(c[10]=Y(" Run task ",-1))]),_:1})]),_:1}))])}}}),bt=Object.assign(_t,{__name:"ServerTaskDetails"}),xt={"flex-none":"","text-left":""},kt={flex:"","items-center":"","text-sm":"","font-mono":""},Ot=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(E){const U=q(!0),A=re();return(R,T)=>{const D=oe,b=me;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":w(A)===E.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${E.index*1.5}em)`}),onClick:T[0]||(T[0]=d=>{U.value=!U.value,A.value=E.item.name})},[m("div",xt,[E.item.type==="collection"?(g(),j(D,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):H("",!0)]),m("span",kt,[E.item.type==="collection"?(g(),j(D,{key:0,title:`${E.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),j(D,{key:1,icon:"carbon:play",ml3:"",mr1:""})),Y(" "+N(E.item.name),1)])],6),T[1]||(T[1]=m("div",{"x-divider":""},null,-1)),U.value?We(R.$slots,"default",{key:0},()=>[(g(!0),I(W,null,Z(E.item.tasks,d=>(g(),j(b,{key:d.name,item:d,index:E.index+1},null,8,["item","index"]))),128))]):H("",!0)])}}}),me=Object.assign(Ot,{__name:"ServerTaskListItem"}),Tt={flex:"~ gap1","text-sm":""},St={key:0,op50:""},wt={op50:""},Wt=K({__name:"server-tasks",setup(E){const U=q(!1),A=$e(),R=L(()=>Object.keys(A.value?.tasks??{}).map(r=>({name:r,...A.value.tasks[r],type:"task"}))),T=L(()=>Object.entries(A.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),D=re(),{view:b,selectedTask:d,inputDefaults:_}=le("serverTasks"),o=L(()=>{!D.value&&d.value&&(D.value=d.value.name);const r=R.value.find(n=>n.name===D.value);return D.value!==d.value?.name&&r&&(d.value=r),r}),v=q(""),y=L(()=>new Le(R.value,{keys:["key","description"],shouldSort:!0})),t=L(()=>v.value?y.value.search(v.value).map(n=>n.item):R.value),e=L(()=>{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(p=>{s=u(p,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=ce,i=Ae,s=at,f=Ue,l=bt,h=Re,p=fe,$=ve,C=Pe,B=Ye,V=pe("tooltip");return g(),I(W,null,[k(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[k(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[k(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=S=>v.value=S),pb2:""},{actions:M(()=>[G(k(u,{"text-lg":"",icon:w(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(k(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=S=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",Tt,[v.value?(g(),I("span",St,N(t.value.length)+" matched · ",1)):H("",!0),m("span",wt,N(R.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(W,null,Z(w(b)==="tree"?e.value:t.value,S=>(g(),j(me,{key:S.name,item:S},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(W,null,Z(T.value,S=>(g(),I("li",{key:S.cron},[k(s,{collection:S},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),j(Fe,{max:10},[o.value?(g(),j(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=S=>U.value=!0)},null,8,["task"])):H("",!0)],1024)),o.value?H("",!0):(g(),j(p,{key:0},{default:M(()=>[k(h,{px6:"",py2:""},{default:M(()=>[...n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])]),_:1})]),_:1}))]),_:1}),k(B,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=S=>U.value=S),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=S=>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)),k(C,{text:`Query ${w(_).query?.length?`(${w(_).query.length})`:""}`,padding:!1,icon:w(he).query},{default:M(()=>[k($,{modelValue:w(_).query,"onUpdate:modelValue":n[3]||(n[3]=S=>w(_).query=S),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Wt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as h}from"./nicon-title-he6hzgyb.js";import{_ as ee}from"./nswitch-ls95gzk4.js";import{g as j,f as le,k as oe,l as ne,m as te,_ as ae,n as se,o as ie,t as A,r as ue}from"#entry";import{_ as de}from"./nselect-nvb1idpm.js";import{_ as re}from"./ncheckbox-eijyrwcq.js";import{_ as pe}from"./nlink-fgjzhevk.js";import{p as me,w as P,J as m,Y as d,a1 as n,a3 as o,F as v,ah as k,X as F,a4 as M,$ as t,u as a,ab as b,a7 as R,ac as U,j as p}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-m9bn8yci.js";const fe={px8:"",py6:""},ve={grid:"~ lg:cols-2 gap-x-10 gap-y-3","max-w-300":""},ge={flex:"~ col gap-2"},xe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},be={capitalize:"",op75:""},_e={"flex-auto":"","overflow-hidden":"","text-ellipsis":"","ws-nowrap":""},ye={flex:"~ col gap-2"},ce=["value"],Ve=["value"],ke=["value"],Ce={flex:"~ gap-2"},we={flex:"~ gap-2"},$e=me({__name:"settings",setup(Se){const{interactionCloseOnOutsideClick:C,showPanel:I,showHelpButtons:z,scale:D,hiddenTabs:_,pinnedTabs:u,hiddenTabCategories:y,minimizePanelInactive:w,sidebarExpanded:S,sidebarScrollable:E}=j("ui"),{openInEditor:B}=j("behavior"),c=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 Y(s,e){e?_.value=_.value.filter(r=>r!==s):_.value.push(s)}function Z(s,e){e?y.value=y.value.filter(r=>r!==s):y.value.push(s)}function q(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 V=[...u.value];V.splice(r,1),V.splice(g,0,s),u.value=V}async function G(){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 ue.clearOptions(),c.value?.app?.reload?.(),window.location.reload())}return P(()=>{c.value&&(c.value.app.frameState.value.closeOnOutsideClick=C.value)}),P(()=>{c.value&&(c.value.app.frameState.value.minimizePanelInactive=w.value)}),(s,e)=>{const r=h,g=ee,V=te,f=ae,T=se,K=ie,$=de,x=re,Q=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(a(X),([l,O])=>(d(),m(v,{key:l},[O.length?(d(),F(T,{key:0,p3:"",flex:"~ col gap-1",class:R(a(y).includes(l)?"op50 grayscale":"")},{default:t(()=>[n(g,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!a(y).includes(l),"onUpdate:modelValue":i=>Z(l,i)},{default:t(()=>[o("div",xe,[o("span",be,b(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":!a(_).includes(i.name),"onUpdate:modelValue":N=>Y(i.name,N)},{default:t(()=>[o("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","of-hidden":"","pr-4":"",class:R(a(_).includes(i.name)?"op25":"")},[n(V,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),o("span",_e,b(i.title),1),a(u).includes(i.name)?(d(),m(v,{key:0},[n(f,{icon:"i-carbon-caret-up",disabled:a(u).indexOf(i.name)===0,border:!1,onClick:N=>L(i.name,-1)},null,8,["disabled","onClick"]),n(f,{icon:"i-carbon-caret-down",disabled:a(u).indexOf(i.name)===a(u).length-1,border:!1,onClick:N=>L(i.name,1)},null,8,["disabled","onClick"])],64)):M("",!0),n(f,{icon:a(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:N=>q(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):M("",!0)],64))),128))]),o("div",ye,[e[29]||(e[29]=o("h3",{"text-lg":""}," Appearance ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:t(()=>[o("div",null,[n(K,null,{default:t(({toggle:l,isDark:O})=>[n(f,{n:"primary",onClick:l},{default:t(()=>[e[11]||(e[11]=o("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1)),U(" "+b(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($,{modelValue:a(D),"onUpdate:modelValue":e[0]||(e[0]=l=>p(D)?D.value=l:null),n:"primary"},{default:t(()=>[(d(),m(v,null,k(H,l=>o("option",{key:l[0],value:l[1]},b(l[0]),9,ce)),64))]),_:1},8,["modelValue"]),e[16]||(e[16]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),n(x,{modelValue:a(S),"onUpdate:modelValue":e[1]||(e[1]=l=>p(S)?S.value=l:null),"n-primary":""},{default:t(()=>[...e[12]||(e[12]=[o("span",null," Expand Sidebar ",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(E),"onUpdate:modelValue":e[2]||(e[2]=l=>p(E)?E.value=l:null),disabled:a(S),"n-primary":""},{default:t(()=>[...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:t(()=>[n(x,{modelValue:a(C),"onUpdate:modelValue":e[3]||(e[3]=l=>p(C)?C.value=l:null),"n-primary":""},{default:t(()=>[...e[17]||(e[17]=[o("span",null,"Close DevTools when clicking outside",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(z),"onUpdate:modelValue":e[4]||(e[4]=l=>p(z)?z.value=l:null),"n-primary":""},{default:t(()=>[...e[18]||(e[18]=[o("span",null,"Show help buttons",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(I),"onUpdate:modelValue":e[5]||(e[5]=l=>p(I)?I.value=l:null),"n-primary":""},{default:t(()=>[...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($,{modelValue:a(w),"onUpdate:modelValue":e[6]||(e[6]=l=>p(w)?w.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:t(()=>[(d(),m(v,null,k(J,l=>o("option",{key:l[0],value:l[1]},b(l[0]),9,Ve)),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($,{modelValue:a(B),"onUpdate:modelValue":e[7]||(e[7]=l=>p(B)?B.value=l:null),"n-primary":""},{default:t(()=>[(d(),m(v,null,k(W,l=>o("option",{key:l[0],value:l[1]},b(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:t(()=>[n(x,{modelValue:a(A),"onUpdate:modelValue":e[8]||(e[8]=l=>p(A)?A.value=l:null),"n-primary":""},{default:t(()=>[e[24]||(e[24]=o("span",null,"Send anonymous statistics, help us improving DevTools",-1)),n(Q,{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:t(()=>[...e[25]||(e[25]=[o("div",{"i-carbon-data-enrichment":""},null,-1),U(" Ideas & Suggestions ",-1)])]),_:1}),n(f,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:t(()=>[...e[26]||(e[26]=[o("div",{"i-carbon-debug":""},null,-1),U(" Bug Reports ",-1)])]),_:1})])]),_:1}),e[32]||(e[32]=o("h3",{mt2:"","text-lg":""}," Debug ",-1)),o("div",we,[n(f,{n:"orange",onClick:G},{default:t(()=>[...e[28]||(e[28]=[o("div",{"i-carbon-breaking-change":""},null,-1),U(" Reset Local Settings & State ",-1)])]),_:1})])])])])}}});export{$e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as m}from"./filepath-item-owlv864w.js";import{A as p}from"#entry";import{p as f,J as r,Y as n,F as o,ah as h,a3 as s,ab as d,X as x,a4 as k}from"./vendor/json-editor-vue-ikjc812x.js";const g={mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},N={"text-right":""},b={"ws-nowrap":""},v=f({__name:"StacktraceList",props:{stacktrace:{}},setup(c){const i=p();function u(a){try{let t=new URL(a).pathname;return t.startsWith("/_nuxt/")&&(t=t.slice(6)),t.startsWith("/@id/virtual:nuxt:")?`#build/${t.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):t.includes("/@fs/")?`/${t.split("/@fs/")[1]}`:(i.value?.rootDir||"")+t}catch{return a}}return(a,t)=>{const _=m;return n(),r("div",g,[(n(!0),r(o,null,h(c.stacktrace,(e,l)=>(n(),r(o,{key:l},[s("div",N,d(e.functionName||"(anonymous)"),1),s("div",b,[e.fileName?(n(),x(_,{key:0,filepath:`${u(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:""},null,8,["filepath"])):k("",!0)])],64))),128))])}}}),F=Object.assign(v,{__name:"StacktraceList"});export{F as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as m,al as o,r as n}from"#entry";import{q as s}from"./vendor/json-editor-vue-
|
|
1
|
+
import{f as m,al as o,r as n}from"#entry";import{q as s}from"./vendor/json-editor-vue-ikjc812x.js";function u(){const p=m(),a=o("getComponents",()=>n.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(a.value||[]).find(t=>t.pascalName===e.pascalName)));return s(()=>[...l.value,...a.value||[]].sort((e,t)=>e.pascalName.localeCompare(t.pascalName)))}function i(){return o("getComponentsRelationships",()=>n.getComponentsRelationships())}export{i as a,u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a4 as N,H as C,_ as O}from"#entry";import{_ as j}from"./data-schema-button-hqryewml.js";import{p as D,n as g,D as z,x as E,aj as J,J as u,Y as i,u as n,a3 as m,a4 as d,a0 as M,a7 as p,ab as k,a8 as P,a9 as R,F as _,ad as $,X as h,a1 as A,aw as F,a2 as H,z as T}from"./vendor/json-editor-vue-ikjc812x.js";const U=["open"],X={flex:"~ gap2","select-none":"","items-center":"",px4:""},Y={key:0,class:"bg-red:10 px5 py3 text-red"},q=D({__name:"StateEditor",props:{name:{},open:{type:Boolean},revision:{},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(o,{emit:x}){const s=o,r=C(s,"open",x,{passive:!0}),S=N(),l=g(),c=g();function v(e){return["number","bigint","string","boolean"].includes(typeof e)}function y(){c.value=void 0;try{l.value=v(s.state)?s.state:JSON.parse(JSON.stringify(s.state||{}))}catch(e){console.error(e),c.value=e}}z(()=>{y(),E(()=>[s.revision,s.state],([e,t])=>{v(t)?l.value=s.state:f(t,s.state)},{deep:!0})});function f(e,t){for(const a in e)Array.isArray(e[a])?t[a]=e[a].slice():typeof e[a]=="object"&&e[a]!==null?f(e[a],t[a]):t[a]=e[a]}async function V(){y(),await T()}return(e,t)=>{const a=O,w=j,B=J("tooltip");return i(),u("div",{class:"state-editor-details",open:o.name?n(r):!0},[m("div",X,[o.name?(i(),u("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:p(n(r)?"":"op50"),onClick:t[0]||(t[0]=b=>r.value=!n(r))},[m("div",{"i-carbon-chevron-right":"",transition:"",class:p(n(r)?"rotate-90 op0":"")},null,2),m("code",{px3:"",py1:"","font-mono":"",class:p(n(r)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},k(o.name),3)],2)):d("",!0),M(e.$slots,"actions",P(R({isOpen:n(r),name:o.name,state:o.state}))),n(r)?(i(),u(_,{key:1},[$(A(a,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:V},null,512),[[B,"Refresh View",void 0,{bottom:!0}]]),l.value&&!c.value?(i(),h(w,{key:0,getter:()=>({name:o.name,input:JSON.stringify(l.value)})},null,8,["getter"])):d("",!0)],64)):d("",!0)]),n(r)||!o.name?(i(),u(_,{key:0},[c.value?(i(),u("div",Y," Error: "+k(c.value),1)):(i(),h(n(F),H({key:1,modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=b=>l.value=b)},e.$attrs,{class:["json-editor-vue",[n(S)==="dark"?"jse-theme-dark":"",(o.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":s.readonly,indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"]))],64)):d("",!0)],8,U)}}}),Q=Object.assign(q,{__name:"StateEditor"});export{Q as _};
|