import{c as I,r as y,d as u,e,t,w as c,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 N,s as C,a as B,i as L}from"./createLucideIcon-nHpt1GN0.js";import{S as F,a as R,N as Q}from"./Navbar-eB0rkuTV.js";import{a as T}from"./fetch_utils-D2qFnNYP.js";import{a as J,_ as h,P as K}from"./Checkbox-DzzGgByI.js";import{T as G,S as X,C as W}from"./trash-2-CMCpBvF9.js";import{T as O,I as Y,_ as Z}from"./Notification-DQTlOxex.js";import{S as x}from"./save-Br_0f_NE.js";import{G as ee}from"./gamepad-2-D30H7T2A.js";/**
 * @license @lucide/vue v1.18.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=[["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"}]],te=I("cpu",oe);/**
 * @license @lucide/vue v1.18.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=[["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"}]],ne=I("file-cog",le);/**
 * @license @lucide/vue v1.18.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=[["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"}]],ae=I("gpu",se);/**
 * @license @lucide/vue v1.18.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=[["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"}]],de=I("network",ie);/**
 * @license @lucide/vue v1.18.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const re=[["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"}]],_e=I("sliders-vertical",re);/**
 * @license @lucide/vue v1.18.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ce=[["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"}]],ue=I("undo",ce);/**
 * @license @lucide/vue v1.18.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pe=[["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"}]],fe=I("volume-2",pe),me={id:"general",class:"config-page"},ve={class:"mb-3"},ge={for:"locale",class:"form-label"},$e={class:"form-text"},he={class:"mb-3"},be={for:"sunshine_name",class:"form-label"},ye={class:"form-text"},ke={class:"mb-3"},we={for:"min_log_level",class:"form-label"},Ve={value:"0"},Ue={value:"1"},qe={value:"2"},Se={value:"3"},Ee={value:"4"},Ie={value:"5"},Me={value:"6"},De={class:"form-text"},Ae={id:"global_prep_cmd",class:"mb-3 d-flex flex-column"},Oe={class:"form-label"},Pe={class:"form-text"},Ne={key:0,class:"table"},Ce={scope:"col"},Te={scope:"col"},ze={key:0,scope:"col"},je=["onUpdate:modelValue"],He=["onUpdate:modelValue"],Ge={key:0,class:"align-middle"},Be=["onClick"],Le={__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(),u("div",me,[e("div",ve,[e("label",ge,t(s.$t("config.locale")),1),c(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",$e,t(s.$t("config.locale_desc")),1)]),e("div",he,[e("label",be,t(s.$t("config.sunshine_name")),1),c(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",ye,t(s.$t("config.sunshine_name_desc")),1)]),e("div",ke,[e("label",we,t(s.$t("config.min_log_level")),1),c(e("select",{id:"min_log_level",class:"form-select","onUpdate:modelValue":i[2]||(i[2]=_=>o.value.min_log_level=_)},[e("option",Ve,t(s.$t("config.min_log_level_0")),1),e("option",Ue,t(s.$t("config.min_log_level_1")),1),e("option",qe,t(s.$t("config.min_log_level_2")),1),e("option",Se,t(s.$t("config.min_log_level_3")),1),e("option",Ee,t(s.$t("config.min_log_level_4")),1),e("option",Ie,t(s.$t("config.min_log_level_5")),1),e("option",Me,t(s.$t("config.min_log_level_6")),1)],512),[[$,o.value.min_log_level]]),e("div",De,t(s.$t("config.min_log_level_desc")),1)]),e("div",Ae,[e("label",Oe,t(s.$t("config.global_prep_cmd")),1),e("div",Pe,t(s.$t("config.global_prep_cmd_desc")),1),o.value.global_prep_cmd.length>0?(d(),u("table",Ne,[e("thead",null,[e("tr",null,[e("th",Ce,[f(w(J),{size:16}),v(" "+t(s.$t("_common.do_cmd")),1)]),e("th",Te,[f(w(ue),{size:16}),v(" "+t(s.$t("_common.undo_cmd")),1)]),a.platform==="windows"?(d(),u("th",ze,[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),u(V,null,H(o.value.global_prep_cmd,(_,g)=>(d(),u("tr",null,[e("td",null,[c(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":U=>_.do=U},null,8,je),[[m,_.do]])]),e("td",null,[c(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":U=>_.undo=U},null,8,He),[[m,_.undo]])]),a.platform==="windows"?(d(),u("td",Ge,[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,Be),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(),u(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))}},Fe={id:"input",class:"config-page"},Re={key:0,class:"mb-3"},Qe={for:"gamepad",class:"form-label"},Je={value:"auto"},Ke={value:"switch"},Xe={value:"xone"},We={value:"ds5"},Ye={value:"switch"},Ze={value:"xone"},xe={value:"ds4"},eo={value:"x360"},oo={class:"form-text"},to={key:0,class:"mb-3 accordion"},lo={class:"accordion-item"},no={class:"accordion-header"},so={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},ao={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},io={class:"accordion-body"},ro={key:2,class:"mb-3"},_o={for:"back_button_timeout",class:"form-label"},co={class:"form-text"},uo={key:3,class:"mb-3"},po={for:"key_repeat_delay",class:"form-label"},fo={class:"form-text"},mo={key:4,class:"mb-3"},vo={for:"key_repeat_frequency",class:"form-label"},go={class:"form-text"},$o={__name:"Inputs",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",Fe,[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(),u("div",Re,[e("label",Qe,t(n.$t("config.gamepad")),1),c(e("select",{id:"gamepad",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.gamepad=s)},[e("option",Je,t(n.$t("_common.auto")),1),f(S,{platform:a.platform},{freebsd:b(()=>[e("option",Ke,t(n.$t("config.gamepad_switch")),1),e("option",Xe,t(n.$t("config.gamepad_xone")),1)]),linux:b(()=>[e("option",We,t(n.$t("config.gamepad_ds5")),1),e("option",Ye,t(n.$t("config.gamepad_switch")),1),e("option",Ze,t(n.$t("config.gamepad_xone")),1)]),windows:b(()=>[e("option",xe,t(n.$t("config.gamepad_ds4")),1),e("option",eo,t(n.$t("config.gamepad_x360")),1)]),_:1},8,["platform"])],512),[[$,o.value.gamepad]]),e("div",oo,t(n.$t("config.gamepad_desc")),1)])):p("",!0),o.value.controller==="enabled"?(d(),u(V,{key:1},[o.value.gamepad==="ds4"||o.value.gamepad==="ds5"||o.value.gamepad==="auto"&&a.platform!=="macos"?(d(),u("div",to,[e("div",lo,[e("h2",no,[e("button",so,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",ao,[e("div",io,[o.value.gamepad==="auto"&&(a.platform==="windows"||a.platform==="linux")?(d(),u(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(),u("div",ro,[e("label",_o,t(n.$t("config.back_button_timeout")),1),c(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",co,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(),u("div",uo,[e("label",po,t(n.$t("config.key_repeat_delay")),1),c(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",fo,t(n.$t("config.key_repeat_delay_desc")),1)])):p("",!0),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),u("div",mo,[e("label",vo,t(n.$t("config.key_repeat_frequency")),1),c(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",go,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)]))}},ho={id:"network",class:"config-page"},bo={class:"mb-3"},yo={for:"address_family",class:"form-label"},ko={value:"ipv4"},wo={value:"both"},Vo={class:"form-text"},Uo={class:"mb-3"},qo={for:"bind_address",class:"form-label"},So={class:"form-text"},Eo={class:"mb-3"},Io={for:"port",class:"form-label"},Mo={class:"form-text"},Do={key:0,class:"alert alert-danger"},Ao={key:1,class:"alert alert-danger"},Oo={class:"table"},Po={scope:"col"},No={scope:"col"},Co={scope:"col"},To={key:0,class:"alert alert-primary",role:"alert"},zo={key:2,class:"alert alert-warning"},jo={class:"mb-3"},Ho={for:"origin_web_ui_allowed",class:"form-label"},Go={value:"pc"},Bo={value:"lan"},Lo={value:"wan"},Fo={class:"form-text"},Ro={class:"mb-3"},Qo={for:"csrf_allowed_origins",class:"form-label"},Jo={class:"form-text"},Ko={class:"mb-3"},Xo={for:"external_ip",class:"form-label"},Wo={class:"form-text"},Yo={class:"mb-3"},Zo={for:"lan_encryption_mode",class:"form-label"},xo={value:"0"},et={value:"1"},ot={value:"2"},tt={class:"form-text"},lt={class:"mb-3"},nt={for:"wan_encryption_mode",class:"form-label"},st={value:"0"},at={value:"1"},it={value:"2"},dt={class:"form-text"},rt={class:"mb-3"},_t={for:"ping_timeout",class:"form-label"},ct={class:"form-text"},ut={class:"mb-3"},pt={for:"packetsize",class:"form-label"},ft={class:"form-text"},z=47989,mt={__name:"Network",props:["platform","config"],setup(a){const o=y(a.config),n=N(()=>{var l;return+((l=o.value)==null?void 0:l.port)});return(l,s)=>(d(),u("div",ho,[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",bo,[e("label",yo,t(l.$t("config.address_family")),1),c(e("select",{id:"address_family",class:"form-select","onUpdate:modelValue":s[1]||(s[1]=i=>o.value.address_family=i)},[e("option",ko,t(l.$t("config.address_family_ipv4")),1),e("option",wo,t(l.$t("config.address_family_both")),1)],512),[[$,o.value.address_family]]),e("div",Vo,t(l.$t("config.address_family_desc")),1)]),e("div",Uo,[e("label",qo,t(l.$t("config.bind_address")),1),c(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",So,t(l.$t("config.bind_address_desc")),1)]),e("div",Eo,[e("label",Io,t(l.$t("config.port")),1),c(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",Mo,t(l.$t("config.port_desc")),1),+n.value-5<1024?(d(),u("div",Do,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_alert_1")),1)])):p("",!0),+n.value+21>65535?(d(),u("div",Ao,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_alert_2")),1)])):p("",!0),e("table",Oo,[e("thead",null,[e("tr",null,[e("th",Po,t(l.$t("config.port_protocol")),1),e("th",No,t(l.$t("config.port_port")),1),e("th",Co,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[11]||(s[11]=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(),u("div",To,[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[12]||(s[12]=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[13]||(s[13]=e("td",null,null,-1))])])]),o.value.origin_web_ui_allowed==="wan"?(d(),u("div",zo,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_warning")),1)])):p("",!0)]),e("div",jo,[e("label",Ho,t(l.$t("config.origin_web_ui_allowed")),1),c(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",Go,t(l.$t("config.origin_web_ui_allowed_pc")),1),e("option",Bo,t(l.$t("config.origin_web_ui_allowed_lan")),1),e("option",Lo,t(l.$t("config.origin_web_ui_allowed_wan")),1)],512),[[$,o.value.origin_web_ui_allowed]]),e("div",Fo,t(l.$t("config.origin_web_ui_allowed_desc")),1)]),e("div",Ro,[e("label",Qo,t(l.$t("config.csrf_allowed_origins")),1),c(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,t(l.$t("config.csrf_allowed_origins_desc")),1)]),e("div",Ko,[e("label",Xo,t(l.$t("config.external_ip")),1),c(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",Wo,t(l.$t("config.external_ip_desc")),1)]),e("div",Yo,[e("label",Zo,t(l.$t("config.lan_encryption_mode")),1),c(e("select",{id:"lan_encryption_mode",class:"form-select","onUpdate:modelValue":s[7]||(s[7]=i=>o.value.lan_encryption_mode=i)},[e("option",xo,t(l.$t("_common.disabled_def")),1),e("option",et,t(l.$t("config.lan_encryption_mode_1")),1),e("option",ot,t(l.$t("config.lan_encryption_mode_2")),1)],512),[[$,o.value.lan_encryption_mode]]),e("div",tt,t(l.$t("config.lan_encryption_mode_desc")),1)]),e("div",lt,[e("label",nt,t(l.$t("config.wan_encryption_mode")),1),c(e("select",{id:"wan_encryption_mode",class:"form-select","onUpdate:modelValue":s[8]||(s[8]=i=>o.value.wan_encryption_mode=i)},[e("option",st,t(l.$t("_common.disabled")),1),e("option",at,t(l.$t("config.wan_encryption_mode_1")),1),e("option",it,t(l.$t("config.wan_encryption_mode_2")),1)],512),[[$,o.value.wan_encryption_mode]]),e("div",dt,t(l.$t("config.wan_encryption_mode_desc")),1)]),e("div",rt,[e("label",_t,t(l.$t("config.ping_timeout")),1),c(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",ct,t(l.$t("config.ping_timeout_desc")),1)]),e("div",ut,[e("label",pt,t(l.$t("config.packetsize")),1),c(e("input",{type:"number",min:"0",max:"65535",class:"form-control",id:"packetsize",placeholder:"0","onUpdate:modelValue":s[10]||(s[10]=i=>o.value.packetsize=i)},null,512),[[m,o.value.packetsize]]),e("div",ft,t(l.$t("config.packetsize_desc")),1)])]))}},vt={id:"files",class:"config-page"},gt={class:"mb-3"},$t={for:"file_apps",class:"form-label"},ht={class:"form-text"},bt={class:"mb-3"},yt={for:"credentials_file",class:"form-label"},kt={class:"form-text"},wt={class:"mb-3"},Vt={for:"log_path",class:"form-label"},Ut={class:"form-text"},qt={class:"mb-3"},St={for:"pkey",class:"form-label"},Et={class:"form-text"},It={class:"mb-3"},Mt={for:"cert",class:"form-label"},Dt={class:"form-text"},At={class:"mb-3"},Ot={for:"file_state",class:"form-label"},Pt={class:"form-text"},Nt={__name:"Files",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",vt,[e("div",gt,[e("label",$t,t(n.$t("config.file_apps")),1),c(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",ht,t(n.$t("config.file_apps_desc")),1)]),e("div",bt,[e("label",yt,t(n.$t("config.credentials_file")),1),c(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",kt,t(n.$t("config.credentials_file_desc")),1)]),e("div",wt,[e("label",Vt,t(n.$t("config.log_path")),1),c(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",Ut,t(n.$t("config.log_path_desc")),1)]),e("div",qt,[e("label",St,t(n.$t("config.pkey")),1),c(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",Et,t(n.$t("config.pkey_desc")),1)]),e("div",It,[e("label",Mt,t(n.$t("config.cert")),1),c(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",Dt,t(n.$t("config.cert_desc")),1)]),e("div",At,[e("label",Ot,t(n.$t("config.file_state")),1),c(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",Pt,t(n.$t("config.file_state_desc")),1)])]))}},Ct={class:"config-page"},Tt={class:"mb-3"},zt={for:"fec_percentage",class:"form-label"},jt={class:"form-text"},Ht={class:"mb-3"},Gt={for:"qp",class:"form-label"},Bt={class:"form-text"},Lt={class:"mb-3"},Ft={for:"min_threads",class:"form-label"},Rt={class:"form-text"},Qt={class:"mb-3"},Jt={for:"hevc_mode",class:"form-label"},Kt={value:"0"},Xt={value:"1"},Wt={value:"2"},Yt={value:"3"},Zt={class:"form-text"},xt={class:"mb-3"},el={for:"av1_mode",class:"form-label"},ol={value:"0"},tl={value:"1"},ll={value:"2"},nl={value:"3"},sl={class:"form-text"},al={key:0,class:"mb-3"},il={for:"capture",class:"form-label"},dl={value:""},rl={value:"wgc"},_l={class:"form-text"},cl={class:"mb-3"},ul={for:"encoder",class:"form-label"},pl={value:""},fl={value:"software"},ml={class:"form-text"},vl={__name:"Advanced",props:["platform","config","global_prep_cmd"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",Ct,[e("div",Tt,[e("label",zt,t(n.$t("config.fec_percentage")),1),c(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",jt,t(n.$t("config.fec_percentage_desc")),1)]),e("div",Ht,[e("label",Gt,t(n.$t("config.qp")),1),c(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",Bt,t(n.$t("config.qp_desc")),1)]),e("div",Lt,[e("label",Ft,t(n.$t("config.min_threads")),1),c(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",Rt,t(n.$t("config.min_threads_desc")),1)]),e("div",Qt,[e("label",Jt,t(n.$t("config.hevc_mode")),1),c(e("select",{id:"hevc_mode",class:"form-select","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.hevc_mode=s)},[e("option",Kt,t(n.$t("config.hevc_mode_0")),1),e("option",Xt,t(n.$t("config.hevc_mode_1")),1),e("option",Wt,t(n.$t("config.hevc_mode_2")),1),e("option",Yt,t(n.$t("config.hevc_mode_3")),1)],512),[[$,o.value.hevc_mode]]),e("div",Zt,t(n.$t("config.hevc_mode_desc")),1)]),e("div",xt,[e("label",el,t(n.$t("config.av1_mode")),1),c(e("select",{id:"av1_mode",class:"form-select","onUpdate:modelValue":l[4]||(l[4]=s=>o.value.av1_mode=s)},[e("option",ol,t(n.$t("config.av1_mode_0")),1),e("option",tl,t(n.$t("config.av1_mode_1")),1),e("option",ll,t(n.$t("config.av1_mode_2")),1),e("option",nl,t(n.$t("config.av1_mode_3")),1)],512),[[$,o.value.av1_mode]]),e("div",sl,t(n.$t("config.av1_mode_desc")),1)]),a.platform!=="macos"?(d(),u("div",al,[e("label",il,t(n.$t("config.capture")),1),c(e("select",{id:"capture",class:"form-select","onUpdate:modelValue":l[5]||(l[5]=s=>o.value.capture=s)},[e("option",dl,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",rl,"Windows.Graphics.Capture "+t(n.$t("_common.beta")),1)]),_:1},8,["platform"])],512),[[$,o.value.capture]]),e("div",_l,t(n.$t("config.capture_desc")),1)])):p("",!0),e("div",cl,[e("label",ul,t(n.$t("config.encoder")),1),c(e("select",{id:"encoder",class:"form-select","onUpdate:modelValue":l[6]||(l[6]=s=>o.value.encoder=s)},[e("option",pl,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",fl,t(n.$t("config.encoder_software")),1)],512),[[$,o.value.encoder]]),e("div",ml,t(n.$t("config.encoder_desc")),1)])]))}};class gl{constructor(r){this.platform=r}getPlatformKey(r,o){return r+"_"+o}getMessageUsingPlatform(r,o){const n=this.getPlatformKey(r,this.platform),l=C("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 $l(a){if(a||(a=C("platform").value),!a)throw"platform argument missing";return C("platformMessage",()=>new gl(a),!0)}function A(a,r){return $l().getMessageUsingPlatform(a,r)}const hl={key:0,class:"mb-3"},bl={for:"adapter_name",class:"form-label"},yl=["placeholder"],kl={class:"form-text"},wl={__name:"AdapterNameSelector",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>a.platform!=="macos"?(d(),u("div",hl,[e("label",bl,t(n.$t("config.adapter_name")),1),c(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,yl),[[m,o.value.adapter_name]]),e("div",kl,[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)}},Vl={class:"mb-3"},Ul={for:"output_name",class:"form-label"},ql=["placeholder"],Sl={class:"form-text"},El={__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(),u("div",Vl,[e("label",Ul,t(l.$t("config.output_name")),1),c(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,ql),[[m,o.value.output_name]]),e("div",Sl,[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"])])]))}},Il={class:"mb-3 accordion"},Ml={class:"accordion-item"},Dl={class:"accordion-header"},Al={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},Ol={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},Pl={class:"accordion-body"},Nl={class:"mb-3"},Cl={for:"dd_configuration_option",class:"form-label"},Tl={value:"disabled"},zl={value:"verify_only"},jl={value:"ensure_active"},Hl={value:"ensure_primary"},Gl={value:"ensure_only_display"},Bl={key:0,class:"mb-3"},Ll={for:"dd_resolution_option",class:"form-label"},Fl={value:"disabled"},Rl={value:"auto"},Ql={value:"manual"},Jl={key:0,class:"form-text"},Kl={key:1,class:"mt-2 ps-4"},Xl={class:"form-text"},Wl={key:1,class:"mb-3"},Yl={for:"dd_refresh_rate_option",class:"form-label"},Zl={value:"disabled"},xl={value:"auto"},en={value:"manual"},on={key:0,class:"mt-2 ps-4"},tn={class:"form-text"},ln={key:2,class:"mb-3"},nn={for:"dd_hdr_option",class:"form-label"},sn={value:"disabled"},an={value:"auto"},dn={for:"dd_wa_hdr_toggle_delay",class:"form-label"},rn={class:"form-text"},_n={key:3,class:"mb-3"},cn={for:"dd_config_revert_delay",class:"form-label"},un={class:"form-text"},pn={key:4,class:"mb-3"},fn={key:5,class:"mb-3"},mn={for:"dd_mode_remapping",class:"form-label"},vn={id:"dd_mode_remapping",class:"d-flex flex-column"},gn={class:"form-text"},$n={key:0,class:"table"},hn={key:0,scope:"col"},bn={key:1,scope:"col"},yn={key:2,scope:"col"},kn={key:3,scope:"col"},wn={key:0},Vn=["onUpdate:modelValue"],Un={key:1},qn=["onUpdate:modelValue"],Sn={key:2},En=["onUpdate:modelValue"],In={key:3},Mn=["onUpdate:modelValue"],Dn=["onClick"],M="refresh_rate_only",E="resolution_only",P="mixed",An={__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",Il,[e("div",Ml,[e("h2",Dl,[e("button",Al,t(i.$t("config.dd_options_header")),1)]),e("div",Ol,[e("div",Pl,[e("div",Nl,[e("label",Cl,t(i.$t("config.dd_configuration_option")),1),c(e("select",{id:"dd_configuration_option",class:"form-select","onUpdate:modelValue":_[0]||(_[0]=g=>o.value.dd_configuration_option=g)},[e("option",Tl,t(i.$t("_common.disabled_def")),1),e("option",zl,t(i.$t("config.dd_config_verify_only")),1),e("option",jl,t(i.$t("config.dd_config_ensure_active")),1),e("option",Hl,t(i.$t("config.dd_config_ensure_primary")),1),e("option",Gl,t(i.$t("config.dd_config_ensure_only_display")),1)],512),[[$,o.value.dd_configuration_option]])]),o.value.dd_configuration_option!=="disabled"?(d(),u("div",Bl,[e("label",Ll,t(i.$t("config.dd_resolution_option")),1),c(e("select",{id:"dd_resolution_option",class:"form-select","onUpdate:modelValue":_[1]||(_[1]=g=>o.value.dd_resolution_option=g)},[e("option",Fl,t(i.$t("config.dd_resolution_option_disabled")),1),e("option",Rl,t(i.$t("config.dd_resolution_option_auto")),1),e("option",Ql,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(),u("div",Jl,t(i.$t("config.dd_resolution_option_ogs_desc")),1)):p("",!0),o.value.dd_resolution_option==="manual"?(d(),u("div",Kl,[e("div",Xl,t(i.$t("config.dd_manual_resolution")),1),c(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(),u("div",Wl,[e("label",Yl,t(i.$t("config.dd_refresh_rate_option")),1),c(e("select",{id:"dd_refresh_rate_option",class:"form-select","onUpdate:modelValue":_[3]||(_[3]=g=>o.value.dd_refresh_rate_option=g)},[e("option",Zl,t(i.$t("config.dd_refresh_rate_option_disabled")),1),e("option",xl,t(i.$t("config.dd_refresh_rate_option_auto")),1),e("option",en,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(),u("div",on,[e("div",tn,t(i.$t("config.dd_manual_refresh_rate")),1),c(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(),u("div",ln,[e("label",nn,t(i.$t("config.dd_hdr_option")),1),c(e("select",{id:"dd_hdr_option",class:"mb-3 form-select","onUpdate:modelValue":_[5]||(_[5]=g=>o.value.dd_hdr_option=g)},[e("option",sn,t(i.$t("config.dd_hdr_option_disabled")),1),e("option",an,t(i.$t("config.dd_hdr_option_auto")),1)],512),[[$,o.value.dd_hdr_option]]),e("label",dn,t(i.$t("config.dd_wa_hdr_toggle_delay")),1),c(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",rn,[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(),u("div",_n,[e("label",cn,t(i.$t("config.dd_config_revert_delay")),1),c(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",un,t(i.$t("config.dd_config_revert_delay_desc")),1)])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),u("div",pn,[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(),u("div",fn,[e("label",mn,t(i.$t("config.dd_mode_remapping")),1),e("div",vn,[e("div",gn,[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(),u(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(),u(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(),u("table",$n,[e("thead",null,[e("tr",null,[l()!==M?(d(),u("th",hn,t(i.$t("config.dd_mode_remapping_requested_resolution")),1)):p("",!0),l()!==E?(d(),u("th",bn,t(i.$t("config.dd_mode_remapping_requested_fps")),1)):p("",!0),l()!==M?(d(),u("th",yn,t(i.$t("config.dd_mode_remapping_final_resolution")),1)):p("",!0),l()!==E?(d(),u("th",kn,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),u(V,null,H(o.value.dd_mode_remapping[l()],(g,U)=>(d(),u("tr",null,[l()!==M?(d(),u("td",wn,[c(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.requested_resolution=q,placeholder:"1920x1080"},null,8,Vn),[[m,g.requested_resolution]])])):p("",!0),l()!==E?(d(),u("td",Un,[c(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.requested_fps=q,placeholder:"60"},null,8,qn),[[m,g.requested_fps]])])):p("",!0),l()!==M?(d(),u("td",Sn,[c(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.final_resolution=q,placeholder:"2560x1440"},null,8,En),[[m,g.final_resolution]])])):p("",!0),l()!==E?(d(),u("td",In,[c(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.final_refresh_rate=q,placeholder:"119.95"},null,8,Mn),[[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,Dn)])]))),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"]))}},On={class:"mb-3"},Pn={for:"max_bitrate",class:"form-label"},Nn={class:"form-text"},Cn={class:"mb-3"},Tn={for:"minimum_fps_target",class:"form-label"},zn={class:"form-text"},jn={__name:"DisplayModesSettings",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u(V,null,[e("div",On,[e("label",Pn,t(n.$t("config.max_bitrate")),1),c(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",Nn,t(n.$t("config.max_bitrate_desc")),1)]),e("div",Cn,[e("label",Tn,t(n.$t("config.minimum_fps_target")),1),c(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",zn,t(n.$t("config.minimum_fps_target_desc")),1)])],64))}},Hn=Z(jn,[["__scopeId","data-v-cb151002"]]),Gn={id:"audio-video",class:"config-page"},Bn={class:"mb-3"},Ln={for:"audio_sink",class:"form-label"},Fn=["placeholder"],Rn={class:"form-text"},Qn={class:"mb-3"},Jn={for:"virtual_sink",class:"form-label"},Kn=["placeholder"],Xn={class:"form-text"},Wn={__name:"AudioVideo",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",Gn,[e("div",Bn,[e("label",Ln,t(n.$t("config.audio_sink")),1),c(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,Fn),[[m,o.value.audio_sink]]),e("div",Rn,[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",Qn,[e("label",Jn,t(n.$t("config.virtual_sink")),1),c(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,Kn),[[m,o.value.virtual_sink]]),e("div",Xn,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(wl,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(El,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(An,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(Hn,{platform:a.platform,config:o.value},null,8,["platform","config"])]))}},Yn={id:"nvidia-nvenc-encoder",class:"config-page"},Zn={class:"mb-3"},xn={for:"nvenc_preset",class:"form-label"},es={value:"1"},os={value:"7"},ts={class:"form-text"},ls={key:0,class:"mb-3"},ns={for:"nvenc_split_encode",class:"form-label"},ss={value:"disabled"},as={value:"driver_decides"},is={value:"enabled"},ds={class:"form-text"},rs={class:"mb-3"},_s={for:"nvenc_twopass",class:"form-label"},cs={value:"disabled"},us={value:"quarter_res"},ps={value:"full_res"},fs={class:"form-text"},ms={class:"mb-3"},vs={for:"nvenc_vbv_increase",class:"form-label"},gs={class:"form-text"},$s={class:"mb-3 accordion"},hs={class:"accordion-item"},bs={class:"accordion-header"},ys={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},ks={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},ws={class:"accordion-body"},Vs={__name:"NvidiaNvencEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",Yn,[e("div",Zn,[e("label",xn,t(n.$t("config.nvenc_preset")),1),c(e("select",{id:"nvenc_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.nvenc_preset=s)},[e("option",es,"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",os,"P7 "+t(n.$t("config.nvenc_preset_7")),1)],512),[[$,o.value.nvenc_preset]]),e("div",ts,t(n.$t("config.nvenc_preset_desc")),1)]),a.platform==="windows"?(d(),u("div",ls,[e("label",ns,t(n.$t("config.nvenc_split_encode")),1),c(e("select",{id:"nvenc_split_encode",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.nvenc_split_encode=s)},[e("option",ss,t(n.$t("_common.disabled")),1),e("option",as,t(n.$t("config.nvenc_split_encode_driver_decides_def")),1),e("option",is,t(n.$t("_common.enabled")),1)],512),[[$,o.value.nvenc_split_encode]]),e("div",ds,t(n.$t("config.nvenc_split_encode_desc")),1)])):p("",!0),e("div",rs,[e("label",_s,t(n.$t("config.nvenc_twopass")),1),c(e("select",{id:"nvenc_twopass",class:"form-select","onUpdate:modelValue":l[2]||(l[2]=s=>o.value.nvenc_twopass=s)},[e("option",cs,t(n.$t("config.nvenc_twopass_disabled")),1),e("option",us,t(n.$t("config.nvenc_twopass_quarter_res")),1),e("option",ps,t(n.$t("config.nvenc_twopass_full_res")),1)],512),[[$,o.value.nvenc_twopass]]),e("div",fs,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",ms,[e("label",vs,t(n.$t("config.nvenc_vbv_increase")),1),c(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",gs,[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",$s,[e("div",hs,[e("h2",bs,[e("button",ys,t(n.$t("config.misc")),1)]),e("div",ks,[e("div",ws,[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"])])])])])]))}},Us={id:"intel-quicksync-encoder",class:"config-page"},qs={class:"mb-3"},Ss={for:"qsv_preset",class:"form-label"},Es={value:"veryfast"},Is={value:"faster"},Ms={value:"fast"},Ds={value:"medium"},As={value:"slow"},Os={value:"slower"},Ps={value:"slowest"},Ns={class:"mb-3"},Cs={for:"qsv_coder",class:"form-label"},Ts={value:"auto"},zs={value:"cabac"},js={value:"cavlc"},Hs={__name:"IntelQuickSyncEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",Us,[e("div",qs,[e("label",Ss,t(n.$t("config.qsv_preset")),1),c(e("select",{id:"qsv_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.qsv_preset=s)},[e("option",Es,t(n.$t("config.qsv_preset_veryfast")),1),e("option",Is,t(n.$t("config.qsv_preset_faster")),1),e("option",Ms,t(n.$t("config.qsv_preset_fast")),1),e("option",Ds,t(n.$t("config.qsv_preset_medium")),1),e("option",As,t(n.$t("config.qsv_preset_slow")),1),e("option",Os,t(n.$t("config.qsv_preset_slower")),1),e("option",Ps,t(n.$t("config.qsv_preset_slowest")),1)],512),[[$,o.value.qsv_preset]])]),e("div",Ns,[e("label",Cs,t(n.$t("config.qsv_coder")),1),c(e("select",{id:"qsv_coder",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.qsv_coder=s)},[e("option",Ts,t(n.$t("config.ffmpeg_auto")),1),e("option",zs,t(n.$t("config.coder_cabac")),1),e("option",js,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"])]))}},Gs={id:"amd-amf-encoder",class:"config-page"},Bs={class:"mb-3"},Ls={for:"amd_usage",class:"form-label"},Fs={value:"transcoding"},Rs={value:"webcam"},Qs={value:"lowlatency_high_quality"},Js={value:"lowlatency"},Ks={value:"ultralowlatency"},Xs={class:"form-text"},Ws={class:"mb-3 accordion"},Ys={class:"accordion-item"},Zs={class:"accordion-header"},xs={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},ea={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},oa={class:"accordion-body"},ta={class:"mb-3"},la={for:"amd_rc",class:"form-label"},na={value:"cbr"},sa={value:"cqp"},aa={value:"vbr_latency"},ia={value:"vbr_peak"},da={class:"form-text"},ra={class:"mb-3 accordion"},_a={class:"accordion-item"},ca={class:"accordion-header"},ua={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseTwo"},pa={id:"panelsStayOpen-collapseTwo",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingTwo"},fa={class:"accordion-body"},ma={class:"mb-3"},va={for:"amd_quality",class:"form-label"},ga={value:"speed"},$a={value:"balanced"},ha={value:"quality"},ba={class:"form-text"},ya={class:"mb-3"},ka={for:"amd_coder",class:"form-label"},wa={value:"auto"},Va={value:"cabac"},Ua={value:"cavlc"},qa={class:"form-text"},Sa={__name:"AmdAmfEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",Gs,[e("div",Bs,[e("label",Ls,t(n.$t("config.amd_usage")),1),c(e("select",{id:"amd_usage",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.amd_usage=s)},[e("option",Fs,t(n.$t("config.amd_usage_transcoding")),1),e("option",Rs,t(n.$t("config.amd_usage_webcam")),1),e("option",Qs,t(n.$t("config.amd_usage_lowlatency_high_quality")),1),e("option",Js,t(n.$t("config.amd_usage_lowlatency")),1),e("option",Ks,t(n.$t("config.amd_usage_ultralowlatency")),1)],512),[[$,o.value.amd_usage]]),e("div",Xs,t(n.$t("config.amd_usage_desc")),1)]),e("div",Ws,[e("div",Ys,[e("h2",Zs,[e("button",xs,t(n.$t("config.amd_rc_group")),1)]),e("div",ea,[e("div",oa,[e("div",ta,[e("label",la,t(n.$t("config.amd_rc")),1),c(e("select",{id:"amd_rc",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.amd_rc=s)},[e("option",na,t(n.$t("config.amd_rc_cbr")),1),e("option",sa,t(n.$t("config.amd_rc_cqp")),1),e("option",aa,t(n.$t("config.amd_rc_vbr_latency")),1),e("option",ia,t(n.$t("config.amd_rc_vbr_peak")),1)],512),[[$,o.value.amd_rc]]),e("div",da,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",ra,[e("div",_a,[e("h2",ca,[e("button",ua,t(n.$t("config.amd_quality_group")),1)]),e("div",pa,[e("div",fa,[e("div",ma,[e("label",va,t(n.$t("config.amd_quality")),1),c(e("select",{id:"amd_quality",class:"form-select","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.amd_quality=s)},[e("option",ga,t(n.$t("config.amd_quality_speed")),1),e("option",$a,t(n.$t("config.amd_quality_balanced")),1),e("option",ha,t(n.$t("config.amd_quality_quality")),1)],512),[[$,o.value.amd_quality]]),e("div",ba,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",ya,[e("label",ka,t(n.$t("config.amd_coder")),1),c(e("select",{id:"amd_coder",class:"form-select","onUpdate:modelValue":l[6]||(l[6]=s=>o.value.amd_coder=s)},[e("option",wa,t(n.$t("config.ffmpeg_auto")),1),e("option",Va,t(n.$t("config.coder_cabac")),1),e("option",Ua,t(n.$t("config.coder_cavlc")),1)],512),[[$,o.value.amd_coder]]),e("div",qa,t(n.$t("config.amd_coder_desc")),1)])])])])])]))}},Ea={id:"videotoolbox-encoder",class:"config-page"},Ia={class:"mb-3"},Ma={for:"vt_coder",class:"form-label"},Da={value:"auto"},Aa={value:"cabac"},Oa={value:"cavlc"},Pa={class:"mb-3"},Na={for:"vt_software",class:"form-label"},Ca={value:"auto"},Ta={value:"disabled"},za={value:"allowed"},ja={value:"forced"},Ha={__name:"VideotoolboxEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",Ea,[e("div",Ia,[e("label",Ma,t(n.$t("config.vt_coder")),1),c(e("select",{id:"vt_coder",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.vt_coder=s)},[e("option",Da,t(n.$t("config.ffmpeg_auto")),1),e("option",Aa,t(n.$t("config.coder_cabac")),1),e("option",Oa,t(n.$t("config.coder_cavlc")),1)],512),[[$,o.value.vt_coder]])]),e("div",Pa,[e("label",Na,t(n.$t("config.vt_software")),1),c(e("select",{id:"vt_software",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.vt_software=s)},[e("option",Ca,t(n.$t("_common.auto")),1),e("option",Ta,t(n.$t("_common.disabled")),1),e("option",za,t(n.$t("config.vt_software_allowed")),1),e("option",ja,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"])]))}},Ga={id:"software-encoder",class:"config-page"},Ba={class:"mb-3"},La={for:"sw_preset",class:"form-label"},Fa={value:"ultrafast"},Ra={value:"superfast"},Qa={value:"veryfast"},Ja={value:"faster"},Ka={value:"fast"},Xa={value:"medium"},Wa={value:"slow"},Ya={value:"slower"},Za={value:"veryslow"},xa={class:"form-text"},ei={class:"mb-3"},oi={for:"sw_tune",class:"form-label"},ti={value:"film"},li={value:"animation"},ni={value:"grain"},si={value:"stillimage"},ai={value:"fastdecode"},ii={value:"zerolatency"},di={class:"form-text"},ri={__name:"SoftwareEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",Ga,[e("div",Ba,[e("label",La,t(n.$t("config.sw_preset")),1),c(e("select",{id:"sw_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.sw_preset=s)},[e("option",Fa,t(n.$t("config.sw_preset_ultrafast")),1),e("option",Ra,t(n.$t("config.sw_preset_superfast")),1),e("option",Qa,t(n.$t("config.sw_preset_veryfast")),1),e("option",Ja,t(n.$t("config.sw_preset_faster")),1),e("option",Ka,t(n.$t("config.sw_preset_fast")),1),e("option",Xa,t(n.$t("config.sw_preset_medium")),1),e("option",Wa,t(n.$t("config.sw_preset_slow")),1),e("option",Ya,t(n.$t("config.sw_preset_slower")),1),e("option",Za,t(n.$t("config.sw_preset_veryslow")),1)],512),[[$,o.value.sw_preset]]),e("div",xa,t(n.$t("config.sw_preset_desc")),1)]),e("div",ei,[e("label",oi,t(n.$t("config.sw_tune")),1),c(e("select",{id:"sw_tune",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.sw_tune=s)},[e("option",ti,t(n.$t("config.sw_tune_film")),1),e("option",li,t(n.$t("config.sw_tune_animation")),1),e("option",ni,t(n.$t("config.sw_tune_grain")),1),e("option",si,t(n.$t("config.sw_tune_stillimage")),1),e("option",ai,t(n.$t("config.sw_tune_fastdecode")),1),e("option",ii,t(n.$t("config.sw_tune_zerolatency")),1)],512),[[$,o.value.sw_tune]]),e("div",di,t(n.$t("config.sw_tune_desc")),1)])]))}},_i={id:"vaapi-encoder",class:"config-page"},ci={__name:"VAAPIEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",_i,[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"])]))}},ui={id:"vulkan-encoder",class:"config-page"},pi={class:"mb-3"},fi={for:"vk_tune",class:"form-label"},mi={value:"0"},vi={value:"1"},gi={value:"2"},$i={value:"3"},hi={class:"form-text"},bi={class:"mb-3"},yi={for:"vk_rc_mode",class:"form-label"},ki={value:"0"},wi={value:"1"},Vi={value:"2"},Ui={value:"4"},qi={class:"form-text"},Si={__name:"VulkanEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),u("div",ui,[e("div",pi,[e("label",fi,t(n.$t("config.vk_tune")),1),c(e("select",{id:"vk_tune",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.vk_tune=s)},[e("option",mi,t(n.$t("_common.auto")),1),e("option",vi,t(n.$t("config.vk_tune_hq")),1),e("option",gi,t(n.$t("config.vk_tune_ll")),1),e("option",$i,t(n.$t("config.vk_tune_ull")),1)],512),[[$,o.value.vk_tune]]),e("div",hi,t(n.$t("config.vk_tune_desc")),1)]),e("div",bi,[e("label",yi,t(n.$t("config.vk_rc_mode")),1),c(e("select",{id:"vk_rc_mode",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.vk_rc_mode=s)},[e("option",ki,t(n.$t("_common.auto")),1),e("option",wi,t(n.$t("config.vk_rc_cqp")),1),e("option",Vi,t(n.$t("config.vk_rc_cbr")),1),e("option",Ui,t(n.$t("config.vk_rc_vbr")),1)],512),[[$,o.value.vk_rc_mode]]),e("div",qi,t(n.$t("config.vk_rc_mode_desc")),1)])]))}},Ei={__name:"ContainerEncoders",props:["platform","config","currentTab"],setup(a){const o=y(a.config);return(n,l)=>(d(),u(V,null,[a.currentTab==="nv"?(d(),k(Vs,{key:0,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="qsv"?(d(),k(Hs,{key:1,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="amd"?(d(),k(Sa,{key:2,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vt"?(d(),k(Ha,{key:3,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vaapi"?(d(),k(ci,{key:4,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vulkan"?(d(),k(Si,{key:5,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="sw"?(d(),k(ri,{key:6,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0)],64))}},Ii=B({components:{Navbar:Q,General:Le,Inputs:$o,Network:mt,Files:Nt,Advanced:vl,AudioVideo:Wn,ContainerEncoders:Ei,Cpu:te,Check:W,FileCog:ne,Gamepad2:ee,Gpu:ae,NetworkIcon:de,Save:x,Search:X,Settings:R,Sliders:_e,Volume2:fe},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,packetsize:0}},{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:N(()=>this.platform),searchQuery:N(()=>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]})}),T("./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),T("./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(Ii);
