import{i as x,c as b}from"./app-a6cKceqE.js";import{_ as R}from"./app-C3oVnfUH.js";import{N as C}from"./app-DCd54JMo.js";import{N as $}from"./app-CabATHnR.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-BYcXwl4U.js";import{_ as S}from"./app-CQ-vNlMj.js";import{_ as I}from"./app-CignoBaV.js";import{_ as P}from"./app-B2nvVMhu.js";import{C as v}from"./app-iaXXZg9Y.js";import{_ as w}from"./app-DiDEoOb6.js";import{_ as L}from"./app-jKqt9xs8.js";import{_ as T}from"./app-DwtlHtUX.js";import{D as y}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-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-BhzV4gWo.js";import"./app-CrjU8lgK.js";import"./app-D2Wz0BUQ.js";import"./app-D3zbrzdO.js";import"./app-DxbU-QrX.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-Ufpj4Ll4.js";import"./app-Wy4FFEmL.js";import"./app-0YmIdYYs.js";import"./app-BHl80pFw.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};
