PageSourceSearch

https://social.louis-vallat.dev/vite/CzVQhqeJ.js

js louis-vallat.dev collected 2026-10-08 02:46:12 UTC 2,205 bytes, 1 lines download raw bytes

1import{C as b,ar as A,W as E,a0 as P,M as S,cz as v}from"./app-BAclpbpz.js";import{M as g}from"./BoIL-uk9.js";import{b as U,a as o,c as k,z as c,g as _,h as f,j as n,s as y,l as C,A as W,C as i,H as u,M as H}from"./BI8qgwQJ.js";import"./BTqQ_sdn.js";const I={class:"_spacer",style:{"--MI_SPACER-w":"700px"}},O={class:"_gaps_m"},T={class:"_gaps_m"},h={key:0},F=U({__name:"api-console",setup(j){const p=o("{}"),r=o(""),V=o([]),s=o(!1),d=o(""),m=o(!0);b("endpoints").then(t=>{V.value=t});function M(){s.value=!0;const t=v.parse(p.value);b(r.value,t,t.i||(m.value?void 0:null)).then(e=>{s.value=!1,d.value=v.stringify(e,null,2)},e=>{s.value=!1,d.value=v.stringify(e,null,2)})}function B(){b("endpoint",{endpoint:r.value},m.value?void 0:null).then(t=>{const e={};for(const l of t.params)e[l.name]=l.type==="String"?"":l.type==="Number"?0:l.type==="Boolean"?!1:l.type==="Array"?[]:l.type==="Object"?{}:null;p.value=v.stringify(e,null,2)})}const N=k(()=>[]),w=k(()=>[]);return A(()=>({title:"API console",icon:"ph-terminal-window ph-bold ph-lg"})),(t,e)=>{const l=c("MkEllipsis"),x=c("PageWithHeader");return f(),_(x,{actions:N.value,tabs:w.value},{default:n(()=>[y("div",I,[y("div",O,[y("div",T,[i(E,{modelValue:r.value,"onUpdate:modelValue":[e[0]||(e[0]=a=>r.value=a),e[1]||(e[1]=a=>B())],datalist:V.value,debounce:""},{label:n(()=>e[5]||(e[5]=[u("Endpoint")])),_:1},8,["modelValue","datalist"]),i(g,{modelValue:p.value,"onUpdate:modelValue":e[2]||(e[2]=a=>p.value=a),code:""},{label:n(()=>e[6]||(e[6]=[u("Params (JSON or JSON5)")])),_:1},8,["modelValue"]),i(P,{modelValue:m.value,"onUpdate:modelValue":e[3]||(e[3]=a=>m.value=a)},{default:n(()=>e[7]||(e[7]=[u(" With credential ")])),_:1,__:[7]},8,["modelValue"]),i(S,{primary:"",disabled:s.value,onClick:M},{default:n(()=>[s.value?(f(),_(l,{key:0})):(f(),C(H,{key:1},[e[8]||(e[8]=y("i",{class:"ph-paper-plane-tilt ph-bold ph-lg"},null,-1)),e[9]||(e[9]=u(" Send"))],64))]),_:1},8,["disabled"])]),d.value?(f(),C("div",h,[i(g,{modelValue:d.value,"onUpdate:modelValue":e[4]||(e[4]=a=>d.value=a),code:"",readonly:"",tall:""},{label:n(()=>e[10]||(e[10]=[u("Response")])),_:1},8,["modelValue"])])):W("",!0)])])]),_:1},8,["actions","tabs"])}}});export{F as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.