metacubexd/assets/Config-9NNS9COU.js

2 lines
10 KiB
JavaScript
Raw Normal View History

import{b as X,y as Z,u as R,b5 as U,D as K,d as e,i as t,ac as C,S,t as d,z as y,b6 as le,c as W,A as re,f as J,B as w,F as A,r as Y,b7 as $,g as P,b8 as ne,b9 as ae,ba as se,bb as ie,bc as ce,bd as oe,be as ue,bf as de,bg as ge,bh as he,bi as ve,bj as fe,bk as Q,bl as pe,bm as be,bn as me,b4 as xe,k as $e,bo as _e,bp as z,bq as ke,br as Ce,bs as H,bt as ye,bu as we,bv as Se,bw as j,bx as L,q as M,Z as V,K as ee,v as te,n as Ie,by as Ae,bz as De,bA as Pe,bB as Te}from"./index-Csmv4Fkv.js";import{D as Fe}from"./DocumentTitle-DG90V81t.js";var Ne=d("<input type=checkbox>"),Be=d("<input>"),Ue=d("<select>"),Ee=d('<label><span class="label-text truncate">'),Re=d("<option>A"),je=d("<option>AAAA"),Le=d("<option>MX"),Me=d('<div class="flex flex-col p-4">'),Ve=d('<div class="flex flex-col"><form class="flex gap-2 sm:flex-row"><div class="flex items-center gap-2">'),Qe=d("<div class=py-2>"),qe=d('<div class="grid grid-cols-3 gap-2"><div class=form-control></div><div class=form-control></div><div class=form-control>'),Ge=d('<form class="grid grid-cols-3 gap-2 sm:grid-cols-5">'),Oe=d('<div class="flex flex-col gap-4"><div class="grid grid-cols-3 gap-2"><div class=form-control></div><div class=form-control></div><div class=form-control></div></div><div class="grid grid-cols-2 gap-4 sm:grid-cols-3">'),N=d("<option>"),ze=d("<div class=form-control>"),He=d('<div class="flex flex-col gap-2"><div class="flex flex-col"></div><div class="flex flex-col">'),Xe=d('<div class="grid grid-cols-1 gap-4 sm:grid-cols-2"><div class="flex flex-col gap-2"><div class="flex flex-col items-center"></div><div class="flex flex-col"></div><div class="flex flex-col"></div></div><div class="flex flex-col gap-2"><div class="flex flex-col items-center">'),Ze=d('<span class="absolute -right-1 -top-1 flex h-3 w-3"><span class="absolute inline-flex h-full w-full animate-ping rounded-full bg-info opacity-75"></span><span class="inline-flex h-3 w-3 rounded-full bg-info">'),Ke=d('<div class="mx-2 grid grid-cols-2 gap-4 md:mx-0"><div class=relative><kbd class="kbd w-full"></kbd></div><div class=relative><kbd class="kbd w-full">'),We=d('<div class="mx-auto flex max-w-screen-md flex-col gap-4">');const E=a=>{const[c,r]=j(a,["class"]);return(()=>{var s=Ne();return L(s,M({get class(){return V("toggle",c.class)}},r),!1,!1),s})()},B=a=>{const[c,r]=j(a,["class"]);return(()=>{var s=Be();return L(s,M({get class(){return V("input input-bordered min-w-0",c.class)}},r),!1,!1),s})()},T=a=>{const[c,r]=j(a,["class"]);return(()=>{var s=Ue();return L(s,M({get class(){return V("select select-bordered",c.class)}},r),!1,!0),t(s,()=>ee(()=>r.children)()),s})()},I=a=>{const[c,r]=j(a,["class"]);return(()=>{var s=Ee(),f=s.firstChild;return L(s,M({get class(){return V("label",c.class)}},r),!1,!0),t(f,()=>ee(()=>r.children)()),s})()},Je=y.object({name:y.string(),type:y.string()}),Ye=()=>{const[a]=R(),c=le(),{form:r,isSubmitting:s}=W({extend:te({schema:Je}),onSubmit:n=>c.get("dns/query",{searchParams:{name:n.name,type:n.type}}).json().then(({Answer:i})=>p((i==null?void 0:i.map(({data:o})=>o))||[])).catch(i=>Ie.error(i.message))}),[f,p]=re([]);return(()=>{var n=Ve(),i=n.firstChild,o=i.firstChild;return J(r,i,()=>r),t(i,e(B,{type:"search",name:"name",class:"flex-1",placeholder:"google.com",onInput:m=>{m.target.value||p([])}}),o),t(o,e(T,{name:"type",get children(){return[Re(),je(),Le()]}}),null),t(o,e(w,{type:"submit",class:"btn-primary",get loading(){return s()},get children(){return a("dnsQuery")}}),null),t(n,e(S,{get when(){return f().length>0},get children(){var m=Me();return t(m,e(A,{get each(){return f()},children:l=>(()=>{var b=Qe();return t(b,l),b})()})),m}}),null),n})()},et=y.object({port:y.number(),"socks-port":y.number(),"redir-port":y.number(),"tproxy-port":y.number(),"mixed-port":y.number()}),tt=({isSingBox:a,fetchBackendVersion:c})=>{const[r]=R(),s=[{label:()=>r("port",{name:"Mixed"}),key:"mixed-port",onChange:l=>void $("mixed-port",Number(l.target.value),o)},{label:()=>r("port",{name:"HTTP"}),key:"port",onChange:l=>void $("port",Number(l.target.value),o)},{label:()=>r("port",{name:"