import{i as x,c as b}from"./app-Ba7ZqSpq.js";import{_ as R}from"./app-Cft_lrsr.js";import{N as C}from"./app-CL60OiIv.js";import{N as $}from"./app-B2C_dtYI.js";import{o as _,c as g,w as r,b as e,r as h,g as O,a as t,u as o,d,e as f,h as N,f as a}from"./app-SC54XQDl.js";import{_ as S}from"./app-DFulsyXy.js";import{_ as I}from"./app-DWUwCFNm.js";import{_ as P}from"./app-DkOT0Z3c.js";import{C as v}from"./app-Ciy_QwIW.js";import{_ as w}from"./app-huVLEujn.js";import{_ as L}from"./app-DreD0GpY.js";import{_ as T}from"./app-FlPLZh9D.js";import{D as y}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-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-COidJXl1.js";import"./app-CNHjdV6U.js";import"./app-DoVkxbmA.js";import"./app-C2mBgI5Z.js";import"./app-PrSv7rSt.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-CVQkwzlf.js";import"./app-COkia88n.js";import"./app-BxWqoSpr.js";import"./app-DZaelcLs.js";function E(){x(this),this.success=this.$NotifyReloadSuccess("保存成功")}const H={__name:"@menu",props:["ctx"],setup(p){return(n,m)=>(_(),g(C,{secondary:""},{tabs:r(()=>[e($,{value:"hls",href:".hls?serverId="+p.ctx.server.id,name:"HLS设置"},null,8,["href"])]),_:1}))}},B=["value"],k=t("td",{class:"title"},"启用HLS加密",-1),D={class:"comment"},M={colspan:"2"},G=t("td",null,"例外URL",-1),J=t("p",{class:"comment"},"如果填写了例外URL，表示这些URL跳过不做处理。",-1),X=t("td",null,"限制URL",-1),A=t("p",{class:"comment"},"如果填写了限制URL，表示只对这些URL进行加密处理；如果不填则表示支持所有的URL。",-1),K={__name:"HTTPHLSConfigBox",props:["modelValue","v-is-location","v-is-group"],setup(p){const n=p,{config:m,encryptingConfig:s,encryptingMoreOptionsVisible:u}=function(){let i=n.modelValue;i==null&&(i={isPrior:!1});let l=i.encrypting;return l==null&&(l={isOn:!1,onlyURLPatterns:[],exceptURLPatterns:[]},i.encrypting=l),{config:h(i),encryptingConfig:h(l),encryptingMoreOptionsVisible:h(!1)}}(),V=function(){return!n.vIsLocation&&!n.vIsGroup||m.value.isPrior},U=function(){u.value=!u.value};return(i,l)=>(_(),O("div",null,[t("input",{type:"hidden",name:"hlsJSON",value:JSON.stringify(o(m))},null,8,B),d(e(y,null,{default:r(()=>[i.vIsLocation||i.vIsGroup?(_(),g(P,{key:0,"v-config":o(m)},null,8,["v-config"])):N("",!0)]),_:1},512),[[f,i.vIsLocation||i.vIsGroup]]),d(e(y,null,{default:r(()=>[t("tbody",null,[t("tr",null,[k,t("td",null,[e(T,{modelValue:o(s).isOn,"onUpdate:modelValue":l[0]||(l[0]=c=>o(s).isOn=c)},null,8,["modelValue"]),t("p",D,[a("启用后，系统会自动在 "),e(v,null,{default:r(()=>[a(".m3u8")]),_:1}),a(" 文件中加入 "),e(v,null,{default:r(()=>[a("#EXT-X-KEY:METHOD=AES-128...")]),_:1}),a(" ，并将其中的 "),e(v,null,{default:r(()=>[a(".ts")]),_:1}),a(" 文件内容进行加密。 ")])])])]),d(t("tbody",null,[t("tr",null,[t("td",M,[e(w,{onChange:U})])])],512),[[f,o(s).isOn]]),d(t("tbody",null,[t("tr",null,[G,t("td",null,[e(L,{modelValue:o(s).exceptURLPatterns,"onUpdate:modelValue":l[1]||(l[1]=c=>o(s).exceptURLPatterns=c)},null,8,["modelValue"]),J])]),t("tr",null,[X,t("td",null,[e(L,{modelValue:o(s).onlyURLPatterns,"onUpdate:modelValue":l[2]||(l[2]=c=>o(s).onlyURLPatterns=c)},null,8,["modelValue"]),A])])],512),[[f,o(s).isOn&&o(u)]])]),_:1},512),[[f,V()]])]))}},Y=["value"],j=t("h5",{class:"!mb-4"},"HLS加密设置",-1),St={__name:"hls",setup(p){const n=b(new E);return(m,s)=>(_(),g(R,{ctx:o(n)},{default:r(()=>[e(H,{ctx:o(n),"active-tab":"hls"},null,8,["ctx"]),e(S,{onSuccess:o(n).success,action:"$"},{default:r(()=>[t("input",{type:"hidden",name:"webId",value:o(n).webId},null,8,Y),j,e(K,{modelValue:o(n).hlsConfig,"onUpdate:modelValue":s[0]||(s[0]=u=>o(n).hlsConfig=u)},null,8,["modelValue"]),e(I,{class:"mt-4"})]),_:1},8,["onSuccess"])]),_:1},8,["ctx"]))}};export{St as default};
