import{P as k}from"./app-YXi6Hc2l.js";import{i as v,c as $}from"./app-BT68AfZ-.js";import{_ as T,a as b,b as I,c as x,d as w,e as D,f as g,g as N,h as V,i as U,j as P,k as B,l as q,m as A,n as E}from"./app-xdKO8L4n.js";import{bc as s,r as G,o,c as u,w as p,u as t,g as r,h as m,b as l,a as c,D as C,f as y,t as f,F as _,E as O}from"./app-DA7OTM4Q.js";import{_ as R}from"./app-CKSEN_Rg.js";import{_ as S}from"./app-a9KqBnqw.js";import{_ as j,a as F}from"./app-BHFzVhjx.js";import{_ as L}from"./app-DokSVapq.js";import{D as z}from"./app-DNL2FXPk.js";import"./app-BlCBGn5D.js";import"./app-DuUYZNNT.js";import"./app-DSiZNBrr.js";import"./app-Zes_jb7S.js";import"./app-BkWUIifj.js";import"./app-CQwVTjAx.js";import"./app-BQJXgoGu.js";import"./app-Daq_vi_n.js";import"./app-DEIWLCpe.js";import"./app-KNE_24OY.js";import"./app-Dxa5h-uG.js";import"./app-C5ROEzFd.js";import"./app-Bnbo6OlJ.js";import"./app-AbPAjGV5.js";import"./app-BqY8p2gl.js";import"./app-C-GI59rl.js";import"./app-BotiHebp.js";function H(){v(this),this.isUpdating=!1,this.cond=null,this.paramsTitle="",this.paramsCaseInsensitive=!1,this.isCaseInsensitive=!1,this.success=this.$NotifyPopup,this.condType=this.components.length>0?this.components[0].type:"",this.currentComponent=this.components[0],this.components.forEach(e=>{switch(e.component){case"http-cond-url-extension":e.component=s(E);break;case"http-cond-url-eq-index":e.component=s(A);break;case"http-cond-url-all":e.component=s(q);break;case"http-cond-url-prefix":e.component=s(B);break;case"http-cond-url-eq":e.component=s(P);break;case"http-cond-url-regexp":e.component=s(U);break;case"http-cond-url-wildcard-match":e.component=s(V);break;case"http-cond-user-agent-regexp":e.component=s(N);break;case"http-cond-params":e.component=s(g);break;case"http-cond-url-not-extension":e.component=s(D);break;case"http-cond-url-not-prefix":e.component=s(w);break;case"http-cond-url-not-eq":e.component=s(x);break;case"http-cond-url-not-regexp":e.component=s(I);break;case"http-cond-user-agent-not-regexp":e.component=s(b);break;case"http-cond-mime-type":e.component=s(T);break}}),window.UPDATING_COND!=null&&(this.isUpdating=!0,this.condType=window.UPDATING_COND.type,this.cond=window.UPDATING_COND,typeof this.cond.isCaseInsensitive=="boolean"&&(this.isCaseInsensitive=this.cond.isCaseInsensitive)),this.changeCondType=function(){let e=this,a=this.components.$find(function(n,h){return h.type==e.condType});this.currentComponent=a,a==null||a.paramsTitle.length==0?(e.paramsTitle="条件参数",e.paramsCaseInsensitive=!1):(e.paramsTitle=a.paramsTitle,typeof a.caseInsensitive<"u"?(e.paramsCaseInsensitive=a.caseInsensitive,e.$delay(function(){e.changeCaseInsensitive()})):e.paramsCaseInsensitive=!1)},this.$delay(function(){this.changeCondType()}),this.changeCaseInsensitive=function(){let e=this.$refs.component;e!=null&&typeof e.changeCaseInsensitive=="function"&&e.changeCaseInsensitive(this.isCaseInsensitive)}}const J={key:0},K={key:1},M=c("td",{class:"title"},"选择条件类型",-1),Q={key:0,class:"comment"},W={key:0},X={key:1},Y=c("td",null,"不区分大小写",-1),Z=c("p",{class:"comment"},"选中后表示对比时忽略参数值的大小写。",-1),xe={__name:"addCondPopup",setup(e){const a=G(),n=$(new H,{refs:{component:a}});return(h,d)=>(o(),u(k,null,{default:p(()=>[t(n).isUpdating?m("",!0):(o(),r("header",J,"添加子条件")),t(n).isUpdating?(o(),r("header",K,"修改子条件")):m("",!0),l(L,{action:"$",onSuccess:t(n).success},{default:p(()=>[l(z,null,{default:p(()=>[c("tbody",null,[c("tr",null,[M,c("td",null,[l(j,{name:"condType",modelValue:t(n).condType,"onUpdate:modelValue":d[0]||(d[0]=i=>t(n).condType=i),onChange:t(n).changeCondType},{default:p(()=>[(o(!0),r(_,null,C(t(n).components,i=>(o(),u(F,{value:i.type},{default:p(()=>[y(f(i.name),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"]),(o(!0),r(_,null,C(t(n).components,i=>(o(),r(_,null,[t(n).condType==i.type?(o(),r("p",Q,f(i.description),1)):m("",!0)],64))),256))])]),t(n).condType!="params"?(o(),r("tr",W,[c("td",null,f(t(n).paramsTitle),1),c("td",null,[(o(),u(O(t(n).currentComponent.component),{"v-cond":t(n).cond,ref_key:"component",ref:a},null,8,["v-cond"]))])])):m("",!0),t(n).paramsCaseInsensitive?(o(),r("tr",X,[Y,c("td",null,[l(S,{modelValue:t(n).isCaseInsensitive,"onUpdate:modelValue":d[1]||(d[1]=i=>t(n).isCaseInsensitive=i),onChange:t(n).changeCaseInsensitive},null,8,["modelValue","onChange"]),Z])])):m("",!0),t(n).condType=="params"?(o(),u(g,{key:2,"v-cond":t(n).cond},null,8,["v-cond"])):m("",!0)])]),_:1}),l(R,null,{default:p(()=>[y("确定")]),_:1})]),_:1},8,["onSuccess"])]),_:1}))}};export{xe as default};
