import{i as O,c as w}from"./app-Ba7ZqSpq.js";import{_ as L}from"./app-Cft_lrsr.js";import{_ as N}from"./app-DFulsyXy.js";import{_ as S}from"./app-DWUwCFNm.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-SC54XQDl.js";import{_ as P,a as h}from"./app-PrSv7rSt.js";import{_ as k}from"./app-DjJGwY8P.js";import{_ as B}from"./app-DkOT0Z3c.js";import{_ as g}from"./app-FlPLZh9D.js";import{C as y}from"./app-Ciy_QwIW.js";import{D}from"./app-ZeVDYyDS.js";import"./app-qhR41k1m.js";import"./app-CS3AUTAk.js";import"./app-CCkWSX4Q.js";import"./app-Dhl-Bw0H.js";import"./app-BjSCO7rC.js";import"./app-CNHjdV6U.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-PPG0ZS4d.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-DZaelcLs.js";import"./app-DoVkxbmA.js";import"./app-C2mBgI5Z.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};
