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-BYcXwl4U.js";import{P as y}from"./app-Doj30F-n.js";import{i as v,c as V}from"./app-a6cKceqE.js";import{_ as $}from"./app-CQ-vNlMj.js";import{_ as w}from"./app-Ufpj4Ll4.js";import{_ as P,a as S}from"./app-DxbU-QrX.js";import{_ as x,a as b}from"./app-BcxYlLoB.js";import{_ as f}from"./app-DwtlHtUX.js";import{_ as I}from"./app-CignoBaV.js";import{_ as D}from"./app-DiDEoOb6.js";import{D as k}from"./app-7GBSHA5C.js";import"./app-Ceh-tphd.js";import"./app-ysQ8KbGS.js";import"./app-Cp3gmk2J.js";import"./app--MWyBMkA.js";import"./app-BG60hdvp.js";import"./app-CNARLpXE.js";import"./app-SxAW7vhf.js";import"./app-D5k1HLu9.js";import"./app-BDgR0DSb.js";import"./app-MtOp7vk3.js";import"./app-D2Wz0BUQ.js";import"./app-D3zbrzdO.js";import"./app-0YmIdYYs.js";import"./app-CrjU8lgK.js";import"./app-DKwGUiXR.js";import"./app-DY-0PadZ.js";import"./app-BmaR5UVy.js";import"./app-C0-Qcoum.js";import"./app-iaXXZg9Y.js";import"./app-BHl80pFw.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),wt={__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{wt as default};
