import{i as x,c as b}from"./app-DckefXYL.js";import{_ as R}from"./app-DgsA44Do.js";import{N as C}from"./app-C9iVkiu5.js";import{N as $}from"./app-CUPmXIij.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-DnroACXc.js";import{_ as S}from"./app-MnSDCF4P.js";import{_ as I}from"./app-COct4tsy.js";import{_ as P}from"./app-QoKhxVfv.js";import{C as v}from"./app-Do8DhyKT.js";import{_ as w}from"./app-BdF_-Hag.js";import{_ as L}from"./app-DGxC9lrB.js";import{_ as T}from"./app-BbRQPmFH.js";import{D as y}from"./app-Cx7ENVlu.js";import"./app-B2-Q9WJQ.js";import"./app-DAKlLAys.js";import"./app-xECxwo4T.js";import"./app-BBDtZW3a.js";import"./app-Co2SIBzr.js";import"./app-B0NrURRk.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-Cu6FD8m8.js";import"./app-LqsmzyUT.js";import"./app-B8VsrFxM.js";import"./app-B09rlSqG.js";import"./app-DntYVxd7.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-CYYQ_Zep.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-CF0qXH5Q.js";import"./app-DPkDcD7h.js";import"./app-35Uyu21k.js";import"./app-z7Z_Uo-k.js";import"./app-B4bUdtyo.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),It={__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{It as default};
