import{o as c,c as d,w as a,b as s,a as o,u as e,d as u,e as m,g as _,D as h,f as g,t as p,F as C}from"./app-DA7OTM4Q.js";import{P as y}from"./app-YXi6Hc2l.js";import{i as v,c as V}from"./app-BT68AfZ-.js";import{_ as $}from"./app-DokSVapq.js";import{_ as w}from"./app-DuUYZNNT.js";import{_ as P,a as S}from"./app-BHFzVhjx.js";import{_ as x,a as b}from"./app-uBpw-HYG.js";import{_ as f}from"./app-a9KqBnqw.js";import{_ as I}from"./app-CKSEN_Rg.js";import{_ as D}from"./app-D2gM4iLU.js";import{D as k}from"./app-DNL2FXPk.js";import"./app-BlCBGn5D.js";import"./app-DSiZNBrr.js";import"./app-C5ROEzFd.js";import"./app-Bnbo6OlJ.js";import"./app-Dxa5h-uG.js";import"./app-AbPAjGV5.js";import"./app-BqY8p2gl.js";import"./app-C-GI59rl.js";import"./app-BotiHebp.js";import"./app-CHxME8Sw.js";import"./app-BkWUIifj.js";import"./app-CQwVTjAx.js";import"./app-DEIWLCpe.js";import"./app-Zes_jb7S.js";import"./app-Daq_vi_n.js";import"./app-BMjG4tWp.js";import"./app-Bll_3-lM.js";import"./app-C0-Qcoum.js";import"./app-KNE_24OY.js";function E(){v(this),this.success=this.$NotifyPopup,this.rules=this.setConfig.rules,this.selectedConnector=this.setConfig.connector,this.selectedConnectorDescription="",this.changeConnector=function(){let r=this;this.selectedConnectorDescription=this.connectors.$find(function(t,l){return l.value==r.selectedConnector}).description},this.changeConnector(),this.action=this.setConfig.action,this.actionGroupId=0,(this.action=="go_group"||this.action=="go_set"&&this.setConfig.actionOptions!=null)&&this.$delay(function(){this.actionGroupId=this.setConfig.actionOptions.groupId}),this.actionSetId=0,this.action=="go_set"&&this.setConfig.actionOptions!=null&&this.$delay(function(){this.actionSetId=this.setConfig.actionOptions.setId}),this.groupSets=function(r){if(this.firewallPolicy==null)return;let t=null;return this.firewallPolicy.inbound.groups.forEach(function(l){l.id==r&&(t=l)}),this.firewallPolicy.outbound.groups.forEach(function(l){l.id==r&&(t=l)}),t==null?[]:t.sets}}const O=o("header",null,"修改规则集",-1),L=["value"],B=o("td",{class:"title"},"规则集名称 *",-1),N=o("p",{class:"comment"},"可以用来描述当前规则集用途。",-1),U=o("td",null,"规则 *",-1),F={style:{"word-break":"break-word"}},G=o("td",null,"规则之间的关系 *",-1),T={class:"comment"},R=o("td",null,"执行动作 *",-1),j={colspan:"2"},q=o("td",null,"允许局域网IP",-1),z=o("p",{class:"comment"},"选中后表示如果请求来自局域网IP，则直接跳过当前规则集。",-1),A=o("td",null,"允许搜索引擎",-1),H=o("p",{class:"comment"},"选中后，表示如果请求来自常见搜索引擎的IP，则直接跳过当前规则集。",-1),$t={__name:"updateSetPopup",setup(r){const t=V(new E);return(l,i)=>(c(),d(y,null,{default:a(()=>[O,s($,{action:"$",onSuccess:e(t).success},{default:a(()=>[o("input",{type:"hidden",name:"setId",value:e(t).setConfig.id},null,8,L),s(k,null,{default:a(()=>[o("tbody",null,[o("tr",null,[B,o("td",null,[s(w,{type:"text",name:"name",maxlength:"100",class:"w-full",autofocus:"",modelValue:e(t).setConfig.name,"onUpdate:modelValue":i[0]||(i[0]=n=>e(t).setConfig.name=n)},null,8,["modelValue"]),N])]),o("tr",null,[U,o("td",F,[s(x,{"v-rules":e(t).rules,"v-type":e(t).type,connector:e(t).selectedConnector},null,8,["v-rules","v-type","connector"])])]),u(o("tr",null,[G,o("td",null,[s(P,{name:"connector",onChange:i[1]||(i[1]=n=>e(t).changeConnector()),modelValue:e(t).selectedConnector,"onUpdate:modelValue":i[2]||(i[2]=n=>e(t).selectedConnector=n)},{default:a(()=>[(c(!0),_(C,null,h(e(t).connectors,n=>(c(),d(S,{value:n.value},{default:a(()=>[g(p(n.name),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue"]),o("p",T,p(e(t).selectedConnectorDescription),1)])],512),[[m,e(t).rules.length>1]]),o("tr",null,[R,o("td",null,[s(b,{"v-actions":e(t).actions,"v-firewall-policy":e(t).firewallPolicy,"v-action-configs":e(t).actionConfigs,"v-group-type":e(t).type},null,8,["v-actions","v-firewall-policy","v-action-configs","v-group-type"])])]),o("tr",null,[o("td",j,[s(D)])]),u(o("tr",null,[q,o("td",null,[s(f,{name:"ignoreLocal",modelValue:e(t).setConfig.ignoreLocal,"onUpdate:modelValue":i[3]||(i[3]=n=>e(t).setConfig.ignoreLocal=n)},null,8,["modelValue"]),z])],512),[[m,e(t).moreOptionsVisible]]),u(o("tr",null,[A,o("td",null,[s(f,{name:"ignoreSearchEngine",modelValue:e(t).setConfig.ignoreSearchEngine,"onUpdate:modelValue":i[4]||(i[4]=n=>e(t).setConfig.ignoreSearchEngine=n)},null,8,["modelValue"]),H])],512),[[m,e(t).moreOptionsVisible]])])]),_:1}),s(I)]),_:1},8,["onSuccess"])]),_:1}))}};export{$t as default};
