@jesec/flood 0.0.0-master.ea6cc7f → 0.0.0-master.eaefd4c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jesec/flood",
3
- "version": "0.0.0-master.ea6cc7f",
3
+ "version": "0.0.0-master.eaefd4c",
4
4
  "description": "A modern Web UI for various torrent clients with multi-user and multi-client support",
5
5
  "keywords": [
6
6
  "typescript",
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_jesec_flood=globalThis.webpackChunk_jesec_flood||[]).push([[694],{9335:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(9669),a=n.n(r),s=n(5823),l=n.n(s),i=n(3768),o=n(4355),c=n(3529);const{baseURI:d}=o.default,u=e=>{i.default.add({id:"alert.torrent.add.sent",count:e})},p=e=>{i.default.add({id:"alert.torrent.add",type:"success",count:e})},h=e=>{i.default.add({id:"alert.torrent.add.failed",type:"error",count:e})},m={addTorrentsByUrls:e=>a().post(`${d}api/torrents/add-urls`,e).then((t=>{let{data:n}=t;n.length?p(n.length):u(e.urls.length)}),(()=>{h(e.urls.length)})),addTorrentsByFiles:e=>a().post(`${d}api/torrents/add-files`,e).then((t=>{let{data:n}=t;n.length?p(n.length):u(e.files.length)}),(()=>{h(e.files.length)})),createTorrent:e=>a().post(`${d}api/torrents/create`,e,{responseType:"blob"}).then((t=>{let{data:n}=t;l()(n,(e.name||`${Date.now()}`).concat(".torrent")),p(1)}),(()=>{h(1)})),deleteTorrents:e=>a().post(`${d}api/torrents/delete`,e).then((()=>i.default.add({id:"alert.torrent.remove",type:"success",count:e.hashes.length})),(()=>i.default.add({id:"alert.torrent.remove.failed",type:"error",count:e.hashes.length}))),checkHash:e=>a().post(`${d}api/torrents/check-hash`,e).then((()=>{}),(()=>{})),fetchMediainfo:(e,t)=>a().get(`${d}api/torrents/${e}/mediainfo`,{cancelToken:t}).then((e=>e.data)),fetchTorrentContents:e=>a().get(`${d}api/torrents/${e}/contents`).then((e=>e.data),(()=>null)),fetchTorrentPeers:e=>a().get(`${d}api/torrents/${e}/peers`).then((e=>e.data),(()=>null)),fetchTorrentTrackers:e=>a().get(`${d}api/torrents/${e}/trackers`).then((e=>e.data),(()=>null)),getTorrentContentsDataPermalink:(e,t)=>a().get(`${o.default.baseURI}api/torrents/${e}/contents/${t.join(",")}/token`).then((n=>`${window.location.protocol}//${window.location.host}${o.default.baseURI}api/torrents/${e}/contents/${t.join(",")}/data?token=${n.data}`)),moveTorrents:e=>a().post(`${d}api/torrents/move`,e).then((()=>i.default.add({id:"alert.torrent.move",type:"success",count:e.hashes.length})),(()=>i.default.add({id:"alert.torrent.move.failed",type:"error",count:e.hashes.length}))),reannounce:e=>a().post(`${d}api/torrents/reannounce`,e).then((()=>{}),(()=>{})),startTorrents:async e=>{if(e.hashes.length>0)return a().post(`${d}api/torrents/start`,e).then((()=>{}),(()=>{}))},stopTorrents:async e=>{if(e.hashes.length>0)return a().post(`${d}api/torrents/stop`,e).then((()=>{}),(()=>{}))},setInitialSeeding:e=>a().patch(`${d}api/torrents/initial-seeding`,e).then((()=>{}),(()=>{})),setPriority:e=>a().patch(`${d}api/torrents/priority`,e).then((()=>{}),(()=>{})),setSequential:e=>a().patch(`${d}api/torrents/sequential`,e).then((()=>{}),(()=>{})),setFilePriority:(e,t)=>a().patch(`${d}api/torrents/${e}/contents`,t).then((()=>{}),(()=>{})),setTags:e=>a().patch(`${d}api/torrents/tags`,e).then((()=>c.Z.handleSetTaxonomySuccess()),(()=>{})),setTrackers:e=>a().patch(`${d}api/torrents/trackers`,e).then((()=>{}),(()=>{}))}},2159:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(7294),a=n(4744),s=n(9250),l=n(8441),i=n(8111),o=n(2809),c=n(4982),d=n(5747);const u=e=>{let{mode:t}=e;const{i18n:n}=(0,a.mV)(),u=(0,r.useRef)(null),p=(0,r.useRef)(null),[h,m]=(0,r.useState)(void 0),[_,Z]=(0,r.useState)(!1),f=(0,s.s0)(),g="login"===t;return(0,d.tZ)("div",{className:"application__entry-barrier",children:(0,d.tZ)(l.s_,{spacing:"large",children:(0,d.BX)(l.l0,{onSubmit:e=>{e.event.preventDefault(),Z(!0);const t=e.formData;if(null==t.username||""===t.username)return Z(!1),void m({id:"auth.error.username.empty"});if(null==t.password||""===t.password)return Z(!1),void m({id:"auth.error.password.empty"});if(g){const e=t;i.Z.authenticate({username:e.username,password:e.password}).then((()=>{Z(!1),f("/overview",{replace:!0})})).catch((e=>{Z(!1),m(e.message),f("/login",{replace:!0})}))}else{const e=t;if(null==p.current)return Z(!1),void m({id:"connection.settings.error.empty"});const n=p.current;if(null==n)return Z(!1),void m({id:"connection.settings.error.empty"});i.Z.register({username:e.username,password:e.password,client:n,level:o.u.ADMINISTRATOR}).then((()=>{Z(!1),f("/overview",{replace:!0})}),(e=>{Z(!1),m(e.message)}))}},ref:u,children:[(0,d.tZ)(l.V9,{children:(0,d.tZ)("h1",{children:g?n._("auth.login"):n._("auth.create.an.account")})}),(0,d.BX)(l.KG,{children:[(0,d.tZ)("p",{className:"copy--lead",children:g?n._("auth.login.intro"):n._("auth.create.an.account.intro")}),null!=h?(0,d.tZ)(l.p7,{children:(0,d.tZ)(l.Xq,{isLoading:_,children:"string"==typeof h?h:n._(h)})}):null,(0,d.tZ)(l.p7,{children:(0,d.tZ)(l.fE,{placeholder:n._("auth.username"),id:"username",autoComplete:"username"})}),(0,d.tZ)(l.p7,{children:(0,d.tZ)(l.fE,{placeholder:n._("auth.password"),id:"password",type:"password",autoComplete:g?"current-password":"new-password"})})]}),g?null:(0,d.tZ)(l.KG,{hasBorder:!0,children:(0,d.tZ)(c.Z,{onSettingsChange:e=>{p.current=e}})}),(0,d.tZ)(l.jH,{hasBorder:!0,children:(0,d.BX)(l.p7,{justify:"end",children:[(0,d.tZ)(l.zx,{priority:"tertiary",onClick:()=>{null!=u.current&&u.current.resetForm()},children:n._("auth.input.clear")}),(0,d.tZ)(l.zx,{isLoading:_,type:"submit",children:g?n._("auth.log.in"):n._("auth.create.account")})]})})]})})})}},8447:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(5747);const a=e=>{let{children:t}=e;return(0,r.tZ)("div",{className:"badge",children:t})}},228:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4744),a=n(5747);const s=e=>{const{suffix:t,value:n}=e;if(null==n)return null;let s=null,l=null;t&&(l=(0,a.tZ)("span",{className:"duration--segment",children:t}));const i=-1===n?-1:(e=>{const t=Math.floor(e/31536e3),n=Math.floor(e%31536e3/604800),r=Math.floor(e%31536e3%604800/86400),a=Math.floor(e%31536e3%604800%86400/3600),s=Math.floor(e%31536e3%604800%86400%3600/60),l=Math.floor(e-60*s);let i=null;return i=t>0?{years:t,weeks:n,cumSeconds:e}:n>0?{weeks:n,days:r,cumSeconds:e}:r>0?{days:r,hours:a,cumSeconds:e}:a>0?{hours:a,minutes:s,cumSeconds:e}:s>0?{minutes:s,seconds:l,cumSeconds:e}:{seconds:l,cumSeconds:e},i})(n);return s=-1===i?(0,a.tZ)(r.cC,{id:"unit.time.infinity"}):null!=i.years&&i.years>0?[(0,a.BX)("span",{className:"duration--segment",children:[i.years,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.year"})})]},"years"),(0,a.BX)("span",{className:"duration--segment",children:[i.weeks,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.week"})})]},"weeks")]:null!=i.weeks&&i.weeks>0?[(0,a.BX)("span",{className:"duration--segment",children:[i.weeks,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.week"})})]},"weeks"),(0,a.BX)("span",{className:"duration--segment",children:[i.days,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.day"})})]},"days")]:null!=i.days&&i.days>0?[(0,a.BX)("span",{className:"duration--segment",children:[i.days,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.day"})})]},"days"),(0,a.BX)("span",{className:"duration--segment",children:[i.hours,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.hour"})})]},"hours")]:null!=i.hours&&i.hours>0?[(0,a.BX)("span",{className:"duration--segment",children:[i.hours,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.hour"})})]},"hours"),(0,a.BX)("span",{className:"duration--segment",children:[i.minutes,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.minute"})})]},"minutes")]:null!=i.minutes&&i.minutes>0?[(0,a.BX)("span",{className:"duration--segment",children:[i.minutes,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.minute"})})]},"minutes"),(0,a.BX)("span",{className:"duration--segment",children:[i.seconds,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.second"})})]},"seconds")]:(0,a.BX)("span",{className:"duration--segment",children:[i.seconds,(0,a.tZ)("em",{className:"unit",children:(0,a.tZ)(r.cC,{id:"unit.time.second"})})]}),(0,a.BX)("span",{className:"duration",children:[s,l]})};s.defaultProps={suffix:void 0};const l=s},2036:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(7294),a=n(4744);const s={file:{0:"DONT_DOWNLOAD",1:"NORMAL",2:"HIGH"},torrent:{0:"DONT_DOWNLOAD",1:"LOW",2:"NORMAL",3:"HIGH"}};var l=n(5747);var i={name:"1gxvag8",styles:":focus{outline:none;-webkit-tap-highlight-color:transparent;}:focus-visible{outline:dashed;}"};const o=e=>{let{id:t,level:n,maxLevel:o,priorityType:c,showLabel:d,clickHandled:u,changePriorityFuncRef:p,onChange:h}=e;const{i18n:m}=(0,a.mV)(),[_,Z]=(0,r.useState)(n),f=()=>{let e=_;return e>=o?e=0:e+=1,Z(e),h(t,e),e};let g;if(null!=p&&(p.current=f),d){let e;switch(s[c][_]){case"DONT_DOWNLOAD":e=m._("priority.dont.download");break;case"HIGH":e=m._("priority.high");break;case"LOW":e=m._("priority.low");break;default:e=m._("priority.normal")}g=(0,l.tZ)("span",{className:"priority-meter__label",children:e})}const b=(0,l.tZ)("div",{className:`priority-meter priority-meter--max-${o} priority-meter--level-${_}`}),v=i;return u?(0,l.BX)("div",{className:"priority-meter__wrapper",css:v,children:[b,g]}):(0,l.BX)("button",{className:"priority-meter__wrapper",css:v,type:"button",onClick:()=>{f()},children:[b,g]})};o.defaultProps={showLabel:!1,clickHandled:!1,changePriorityFuncRef:void 0};const c=o},6882:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(8585),a=n(7294),s=n(5495),l=n(5747);const i=(0,a.memo)((e=>{let{status:t}=e;switch(t){case"error":return(0,l.tZ)(s.jj,{});case"checking":return(0,l.tZ)(s.$j,{});case"downloading":case"seeding":return(0,l.tZ)(s.zf,{});default:return(0,l.tZ)(s.dV,{})}})),o=(0,r.Pi)((e=>{let{percent:t,status:n}=e;return(0,l.BX)("div",{className:"progress-bar",children:[(0,l.tZ)("div",{className:"progress-bar__icon",children:n&&(0,l.tZ)(i,{status:n})}),(0,l.tZ)("div",{className:"progress-bar__fill__wrapper",children:(0,l.tZ)("div",{className:"progress-bar__fill",style:{width:`${t}%`}})})]})}));o.defaultProps={status:void 0};const c=o},2104:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4744),a=n(485),s=n(5747);const l=e=>{let{value:t,isSpeed:n,className:l,precision:i}=e;const o=(0,a.Q)(t,i),{i18n:c}=(0,r.mV)();let d=c._((0,a.A)(o.unit));return n&&(d=c._("unit.speed",{baseUnit:d})),(0,s.BX)("span",{className:l,children:[Number.isNaN(o.value)?"—":c.number(o.value),(0,s.tZ)("em",{className:"unit",children:d})]})};l.defaultProps={isSpeed:!1,precision:2,className:void 0};const i=l},2656:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4184),a=n.n(r),s=n(5747);const l=e=>{const{children:t,modifier:n}=e,r=a()("application__view",{[`application__view--${n}`]:null!=n});return(0,s.tZ)("div",{className:r,children:t})};l.defaultProps={modifier:void 0};const i=l},8737:(e,t,n)=>{n.d(t,{Z:()=>r});const r={start:"torrents.list.context.start",stop:"torrents.list.context.stop",remove:"torrents.list.context.remove",checkHash:"torrents.list.context.check.hash",reannounce:"torrents.list.context.reannounce",setTaxonomy:"torrents.list.context.set.tags",move:"torrents.list.context.move",setTrackers:"torrents.list.context.set.trackers",torrentDetails:"torrents.list.context.details",downloadContents:"torrents.list.context.download.contents",downloadMetainfo:"torrents.list.context.download.metainfo",generateMagnet:"torrents.list.context.generate.magnet",setInitialSeeding:"torrents.list.context.initial.seeding",setSequential:"torrents.list.context.sequential",setPriority:"torrents.list.context.priority"}},882:(e,t,n)=>{n.d(t,{Z:()=>r});const r={dateAdded:"torrents.properties.date.added",dateFinished:"torrents.properties.date.finished",downRate:"torrents.properties.download.speed",downTotal:"torrents.properties.download.total",eta:"torrents.properties.eta",name:"torrents.properties.name",peers:"torrents.properties.peers",percentComplete:"torrents.properties.percentage",ratio:"torrents.properties.ratio",seeds:"torrents.properties.seeds",sizeBytes:"torrents.properties.size",tags:"torrents.properties.tags",upRate:"torrents.properties.upload.speed",upTotal:"torrents.properties.upload.total",dateCreated:"torrents.properties.date.created",directory:"torrents.properties.directory",hash:"torrents.properties.hash",isPrivate:"torrents.properties.is.private",message:"torrents.properties.tracker.message",trackerURIs:"torrents.properties.trackers"}},9343:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(2656),a=n(2159),s=n(5747);const l=()=>(0,s.tZ)(r.Z,{modifier:"auth-form",children:(0,s.tZ)(a.Z,{mode:"login"})})},1345:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Lt});var r=n(7294),a=n(4184),s=n.n(a),l=n(8585),i=n(4744),o=n(5495),c=n(1540),d=n(879),u=n(9335),p=n(4936),h=n(3529),m=n(9097),_=n(5747);const Z=e=>{const{clickHandler:t,icon:n,label:r,slug:a,noTip:l}=e,i=s()("action tooltip__wrapper",{[`action--${a}`]:null!=a});return(0,_.BX)(m.Z,{content:r,onClick:t,position:"bottom",wrapperClassName:i,suppress:l,children:[n,(0,_.tZ)("span",{className:"action__label",children:r})]})};Z.defaultProps={noTip:!1};const f=Z,g={dateAdded:"desc",dateFinished:"desc",downRate:"desc",downTotal:"desc",upRate:"desc",upTotal:"desc"};var b=n(9670),v=n(4537),y=n(3955),w=n.n(y),N=n(7264);var k={name:"140xmhl",styles:"width:100%;height:100%;text-align:left;:focus-visible{outline:dashed;}"};const C=e=>{let{className:t,label:n,isFocusHandled:r,onClick:a}=e;return r?(0,_.tZ)("div",{role:"none",className:t,onClick:a,children:n}):(0,_.tZ)("button",{type:"button",className:t,css:k,onClick:a,children:n})};C.defaultProps={className:void 0};const S=(0,l.Pi)((e=>{let{baseClassName:t,dropdownWrapperClass:n,dropdownButtonClass:a,dropdownClickRef:l,direction:i,header:o,matchButtonWidth:c,menuItems:d,noWrap:u,trigger:p,width:m,isFocusHandled:Z,handleItemSelect:f,onOpen:g}=e;const y=(0,r.useRef)(w()("dropdown_")),k=h.Z.activeDropdownMenu===y.current,S=s()(n,`${t}--direction-${i}`,{[`${t}--match-button-width`]:c,[`${t}--width-${m}`]:null!=m,[`${t}--no-wrap`]:u,"is-expanded":k}),T=(0,r.useCallback)((()=>{window.removeEventListener("click",T),h.Z.setActiveDropdownMenu(null)}),[]);(0,N.Z)("Escape",(()=>T()));const x=(0,r.useCallback)((()=>{window.addEventListener("click",T),g&&g(),h.Z.setActiveDropdownMenu(y.current)}),[T,g]),R=e=>{e?.stopPropagation(),k?T():x()};let B;if(l&&(l.current=R),k){const e=(0,_.tZ)("div",{className:"dropdown__header",children:(0,_.tZ)(C,{className:a,label:o,isFocusHandled:Z??!1,onClick:R})},"dropdown-header"),t=(0,_.tZ)("ul",{className:"dropdown__items",children:d.map(((e,t)=>(0,_.tZ)("div",{className:"dropdown__list",children:e.map(((e,t)=>{const n=s()("dropdown__item menu__item",e.className,{"is-selectable":!1!==e.selectable,"is-selected":e.selected});return(0,_.tZ)("li",{className:n,children:(0,_.tZ)("button",{type:"button",disabled:!1===e.selectable,onClick:!1===e.selectable?void 0:()=>{T(),f(e)},children:e.displayName})},t)}))},t)))},"dropdown-items");B=(0,_.tZ)(b.Z,{classNames:"menu",timeout:{enter:250,exit:250},children:(0,_.tZ)("div",{className:"dropdown__content menu",children:"up"===i?[t,e]:[e,t]})})}return(0,_.BX)("div",{className:S,children:[(0,_.tZ)(C,{className:a,label:p??o,isFocusHandled:Z??!1,onClick:R}),(0,_.tZ)(v.Z,{children:B})]})}));S.defaultProps={baseClassName:"dropdown",direction:"down",dropdownWrapperClass:"dropdown",dropdownButtonClass:"dropdown__trigger",matchButtonWidth:!1,noWrap:!1,isFocusHandled:!1};const T=S;var x=n(882);const R=["name","eta","downRate","upRate","ratio","percentComplete","downTotal","upTotal","sizeBytes","dateAdded","dateFinished"],B=e=>{const{direction:t,selectedProperty:n,onSortChange:r}=e,{i18n:a}=(0,i.mV)();if(null==n)return null;const s=(0,_.BX)("div",{className:"dropdown__button",children:[(0,_.tZ)("span",{className:"dropdown__label",children:(0,_.tZ)(i.cC,{id:"torrents.sort.title"})}),(0,_.tZ)("span",{className:"dropdown__value",children:(0,_.tZ)(i.cC,{id:x.Z[n]})})]}),l=[R.map((e=>{const r=e===n,s=r?(0,_.tZ)("span",{className:`sort-dropdown__indicator sort-dropdown__indicator--${t}`}):null;return{displayName:(0,_.BX)("div",{className:"sort-dropdown__item",children:[a._(x.Z[e]),s]}),selected:r,property:e}}))];return(0,_.tZ)(T,{handleItemSelect:e=>{const{property:a}=e;if(null==a)return;let s=g[a]??"asc";n===a&&(s="asc"===t?"desc":"asc"),r({direction:s,property:a})},header:s,menuItems:l})},P=(0,l.Pi)((()=>{const{i18n:e}=(0,i.mV)(),{sortTorrents:t,torrentListViewSize:n}=d.default.floodSettings,r=s()("action-bar",{"action-bar--is-condensed":"condensed"===n});return(0,_.BX)("nav",{className:r,children:[(0,_.tZ)("div",{className:"actions action-bar__item action-bar__item--sidebar-expand-collapse",children:(0,_.tZ)(f,{label:"actionbar.button.sidebar.expand.collapse",slug:"sidebar-expand-collapse",icon:(0,_.tZ)(o.v2,{}),clickHandler:()=>{const e=document.getElementsByClassName("application__view")[0];null!=e&&e.classList.toggle("application__view--sidebar-alternative-state")},noTip:!0})}),(0,_.tZ)("div",{className:"actions action-bar__item action-bar__item--sort-torrents",children:(0,_.tZ)(B,{direction:null!=t?t.direction:"desc",onSortChange:e=>{c.Z.saveSetting("sortTorrents",e)},selectedProperty:null!=t?t.property:"dateAdded"})}),(0,_.BX)("div",{className:"actions action-bar__item action-bar__item--torrent-operations",children:[(0,_.BX)("div",{className:"action-bar__group",children:[(0,_.tZ)(f,{label:e._("actionbar.button.start.torrent"),slug:"start-torrent",icon:(0,_.tZ)(o.zf,{}),clickHandler:()=>u.Z.startTorrents({hashes:p.default.selectedTorrents})}),(0,_.tZ)(f,{label:e._("actionbar.button.stop.torrent"),slug:"stop-torrent",icon:(0,_.tZ)(o.dV,{}),clickHandler:()=>u.Z.stopTorrents({hashes:p.default.selectedTorrents})})]}),(0,_.BX)("div",{className:"action-bar__group action-bar__group--has-divider",children:[(0,_.tZ)(f,{label:e._("actionbar.button.add.torrent"),slug:"add-torrent",icon:(0,_.tZ)(o.mm,{}),clickHandler:()=>h.Z.setActiveModal({id:"add-torrents"})}),(0,_.tZ)(f,{label:e._("actionbar.button.remove.torrent"),slug:"remove-torrent",icon:(0,_.tZ)(o.JW,{}),clickHandler:()=>h.Z.setActiveModal({id:"remove-torrents"})})]})]})]})})),$=e=>{let{children:t}=e;return(0,_.tZ)("div",{className:"application__content",children:t})},X=e=>{const{children:t,baseClassName:n,className:r,modifier:a}=e,l=s()(n,{[`${n}--${a}`]:n,[r]:r});return(0,_.tZ)("div",{className:l,children:t})};X.defaultProps={baseClassName:"application__panel"};const M=X;var H=n(2656),D=n(5051),A=n(2358),F=n(8826),I=n(2104),L=n(6882);const z=e=>{let{label:t,value:n}=e;return(0,_.BX)("li",{"aria-label":"label",className:"diskusage__details-list__item",role:"cell",children:[(0,_.tZ)("span",{className:"diskusage__details-list__label",children:t}),(0,_.tZ)(I.Z,{className:"diskuage__size-used",value:n})]})};var E={name:"1ll9bqd",styles:"cursor:default"};const O=(0,l.Pi)((()=>{const{i18n:e}=(0,i.mV)(),{disks:t}=F.default,{mountPoints:n}=d.default.floodSettings;if(null==t||null==n)return null;const r=t.reduce(((e,t)=>({...e,[t.target]:t})),{}),a=n.filter((e=>e in r)).map((e=>r[e])).map((t=>(0,_.tZ)("li",{className:"sidebar-filter__item sidebar__diskusage",role:"row",children:(0,_.BX)(m.Z,{content:(0,_.BX)("ul",{className:"diskusage__details-list",role:"tooltip",children:[(0,_.tZ)(z,{value:t.used,label:e._("status.diskusage.used")}),(0,_.tZ)(z,{value:t.avail,label:e._("status.diskusage.free")}),(0,_.tZ)(z,{value:t.size,label:e._("status.diskusage.total")})]}),position:"top",styles:E,wrapperClassName:"diskusage__item",children:[(0,_.BX)("div",{className:"diskusage__text-row",children:[t.target,(0,_.BX)("span",{children:[Math.round(100*t.used/t.size),"%"]})]}),(0,_.tZ)(L.Z,{percent:Math.round(100*t.used/t.size)})]})},t.target)));if(null==a||0===a.length)return null;const s=e._("status.diskusage.title");return(0,_.BX)("ul",{"aria-label":s,className:"sidebar-filter sidebar__item",role:"table",children:[(0,_.tZ)("li",{className:"sidebar-filter__item sidebar-filter__item--heading",children:s}),a]})})),V=()=>{const{i18n:e}=(0,i.mV)(),t=(0,r.useRef)(null);return(0,_.tZ)(m.Z,{content:e._("sidebar.button.feeds"),onClick:()=>{null!=t.current&&t.current.dismissTooltip(),h.Z.setActiveModal({id:"feeds"})},ref:t,position:"bottom",wrapperClassName:"sidebar__action sidebar__icon-button sidebar__icon-button--interactive tooltip__wrapper",children:(0,_.tZ)(o.fR,{})})};var W=n(5727),U=n(95);const G=10,j=e=>D.Z.fetchNotifications({id:"notification-tooltip",limit:G,start:e}),q=e=>{let{paginationStart:t,notificationTotal:n}=e;const{i18n:r}=(0,i.mV)();if(n>G){let e=t+1,a=t+G;return e>n&&(e=n),a>n&&(a=n),(0,_.tZ)("div",{className:"toolbar toolbar--dark toolbar--top tooltip__toolbar tooltip__content--padding-surrogate",children:(0,_.BX)("span",{className:"toolbar__item toolbar__item--label",children:[`${r._("notification.showing")} `,(0,_.BX)("strong",{children:[e,` ${r._("general.to")} `,a]}),` ${r._("general.of")} `,(0,_.tZ)("strong",{children:n})]})})}return null},K=e=>{let{index:t,notification:n}=e;const{i18n:r}=(0,i.mV)();return(0,_.BX)("li",{className:"notifications__list__item",children:[(0,_.BX)("div",{className:"notification__heading",children:[(0,_.tZ)("span",{className:"notification__category",children:r._(`${n.id}.heading`)})," — ",(0,_.tZ)("span",{className:"notification__timestamp",children:r.date(new Date(n.ts),{year:"numeric",month:"long",day:"2-digit",hour:"numeric",minute:"numeric"})})]}),(0,_.tZ)("div",{className:"notification__message",children:r._(`${n.id}.body`,n.data)})]},t)},Y=e=>{let{paginationStart:t,notificationTotal:n,onPrevClick:r,onClearClick:a,onNextClick:l}=e;const{i18n:c}=(0,i.mV)();if(n>0){let e=t+20,i=t-G;return e>n&&(e=n),i<0&&(i=0),(0,_.BX)("ul",{className:"notifications__toolbar toolbar toolbar--dark toolbar--bottom",children:[(0,_.tZ)("li",{className:s()("toolbar__item toolbar__item--button",{"is-disabled":0===t}),children:(0,_.BX)("button",{className:"tooltip__content--padding-surrogate",type:"button",onClick:r,children:[(0,_.tZ)(o.s$,{}),`${i+1} - ${t}`]})}),(0,_.tZ)("li",{className:"toolbar__item toolbar__item--button",children:(0,_.tZ)("button",{className:"tooltip__content--padding-surrogate",type:"button",onClick:a,children:c._("notification.clear.all")})}),(0,_.tZ)("li",{className:s()("toolbar__item toolbar__item--button",{"is-disabled":t+G>=n}),children:(0,_.BX)("button",{className:"tooltip__content--padding-surrogate",type:"button",onClick:l,children:[`${t+G+1} - ${e}`,(0,_.tZ)(o._Q,{})]})})]})}return null},Q=(0,l.Pi)((()=>{const{i18n:e}=(0,i.mV)(),t=(0,r.useRef)(null),n=(0,r.useRef)(null),[a,l]=(0,r.useState)(!1),[c,d]=(0,r.useState)(0),[u,p]=(0,r.useState)(0),{hasNotification:h,notifications:Z,notificationCount:f}=U.default;return(0,r.useEffect)((()=>{f.total>0&&t.current?.isOpen()&&(l(!0),j(c).finally((()=>l(!1))))}),[f,c]),(0,_.BX)(m.Z,{contentClassName:"tooltip__content tooltip__content--no-padding",content:h?(0,_.BX)("div",{className:s()("notifications",{"notifications--is-loading":a}),children:[(0,_.tZ)(q,{paginationStart:c,notificationTotal:f.total}),(0,_.tZ)("div",{className:"notifications__loading-indicator",children:(0,_.tZ)(o.Hj,{})}),(0,_.tZ)("ul",{className:"notifications__list tooltip__content--padding-surrogate",ref:n,style:{minHeight:u},children:Z.map(((e,t)=>(0,_.tZ)(K,{index:t,notification:e})))}),(0,_.tZ)(Y,{paginationStart:c,notificationTotal:f.total,onPrevClick:()=>{const e=c-G;e>=0&&(p(n.current?.clientHeight||0),d(e))},onClearClick:()=>{null!=t.current&&t.current.dismissTooltip(),D.Z.clearNotifications(),p(0),d(0)},onNextClick:()=>{const e=c+G;f.total>e&&(p(n.current?.clientHeight||0),d(e))}})]}):(0,_.tZ)("div",{className:"notifications tooltip__content--padding-surrogate",style:{textAlign:"center"},children:e._("notification.no.notification")}),interactive:!0,onOpen:()=>j(c),ref:t,width:340,position:"bottom",wrapperClassName:"sidebar__action sidebar__icon-button tooltip__wrapper",children:[(0,_.tZ)(o.P_,{}),h?(0,_.tZ)("span",{className:"notifications__badge",children:f.total}):null]})}));var J=n(8232);const ee=(0,l.Pi)((()=>{const{i18n:e}=(0,i.mV)(),t=(0,r.useRef)(null),{searchFilter:n}=J.default;(0,r.useEffect)((()=>{null!=t.current&&n!==t.current.value&&(t.current.value=n)}),[t,n]);const a=""!==n;return(0,_.BX)("div",{className:s()({sidebar__item:!0,search:!0,"is-in-use":a}),children:[a&&(0,_.tZ)("button",{className:"button search__reset-button",onClick:()=>{J.default.setSearchFilter(""),null!=t.current&&t.current.blur()},type:"button",children:(0,_.tZ)(o.x8,{})}),(0,_.tZ)(o.ol,{}),(0,_.tZ)("input",{className:"textbox",ref:t,type:"text",placeholder:e._("sidebar.search.placeholder"),onChange:e=>{J.default.setSearchFilter(e.target.value)}})]})})),te=()=>{const{i18n:e}=(0,i.mV)(),t=(0,r.useRef)(null);return(0,_.tZ)(m.Z,{content:e._("sidebar.button.settings"),onClick:()=>{null!=t.current&&t.current.dismissTooltip(),h.Z.setActiveModal({id:"settings"})},ref:t,position:"bottom",wrapperClassName:"sidebar__action sidebar__icon-button sidebar__icon-button--interactive tooltip__wrapper",children:(0,_.tZ)(o.Zr,{})})},ne=e=>{let{children:t}=e;return(0,_.tZ)("div",{className:"sidebar__actions",children:t})};var re=n(1159),ae=n.n(re),se=n(5181);const le=e=>{let{bytes:t}=e;return 0===t?(0,_.tZ)(i.cC,{id:"speed.unlimited"}):(0,_.tZ)(I.Z,{value:t,isSpeed:!0,precision:1})},ie=e=>{let{i18n:t,direction:n,speedLimits:r,throttleGlobalDownSpeed:a,throttleGlobalUpSpeed:s}=e;const l={className:`dropdown__label dropdown__label--${n}`,..."download"===n?{displayName:t._("sidebar.speedlimits.download")}:{displayName:t._("sidebar.speedlimits.upload")},selectable:!1,value:null},i={download:a,upload:s},o=r[n];let c=!0;const d=o.map((e=>{let t=!1;return i&&i[n]===e&&(t=!0,c=!1),{displayName:(0,_.tZ)(le,{bytes:e}),property:n,selected:t,selectable:!0,value:e}}));if(c&&i){const e=ae()(o,i[n]);d.splice(e,0,{displayName:(0,_.tZ)(le,{bytes:i[n]}),property:n,selected:!0,selectable:!0,value:i[n]})}return d.unshift(l),d},oe=(0,l.Pi)((()=>{const{i18n:e}=(0,i.mV)(),t=(0,r.useRef)(null),n=(0,r.useRef)((()=>{})),a=e._("sidebar.button.speedlimits"),s={i18n:e,speedLimits:d.default.floodSettings.speedLimits,throttleGlobalDownSpeed:d.default.clientSettings?.throttleGlobalDownSpeed??0,throttleGlobalUpSpeed:d.default.clientSettings?.throttleGlobalUpSpeed??0};return(0,_.tZ)(T,{dropdownClickRef:n,dropdownWrapperClass:"dropdown dropdown--speed-limits sidebar__action",handleItemSelect:e=>{null!=e.value&&("download"===e.property?se.Z.saveSetting("throttleGlobalDownSpeed",e.value):"upload"===e.property&&se.Z.saveSetting("throttleGlobalUpSpeed",e.value))},header:(0,_.BX)("div",{className:"sidebar__icon-button sidebar__icon-button--interactive sidebar__icon-button--limits",title:a,children:[(0,_.tZ)(o.f9,{}),a]}),menuItems:[ie({direction:"download",...s}),ie({direction:"upload",...s})],onOpen:()=>{null!=t.current&&t.current.dismissTooltip()},trigger:(0,_.tZ)(m.Z,{content:a,position:"bottom",ref:t,wrapperClassName:"sidebar__icon-button tooltip__wrapper",onClick:()=>n.current?.(),children:(0,_.tZ)(o.f9,{})}),isFocusHandled:!0})}));var ce=n(8447);var de={name:"1wfsguk",styles:":focus{outline:none;-webkit-tap-highlight-color:transparent;}"};const ue=e=>{let{name:t,icon:n,isActive:r,slug:a,count:l,size:o,handleClick:c}=e;const{i18n:d}=(0,i.mV)(),u=s()("sidebar-filter__item",{"is-active":r});let p=t;if(""===p)p=d._("filter.all");else if("untagged"===p){if(0===l)return null;p=d._("filter.untagged")}return"checking"!==a&&"error"!==a||0!==l?(0,_.tZ)("li",{children:(0,_.BX)("button",{className:u,css:de,type:"button",onClick:e=>c(a,e),role:"menuitem",children:[n,(0,_.tZ)("span",{className:"name",children:p}),(0,_.tZ)(ce.Z,{children:l}),o&&(0,_.tZ)(I.Z,{value:o,className:"size"})]})}):null};ue.defaultProps={icon:void 0,size:void 0};const pe=ue;var he={name:"zlw20a",styles:"transform:scaleY(-1)"};const me=e=>{let{children:t,className:n,expanded:r,handleClick:a}=e;return(0,_.BX)("button",{className:n,onClick:e=>a(e),children:[t,r?(0,_.tZ)(o.Tt,{css:he}):(0,_.tZ)(o.Tt,{})]})};me.defaultProps={className:void 0};const _e=me,Ze=(0,l.Pi)((()=>{const{i18n:e}=(0,i.mV)(),t=[{label:e._("filter.all"),slug:"",icon:(0,_.tZ)(o.oT,{})},{label:e._("filter.status.downloading"),slug:"downloading",icon:(0,_.tZ)(o.Cz,{})},{label:e._("filter.status.seeding"),slug:"seeding",icon:(0,_.tZ)(o.TV,{})},{label:e._("filter.status.checking"),slug:"checking",icon:(0,_.tZ)(o.$j,{})},{label:e._("filter.status.completed"),slug:"complete",icon:(0,_.tZ)(o.FG,{})},{label:e._("filter.status.stopped"),slug:"stopped",icon:(0,_.tZ)(o.dV,{})},{label:e._("filter.status.active"),slug:"active",icon:(0,_.tZ)(o.ZS,{})},{label:e._("filter.status.inactive"),slug:"inactive",icon:(0,_.tZ)(o.Rz,{})},{label:e._("filter.status.error"),slug:"error",icon:(0,_.tZ)(o.jj,{})}].map((e=>(0,_.tZ)(pe,{handleClick:(e,t)=>J.default.setStatusFilters(e,t),count:J.default.taxonomy.statusCounts[e.slug]||0,icon:e.icon,isActive:""===e.slug&&!J.default.statusFilter.length||J.default.statusFilter.includes(e.slug),name:e.label,slug:e.slug},e.slug))),n=e._("filter.status.title"),[a,s]=(0,r.useState)(!0);return(0,_.BX)("ul",{"aria-label":n,className:"sidebar-filter sidebar__item",role:"menu",children:[(0,_.tZ)("li",{className:"sidebar-filter__item",role:"none",children:(0,_.tZ)(_e,{className:"sidebar-filter__item--heading",expanded:a,handleClick:()=>{s(!a)},children:n})}),a&&t]})})),fe=(0,l.Pi)((()=>{const{i18n:e}=(0,i.mV)(),[t,n]=(0,r.useState)(!0),a=Object.keys(J.default.taxonomy.tagCounts);if(1===a.length&&""===a[0]||2===a.length&&"untagged"===a[1])return null;const s=a.slice().sort(((e,t)=>""===e||"untagged"===e?-1:""===t||"untagged"===t?1:e.localeCompare(t))).map((e=>(0,_.tZ)(pe,{handleClick:(e,t)=>J.default.setTagFilters(e,t),count:J.default.taxonomy.tagCounts[e]||0,isActive:""===e&&!J.default.tagFilter.length||J.default.tagFilter.includes(e),name:e,slug:e,size:J.default.taxonomy.tagSizes[e]},e))),l=e._("filter.tag.title");return(0,_.BX)("ul",{"aria-label":l,className:"sidebar-filter sidebar__item",role:"menu",children:[(0,_.tZ)("li",{className:"sidebar-filter__item",role:"none",children:(0,_.tZ)(_e,{className:"sidebar-filter__item--heading",expanded:t,handleClick:()=>{n(!t)},children:l})}),t&&s]})}));var ge=n(4355);const be=()=>{const{i18n:e}=(0,i.mV)();return(0,_.tZ)(m.Z,{content:e._(ge.default.isPreferDark?"sidebar.button.theme.light":"sidebar.button.theme.dark"),onClick:()=>ge.default.setUserPreferDark(!ge.default.isPreferDark),position:"bottom",wrapperClassName:"sidebar__action sidebar__icon-button sidebar__icon-button--interactive tooltip__wrapper",children:(0,_.tZ)(o.R5,{})})},ve=(0,l.Pi)((()=>{const{i18n:e}=(0,i.mV)(),[t,n]=(0,r.useState)(!0),a=Object.keys(J.default.taxonomy.trackerCounts);if(1===a.length&&""===a[0])return null;const s=a.slice().sort(((e,t)=>""===e?-1:""===t?1:e.localeCompare(t))).map((e=>(0,_.tZ)(pe,{handleClick:(e,t)=>J.default.setTrackerFilters(e,t),count:J.default.taxonomy.trackerCounts[e]||0,isActive:""===e&&!J.default.trackerFilter.length||J.default.trackerFilter.includes(e),name:e,slug:e,size:J.default.taxonomy.trackerSizes[e]},e))),l=e._("filter.tracker.title");return(0,_.BX)("ul",{"aria-label":l,className:"sidebar-filter sidebar__item",role:"menu",children:[(0,_.tZ)("li",{className:"sidebar-filter__item",role:"none",children:(0,_.tZ)(_e,{className:"sidebar-filter__item--heading",expanded:t,handleClick:()=>{n(!t)},children:l})}),t&&s]})}));var ye=n(8699),we=n(1909),Ne=n(9509),ke=n(228);const Ce={download:(0,_.tZ)(o.UW,{}),infinity:(0,_.tZ)(o.ZG,{}),upload:(0,_.tZ)(o.gq,{})},Se=(0,l.Pi)((e=>{let{inspectorPoint:t}=e;const{i18n:n}=(0,i.mV)(),r=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{throttleGlobalDownSpeed:a=0,throttleGlobalUpSpeed:l=0}=d.default.clientSettings||{},{transferSummary:i}=Ne.default,o={download:a,upload:l},c={download:i.downTotal,upload:i.upTotal};let u={download:i.downRate,upload:i.upRate};null!=t&&(u={upload:t.upload,download:t.download});const p=s()("client-stats__rate__data--secondary",{"is-visible":null==t&&we.Z.isConnected}),h=s()("client-stats__rate__data--timestamp",{"is-visible":null!=t&&r.showHoverDuration});let m=null;null!=t?.timestamp&&(m=(0,_.tZ)("div",{className:h,children:(0,_.tZ)(ke.Z,{suffix:n._("general.ago"),value:Math.trunc((Date.now()-t.timestamp)/1e3)})}));let Z=null;return Z=0===o[e]?Ce.infinity:(0,_.tZ)(I.Z,{value:o[e],isSpeed:!0}),(0,_.BX)("div",{className:`client-stats__rate client-stats__rate--${e}`,children:[(0,_.tZ)("div",{className:"client-stats__rate__icon",children:Ce[e]}),(0,_.BX)("div",{className:"client-stats__rate__data",children:[(0,_.tZ)("div",{className:"client-stats__rate__data--primary",children:(0,_.tZ)(I.Z,{value:u[e],isSpeed:!0})}),m,(0,_.BX)("div",{className:p,children:[(0,_.tZ)("div",{className:"client-stats__rate__data--total",children:(0,_.tZ)(I.Z,{value:c[e]})}),(0,_.tZ)("div",{className:"client-stats__rate__data--limit",children:Z})]})]})]})};return(0,_.BX)("div",{className:"client-stats__rates",children:[r("download",{showHoverDuration:!0}),r("upload")]})})),Te=Se;var xe=n(9786),Re=n(3419),Be=n(7281),Pe=n(8776),$e=n(7360);const Xe=e=>{let{direction:t}=e;return(0,_.BX)("linearGradient",{id:`graph__gradient--${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,_.tZ)("stop",{className:`graph__gradient--top graph__gradient--top--${t}`,offset:"0%"}),(0,_.tZ)("stop",{className:`graph__gradient--bottom graph__gradient--bottom--${t}`,offset:"100%"})]})},Me=(e,t,n)=>{const r=e[t][Math.ceil(n)],a=e[t][Math.floor(n)];return a+n%1*(r-a)},He=(0,l.Pi)((e=>{let{id:t,height:n,width:a,handlerRefs:s,onHover:l,onMouseOut:i}=e;const[o,c]=(0,r.useState)(!1),d=(0,r.useRef)(0),u=(0,r.useRef)({download:0,upload:0,timestamp:0}),p=Ne.default.transferRates,h=(0,$e.Z)().domain([0,p.download.length-1]).range([0,a]),m=(0,$e.Z)().domain([0,(0,Pe.Z)(p.download,((e,t)=>Math.max(e,p.upload[t])))]).range([n-10,10]);s.current={handleMouseMove:e=>{d.current=h.invert(e),l(u.current)},handleMouseOut:()=>{c(!1),i()},handleMouseOver:()=>{c(!0)}},o&&(u.current={download:Me(p,"download",d.current),upload:Me(p,"upload",d.current),timestamp:p.timestamps[Math.round(d.current)]});const Z=xe.Z;return(0,_.BX)("svg",{className:"graph",id:t,height:"100%",width:"100%",children:[(0,_.BX)("defs",{children:[(0,_.tZ)(Xe,{direction:"upload"}),(0,_.tZ)(Xe,{direction:"download"})]}),Ne.e.map((e=>[(0,_.tZ)("path",{className:"graph__area",fill:`url('#graph__gradient--${e}')`,d:(0,Re.Z)().x(((e,t)=>h(t)||0)).y0(n).y1((e=>m(e)||0)).curve(Z)(p[e])},`area-${e}`),(0,_.tZ)("path",{className:`graph__line graph__line--${e}`,d:(0,Be.Z)().x(((e,t)=>h(t)||0)).y((e=>m(e)||0)).curve(Z)(p[e])},`line-${e}`),(0,_.tZ)("circle",{className:`graph__circle graph__circle--${e}`,r:2.5,style:{opacity:o?1:0},transform:`translate(${h(d.current)},${m(u.current[e])})`},`point-${e}`)]))]})})),De=He,Ae=(0,l.Pi)((()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)(250),s=(0,r.useRef)(null);return(0,_.tZ)(ye.Z,{offset:!0,onResize:e=>{e.offset?.width&&a(e.offset.width)},children:r=>{let{measureRef:a}=r;return(0,_.tZ)("div",{ref:a,className:"client-stats__wrapper sidebar__item",children:(0,_.BX)("div",{className:"client-stats",onMouseMove:e=>{null!=e?.nativeEvent?.clientX&&s.current?.handleMouseMove(e.nativeEvent.clientX)},onMouseOver:()=>s.current?.handleMouseOver(),onMouseOut:()=>s.current?.handleMouseOut(),onFocus:()=>s.current?.handleMouseOver(),onBlur:()=>s.current?.handleMouseOut(),children:[(0,_.tZ)(Te,{inspectorPoint:e}),we.Z.isConnected&&(0,_.tZ)(De,{height:150,id:"transfer-rate-graph",onMouseOut:()=>{t(null)},onHover:e=>{t(e)},handlerRefs:s,width:n})]})})}})})),Fe=Ae,Ie=()=>(0,_.tZ)(A.E,{className:"application__sidebar",options:{scrollbars:{autoHide:"scroll",clickScroll:!1,dragScroll:!1,theme:"os-theme-thin"},overflow:{x:"hidden",y:"scroll"}},children:(0,_.BX)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,_.BX)(ne,{children:[(0,_.tZ)(oe,{}),(0,_.tZ)(te,{}),(0,_.tZ)(V,{}),(0,_.tZ)(Q,{}),(0,_.tZ)(W.Z,{})]}),(0,_.tZ)(Fe,{}),(0,_.tZ)(ee,{}),(0,_.tZ)(Ze,{}),(0,_.tZ)(fe,{}),(0,_.tZ)(ve,{}),(0,_.tZ)(O,{}),(0,_.tZ)("div",{style:{flexGrow:1}}),(0,_.tZ)(ne,{children:(0,_.tZ)(be,{})})]})});var Le=n(8949),ze=n(9929),Ee=n(8441),Oe=n(2433);const Ve=(0,l.Pi)((e=>{let{id:t}=e;const n=h.Z.activeContextMenu?.id===t,r=h.Z.activeContextMenu?.items??[],a=h.Z.activeContextMenu?.clickPosition??{x:0,y:0},{i18n:l}=(0,i.mV)();return(0,N.Z)("Escape",(()=>h.Z.dismissContextMenu(t))),(0,_.tZ)(Ee.xV,{triggerCoordinates:a,onOverlayClick:()=>{h.Z.dismissContextMenu(t)},onOverlayRightClick:e=>{e.preventDefault()},isIn:n,children:r.map(((e,n)=>{let r,a;if("action"===e.type)a=s()("menu__item",{"is-selectable":e.clickHandler}),r=(0,_.BX)("span",{children:[(0,_.BX)("span",{className:s()("menu__item__label--primary",{"has-action":e.labelAction}),children:[(0,_.tZ)("span",{className:"menu__item__label",children:l._(e.label)}),e.labelAction?(0,_.tZ)("span",{className:"menu__item__label__action",children:(0,_.tZ)(e.labelAction,{})}):void 0]}),e.labelSecondary?(0,_.tZ)("span",{className:"menu__item__label--secondary",children:(0,_.tZ)(e.labelSecondary,{})}):void 0]});else a=s()("menu__item",{"menu__item--separator":"separator"===e.type});return(0,_.tZ)("li",{className:a,children:(0,_.tZ)("button",{type:"button",disabled:"action"!==e.type||!e.clickHandler,onClick:n=>("separator"!==e.type&&(!1===e.dismissMenu&&n.nativeEvent.stopImmediatePropagation(),e.clickHandler&&e.clickHandler(n),!1!==e.dismissMenu&&h.Z.dismissContextMenu(t)),!1),onContextMenu:e=>{e.preventDefault()},children:r})},"action"===e.type?e.action:`sep-${n}`)}))})})),We=Ve;var Ue=n(4356),Ge=n(5603);const je=(0,r.forwardRef)(((e,t)=>{const{children:n,onScroll:a}=e,s=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const e=s.current;if(null==e)return()=>{};const n=e.osInstance()?.elements().viewport;return t(n),a&&n.addEventListener("scroll",(e=>a(e)),{passive:!0}),()=>{a&&n.removeEventListener("scroll",(e=>a(e)))}}),[a,t]),(0,_.tZ)(A.E,{...e,options:{scrollbars:{autoHide:"leave",clickScroll:!0,theme:"os-theme-"+(ge.default.isPreferDark?"light":"dark")}},ref:s,children:n})})),qe=(0,r.forwardRef)(((e,t)=>{const{className:n,itemCount:r,itemKey:a,itemRenderer:s,itemSize:l,outerRef:i}=e,{height:o}=(0,Ge.Z)();return(0,_.tZ)(Ue.t7,{className:n,height:Math.max(30*l,o),itemCount:r,itemKey:a,itemSize:l,width:"100%",outerElementType:ge.default.isSmallScreen?void 0:je,ref:t,overscanCount:30,outerRef:i,children:s})})),Ke=(0,l.Pi)(qe);var Ye=n(4656);const Qe="\n body { user-select: none !important; }\n * { cursor: col-resize !important; }\n";var Je={name:"3v16dc",styles:"text-align:left;:focus{outline:none;-webkit-tap-highlight-color:transparent;}"};const et=(0,l.Pi)((0,r.forwardRef)(((e,t)=>{let{onCellClick:n,onCellFocus:a,onWidthsChange:l}=e;const[o,c]=(0,r.useState)(!1),u=(0,r.useRef)(),p=(0,r.useRef)(),m=(0,r.useRef)(),Z=(0,Ye.Z)(t),f=(0,r.useRef)(null),{i18n:g}=(0,i.mV)(),b=e=>{let t=0;null!=m.current&&(t=e.clientX-m.current);let n=20;null!=p.current&&(n=p.current+t),n>20&&(p.current=n,m.current=e.clientX,null!=f.current&&null!=Z.current&&(f.current.style.transform=`translate(${Math.max(0,e.clientX)}px, ${Z.current.getBoundingClientRect().top}px)`))},v=()=>{h.Z.removeGlobalStyle(Qe),window.removeEventListener("pointerup",v),window.removeEventListener("pointermove",b),c(!1),m.current=void 0,null!=f.current&&(f.current.style.opacity="0"),null!=u.current&&null!=p.current&&l(u.current,p.current),u.current=void 0,p.current=void 0};return(0,_.BX)("div",{className:"table__row table__row--heading",role:"row",ref:Z,children:[d.default.floodSettings.torrentListColumns.reduce(((e,t)=>{let{id:r,visible:l}=t;if(!l)return e;const y=x.Z[r];if(null==y)return e;let w=null;const N=d.default.floodSettings.torrentListColumnWidths[r]||100;o||(w=(0,_.tZ)("span",{className:"table__heading__handle",onPointerDown:e=>{o||null==f.current||null==Z.current||(c(!0),u.current=r,p.current=N,m.current=e.clientX,window.addEventListener("pointerup",v),window.addEventListener("pointermove",b),h.Z.addGlobalStyle(Qe),f.current.style.transform=`translate(${Math.max(0,e.clientX)}px, ${Z.current.getBoundingClientRect().top}px)`,f.current.style.opacity="1")}}));const k=r===d.default.floodSettings.sortTorrents.property,C=s()("table__cell table__heading",{"table__heading--is-sorted":k,[`table__heading--direction--${d.default.floodSettings.sortTorrents.direction}`]:k});return e.push((0,_.BX)("button",{className:C,css:Je,role:"columnheader","aria-sort":k?"asc"===d.default.floodSettings.sortTorrents.direction?"ascending":"descending":"none",type:"button",onClick:()=>n(r),onFocus:()=>a(),style:{width:`${N}px`},children:[(0,_.tZ)("span",{className:"table__heading__label",title:g._(y),children:(0,_.tZ)(i.cC,{id:y})}),w]},r)),e}),[]),(0,_.tZ)("div",{className:"table__cell table__heading table__heading--fill"}),(0,_.tZ)("div",{className:"table__heading__resize-line",ref:f})]})}))),tt=et;var nt=n(4977);const rt=e=>{const t=[];e.forEach((n=>{const r=new FileReader;r.onload=r=>{null!=r.target?.result&&"string"==typeof r.target.result&&t.push({name:n.name,data:r.target.result.split("base64,")[1]}),t.length===e.length&&null!=t[0]&&h.Z.setActiveModal({id:"add-torrents",tab:"by-file",files:t})},r.readAsDataURL(n)}))},at=e=>{let{children:t}=e;const{getRootProps:n,isDragActive:r}=(0,nt.uI)({onDrop:rt,noClick:!0,noKeyboard:!0});return(0,_.tZ)("div",{...n({onClick:e=>e.preventDefault()}),className:"dropzone dropzone--with-overlay torrents "+(r?"dropzone--is-dragging":""),children:t})};var st=n(1773),lt=n(1109),it=n(8737),ot=n(2036);const ct=()=>p.default.selectedTorrents[p.default.selectedTorrents.length-1],dt=(0,l.Pi)((e=>{let{property:t}=e;return(0,_.tZ)("span",{className:"toggle-input checkbox",style:{display:"inline"},children:(0,_.tZ)("div",{className:"toggle-input__indicator",children:(0,_.tZ)("div",{className:"toggle-input__indicator__icon",style:{opacity:p.default.torrents[ct()][t]?"1":void 0},children:(0,_.tZ)(o.MC,{})})})})})),ut=e=>{const t=(0,r.createRef)();return[{type:"action",action:"start",label:it.Z.start,clickHandler:()=>{u.Z.startTorrents({hashes:p.default.selectedTorrents})}},{type:"action",action:"stop",label:it.Z.stop,clickHandler:()=>{u.Z.stopTorrents({hashes:p.default.selectedTorrents})}},{type:"action",action:"remove",label:it.Z.remove,clickHandler:()=>{h.Z.setActiveModal({id:"remove-torrents"})}},{type:"action",action:"checkHash",label:it.Z.checkHash,clickHandler:()=>{u.Z.checkHash({hashes:p.default.selectedTorrents})}},{type:"action",action:"reannounce",label:it.Z.reannounce,clickHandler:()=>{u.Z.reannounce({hashes:p.default.selectedTorrents})}},{type:"separator"},{type:"action",action:"setTaxonomy",label:it.Z.setTaxonomy,clickHandler:()=>{h.Z.setActiveModal({id:"set-taxonomy"})}},{type:"action",action:"move",label:it.Z.move,clickHandler:()=>{h.Z.setActiveModal({id:"move-torrents"})}},{type:"action",action:"setTrackers",label:it.Z.setTrackers,clickHandler:()=>{h.Z.setActiveModal({id:"set-trackers"})}},{type:"separator"},{type:"action",action:"torrentDetails",label:it.Z.torrentDetails,clickHandler:()=>{h.Z.setActiveModal({id:"torrent-details",hash:ct()})}},{type:"action",action:"downloadContents",label:it.Z.downloadContents,clickHandler:e=>{e.preventDefault(),p.default.selectedTorrents.forEach((e=>{const t=document.createElement("a");t.download="",t.href=`${ge.default.baseURI}api/torrents/${e}/contents/all/data`,t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)}))}},{type:"action",action:"downloadMetainfo",label:it.Z.downloadMetainfo,clickHandler:e=>{e.preventDefault();const t=document.createElement("a");t.download="",t.href=`${ge.default.baseURI}api/torrents/${p.default.selectedTorrents.join(",")}/metainfo`,t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)}},{type:"action",action:"generateMagnet",label:it.Z.generateMagnet,clickHandler:()=>{h.Z.setActiveModal({id:"generate-magnet"})}},{type:"action",action:"setInitialSeeding",label:it.Z.setInitialSeeding,clickHandler:()=>{const{selectedTorrents:e}=p.default;u.Z.setInitialSeeding({hashes:e,isInitialSeeding:!p.default.torrents[ct()].isInitialSeeding})},dismissMenu:!1,labelAction:()=>(0,_.tZ)(dt,{property:"isInitialSeeding"})},{type:"action",action:"setSequential",label:it.Z.setSequential,clickHandler:()=>{const{selectedTorrents:e}=p.default;u.Z.setSequential({hashes:e,isSequential:!p.default.torrents[ct()].isSequential})},dismissMenu:!1,labelAction:()=>(0,_.tZ)(dt,{property:"isSequential"})},{type:"action",action:"setPriority",label:it.Z.setPriority,clickHandler:()=>{null!=t.current&&u.Z.setPriority({hashes:p.default.selectedTorrents,priority:t.current()})},dismissMenu:!1,labelAction:()=>(0,_.tZ)(ot.Z,{id:e.hash,level:e.priority,maxLevel:3,onChange:()=>{},priorityType:"torrent",showLabel:!1,changePriorityFuncRef:t,clickHandled:!0},e.hash)}]};const pt={eta:(0,_.tZ)(o.SU,{}),sizeBytes:(0,_.tZ)(o.Zd,{}),downRate:(0,_.tZ)(o.ki,{}),directory:(0,_.tZ)(o.Bm,{}),hash:(0,_.tZ)(o.kb,{}),dateAdded:(0,_.tZ)(o.f,{}),dateCreated:(0,_.tZ)(o.Oo,{}),dateFinished:(0,_.tZ)(o.nK,{}),isPrivate:(0,_.tZ)(o.HE,{}),message:(0,_.tZ)(o.Ey,{}),percentComplete:(0,_.tZ)(o.ki,{}),peers:(0,_.tZ)(o.Ib,{}),ratio:(0,_.tZ)(o.T_,{}),seeds:(0,_.tZ)(o.O5,{}),trackerURIs:(0,_.tZ)(o.Fk,{}),upRate:(0,_.tZ)(o.u3,{}),upTotal:(0,_.tZ)(o.u3,{})},ht=(0,l.Pi)((e=>{let{value:t}=e;return t?(0,_.tZ)(o.FV,{className:"torrent__detail__icon torrent__detail__icon--checkmark"}):null})),mt=(0,l.Pi)((e=>{let{date:t}=e;const{i18n:n}=(0,i.mV)();return(0,_.tZ)("span",{children:n.date(new Date(1e3*t))})})),_t=(0,l.Pi)((e=>{let{eta:t}=e;return t?(0,_.tZ)(ke.Z,{value:t}):null})),Zt=(0,l.Pi)((e=>{let{peersConnected:t,totalPeers:n}=e;const{i18n:r}=(0,i.mV)();return(0,_.tZ)(i.cC,{id:"torrent.list.peers",values:{connected:r.number(t),of:(0,_.tZ)("em",{className:"unit",children:(0,_.tZ)(i.cC,{id:"torrent.list.peers.of"})}),total:r.number(n)}})})),ft=(0,l.Pi)((e=>{let{ratio:t}=e;const{i18n:n}=(0,i.mV)();return(0,_.tZ)("span",{children:n.number(t,{maximumFractionDigits:2})})})),gt=(0,l.Pi)((e=>{let{tags:t}=e;return(0,_.tZ)("ul",{className:"torrent__tags tag",children:t.map((e=>(0,_.tZ)("li",{className:"torrent__tag",children:e},e)))})})),bt=(0,l.Pi)((e=>{let{trackers:t}=e;return(0,_.tZ)("span",{children:t.join(", ")})})),vt=(0,l.Pi)((e=>{let{torrent:t,column:n}=e;switch(n){case"dateAdded":case"dateCreated":case"dateFinished":return(0,_.tZ)(mt,{date:t[n]});case"downRate":case"upRate":return(0,_.tZ)(I.Z,{value:t[n],isSpeed:!0});case"downTotal":case"upTotal":case"sizeBytes":return(0,_.tZ)(I.Z,{value:t[n]});case"ratio":return(0,_.tZ)(ft,{ratio:t[n]});case"isPrivate":return(0,_.tZ)(ht,{value:t[n]});case"tags":return(0,_.tZ)(gt,{tags:t[n]});case"trackerURIs":return(0,_.tZ)(bt,{trackers:t[n]});case"eta":return(0,_.tZ)(_t,{eta:t[n]});case"seeds":return(0,_.tZ)(Zt,{peersConnected:t.seedsConnected,totalPeers:t.seedsTotal});case"peers":return(0,_.tZ)(Zt,{peersConnected:t.peersConnected,totalPeers:t.peersTotal});case"percentComplete":return(0,_.tZ)(L.Z,{percent:(0,Le.Fl)((()=>Math.ceil(t.percentComplete))).get(),status:(0,Le.Fl)((()=>(0,lt.o)(t.status))).get()});default:return(0,_.tZ)("span",{children:t[n]})}}));var yt={name:"1te7sjq",styles:"pointer-events:none;user-select:none"};const wt=(0,l.Pi)((e=>{let{hash:t,content:n,column:r,className:a,classNameOverride:l,width:i,showIcon:c}=e;const d=c?pt[r]:null;return(0,_.BX)("div",{className:l?a:s()("torrent__detail",`torrent__detail--${r}`,a),css:yt,role:"cell",style:{width:`${i}px`},children:[d,n?(0,_.tZ)(n,{torrent:p.default.torrents[t],column:r}):(0,_.tZ)(o._P,{})]})}));wt.defaultProps={className:void 0,classNameOverride:!1,content:vt,width:void 0,showIcon:!1};const Nt=wt,kt=(0,l.Pi)((0,r.forwardRef)(((e,t)=>{let{className:n,style:r,hash:a,handleClick:s,handleDoubleClick:l,handleRightClick:i,handleTouchStart:o,handleTouchEnd:c,handleKeyPress:u}=e;const p=d.default.floodSettings.torrentListColumns.reduce(((e,t)=>{let{id:n,visible:r}=t;return null==x.Z[n]?e:r?(e.push((0,_.tZ)(Nt,{className:"table__cell",hash:a,column:n,width:d.default.floodSettings.torrentListColumnWidths[n]},n)),e):e}),[]);return(0,_.tZ)("div",{className:n,role:"row",style:r,tabIndex:0,onClick:e=>s(a,e),onContextMenu:e=>i(a,e),onDoubleClick:()=>l(a),onTouchStart:o,onTouchEnd:c,onKeyPress:u,ref:t,children:p})}))),Ct=kt;const St=(0,l.Pi)((e=>{let{torrent:t}=e;const{i18n:n}=(0,i.mV)();return(0,_.BX)("span",{children:[n.number(t.percentComplete,{maximumFractionDigits:1}),(0,_.tZ)("em",{className:"unit",children:"%"})," — ",(0,_.tZ)(I.Z,{value:t.downTotal})]})}));var Tt={name:"1vr7vmn",styles:"align-items:center;display:flex"};const xt=(0,l.Pi)((0,r.forwardRef)(((e,t)=>{let{className:n,style:r,hash:a,handleClick:s,handleDoubleClick:l,handleRightClick:i,handleTouchStart:o,handleTouchEnd:c,handleKeyPress:u}=e;const p=d.default.floodSettings.torrentListColumns,h=[(0,_.tZ)(Nt,{hash:a,column:"name",className:"torrent__details__section torrent__details__section--primary"},"name")],m=[(0,_.tZ)(Nt,{hash:a,column:"eta",showIcon:!0},"eta"),(0,_.tZ)(Nt,{hash:a,column:"downRate",showIcon:!0},"downRate"),(0,_.tZ)(Nt,{hash:a,column:"upRate",showIcon:!0},"upRate")],Z=[(0,_.tZ)(Nt,{hash:a,column:"percentComplete",content:St,showIcon:!0},"percentComplete")],f=[(0,_.tZ)(Nt,{hash:a,column:"percentComplete",className:"torrent__details__section torrent__details__section--quaternary",classNameOverride:!0},"percentBar")];for(let e=0;e<p.length;e+=1){const{id:t,visible:n}=p[e];if(null!=x.Z[t]&&n)switch(t){case"name":case"downRate":case"upRate":case"eta":case"downTotal":case"percentComplete":break;default:Z.push((0,_.tZ)(Nt,{hash:a,column:t,showIcon:!0},t))}}return(0,_.BX)("div",{className:n,role:"row",style:r,tabIndex:0,onClick:e=>s(a,e),onContextMenu:e=>i(a,e),onDoubleClick:()=>l(a),onTouchStart:o,onTouchEnd:c,onKeyPress:u,ref:t,children:[(0,_.BX)("div",{css:Tt,children:[h,(0,_.tZ)("div",{className:"torrent__details__section torrent__details__section--secondary",children:m})]}),(0,_.tZ)("div",{className:"torrent__details__section torrent__details__section--tertiary",children:Z}),f]})}))),Rt=xt,Bt=(e,t)=>{!0===t.cancelable&&t.preventDefault();const n=t.clientX,r=t.clientY,a=t.touches?.[0].clientX,s=t.touches?.[0].clientY;p.default.selectedTorrents.includes(e)||p.default.setSelectedTorrents({hash:e,event:t});const{torrentContextMenuActions:l=Oe.Z.torrentContextMenuActions}=d.default.floodSettings,i=p.default.torrents[e];h.Z.setActiveContextMenu({id:"torrent-list-item",clickPosition:{x:n||a||0,y:r||s||0},items:ut(i).filter((e=>"separator"===e.type||l.some((t=>t.id===e.action&&!0===t.visible))))})},Pt=e=>h.Z.setActiveModal({id:"torrent-details",hash:e}),$t=(e,t)=>p.default.setSelectedTorrents({hash:e,event:t}),Xt=(e,t)=>{" "!==t.key&&"Enter"!==t.key&&"ContextMenu"!==t.key||(t.preventDefault(),p.default.selectedTorrents.includes(e)?"Enter"===t.key?Pt(e):"ContextMenu"===t.key&&Bt(e,t):$t(e,t))},Mt=(0,l.Pi)((e=>{let{hash:t,style:n}=e;const[a,l]=(0,r.useState)(0),i=(0,r.useRef)(!1),o=(0,r.useRef)(null),c="condensed"===d.default.floodSettings.torrentListViewSize,u=(0,Le.Fl)((()=>p.default.selectedTorrents.includes(t))).get(),{status:h,upRate:m,downRate:Z}=p.default.torrents?.[t]||{},f=(0,lt.T)({status:h,upRate:m,downRate:Z},s()({"torrent--is-selected":u,"torrent--is-condensed":c,"torrent--is-expanded":!c}),"torrent"),{onTouchStart:g,onTouchEnd:b}=(0,st.Z)((e=>{const n=o.current?.getBoundingClientRect().top;null!=e&&null!=n&&Math.abs(n-a)<25&&Bt(t,e)})),v=e=>{p.default.selectedTorrents.includes(t)||$t(t,e),i.current?Pt(t):(i.current=!0,setTimeout((()=>{i.current=!1}),200)),l(o.current?.getBoundingClientRect().top||0),g(e)};return c?(0,_.tZ)(Ct,{className:f,ref:o,style:n,hash:t,handleClick:$t,handleDoubleClick:Pt,handleRightClick:Bt,handleTouchStart:v,handleTouchEnd:b,handleKeyPress:e=>Xt(t,e)}):(0,_.tZ)(Rt,{className:f,ref:o,style:n,hash:t,handleClick:$t,handleDoubleClick:Pt,handleRightClick:Bt,handleTouchStart:v,handleTouchEnd:b,handleKeyPress:e=>Xt(t,e)})})),Ht=Mt,Dt=(0,l.Pi)((e=>{let{index:t,style:n}=e;return(0,_.tZ)(Ht,{hash:p.default.filteredTorrents[t].hash,style:n})})),At=(0,l.Pi)((()=>{const e=(0,r.useRef)(null),t=(0,r.useRef)(null),n=(0,r.useRef)(null);(0,r.useEffect)((()=>(0,Le.U5)((()=>J.default.filterTrigger),(()=>{null!=t.current&&t.current.scrollTo(0)}))),[]),(0,ze.Z)("keydown",(e=>{const{ctrlKey:t,key:n,metaKey:r,repeat:a,target:s}=e,l=s?.tagName?.toUpperCase();"INPUT"!==l&&"TEXTAREA"!==l&&(a||((r||t)&&"a"===n&&(e.preventDefault(),p.default.selectAllTorrents()),(r||t)&&"v"===n&&(async()=>{const t=await(navigator?.clipboard?.readText()),n=t?.startsWith("magnet:?"),r=t?.startsWith("http")&&t?.endsWith(".torrent");(n||r)&&(e.preventDefault(),h.Z.setActiveModal({id:"add-torrents",tab:"by-url",urls:[{id:0,value:t}]}))})()))}));const a=p.default.filteredTorrents,{torrentListViewSize:s="condensed"}=d.default.floodSettings,l="condensed"===s,u=null==a||0===a.length;let m=null,Z=null;return we.Z.isConnected?u||null==a?m=(0,_.BX)("div",{className:"torrents__alert__wrapper",children:[(0,_.tZ)("div",{className:"torrents__alert",children:(0,_.tZ)(i.cC,{id:"torrents.list.no.torrents"})}),J.default.isFilterActive?(0,_.tZ)("div",{className:"torrents__alert__action",children:(0,_.tZ)(Ee.zx,{onClick:()=>{J.default.clearAllFilters()},priority:"tertiary",children:(0,_.tZ)(i.cC,{id:"torrents.list.clear.filters"})})}):null]}):(l&&(Z=(0,_.tZ)(tt,{onCellFocus:()=>{null!=n.current&&null!=e.current&&(n.current.scrollLeft=e.current.scrollLeft)},onCellClick:e=>{const t=d.default.floodSettings.sortTorrents;let n=g[e]??"asc";t.property===e&&(n="asc"===t.direction?"desc":"asc");const r={property:e,direction:n};c.Z.saveSetting("sortTorrents",r)},onWidthsChange:(e,t)=>{const{torrentListColumnWidths:n=Oe.Z.torrentListColumnWidths}=d.default.floodSettings;c.Z.saveSetting("torrentListColumnWidths",{...n,[e]:t})},ref:e})),m=(0,_.tZ)(Ke,{className:"torrent__list__viewport",itemCount:a.length,itemKey:e=>p.default.filteredTorrents[e].hash,itemRenderer:Dt,itemSize:l?30:70,ref:t,outerRef:t=>{const r=t;null!=r&&null==r.onscroll&&(r.onscroll=()=>{null!=e.current&&(e.current.scrollLeft=r.scrollLeft)}),n.current=r}})):m=(0,_.tZ)("div",{className:"torrents__alert__wrapper",children:(0,_.tZ)("div",{className:"torrents__alert",children:(0,_.tZ)(i.cC,{id:"torrents.list.cannot.connect"})})}),(0,_.BX)(at,{children:[(0,_.BX)("div",{className:"torrent__list__wrapper",role:"table",children:[(0,_.tZ)(We,{id:"torrent-list-item"}),Z,m]}),(0,_.tZ)("div",{className:"dropzone__overlay",children:(0,_.BX)("div",{className:"dropzone__copy",children:[(0,_.tZ)("div",{className:"dropzone__icon",children:(0,_.tZ)(o.hv,{})}),(0,_.tZ)(i.cC,{id:"torrents.list.drop"})]})})]})}));n(6962);const Ft=(0,r.lazy)((()=>n.e(33).then(n.bind(n,3975)))),It=(0,r.lazy)((()=>Promise.all([n.e(913),n.e(151)]).then(n.bind(n,1434)))),Lt=()=>((0,r.useEffect)((()=>{D.Z.startActivityStream()}),[]),(0,_.BX)(H.Z,{children:[(0,_.tZ)(Ie,{}),(0,_.BX)($,{children:[(0,_.BX)(M,{modifier:"torrent-list",className:"view--torrent-list",children:[(0,_.tZ)(P,{}),(0,_.tZ)(At,{})]}),(0,_.tZ)(It,{}),(0,_.tZ)(Ft,{})]})]}))},2258:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(2159),a=n(2656),s=n(5747);const l=()=>(0,s.tZ)(a.Z,{modifier:"auth-form",children:(0,s.tZ)(r.Z,{mode:"register"})})},1109:(e,t,n)=>{n.d(t,{T:()=>s,o:()=>l});var r=n(4184),a=n.n(r);const s=function(e){let{status:t,downRate:n,upRate:r}=e;for(var s=arguments.length,l=new Array(s>1?s-1:0),i=1;i<s;i++)l[i-1]=arguments[i];return a()(l,{"torrent--has-error":t.includes("error"),"torrent--is-stopped":t.includes("stopped"),"torrent--is-downloading":t.includes("downloading"),"torrent--is-downloading--actively":n>0,"torrent--is-uploading--actively":r>0,"torrent--is-seeding":t.includes("seeding"),"torrent--is-completed":t.includes("complete"),"torrent--is-checking":t.includes("checking"),"torrent--is-inactive":t.includes("inactive")})},l=e=>{let t="stopped";return["error","checking","stopped","downloading","seeding"].some((n=>!!e.includes(n)&&(t=n,!0))),t}}}]);