import{w as se,S as je,U as Ie,W as ce,X as Qe,Y as Ke,Z as Re,$ as Xe,a0 as D,q as T,r as o,a1 as M,i as _,a2 as U,d as w,a3 as $,c as W,a4 as Ae,a5 as Oe,a6 as he,a7 as ie,a8 as me,a9 as Me,k as R,s as oe,aa as pe,ab as Le,ac as ke,ad as Je,ae as al,a as j,m as fe,l as Z,f as ue,g as le,af as nl,j as be,V as te,ag as sl,u as Te,ah as Se,h as Ce,v as Pe,ai as el,aj as xe,y as we,n as $e,_ as Ge,ak as ee,al as ll,am as ol,an as dl,ao as ge,ap as rl,L as Ve,aq as Be,ar as Ne,as as qe,at as H}from"./index-135ae4c1.js";import{g as N,K,d as P,c as Y,M as J,a1 as C,a2 as A,a3 as a,m as e,W as V,Z as b,u as l,ab as S,w as X,n as il,A as Ze,r as We,Y as _e,D as Ee,a6 as q,F as Q,a7 as ae,a8 as ne,a5 as ze,ao as tl,a9 as He,as as ve,$ as ul,a as ml,x as pl,q as fl}from"./vue-d2584a6d.js";import{_ as Ye}from"./PasswordField.vue_vue_type_script_setup_true_lang-f7d196be.js";import"./faker-c43f92d4.js";import"./vuetify-e547ef1b.js";const bl={href:"https://github.com/qbittorrent/qBittorrent/wiki/Explanation-of-Options-in-qBittorrent#Advanced",target:"_blank"},_l={href:"https://www.libtorrent.org/reference-Settings.html",target:"_blank"},cl=N({__name:"Advanced",setup(L){const{t:n}=K(),t=se(),h=[{title:n("settings.advanced.qbittorrent.resumeDataStorageType.legacy"),value:je.LEGACY},{title:n("settings.advanced.qbittorrent.resumeDataStorageType.sqlite"),value:je.SQLITE}],u=P([{title:n("settings.advanced.qbittorrent.networking.networkInterfaces.any"),value:""}]),c=P([{title:n("settings.advanced.qbittorrent.networking.ipAddress.all"),value:""},{title:n("settings.advanced.qbittorrent.networking.ipAddress.allIPv4"),value:"0.0.0.0"},{title:n("settings.advanced.qbittorrent.networking.ipAddress.allIPv6"),value:"::"}]),p=[{title:n("constants.diskIoType.default"),value:Ie.DEFAULT},{title:n("constants.diskIoType.memoryMappedFiles"),value:Ie.MEMORY_MAPPED_FILES},{title:n("constants.diskIoType.posixCompliant"),value:Ie.POSIX_COMPLIANT}],f=[{title:n("constants.diskIoMode.disableOsCache"),value:ce.DISABLE_OS_CACHE},{title:n("constants.diskIoMode.enableOsCache"),value:ce.ENABLE_OS_CACHE}],d=[{title:n("constants.diskIoMode.disableOsCache"),value:ce.DISABLE_OS_CACHE},{title:n("constants.diskIoMode.enableOsCache"),value:ce.ENABLE_OS_CACHE},{title:n("constants.diskIoMode.writeThrough"),value:ce.WRITE_THROUGH}],r=[{title:n("constants.utpTcpMixedMode.preferTcp"),value:Qe.PREFER_TCP},{title:n("constants.utpTcpMixedMode.peerProportional"),value:Qe.PEER_PROPORTIONAL}],g=[{title:n("constants.uploadSlotsBehavior.fixedSlots"),value:Ke.FIXED_SLOTS},{title:n("constants.uploadSlotsBehavior.uploadRateBased"),value:Ke.UPLOAD_RATE_BASED}],k=[{title:n("constants.uploadChokingAlgorithm.roundRobin"),value:Re.ROUND_ROBIN},{title:n("constants.uploadChokingAlgorithm.fastestUpload"),value:Re.FASTEST_UPLOAD},{title:n("constants.uploadChokingAlgorithm.antiLeech"),value:Re.ANTI_LEECH}],x=Y({get:()=>t.preferences.torrent_file_size_limit/1024/1024,set:i=>{t.preferences.torrent_file_size_limit=i*1024*1024}});return J(async()=>{const i=await Xe.getNetworkInterfaces();for(const m of i)u.value.push({title:m.name,value:m.value});const s=await Xe.getAddresses(t.preferences.current_network_interface);for(const m of s)c.value.push({title:m,value:m})}),(i,s)=>(C(),A(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.advanced.qbittorrent.subheader"))+" (",1),S("a",bl,b(l(n)("settings.advanced.openDoc")),1),V(") ")]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(M,{modelValue:l(t).preferences.resume_data_storage_type,"onUpdate:modelValue":s[0]||(s[0]=m=>l(t).preferences.resume_data_storage_type=m),"hide-details":"",items:h,label:i.$t("settings.advanced.qbittorrent.resumeDataStorageType.label")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.save_resume_data_interval,"onUpdate:modelValue":s[1]||(s[1]=m=>l(t).preferences.save_resume_data_interval=m),type:"number","hide-details":"",suffix:l(n)("units.minutes"),label:l(n)("settings.advanced.qbittorrent.saveInterval")},null,8,["modelValue","suffix","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.memory_working_set_limit,"onUpdate:modelValue":s[2]||(s[2]=m=>l(t).preferences.memory_working_set_limit=m),type:"number","hide-details":"",suffix:"MiB",label:l(n)("settings.advanced.qbittorrent.allocatedRam")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:x.value,"onUpdate:modelValue":s[3]||(s[3]=m=>x.value=m),type:"number","hide-details":"",suffix:"MiB",label:i.$t("settings.advanced.qbittorrent.torrentFileSizeLimit")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.recheck_completed_torrents,"onUpdate:modelValue":s[4]||(s[4]=m=>l(t).preferences.recheck_completed_torrents=m),"hide-details":"",label:l(n)("settings.advanced.qbittorrent.recheckOnCompletion")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.refresh_interval,"onUpdate:modelValue":s[5]||(s[5]=m=>l(t).preferences.refresh_interval=m),type:"number","hide-details":"",suffix:"ms",label:l(n)("settings.advanced.qbittorrent.refreshInterval")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.resolve_peer_countries,"onUpdate:modelValue":s[6]||(s[6]=m=>l(t).preferences.resolve_peer_countries=m),"hide-details":"",label:l(n)("settings.advanced.qbittorrent.resolveCountries")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.reannounce_when_address_changed,"onUpdate:modelValue":s[7]||(s[7]=m=>l(t).preferences.reannounce_when_address_changed=m),"hide-details":"",label:l(n)("settings.advanced.qbittorrent.reannounceOnIpPortChanged")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mx-10"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.advanced.qbittorrent.networking.title")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(M,{modelValue:l(t).preferences.current_network_interface,"onUpdate:modelValue":s[8]||(s[8]=m=>l(t).preferences.current_network_interface=m),"hide-details":"",items:u.value,label:l(n)("settings.advanced.qbittorrent.networking.networkInterfaces.label")},null,8,["modelValue","items","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(M,{modelValue:l(t).preferences.current_interface_address,"onUpdate:modelValue":s[9]||(s[9]=m=>l(t).preferences.current_interface_address=m),"hide-details":"",items:c.value,label:l(n)("settings.advanced.qbittorrent.networking.ipAddress.label")},null,8,["modelValue","items","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mx-10 mt-3"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.advanced.qbittorrent.embeddedTracker.title")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",class:"py-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.enable_embedded_tracker,"onUpdate:modelValue":s[10]||(s[10]=m=>l(t).preferences.enable_embedded_tracker=m),"hide-details":"",label:l(n)("settings.advanced.qbittorrent.embeddedTracker.enable")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",class:"py-0"},{default:a(()=>[e(_,{modelValue:l(t).preferences.embedded_tracker_port,"onUpdate:modelValue":s[11]||(s[11]=m=>l(t).preferences.embedded_tracker_port=m),disabled:!l(t).preferences.enable_embedded_tracker,type:"number","hide-details":"",label:l(n)("settings.advanced.qbittorrent.embeddedTracker.port")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",class:"pt-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.embedded_tracker_port_forwarding,"onUpdate:modelValue":s[12]||(s[12]=m=>l(t).preferences.embedded_tracker_port_forwarding=m),"hide-details":"",label:l(n)("settings.advanced.qbittorrent.embeddedTracker.portForward")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e($),e(D,null,{default:a(()=>[V(b(l(n)("settings.advanced.libtorrent.subheader"))+" ( ",1),S("a",_l,b(l(n)("settings.advanced.openDoc")),1),V(" ) ")]),_:1}),e(D,null,{default:a(()=>[V(b(l(n)("settings.advanced.libtorrent.threads.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.async_io_threads,"onUpdate:modelValue":s[13]||(s[13]=m=>l(t).preferences.async_io_threads=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.threads.asyncIoThreads")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.hashing_threads,"onUpdate:modelValue":s[14]||(s[14]=m=>l(t).preferences.hashing_threads=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.threads.hashingThreads")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.file_pool_size,"onUpdate:modelValue":s[15]||(s[15]=m=>l(t).preferences.file_pool_size=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.threads.filePoolSize")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.checking_memory_use,"onUpdate:modelValue":s[16]||(s[16]=m=>l(t).preferences.checking_memory_use=m),type:"number","hide-details":"",suffix:"MiB",label:l(n)("settings.advanced.libtorrent.threads.outstandingMemory")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mx-10 mt-3"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.advanced.libtorrent.disk.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.disk_cache,"onUpdate:modelValue":s[17]||(s[17]=m=>l(t).preferences.disk_cache=m),type:"number","hide-details":"",suffix:"MiB",label:l(n)("settings.advanced.libtorrent.disk.diskCache")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.disk_cache_ttl,"onUpdate:modelValue":s[18]||(s[18]=m=>l(t).preferences.disk_cache_ttl=m),type:"number","hide-details":"",suffix:l(n)("units.seconds"),label:l(n)("settings.advanced.libtorrent.disk.diskCacheExpiry")},null,8,["modelValue","suffix","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(_,{modelValue:l(t).preferences.disk_queue_size,"onUpdate:modelValue":s[19]||(s[19]=m=>l(t).preferences.disk_queue_size=m),type:"number","hide-details":"",suffix:"kiB",label:l(n)("settings.advanced.libtorrent.disk.diskQueueSize")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(M,{modelValue:l(t).preferences.disk_io_type,"onUpdate:modelValue":s[20]||(s[20]=m=>l(t).preferences.disk_io_type=m),"hide-details":"",items:p,label:l(n)("settings.advanced.libtorrent.disk.diskIoType")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(M,{modelValue:l(t).preferences.disk_io_read_mode,"onUpdate:modelValue":s[21]||(s[21]=m=>l(t).preferences.disk_io_read_mode=m),"hide-details":"",items:f,label:l(n)("settings.advanced.libtorrent.disk.diskIoReadMode")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(M,{modelValue:l(t).preferences.disk_io_write_mode,"onUpdate:modelValue":s[22]||(s[22]=m=>l(t).preferences.disk_io_write_mode=m),"hide-details":"",items:d,label:l(n)("settings.advanced.libtorrent.disk.diskIoWriteMode")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mx-10 my-3"}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.bdecode_depth_limit,"onUpdate:modelValue":s[23]||(s[23]=m=>l(t).preferences.bdecode_depth_limit=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.threads.bdecodeDepthLimit")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.bdecode_token_limit,"onUpdate:modelValue":s[24]||(s[24]=m=>l(t).preferences.bdecode_token_limit=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.threads.bdecodeTokenLimit")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(U,{modelValue:l(t).preferences.enable_coalesce_read_write,"onUpdate:modelValue":s[25]||(s[25]=m=>l(t).preferences.enable_coalesce_read_write=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.coalesceReadsWrites")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(U,{modelValue:l(t).preferences.enable_piece_extent_affinity,"onUpdate:modelValue":s[26]||(s[26]=m=>l(t).preferences.enable_piece_extent_affinity=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.pieceExtentAffinity")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(U,{modelValue:l(t).preferences.enable_upload_suggestions,"onUpdate:modelValue":s[27]||(s[27]=m=>l(t).preferences.enable_upload_suggestions=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.sendUploadPieceSuggestions")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.send_buffer_watermark,"onUpdate:modelValue":s[28]||(s[28]=m=>l(t).preferences.send_buffer_watermark=m),type:"number","hide-details":"",suffix:"kiB",label:l(n)("settings.advanced.libtorrent.sendBufferWatermark")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.send_buffer_low_watermark,"onUpdate:modelValue":s[29]||(s[29]=m=>l(t).preferences.send_buffer_low_watermark=m),type:"number","hide-details":"",suffix:"kiB",label:l(n)("settings.advanced.libtorrent.sendBufferLowWatermark")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.send_buffer_watermark_factor,"onUpdate:modelValue":s[30]||(s[30]=m=>l(t).preferences.send_buffer_watermark_factor=m),type:"number","hide-details":"",suffix:"%",label:l(n)("settings.advanced.libtorrent.sendBufferWatermarkFactor")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(_,{modelValue:l(t).preferences.connection_speed,"onUpdate:modelValue":s[31]||(s[31]=m=>l(t).preferences.connection_speed=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.outgoingConnectionsPerSecond")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.socket_send_buffer_size,"onUpdate:modelValue":s[32]||(s[32]=m=>l(t).preferences.socket_send_buffer_size=m),type:"number",label:l(n)("settings.advanced.libtorrent.socketSendBufferSize"),hint:i.$t("settings.advanced.libtorrent.socketSendBufferSizeHint"),suffix:"kiB"},null,8,["modelValue","label","hint"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.socket_receive_buffer_size,"onUpdate:modelValue":s[33]||(s[33]=m=>l(t).preferences.socket_receive_buffer_size=m),type:"number",label:l(n)("settings.advanced.libtorrent.socketReceiveBufferSize"),hint:i.$t("settings.advanced.libtorrent.socketReceiveBufferSizeHint"),suffix:"kiB"},null,8,["modelValue","label","hint"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.socket_backlog_size,"onUpdate:modelValue":s[34]||(s[34]=m=>l(t).preferences.socket_backlog_size=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.socketBacklogSize")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mx-10 mt-3"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.advanced.libtorrent.networking.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.outgoing_ports_min,"onUpdate:modelValue":s[35]||(s[35]=m=>l(t).preferences.outgoing_ports_min=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.networking.outgoingPortsMin")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.outgoing_ports_max,"onUpdate:modelValue":s[36]||(s[36]=m=>l(t).preferences.outgoing_ports_max=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.networking.outgoingPortsMax")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.upnp_lease_duration,"onUpdate:modelValue":s[37]||(s[37]=m=>l(t).preferences.upnp_lease_duration=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.networking.upnpLeaseDuration")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.peer_tos,"onUpdate:modelValue":s[38]||(s[38]=m=>l(t).preferences.peer_tos=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.networking.peerTos")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(M,{modelValue:l(t).preferences.utp_tcp_mixed_mode,"onUpdate:modelValue":s[39]||(s[39]=m=>l(t).preferences.utp_tcp_mixed_mode=m),"hide-details":"",items:r,label:l(n)("settings.advanced.libtorrent.networking.utpTcpMixedModeAlgorithm")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mx-10 mt-3"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.advanced.libtorrent.security.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.idn_support_enabled,"onUpdate:modelValue":s[40]||(s[40]=m=>l(t).preferences.idn_support_enabled=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.security.idnSupport")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.enable_multi_connections_from_same_ip,"onUpdate:modelValue":s[41]||(s[41]=m=>l(t).preferences.enable_multi_connections_from_same_ip=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.security.allowMultipleConnectionsFromTheSameIPAddress")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(U,{modelValue:l(t).preferences.validate_https_tracker_certificate,"onUpdate:modelValue":s[42]||(s[42]=m=>l(t).preferences.validate_https_tracker_certificate=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.security.validateHTTPSTrackerCertificate")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(U,{modelValue:l(t).preferences.ssrf_mitigation,"onUpdate:modelValue":s[43]||(s[43]=m=>l(t).preferences.ssrf_mitigation=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.security.mitigateSSRF")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(U,{modelValue:l(t).preferences.block_peers_on_privileged_ports,"onUpdate:modelValue":s[44]||(s[44]=m=>l(t).preferences.block_peers_on_privileged_ports=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.security.blockPeersOnPrivilegedPorts")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mx-10 my-3"}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(M,{modelValue:l(t).preferences.upload_slots_behavior,"onUpdate:modelValue":s[45]||(s[45]=m=>l(t).preferences.upload_slots_behavior=m),"hide-details":"",items:g,label:l(n)("settings.advanced.libtorrent.uploadSlotsBehavior")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(M,{modelValue:l(t).preferences.upload_choking_algorithm,"onUpdate:modelValue":s[46]||(s[46]=m=>l(t).preferences.upload_choking_algorithm=m),"hide-details":"",items:k,label:l(n)("settings.advanced.libtorrent.uploadChokingAlgorithm")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.announce_to_all_trackers,"onUpdate:modelValue":s[47]||(s[47]=m=>l(t).preferences.announce_to_all_trackers=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.announceAllTrackers")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.announce_to_all_tiers,"onUpdate:modelValue":s[48]||(s[48]=m=>l(t).preferences.announce_to_all_tiers=m),"hide-details":"",label:l(n)("settings.advanced.libtorrent.announceAllTiers")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(_,{modelValue:l(t).preferences.announce_ip,"onUpdate:modelValue":s[49]||(s[49]=m=>l(t).preferences.announce_ip=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.announceIP")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.max_concurrent_http_announces,"onUpdate:modelValue":s[50]||(s[50]=m=>l(t).preferences.max_concurrent_http_announces=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.maxConcurrentHTTPAnnounces")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.stop_tracker_timeout,"onUpdate:modelValue":s[51]||(s[51]=m=>l(t).preferences.stop_tracker_timeout=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.stopTrackerTimeout")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.peer_turnover,"onUpdate:modelValue":s[52]||(s[52]=m=>l(t).preferences.peer_turnover=m),type:"number","hide-details":"",suffix:"%",label:l(n)("settings.advanced.libtorrent.peerTurnover")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.peer_turnover_cutoff,"onUpdate:modelValue":s[53]||(s[53]=m=>l(t).preferences.peer_turnover_cutoff=m),type:"number","hide-details":"",suffix:"%",label:l(n)("settings.advanced.libtorrent.peerTurnoverCutoff")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.peer_turnover_interval,"onUpdate:modelValue":s[54]||(s[54]=m=>l(t).preferences.peer_turnover_interval=m),type:"number","hide-details":"",suffix:l(n)("units.seconds"),label:l(n)("settings.advanced.libtorrent.peerTurnoverInterval")},null,8,["modelValue","suffix","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(_,{modelValue:l(t).preferences.request_queue_size,"onUpdate:modelValue":s[55]||(s[55]=m=>l(t).preferences.request_queue_size=m),type:"number","hide-details":"",label:l(n)("settings.advanced.libtorrent.requestQueueSize")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1})]),_:1}))}}),gl=N({__name:"Behavior",setup(L){const{t:n}=K(),t=se(),h=[{title:n("constants.file_log_age_type.days"),value:Ae.DAYS},{title:n("constants.file_log_age_type.months"),value:Ae.MONTHS},{title:n("constants.file_log_age_type.years"),value:Ae.YEARS}];return(u,c)=>(C(),A(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(u.$t("settings.behavior.logs.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.file_log_enabled,"onUpdate:modelValue":c[0]||(c[0]=p=>l(t).preferences.file_log_enabled=p),"hide-details":"",label:u.$t("settings.behavior.logs.file_log_enabled")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.file_log_path,"onUpdate:modelValue":c[1]||(c[1]=p=>l(t).preferences.file_log_path=p),disabled:!l(t).preferences.file_log_enabled,"hide-details":"",label:u.$t("settings.behavior.logs.file_log_path")},null,8,["modelValue","disabled","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mx-10 my-3"}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.file_log_backup_enabled,"onUpdate:modelValue":c[2]||(c[2]=p=>l(t).preferences.file_log_backup_enabled=p),disabled:!l(t).preferences.file_log_enabled,"hide-details":"",label:u.$t("settings.behavior.logs.file_log_backup_enabled")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.file_log_max_size,"onUpdate:modelValue":c[3]||(c[3]=p=>l(t).preferences.file_log_max_size=p),disabled:!l(t).preferences.file_log_enabled||!l(t).preferences.file_log_backup_enabled,type:"number","hide-details":"",label:u.$t("settings.behavior.logs.file_log_max_size"),suffix:"kiB"},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.file_log_delete_old,"onUpdate:modelValue":c[4]||(c[4]=p=>l(t).preferences.file_log_delete_old=p),disabled:!l(t).preferences.file_log_enabled,"hide-details":"",label:u.$t("settings.behavior.logs.file_log_delete_old")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"3"},{default:a(()=>[e(_,{modelValue:l(t).preferences.file_log_age,"onUpdate:modelValue":c[5]||(c[5]=p=>l(t).preferences.file_log_age=p),disabled:!l(t).preferences.file_log_enabled||!l(t).preferences.file_log_delete_old,"hide-details":"",label:u.$t("settings.behavior.logs.file_log_age")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"3"},{default:a(()=>[e(M,{modelValue:l(t).preferences.file_log_age_type,"onUpdate:modelValue":c[6]||(c[6]=p=>l(t).preferences.file_log_age_type=p),disabled:!l(t).preferences.file_log_enabled||!l(t).preferences.file_log_delete_old,items:h,"hide-details":""},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e($,{class:"mt-3"}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.performance_warning,"onUpdate:modelValue":c[7]||(c[7]=p=>l(t).preferences.performance_warning=p),"hide-details":"",label:u.$t("settings.behavior.performance_warning")},null,8,["modelValue","label"])]),_:1})]),_:1}))}}),Vl={href:"https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode",target:"_blank"},vl=N({__name:"BitTorrent",setup(L){const{t:n}=K(),t=se(),h=P([{title:n("constants.encryption.preferEncryption"),value:Oe.PREFER_ENCRYPTION},{title:n("constants.encryption.forceOn"),value:Oe.FORCE_ON},{title:n("constants.encryption.forceOff"),value:Oe.FORCE_OFF}]),u=P([{title:n("constants.maxRatioAction.pauseTorrent"),value:he.PAUSE_TORRENT},{title:n("constants.maxRatioAction.removeTorrent"),value:he.REMOVE_TORRENT},{title:n("constants.maxRatioAction.removeTorrentAndFiles"),value:he.REMOVE_TORRENT_AND_FILES},{title:n("constants.maxRatioAction.torrentSuperseeding"),value:he.ENABLE_SUPERSEEDING}]);return(c,p)=>(C(),A(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.bittorrent.privacy.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.dht,"onUpdate:modelValue":p[0]||(p[0]=f=>l(t).preferences.dht=f),"hide-details":"",label:l(n)("settings.bittorrent.privacy.enableDHT")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.pex,"onUpdate:modelValue":p[1]||(p[1]=f=>l(t).preferences.pex=f),"hide-details":"",label:l(n)("settings.bittorrent.privacy.enablePeX")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.lsd,"onUpdate:modelValue":p[2]||(p[2]=f=>l(t).preferences.lsd=f),"hide-details":"",label:l(n)("settings.bittorrent.privacy.enableLPD")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(M,{modelValue:l(t).preferences.encryption,"onUpdate:modelValue":p[3]||(p[3]=f=>l(t).preferences.encryption=f),"hide-details":"",items:h.value,label:l(n)("settings.bittorrent.privacy.encryptionMode")},null,8,["modelValue","items","label"])]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.anonymous_mode,"onUpdate:modelValue":p[4]||(p[4]=f=>l(t).preferences.anonymous_mode=f),"hide-details":"",label:l(n)("settings.bittorrent.privacy.enableAnonymous")},null,8,["modelValue","label"]),S("a",Vl,b(l(n)("settings.bittorrent.privacy.moreInfo")),1)]),_:1}),e($),e(w,{class:"my-3"},{default:a(()=>[e(_,{modelValue:l(t).preferences.max_active_checking_torrents,"onUpdate:modelValue":p[5]||(p[5]=f=>l(t).preferences.max_active_checking_torrents=f),type:"number","hide-details":"",label:l(n)("settings.bittorrent.maxActiveCheckingTorrents")},null,8,["modelValue","label"])]),_:1}),e($),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",class:"pb-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.queueing_enabled,"onUpdate:modelValue":p[6]||(p[6]=f=>l(t).preferences.queueing_enabled=f),"hide-details":"",label:l(n)("settings.bittorrent.torrentQueueing.subheader")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.max_active_downloads,"onUpdate:modelValue":p[7]||(p[7]=f=>l(t).preferences.max_active_downloads=f),disabled:!l(t).preferences.queueing_enabled,type:"number","hide-details":"",label:l(n)("settings.bittorrent.torrentQueueing.maxActiveDownload")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.max_active_uploads,"onUpdate:modelValue":p[8]||(p[8]=f=>l(t).preferences.max_active_uploads=f),disabled:!l(t).preferences.queueing_enabled,type:"number","hide-details":"",label:l(n)("settings.bittorrent.torrentQueueing.maxActiveUpload")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",md:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.max_active_torrents,"onUpdate:modelValue":p[9]||(p[9]=f=>l(t).preferences.max_active_torrents=f),disabled:!l(t).preferences.queueing_enabled,type:"number","hide-details":"",label:l(n)("settings.bittorrent.torrentQueueing.maxActiveTorrent")},null,8,["modelValue","disabled","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.dont_count_slow_torrents,"onUpdate:modelValue":p[10]||(p[10]=f=>l(t).preferences.dont_count_slow_torrents=f),disabled:!l(t).preferences.queueing_enabled,"hide-details":"",label:l(n)("settings.bittorrent.torrentQueueing.excludeSlowTorrent")},null,8,["modelValue","disabled","label"])]),_:1}),e(w,null,{default:a(()=>[e(T,{class:"mb-2"},{default:a(()=>[e(o,{cols:"12",sm:"6",md:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.slow_torrent_dl_rate_threshold,"onUpdate:modelValue":p[11]||(p[11]=f=>l(t).preferences.slow_torrent_dl_rate_threshold=f),disabled:!l(t).preferences.queueing_enabled||!l(t).preferences.dont_count_slow_torrents,type:"number","hide-details":"",label:l(n)("settings.bittorrent.torrentQueueing.downloadRateLimit"),suffix:"kiB/s"},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.slow_torrent_ul_rate_threshold,"onUpdate:modelValue":p[12]||(p[12]=f=>l(t).preferences.slow_torrent_ul_rate_threshold=f),disabled:!l(t).preferences.queueing_enabled||!l(t).preferences.dont_count_slow_torrents,type:"number","hide-details":"",label:l(n)("settings.bittorrent.torrentQueueing.uploadRateLimit"),suffix:"kiB/s"},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",md:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.slow_torrent_inactive_timer,"onUpdate:modelValue":p[13]||(p[13]=f=>l(t).preferences.slow_torrent_inactive_timer=f),disabled:!l(t).preferences.queueing_enabled||!l(t).preferences.dont_count_slow_torrents,type:"number","hide-details":"",label:l(n)("settings.bittorrent.torrentQueueing.torrentInactivityTimer"),suffix:l(n)("units.seconds")},null,8,["modelValue","disabled","label","suffix"])]),_:1})]),_:1})]),_:1}),e($),e(D,null,{default:a(()=>[V(b(l(n)("settings.bittorrent.seedLimits.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.max_ratio_enabled,"onUpdate:modelValue":p[14]||(p[14]=f=>l(t).preferences.max_ratio_enabled=f),"hide-details":"",label:l(n)("settings.bittorrent.seedLimits.whenRatioReaches")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.max_ratio,"onUpdate:modelValue":p[15]||(p[15]=f=>l(t).preferences.max_ratio=f),disabled:!l(t).preferences.max_ratio_enabled,type:"number","hide-details":""},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.max_seeding_time_enabled,"onUpdate:modelValue":p[16]||(p[16]=f=>l(t).preferences.max_seeding_time_enabled=f),"hide-details":"",label:l(n)("settings.bittorrent.seedLimits.whenSeedingTimeReaches")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.max_seeding_time,"onUpdate:modelValue":p[17]||(p[17]=f=>l(t).preferences.max_seeding_time=f),disabled:!l(t).preferences.max_seeding_time_enabled,type:"number","hide-details":"",suffix:l(n)("units.minutes")},null,8,["modelValue","disabled","suffix"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.max_inactive_seeding_time_enabled,"onUpdate:modelValue":p[18]||(p[18]=f=>l(t).preferences.max_inactive_seeding_time_enabled=f),"hide-details":"",label:l(n)("settings.bittorrent.seedLimits.whenInactiveSeedingTimeReaches")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.max_inactive_seeding_time,"onUpdate:modelValue":p[19]||(p[19]=f=>l(t).preferences.max_inactive_seeding_time=f),disabled:!l(t).preferences.max_inactive_seeding_time_enabled,type:"number",suffix:l(n)("units.minutes")},null,8,["modelValue","disabled","suffix"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.bittorrent.seedLimits.then")),1)]),_:1})]),_:1}),e(o,null,{default:a(()=>[e(M,{modelValue:l(t).preferences.max_ratio_act,"onUpdate:modelValue":p[20]||(p[20]=f=>l(t).preferences.max_ratio_act=f),disabled:!l(t).preferences.max_ratio_enabled&&!l(t).preferences.max_seeding_time_enabled&&!l(t).preferences.max_inactive_seeding_time_enabled,"hide-details":"",items:u.value},null,8,["modelValue","disabled","items"])]),_:1})]),_:1})]),_:1}),e($,{class:"mt-3"}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.add_trackers_enabled,"onUpdate:modelValue":p[21]||(p[21]=f=>l(t).preferences.add_trackers_enabled=f),"hide-details":"",label:l(n)("settings.bittorrent.autoAddTrackers")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(ie,{modelValue:l(t).preferences.add_trackers,"onUpdate:modelValue":p[22]||(p[22]=f=>l(t).preferences.add_trackers=f),disabled:!l(t).preferences.add_trackers_enabled,"auto-grow":"",clearable:"","persistent-hint":"",hint:l(n)("settings.bittorrent.autoAddTrackersHint")},null,8,["modelValue","disabled","hint"])]),_:1})]),_:1}))}}),yl={class:"d-flex align-center"},wl={class:"d-flex align-center"},Ul={class:"d-flex align-center"},hl={class:"d-flex align-center"},kl={class:"font-italic"},xl=N({__name:"Connection",setup(L){const{t:n}=K(),t=se(),h=P([{title:n("common.none"),value:me.NONE},{title:n("constants.proxy_type.socks4"),value:me.SOCKS4},{title:n("constants.proxy_type.socks5"),value:me.SOCKS5},{title:n("constants.proxy_type.http"),value:me.HTTP}]),u=Y(()=>t.preferences.proxy_type===me.NONE),c=Y(()=>t.preferences.proxy_type===me.SOCKS4),p=P([{title:n("constants.bittorrentProtocols.tcp_utp"),value:Me.TCP_uTP},{title:n("constants.bittorrentProtocols.tcp"),value:Me.TCP},{title:n("constants.bittorrentProtocols.utp"),value:Me.uTP}]),f=P(!1),d=P(!1),r=P(!1),g=P(!1),k=()=>{t.preferences.listen_port=Math.floor(Math.random()*(65535-1024+1)+1024)};return J(async()=>{f.value=t.preferences.max_connec>0,d.value=t.preferences.max_connec_per_torrent>0,r.value=t.preferences.max_uploads>0,g.value=t.preferences.max_uploads_per_torrent>0}),X(()=>f.value,x=>{t.preferences.max_connec=x?t.preferences.max_connec:-1}),X(()=>d.value,x=>{t.preferences.max_connec_per_torrent=x?t.preferences.max_connec_per_torrent:-1}),X(()=>r.value,x=>{t.preferences.max_uploads=x?t.preferences.max_uploads:-1}),X(()=>g.value,x=>{t.preferences.max_uploads_per_torrent=x?t.preferences.max_uploads_per_torrent:-1}),(x,i)=>(C(),A(W,null,{default:a(()=>[e(w,null,{default:a(()=>[e(M,{modelValue:l(t).preferences.bittorrent_protocol,"onUpdate:modelValue":i[0]||(i[0]=s=>l(t).preferences.bittorrent_protocol=s),"hide-details":"",items:p.value,label:l(n)("settings.connection.protocol")},null,8,["modelValue","items","label"])]),_:1}),e($,{class:"mt-3"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.connection.listeningPort.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.listen_port,"onUpdate:modelValue":i[1]||(i[1]=s=>l(t).preferences.listen_port=s),type:"number","hide-details":"",label:l(n)("settings.connection.listeningPort.incomingConnectionPort")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{color:"primary",onClick:k},{default:a(()=>[V(b(l(n)("settings.connection.listeningPort.randomPort")),1)]),_:1})]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.upnp,"onUpdate:modelValue":i[2]||(i[2]=s=>l(t).preferences.upnp=s),"hide-details":"",label:l(n)("settings.connection.listeningPort.useUPnP")},null,8,["modelValue","label"])]),_:1}),e($),e(D,null,{default:a(()=>[V(b(l(n)("settings.connection.connectionLimits.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[S("div",yl,[S("span",null,[e(oe,{modelValue:f.value,"onUpdate:modelValue":i[3]||(i[3]=s=>f.value=s)},null,8,["modelValue"])]),e(_,{modelValue:l(t).preferences.max_connec,"onUpdate:modelValue":i[4]||(i[4]=s=>l(t).preferences.max_connec=s),disabled:!f.value,type:"number","hide-details":"",label:l(n)("settings.connection.connectionLimits.globalMaxConnection")},null,8,["modelValue","disabled","label"])])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[S("div",wl,[S("span",null,[e(oe,{modelValue:d.value,"onUpdate:modelValue":i[5]||(i[5]=s=>d.value=s)},null,8,["modelValue"])]),e(_,{modelValue:l(t).preferences.max_connec_per_torrent,"onUpdate:modelValue":i[6]||(i[6]=s=>l(t).preferences.max_connec_per_torrent=s),disabled:!d.value,type:"number","hide-details":"",label:l(n)("settings.connection.connectionLimits.perTorrentMaxConnection")},null,8,["modelValue","disabled","label"])])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[S("div",Ul,[S("span",null,[e(oe,{modelValue:r.value,"onUpdate:modelValue":i[7]||(i[7]=s=>r.value=s)},null,8,["modelValue"])]),e(_,{modelValue:l(t).preferences.max_uploads,"onUpdate:modelValue":i[8]||(i[8]=s=>l(t).preferences.max_uploads=s),disabled:!r.value,type:"number","hide-details":"",label:l(n)("settings.connection.connectionLimits.globalMaxUploadSlots")},null,8,["modelValue","disabled","label"])])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[S("div",hl,[S("span",null,[e(oe,{modelValue:g.value,"onUpdate:modelValue":i[9]||(i[9]=s=>g.value=s)},null,8,["modelValue"])]),e(_,{modelValue:l(t).preferences.max_uploads_per_torrent,"onUpdate:modelValue":i[10]||(i[10]=s=>l(t).preferences.max_uploads_per_torrent=s),disabled:!g.value,type:"number","hide-details":"",label:l(n)("settings.connection.connectionLimits.perTorrentMaxUploadSlots")},null,8,["modelValue","disabled","label"])])]),_:1})]),_:1})]),_:1}),e($,{class:"mt-3"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.connection.proxy.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",md:"4"},{default:a(()=>[e(M,{modelValue:l(t).preferences.proxy_type,"onUpdate:modelValue":i[11]||(i[11]=s=>l(t).preferences.proxy_type=s),"hide-details":"",items:h.value},null,8,["modelValue","items"])]),_:1}),e(o,{cols:"6",md:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.proxy_ip,"onUpdate:modelValue":i[12]||(i[12]=s=>l(t).preferences.proxy_ip=s),disabled:u.value,"hide-details":"",label:l(n)("settings.connection.proxy.host")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"6",md:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.proxy_port,"onUpdate:modelValue":i[13]||(i[13]=s=>l(t).preferences.proxy_port=s),disabled:u.value,type:"number","hide-details":"",label:l(n)("settings.connection.proxy.port")},null,8,["modelValue","disabled","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,{"no-gutters":""},{default:a(()=>[e(o,{cols:"12",sm:"6",md:"3"},{default:a(()=>[e(U,{modelValue:l(t).preferences.proxy_bittorrent,"onUpdate:modelValue":i[14]||(i[14]=s=>l(t).preferences.proxy_bittorrent=s),disabled:u.value,"hide-details":"",label:l(n)("settings.connection.proxy.bittorrent")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"3"},{default:a(()=>[e(U,{modelValue:l(t).preferences.proxy_peer_connections,"onUpdate:modelValue":i[15]||(i[15]=s=>l(t).preferences.proxy_peer_connections=s),disabled:u.value||!l(t).preferences.proxy_bittorrent,"hide-details":"",label:l(n)("settings.connection.proxy.peerConnections")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"3"},{default:a(()=>[e(U,{modelValue:l(t).preferences.proxy_rss,"onUpdate:modelValue":i[16]||(i[16]=s=>l(t).preferences.proxy_rss=s),disabled:u.value||c.value,"hide-details":"",label:l(n)("settings.connection.proxy.rss")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"3"},{default:a(()=>[e(U,{modelValue:l(t).preferences.proxy_misc,"onUpdate:modelValue":i[17]||(i[17]=s=>l(t).preferences.proxy_misc=s),disabled:u.value||c.value,"hide-details":"",label:l(n)("settings.connection.proxy.misc")},null,8,["modelValue","disabled","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12"},{default:a(()=>[e(U,{modelValue:l(t).preferences.proxy_hostname_lookup,"onUpdate:modelValue":i[18]||(i[18]=s=>l(t).preferences.proxy_hostname_lookup=s),disabled:u.value||c.value,"hide-details":"",label:l(n)("settings.connection.proxy.hostNameLookup")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(U,{modelValue:l(t).preferences.proxy_auth_enabled,"onUpdate:modelValue":i[19]||(i[19]=s=>l(t).preferences.proxy_auth_enabled=s),disabled:u.value||c.value,"hide-details":"",label:l(n)("settings.connection.proxy.auth.subtitle")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.proxy_username,"onUpdate:modelValue":i[20]||(i[20]=s=>l(t).preferences.proxy_username=s),disabled:u.value||!l(t).preferences.proxy_auth_enabled,dense:"","hide-details":"",label:l(n)("settings.connection.proxy.auth.username")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(Ye,{modelValue:l(t).preferences.proxy_password,"onUpdate:modelValue":i[21]||(i[21]=s=>l(t).preferences.proxy_password=s),"hide-icon":u.value||!l(t).preferences.proxy_auth_enabled,disabled:u.value||!l(t).preferences.proxy_auth_enabled,label:l(n)("settings.connection.proxy.auth.password")},null,8,["modelValue","hide-icon","disabled","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[S("h5",kl,b(l(n)("settings.connection.proxy.auth.tip")),1)]),_:1}),e($),e(D,null,{default:a(()=>[V(b(l(n)("settings.connection.ipFiltering.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.ip_filter_enabled,"onUpdate:modelValue":i[22]||(i[22]=s=>l(t).preferences.ip_filter_enabled=s),"hide-details":"",label:l(n)("settings.connection.ipFiltering.filterPath")},null,8,["modelValue","label"]),e(_,{modelValue:l(t).preferences.ip_filter_path,"onUpdate:modelValue":i[23]||(i[23]=s=>l(t).preferences.ip_filter_path=s),disabled:!l(t).preferences.ip_filter_enabled,"hide-details":""},null,8,["modelValue","disabled"])]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.ip_filter_trackers,"onUpdate:modelValue":i[24]||(i[24]=s=>l(t).preferences.ip_filter_trackers=s),"hide-details":"",label:l(n)("settings.connection.ipFiltering.applyToTrackers")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.connection.ipFiltering.bannedIps")),1)]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(ie,{modelValue:l(t).preferences.banned_IPs,"onUpdate:modelValue":i[25]||(i[25]=s=>l(t).preferences.banned_IPs=s),"auto-grow":"",clearable:"","persistent-hint":"",hint:l(n)("settings.connection.ipFiltering.bannedIpsHint")},null,8,["modelValue","hint"])]),_:1})]),_:1}))}}),Tl={class:"d-flex align-center"},Sl={class:"d-flex align-center"},Cl={class:"d-flex align-center"},Pl={class:"text-h5"},$l={class:"no-bullet"},El=N({__name:"Downloads",setup(L){const{t:n}=K(),t=se(),h=[{title:n("constants.contentLayout.original"),value:pe.ORIGINAL},{title:n("constants.contentLayout.subfolder"),value:pe.SUBFOLDER},{title:n("constants.contentLayout.nosubfolder"),value:pe.NO_SUBFOLDER}],u=[{title:n("constants.stopCondition.none"),value:Le.NONE},{title:n("constants.stopCondition.metadataReceived"),value:Le.METADATA_RECEIVED},{title:n("constants.stopCondition.filesChecked"),value:Le.FILES_CHECKED}],c=[{title:n("settings.downloads.saveManagement.defaultTMMOptions.manual"),value:!1},{title:n("settings.downloads.saveManagement.defaultTMMOptions.automatic"),value:!0}],p=[{title:n("settings.downloads.saveManagement.paramChangedTMMOptions.relocateTorrent"),value:!0},{title:n("settings.downloads.saveManagement.paramChangedTMMOptions.switchToManual"),value:!1}],f=P(!1),d=P(!1),r=P(!1),g=P(!1),k=P(!1),x=P(-1),i=P({monitoredFolderPath:"",saveType:ke.MONITORED_FOLDER,otherPath:""}),s=P({monitoredFolderPath:"",saveType:ke.MONITORED_FOLDER,otherPath:""}),m=P([{title:n("settings.downloads.monitoredFolders.monitoredFolderPath"),key:"monitoredFolderPath",sortable:!1},{title:n("settings.downloads.monitoredFolders.saveType"),key:"saveType",sortable:!1},{title:n("settings.downloads.monitoredFolders.otherPath"),key:"otherPath",sortable:!1},{title:n("settings.downloads.monitoredFolders.actions"),key:"actions",sortable:!1}]),O=P([]),B=P([{title:n("constants.monitoredFolderSaveLocation.monitoredFolder"),value:ke.MONITORED_FOLDER},{title:n("constants.monitoredFolderSaveLocation.defaultSavePath"),value:ke.DEFAULT_SAVE_PATH},{title:n("constants.monitoredFolderSaveLocation.other"),value:-1}]);J(async()=>{f.value=t.preferences.export_dir.length>0,d.value=t.preferences.export_dir_fin.length>0,Object.entries(t.preferences.scan_dirs).forEach(z=>{const[v,y]=z;let re,Fe;typeof y=="string"?(re=-1,Fe=y):(re=y,Fe=""),O.value.push({monitoredFolderPath:v,saveType:re,otherPath:Fe})})}),X(()=>f,z=>{z||(t.preferences.export_dir="")}),X(()=>d,z=>{z||(t.preferences.export_dir_fin="")});const G=z=>{x.value=O.value.indexOf(z),i.value={...z},g.value=!0},De=z=>{x.value=O.value.indexOf(z),i.value={...z},k.value=!0},Ue=()=>{O.value.splice(x.value,1),I(),de()},F=()=>{x.value>-1?Object.assign(O.value[x.value],i.value):O.value.push(i.value),I(),E()},I=()=>{const z={};O.value.forEach(v=>{z[v.monitoredFolderPath]=v.saveType===-1?v.otherPath:v.saveType}),t.preferences.scan_dirs=z},E=async()=>{g.value=!1,await Ze(),i.value={...s.value},x.value=-1},de=async()=>{k.value=!1,await Ze(),i.value={...s.value},x.value=-1};return(z,v)=>(C(),A(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.downloads.whenAddTorrent.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(M,{modelValue:l(t).preferences.torrent_content_layout,"onUpdate:modelValue":v[0]||(v[0]=y=>l(t).preferences.torrent_content_layout=y),"hide-details":"",items:h,label:l(n)("constants.contentLayout.title")},null,8,["modelValue","label"]),e(U,{modelValue:l(t).preferences.add_to_top_of_queue,"onUpdate:modelValue":v[1]||(v[1]=y=>l(t).preferences.add_to_top_of_queue=y),"hide-details":"",label:l(n)("settings.downloads.whenAddTorrent.addToTopOfQueue")},null,8,["modelValue","label"]),e(U,{modelValue:l(t).preferences.merge_trackers,"onUpdate:modelValue":v[2]||(v[2]=y=>l(t).preferences.merge_trackers=y),"hide-details":"",label:l(n)("settings.downloads.whenAddTorrent.mergeTrackers")},null,8,["modelValue","label"]),e(U,{modelValue:l(t).preferences.start_paused_enabled,"onUpdate:modelValue":v[3]||(v[3]=y=>l(t).preferences.start_paused_enabled=y),"hide-details":"",label:l(n)("settings.downloads.whenAddTorrent.doNotAutoStart")},null,8,["modelValue","label"]),e(M,{modelValue:l(t).preferences.torrent_stop_condition,"onUpdate:modelValue":v[4]||(v[4]=y=>l(t).preferences.torrent_stop_condition=y),"hide-details":"",items:u,label:l(n)("constants.stopCondition.title")},null,8,["modelValue","label"]),e(U,{modelValue:l(t).preferences.auto_delete_mode,"onUpdate:modelValue":v[5]||(v[5]=y=>l(t).preferences.auto_delete_mode=y),"hide-details":"",label:l(n)("settings.downloads.whenAddTorrent.autoDeleteMode")},null,8,["modelValue","label"])]),_:1}),e($),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.preallocate_all,"onUpdate:modelValue":v[6]||(v[6]=y=>l(t).preferences.preallocate_all=y),"hide-details":"",label:l(n)("settings.downloads.publicSettings.preAllocateDisk")},null,8,["modelValue","label"]),e(U,{modelValue:l(t).preferences.incomplete_files_ext,"onUpdate:modelValue":v[7]||(v[7]=y=>l(t).preferences.incomplete_files_ext=y),"hide-details":"",label:l(n)("settings.downloads.publicSettings.appendQBExtension")},null,8,["modelValue","label"])]),_:1}),e($),e(D,null,{default:a(()=>[V(b(l(n)("settings.downloads.saveManagement.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12"},{default:a(()=>[e(M,{modelValue:l(t).preferences.auto_tmm_enabled,"onUpdate:modelValue":v[8]||(v[8]=y=>l(t).preferences.auto_tmm_enabled=y),items:c,"hide-details":"",label:l(n)("settings.downloads.saveManagement.autoTMMEnabled")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"4"},{default:a(()=>[e(M,{modelValue:l(t).preferences.torrent_changed_tmm_enabled,"onUpdate:modelValue":v[9]||(v[9]=y=>l(t).preferences.torrent_changed_tmm_enabled=y),items:p,"hide-details":"",label:l(n)("settings.downloads.saveManagement.torrentChangedTMM")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"4"},{default:a(()=>[e(M,{modelValue:l(t).preferences.save_path_changed_tmm_enabled,"onUpdate:modelValue":v[10]||(v[10]=y=>l(t).preferences.save_path_changed_tmm_enabled=y),items:p,"hide-details":"",label:l(n)("settings.downloads.saveManagement.savePathChangedTMM")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"4"},{default:a(()=>[e(M,{modelValue:l(t).preferences.category_changed_tmm_enabled,"onUpdate:modelValue":v[11]||(v[11]=y=>l(t).preferences.category_changed_tmm_enabled=y),items:p,"hide-details":"",label:l(n)("settings.downloads.saveManagement.categoryChangedTMM")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(_,{modelValue:l(t).preferences.save_path,"onUpdate:modelValue":v[12]||(v[12]=y=>l(t).preferences.save_path=y),"hide-details":"",label:l(n)("settings.downloads.saveManagement.defaultSavePath")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[S("div",Tl,[S("span",null,[e(oe,{modelValue:l(t).preferences.temp_path_enabled,"onUpdate:modelValue":v[13]||(v[13]=y=>l(t).preferences.temp_path_enabled=y)},null,8,["modelValue"])]),e(_,{modelValue:l(t).preferences.temp_path,"onUpdate:modelValue":v[14]||(v[14]=y=>l(t).preferences.temp_path=y),disabled:!l(t).preferences.temp_path_enabled,"hide-details":"",label:l(n)("settings.downloads.saveManagement.keepIncomplete")},null,8,["modelValue","disabled","label"])])]),_:1}),e(o,{cols:"12"},{default:a(()=>[S("div",Sl,[S("span",null,[e(oe,{modelValue:f.value,"onUpdate:modelValue":v[15]||(v[15]=y=>f.value=y)},null,8,["modelValue"])]),e(_,{modelValue:l(t).preferences.export_dir,"onUpdate:modelValue":v[16]||(v[16]=y=>l(t).preferences.export_dir=y),disabled:!f.value,"hide-details":"",label:l(n)("settings.downloads.saveManagement.exportDir")},null,8,["modelValue","disabled","label"])])]),_:1}),e(o,{cols:"12"},{default:a(()=>[S("div",Cl,[S("span",null,[e(oe,{modelValue:d.value,"onUpdate:modelValue":v[17]||(v[17]=y=>d.value=y)},null,8,["modelValue"])]),e(_,{modelValue:l(t).preferences.export_dir_fin,"onUpdate:modelValue":v[18]||(v[18]=y=>l(t).preferences.export_dir_fin=y),disabled:!d.value,"hide-details":"",label:l(n)("settings.downloads.saveManagement.exportDirFinished")},null,8,["modelValue","disabled","label"])])]),_:1})]),_:1})]),_:1}),e($),e(sl,{class:"my-4",headers:m.value,items:O.value},{top:a(()=>[e(Je,{flat:""},{default:a(()=>[e(al,null,{default:a(()=>[V(b(l(n)("settings.downloads.monitoredFolders.subheader")),1)]),_:1}),e($,{inset:"",vertical:""}),e(j),e(fe,{modelValue:g.value,"onUpdate:modelValue":v[22]||(v[22]=y=>g.value=y),"max-width":"500px"},{activator:a(({props:y})=>[e(R,il({color:"primary",variant:"flat",dark:"",class:"mb-2"},y),{default:a(()=>[V(b(l(n)("settings.downloads.monitoredFolders.newItem")),1)]),_:2},1040)]),default:a(()=>[e(Z,null,{default:a(()=>[e(ue,null,{default:a(()=>[S("span",Pl,b(l(n)("settings.downloads.monitoredFolders.editItem")),1)]),_:1}),e(le,null,{default:a(()=>[e(nl,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12"},{default:a(()=>[e(_,{modelValue:i.value.monitoredFolderPath,"onUpdate:modelValue":v[19]||(v[19]=y=>i.value.monitoredFolderPath=y),label:l(n)("settings.downloads.monitoredFolders.monitoredFolderPath")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(M,{modelValue:i.value.saveType,"onUpdate:modelValue":v[20]||(v[20]=y=>i.value.saveType=y),"hide-details":"",items:B.value,label:l(n)("settings.downloads.monitoredFolders.saveType")},null,8,["modelValue","items","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(_,{disabled:i.value.saveType!==-1,modelValue:i.value.otherPath,"onUpdate:modelValue":v[21]||(v[21]=y=>i.value.otherPath=y),label:l(n)("settings.downloads.monitoredFolders.otherPath")},null,8,["disabled","modelValue","label"])]),_:1})]),_:1})]),_:1})]),_:1}),e(be,null,{default:a(()=>[e(j),e(R,{color:"accent darken-1",onClick:E},{default:a(()=>[V(b(l(n)("common.cancel")),1)]),_:1}),e(R,{color:"accent darken-1",onClick:F},{default:a(()=>[V(b(l(n)("common.save")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(fe,{modelValue:k.value,"onUpdate:modelValue":v[23]||(v[23]=y=>k.value=y),"max-width":"500px"},{default:a(()=>[e(Z,null,{default:a(()=>[e(ue,{class:"text-h5"},{default:a(()=>[V(b(l(n)("settings.downloads.monitoredFolders.confirmDelete")),1)]),_:1}),e(be,null,{default:a(()=>[e(j),e(R,{color:"blue darken-1",onClick:de},{default:a(()=>[V(b(l(n)("common.cancel")),1)]),_:1}),e(R,{color:"blue darken-1",onClick:Ue},{default:a(()=>[V(b(l(n)("common.ok")),1)]),_:1}),e(j)]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),"item.saveType":a(({item:y})=>[V(b(B.value.find(re=>re.value===y.saveType)?.title),1)]),"item.actions":a(({item:y})=>[e(te,{size:"small",onClick:re=>G(y)},{default:a(()=>[V("mdi-pencil")]),_:2},1032,["onClick"]),e(te,{size:"small",onClick:re=>De(y)},{default:a(()=>[V("mdi-delete")]),_:2},1032,["onClick"])]),"no-data":a(()=>[V(b(l(n)("settings.downloads.monitoredFolders.noData")),1)]),_:2},1032,["headers","items"]),e($),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.excluded_file_names_enabled,"onUpdate:modelValue":v[24]||(v[24]=y=>l(t).preferences.excluded_file_names_enabled=y),"hide-details":"",label:l(n)("settings.downloads.excludedFileNames.label")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(ie,{modelValue:l(t).preferences.excluded_file_names,"onUpdate:modelValue":v[25]||(v[25]=y=>l(t).preferences.excluded_file_names=y),disabled:!l(t).preferences.excluded_file_names_enabled,clearable:"","auto-grow":"","persistent-hint":"",hint:l(n)("settings.downloads.excludedFileNames.hint")},null,8,["modelValue","disabled","hint"])]),_:1}),e($),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.mail_notification_enabled,"onUpdate:modelValue":v[26]||(v[26]=y=>l(t).preferences.mail_notification_enabled=y),"hide-details":"",label:l(n)("settings.downloads.mailNotification.enabled")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(_,{modelValue:l(t).preferences.mail_notification_sender,"onUpdate:modelValue":v[27]||(v[27]=y=>l(t).preferences.mail_notification_sender=y),disabled:!l(t).preferences.mail_notification_enabled,"hide-details":"",label:l(n)("settings.downloads.mailNotification.from")},null,8,["modelValue","disabled","label"])]),_:1}),e(w,null,{default:a(()=>[e(_,{modelValue:l(t).preferences.mail_notification_email,"onUpdate:modelValue":v[28]||(v[28]=y=>l(t).preferences.mail_notification_email=y),disabled:!l(t).preferences.mail_notification_enabled,"hide-details":"",label:l(n)("settings.downloads.mailNotification.to")},null,8,["modelValue","disabled","label"])]),_:1}),e(w,null,{default:a(()=>[e(_,{modelValue:l(t).preferences.mail_notification_smtp,"onUpdate:modelValue":v[29]||(v[29]=y=>l(t).preferences.mail_notification_smtp=y),disabled:!l(t).preferences.mail_notification_enabled,"hide-details":"",label:l(n)("settings.downloads.mailNotification.smtpServer")},null,8,["modelValue","disabled","label"])]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.mail_notification_ssl_enabled,"onUpdate:modelValue":v[30]||(v[30]=y=>l(t).preferences.mail_notification_ssl_enabled=y),disabled:!l(t).preferences.mail_notification_enabled,"hide-details":"",label:l(n)("settings.downloads.mailNotification.sslEnabled")},null,8,["modelValue","disabled","label"])]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.mail_notification_auth_enabled,"onUpdate:modelValue":v[31]||(v[31]=y=>l(t).preferences.mail_notification_auth_enabled=y),disabled:!l(t).preferences.mail_notification_enabled,"hide-details":"",label:l(n)("settings.downloads.mailNotification.authEnabled")},null,8,["modelValue","disabled","label"]),e(T,null,{default:a(()=>[e(o,null,{default:a(()=>[e(_,{modelValue:l(t).preferences.mail_notification_username,"onUpdate:modelValue":v[32]||(v[32]=y=>l(t).preferences.mail_notification_username=y),disabled:!l(t).preferences.mail_notification_enabled||!l(t).preferences.mail_notification_auth_enabled,"hide-details":"",label:l(n)("settings.downloads.mailNotification.username")},null,8,["modelValue","disabled","label"]),e(_,{modelValue:l(t).preferences.mail_notification_password,"onUpdate:modelValue":v[33]||(v[33]=y=>l(t).preferences.mail_notification_password=y),disabled:!l(t).preferences.mail_notification_enabled||!l(t).preferences.mail_notification_auth_enabled,"hide-details":"",label:l(n)("settings.downloads.mailNotification.password"),type:r.value?"text":"password","append-icon":!l(t).preferences.mail_notification_enabled||!l(t).preferences.mail_notification_auth_enabled?"":r.value?"mdi-eye":"mdi-eye-off","onClick:append":v[34]||(v[34]=y=>r.value=!r.value)},null,8,["modelValue","disabled","label","type","append-icon"])]),_:1})]),_:1})]),_:1}),e($),e(D,null,{default:a(()=>[V(b(l(n)("settings.downloads.runExternalProgram.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",md:"6"},{default:a(()=>[e(U,{modelValue:l(t).preferences.autorun_on_torrent_added_enabled,"onUpdate:modelValue":v[35]||(v[35]=y=>l(t).preferences.autorun_on_torrent_added_enabled=y),"hide-details":"",label:l(n)("settings.downloads.runExternalProgram.onAddedEnabled")},null,8,["modelValue","label"]),e(_,{modelValue:l(t).preferences.autorun_on_torrent_added_program,"onUpdate:modelValue":v[36]||(v[36]=y=>l(t).preferences.autorun_on_torrent_added_program=y),disabled:!l(t).preferences.autorun_on_torrent_added_enabled,"hide-details":"",label:l(n)("settings.downloads.runExternalProgram.onAddedLabel")},null,8,["modelValue","disabled","label"]),e(U,{modelValue:l(t).preferences.autorun_enabled,"onUpdate:modelValue":v[37]||(v[37]=y=>l(t).preferences.autorun_enabled=y),"hide-details":"",label:l(n)("settings.downloads.runExternalProgram.onFinishedEnabled")},null,8,["modelValue","label"]),e(_,{modelValue:l(t).preferences.autorun_program,"onUpdate:modelValue":v[38]||(v[38]=y=>l(t).preferences.autorun_program=y),disabled:!l(t).preferences.autorun_enabled,"hide-details":"",label:l(n)("settings.downloads.runExternalProgram.onFinishedLabel")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",md:"6"},{default:a(()=>[e(Z,{elevation:"2",variant:"outlined"},{default:a(()=>[e(ue,null,{default:a(()=>[V(b(l(n)("settings.downloads.runExternalProgram.supportParamTitle")),1)]),_:1}),e(le,null,{default:a(()=>[S("ul",$l,[S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamN")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamL")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamG")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamF")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamR")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamD")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamC")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamZ")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamT")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamI")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamJ")),1),S("li",null,b(l(n)("settings.downloads.runExternalProgram.supportParamK")),1)]),S("h5",null,b(l(n)("settings.downloads.runExternalProgram.tip")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Dl=N({__name:"RssFeedDialog",props:{guid:{},initialFeed:{}},setup(L){const n=L,{isOpened:t}=Te(n.guid),h=Se(),u=P(),c=P(!1),p=We({name:"",url:""});async function f(){n.initialFeed?await h.editFeed(n.initialFeed.name,p.name):await h.createFeed(p.name,p.url),await h.fetchFeeds(),d()}const d=()=>{t.value=!1};return J(()=>{n.initialFeed&&(p.name=n.initialFeed.name,p.url=n.initialFeed.url)}),(r,g)=>(C(),A(fe,{modelValue:l(t),"onUpdate:modelValue":g[4]||(g[4]=k=>Ee(t)?t.value=k:null)},{default:a(()=>[e(Z,null,{default:a(()=>[e(ue,null,{default:a(()=>[V(b(r.$t(`dialogs.rss.feed.title.${r.initialFeed?"edit":"create"}`)),1)]),_:1}),e(le,null,{default:a(()=>[e(l(Ce),{modelValue:c.value,"onUpdate:modelValue":g[2]||(g[2]=k=>c.value=k),ref_key:"form",ref:u,onSubmit:g[3]||(g[3]=_e(()=>{},["prevent"]))},{default:a(()=>[e(_,{modelValue:p.name,"onUpdate:modelValue":g[0]||(g[0]=k=>p.name=k),label:r.$t("dialogs.rss.feed.name")},null,8,["modelValue","label"]),e(_,{modelValue:p.url,"onUpdate:modelValue":g[1]||(g[1]=k=>p.url=k),disabled:!!r.initialFeed,label:r.$t("dialogs.rss.feed.url")},null,8,["modelValue","disabled","label"])]),_:1},8,["modelValue"])]),_:1}),e(be,null,{default:a(()=>[e(j),e(R,{color:"error",onClick:d},{default:a(()=>[V(b(r.$t("common.cancel")),1)]),_:1}),e(R,{color:"accent",onClick:f},{default:a(()=>[V(b(r.$t("common.save")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Fl={class:"pl-4"},Il=N({__name:"Feeds",setup(L){const n=Pe(),t=Se(),h=P(!1),u=P("");async function c(g,k=!0){await t.refreshFeed(g.name),k&&await d()}async function p(g){await t.deleteFeed(g.name),await d()}async function f(){t.feeds.forEach(g=>c(g,!1)),await d()}async function d(){h.value||(h.value=!0,await t.fetchFeeds(),h.value=!1)}function r(g){u.value=n.createDialog(Dl,{initialFeed:g})}return J(()=>{d(),el(d,5e3)}),X(()=>n.isDialogOpened(u.value),g=>{g||d()}),(g,k)=>(C(),q(Q,null,[e(T,{class:"mt-2"},{default:a(()=>[(C(!0),q(Q,null,ae(l(t).feeds,x=>(C(),A(o,{cols:"12",sm:"6",lg:"3"},{default:a(()=>[e(xe,{rounded:"xl",class:"d-flex align-center"},{default:a(()=>[S("div",Fl,b(x.name),1),e(j),S("div",null,[e(R,{icon:"",variant:"plain",onClick:i=>c(x)},{default:a(()=>[x.hasError?(C(),A(te,{key:0},{default:a(()=>[V("mdi-sync-alert")]),_:1})):x.isLoading?(C(),A(te,{key:1},{default:a(()=>[V("mdi-cloud-sync")]),_:1})):(C(),A(te,{key:2},{default:a(()=>[V("mdi-sync")]),_:1}))]),_:2},1032,["onClick"]),e(R,{icon:"",variant:"plain",density:"compact",onClick:i=>r(x)},{default:a(()=>[e(te,null,{default:a(()=>[V("mdi-pencil")]),_:1})]),_:2},1032,["onClick"]),e(R,{icon:"mdi-delete",color:"red",variant:"plain",onClick:i=>p(x)},null,8,["onClick"])])]),_:2},1024)]),_:2},1024))),256)),l(t).feeds.length===0?(C(),A(o,{key:0,cols:"12"},{default:a(()=>[e(Z,null,{default:a(()=>[e(le,null,{default:a(()=>[V(b(g.$t("settings.rss.feeds.noFeeds")),1)]),_:1})]),_:1})]),_:1})):ne("",!0)]),_:1}),e(T,null,{default:a(()=>[e(o,{cols:"6",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{color:"accent",onClick:k[0]||(k[0]=x=>r())},{default:a(()=>[V(b(g.$t("settings.rss.feeds.createNew")),1)]),_:1})]),_:1}),e(o,{cols:"6",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{color:"accent",loading:h.value,disabled:l(t).feeds.length===0,text:g.$t("settings.rss.feeds.refreshAll"),onClick:f},null,8,["loading","disabled","text"])]),_:1})]),_:1})],64))}}),Rl=N({__name:"General",setup(L){const n=se(),t=we();return(h,u)=>(C(),A(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(h.$t("settings.rss.general.reader.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(n).preferences.rss_processing_enabled,"onUpdate:modelValue":u[0]||(u[0]=c=>l(n).preferences.rss_processing_enabled=c),"hide-details":"",label:h.$t("settings.rss.general.reader.enableProcessing")},null,8,["modelValue","label"]),e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(n).preferences.rss_refresh_interval,"onUpdate:modelValue":u[1]||(u[1]=c=>l(n).preferences.rss_refresh_interval=c),type:"number","hide-details":"",suffix:h.$t("units.minutes"),label:h.$t("settings.rss.general.reader.feedsRefreshInterval")},null,8,["modelValue","suffix","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(n).preferences.rss_max_articles_per_feed,"onUpdate:modelValue":u[2]||(u[2]=c=>l(n).preferences.rss_max_articles_per_feed=c),type:"number",label:h.$t("settings.rss.general.reader.maximumArticlesPerFeed")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e($),e(D,null,{default:a(()=>[V(b(h.$t("settings.rss.general.autoDownloader.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(n).preferences.rss_auto_downloading_enabled,"onUpdate:modelValue":u[3]||(u[3]=c=>l(n).preferences.rss_auto_downloading_enabled=c),"hide-details":"",class:"ma-0 pa-0",label:h.$t("settings.rss.general.autoDownloader.enable")},null,8,["modelValue","label"])]),_:1}),e($),e(D,null,{default:a(()=>[V(b(h.$t("settings.rss.general.smartEpisodeFilter.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(n).preferences.rss_download_repack_proper_episodes,"onUpdate:modelValue":u[4]||(u[4]=c=>l(n).preferences.rss_download_repack_proper_episodes=c),"hide-details":"",class:"ma-0 pa-0",label:h.$t("settings.rss.general.smartEpisodeFilter.downloadEpisodes")},null,8,["modelValue","label"]),e(ie,{modelValue:l(n).preferences.rss_smart_episode_filters,"onUpdate:modelValue":u[5]||(u[5]=c=>l(n).preferences.rss_smart_episode_filters=c),outlined:"","auto-grow":"",clearable:"","persistent-hint":"",hint:h.$t("settings.rss.general.smartEpisodeFilter.filtersHint"),label:h.$t("settings.rss.general.smartEpisodeFilter.filters")},null,8,["modelValue","hint","label"])]),_:1}),e($),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).useIdForRssLinks,"onUpdate:modelValue":u[6]||(u[6]=c=>l(t).useIdForRssLinks=c),"hide-details":"",label:h.$t("settings.rss.general.useIdForRssLinks")},null,8,["modelValue","label"])]),_:1})]),_:1}))}}),Al={class:"v-card-title pa-0"},Ol=N({__name:"RssRuleDialog",props:{guid:{},initialRule:{}},setup(L){const n=L,{isOpened:t}=Te(n.guid),{t:h}=K(),u=$e(),c=Se(),p=P(),f=P(!1),d=We({addPaused:null,affectedFeeds:[],assignedCategory:"",enabled:!0,episodeFilter:"",ignoreDays:0,lastMatch:"",mustContain:"",mustNotContain:"",name:"",savePath:"",smartFilter:!1,torrentContentLayout:null,useRegex:!1}),r=P(""),g=P([]),k=[{title:h("common.useGlobalSettings"),value:null},{title:h("constants.addPaused.always"),value:!0},{title:h("constants.addPaused.never"),value:!1}],x=[{title:h("common.useGlobalSettings"),value:null},{title:h("constants.contentLayout.original"),value:pe.ORIGINAL},{title:h("constants.contentLayout.subfolder"),value:pe.SUBFOLDER},{title:h("constants.contentLayout.nosubfolder"),value:pe.NO_SUBFOLDER}],i=Y(()=>[{title:h("common.none"),value:""},...u.categories.map(F=>({title:F.name,value:F.name}))]),s=Y(()=>{if(d.lastMatch==="")return h("dialogs.rss.rule.lastMatch.unknownValue").toString();const F=new Date().getTime()-new Date(d.lastMatch).getTime();return h("dialogs.rss.rule.lastMatch.knownValue",Math.floor(F/(1e3*60*60*24)).toString())}),m=Y(()=>!!(n.initialRule&&n.initialRule.name));async function O(){if(r.value==="")return;const F=[],I=await c.fetchMatchingArticles(r.value);for(const E in I){const de=I[E];F.length>0&&F.push({type:"divider"}),F.push({type:"subheader",value:E});for(const z in de){const v=de[z];F.push({type:"item",value:v})}}g.value=F}async function B(){f.value&&((m.value||r.value!=="")&&r.value!==d.name&&await c.renameRule(r.value,d.name),await c.setRule(d.name,d),r.value=d.name,await c.fetchRules(),await O())}async function G(){d.affectedFeeds=[]}async function De(){d.affectedFeeds=c.feeds.map(F=>F.url)}const Ue=()=>{t.value=!1};return J(async()=>{await u.fetchCategories(),await c.fetchRules(),m.value?(r.value=n.initialRule.name,Object.assign(d,n.initialRule)):p.value?.reset(),await O()}),(F,I)=>(C(),A(fe,{modelValue:l(t),"onUpdate:modelValue":I[15]||(I[15]=E=>Ee(t)?t.value=E:null)},{default:a(()=>[e(Z,null,{default:a(()=>[e(ue,null,{default:a(()=>[e(Je,{color:"transparent",title:F.$t(`dialogs.rss.rule.title.${F.initialRule?"edit":"create"}`)},{default:a(()=>[e(R,{icon:"mdi-close",onClick:Ue})]),_:1},8,["title"])]),_:1}),e(le,null,{default:a(()=>[e(l(Ce),{modelValue:f.value,"onUpdate:modelValue":I[13]||(I[13]=E=>f.value=E),ref_key:"form",ref:p,onSubmit:I[14]||(I[14]=_e(()=>{},["prevent"]))},{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6",class:"scrollable-col"},{default:a(()=>[e(_,{modelValue:d.name,"onUpdate:modelValue":I[0]||(I[0]=E=>d.name=E),autofocus:"",required:"",label:F.$t("dialogs.rss.rule.name")},null,8,["modelValue","label"]),e($),e(U,{modelValue:d.useRegex,"onUpdate:modelValue":I[1]||(I[1]=E=>d.useRegex=E),"hide-details":"",label:F.$t("dialogs.rss.rule.useRegex")},null,8,["modelValue","label"]),e(_,{modelValue:d.mustContain,"onUpdate:modelValue":I[2]||(I[2]=E=>d.mustContain=E),label:F.$t("dialogs.rss.rule.mustContain")},null,8,["modelValue","label"]),e(_,{modelValue:d.mustNotContain,"onUpdate:modelValue":I[3]||(I[3]=E=>d.mustNotContain=E),label:F.$t("dialogs.rss.rule.mustNotContain")},null,8,["modelValue","label"]),e(U,{modelValue:d.smartFilter,"onUpdate:modelValue":I[4]||(I[4]=E=>d.smartFilter=E),"hide-details":"",label:F.$t("dialogs.rss.rule.smartFilter")},null,8,["modelValue","label"]),e(_,{modelValue:d.episodeFilter,"onUpdate:modelValue":I[5]||(I[5]=E=>d.episodeFilter=E),placeholder:F.$t("dialogs.rss.rule.episodeFilterPlaceholder"),label:F.$t("dialogs.rss.rule.episodeFilter")},null,8,["modelValue","placeholder","label"]),e($,{class:"mb-4"}),e(M,{modelValue:d.assignedCategory,"onUpdate:modelValue":I[6]||(I[6]=E=>d.assignedCategory=E),items:i.value,label:F.$t("dialogs.rss.rule.assignedCategory")},null,8,["modelValue","items","label"]),e(_,{modelValue:d.savePath,"onUpdate:modelValue":I[7]||(I[7]=E=>d.savePath=E),placeholder:F.$t("dialogs.rss.rule.savePathPlaceholder"),label:F.$t("dialogs.rss.rule.savePath")},null,8,["modelValue","placeholder","label"]),e(_,{modelValue:d.ignoreDays,"onUpdate:modelValue":I[8]||(I[8]=E=>d.ignoreDays=E),type:"number",hint:F.$t("dialogs.rss.rule.ignoreDaysHint"),label:F.$t("dialogs.rss.rule.ignoreDays")},null,8,["modelValue","hint","label"]),e(_,{modelValue:s.value,"onUpdate:modelValue":I[9]||(I[9]=E=>s.value=E),disabled:"",label:F.$t("dialogs.rss.rule.lastMatch.label")},null,8,["modelValue","label"]),e($),e(M,{modelValue:d.addPaused,"onUpdate:modelValue":I[10]||(I[10]=E=>d.addPaused=E),items:k,label:F.$t("constants.addPaused.title")},null,8,["modelValue","label"]),e(M,{modelValue:d.torrentContentLayout,"onUpdate:modelValue":I[11]||(I[11]=E=>d.torrentContentLayout=E),items:x,label:F.$t("constants.contentLayout.title")},null,8,["modelValue","label"]),e(D,null,{default:a(()=>[V(b(F.$t("dialogs.rss.rule.affectedFeedsSubheader")),1)]),_:1}),e(T,null,{default:a(()=>[e(o,{cols:"6",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{color:"accent",onClick:De},{default:a(()=>[V(b(F.$t("common.selectAll")),1)]),_:1})]),_:1}),e(o,{cols:"6",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{color:"primary",onClick:G},{default:a(()=>[V(b(F.$t("common.selectNone")),1)]),_:1})]),_:1})]),_:1}),(C(!0),q(Q,null,ae(l(c).feeds,E=>(C(),A(U,{modelValue:d.affectedFeeds,"onUpdate:modelValue":I[12]||(I[12]=de=>d.affectedFeeds=de),multiple:"","hide-details":"",label:E.name,value:E.url},null,8,["modelValue","label","value"]))),256))]),_:1}),e($,{vertical:!F.$vuetify.display.mobile},null,8,["vertical"]),e(o,{cols:"12",sm:"6",class:"scrollable-col"},{default:a(()=>[S("div",Al,b(F.$t("dialogs.rss.rule.matchingArticles.title")),1),e(W,null,{default:a(()=>[(C(!0),q(Q,null,ae(g.value,E=>(C(),q(Q,null,[E.type==="divider"?(C(),A($,{key:0})):E.type==="subheader"?(C(),A(D,{key:1,inset:""},{default:a(()=>[V(b(E.value),1)]),_:2},1024)):(C(),A(w,{key:2,class:"mb-3"},{default:a(()=>[V(b(E.value),1)]),_:2},1024))],64))),256)),g.value.length===0?(C(),A(w,{key:0,title:F.$t("dialogs.rss.rule.matchingArticles.noMatch")},null,8,["title"])):ne("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(be,null,{default:a(()=>[e(j),e(R,{color:"error",onClick:Ue},{default:a(()=>[V(b(F.$t("common.close")),1)]),_:1}),e(R,{color:"accent",onClick:B},{default:a(()=>[V(b(F.$t("common.save")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});const Ml=Ge(Ol,[["__scopeId","data-v-8013deca"]]),Ll={class:"pl-4"},Bl=N({__name:"Rules",setup(L){const n=Pe(),t=Se(),h=P(!1),u=P("");async function c(d){await t.deleteRule(d.name),await t.fetchRules()}async function p(){h.value||(h.value=!0,await t.fetchRules(),h.value=!1)}function f(d){u.value=n.createDialog(Ml,{initialRule:d})}return J(()=>{p(),el(p,5e3)}),X(()=>n.isDialogOpened(u.value),d=>{d||p()}),(d,r)=>(C(),q(Q,null,[e(T,{class:"mt-2"},{default:a(()=>[(C(!0),q(Q,null,ae(l(t).rules,g=>(C(),A(o,{cols:"12",sm:"6",lg:"3"},{default:a(()=>[e(xe,{rounded:"xl",class:"d-flex align-center"},{default:a(()=>[S("div",Ll,b(g.name),1),e(j),S("div",null,[e(R,{icon:"mdi-pencil",variant:"plain",density:"compact",onClick:k=>f(g)},null,8,["onClick"]),e(R,{icon:"mdi-delete",color:"red",variant:"plain",onClick:k=>c(g)},null,8,["onClick"])])]),_:2},1024)]),_:2},1024))),256)),l(t).rules.length===0?(C(),A(o,{key:0,cols:"12"},{default:a(()=>[e(Z,null,{default:a(()=>[e(le,null,{default:a(()=>[V(b(d.$t("settings.rss.rules.noRules")),1)]),_:1})]),_:1})]),_:1})):ne("",!0)]),_:1}),e(T,null,{default:a(()=>[e(o,{cols:"12",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{color:"accent",onClick:r[0]||(r[0]=g=>f())},{default:a(()=>[V(b(d.$t("settings.rss.rules.createNew")),1)]),_:1})]),_:1})]),_:1})],64))}}),Nl={class:"font-italic"},ql={class:"font-italic"},zl=N({__name:"Speed",setup(L){const{t:n}=K(),t=se(),h=P([{title:n("constants.scheduler.everyDay"),value:ee.EVERY_DAY},{title:n("constants.scheduler.everyWeekday"),value:ee.EVERY_WEEKDAY},{title:n("constants.scheduler.everyWeekend"),value:ee.EVERY_WEEKEND},{title:n("constants.scheduler.everyMonday"),value:ee.EVERY_MONDAY},{title:n("constants.scheduler.everyTuesday"),value:ee.EVERY_TUESDAY},{title:n("constants.scheduler.everyWednesday"),value:ee.EVERY_WEDNESDAY},{title:n("constants.scheduler.everyThursday"),value:ee.EVERY_THURSDAY},{title:n("constants.scheduler.everyFriday"),value:ee.EVERY_FRIDAY},{title:n("constants.scheduler.everySaturday"),value:ee.EVERY_SATURDAY},{title:n("constants.scheduler.everySunday"),value:ee.EVERY_SUNDAY}]),u=Y({get:()=>t.preferences.up_limit/1024,set:d=>t.preferences.up_limit=d*1024}),c=Y({get:()=>t.preferences.dl_limit/1024,set:d=>t.preferences.dl_limit=d*1024}),p=Y({get:()=>t.preferences.alt_up_limit/1024,set:d=>t.preferences.alt_up_limit=d*1024}),f=Y({get:()=>t.preferences.alt_dl_limit/1024,set:d=>t.preferences.alt_dl_limit=d*1024});return(d,r)=>(C(),A(W,null,{default:a(()=>[e(w,null,{default:a(()=>[e(T,{class:ze(d.$vuetify.display.mobile?"flex-column":"flex-row")},{default:a(()=>[e(o,{cols:"12",sm:"6",class:"pa-0"},{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.speed.subheader.global")),1)]),_:1}),e(T,{class:"mx-1"},{default:a(()=>[e(o,{cols:"12",md:"6"},{default:a(()=>[e(_,{modelValue:u.value,"onUpdate:modelValue":r[0]||(r[0]=g=>u.value=g),"hide-details":"",suffix:"kiB/s",label:l(n)("settings.speed.upload")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"6"},{default:a(()=>[e(_,{modelValue:c.value,"onUpdate:modelValue":r[1]||(r[1]=g=>c.value=g),"hide-details":"",suffix:"kiB/s",label:l(n)("settings.speed.download")},null,8,["modelValue","label"])]),_:1})]),_:1}),e(w,null,{default:a(()=>[S("h5",Nl,b(l(n)("settings.speed.tip")),1)]),_:1})]),_:1}),e($,{vertical:!d.$vuetify.display.mobile},null,8,["vertical"]),e(o,{cols:"12",sm:"6",class:"pa-0"},{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.speed.subheader.alternative")),1)]),_:1}),e(T,{class:"mx-1"},{default:a(()=>[e(o,{cols:"12",md:"6"},{default:a(()=>[e(_,{modelValue:p.value,"onUpdate:modelValue":r[2]||(r[2]=g=>p.value=g),"hide-details":"",suffix:"kiB/s",label:l(n)("settings.speed.upload")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"6"},{default:a(()=>[e(_,{modelValue:f.value,"onUpdate:modelValue":r[3]||(r[3]=g=>f.value=g),"hide-details":"",suffix:"kiB/s",label:l(n)("settings.speed.download")},null,8,["modelValue","label"])]),_:1})]),_:1}),e(w,null,{default:a(()=>[S("h5",ql,b(l(n)("settings.speed.tip")),1)]),_:1})]),_:1})]),_:1},8,["class"])]),_:1}),e($,{class:"mt-2"}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.scheduler_enabled,"onUpdate:modelValue":r[4]||(r[4]=g=>l(t).preferences.scheduler_enabled=g),"hide-details":"",label:l(n)("settings.speed.scheduler.subheader")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(T,{class:"align-center"},{default:a(()=>[e(o,{cols:"4",md:"2"},{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.speed.scheduler.from")),1)]),_:1})]),_:1}),e(o,{cols:"4",md:"2"},{default:a(()=>[e(_,{modelValue:l(t).preferences.schedule_from_hour,"onUpdate:modelValue":r[5]||(r[5]=g=>l(t).preferences.schedule_from_hour=g),disabled:!l(t).preferences.scheduler_enabled,type:"number"},null,8,["modelValue","disabled"])]),_:1}),e(o,{cols:"4",md:"2"},{default:a(()=>[e(_,{modelValue:l(t).preferences.schedule_from_min,"onUpdate:modelValue":r[6]||(r[6]=g=>l(t).preferences.schedule_from_min=g),disabled:!l(t).preferences.scheduler_enabled,type:"number"},null,8,["modelValue","disabled"])]),_:1}),e(j),e(o,{cols:"4",md:"2"},{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.speed.scheduler.to")),1)]),_:1})]),_:1}),e(o,{cols:"4",md:"2"},{default:a(()=>[e(_,{modelValue:l(t).preferences.schedule_to_hour,"onUpdate:modelValue":r[7]||(r[7]=g=>l(t).preferences.schedule_to_hour=g),disabled:!l(t).preferences.scheduler_enabled,type:"number"},null,8,["modelValue","disabled"])]),_:1}),e(o,{cols:"4",md:"2"},{default:a(()=>[e(_,{modelValue:l(t).preferences.schedule_to_min,"onUpdate:modelValue":r[8]||(r[8]=g=>l(t).preferences.schedule_to_min=g),disabled:!l(t).preferences.scheduler_enabled,type:"number"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(M,{modelValue:l(t).preferences.scheduler_days,"onUpdate:modelValue":r[9]||(r[9]=g=>l(t).preferences.scheduler_days=g),disabled:!l(t).preferences.scheduler_enabled,"hide-details":"",items:h.value,label:l(n)("settings.speed.scheduler.when")},null,8,["modelValue","disabled","items","label"])]),_:1}),e($,{class:"mt-3"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.speed.subheader.settings")),1)]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.limit_utp_rate,"onUpdate:modelValue":r[10]||(r[10]=g=>l(t).preferences.limit_utp_rate=g),"hide-details":"",label:l(n)("settings.speed.settings.applyToUtp")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.limit_tcp_overhead,"onUpdate:modelValue":r[11]||(r[11]=g=>l(t).preferences.limit_tcp_overhead=g),"hide-details":"",label:l(n)("settings.speed.settings.applyToTransportOverhead")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.limit_lan_peers,"onUpdate:modelValue":r[12]||(r[12]=g=>l(t).preferences.limit_lan_peers=g),"hide-details":"",label:l(n)("settings.speed.settings.applyToPeersOnLan")},null,8,["modelValue","label"])]),_:1})]),_:1}))}}),Hl={key:0,class:"text-warning"},Yl=N({__name:"CategoryFormDialog",props:{guid:{},initialCategory:{}},setup(L){const n=L,{t}=K(),h=$e(),{isOpened:u}=Te(n.guid),c=P(),p=P(!1),f=[k=>!!k||t("dialogs.category.nameRequired")],d=We({name:"",savePath:""});async function r(){p.value&&(n.initialCategory?await h.editCategory(d,n.initialCategory.name===d.name?void 0:n.initialCategory.name):await h.createCategory(d),g())}const g=()=>{u.value=!1};return J(()=>{d.name=n.initialCategory?.name||"",d.savePath=n.initialCategory?.savePath||""}),(k,x)=>(C(),A(fe,{modelValue:l(u),"onUpdate:modelValue":x[4]||(x[4]=i=>Ee(u)?u.value=i:null)},{default:a(()=>[e(Z,null,{default:a(()=>[e(ue,null,{default:a(()=>[V(b(k.$t(`dialogs.category.title.${k.initialCategory?"edit":"create"}`)),1)]),_:1}),e(le,null,{default:a(()=>[e(l(Ce),{modelValue:p.value,"onUpdate:modelValue":x[2]||(x[2]=i=>p.value=i),ref_key:"form",ref:c,onSubmit:x[3]||(x[3]=_e(()=>{},["prevent"])),onKeydown:tl(_e(r,["prevent"]),["enter"])},{default:a(()=>[k.initialCategory?(C(),A(_,{key:0,"model-value":k.initialCategory.name,disabled:"",label:k.$t("dialogs.category.oldName")},null,8,["model-value","label"])):ne("",!0),e(_,{modelValue:d.name,"onUpdate:modelValue":x[0]||(x[0]=i=>d.name=i),rules:f,autofocus:!k.initialCategory,label:k.$t("dialogs.category.name")},null,8,["modelValue","autofocus","label"]),e(_,{modelValue:d.savePath,"onUpdate:modelValue":x[1]||(x[1]=i=>d.savePath=i),autofocus:!!k.initialCategory,label:k.$t("dialogs.category.savePath")},null,8,["modelValue","autofocus","label"]),e(ll,null,{default:a(()=>[k.initialCategory&&k.initialCategory.name!==d.name?(C(),q("div",Hl,[e(te,null,{default:a(()=>[V("mdi-alert")]),_:1}),V(" "+b(k.$t("dialogs.category.warnEdit")),1)])):ne("",!0)]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1}),e(be,null,{default:a(()=>[e(j),e(R,{color:"error",onClick:g},{default:a(()=>[V(b(k.$t("common.cancel")),1)]),_:1}),e(R,{color:"accent",disabled:!p.value,onClick:r},{default:a(()=>[V(b(k.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Gl={key:0,class:"text-warning"},Wl=N({__name:"TagFormDialog",props:{guid:{},initialTag:{}},setup(L){const n=L,{isOpened:t}=Te(n.guid),{t:h}=K(),u=$e(),c=P(),p=P(!1),f=P([k=>!!k||h("dialogs.tag.required"),k=>!n.initialTag||!!n.initialTag&&!k.includes(",")||h("dialogs.tag.comma")]),d=P("");async function r(){p.value&&(n.initialTag?await u.editTag(n.initialTag,d.value):await u.createTags(d.value.split(",")),g())}const g=()=>{t.value=!1};return J(()=>{d.value=n.initialTag||""}),(k,x)=>(C(),A(fe,{modelValue:l(t),"onUpdate:modelValue":x[3]||(x[3]=i=>Ee(t)?t.value=i:null)},{default:a(()=>[e(Z,null,{default:a(()=>[e(ue,null,{default:a(()=>[V(b(k.$t(`dialogs.tag.title.${k.initialTag?"rename":"create"}`)),1)]),_:1}),e(le,null,{default:a(()=>[e(l(Ce),{modelValue:p.value,"onUpdate:modelValue":x[1]||(x[1]=i=>p.value=i),ref_key:"form",ref:c,onSubmit:x[2]||(x[2]=_e(()=>{},["prevent"])),onKeydown:tl(_e(r,["prevent"]),["enter"])},{default:a(()=>[k.initialTag?(C(),A(_,{key:0,"model-value":k.initialTag,disabled:"",label:k.$t("dialogs.tag.oldName")},null,8,["model-value","label"])):ne("",!0),e(_,{modelValue:d.value,"onUpdate:modelValue":x[0]||(x[0]=i=>d.value=i),rules:f.value,autofocus:"",hint:k.$t("dialogs.tag.hint"),label:k.$t("dialogs.tag.name")},null,8,["modelValue","rules","hint","label"]),e(ll,null,{default:a(()=>[k.initialTag&&k.initialTag!==d.value?(C(),q("div",Gl,[e(te,null,{default:a(()=>[V("mdi-alert")]),_:1}),V(" "+b(k.$t("dialogs.tag.warnEdit")),1)])):ne("",!0)]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1}),e(be,null,{default:a(()=>[e(j),e(R,{color:"error",onClick:g},{default:a(()=>[V(b(k.$t("common.cancel")),1)]),_:1}),e(R,{color:"accent",disabled:!p.value,onClick:r},{default:a(()=>[V(b(k.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),jl={class:"pl-4 py-1 wrap-anywhere"},Ql={class:"d-flex"},Kl={class:"pl-4 py-1 wrap-anywhere"},Xl={class:"d-flex"},Zl=N({__name:"TagsAndCategories",setup(L){const n=Pe(),t=$e(),h=P(""),u=P("");async function c(r){await t.deleteTags([r]),await t.fetchTags()}async function p(r){await t.deleteCategories([r.name]),await t.fetchCategories()}function f(r){h.value=n.createDialog(Wl,{initialTag:r})}function d(r){u.value=n.createDialog(Yl,{initialCategory:r})}return J(async()=>{await t.fetchCategories(),await t.fetchTags()}),X(()=>n.isDialogOpened(h.value),r=>{r||t.fetchTags()}),X(()=>n.isDialogOpened(u.value),r=>{r||t.fetchCategories()}),(r,g)=>(C(),A(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(D,{class:"ml-2"},{default:a(()=>[V(b(r.$t("settings.tagsAndCategories.tagsSubheader")),1)]),_:1}),(C(!0),q(Q,null,ae(l(t).tags,k=>(C(),A(xe,{rounded:"xl",class:"d-flex align-center gap"},{default:a(()=>[S("div",jl,b(k),1),e(j),S("div",Ql,[e(R,{icon:"mdi-pencil",variant:"plain",onClick:x=>f(k)},null,8,["onClick"]),e(R,{icon:"mdi-delete",color:"red",variant:"plain",onClick:x=>c(k)},null,8,["onClick"])])]),_:2},1024))),256)),l(t).tags.length===0?(C(),A(Z,{key:0},{default:a(()=>[e(le,null,{default:a(()=>[V(b(r.$t("settings.tagsAndCategories.noTags")),1)]),_:1})]),_:1})):ne("",!0),e(R,{color:"accent",block:"",onClick:g[0]||(g[0]=k=>f())},{default:a(()=>[V(b(r.$t("settings.tagsAndCategories.createNewTag")),1)]),_:1})]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(D,{class:"ml-2"},{default:a(()=>[V(b(r.$t("settings.tagsAndCategories.categoriesSubheader")),1)]),_:1}),(C(!0),q(Q,null,ae(l(t).categories,k=>(C(),A(xe,{rounded:"xl",class:"d-flex align-center gap"},{default:a(()=>[S("div",Kl,b(k.name),1),e(j),S("div",Xl,[e(R,{icon:"mdi-pencil",variant:"plain",onClick:x=>d(k)},null,8,["onClick"]),e(R,{icon:"mdi-delete",color:"red",variant:"plain",onClick:x=>p(k)},null,8,["onClick"])])]),_:2},1024))),256)),l(t).categories.length===0?(C(),A(Z,{key:0},{default:a(()=>[e(le,null,{default:a(()=>[V(b(r.$t("settings.tagsAndCategories.noCategories")),1)]),_:1})]),_:1})):ne("",!0),e(R,{color:"accent",block:"",onClick:g[1]||(g[1]=k=>d())},{default:a(()=>[V(b(r.$t("settings.tagsAndCategories.createNewCategory")),1)]),_:1})]),_:1})]),_:1}))}});const Jl=Ge(Zl,[["__scopeId","data-v-1eb1c7d2"]]),et={key:0},lt={key:1,target:"_blank",href:"https://github.com/WDaan/VueTorrent/"},tt=["href"],at=["href"],nt=N({__name:"General",setup(L){const{t:n}=K(),t=ol(),h=dl(),u=we(),c=[{title:n("constants.titleOptions.default"),value:ge.DEFAULT},{title:n("constants.titleOptions.global_speed"),value:ge.GLOBAL_SPEED},{title:n("constants.titleOptions.first_torrent_speed"),value:ge.FIRST_TORRENT_STATUS},{title:n("constants.titleOptions.custom"),value:ge.CUSTOM}],p=P([{title:n("settings.vuetorrent.general.paginationSize.infinite_scroll"),value:-1},5,15,30,50,100,250,500]),f=Y({get(){return u.matchSystemTheme?"auto":u.darkMode?"dark":"light"},set(x){x==="auto"?u.matchSystemTheme=!0:(u.matchSystemTheme=!1,u.darkMode=x==="dark")}}),d=[{title:n("constants.theme.auto"),value:"auto"},{title:n("constants.theme.light"),value:"light"},{title:n("constants.theme.dark"),value:"dark"}],r=Y(()=>"2.4.0"),g=()=>{window.localStorage.clear(),window.sessionStorage.clear(),location.reload()},k=()=>{if(typeof navigator.registerProtocolHandler!="function"){He.error(n("toast.magnet_handler.not_supported"));return}const x=location.href.replace("/settings","/magnet/%s");navigator.registerProtocolHandler("magnet",x),He.success(n("toast.magnet_handler.registered"))};return J(()=>{t.fetchQbitVersion()}),(x,i)=>(C(),A(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.vuetorrent.general.tip")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).showCurrentSpeed,"onUpdate:modelValue":i[0]||(i[0]=s=>l(u).showCurrentSpeed=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.showCurrentSpeed")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).showSpeedGraph,"onUpdate:modelValue":i[1]||(i[1]=s=>l(u).showSpeedGraph=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.showSpeedGraph")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).showAlltimeStat,"onUpdate:modelValue":i[2]||(i[2]=s=>l(u).showAlltimeStat=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.showAlltimeStat")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).showSessionStat,"onUpdate:modelValue":i[3]||(i[3]=s=>l(u).showSessionStat=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.showSessionStat")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).showFreeSpace,"onUpdate:modelValue":i[4]||(i[4]=s=>l(u).showFreeSpace=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.showFreeSpace")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).showTrackerFilter,"onUpdate:modelValue":i[5]||(i[5]=s=>l(u).showTrackerFilter=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.showTrackerFilter")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).isDrawerRight,"onUpdate:modelValue":i[6]||(i[6]=s=>l(u).isDrawerRight=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.isDrawerRight")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).isPaginationOnTop,"onUpdate:modelValue":i[7]||(i[7]=s=>l(u).isPaginationOnTop=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.isPaginationOnTop")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).hideChipIfUnset,"onUpdate:modelValue":i[8]||(i[8]=s=>l(u).hideChipIfUnset=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.hideChipIfUnset")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).openSideBarOnStart,"onUpdate:modelValue":i[9]||(i[9]=s=>l(u).openSideBarOnStart=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.openSideBarOnStart")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).isShutdownButtonVisible,"onUpdate:modelValue":i[10]||(i[10]=s=>l(u).isShutdownButtonVisible=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.isShutdownButtonVisible")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).useBinarySize,"onUpdate:modelValue":i[11]||(i[11]=s=>l(u).useBinarySize=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.useBinarySize")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(U,{modelValue:l(u).useBitSpeed,"onUpdate:modelValue":i[12]||(i[12]=s=>l(u).useBitSpeed=s),"hide-details":"",density:"compact",label:l(n)("settings.vuetorrent.general.useBitSpeed")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",md:"4"},{default:a(()=>[e(_,{modelValue:l(u).refreshInterval,"onUpdate:modelValue":i[13]||(i[13]=s=>l(u).refreshInterval=s),type:"number","hide-details":"",suffix:"ms",label:l(n)("settings.vuetorrent.general.refreshInterval")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"4"},{default:a(()=>[e(_,{modelValue:l(u).fileContentInterval,"onUpdate:modelValue":i[14]||(i[14]=s=>l(u).fileContentInterval=s),type:"number","hide-details":"",suffix:"ms",label:l(n)("settings.vuetorrent.general.fileContentInterval")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"4"},{default:a(()=>[e(_,{modelValue:l(h).historySize,"onUpdate:modelValue":i[15]||(i[15]=s=>l(h).historySize=s),type:"number","hide-details":"",label:l(n)("settings.vuetorrent.general.historySize")},null,8,["modelValue","label"])]),_:1})]),_:1}),e(T,null,{default:a(()=>[e(o,{cols:"12",md:"6"},{default:a(()=>[e(_,{modelValue:l(u).canvasRenderThreshold,"onUpdate:modelValue":i[16]||(i[16]=s=>l(u).canvasRenderThreshold=s),type:"number",label:l(n)("settings.vuetorrent.general.canvasRenderThreshold")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"6"},{default:a(()=>[e(_,{modelValue:l(u).canvasRefreshThreshold,"onUpdate:modelValue":i[17]||(i[17]=s=>l(u).canvasRefreshThreshold=s),type:"number",label:l(n)("settings.vuetorrent.general.canvasRefreshThreshold")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6",md:"3"},{default:a(()=>[e(M,{modelValue:l(u).language,"onUpdate:modelValue":i[18]||(i[18]=s=>l(u).language=s),flat:"","hide-details":"",items:l(rl),label:l(n)("settings.vuetorrent.general.language")},null,8,["modelValue","items","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"3"},{default:a(()=>[e(M,{modelValue:l(u).paginationSize,"onUpdate:modelValue":i[19]||(i[19]=s=>l(u).paginationSize=s),flat:"","hide-details":"",items:p.value,label:l(n)("settings.vuetorrent.general.paginationSize.label")},null,8,["modelValue","items","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"3"},{default:a(()=>[e(M,{modelValue:l(u).uiTitleType,"onUpdate:modelValue":i[20]||(i[20]=s=>l(u).uiTitleType=s),flat:"","hide-details":"",items:c,label:l(n)("settings.vuetorrent.general.vueTorrentTitle")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6",md:"3"},{default:a(()=>[e(_,{disabled:l(u).uiTitleType!==l(ge).CUSTOM,modelValue:l(u).uiTitleCustom,"onUpdate:modelValue":i[21]||(i[21]=s=>l(u).uiTitleCustom=s),label:l(n)("settings.vuetorrent.general.customTitle")},null,8,["disabled","modelValue","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",md:"3",class:"d-flex align-center justify-center"},{default:a(()=>[S("h3",null,[V(b(l(n)("settings.vuetorrent.general.currentVersion"))+" ",1),r.value?r.value==="DEV"?(C(),q("a",lt,b(r.value),1)):(C(),q("a",{key:2,target:"_blank",href:`https://github.com/WDaan/VueTorrent/releases/tag/v${r.value}`},b(r.value),9,tt)):(C(),q("span",et,"undefined"))])]),_:1}),e(o,{cols:"12",md:"3",class:"d-flex align-center justify-center"},{default:a(()=>[S("h3",null,[V(b(l(n)("settings.vuetorrent.general.qbittorrentVersion"))+" ",1),S("a",{target:"_blank",href:`https://github.com/qbittorrent/qBittorrent/releases/tag/release-${l(t).version}`},b(l(t).version),9,at)])]),_:1}),e(o,{cols:"12",md:"3"},{default:a(()=>[e(M,{modelValue:f.value,"onUpdate:modelValue":i[22]||(i[22]=s=>f.value=s),items:d,label:l(n)("settings.vuetorrent.general.theme")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",md:"3"},{default:a(()=>[e(_,{modelValue:l(u).dateFormat,"onUpdate:modelValue":i[23]||(i[23]=s=>l(u).dateFormat=s),placeholder:"DD/MM/YYYY, HH:mm:ss",hint:"using Dayjs",label:l(n)("settings.vuetorrent.general.dateFormat")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{color:"primary",onClick:k},{default:a(()=>[V(b(l(n)("settings.vuetorrent.general.registerMagnet")),1)]),_:1})]),_:1}),e(o,{cols:"12",sm:"6",class:"d-flex align-center justify-center"},{default:a(()=>[e(R,{color:"red",onClick:g},{default:a(()=>[V(b(l(n)("settings.vuetorrent.general.resetSettings")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),st={class:"table-row"},ot=N({__name:"DashboardItem",props:{property:{}},emits:["update"],setup(L){return(n,t)=>(C(),q("tr",st,[S("td",null,[e(te,{icon:"mdi-drag-vertical",class:"dnd-handle"})]),S("td",null,[e(R,{density:"compact",icon:n.property.active?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",variant:"flat",onClick:t[0]||(t[0]=h=>n.$emit("update"))},null,8,["icon"])]),S("td",null,b(n.$t(`torrent.properties.${n.property.name}`)),1)]))}});const ye=Ge(ot,[["__scopeId","data-v-63969f1b"]]),dt=N({__name:"List",setup(L){const n=we(),t=Y({get:()=>n.busyTorrentProperties,set:c=>n.updateBusyProperties(c)}),h=Y({get:()=>n.doneTorrentProperties,set:c=>n.updateDoneProperties(c)});function u(c,p){c?n.toggleBusyProperty(p.name):n.toggleDoneProperty(p.name)}return(c,p)=>(C(),A(T,null,{default:a(()=>[e(o,{cols:"12",md:"6"},{default:a(()=>[e(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(c.$t("settings.vuetorrent.torrentCard.list.busyTip")),1)]),_:1}),e(Ve,null,{default:a(()=>[e(l(ve),{modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=f=>t.value=f),"item-key":"name",tag:"tbody",handle:".dnd-handle"},{item:a(({element:f})=>[e(ye,{property:f,onUpdate:d=>u(!0,f)},null,8,["property","onUpdate"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(o,{cols:"12",md:"6"},{default:a(()=>[e(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(c.$t("settings.vuetorrent.torrentCard.list.doneTip")),1)]),_:1}),e(Ve,null,{default:a(()=>[e(l(ve),{modelValue:h.value,"onUpdate:modelValue":p[1]||(p[1]=f=>h.value=f),"item-key":"name",tag:"tbody",handle:".dnd-handle"},{item:a(({element:f})=>[e(ye,{property:f,onUpdate:d=>u(!1,f)},null,8,["property","onUpdate"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}))}}),rt=N({__name:"Grid",setup(L){const n=we(),t=Y({get:()=>n.busyGridProperties,set:c=>n.updateBusyGridProperties(c)}),h=Y({get:()=>n.doneGridProperties,set:c=>n.updateDoneGridProperties(c)});function u(c,p){c?n.toggleBusyGridProperty(p.name):n.toggleDoneGridProperty(p.name)}return(c,p)=>(C(),A(T,null,{default:a(()=>[e(o,{cols:"12",md:"6"},{default:a(()=>[e(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(c.$t("settings.vuetorrent.torrentCard.grid.busyTip")),1)]),_:1}),e(Ve,null,{default:a(()=>[e(l(ve),{modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=f=>t.value=f),"item-key":"name",tag:"tbody",handle:".dnd-handle"},{item:a(({element:f})=>[e(ye,{property:f,onUpdate:d=>u(!0,f)},null,8,["property","onUpdate"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(o,{cols:"12",md:"6"},{default:a(()=>[e(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(c.$t("settings.vuetorrent.torrentCard.grid.doneTip")),1)]),_:1}),e(Ve,null,{default:a(()=>[e(l(ve),{modelValue:h.value,"onUpdate:modelValue":p[1]||(p[1]=f=>h.value=f),"item-key":"name",tag:"tbody",handle:".dnd-handle"},{item:a(({element:f})=>[e(ye,{property:f,onUpdate:d=>u(!1,f)},null,8,["property","onUpdate"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}))}}),it=N({__name:"Table",setup(L){const n=we(),t=Y({get:()=>n.tableProperties,set:u=>n.updateTableProperties(u)});function h(u){n.toggleTableProperty(u.name)}return(u,c)=>(C(),A(T,null,{default:a(()=>[e(o,{cols:"12"},{default:a(()=>[e(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(u.$t("settings.vuetorrent.torrentCard.table.tip")),1)]),_:1}),e(Ve,null,{default:a(()=>[e(l(ve),{modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=p=>t.value=p),"item-key":"name",tag:"tbody",handle:".dnd-handle"},{item:a(({element:p})=>[e(ye,{property:p,onUpdate:f=>h(p)},null,8,["property","onUpdate"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}))}}),ut={class:"d-flex align-center"},mt={href:"https://httpd.apache.org/docs/current/ssl/ssl_faq.html#aboutcerts",target:"_blank"},pt=N({__name:"WebUI",setup(L){const{t:n}=K(),t=se(),h=P("https://www.dyndns.com/account/services/hosts/add.html"),u=[{title:n("settings.webUI.dynDns.providers.dynDns"),value:"https://www.dyndns.com/account/services/hosts/add.html"},{title:n("settings.webUI.dynDns.providers.noIp"),value:"https://www.no-ip.com/services/managed_dns/free_dynamic_dns.html"}],c=P("");function p(){window.open(h.value)}return X(c,f=>{t.preferences.web_ui_password=f===""?void 0:f}),(f,d)=>(C(),A(W,null,{default:a(()=>[e(D,null,{default:a(()=>[V(b(l(n)("settings.webUI.interface.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"9"},{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_address,"onUpdate:modelValue":d[0]||(d[0]=r=>l(t).preferences.web_ui_address=r),"hide-details":"",label:l(n)("settings.webUI.interface.ipAddress")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"3"},{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_port,"onUpdate:modelValue":d[1]||(d[1]=r=>l(t).preferences.web_ui_port=r),"hide-details":"",label:l(n)("settings.webUI.interface.port")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",class:"pt-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.web_ui_upnp,"onUpdate:modelValue":d[2]||(d[2]=r=>l(t).preferences.web_ui_upnp=r),"hide-details":"",label:l(n)("settings.webUI.interface.useUPnP")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12"},{default:a(()=>[S("div",ut,[S("span",null,[e(oe,{modelValue:l(t).preferences.alternative_webui_enabled,"onUpdate:modelValue":d[3]||(d[3]=r=>l(t).preferences.alternative_webui_enabled=r)},null,8,["modelValue"])]),e(_,{modelValue:l(t).preferences.alternative_webui_path,"onUpdate:modelValue":d[4]||(d[4]=r=>l(t).preferences.alternative_webui_path=r),disabled:!l(t).preferences.alternative_webui_enabled,"hide-details":"",label:l(n)("settings.webUI.interface.useAlternativeWebUI")},null,8,["modelValue","disabled","label"])])]),_:1})]),_:1})]),_:1}),e($,{class:"mt-3"}),e(D,null,{default:a(()=>[V(b(l(n)("settings.webUI.authentication.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6"},{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_username,"onUpdate:modelValue":d[5]||(d[5]=r=>l(t).preferences.web_ui_username=r),"hide-details":"",label:l(n)("settings.webUI.authentication.username")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(Ye,{modelValue:c.value,"onUpdate:modelValue":d[6]||(d[6]=r=>c.value=r),autocapitalize:"off","hide-details":"","persistent-placeholder":"",placeholder:l(n)("settings.webUI.authentication.passwordPlaceholder"),label:l(n)("settings.webUI.authentication.password")},null,8,["modelValue","placeholder","label"])]),_:1}),e(o,{cols:"12",class:"py-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.bypass_local_auth,"onUpdate:modelValue":d[7]||(d[7]=r=>l(t).preferences.bypass_local_auth=r),"hide-details":"",label:l(n)("settings.webUI.authentication.bypassLocalhost")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",class:"pt-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.bypass_auth_subnet_whitelist_enabled,"onUpdate:modelValue":d[8]||(d[8]=r=>l(t).preferences.bypass_auth_subnet_whitelist_enabled=r),"hide-details":"",label:l(n)("settings.webUI.authentication.bypassWhitelist")},null,8,["modelValue","label"]),e(ie,{modelValue:l(t).preferences.bypass_auth_subnet_whitelist,"onUpdate:modelValue":d[9]||(d[9]=r=>l(t).preferences.bypass_auth_subnet_whitelist=r),disabled:!l(t).preferences.bypass_auth_subnet_whitelist_enabled,type:"number","hide-details":"",placeholder:f.$t("settings.webUI.authentication.whitelistExamples")},null,8,["modelValue","disabled","placeholder"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_max_auth_fail_count,"onUpdate:modelValue":d[10]||(d[10]=r=>l(t).preferences.web_ui_max_auth_fail_count=r),type:"number","hide-details":"",label:l(n)("settings.webUI.authentication.maxAttempts")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_ban_duration,"onUpdate:modelValue":d[11]||(d[11]=r=>l(t).preferences.web_ui_ban_duration=r),type:"number","persistent-hint":"",hint:l(n)("settings.webUI.authentication.banDurationHint"),label:l(n)("settings.webUI.authentication.banDuration")},null,8,["modelValue","hint","label"])]),_:1}),e(o,{cols:"12",sm:"4"},{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_session_timeout,"onUpdate:modelValue":d[12]||(d[12]=r=>l(t).preferences.web_ui_session_timeout=r),type:"number","persistent-hint":"",hint:l(n)("settings.webUI.authentication.sessionTimeoutHint"),label:l(n)("settings.webUI.authentication.sessionTimeout")},null,8,["modelValue","hint","label"])]),_:1})]),_:1})]),_:1}),e($,{class:"mt-3"}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",class:"pb-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.use_https,"onUpdate:modelValue":d[13]||(d[13]=r=>l(t).preferences.use_https=r),"hide-details":"",label:l(n)("settings.webUI.https.subheader")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",class:"pt-0"},{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_https_cert_path,"onUpdate:modelValue":d[14]||(d[14]=r=>l(t).preferences.web_ui_https_cert_path=r),disabled:!l(t).preferences.use_https,"hide-details":"",label:l(n)("settings.webUI.https.certificate")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_https_key_path,"onUpdate:modelValue":d[15]||(d[15]=r=>l(t).preferences.web_ui_https_key_path=r),disabled:!l(t).preferences.use_https,"hide-details":"",label:l(n)("settings.webUI.https.key")},null,8,["modelValue","disabled","label"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[S("a",mt,b(l(n)("settings.webUI.https.tip")),1)]),_:1}),e($),e(D,null,{default:a(()=>[V(b(l(n)("settings.webUI.security.subheader")),1)]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",class:"py-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.web_ui_clickjacking_protection_enabled,"onUpdate:modelValue":d[16]||(d[16]=r=>l(t).preferences.web_ui_clickjacking_protection_enabled=r),"hide-details":"",density:"compact",label:l(n)("settings.webUI.security.clickjacking")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",class:"py-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.web_ui_csrf_protection_enabled,"onUpdate:modelValue":d[17]||(d[17]=r=>l(t).preferences.web_ui_csrf_protection_enabled=r),"hide-details":"",density:"compact",label:l(n)("settings.webUI.security.csrf")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12",class:"py-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.web_ui_secure_cookie_enabled,"onUpdate:modelValue":d[18]||(d[18]=r=>l(t).preferences.web_ui_secure_cookie_enabled=r),disabled:!l(t).preferences.use_https,"hide-details":"",density:"compact",label:l(n)("settings.webUI.security.secureCookie")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",class:"py-0"},{default:a(()=>[e(U,{modelValue:l(t).preferences.web_ui_host_header_validation_enabled,"onUpdate:modelValue":d[19]||(d[19]=r=>l(t).preferences.web_ui_host_header_validation_enabled=r),"hide-details":"",density:"compact",label:l(n)("settings.webUI.security.hostHeaderValidation")},null,8,["modelValue","label"])]),_:1}),e(o,{cols:"12"},{default:a(()=>[e(ie,{modelValue:l(t).preferences.web_ui_domain_list,"onUpdate:modelValue":d[20]||(d[20]=r=>l(t).preferences.web_ui_domain_list=r),disabled:!l(t).preferences.web_ui_host_header_validation_enabled,"auto-grow":"",clearable:"","persistent-hint":"",hint:l(n)("settings.webUI.security.hostHeaderValidationHint")},null,8,["modelValue","disabled","hint"])]),_:1})]),_:1})]),_:1}),e($),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.web_ui_use_custom_http_headers_enabled,"onUpdate:modelValue":d[21]||(d[21]=r=>l(t).preferences.web_ui_use_custom_http_headers_enabled=r),"hide-details":"",label:l(n)("settings.webUI.customHeaders")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(ie,{modelValue:l(t).preferences.web_ui_custom_http_headers,"onUpdate:modelValue":d[22]||(d[22]=r=>l(t).preferences.web_ui_custom_http_headers=r),disabled:!l(t).preferences.web_ui_use_custom_http_headers_enabled,"auto-grow":"",clearable:"","persistent-hint":"",hint:l(n)("settings.webUI.customHeadersHint"),placeholder:l(n)("settings.webUI.customHeadersPlaceholder")},null,8,["modelValue","disabled","hint","placeholder"])]),_:1}),e($),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.web_ui_reverse_proxy_enabled,"onUpdate:modelValue":d[23]||(d[23]=r=>l(t).preferences.web_ui_reverse_proxy_enabled=r),"hide-details":"",label:l(n)("settings.webUI.reverseProxySupport")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(_,{modelValue:l(t).preferences.web_ui_reverse_proxies_list,"onUpdate:modelValue":d[24]||(d[24]=r=>l(t).preferences.web_ui_reverse_proxies_list=r),disabled:!l(t).preferences.web_ui_reverse_proxy_enabled,clearable:"","persistent-hint":"",hint:l(n)("settings.webUI.proxiesListHint"),label:l(n)("settings.webUI.proxiesList")},null,8,["modelValue","disabled","hint","label"])]),_:1}),e($),e(w,null,{default:a(()=>[e(U,{modelValue:l(t).preferences.dyndns_enabled,"onUpdate:modelValue":d[25]||(d[25]=r=>l(t).preferences.dyndns_enabled=r),"hide-details":"",label:l(n)("settings.webUI.dynDns.subheader")},null,8,["modelValue","label"])]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"8"},{default:a(()=>[e(M,{modelValue:h.value,"onUpdate:modelValue":d[26]||(d[26]=r=>h.value=r),disabled:!l(t).preferences.dyndns_enabled,density:"compact","hide-details":"",items:u},null,8,["modelValue","disabled"])]),_:1}),e(o,{cols:"4"},{default:a(()=>[e(R,{disabled:!l(t).preferences.dyndns_enabled,onClick:p},{default:a(()=>[V(b(f.$t("settings.webUI.dynDns.registerBtn")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(_,{modelValue:l(t).preferences.dyndns_domain,"onUpdate:modelValue":d[27]||(d[27]=r=>l(t).preferences.dyndns_domain=r),disabled:!l(t).preferences.dyndns_enabled,"hide-details":"",label:l(n)("settings.webUI.dynDns.domainName")},null,8,["modelValue","disabled","label"])]),_:1}),e(w,null,{default:a(()=>[e(T,null,{default:a(()=>[e(o,{cols:"12",sm:"6",class:"pb-0"},{default:a(()=>[e(_,{modelValue:l(t).preferences.dyndns_username,"onUpdate:modelValue":d[28]||(d[28]=r=>l(t).preferences.dyndns_username=r),disabled:!l(t).preferences.dyndns_enabled,density:"compact","hide-details":"",label:l(n)("settings.webUI.dynDns.username")},null,8,["modelValue","disabled","label"])]),_:1}),e(o,{cols:"12",sm:"6"},{default:a(()=>[e(Ye,{modelValue:l(t).preferences.dyndns_password,"onUpdate:modelValue":d[29]||(d[29]=r=>l(t).preferences.dyndns_password=r),disabled:!l(t).preferences.dyndns_enabled,density:"compact","hide-details":"",label:l(n)("settings.webUI.dynDns.password"),"hide-icon":!l(t).preferences.dyndns_enabled},null,8,["modelValue","disabled","label","hide-icon"])]),_:1})]),_:1})]),_:1})]),_:1}))}}),ft={class:"pa-3"},bt={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"},_t={class:"d-flex justify-end"},wt=N({__name:"Settings",setup(L){const n=ul(),{t}=K(),h=Pe(),u=se(),c=[{text:t("settings.tabs.vuetorrent.title"),value:"vuetorrent"},{text:t("settings.tabs.behavior"),value:"behavior"},{text:t("settings.tabs.downloads"),value:"downloads"},{text:t("settings.tabs.connection"),value:"connection"},{text:t("settings.tabs.speed"),value:"speed"},{text:t("settings.tabs.bittorrent"),value:"bittorrent"},{text:t("settings.tabs.rss.title"),value:"rss"},{text:t("settings.tabs.webui"),value:"webui"},{text:t("settings.tabs.tagsAndCategories"),value:"tagsAndCategories"},{text:t("settings.tabs.advanced"),value:"advanced"}],p=[{text:t("settings.tabs.vuetorrent.general"),value:"general"},{text:t("settings.tabs.vuetorrent.torrent_card.list"),value:"torrentCardList"},{text:t("settings.tabs.vuetorrent.torrent_card.grid"),value:"torrentCardGrid"},{text:t("settings.tabs.vuetorrent.torrent_card.table"),value:"torrentCardTable"}],f=[{text:t("settings.tabs.rss.general"),value:"general"},{text:t("settings.tabs.rss.feeds"),value:"feeds"},{text:t("settings.tabs.rss.rules"),value:"rules"}],d=P("vuetorrent"),r=P("general"),g=P("general"),k=async()=>{if(await u.setPreferences(),He.success(t("settings.saveSuccess")),await u.fetchPreferences(),u.preferences.alternative_webui_enabled)x();else{const m=await navigator.serviceWorker.getRegistrations();for(const O of m)await O.unregister();window.location.hash=""}},x=()=>{n.push({name:"dashboard"})};function i(m){if(h.hasActiveDialog)return!1;m.key==="Escape"&&x()}function s(){const m=n.currentRoute.value.params.tab,O=n.currentRoute.value.params.subtab;m&&(m==="vuetorrent"&&O?r.value=O:m==="rss"&&O&&(g.value=O),d.value=m)}return ml(()=>{s()}),pl(()=>{document.addEventListener("keydown",i),s()}),fl(()=>{document.removeEventListener("keydown",i)}),(m,O)=>(C(),q("div",ft,[e(T,{"no-gutters":"",align:"center",justify:"center"},{default:a(()=>[e(o,null,{default:a(()=>[S("h1",bt,b(l(t)("settings.title")),1)]),_:1}),e(o,null,{default:a(()=>[S("div",_t,[e(R,{color:"accent",icon:"mdi-content-save",variant:"plain",onClick:k}),e(R,{icon:"mdi-close",variant:"plain",onClick:x})])]),_:1})]),_:1}),e(T,{class:"ma-0 pa-0"},{default:a(()=>[e(Ne,{modelValue:d.value,"onUpdate:modelValue":O[0]||(O[0]=B=>d.value=B),"bg-color":"primary",grow:"","show-arrows":""},{default:a(()=>[(C(),q(Q,null,ae(c,({text:B,value:G})=>e(qe,{key:G,value:G,href:`#/settings/${G}`,text:B},null,8,["value","href","text"])),64))]),_:1},8,["modelValue"])]),_:1}),e(Be,{modelValue:d.value,"onUpdate:modelValue":O[5]||(O[5]=B=>d.value=B),touch:!1},{default:a(()=>[e(H,{value:"vuetorrent"},{default:a(()=>[e(Ne,{modelValue:r.value,"onUpdate:modelValue":O[1]||(O[1]=B=>r.value=B),grow:"",color:"accent","show-arrows":""},{default:a(()=>[(C(),q(Q,null,ae(p,({text:B,value:G})=>e(qe,{value:G,text:B,href:`#/settings/vuetorrent/${G}`,class:ze({"text-accent":r.value===G})},null,8,["value","text","href","class"])),64))]),_:1},8,["modelValue"]),e(Be,{modelValue:r.value,"onUpdate:modelValue":O[2]||(O[2]=B=>r.value=B),touch:!1},{default:a(()=>[e(H,{value:"general"},{default:a(()=>[e(nt)]),_:1}),e(H,{value:"torrentCardList"},{default:a(()=>[e(dt)]),_:1}),e(H,{value:"torrentCardGrid"},{default:a(()=>[e(rt)]),_:1}),e(H,{value:"torrentCardTable"},{default:a(()=>[e(it)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(H,{value:"behavior"},{default:a(()=>[e(gl)]),_:1}),e(H,{value:"downloads"},{default:a(()=>[e(El)]),_:1}),e(H,{value:"connection"},{default:a(()=>[e(xl)]),_:1}),e(H,{value:"speed"},{default:a(()=>[e(zl)]),_:1}),e(H,{value:"bittorrent"},{default:a(()=>[e(vl)]),_:1}),e(H,{value:"rss"},{default:a(()=>[e(Ne,{modelValue:g.value,"onUpdate:modelValue":O[3]||(O[3]=B=>g.value=B),grow:"",color:"accent","bg-color":"transparent"},{default:a(()=>[(C(),q(Q,null,ae(f,({text:B,value:G})=>e(qe,{key:G,value:G,text:B,href:`#/settings/rss/${G}`,class:ze({"text-accent":g.value===G})},null,8,["value","text","href","class"])),64))]),_:1},8,["modelValue"]),e(Be,{modelValue:g.value,"onUpdate:modelValue":O[4]||(O[4]=B=>g.value=B),touch:!1},{default:a(()=>[e(H,{value:"general"},{default:a(()=>[e(Rl)]),_:1}),e(H,{value:"feeds"},{default:a(()=>[e(Il)]),_:1}),e(H,{value:"rules"},{default:a(()=>[e(Bl)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(H,{value:"webui"},{default:a(()=>[e(pt)]),_:1}),e(H,{value:"tagsAndCategories"},{default:a(()=>[e(Jl)]),_:1}),e(H,{value:"advanced"},{default:a(()=>[e(cl)]),_:1})]),_:1},8,["modelValue"])]))}});export{wt as default};