qBitrr2 4.10.9__py3-none-any.whl → 5.4.5__py3-none-any.whl

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.
Files changed (59) hide show
  1. qBitrr/arss.py +2165 -889
  2. qBitrr/auto_update.py +382 -0
  3. qBitrr/bundled_data.py +3 -2
  4. qBitrr/config.py +20 -3
  5. qBitrr/db_lock.py +79 -0
  6. qBitrr/env_config.py +19 -7
  7. qBitrr/gen_config.py +287 -26
  8. qBitrr/logger.py +87 -3
  9. qBitrr/main.py +453 -101
  10. qBitrr/search_activity_store.py +88 -0
  11. qBitrr/static/assets/ArrView.js +2 -0
  12. qBitrr/static/assets/ArrView.js.map +1 -0
  13. qBitrr/static/assets/ConfigView.js +4 -0
  14. qBitrr/static/assets/ConfigView.js.map +1 -0
  15. qBitrr/static/assets/LogsView.js +230 -0
  16. qBitrr/static/assets/LogsView.js.map +1 -0
  17. qBitrr/static/assets/ProcessesView.js +2 -0
  18. qBitrr/static/assets/ProcessesView.js.map +1 -0
  19. qBitrr/static/assets/app.css +1 -0
  20. qBitrr/static/assets/app.js +11 -0
  21. qBitrr/static/assets/app.js.map +1 -0
  22. qBitrr/static/assets/build.svg +3 -0
  23. qBitrr/static/assets/check-mark.svg +5 -0
  24. qBitrr/static/assets/close.svg +4 -0
  25. qBitrr/static/assets/download.svg +5 -0
  26. qBitrr/static/assets/gear.svg +5 -0
  27. qBitrr/static/assets/lidarr.svg +1 -0
  28. qBitrr/static/assets/live-streaming.svg +8 -0
  29. qBitrr/static/assets/log.svg +3 -0
  30. qBitrr/static/assets/plus.svg +4 -0
  31. qBitrr/static/assets/process.svg +15 -0
  32. qBitrr/static/assets/react-select.esm.js +14 -0
  33. qBitrr/static/assets/react-select.esm.js.map +1 -0
  34. qBitrr/static/assets/refresh-arrow.svg +3 -0
  35. qBitrr/static/assets/table.js +23 -0
  36. qBitrr/static/assets/table.js.map +1 -0
  37. qBitrr/static/assets/trash.svg +8 -0
  38. qBitrr/static/assets/up-arrow.svg +3 -0
  39. qBitrr/static/assets/useInterval.js +2 -0
  40. qBitrr/static/assets/useInterval.js.map +1 -0
  41. qBitrr/static/assets/vendor.js +33 -0
  42. qBitrr/static/assets/vendor.js.map +1 -0
  43. qBitrr/static/assets/visibility.svg +9 -0
  44. qBitrr/static/index.html +47 -0
  45. qBitrr/static/manifest.json +23 -0
  46. qBitrr/static/sw.js +105 -0
  47. qBitrr/static/vite.svg +1 -0
  48. qBitrr/tables.py +44 -0
  49. qBitrr/utils.py +82 -15
  50. qBitrr/versioning.py +136 -0
  51. qBitrr/webui.py +2612 -0
  52. qbitrr2-5.4.5.dist-info/METADATA +1116 -0
  53. qbitrr2-5.4.5.dist-info/RECORD +61 -0
  54. {qBitrr2-4.10.9.dist-info → qbitrr2-5.4.5.dist-info}/WHEEL +1 -1
  55. qBitrr2-4.10.9.dist-info/METADATA +0 -233
  56. qBitrr2-4.10.9.dist-info/RECORD +0 -19
  57. {qBitrr2-4.10.9.dist-info → qbitrr2-5.4.5.dist-info}/entry_points.txt +0 -0
  58. {qBitrr2-4.10.9.dist-info → qbitrr2-5.4.5.dist-info/licenses}/LICENSE +0 -0
  59. {qBitrr2-4.10.9.dist-info → qbitrr2-5.4.5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,4 @@
1
+ import{u as jt,p as Nt,q as wt,j as i,I as N,s as tt,C as rt,i as It,R as At}from"./app.js";import{r as b}from"./table.js";import{g as Ot}from"./vendor.js";import{S as Ct}from"./react-select.esm.js";var nt=Symbol.for("immer-nothing"),qe=Symbol.for("immer-draftable"),w=Symbol.for("immer-state");function O(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var te=Object.getPrototypeOf;function Y(e){return!!e&&!!e[w]}function z(e){return e?it(e)||Array.isArray(e)||!!e[qe]||!!e.constructor?.[qe]||se(e)||me(e):!1}var Pt=Object.prototype.constructor.toString(),$e=new WeakMap;function it(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=$e.get(r);return n===void 0&&(n=Function.toString.call(r),$e.set(r,n)),n===Pt}function ue(e,t,r=!0){pe(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function pe(e){const t=e[w];return t?t.type_:Array.isArray(e)?1:se(e)?2:me(e)?3:0}function Ee(e,t){return pe(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function st(e,t,r){const n=pe(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Ft(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function se(e){return e instanceof Map}function me(e){return e instanceof Set}function B(e){return e.copy_||e.base_}function je(e,t){if(se(e))return new Map(e);if(me(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=it(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[w];let s=Reflect.ownKeys(n);for(let a=0;a<s.length;a++){const l=s[a],c=n[l];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[l]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[l]})}return Object.create(te(e),n)}else{const n=te(e);if(n!==null&&r)return{...e};const s=Object.create(n);return Object.assign(s,e)}}function Oe(e,t=!1){return be(e)||Y(e)||!z(e)||(pe(e)>1&&Object.defineProperties(e,{set:le,add:le,clear:le,delete:le}),Object.freeze(e),t&&Object.values(e).forEach(r=>Oe(r,!0))),e}function kt(){O(2)}var le={value:kt};function be(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Mt={};function W(e){const t=Mt[e];return t||O(0,e),t}var re;function at(){return re}function Ut(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Be(e,t){t&&(W("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ne(e){we(e),e.drafts_.forEach(Dt),e.drafts_=null}function we(e){e===re&&(re=e.parent_)}function ze(e){return re=Ut(re,e)}function Dt(e){const t=e[w];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function We(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[w].modified_&&(Ne(t),O(4)),z(e)&&(e=de(t,e),t.parent_||fe(t,e)),t.patches_&&W("Patches").generateReplacementPatches_(r[w].base_,e,t.patches_,t.inversePatches_)):e=de(t,r,[]),Ne(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nt?e:void 0}function de(e,t,r){if(be(t))return t;const n=e.immer_.shouldUseStrictIteration(),s=t[w];if(!s)return ue(t,(a,l)=>Ke(e,s,t,a,l,r),n),t;if(s.scope_!==e)return t;if(!s.modified_)return fe(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const a=s.copy_;let l=a,c=!1;s.type_===3&&(l=new Set(a),a.clear(),c=!0),ue(l,(d,o)=>Ke(e,s,a,d,o,r,c),n),fe(e,a,!1),r&&e.patches_&&W("Patches").generatePatches_(s,r,e.patches_,e.inversePatches_)}return s.copy_}function Ke(e,t,r,n,s,a,l){if(s==null||typeof s!="object"&&!l)return;const c=be(s);if(!(c&&!l)){if(Y(s)){const d=a&&t&&t.type_!==3&&!Ee(t.assigned_,n)?a.concat(n):void 0,o=de(e,s,d);if(st(r,n,o),Y(o))e.canAutoFreeze_=!1;else return}else l&&r.add(s);if(z(s)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===s&&c)return;de(e,s),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(se(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&fe(e,s)}}}function fe(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oe(t,r)}function Lt(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:at(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=n,a=Ce;r&&(s=[n],a=ne);const{revoke:l,proxy:c}=Proxy.revocable(s,a);return n.draft_=c,n.revoke_=l,c}var Ce={get(e,t){if(t===w)return e;const r=B(e);if(!Ee(r,t))return qt(e,r,t);const n=r[t];return e.finalized_||!z(n)?n:n===Se(e.base_,t)?(ve(e),e.copy_[t]=Ae(n,e)):n},has(e,t){return t in B(e)},ownKeys(e){return Reflect.ownKeys(B(e))},set(e,t,r){const n=ot(B(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const s=Se(B(e),t),a=s?.[w];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Ft(r,s)&&(r!==void 0||Ee(e.base_,t)))return!0;ve(e),Ie(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Se(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ve(e),Ie(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=B(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){O(11)},getPrototypeOf(e){return te(e.base_)},setPrototypeOf(){O(12)}},ne={};ue(Ce,(e,t)=>{ne[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ne.deleteProperty=function(e,t){return ne.set.call(this,e,t,void 0)};ne.set=function(e,t,r){return Ce.set.call(this,e[0],t,r,e[0])};function Se(e,t){const r=e[w];return(r?B(r):e)[t]}function qt(e,t,r){const n=ot(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function ot(e,t){if(!(t in e))return;let r=te(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=te(r)}}function Ie(e){e.modified_||(e.modified_=!0,e.parent_&&Ie(e.parent_))}function ve(e){e.copy_||(e.copy_=je(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $t=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const l=this;return function(d=a,...o){return l.produce(d,y=>r.call(this,y,...o))}}typeof r!="function"&&O(6),n!==void 0&&typeof n!="function"&&O(7);let s;if(z(t)){const a=ze(this),l=Ae(t,void 0);let c=!0;try{s=r(l),c=!1}finally{c?Ne(a):we(a)}return Be(a,n),We(s,a)}else if(!t||typeof t!="object"){if(s=r(t),s===void 0&&(s=t),s===nt&&(s=void 0),this.autoFreeze_&&Oe(s,!0),n){const a=[],l=[];W("Patches").generateReplacementPatches_(t,s,a,l),n(a,l)}return s}else O(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,d=>t(d,...c));let n,s;return[this.produce(t,r,(l,c)=>{n=l,s=c}),n,s]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){z(e)||O(8),Y(e)&&(e=Bt(e));const t=ze(this),r=Ae(e,void 0);return r[w].isManual_=!0,we(t),r}finishDraft(e,t){const r=e&&e[w];(!r||!r.isManual_)&&O(9);const{scope_:n}=r;return Be(n,t),We(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));const n=W("Patches").applyPatches_;return Y(e)?n(e,t):this.produce(e,s=>n(s,t))}};function Ae(e,t){const r=se(e)?W("MapSet").proxyMap_(e,t):me(e)?W("MapSet").proxySet_(e,t):Lt(e,t);return(t?t.scope_:at()).drafts_.push(r),r}function Bt(e){return Y(e)||O(10,e),lt(e)}function lt(e){if(!z(e)||be(e))return e;const t=e[w];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=je(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=je(e,!0);return ue(r,(s,a)=>{st(r,s,lt(a))},n),t&&(t.finalized_=!1),r}var zt=new $t,ce=zt.produce,xe,Ge;function Wt(){return Ge||(Ge=1,xe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=n;s--!==0;){var l=a[s];if(!e(t[l],r[l]))return!1}return!0}return t!==t&&r!==r}),xe}var Kt=Wt();const He=Ot(Kt);var Gt=typeof global=="object"&&global&&global.Object===Object&&global,Ht=typeof self=="object"&&self&&self.Object===Object&&self,Pe=Gt||Ht||Function("return this")(),Q=Pe.Symbol,ct=Object.prototype,Yt=ct.hasOwnProperty,Qt=ct.toString,Z=Q?Q.toStringTag:void 0;function Vt(e){var t=Yt.call(e,Z),r=e[Z];try{e[Z]=void 0;var n=!0}catch{}var s=Qt.call(e);return n&&(t?e[Z]=r:delete e[Z]),s}var Xt=Object.prototype,Jt=Xt.toString;function Zt(e){return Jt.call(e)}var er="[object Null]",tr="[object Undefined]",Ye=Q?Q.toStringTag:void 0;function ut(e){return e==null?e===void 0?tr:er:Ye&&Ye in Object(e)?Vt(e):Zt(e)}function rr(e){return e!=null&&typeof e=="object"}var nr="[object Symbol]";function Fe(e){return typeof e=="symbol"||rr(e)&&ut(e)==nr}function ir(e,t){for(var r=-1,n=e==null?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}var ke=Array.isArray,Qe=Q?Q.prototype:void 0,Ve=Qe?Qe.toString:void 0;function dt(e){if(typeof e=="string")return e;if(ke(e))return ir(e,dt)+"";if(Fe(e))return Ve?Ve.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function he(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sr="[object AsyncFunction]",ar="[object Function]",or="[object GeneratorFunction]",lr="[object Proxy]";function cr(e){if(!he(e))return!1;var t=ut(e);return t==ar||t==or||t==sr||t==lr}var _e=Pe["__core-js_shared__"],Xe=(function(){var e=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function ur(e){return!!Xe&&Xe in e}var dr=Function.prototype,fr=dr.toString;function hr(e){if(e!=null){try{return fr.call(e)}catch{}try{return e+""}catch{}}return""}var pr=/[\\^$.*+?()[\]{}|]/g,mr=/^\[object .+?Constructor\]$/,br=Function.prototype,yr=Object.prototype,gr=br.toString,Sr=yr.hasOwnProperty,vr=RegExp("^"+gr.call(Sr).replace(pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xr(e){if(!he(e)||ur(e))return!1;var t=cr(e)?vr:mr;return t.test(hr(e))}function _r(e,t){return e?.[t]}function Me(e,t){var r=_r(e,t);return xr(r)?r:void 0}var Je=(function(){try{var e=Me(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Tr=9007199254740991,Rr=/^(?:0|[1-9]\d*)$/;function Er(e,t){var r=typeof e;return t=t??Tr,!!t&&(r=="number"||r!="symbol"&&Rr.test(e))&&e>-1&&e%1==0&&e<t}function jr(e,t,r){t=="__proto__"&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ft(e,t){return e===t||e!==e&&t!==t}var Nr=Object.prototype,wr=Nr.hasOwnProperty;function Ir(e,t,r){var n=e[t];(!(wr.call(e,t)&&ft(n,r))||r===void 0&&!(t in e))&&jr(e,t,r)}var Ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Or=/^\w*$/;function Cr(e,t){if(ke(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Fe(e)?!0:Or.test(e)||!Ar.test(e)||t!=null&&e in Object(t)}var ie=Me(Object,"create");function Pr(){this.__data__=ie?ie(null):{},this.size=0}function Fr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kr="__lodash_hash_undefined__",Mr=Object.prototype,Ur=Mr.hasOwnProperty;function Dr(e){var t=this.__data__;if(ie){var r=t[e];return r===kr?void 0:r}return Ur.call(t,e)?t[e]:void 0}var Lr=Object.prototype,qr=Lr.hasOwnProperty;function $r(e){var t=this.__data__;return ie?t[e]!==void 0:qr.call(t,e)}var Br="__lodash_hash_undefined__";function zr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ie&&t===void 0?Br:t,this}function K(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}K.prototype.clear=Pr;K.prototype.delete=Fr;K.prototype.get=Dr;K.prototype.has=$r;K.prototype.set=zr;function Wr(){this.__data__=[],this.size=0}function ye(e,t){for(var r=e.length;r--;)if(ft(e[r][0],t))return r;return-1}var Kr=Array.prototype,Gr=Kr.splice;function Hr(e){var t=this.__data__,r=ye(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Gr.call(t,r,1),--this.size,!0}function Yr(e){var t=this.__data__,r=ye(t,e);return r<0?void 0:t[r][1]}function Qr(e){return ye(this.__data__,e)>-1}function Vr(e,t){var r=this.__data__,n=ye(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function V(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}V.prototype.clear=Wr;V.prototype.delete=Hr;V.prototype.get=Yr;V.prototype.has=Qr;V.prototype.set=Vr;var Xr=Me(Pe,"Map");function Jr(){this.size=0,this.__data__={hash:new K,map:new(Xr||V),string:new K}}function Zr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ge(e,t){var r=e.__data__;return Zr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function en(e){var t=ge(this,e).delete(e);return this.size-=t?1:0,t}function tn(e){return ge(this,e).get(e)}function rn(e){return ge(this,e).has(e)}function nn(e,t){var r=ge(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function G(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}G.prototype.clear=Jr;G.prototype.delete=en;G.prototype.get=tn;G.prototype.has=rn;G.prototype.set=nn;var sn="Expected a function";function Ue(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(sn);var r=function(){var n=arguments,s=t?t.apply(this,n):n[0],a=r.cache;if(a.has(s))return a.get(s);var l=e.apply(this,n);return r.cache=a.set(s,l)||a,l};return r.cache=new(Ue.Cache||G),r}Ue.Cache=G;var an=500;function on(e){var t=Ue(e,function(n){return r.size===an&&r.clear(),n}),r=t.cache;return t}var ln=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cn=/\\(\\)?/g,un=on(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ln,function(r,n,s,a){t.push(s?a.replace(cn,"$1"):n||r)}),t});function dn(e){return e==null?"":dt(e)}function ht(e,t){return ke(e)?e:Cr(e,t)?[e]:un(dn(e))}function pt(e){if(typeof e=="string"||Fe(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function fn(e,t){t=ht(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pt(t[r++])];return r&&r==n?e:void 0}function hn(e,t,r){var n=e==null?void 0:fn(e,t);return n===void 0?r:n}function pn(e,t,r,n){if(!he(e))return e;t=ht(t,e);for(var s=-1,a=t.length,l=a-1,c=e;c!=null&&++s<a;){var d=pt(t[s]),o=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(s!=l){var y=c[d];o=void 0,o===void 0&&(o=he(y)?y:Er(t[s+1])?[]:{})}Ir(c,d,o),c=c[d]}return e}function mn(e,t,r){return e==null?e:pn(e,t,r)}const M={"Settings.ConsoleLevel":"Level of logging; choose between CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACE.","Settings.Logging":"Enable writing log output to files.","Settings.CompletedDownloadFolder":"Folder where completed downloads are stored. Replace backslashes with forward slashes.","Settings.FreeSpace":"Desired free space threshold (use K, M, G, T suffix). Set to -1 to disable the free space guard.","Settings.FreeSpaceFolder":"Path used when checking free space. Replace backslashes with forward slashes.","Settings.AutoPauseResume":"Automatically pause and resume torrents in response to the free space guard.","Settings.NoInternetSleepTimer":"Delay, in seconds, before retrying when no internet connectivity is detected.","Settings.LoopSleepTimer":"Delay, in seconds, between processing passes when monitoring torrents.","Settings.SearchLoopDelay":"Delay, in seconds, between media search requests.","Settings.FailedCategory":"Category that marks torrents as failed.","Settings.RecheckCategory":"Category that triggers recheck handling.","Settings.Tagless":"Enable tagless operation when categories are not used.","Settings.IgnoreTorrentsYoungerThan":"Ignore torrents younger than this many seconds when evaluating failures.","Settings.PingURLS":"Hostnames used to test for internet connectivity. They are pinged frequently.","Settings.FFprobeAutoUpdate":"Download and update the bundled ffprobe binary automatically.","Settings.AutoUpdateEnabled":"Enable the background worker that periodically checks for qBitrr updates.","Settings.AutoUpdateCron":"Cron expression describing when to check for updates (default weekly Sunday at 03:00).","WebUI.Host":"Interface address for the built-in WebUI. 0.0.0.0 binds on all interfaces.","WebUI.Port":"Port number for the built-in WebUI.","WebUI.Token":"Optional bearer token required by the WebUI/API. Leave empty to disable authentication.","WebUI.LiveArr":"Enable live updates for Arr views.","WebUI.GroupSonarr":"Group Sonarr views by series and seasons in collapsible sections.","WebUI.Theme":"Choose the visual theme for the WebUI (light or dark).","qBit.Disabled":"Disable qBitrr's direct qBittorrent integration (headless mode for search-only setups).","qBit.Host":"qBittorrent WebUI host or IP address.","qBit.Port":"qBittorrent WebUI port.","qBit.UserName":"qBittorrent WebUI username.","qBit.Password":"qBittorrent WebUI password. Remove this if authentication is bypassed for the host.","ARR.Managed":"Toggle whether this Servarr instance is actively managed by qBitrr.","ARR.URI":"Servarr URL, including protocol and port if needed (for example http://localhost:8989).","ARR.APIKey":"Servarr API key from Settings > General > Security.","ARR.Category":"qBittorrent category applied by the Servarr instance to its downloads.","ARR.ReSearch":"Re-run searches for failed torrents that qBitrr removes.","ARR.importMode":"Preferred import mode (Move, Copy, or Auto) when Servarr grabs completed files.","ARR.RssSyncTimer":"Interval, in minutes, between RSS sync requests (0 disables the task).","ARR.RefreshDownloadsTimer":"Interval, in minutes, between queue refresh requests (0 disables the task).","ARR.ArrErrorCodesToBlocklist":"List of Servarr error messages that should trigger blocklisting and cleanup.","EntrySearch.SearchMissing":"Search for missing media items.","EntrySearch.AlsoSearchSpecials":"Include season 0 specials in missing searches.","EntrySearch.Unmonitored":"Include unmonitored series or episodes in searches.","EntrySearch.SearchLimit":"Maximum number of concurrent search tasks (Servarr enforces its own limits).","EntrySearch.SearchByYear":"Order searches by the year the episode or movie first aired.","EntrySearch.SearchInReverse":"Reverse search order (search oldest to newest instead of newest to oldest).","EntrySearch.SearchRequestsEvery":"Delay, in seconds, between submitting individual search requests.","EntrySearch.DoUpgradeSearch":"Search for improved releases even if a file already exists.","EntrySearch.QualityUnmetSearch":"Search again when the quality requirements were not met.","EntrySearch.CustomFormatUnmetSearch":"Search again when the minimum custom format score was not met.","EntrySearch.ForceMinimumCustomFormat":"Automatically remove torrents that do not meet the minimum custom format score.","EntrySearch.SearchAgainOnSearchCompletion":"Restart the search loop when the configured year range is exhausted.","EntrySearch.UseTempForMissing":"Switch to temporary profiles when searching for missing media.","EntrySearch.KeepTempProfile":"Do not revert to the main profile after using the temp profile.","EntrySearch.MainQualityProfile":"Primary quality profile names, in the same order as the temporary profiles.","EntrySearch.TempQualityProfile":"Temporary quality profile names, paired with the primary profiles.","EntrySearch.SearchBySeries":"Search by entire series instead of individual episodes when applicable.","EntrySearch.PrioritizeTodaysReleases":"Prioritise items released today (similar to RSS prioritisation).","EntrySearch.Ombi.SearchOmbiRequests":"Pull pending Ombi requests when SearchMissing is enabled.","EntrySearch.Ombi.OmbiURI":"Ombi server URL.","EntrySearch.Ombi.OmbiAPIKey":"Ombi API key.","EntrySearch.Ombi.ApprovedOnly":"Only process Ombi requests that are approved.","EntrySearch.Ombi.Is4K":"Treat this Ombi configuration as 4K specific.","EntrySearch.Overseerr.SearchOverseerrRequests":"Pull Overseerr requests when SearchMissing is enabled.","EntrySearch.Overseerr.OverseerrURI":"Overseerr server URL.","EntrySearch.Overseerr.OverseerrAPIKey":"Overseerr API key.","EntrySearch.Overseerr.ApprovedOnly":"Only process Overseerr requests that are approved.","EntrySearch.Overseerr.Is4K":"Treat this Overseerr configuration as 4K specific.","Torrent.CaseSensitiveMatches":"When enabled, regex matches will respect case; otherwise they are case-insensitive.","Torrent.FolderExclusionRegex":"Regex patterns that exclude folders outright (full-name match).","Torrent.FileNameExclusionRegex":"Regex patterns that exclude individual files based on the file name.","Torrent.FileExtensionAllowlist":"Allowed file extensions (or regex) for downloads; leave empty to allow all.","Torrent.AutoDelete":"Automatically delete files that are not recognised as media.","Torrent.IgnoreTorrentsYoungerThan":"Ignore torrents younger than this many seconds for failure handling.","Torrent.MaximumETA":"Maximum allowed remaining ETA in seconds; values above this are considered stalled.","Torrent.MaximumDeletablePercentage":"Upper bound for completion percentage when deciding to delete a torrent.","Torrent.DoNotRemoveSlow":"Ignore slow torrents when pruning.","Torrent.StalledDelay":"Minutes to allow stalled torrents before taking action (-1 disables, 0 is infinite).","Torrent.ReSearchStalled":"Re-run searches for stalled torrents before or after removal depending on configuration.","Torrent.RemoveDeadTrackers":"Remove trackers flagged as dead.","Torrent.RemoveTrackerWithMessage":"Tracker status messages that should trigger tracker removal when RemoveDeadTrackers is enabled.","Torrent.SeedingMode.DownloadRateLimitPerTorrent":"Per-torrent download rate limit in bytes per second (-1 disables the limit).","Torrent.SeedingMode.UploadRateLimitPerTorrent":"Per-torrent upload rate limit in bytes per second (-1 disables the limit).","Torrent.SeedingMode.MaxUploadRatio":"Maximum allowed upload ratio (-1 disables the limit).","Torrent.SeedingMode.MaxSeedingTime":"Maximum seeding duration in seconds (-1 disables the limit).","Torrent.SeedingMode.RemoveTorrent":"Removal policy: -1 do not remove, 1 remove on ratio, 2 remove on time, 3 remove on ratio or time, 4 remove on ratio and time."};function Ze(e){const t=e.join(".");if(M[t])return M[t];if(e.length>1){const n=["ARR",...e.slice(1)].join(".");if(M[n])return M[n];const s=["EntrySearch",...e.slice(2)].join(".");if(e[1]==="EntrySearch"&&M[s])return M[s];const a=["Torrent",...e.slice(2)].join(".");if(e[1]==="Torrent"&&M[a])return M[a]}const r=e[e.length-1];return M[r]}const bn="/static/assets/visibility.svg",mt="/static/assets/plus.svg",De="/static/assets/check-mark.svg",bt="/static/assets/trash.svg",Le=/(rad|son|anim|lid)arr/i,yn=()=>{const e=document.documentElement.getAttribute("data-theme")==="dark";return{control:t=>({...t,background:e?"#0f131a":"#ffffff",color:e?"#eaeef2":"#1d1d1f",borderColor:e?"#2a2f36":"#d2d2d7",minHeight:"38px",boxShadow:"none","&:hover":{borderColor:e?"#3a4149":"#b8b8bd"}}),menu:t=>({...t,background:e?"#0f131a":"#ffffff",borderColor:e?"#2a2f36":"#d2d2d7",border:`1px solid ${e?"#2a2f36":"#d2d2d7"}`}),option:(t,r)=>({...t,background:r.isFocused?e?"rgba(122, 162, 247, 0.15)":"rgba(0, 113, 227, 0.1)":e?"#0f131a":"#ffffff",color:e?"#eaeef2":"#1d1d1f","&:active":{background:e?"rgba(122, 162, 247, 0.25)":"rgba(0, 113, 227, 0.2)"}}),singleValue:t=>({...t,color:e?"#eaeef2":"#1d1d1f"}),input:t=>({...t,color:e?"#eaeef2":"#1d1d1f"}),placeholder:t=>({...t,color:e?"#9aa3ac":"#6e6e73"}),menuList:t=>({...t,padding:"4px"})}},L=e=>String(e).split(",").map(t=>t.trim()).filter(Boolean),q=e=>Array.isArray(e)?e.join(", "):String(e??""),gn=["Move","Copy","Auto"],Sn=/(.+?[.!?])(\s|$)/;function yt(e){if(!e)return;const t=e.trim();if(!t)return;const r=t.match(Sn),n=r?r[1]:t;return n.length>160?`${n.slice(0,157)}…`:n}const gt=[{label:"Console Level",path:["Settings","ConsoleLevel"],type:"select",options:["CRITICAL","ERROR","WARNING","NOTICE","INFO","DEBUG","TRACE"],required:!0},{label:"Logging",path:["Settings","Logging"],type:"checkbox"},{label:"Completed Download Folder",path:["Settings","CompletedDownloadFolder"],type:"text",required:!0,validate:e=>{const t=String(e??"").trim();if(!t||t.toUpperCase()==="CHANGE_ME")return"Completed Download Folder must be set to a valid path."}},{label:"Free Space",path:["Settings","FreeSpace"],type:"text",required:!0,validate:e=>{const t=String(e??"").trim();if(!t)return"Free Space must be provided.";if(t!=="-1"&&!/^-?\d+(\.\d+)?[KMGTP]?$/i.test(t))return"Free Space must be -1 or a number optionally suffixed with K, M, G, T, or P."}},{label:"Free Space Folder",path:["Settings","FreeSpaceFolder"],type:"text",validate:(e,t)=>{const r=F(t.root,["Settings","FreeSpace"]);if(!(String(r??"").trim()!=="-1"))return;const s=String(e??"").trim();if(!s||s.toUpperCase()==="CHANGE_ME")return"Free Space Folder is required when Free Space monitoring is enabled."}},{label:"Auto Pause/Resume",path:["Settings","AutoPauseResume"],type:"checkbox"},{label:"No Internet Sleep (s)",path:["Settings","NoInternetSleepTimer"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"No Internet Sleep must be a non-negative number."}},{label:"Loop Sleep (s)",path:["Settings","LoopSleepTimer"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"Loop Sleep must be a non-negative number."}},{label:"Search Loop Delay (s)",path:["Settings","SearchLoopDelay"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"Search Loop Delay must be a non-negative number."}},{label:"Failed Category",path:["Settings","FailedCategory"],type:"text"},{label:"Recheck Category",path:["Settings","RecheckCategory"],type:"text"},{label:"Tagless",path:["Settings","Tagless"],type:"checkbox"},{label:"Ignore Torrents Younger Than",path:["Settings","IgnoreTorrentsYoungerThan"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"Ignore Torrents Younger Than must be a non-negative number."}},{label:"Ping URLs",path:["Settings","PingURLS"],type:"text",parse:L,format:q,placeholder:"one.one.one.one, dns.google.com"},{label:"FFprobe Auto Update",path:["Settings","FFprobeAutoUpdate"],type:"checkbox"},{label:"Auto Update Enabled",path:["Settings","AutoUpdateEnabled"],type:"checkbox"},{label:"Auto Update Cron",path:["Settings","AutoUpdateCron"],type:"text",placeholder:"0 3 * * 0",required:!0,validate:e=>{const r=String(e??"").trim().split(/\s+/).filter(Boolean);if(r.length<5||r.length>6)return"Auto Update Cron must contain 5 or 6 space-separated fields."}}],St=[{label:"WebUI Host",path:["WebUI","Host"],type:"text",required:!0,validate:e=>{if(!String(e??"").trim())return"WebUI Host is required."}},{label:"WebUI Port",path:["WebUI","Port"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isInteger(t)||t<1||t>65535)return"WebUI Port must be between 1 and 65535."}},{label:"WebUI Token",path:["WebUI","Token"],type:"password",secure:!0,fullWidth:!0}],vt=[{label:"Disabled",path:["qBit","Disabled"],type:"checkbox"},{label:"Host",path:["qBit","Host"],type:"text",required:!0,validate:e=>{if(!String(e??"").trim())return"qBit Host is required."}},{label:"Port",path:["qBit","Port"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isInteger(t)||t<1||t>65535)return"qBit Port must be between 1 and 65535."}},{label:"UserName",path:["qBit","UserName"],type:"text"},{label:"Password",path:["qBit","Password"],type:"password"}],vn=[{label:"Display Name",type:"text",placeholder:"Sonarr-TV",sectionName:!0},{label:"Managed",path:["Managed"],type:"checkbox"},{label:"URI",path:["URI"],type:"text",placeholder:"http://host:port",required:!0,validate:(e,t)=>{const r=String(e??"").trim();if(F(t.section??{},["Managed"])&&(!r||r.toUpperCase()==="CHANGE_ME"))return"URI must be set to a valid URL when the instance is managed."}},{label:"API Key",path:["APIKey"],type:"password",secure:!0,required:!0,validate:(e,t)=>{const r=String(e??"").trim();if(F(t.section??{},["Managed"])&&(!r||r.toUpperCase()==="CHANGE_ME"))return"API Key must be provided when the instance is managed."}},{label:"Category",path:["Category"],type:"text",required:!0,validate:e=>{if(!String(e??"").trim())return"Category is required."}},{label:"Re-search",path:["ReSearch"],type:"checkbox"},{label:"Import Mode",path:["importMode"],type:"select",options:gn,required:!0},{label:"RSS Sync Timer (min)",path:["RssSyncTimer"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"RSS Sync Timer must be a non-negative number."}},{label:"Refresh Downloads Timer (min)",path:["RefreshDownloadsTimer"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"Refresh Downloads Timer must be a non-negative number."}},{label:"Arr Error Codes To Blocklist",path:["ArrErrorCodesToBlocklist"],type:"text",parse:L,format:q}],xn=[{label:"Search Missing",path:["EntrySearch","SearchMissing"],type:"checkbox"},{label:"Also Search Specials",path:["EntrySearch","AlsoSearchSpecials"],type:"checkbox"},{label:"Unmonitored",path:["EntrySearch","Unmonitored"],type:"checkbox"},{label:"Do Upgrade Search",path:["EntrySearch","DoUpgradeSearch"],type:"checkbox"},{label:"Quality Unmet Search",path:["EntrySearch","QualityUnmetSearch"],type:"checkbox"},{label:"Custom Format Unmet Search",path:["EntrySearch","CustomFormatUnmetSearch"],type:"checkbox"},{label:"Force Minimum Custom Format",path:["EntrySearch","ForceMinimumCustomFormat"],type:"checkbox"},{label:"Search Limit",path:["EntrySearch","SearchLimit"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<1)return"Search Limit must be at least 1."}},{label:"Search By Year",path:["EntrySearch","SearchByYear"],type:"checkbox"},{label:"Search In Reverse",path:["EntrySearch","SearchInReverse"],type:"checkbox"},{label:"Search Requests Every (s)",path:["EntrySearch","SearchRequestsEvery"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<1)return"Search Requests Every must be at least 1 second."}},{label:"Search Again On Completion",path:["EntrySearch","SearchAgainOnSearchCompletion"],type:"checkbox"},{label:"Use Temp Profile For Missing",path:["EntrySearch","UseTempForMissing"],type:"checkbox"},{label:"Keep Temp Profile",path:["EntrySearch","KeepTempProfile"],type:"checkbox"},{label:"Main Quality Profile",path:["EntrySearch","MainQualityProfile"],type:"text",parse:L,format:q},{label:"Temp Quality Profile",path:["EntrySearch","TempQualityProfile"],type:"text",parse:L,format:q},{label:"Search By Series",path:["EntrySearch","SearchBySeries"],type:"select",options:["smart","true","false"],description:"smart = auto (series search for multiple episodes, episode search for single), true = always series search, false = always episode search",format:e=>typeof e=="boolean"?e?"true":"false":String(e||"smart"),parse:e=>{const t=String(e);return t==="true"||t==="false"?t:"smart"}},{label:"Prioritize Today's Releases",path:["EntrySearch","PrioritizeTodaysReleases"],type:"checkbox"}],_n=[{label:"Search Ombi Requests",path:["EntrySearch","Ombi","SearchOmbiRequests"],type:"checkbox"},{label:"Ombi URI",path:["EntrySearch","Ombi","OmbiURI"],type:"text",placeholder:"http://host:port"},{label:"Ombi API Key",path:["EntrySearch","Ombi","OmbiAPIKey"],type:"password"},{label:"Approved Only",path:["EntrySearch","Ombi","ApprovedOnly"],type:"checkbox"},{label:"Is 4K Instance",path:["EntrySearch","Ombi","Is4K"],type:"checkbox"}],Tn=[{label:"Search Overseerr Requests",path:["EntrySearch","Overseerr","SearchOverseerrRequests"],type:"checkbox"},{label:"Overseerr URI",path:["EntrySearch","Overseerr","OverseerrURI"],type:"text",placeholder:"http://host:port"},{label:"Overseerr API Key",path:["EntrySearch","Overseerr","OverseerrAPIKey"],type:"password"},{label:"Approved Only",path:["EntrySearch","Overseerr","ApprovedOnly"],type:"checkbox"},{label:"Is 4K Instance",path:["EntrySearch","Overseerr","Is4K"],type:"checkbox"}],Rn=[{label:"Case Sensitive Matches",path:["Torrent","CaseSensitiveMatches"],type:"checkbox"},{label:"Folder Exclusion Regex",path:["Torrent","FolderExclusionRegex"],type:"text",parse:L,format:q},{label:"File Name Exclusion Regex",path:["Torrent","FileNameExclusionRegex"],type:"text",parse:L,format:q},{label:"File Extension Allowlist",path:["Torrent","FileExtensionAllowlist"],type:"text",parse:L,format:q},{label:"Auto Delete",path:["Torrent","AutoDelete"],type:"checkbox"},{label:"Ignore Torrents Younger Than (s)",path:["Torrent","IgnoreTorrentsYoungerThan"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"Ignore Torrents Younger Than must be a non-negative number."}},{label:"Maximum ETA (s)",path:["Torrent","MaximumETA"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Maximum ETA must be -1 or a non-negative number."}},{label:"Maximum Deletable Percentage",path:["Torrent","MaximumDeletablePercentage"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0||t>100)return"Maximum Deletable Percentage must be between 0 and 100."}},{label:"Do Not Remove Slow",path:["Torrent","DoNotRemoveSlow"],type:"checkbox"},{label:"Stalled Delay (min)",path:["Torrent","StalledDelay"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"Stalled Delay must be a non-negative number."}},{label:"Re-search Stalled",path:["Torrent","ReSearchStalled"],type:"checkbox"},{label:"Remove Dead Trackers",path:["Torrent","RemoveDeadTrackers"],type:"checkbox"},{label:"Remove Tracker Messages",path:["Torrent","RemoveTrackerWithMessage"],type:"text",parse:L,format:q}],En=[{label:"Download Rate Limit Per Torrent",path:["Torrent","SeedingMode","DownloadRateLimitPerTorrent"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Download Rate Limit must be -1 or greater."}},{label:"Upload Rate Limit Per Torrent",path:["Torrent","SeedingMode","UploadRateLimitPerTorrent"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Upload Rate Limit must be -1 or greater."}},{label:"Max Upload Ratio",path:["Torrent","SeedingMode","MaxUploadRatio"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Max Upload Ratio must be -1 or greater."}},{label:"Max Seeding Time (s)",path:["Torrent","SeedingMode","MaxSeedingTime"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Max Seeding Time must be -1 or greater."}},{label:"Remove Torrent (policy)",path:["Torrent","SeedingMode","RemoveTorrent"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t))return"Remove Torrent policy must be a number.";if(t!==-1&&![1,2,3,4].includes(t))return"Remove Torrent policy must be -1, 1, 2, 3, or 4."}}],jn=[{label:"Name",path:["Name"],type:"text",required:!0},{label:"URI",path:["URI"],type:"text",required:!0},{label:"Priority",path:["Priority"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<0)return"Priority must be a non-negative number."}},{label:"Maximum ETA",path:["MaximumETA"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Maximum ETA must be -1 or a non-negative number."}},{label:"Download Rate Limit",path:["DownloadRateLimit"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Download Rate Limit must be -1 or greater."}},{label:"Upload Rate Limit",path:["UploadRateLimit"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Upload Rate Limit must be -1 or greater."}},{label:"Max Upload Ratio",path:["MaxUploadRatio"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Max Upload Ratio must be -1 or greater."}},{label:"Max Seeding Time",path:["MaxSeedingTime"],type:"number",validate:e=>{const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t)||t<-1)return"Max Seeding Time must be -1 or greater."}},{label:"Add Tracker If Missing",path:["AddTrackerIfMissing"],type:"checkbox"},{label:"Remove If Exists",path:["RemoveIfExists"],type:"checkbox"},{label:"Super Seed Mode",path:["SuperSeedMode"],type:"checkbox"},{label:"Add Tags",path:["AddTags"],type:"text",parse:L,format:q}];function xt(e){const t=e.toLowerCase(),r=t.includes("sonarr"),n=t.includes("lidarr"),s=[...vn],a=xn.filter(S=>{if(!S.path)return!0;const g=S.path.join(".");return!(!r&&(g==="EntrySearch.AlsoSearchSpecials"||g==="EntrySearch.SearchBySeries"||g==="EntrySearch.PrioritizeTodaysReleases")||n&&g==="EntrySearch.SearchByYear")}),l=n?[]:[..._n],c=n?[]:[...Tn],d=[...Rn],o=[...En],y=[...jn];return{generalFields:s,entryFields:a,entryOmbiFields:l,entryOverseerrFields:c,torrentFields:d,seedingFields:o,trackerFields:y}}function et(e){return e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0}function Nn(e,t){const r=e.label,n=e.required??(e.type==="number"||e.type==="select");switch(e.type){case"text":case"password":return n&&et(t)?`${r} is required.`:void 0;case"number":{if(t==null||t==="")return n?`${r} is required.`:void 0;const s=typeof t=="number"?t:Number(t);return Number.isFinite(s)?void 0:`${r} must be a valid number.`}case"checkbox":return t==null?n?`${r} is required.`:void 0:typeof t!="boolean"?`${r} must be true or false.`:void 0;case"select":return et(t)?`${r} is required.`:typeof t!="string"?`${r} must be selected.`:e.options&&!e.options.includes(t)?`${r} must be one of ${e.options.join(", ")}.`:void 0;default:return}}function U(e,t,r,n,s){if(r)for(const a of t){if(a.sectionName)continue;const l=a.path??[],c=l.length?F(r,l):void 0,d=[...n,...l],o=Nn(a,c);if(o){e.push({path:d,message:o});continue}if(a.validate){const y=a.validate(c,s);y&&e.push({path:d,message:y})}}}function wn(e){if(!e)return[];const t=[],r={root:e};U(t,gt,e,[],r),U(t,St,e,[],r),U(t,vt,e,[],r);for(const[n,s]of Object.entries(e)){if(!Le.test(n)||!s||typeof s!="object")continue;const a=s,l={root:e,section:a,sectionKey:n},c=xt(n);U(t,c.generalFields,a,[n],l),U(t,c.entryFields,a,[n],l),U(t,c.entryOmbiFields,a,[n],l),U(t,c.entryOverseerrFields,a,[n],l),U(t,c.torrentFields,a,[n],l),U(t,c.seedingFields,a,[n],l)}return t}function F(e,t){if(e)return hn(e,t)}function In(e,t,r){mn(e,t,r)}function ee(e,t=[]){const r={};for(const[n,s]of Object.entries(e)){const a=[...t,n];s&&typeof s=="object"&&!Array.isArray(s)?Object.assign(r,ee(s,a)):r[a.join(".")]=s}return r}function An(e){const t=e.toLowerCase(),r=t.includes("sonarr"),n=t.includes("radarr"),s=t.includes("lidarr"),a=n?["Not a preferred word upgrade for existing movie file(s)","Not an upgrade for existing movie file(s)","Unable to determine if file is a sample"]:s?["Not a preferred word upgrade for existing album file(s)","Not an upgrade for existing album file(s)","Unable to determine if file is a sample"]:["Not a preferred word upgrade for existing episode file(s)","Not an upgrade for existing episode file(s)","Unable to determine if file is a sample"],l={SearchMissing:!0,Unmonitored:!1,SearchLimit:5,SearchByYear:!0,SearchInReverse:!1,SearchRequestsEvery:300,DoUpgradeSearch:!1,QualityUnmetSearch:!1,CustomFormatUnmetSearch:!1,ForceMinimumCustomFormat:!1,SearchAgainOnSearchCompletion:!0,UseTempForMissing:!1,KeepTempProfile:!1,MainQualityProfile:[],TempQualityProfile:[]};return r&&(l.AlsoSearchSpecials=!1,l.SearchBySeries="smart",l.PrioritizeTodaysReleases=!0),l.Ombi={SearchOmbiRequests:!1,OmbiURI:"CHANGE_ME",OmbiAPIKey:"CHANGE_ME",ApprovedOnly:!0},l.Overseerr={SearchOverseerrRequests:!1,OverseerrURI:"CHANGE_ME",OverseerrAPIKey:"CHANGE_ME",ApprovedOnly:!0,Is4K:!1},{Managed:!0,URI:"CHANGE_ME",APIKey:"CHANGE_ME",Category:e,ReSearch:!0,importMode:"Auto",RssSyncTimer:5,RefreshDownloadsTimer:5,ArrErrorCodesToBlocklist:a,EntrySearch:l,Torrent:{CaseSensitiveMatches:!1,FolderExclusionRegex:["\\bextras?\\b","\\bfeaturettes?\\b","\\bsamples?\\b","\\bscreens?\\b","\\bnc(ed|op)?(\\\\d+)?\\b"],FileNameExclusionRegex:["\\bncop\\\\d+?\\b","\\bnced\\\\d+?\\b","\\bsample\\b","brarbg.com\\b","\\btrailer\\b","music video","comandotorrents.com"],FileExtensionAllowlist:s?[".mp3",".flac",".m4a",".aac",".ogg",".opus",".wav",".ape",".wma",".!qB",".parts",".log",".cue"]:[".mp4",".mkv",".sub",".ass",".srt",".!qB",".parts"],AutoDelete:!1,IgnoreTorrentsYoungerThan:600,MaximumETA:604800,MaximumDeletablePercentage:.99,DoNotRemoveSlow:!0,StalledDelay:15,ReSearchStalled:!1,RemoveDeadTrackers:!1,RemoveTrackerWithMessage:["skipping tracker announce (unreachable)","No such host is known","unsupported URL protocol","info hash is not authorized with this tracker"],SeedingMode:{DownloadRateLimitPerTorrent:-1,UploadRateLimitPerTorrent:-1,MaxUploadRatio:-1,MaxSeedingTime:-1,RemoveTorrent:-1}}}}function Ln(e){const{onDirtyChange:t}=e??{},{push:r}=jt(),[n,s]=b.useState(null),[a,l]=b.useState(null),[c,d]=b.useState(!1),[o,y]=b.useState(!1),S=b.useCallback(async()=>{d(!0);try{const u=await Nt();s(u),l(u?JSON.parse(JSON.stringify(u)):null)}catch(u){r(u instanceof Error?u.message:"Failed to load configuration","error")}finally{d(!1)}},[r]);b.useEffect(()=>{S()},[S]);const g=b.useCallback((u,f,h)=>{if(!a)return;const p=f.parse?.(h)??(f.type==="number"?Number(h)||0:f.type==="checkbox"?!!h:h);l(ce(a,m=>{In(m,u,p)}))},[a]),R=b.useMemo(()=>a?Object.entries(a).filter(([u,f])=>Le.test(u)&&f&&typeof f=="object"):[],[a]),C=b.useMemo(()=>{const u=[],f=[...R].sort((T,P)=>T[0].localeCompare(P[0],void 0,{numeric:!0,sensitivity:"base"})),h=[],p=[],m=[],j=[];for(const T of f){const[P]=T,E=P.toLowerCase();E.startsWith("radarr")?h.push(T):E.startsWith("sonarr")?p.push(T):E.startsWith("lidarr")?m.push(T):j.push(T)}return u.push({label:"Radarr Instances",type:"radarr",items:h}),u.push({label:"Sonarr Instances",type:"sonarr",items:p}),u.push({label:"Lidarr Instances",type:"lidarr",items:m}),j.length&&u.push({label:"Other Instances",type:"other",items:j}),u},[R]),[v,x]=b.useState(null),[ae,X]=b.useState(!1),[$,_]=b.useState(!1),[I,A]=b.useState(!1),[k,J]=b.useState(!1);b.useEffect(()=>{if(!a||!n){J(!1);return}const u=ee(n),f=ee(a),h=new Set(["WebUI.LiveArr","WebUI.GroupSonarr","WebUI.GroupLidarr","WebUI.Theme"]);let p=!1;for(const[m,j]of Object.entries(f)){if(h.has(m))continue;const T=u[m];if(!He(j,T)){p=!0;break}}if(!p){for(const m of Object.keys(u))if(!h.has(m)&&!(m in f)){p=!0;break}}J(p)},[a,n]),b.useEffect(()=>{t?.(k)},[k,t]),b.useEffect(()=>{if(!k)return;const u=f=>{f.preventDefault(),f.returnValue=""};return window.addEventListener("beforeunload",u),()=>{window.removeEventListener("beforeunload",u)}},[k]),b.useEffect(()=>()=>{t?.(!1)},[t]),b.useEffect(()=>{if(!!!(v||ae||$||I))return;const f=m=>{m.key==="Escape"&&(x(null),X(!1),A(!1))};window.addEventListener("keydown",f);const{style:h}=document.body,p=h.overflow;return h.overflow="hidden",()=>{window.removeEventListener("keydown",f),h.overflow=p}},[v,ae,$,I]),b.useEffect(()=>{v&&(R.some(([u])=>u===v)||x(null))},[v,R]);const _t=b.useCallback(u=>{if(!a)return;const f=u.charAt(0).toUpperCase()+u.slice(1);let h=1,p=`${f}-${h}`;for(;a[p];)h+=1,p=`${f}-${h}`;const m=An(u);m&&typeof m=="object"&&(m.Name=p),l(ce(a,j=>{j[p]=m}))},[a]),Tt=b.useCallback(u=>{if(!a)return;const f=u.toLowerCase();!f.startsWith("radarr")&&!f.startsWith("sonarr")&&!f.startsWith("lidarr")||!window.confirm(`Delete ${u}? This action cannot be undone.`)||u in a&&(l(ce(a,p=>{delete p[u]})),v===u&&x(null),r(`${u} removed`,"success"))},[a,v,r]),Rt=b.useCallback((u,f)=>{if(!a)return;const h=f.trim();if(!(!h||h===u)){if(a[h]){r(`An instance named "${h}" already exists`,"error");return}l(ce(a,p=>{const m=p[u];delete p[u],p[h]=m,m&&typeof m=="object"&&(m.Name=h)})),v===u&&x(h)}},[a,r,v]),Et=b.useCallback(async()=>{if(a){y(!0);try{const u=wn(a);if(u.length){const E=u.map(oe=>`${oe.path.join(".")}: ${oe.message}`).join(`
2
+ `),H=u.length===1?E:`Please resolve the following issues:
3
+ ${E}`;r(H,"error"),y(!1);return}const f=ee(n??{}),h=ee(a),p={};for(const[E,H]of Object.entries(h)){const oe=f[E];He(H,oe)||(p[E]=H)}for(const E of Object.keys(f))E in h||(p[E]=null);if(Object.keys(p).length===0){r("No changes detected","info"),y(!1);return}const{configReloaded:m,reloadType:j,affectedInstances:T}=await wt({changes:p});let P="Configuration saved";if(j==="full"?P+=" • All instances reloaded":j==="multi_arr"&&T?.length?P+=` • Reloaded ${T.length} instances: ${T.join(", ")}`:j==="single_arr"&&T?.length?P+=` • Reloaded: ${T.join(", ")}`:j==="webui"?P+=" • WebUI restarting...":j==="frontend"&&(P+=" • Theme/display settings updated"),r(P,"success"),m&&"caches"in window)try{const E=await caches.keys();await Promise.all(E.map(H=>caches.delete(H)))}catch(E){console.warn("Failed to clear caches:",E)}await S()}catch(u){r(u instanceof Error?u.message:"Failed to update configuration","error")}finally{y(!1)}}},[a,n,S,r]);return c||!a?i.jsxs("section",{className:"card",children:[i.jsx("div",{className:"card-header",children:"Config"}),i.jsx("div",{className:"card-body",children:i.jsxs("div",{className:"loading",children:[i.jsx("span",{className:"spinner"})," Loading configuration…"]})})]}):i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"card",children:[i.jsx("div",{className:"card-header",children:"Config"}),i.jsxs("div",{className:"card-body config-layout",children:[i.jsx("section",{className:"config-arr-group",children:i.jsxs("details",{className:"config-arr-group__details",open:!0,children:[i.jsx("summary",{children:i.jsx("span",{children:"Core Configuration"})}),i.jsxs("div",{className:"config-grid",children:[i.jsx(Te,{title:"Settings",description:"Core application configuration",onConfigure:()=>X(!0)}),i.jsx(Te,{title:"Web Settings",description:"Web UI configuration",onConfigure:()=>_(!0)}),i.jsx(Te,{title:"qBit",description:"qBittorrent connection details",onConfigure:()=>A(!0)})]})]})}),C.length?i.jsx("div",{className:"config-arr-groups",children:C.map(u=>i.jsx("section",{className:"config-arr-group",children:i.jsxs("details",{className:"config-arr-group__details",open:!0,children:[i.jsxs("summary",{children:[i.jsx("span",{children:u.label}),i.jsx("span",{className:"config-arr-group__count",children:u.items.length}),(u.type==="radarr"||u.type==="sonarr"||u.type==="lidarr")&&i.jsxs("button",{className:"btn small",type:"button",onClick:()=>_t(u.type),children:[i.jsx(N,{src:mt}),"Add Instance"]})]}),i.jsx("div",{className:"config-arr-grid",children:u.items.map(([f,h])=>{const p=F(h,["URI"]),m=F(h,["Category"]),j=F(h,["Managed"]),T=u.type==="radarr"||u.type==="sonarr"||u.type==="lidarr";return i.jsxs("div",{className:"card config-card config-arr-card",children:[i.jsx("div",{className:"card-header",children:f}),i.jsxs("div",{className:"card-body",children:[i.jsxs("dl",{className:"config-arr-summary",children:[i.jsxs("div",{className:"config-arr-summary__item",children:[i.jsx("dt",{children:"Managed"}),i.jsx("dd",{children:j?"Enabled":"Disabled"})]}),i.jsxs("div",{className:"config-arr-summary__item",children:[i.jsx("dt",{children:"Category"}),i.jsx("dd",{children:m?String(m):"-"})]}),i.jsxs("div",{className:"config-arr-summary__item",children:[i.jsx("dt",{children:"URI"}),i.jsx("dd",{className:"config-arr-summary__uri",children:p?String(p):"-"})]})]}),i.jsxs("div",{className:"config-arr-actions",children:[T?i.jsxs("button",{className:"btn danger",type:"button",onClick:()=>Tt(f),children:[i.jsx(N,{src:bt}),"Delete"]}):null,i.jsxs("button",{className:"btn primary",type:"button",onClick:()=>x(f),children:[i.jsx(N,{src:tt}),"Configure"]})]})]})]},f)})})]})},u.type))}):null,i.jsx("div",{className:"config-footer",children:i.jsxs("button",{className:"btn primary",onClick:()=>void Et(),disabled:o,children:[i.jsx(N,{src:De}),"Save + Live Reload"]})})]})]}),v&&a?i.jsx(Fn,{keyName:v,state:a[v]??null,onChange:g,onRename:Rt,onClose:()=>x(null)}):null,ae?i.jsx(Re,{title:"Settings",fields:gt,state:a,basePath:[],onChange:g,onClose:()=>X(!1)}):null,$?i.jsx(Re,{title:"Web Settings",fields:St,state:a,basePath:[],onChange:g,onClose:()=>_(!1),showLiveSettings:!0}):null,I?i.jsx(Re,{title:"qBit",fields:vt,state:a,basePath:[],onChange:g,onClose:()=>A(!1)}):null]})}function Te({title:e,description:t,onConfigure:r}){return i.jsxs("div",{className:"card config-card",children:[i.jsx("div",{className:"card-header",children:e}),i.jsxs("div",{className:"card-body config-summary-card",children:[i.jsx("p",{children:t}),i.jsx("div",{className:"config-arr-actions",children:i.jsxs("button",{className:"btn primary",type:"button",onClick:r,children:[i.jsx(N,{src:tt}),"Configure"]})})]})]})}function D({title:e,fields:t,state:r,basePath:n,onChange:s,onRenameSection:a,defaultOpen:l=!1}){const c=n[0]??"";if(e==="Trackers"){const o=F(r,["Torrent","Trackers"])??[],y=()=>{const g=[...o,{Url:"",RemoveIfExists:!1,SuperSeedMode:!1,AddTags:[]}];s([...n,"Torrent","Trackers"],{},g)},S=g=>{const R=[...o];R.splice(g,1),s([...n,"Torrent","Trackers"],{},R)};return i.jsxs("details",{className:"config-section",open:l,children:[i.jsx("summary",{children:e}),i.jsxs("div",{className:"config-section__body",children:[i.jsx("div",{className:"tracker-grid",children:o.map((g,R)=>i.jsx(On,{fields:t,state:g,basePath:[...n,"Torrent","Trackers",String(R)],onChange:s,onDelete:()=>S(R)},R))}),i.jsx("div",{className:"config-actions",children:i.jsxs("button",{className:"btn",type:"button",onClick:y,children:[i.jsx(N,{src:mt}),"Add Tracker"]})})]})]})}const d=t.map(o=>{if(o.sectionName){if(!c)return null;const _=Ze([c]);return i.jsx(Cn,{label:o.label,tooltip:_,currentName:c,placeholder:o.placeholder,onRename:I=>a?.(c,I)},`${c}.__name`)}const y=o.path??[],S=[...n,...y],g=S.join("."),R=o.path?F(r,o.path):void 0,C=o.format?.(R)??(o.type==="checkbox"?!!R:String(R??"")),v=Ze(S),x=o.description??yt(v)??(o.type==="checkbox"?`Enable or disable ${o.label}.`:`Set the ${o.label} value.`),X=n.length>0&&Le.test(n[0]??"")&&(o.path?.[o.path.length-1]??"")==="APIKey",$=o.fullWidth?"field field--full-width":"field";if(o.secure)return i.jsx(Pn,{label:o.label,tooltip:v,description:x,value:String(R??""),placeholder:o.placeholder,canRefresh:!X,onChange:_=>s(S,o,_)},g);if(o.type==="checkbox")return i.jsxs("div",{className:"checkbox-field",children:[i.jsxs("label",{title:v,children:[i.jsx("input",{type:"checkbox",checked:!!C,onChange:_=>s(S,o,_.target.checked)}),o.label]}),x&&i.jsx("div",{className:"field-description",children:x})]},g);if(o.type==="select"){const _=o.label==="Theme"&&S.join(".")==="WebUI.Theme";let I=C;if(_&&typeof C=="string"){const A=C.toLowerCase();A==="light"?I="Light":I="Dark"}return i.jsxs("div",{className:$,children:[i.jsx("label",{title:v,children:o.label}),i.jsx(Ct,{options:(o.options??[]).map(A=>({value:A,label:A})),value:I?{value:I,label:I}:null,onChange:A=>{const k=A?.value||"";if(s(S,o,k),_&&typeof k=="string"&&k){const J=k.toLowerCase();document.documentElement.setAttribute("data-theme",J),localStorage.setItem("theme",J)}},styles:yn()}),x&&i.jsx("div",{className:"field-description",children:x}),_&&i.jsx("div",{className:"field-hint",children:"Theme changes apply immediately"})]},g)}return o.type==="number"?i.jsxs("div",{className:$,children:[i.jsx("label",{title:v,children:o.label}),i.jsx("input",{type:"number",value:Number(C)||0,onChange:_=>s(S,o,String(_.target.value)),placeholder:o.placeholder}),x&&i.jsx("div",{className:"field-description",children:x})]},g):o.type==="password"?i.jsxs("div",{className:$,children:[i.jsx("label",{title:v,children:o.label}),i.jsx("input",{type:"password",value:String(C),onChange:_=>s(S,o,_.target.value),placeholder:o.placeholder}),x&&i.jsx("div",{className:"field-description",children:x})]},g):i.jsxs("div",{className:$,children:[i.jsx("label",{title:v,children:o.label}),i.jsx("input",{type:"text",value:String(C),onChange:_=>s(S,o,_.target.value),placeholder:o.placeholder}),x&&i.jsx("div",{className:"field-description",children:x})]},g)});return e?i.jsxs("details",{className:"config-section",open:l,children:[i.jsx("summary",{children:e}),i.jsx("div",{className:"config-section__body field-grid",children:d})]}):i.jsx("div",{className:"field-grid",children:d})}function On({fields:e,state:t,basePath:r,onChange:n,onDelete:s}){const a=F(t,["Name"])||"New Tracker";return i.jsxs("details",{className:"card tracker-card",open:!0,children:[i.jsxs("summary",{className:"card-header",children:[i.jsx("span",{children:a}),i.jsx("button",{className:"btn danger ghost",type:"button",onClick:s,children:i.jsx(N,{src:bt})})]}),i.jsx("div",{className:"card-body",children:i.jsx(D,{title:null,fields:e,state:t,basePath:r,onChange:n})})]})}function Cn({label:e,currentName:t,placeholder:r,tooltip:n,onRename:s}){const[a,l]=b.useState(t),c=yt(n)??`Rename the ${t} instance.`;b.useEffect(()=>{l(t)},[t]);const d=()=>{const o=a.trim();if(!o){l(t);return}o!==t&&s(o)};return i.jsxs("div",{className:"field",children:[i.jsxs("label",{className:"field-label",children:[i.jsx("span",{children:e}),n?i.jsx("span",{className:"help-icon",title:n,"aria-label":n,children:"?"}):null]}),c?i.jsx("p",{className:"field-description",children:c}):null,i.jsx("input",{type:"text",value:a,placeholder:r,onChange:o=>l(o.target.value),onBlur:d,onKeyDown:o=>{o.key==="Enter"?(o.preventDefault(),d()):o.key==="Escape"&&(o.preventDefault(),l(t))}})]})}function Pn({label:e,value:t,placeholder:r,tooltip:n,description:s,canRefresh:a=!0,onChange:l}){const[c,d]=b.useState(!1),o=()=>{let y="";typeof crypto<"u"&&typeof crypto.randomUUID=="function"?y=crypto.randomUUID().replace(/-/g,""):y=Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join(""),l(y)};return i.jsxs("div",{className:"field secure-field",children:[i.jsx("label",{title:n,children:e}),i.jsxs("div",{className:"secure-field__input-group",children:[i.jsx("input",{type:c?"text":"password",value:t,placeholder:r,onChange:y=>l(y.target.value)}),i.jsx("button",{type:"button",className:"btn ghost",onClick:()=>d(!c),children:i.jsx(N,{src:bn})}),a&&i.jsx("button",{type:"button",className:"btn ghost",onClick:o,children:i.jsx(N,{src:At})})]}),s&&i.jsx("div",{className:"field-description",children:s})]})}function Fn({keyName:e,state:t,onChange:r,onRename:n,onClose:s}){const{generalFields:a,entryFields:l,entryOmbiFields:c,entryOverseerrFields:d,torrentFields:o,seedingFields:y,trackerFields:S}=xt(e);return i.jsx("div",{className:"modal-backdrop",role:"presentation",onClick:s,children:i.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"arr-instance-modal-title",onClick:g=>g.stopPropagation(),children:[i.jsxs("div",{className:"modal-header",children:[i.jsxs("h2",{id:"arr-instance-modal-title",children:["Configure ",i.jsx("code",{children:e})]}),i.jsxs("button",{className:"btn ghost",type:"button",onClick:s,children:[i.jsx(N,{src:rt}),"Close"]})]}),i.jsxs("div",{className:"modal-body",children:[i.jsx(D,{title:null,fields:a,state:t,basePath:[e],onChange:r,onRenameSection:n,defaultOpen:!0}),i.jsx(D,{title:"Entry Search",fields:l,state:t,basePath:[e],onChange:r,defaultOpen:!0}),c.length>0&&i.jsx(D,{title:"Ombi Integration",fields:c,state:t,basePath:[e],onChange:r}),d.length>0&&i.jsx(D,{title:"Overseerr Integration",fields:d,state:t,basePath:[e],onChange:r}),i.jsx(D,{title:"Torrent Handling",fields:o,state:t,basePath:[e],onChange:r}),i.jsx(D,{title:"Seeding",fields:y,state:t,basePath:[e],onChange:r}),i.jsx(D,{title:"Trackers",fields:S,state:t,basePath:[e],onChange:r})]}),i.jsx("div",{className:"modal-footer",children:i.jsxs("button",{className:"btn primary",type:"button",onClick:s,children:[i.jsx(N,{src:De}),"Done"]})})]})})}function Re({title:e,fields:t,state:r,basePath:n,onChange:s,onClose:a,showLiveSettings:l=!1}){const c=l?It():null;return r?i.jsx("div",{className:"modal-backdrop",role:"presentation",onClick:a,children:i.jsxs("div",{className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":`${e}-modal-title`,onClick:d=>d.stopPropagation(),children:[i.jsxs("div",{className:"modal-header",children:[i.jsx("h2",{id:`${e}-modal-title`,children:e}),i.jsxs("button",{className:"btn ghost",type:"button",onClick:a,children:[i.jsx(N,{src:rt}),"Close"]})]}),i.jsxs("div",{className:"modal-body",children:[i.jsx(D,{title:null,fields:t,state:r,basePath:n,onChange:s,defaultOpen:!0}),l&&c&&i.jsxs("div",{className:"field-group",children:[i.jsx("h3",{className:"field-group-title",children:"Live Settings"}),i.jsxs("div",{className:"field-group-content",children:[i.jsxs("div",{className:"field",children:[i.jsxs("label",{children:[i.jsx("input",{type:"checkbox",checked:c.liveArr,onChange:d=>c.setLiveArr(d.target.checked)})," ","Live Arr Updates"]}),i.jsx("p",{className:"field-description",children:"Enable real-time updates for Arr views"})]}),i.jsxs("div",{className:"field",children:[i.jsxs("label",{children:[i.jsx("input",{type:"checkbox",checked:c.groupSonarr,onChange:d=>c.setGroupSonarr(d.target.checked)})," ","Group Sonarr by Series"]}),i.jsx("p",{className:"field-description",children:"Group Sonarr episodes by series in views"})]}),i.jsxs("div",{className:"field",children:[i.jsxs("label",{children:[i.jsx("input",{type:"checkbox",checked:c.groupLidarr,onChange:d=>c.setGroupLidarr(d.target.checked)})," ","Group Lidarr by Artist"]}),i.jsx("p",{className:"field-description",children:"Group Lidarr albums by artist in views"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Theme"}),i.jsxs("select",{value:c.theme,onChange:d=>c.setTheme(d.target.value),children:[i.jsx("option",{value:"dark",children:"Dark"}),i.jsx("option",{value:"light",children:"Light"})]}),i.jsx("p",{className:"field-description",children:"WebUI theme (Light or Dark)"})]})]})]})]}),i.jsx("div",{className:"modal-footer",children:i.jsxs("button",{className:"btn primary",type:"button",onClick:a,children:[i.jsx(N,{src:De}),"Done"]})})]})}):null}export{Ln as ConfigView};
4
+ //# sourceMappingURL=ConfigView.js.map