import{i as O,c as w}from"./app-a6cKceqE.js";import{_ as L}from"./app-C3oVnfUH.js";import{_ as N}from"./app-CQ-vNlMj.js";import{_ as S}from"./app-CignoBaV.js";import{r as C,o as c,g as f,a as s,u as e,b as l,w as n,c as m,h as b,d as _,e as v,f as u,F as I,D as $,t as d}from"./app-BYcXwl4U.js";import{_ as P,a as h}from"./app-DxbU-QrX.js";import{_ as k}from"./app-JrQl8j_T.js";import{_ as B}from"./app-B2nvVMhu.js";import{_ as g}from"./app-DwtlHtUX.js";import{C as y}from"./app-iaXXZg9Y.js";import{D}from"./app-7GBSHA5C.js";import"./app-CLawzVMq.js";import"./app-BeFNDz9n.js";import"./app-BDgR0DSb.js";import"./app-DxjODhok.js";import"./app-DPDEogA0.js";import"./app-CrjU8lgK.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-ysQ8KbGS.js";import"./app-BHl80pFw.js";import"./app-D2Wz0BUQ.js";import"./app-D3zbrzdO.js";function G(){O(this),this.success=this.$NotifyReloadSuccess("保存成功")}const T=["value"],F=s("td",{class:"title"},"启用字符编码",-1),A=s("td",{class:"title"},"选择字符编码",-1),J=s("optgroup",{label:"常用字符编码"},null,-1),R=s("optgroup",{label:"全部字符编码"},null,-1),x=s("td",null,"强制替换",-1),E=s("p",{class:"comment"},"选中后，表示强制覆盖已经设置的字符集；不选中，表示如果源站已经设置了字符集，则保留不修改。",-1),H=s("td",null,"字符编码大写",-1),j={class:"comment"},q={__name:"HTTPCharsetsBox",props:["v-usual-charsets","v-all-charsets","v-charset-config","v-is-location","v-is-group"],setup(V){const r=V,{charsetConfig:t,advancedVisible:p}=function(){let o=r.vCharsetConfig;return o==null&&(o={isPrior:!1,isOn:!1,charset:"",isUpper:!1,force:!1}),{charsetConfig:C(o),advancedVisible:C(!1)}}(),U=function(o){p.value=o};return(o,i)=>(c(),f("div",null,[s("input",{type:"hidden",name:"charsetJSON",value:JSON.stringify(e(t))},null,8,T),l(D,null,{default:n(()=>[o.vIsLocation||o.vIsGroup?(c(),m(B,{key:0,"v-config":e(t)},null,8,["v-config"])):b("",!0),_(s("tbody",null,[s("tr",null,[F,s("td",null,[l(g,{modelValue:e(t).isOn,"onUpdate:modelValue":i[0]||(i[0]=a=>e(t).isOn=a)},null,8,["modelValue"])])])],512),[[v,!o.vIsLocation&&!o.vIsGroup||e(t).isPrior]]),_(s("tbody",null,[s("tr",null,[A,s("td",null,[l(P,{name:"charset",modelValue:e(t).charset,"onUpdate:modelValue":i[1]||(i[1]=a=>e(t).charset=a),filter:""},{default:n(()=>[l(h,{value:""},{default:n(()=>[u("[未选择]")]),_:1}),J,(c(!0),f(I,null,$(o.vUsualCharsets,a=>(c(),m(h,{value:a.charset},{default:n(()=>[u(d(a.charset)+"（"+d(a.name)+"）",1)]),_:2},1032,["value"]))),256)),R,(c(!0),f(I,null,$(o.vAllCharsets,a=>(c(),m(h,{value:a.charset},{default:n(()=>[u(d(a.charset)+"（"+d(a.name)+"）",1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue"])])])],512),[[v,(!o.vIsLocation&&!o.vIsGroup||e(t).isPrior)&&e(t).isOn]]),(!o.vIsLocation&&!o.vIsGroup||e(t).isPrior)&&e(t).isOn?(c(),m(k,{key:1,onChange:U})):b("",!0),_(s("tbody",null,[s("tr",null,[x,s("td",null,[l(g,{modelValue:e(t).force,"onUpdate:modelValue":i[2]||(i[2]=a=>e(t).force=a)},null,8,["modelValue"]),E])]),s("tr",null,[H,s("td",null,[l(g,{modelValue:e(t).isUpper,"onUpdate:modelValue":i[3]||(i[3]=a=>e(t).isUpper=a)},null,8,["modelValue"]),s("p",j,[u("选中后将指定的字符编码转换为大写，比如默认为 "),l(y,null,{default:n(()=>[u("utf-8")]),_:1}),u(" ，选中后将改为 "),l(y,null,{default:n(()=>[u("UTF-8")]),_:1}),u(" 。 ")])])])],512),[[v,(!o.vIsLocation&&!o.vIsGroup||e(t).isPrior)&&e(t).isOn&&e(p)]])]),_:1})]))}},z=["value"],Ce={__name:"index",setup(V){const r=w(new G);return(t,p)=>(c(),m(L,{ctx:e(r)},{default:n(()=>[l(N,{action:"$",onSuccess:e(r).success},{default:n(()=>[s("input",{type:"hidden",name:"webId",value:e(r).webId},null,8,z),l(q,{"v-usual-charsets":e(r).usualCharsets,"v-all-charsets":e(r).allCharsets,"v-charset-config":e(r).charsetConfig},null,8,["v-usual-charsets","v-all-charsets","v-charset-config"]),l(S,{class:"mt-4"})]),_:1},8,["onSuccess"])]),_:1},8,["ctx"]))}};export{Ce as default};
