import{C as va,a as ya,P as ft,V as ga}from"./styles-ByDrHWyY.js";import{G as ha,I as ba,d as It,K as pt,M as wa,O as At,a3 as _a,a4 as Sa,a as ct,a5 as mt,U as ka,a6 as ce,o as k,b as I,f as i,w as f,a7 as vt,a8 as H,T as yt,l as Dt,e as h,a9 as Fe,aa as Ne,c as J,t as N,ab as $a,E as Pt,a1 as se,g,ac as Bt,ad as xa,u as Oa,y as Ea,z as p,ae as za,D as E,A as Ia,af as gt,h as d,S as re,a2 as me,N as Ce,B as Aa,ag as Da,ah as ht,a0 as bt,m as Pa}from"./index-BhlVWTSX.js";import{c as Ba}from"./copyToClipboard-DFtvjJ5E.js";import{h as Na,T as le,B as wt,O as _t}from"./index-BOKOWplY.js";import{t as Ca,e as Va,Z as La,d as Nt,T as Ma,B as $,s as Ua,p as Ra,h as Ha,c as ja,$ as qa,a as Fa,b as Ja,f as Wa,g as Ga,i as Ka,M as w,D as q,I as ve}from"./index-BQhUrQ6p.js";import{P as Ya,T as L,G as Ta,L as St}from"./index-D7rNDM_P.js";import{G as Xa}from"./index-CBwY3n90.js";import{P as Je}from"./index-Bb_5Q797.js";import{S as kt}from"./index-C1xMrsJH.js";import{S as Za}from"./index-BeNZQISe.js";import{T as Qa,a as $t}from"./index-UPMPAGNu.js";import{N as en,c as xt}from"./index-BnYYJNqH.js";import{N as tn}from"./Spin-DYgBgj5E.js";import{N as an,a as nn}from"./Flex-BPmjRxKz.js";import{N as rn,a as Ot}from"./CollapseItem-1OA5ve4T.js";import{N as ln}from"./Alert-DR7mK5XZ.js";import{r as sn,s as We}from"./remove-CHMnf6de.js";import{g as F,i as on,t as un,a as dn}from"./get-BbDDeVzm.js";import{i as Ke,a as fn,g as Te,u as pn,b as cn,c as mn,d as vn,s as yn,e as Ct,f as gn,r as hn,o as Vt,n as Lt,m as bn,h as wn,j as _n,k as Sn,l as kn,p as $n,q as xn,t as Mt,v as On,w as En,x as zn,y as Ut}from"./isTypedArray-B1rZa9GE.js";import"./Popselect-DEWvJyHq.js";import"./get-slot-Bk_rJcZu.js";const In=ha("input-group-label",`
 position: relative;
 user-select: none;
 -webkit-user-select: none;
 box-sizing: border-box;
 padding: 0 12px;
 display: inline-block;
 border-radius: var(--n-border-radius);
 background-color: var(--n-group-label-color);
 color: var(--n-group-label-text-color);
 font-size: var(--n-font-size);
 line-height: var(--n-height);
 height: var(--n-height);
 flex-shrink: 0;
 white-space: nowrap;
 transition: 
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
`,[ba("border",`
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 border-radius: inherit;
 border: var(--n-group-label-border);
 transition: border-color .3s var(--n-bezier);
 `)]),An=Object.assign(Object.assign({},At.props),{size:String,bordered:{type:Boolean,default:void 0}}),Dn=It({name:"InputGroupLabel",props:An,setup(e){const{mergedBorderedRef:a,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedComponentPropsRef:o}=wa(e),m=At("Input","-input-group-label",In,_a,e,n),{mergedSizeRef:l}=Sa(e,{mergedSize(S){var O,x;if(e.size!==void 0)return e.size;if(S)return S.mergedSize.value;const A=(x=(O=o?.value)===null||O===void 0?void 0:O.Input)===null||x===void 0?void 0:x.size;return A||"medium"}}),c=ct(()=>{const{value:S}=l,{common:{cubicBezierEaseInOut:O},self:{groupLabelColor:x,borderRadius:A,groupLabelTextColor:b,lineHeight:B,groupLabelBorder:C,[mt("fontSize",S)]:X,[mt("height",S)]:U}}=m.value;return{"--n-bezier":O,"--n-group-label-color":x,"--n-group-label-border":C,"--n-border-radius":A,"--n-group-label-text-color":b,"--n-font-size":X,"--n-line-height":B,"--n-height":U}}),y=r?ka("input-group-label",ct(()=>l.value[0]),c,e):void 0;return{mergedClsPrefix:n,mergedBordered:a,cssVars:r?void 0:c,themeClass:y?.themeClass,onRender:y?.onRender}},render(){var e,a,n;const{mergedClsPrefix:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),pt("div",{class:[`${r}-input-group-label`,this.themeClass],style:this.cssVars},(n=(a=this.$slots).default)===null||n===void 0?void 0:n.call(a),this.mergedBordered?pt("div",{class:`${r}-input-group-label__border`}):null)}}),Pn=({state:e,designConfig:a,props:n,constants:r})=>()=>{var o;return e.width?e.width+"px":n.width||((o=a?.constants)==null?void 0:o.DEFAULT_WIDTH)||r.DEFAULT_WIDTH},Bn=({state:e,designConfig:a,props:n,constants:r})=>()=>{var o;return e.height?e.height+"px":n.height||((o=a?.constants)==null?void 0:o.DEFAULT_HEIGHT)||r.DEFAULT_HEIGHT},Nn=({api:e})=>(a=!0)=>{e.handleClose("close",typeof a=="boolean"?a:!1)},Cn=({state:e,emit:a})=>()=>{e.visible||a("closed")},Vn=({props:e,parent:a,api:n})=>r=>{if(r?n.open():n.close(),r){const o=a.$el;e.appendToBody&&document.body.appendChild(o)}},Ln=({state:e,emit:a,vm:n})=>()=>{e.visible||setTimeout(()=>{e.visible=!0,a("open",n),a("update:visible",!0)},0)},Mn=({api:e})=>()=>{e.handleClose("confirm")},Un=({emit:e,props:a,state:n})=>(r,o)=>{const m=r==="mask"&&!a.maskClosable,l=!o&&typeof a.beforeClose=="function"&&a.beforeClose(r)===!1;m||l||n.visible&&(n.visible=!1,setTimeout(()=>{e("update:visible",!1),e(["close","confirm"].includes(r)?r:"close")},200))},Rn=({api:e,state:a,props:n})=>r=>{a.visible&&n.closeOnPressEscape&&(r.key==="Escape"||r.key==="Esc")&&e.handleClose("esc",!0)},Hn=({api:e})=>()=>{document.addEventListener("keydown",e.keydown)},jn=({api:e})=>()=>{document.removeEventListener("keydown",e.keydown)},qn=({state:e,vm:a})=>n=>{n.preventDefault();const r=n.touches?n.touches[0]:n,o=a.$refs.drawerBox;e.dragEvent.isDrag=!0,e.dragEvent.x=r.clientX,e.dragEvent.y=r.clientY,e.dragEvent.offsetWidth=o.offsetWidth,e.dragEvent.offsetHeight=o.offsetHeight},Fn=({state:e,props:a,emit:n})=>La(1,r=>{if(!e.dragEvent.isDrag)return;r.preventDefault();const{placement:o}=a,{dragEvent:{x:m,y:l,offsetWidth:c,offsetHeight:y}}=e,{touches:S,targetTouches:O,changedTouches:x}=r,A=S&&S[0]||O&&O[0]||x&&x[0],{clientX:b,clientY:B}=A||r,C=b-m,X=B-l;if(o==="left")e.width=c+C;else if(o==="right")e.width=c-C;else if(o==="top"){const U=y+X;e.height=U>10?U:10}else if(o==="bottom"){const U=y-X;e.height=U>10?U:10}n("drag",{width:e.width,height:e.height})}),Jn=({state:e})=>a=>{e.dragEvent.isDrag&&(a.preventDefault(),e.dragEvent.isDrag=!1)},Wn=({api:e,vm:a})=>()=>{const n=a.$refs.dragBar;n.addEventListener("mousedown",e.mousedown),document.addEventListener("mousemove",e.mousemove),document.addEventListener("mouseup",e.mouseup),n.addEventListener("touchstart",e.mousedown),n.addEventListener("touchmove",e.mousemove),n.addEventListener("touchend",e.mouseup)},Gn=({api:e,vm:a})=>()=>{const n=a.$refs.dragBar;n.removeEventListener("mousedown",e.mousedown),document.removeEventListener("mousemove",e.mousemove),document.removeEventListener("mouseup",e.mouseup),n.removeEventListener("touchstart",e.mousedown),n.removeEventListener("touchmove",e.mousemove),n.removeEventListener("touchend",e.mouseup)},Kn=e=>()=>{Va(document.body,e)},Yn=e=>()=>{Ca(document.body,e)},Tn=["state","close","closed","confirm","handleClose","open"],Xn=(e,{reactive:a,watch:n,onMounted:r,onBeforeUnmount:o,computed:m},{emit:l,vm:c,mode:y,parent:S,constants:O,designConfig:x})=>{const A=O.SCROLL_LOCK_CLASS(y),b={},B=a({visible:!1,width:0,height:0,dragEvent:{x:0,y:0,isDrag:!1,offsetWidth:0,offsetHeight:0},computedWidth:m(()=>b.computedWidth()),computedHeight:m(()=>b.computedHeight())});return Object.assign(b,{state:B,open:Ln({state:B,emit:l,vm:c}),confirm:Mn({api:b}),close:Nn({api:b}),closed:Cn({state:B,emit:l}),handleClose:Un({emit:l,props:e,state:B}),mousedown:qn({state:B,vm:c}),mousemove:Fn({state:B,props:e,emit:l}),mouseup:Jn({state:B}),keydown:Rn({api:b,state:B,props:e}),addKeydownEvent:Hn({api:b}),removeKeydownEvent:jn({api:b}),addDragEvent:Wn({api:b,vm:c}),removeDragEvent:Gn({api:b,vm:c}),watchVisible:Vn({props:e,parent:S,api:b}),showScrollbar:Kn(A),hideScrollbar:Yn(A),computedWidth:Pn({state:B,designConfig:x,props:e,constants:O}),computedHeight:Bn({state:B,designConfig:x,props:e,constants:O})}),r(()=>{const C=S.$el;e.appendToBody&&C&&C.parentNode!==document.body&&document.body.appendChild(C),e.dragable&&b.addDragEvent(),b.addKeydownEvent(),e.lockScroll&&e.visible&&b.showScrollbar()}),o(()=>{e.dragable&&b.removeDragEvent(),b.removeKeydownEvent(),e.lockScroll&&b.hideScrollbar();const C=S.$el;e.appendToBody&&C&&C.parentNode&&C.parentNode.removeChild(C)}),n(()=>e.visible,b.watchVisible,{immediate:!0}),n(()=>e.width,()=>B.width=0),b};function Zn(e,a){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Qn(e))||a){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qn(e,a){if(e){if(typeof e=="string")return Et(e,a);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Et(e,a):void 0}}function Et(e,a){(a==null||a>e.length)&&(a=e.length);for(var n=0,r=Array(a);n<a;n++)r[n]=e[n];return r}var er=function(a,n){for(var r=a.__vccOpts||a,o=Zn(n),m;!(m=o()).done;){var l=m.value,c=l[0],y=l[1];r[c]=y}return r},tr=Nt({components:{TinyButton:$,TinyTooltip:Ma,IconClose:ja(),IconHelpCircle:Na(),SlotWrapper:{props:["node"],render:function(){var a=this.node;return typeof a=="function"?a(Ha):a}}},props:[].concat(Ra,["visible","appendToBody","title","showHeader","showFooter","customClass","placement","width","height","mask","dragable","maskClosable","lockScroll","flex","showClose","zIndex","beforeClose","tipsProps","customSlots","closeOnPressEscape"]),emits:["update:visible","open","close","closed","confirm","drag"],setup:function(a,n){return Ua({props:a,context:n,renderless:Xn,api:Tn})}}),ar={"data-tag":"tiny-drawer",class:"tiny-drawer"},nr={class:"tiny-drawer__box"},rr={key:0,"data-tag":"drawer-header",ref:"header",class:"tiny-drawer__header-wrapper"},lr={key:1,class:"tiny-drawer__header"},sr={class:"tiny-drawer__header-left"},or={key:0,class:"tiny-drawer__title"},ir={class:"tiny-drawer__header-right"},ur={key:1,"data-tag":"drawer-footer",ref:"footer",class:"tiny-drawer__footer"};function dr(e,a,n,r,o,m){var l=ce("slot-wrapper"),c=ce("icon-help-circle"),y=ce("tiny-tooltip"),S=ce("icon-close"),O=ce("tiny-button");return k(),I("div",ar,[i(yt,{name:"drawer-fade"},{default:f(function(){return[e.mask&&e.state.visible?(k(),I("div",{key:0,ref:"mask","aria-hidden":"true",class:"tiny-drawer__mask show-bg-color",style:vt({zIndex:e.zIndex}),onClick:a[0]||(a[0]=function(x){return e.handleClose("mask")})},null,4)):H("v-if",!0)]}),_:1}),i(yt,{name:"drawer-slide-"+e.placement,onAfterLeave:e.closed,persisted:""},{default:f(function(){return[Dt(h("div",{"data-tag":"tiny-drawer-main",ref:"drawerBox","aria-modal":"true",role:"dialog",class:Fe(["tiny-drawer__main",{"is-left":e.placement==="left","is-right":e.placement==="right","is-top":e.placement==="top","is-bottom":e.placement==="bottom","drag-effects":!e.state.dragEvent.isDrag,toggle:e.state.visible},"tiny-drawer-main",e.customClass]),style:vt({width:["left","right"].includes(e.placement)?e.state.computedWidth:null,height:["top","bottom","left","right"].includes(e.placement)||e.dragable?e.state.computedHeight:null,zIndex:e.zIndex,transform:e.state.visible?"none":null})},[e.dragable?(k(),I("div",{key:0,"data-tag":"drawer-drag-bar",ref:"dragBar",class:Fe(["tiny-drawer__drag-bar",["left","right"].includes(e.placement)&&"p-left-Right",["top","bottom"].includes(e.placement)&&"p-top-Bottom",e.placement==="left"&&"p-left",e.placement==="right"&&"p-right",e.placement==="top"&&"p-top",e.placement==="bottom"&&"p-bottom"])},null,2)):H("v-if",!0),h("div",nr,[e.showHeader?(k(),I("div",rr,[Ne(e.$slots,"header",{},function(){var x;return[(x=e.customSlots)!=null&&x.header?(k(),J(l,{key:0,node:e.customSlots.header},null,8,["node"])):(k(),I("div",lr,[h("div",sr,[e.title?(k(),I("div",or,N(e.title),1)):H("v-if",!0),e.tipsProps?(k(),J(y,$a(Pt({key:1},e.tipsProps)),{default:f(function(){return[i(c,{class:"tiny-drawer__help-icon"})]}),_:1},16)):H("v-if",!0)]),h("div",ir,[Ne(e.$slots,"header-right",{},function(){var A;return[(A=e.customSlots)!=null&&A.headerRight?(k(),J(l,{key:0,node:e.customSlots.headerRight},null,8,["node"])):H("v-if",!0)]})])]))]}),e.showClose?(k(),I("button",{key:0,type:"button",class:"tiny-drawer__headerbtn","aria-label":"Close",onClick:a[1]||(a[1]=function(x){return e.handleClose("close")})},[i(S,{role:"img","aria-label":"close",class:"tiny-svg-size tiny-drawer__close"})])):H("v-if",!0)],512)):H("v-if",!0),h("div",{"data-tag":"drawer-body",ref:"body",class:Fe(["tiny-drawer__body",{"flex flex-col":e.flex},"drawer-body"])},[Ne(e.$slots,"default",{},function(){var x;return[i(l,{node:(x=e.customSlots)==null?void 0:x.default},null,8,["node"])]})],2),e.showFooter?(k(),I("div",ur,[Ne(e.$slots,"footer",{},function(){var x;return[(x=e.customSlots)!=null&&x.footer?(k(),J(l,{key:0,node:e.customSlots.footer},null,8,["node"])):(k(),I(se,{key:1},[i(O,{class:"tiny-drawer__cancel-btn",onClick:a[2]||(a[2]=function(A){return e.handleClose("cancel")})},{default:f(function(){return[g(N(e.t("ui.button.cancel")),1)]}),_:1}),i(O,{type:"primary",class:"tiny-drawer__confirm-btn",onClick:a[3]||(a[3]=function(A){return e.handleClose("confirm")})},{default:f(function(){return[g(N(e.t("ui.button.confirm")),1)]}),_:1})],64))]})],512)):H("v-if",!0)])],6),[[Bt,e.state.visible]])]}),_:3},8,["name","onAfterLeave"])])}var Ge=er(tr,[["render",dr]]),fr={TINY_MODE:"pc"};function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var n=arguments[a];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(null,arguments)}var pr=function(a){var n,r=typeof process=="object"?(n=fr)==null?void 0:n.TINY_MODE:null;return Ge},Rt={SCROLL_LOCK_CLASS:function(a){var n={"mobile-first":"overflow-hidden",pc:"popup-parent--hidden dialog-box__scroll-lock"};return n[a]||""},DEFAULT_WIDTH:"500px",DEFAULT_HEIGHT:"100vh"},cr=ye({},Ja,{_constants:{type:Object,default:function(){return Rt}},appendToBody:{type:Boolean,default:function(){return!1}},visible:{type:Boolean,default:!1},customClass:[String,Object,Array],placement:{type:String,default:"right"},width:{type:String},height:{type:String},title:String,showClose:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},dragable:Boolean,lockScroll:{type:Boolean,default:!0},flex:{type:Boolean,default:!1},zIndex:{type:Number,default:2e3},beforeClose:Function,tipsProps:Object,customSlots:Object}),W=Nt({name:Fa+"Drawer",props:cr,setup:function(a,n){return qa({props:a,context:n,template:pr})}}),mr={customClass:null,placement:"right",width:null,height:null,title:"",showClose:!0,showHeader:!0,showFooter:!1,mask:!0,maskClosable:!0,dragable:!1,lockScroll:!0,flex:!1,zIndex:2e3,beforeClose:null,tipsProps:null},Ht=function(a){var n;a===void 0&&(a={});var r={onOpen:function(y){var S;typeof((S=a.events)==null?void 0:S.open)=="function"&&a.events.open(y)},onClose:function(y){var S;typeof((S=a.events)==null?void 0:S.close)=="function"&&a.events.close(y)},onConfirm:function(y){var S;typeof((S=a.events)==null?void 0:S.confirm)=="function"&&a.events.confirm(y)}},o=ye({},mr,a,r),m=Ga({component:W,propsData:ye({},o,{_constants:Rt,tiny_mode:a.tiny_mode||((n=Ka().tiny_mode)==null?void 0:n.value)}),el:document.createElement("div")}),l=document.body;return l.appendChild(m.$el),xa(function(){m.open()}),m},vr="3.undefined";W.model={prop:"visible",event:"update:visible"};W.service=Ht;W.install=function(e){e.component(W.name,W)};W.version=vr;Wa.TINYDrawer={init:function(a){var n=a.$apiPrefix||"$";a[n+"drawer"]=Ht}};function jt(e){return e}function yr(e){return function(a){return F(a,e)}}function gr(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function zt(e,a){return e===a||Number.isNaN(e)&&Number.isNaN(a)}function qt(e,a,n){return typeof n!="function"?qt(e,a,()=>{}):Ye(e,a,function r(o,m,l,c,y,S){const O=n(o,m,l,c,y,S);return O!==void 0?!!O:Ye(o,m,r,S)},new Map)}function Ye(e,a,n,r){if(a===e)return!0;switch(typeof a){case"object":return hr(e,a,n,r);case"function":return Object.keys(a).length>0?Ye(e,{...a},n,r):zt(e,a);default:return gr(e)?typeof a=="string"?a==="":!0:zt(e,a)}}function hr(e,a,n,r){if(a==null)return!0;if(Array.isArray(a))return Ft(e,a,n,r);if(a instanceof Map)return br(e,a,n,r);if(a instanceof Set)return wr(e,a,n,r);const o=Object.keys(a);if(e==null||Ke(e))return o.length===0;if(o.length===0)return!0;if(r?.has(a))return r.get(a)===e;r?.set(a,e);try{for(let m=0;m<o.length;m++){const l=o[m];if(!Ke(e)&&!(l in e)||a[l]===void 0&&e[l]!==void 0||a[l]===null&&e[l]!==null||!n(e[l],a[l],l,e,a,r))return!1}return!0}finally{r?.delete(a)}}function br(e,a,n,r){if(a.size===0)return!0;if(!(e instanceof Map))return!1;for(const[o,m]of a.entries()){const l=e.get(o);if(n(l,m,o,e,a,r)===!1)return!1}return!0}function Ft(e,a,n,r){if(a.length===0)return!0;if(!Array.isArray(e))return!1;const o=new Set;for(let m=0;m<a.length;m++){const l=a[m];let c=!1;for(let y=0;y<e.length;y++){if(o.has(y))continue;const S=e[y];let O=!1;if(n(S,l,m,e,a,r)&&(O=!0),O){o.add(y),c=!0;break}}if(!c)return!1}return!0}function wr(e,a,n,r){return a.size===0?!0:e instanceof Set?Ft([...e],[...a],n,r):!1}function Jt(e,a){return qt(e,a,()=>{})}function _r(e){return Object.getOwnPropertySymbols(e).filter(a=>Object.prototype.propertyIsEnumerable.call(e,a))}function Sr(e,a){return T(e,void 0,e,new Map,a)}function T(e,a,n,r=new Map,o=void 0){const m=o?.(e,a,n,r);if(m!==void 0)return m;if(Ke(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const l=new Array(e.length);r.set(e,l);for(let c=0;c<e.length;c++)l[c]=T(e[c],c,n,r,o);return Object.hasOwn(e,"index")&&(l.index=e.index),Object.hasOwn(e,"input")&&(l.input=e.input),l}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const l=new RegExp(e.source,e.flags);return l.lastIndex=e.lastIndex,l}if(e instanceof Map){const l=new Map;r.set(e,l);for(const[c,y]of e)l.set(c,T(y,c,n,r,o));return l}if(e instanceof Set){const l=new Set;r.set(e,l);for(const c of e)l.add(T(c,void 0,n,r,o));return l}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(fn(e)){const l=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,l);for(let c=0;c<e.length;c++)l[c]=T(e[c],c,n,r,o);return l}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const l=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,l),M(l,e,n,r,o),l}if(typeof File<"u"&&e instanceof File){const l=new File([e],e.name,{type:e.type});return r.set(e,l),M(l,e,n,r,o),l}if(typeof Blob<"u"&&e instanceof Blob){const l=new Blob([e],{type:e.type});return r.set(e,l),M(l,e,n,r,o),l}if(e instanceof Error){const l=new e.constructor;return r.set(e,l),l.message=e.message,l.name=e.name,l.stack=e.stack,l.cause=e.cause,M(l,e,n,r,o),l}if(e instanceof Boolean){const l=new Boolean(e.valueOf());return r.set(e,l),M(l,e,n,r,o),l}if(e instanceof Number){const l=new Number(e.valueOf());return r.set(e,l),M(l,e,n,r,o),l}if(e instanceof String){const l=new String(e.valueOf());return r.set(e,l),M(l,e,n,r,o),l}if(typeof e=="object"&&kr(e)){const l=Object.create(Object.getPrototypeOf(e));return r.set(e,l),M(l,e,n,r,o),l}return e}function M(e,a,n=e,r,o){const m=[...Object.keys(a),..._r(a)];for(let l=0;l<m.length;l++){const c=m[l],y=Object.getOwnPropertyDescriptor(e,c);(y==null||y.writable)&&(e[c]=T(a[c],c,n,r,o))}}function kr(e){switch(Te(e)){case Ut:case zn:case En:case On:case Mt:case xn:case $n:case kn:case Sn:case _n:case wn:case bn:case Lt:case Vt:case hn:case gn:case Ct:case yn:case vn:case mn:case cn:case pn:return!0;default:return!1}}function $r(e){return T(e,void 0,e,new Map,void 0)}function xr(e){return e=$r(e),a=>Jt(a,e)}function Or(e,a){return Sr(e,(n,r,o,m)=>{if(typeof e=="object"){if(Te(e)===Vt&&typeof e.constructor!="function"){const l={};return m.set(e,l),M(l,e,o,m),l}switch(Object.prototype.toString.call(e)){case Lt:case Ct:case Mt:{const l=new e.constructor(e?.valueOf());return M(l,e),l}case Ut:{const l={};return M(l,e),l.length=e.length,l[Symbol.iterator]=e[Symbol.iterator],l}default:return}}})}function Er(e){return Or(e)}const zr=/^(?:0|[1-9]\d*)$/;function Ir(e,a=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<a;case"symbol":return!1;case"string":return zr.test(e)}}function Ar(e){return e!==null&&typeof e=="object"&&Te(e)==="[object Arguments]"}function Dr(e,a){let n;if(Array.isArray(a)?n=a:typeof a=="string"&&on(a)&&e?.[a]==null?n=un(a):n=[a],n.length===0)return!1;let r=e;for(let o=0;o<n.length;o++){const m=n[o];if((r==null||!Object.hasOwn(r,m))&&!((Array.isArray(r)||Ar(r))&&Ir(m)&&m<r.length))return!1;r=r[m]}return!0}function Pr(e,a){switch(typeof e){case"object":{Object.is(e?.valueOf(),-0)&&(e="-0");break}case"number":{e=dn(e);break}}return a=Er(a),function(n){const r=F(n,e);return r===void 0?Dr(n,e):a===void 0?r===void 0:Jt(r,a)}}function Br(e){if(e==null)return jt;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?Pr(e[0],e[1]):xr(e);case"string":case"symbol":case"number":return yr(e)}}function Nr(e,a=jt){return sn(e,Br(a))}const Cr={style:{width:"40%","margin-bottom":"10px",display:"flex"}},Vr={style:{"margin-right":"10px",width:"90vw"}},Lr={style:{height:"250px"}},Mr={style:{"margin-top":"10px"}},Ur={style:{width:"30%","margin-bottom":"10px",display:"flex"}},Rr={style:{"margin-right":"10px"}},Hr={style:{height:"90%"}},jr={id:"tiny-basic-loading",style:{width:"100%",height:"100%"}},qr={class:"split-v-model"},Fr={style:{padding:"10px"}},Jr={style:{height:"35vh"}},Wr={style:{height:"35vh"}},Gr={style:{height:"35vh"}},Kr={style:{"margin-top":"10px","margin-left":"10px"}},Yr={style:{"margin-top":"5px"}},Tr={style:{"margin-top":"10px"}},Xr={style:{"margin-top":"10px"}},Zr={style:{"margin-top":"5px"}},Qr={style:{"margin-top":"10px"}},el={style:{"margin-top":"5px"}},tl={key:0,style:{"margin-top":"15px"}},al={style:{"max-height":"60vh"}},nl=It({name:"apimanager",__name:"index",setup(e){Oa();const{protocol:a,hostname:n,port:r}=Ea(),o=`${a}://${n}:${r}`,m={automaticLayout:!0,formatOnType:!0,formatOnPaste:!0};p("// some code...");const l=za(),c=u=>l.value=u,y=p(!1),S={name:[{required:!0,message:"名称必填"},{min:3,max:50,message:"名称长度在 3 到 50 个字符"}],parames:[{required:!0,message:"参数必填"}]},O=p(1),x=p({seqSerial:!0,editConfig:{trigger:"click",mode:"cell",showStatus:!0},editRules:S,validConfig:{message:"tooltip"},fetchData:{api:C},toolbar:{size:"small",resizable:!0,component:Xa,buttons:[{code:"reload",name:"刷新",type:"info"},{code:"copy",name:"复制"},{code:"delete",name:"删除"},{code:"cancel",name:"取消选择"},{code:"save",name:"保存"},{code:"debug",name:"运行",type:"success"},{code:"mcp",name:"发布为智能体工具",type:"success"}]},events:{toolbarButtonClick:X},pager:{component:Ya,attrs:{currentPage:1,pageSize:10,pageSizes:[10,20,50],total:0,layout:"total, sizes, prev, pager, next, jumper"}},columns:[{type:"selection",width:"50"},{field:"name",title:"名称",showOverflow:!0,editor:{component:"input",autoselect:!0},width:"250"},{field:"code",title:"编码"},{field:"typeName",title:"类型",renderer:{component:le,attrs:{size:"small ",effect:"dark"}}},{field:"detail",title:"",renderer:{component:$,attrs:{type:"success",text:"查看",size:"small"}},width:"120"},{field:"edit",title:"",renderer:{component:$,attrs:{type:"info",text:"再次编辑",size:"small"}},width:"140"},{field:"addbiz",title:"",renderer:{component:$,attrs:{type:"success",text:"加入业务模块",size:"small"}}}]}),A=p(""),b=p();function B(u){O.value=u.currentPage}function C({page:u}){const{currentPage:t,pageSize:_}=u,v=(t-1)*_;return new Promise(async D=>{const P=await E({url:`${o}/api/apimanager/queryPage`,method:"get",params:{limit:_,offset:v,searchVal:A.value,type:"all"}});P.data.forEach(s=>{s.type=="1"||s.type=="2"?s.typeName="数据组件":s.typeName="工作流"}),b.value.clearScroll(),D({result:P.data,page:{total:P.response.data.total}})})}async function X({code:u,$grid:t}){const _=t.getData(),v=t.getSelectRecords(),D=t.getUpdateRecords().concat(t.getInsertRecords());switch(u){case"reload":{t.handleFetch("reload"),w.success("刷新成功");break}case"insert":b.value.insert({});break;case"copy":{if(v.length===0){L.alert("请至少选中一条记录");break}v.forEach(P=>{delete P._RID,delete P.code}),t.insert(v),w.success("复制成功");break}case"cancel":{t.clearSelection();break}case"delete":{if(v.length===0){L.alert("请至少选中一条记录");break}y.value=!0;try{v.forEach(async P=>{await E({url:`${o}/api/apimanager/delete`,method:"post",data:{code:P.code}})}),y.value=!1}catch{y.value=!1}w.success("删除成功"),t.removeSelecteds();break}case"save":{if(D.length===0){L.alert("没有修改记录");break}b.value.validate(P=>{if(P){y.value=!0;try{D.forEach(async s=>{await E({url:`${o}/api/apimanager/save`,method:"post",data:s})}),y.value=!1}catch{y.value=!1}w.success("保存成功")}else L.alert("校验不通过")});break}case"debug":{if(ie.value=!1,v.length===0||v.length>1){L.alert("请选中一条记录");break}const P=JSON.parse(v[0].parames);Z.value=JSON.stringify(P,null,4),be.value=v[0].code,v[0].simplify&&v[0].simplify.length>0?V.value=nt(JSON.parse(v[0].simplify)):V.value=[],j.value=!0;break}case"code":{if(v.length===0||v.length>1){L.alert("请选中一条记录");break}oe.value=!0;break}case"edit":break;case"export":{b.value.exportCsv({filename:"table.csv",original:!0,isHeader:!1,useTabs:!1,data:_});break}case"mcp":{if(v.length===0||v.length>1){L.alert("请选中一条记录");break}ae.value="",fe.value="",te.value=!0;break}}}function U(){b.value.handleFetch("reload")}const Ve=p(!1);function Wt(){Ve.value=!1}function Xe(u){if(typeof u=="string")try{const t=JSON.parse(u);return!!(typeof t=="object"&&t)}catch{return!1}}const ge=p(""),Ze=p({}),Qe=p();function Gt(){Xe(ge.value)&&(Ze.value=JSON.parse(ge.value),Qe.value=xt.createId())}const he=p(""),et=p({}),tt=p();function Kt(u){Xe(he.value)&&(et.value=u,tt.value=xt.createId(),Pe.value=he.value)}const oe=p(!1),j=p(!1),at=p(.4),be=p(""),Z=p(""),R=p(null),ie=p(!1);async function Yt(){if(!ie.value){const u=b.value.getSelectRecords();if(u.length===0||u.length>1){L.alert("请选中一条记录");return}}try{R.value=St.service({target:document.getElementById("tiny-basic-loading")});let u=null,t=!1,_="";try{const v={inputs:JSON.parse(Z.value)};let D=!0;bt(V.value)&&V.value.forEach(s=>{(!s.key||s.key.length==0)&&(D=!1),(!s.value||s.value.length==0)&&(D=!1)}),D&&(We(v,"inputs",de(V.value)),he.value=JSON.stringify(de(V.value))),Kt(de(V.value)),u=(await E({url:ie.value?`${o}/api/proxy/${st.value}/${ot.value}`:`${o}/api/execution/${be.value}`,method:"post",data:v})).response.data}catch(v){t=!0,_=v}t?ge.value=JSON.stringify({message:_}):(ge.value=JSON.stringify(u),Be.value=JSON.stringify(u)),Gt(),R.value.close()}catch{R.value.close(),w.error("失败")}}const Q=p(!1),ee=p(""),we=p(""),Le=p(""),_e=p(!1),Se=p("0"),ue=p(""),Me=p("");function Tt(u){if(ee.value=u.row.code,we.value=u.row.parames,Se.value=u.row.type,ue.value=u.row.sourceType,Me.value="execution",u.columnIndex==4){if(_e.value=!1,Se.value=="2"){_e.value=!0;const t=JSON.parse(u.row.flow_data);Le.value=`数据源编码：${t.poolCode}  语句：${t.sql}`}Q.value=!0}u.columnIndex==5&&(Se.value=="3"?Xt():L.alert("此类型不支持编辑")),u.columnIndex==6&&(ia(),Y.value="",ze.value=!0)}const ke=u=>{Ba(u)};function Xt(){window.open(`${o}/static/flowedit?code=${ee.value}`,"_blank")}Ia(()=>{b.value.clearScroll(),K()});const V=p([]);async function Zt(){try{if(R.value=St.service({target:document.getElementById("tiny-basic-loading")}),!bt(V.value)){L.alert("请先填写简化参数池"),R.value.close();return}let u=!0;if(V.value.forEach(_=>{(!_.key||_.key.length==0)&&(u=!1),(!_.value||_.value.length==0)&&(u=!1)}),!u){L.alert("存在空值，请检查"),R.value.close();return}if(ie.value){await E({url:`${o}/api/apimanager/save`,method:"post",data:{code:be.value,simplify:JSON.stringify(de(V.value))}}),R.value.close();return}const t=b.value.getSelectRecords();if(t.length===0||t.length>1){L.alert("请选中一条记录");return}We(t[0],"simplify",JSON.stringify(de(V.value))),We(t[0],"parames",Z.value),await E({url:`${o}/api/apimanager/save`,method:"post",data:t[0]}),b.value.handleFetch(),j.value=!j.value,R.value.close()}catch{R.value.close()}}function de(u){return u.reduce((t,_)=>(t[_.key]=_.value,t),{})}function nt(u){return Object.entries(u).map(([t,_])=>({key:t,value:_}))}const te=p(!1),ae=p(""),fe=p("");async function Qt(){if(ae.value.length==0){w.info("请输入名称");return}if(fe.value.length==0){w.info("请输入描述");return}try{const u=b.value.getSelectRecords();let t;!u[0].simplify||u[0].simplify.length==0||u[0].simplify=="[]"?t="{}":t=u[0].simplify;const v=(await E({url:`${o}/api/openai/transText`,method:"post",data:{textInput:ae.value}})).data.res;if(!v||v.length==0){w.info("保存失败，请检查大模型配置");return}await E({url:`${o}/api/mcpmanager/save`,method:"post",data:{name:ae.value,description:fe.value,paramsSchema:t,code:u[0].code,transText:v}}),w.success("保存成功")}catch{w.error("保存失败")}te.value=!1}const Ue=p("biz"),$e=p(1),G=p(!1),rt=p([]);gt(Ue,(u,t)=>{u=="biz"&&t=="all"&&K()});async function K(){G.value=!0;try{const u=await E({url:`${o}/api/apiProxymanager/queryPage`,method:"get",params:{searchVal:Re.value,limit:6,offset:($e.value-1)*6}});G.value=!1,u.data&&(rt.value=u.data);const t=u.response.data.total;t&&(lt.value=t<=6?1:Math.floor(t/6)+1)}catch{G.value=!1,w.error("查询失败")}}gt($e,(u,t)=>{K()});const xe=p(""),Oe=p(""),ne=p(!1),lt=p(1);async function ea(){if(xe.value.length==0){w.info("请输入模块名称");return}if(Oe.value.length==0){w.info("请输入一级路径");return}try{await E({url:`${o}/api/apiProxymanager/save`,method:"post",data:{name:xe.value,path1:Oe.value}}),w.success("保存成功")}catch{w.error("保存失败")}ne.value=!1,K()}const Re=p("");function ta(){K()}const pe=p(!1),He=p([]);async function aa(u){Y.value=u;try{const t=await E({url:`${o}/api/apiProxyDetail/queryAll`,method:"get",params:{path1:u}});t.data&&(He.value=t.data),pe.value=!0}catch{w.error("查询失败")}}async function na(u,t,_){try{const v=await E({url:`${o}/api/apimanager/queryByCode`,method:"post",data:{code:u}});v.data&&(ee.value=_,we.value=v.data[0].parames,Se.value=v.data[0].type,ue.value=v.data[0].sourceType,Me.value=`proxy/${t}`,_e.value=!1,Q.value=!0)}catch{w.error("查询失败")}}const st=p(""),ot=p("");async function ra(u,t,_,v){ie.value=!0,De.value=null,Pe.value="",Be.value="";try{const D=await E({url:`${o}/api/apimanager/queryByCode`,method:"post",data:{code:u}});if(D.data){const P=JSON.parse(D.data[0].parames);Z.value=JSON.stringify(P,null,4),be.value=D.data[0].code,st.value=t,ot.value=_,D.data[0].simplify&&D.data[0].simplify.length>0?V.value=nt(JSON.parse(D.data[0].simplify)):V.value=[],De.value=v,j.value=!0}}catch{w.error("查询失败")}}async function la(u){try{const t=await E({url:`${o}/api/apimanager/queryByCode`,method:"post",data:{code:u}});if(t.data&&t.data[0].sourceType&&t.data[0].sourceType.length>0){w.info("数据组件类型暂不支持编辑");return}}catch{w.error("查询失败")}window.open(`${o}/static/flowedit?code=${u}`,"_blank")}async function sa(u,t,_){try{await E({url:`${o}/api/apiProxyDetail/save`,method:"post",data:{id:u,path2:t,name:_}}),w.success("保存成功")}catch{w.error("保存失败")}}async function oa(u){try{await E({url:`${o}/api/apiProxyDetail/delete`,method:"post",data:{id:u}}),w.success("删除成功"),Nr(He.value,{id:u})}catch{w.error("删除失败")}}const Y=p(""),je=p([]),Ee=p(""),ze=p(!1);async function ia(){je.value=[];const u=await E({url:`${o}/api/apiProxymanager/queryAll`,method:"get",params:{}});u.data&&u.data.forEach(t=>{je.value.push({value:F(t,"path1"),label:F(t,"name"),disabled:!1})})}async function ua(){if(Y.value.length==0){w.info("请选择业务模块");return}if(Ee.value.length==0){w.info("请输入接口二级路径");return}try{const u=await E({url:`${o}/api/apimanager/queryByCode`,method:"post",data:{code:ee.value}});u.data&&(await E({url:`${o}/api/apimanager/saveToProxy`,method:"post",data:{name:u.data[0].name,code:u.data[0].code,path1:Y.value,path2:Ee.value}}),ze.value=!1,w.info("添加成功"))}catch{w.error("添加失败")}}async function da(u){G.value=!0;try{await E({url:`${o}/api/apiProxymanager/deleteAll`,method:"post",data:{path1:u}}),K(),G.value=!1,w.info("删除成功")}catch{G.value=!1,w.error("删除失败")}}const Ie=p(""),Ae=p(!1),it=p(),ut=p(),qe=p([]);async function fa(u,t){it.value=u,ut.value=t,Ae.value=!0,ca()}async function pa(){if(Ie.value.length==0){w.warning("请选择AppId/AppSecret");return}try{const t=await(await fetch(`${o}/api/openapi/exportMarkDown`,{method:"POST",headers:{"Content-Type":"application/json;charset=utf-8"},body:JSON.stringify({base:o,port:r,path1:it.value,toSelectAppId:Ie.value})})).blob(),_=URL.createObjectURL(t),v=document.createElement("a");v.href=_,v.download=`${ut.value}-接口文档.md`,document.body.appendChild(v),v.click(),document.body.removeChild(v),URL.revokeObjectURL(_),Ae.value=!1}catch{}}async function ca(){qe.value=[];const u=await E({url:`${o}/api/appmanager/queryPage`,method:"get",params:{limit:1e3,offset:0}});u.data&&u.data.forEach(t=>{qe.value.push({value:`${F(t,"appId")}-${F(t,"appSecret")}`,label:`${F(t,"appId")}#${F(t,"remark")}`,disabled:!1})})}const De=p(),Pe=p(""),Be=p("");async function ma(){if(!De.value||Pe.value.length==0||Be.value.length==0){w.warning("请先点击 [运行] 完成测试");return}try{await E({url:`${o}/api/apiProxyDetail/save`,method:"post",data:{id:De.value,parames:Pe.value,resp:Be.value}}),w.success("保存成功")}catch{w.error("保存失败")}}return(u,t)=>{const _=Aa,v=ya,D=va,P=Dn;return k(),I("div",null,[i(d(Ce),null,{default:f(()=>[i(d(re),null,{default:f(()=>[i(d(Qa),{modelValue:Ue.value,"onUpdate:modelValue":t[5]||(t[5]=s=>Ue.value=s),"tab-style":"button-card"},{default:f(()=>[i(d($t),{title:"业务模块",name:"biz"},{default:f(()=>[h("div",Cr,[i(d(kt),{modelValue:Re.value,"onUpdate:modelValue":t[0]||(t[0]=s=>Re.value=s),placeholder:"请输入模块名称/一级路径进行搜索",onSearch:ta,clearable:""},null,8,["modelValue"]),i(d($),{type:"success",style:{"margin-left":"10px"},onClick:K},{default:f(()=>t[35]||(t[35]=[g("刷 新")])),_:1,__:[35]}),i(d($),{type:"success",style:{"margin-left":"10px"},onClick:t[1]||(t[1]=s=>ne.value=!0)},{default:f(()=>t[36]||(t[36]=[g("创建模块")])),_:1,__:[36]})]),h("div",Vr,[i(d(tn),{show:G.value,style:{height:"680px"}},{default:f(()=>[i(d(an),null,{default:f(()=>[(k(!0),I(se,null,me(rt.value,s=>(k(),I("div",{style:{"min-width":"400px"},key:s.id},[i(d(Ce),{title:s.name,"content-scrollable":"",style:{height:"320px"},segmented:"",embedded:"",hoverable:""},{footer:f(()=>[i(d($),{type:"info",onClick:z=>aa(s.path1)},{default:f(()=>t[41]||(t[41]=[g("编辑")])),_:2,__:[41]},1032,["onClick"]),i(d(Je),{style:{"margin-left":"10px"},title:"确认删除？",type:"info",trigger:"click",onConfirm:z=>da(s.path1)},{reference:f(()=>[i(d($),{type:"danger"},{default:f(()=>t[42]||(t[42]=[g("删除")])),_:1,__:[42]})]),_:2},1032,["onConfirm"]),i(d(Je),{style:{"margin-left":"10px"},title:"没有示例参数的接口不会导出，确认？",type:"info",trigger:"click",onConfirm:z=>fa(s.path1,s.name)},{reference:f(()=>[i(d($),{type:"success"},{default:f(()=>t[43]||(t[43]=[g("导出MD")])),_:1,__:[43]})]),_:2},1032,["onConfirm"])]),default:f(()=>[h("div",Lr,[(k(!0),I(se,null,me(s.details,z=>(k(),I("div",{key:z.id,style:{"margin-bottom":"10px"}},[g(" /"+N(z.path1)+"/"+N(z.path2)+" ",1),i(_,{strong:"",secondary:"",round:"",size:"tiny",style:{"margin-left":"10px"},onClick:dt=>na(z.target,z.path1,z.path2)},{default:f(()=>t[37]||(t[37]=[g("查看")])),_:2,__:[37]},1032,["onClick"]),i(_,{strong:"",secondary:"",round:"",size:"tiny",style:{"margin-left":"10px"},onClick:dt=>ra(z.target,z.path1,z.path2,z.id)},{default:f(()=>t[38]||(t[38]=[g("调试")])),_:2,__:[38]},1032,["onClick"]),i(_,{strong:"",secondary:"",round:"",size:"tiny",style:{"margin-left":"10px"},onClick:dt=>la(z.target)},{default:f(()=>t[39]||(t[39]=[g("编辑")])),_:2,__:[39]},1032,["onClick"]),t[40]||(t[40]=h("br",null,null,-1))]))),128))])]),_:2},1032,["title"])]))),128))]),_:1})]),_:1},8,["show"]),h("div",Mr,[i(d(nn),{page:$e.value,"onUpdate:page":t[2]||(t[2]=s=>$e.value=s),"page-count":lt.value},null,8,["page","page-count"])])])]),_:1}),i(d($t),{title:"全部",name:"all"},{default:f(()=>[h("div",Ur,[i(d(kt),{modelValue:A.value,"onUpdate:modelValue":t[3]||(t[3]=s=>A.value=s),placeholder:"请输入名称/编码进行搜索",onSearch:U,clearable:""},null,8,["modelValue"])]),h("div",Rr,[i(d(Ta),Pt({height:"auto",resizable:"",ref_key:"basicGridRef",ref:b},x.value,{loading:y.value,onCellClick:t[4]||(t[4]=s=>{Tt(s)}),onPageChange:B,"column-width":220,size:"small","auto-resize":!0}),null,16,["loading"])])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),i(d(W),{title:"响应数据",visible:Ve.value,"onUpdate:visible":t[6]||(t[6]=s=>Ve.value=s),onConfirm:Wt},{default:f(()=>[h("div",Hr,[i(d(re))])]),_:1},8,["visible"]),i(d(q),{visible:oe.value,"onUpdate:visible":t[8]||(t[8]=s=>oe.value=s),title:"API",width:"50%"},{footer:f(()=>[i(d($),{type:"primary",onClick:t[7]||(t[7]=s=>oe.value=!oe.value)},{default:f(()=>t[44]||(t[44]=[g("确 定")])),_:1,__:[44]})]),default:f(()=>[t[45]||(t[45]=h("div",null,null,-1))]),_:1,__:[45]},8,["visible"]),i(d(q),{visible:j.value,"onUpdate:visible":t[14]||(t[14]=s=>j.value=s),title:"调试",width:"85vw",top:"50","max-height":"92vh"},{footer:f(()=>[i(d($),{type:"success",onClick:Yt},{default:f(()=>t[52]||(t[52]=[g("运 行")])),_:1,__:[52]}),i(d($),{type:"primary",onClick:t[13]||(t[13]=s=>j.value=!j.value)},{default:f(()=>t[53]||(t[53]=[g("关 闭")])),_:1,__:[53]})]),default:f(()=>[h("div",jr,[h("div",qr,[i(d(Za),{modelValue:at.value,"onUpdate:modelValue":t[12]||(t[12]=s=>at.value=s)},{left:f(()=>[i(d(re),null,{default:f(()=>[h("div",Fr,[i(d(rn),{"default-expanded-names":"1",accordion:""},{default:f(()=>[i(d(Ot),{title:"参数池",name:"1"},{"header-extra":f(()=>t[47]||(t[47]=[h("div",{style:{color:"green"}},"点击展开",-1)])),default:f(()=>[h("div",Jr,[i(d(ga),{value:Z.value,"onUpdate:value":t[9]||(t[9]=s=>Z.value=s),language:"json",options:m,onMount:c,style:{height:"35vh"}},{default:f(()=>t[46]||(t[46]=[g(" 初始化... ")])),_:1,__:[46]},8,["value"])])]),_:1}),i(d(Ot),{title:"简化参数池",name:"2"},{"header-extra":f(()=>t[49]||(t[49]=[h("div",{style:{color:"green"}},"点击展开",-1)])),default:f(()=>[h("div",Wr,[i(d(en),{value:V.value,"onUpdate:value":t[10]||(t[10]=s=>V.value=s),preset:"pair","key-placeholder":"参数名","value-placeholder":"参数值"},null,8,["value"]),i(d($),{type:"primary",style:{padding:"10px","margin-top":"5px"},onClick:Zt},{default:f(()=>t[48]||(t[48]=[g("保存简化参数池")])),_:1,__:[48]})])]),_:1})]),_:1})])]),_:1})]),right:f(()=>[h("div",null,[i(D,{"default-active-key":["2"]},{default:f(()=>[i(v,{header:"请求参数",key:"1"},{default:f(()=>[h("div",null,[i(_,{strong:"",secondary:"",round:"",type:"info",onClick:t[11]||(t[11]=s=>ke(he.value))},{default:f(()=>t[50]||(t[50]=[g(" 复制 ")])),_:1,__:[50]}),(k(),J(d(ft),{key:tt.value,data:et.value},null,8,["data"]))])]),_:1}),i(v,{header:"返回结果",key:"2"},{default:f(()=>[h("div",Gr,[i(d(re),null,{default:f(()=>[(k(),J(d(ft),{key:Qe.value,data:Ze.value},null,8,["data"]))]),_:1})])]),_:1})]),_:1}),h("div",Kr,[i(d($),{type:"primary",onClick:ma},{default:f(()=>t[51]||(t[51]=[g("保存为示例参数")])),_:1,__:[51]})])])]),_:1},8,["modelValue"])])])]),_:1},8,["visible"]),i(d(q),{visible:Q.value,"onUpdate:visible":t[19]||(t[19]=s=>Q.value=s),title:"详情",width:"68vw",top:"50","max-height":"92vh"},{footer:f(()=>[i(d($),{type:"primary",onClick:t[18]||(t[18]=s=>Q.value=!Q.value)},{default:f(()=>t[62]||(t[62]=[g("关 闭")])),_:1,__:[62]})]),default:f(()=>[h("div",null,[i(d(Ce),null,{default:f(()=>[i(d(re),null,{default:f(()=>[h("div",null,[i(d(le),{size:"medium",type:"success"},{default:f(()=>t[54]||(t[54]=[g(" API地址 ")])),_:1,__:[54]})]),h("div",Yr,[g(N(d(a))+"://"+N(d(n))+":"+N(d(r))+"/api/"+N(Me.value)+"/"+N(ee.value)+" ",1),i(d($),{type:"info",size:"mini",style:{"margin-left":"5px"},onClick:t[15]||(t[15]=s=>ke(`${d(a)}://${d(n)}:${d(r)}/api/{{cellPath1}}/${ee.value}`))},{default:f(()=>t[55]||(t[55]=[g("复制")])),_:1,__:[55]})]),h("div",Tr,[i(d(le),{size:"medium",type:"success"},{default:f(()=>t[56]||(t[56]=[g(" 请求类型 ")])),_:1,__:[56]})]),t[61]||(t[61]=h("div",{style:{"margin-top":"5px"}},"POST",-1)),h("div",Xr,[i(d(le),{size:"medium",type:"success"},{default:f(()=>t[57]||(t[57]=[g(" 请求参数 ")])),_:1,__:[57]})]),h("div",Zr,[g(N(we.value)+" ",1),i(d($),{type:"info",size:"mini",style:{"margin-left":"5px"},onClick:t[16]||(t[16]=s=>ke(we.value))},{default:f(()=>t[58]||(t[58]=[g("复制")])),_:1,__:[58]})]),Dt(h("div",null,[h("div",Qr,[i(d(le),{size:"medium",type:"success"},{default:f(()=>t[59]||(t[59]=[g(" 配置 ")])),_:1,__:[59]})]),h("div",el,[g(N(Le.value)+" ",1),i(d($),{type:"info",size:"mini",style:{"margin-left":"5px"},onClick:t[17]||(t[17]=s=>ke(Le.value))},{default:f(()=>t[60]||(t[60]=[g("复制")])),_:1,__:[60]})])],512),[[Bt,_e.value]]),ue.value&&ue.value.length>0?(k(),I("div",tl,[i(d(le),{effect:"dark",size:"medium "},{default:f(()=>[g(N(ue.value),1)]),_:1})])):H("",!0)]),_:1,__:[61]})]),_:1})])]),_:1},8,["visible"]),i(d(q),{visible:te.value,"onUpdate:visible":t[23]||(t[23]=s=>te.value=s),title:"发布智能体工具",width:"50vw",top:"50","max-height":"92vh"},{footer:f(()=>[i(d($),{type:"success",onClick:Qt},{default:f(()=>t[63]||(t[63]=[g("发 布")])),_:1,__:[63]}),i(d($),{type:"primary",onClick:t[22]||(t[22]=s=>te.value=!te.value)},{default:f(()=>t[64]||(t[64]=[g("关 闭")])),_:1,__:[64]})]),default:f(()=>[h("div",null,[i(d(ve),{modelValue:ae.value,"onUpdate:modelValue":t[20]||(t[20]=s=>ae.value=s),placeholder:"输入名称"},null,8,["modelValue"]),i(d(ve),{modelValue:fe.value,"onUpdate:modelValue":t[21]||(t[21]=s=>fe.value=s),placeholder:"输入描述",style:{"margin-top":"10px"},type:"textarea"},null,8,["modelValue"])])]),_:1},8,["visible"]),i(d(q),{visible:ne.value,"onUpdate:visible":t[27]||(t[27]=s=>ne.value=s),title:"新建业务模块",width:"40vw",top:"50","max-height":"92vh"},{footer:f(()=>[i(d($),{type:"success",onClick:ea},{default:f(()=>t[65]||(t[65]=[g("确 定")])),_:1,__:[65]}),i(d($),{type:"primary",onClick:t[26]||(t[26]=s=>ne.value=!ne.value)},{default:f(()=>t[66]||(t[66]=[g("关 闭")])),_:1,__:[66]})]),default:f(()=>[h("div",null,[i(d(ve),{modelValue:xe.value,"onUpdate:modelValue":t[24]||(t[24]=s=>xe.value=s),placeholder:"输入模块名称"},null,8,["modelValue"]),i(d(ve),{modelValue:Oe.value,"onUpdate:modelValue":t[25]||(t[25]=s=>Oe.value=s),placeholder:"输入接口一级路径",style:{"margin-top":"10px"}},null,8,["modelValue"])])]),_:1},8,["visible"]),i(d(q),{visible:pe.value,"onUpdate:visible":t[29]||(t[29]=s=>pe.value=s),title:"模块编辑",width:"68vw",top:"50","max-height":"80vh"},{footer:f(()=>[i(d($),{type:"primary",onClick:t[28]||(t[28]=s=>pe.value=!pe.value)},{default:f(()=>t[72]||(t[72]=[g("关 闭")])),_:1,__:[72]})]),default:f(()=>[h("div",al,[i(d(ln),{"show-icon":!1,style:{"margin-bottom":"10px"},type:"info"},{default:f(()=>[t[67]||(t[67]=g(" base url:")),t[68]||(t[68]=h("br",null,null,-1)),g(" "+N(d(a))+"://"+N(d(n))+":"+N(d(r))+"/api/proxy/"+N(Y.value)+"/ ",1)]),_:1,__:[67,68]}),i(d(Ce),null,{default:f(()=>[i(d(re),null,{default:f(()=>[(k(!0),I(se,null,me(He.value,s=>(k(),I("div",{key:s.id,style:{"margin-bottom":"20px"}},[i(d(Da),{style:{width:"65%","margin-left":"20px"}},{default:f(()=>[i(d(ht),{value:s.name,"onUpdate:value":z=>s.name=z,style:{width:"50%"}},null,8,["value","onUpdate:value"]),i(P,null,{default:f(()=>t[69]||(t[69]=[g("base url")])),_:1,__:[69]}),i(d(ht),{value:s.path2,"onUpdate:value":z=>s.path2=z,style:{width:"35%"}},null,8,["value","onUpdate:value"])]),_:2},1024),i(_,{type:"success",size:"small",style:{"margin-left":"20px"},onClick:z=>sa(s.id,s.path2,s.name)},{default:f(()=>t[70]||(t[70]=[g("保存")])),_:2,__:[70]},1032,["onClick"]),i(d(Je),{style:{"margin-left":"20px"},title:"确认删除？",type:"info",trigger:"click",onConfirm:z=>oa(s.id)},{reference:f(()=>[i(d($),{type:"danger",size:"small"},{default:f(()=>t[71]||(t[71]=[g("删除")])),_:1,__:[71]})]),_:2},1032,["onConfirm"])]))),128))]),_:1})]),_:1})])]),_:1},8,["visible"]),i(d(q),{visible:ze.value,"onUpdate:visible":t[32]||(t[32]=s=>ze.value=s),title:"加入到业务模块",width:"30%"},{footer:f(()=>[i(d($),{type:"primary",onClick:ua},{default:f(()=>t[73]||(t[73]=[g("确 定")])),_:1,__:[73]})]),default:f(()=>[t[74]||(t[74]=h("p",{style:{"margin-top":"20px"}},"选择加入已有的业务模块",-1)),i(d(wt),{clearable:"",modelValue:Y.value,"onUpdate:modelValue":t[30]||(t[30]=s=>Y.value=s),style:{"margin-top":"10px"},searchable:!0,placeholder:"选择业务模块"},{default:f(()=>[(k(!0),I(se,null,me(je.value,s=>(k(),J(d(_t),{key:s.value,label:s.label,value:s.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),i(d(ve),{modelValue:Ee.value,"onUpdate:modelValue":t[31]||(t[31]=s=>Ee.value=s),placeholder:"输入接口二级路径",style:{"margin-top":"10px"}},null,8,["modelValue"])]),_:1,__:[74]},8,["visible"]),i(d(q),{visible:Ae.value,"onUpdate:visible":t[34]||(t[34]=s=>Ae.value=s),title:"选择使用的AppId/AppSecret",width:"30%"},{footer:f(()=>[i(d($),{type:"primary",onClick:pa},{default:f(()=>t[75]||(t[75]=[g("确 定")])),_:1,__:[75]})]),default:f(()=>[i(d(wt),{clearable:"",modelValue:Ie.value,"onUpdate:modelValue":t[33]||(t[33]=s=>Ie.value=s),style:{"margin-top":"10px"},searchable:!0},{default:f(()=>[(k(!0),I(se,null,me(qe.value,s=>(k(),J(d(_t),{key:s.value,label:s.label,value:s.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["visible"])])}}}),xl=Pa(nl,[["__scopeId","data-v-d0fba1a8"]]);export{xl as default};
