import{c as I,r as y,d as c,e,t as l,w as _,v as b,f as z,g as m,h as f,u as k,j as v,k as p,F as V,l as j,o as d,m as D,n as h,p as w,q as C,s as T,_ as G,a as B,i as L}from"./_plugin-vue_export-helper-D7RxQbao.js";import{S as F,I as R,a as Q,N as J}from"./Navbar-CToVr4mZ.js";import{a as K,_ as $,P as X}from"./Checkbox-D-0ssBb5.js";import{T as H,S as Y}from"./trash-2-DOhaGh0B.js";import{T as O}from"./triangle-alert-D_TN8od9.js";import{S as W}from"./save-BmeYyGU2.js";import{G as Z}from"./gamepad-2-D_PhWeqP.js";import{C as x}from"./check-C5tZajJ-.js";/**
 * @license lucide-vue-next v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ee=I("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);/**
 * @license lucide-vue-next v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oe=I("file-cog",[["path",{d:"M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8z",key:"1ckgky"}],["path",{d:"M20 8v12a2 2 0 0 1-2 2h-4.182",key:"1726p0"}],["path",{d:"m3.305 19.53.923-.382",key:"ao1pio"}],["path",{d:"M4 10.592V4a2 2 0 0 1 2-2h8",key:"1foop0"}],["path",{d:"m4.228 16.852-.924-.383",key:"1fv9zy"}],["path",{d:"m5.852 15.228-.383-.923",key:"1a9hc2"}],["path",{d:"m5.852 20.772-.383.924",key:"1sh9ke"}],["path",{d:"m8.148 15.228.383-.923",key:"4yu6lf"}],["path",{d:"m8.53 21.696-.382-.924",key:"18b0s9"}],["path",{d:"m9.773 16.852.922-.383",key:"ti6xop"}],["path",{d:"m9.773 19.148.922.383",key:"rws47d"}],["circle",{cx:"7",cy:"18",r:"3",key:"lvkj7j"}]]);/**
 * @license lucide-vue-next v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const te=I("gpu",[["path",{d:"M2 21V3",key:"1bzk4w"}],["path",{d:"M2 5h18a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2.26",key:"1d64pi"}],["path",{d:"M7 17v3a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-3",key:"5hbqbf"}],["circle",{cx:"16",cy:"11",r:"2",key:"qt15rb"}],["circle",{cx:"8",cy:"11",r:"2",key:"ssideg"}]]);/**
 * @license lucide-vue-next v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const le=I("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
 * @license lucide-vue-next v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ne=I("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]]);/**
 * @license lucide-vue-next v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const se=I("undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/**
 * @license lucide-vue-next v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ae=I("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),ie={id:"general",class:"config-page"},de={class:"mb-3"},re={for:"locale",class:"form-label"},ue={class:"form-text"},_e={class:"mb-3"},ce={for:"sunshine_name",class:"form-label"},pe={class:"form-text"},fe={class:"mb-3"},me={for:"min_log_level",class:"form-label"},ve={value:"0"},ge={value:"1"},$e={value:"2"},he={value:"3"},be={value:"4"},ye={value:"5"},we={value:"6"},ke={class:"form-text"},Ve={id:"global_prep_cmd",class:"mb-3 d-flex flex-column"},Ue={class:"form-label"},qe={class:"form-text"},Se={key:0,class:"table"},Ee={scope:"col"},Ie={scope:"col"},Me={key:0,scope:"col"},De=["onUpdate:modelValue"],Ae=["onUpdate:modelValue"],Oe={key:0,class:"align-middle"},Pe=["onClick"],Ce={__name:"General",props:{platform:String,config:Object},setup(a){const r=a,o=y(r.config);function n(){let s={do:"",undo:""};r.platform==="windows"&&(s={...s,elevated:!1}),o.value.global_prep_cmd.push(s)}function t(s){o.value.global_prep_cmd.splice(s,1)}return(s,i)=>(d(),c("div",ie,[e("div",de,[e("label",re,l(s.$t("config.locale")),1),_(e("select",{id:"locale",class:"form-select","onUpdate:modelValue":i[0]||(i[0]=u=>o.value.locale=u)},[...i[5]||(i[5]=[z('<option value="bg">Български (Bulgarian)</option><option value="cs">Čeština (Czech)</option><option value="de">Deutsch (German)</option><option value="en">English</option><option value="en_GB">English, United Kingdom</option><option value="en_US">English, United States</option><option value="es">Español (Spanish)</option><option value="fr">Français (French)</option><option value="hu">Magyar (Hungarian)</option><option value="it">Italiano (Italian)</option><option value="ja">日本語 (Japanese)</option><option value="ko">한국어 (Korean)</option><option value="pl">Polski (Polish)</option><option value="pt">Português (Portuguese)</option><option value="pt_BR">Português, Brasileiro (Portuguese, Brazilian)</option><option value="ru">Русский (Russian)</option><option value="sv">svenska (Swedish)</option><option value="tr">Türkçe (Turkish)</option><option value="uk">Українська (Ukranian)</option><option value="vi">Tiếng Việt (Vietnamese)</option><option value="zh">简体中文 (Chinese Simplified)</option><option value="zh_TW">繁體中文 (Chinese Traditional)</option>',22)])],512),[[b,o.value.locale]]),e("div",ue,l(s.$t("config.locale_desc")),1)]),e("div",_e,[e("label",ce,l(s.$t("config.sunshine_name")),1),_(e("input",{type:"text",class:"form-control",id:"sunshine_name",placeholder:"Sunshine","onUpdate:modelValue":i[1]||(i[1]=u=>o.value.sunshine_name=u)},null,512),[[m,o.value.sunshine_name]]),e("div",pe,l(s.$t("config.sunshine_name_desc")),1)]),e("div",fe,[e("label",me,l(s.$t("config.min_log_level")),1),_(e("select",{id:"min_log_level",class:"form-select","onUpdate:modelValue":i[2]||(i[2]=u=>o.value.min_log_level=u)},[e("option",ve,l(s.$t("config.min_log_level_0")),1),e("option",ge,l(s.$t("config.min_log_level_1")),1),e("option",$e,l(s.$t("config.min_log_level_2")),1),e("option",he,l(s.$t("config.min_log_level_3")),1),e("option",be,l(s.$t("config.min_log_level_4")),1),e("option",ye,l(s.$t("config.min_log_level_5")),1),e("option",we,l(s.$t("config.min_log_level_6")),1)],512),[[b,o.value.min_log_level]]),e("div",ke,l(s.$t("config.min_log_level_desc")),1)]),e("div",Ve,[e("label",Ue,l(s.$t("config.global_prep_cmd")),1),e("div",qe,l(s.$t("config.global_prep_cmd_desc")),1),o.value.global_prep_cmd.length>0?(d(),c("table",Se,[e("thead",null,[e("tr",null,[e("th",Ee,[f(k(K),{size:16}),v(" "+l(s.$t("_common.do_cmd")),1)]),e("th",Ie,[f(k(se),{size:16}),v(" "+l(s.$t("_common.undo_cmd")),1)]),a.platform==="windows"?(d(),c("th",Me,[f(k(F),{size:16}),v(" "+l(s.$t("_common.run_as")),1)])):p("",!0),i[6]||(i[6]=e("th",{scope:"col"},null,-1))])]),e("tbody",null,[(d(!0),c(V,null,j(o.value.global_prep_cmd,(u,g)=>(d(),c("tr",null,[e("td",null,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":U=>u.do=U},null,8,De),[[m,u.do]])]),e("td",null,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":U=>u.undo=U},null,8,Ae),[[m,u.undo]])]),a.platform==="windows"?(d(),c("td",Oe,[f($,{id:"prep-cmd-admin-"+g,label:"_common.elevated",desc:"",modelValue:u.elevated,"onUpdate:modelValue":U=>u.elevated=U},null,8,["id","modelValue","onUpdate:modelValue"])])):p("",!0),e("td",null,[e("button",{class:"btn btn-danger",onClick:U=>t(g)},[f(k(H),{size:16})],8,Pe),e("button",{class:"btn btn-success",onClick:n},[f(k(X),{size:16})])])]))),256))])])):p("",!0),e("button",{class:"ms-0 mt-2 btn btn-success",style:{margin:"0 auto"},onClick:n}," + "+l(s.$t("config.add")),1)]),f($,{class:"mb-3",id:"notify_pre_releases","locale-prefix":"config",modelValue:o.value.notify_pre_releases,"onUpdate:modelValue":i[3]||(i[3]=u=>o.value.notify_pre_releases=u),default:"false"},null,8,["modelValue"]),f($,{class:"mb-3",id:"system_tray","locale-prefix":"config",modelValue:o.value.system_tray,"onUpdate:modelValue":i[4]||(i[4]=u=>o.value.system_tray=u),default:"true"},null,8,["modelValue"])]))}},S={__name:"PlatformLayout",props:{platform:{type:String,required:!0}},setup(a){return(r,o)=>(d(),c(V,null,[r.$slots.windows&&a.platform==="windows"?D(r.$slots,"windows",{key:0}):p("",!0),r.$slots.freebsd&&a.platform==="freebsd"?D(r.$slots,"freebsd",{key:1}):p("",!0),r.$slots.linux&&a.platform==="linux"?D(r.$slots,"linux",{key:2}):p("",!0),r.$slots.macos&&a.platform==="macos"?D(r.$slots,"macos",{key:3}):p("",!0)],64))}},Te={id:"input",class:"config-page"},Ne={key:0,class:"mb-3"},ze={for:"gamepad",class:"form-label"},je={value:"auto"},He={value:"switch"},Ge={value:"xone"},Be={value:"ds5"},Le={value:"switch"},Fe={value:"xone"},Re={value:"ds4"},Qe={value:"x360"},Je={class:"form-text"},Ke={key:0,class:"mb-3 accordion"},Xe={class:"accordion-item"},Ye={class:"accordion-header"},We={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},Ze={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},xe={class:"accordion-body"},eo={key:2,class:"mb-3"},oo={for:"back_button_timeout",class:"form-label"},to={class:"form-text"},lo={key:3,class:"mb-3"},no={for:"key_repeat_delay",class:"form-label"},so={class:"form-text"},ao={key:4,class:"mb-3"},io={for:"key_repeat_frequency",class:"form-label"},ro={class:"form-text"},uo={__name:"Inputs",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",Te,[f($,{class:"mb-3",id:"controller","locale-prefix":"config",modelValue:o.value.controller,"onUpdate:modelValue":t[0]||(t[0]=s=>o.value.controller=s),default:"true"},null,8,["modelValue"]),o.value.controller==="enabled"&&a.platform!=="macos"?(d(),c("div",Ne,[e("label",ze,l(n.$t("config.gamepad")),1),_(e("select",{id:"gamepad",class:"form-select","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.gamepad=s)},[e("option",je,l(n.$t("_common.auto")),1),f(S,{platform:a.platform},{freebsd:h(()=>[e("option",He,l(n.$t("config.gamepad_switch")),1),e("option",Ge,l(n.$t("config.gamepad_xone")),1)]),linux:h(()=>[e("option",Be,l(n.$t("config.gamepad_ds5")),1),e("option",Le,l(n.$t("config.gamepad_switch")),1),e("option",Fe,l(n.$t("config.gamepad_xone")),1)]),windows:h(()=>[e("option",Re,l(n.$t("config.gamepad_ds4")),1),e("option",Qe,l(n.$t("config.gamepad_x360")),1)]),_:1},8,["platform"])],512),[[b,o.value.gamepad]]),e("div",Je,l(n.$t("config.gamepad_desc")),1)])):p("",!0),o.value.controller==="enabled"?(d(),c(V,{key:1},[o.value.gamepad==="ds4"||o.value.gamepad==="ds5"||o.value.gamepad==="auto"&&a.platform!=="macos"?(d(),c("div",Ke,[e("div",Xe,[e("h2",Ye,[e("button",We,l(n.$t(o.value.gamepad==="ds4"?"config.gamepad_ds4_manual":o.value.gamepad==="ds5"?"config.gamepad_ds5_manual":"config.gamepad_auto")),1)]),e("div",Ze,[e("div",xe,[o.value.gamepad==="auto"&&(a.platform==="windows"||a.platform==="linux")?(d(),c(V,{key:0},[f($,{class:"mb-3",id:"motion_as_ds4","locale-prefix":"config",modelValue:o.value.motion_as_ds4,"onUpdate:modelValue":t[2]||(t[2]=s=>o.value.motion_as_ds4=s),default:"true"},null,8,["modelValue"]),f($,{class:"mb-3",id:"touchpad_as_ds4","locale-prefix":"config",modelValue:o.value.touchpad_as_ds4,"onUpdate:modelValue":t[3]||(t[3]=s=>o.value.touchpad_as_ds4=s),default:"true"},null,8,["modelValue"])],64)):p("",!0),o.value.gamepad==="ds4"||o.value.gamepad==="auto"&&a.platform==="windows"?(d(),w($,{key:1,class:"mb-3",id:"ds4_back_as_touchpad_click","locale-prefix":"config",modelValue:o.value.ds4_back_as_touchpad_click,"onUpdate:modelValue":t[4]||(t[4]=s=>o.value.ds4_back_as_touchpad_click=s),default:"true"},null,8,["modelValue"])):p("",!0),o.value.gamepad==="ds5"||o.value.gamepad==="auto"&&a.platform==="linux"?(d(),w($,{key:2,class:"mb-3",id:"ds5_inputtino_randomize_mac","locale-prefix":"config",modelValue:o.value.ds5_inputtino_randomize_mac,"onUpdate:modelValue":t[5]||(t[5]=s=>o.value.ds5_inputtino_randomize_mac=s),default:"true"},null,8,["modelValue"])):p("",!0)])])])])):p("",!0)],64)):p("",!0),o.value.controller==="enabled"?(d(),c("div",eo,[e("label",oo,l(n.$t("config.back_button_timeout")),1),_(e("input",{type:"text",class:"form-control",id:"back_button_timeout",placeholder:"-1","onUpdate:modelValue":t[6]||(t[6]=s=>o.value.back_button_timeout=s)},null,512),[[m,o.value.back_button_timeout]]),e("div",to,l(n.$t("config.back_button_timeout_desc")),1)])):p("",!0),t[15]||(t[15]=e("hr",null,null,-1)),f($,{class:"mb-3",id:"keyboard","locale-prefix":"config",modelValue:o.value.keyboard,"onUpdate:modelValue":t[7]||(t[7]=s=>o.value.keyboard=s),default:"true"},null,8,["modelValue"]),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),c("div",lo,[e("label",no,l(n.$t("config.key_repeat_delay")),1),_(e("input",{type:"text",class:"form-control",id:"key_repeat_delay",placeholder:"500","onUpdate:modelValue":t[8]||(t[8]=s=>o.value.key_repeat_delay=s)},null,512),[[m,o.value.key_repeat_delay]]),e("div",so,l(n.$t("config.key_repeat_delay_desc")),1)])):p("",!0),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),c("div",ao,[e("label",io,l(n.$t("config.key_repeat_frequency")),1),_(e("input",{type:"text",class:"form-control",id:"key_repeat_frequency",placeholder:"24.9","onUpdate:modelValue":t[9]||(t[9]=s=>o.value.key_repeat_frequency=s)},null,512),[[m,o.value.key_repeat_frequency]]),e("div",ro,l(n.$t("config.key_repeat_frequency_desc")),1)])):p("",!0),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),w($,{key:5,class:"mb-3",id:"always_send_scancodes","locale-prefix":"config",modelValue:o.value.always_send_scancodes,"onUpdate:modelValue":t[10]||(t[10]=s=>o.value.always_send_scancodes=s),default:"true"},null,8,["modelValue"])):p("",!0),o.value.keyboard==="enabled"?(d(),w($,{key:6,class:"mb-3",id:"key_rightalt_to_key_win","locale-prefix":"config",modelValue:o.value.key_rightalt_to_key_win,"onUpdate:modelValue":t[11]||(t[11]=s=>o.value.key_rightalt_to_key_win=s),default:"false"},null,8,["modelValue"])):p("",!0),t[16]||(t[16]=e("hr",null,null,-1)),f($,{class:"mb-3",id:"mouse","locale-prefix":"config",modelValue:o.value.mouse,"onUpdate:modelValue":t[12]||(t[12]=s=>o.value.mouse=s),default:"true"},null,8,["modelValue"]),o.value.mouse==="enabled"?(d(),w($,{key:7,class:"mb-3",id:"high_resolution_scrolling","locale-prefix":"config",modelValue:o.value.high_resolution_scrolling,"onUpdate:modelValue":t[13]||(t[13]=s=>o.value.high_resolution_scrolling=s),default:"true"},null,8,["modelValue"])):p("",!0),o.value.mouse==="enabled"?(d(),w($,{key:8,class:"mb-3",id:"native_pen_touch","locale-prefix":"config",modelValue:o.value.native_pen_touch,"onUpdate:modelValue":t[14]||(t[14]=s=>o.value.native_pen_touch=s),default:"true"},null,8,["modelValue"])):p("",!0)]))}},_o={id:"network",class:"config-page"},co={class:"mb-3"},po={for:"address_family",class:"form-label"},fo={value:"ipv4"},mo={value:"both"},vo={class:"form-text"},go={class:"mb-3"},$o={for:"bind_address",class:"form-label"},ho={class:"form-text"},bo={class:"mb-3"},yo={for:"port",class:"form-label"},wo={class:"form-text"},ko={key:0,class:"alert alert-danger"},Vo={key:1,class:"alert alert-danger"},Uo={class:"table"},qo={scope:"col"},So={scope:"col"},Eo={scope:"col"},Io={key:0,class:"alert alert-primary",role:"alert"},Mo={key:2,class:"alert alert-warning"},Do={class:"mb-3"},Ao={for:"origin_web_ui_allowed",class:"form-label"},Oo={value:"pc"},Po={value:"lan"},Co={value:"wan"},To={class:"form-text"},No={class:"mb-3"},zo={for:"csrf_allowed_origins",class:"form-label"},jo={class:"form-text"},Ho={class:"mb-3"},Go={for:"external_ip",class:"form-label"},Bo={class:"form-text"},Lo={class:"mb-3"},Fo={for:"lan_encryption_mode",class:"form-label"},Ro={value:"0"},Qo={value:"1"},Jo={value:"2"},Ko={class:"form-text"},Xo={class:"mb-3"},Yo={for:"wan_encryption_mode",class:"form-label"},Wo={value:"0"},Zo={value:"1"},xo={value:"2"},et={class:"form-text"},ot={class:"mb-3"},tt={for:"ping_timeout",class:"form-label"},lt={class:"form-text"},N=47989,nt={__name:"Network",props:["platform","config"],setup(a){const o=y(a.config),n=C(()=>{var t;return+((t=o.value)==null?void 0:t.port)});return(t,s)=>(d(),c("div",_o,[f($,{class:"mb-3",id:"upnp","locale-prefix":"config",modelValue:o.value.upnp,"onUpdate:modelValue":s[0]||(s[0]=i=>o.value.upnp=i),default:"false"},null,8,["modelValue"]),e("div",co,[e("label",po,l(t.$t("config.address_family")),1),_(e("select",{id:"address_family",class:"form-select","onUpdate:modelValue":s[1]||(s[1]=i=>o.value.address_family=i)},[e("option",fo,l(t.$t("config.address_family_ipv4")),1),e("option",mo,l(t.$t("config.address_family_both")),1)],512),[[b,o.value.address_family]]),e("div",vo,l(t.$t("config.address_family_desc")),1)]),e("div",go,[e("label",$o,l(t.$t("config.bind_address")),1),_(e("input",{type:"text",class:"form-control",id:"bind_address","onUpdate:modelValue":s[2]||(s[2]=i=>o.value.bind_address=i)},null,512),[[m,o.value.bind_address]]),e("div",ho,l(t.$t("config.bind_address_desc")),1)]),e("div",bo,[e("label",yo,l(t.$t("config.port")),1),_(e("input",{type:"number",min:"1029",max:"65514",class:"form-control",id:"port",placeholder:N,"onUpdate:modelValue":s[3]||(s[3]=i=>o.value.port=i)},null,512),[[m,o.value.port]]),e("div",wo,l(t.$t("config.port_desc")),1),+n.value-5<1024?(d(),c("div",ko,[f(k(O),{size:20}),v(" "+l(t.$t("config.port_alert_1")),1)])):p("",!0),+n.value+21>65535?(d(),c("div",Vo,[f(k(O),{size:20}),v(" "+l(t.$t("config.port_alert_2")),1)])):p("",!0),e("table",Uo,[e("thead",null,[e("tr",null,[e("th",qo,l(t.$t("config.port_protocol")),1),e("th",So,l(t.$t("config.port_port")),1),e("th",Eo,l(t.$t("config.port_note")),1)])]),e("tbody",null,[e("tr",null,[e("td",null,l(t.$t("config.port_tcp")),1),e("td",null,l(+n.value-5),1),s[10]||(s[10]=e("td",null,null,-1))]),e("tr",null,[e("td",null,l(t.$t("config.port_tcp")),1),e("td",null,l(+n.value),1),e("td",null,[+n.value!==N?(d(),c("div",Io,[f(k(R),{size:20}),v(" "+l(t.$t("config.port_http_port_note")),1)])):p("",!0)])]),e("tr",null,[e("td",null,l(t.$t("config.port_tcp")),1),e("td",null,l(+n.value+1),1),e("td",null,l(t.$t("config.port_web_ui")),1)]),e("tr",null,[e("td",null,l(t.$t("config.port_tcp")),1),e("td",null,l(+n.value+21),1),s[11]||(s[11]=e("td",null,null,-1))]),e("tr",null,[e("td",null,l(t.$t("config.port_udp")),1),e("td",null,l(+n.value+9)+" - "+l(+n.value+11),1),s[12]||(s[12]=e("td",null,null,-1))])])]),o.value.origin_web_ui_allowed==="wan"?(d(),c("div",Mo,[f(k(O),{size:20}),v(" "+l(t.$t("config.port_warning")),1)])):p("",!0)]),e("div",Do,[e("label",Ao,l(t.$t("config.origin_web_ui_allowed")),1),_(e("select",{id:"origin_web_ui_allowed",class:"form-select","onUpdate:modelValue":s[4]||(s[4]=i=>o.value.origin_web_ui_allowed=i)},[e("option",Oo,l(t.$t("config.origin_web_ui_allowed_pc")),1),e("option",Po,l(t.$t("config.origin_web_ui_allowed_lan")),1),e("option",Co,l(t.$t("config.origin_web_ui_allowed_wan")),1)],512),[[b,o.value.origin_web_ui_allowed]]),e("div",To,l(t.$t("config.origin_web_ui_allowed_desc")),1)]),e("div",No,[e("label",zo,l(t.$t("config.csrf_allowed_origins")),1),_(e("input",{type:"text",class:"form-control",id:"csrf_allowed_origins","onUpdate:modelValue":s[5]||(s[5]=i=>o.value.csrf_allowed_origins=i)},null,512),[[m,o.value.csrf_allowed_origins]]),e("div",jo,l(t.$t("config.csrf_allowed_origins_desc")),1)]),e("div",Ho,[e("label",Go,l(t.$t("config.external_ip")),1),_(e("input",{type:"text",class:"form-control",id:"external_ip",placeholder:"123.456.789.12","onUpdate:modelValue":s[6]||(s[6]=i=>o.value.external_ip=i)},null,512),[[m,o.value.external_ip]]),e("div",Bo,l(t.$t("config.external_ip_desc")),1)]),e("div",Lo,[e("label",Fo,l(t.$t("config.lan_encryption_mode")),1),_(e("select",{id:"lan_encryption_mode",class:"form-select","onUpdate:modelValue":s[7]||(s[7]=i=>o.value.lan_encryption_mode=i)},[e("option",Ro,l(t.$t("_common.disabled_def")),1),e("option",Qo,l(t.$t("config.lan_encryption_mode_1")),1),e("option",Jo,l(t.$t("config.lan_encryption_mode_2")),1)],512),[[b,o.value.lan_encryption_mode]]),e("div",Ko,l(t.$t("config.lan_encryption_mode_desc")),1)]),e("div",Xo,[e("label",Yo,l(t.$t("config.wan_encryption_mode")),1),_(e("select",{id:"wan_encryption_mode",class:"form-select","onUpdate:modelValue":s[8]||(s[8]=i=>o.value.wan_encryption_mode=i)},[e("option",Wo,l(t.$t("_common.disabled")),1),e("option",Zo,l(t.$t("config.wan_encryption_mode_1")),1),e("option",xo,l(t.$t("config.wan_encryption_mode_2")),1)],512),[[b,o.value.wan_encryption_mode]]),e("div",et,l(t.$t("config.wan_encryption_mode_desc")),1)]),e("div",ot,[e("label",tt,l(t.$t("config.ping_timeout")),1),_(e("input",{type:"text",class:"form-control",id:"ping_timeout",placeholder:"10000","onUpdate:modelValue":s[9]||(s[9]=i=>o.value.ping_timeout=i)},null,512),[[m,o.value.ping_timeout]]),e("div",lt,l(t.$t("config.ping_timeout_desc")),1)])]))}},st={id:"files",class:"config-page"},at={class:"mb-3"},it={for:"file_apps",class:"form-label"},dt={class:"form-text"},rt={class:"mb-3"},ut={for:"credentials_file",class:"form-label"},_t={class:"form-text"},ct={class:"mb-3"},pt={for:"log_path",class:"form-label"},ft={class:"form-text"},mt={class:"mb-3"},vt={for:"pkey",class:"form-label"},gt={class:"form-text"},$t={class:"mb-3"},ht={for:"cert",class:"form-label"},bt={class:"form-text"},yt={class:"mb-3"},wt={for:"file_state",class:"form-label"},kt={class:"form-text"},Vt={__name:"Files",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",st,[e("div",at,[e("label",it,l(n.$t("config.file_apps")),1),_(e("input",{type:"text",class:"form-control",id:"file_apps",placeholder:"apps.json","onUpdate:modelValue":t[0]||(t[0]=s=>o.value.file_apps=s)},null,512),[[m,o.value.file_apps]]),e("div",dt,l(n.$t("config.file_apps_desc")),1)]),e("div",rt,[e("label",ut,l(n.$t("config.credentials_file")),1),_(e("input",{type:"text",class:"form-control",id:"credentials_file",placeholder:"sunshine_state.json","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.credentials_file=s)},null,512),[[m,o.value.credentials_file]]),e("div",_t,l(n.$t("config.credentials_file_desc")),1)]),e("div",ct,[e("label",pt,l(n.$t("config.log_path")),1),_(e("input",{type:"text",class:"form-control",id:"log_path",placeholder:"sunshine.log","onUpdate:modelValue":t[2]||(t[2]=s=>o.value.log_path=s)},null,512),[[m,o.value.log_path]]),e("div",ft,l(n.$t("config.log_path_desc")),1)]),e("div",mt,[e("label",vt,l(n.$t("config.pkey")),1),_(e("input",{type:"text",class:"form-control",id:"pkey",placeholder:"/dir/pkey.pem","onUpdate:modelValue":t[3]||(t[3]=s=>o.value.pkey=s)},null,512),[[m,o.value.pkey]]),e("div",gt,l(n.$t("config.pkey_desc")),1)]),e("div",$t,[e("label",ht,l(n.$t("config.cert")),1),_(e("input",{type:"text",class:"form-control",id:"cert",placeholder:"/dir/cert.pem","onUpdate:modelValue":t[4]||(t[4]=s=>o.value.cert=s)},null,512),[[m,o.value.cert]]),e("div",bt,l(n.$t("config.cert_desc")),1)]),e("div",yt,[e("label",wt,l(n.$t("config.file_state")),1),_(e("input",{type:"text",class:"form-control",id:"file_state",placeholder:"sunshine_state.json","onUpdate:modelValue":t[5]||(t[5]=s=>o.value.file_state=s)},null,512),[[m,o.value.file_state]]),e("div",kt,l(n.$t("config.file_state_desc")),1)])]))}},Ut={class:"config-page"},qt={class:"mb-3"},St={for:"fec_percentage",class:"form-label"},Et={class:"form-text"},It={class:"mb-3"},Mt={for:"qp",class:"form-label"},Dt={class:"form-text"},At={class:"mb-3"},Ot={for:"min_threads",class:"form-label"},Pt={class:"form-text"},Ct={class:"mb-3"},Tt={for:"hevc_mode",class:"form-label"},Nt={value:"0"},zt={value:"1"},jt={value:"2"},Ht={value:"3"},Gt={class:"form-text"},Bt={class:"mb-3"},Lt={for:"av1_mode",class:"form-label"},Ft={value:"0"},Rt={value:"1"},Qt={value:"2"},Jt={value:"3"},Kt={class:"form-text"},Xt={key:0,class:"mb-3"},Yt={for:"capture",class:"form-label"},Wt={value:""},Zt={value:"wgc"},xt={class:"form-text"},el={class:"mb-3"},ol={for:"encoder",class:"form-label"},tl={value:""},ll={value:"software"},nl={class:"form-text"},sl={__name:"Advanced",props:["platform","config","global_prep_cmd"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",Ut,[e("div",qt,[e("label",St,l(n.$t("config.fec_percentage")),1),_(e("input",{type:"text",class:"form-control",id:"fec_percentage",placeholder:"20","onUpdate:modelValue":t[0]||(t[0]=s=>o.value.fec_percentage=s)},null,512),[[m,o.value.fec_percentage]]),e("div",Et,l(n.$t("config.fec_percentage_desc")),1)]),e("div",It,[e("label",Mt,l(n.$t("config.qp")),1),_(e("input",{type:"number",class:"form-control",id:"qp",placeholder:"28","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.qp=s)},null,512),[[m,o.value.qp]]),e("div",Dt,l(n.$t("config.qp_desc")),1)]),e("div",At,[e("label",Ot,l(n.$t("config.min_threads")),1),_(e("input",{type:"number",class:"form-control",id:"min_threads",placeholder:"2",min:"1","onUpdate:modelValue":t[2]||(t[2]=s=>o.value.min_threads=s)},null,512),[[m,o.value.min_threads]]),e("div",Pt,l(n.$t("config.min_threads_desc")),1)]),e("div",Ct,[e("label",Tt,l(n.$t("config.hevc_mode")),1),_(e("select",{id:"hevc_mode",class:"form-select","onUpdate:modelValue":t[3]||(t[3]=s=>o.value.hevc_mode=s)},[e("option",Nt,l(n.$t("config.hevc_mode_0")),1),e("option",zt,l(n.$t("config.hevc_mode_1")),1),e("option",jt,l(n.$t("config.hevc_mode_2")),1),e("option",Ht,l(n.$t("config.hevc_mode_3")),1)],512),[[b,o.value.hevc_mode]]),e("div",Gt,l(n.$t("config.hevc_mode_desc")),1)]),e("div",Bt,[e("label",Lt,l(n.$t("config.av1_mode")),1),_(e("select",{id:"av1_mode",class:"form-select","onUpdate:modelValue":t[4]||(t[4]=s=>o.value.av1_mode=s)},[e("option",Ft,l(n.$t("config.av1_mode_0")),1),e("option",Rt,l(n.$t("config.av1_mode_1")),1),e("option",Qt,l(n.$t("config.av1_mode_2")),1),e("option",Jt,l(n.$t("config.av1_mode_3")),1)],512),[[b,o.value.av1_mode]]),e("div",Kt,l(n.$t("config.av1_mode_desc")),1)]),a.platform!=="macos"?(d(),c("div",Xt,[e("label",Yt,l(n.$t("config.capture")),1),_(e("select",{id:"capture",class:"form-select","onUpdate:modelValue":t[5]||(t[5]=s=>o.value.capture=s)},[e("option",Wt,l(n.$t("_common.autodetect")),1),f(S,{platform:a.platform},{freebsd:h(()=>[...t[7]||(t[7]=[e("option",{value:"wlr"},"wlroots",-1),e("option",{value:"x11"},"X11",-1),e("option",{value:"portal"},"XDG Portal",-1)])]),linux:h(()=>[...t[8]||(t[8]=[e("option",{value:"nvfbc"},"NvFBC",-1),e("option",{value:"wlr"},"wlroots",-1),e("option",{value:"kms"},"KMS",-1),e("option",{value:"x11"},"X11",-1),e("option",{value:"portal"},"XDG Portal",-1)])]),windows:h(()=>[t[9]||(t[9]=e("option",{value:"ddx"},"Desktop Duplication API",-1)),e("option",Zt,"Windows.Graphics.Capture "+l(n.$t("_common.beta")),1)]),_:1},8,["platform"])],512),[[b,o.value.capture]]),e("div",xt,l(n.$t("config.capture_desc")),1)])):p("",!0),e("div",el,[e("label",ol,l(n.$t("config.encoder")),1),_(e("select",{id:"encoder",class:"form-select","onUpdate:modelValue":t[6]||(t[6]=s=>o.value.encoder=s)},[e("option",tl,l(n.$t("_common.autodetect")),1),f(S,{platform:a.platform},{windows:h(()=>[...t[10]||(t[10]=[e("option",{value:"nvenc"},"NVIDIA NVENC",-1),e("option",{value:"quicksync"},"Intel QuickSync",-1),e("option",{value:"amdvce"},"AMD AMF/VCE",-1)])]),freebsd:h(()=>[...t[11]||(t[11]=[e("option",{value:"vaapi"},"VA-API",-1)])]),linux:h(()=>[...t[12]||(t[12]=[e("option",{value:"nvenc"},"NVIDIA NVENC",-1),e("option",{value:"vaapi"},"VA-API",-1)])]),macos:h(()=>[...t[13]||(t[13]=[e("option",{value:"videotoolbox"},"VideoToolbox",-1)])]),_:1},8,["platform"]),e("option",ll,l(n.$t("config.encoder_software")),1)],512),[[b,o.value.encoder]]),e("div",nl,l(n.$t("config.encoder_desc")),1)])]))}};class al{constructor(r){this.platform=r}getPlatformKey(r,o){return r+"_"+o}getMessageUsingPlatform(r,o){const n=this.getPlatformKey(r,this.platform),t=T("i18n");let s=t.t(n);if(s!==n)return s;if(this.platform==="windows")return o||s;const i=this.getPlatformKey(r,"unix");return s=t.t(i),s===i&&o?o:s}}function il(a){if(a||(a=T("platform").value),!a)throw"platform argument missing";return T("platformMessage",()=>new al(a),!0)}function A(a,r){return il().getMessageUsingPlatform(a,r)}const dl={key:0,class:"mb-3"},rl={for:"adapter_name",class:"form-label"},ul=["placeholder"],_l={class:"form-text"},cl={__name:"AdapterNameSelector",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>a.platform!=="macos"?(d(),c("div",dl,[e("label",rl,l(n.$t("config.adapter_name")),1),_(e("input",{type:"text",class:"form-control",id:"adapter_name",placeholder:k(A)("config.adapter_name_placeholder","/dev/dri/renderD128"),"onUpdate:modelValue":t[0]||(t[0]=s=>o.value.adapter_name=s)},null,8,ul),[[m,o.value.adapter_name]]),e("div",_l,[f(S,{platform:a.platform},{windows:h(()=>[v(l(n.$t("config.adapter_name_desc_windows")),1),t[1]||(t[1]=e("br",null,null,-1)),t[2]||(t[2]=e("pre",null,"tools\\dxgi-info.exe",-1))]),freebsd:h(()=>[v(l(n.$t("config.adapter_name_desc_linux_1")),1),t[3]||(t[3]=e("br",null,null,-1)),e("pre",null,"ls /dev/dri/renderD*  # "+l(n.$t("config.adapter_name_desc_linux_2")),1),t[4]||(t[4]=e("pre",null,`              vainfo --display drm --device /dev/dri/renderD129 | \\
                grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
            `,-1)),v(" "+l(n.$t("config.adapter_name_desc_linux_3")),1),t[5]||(t[5]=e("br",null,null,-1)),t[6]||(t[6]=e("i",null,"VAProfileH264High : VAEntrypointEncSlice",-1))]),linux:h(()=>[v(l(n.$t("config.adapter_name_desc_linux_1")),1),t[7]||(t[7]=e("br",null,null,-1)),e("pre",null,"ls /dev/dri/renderD*  # "+l(n.$t("config.adapter_name_desc_linux_2")),1),t[8]||(t[8]=e("pre",null,`              vainfo --display drm --device /dev/dri/renderD129 | \\
                grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
            `,-1)),v(" "+l(n.$t("config.adapter_name_desc_linux_3")),1),t[9]||(t[9]=e("br",null,null,-1)),t[10]||(t[10]=e("i",null,"VAProfileH264High : VAEntrypointEncSlice",-1))]),_:1},8,["platform"])])])):p("",!0)}},pl={class:"mb-3"},fl={for:"output_name",class:"form-label"},ml=["placeholder"],vl={class:"form-text"},gl={__name:"DisplayOutputSelector",props:["platform","config"],setup(a){const r=a,o=y(r.config),n=r.platform==="windows"?"{de9bb7e2-186e-505b-9e93-f48793333810}":"0";return(t,s)=>(d(),c("div",pl,[e("label",fl,l(t.$t("config.output_name")),1),_(e("input",{type:"text",class:"form-control",id:"output_name",placeholder:k(n),"onUpdate:modelValue":s[0]||(s[0]=i=>o.value.output_name=i)},null,8,ml),[[m,o.value.output_name]]),e("div",vl,[v(l(k(A)("config.output_name_desc")),1),s[5]||(s[5]=e("br",null,null,-1)),f(S,{platform:a.platform},{windows:h(()=>[...s[1]||(s[1]=[e("pre",{style:{"white-space":"pre-line"}},[v("            "),e("b",null,"  {"),v(`
            `),e("b",null,'    "device_id": "{de9bb7e2-186e-505b-9e93-f48793333810}"'),v(`
            `),e("b",null,'    "display_name": "\\\\\\\\.\\\\DISPLAY1"'),v(`
            `),e("b",null,'    "friendly_name": "ROG PG279Q"'),v(`
            `),e("b",null,"    ..."),v(`
            `),e("b",null,"  }"),v(`
          `)],-1)])]),freebsd:h(()=>[...s[2]||(s[2]=[e("pre",{style:{"white-space":"pre-line"}},`            Info: Detecting displays
            Info: Detected display: DVI-D-0 (id: 0) connected: false
            Info: Detected display: HDMI-0 (id: 1) connected: true
            Info: Detected display: DP-0 (id: 2) connected: true
            Info: Detected display: DP-1 (id: 3) connected: false
            Info: Detected display: DVI-D-1 (id: 4) connected: false
          `,-1)])]),linux:h(()=>[...s[3]||(s[3]=[e("pre",{style:{"white-space":"pre-line"}},`            Info: Detecting displays
            Info: Detected display: DVI-D-0 (id: 0) connected: false
            Info: Detected display: HDMI-0 (id: 1) connected: true
            Info: Detected display: DP-0 (id: 2) connected: true
            Info: Detected display: DP-1 (id: 3) connected: false
            Info: Detected display: DVI-D-1 (id: 4) connected: false
          `,-1)])]),macos:h(()=>[...s[4]||(s[4]=[e("pre",{style:{"white-space":"pre-line"}},`            Info: Detecting displays
            Info: Detected display: Monitor-0 (id: 3) connected: true
            Info: Detected display: Monitor-1 (id: 2) connected: true
          `,-1)])]),_:1},8,["platform"])])]))}},$l={class:"mb-3 accordion"},hl={class:"accordion-item"},bl={class:"accordion-header"},yl={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},wl={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},kl={class:"accordion-body"},Vl={class:"mb-3"},Ul={for:"dd_configuration_option",class:"form-label"},ql={value:"disabled"},Sl={value:"verify_only"},El={value:"ensure_active"},Il={value:"ensure_primary"},Ml={value:"ensure_only_display"},Dl={key:0,class:"mb-3"},Al={for:"dd_resolution_option",class:"form-label"},Ol={value:"disabled"},Pl={value:"auto"},Cl={value:"manual"},Tl={key:0,class:"form-text"},Nl={key:1,class:"mt-2 ps-4"},zl={class:"form-text"},jl={key:1,class:"mb-3"},Hl={for:"dd_refresh_rate_option",class:"form-label"},Gl={value:"disabled"},Bl={value:"auto"},Ll={value:"manual"},Fl={key:0,class:"mt-2 ps-4"},Rl={class:"form-text"},Ql={key:2,class:"mb-3"},Jl={for:"dd_hdr_option",class:"form-label"},Kl={value:"disabled"},Xl={value:"auto"},Yl={for:"dd_wa_hdr_toggle_delay",class:"form-label"},Wl={class:"form-text"},Zl={key:3,class:"mb-3"},xl={for:"dd_config_revert_delay",class:"form-label"},en={class:"form-text"},on={key:4,class:"mb-3"},tn={key:5,class:"mb-3"},ln={for:"dd_mode_remapping",class:"form-label"},nn={id:"dd_mode_remapping",class:"d-flex flex-column"},sn={class:"form-text"},an={key:0,class:"table"},dn={key:0,scope:"col"},rn={key:1,scope:"col"},un={key:2,scope:"col"},_n={key:3,scope:"col"},cn={key:0},pn=["onUpdate:modelValue"],fn={key:1},mn=["onUpdate:modelValue"],vn={key:2},gn=["onUpdate:modelValue"],$n={key:3},hn=["onUpdate:modelValue"],bn=["onClick"],M="refresh_rate_only",E="resolution_only",P="mixed",yn={__name:"DisplayDeviceOptions",props:{platform:String,config:Object},setup(a){const o=y(a.config);function n(){return(o.value.dd_resolution_option==="auto"||o.value.dd_refresh_rate_option==="auto")&&o.value.dd_configuration_option!=="disabled"}function t(){return o.value.dd_resolution_option!=="auto"?M:o.value.dd_refresh_rate_option!=="auto"?E:P}function s(){const i=t();let u={};i!==E&&(u.requested_fps="",u.final_refresh_rate=""),i!==M&&(u.requested_resolution="",u.final_resolution=""),o.value.dd_mode_remapping[i].push(u)}return(i,u)=>(d(),w(S,{platform:a.platform},{windows:h(()=>[e("div",$l,[e("div",hl,[e("h2",bl,[e("button",yl,l(i.$t("config.dd_options_header")),1)]),e("div",wl,[e("div",kl,[e("div",Vl,[e("label",Ul,l(i.$t("config.dd_configuration_option")),1),_(e("select",{id:"dd_configuration_option",class:"form-select","onUpdate:modelValue":u[0]||(u[0]=g=>o.value.dd_configuration_option=g)},[e("option",ql,l(i.$t("_common.disabled_def")),1),e("option",Sl,l(i.$t("config.dd_config_verify_only")),1),e("option",El,l(i.$t("config.dd_config_ensure_active")),1),e("option",Il,l(i.$t("config.dd_config_ensure_primary")),1),e("option",Ml,l(i.$t("config.dd_config_ensure_only_display")),1)],512),[[b,o.value.dd_configuration_option]])]),o.value.dd_configuration_option!=="disabled"?(d(),c("div",Dl,[e("label",Al,l(i.$t("config.dd_resolution_option")),1),_(e("select",{id:"dd_resolution_option",class:"form-select","onUpdate:modelValue":u[1]||(u[1]=g=>o.value.dd_resolution_option=g)},[e("option",Ol,l(i.$t("config.dd_resolution_option_disabled")),1),e("option",Pl,l(i.$t("config.dd_resolution_option_auto")),1),e("option",Cl,l(i.$t("config.dd_resolution_option_manual")),1)],512),[[b,o.value.dd_resolution_option]]),o.value.dd_resolution_option==="auto"||o.value.dd_resolution_option==="manual"?(d(),c("div",Tl,l(i.$t("config.dd_resolution_option_ogs_desc")),1)):p("",!0),o.value.dd_resolution_option==="manual"?(d(),c("div",Nl,[e("div",zl,l(i.$t("config.dd_manual_resolution")),1),_(e("input",{type:"text",class:"form-control",id:"dd_manual_resolution",placeholder:"2560x1440","onUpdate:modelValue":u[2]||(u[2]=g=>o.value.dd_manual_resolution=g)},null,512),[[m,o.value.dd_manual_resolution]])])):p("",!0)])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",jl,[e("label",Hl,l(i.$t("config.dd_refresh_rate_option")),1),_(e("select",{id:"dd_refresh_rate_option",class:"form-select","onUpdate:modelValue":u[3]||(u[3]=g=>o.value.dd_refresh_rate_option=g)},[e("option",Gl,l(i.$t("config.dd_refresh_rate_option_disabled")),1),e("option",Bl,l(i.$t("config.dd_refresh_rate_option_auto")),1),e("option",Ll,l(i.$t("config.dd_refresh_rate_option_manual")),1)],512),[[b,o.value.dd_refresh_rate_option]]),o.value.dd_refresh_rate_option==="manual"?(d(),c("div",Fl,[e("div",Rl,l(i.$t("config.dd_manual_refresh_rate")),1),_(e("input",{type:"text",class:"form-control",id:"dd_manual_refresh_rate",placeholder:"59.9558","onUpdate:modelValue":u[4]||(u[4]=g=>o.value.dd_manual_refresh_rate=g)},null,512),[[m,o.value.dd_manual_refresh_rate]])])):p("",!0)])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",Ql,[e("label",Jl,l(i.$t("config.dd_hdr_option")),1),_(e("select",{id:"dd_hdr_option",class:"mb-3 form-select","onUpdate:modelValue":u[5]||(u[5]=g=>o.value.dd_hdr_option=g)},[e("option",Kl,l(i.$t("config.dd_hdr_option_disabled")),1),e("option",Xl,l(i.$t("config.dd_hdr_option_auto")),1)],512),[[b,o.value.dd_hdr_option]]),e("label",Yl,l(i.$t("config.dd_wa_hdr_toggle_delay")),1),_(e("input",{type:"number",class:"form-control",id:"dd_wa_hdr_toggle_delay",placeholder:"0",min:"0",max:"3000","onUpdate:modelValue":u[6]||(u[6]=g=>o.value.dd_wa_hdr_toggle_delay=g)},null,512),[[m,o.value.dd_wa_hdr_toggle_delay]]),e("div",Wl,[v(l(i.$t("config.dd_wa_hdr_toggle_delay_desc_1"))+" ",1),u[10]||(u[10]=e("br",null,null,-1)),v(" "+l(i.$t("config.dd_wa_hdr_toggle_delay_desc_2"))+" ",1),u[11]||(u[11]=e("br",null,null,-1)),v(" "+l(i.$t("config.dd_wa_hdr_toggle_delay_desc_3")),1)])])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",Zl,[e("label",xl,l(i.$t("config.dd_config_revert_delay")),1),_(e("input",{type:"number",class:"form-control",id:"dd_config_revert_delay",placeholder:"3000",min:"0","onUpdate:modelValue":u[7]||(u[7]=g=>o.value.dd_config_revert_delay=g)},null,512),[[m,o.value.dd_config_revert_delay]]),e("div",en,l(i.$t("config.dd_config_revert_delay_desc")),1)])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",on,[f($,{id:"dd_config_revert_on_disconnect","locale-prefix":"config",modelValue:o.value.dd_config_revert_on_disconnect,"onUpdate:modelValue":u[8]||(u[8]=g=>o.value.dd_config_revert_on_disconnect=g),default:"false"},null,8,["modelValue"])])):p("",!0),n()?(d(),c("div",tn,[e("label",ln,l(i.$t("config.dd_mode_remapping")),1),e("div",nn,[e("div",sn,[v(l(i.$t("config.dd_mode_remapping_desc_1")),1),u[14]||(u[14]=e("br",null,null,-1)),v(" "+l(i.$t("config.dd_mode_remapping_desc_2")),1),u[15]||(u[15]=e("br",null,null,-1)),v(" "+l(i.$t("config.dd_mode_remapping_desc_3")),1),u[16]||(u[16]=e("br",null,null,-1)),v(" "+l(i.$t(t()===P?"config.dd_mode_remapping_desc_4_final_values_mixed":"config.dd_mode_remapping_desc_4_final_values_non_mixed")),1),u[17]||(u[17]=e("br",null,null,-1)),t()===P?(d(),c(V,{key:0},[v(l(i.$t("config.dd_mode_remapping_desc_5_sops_mixed_only")),1),u[12]||(u[12]=e("br",null,null,-1))],64)):p("",!0),t()===E?(d(),c(V,{key:1},[v(l(i.$t("config.dd_mode_remapping_desc_5_sops_resolution_only")),1),u[13]||(u[13]=e("br",null,null,-1))],64)):p("",!0)])]),o.value.dd_mode_remapping[t()].length>0?(d(),c("table",an,[e("thead",null,[e("tr",null,[t()!==M?(d(),c("th",dn,l(i.$t("config.dd_mode_remapping_requested_resolution")),1)):p("",!0),t()!==E?(d(),c("th",rn,l(i.$t("config.dd_mode_remapping_requested_fps")),1)):p("",!0),t()!==M?(d(),c("th",un,l(i.$t("config.dd_mode_remapping_final_resolution")),1)):p("",!0),t()!==E?(d(),c("th",_n,l(i.$t("config.dd_mode_remapping_final_refresh_rate")),1)):p("",!0),u[18]||(u[18]=e("th",{scope:"col"},null,-1))])]),e("tbody",null,[(d(!0),c(V,null,j(o.value.dd_mode_remapping[t()],(g,U)=>(d(),c("tr",null,[t()!==M?(d(),c("td",cn,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.requested_resolution=q,placeholder:"1920x1080"},null,8,pn),[[m,g.requested_resolution]])])):p("",!0),t()!==E?(d(),c("td",fn,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.requested_fps=q,placeholder:"60"},null,8,mn),[[m,g.requested_fps]])])):p("",!0),t()!==M?(d(),c("td",vn,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.final_resolution=q,placeholder:"2560x1440"},null,8,gn),[[m,g.final_resolution]])])):p("",!0),t()!==E?(d(),c("td",$n,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.final_refresh_rate=q,placeholder:"119.95"},null,8,hn),[[m,g.final_refresh_rate]])])):p("",!0),e("td",null,[e("button",{class:"btn btn-danger",onClick:q=>o.value.dd_mode_remapping[t()].splice(U,1)},[f(k(H),{size:16})],8,bn)])]))),256))])])):p("",!0),e("button",{class:"ms-0 mt-2 btn btn-success",style:{margin:"0 auto"},onClick:u[9]||(u[9]=g=>s())}," + "+l(i.$t("config.dd_mode_remapping_add")),1)])):p("",!0)])])])])]),freebsd:h(()=>[...u[19]||(u[19]=[])]),linux:h(()=>[...u[20]||(u[20]=[])]),macos:h(()=>[...u[21]||(u[21]=[])]),_:1},8,["platform"]))}},wn={class:"mb-3"},kn={for:"max_bitrate",class:"form-label"},Vn={class:"form-text"},Un={class:"mb-3"},qn={for:"minimum_fps_target",class:"form-label"},Sn={class:"form-text"},En={__name:"DisplayModesSettings",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c(V,null,[e("div",wn,[e("label",kn,l(n.$t("config.max_bitrate")),1),_(e("input",{type:"number",class:"form-control",id:"max_bitrate",placeholder:"0","onUpdate:modelValue":t[0]||(t[0]=s=>o.value.max_bitrate=s)},null,512),[[m,o.value.max_bitrate]]),e("div",Vn,l(n.$t("config.max_bitrate_desc")),1)]),e("div",Un,[e("label",qn,l(n.$t("config.minimum_fps_target")),1),_(e("input",{type:"number",min:"0",max:"1000",class:"form-control",id:"minimum_fps_target",placeholder:"0","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.minimum_fps_target=s)},null,512),[[m,o.value.minimum_fps_target]]),e("div",Sn,l(n.$t("config.minimum_fps_target_desc")),1)])],64))}},In=G(En,[["__scopeId","data-v-cb151002"]]),Mn={id:"audio-video",class:"config-page"},Dn={class:"mb-3"},An={for:"audio_sink",class:"form-label"},On=["placeholder"],Pn={class:"form-text"},Cn={class:"mb-3"},Tn={for:"virtual_sink",class:"form-label"},Nn=["placeholder"],zn={class:"form-text"},jn={__name:"AudioVideo",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",Mn,[e("div",Dn,[e("label",An,l(n.$t("config.audio_sink")),1),_(e("input",{type:"text",class:"form-control",id:"audio_sink",placeholder:k(A)("config.audio_sink_placeholder","alsa_output.pci-0000_09_00.3.analog-stereo"),"onUpdate:modelValue":t[0]||(t[0]=s=>o.value.audio_sink=s)},null,8,On),[[m,o.value.audio_sink]]),e("div",Pn,[v(l(k(A)("config.audio_sink_desc")),1),t[8]||(t[8]=e("br",null,null,-1)),f(S,{platform:a.platform},{windows:h(()=>[...t[4]||(t[4]=[e("pre",null,"tools\\audio-info.exe",-1)])]),freebsd:h(()=>[...t[5]||(t[5]=[e("pre",null,'pacmd list-sinks | grep "name:"',-1),e("pre",null,"pactl info | grep Source",-1)])]),linux:h(()=>[...t[6]||(t[6]=[e("pre",null,'pacmd list-sinks | grep "name:"',-1),e("pre",null,"pactl info | grep Source",-1)])]),macos:h(()=>[...t[7]||(t[7]=[e("a",{href:"https://github.com/mattingalls/Soundflower",target:"_blank"},"Soundflower",-1),e("br",null,null,-1),e("a",{href:"https://github.com/ExistentialAudio/BlackHole",target:"_blank"},"BlackHole",-1),v(". ",-1)])]),_:1},8,["platform"])])]),f(S,{platform:a.platform},{windows:h(()=>[e("div",Cn,[e("label",Tn,l(n.$t("config.virtual_sink")),1),_(e("input",{type:"text",class:"form-control",id:"virtual_sink",placeholder:n.$t("config.virtual_sink_placeholder"),"onUpdate:modelValue":t[1]||(t[1]=s=>o.value.virtual_sink=s)},null,8,Nn),[[m,o.value.virtual_sink]]),e("div",zn,l(n.$t("config.virtual_sink_desc")),1)]),f($,{class:"mb-3",id:"install_steam_audio_drivers","locale-prefix":"config",modelValue:o.value.install_steam_audio_drivers,"onUpdate:modelValue":t[2]||(t[2]=s=>o.value.install_steam_audio_drivers=s),default:"true"},null,8,["modelValue"])]),_:1},8,["platform"]),f($,{class:"mb-3",id:"stream_audio","locale-prefix":"config",modelValue:o.value.stream_audio,"onUpdate:modelValue":t[3]||(t[3]=s=>o.value.stream_audio=s),default:"true"},null,8,["modelValue"]),f(cl,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(gl,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(yn,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(In,{platform:a.platform,config:o.value},null,8,["platform","config"])]))}},Hn={id:"nvidia-nvenc-encoder",class:"config-page"},Gn={class:"mb-3"},Bn={for:"nvenc_preset",class:"form-label"},Ln={value:"1"},Fn={value:"7"},Rn={class:"form-text"},Qn={class:"mb-3"},Jn={for:"nvenc_twopass",class:"form-label"},Kn={value:"disabled"},Xn={value:"quarter_res"},Yn={value:"full_res"},Wn={class:"form-text"},Zn={class:"mb-3"},xn={for:"nvenc_vbv_increase",class:"form-label"},es={class:"form-text"},os={class:"mb-3 accordion"},ts={class:"accordion-item"},ls={class:"accordion-header"},ns={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},ss={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},as={class:"accordion-body"},is={__name:"NvidiaNvencEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",Hn,[e("div",Gn,[e("label",Bn,l(n.$t("config.nvenc_preset")),1),_(e("select",{id:"nvenc_preset",class:"form-select","onUpdate:modelValue":t[0]||(t[0]=s=>o.value.nvenc_preset=s)},[e("option",Ln,"P1 "+l(n.$t("config.nvenc_preset_1")),1),t[8]||(t[8]=z('<option value="2">P2</option><option value="3">P3</option><option value="4">P4</option><option value="5">P5</option><option value="6">P6</option>',5)),e("option",Fn,"P7 "+l(n.$t("config.nvenc_preset_7")),1)],512),[[b,o.value.nvenc_preset]]),e("div",Rn,l(n.$t("config.nvenc_preset_desc")),1)]),e("div",Qn,[e("label",Jn,l(n.$t("config.nvenc_twopass")),1),_(e("select",{id:"nvenc_twopass",class:"form-select","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.nvenc_twopass=s)},[e("option",Kn,l(n.$t("config.nvenc_twopass_disabled")),1),e("option",Xn,l(n.$t("config.nvenc_twopass_quarter_res")),1),e("option",Yn,l(n.$t("config.nvenc_twopass_full_res")),1)],512),[[b,o.value.nvenc_twopass]]),e("div",Wn,l(n.$t("config.nvenc_twopass_desc")),1)]),f($,{class:"mb-3",id:"nvenc_spatial_aq","locale-prefix":"config",modelValue:o.value.nvenc_spatial_aq,"onUpdate:modelValue":t[2]||(t[2]=s=>o.value.nvenc_spatial_aq=s),default:"false"},null,8,["modelValue"]),e("div",Zn,[e("label",xn,l(n.$t("config.nvenc_vbv_increase")),1),_(e("input",{type:"number",min:"0",max:"400",class:"form-control",id:"nvenc_vbv_increase",placeholder:"0","onUpdate:modelValue":t[3]||(t[3]=s=>o.value.nvenc_vbv_increase=s)},null,512),[[m,o.value.nvenc_vbv_increase]]),e("div",es,[v(l(n.$t("config.nvenc_vbv_increase_desc")),1),t[9]||(t[9]=e("br",null,null,-1)),t[10]||(t[10]=e("br",null,null,-1)),t[11]||(t[11]=e("a",{href:"https://en.wikipedia.org/wiki/Video_buffering_verifier"},"VBV/HRD",-1))])]),e("div",os,[e("div",ts,[e("h2",ls,[e("button",ns,l(n.$t("config.misc")),1)]),e("div",ss,[e("div",as,[a.platform==="windows"?(d(),w($,{key:0,class:"mb-3",id:"nvenc_realtime_hags","locale-prefix":"config",modelValue:o.value.nvenc_realtime_hags,"onUpdate:modelValue":t[4]||(t[4]=s=>o.value.nvenc_realtime_hags=s),default:"true"},{default:h(()=>[...t[12]||(t[12]=[e("br",null,null,-1),e("br",null,null,-1),e("a",{href:"https://devblogs.microsoft.com/directx/hardware-accelerated-gpu-scheduling/"},"HAGS",-1)])]),_:1},8,["modelValue"])):p("",!0),a.platform==="windows"?(d(),w($,{key:1,class:"mb-3",id:"nvenc_latency_over_power","locale-prefix":"config",modelValue:o.value.nvenc_latency_over_power,"onUpdate:modelValue":t[5]||(t[5]=s=>o.value.nvenc_latency_over_power=s),default:"true"},null,8,["modelValue"])):p("",!0),a.platform==="windows"?(d(),w($,{key:2,class:"mb-3",id:"nvenc_opengl_vulkan_on_dxgi","locale-prefix":"config",modelValue:o.value.nvenc_opengl_vulkan_on_dxgi,"onUpdate:modelValue":t[6]||(t[6]=s=>o.value.nvenc_opengl_vulkan_on_dxgi=s),default:"true"},null,8,["modelValue"])):p("",!0),f($,{class:"mb-3",id:"nvenc_h264_cavlc","locale-prefix":"config",modelValue:o.value.nvenc_h264_cavlc,"onUpdate:modelValue":t[7]||(t[7]=s=>o.value.nvenc_h264_cavlc=s),default:"false"},null,8,["modelValue"])])])])])]))}},ds={id:"intel-quicksync-encoder",class:"config-page"},rs={class:"mb-3"},us={for:"qsv_preset",class:"form-label"},_s={value:"veryfast"},cs={value:"faster"},ps={value:"fast"},fs={value:"medium"},ms={value:"slow"},vs={value:"slower"},gs={value:"slowest"},$s={class:"mb-3"},hs={for:"qsv_coder",class:"form-label"},bs={value:"auto"},ys={value:"cabac"},ws={value:"cavlc"},ks={__name:"IntelQuickSyncEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",ds,[e("div",rs,[e("label",us,l(n.$t("config.qsv_preset")),1),_(e("select",{id:"qsv_preset",class:"form-select","onUpdate:modelValue":t[0]||(t[0]=s=>o.value.qsv_preset=s)},[e("option",_s,l(n.$t("config.qsv_preset_veryfast")),1),e("option",cs,l(n.$t("config.qsv_preset_faster")),1),e("option",ps,l(n.$t("config.qsv_preset_fast")),1),e("option",fs,l(n.$t("config.qsv_preset_medium")),1),e("option",ms,l(n.$t("config.qsv_preset_slow")),1),e("option",vs,l(n.$t("config.qsv_preset_slower")),1),e("option",gs,l(n.$t("config.qsv_preset_slowest")),1)],512),[[b,o.value.qsv_preset]])]),e("div",$s,[e("label",hs,l(n.$t("config.qsv_coder")),1),_(e("select",{id:"qsv_coder",class:"form-select","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.qsv_coder=s)},[e("option",bs,l(n.$t("config.ffmpeg_auto")),1),e("option",ys,l(n.$t("config.coder_cabac")),1),e("option",ws,l(n.$t("config.coder_cavlc")),1)],512),[[b,o.value.qsv_coder]])]),f($,{class:"mb-3",id:"qsv_slow_hevc","locale-prefix":"config",modelValue:o.value.qsv_slow_hevc,"onUpdate:modelValue":t[2]||(t[2]=s=>o.value.qsv_slow_hevc=s),default:"false"},null,8,["modelValue"])]))}},Vs={id:"amd-amf-encoder",class:"config-page"},Us={class:"mb-3"},qs={for:"amd_usage",class:"form-label"},Ss={value:"transcoding"},Es={value:"webcam"},Is={value:"lowlatency_high_quality"},Ms={value:"lowlatency"},Ds={value:"ultralowlatency"},As={class:"form-text"},Os={class:"mb-3 accordion"},Ps={class:"accordion-item"},Cs={class:"accordion-header"},Ts={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},Ns={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},zs={class:"accordion-body"},js={class:"mb-3"},Hs={for:"amd_rc",class:"form-label"},Gs={value:"cbr"},Bs={value:"cqp"},Ls={value:"vbr_latency"},Fs={value:"vbr_peak"},Rs={class:"form-text"},Qs={class:"mb-3 accordion"},Js={class:"accordion-item"},Ks={class:"accordion-header"},Xs={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseTwo"},Ys={id:"panelsStayOpen-collapseTwo",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingTwo"},Ws={class:"accordion-body"},Zs={class:"mb-3"},xs={for:"amd_quality",class:"form-label"},ea={value:"speed"},oa={value:"balanced"},ta={value:"quality"},la={class:"form-text"},na={class:"mb-3"},sa={for:"amd_coder",class:"form-label"},aa={value:"auto"},ia={value:"cabac"},da={value:"cavlc"},ra={class:"form-text"},ua={__name:"AmdAmfEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",Vs,[e("div",Us,[e("label",qs,l(n.$t("config.amd_usage")),1),_(e("select",{id:"amd_usage",class:"form-select","onUpdate:modelValue":t[0]||(t[0]=s=>o.value.amd_usage=s)},[e("option",Ss,l(n.$t("config.amd_usage_transcoding")),1),e("option",Es,l(n.$t("config.amd_usage_webcam")),1),e("option",Is,l(n.$t("config.amd_usage_lowlatency_high_quality")),1),e("option",Ms,l(n.$t("config.amd_usage_lowlatency")),1),e("option",Ds,l(n.$t("config.amd_usage_ultralowlatency")),1)],512),[[b,o.value.amd_usage]]),e("div",As,l(n.$t("config.amd_usage_desc")),1)]),e("div",Os,[e("div",Ps,[e("h2",Cs,[e("button",Ts,l(n.$t("config.amd_rc_group")),1)]),e("div",Ns,[e("div",zs,[e("div",js,[e("label",Hs,l(n.$t("config.amd_rc")),1),_(e("select",{id:"amd_rc",class:"form-select","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.amd_rc=s)},[e("option",Gs,l(n.$t("config.amd_rc_cbr")),1),e("option",Bs,l(n.$t("config.amd_rc_cqp")),1),e("option",Ls,l(n.$t("config.amd_rc_vbr_latency")),1),e("option",Fs,l(n.$t("config.amd_rc_vbr_peak")),1)],512),[[b,o.value.amd_rc]]),e("div",Rs,l(n.$t("config.amd_rc_desc")),1)]),f($,{class:"mb-3",id:"amd_enforce_hrd","locale-prefix":"config",modelValue:o.value.amd_enforce_hrd,"onUpdate:modelValue":t[2]||(t[2]=s=>o.value.amd_enforce_hrd=s),default:"false"},null,8,["modelValue"])])])])]),e("div",Qs,[e("div",Js,[e("h2",Ks,[e("button",Xs,l(n.$t("config.amd_quality_group")),1)]),e("div",Ys,[e("div",Ws,[e("div",Zs,[e("label",xs,l(n.$t("config.amd_quality")),1),_(e("select",{id:"amd_quality",class:"form-select","onUpdate:modelValue":t[3]||(t[3]=s=>o.value.amd_quality=s)},[e("option",ea,l(n.$t("config.amd_quality_speed")),1),e("option",oa,l(n.$t("config.amd_quality_balanced")),1),e("option",ta,l(n.$t("config.amd_quality_quality")),1)],512),[[b,o.value.amd_quality]]),e("div",la,l(n.$t("config.amd_quality_desc")),1)]),f($,{class:"mb-3",id:"amd_preanalysis","locale-prefix":"config",modelValue:o.value.amd_preanalysis,"onUpdate:modelValue":t[4]||(t[4]=s=>o.value.amd_preanalysis=s),default:"false"},null,8,["modelValue"]),f($,{class:"mb-3",id:"amd_vbaq","locale-prefix":"config",modelValue:o.value.amd_vbaq,"onUpdate:modelValue":t[5]||(t[5]=s=>o.value.amd_vbaq=s),default:"true"},null,8,["modelValue"]),e("div",na,[e("label",sa,l(n.$t("config.amd_coder")),1),_(e("select",{id:"amd_coder",class:"form-select","onUpdate:modelValue":t[6]||(t[6]=s=>o.value.amd_coder=s)},[e("option",aa,l(n.$t("config.ffmpeg_auto")),1),e("option",ia,l(n.$t("config.coder_cabac")),1),e("option",da,l(n.$t("config.coder_cavlc")),1)],512),[[b,o.value.amd_coder]]),e("div",ra,l(n.$t("config.amd_coder_desc")),1)])])])])])]))}},_a={id:"videotoolbox-encoder",class:"config-page"},ca={class:"mb-3"},pa={for:"vt_coder",class:"form-label"},fa={value:"auto"},ma={value:"cabac"},va={value:"cavlc"},ga={class:"mb-3"},$a={for:"vt_software",class:"form-label"},ha={value:"auto"},ba={value:"disabled"},ya={value:"allowed"},wa={value:"forced"},ka={__name:"VideotoolboxEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",_a,[e("div",ca,[e("label",pa,l(n.$t("config.vt_coder")),1),_(e("select",{id:"vt_coder",class:"form-select","onUpdate:modelValue":t[0]||(t[0]=s=>o.value.vt_coder=s)},[e("option",fa,l(n.$t("config.ffmpeg_auto")),1),e("option",ma,l(n.$t("config.coder_cabac")),1),e("option",va,l(n.$t("config.coder_cavlc")),1)],512),[[b,o.value.vt_coder]])]),e("div",ga,[e("label",$a,l(n.$t("config.vt_software")),1),_(e("select",{id:"vt_software",class:"form-select","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.vt_software=s)},[e("option",ha,l(n.$t("_common.auto")),1),e("option",ba,l(n.$t("_common.disabled")),1),e("option",ya,l(n.$t("config.vt_software_allowed")),1),e("option",wa,l(n.$t("config.vt_software_forced")),1)],512),[[b,o.value.vt_software]])]),f($,{class:"mb-3",id:"vt_realtime",desc:"","locale-prefix":"config",modelValue:o.value.vt_realtime,"onUpdate:modelValue":t[2]||(t[2]=s=>o.value.vt_realtime=s),default:"true"},null,8,["modelValue"])]))}},Va={id:"software-encoder",class:"config-page"},Ua={class:"mb-3"},qa={for:"sw_preset",class:"form-label"},Sa={value:"ultrafast"},Ea={value:"superfast"},Ia={value:"veryfast"},Ma={value:"faster"},Da={value:"fast"},Aa={value:"medium"},Oa={value:"slow"},Pa={value:"slower"},Ca={value:"veryslow"},Ta={class:"form-text"},Na={class:"mb-3"},za={for:"sw_tune",class:"form-label"},ja={value:"film"},Ha={value:"animation"},Ga={value:"grain"},Ba={value:"stillimage"},La={value:"fastdecode"},Fa={value:"zerolatency"},Ra={class:"form-text"},Qa={__name:"SoftwareEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",Va,[e("div",Ua,[e("label",qa,l(n.$t("config.sw_preset")),1),_(e("select",{id:"sw_preset",class:"form-select","onUpdate:modelValue":t[0]||(t[0]=s=>o.value.sw_preset=s)},[e("option",Sa,l(n.$t("config.sw_preset_ultrafast")),1),e("option",Ea,l(n.$t("config.sw_preset_superfast")),1),e("option",Ia,l(n.$t("config.sw_preset_veryfast")),1),e("option",Ma,l(n.$t("config.sw_preset_faster")),1),e("option",Da,l(n.$t("config.sw_preset_fast")),1),e("option",Aa,l(n.$t("config.sw_preset_medium")),1),e("option",Oa,l(n.$t("config.sw_preset_slow")),1),e("option",Pa,l(n.$t("config.sw_preset_slower")),1),e("option",Ca,l(n.$t("config.sw_preset_veryslow")),1)],512),[[b,o.value.sw_preset]]),e("div",Ta,l(n.$t("config.sw_preset_desc")),1)]),e("div",Na,[e("label",za,l(n.$t("config.sw_tune")),1),_(e("select",{id:"sw_tune",class:"form-select","onUpdate:modelValue":t[1]||(t[1]=s=>o.value.sw_tune=s)},[e("option",ja,l(n.$t("config.sw_tune_film")),1),e("option",Ha,l(n.$t("config.sw_tune_animation")),1),e("option",Ga,l(n.$t("config.sw_tune_grain")),1),e("option",Ba,l(n.$t("config.sw_tune_stillimage")),1),e("option",La,l(n.$t("config.sw_tune_fastdecode")),1),e("option",Fa,l(n.$t("config.sw_tune_zerolatency")),1)],512),[[b,o.value.sw_tune]]),e("div",Ra,l(n.$t("config.sw_tune_desc")),1)])]))}},Ja={id:"vaapi-encoder",class:"config-page"},Ka={__name:"VAAPIEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,t)=>(d(),c("div",Ja,[f($,{class:"mb-3",id:"vaapi_strict_rc_buffer","locale-prefix":"config",modelValue:o.value.vaapi_strict_rc_buffer,"onUpdate:modelValue":t[0]||(t[0]=s=>o.value.vaapi_strict_rc_buffer=s),default:"false"},null,8,["modelValue"])]))}},Xa={__name:"ContainerEncoders",props:["platform","config","currentTab"],setup(a){const o=y(a.config);return(n,t)=>(d(),c(V,null,[a.currentTab==="nv"?(d(),w(is,{key:0,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="qsv"?(d(),w(ks,{key:1,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="amd"?(d(),w(ua,{key:2,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vt"?(d(),w(ka,{key:3,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vaapi"?(d(),w(Ka,{key:4,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="sw"?(d(),w(Qa,{key:5,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0)],64))}},Ya=B({components:{Navbar:J,General:Ce,Inputs:uo,Network:nt,Files:Vt,Advanced:sl,AudioVideo:jn,ContainerEncoders:Xa,Cpu:ee,Check:x,FileCog:oe,Gamepad2:Z,Gpu:te,NetworkIcon:le,Save:W,Search:Y,Settings:Q,Sliders:ne,Volume2:ae},data(){return{platform:"",saved:!1,restarted:!1,config:null,currentTab:"general",searchQuery:"",tabs:[{id:"general",name:"General",options:{locale:"en",sunshine_name:"",min_log_level:2,global_prep_cmd:[],notify_pre_releases:"disabled",system_tray:"enabled"}},{id:"input",name:"Input",options:{controller:"enabled",gamepad:"auto",ds4_back_as_touchpad_click:"enabled",motion_as_ds4:"enabled",touchpad_as_ds4:"enabled",ds5_inputtino_randomize_mac:"enabled",back_button_timeout:-1,keyboard:"enabled",key_repeat_delay:500,key_repeat_frequency:24.9,always_send_scancodes:"enabled",key_rightalt_to_key_win:"disabled",mouse:"enabled",high_resolution_scrolling:"enabled",native_pen_touch:"enabled",keybindings:"[0x10,0xA0,0x11,0xA2,0x12,0xA4]"}},{id:"av",name:"Audio/Video",options:{audio_sink:"",virtual_sink:"",stream_audio:"enabled",install_steam_audio_drivers:"enabled",adapter_name:"",output_name:"",dd_configuration_option:"disabled",dd_resolution_option:"auto",dd_manual_resolution:"",dd_refresh_rate_option:"auto",dd_manual_refresh_rate:"",dd_hdr_option:"auto",dd_wa_hdr_toggle_delay:0,dd_config_revert_delay:3e3,dd_config_revert_on_disconnect:"disabled",dd_mode_remapping:{mixed:[],resolution_only:[],refresh_rate_only:[]},max_bitrate:0,minimum_fps_target:0}},{id:"network",name:"Network",options:{upnp:"disabled",address_family:"ipv4",bind_address:"",port:47989,origin_web_ui_allowed:"lan",csrf_allowed_origins:"",external_ip:"",lan_encryption_mode:0,wan_encryption_mode:1,ping_timeout:1e4}},{id:"files",name:"Config Files",options:{file_apps:"",credentials_file:"",log_path:"",pkey:"",cert:"",file_state:""}},{id:"advanced",name:"Advanced",options:{fec_percentage:20,qp:28,min_threads:2,hevc_mode:0,av1_mode:0,capture:"",encoder:""}},{id:"nv",name:"NVIDIA NVENC Encoder",options:{nvenc_preset:1,nvenc_twopass:"quarter_res",nvenc_spatial_aq:"disabled",nvenc_vbv_increase:0,nvenc_realtime_hags:"enabled",nvenc_latency_over_power:"enabled",nvenc_opengl_vulkan_on_dxgi:"enabled",nvenc_h264_cavlc:"disabled"}},{id:"qsv",name:"Intel QuickSync Encoder",options:{qsv_preset:"medium",qsv_coder:"auto",qsv_slow_hevc:"disabled"}},{id:"amd",name:"AMD AMF Encoder",options:{amd_usage:"ultralowlatency",amd_rc:"vbr_latency",amd_enforce_hrd:"disabled",amd_quality:"balanced",amd_preanalysis:"disabled",amd_vbaq:"enabled",amd_coder:"auto"}},{id:"vt",name:"VideoToolbox Encoder",options:{vt_coder:"auto",vt_software:"auto",vt_realtime:"enabled"}},{id:"vaapi",name:"VA-API Encoder",options:{vaapi_strict_rc_buffer:"disabled"}},{id:"sw",name:"Software Encoder",options:{sw_preset:"superfast",sw_tune:"zerolatency"}}]}},provide(){return{platform:C(()=>this.platform),searchQuery:C(()=>this.searchQuery)}},computed:{allConfigOptions(){const a=[];return this.tabs.forEach(r=>{Object.keys(r.options).forEach(o=>{a.push({key:o,label:o.replaceAll("_"," ").replaceAll(/\b\w/g,n=>n.toUpperCase()),tab:r.name,tabId:r.id})})}),a},searchResults(){if(!this.searchQuery)return[];const a=this.searchQuery.toLowerCase();return this.allConfigOptions.filter(r=>r.key.toLowerCase().includes(a)||r.label.toLowerCase().includes(a))}},created(){fetch("./api/config").then(a=>a.json()).then(a=>{this.config=a,this.platform=this.config.platform,document.getElementById("app"),this.platform==="windows"&&(this.tabs=this.tabs.filter(o=>o.id!=="vt"&&o.id!=="vaapi")),(this.platform==="freebsd"||this.platform==="linux")&&(this.tabs=this.tabs.filter(o=>o.id!=="amd"&&o.id!=="qsv"&&o.id!=="vt")),this.platform==="macos"&&(this.tabs=this.tabs.filter(o=>o.id!=="amd"&&o.id!=="nv"&&o.id!=="qsv"&&o.id!=="vaapi")),delete this.config.platform,delete this.config.status,delete this.config.version;const r=["dd_mode_remapping","global_prep_cmd"];for(const o of r)this.config.hasOwnProperty(o)&&(this.config[o]=JSON.parse(this.config[o]));this.tabs.forEach(o=>{Object.keys(o.options).forEach(n=>{this.config[n]===void 0&&(this.config[n]=JSON.parse(JSON.stringify(o.options[n])))})})})},methods:{getTabIcon(a){return{general:"Settings",input:"Gamepad2",av:"Volume2",network:"NetworkIcon",files:"FileCog",advanced:"Sliders",nv:"Gpu",amd:"Gpu",qsv:"Gpu",vaapi:"Gpu",vt:"Gpu",sw:"Cpu"}[a]||"Settings"},forceUpdate(){this.$forceUpdate()},serialize(){return JSON.parse(JSON.stringify(this.config))},save(){this.saved=!1,this.restarted=!1;let a=this.serialize();return this.tabs.forEach(r=>{Object.keys(r.options).forEach(o=>{let n=!1;JSON.stringify(a[o])===JSON.stringify(r.options[o])&&(n=!0),n&&delete a[o]})}),fetch("./api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(r=>r.status===200?(this.saved=!0,this.saved):!1)},apply(){this.saved=this.restarted=!1,this.save().then(r=>{r===!0&&(this.restarted=!0,setTimeout(()=>{this.saved=this.restarted=!1},5e3),fetch("./api/restart",{method:"POST",headers:{"Content-Type":"application/json"}}))})},handleSearch(){if(document.querySelectorAll(".config-search-highlight").forEach(r=>{r.classList.remove("config-search-highlight")}),!this.searchQuery){document.querySelectorAll(".mb-3").forEach(r=>{r.style.display=""});return}const a=this.searchResults;a.length!==0&&(a.length>0&&a[0].tabId!==this.currentTab&&(this.currentTab=a[0].tabId),this.$nextTick(()=>{if(document.querySelectorAll(".config-page .mb-3").forEach(r=>{r.style.display="none"}),a.forEach(r=>{const o=document.getElementById(r.key);if(o){const n=o.closest(".mb-3");n&&(n.style.display="")}}),a.length>0){const r=document.getElementById(a[0].key);if(r){const o=r.closest(".mb-3");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),o.classList.add("config-search-highlight"),setTimeout(()=>{o.classList.remove("config-search-highlight")},3e3))}}}))}},mounted(){const a=()=>{let r=window.location.hash;if(r){let o=r.substring(1);this.tabs.forEach(n=>{Object.keys(n.options).forEach(t=>{if((n.id===o||t===o)&&(this.currentTab=n.id),t===o&&setTimeout(()=>{document.getElementById(o)&&(window.location.hash=r)},2e3),this.currentTab===n.id)return!0})})}};a(),window.addEventListener("hashchange",a)}});L(Ya);
