import{c as I,r as y,d as c,e,t,w as u,v as $,f as j,g as m,h as f,u as w,j as v,k as p,F as V,l as H,o as d,m as D,n as b,p as k,q as C,s as T,a as B,i as L}from"./createLucideIcon-mjjtyxlm.js";import{S as F,a as R,N as Q}from"./Navbar-BpjUb_C-.js";import{a as N}from"./fetch_utils-DBmgNZKq.js";import{a as J,_ as h,P as K}from"./Checkbox-_zq52Lmd.js";import{T as G,S as X,C as W}from"./trash-2-YONst-Qs.js";import{T as O,I as Y,_ as Z}from"./Notification-CBHXi2s1.js";import{S as x}from"./save-DWz7vErV.js";import{G as ee}from"./gamepad-2-DxOHyImA.js";/**
 * @license lucide-vue-next v1.0.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("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 v1.0.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("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 v1.0.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("gpu",[["path",{d:"M2 17h18a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H2",key:"hpo31w"}],["path",{d:"M2 21V3",key:"1bzk4w"}],["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 v1.0.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("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 v1.0.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("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 v1.0.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("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 v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ie=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"}]]),de={id:"general",class:"config-page"},re={class:"mb-3"},_e={for:"locale",class:"form-label"},ue={class:"form-text"},ce={class:"mb-3"},pe={for:"sunshine_name",class:"form-label"},fe={class:"form-text"},me={class:"mb-3"},ve={for:"min_log_level",class:"form-label"},ge={value:"0"},$e={value:"1"},he={value:"2"},be={value:"3"},ye={value:"4"},ke={value:"5"},we={value:"6"},Ve={class:"form-text"},Ue={id:"global_prep_cmd",class:"mb-3 d-flex flex-column"},qe={class:"form-label"},Se={class:"form-text"},Ee={key:0,class:"table"},Ie={scope:"col"},Me={scope:"col"},De={key:0,scope:"col"},Ae=["onUpdate:modelValue"],Oe=["onUpdate:modelValue"],Pe={key:0,class:"align-middle"},Ce=["onClick"],Te={__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 l(s){o.value.global_prep_cmd.splice(s,1)}return(s,i)=>(d(),c("div",de,[e("div",re,[e("label",_e,t(s.$t("config.locale")),1),u(e("select",{id:"locale",class:"form-select","onUpdate:modelValue":i[0]||(i[0]=_=>o.value.locale=_)},[...i[5]||(i[5]=[j('<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),[[$,o.value.locale]]),e("div",ue,t(s.$t("config.locale_desc")),1)]),e("div",ce,[e("label",pe,t(s.$t("config.sunshine_name")),1),u(e("input",{type:"text",class:"form-control",id:"sunshine_name",placeholder:"Sunshine","onUpdate:modelValue":i[1]||(i[1]=_=>o.value.sunshine_name=_)},null,512),[[m,o.value.sunshine_name]]),e("div",fe,t(s.$t("config.sunshine_name_desc")),1)]),e("div",me,[e("label",ve,t(s.$t("config.min_log_level")),1),u(e("select",{id:"min_log_level",class:"form-select","onUpdate:modelValue":i[2]||(i[2]=_=>o.value.min_log_level=_)},[e("option",ge,t(s.$t("config.min_log_level_0")),1),e("option",$e,t(s.$t("config.min_log_level_1")),1),e("option",he,t(s.$t("config.min_log_level_2")),1),e("option",be,t(s.$t("config.min_log_level_3")),1),e("option",ye,t(s.$t("config.min_log_level_4")),1),e("option",ke,t(s.$t("config.min_log_level_5")),1),e("option",we,t(s.$t("config.min_log_level_6")),1)],512),[[$,o.value.min_log_level]]),e("div",Ve,t(s.$t("config.min_log_level_desc")),1)]),e("div",Ue,[e("label",qe,t(s.$t("config.global_prep_cmd")),1),e("div",Se,t(s.$t("config.global_prep_cmd_desc")),1),o.value.global_prep_cmd.length>0?(d(),c("table",Ee,[e("thead",null,[e("tr",null,[e("th",Ie,[f(w(J),{size:16}),v(" "+t(s.$t("_common.do_cmd")),1)]),e("th",Me,[f(w(ae),{size:16}),v(" "+t(s.$t("_common.undo_cmd")),1)]),a.platform==="windows"?(d(),c("th",De,[f(w(F),{size:16}),v(" "+t(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,H(o.value.global_prep_cmd,(_,g)=>(d(),c("tr",null,[e("td",null,[u(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":U=>_.do=U},null,8,Ae),[[m,_.do]])]),e("td",null,[u(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":U=>_.undo=U},null,8,Oe),[[m,_.undo]])]),a.platform==="windows"?(d(),c("td",Pe,[f(h,{id:"prep-cmd-admin-"+g,label:"_common.elevated",desc:"",modelValue:_.elevated,"onUpdate:modelValue":U=>_.elevated=U},null,8,["id","modelValue","onUpdate:modelValue"])])):p("",!0),e("td",null,[e("button",{class:"btn btn-danger",onClick:U=>l(g)},[f(w(G),{size:16})],8,Ce),e("button",{class:"btn btn-success",onClick:n},[f(w(K),{size:16})])])]))),256))])])):p("",!0),e("button",{class:"ms-0 mt-2 btn btn-success",style:{margin:"0 auto"},onClick:n}," + "+t(s.$t("config.add")),1)]),f(h,{class:"mb-3",id:"notify_pre_releases","locale-prefix":"config",modelValue:o.value.notify_pre_releases,"onUpdate:modelValue":i[3]||(i[3]=_=>o.value.notify_pre_releases=_),default:"false"},null,8,["modelValue"]),f(h,{class:"mb-3",id:"system_tray","locale-prefix":"config",modelValue:o.value.system_tray,"onUpdate:modelValue":i[4]||(i[4]=_=>o.value.system_tray=_),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))}},Ne={id:"input",class:"config-page"},ze={key:0,class:"mb-3"},je={for:"gamepad",class:"form-label"},He={value:"auto"},Ge={value:"switch"},Be={value:"xone"},Le={value:"ds5"},Fe={value:"switch"},Re={value:"xone"},Qe={value:"ds4"},Je={value:"x360"},Ke={class:"form-text"},Xe={key:0,class:"mb-3 accordion"},We={class:"accordion-item"},Ye={class:"accordion-header"},Ze={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},xe={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},eo={class:"accordion-body"},oo={key:2,class:"mb-3"},to={for:"back_button_timeout",class:"form-label"},lo={class:"form-text"},no={key:3,class:"mb-3"},so={for:"key_repeat_delay",class:"form-label"},ao={class:"form-text"},io={key:4,class:"mb-3"},ro={for:"key_repeat_frequency",class:"form-label"},_o={class:"form-text"},uo={__name:"Inputs",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Ne,[f(h,{class:"mb-3",id:"controller","locale-prefix":"config",modelValue:o.value.controller,"onUpdate:modelValue":l[0]||(l[0]=s=>o.value.controller=s),default:"true"},null,8,["modelValue"]),o.value.controller==="enabled"&&a.platform!=="macos"?(d(),c("div",ze,[e("label",je,t(n.$t("config.gamepad")),1),u(e("select",{id:"gamepad",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.gamepad=s)},[e("option",He,t(n.$t("_common.auto")),1),f(S,{platform:a.platform},{freebsd:b(()=>[e("option",Ge,t(n.$t("config.gamepad_switch")),1),e("option",Be,t(n.$t("config.gamepad_xone")),1)]),linux:b(()=>[e("option",Le,t(n.$t("config.gamepad_ds5")),1),e("option",Fe,t(n.$t("config.gamepad_switch")),1),e("option",Re,t(n.$t("config.gamepad_xone")),1)]),windows:b(()=>[e("option",Qe,t(n.$t("config.gamepad_ds4")),1),e("option",Je,t(n.$t("config.gamepad_x360")),1)]),_:1},8,["platform"])],512),[[$,o.value.gamepad]]),e("div",Ke,t(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",Xe,[e("div",We,[e("h2",Ye,[e("button",Ze,t(n.$t(o.value.gamepad==="ds4"?"config.gamepad_ds4_manual":o.value.gamepad==="ds5"?"config.gamepad_ds5_manual":"config.gamepad_auto")),1)]),e("div",xe,[e("div",eo,[o.value.gamepad==="auto"&&(a.platform==="windows"||a.platform==="linux")?(d(),c(V,{key:0},[f(h,{class:"mb-3",id:"motion_as_ds4","locale-prefix":"config",modelValue:o.value.motion_as_ds4,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.motion_as_ds4=s),default:"true"},null,8,["modelValue"]),f(h,{class:"mb-3",id:"touchpad_as_ds4","locale-prefix":"config",modelValue:o.value.touchpad_as_ds4,"onUpdate:modelValue":l[3]||(l[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(),k(h,{key:1,class:"mb-3",id:"ds4_back_as_touchpad_click","locale-prefix":"config",modelValue:o.value.ds4_back_as_touchpad_click,"onUpdate:modelValue":l[4]||(l[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(),k(h,{key:2,class:"mb-3",id:"ds5_inputtino_randomize_mac","locale-prefix":"config",modelValue:o.value.ds5_inputtino_randomize_mac,"onUpdate:modelValue":l[5]||(l[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",oo,[e("label",to,t(n.$t("config.back_button_timeout")),1),u(e("input",{type:"text",class:"form-control",id:"back_button_timeout",placeholder:"-1","onUpdate:modelValue":l[6]||(l[6]=s=>o.value.back_button_timeout=s)},null,512),[[m,o.value.back_button_timeout]]),e("div",lo,t(n.$t("config.back_button_timeout_desc")),1)])):p("",!0),l[15]||(l[15]=e("hr",null,null,-1)),f(h,{class:"mb-3",id:"keyboard","locale-prefix":"config",modelValue:o.value.keyboard,"onUpdate:modelValue":l[7]||(l[7]=s=>o.value.keyboard=s),default:"true"},null,8,["modelValue"]),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),c("div",no,[e("label",so,t(n.$t("config.key_repeat_delay")),1),u(e("input",{type:"text",class:"form-control",id:"key_repeat_delay",placeholder:"500","onUpdate:modelValue":l[8]||(l[8]=s=>o.value.key_repeat_delay=s)},null,512),[[m,o.value.key_repeat_delay]]),e("div",ao,t(n.$t("config.key_repeat_delay_desc")),1)])):p("",!0),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),c("div",io,[e("label",ro,t(n.$t("config.key_repeat_frequency")),1),u(e("input",{type:"text",class:"form-control",id:"key_repeat_frequency",placeholder:"24.9","onUpdate:modelValue":l[9]||(l[9]=s=>o.value.key_repeat_frequency=s)},null,512),[[m,o.value.key_repeat_frequency]]),e("div",_o,t(n.$t("config.key_repeat_frequency_desc")),1)])):p("",!0),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),k(h,{key:5,class:"mb-3",id:"always_send_scancodes","locale-prefix":"config",modelValue:o.value.always_send_scancodes,"onUpdate:modelValue":l[10]||(l[10]=s=>o.value.always_send_scancodes=s),default:"true"},null,8,["modelValue"])):p("",!0),o.value.keyboard==="enabled"?(d(),k(h,{key:6,class:"mb-3",id:"key_rightalt_to_key_win","locale-prefix":"config",modelValue:o.value.key_rightalt_to_key_win,"onUpdate:modelValue":l[11]||(l[11]=s=>o.value.key_rightalt_to_key_win=s),default:"false"},null,8,["modelValue"])):p("",!0),l[16]||(l[16]=e("hr",null,null,-1)),f(h,{class:"mb-3",id:"mouse","locale-prefix":"config",modelValue:o.value.mouse,"onUpdate:modelValue":l[12]||(l[12]=s=>o.value.mouse=s),default:"true"},null,8,["modelValue"]),o.value.mouse==="enabled"?(d(),k(h,{key:7,class:"mb-3",id:"high_resolution_scrolling","locale-prefix":"config",modelValue:o.value.high_resolution_scrolling,"onUpdate:modelValue":l[13]||(l[13]=s=>o.value.high_resolution_scrolling=s),default:"true"},null,8,["modelValue"])):p("",!0),o.value.mouse==="enabled"?(d(),k(h,{key:8,class:"mb-3",id:"native_pen_touch","locale-prefix":"config",modelValue:o.value.native_pen_touch,"onUpdate:modelValue":l[14]||(l[14]=s=>o.value.native_pen_touch=s),default:"true"},null,8,["modelValue"])):p("",!0)]))}},co={id:"network",class:"config-page"},po={class:"mb-3"},fo={for:"address_family",class:"form-label"},mo={value:"ipv4"},vo={value:"both"},go={class:"form-text"},$o={class:"mb-3"},ho={for:"bind_address",class:"form-label"},bo={class:"form-text"},yo={class:"mb-3"},ko={for:"port",class:"form-label"},wo={class:"form-text"},Vo={key:0,class:"alert alert-danger"},Uo={key:1,class:"alert alert-danger"},qo={class:"table"},So={scope:"col"},Eo={scope:"col"},Io={scope:"col"},Mo={key:0,class:"alert alert-primary",role:"alert"},Do={key:2,class:"alert alert-warning"},Ao={class:"mb-3"},Oo={for:"origin_web_ui_allowed",class:"form-label"},Po={value:"pc"},Co={value:"lan"},To={value:"wan"},No={class:"form-text"},zo={class:"mb-3"},jo={for:"csrf_allowed_origins",class:"form-label"},Ho={class:"form-text"},Go={class:"mb-3"},Bo={for:"external_ip",class:"form-label"},Lo={class:"form-text"},Fo={class:"mb-3"},Ro={for:"lan_encryption_mode",class:"form-label"},Qo={value:"0"},Jo={value:"1"},Ko={value:"2"},Xo={class:"form-text"},Wo={class:"mb-3"},Yo={for:"wan_encryption_mode",class:"form-label"},Zo={value:"0"},xo={value:"1"},et={value:"2"},ot={class:"form-text"},tt={class:"mb-3"},lt={for:"ping_timeout",class:"form-label"},nt={class:"form-text"},z=47989,st={__name:"Network",props:["platform","config"],setup(a){const o=y(a.config),n=C(()=>{var l;return+((l=o.value)==null?void 0:l.port)});return(l,s)=>(d(),c("div",co,[f(h,{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",po,[e("label",fo,t(l.$t("config.address_family")),1),u(e("select",{id:"address_family",class:"form-select","onUpdate:modelValue":s[1]||(s[1]=i=>o.value.address_family=i)},[e("option",mo,t(l.$t("config.address_family_ipv4")),1),e("option",vo,t(l.$t("config.address_family_both")),1)],512),[[$,o.value.address_family]]),e("div",go,t(l.$t("config.address_family_desc")),1)]),e("div",$o,[e("label",ho,t(l.$t("config.bind_address")),1),u(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",bo,t(l.$t("config.bind_address_desc")),1)]),e("div",yo,[e("label",ko,t(l.$t("config.port")),1),u(e("input",{type:"number",min:"1029",max:"65514",class:"form-control",id:"port",placeholder:z,"onUpdate:modelValue":s[3]||(s[3]=i=>o.value.port=i)},null,512),[[m,o.value.port]]),e("div",wo,t(l.$t("config.port_desc")),1),+n.value-5<1024?(d(),c("div",Vo,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_alert_1")),1)])):p("",!0),+n.value+21>65535?(d(),c("div",Uo,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_alert_2")),1)])):p("",!0),e("table",qo,[e("thead",null,[e("tr",null,[e("th",So,t(l.$t("config.port_protocol")),1),e("th",Eo,t(l.$t("config.port_port")),1),e("th",Io,t(l.$t("config.port_note")),1)])]),e("tbody",null,[e("tr",null,[e("td",null,t(l.$t("config.port_tcp")),1),e("td",null,t(+n.value-5),1),s[10]||(s[10]=e("td",null,null,-1))]),e("tr",null,[e("td",null,t(l.$t("config.port_tcp")),1),e("td",null,t(+n.value),1),e("td",null,[+n.value!==z?(d(),c("div",Mo,[f(w(Y),{size:20}),v(" "+t(l.$t("config.port_http_port_note")),1)])):p("",!0)])]),e("tr",null,[e("td",null,t(l.$t("config.port_tcp")),1),e("td",null,t(+n.value+1),1),e("td",null,t(l.$t("config.port_web_ui")),1)]),e("tr",null,[e("td",null,t(l.$t("config.port_tcp")),1),e("td",null,t(+n.value+21),1),s[11]||(s[11]=e("td",null,null,-1))]),e("tr",null,[e("td",null,t(l.$t("config.port_udp")),1),e("td",null,t(+n.value+9)+" - "+t(+n.value+11),1),s[12]||(s[12]=e("td",null,null,-1))])])]),o.value.origin_web_ui_allowed==="wan"?(d(),c("div",Do,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_warning")),1)])):p("",!0)]),e("div",Ao,[e("label",Oo,t(l.$t("config.origin_web_ui_allowed")),1),u(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",Po,t(l.$t("config.origin_web_ui_allowed_pc")),1),e("option",Co,t(l.$t("config.origin_web_ui_allowed_lan")),1),e("option",To,t(l.$t("config.origin_web_ui_allowed_wan")),1)],512),[[$,o.value.origin_web_ui_allowed]]),e("div",No,t(l.$t("config.origin_web_ui_allowed_desc")),1)]),e("div",zo,[e("label",jo,t(l.$t("config.csrf_allowed_origins")),1),u(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",Ho,t(l.$t("config.csrf_allowed_origins_desc")),1)]),e("div",Go,[e("label",Bo,t(l.$t("config.external_ip")),1),u(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",Lo,t(l.$t("config.external_ip_desc")),1)]),e("div",Fo,[e("label",Ro,t(l.$t("config.lan_encryption_mode")),1),u(e("select",{id:"lan_encryption_mode",class:"form-select","onUpdate:modelValue":s[7]||(s[7]=i=>o.value.lan_encryption_mode=i)},[e("option",Qo,t(l.$t("_common.disabled_def")),1),e("option",Jo,t(l.$t("config.lan_encryption_mode_1")),1),e("option",Ko,t(l.$t("config.lan_encryption_mode_2")),1)],512),[[$,o.value.lan_encryption_mode]]),e("div",Xo,t(l.$t("config.lan_encryption_mode_desc")),1)]),e("div",Wo,[e("label",Yo,t(l.$t("config.wan_encryption_mode")),1),u(e("select",{id:"wan_encryption_mode",class:"form-select","onUpdate:modelValue":s[8]||(s[8]=i=>o.value.wan_encryption_mode=i)},[e("option",Zo,t(l.$t("_common.disabled")),1),e("option",xo,t(l.$t("config.wan_encryption_mode_1")),1),e("option",et,t(l.$t("config.wan_encryption_mode_2")),1)],512),[[$,o.value.wan_encryption_mode]]),e("div",ot,t(l.$t("config.wan_encryption_mode_desc")),1)]),e("div",tt,[e("label",lt,t(l.$t("config.ping_timeout")),1),u(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",nt,t(l.$t("config.ping_timeout_desc")),1)])]))}},at={id:"files",class:"config-page"},it={class:"mb-3"},dt={for:"file_apps",class:"form-label"},rt={class:"form-text"},_t={class:"mb-3"},ut={for:"credentials_file",class:"form-label"},ct={class:"form-text"},pt={class:"mb-3"},ft={for:"log_path",class:"form-label"},mt={class:"form-text"},vt={class:"mb-3"},gt={for:"pkey",class:"form-label"},$t={class:"form-text"},ht={class:"mb-3"},bt={for:"cert",class:"form-label"},yt={class:"form-text"},kt={class:"mb-3"},wt={for:"file_state",class:"form-label"},Vt={class:"form-text"},Ut={__name:"Files",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",at,[e("div",it,[e("label",dt,t(n.$t("config.file_apps")),1),u(e("input",{type:"text",class:"form-control",id:"file_apps",placeholder:"apps.json","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.file_apps=s)},null,512),[[m,o.value.file_apps]]),e("div",rt,t(n.$t("config.file_apps_desc")),1)]),e("div",_t,[e("label",ut,t(n.$t("config.credentials_file")),1),u(e("input",{type:"text",class:"form-control",id:"credentials_file",placeholder:"sunshine_state.json","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.credentials_file=s)},null,512),[[m,o.value.credentials_file]]),e("div",ct,t(n.$t("config.credentials_file_desc")),1)]),e("div",pt,[e("label",ft,t(n.$t("config.log_path")),1),u(e("input",{type:"text",class:"form-control",id:"log_path",placeholder:"sunshine.log","onUpdate:modelValue":l[2]||(l[2]=s=>o.value.log_path=s)},null,512),[[m,o.value.log_path]]),e("div",mt,t(n.$t("config.log_path_desc")),1)]),e("div",vt,[e("label",gt,t(n.$t("config.pkey")),1),u(e("input",{type:"text",class:"form-control",id:"pkey",placeholder:"/dir/pkey.pem","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.pkey=s)},null,512),[[m,o.value.pkey]]),e("div",$t,t(n.$t("config.pkey_desc")),1)]),e("div",ht,[e("label",bt,t(n.$t("config.cert")),1),u(e("input",{type:"text",class:"form-control",id:"cert",placeholder:"/dir/cert.pem","onUpdate:modelValue":l[4]||(l[4]=s=>o.value.cert=s)},null,512),[[m,o.value.cert]]),e("div",yt,t(n.$t("config.cert_desc")),1)]),e("div",kt,[e("label",wt,t(n.$t("config.file_state")),1),u(e("input",{type:"text",class:"form-control",id:"file_state",placeholder:"sunshine_state.json","onUpdate:modelValue":l[5]||(l[5]=s=>o.value.file_state=s)},null,512),[[m,o.value.file_state]]),e("div",Vt,t(n.$t("config.file_state_desc")),1)])]))}},qt={class:"config-page"},St={class:"mb-3"},Et={for:"fec_percentage",class:"form-label"},It={class:"form-text"},Mt={class:"mb-3"},Dt={for:"qp",class:"form-label"},At={class:"form-text"},Ot={class:"mb-3"},Pt={for:"min_threads",class:"form-label"},Ct={class:"form-text"},Tt={class:"mb-3"},Nt={for:"hevc_mode",class:"form-label"},zt={value:"0"},jt={value:"1"},Ht={value:"2"},Gt={value:"3"},Bt={class:"form-text"},Lt={class:"mb-3"},Ft={for:"av1_mode",class:"form-label"},Rt={value:"0"},Qt={value:"1"},Jt={value:"2"},Kt={value:"3"},Xt={class:"form-text"},Wt={key:0,class:"mb-3"},Yt={for:"capture",class:"form-label"},Zt={value:""},xt={value:"wgc"},el={class:"form-text"},ol={class:"mb-3"},tl={for:"encoder",class:"form-label"},ll={value:""},nl={value:"software"},sl={class:"form-text"},al={__name:"Advanced",props:["platform","config","global_prep_cmd"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",qt,[e("div",St,[e("label",Et,t(n.$t("config.fec_percentage")),1),u(e("input",{type:"text",class:"form-control",id:"fec_percentage",placeholder:"20","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.fec_percentage=s)},null,512),[[m,o.value.fec_percentage]]),e("div",It,t(n.$t("config.fec_percentage_desc")),1)]),e("div",Mt,[e("label",Dt,t(n.$t("config.qp")),1),u(e("input",{type:"number",class:"form-control",id:"qp",placeholder:"28","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.qp=s)},null,512),[[m,o.value.qp]]),e("div",At,t(n.$t("config.qp_desc")),1)]),e("div",Ot,[e("label",Pt,t(n.$t("config.min_threads")),1),u(e("input",{type:"number",class:"form-control",id:"min_threads",placeholder:"2",min:"1","onUpdate:modelValue":l[2]||(l[2]=s=>o.value.min_threads=s)},null,512),[[m,o.value.min_threads]]),e("div",Ct,t(n.$t("config.min_threads_desc")),1)]),e("div",Tt,[e("label",Nt,t(n.$t("config.hevc_mode")),1),u(e("select",{id:"hevc_mode",class:"form-select","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.hevc_mode=s)},[e("option",zt,t(n.$t("config.hevc_mode_0")),1),e("option",jt,t(n.$t("config.hevc_mode_1")),1),e("option",Ht,t(n.$t("config.hevc_mode_2")),1),e("option",Gt,t(n.$t("config.hevc_mode_3")),1)],512),[[$,o.value.hevc_mode]]),e("div",Bt,t(n.$t("config.hevc_mode_desc")),1)]),e("div",Lt,[e("label",Ft,t(n.$t("config.av1_mode")),1),u(e("select",{id:"av1_mode",class:"form-select","onUpdate:modelValue":l[4]||(l[4]=s=>o.value.av1_mode=s)},[e("option",Rt,t(n.$t("config.av1_mode_0")),1),e("option",Qt,t(n.$t("config.av1_mode_1")),1),e("option",Jt,t(n.$t("config.av1_mode_2")),1),e("option",Kt,t(n.$t("config.av1_mode_3")),1)],512),[[$,o.value.av1_mode]]),e("div",Xt,t(n.$t("config.av1_mode_desc")),1)]),a.platform!=="macos"?(d(),c("div",Wt,[e("label",Yt,t(n.$t("config.capture")),1),u(e("select",{id:"capture",class:"form-select","onUpdate:modelValue":l[5]||(l[5]=s=>o.value.capture=s)},[e("option",Zt,t(n.$t("_common.autodetect")),1),f(S,{platform:a.platform},{freebsd:b(()=>[...l[7]||(l[7]=[e("option",{value:"wlr"},"wlroots",-1),e("option",{value:"x11"},"X11",-1),e("option",{value:"portal"},"XDG Portal",-1)])]),linux:b(()=>[...l[8]||(l[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:"kwin"},"KWin Screencast",-1),e("option",{value:"portal"},"XDG Portal",-1)])]),windows:b(()=>[l[9]||(l[9]=e("option",{value:"ddx"},"Desktop Duplication API",-1)),e("option",xt,"Windows.Graphics.Capture "+t(n.$t("_common.beta")),1)]),_:1},8,["platform"])],512),[[$,o.value.capture]]),e("div",el,t(n.$t("config.capture_desc")),1)])):p("",!0),e("div",ol,[e("label",tl,t(n.$t("config.encoder")),1),u(e("select",{id:"encoder",class:"form-select","onUpdate:modelValue":l[6]||(l[6]=s=>o.value.encoder=s)},[e("option",ll,t(n.$t("_common.autodetect")),1),f(S,{platform:a.platform},{windows:b(()=>[...l[10]||(l[10]=[e("option",{value:"nvenc"},"NVIDIA NVENC",-1),e("option",{value:"quicksync"},"Intel QuickSync",-1),e("option",{value:"amdvce"},"AMD AMF/VCE",-1)])]),freebsd:b(()=>[...l[11]||(l[11]=[e("option",{value:"vulkan"},"Vulkan",-1),e("option",{value:"vaapi"},"VA-API",-1)])]),linux:b(()=>[...l[12]||(l[12]=[e("option",{value:"nvenc"},"NVIDIA NVENC",-1),e("option",{value:"vaapi"},"VA-API",-1),e("option",{value:"vulkan"},"Vulkan",-1)])]),macos:b(()=>[...l[13]||(l[13]=[e("option",{value:"videotoolbox"},"VideoToolbox",-1)])]),_:1},8,["platform"]),e("option",nl,t(n.$t("config.encoder_software")),1)],512),[[$,o.value.encoder]]),e("div",sl,t(n.$t("config.encoder_desc")),1)])]))}};class il{constructor(r){this.platform=r}getPlatformKey(r,o){return r+"_"+o}getMessageUsingPlatform(r,o){const n=this.getPlatformKey(r,this.platform),l=T("i18n");let s=l.t(n);if(s!==n)return s;if(this.platform==="windows")return o||s;const i=this.getPlatformKey(r,"unix");return s=l.t(i),s===i&&o?o:s}}function dl(a){if(a||(a=T("platform").value),!a)throw"platform argument missing";return T("platformMessage",()=>new il(a),!0)}function A(a,r){return dl().getMessageUsingPlatform(a,r)}const rl={key:0,class:"mb-3"},_l={for:"adapter_name",class:"form-label"},ul=["placeholder"],cl={class:"form-text"},pl={__name:"AdapterNameSelector",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>a.platform!=="macos"?(d(),c("div",rl,[e("label",_l,t(n.$t("config.adapter_name")),1),u(e("input",{type:"text",class:"form-control",id:"adapter_name",placeholder:w(A)("config.adapter_name_placeholder","/dev/dri/renderD128"),"onUpdate:modelValue":l[0]||(l[0]=s=>o.value.adapter_name=s)},null,8,ul),[[m,o.value.adapter_name]]),e("div",cl,[f(S,{platform:a.platform},{windows:b(()=>[v(t(n.$t("config.adapter_name_desc_windows")),1),l[1]||(l[1]=e("br",null,null,-1)),l[2]||(l[2]=e("pre",null,"tools\\dxgi-info.exe",-1))]),freebsd:b(()=>[v(t(n.$t("config.adapter_name_desc_linux_1")),1),l[3]||(l[3]=e("br",null,null,-1)),e("pre",null,"ls /dev/dri/renderD*  # "+t(n.$t("config.adapter_name_desc_linux_2")),1),l[4]||(l[4]=e("pre",null,`              vainfo --display drm --device /dev/dri/renderD129 | \\
                grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
            `,-1)),v(" "+t(n.$t("config.adapter_name_desc_linux_3")),1),l[5]||(l[5]=e("br",null,null,-1)),l[6]||(l[6]=e("i",null,"VAProfileH264High : VAEntrypointEncSlice",-1))]),linux:b(()=>[v(t(n.$t("config.adapter_name_desc_linux_1")),1),l[7]||(l[7]=e("br",null,null,-1)),e("pre",null,"ls /dev/dri/renderD*  # "+t(n.$t("config.adapter_name_desc_linux_2")),1),l[8]||(l[8]=e("pre",null,`              vainfo --display drm --device /dev/dri/renderD129 | \\
                grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
            `,-1)),v(" "+t(n.$t("config.adapter_name_desc_linux_3")),1),l[9]||(l[9]=e("br",null,null,-1)),l[10]||(l[10]=e("i",null,"VAProfileH264High : VAEntrypointEncSlice",-1))]),_:1},8,["platform"])])])):p("",!0)}},fl={class:"mb-3"},ml={for:"output_name",class:"form-label"},vl=["placeholder"],gl={class:"form-text"},$l={__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(l,s)=>(d(),c("div",fl,[e("label",ml,t(l.$t("config.output_name")),1),u(e("input",{type:"text",class:"form-control",id:"output_name",placeholder:w(n),"onUpdate:modelValue":s[0]||(s[0]=i=>o.value.output_name=i)},null,8,vl),[[m,o.value.output_name]]),e("div",gl,[v(t(w(A)("config.output_name_desc")),1),s[5]||(s[5]=e("br",null,null,-1)),f(S,{platform:a.platform},{windows:b(()=>[...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:b(()=>[...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:b(()=>[...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:b(()=>[...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"])])]))}},hl={class:"mb-3 accordion"},bl={class:"accordion-item"},yl={class:"accordion-header"},kl={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"},Vl={class:"accordion-body"},Ul={class:"mb-3"},ql={for:"dd_configuration_option",class:"form-label"},Sl={value:"disabled"},El={value:"verify_only"},Il={value:"ensure_active"},Ml={value:"ensure_primary"},Dl={value:"ensure_only_display"},Al={key:0,class:"mb-3"},Ol={for:"dd_resolution_option",class:"form-label"},Pl={value:"disabled"},Cl={value:"auto"},Tl={value:"manual"},Nl={key:0,class:"form-text"},zl={key:1,class:"mt-2 ps-4"},jl={class:"form-text"},Hl={key:1,class:"mb-3"},Gl={for:"dd_refresh_rate_option",class:"form-label"},Bl={value:"disabled"},Ll={value:"auto"},Fl={value:"manual"},Rl={key:0,class:"mt-2 ps-4"},Ql={class:"form-text"},Jl={key:2,class:"mb-3"},Kl={for:"dd_hdr_option",class:"form-label"},Xl={value:"disabled"},Wl={value:"auto"},Yl={for:"dd_wa_hdr_toggle_delay",class:"form-label"},Zl={class:"form-text"},xl={key:3,class:"mb-3"},en={for:"dd_config_revert_delay",class:"form-label"},on={class:"form-text"},tn={key:4,class:"mb-3"},ln={key:5,class:"mb-3"},nn={for:"dd_mode_remapping",class:"form-label"},sn={id:"dd_mode_remapping",class:"d-flex flex-column"},an={class:"form-text"},dn={key:0,class:"table"},rn={key:0,scope:"col"},_n={key:1,scope:"col"},un={key:2,scope:"col"},cn={key:3,scope:"col"},pn={key:0},fn=["onUpdate:modelValue"],mn={key:1},vn=["onUpdate:modelValue"],gn={key:2},$n=["onUpdate:modelValue"],hn={key:3},bn=["onUpdate:modelValue"],yn=["onClick"],M="refresh_rate_only",E="resolution_only",P="mixed",kn={__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 l(){return o.value.dd_resolution_option!=="auto"?M:o.value.dd_refresh_rate_option!=="auto"?E:P}function s(){const i=l();let _={};i!==E&&(_.requested_fps="",_.final_refresh_rate=""),i!==M&&(_.requested_resolution="",_.final_resolution=""),o.value.dd_mode_remapping[i].push(_)}return(i,_)=>(d(),k(S,{platform:a.platform},{windows:b(()=>[e("div",hl,[e("div",bl,[e("h2",yl,[e("button",kl,t(i.$t("config.dd_options_header")),1)]),e("div",wl,[e("div",Vl,[e("div",Ul,[e("label",ql,t(i.$t("config.dd_configuration_option")),1),u(e("select",{id:"dd_configuration_option",class:"form-select","onUpdate:modelValue":_[0]||(_[0]=g=>o.value.dd_configuration_option=g)},[e("option",Sl,t(i.$t("_common.disabled_def")),1),e("option",El,t(i.$t("config.dd_config_verify_only")),1),e("option",Il,t(i.$t("config.dd_config_ensure_active")),1),e("option",Ml,t(i.$t("config.dd_config_ensure_primary")),1),e("option",Dl,t(i.$t("config.dd_config_ensure_only_display")),1)],512),[[$,o.value.dd_configuration_option]])]),o.value.dd_configuration_option!=="disabled"?(d(),c("div",Al,[e("label",Ol,t(i.$t("config.dd_resolution_option")),1),u(e("select",{id:"dd_resolution_option",class:"form-select","onUpdate:modelValue":_[1]||(_[1]=g=>o.value.dd_resolution_option=g)},[e("option",Pl,t(i.$t("config.dd_resolution_option_disabled")),1),e("option",Cl,t(i.$t("config.dd_resolution_option_auto")),1),e("option",Tl,t(i.$t("config.dd_resolution_option_manual")),1)],512),[[$,o.value.dd_resolution_option]]),o.value.dd_resolution_option==="auto"||o.value.dd_resolution_option==="manual"?(d(),c("div",Nl,t(i.$t("config.dd_resolution_option_ogs_desc")),1)):p("",!0),o.value.dd_resolution_option==="manual"?(d(),c("div",zl,[e("div",jl,t(i.$t("config.dd_manual_resolution")),1),u(e("input",{type:"text",class:"form-control",id:"dd_manual_resolution",placeholder:"2560x1440","onUpdate:modelValue":_[2]||(_[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",Hl,[e("label",Gl,t(i.$t("config.dd_refresh_rate_option")),1),u(e("select",{id:"dd_refresh_rate_option",class:"form-select","onUpdate:modelValue":_[3]||(_[3]=g=>o.value.dd_refresh_rate_option=g)},[e("option",Bl,t(i.$t("config.dd_refresh_rate_option_disabled")),1),e("option",Ll,t(i.$t("config.dd_refresh_rate_option_auto")),1),e("option",Fl,t(i.$t("config.dd_refresh_rate_option_manual")),1)],512),[[$,o.value.dd_refresh_rate_option]]),o.value.dd_refresh_rate_option==="manual"?(d(),c("div",Rl,[e("div",Ql,t(i.$t("config.dd_manual_refresh_rate")),1),u(e("input",{type:"text",class:"form-control",id:"dd_manual_refresh_rate",placeholder:"59.9558","onUpdate:modelValue":_[4]||(_[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",Jl,[e("label",Kl,t(i.$t("config.dd_hdr_option")),1),u(e("select",{id:"dd_hdr_option",class:"mb-3 form-select","onUpdate:modelValue":_[5]||(_[5]=g=>o.value.dd_hdr_option=g)},[e("option",Xl,t(i.$t("config.dd_hdr_option_disabled")),1),e("option",Wl,t(i.$t("config.dd_hdr_option_auto")),1)],512),[[$,o.value.dd_hdr_option]]),e("label",Yl,t(i.$t("config.dd_wa_hdr_toggle_delay")),1),u(e("input",{type:"number",class:"form-control",id:"dd_wa_hdr_toggle_delay",placeholder:"0",min:"0",max:"3000","onUpdate:modelValue":_[6]||(_[6]=g=>o.value.dd_wa_hdr_toggle_delay=g)},null,512),[[m,o.value.dd_wa_hdr_toggle_delay]]),e("div",Zl,[v(t(i.$t("config.dd_wa_hdr_toggle_delay_desc_1"))+" ",1),_[10]||(_[10]=e("br",null,null,-1)),v(" "+t(i.$t("config.dd_wa_hdr_toggle_delay_desc_2"))+" ",1),_[11]||(_[11]=e("br",null,null,-1)),v(" "+t(i.$t("config.dd_wa_hdr_toggle_delay_desc_3")),1)])])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",xl,[e("label",en,t(i.$t("config.dd_config_revert_delay")),1),u(e("input",{type:"number",class:"form-control",id:"dd_config_revert_delay",placeholder:"3000",min:"0","onUpdate:modelValue":_[7]||(_[7]=g=>o.value.dd_config_revert_delay=g)},null,512),[[m,o.value.dd_config_revert_delay]]),e("div",on,t(i.$t("config.dd_config_revert_delay_desc")),1)])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",tn,[f(h,{id:"dd_config_revert_on_disconnect","locale-prefix":"config",modelValue:o.value.dd_config_revert_on_disconnect,"onUpdate:modelValue":_[8]||(_[8]=g=>o.value.dd_config_revert_on_disconnect=g),default:"false"},null,8,["modelValue"])])):p("",!0),n()?(d(),c("div",ln,[e("label",nn,t(i.$t("config.dd_mode_remapping")),1),e("div",sn,[e("div",an,[v(t(i.$t("config.dd_mode_remapping_desc_1")),1),_[14]||(_[14]=e("br",null,null,-1)),v(" "+t(i.$t("config.dd_mode_remapping_desc_2")),1),_[15]||(_[15]=e("br",null,null,-1)),v(" "+t(i.$t("config.dd_mode_remapping_desc_3")),1),_[16]||(_[16]=e("br",null,null,-1)),v(" "+t(i.$t(l()===P?"config.dd_mode_remapping_desc_4_final_values_mixed":"config.dd_mode_remapping_desc_4_final_values_non_mixed")),1),_[17]||(_[17]=e("br",null,null,-1)),l()===P?(d(),c(V,{key:0},[v(t(i.$t("config.dd_mode_remapping_desc_5_sops_mixed_only")),1),_[12]||(_[12]=e("br",null,null,-1))],64)):p("",!0),l()===E?(d(),c(V,{key:1},[v(t(i.$t("config.dd_mode_remapping_desc_5_sops_resolution_only")),1),_[13]||(_[13]=e("br",null,null,-1))],64)):p("",!0)])]),o.value.dd_mode_remapping[l()].length>0?(d(),c("table",dn,[e("thead",null,[e("tr",null,[l()!==M?(d(),c("th",rn,t(i.$t("config.dd_mode_remapping_requested_resolution")),1)):p("",!0),l()!==E?(d(),c("th",_n,t(i.$t("config.dd_mode_remapping_requested_fps")),1)):p("",!0),l()!==M?(d(),c("th",un,t(i.$t("config.dd_mode_remapping_final_resolution")),1)):p("",!0),l()!==E?(d(),c("th",cn,t(i.$t("config.dd_mode_remapping_final_refresh_rate")),1)):p("",!0),_[18]||(_[18]=e("th",{scope:"col"},null,-1))])]),e("tbody",null,[(d(!0),c(V,null,H(o.value.dd_mode_remapping[l()],(g,U)=>(d(),c("tr",null,[l()!==M?(d(),c("td",pn,[u(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.requested_resolution=q,placeholder:"1920x1080"},null,8,fn),[[m,g.requested_resolution]])])):p("",!0),l()!==E?(d(),c("td",mn,[u(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.requested_fps=q,placeholder:"60"},null,8,vn),[[m,g.requested_fps]])])):p("",!0),l()!==M?(d(),c("td",gn,[u(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.final_resolution=q,placeholder:"2560x1440"},null,8,$n),[[m,g.final_resolution]])])):p("",!0),l()!==E?(d(),c("td",hn,[u(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.final_refresh_rate=q,placeholder:"119.95"},null,8,bn),[[m,g.final_refresh_rate]])])):p("",!0),e("td",null,[e("button",{class:"btn btn-danger",onClick:q=>o.value.dd_mode_remapping[l()].splice(U,1)},[f(w(G),{size:16})],8,yn)])]))),256))])])):p("",!0),e("button",{class:"ms-0 mt-2 btn btn-success",style:{margin:"0 auto"},onClick:_[9]||(_[9]=g=>s())}," + "+t(i.$t("config.dd_mode_remapping_add")),1)])):p("",!0)])])])])]),freebsd:b(()=>[..._[19]||(_[19]=[])]),linux:b(()=>[..._[20]||(_[20]=[])]),macos:b(()=>[..._[21]||(_[21]=[])]),_:1},8,["platform"]))}},wn={class:"mb-3"},Vn={for:"max_bitrate",class:"form-label"},Un={class:"form-text"},qn={class:"mb-3"},Sn={for:"minimum_fps_target",class:"form-label"},En={class:"form-text"},In={__name:"DisplayModesSettings",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c(V,null,[e("div",wn,[e("label",Vn,t(n.$t("config.max_bitrate")),1),u(e("input",{type:"number",class:"form-control",id:"max_bitrate",placeholder:"0","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.max_bitrate=s)},null,512),[[m,o.value.max_bitrate]]),e("div",Un,t(n.$t("config.max_bitrate_desc")),1)]),e("div",qn,[e("label",Sn,t(n.$t("config.minimum_fps_target")),1),u(e("input",{type:"number",min:"0",max:"1000",class:"form-control",id:"minimum_fps_target",placeholder:"0","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.minimum_fps_target=s)},null,512),[[m,o.value.minimum_fps_target]]),e("div",En,t(n.$t("config.minimum_fps_target_desc")),1)])],64))}},Mn=Z(In,[["__scopeId","data-v-0714bb25"]]),Dn={id:"audio-video",class:"config-page"},An={class:"mb-3"},On={for:"audio_sink",class:"form-label"},Pn=["placeholder"],Cn={class:"form-text"},Tn={class:"mb-3"},Nn={for:"virtual_sink",class:"form-label"},zn=["placeholder"],jn={class:"form-text"},Hn={__name:"AudioVideo",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Dn,[e("div",An,[e("label",On,t(n.$t("config.audio_sink")),1),u(e("input",{type:"text",class:"form-control",id:"audio_sink",placeholder:w(A)("config.audio_sink_placeholder","alsa_output.pci-0000_09_00.3.analog-stereo"),"onUpdate:modelValue":l[0]||(l[0]=s=>o.value.audio_sink=s)},null,8,Pn),[[m,o.value.audio_sink]]),e("div",Cn,[v(t(w(A)("config.audio_sink_desc")),1),l[8]||(l[8]=e("br",null,null,-1)),f(S,{platform:a.platform},{windows:b(()=>[...l[4]||(l[4]=[e("pre",null,"tools\\audio-info.exe",-1)])]),freebsd:b(()=>[...l[5]||(l[5]=[e("pre",null,'pacmd list-sinks | grep "name:"',-1),e("pre",null,"pactl info | grep Source",-1)])]),linux:b(()=>[...l[6]||(l[6]=[e("pre",null,'pacmd list-sinks | grep "name:"',-1),e("pre",null,"pactl info | grep Source",-1)])]),macos:b(()=>[...l[7]||(l[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:b(()=>[e("div",Tn,[e("label",Nn,t(n.$t("config.virtual_sink")),1),u(e("input",{type:"text",class:"form-control",id:"virtual_sink",placeholder:n.$t("config.virtual_sink_placeholder"),"onUpdate:modelValue":l[1]||(l[1]=s=>o.value.virtual_sink=s)},null,8,zn),[[m,o.value.virtual_sink]]),e("div",jn,t(n.$t("config.virtual_sink_desc")),1)]),f(h,{class:"mb-3",id:"install_steam_audio_drivers","locale-prefix":"config",modelValue:o.value.install_steam_audio_drivers,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.install_steam_audio_drivers=s),default:"true"},null,8,["modelValue"])]),_:1},8,["platform"]),f(h,{class:"mb-3",id:"stream_audio","locale-prefix":"config",modelValue:o.value.stream_audio,"onUpdate:modelValue":l[3]||(l[3]=s=>o.value.stream_audio=s),default:"true"},null,8,["modelValue"]),f(pl,{platform:a.platform,config:o.value},null,8,["platform","config"]),f($l,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(kn,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(Mn,{platform:a.platform,config:o.value},null,8,["platform","config"])]))}},Gn={id:"nvidia-nvenc-encoder",class:"config-page"},Bn={class:"mb-3"},Ln={for:"nvenc_preset",class:"form-label"},Fn={value:"1"},Rn={value:"7"},Qn={class:"form-text"},Jn={key:0,class:"mb-3"},Kn={for:"nvenc_split_encode",class:"form-label"},Xn={value:"disabled"},Wn={value:"driver_decides"},Yn={value:"enabled"},Zn={class:"form-text"},xn={class:"mb-3"},es={for:"nvenc_twopass",class:"form-label"},os={value:"disabled"},ts={value:"quarter_res"},ls={value:"full_res"},ns={class:"form-text"},ss={class:"mb-3"},as={for:"nvenc_vbv_increase",class:"form-label"},is={class:"form-text"},ds={class:"mb-3 accordion"},rs={class:"accordion-item"},_s={class:"accordion-header"},us={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},cs={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},ps={class:"accordion-body"},fs={__name:"NvidiaNvencEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Gn,[e("div",Bn,[e("label",Ln,t(n.$t("config.nvenc_preset")),1),u(e("select",{id:"nvenc_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.nvenc_preset=s)},[e("option",Fn,"P1 "+t(n.$t("config.nvenc_preset_1")),1),l[9]||(l[9]=j('<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",Rn,"P7 "+t(n.$t("config.nvenc_preset_7")),1)],512),[[$,o.value.nvenc_preset]]),e("div",Qn,t(n.$t("config.nvenc_preset_desc")),1)]),a.platform==="windows"?(d(),c("div",Jn,[e("label",Kn,t(n.$t("config.nvenc_split_encode")),1),u(e("select",{id:"nvenc_split_encode",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.nvenc_split_encode=s)},[e("option",Xn,t(n.$t("_common.disabled")),1),e("option",Wn,t(n.$t("config.nvenc_split_encode_driver_decides_def")),1),e("option",Yn,t(n.$t("_common.enabled")),1)],512),[[$,o.value.nvenc_split_encode]]),e("div",Zn,t(n.$t("config.nvenc_split_encode_desc")),1)])):p("",!0),e("div",xn,[e("label",es,t(n.$t("config.nvenc_twopass")),1),u(e("select",{id:"nvenc_twopass",class:"form-select","onUpdate:modelValue":l[2]||(l[2]=s=>o.value.nvenc_twopass=s)},[e("option",os,t(n.$t("config.nvenc_twopass_disabled")),1),e("option",ts,t(n.$t("config.nvenc_twopass_quarter_res")),1),e("option",ls,t(n.$t("config.nvenc_twopass_full_res")),1)],512),[[$,o.value.nvenc_twopass]]),e("div",ns,t(n.$t("config.nvenc_twopass_desc")),1)]),f(h,{class:"mb-3",id:"nvenc_spatial_aq","locale-prefix":"config",modelValue:o.value.nvenc_spatial_aq,"onUpdate:modelValue":l[3]||(l[3]=s=>o.value.nvenc_spatial_aq=s),default:"false"},null,8,["modelValue"]),e("div",ss,[e("label",as,t(n.$t("config.nvenc_vbv_increase")),1),u(e("input",{type:"number",min:"0",max:"400",class:"form-control",id:"nvenc_vbv_increase",placeholder:"0","onUpdate:modelValue":l[4]||(l[4]=s=>o.value.nvenc_vbv_increase=s)},null,512),[[m,o.value.nvenc_vbv_increase]]),e("div",is,[v(t(n.$t("config.nvenc_vbv_increase_desc")),1),l[10]||(l[10]=e("br",null,null,-1)),l[11]||(l[11]=e("br",null,null,-1)),l[12]||(l[12]=e("a",{href:"https://en.wikipedia.org/wiki/Video_buffering_verifier"},"VBV/HRD",-1))])]),e("div",ds,[e("div",rs,[e("h2",_s,[e("button",us,t(n.$t("config.misc")),1)]),e("div",cs,[e("div",ps,[a.platform==="windows"?(d(),k(h,{key:0,class:"mb-3",id:"nvenc_realtime_hags","locale-prefix":"config",modelValue:o.value.nvenc_realtime_hags,"onUpdate:modelValue":l[5]||(l[5]=s=>o.value.nvenc_realtime_hags=s),default:"true"},{default:b(()=>[...l[13]||(l[13]=[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(),k(h,{key:1,class:"mb-3",id:"nvenc_latency_over_power","locale-prefix":"config",modelValue:o.value.nvenc_latency_over_power,"onUpdate:modelValue":l[6]||(l[6]=s=>o.value.nvenc_latency_over_power=s),default:"true"},null,8,["modelValue"])):p("",!0),a.platform==="windows"?(d(),k(h,{key:2,class:"mb-3",id:"nvenc_opengl_vulkan_on_dxgi","locale-prefix":"config",modelValue:o.value.nvenc_opengl_vulkan_on_dxgi,"onUpdate:modelValue":l[7]||(l[7]=s=>o.value.nvenc_opengl_vulkan_on_dxgi=s),default:"true"},null,8,["modelValue"])):p("",!0),f(h,{class:"mb-3",id:"nvenc_h264_cavlc","locale-prefix":"config",modelValue:o.value.nvenc_h264_cavlc,"onUpdate:modelValue":l[8]||(l[8]=s=>o.value.nvenc_h264_cavlc=s),default:"false"},null,8,["modelValue"])])])])])]))}},ms={id:"intel-quicksync-encoder",class:"config-page"},vs={class:"mb-3"},gs={for:"qsv_preset",class:"form-label"},$s={value:"veryfast"},hs={value:"faster"},bs={value:"fast"},ys={value:"medium"},ks={value:"slow"},ws={value:"slower"},Vs={value:"slowest"},Us={class:"mb-3"},qs={for:"qsv_coder",class:"form-label"},Ss={value:"auto"},Es={value:"cabac"},Is={value:"cavlc"},Ms={__name:"IntelQuickSyncEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",ms,[e("div",vs,[e("label",gs,t(n.$t("config.qsv_preset")),1),u(e("select",{id:"qsv_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.qsv_preset=s)},[e("option",$s,t(n.$t("config.qsv_preset_veryfast")),1),e("option",hs,t(n.$t("config.qsv_preset_faster")),1),e("option",bs,t(n.$t("config.qsv_preset_fast")),1),e("option",ys,t(n.$t("config.qsv_preset_medium")),1),e("option",ks,t(n.$t("config.qsv_preset_slow")),1),e("option",ws,t(n.$t("config.qsv_preset_slower")),1),e("option",Vs,t(n.$t("config.qsv_preset_slowest")),1)],512),[[$,o.value.qsv_preset]])]),e("div",Us,[e("label",qs,t(n.$t("config.qsv_coder")),1),u(e("select",{id:"qsv_coder",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.qsv_coder=s)},[e("option",Ss,t(n.$t("config.ffmpeg_auto")),1),e("option",Es,t(n.$t("config.coder_cabac")),1),e("option",Is,t(n.$t("config.coder_cavlc")),1)],512),[[$,o.value.qsv_coder]])]),f(h,{class:"mb-3",id:"qsv_slow_hevc","locale-prefix":"config",modelValue:o.value.qsv_slow_hevc,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.qsv_slow_hevc=s),default:"false"},null,8,["modelValue"])]))}},Ds={id:"amd-amf-encoder",class:"config-page"},As={class:"mb-3"},Os={for:"amd_usage",class:"form-label"},Ps={value:"transcoding"},Cs={value:"webcam"},Ts={value:"lowlatency_high_quality"},Ns={value:"lowlatency"},zs={value:"ultralowlatency"},js={class:"form-text"},Hs={class:"mb-3 accordion"},Gs={class:"accordion-item"},Bs={class:"accordion-header"},Ls={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},Fs={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},Rs={class:"accordion-body"},Qs={class:"mb-3"},Js={for:"amd_rc",class:"form-label"},Ks={value:"cbr"},Xs={value:"cqp"},Ws={value:"vbr_latency"},Ys={value:"vbr_peak"},Zs={class:"form-text"},xs={class:"mb-3 accordion"},ea={class:"accordion-item"},oa={class:"accordion-header"},ta={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseTwo"},la={id:"panelsStayOpen-collapseTwo",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingTwo"},na={class:"accordion-body"},sa={class:"mb-3"},aa={for:"amd_quality",class:"form-label"},ia={value:"speed"},da={value:"balanced"},ra={value:"quality"},_a={class:"form-text"},ua={class:"mb-3"},ca={for:"amd_coder",class:"form-label"},pa={value:"auto"},fa={value:"cabac"},ma={value:"cavlc"},va={class:"form-text"},ga={__name:"AmdAmfEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Ds,[e("div",As,[e("label",Os,t(n.$t("config.amd_usage")),1),u(e("select",{id:"amd_usage",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.amd_usage=s)},[e("option",Ps,t(n.$t("config.amd_usage_transcoding")),1),e("option",Cs,t(n.$t("config.amd_usage_webcam")),1),e("option",Ts,t(n.$t("config.amd_usage_lowlatency_high_quality")),1),e("option",Ns,t(n.$t("config.amd_usage_lowlatency")),1),e("option",zs,t(n.$t("config.amd_usage_ultralowlatency")),1)],512),[[$,o.value.amd_usage]]),e("div",js,t(n.$t("config.amd_usage_desc")),1)]),e("div",Hs,[e("div",Gs,[e("h2",Bs,[e("button",Ls,t(n.$t("config.amd_rc_group")),1)]),e("div",Fs,[e("div",Rs,[e("div",Qs,[e("label",Js,t(n.$t("config.amd_rc")),1),u(e("select",{id:"amd_rc",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.amd_rc=s)},[e("option",Ks,t(n.$t("config.amd_rc_cbr")),1),e("option",Xs,t(n.$t("config.amd_rc_cqp")),1),e("option",Ws,t(n.$t("config.amd_rc_vbr_latency")),1),e("option",Ys,t(n.$t("config.amd_rc_vbr_peak")),1)],512),[[$,o.value.amd_rc]]),e("div",Zs,t(n.$t("config.amd_rc_desc")),1)]),f(h,{class:"mb-3",id:"amd_enforce_hrd","locale-prefix":"config",modelValue:o.value.amd_enforce_hrd,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.amd_enforce_hrd=s),default:"false"},null,8,["modelValue"])])])])]),e("div",xs,[e("div",ea,[e("h2",oa,[e("button",ta,t(n.$t("config.amd_quality_group")),1)]),e("div",la,[e("div",na,[e("div",sa,[e("label",aa,t(n.$t("config.amd_quality")),1),u(e("select",{id:"amd_quality",class:"form-select","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.amd_quality=s)},[e("option",ia,t(n.$t("config.amd_quality_speed")),1),e("option",da,t(n.$t("config.amd_quality_balanced")),1),e("option",ra,t(n.$t("config.amd_quality_quality")),1)],512),[[$,o.value.amd_quality]]),e("div",_a,t(n.$t("config.amd_quality_desc")),1)]),f(h,{class:"mb-3",id:"amd_preanalysis","locale-prefix":"config",modelValue:o.value.amd_preanalysis,"onUpdate:modelValue":l[4]||(l[4]=s=>o.value.amd_preanalysis=s),default:"false"},null,8,["modelValue"]),f(h,{class:"mb-3",id:"amd_vbaq","locale-prefix":"config",modelValue:o.value.amd_vbaq,"onUpdate:modelValue":l[5]||(l[5]=s=>o.value.amd_vbaq=s),default:"true"},null,8,["modelValue"]),e("div",ua,[e("label",ca,t(n.$t("config.amd_coder")),1),u(e("select",{id:"amd_coder",class:"form-select","onUpdate:modelValue":l[6]||(l[6]=s=>o.value.amd_coder=s)},[e("option",pa,t(n.$t("config.ffmpeg_auto")),1),e("option",fa,t(n.$t("config.coder_cabac")),1),e("option",ma,t(n.$t("config.coder_cavlc")),1)],512),[[$,o.value.amd_coder]]),e("div",va,t(n.$t("config.amd_coder_desc")),1)])])])])])]))}},$a={id:"videotoolbox-encoder",class:"config-page"},ha={class:"mb-3"},ba={for:"vt_coder",class:"form-label"},ya={value:"auto"},ka={value:"cabac"},wa={value:"cavlc"},Va={class:"mb-3"},Ua={for:"vt_software",class:"form-label"},qa={value:"auto"},Sa={value:"disabled"},Ea={value:"allowed"},Ia={value:"forced"},Ma={__name:"VideotoolboxEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",$a,[e("div",ha,[e("label",ba,t(n.$t("config.vt_coder")),1),u(e("select",{id:"vt_coder",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.vt_coder=s)},[e("option",ya,t(n.$t("config.ffmpeg_auto")),1),e("option",ka,t(n.$t("config.coder_cabac")),1),e("option",wa,t(n.$t("config.coder_cavlc")),1)],512),[[$,o.value.vt_coder]])]),e("div",Va,[e("label",Ua,t(n.$t("config.vt_software")),1),u(e("select",{id:"vt_software",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.vt_software=s)},[e("option",qa,t(n.$t("_common.auto")),1),e("option",Sa,t(n.$t("_common.disabled")),1),e("option",Ea,t(n.$t("config.vt_software_allowed")),1),e("option",Ia,t(n.$t("config.vt_software_forced")),1)],512),[[$,o.value.vt_software]])]),f(h,{class:"mb-3",id:"vt_realtime",desc:"","locale-prefix":"config",modelValue:o.value.vt_realtime,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.vt_realtime=s),default:"true"},null,8,["modelValue"])]))}},Da={id:"software-encoder",class:"config-page"},Aa={class:"mb-3"},Oa={for:"sw_preset",class:"form-label"},Pa={value:"ultrafast"},Ca={value:"superfast"},Ta={value:"veryfast"},Na={value:"faster"},za={value:"fast"},ja={value:"medium"},Ha={value:"slow"},Ga={value:"slower"},Ba={value:"veryslow"},La={class:"form-text"},Fa={class:"mb-3"},Ra={for:"sw_tune",class:"form-label"},Qa={value:"film"},Ja={value:"animation"},Ka={value:"grain"},Xa={value:"stillimage"},Wa={value:"fastdecode"},Ya={value:"zerolatency"},Za={class:"form-text"},xa={__name:"SoftwareEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Da,[e("div",Aa,[e("label",Oa,t(n.$t("config.sw_preset")),1),u(e("select",{id:"sw_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.sw_preset=s)},[e("option",Pa,t(n.$t("config.sw_preset_ultrafast")),1),e("option",Ca,t(n.$t("config.sw_preset_superfast")),1),e("option",Ta,t(n.$t("config.sw_preset_veryfast")),1),e("option",Na,t(n.$t("config.sw_preset_faster")),1),e("option",za,t(n.$t("config.sw_preset_fast")),1),e("option",ja,t(n.$t("config.sw_preset_medium")),1),e("option",Ha,t(n.$t("config.sw_preset_slow")),1),e("option",Ga,t(n.$t("config.sw_preset_slower")),1),e("option",Ba,t(n.$t("config.sw_preset_veryslow")),1)],512),[[$,o.value.sw_preset]]),e("div",La,t(n.$t("config.sw_preset_desc")),1)]),e("div",Fa,[e("label",Ra,t(n.$t("config.sw_tune")),1),u(e("select",{id:"sw_tune",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.sw_tune=s)},[e("option",Qa,t(n.$t("config.sw_tune_film")),1),e("option",Ja,t(n.$t("config.sw_tune_animation")),1),e("option",Ka,t(n.$t("config.sw_tune_grain")),1),e("option",Xa,t(n.$t("config.sw_tune_stillimage")),1),e("option",Wa,t(n.$t("config.sw_tune_fastdecode")),1),e("option",Ya,t(n.$t("config.sw_tune_zerolatency")),1)],512),[[$,o.value.sw_tune]]),e("div",Za,t(n.$t("config.sw_tune_desc")),1)])]))}},ei={id:"vaapi-encoder",class:"config-page"},oi={__name:"VAAPIEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",ei,[f(h,{class:"mb-3",id:"vaapi_strict_rc_buffer","locale-prefix":"config",modelValue:o.value.vaapi_strict_rc_buffer,"onUpdate:modelValue":l[0]||(l[0]=s=>o.value.vaapi_strict_rc_buffer=s),default:"false"},null,8,["modelValue"])]))}},ti={id:"vulkan-encoder",class:"config-page"},li={class:"mb-3"},ni={for:"vk_tune",class:"form-label"},si={value:"0"},ai={value:"1"},ii={value:"2"},di={value:"3"},ri={class:"form-text"},_i={class:"mb-3"},ui={for:"vk_rc_mode",class:"form-label"},ci={value:"0"},pi={value:"1"},fi={value:"2"},mi={value:"4"},vi={class:"form-text"},gi={__name:"VulkanEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",ti,[e("div",li,[e("label",ni,t(n.$t("config.vk_tune")),1),u(e("select",{id:"vk_tune",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.vk_tune=s)},[e("option",si,t(n.$t("_common.auto")),1),e("option",ai,t(n.$t("config.vk_tune_hq")),1),e("option",ii,t(n.$t("config.vk_tune_ll")),1),e("option",di,t(n.$t("config.vk_tune_ull")),1)],512),[[$,o.value.vk_tune]]),e("div",ri,t(n.$t("config.vk_tune_desc")),1)]),e("div",_i,[e("label",ui,t(n.$t("config.vk_rc_mode")),1),u(e("select",{id:"vk_rc_mode",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.vk_rc_mode=s)},[e("option",ci,t(n.$t("_common.auto")),1),e("option",pi,t(n.$t("config.vk_rc_cqp")),1),e("option",fi,t(n.$t("config.vk_rc_cbr")),1),e("option",mi,t(n.$t("config.vk_rc_vbr")),1)],512),[[$,o.value.vk_rc_mode]]),e("div",vi,t(n.$t("config.vk_rc_mode_desc")),1)])]))}},$i={__name:"ContainerEncoders",props:["platform","config","currentTab"],setup(a){const o=y(a.config);return(n,l)=>(d(),c(V,null,[a.currentTab==="nv"?(d(),k(fs,{key:0,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="qsv"?(d(),k(Ms,{key:1,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="amd"?(d(),k(ga,{key:2,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vt"?(d(),k(Ma,{key:3,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vaapi"?(d(),k(oi,{key:4,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vulkan"?(d(),k(gi,{key:5,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="sw"?(d(),k(xa,{key:6,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0)],64))}},hi=B({components:{Navbar:Q,General:Te,Inputs:uo,Network:st,Files:Ut,Advanced:al,AudioVideo:Hn,ContainerEncoders:$i,Cpu:oe,Check:W,FileCog:te,Gamepad2:ee,Gpu:le,NetworkIcon:ne,Save:x,Search:X,Settings:R,Sliders:se,Volume2:ie},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_split_encode:"driver_decides",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:"vulkan",name:"Vulkan Encoder",options:{vk_tune:2,vk_rc_mode:2}},{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"&&o.id!=="vulkan")),(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"&&o.id!=="vulkan")),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",vulkan:"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]})}),N("./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),N("./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(l=>{if((n.id===o||l===o)&&(this.currentTab=n.id),l===o&&setTimeout(()=>{document.getElementById(o)&&(window.location.hash=r)},2e3),this.currentTab===n.id)return!0})})}};a(),window.addEventListener("hashchange",a)}});L(hi);
