From 738e769bd854aaef3ffba64e23629752b521da0a Mon Sep 17 00:00:00 2001 From: Dario Date: Sat, 28 Mar 2020 19:00:38 +0100 Subject: [PATCH 01/13] yarn dev --- themes/dark/assets/js/app.js | 17 +- themes/dark/assets/js/index.js | 17 +- themes/dark/assets/js/medusa-runtime.js | 3883 +++++++++++++++++++- themes/dark/assets/js/vendors.js | 1772 ++++++++- themes/dark/assets/js/vendors~date-fns.js | 2705 +++++++++++++- themes/light/assets/js/app.js | 17 +- themes/light/assets/js/index.js | 17 +- themes/light/assets/js/medusa-runtime.js | 3883 +++++++++++++++++++- themes/light/assets/js/vendors.js | 1772 ++++++++- themes/light/assets/js/vendors~date-fns.js | 2705 +++++++++++++- 10 files changed, 16564 insertions(+), 224 deletions(-) diff --git a/themes/dark/assets/js/app.js b/themes/dark/assets/js/app.js index 00ab7b8894..c98aa1431c 100644 --- a/themes/dark/assets/js/app.js +++ b/themes/dark/assets/js/app.js @@ -1,2 +1,15 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{250:function(o,e,n){"use strict";n.r(e);var t=n(9),a=n(31),c=n(24),s=n(22),i=n(6);t.a.config.devtools=!0,t.a.config.performance=!0,Object(a.c)(),Object(a.b)();const d=new t.a({name:"app",router:c.b,store:s.a,data:()=>({globalLoading:!1,pageComponent:!1}),mounted(){if(i.f&&console.log("App Mounted!"),!window.location.pathname.includes("/login")){const{$store:o}=this;Promise.all([o.dispatch("login",{username:window.username}),o.dispatch("getConfig"),o.dispatch("getStats")]).then(([o,e])=>{i.f&&console.log("App Loaded!");const n=new CustomEvent("medusa-config-loaded",{detail:e.main});window.dispatchEvent(n)}).catch(o=>{console.debug(o),alert("Unable to connect to Medusa!")})}}}).$mount("#vue-wrap");e.default=d}},[[250,1,0,2]]]); -//# sourceMappingURL=app.js.map \ No newline at end of file +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app"],{ + +/***/ "./src/app.js": +/*!********************!*\ + !*** ./src/app.js ***! + \********************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var _global_vue_shim__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./global-vue-shim */ \"./src/global-vue-shim.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./router */ \"./src/router/index.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./store */ \"./src/store/index.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/core */ \"./src/utils/core.js\");\n\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].config.devtools = true;\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].config.performance = true;\nObject(_global_vue_shim__WEBPACK_IMPORTED_MODULE_1__[\"registerPlugins\"])(); // @TODO: Remove this before v1.0.0\n\nObject(_global_vue_shim__WEBPACK_IMPORTED_MODULE_1__[\"registerGlobalComponents\"])();\nconst app = new vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n name: 'app',\n router: _router__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n store: _store__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n\n data() {\n return {\n globalLoading: false,\n pageComponent: false\n };\n },\n\n mounted() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_4__[\"isDevelopment\"]) {\n console.log('App Mounted!');\n }\n\n if (!window.location.pathname.includes('/login')) {\n const {\n $store\n } = this;\n Promise.all([$store.dispatch('login', {\n username: window.username\n }), $store.dispatch('getConfig'), $store.dispatch('getStats')]).then(([_, config]) => {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_4__[\"isDevelopment\"]) {\n console.log('App Loaded!');\n } // Legacy - send config.main to jQuery (received by index.js)\n\n\n const event = new CustomEvent('medusa-config-loaded', {\n detail: config.main\n });\n window.dispatchEvent(event);\n }).catch(error => {\n console.debug(error);\n alert('Unable to connect to Medusa!'); // eslint-disable-line no-alert\n });\n }\n }\n\n}).$mount('#vue-wrap');\n/* harmony default export */ __webpack_exports__[\"default\"] = (app);\n\n//# sourceURL=webpack:///./src/app.js?"); + +/***/ }) + +},[["./src/app.js","vendors","medusa-runtime","vendors~date-fns"]]]); \ No newline at end of file diff --git a/themes/dark/assets/js/index.js b/themes/dark/assets/js/index.js index 327beea3d8..49699241a9 100644 --- a/themes/dark/assets/js/index.js +++ b/themes/dark/assets/js/index.js @@ -1,2 +1,15 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{138:function(o,n,i){"use strict";i.r(n);var e=i(4),d=i.n(e),w=(i(139),i(152),i(153),i(154),i(162),i(9)),t=i(1),a=i(17),c=i(29),u=i.n(c),s=i(27),r=i.n(s),l=i(22),g=i(24),m=i(3),p=i(31);window&&(window.globalVueShim=p.a,window.$=d.a,window.jQuery=d.a,window.Vue=w.a,window.Vuex=t.b,window.ToggleButton=a.ToggleButton,window.axios=u.a,window._={debounce:r()},window.store=l.a,window.router=g.b,window.apiRoute=m.c,window.apiv1=m.d,window.api=m.a,window.MEDUSA={common:{},config:{},home:{},addShows:{},layout:{}},window.webRoot=m.e,window.apiKey=m.b,window.components=[]);const b={exec(o,n){const i=MEDUSA;n=void 0===n?"init":n,""!==o&&i[o]&&"function"==typeof i[o][n]&&i[o][n]()},init(){d()("[v-cloak]").removeAttr("v-cloak");const{body:o}=document,n=o.getAttribute("data-controller"),i=o.getAttribute("data-action");b.exec("common"),b.exec(n),b.exec(n,i),window.dispatchEvent(new Event("medusa-loaded"))}},{pathname:h}=window.location;if(!h.includes("/login")&&!h.includes("/apibuilder")){const o=o=>{const n=o.detail,i="dark"===n.themeName?"-dark":"";MEDUSA.config={...MEDUSA.config,...n,themeSpinner:i,loading:''},d()(document).ready(b.init)};window.addEventListener("medusa-config-loaded",o,{once:!0})}}},[[138,1,0,2]]]); -//# sourceMappingURL=index.js.map \ No newline at end of file +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["index"],{ + +/***/ "./src/index.js": +/*!**********************!*\ + !*** ./src/index.js ***! + \**********************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var bootstrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bootstrap */ \"./node_modules/bootstrap/dist/js/npm.js\");\n/* harmony import */ var bootstrap__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(bootstrap__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var bootstrap_dist_css_bootstrap_min_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! bootstrap/dist/css/bootstrap.min.css */ \"./node_modules/bootstrap/dist/css/bootstrap.min.css\");\n/* harmony import */ var bootstrap_dist_css_bootstrap_min_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(bootstrap_dist_css_bootstrap_min_css__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var vue_snotify_styles_material_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-snotify/styles/material.css */ \"./node_modules/vue-snotify/styles/material.css\");\n/* harmony import */ var vue_snotify_styles_material_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vue_snotify_styles_material_css__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _vendor_js_tablesorter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../vendor/js/tablesorter */ \"./vendor/js/tablesorter.js\");\n/* harmony import */ var _vendor_css_open_sans_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../vendor/css/open-sans.css */ \"./vendor/css/open-sans.css\");\n/* harmony import */ var _vendor_css_open_sans_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_vendor_css_open_sans_css__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vue-js-toggle-button */ \"./node_modules/vue-js-toggle-button/dist/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./store */ \"./src/store/index.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./router */ \"./src/router/index.js\");\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./api */ \"./src/api.js\");\n/* harmony import */ var _global_vue_shim__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./global-vue-shim */ \"./src/global-vue-shim.js\");\n/* eslint-disable import/no-unassigned-import */\n\n\n\n\n\n\n/* eslint-enable import/no-unassigned-import */\n\n\n\n\n\n\n\n\n\n\n\nif (window) {\n // @TODO: Remove this before v1.0.0\n window.globalVueShim = _global_vue_shim__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; // Adding libs to window so mako files can use them\n\n window.$ = jquery__WEBPACK_IMPORTED_MODULE_0___default.a;\n window.jQuery = jquery__WEBPACK_IMPORTED_MODULE_0___default.a;\n window.Vue = vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n window.Vuex = vuex__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n window.ToggleButton = vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_8__[\"ToggleButton\"];\n window.axios = axios__WEBPACK_IMPORTED_MODULE_9___default.a;\n window._ = {\n debounce: (lodash_debounce__WEBPACK_IMPORTED_MODULE_10___default())\n };\n window.store = _store__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n window.router = _router__WEBPACK_IMPORTED_MODULE_12__[\"default\"];\n window.apiRoute = _api__WEBPACK_IMPORTED_MODULE_13__[\"apiRoute\"];\n window.apiv1 = _api__WEBPACK_IMPORTED_MODULE_13__[\"apiv1\"];\n window.api = _api__WEBPACK_IMPORTED_MODULE_13__[\"api\"];\n window.MEDUSA = {\n common: {},\n config: {},\n home: {},\n addShows: {},\n layout: {}\n };\n window.webRoot = _api__WEBPACK_IMPORTED_MODULE_13__[\"webRoot\"];\n window.apiKey = _api__WEBPACK_IMPORTED_MODULE_13__[\"apiKey\"]; // Push x-template components to this array to register them globally\n\n window.components = [];\n}\n\nconst UTIL = {\n exec(controller, action) {\n const ns = MEDUSA;\n action = action === undefined ? 'init' : action;\n\n if (controller !== '' && ns[controller] && typeof ns[controller][action] === 'function') {\n ns[controller][action]();\n }\n },\n\n init() {\n jquery__WEBPACK_IMPORTED_MODULE_0___default()('[v-cloak]').removeAttr('v-cloak');\n const {\n body\n } = document;\n const controller = body.getAttribute('data-controller');\n const action = body.getAttribute('data-action');\n UTIL.exec('common'); // Load common\n\n UTIL.exec(controller); // Load MEDUSA[controller]\n\n UTIL.exec(controller, action); // Load MEDUSA[controller][action]\n\n window.dispatchEvent(new Event('medusa-loaded'));\n }\n\n};\nconst {\n pathname\n} = window.location;\n\nif (!pathname.includes('/login') && !pathname.includes('/apibuilder')) {\n const configLoaded = event => {\n const data = event.detail;\n const themeSpinner = data.themeName === 'dark' ? '-dark' : '';\n MEDUSA.config = { ...MEDUSA.config,\n ...data,\n themeSpinner,\n loading: ''\n };\n jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).ready(UTIL.init);\n };\n\n window.addEventListener('medusa-config-loaded', configLoaded, {\n once: true\n });\n}\n\n//# sourceURL=webpack:///./src/index.js?"); + +/***/ }) + +},[["./src/index.js","vendors","medusa-runtime","vendors~date-fns"]]]); \ No newline at end of file diff --git a/themes/dark/assets/js/medusa-runtime.js b/themes/dark/assets/js/medusa-runtime.js index 389c07abb0..f35a44c07e 100644 --- a/themes/dark/assets/js/medusa-runtime.js +++ b/themes/dark/assets/js/medusa-runtime.js @@ -1,2 +1,3881 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"f",(function(){return b})),n.d(t,"g",(function(){return w})),n.d(t,"h",(function(){return x})),n.d(t,"i",(function(){return S})),n.d(t,"j",(function(){return E})),n.d(t,"k",(function(){return T})),n.d(t,"l",(function(){return N.a})),n.d(t,"m",(function(){return D})),n.d(t,"n",(function(){return $})),n.d(t,"o",(function(){return L})),n.d(t,"p",(function(){return B}));var s=n(1),a=n(24),o={name:"app-link",props:{to:[String,Object],href:String,indexerId:{type:String},placeholder:{type:String,default:"indexer-to-name"}},computed:{...Object(s.e)(["config"]),...Object(s.d)(["indexerIdToName"]),indexerName(){const{indexerId:e,indexerIdToName:t}=this;return t(e)},computedBase:()=>document.querySelector("base").getAttribute("href"),computedHref(){const{href:e,indexerId:t,placeholder:n,indexerName:s}=this;return t&&n?e.replace(n,s):e},isIRC(){if(this.computedHref)return this.computedHref.startsWith("irc://")},isAbsolute(){const e=this.computedHref;if(e)return/^[a-z][a-z0-9+.-]*:/.test(e)},isExternal(){const e=this.computedBase,t=this.computedHref;if(t)return!t.startsWith(e)&&!t.startsWith("webcal://")},isHashPath(){if(this.computedHref)return this.computedHref.startsWith("#")},anonymisedHref(){const{anonRedirect:e}=this.config,t=this.computedHref;if(t)return e?e+t:t},matchingVueRoute(){const{isAbsolute:e,isExternal:t,computedHref:n}=this;if(e&&t)return;const{route:s}=a.b.resolve(a.a+n);return s.name?s:void 0},linkProperties(){const{to:e,isIRC:t,isAbsolute:n,isExternal:s,isHashPath:a,anonymisedHref:o,matchingVueRoute:i}=this,l=this.computedBase,r=this.computedHref;return e?{is:"router-link",to:e}:r?i&&this.$route&&i.meta.converted&&this.$route.meta.converted&&window.loadMainApp?{is:"router-link",to:i.fullPath,href:new URL(i.fullPath,l).href}:{is:"a",target:n&&s?"_blank":"_self",href:(()=>{if(a){const{location:e}=window;if(0===e.hash.length){const t=e.href.endsWith("#")?r.substr(1):r;return e.href+t}return e.href.replace(e.hash,"")+r}return t?r:n?s?o:r:new URL(r,l).href})(),rel:n&&s?"noreferrer":void 0}:{is:"a",falseLink:Boolean(this.$attrs.name)||void 0}}}},i=(n(189),n(0)),l=Object(i.a)(o,(function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.linkProperties.is,{tag:"component",class:{"router-link":"router-link"===e.linkProperties.is},attrs:{to:e.linkProperties.to,href:e.linkProperties.href,target:e.linkProperties.target,rel:e.linkProperties.rel,"false-link":e.linkProperties.falseLink}},[e._t("default")],2)}),[],!1,null,null,null).exports,r=n(3),c={name:"asset",components:{AppLink:l},props:{showSlug:{type:String},type:{type:String,required:!0},default:{type:String,required:!0},link:{type:Boolean,default:!1},cls:{type:String}},data:()=>({error:!1}),computed:{src(){const{error:e,showSlug:t,type:n}=this;return!e&&t&&n?r.e+"/api/v2/series/"+t+"/asset/"+n+"?api_key="+r.b:this.default},href(){if(this.link)return this.src.replace("Thumb","")}}},d=Object(i.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.link?n("app-link",{attrs:{href:e.href}},[n("img",{class:e.cls,attrs:{src:e.src},on:{error:function(t){e.error=!0}}})]):n("img",{class:e.cls,attrs:{src:e.src},on:{error:function(t){e.error=!0}}})}),[],!1,null,null,null).exports,u={name:"config-template",props:{label:{type:String,required:!0},labelFor:{type:String,required:!0}}},p=Object(i.a)(u,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"config-template-content"}},[t("div",{staticClass:"form-group"},[t("div",{staticClass:"row"},[t("label",{staticClass:"col-sm-2 control-label",attrs:{for:this.labelFor}},[t("span",[this._v(this._s(this.label))])]),this._v(" "),t("div",{staticClass:"col-sm-10 content"},[this._t("default")],2)])])])}),[],!1,null,null,null).exports,h={name:"config-textbox-number",props:{label:{type:String,required:!0},id:{type:String,required:!0},explanations:{type:Array,default:()=>[]},value:{type:Number,default:10},inputClass:{type:String,default:"form-control input-sm input75"},min:{type:Number,default:10},max:{type:Number,default:null},step:{type:Number,default:1},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},data:()=>({localValue:null}),mounted(){const{value:e}=this;this.localValue=e},watch:{value(){const{value:e}=this;this.localValue=e}},methods:{updateValue(){const{localValue:e}=this;this.$emit("input",Number(e))}}},m=(n(191),Object(i.a)(h,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"config-textbox-number-content"}},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("label",{staticClass:"col-sm-2 control-label",attrs:{for:e.id}},[n("span",[e._v(e._s(e.label))])]),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.localValue,expression:"localValue"}],attrs:{type:"number"},domProps:{value:e.localValue},on:{input:[function(t){t.target.composing||(e.localValue=t.target.value)},function(t){return e.updateValue()}]}},"input",{min:e.min,max:e.max,step:e.step,id:e.id,name:e.id,class:e.inputClass,placeholder:e.placeholder,disabled:e.disabled},!1)),e._v(" "),e._l(e.explanations,(function(t,s){return n("p",{key:s},[e._v(e._s(t))])})),e._v(" "),e._t("default")],2)])])])}),[],!1,null,null,null).exports),f={name:"config-textbox",props:{label:{type:String,required:!0},id:{type:String,required:!0},explanations:{type:Array,default:()=>[]},value:{type:String,default:""},type:{type:String,default:"text"},disabled:{type:Boolean,default:!1},inputClass:{type:String,default:"form-control input-sm max-input350"},placeholder:{type:String,default:""}},data:()=>({localValue:null}),mounted(){const{value:e}=this;this.localValue=e},watch:{value(){const{value:e}=this;this.localValue=e}},methods:{updateValue(){const{localValue:e}=this;this.$emit("input",e)}}},g=(n(193),Object(i.a)(f,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"config-textbox"}},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("label",{staticClass:"col-sm-2 control-label",attrs:{for:e.id}},[n("span",[e._v(e._s(e.label))])]),e._v(" "),n("div",{staticClass:"col-sm-10 content"},["checkbox"===[e.id,e.type,e.id,e.inputClass,e.placeholder,e.disabled][1]?n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.localValue,expression:"localValue"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.localValue)?e._i(e.localValue,null)>-1:e.localValue},on:{input:function(t){return e.updateValue()},change:function(t){var n=e.localValue,s=t.target,a=!!s.checked;if(Array.isArray(n)){var o=e._i(n,null);s.checked?o<0&&(e.localValue=n.concat([null])):o>-1&&(e.localValue=n.slice(0,o).concat(n.slice(o+1)))}else e.localValue=a}}},"input",{id:e.id,type:e.type,name:e.id,class:e.inputClass,placeholder:e.placeholder,disabled:e.disabled},!1)):"radio"===[e.id,e.type,e.id,e.inputClass,e.placeholder,e.disabled][1]?n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.localValue,expression:"localValue"}],attrs:{type:"radio"},domProps:{checked:e._q(e.localValue,null)},on:{input:function(t){return e.updateValue()},change:function(t){e.localValue=null}}},"input",{id:e.id,type:e.type,name:e.id,class:e.inputClass,placeholder:e.placeholder,disabled:e.disabled},!1)):n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.localValue,expression:"localValue"}],attrs:{type:[e.id,e.type,e.id,e.inputClass,e.placeholder,e.disabled][1]},domProps:{value:e.localValue},on:{input:[function(t){t.target.composing||(e.localValue=t.target.value)},function(t){return e.updateValue()}]}},"input",{id:e.id,type:e.type,name:e.id,class:e.inputClass,placeholder:e.placeholder,disabled:e.disabled},!1)),e._v(" "),e._l(e.explanations,(function(t,s){return n("p",{key:s},[e._v(e._s(t))])})),e._v(" "),e._t("default")],2)])])])}),[],!1,null,null,null).exports),v={name:"config-toggle-slider",components:{ToggleButton:n(17).ToggleButton},props:{label:{type:String,required:!0},id:{type:String,required:!0},value:{type:Boolean,default:null},disabled:{type:Boolean,default:!1},explanations:{type:Array,default:()=>[]}},data:()=>({localChecked:null}),mounted(){const{value:e}=this;this.localChecked=e},watch:{value(){const{value:e}=this;this.localChecked=e}},methods:{updateValue(){const{localChecked:e}=this;this.$emit("input",e)}}},b=(n(195),Object(i.a)(v,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"config-toggle-slider-content"}},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("label",{staticClass:"col-sm-2 control-label",attrs:{for:e.id}},[n("span",[e._v(e._s(e.label))])]),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("toggle-button",e._b({attrs:{width:45,height:22,sync:""},on:{input:function(t){return e.updateValue()}},model:{value:e.localChecked,callback:function(t){e.localChecked=t},expression:"localChecked"}},"toggle-button",{id:e.id,name:e.id,disabled:e.disabled},!1)),e._v(" "),e._l(e.explanations,(function(t,s){return n("p",{key:s},[e._v(e._s(t))])})),e._v(" "),e._t("default")],2)])])])}),[],!1,null,null,null).exports),_=n(36).a,w=(n(197),Object(i.a)(_,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"file-browser max-width"},[n("div",{class:e.showBrowseButton?"input-group":"input-group-no-btn"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.currentPath,expression:"currentPath"}],ref:"locationInput",staticClass:"form-control input-sm fileBrowserField",attrs:{name:e.name,type:"text"},domProps:{value:e.currentPath},on:{input:function(t){t.target.composing||(e.currentPath=t.target.value)}}}),e._v(" "),e.showBrowseButton?n("div",{staticClass:"input-group-btn",attrs:{title:e.title,alt:e.title},on:{click:function(t){return t.preventDefault(),e.openDialog(t)}}},[e._m(0)]):e._e()]),e._v(" "),n("div",{ref:"fileBrowserDialog",staticClass:"fileBrowserDialog",staticStyle:{display:"none"}}),e._v(" "),n("input",{ref:"fileBrowserSearchBox",staticClass:"form-control",staticStyle:{display:"none"},attrs:{type:"text"},domProps:{value:e.currentPath},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.browse(t.target.value)}}}),e._v(" "),n("ul",{ref:"fileBrowserFileList",staticStyle:{display:"none"}},e._l(e.files,(function(t){return n("li",{key:t.name,staticClass:"ui-state-default ui-corner-all"},[n("a",{on:{mouseover:function(n){return e.toggleFolder(t,n)},mouseout:function(n){return e.toggleFolder(t,n)},click:function(n){return e.fileClicked(t)}}},[n("span",{class:"ui-icon "+(t.isFile?"ui-icon-blank":"ui-icon-folder-collapsed")}),e._v(" "+e._s(t.name)+"\n ")])])})),0)])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"btn btn-default input-sm",staticStyle:{"font-size":"14px"}},[t("i",{staticClass:"glyphicon glyphicon-open"})])}],!1,null,"eff76864",null).exports),y=n(38).a,x=Object(i.a)(y,(function(){var e=this.$createElement;return(this._self._c||e)("select")}),[],!1,null,null,null).exports,k=n(39).a,S=Object(i.a)(k,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"name-pattern-wrapper"}},[e.type?n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-sm-2 control-label",attrs:{for:"enable_naming_custom"}},[n("span",[e._v("Custom "+e._s(e.type))])]),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("toggle-button",{attrs:{width:45,height:22,id:"enable_naming_custom",name:"enable_naming_custom",sync:""},on:{input:function(t){return e.update()}},model:{value:e.isEnabled,callback:function(t){e.isEnabled=t},expression:"isEnabled"}}),e._v(" "),n("span",[e._v("Name "+e._s(e.type)+" shows differently than regular shows?")])],1)]):e._e(),e._v(" "),!e.type||e.isEnabled?n("div",{staticClass:"episode-naming"},[n("div",{staticClass:"form-group"},[e._m(0),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedNamingPattern,expression:"selectedNamingPattern"}],staticClass:"form-control input-sm",attrs:{id:"name_presets"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedNamingPattern=t.target.multiple?n:n[0]},e.updatePatternSamples],input:function(t){return e.update()}}},e._l(e.presets,(function(t){return n("option",{key:t.pattern,attrs:{id:t.pattern}},[e._v(e._s(t.example))])})),0)])]),e._v(" "),n("div",{attrs:{id:"naming_custom"}},[e.isCustom?n("div",{staticClass:"form-group",staticStyle:{"padding-top":"0"}},[e._m(1),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.customName,expression:"customName"}],staticClass:"form-control-inline-max input-sm max-input350",attrs:{type:"text",name:"naming_pattern",id:"naming_pattern"},domProps:{value:e.customName},on:{change:e.updatePatternSamples,input:[function(t){t.target.composing||(e.customName=t.target.value)},function(t){return e.update()}]}}),e._v(" "),n("img",{staticClass:"legend",attrs:{src:"images/legend16.png",width:"16",height:"16",alt:"[Toggle Key]",id:"show_naming_key",title:"Toggle Naming Legend"},on:{click:function(t){e.showLegend=!e.showLegend}}})])]):e._e(),e._v(" "),e.showLegend&&e.isCustom?n("div",{staticClass:"nocheck",attrs:{id:"naming_key"}},[n("table",{staticClass:"Key"},[e._m(2),e._v(" "),e._m(3),e._v(" "),n("tbody",[e._m(4),e._v(" "),e._m(5),e._v(" "),e._m(6),e._v(" "),e._m(7),e._v(" "),e._m(8),e._v(" "),e._m(9),e._v(" "),e._m(10),e._v(" "),e._m(11),e._v(" "),e._m(12),e._v(" "),e._m(13),e._v(" "),e._m(14),e._v(" "),e._m(15),e._v(" "),e._m(16),e._v(" "),e._m(17),e._v(" "),e._m(18),e._v(" "),e._m(19),e._v(" "),n("tr",[e._m(20),e._v(" "),n("td",[e._v("%M")]),e._v(" "),n("td",[e._v(e._s(e.getDateFormat("M")))])]),e._v(" "),n("tr",{staticClass:"even"},[n("td",[e._v(" ")]),e._v(" "),n("td",[e._v("%D")]),e._v(" "),n("td",[e._v(e._s(e.getDateFormat("d")))])]),e._v(" "),n("tr",[n("td",[e._v(" ")]),e._v(" "),n("td",[e._v("%Y")]),e._v(" "),n("td",[e._v(e._s(e.getDateFormat("yyyy")))])]),e._v(" "),n("tr",[e._m(21),e._v(" "),n("td",[e._v("%CM")]),e._v(" "),n("td",[e._v(e._s(e.getDateFormat("M")))])]),e._v(" "),n("tr",{staticClass:"even"},[n("td",[e._v(" ")]),e._v(" "),n("td",[e._v("%CD")]),e._v(" "),n("td",[e._v(e._s(e.getDateFormat("d")))])]),e._v(" "),n("tr",[n("td",[e._v(" ")]),e._v(" "),n("td",[e._v("%CY")]),e._v(" "),n("td",[e._v(e._s(e.getDateFormat("yyyy")))])]),e._v(" "),e._m(22),e._v(" "),e._m(23),e._v(" "),e._m(24),e._v(" "),e._m(25),e._v(" "),e._m(26),e._v(" "),e._m(27),e._v(" "),e._m(28),e._v(" "),e._m(29),e._v(" "),e._m(30)])])]):e._e()]),e._v(" "),e.selectedMultiEpStyle?n("div",{staticClass:"form-group"},[e._m(31),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedMultiEpStyle,expression:"selectedMultiEpStyle"}],staticClass:"form-control input-sm",attrs:{id:"naming_multi_ep",name:"naming_multi_ep"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedMultiEpStyle=t.target.multiple?n:n[0]},e.updatePatternSamples],input:function(t){return e.update(t)}}},e._l(e.availableMultiEpStyles,(function(t){return n("option",{key:t.value,attrs:{id:"multiEpStyle"},domProps:{value:t.value}},[e._v(e._s(t.text))])})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"form-group row"},[n("h3",{staticClass:"col-sm-12"},[e._v("Single-EP Sample:")]),e._v(" "),n("div",{staticClass:"example col-sm-12"},[n("span",{staticClass:"jumbo",attrs:{id:"naming_example"}},[e._v(e._s(e.namingExample))])])]),e._v(" "),e.isMulti?n("div",{staticClass:"form-group row"},[n("h3",{staticClass:"col-sm-12"},[e._v("Multi-EP sample:")]),e._v(" "),n("div",{staticClass:"example col-sm-12"},[n("span",{staticClass:"jumbo",attrs:{id:"naming_example_multi"}},[e._v(e._s(e.namingExampleMulti))])])]):e._e(),e._v(" "),e.animeType>0?n("div",{staticClass:"form-group"},[e._m(32),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.animeType,expression:"animeType"}],attrs:{type:"radio",name:"naming_anime",id:"naming_anime",value:"1"},domProps:{checked:e._q(e.animeType,"1")},on:{change:[function(t){e.animeType="1"},e.updatePatternSamples],input:function(t){return e.update()}}}),e._v(" "),n("span",[e._v("Add the absolute number to the season/episode format?")]),e._v(" "),n("p",[e._v("Only applies to animes. (e.g. S15E45 - 310 vs S15E45)")])])]):e._e(),e._v(" "),e.animeType>0?n("div",{staticClass:"form-group"},[e._m(33),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.animeType,expression:"animeType"}],attrs:{type:"radio",name:"naming_anime",id:"naming_anime_only",value:"2"},domProps:{checked:e._q(e.animeType,"2")},on:{change:[function(t){e.animeType="2"},e.updatePatternSamples],input:function(t){return e.update()}}}),e._v(" "),n("span",[e._v("Replace season/episode format with absolute number")]),e._v(" "),n("p",[e._v("Only applies to animes.")])])]):e._e(),e._v(" "),e.animeType>0?n("div",{staticClass:"form-group"},[e._m(34),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.animeType,expression:"animeType"}],attrs:{type:"radio",name:"naming_anime",id:"naming_anime_none",value:"3"},domProps:{checked:e._q(e.animeType,"3")},on:{change:[function(t){e.animeType="3"},e.updatePatternSamples],input:function(t){return e.update()}}}),e._v(" "),n("span",[e._v("Don't include the absolute number")]),e._v(" "),n("p",[e._v("Only applies to animes.")])])]):e._e()]):e._e()])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"name_presets"}},[t("span",[this._v("Name Pattern:")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label"},[t("span",[this._v(" ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("thead",[t("tr",[t("th",{staticClass:"align-right"},[this._v("Meaning")]),this._v(" "),t("th",[this._v("Pattern")]),this._v(" "),t("th",{attrs:{width:"60%"}},[this._v("Result")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tfoot",[t("tr",[t("th",{attrs:{colspan:"3"}},[this._v("Use lower case if you want lower case names (eg. %sn, %e.n, %q_n etc)")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",{staticClass:"align-right"},[t("b",[this._v("Show Name:")])]),this._v(" "),t("td",[this._v("%SN")]),this._v(" "),t("td",[this._v("Show Name")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%S.N")]),this._v(" "),t("td",[this._v("Show.Name")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%S_N")]),this._v(" "),t("td",[this._v("Show_Name")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",{staticClass:"align-right"},[t("b",[this._v("Season Number:")])]),this._v(" "),t("td",[this._v("%S")]),this._v(" "),t("td",[this._v("2")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%0S")]),this._v(" "),t("td",[this._v("02")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",{staticClass:"align-right"},[t("b",[this._v("XEM Season Number:")])]),this._v(" "),t("td",[this._v("%XS")]),this._v(" "),t("td",[this._v("2")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%0XS")]),this._v(" "),t("td",[this._v("02")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",{staticClass:"align-right"},[t("b",[this._v("Episode Number:")])]),this._v(" "),t("td",[this._v("%E")]),this._v(" "),t("td",[this._v("3")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%0E")]),this._v(" "),t("td",[this._v("03")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",{staticClass:"align-right"},[t("b",[this._v("XEM Episode Number:")])]),this._v(" "),t("td",[this._v("%XE")]),this._v(" "),t("td",[this._v("3")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%0XE")]),this._v(" "),t("td",[this._v("03")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",{staticClass:"align-right"},[t("b",[this._v("Absolute Episode Number:")])]),this._v(" "),t("td",[this._v("%AB")]),this._v(" "),t("td",[this._v("003")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",{staticClass:"align-right"},[t("b",[this._v("Xem Absolute Episode Number:")])]),this._v(" "),t("td",[this._v("%XAB")]),this._v(" "),t("td",[this._v("003")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",{staticClass:"align-right"},[t("b",[this._v("Episode Name:")])]),this._v(" "),t("td",[this._v("%EN")]),this._v(" "),t("td",[this._v("Episode Name")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%E.N")]),this._v(" "),t("td",[this._v("Episode.Name")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%E_N")]),this._v(" "),t("td",[this._v("Episode_Name")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("td",{staticClass:"align-right"},[t("b",[this._v("Air Date:")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("td",{staticClass:"align-right"},[t("b",[this._v("Post-Processing Date:")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",{staticClass:"align-right"},[t("b",[this._v("Quality:")])]),this._v(" "),t("td",[this._v("%QN")]),this._v(" "),t("td",[this._v("720p BluRay")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%Q.N")]),this._v(" "),t("td",[this._v("720p.BluRay")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%Q_N")]),this._v(" "),t("td",[this._v("720p_BluRay")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",{staticClass:"align-right"},[t("b",[this._v("Scene Quality:")])]),this._v(" "),t("td",[this._v("%SQN")]),this._v(" "),t("td",[this._v("720p HDTV x264")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%SQ.N")]),this._v(" "),t("td",[this._v("720p.HDTV.x264")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",[this._v(" ")]),this._v(" "),t("td",[this._v("%SQ_N")]),this._v(" "),t("td",[this._v("720p_HDTV_x264")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",{staticClass:"align-right"},[t("i",{staticClass:"glyphicon glyphicon-info-sign",attrs:{title:"Multi-EP style is ignored"}}),this._v(" "),t("b",[this._v("Release Name:")])]),this._v(" "),t("td",[this._v("%RN")]),this._v(" "),t("td",[this._v("Show.Name.S02E03.HDTV.x264-RLSGROUP")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",[t("td",{staticClass:"align-right"},[t("i",{staticClass:"glyphicon glyphicon-info-sign",attrs:{title:"UNKNOWN_RELEASE_GROUP is used in place of RLSGROUP if it could not be properly detected"}}),this._v(" "),t("b",[this._v("Release Group:")])]),this._v(" "),t("td",[this._v("%RG")]),this._v(" "),t("td",[this._v("RLSGROUP")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tr",{staticClass:"even"},[t("td",{staticClass:"align-right"},[t("i",{staticClass:"glyphicon glyphicon-info-sign",attrs:{title:"If episode is proper/repack add 'proper' to name."}}),this._v(" "),t("b",[this._v("Release Type:")])]),this._v(" "),t("td",[this._v("%RT")]),this._v(" "),t("td",[this._v("PROPER")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"naming_multi_ep"}},[t("span",[this._v("Multi-Episode Style:")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"naming_anime"}},[t("span",[this._v("Add Absolute Number")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"naming_anime_only"}},[t("span",[this._v("Only Absolute Number")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"naming_anime_none"}},[t("span",[this._v("No Absolute Number")])])}],!1,null,null,null).exports,C={name:"plot-info",directives:{tooltip:n(23).b},props:{description:{type:String,required:!0}},computed:{plotInfoClass(){return""===this.description?"plotInfoNone":"plotInfo"}}},E=(n(199),Object(i.a)(C,(function(){var e=this.$createElement,t=this._self._c||e;return""!==this.description?t("img",{directives:[{name:"tooltip",rawName:"v-tooltip.right",value:{content:this.description},expression:"{content: description}",modifiers:{right:!0}}],class:this.plotInfoClass,attrs:{src:"images/info32.png",width:"16",height:"16",alt:""}}):this._e()}),[],!1,null,null,null).exports),P={name:"quality-chooser",components:{AppLink:l},props:{overallQuality:{type:Number,default:window.qualityChooserInitialQuality},keep:{type:String,default:null,validator:e=>["keep","show"].includes(e)},showSlug:{type:String}},data:()=>({lock:!1,allowedQualities:[],preferredQualities:[],curQualityPreset:null,archive:!1,archivedStatus:"",archiveButton:{text:"Archive episodes",disabled:!1}}),computed:{...Object(s.e)({qualityValues:e=>e.consts.qualities.values,qualityPresets:e=>e.consts.qualities.presets,defaultQuality:e=>e.config.showDefaults.quality}),...Object(s.d)(["getQualityPreset","splitQuality"]),initialQuality(){return void 0===this.overallQuality?this.defaultQuality:this.overallQuality},selectedQualityPreset:{get(){return this.curQualityPreset},set(e){const{curQualityPreset:t,setQualityFromPreset:n}=this,[s,a]=Array.isArray(e)?e:[e,t];n(s,a),this.curQualityPreset=s}},explanation(){const{allowedQualities:e,preferredQualities:t,qualityValues:n}=this;return n.reduce((n,{value:s,name:a})=>{const o=t.includes(s);return(e.includes(s)||o)&&n.allowed.push(a),o&&n.preferred.push(a),n},{allowed:[],preferred:[]})},validQualities(){return this.qualityValues.filter(({key:e})=>"na"!==e)}},asyncComputed:{async backloggedEpisodes(){const{showSlug:e,allowedQualities:t,preferredQualities:n}=this;if(!e)return null;if(t.length+n.length===0)return null;const s="series/".concat(e,"/legacy/backlogged"),a={allowed:t.join(","),preferred:n.join(",")};let o,i=!1;try{o=await r.a.get(s,{params:a})}catch(e){return{status:i,html:"Failed to get backlog prediction
"+String(e)}}const l=o.data.new,c=o.data.existing,d=Math.abs(l-c);let u="Current backlog: "+c+" episodes
";if(-1===l||-1===c)u="No qualities selected";else if(l===c)u+="This change won't affect your backlogged episodes",i=!0;else{u+="
New backlog: "+l+" episodes",u+="

";let e="";l>c?(u+="WARNING: ",e="increase",this.archive=!0):e="decrease",u+="Backlog will "+e+" by "+d+" episodes."}return{status:i,html:u}}},mounted(){this.setInitialPreset(this.initialQuality)},methods:{isQualityPreset(e){return void 0!==this.getQualityPreset({value:e})},setInitialPreset(e){const{isQualityPreset:t,keep:n}=this,s="keep"===n?"keep":t(e)?e:0;this.selectedQualityPreset=[s,e]},async archiveEpisodes(){this.archivedStatus="Archiving...";const e="series/".concat(this.showSlug,"/operation"),t=await r.a.post(e,{type:"ARCHIVE_EPISODES"});201===t.status?(this.archivedStatus="Successfully archived episodes",this.$asyncComputed.backloggedEpisodes.update()):204===t.status&&(this.archivedStatus="No episodes to be archived"),this.archiveButton.text="Finished",this.archiveButton.disabled=!0},setQualityFromPreset(e,t){if(null==e)return;[e,t].some(e=>"keep"===e)?e=this.initialQuality:0!==e&&this.isQualityPreset(e)||null===t||(e=t);const{allowed:n,preferred:s}=this.splitQuality(e);this.allowedQualities=n,this.preferredQualities=s}},watch:{overallQuality(e){this.lock||this.setInitialPreset(e)},allowedQualities(e){0===e.length&&this.preferredQualities.length>0&&(this.preferredQualities=[]),this.lock=!0,this.$emit("update:quality:allowed",e),this.$nextTick(()=>{this.lock=!1})},preferredQualities(e){this.lock=!0,this.$emit("update:quality:preferred",e),this.$nextTick(()=>{this.lock=!1})}}},T=(n(201),Object(i.a)(P,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("select",{directives:[{name:"model",rawName:"v-model.number",value:e.selectedQualityPreset,expression:"selectedQualityPreset",modifiers:{number:!0}}],staticClass:"form-control form-control-inline input-sm",attrs:{name:"quality_preset"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(t){var n="_value"in t?t._value:t.value;return e._n(n)}));e.selectedQualityPreset=t.target.multiple?n:n[0]}}},[e.keep?n("option",{attrs:{value:"keep"}},[e._v("< Keep >")]):e._e(),e._v(" "),n("option",{domProps:{value:0}},[e._v("Custom")]),e._v(" "),e._l(e.qualityPresets,(function(t){return n("option",{key:"quality-preset-"+t.key,domProps:{value:t.value}},[e._v("\n "+e._s(t.name)+"\n ")])}))],2),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.selectedQualityPreset,expression:"selectedQualityPreset === 0"}],attrs:{id:"customQualityWrapper"}},[e._m(0),e._v(" "),n("div",[n("h5",[e._v("Allowed")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model.number",value:e.allowedQualities,expression:"allowedQualities",modifiers:{number:!0}}],staticClass:"form-control form-control-inline input-sm",attrs:{name:"allowed_qualities",multiple:"multiple",size:e.validQualities.length},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(t){var n="_value"in t?t._value:t.value;return e._n(n)}));e.allowedQualities=t.target.multiple?n:n[0]}}},e._l(e.validQualities,(function(t){return n("option",{key:"quality-list-"+t.key,domProps:{value:t.value}},[e._v("\n "+e._s(t.name)+"\n ")])})),0)]),e._v(" "),n("div",[n("h5",[e._v("Preferred")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model.number",value:e.preferredQualities,expression:"preferredQualities",modifiers:{number:!0}}],staticClass:"form-control form-control-inline input-sm",attrs:{name:"preferred_qualities",multiple:"multiple",size:e.validQualities.length,disabled:0===e.allowedQualities.length},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(t){var n="_value"in t?t._value:t.value;return e._n(n)}));e.preferredQualities=t.target.multiple?n:n[0]}}},e._l(e.validQualities,(function(t){return n("option",{key:"quality-list-"+t.key,domProps:{value:t.value}},[e._v("\n "+e._s(t.name)+"\n ")])})),0)])]),e._v(" "),"keep"!==e.selectedQualityPreset?n("div",[e.allowedQualities.length+e.preferredQualities.length>=1?n("div",{attrs:{id:"qualityExplanation"}},[e._m(1),e._v(" "),0===e.preferredQualities.length?n("h5",[e._v("\n This will download "),n("b",[e._v("any")]),e._v(" of these qualities and then stops searching:\n "),n("label",{attrs:{id:"allowedExplanation"}},[e._v(e._s(e.explanation.allowed.join(", ")))])]):[n("h5",[e._v("\n Downloads "),n("b",[e._v("any")]),e._v(" of these qualities:\n "),n("label",{attrs:{id:"allowedPreferredExplanation"}},[e._v(e._s(e.explanation.allowed.join(", ")))])]),e._v(" "),n("h5",[e._v("\n But it will stop searching when one of these is downloaded:\n "),n("label",{attrs:{id:"preferredExplanation"}},[e._v(e._s(e.explanation.preferred.join(", ")))])])]],2):n("div",[e._v("Please select at least one allowed quality.")])]):e._e(),e._v(" "),e.backloggedEpisodes?n("div",[n("h5",{staticClass:"{ 'red-text': !backloggedEpisodes.status }",domProps:{innerHTML:e._s(e.backloggedEpisodes.html)}})]):e._e(),e._v(" "),e.archive?n("div",{attrs:{id:"archive"}},[n("h5",[n("b",[e._v("Archive downloaded episodes that are not currently in\n "),n("app-link",{staticClass:"backlog-link",attrs:{href:"manage/backlogOverview/",target:"_blank"}},[e._v("backlog")]),e._v(".")],1),e._v(" "),n("br"),e._v("Avoids unnecessarily increasing your backlog\n "),n("br")]),e._v(" "),n("button",{staticClass:"btn-medusa btn-inline",attrs:{disabled:e.archiveButton.disabled},on:{click:function(t){return t.preventDefault(),e.archiveEpisodes(t)}}},[e._v("\n "+e._s(e.archiveButton.text)+"\n ")]),e._v(" "),n("h5",[e._v(e._s(e.archivedStatus))])]):e._e()])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("p",[t("b",[t("strong",[this._v("Preferred")])]),this._v(" qualities will replace those in "),t("b",[t("strong",[this._v("allowed")])]),this._v(", even if they are lower.\n ")])},function(){var e=this.$createElement,t=this._self._c||e;return t("h5",[t("b",[this._v("Quality setting explanation:")])])}],!1,null,"751f4e5c",null).exports),N=n(77),O=n(43).a,D=(n(205),Object(i.a)(O,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"scroll-buttons-wrapper"}},[n("div",{staticClass:"scroll-wrapper top",class:{show:e.showToTop},on:{click:function(t){return t.preventDefault(),e.scrollTop(t)}}},[e._m(0)]),e._v(" "),n("div",{staticClass:"scroll-wrapper left",class:{show:e.showLeftRight}},[n("span",{staticClass:"scroll-left-inner"},[n("i",{staticClass:"glyphicon glyphicon-circle-arrow-left",on:{click:function(t){return t.preventDefault(),e.scrollLeft(t)}}})])]),e._v(" "),n("div",{staticClass:"scroll-wrapper right",class:{show:e.showLeftRight}},[n("span",{staticClass:"scroll-right-inner"},[n("i",{staticClass:"glyphicon glyphicon-circle-arrow-right",on:{click:function(t){return t.preventDefault(),e.scrollRight(t)}}})])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"scroll-top-inner"},[t("i",{staticClass:"glyphicon glyphicon-circle-arrow-up"})])}],!1,null,null,null).exports),A={name:"select-list",props:{listItems:{type:Array,default:()=>[],required:!0},unique:{type:Boolean,default:!0,required:!1},csvEnabled:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1}},data(){return{editItems:[],newItem:"",indexCounter:0,csv:"",csvMode:this.csvEnabled}},mounted(){this.editItems=this.sanitize(this.listItems),this.csv=this.editItems.map(e=>e.value).join(", ")},created(){const e=this.$watch("listItems",()=>{e(),this.editItems=this.sanitize(this.listItems),this.csv=this.editItems.map(e=>e.value).join(", ")})},methods:{addItem(e){this.unique&&this.editItems.find(t=>t.value===e)||(this.editItems.push({id:this.indexCounter,value:e}),this.indexCounter+=1)},addNewItem(){const{newItem:e,editItems:t}=this;""!==this.newItem&&(this.addItem(e),this.newItem="",this.$emit("change",t))},deleteItem(e){this.editItems=this.editItems.filter(t=>t!==e),this.$refs.newItemInput.focus(),this.$emit("change",this.editItems)},removeEmpty(e){return""===e.value&&this.deleteItem(e)},sanitize(e){return e?e.map(e=>"string"==typeof e?(this.indexCounter+=1,{id:this.indexCounter-1,value:e}):e):[]},syncValues(){this.csvMode?(this.editItems=[],this.csv.split(",").forEach(e=>{e.trim()&&this.addItem(e.trim())}),this.$emit("change",this.editItems)):this.csv=this.editItems.map(e=>e.value).join(", ")},switchFields(){this.syncValues(),this.csvMode=!this.csvMode}},watch:{csv(){this.syncValues()},listItems(){this.editItems=this.sanitize(this.listItems),this.newItem=""}}},$=(n(207),Object(i.a)(A,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",e._b({staticClass:"select-list max-width"},"div",{disabled:e.disabled},!1),[n("i",{staticClass:"switch-input glyphicon glyphicon-refresh",attrs:{title:"Switch between a list and comma separated values"},on:{click:function(t){return e.switchFields()}}}),e._v(" "),e.csvMode?n("div",{staticClass:"csv"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.csv,expression:"csv"}],staticClass:"form-control input-sm",attrs:{type:"text",placeholder:"add values comma separated"},domProps:{value:e.csv},on:{input:function(t){t.target.composing||(e.csv=t.target.value)}}})]):n("ul",[e._l(e.editItems,(function(t){return n("li",{key:t.id},[n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.value,expression:"item.value"}],staticClass:"form-control input-sm",attrs:{type:"text"},domProps:{value:t.value},on:{input:[function(n){n.target.composing||e.$set(t,"value",n.target.value)},function(n){return e.removeEmpty(t)}]}}),e._v(" "),n("div",{staticClass:"input-group-btn",on:{click:function(n){return e.deleteItem(t)}}},[e._m(0,!0)])])])})),e._v(" "),n("div",{staticClass:"new-item"},[n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.newItem,expression:"newItem"}],ref:"newItemInput",staticClass:"form-control input-sm",attrs:{type:"text",placeholder:"add new values per line"},domProps:{value:e.newItem},on:{input:function(t){t.target.composing||(e.newItem=t.target.value)}}}),e._v(" "),n("div",{staticClass:"input-group-btn",on:{click:function(t){return e.addNewItem()}}},[e._m(1)])])]),e._v(" "),e.newItem.length>0?n("div",{staticClass:"new-item-help"},[e._v("\n Click "),n("i",{staticClass:"glyphicon glyphicon-plus"}),e._v(" to finish adding the value.\n ")]):e._e()],2)])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"btn btn-default input-sm",staticStyle:{"font-size":"14px"}},[t("i",{staticClass:"glyphicon glyphicon-remove",attrs:{title:"Remove"}})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"btn btn-default input-sm",staticStyle:{"font-size":"14px"}},[t("i",{staticClass:"glyphicon glyphicon-plus",attrs:{title:"Add"}})])}],!1,null,"e3747674",null).exports),M={name:"show-selector",props:{showSlug:String,followSelection:{type:Boolean,default:!1},placeholder:String,selectClass:{type:String,default:"select-show form-control input-sm-custom"}},data(){return{selectedShowSlug:this.showSlug||this.placeholder,lock:!1}},computed:{...Object(s.e)({layout:e=>e.layout,shows:e=>e.shows.shows}),showLists(){const{layout:e,shows:t}=this,{animeSplitHome:n,sortArticle:s}=e,a=[{type:"Shows",shows:[]},{type:"Anime",shows:[]}];if(0===t.length)return;t.forEach(e=>{const t=Number(n&&e.config.anime);a[t].shows.push(e)});const o=e=>(s?e:e.replace(/^((?:The|A|An)\s)/i,"")).toLowerCase();return a.forEach(e=>{e.shows.sort((e,t)=>{const n=o(e.title),s=o(t.title);return ns?1:0})}),a},whichList(){const{showLists:e}=this,t=0!==e[0].shows.length,n=0!==e[1].shows.length;return t&&n?-1:n?1:0}},watch:{showSlug(e){this.lock=!0,this.selectedShowSlug=e},selectedShowSlug(e){if(this.lock)return void(this.lock=!1);if(!this.followSelection)return;const{shows:t}=this,n=t.find(t=>t.id.slug===e);if(!n)return;const s=n.indexer,a=n.id[s],o=document.querySelector("base").getAttribute("href");window.location.href="".concat(o,"home/displayShow?indexername=").concat(s,"&seriesid=").concat(a)}}},L=(n(209),Object(i.a)(M,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"show-selector form-inline hidden-print"},[n("div",{staticClass:"select-show-group pull-left top-5 bottom-5"},[0===e.shows.length?n("select",{class:e.selectClass,attrs:{disabled:""}},[n("option",[e._v("Loading...")])]):n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedShowSlug,expression:"selectedShowSlug"}],class:e.selectClass,on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedShowSlug=t.target.multiple?n:n[0]},function(t){return e.$emit("change",e.selectedShowSlug)}]}},[e.placeholder?n("option",{attrs:{disabled:"",hidden:""},domProps:{value:e.placeholder,selected:!e.selectedShowSlug}},[e._v(e._s(e.placeholder))]):e._e(),e._v(" "),-1===e.whichList?e._l(e.showLists,(function(t){return n("optgroup",{key:t.type,attrs:{label:t.type}},e._l(t.shows,(function(t){return n("option",{key:t.id.slug,domProps:{value:t.id.slug}},[e._v(e._s(t.title))])})),0)})):e._l(e.showLists[e.whichList].shows,(function(t){return n("option",{key:t.id.slug,domProps:{value:t.id.slug}},[e._v(e._s(t.title))])}))],2)])])}),[],!1,null,null,null).exports),I={name:"state-switch",props:{theme:{type:String,default:"dark",validator:e=>["dark","light"].includes(e)},state:{required:!0,validator:e=>["yes","no","loading","true","false","null"].includes(String(e))}},computed:{src(){const{theme:e,realState:t}=this;return"loading"===t?"images/loading16-".concat(e||"dark",".gif"):"images/".concat(t,"16.png")},alt(){const{realState:e}=this;return e.charAt(0).toUpperCase()+e.substr(1)},realState(){const{state:e}=this;return["null","true","false"].includes(String(e))?{null:"loading",true:"yes",false:"no"}[String(e)]:e}}},B=Object(i.a)(I,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("img",e._b({attrs:{height:"16",width:"16"},on:{click:function(t){return e.$emit("click")}}},"img",{src:e.src,alt:e.alt},!1))}),[],!1,null,null,null).exports},function(e,t,n){"use strict";n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return c}));var s=n(29),a=n.n(s);const o=document.body.getAttribute("web-root"),i=document.body.getAttribute("api-key"),l=a.a.create({baseURL:o+"/",timeout:6e4,headers:{Accept:"application/json","Content-Type":"application/json"}}),r=a.a.create({baseURL:o+"/api/v1/"+i+"/",timeout:3e4,headers:{Accept:"application/json","Content-Type":"application/json"}}),c=a.a.create({baseURL:o+"/api/v2/",timeout:3e4,headers:{Accept:"application/json","Content-Type":"application/json","X-Api-Key":i}})},,,function(e,t,n){"use strict";n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return l})),n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return c})),n.d(t,"g",(function(){return u}));const s=!1,a=(e,t=[])=>{const n=(e,t)=>e|t;return(e.reduce(n,0)|t.reduce(n,0)<<16)>>>0},o=(e,t=!1)=>{e||(e=0),e=Math.max(e,0);const n=t?1e3:1024;if(Math.abs(e)=n&&a{let t="",n=0,s=!1;for(;ne.reduce((e,t)=>e.includes(t)?e:e.concat(t),[]),c=(e,t)=>e.filter(e=>!t.includes(e)),d=e=>new Promise(t=>setTimeout(t,e)),u=async(e,t=100,n=3e3)=>{let s=0;for(;!e();)if(await d(t),s+=t,s>n)throw new Error("waitFor timed out (".concat(n,"ms)"));return s}},,,,,,,,,,,,,,,function(e,t,n){"use strict";var s=n(50).a,a=n(0),o=Object(a.a)(s,void 0,void 0,!1,null,null,null);t.a=o.exports},function(e,t,n){"use strict";var s=n(9),a=n(1),o=n(122),i=n.n(o);const l="⚙️ Config added to store",r="📺 Show added to store",c="ℹ️ Statistics added to store";var d={state:{isAuthenticated:!1,user:{},tokens:{access:null,refresh:null},error:null},mutations:{"🔒 Logging in"(){},"🔒 ✅ Login Successful"(e,t){e.user=t,e.isAuthenticated=!0,e.error=null},"🔒 ❌ Login Failed"(e,{error:t}){e.user={},e.isAuthenticated=!1,e.error=t},"🔒 Logout"(e){e.user={},e.isAuthenticated=!1,e.error=null},"🔒 Refresh Token"(){},"🔒 Remove Auth Error"(){}},getters:{},actions:{login(e,t){const{commit:n}=e;n("🔒 Logging in");return(e=>Promise.resolve(e))(t).then(e=>(n("🔒 ✅ Login Successful",e),{success:!0})).catch(e=>(n("🔒 ❌ Login Failed",{error:e,credentials:t}),{success:!1,error:e}))},logout(e){const{commit:t}=e;t("🔒 Logout")}}};var u={state:{torrents:{authType:null,dir:null,enabled:null,highBandwidth:null,host:null,label:null,labelAnime:null,method:null,path:null,paused:null,rpcUrl:null,seedLocation:null,seedTime:null,username:null,password:null,verifySSL:null,testStatus:"Click below to test"},nzb:{enabled:null,method:null,nzbget:{category:null,categoryAnime:null,categoryAnimeBacklog:null,categoryBacklog:null,host:null,priority:null,useHttps:null,username:null,password:null},sabnzbd:{category:null,forced:null,categoryAnime:null,categoryBacklog:null,categoryAnimeBacklog:null,host:null,username:null,password:null,apiKey:null}}},mutations:{[l](e,{section:t,config:n}){"clients"===t&&(e=Object.assign(e,n))}},getters:{},actions:{}},p=n(3),h=n(6);var m={state:{wikiUrl:null,donationsUrl:null,selectedRootIndex:null,namingForceFolders:null,sourceUrl:null,downloadUrl:null,rootDirs:[],subtitles:{enabled:null},logs:{debug:null,dbDebug:null,loggingLevels:{},numErrors:null,numWarnings:null,actualLogDir:null,nr:null,size:null,subliminalLog:null,privacyLevel:null},cpuPreset:null,subtitlesMulti:null,anonRedirect:null,recentShows:[],randomShowSlug:null,showDefaults:{status:null,statusAfter:null,quality:null,subtitles:null,seasonFolders:null,anime:null,scene:null},launchBrowser:null,defaultPage:null,trashRemoveShow:null,indexerDefaultLanguage:null,showUpdateHour:null,indexerTimeout:null,indexerDefault:null,plexFallBack:{enable:null,notifications:null,timeout:null},versionNotify:null,autoUpdate:null,updateFrequency:null,notifyOnUpdate:null,availableThemes:null,timePresets:[],datePresets:[],webInterface:{apiKey:null,log:null,username:null,password:null,port:null,notifyOnLogin:null,ipv6:null,httpsEnable:null,httpsCert:null,httpsKey:null,handleReverseProxy:null},sslVerify:null,sslCaBundle:null,noRestart:null,encryptionVersion:null,calendarUnprotected:null,calendarIcons:null,proxySetting:null,proxyIndexers:null,skipRemovedFiles:null,epDefaultDeletedStatus:null,developer:null,git:{username:null,password:null,token:null,authType:null,remote:null,path:null,org:null,reset:null,resetBranches:null,url:null},backlogOverview:{status:null,period:null},themeName:null},mutations:{[l](e,{section:t,config:n}){"main"===t&&(e=Object.assign(e,n))}},getters:{layout:e=>t=>e.layout[t],effectiveIgnored:(e,t,n)=>e=>{const t=e.config.release.ignoredWords.map(e=>e.toLowerCase()),s=n.search.filters.ignored.map(e=>e.toLowerCase());return e.config.release.ignoredWordsExclude?Object(h.a)(s,t):Object(h.b)(s.concat(t))},effectiveRequired:(e,t,n)=>e=>{const t=n.search.filters.required.map(e=>e.toLowerCase()),s=e.config.release.requiredWords.map(e=>e.toLowerCase());return e.config.release.requiredWordsExclude?Object(h.a)(t,s):Object(h.b)(t.concat(s))}},actions:{getConfig(e,t){const{commit:n}=e;return p.a.get("/config/"+(t||"")).then(e=>{if(t){const s=e.data;return n(l,{section:t,config:s}),s}const s=e.data;return Object.keys(s).forEach(e=>{const t=s[e];n(l,{section:e,config:t})}),s})},setConfig:(e,{section:t,config:n})=>p.a.patch("config/".concat(t),n),updateConfig(e,{section:t,config:n}){const{commit:s}=e;return s(l,{section:t,config:n})},getApiKey(e){const{commit:t}=e,n={webInterface:{apiKey:""}};return p.c.get("config/general/generate_api_key").then(e=>(n.webInterface.apiKey=e.data,t(l,{section:"main",config:n})))}}};var f={state:{qualities:{values:[],anySets:[],presets:[]},statuses:[]},mutations:{[l](e,{section:t,config:n}){"consts"===t&&(e=Object.assign(e,n))}},getters:{getQuality:e=>({key:t,value:n})=>{if([t,n].every(e=>void 0===e)||[t,n].every(e=>void 0!==e))throw new Error("Conflict in `getQuality`: Please provide either `key` or `value`.");return e.qualities.values.find(e=>t===e.key||n===e.value)},getQualityAnySet:e=>({key:t,value:n})=>{if([t,n].every(e=>void 0===e)||[t,n].every(e=>void 0!==e))throw new Error("Conflict in `getQualityAnySet`: Please provide either `key` or `value`.");return e.qualities.anySets.find(e=>t===e.key||n===e.value)},getQualityPreset:e=>({key:t,value:n})=>{if([t,n].every(e=>void 0===e)||[t,n].every(e=>void 0!==e))throw new Error("Conflict in `getQualityPreset`: Please provide either `key` or `value`.");return e.qualities.presets.find(e=>t===e.key||n===e.value)},getStatus:e=>({key:t,value:n})=>{if([t,n].every(e=>void 0===e)||[t,n].every(e=>void 0!==e))throw new Error("Conflict in `getStatus`: Please provide either `key` or `value`.");return e.statuses.find(e=>t===e.key||n===e.value)},getOverviewStatus:e=>(e,t,n)=>["Unset","Unaired"].includes(e)?"Unaired":["Skipped","Ignored"].includes(e)?"Skipped":["Archived"].includes(e)?"Preferred":["Wanted","Failed"].includes(e)?"Wanted":["Snatched","Snatched (Proper)","Snatched (Best)"].includes(e)?"Snatched":["Downloaded"].includes(e)?n.allowed.length>0&&0===n.preferred.length&&n.allowed.includes(t)?"Preferred":n.preferred.includes(t)?"Preferred":n.allowed.includes(t)?"Allowed":"Wanted":e,splitQuality:e=>t=>e.qualities.values.reduce((e,{value:n})=>(n&(t>>>=0)&&e.allowed.push(n),n<<16&t&&e.preferred.push(n),e),{allowed:[],preferred:[]})},actions:{}};var g={state:{show:{airs:null,airsFormatValid:null,akas:null,cache:null,classification:null,seasonCount:[],config:{airByDate:null,aliases:[],anime:null,defaultEpisodeStatus:null,dvdOrder:null,location:null,locationValid:null,paused:null,qualities:{allowed:[],preferred:[]},release:{requiredWords:[],ignoredWords:[],blacklist:[],whitelist:[],requiredWordsExclude:null,ignoredWordsExclude:null},scene:null,seasonFolders:null,sports:null,subtitlesEnabled:null,airdateOffset:null},countries:null,genres:[],id:{tvdb:null,slug:null},indexer:null,imdbInfo:{akas:null,certificates:null,countries:null,countryCodes:null,genres:null,imdbId:null,imdbInfoId:null,indexer:null,indexerId:null,lastUpdate:null,plot:null,rating:null,runtimes:null,title:null,votes:null},language:null,network:null,nextAirDate:null,plot:null,rating:{imdb:{rating:null,votes:null}},runtime:null,showType:null,status:null,title:null,type:null,year:{},size:null,showQueueStatus:[],xemNumbering:[],sceneAbsoluteNumbering:[],allSceneExceptions:[],xemAbsoluteNumbering:[],sceneNumbering:[],episodeCount:null}},mutations:{},getters:{},actions:{}};var v={state:{main:{externalMappings:{},statusMap:{},traktIndexers:{},validLanguages:[],langabbvToId:{}},indexers:{tvdb:{apiParams:{useZip:null,language:null},baseUrl:null,enabled:null,icon:null,id:null,identifier:null,mappedTo:null,name:null,scene_loc:null,showUrl:null,xemOrigin:null},tmdb:{apiParams:{useZip:null,language:null},baseUrl:null,enabled:null,icon:null,id:null,identifier:null,mappedTo:null,name:null,scene_loc:null,showUrl:null,xemOrigin:null},tvmaze:{apiParams:{useZip:null,language:null},baseUrl:null,enabled:null,icon:null,id:null,identifier:null,mappedTo:null,name:null,scene_loc:null,showUrl:null,xemOrigin:null}}},mutations:{[l](e,{section:t,config:n}){"indexers"===t&&(e=Object.assign(e,n))}},getters:{indexerIdToName:e=>t=>{if(!t)return;const{indexers:n}=e;return Object.keys(n).find(e=>n[e].id===parseInt(t,10))},indexerNameToId:e=>t=>{if(!t)return;const{indexers:n}=e;return n[name].id}},actions:{}};var b={state:{show:{specials:null,showListOrder:[],pagination:{enable:null}},home:null,history:null,historyLimit:null,schedule:null,wide:null,posterSortdir:null,timezoneDisplay:null,timeStyle:null,dateStyle:null,themeName:null,animeSplitHomeInTabs:null,animeSplitHome:null,fanartBackground:null,fanartBackgroundOpacity:null,trimZero:null,sortArticle:null,fuzzyDating:null,posterSortby:null,comingEps:{missedRange:null,sort:null,displayPaused:null,layout:null},backlogOverview:{status:null,period:null}},mutations:{[l](e,{section:t,config:n}){"layout"===t&&(e=Object.assign(e,n))}},getters:{},actions:{setLayout:(e,{page:t,layout:n})=>p.a.patch("config/main",{layout:{[t]:n}}).then(()=>{setTimeout(()=>{location.reload()},500)}),setTheme(e,{themeName:t}){const{commit:n}=e;return p.a.patch("config/main",{layout:{themeName:t}}).then(()=>n(l,{section:"layout",config:{themeName:t}}))},setSpecials(e,t){const{commit:n,state:s}=e,a=Object.assign({},s.show);return a.specials=t,p.a.patch("config/main",{layout:{show:a}}).then(()=>n(l,{section:"layout",config:{show:a}}))}}};var _={state:{metadataProviders:{}},mutations:{[l](e,{section:t,config:n}){"metadata"===t&&(e=Object.assign(e,n))}},getters:{},actions:{}};var w={state:{enabled:!0},mutations:{"🔔 Notifications Enabled"(e){e.enabled=!0},"🔔 Notifications Disabled"(e){e.enabled=!1}},getters:{},actions:{enable(e){const{commit:t}=e;t("🔔 Notifications Enabled")},disable(e){const{commit:t}=e;t("🔔 Notifications Disabled")},test:()=>window.displayNotification("error","test",'test
hello world
  • item 1
  • item 2
',"notification-test")}};var y={state:{},mutations:{[l](e,{section:t,config:n}){"notifiers"===t&&(e=Object.assign(e,n))}},getters:{},actions:{},modules:{boxcar2:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,accessToken:null},mutations:{},getters:{},actions:{}},discord:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,webhook:null,tts:null},mutations:{},getters:{},actions:{}},email:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,host:null,port:null,from:null,tls:null,username:null,password:null,addressList:[],subject:null},mutations:{},getters:{},actions:{}},emby:{state:{enabled:null,host:null,apiKey:null},mutations:{},getters:{},actions:{}},freemobile:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,api:null,id:null},mutations:{},getters:{},actions:{}},growl:{state:{enabled:null,host:null,password:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null},mutations:{},getters:{},actions:{}},kodi:{state:{enabled:null,alwaysOn:null,libraryCleanPending:null,cleanLibrary:null,host:[],username:null,password:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,update:{library:null,full:null,onlyFirst:null}},mutations:{},getters:{},actions:{}},libnotify:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null},mutations:{},getters:{},actions:{}},nmj:{state:{enabled:null,host:null,database:null,mount:null},mutations:{},getters:{},actions:{}},nmjv2:{state:{enabled:null,host:null,dbloc:null,database:null},mutations:{},getters:{},actions:{}},plex:{state:{client:{host:[],username:null,enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null},server:{updateLibrary:null,host:[],enabled:null,https:null,username:null,password:null,token:null}},mutations:{},getters:{},actions:{}},prowl:{state:{enabled:null,api:[],messageTitle:null,priority:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null},mutations:{},getters:{},actions:{}},pushalot:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,authToken:null},mutations:{},getters:{},actions:{}},pushbullet:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,authToken:null,device:null},mutations:{},getters:{},actions:{}},join:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,api:null,device:null},mutations:{},getters:{},actions:{}},pushover:{state:{enabled:null,apiKey:null,userKey:null,device:[],sound:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null},mutations:{},getters:{},actions:{}},pyTivo:{state:{enabled:null,host:null,name:null,shareName:null},mutations:{},getters:{},actions:{}},slack:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,webhook:null},mutations:{},getters:{},actions:{}},synology:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null},mutations:{},getters:{},actions:{}},synologyIndex:{state:{enabled:null},mutations:{},getters:{},actions:{}},telegram:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,api:null,id:null},mutations:{},getters:{},actions:{}},trakt:{state:{enabled:null,pinUrl:null,username:null,accessToken:null,timeout:null,defaultIndexer:null,sync:null,syncRemove:null,syncWatchlist:null,methodAdd:null,removeWatchlist:null,removeSerieslist:null,removeShowFromApplication:null,startPaused:null,blacklistName:null},mutations:{},getters:{},actions:{}},twitter:{state:{enabled:null,notifyOnSnatch:null,notifyOnDownload:null,notifyOnSubtitleDownload:null,dmto:null,prefix:null,directMessage:null},mutations:{},getters:{},actions:{}}}};var x={state:{naming:{pattern:null,multiEp:null,enableCustomNamingSports:null,enableCustomNamingAirByDate:null,patternSports:null,patternAirByDate:null,enableCustomNamingAnime:null,patternAnime:null,animeMultiEp:null,animeNamingType:null,stripYear:null},showDownloadDir:null,processAutomatically:null,processMethod:null,deleteRarContent:null,unpack:null,noDelete:null,reflinkAvailable:null,postponeIfSyncFiles:null,autoPostprocessorFrequency:10,airdateEpisodes:null,moveAssociatedFiles:null,allowedExtensions:[],addShowsWithoutDir:null,createMissingShowDirs:null,renameEpisodes:null,postponeIfNoSubs:null,nfoRename:null,syncFiles:[],fileTimestampTimezone:"local",extraScripts:[],extraScriptsUrl:null,multiEpStrings:{}},mutations:{[l](e,{section:t,config:n}){"postprocessing"===t&&(e=Object.assign(e,n))}},getters:{},actions:{}};var k={state:{filters:{ignoreUnknownSubs:!1,ignored:["german","french","core2hd","dutch","swedish","reenc","MrLss","dubbed"],undesired:["internal","xvid"],ignoredSubsList:["dk","fin","heb","kor","nor","nordic","pl","swe"],required:[],preferred:[]},general:{minDailySearchFrequency:10,minBacklogFrequency:720,dailySearchFrequency:40,checkPropersInterval:"4h",usenetRetention:500,maxCacheAge:30,backlogDays:7,torrentCheckerFrequency:60,backlogFrequency:720,cacheTrimming:!1,downloadPropers:!0,failedDownloads:{enabled:null,deleteFailed:null},minTorrentCheckerFrequency:30,removeFromClient:!1,randomizeProviders:!1,propersSearchDays:2,allowHighPriority:!0,trackersList:["udp://tracker.coppersurfer.tk:6969/announce","udp://tracker.leechers-paradise.org:6969/announce","udp://tracker.zer0day.to:1337/announce","udp://tracker.opentrackr.org:1337/announce","http://tracker.opentrackr.org:1337/announce","udp://p4p.arenabg.com:1337/announce","http://p4p.arenabg.com:1337/announce","udp://explodie.org:6969/announce","udp://9.rarbg.com:2710/announce","http://explodie.org:6969/announce","http://tracker.dler.org:6969/announce","udp://public.popcorn-tracker.org:6969/announce","udp://tracker.internetwarriors.net:1337/announce","udp://ipv4.tracker.harry.lu:80/announce","http://ipv4.tracker.harry.lu:80/announce","udp://mgtracker.org:2710/announce","http://mgtracker.org:6969/announce","udp://tracker.mg64.net:6969/announce","http://tracker.mg64.net:6881/announce","http://torrentsmd.com:8080/announce"]}},mutations:{[l](e,{section:t,config:n}){"search"===t&&(e=Object.assign(e,n))}},getters:{},actions:{}};var S={state:{shows:[],currentShow:{indexer:null,id:null}},mutations:{[r](e,t){const n=e.shows.find(({id:e,indexer:n})=>Number(t.id[t.indexer])===Number(e[n]));if(!n)return console.debug("Adding ".concat(t.title||t.indexer+String(t.id)," as it wasn't found in the shows array"),t),void e.shows.push(t);console.debug("Found ".concat(t.title||t.indexer+String(t.id)," in shows array attempting merge"));const a={...n,...t};s.a.set(e.shows,e.shows.indexOf(n),a),console.debug("Merged ".concat(a.title||a.indexer+String(a.id)),a)},currentShow(e,{indexer:t,id:n}){e.currentShow.indexer=t,e.currentShow.id=n},"📺 Shows season with episodes added to store"(e,{show:t,episodes:n}){const a=Object.assign({},e.shows.find(({id:e,indexer:n})=>Number(t.id[t.indexer])===Number(e[n])));a.seasons||(a.seasons=[]),n.forEach(e=>{const t=a.seasons.find(t=>t.season===e.season);if(t){const n=t.episodes.findIndex(t=>t.slug===e.slug);-1===n?t.episodes.push(e):t.episodes.splice(n,1,e)}else{const t={season:e.season,episodes:[],html:!1,mode:"span",label:1};a.seasons.push(t),t.episodes.push(e)}});const o=e.shows.find(({id:e,indexer:n})=>Number(t.id[t.indexer])===Number(e[n]));s.a.set(e.shows,e.shows.indexOf(o),a),console.log("Storing episodes for show ".concat(a.title," seasons: ").concat([...new Set(n.map(e=>e.season))].join(", ")))}},getters:{getShowById:e=>({id:t,indexer:n})=>e.shows.find(e=>Number(e.id[n])===Number(t)),getShowByTitle:e=>t=>e.shows.find(e=>e.title===t),getSeason:e=>({id:t,indexer:n,season:s})=>{const a=e.shows.find(e=>Number(e.id[n])===Number(t));return a&&a.seasons?a.seasons[s]:void 0},getEpisode:e=>({id:t,indexer:n,season:s,episode:a})=>{const o=e.shows.find(e=>Number(e.id[n])===Number(t));return o&&o.seasons&&o.seasons[s]?o.seasons[s][a]:void 0},getCurrentShow:(e,t,n)=>e.shows.find(t=>Number(t.id[e.currentShow.indexer])===Number(e.currentShow.id))||n.defaults.show},actions:{getShow:(e,{indexer:t,id:n,detailed:s,episodes:a})=>new Promise((o,i)=>{const{commit:l}=e,c={};let d=3e4;void 0!==s&&(c.detailed=s,d=6e4,d=6e4),void 0!==a&&(c.episodes=a,d=6e4),p.a.get("/series/".concat(t).concat(n),{params:c,timeout:d}).then(e=>{l(r,e.data),o(e.data)}).catch(e=>{i(e)})}),getEpisodes:({commit:e,getters:t},{indexer:n,id:s,season:a})=>new Promise((o,i)=>{const{getShowById:l}=t,r=l({id:s,indexer:n}),c={limit:1e3};void 0!==a&&(c.season=a),p.a.get("/series/".concat(n).concat(s,"/episodes"),{params:c}).then(t=>{e("📺 Shows season with episodes added to store",{show:r,episodes:t.data}),o()}).catch(e=>{console.log("Could not retrieve a episodes for show ".concat(n).concat(s,", error: ").concat(e)),i(e)})}),getShows(e,t){const{commit:n,dispatch:s}=e;return t?t.forEach(e=>s("getShow",e)):(()=>{const e={limit:1e3,page:1};p.a.get("/series",{params:e}).then(t=>{const s=Number(t.headers["x-pagination-total"]);t.data.forEach(e=>{n(r,e)});const a=[];for(let t=2;t<=s;t++){const s={page:t};s.limit=e.limit,a.push(p.a.get("/series",{params:s}).then(e=>{e.data.forEach(e=>{n(r,e)})}))}return Promise.all(a)}).catch(()=>{console.log("Could not retrieve a list of shows")})})()},setShow:(e,{indexer:t,id:n,data:s})=>p.a.patch("series/".concat(t).concat(n),s),updateShow(e,t){const{commit:n}=e;return n(r,t)}}};var C={state:{isConnected:!1,message:{},messages:[],reconnectError:!1},mutations:{"🔗 ✅ WebSocket connected"(e){e.isConnected=!0},"🔗 ❌ WebSocket disconnected"(e){e.isConnected=!1},"🔗 ❌ WebSocket error"(e,t){console.error(e,t)},"🔗 ✉️ 📥 WebSocket message received"(e,t){const{data:n,event:s}=t;if(e.message=t,"notification"===s){const s=e.messages.filter(e=>e.hash===n.hash);1===s.length?e.messages[e.messages.indexOf(s)]=t:e.messages.push(t)}},"🔗 🔃 WebSocket reconnecting"(e,t){console.info(e,t)},"🔗 🔃 ❌ WebSocket reconnection attempt failed"(e){e.reconnectError=!0;let t="";t+="Please check your network connection. ",t+="If you are using a reverse proxy, please take a look at our wiki for config examples.",window.displayNotification("notice","Error connecting to websocket","Please check your network connection. If you are using a reverse proxy, please take a look at our wiki for config examples.")}},getters:{},actions:{}};var E={state:{overall:{episodes:{downloaded:null,snatched:null,total:null},shows:{active:null,total:null}}},mutations:{[c](e,t){const{type:n,stats:s}=t;e[n]=Object.assign(e[n],s)}},getters:{},actions:{getStats(e,t){const{commit:n}=e;return p.a.get("/stats/"+(t||"")).then(e=>{n(c,{type:t||"overall",stats:e.data})})}}};var P={state:{branch:null,memoryUsage:null,schedulers:[],showQueue:[],sslVersion:null,pythonVersion:null,pid:null,os:null,logDir:null,dbPath:null,configFile:null,databaseVersion:{major:null,minor:null},locale:null,localUser:null,programDir:null,dataDir:null,cacheDir:null,appArgs:[],webRoot:null,runsInDocker:null,gitRemoteBranches:[],cpuPresets:null,news:{lastRead:null,latest:null,unread:null}},mutations:{[l](e,{section:t,config:n}){"system"===t&&(e=Object.assign(e,n))}},getters:{getScheduler:e=>t=>e.schedulers.find(e=>t===e.key)||{}},actions:{}};s.a.use(a.b);const T=new a.a({modules:{auth:d,clients:u,config:m,consts:f,defaults:g,indexers:v,layout:b,metadata:_,notifications:w,notifiers:y,postprocessing:x,search:k,shows:S,socket:C,stats:E,system:P},state:{},mutations:{},getters:{},actions:{}}),N=(()=>{const{protocol:e,host:t}=window.location,n="https:"===e?"wss:":"ws:",s=document.body.getAttribute("web-root");return"".concat(n,"//").concat(t).concat(s,"/ws").concat("/ui")})();s.a.use(i.a,N,{store:T,format:"json",reconnection:!0,reconnectionAttempts:2,reconnectionDelay:1e3,passToStoreHandler:function(e,t,n){const s=e.toUpperCase(),a=t.data;if("SOCKET_ONMESSAGE"===s){const e=JSON.parse(a),{data:t,event:n}=e;if("notification"===n){const{body:e,hash:n,type:s,title:a}=t;window.displayNotification(s,a,e,n)}else if("configUpdated"===n){const{section:e,config:n}=t;this.store.dispatch("updateConfig",{section:e,config:n})}else"showUpdated"===n?this.store.dispatch("updateShow",t):window.displayNotification("info",n,t)}n(e,t)},mutations:{SOCKET_ONOPEN:"🔗 ✅ WebSocket connected",SOCKET_ONCLOSE:"🔗 ❌ WebSocket disconnected",SOCKET_ONERROR:"🔗 ❌ WebSocket error",SOCKET_ONMESSAGE:"🔗 ✉️ 📥 WebSocket message received",SOCKET_RECONNECT:"🔗 🔃 WebSocket reconnecting",SOCKET_RECONNECT_ERROR:"🔗 🔃 ❌ WebSocket reconnection attempt failed"}});t.a=T},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var s=n(9),a=n(92);const o=[{title:"General",path:"config/general/",icon:"menu-icon-config"},{title:"Backup/Restore",path:"config/backuprestore/",icon:"menu-icon-backup"},{title:"Search Settings",path:"config/search/",icon:"menu-icon-manage-searches"},{title:"Search Providers",path:"config/providers/",icon:"menu-icon-provider"},{title:"Subtitles Settings",path:"config/subtitles/",icon:"menu-icon-backlog"},{title:"Post Processing",path:"config/postProcessing/",icon:"menu-icon-postprocess"},{title:"Notifications",path:"config/notifications/",icon:"menu-icon-notification"},{title:"Anime",path:"config/anime/",icon:"menu-icon-anime"}],i=e=>{const{$route:t,$store:n}=e,{config:s,notifiers:a}=n.state,o=t.params.indexer||t.query.indexername,i=t.params.id||t.query.seriesid,l=n.getters.getCurrentShow,{showQueueStatus:r}=l,c=e=>!!r&&Boolean(r.find(t=>t.action===e&&!0===t.active)),d=c("isBeingAdded"),u=c("isBeingUpdated"),p=c("isBeingSubtitled");let h=[{title:"Edit",path:"home/editShow?indexername=".concat(o,"&seriesid=").concat(i),icon:"ui-icon ui-icon-pencil"}];return d||u||(h=h.concat([{title:l.config.paused?"Resume":"Pause",path:"home/togglePause?indexername=".concat(o,"&seriesid=").concat(i),icon:"ui-icon ui-icon-".concat(l.config.paused?"play":"pause")},{title:"Remove",path:"home/deleteShow?indexername=".concat(o,"&seriesid=").concat(i),confirm:"removeshow",icon:"ui-icon ui-icon-trash"},{title:"Re-scan files",path:"home/refreshShow?indexername=".concat(o,"&seriesid=").concat(i),icon:"ui-icon ui-icon-refresh"},{title:"Force Full Update",path:"home/updateShow?indexername=".concat(o,"&seriesid=").concat(i),icon:"ui-icon ui-icon-transfer-e-w"},{title:"Update show in KODI",path:"home/updateKODI?indexername=".concat(o,"&seriesid=").concat(i),requires:a.kodi.enabled&&a.kodi.update.library,icon:"menu-icon-kodi"},{title:"Update show in Emby",path:"home/updateEMBY?indexername=".concat(o,"&seriesid=").concat(i),requires:a.emby.enabled,icon:"menu-icon-emby"},{title:"Preview Rename",path:"home/testRename?indexername=".concat(o,"&seriesid=").concat(i),icon:"ui-icon ui-icon-tag"},{title:"Download Subtitles",path:"home/subtitleShow?indexername=".concat(o,"&seriesid=").concat(i),requires:s.subtitles.enabled&&!p&&l.config.subtitlesEnabled,icon:"menu-icon-backlog"}])),h};var l=[...[{path:"/home",name:"home",meta:{title:"Home",header:"Show List",topMenu:"home"}},{path:"/home/editShow",name:"editShow",meta:{topMenu:"home",subMenu:i},component:()=>Promise.resolve().then(n.bind(null,121))},{path:"/home/displayShow",name:"show",meta:{topMenu:"home",subMenu:i},component:()=>Promise.resolve().then(n.bind(null,120))},{path:"/home/snatchSelection",name:"snatchSelection",meta:{topMenu:"home",subMenu:i}},{path:"/home/testRename",name:"testRename",meta:{title:"Preview Rename",header:"Preview Rename",topMenu:"home"}},{path:"/home/postprocess",name:"postprocess",meta:{title:"Manual Post-Processing",header:"Manual Post-Processing",topMenu:"home"}},{path:"/home/status",name:"status",meta:{title:"Status",topMenu:"system"}},{path:"/home/restart",name:"restart",meta:{title:"Restarting...",header:"Performing Restart",topMenu:"system"}},{path:"/home/shutdown",name:"shutdown",meta:{header:"Shutting down",topMenu:"system"}},{path:"/home/update",name:"update",meta:{topMenu:"system"}}],...[{path:"/config",name:"config",meta:{title:"Help & Info",header:"Medusa Configuration",topMenu:"config",subMenu:o,converted:!0},component:()=>Promise.resolve().then(n.bind(null,111))},{path:"/config/anime",name:"configAnime",meta:{title:"Config - Anime",header:"Anime",topMenu:"config",subMenu:o}},{path:"/config/backuprestore",name:"configBackupRestore",meta:{title:"Config - Backup/Restore",header:"Backup/Restore",topMenu:"config",subMenu:o}},{path:"/config/general",name:"configGeneral",meta:{title:"Config - General",header:"General Configuration",topMenu:"config",subMenu:o,converted:!0},component:()=>Promise.resolve().then(n.bind(null,116))},{path:"/config/notifications",name:"configNotifications",meta:{title:"Config - Notifications",header:"Notifications",topMenu:"config",subMenu:o,converted:!0},component:()=>Promise.resolve().then(n.bind(null,118))},{path:"/config/postProcessing",name:"configPostProcessing",meta:{title:"Config - Post Processing",header:"Post Processing",topMenu:"config",subMenu:o,converted:!0},component:()=>Promise.resolve().then(n.bind(null,117))},{path:"/config/providers",name:"configSearchProviders",meta:{title:"Config - Providers",header:"Search Providers",topMenu:"config",subMenu:o}},{path:"/config/search",name:"configSearchSettings",meta:{title:"Config - Episode Search",header:"Search Settings",topMenu:"config",subMenu:o,converted:!0},component:()=>Promise.resolve().then(n.bind(null,119))},{path:"/config/subtitles",name:"configSubtitles",meta:{title:"Config - Subtitles",header:"Subtitles",topMenu:"config",subMenu:o}}],...[{path:"/addShows",name:"addShows",meta:{title:"Add Shows",header:"Add Shows",topMenu:"home",converted:!0},component:()=>Promise.resolve().then(n.bind(null,110))},{path:"/addShows/addExistingShows",name:"addExistingShows",meta:{title:"Add Existing Shows",header:"Add Existing Shows",topMenu:"home"}},{path:"/addShows/newShow",name:"addNewShow",meta:{title:"Add New Show",header:"Add New Show",topMenu:"home"}},{path:"/addShows/trendingShows",name:"addTrendingShows",meta:{topMenu:"home"}},{path:"/addShows/popularShows",name:"addPopularShows",meta:{title:"Popular Shows",header:"Popular Shows",topMenu:"home"}},{path:"/addShows/popularAnime",name:"addPopularAnime",meta:{title:"Popular Anime Shows",header:"Popular Anime Shows",topMenu:"home"}}],{path:"/login",name:"login",meta:{title:"Login"},component:()=>Promise.resolve().then(n.bind(null,113))},{path:"/addRecommended",name:"addRecommended",meta:{title:"Add Recommended Shows",header:"Add Recommended Shows",topMenu:"home",converted:!0},component:()=>Promise.resolve().then(n.bind(null,109))},{path:"/schedule",name:"schedule",meta:{title:"Schedule",header:"Schedule",topMenu:"schedule"}},{path:"/history",name:"history",meta:{title:"History",header:"History",topMenu:"history",subMenu:[{title:"Clear History",path:"history/clearHistory",icon:"ui-icon ui-icon-trash",confirm:"clearhistory"},{title:"Trim History",path:"history/trimHistory",icon:"menu-icon-cut",confirm:"trimhistory"}]}},{path:"/manage",name:"manage",meta:{title:"Mass Update",header:"Mass Update",topMenu:"manage"}},{path:"/manage/backlogOverview",name:"manageBacklogOverview",meta:{title:"Backlog Overview",header:"Backlog Overview",topMenu:"manage"}},{path:"/manage/episodeStatuses",name:"manageEpisodeOverview",meta:{title:"Episode Overview",header:"Episode Overview",topMenu:"manage"}},{path:"/manage/failedDownloads",name:"manageFailedDownloads",meta:{title:"Failed Downloads",header:"Failed Downloads",topMenu:"manage"}},{path:"/manage/manageSearches",name:"manageManageSearches",meta:{title:"Manage Searches",header:"Manage Searches",topMenu:"manage"}},{path:"/manage/massEdit",name:"manageMassEdit",meta:{title:"Mass Edit",topMenu:"manage"}},{path:"/manage/subtitleMissed",name:"manageSubtitleMissed",meta:{title:"Missing Subtitles",header:"Missing Subtitles",topMenu:"manage"}},{path:"/manage/subtitleMissedPP",name:"manageSubtitleMissedPP",meta:{title:"Missing Subtitles in Post-Process folder",header:"Missing Subtitles in Post-Process folder",topMenu:"manage"}},...[{path:"/errorlogs",name:"errorlogs",meta:{title:"Logs & Errors",topMenu:"system",subMenu:e=>{const{$route:t,$store:n}=e,s=t.params.level||t.query.level,{config:a}=n.state,{loggingLevels:o,numErrors:i,numWarnings:l}=a.logs;if(0===Object.keys(o).length)return[];const r=void 0===s||Number(s)===o.error;return[{title:"Clear Errors",path:"errorlogs/clearerrors/",requires:i>=1&&r,icon:"ui-icon ui-icon-trash"},{title:"Clear Warnings",path:"errorlogs/clearerrors/?level=".concat(o.warning),requires:l>=1&&Number(s)===o.warning,icon:"ui-icon ui-icon-trash"},{title:"Submit Errors",path:"errorlogs/submit_errors/",requires:i>=1&&r,confirm:"submiterrors",icon:"ui-icon ui-icon-arrowreturnthick-1-n"}]}}},{path:"/errorlogs/viewlog",name:"viewlog",meta:{title:"Logs",header:"Log File",topMenu:"system",converted:!0},component:()=>Promise.resolve().then(n.bind(null,114))}],{path:"/news",name:"news",meta:{title:"News",header:"News",topMenu:"system"}},{path:"/changes",name:"changes",meta:{title:"Changelog",header:"Changelog",topMenu:"system"}},{path:"/IRC",name:"IRC",meta:{title:"IRC",topMenu:"system",converted:!0},component:()=>Promise.resolve().then(n.bind(null,112))},{path:"/not-found",name:"not-found",meta:{title:"404",header:"404 - page not found"},component:()=>Promise.resolve().then(n.bind(null,115))}];s.a.use(a.a);const r=document.body.getAttribute("web-root")+"/",c=new a.a({base:r,mode:"history",routes:l});c.beforeEach((e,t,n)=>{const{meta:s}=e,{title:a}=s;a&&(document.title="".concat(a," | Medusa")),n()});t.b=c},function(e,t,n){"use strict";var s=n(1),a=n(3),o={name:"anidb-release-group-ui",components:{StateSwitch:n(2).p},props:{showName:{type:String,required:!0},blacklist:{type:Array,default:()=>[]},whitelist:{type:Array,default:()=>[]}},data:()=>({index:0,allReleaseGroups:[],newGroup:"",fetchingGroups:!1,remoteGroups:[]}),mounted(){this.createIndexedObjects(this.blacklist,"blacklist"),this.createIndexedObjects(this.whitelist,"whitelist"),this.createIndexedObjects(this.remoteGroups,"releasegroups"),this.fetchGroups()},methods:{async fetchGroups(){const{showName:e}=this;if(!e)return;this.fetchingGroups=!0,console.log("Fetching release groups");const t={series_name:e};try{const{data:e}=await a.c.get("home/fetch_releasegroups",{params:t,timeout:3e4});if("success"!==e.result)throw new Error("Failed to get release groups, check server logs for errors.");this.remoteGroups=e.groups||[]}catch(t){const n='Error while trying to fetch release groups for show "'.concat(e,'": ').concat(t||"Unknown");this.$snotify.warning(n,"Error"),console.error(n)}finally{this.fetchingGroups=!1}},toggleItem(e){this.allReleaseGroups=this.allReleaseGroups.map(t=>(t.id===e.id&&(t.toggled=!t.toggled),t))},createIndexedObjects(e,t){for(let n of e){"string"==typeof n&&(n={name:n});const e=Object.assign({id:this.index,toggled:!1,memberOf:t},n);0===this.allReleaseGroups.filter(n=>n.name===e.name&&n.memberOf===t).length&&(this.allReleaseGroups.push(e),this.index+=1)}},moveToList(e){for(const t of this.allReleaseGroups){const n=void 0!==this.allReleaseGroups.find(n=>n.memberOf===e&&n.name===t.name);t.toggled&&!n&&(t.toggled=!1,t.memberOf=e)}this.newGroup&&"releasegroups"!==e&&(this.allReleaseGroups.push({id:this.index,name:this.newGroup,toggled:!1,memberOf:e}),this.index+=1,this.newGroup="")},deleteFromList(e){this.allReleaseGroups=this.allReleaseGroups.filter(t=>t.memberOf!==e||!t.toggled)}},computed:{...Object(s.e)(["layout"]),itemsWhitelist(){return this.allReleaseGroups.filter(e=>"whitelist"===e.memberOf)},itemsBlacklist(){return this.allReleaseGroups.filter(e=>"blacklist"===e.memberOf)},itemsReleaseGroups(){return this.allReleaseGroups.filter(e=>"releasegroups"===e.memberOf)},showDeleteFromWhitelist(){return 0!==this.allReleaseGroups.filter(e=>"whitelist"===e.memberOf&&!0===e.toggled).length},showDeleteFromBlacklist(){return 0!==this.allReleaseGroups.filter(e=>"blacklist"===e.memberOf&&!0===e.toggled).length}},watch:{showName(){this.fetchGroups()},allReleaseGroups:{deep:!0,handler(e){const t={whitelist:[],blacklist:[]};e.forEach(e=>{Object.keys(t).includes(e.memberOf)&&t[e.memberOf].push(e.name)}),this.$emit("change",t)}},remoteGroups(e){this.createIndexedObjects(e,"releasegroups")}}},i=(n(211),n(0)),l=Object(i.a)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"anidb-release-group-ui-wrapper top-10 max-width"},[e.fetchingGroups?[n("state-switch",{attrs:{state:"loading",theme:e.layout.themeName}}),e._v(" "),n("span",[e._v("Fetching release groups...")])]:n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-4 left-whitelist"},[n("span",[e._v("Whitelist")]),e.showDeleteFromWhitelist?n("img",{staticClass:"deleteFromWhitelist",attrs:{src:"images/no16.png"},on:{click:function(t){return e.deleteFromList("whitelist")}}}):e._e(),e._v(" "),n("ul",[e._l(e.itemsWhitelist,(function(t){return n("li",{key:t.id,class:{active:t.toggled},on:{click:function(e){t.toggled=!t.toggled}}},[e._v(e._s(t.name))])})),e._v(" "),n("div",{staticClass:"arrow",on:{click:function(t){return e.moveToList("whitelist")}}},[n("img",{attrs:{src:"images/curved-arrow-left.png"}})])],2)]),e._v(" "),n("div",{staticClass:"col-sm-4 center-available"},[n("span",[e._v("Release groups")]),e._v(" "),n("ul",[e._l(e.itemsReleaseGroups,(function(t){return n("li",{key:t.id,staticClass:"initial",class:{active:t.toggled},on:{click:function(e){t.toggled=!t.toggled}}},[e._v(e._s(t.name))])})),e._v(" "),n("div",{staticClass:"arrow",on:{click:function(t){return e.moveToList("releasegroups")}}},[n("img",{attrs:{src:"images/curved-arrow-left.png"}})])],2)]),e._v(" "),n("div",{staticClass:"col-sm-4 right-blacklist"},[n("span",[e._v("Blacklist")]),e.showDeleteFromBlacklist?n("img",{staticClass:"deleteFromBlacklist",attrs:{src:"images/no16.png"},on:{click:function(t){return e.deleteFromList("blacklist")}}}):e._e(),e._v(" "),n("ul",[e._l(e.itemsBlacklist,(function(t){return n("li",{key:t.id,class:{active:t.toggled},on:{click:function(e){t.toggled=!t.toggled}}},[e._v(e._s(t.name))])})),e._v(" "),n("div",{staticClass:"arrow",on:{click:function(t){return e.moveToList("blacklist")}}},[n("img",{attrs:{src:"images/curved-arrow-left.png"}})])],2)])]),e._v(" "),n("div",{staticClass:"row",attrs:{id:"add-new-release-group"}},[n("div",{staticClass:"col-md-4"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.newGroup,expression:"newGroup"}],staticClass:"form-control input-sm",attrs:{type:"text",placeholder:"add custom group"},domProps:{value:e.newGroup},on:{input:function(t){t.target.composing||(e.newGroup=t.target.value)}}})]),e._v(" "),e._m(0)])],2)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"col-md-8"},[t("p",[this._v("Use the input to add custom whitelist / blacklist release groups. Click on the "),t("img",{attrs:{src:"images/curved-arrow-left.png"}}),this._v(" to add it to the correct list.")])])}],!1,null,"b388ff58",null);t.a=l.exports},function(e,t,n){"use strict";var s=n(60).a,a=(n(226),n(0)),o=Object(a.a)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"show-header-container"},[n("div",{staticClass:"row"},[e.show?n("div",{staticClass:"col-lg-12",attrs:{id:"showtitle","data-showname":e.show.title}},[n("div",[n("h1",{staticClass:"title",attrs:{"data-indexer-name":e.show.indexer,"data-series-id":e.show.id[e.show.indexer],id:"scene_exception_"+e.show.id[e.show.indexer]}},[n("app-link",{staticClass:"snatchTitle",attrs:{href:"home/displayShow?indexername="+e.show.indexer+"&seriesid="+e.show.id[e.show.indexer]}},[e._v(e._s(e.show.title))])],1)]),e._v(" "),"snatch-selection"===e.type?n("div",{staticClass:"pull-right",attrs:{id:"show-specials-and-seasons"}},[n("span",{staticClass:"h2footer display-specials"},[e._v("\n Manual search for:"),n("br"),e._v(" "),n("app-link",{staticClass:"snatchTitle",attrs:{href:"home/displayShow?indexername="+e.show.indexer+"&seriesid="+e.show.id[e.show.indexer]}},[e._v(e._s(e.show.title))]),e._v(" / Season "+e._s(e.season)),void 0!==e.episode&&"season"!==e.manualSearchType?[e._v(" Episode "+e._s(e.episode))]:e._e()],2)]):e._e(),e._v(" "),"snatch-selection"!==e.type&&e.seasons.length>=1?n("div",{staticClass:"pull-right",attrs:{id:"show-specials-and-seasons"}},[e.seasons.includes(0)?n("span",{staticClass:"h2footer display-specials"},[e._v("\n Display Specials: "),n("a",{staticClass:"inner",staticStyle:{cursor:"pointer"},on:{click:function(t){return t.preventDefault(),e.toggleSpecials()}}},[e._v(e._s(e.displaySpecials?"Hide":"Show"))])]):e._e(),e._v(" "),n("div",{staticClass:"h2footer display-seasons clear"},[n("span",[e.seasons.length>=15?n("select",{directives:[{name:"model",rawName:"v-model",value:e.jumpToSeason,expression:"jumpToSeason"}],staticClass:"form-control input-sm",staticStyle:{position:"relative"},attrs:{id:"seasonJump"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.jumpToSeason=t.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"jump"}},[e._v("Jump to Season")]),e._v(" "),e._l(e.seasons,(function(t){return n("option",{key:"jumpToSeason-"+t,domProps:{value:t}},[e._v("\n "+e._s(0===t?"Specials":"Season "+t)+"\n ")])}))],2):e.seasons.length>=1?[e._v("\n Season:\n "),e._l(e.reverse(e.seasons),(function(t,s){return[n("app-link",{key:"jumpToSeason-"+t,attrs:{href:"#season-"+t},nativeOn:{click:function(n){n.preventDefault(),e.jumpToSeason=t}}},[e._v("\n "+e._s(0===t?"Specials":t)+"\n ")]),e._v(" "),s!==e.seasons.length-1?n("span",{key:"separator-"+s,staticClass:"separator"},[e._v("| ")]):e._e()]}))]:e._e()],2)])]):e._e()]):e._e()]),e._v(" "),e._l(e.activeShowQueueStatuses,(function(t){return n("div",{key:t.action,staticClass:"row"},[n("div",{staticClass:"alert alert-info"},[e._v("\n "+e._s(t.message)+"\n ")])])})),e._v(" "),n("div",{staticClass:"row",attrs:{id:"row-show-summary"}},[n("div",{staticClass:"col-md-12",attrs:{id:"col-show-summary"}},[n("div",{staticClass:"show-poster-container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"image-flex-container col-md-12"},[n("asset",{attrs:{default:"images/poster.png","show-slug":e.show.id.slug,type:"posterThumb",cls:"show-image shadow",link:!0}})],1)])]),e._v(" "),n("div",{staticClass:"ver-spacer"}),e._v(" "),n("div",{staticClass:"show-info-container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"pull-right col-lg-3 col-md-3 hidden-sm hidden-xs"},[n("asset",{attrs:{default:"images/banner.png","show-slug":e.show.id.slug,type:"banner",cls:"show-banner pull-right shadow",link:!0}})],1),e._v(" "),n("div",{staticClass:"pull-left col-lg-9 col-md-9 col-sm-12 col-xs-12",attrs:{id:"show-rating"}},[e.show.rating.imdb&&e.show.rating.imdb.rating?n("span",{staticClass:"imdbstars",attrs:{"qtip-content":e.show.rating.imdb.rating+" / 10 Stars
"+e.show.rating.imdb.votes+" Votes"}},[n("span",{style:{width:10*Number(e.show.rating.imdb.rating)+"%"}})]):e._e(),e._v(" "),e.show.id.imdb?[e._l(e.show.countryCodes,(function(e){return n("img",{key:"flag-"+e,class:["country-flag","flag-"+e],staticStyle:{"margin-left":"3px","vertical-align":"middle"},attrs:{src:"images/blank.png",width:"16",height:"11"}})})),e._v(" "),e.show.imdbInfo.year?n("span",[e._v("\n ("+e._s(e.show.imdbInfo.year)+") -\n ")]):e._e(),e._v(" "),n("span",[e._v("\n "+e._s(e.show.imdbInfo.runtimes||e.show.runtime)+" minutes\n ")]),e._v(" "),n("app-link",{attrs:{href:"https://www.imdb.com/title/"+e.show.id.imdb,title:"https://www.imdb.com/title/"+e.show.id.imdb}},[n("img",{staticStyle:{"margin-top":"-1px","vertical-align":"middle"},attrs:{alt:"[imdb]",height:"16",width:"16",src:"images/imdb.png"}})])]:[e.show.year.start?n("span",[e._v("("+e._s(e.show.year.start)+") - "+e._s(e.show.runtime)+" minutes - ")]):e._e()],e._v(" "),e.show.id.trakt?n("app-link",{attrs:{href:"https://trakt.tv/shows/"+e.show.id.trakt,title:"https://trakt.tv/shows/"+e.show.id.trakt}},[n("img",{attrs:{alt:"[trakt]",height:"16",width:"16",src:"images/trakt.png"}})]):e._e(),e._v(" "),e.showIndexerUrl&&e.indexerConfig[e.show.indexer].icon?n("app-link",{attrs:{href:e.showIndexerUrl,title:e.showIndexerUrl}},[n("img",{staticStyle:{"margin-top":"-1px","vertical-align":"middle"},attrs:{alt:e.indexerConfig[e.show.indexer].name,height:"16",width:"16",src:"images/"+e.indexerConfig[e.show.indexer].icon}})]):e._e(),e._v(" "),e.show.xemNumbering&&e.show.xemNumbering.length>0?n("app-link",{attrs:{href:"http://thexem.de/search?q="+e.show.title,title:"http://thexem.de/search?q="+e.show.title}},[n("img",{staticStyle:{"margin-top":"-1px","vertical-align":"middle"},attrs:{alt:"[xem]",height:"16",width:"16",src:"images/xem.png"}})]):e._e(),e._v(" "),e.show.id.tvdb?n("app-link",{attrs:{href:"https://fanart.tv/series/"+e.show.id.tvdb,title:"https://fanart.tv/series/"+e.show.id[e.show.indexer]}},[n("img",{staticClass:"fanart",attrs:{alt:"[fanart.tv]",height:"16",width:"16",src:"images/fanart.tv.png"}})]):e._e()],2),e._v(" "),n("div",{staticClass:"pull-left col-lg-9 col-md-9 col-sm-12 col-xs-12",attrs:{id:"tags"}},[e.show.genres?n("ul",{staticClass:"tags"},e._l(e.dedupeGenres(e.show.genres),(function(t){return n("app-link",{key:t.toString(),attrs:{href:"https://trakt.tv/shows/popular/?genres="+t.toLowerCase().replace(" ","-"),title:"View other popular "+t+" shows on trakt.tv"}},[n("li",[e._v(e._s(t))])])})),1):n("ul",{staticClass:"tags"},e._l(e.showGenres,(function(t){return n("app-link",{key:t.toString(),attrs:{href:"https://www.imdb.com/search/title?count=100&title_type=tv_series&genres="+t.toLowerCase().replace(" ","-"),title:"View other popular "+t+" shows on IMDB"}},[n("li",[e._v(e._s(t))])])})),1)])]),e._v(" "),n("div",{staticClass:"row"},[e.configLoaded?n("div",{staticClass:"col-md-12",attrs:{id:"summary"}},[n("div",{class:[{summaryFanArt:e.layout.fanartBackground},"col-lg-9","col-md-8","col-sm-8","col-xs-12"],attrs:{id:"show-summary"}},[n("table",{staticClass:"summaryTable pull-left"},[e.show.plot?n("tr",[n("td",{staticStyle:{"padding-bottom":"15px"},attrs:{colspan:"2"}},[n("truncate",{attrs:{length:250,clamp:"show more...",less:"show less...",text:e.show.plot},on:{toggle:function(t){return e.$emit("reflow")}}})],1)]):e._e(),e._v(" "),void 0!==e.getQualityPreset({value:e.combinedQualities})?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Quality:")]),e._v(" "),n("td",[n("quality-pill",{attrs:{quality:e.combinedQualities}})],1)]):[e.combineQualities(e.show.config.qualities.allowed)>0?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Allowed Qualities:")]),e._v(" "),n("td",[e._l(e.show.config.qualities.allowed,(function(t,s){return[e._v(e._s(s>0?", ":"")),n("quality-pill",{key:"allowed-"+t,attrs:{quality:t}})]}))],2)]):e._e(),e._v(" "),e.combineQualities(e.show.config.qualities.preferred)>0?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Preferred Qualities:")]),e._v(" "),n("td",[e._l(e.show.config.qualities.preferred,(function(t,s){return[e._v(e._s(s>0?", ":"")),n("quality-pill",{key:"preferred-"+t,attrs:{quality:t}})]}))],2)]):e._e()],e._v(" "),e.show.network&&e.show.airs?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Originally Airs: ")]),n("td",[e._v(e._s(e.show.airs)),e.show.airsFormatValid?e._e():n("b",{staticClass:"invalid-value"},[e._v(" (invalid time format)")]),e._v(" on "+e._s(e.show.network))])]):e.show.network?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Originally Airs: ")]),n("td",[e._v(e._s(e.show.network))])]):e.show.airs?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Originally Airs: ")]),n("td",[e._v(e._s(e.show.airs)),e.show.airsFormatValid?e._e():n("b",{staticClass:"invalid-value"},[e._v(" (invalid time format)")])])]):e._e(),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("Show Status: ")]),n("td",[e._v(e._s(e.show.status))])]),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("Default EP Status: ")]),n("td",[e._v(e._s(e.show.config.defaultEpisodeStatus))])]),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[n("span",{class:{"invalid-value":!e.show.config.locationValid}},[e._v("Location: ")])]),n("td",[n("span",{class:{"invalid-value":!e.show.config.locationValid}},[e._v(e._s(e.show.config.location))]),e._v(e._s(e.show.config.locationValid?"":" (Missing)"))])]),e._v(" "),e.show.config.aliases.length>0?n("tr",[n("td",{staticClass:"showLegend",staticStyle:{"vertical-align":"top"}},[e._v("Scene Name:")]),e._v(" "),n("td",[e._v(e._s(e.show.config.aliases.join(", ")))])]):e._e(),e._v(" "),e.show.config.release.requiredWords.length+e.search.filters.required.length>0?n("tr",[n("td",{staticClass:"showLegend",staticStyle:{"vertical-align":"top"}},[n("span",{class:{required:"snatch-selection"===e.type}},[e._v("Required Words: ")])]),e._v(" "),n("td",[e.show.config.release.requiredWords.length?n("span",{staticClass:"break-word"},[e._v("\n "+e._s(e.show.config.release.requiredWords.join(", "))+"\n ")]):e._e(),e._v(" "),e.search.filters.required.length>0?n("span",{staticClass:"break-word global-filter"},[n("app-link",{attrs:{href:"config/search/#searchfilters"}},[e.show.config.release.requiredWords.length>0?[e.show.config.release.requiredWordsExclude?n("span",[e._v(" excluded from: ")]):n("span",[e._v("+ ")])]:e._e(),e._v("\n "+e._s(e.search.filters.required.join(", "))+"\n ")],2)],1):e._e()])]):e._e(),e._v(" "),e.show.config.release.ignoredWords.length+e.search.filters.ignored.length>0?n("tr",[n("td",{staticClass:"showLegend",staticStyle:{"vertical-align":"top"}},[n("span",{class:{ignored:"snatch-selection"===e.type}},[e._v("Ignored Words: ")])]),e._v(" "),n("td",[e.show.config.release.ignoredWords.length?n("span",{staticClass:"break-word"},[e._v("\n "+e._s(e.show.config.release.ignoredWords.join(", "))+"\n ")]):e._e(),e._v(" "),e.search.filters.ignored.length>0?n("span",{staticClass:"break-word global-filter"},[n("app-link",{attrs:{href:"config/search/#searchfilters"}},[e.show.config.release.ignoredWords.length>0?[e.show.config.release.ignoredWordsExclude?n("span",[e._v(" excluded from: ")]):n("span",[e._v("+ ")])]:e._e(),e._v("\n "+e._s(e.search.filters.ignored.join(", "))+"\n ")],2)],1):e._e()])]):e._e(),e._v(" "),e.search.filters.preferred.length>0?n("tr",[n("td",{staticClass:"showLegend",staticStyle:{"vertical-align":"top"}},[n("span",{class:{preferred:"snatch-selection"===e.type}},[e._v("Preferred Words: ")])]),e._v(" "),n("td",[n("app-link",{attrs:{href:"config/search/#searchfilters"}},[n("span",{staticClass:"break-word"},[e._v(e._s(e.search.filters.preferred.join(", ")))])])],1)]):e._e(),e._v(" "),e.search.filters.undesired.length>0?n("tr",[n("td",{staticClass:"showLegend",staticStyle:{"vertical-align":"top"}},[n("span",{class:{undesired:"snatch-selection"===e.type}},[e._v("Undesired Words: ")])]),e._v(" "),n("td",[n("app-link",{attrs:{href:"config/search/#searchfilters"}},[n("span",{staticClass:"break-word"},[e._v(e._s(e.search.filters.undesired.join(", ")))])])],1)]):e._e(),e._v(" "),e.show.config.release.whitelist&&e.show.config.release.whitelist.length>0?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Wanted Groups:")]),e._v(" "),n("td",[e._v(e._s(e.show.config.release.whitelist.join(", ")))])]):e._e(),e._v(" "),e.show.config.release.blacklist&&e.show.config.release.blacklist.length>0?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Unwanted Groups:")]),e._v(" "),n("td",[e._v(e._s(e.show.config.release.blacklist.join(", ")))])]):e._e(),e._v(" "),0!==e.show.config.airdateOffset?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Daily search offset:")]),e._v(" "),n("td",[e._v(e._s(e.show.config.airdateOffset)+" hours")])]):e._e(),e._v(" "),e.show.config.locationValid&&e.show.size>-1?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Size:")]),e._v(" "),n("td",[e._v(e._s(e.humanFileSize(e.show.size)))])]):e._e()],2)]),e._v(" "),n("div",{staticClass:"col-lg-3 col-md-4 col-sm-4 col-xs-12 pull-xs-left",attrs:{id:"show-status"}},[n("table",{staticClass:"pull-xs-left pull-md-right pull-sm-right pull-lg-right"},[e.show.language?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Info Language:")]),n("td",[n("img",{attrs:{src:"images/subtitles/flags/"+e.getCountryISO2ToISO3(e.show.language)+".png",width:"16",height:"11",alt:e.show.language,title:e.show.language,onError:"this.onerror=null;this.src='images/flags/unknown.png';"}})])]):e._e(),e._v(" "),e.config.subtitles.enabled?n("tr",[n("td",{staticClass:"showLegend"},[e._v("Subtitles: ")]),n("td",[n("state-switch",{attrs:{theme:e.layout.themeName,state:e.show.config.subtitlesEnabled},on:{click:function(t){return e.toggleConfigOption("subtitlesEnabled")}}})],1)]):e._e(),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("Season Folders: ")]),n("td",[n("state-switch",{attrs:{theme:e.layout.themeName,state:e.show.config.seasonFolders||e.config.namingForceFolders}})],1)]),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("Paused: ")]),n("td",[n("state-switch",{attrs:{theme:e.layout.themeName,state:e.show.config.paused},on:{click:function(t){return e.toggleConfigOption("paused")}}})],1)]),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("Air-by-Date: ")]),n("td",[n("state-switch",{attrs:{theme:e.layout.themeName,state:e.show.config.airByDate},on:{click:function(t){return e.toggleConfigOption("airByDate")}}})],1)]),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("Sports: ")]),n("td",[n("state-switch",{attrs:{theme:e.layout.themeName,state:e.show.config.sports},on:{click:function(t){return e.toggleConfigOption("sports")}}})],1)]),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("Anime: ")]),n("td",[n("state-switch",{attrs:{theme:e.layout.themeName,state:e.show.config.anime},on:{click:function(t){return e.toggleConfigOption("anime")}}})],1)]),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("DVD Order: ")]),n("td",[n("state-switch",{attrs:{theme:e.layout.themeName,state:e.show.config.dvdOrder},on:{click:function(t){return e.toggleConfigOption("dvdOrder")}}})],1)]),e._v(" "),n("tr",[n("td",{staticClass:"showLegend"},[e._v("Scene Numbering: ")]),n("td",[n("state-switch",{attrs:{theme:e.layout.themeName,state:e.show.config.scene},on:{click:function(t){return e.toggleConfigOption("scene")}}})],1)])])])]):e._e()])])])]),e._v(" "),e.show?n("div",{staticClass:"row",attrs:{id:"row-show-episodes-controls"}},[n("div",{staticClass:"col-md-12",attrs:{id:"col-show-episodes-controls"}},["show"===e.type?n("div",{staticClass:"row key"},[n("div",{staticClass:"col-lg-12",attrs:{id:"checkboxControls"}},[e.show.seasons?n("div",{staticClass:"pull-left top-5",attrs:{id:"key-padding"}},e._l(e.overviewStatus,(function(t){return n("label",{key:t.id,attrs:{for:t.id}},[n("span",{class:t.id},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.checked,expression:"status.checked"}],attrs:{type:"checkbox",id:t.id},domProps:{checked:Array.isArray(t.checked)?e._i(t.checked,null)>-1:t.checked},on:{change:[function(n){var s=t.checked,a=n.target,o=!!a.checked;if(Array.isArray(s)){var i=e._i(s,null);a.checked?i<0&&e.$set(t,"checked",s.concat([null])):i>-1&&e.$set(t,"checked",s.slice(0,i).concat(s.slice(i+1)))}else e.$set(t,"checked",o)},function(t){return e.$emit("update-overview-status",e.overviewStatus)}]}}),e._v("\n "+e._s(t.name)+": "),n("b",[e._v(e._s(e.episodeSummary[t.name]))])])])})),0):e._e(),e._v(" "),n("div",{staticClass:"pull-lg-right top-5"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedStatus,expression:"selectedStatus"}],staticClass:"form-control form-control-inline input-sm-custom input-sm-smallfont",attrs:{id:"statusSelect"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedStatus=t.target.multiple?n:n[0]}}},[n("option",{domProps:{value:"Change status to:"}},[e._v("Change status to:")]),e._v(" "),e._l(e.changeStatusOptions,(function(t){return n("option",{key:t.key,domProps:{value:t.value}},[e._v("\n "+e._s(t.name)+"\n ")])}))],2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedQuality,expression:"selectedQuality"}],staticClass:"form-control form-control-inline input-sm-custom input-sm-smallfont",attrs:{id:"qualitySelect"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedQuality=t.target.multiple?n:n[0]}}},[n("option",{domProps:{value:"Change quality to:"}},[e._v("Change quality to:")]),e._v(" "),e._l(e.qualities,(function(t){return n("option",{key:t.key,domProps:{value:t.value}},[e._v("\n "+e._s(t.name)+"\n ")])}))],2),e._v(" "),n("input",{attrs:{type:"hidden",id:"series-slug"},domProps:{value:e.show.id.slug}}),e._v(" "),n("input",{attrs:{type:"hidden",id:"series-id"},domProps:{value:e.show.id[e.show.indexer]}}),e._v(" "),n("input",{attrs:{type:"hidden",id:"indexer"},domProps:{value:e.show.indexer}}),e._v(" "),n("input",{staticClass:"btn-medusa",attrs:{type:"button",id:"changeStatus",value:"Go"},on:{click:e.changeStatusClicked}})])])]):n("div")])]):e._e()],2)}),[],!1,null,"c0b84a5e",null);t.a=o.exports},,,,function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i}));var s=n(3);const a=()=>{e(".imdbstars").qtip({content:{text(){return e(this).attr("qtip-content")}},show:{solo:!0},position:{my:"right center",at:"center left",adjust:{y:0,x:-6}},style:{tip:{corner:!0,method:"polygon"},classes:"qtip-rounded qtip-shadow ui-tooltip-sb"}})},o=()=>{e(".addQTip").each((t,n)=>{e(n).css({cursor:"help","text-shadow":"0px 0px 0.5px #666"});const s=e(n).data("qtip-my")||"left center",a=e(n).data("qtip-at")||"middle right";e(n).qtip({show:{solo:!0},position:{my:s,at:a},style:{tip:{corner:!0,method:"polygon"},classes:"qtip-rounded qtip-shadow ui-tooltip-sb"}})})},i=(t,n)=>{if(e.fn.updateSearchIconsStarted||!t)return;e.fn.updateSearchIconsStarted=!0,e.fn.forcedSearches=[];const a=e=>{e.disabled=!0},o=()=>{let i=5e3;s.a.get("search/".concat(t)).then(t=>{var s;i=t.data.results&&t.data.results.length>0?5e3:15e3,s=t.data.results,e.each(s,(e,t)=>{if(t.show.slug!==n.show.id.slug)return!0;const s=n.$refs["search-".concat(t.episode.slug)];s&&("searching"===t.search.status.toLowerCase()?(s.title="Searching",s.alt="Searching",s.src="images/loading16.gif",a(s)):"queued"===t.search.status.toLowerCase()?(s.title="Queued",s.alt="queued",s.src="images/queued.png",a(s)):"finished"===t.search.status.toLowerCase()&&(s.title="Searching",s.alt="searching",s.src="images/search16.png",s.disabled=!1))})}).catch(e=>{console.error(String(e)),i=3e4}).finally(()=>{setTimeout(o,i)})};o()}}).call(this,n(4))},function(e,t,n){"use strict";n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return q}));var s=n(9),a=n(123),o=n(124),i=n(126),l=n(127),r=n.n(l),c=n(128),d=n.n(c),u=n(23),p=(n(109),n(1)),h=n(6),m=n(2),f=n(25),g={name:"add-show-options",components:{AnidbReleaseGroupUi:f.a,ConfigToggleSlider:m.f,QualityChooser:m.k},props:{showName:{type:String,default:"",required:!1},enableAnimeOptions:{type:Boolean,default:!1}},data:()=>({saving:!1,selectedStatus:null,selectedStatusAfter:null,quality:{allowed:[],preferred:[]},selectedSubtitleEnabled:!1,selectedSeasonFoldersEnabled:!1,selectedAnimeEnabled:!1,selectedSceneEnabled:!1,release:{blacklist:[],whitelist:[]}}),mounted(){const{defaultConfig:e,update:t}=this;this.selectedStatus=e.status,this.selectedStatusAfter=e.statusAfter,this.$nextTick(()=>t()),this.$watch(e=>[e.selectedStatus,e.selectedStatusAfter,e.selectedSubtitleEnabled,e.selectedSeasonFoldersEnabled,e.selectedSceneEnabled,e.selectedAnimeEnabled].join(),()=>{this.update()})},methods:{update(){const{selectedSubtitleEnabled:e,selectedStatus:t,selectedStatusAfter:n,selectedSeasonFoldersEnabled:s,selectedAnimeEnabled:a,selectedSceneEnabled:o,release:i,quality:l}=this;this.$nextTick(()=>{this.$emit("change",{subtitles:e,status:t,statusAfter:n,seasonFolders:s,anime:a,scene:o,release:i,quality:l})})},onChangeReleaseGroupsAnime(e){this.release.whitelist=e.whitelist,this.release.blacklist=e.blacklist,this.update()},saveDefaults(){const{$store:e,selectedStatus:t,selectedStatusAfter:n,combinedQualities:s,selectedSubtitleEnabled:a,selectedSeasonFoldersEnabled:o,selectedAnimeEnabled:i,selectedSceneEnabled:l}=this,r={showDefaults:{status:t,statusAfter:n,quality:s,subtitles:a,seasonFolders:o,anime:i,scene:l}};this.saving=!0,e.dispatch("setConfig",{section:"main",config:r}).then(()=>{this.$snotify.success('Your "add show" defaults have been set to your current selections.',"Saved Defaults")}).catch(e=>{this.$snotify.error('Error while trying to save "add show" defaults: '+(e.message||"Unknown"),"Error")}).finally(()=>{this.saving=!1})}},computed:{...Object(p.e)({defaultConfig:e=>e.config.showDefaults,namingForceFolders:e=>e.config.namingForceFolders,subtitlesEnabled:e=>e.config.subtitles.enabled,episodeStatuses:e=>e.consts.statuses}),...Object(p.d)(["getStatus"]),defaultEpisodeStatusOptions(){const{getStatus:e}=this;return 0===this.episodeStatuses.length?[]:["skipped","wanted","ignored"].map(t=>e({key:t}))},combinedQualities(){const{quality:e}=this,{allowed:t,preferred:n}=e;return Object(h.c)(t,n)},saveDefaultsDisabled(){const{enableAnimeOptions:e,defaultConfig:t,namingForceFolders:n,selectedStatus:s,selectedStatusAfter:a,combinedQualities:o,selectedSeasonFoldersEnabled:i,selectedSubtitleEnabled:l,selectedAnimeEnabled:r,selectedSceneEnabled:c}=this;return[s===t.status,a===t.statusAfter,o===t.quality,i===(t.seasonFolders||n),l===t.subtitles,!e||r===t.anime,c===t.scene].every(Boolean)}},watch:{release:{handler(){this.$emit("refresh"),this.update()},deep:!0,immediate:!1},quality:{handler(){this.$emit("refresh"),this.update()},deep:!0,immediate:!1},selectedAnimeEnabled(){this.$emit("refresh"),this.update()},defaultConfig(e){const{namingForceFolders:t}=this;this.selectedStatus=e.status,this.selectedStatusAfter=e.statusAfter,this.selectedSubtitleEnabled=e.subtitles,this.selectedAnimeEnabled=e.anime,this.selectedSeasonFoldersEnabled=e.seasonFolders||t,this.selectedSceneEnabled=e.scene}}},v=n(0),b=Object(v.a)(g,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"add-show-options-content"}},[n("fieldset",{staticClass:"component-group-list"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[e._m(0),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("quality-chooser",{attrs:{"overall-quality":e.defaultConfig.quality},on:{"update:quality:allowed":function(t){e.quality.allowed=t},"update:quality:preferred":function(t){e.quality.preferred=t}}})],1)])]),e._v(" "),e.subtitlesEnabled?n("div",{attrs:{id:"use-subtitles"}},[n("config-toggle-slider",{attrs:{label:"Subtitles",id:"subtitles",value:e.selectedSubtitleEnabled,explanations:["Download subtitles for this show?"]},on:{input:function(t){e.selectedSubtitleEnabled=t}}})],1):e._e(),e._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedStatus,expression:"selectedStatus"}],staticClass:"form-control form-control-inline input-sm",attrs:{id:"defaultStatus"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedStatus=t.target.multiple?n:n[0]}}},e._l(e.defaultEpisodeStatusOptions,(function(t){return n("option",{key:t.value,domProps:{value:t.value}},[e._v(e._s(t.name))])})),0)])])]),e._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedStatusAfter,expression:"selectedStatusAfter"}],staticClass:"form-control form-control-inline input-sm",attrs:{id:"defaultStatusAfter"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedStatusAfter=t.target.multiple?n:n[0]}}},e._l(e.defaultEpisodeStatusOptions,(function(t){return n("option",{key:t.value,domProps:{value:t.value}},[e._v(e._s(t.name))])})),0)])])]),e._v(" "),n("config-toggle-slider",{attrs:{label:"Season Folders",id:"season_folders",value:e.selectedSeasonFoldersEnabled,disabled:e.namingForceFolders,explanations:["Group episodes by season folders?"]},on:{input:function(t){e.selectedSeasonFoldersEnabled=t}}}),e._v(" "),e.enableAnimeOptions?n("config-toggle-slider",{attrs:{label:"Anime",id:"anime",value:e.selectedAnimeEnabled,explanations:["Is this show an Anime?"]},on:{input:function(t){e.selectedAnimeEnabled=t}}}):e._e(),e._v(" "),e.enableAnimeOptions&&e.selectedAnimeEnabled?n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("anidb-release-group-ui",{staticClass:"max-width",attrs:{"show-name":e.showName},on:{change:e.onChangeReleaseGroupsAnime}})],1)])]):e._e(),e._v(" "),n("config-toggle-slider",{attrs:{label:"Scene Numbering",id:"scene",value:e.selectedSceneEnabled,explanations:["Is this show scene numbered?"]},on:{input:function(t){e.selectedSceneEnabled=t}}}),e._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("div",{staticClass:"col-sm-10 content"},[n("button",{staticClass:"btn-medusa btn-inline",attrs:{type:"button",disabled:e.saving||e.saveDefaultsDisabled},on:{click:function(t){return t.preventDefault(),e.saveDefaults(t)}}},[e._v("Save Defaults")])])])])],1)])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"customQuality"}},[t("span",[this._v("Quality")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"defaultStatus"}},[t("span",[this._v("Status for previously aired episodes")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"defaultStatusAfter"}},[t("span",[this._v("Status for all future episodes")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"anidbReleaseGroup"}},[t("span",[this._v("Release Groups")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"col-sm-2 control-label",attrs:{for:"saveDefaultsButton"}},[t("span",[this._v("Use current values as the defaults")])])}],!1,null,null,null).exports,_=(n(110),n(19)),w={name:"app-footer",components:{AppLink:m.a},computed:{...Object(p.e)(["layout","stats","system"]),...Object(p.d)(["getStatus","getScheduler"]),snatchedStatus(){const e=this.getStatus({key:"snatched"});return e?e.value:""},episodePercentage(){const{downloaded:e,total:t}=this.stats.overall.episodes;return t?(e/t*100).toFixed(1)+"%":""},nowInUserPreset(){const{dateStyle:e,timeStyle:t}=this.layout,n=Object(h.d)("".concat(e," ").concat(t));return Object(_.a)(new Date,n)}},methods:{schedulerNextRun(e){const{nextRun:t}=this.getScheduler(e);return void 0===t?"??:??:??":null===t?"Disabled":this.formatTimeDuration(t)},formatTimeDuration(e){const t=parseInt(e/864e5,10);let n="";t>0&&(n=String(t)+(t>1?" days, ":" day, "));const s=new Date(e%864e5),a=(e,t=2)=>String(e).padStart(t,"0");return n+[String(s.getUTCHours()),a(s.getUTCMinutes()),a(s.getUTCSeconds()+Math.round(s.getUTCMilliseconds()/1e3))].join(":")}}},y=Object(v.a)(w,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("footer",[n("div",{staticClass:"footer clearfix"},[n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.stats.overall.shows.total))]),e._v(" Shows ("),n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.stats.overall.shows.active))]),e._v(" Active)\n | "),n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.stats.overall.episodes.downloaded))]),e._v(" "),e.stats.overall.episodes.snatched?[n("span",{staticClass:"footerhighlight"},[n("app-link",{attrs:{href:"manage/episodeStatuses?whichStatus="+e.snatchedStatus,title:"View overview of snatched episodes"}},[e._v("+"+e._s(e.stats.overall.episodes.snatched))])],1),e._v("\n Snatched\n ")]:e._e(),e._v("\n / "),n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.stats.overall.episodes.total))]),e._v(" Episodes Downloaded "),e.episodePercentage?n("span",{staticClass:"footerhighlight"},[e._v("("+e._s(e.episodePercentage)+")")]):e._e(),e._v("\n | Daily Search: "),n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.schedulerNextRun("dailySearch")))]),e._v("\n | Backlog Search: "),n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.schedulerNextRun("backlog")))]),e._v(" "),n("div",[e.system.memoryUsage?[e._v("\n Memory used: "),n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.system.memoryUsage))]),e._v(" |\n ")]:e._e(),e._v(" "),e._v("\n Branch: "),n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.system.branch||"Unknown"))]),e._v(" |\n Now: "),n("span",{staticClass:"footerhighlight"},[e._v(e._s(e.nowInUserPreset))])],2)],2)])}),[],!1,null,"a67a05c0",null).exports,x=n(48).a,k=(n(213),Object(v.a)(x,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{staticClass:"navbar navbar-default navbar-fixed-top hidden-print",attrs:{role:"navigation"}},[n("div",{staticClass:"container-fluid"},[n("div",{staticClass:"navbar-header"},[n("button",{staticClass:"navbar-toggle collapsed",attrs:{type:"button","data-toggle":"collapse","data-target":"#main_nav"}},[e.toolsBadgeCount>0?n("span",{class:"floating-badge"+e.toolsBadgeClass},[e._v(e._s(e.toolsBadgeCount))]):e._e(),e._v(" "),n("span",{staticClass:"sr-only"},[e._v("Toggle navigation")]),e._v(" "),n("span",{staticClass:"icon-bar"}),e._v(" "),n("span",{staticClass:"icon-bar"}),e._v(" "),n("span",{staticClass:"icon-bar"})]),e._v(" "),n("app-link",{staticClass:"navbar-brand",attrs:{href:"home/",title:"Medusa"}},[n("img",{staticClass:"img-responsive pull-left",staticStyle:{height:"50px"},attrs:{alt:"Medusa",src:"images/medusa.png"}})])],1),e._v(" "),e.isAuthenticated?n("div",{staticClass:"collapse navbar-collapse",attrs:{id:"main_nav"}},[n("ul",{staticClass:"nav navbar-nav navbar-right"},[n("li",{staticClass:"navbar-split dropdown",class:{active:"home"===e.topMenu},attrs:{id:"NAVhome"}},[n("app-link",{staticClass:"dropdown-toggle",attrs:{href:"home/","aria-haspopup":"true","data-toggle":"dropdown","data-hover":"dropdown"}},[n("span",[e._v("Shows")]),e._v(" "),n("b",{staticClass:"caret"})]),e._v(" "),n("ul",{staticClass:"dropdown-menu"},[n("li",[n("app-link",{attrs:{href:"home/"}},[n("i",{staticClass:"menu-icon-home"}),e._v(" Show List")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"addShows/"}},[n("i",{staticClass:"menu-icon-addshow"}),e._v(" Add Shows")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"addRecommended/"}},[n("i",{staticClass:"menu-icon-addshow"}),e._v(" Add Recommended Shows")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"home/postprocess/"}},[n("i",{staticClass:"menu-icon-postprocess"}),e._v(" Manual Post-Processing")])],1),e._v(" "),e.recentShows.length>0?n("li",{staticClass:"divider",attrs:{role:"separator"}}):e._e(),e._v(" "),e._l(e.recentShows,(function(t){return n("li",{key:t.link},[n("app-link",{attrs:{href:t.link}},[n("i",{staticClass:"menu-icon-addshow"}),e._v(" "+e._s(t.name)+"\n ")])],1)}))],2),e._v(" "),n("div",{staticStyle:{clear:"both"}})],1),e._v(" "),n("li",{class:{active:"schedule"===e.topMenu},attrs:{id:"NAVschedule"}},[n("app-link",{attrs:{href:"schedule/"}},[e._v("Schedule")])],1),e._v(" "),n("li",{class:{active:"history"===e.topMenu},attrs:{id:"NAVhistory"}},[n("app-link",{attrs:{href:"history/"}},[e._v("History")])],1),e._v(" "),n("li",{staticClass:"navbar-split dropdown",class:{active:"manage"===e.topMenu},attrs:{id:"NAVmanage"}},[n("app-link",{staticClass:"dropdown-toggle",attrs:{href:"manage/episodeStatuses/","aria-haspopup":"true","data-toggle":"dropdown","data-hover":"dropdown"}},[n("span",[e._v("Manage")]),e._v(" "),n("b",{staticClass:"caret"})]),e._v(" "),n("ul",{staticClass:"dropdown-menu"},[n("li",[n("app-link",{attrs:{href:"manage/"}},[n("i",{staticClass:"menu-icon-manage"}),e._v(" Mass Update")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"manage/backlogOverview/"}},[n("i",{staticClass:"menu-icon-backlog-view"}),e._v(" Backlog Overview")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"manage/manageSearches/"}},[n("i",{staticClass:"menu-icon-manage-searches"}),e._v(" Manage Searches")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"manage/episodeStatuses/"}},[n("i",{staticClass:"menu-icon-manage2"}),e._v(" Episode Status Management")])],1),e._v(" "),e.linkVisible.plex?n("li",[n("app-link",{attrs:{href:"home/updatePLEX/"}},[n("i",{staticClass:"menu-icon-plex"}),e._v(" Update PLEX")])],1):e._e(),e._v(" "),e.linkVisible.kodi?n("li",[n("app-link",{attrs:{href:"home/updateKODI/"}},[n("i",{staticClass:"menu-icon-kodi"}),e._v(" Update KODI")])],1):e._e(),e._v(" "),e.linkVisible.emby?n("li",[n("app-link",{attrs:{href:"home/updateEMBY/"}},[n("i",{staticClass:"menu-icon-emby"}),e._v(" Update Emby")])],1):e._e(),e._v(" "),e.linkVisible.manageTorrents?n("li",[n("app-link",{attrs:{href:"manage/manageTorrents/",target:"_blank"}},[n("i",{staticClass:"menu-icon-bittorrent"}),e._v(" Manage Torrents")])],1):e._e(),e._v(" "),e.linkVisible.failedDownloads?n("li",[n("app-link",{attrs:{href:"manage/failedDownloads/"}},[n("i",{staticClass:"menu-icon-failed-download"}),e._v(" Failed Downloads")])],1):e._e(),e._v(" "),e.linkVisible.subtitleMissed?n("li",[n("app-link",{attrs:{href:"manage/subtitleMissed/"}},[n("i",{staticClass:"menu-icon-backlog"}),e._v(" Missed Subtitle Management")])],1):e._e(),e._v(" "),e.linkVisible.subtitleMissedPP?n("li",[n("app-link",{attrs:{href:"manage/subtitleMissedPP/"}},[n("i",{staticClass:"menu-icon-backlog"}),e._v(" Missed Subtitle in Post-Process folder")])],1):e._e()]),e._v(" "),n("div",{staticStyle:{clear:"both"}})],1),e._v(" "),n("li",{staticClass:"navbar-split dropdown",class:{active:"config"===e.topMenu},attrs:{id:"NAVconfig"}},[n("app-link",{staticClass:"dropdown-toggle",attrs:{href:"config/","aria-haspopup":"true","data-toggle":"dropdown","data-hover":"dropdown"}},[n("span",{staticClass:"visible-xs-inline"},[e._v("Config")]),n("img",{staticClass:"navbaricon hidden-xs",attrs:{src:"images/menu/system18.png"}}),e._v(" "),n("b",{staticClass:"caret"})]),e._v(" "),n("ul",{staticClass:"dropdown-menu"},[n("li",[n("app-link",{attrs:{href:"config/"}},[n("i",{staticClass:"menu-icon-help"}),e._v(" Help & Info")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"config/general/"}},[n("i",{staticClass:"menu-icon-config"}),e._v(" General")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"config/backuprestore/"}},[n("i",{staticClass:"menu-icon-backup"}),e._v(" Backup & Restore")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"config/search/"}},[n("i",{staticClass:"menu-icon-manage-searches"}),e._v(" Search Settings")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"config/providers/"}},[n("i",{staticClass:"menu-icon-provider"}),e._v(" Search Providers")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"config/subtitles/"}},[n("i",{staticClass:"menu-icon-backlog"}),e._v(" Subtitles Settings")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"config/postProcessing/"}},[n("i",{staticClass:"menu-icon-postprocess"}),e._v(" Post Processing")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"config/notifications/"}},[n("i",{staticClass:"menu-icon-notification"}),e._v(" Notifications")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"config/anime/"}},[n("i",{staticClass:"menu-icon-anime"}),e._v(" Anime")])],1)]),e._v(" "),n("div",{staticStyle:{clear:"both"}})],1),e._v(" "),n("li",{staticClass:"navbar-split dropdown",class:{active:"system"===e.topMenu},attrs:{id:"NAVsystem"}},[n("app-link",{staticClass:"padding-right-15 dropdown-toggle",attrs:{href:"home/status/","aria-haspopup":"true","data-toggle":"dropdown","data-hover":"dropdown"}},[n("span",{staticClass:"visible-xs-inline"},[e._v("Tools")]),n("img",{staticClass:"navbaricon hidden-xs",attrs:{src:"images/menu/system18-2.png"}}),e._v(" "),e.toolsBadgeCount>0?n("span",{class:"badge"+e.toolsBadgeClass},[e._v(e._s(e.toolsBadgeCount))]):e._e(),e._v(" "),n("b",{staticClass:"caret"})]),e._v(" "),n("ul",{staticClass:"dropdown-menu"},[n("li",[n("app-link",{attrs:{href:"news/"}},[n("i",{staticClass:"menu-icon-news"}),e._v(" News "),e.system.news.unread>0?n("span",{staticClass:"badge"},[e._v(e._s(e.system.news.unread))]):e._e()])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"IRC/"}},[n("i",{staticClass:"menu-icon-irc"}),e._v(" IRC")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"changes/"}},[n("i",{staticClass:"menu-icon-changelog"}),e._v(" Changelog")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:e.config.donationsUrl}},[n("i",{staticClass:"menu-icon-support"}),e._v(" Support Medusa")])],1),e._v(" "),n("li",{staticClass:"divider",attrs:{role:"separator"}}),e._v(" "),e.config.logs.numErrors>0?n("li",[n("app-link",{attrs:{href:"errorlogs/"}},[n("i",{staticClass:"menu-icon-error"}),e._v(" View Errors "),n("span",{staticClass:"badge btn-danger"},[e._v(e._s(e.config.logs.numErrors))])])],1):e._e(),e._v(" "),e.config.logs.numWarnings>0?n("li",[n("app-link",{attrs:{href:"errorlogs/?level="+e.warningLevel}},[n("i",{staticClass:"menu-icon-viewlog-errors"}),e._v(" View Warnings "),n("span",{staticClass:"badge btn-warning"},[e._v(e._s(e.config.logs.numWarnings))])])],1):e._e(),e._v(" "),n("li",[n("app-link",{attrs:{href:"errorlogs/viewlog/"}},[n("i",{staticClass:"menu-icon-viewlog"}),e._v(" View Log")])],1),e._v(" "),n("li",{staticClass:"divider",attrs:{role:"separator"}}),e._v(" "),n("li",[n("app-link",{attrs:{href:"home/updateCheck?pid="+e.system.pid}},[n("i",{staticClass:"menu-icon-update"}),e._v(" Check For Updates")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"home/restart/?pid="+e.system.pid},nativeOn:{click:function(t){return t.preventDefault(),e.confirmDialog(t,"restart")}}},[n("i",{staticClass:"menu-icon-restart"}),e._v(" Restart")])],1),e._v(" "),n("li",[n("app-link",{attrs:{href:"home/shutdown/?pid="+e.system.pid},nativeOn:{click:function(t){return t.preventDefault(),e.confirmDialog(t,"shutdown")}}},[n("i",{staticClass:"menu-icon-shutdown"}),e._v(" Shutdown")])],1),e._v(" "),e.username?n("li",[n("app-link",{attrs:{href:"logout"},nativeOn:{click:function(t){return t.preventDefault(),e.confirmDialog(t,"logout")}}},[n("i",{staticClass:"menu-icon-shutdown"}),e._v(" Logout")])],1):e._e(),e._v(" "),n("li",{staticClass:"divider",attrs:{role:"separator"}}),e._v(" "),n("li",[n("app-link",{attrs:{href:"home/status/"}},[n("i",{staticClass:"menu-icon-info"}),e._v(" Server Status")])],1)]),e._v(" "),n("div",{staticStyle:{clear:"both"}})],1)])]):e._e()])])}),[],!1,null,null,null).exports),S=n(21),C=(n(111),n(116),n(117),n(118),n(119),n(120),n(121),n(65).a),E=Object(v.a)(C,void 0,void 0,!1,null,null,null).exports,P=n(66).a,T=Object(v.a)(P,void 0,void 0,!1,null,null,null).exports,N=(n(112),n(113),n(114),n(69).a),O=Object(v.a)(N,void 0,void 0,!1,null,null,null).exports,D=n(78),A=n(70).a,$=Object(v.a)(A,void 0,void 0,!1,null,null,null).exports,M=(n(26),n(71).a),L=(n(246),Object(v.a)(M,void 0,void 0,!1,null,null,null).exports),I=n(73).a,B=Object(v.a)(I,void 0,void 0,!1,null,null,null).exports,R=n(74).a,z=(n(248),Object(v.a)(R,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.subMenu.length>0?n("div",{attrs:{id:"sub-menu-wrapper"}},[n("div",{staticClass:"row shadow",attrs:{id:"sub-menu-container"}},[n("div",{staticClass:"submenu-default hidden-print col-md-12",attrs:{id:"sub-menu"}},[e._l(e.subMenu,(function(t){return n("app-link",{key:"sub-menu-"+t.title,staticClass:"btn-medusa top-5 bottom-5",attrs:{href:t.path},nativeOn:e._d({},[e.clickEventCond(t),function(n){return n.preventDefault(),e.confirmDialog(n,t.confirm)}])},[n("span",{class:["pull-left",t.icon]}),e._v(" "+e._s(t.title)+"\n ")])})),e._v(" "),e.showSelectorVisible?n("show-selector",{attrs:{"show-slug":e.curShowSlug,"follow-selection":""}}):e._e()],2)]),e._v(" "),n("div",{staticClass:"btn-group"})]):e._e()}),[],!1,null,"0918603e",null).exports),F=(n(76),n(115),n(22));const j=()=>{let{components:e=[]}=window;e=e.concat([y,k,m.m,z]),e=e.concat([b,f.a,m.a,m.b,S.a,m.c,m.d,m.e,m.f,m.g,m.h,m.j,m.k,m.l,D.a,m.n,m.o,m.p]),e=e.concat([E,T,O,$,L,B]),e.forEach(e=>{h.f&&console.debug("Registering ".concat(e.name)),s.a.component(e.name,e)})},q=()=>{s.a.use(a.a),s.a.use(o.a),s.a.use(i.a),s.a.use(r.a),s.a.use(d.a),s.a.use(u.b),s.a.$cookies.config("10y")};t.a=()=>{const e=(e,t)=>"".concat(e," is using the global Vuex '").concat(t,"' state, ")+"please replace that with a local one using: mapState(['".concat(t,"'])");s.a.mixin({data(){return this.$root===this?{globalLoading:!0,pageComponent:!1}:{}},mounted(){if(this.$root===this&&!window.location.pathname.includes("/login")){const{username:e}=window;Promise.all([F.a.dispatch("login",{username:e}),F.a.dispatch("getConfig"),F.a.dispatch("getStats")]).then(([e,t])=>{this.$root.$emit("loaded");const n=new CustomEvent("medusa-config-loaded",{detail:t.main});window.dispatchEvent(n)}).catch(e=>{console.debug(e),alert("Unable to connect to Medusa!")})}this.$root.$once("loaded",()=>{this.$root.globalLoading=!1})},computed:{auth(){return h.f&&!this.__VUE_DEVTOOLS_UID__&&console.warn(e(this._name,"auth")),this.$store.state.auth},config(){return h.f&&!this.__VUE_DEVTOOLS_UID__&&console.warn(e(this._name,"config")),this.$store.state.config}}}),h.f&&console.debug("Loading local Vue"),q(),j()}},function(e,t,n){var s=n(190);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("53f5e432",s,!1,{})},function(e,t,n){var s=n(192);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("8d1653e8",s,!1,{})},function(e,t,n){var s=n(194);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("3ca8845c",s,!1,{})},function(e,t,n){var s=n(196);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("1bcb1e12",s,!1,{})},function(e,t,n){"use strict";(function(e){var s=n(3);t.a={name:"file-browser",props:{name:{type:String,default:"proc_dir"},title:{type:String,default:"Choose Directory"},includeFiles:{type:Boolean,default:!1},showBrowseButton:{type:Boolean,default:!0},autocomplete:{type:Boolean,default:!1},localStorageKey:{type:String,default:""},initialDir:{type:String,default:""}},data(){return{lock:!1,unwatchProp:null,files:[],currentPath:this.initialDir,lastPath:"",url:"browser/",autocompleteUrl:"browser/complete",fileBrowserDialog:null,localStorageSupport:(()=>{try{return Boolean(localStorage.getItem),!0}catch(e){return console.log(e),!1}})()}},created(){this.unwatchProp=this.$watch("initialDir",e=>{this.unwatchProp(),this.lock=!0,this.currentPath=e,this.$nextTick(()=>{this.lock=!1})})},mounted(){const{autocomplete:e,fileBrowser:t,storedPath:n,$refs:s}=this;t(s.locationInput,e).on("autocompleteselect",(e,t)=>{this.currentPath=t.item.value}),!this.currentPath&&n&&(this.currentPath=n)},computed:{storedPath:{get(){const{localStorageSupport:e,localStorageKey:t}=this;return e&&t?localStorage["fileBrowser-"+t]:null},set(e){const{localStorageSupport:t,localStorageKey:n}=this;t&&n&&(localStorage["fileBrowser-"+n]=e)}}},methods:{toggleFolder(e,t){if(e.isFile)return;const n=t.target.children[0]||t.target;n.classList.toggle("ui-icon-folder-open"),n.classList.toggle("ui-icon-folder-collapsed")},fileClicked(t){t.isFile?(this.currentPath=t.path,e(this.$el).find('.browserDialog .ui-button:contains("Ok")').click()):this.browse(t.path)},browse(t){const{url:n,includeFiles:a,fileBrowserDialog:o}=this;e(this.$refs.fileBrowserSearchBox).autocomplete("close"),console.debug("Browsing to "+t),o.dialog("option","dialogClass","browserDialog busy"),o.dialog("option","closeText","");const i={path:t,includeFiles:Number(a)};s.c.get(n,{params:i}).then(e=>{const{data:t}=e;this.currentPath=t.shift().currentPath,this.files=t,o.dialog("option","dialogClass","browserDialog")}).catch(e=>{console.warning("Unable to browse to: ".concat(t,"\nError: ").concat(e.message),e)})},openFileBrowser(t){const n=this,{browse:s,title:a,fileBrowser:o,$refs:i}=n,{fileBrowserSearchBox:l,fileBrowserFileList:r}=i;n.fileBrowserDialog||(n.fileBrowserDialog=e(i.fileBrowserDialog).dialog({dialogClass:"browserDialog",title:a,position:{my:"center top",at:"center top+100",of:window},minWidth:Math.min(e(document).width()-80,650),height:Math.min(e(document).height()-120,e(window).height()-120),maxHeight:Math.min(e(document).height()-120,e(window).height()-120),maxWidth:e(document).width()-80,modal:!0,autoOpen:!1}),l.removeAttribute("style"),n.fileBrowserDialog.append(l),o(l,!0).on("autocompleteselect",(e,t)=>{s(t.item.value)})),n.fileBrowserDialog.dialog("option","buttons",[{text:"Ok",class:"medusa-btn",click(){t(n.currentPath),e(this).dialog("close")}},{text:"Cancel",class:"medusa-btn",click(){n.currentPath=n.lastPath,e(this).dialog("close")}}]),n.fileBrowserDialog.dialog("open"),s(n.currentPath),n.lastPath=n.currentPath,r.removeAttribute("style"),n.fileBrowserDialog.append(r)},fileBrowser(t,n){const s=this,{autocompleteUrl:a,includeFiles:o}=s,i=e(t);if(n&&i.autocomplete&&a){let t="";i.autocomplete({position:{my:"top",at:"bottom",collision:"flipfit"},source(n,s){t=e.ui.autocomplete.escapeRegex(n.term),n.includeFiles=Number(o),e.ajax({url:a,data:n,dataType:"json"}).done(n=>{const a=new RegExp("^"+t,"i"),o=e.grep(n,e=>a.test(e));s(o)})},open(){e(s.$el).find(".ui-autocomplete li.ui-menu-item a").removeClass("ui-corner-all")}}).data("ui-autocomplete")._renderItem=(n,s)=>{let a=s.label;const o=new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t+")(?![^<>]*>)(?![^&;]+;)","gi");return a=a.replace(o,e=>""+e+""),e("
  • ").data("ui-autocomplete-item",s).append(''+a+"").appendTo(n)}}return i},openDialog(){const{openFileBrowser:e,currentPath:t}=this;e(e=>{this.storedPath=e||t})}},watch:{currentPath(){this.lock||this.$emit("update",this.currentPath)}}}}).call(this,n(4))},function(e,t,n){var s=n(198);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("c8a1d516",s,!1,{})},function(e,t,n){"use strict";(function(e){t.a={name:"language-select",props:{language:{type:String,default:"en"},available:{type:String,default:"en"},blank:{type:Boolean,default:!1},flags:{type:Boolean,default:!1}},mounted(){const t=this;e(this.$el).bfhlanguages({flags:this.flags,language:this.language,available:this.available,blank:this.blank}),e(this.$el).on("change",e=>{t.$emit("update-language",e.currentTarget.value)})},watch:{language(){e(this.$el).val(this.language)}}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){var s=n(19),a=n(17),o=n(3);t.a={name:"name-pattern",components:{ToggleButton:a.ToggleButton},props:{namingPattern:{type:String,default:""},namingPresets:{type:Array,default:()=>[]},multiEpStyle:{type:Number},multiEpStyles:{type:Array,default:()=>[]},animeNamingType:{type:Number,default:0},type:{type:String,default:""},enabled:{type:Boolean,default:!0},flagLoaded:{type:Boolean,default:!1}},data:()=>({presets:[],availableMultiEpStyles:[],pattern:"",customName:"",showLegend:!1,namingExample:"",namingExampleMulti:"",isEnabled:!1,selectedMultiEpStyle:1,animeType:0,lastSelectedPattern:""}),methods:{getDateFormat:e=>Object(s.a)(new Date,e),testNaming(e,t,n){console.debug("Test pattern ".concat(e," for ").concat(t?"multi":"single ep"));const s={pattern:e,anime_type:n};t&&(s.multi=t);try{return o.c.get("config/postProcessing/testNaming",{params:s,timeout:2e4}).then(e=>e.data)}catch(e){return console.warn(e),""}},updatePatternSamples(){this.customName||(this.customName=this.lastSelectedPattern);const e=this.isCustom?this.customName:this.pattern;e&&null!==this.animeType&&null!==this.selectedMultiEpStyle&&(this.testNaming(e,!1,this.animeType).then(e=>{this.namingExample=e+".ext"}),this.checkNaming(e,!1,this.animeType),this.isMulti&&(this.testNaming(e,this.selectedMultiEpStyle,this.animeType).then(e=>{this.namingExampleMulti=e+".ext"}),this.checkNaming(e,this.selectedMultiEpStyle,this.animeType)))},update(){this.flagLoaded&&this.$nextTick(()=>{this.$emit("change",{pattern:this.isCustom?this.customName:this.pattern,type:this.type,multiEpStyle:this.selectedMultiEpStyle,custom:this.isCustom,enabled:this.isEnabled,animeNamingType:Number(this.animeType)})})},checkNaming(t,n,s){if(!t)return;const a={pattern:t,anime_type:s};n&&(a.multi=n);const{$el:i}=this,l=e(i);o.c.get("config/postProcessing/isNamingValid",{params:a,timeout:2e4}).then(e=>{"invalid"===e.data?(l.find("#naming_pattern").qtip("option",{"content.text":"This pattern is invalid.","style.classes":"qtip-rounded qtip-shadow qtip-red"}),l.find("#naming_pattern").qtip("toggle",!0),l.find("#naming_pattern").css("background-color","#FFDDDD")):"seasonfolders"===e.data?(l.find("#naming_pattern").qtip("option",{"content.text":'This pattern would be invalid without the folders, using it will force "Flatten" off for all shows.',"style.classes":"qtip-rounded qtip-shadow qtip-red"}),l.find("#naming_pattern").qtip("toggle",!0),l.find("#naming_pattern").css("background-color","#FFFFDD")):(l.find("#naming_pattern").qtip("option",{"content.text":"This pattern is valid.","style.classes":"qtip-rounded qtip-shadow qtip-green"}),l.find("#naming_pattern").qtip("toggle",!1),l.find("#naming_pattern").css("background-color","#FFFFFF"))}).catch(e=>{console.warn(e)})},updateCustomName(){this.presetsPatterns.includes(this.pattern)||(this.customName=this.pattern),this.customName||(this.customName=this.lastSelectedPattern)}},computed:{isCustom(){return!!this.pattern&&(!this.presetsPatterns.includes(this.pattern)||"Custom..."===this.pattern)},selectedNamingPattern:{get(){return this.isCustom?"Custom...":(()=>{const e=this.presets.filter(e=>e.pattern===this.pattern);return e.length>0&&e[0].example})()},set(e){this.pattern=this.presets.filter(t=>t.example===e)[0].pattern}},presetsPatterns(){return this.presets.map(e=>e.pattern)},isMulti(){return Boolean(this.multiEpStyle)}},mounted(){this.pattern=this.namingPattern,this.presets=this.namingPresets.concat({pattern:"Custom...",example:"Custom..."}),this.updateCustomName(),this.availableMultiEpStyles=this.multiEpStyles,this.selectedMultiEpStyle=this.multiEpStyle,this.animeType=this.animeNamingType,this.isEnabled=!this.type&&this.enabled,this.updatePatternSamples()},watch:{enabled(){this.isEnabled=this.enabled},namingPattern(e,t){this.lastSelectedPattern=e||t,this.pattern=this.namingPattern,this.updateCustomName(),this.updatePatternSamples()},namingPresets(){this.presets=this.namingPresets},multiEpStyle(){this.selectedMultiEpStyle=this.multiEpStyle,this.updatePatternSamples()},multiEpStyles(){this.availableMultiEpStyles=this.multiEpStyles},animeNamingType(){this.animeType=this.animeNamingType,this.updatePatternSamples()},type(){this.isEnabled=!this.type&&this.enabled}}}}).call(this,n(4))},function(e,t,n){var s=n(200);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("2286310c",s,!1,{})},function(e,t,n){var s=n(202);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("357562c6",s,!1,{})},function(e,t,n){var s=n(204);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("0d4dcec1",s,!1,{})},function(e,t,n){"use strict";(function(e){t.a={name:"scroll-buttons",data:()=>({showToTop:!1,showLeftRight:!1}),methods:{scrollTop(){const{scrollTo:t}=this;t(e("body"))},scrollLeft(){e("div.horizontal-scroll").animate({scrollLeft:"-=153"},1e3,"easeOutQuad")},scrollRight(){e("div.horizontal-scroll").animate({scrollLeft:"+=153"},1e3,"easeOutQuad")},scrollTo(t){e("html, body").animate({scrollTop:e(t).offset().top},500,"linear")},initHorizontalScroll(){const t=e("div.horizontal-scroll").get();if(0===t.length)return;const n=t.map(e=>e.scrollWidth>e.clientWidth).indexOf(!0);this.showLeftRight=n>=0}},mounted(){const{initHorizontalScroll:t}=this;t(),e(window).on("resize",()=>{t()}),e(document).on("scroll",()=>{e(window).scrollTop()>100?this.showToTop=!0:this.showToTop=!1})}}}).call(this,n(4))},function(e,t,n){var s=n(206);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("0faefb92",s,!1,{})},function(e,t,n){var s=n(208);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("3fbe8aec",s,!1,{})},function(e,t,n){var s=n(210);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("ea8d60b8",s,!1,{})},function(e,t,n){var s=n(212);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("13510eb0",s,!1,{})},function(e,t,n){"use strict";(function(e){var s=n(1),a=n(2);t.a={name:"app-header",components:{AppLink:a.a},computed:{...Object(s.e)(["config","clients","notifiers","postprocessing","search","system"]),...Object(s.e)({isAuthenticated:e=>e.auth.isAuthenticated,username:e=>e.auth.user.username,warningLevel:e=>e.config.logs.loggingLevels.warning}),recentShows(){const{config:e}=this,{recentShows:t}=e;return t.map(e=>{const{name:t,indexerName:n,showId:s}=e;return{name:t,link:"home/displayShow?indexername=".concat(n,"&seriesid=").concat(s)}})},topMenu(){return this.$route.meta.topMenu},toolsBadgeCount(){const{config:e}=this,{system:t}=this,{logs:n}=e,{news:s}=t;return n.numErrors+n.numWarnings+s.unread},toolsBadgeClass(){const{config:e}=this,{logs:t}=e;return t.numErrors>0?" btn-danger":t.numWarnings>0?" btn-warning":""},linkVisible(){const{clients:e,config:t,notifiers:n,postprocessing:s,search:a}=this,{subtitles:o}=t,{general:i}=a,{kodi:l,plex:r,emby:c}=n;return{plex:r.server.enabled&&0!==r.server.host.length,kodi:l.enabled&&0!==l.host.length,emby:c.enabled&&c.host,manageTorrents:e.torrents.enabled&&"blackhole"!==e.torrents.method,failedDownloads:i.failedDownloads.enabled,subtitleMissed:o.enabled,subtitleMissedPP:s.postponeIfNoSubs}}},mounted(){const{$el:t}=this;t.clickCloseMenus=t=>{const{target:n}=t;if(n.matches("#main_nav a.router-link, #main_nav a.router-link *")){const t=n.closest(".dropdown");t.querySelector(".dropdown-toggle").setAttribute("aria-expanded",!1),t.querySelector(".dropdown-menu").style.display="none",e("#main_nav").collapse("hide")}},t.addEventListener("click",t.clickCloseMenus,{passive:!0}),e(t).on({mouseenter(t){const n=e(t.currentTarget);n.find(".dropdown-menu").stop(!0,!0).delay(200).fadeIn(500,()=>{n.find(".dropdown-toggle").attr("aria-expanded","true")})},mouseleave(t){const n=e(t.currentTarget);n.find(".dropdown-toggle").attr("aria-expanded","false"),n.find(".dropdown-menu").stop(!0,!0).delay(200).fadeOut(500)}},"ul.nav li.dropdown"),(navigator.maxTouchPoints||0)<2&&e(t).on("click",".dropdown-toggle",t=>{const n=e(t.currentTarget);"true"===n.attr("aria-expanded")&&(window.location.href=n.attr("href"))})},destroyed(){const{$el:t}=this;t.removeEventListener("click",t.clickCloseMenus),e(t).off("mouseenter mouseleave","ul.nav li.dropdown"),(navigator.maxTouchPoints||0)<2&&e(t).off("click",".dropdown-toggle")},methods:{confirmDialog(t,n){const s={confirmButton:"Yes",cancelButton:"Cancel",dialogClass:"modal-dialog",post:!1,button:e(t.currentTarget),confirm(e){window.location.href=e[0].href}};if("restart"===n)s.title="Restart",s.text="Are you sure you want to restart Medusa?";else if("shutdown"===n)s.title="Shutdown",s.text="Are you sure you want to shutdown Medusa?";else{if("logout"!==n)return;s.title="Logout",s.text="Are you sure you want to logout from Medusa?"}e.confirm(s,t)}}}}).call(this,n(4))},function(e,t,n){var s=n(214);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("ef1315ea",s,!1,{})},function(e,t,n){"use strict";(function(e){var s=n(1),a=n(3),o=n(6);t.a={name:"backstretch",render:e=>e(),props:{slug:String},data:()=>({created:!1}),computed:{...Object(s.e)({enabled:e=>e.layout.fanartBackground,opacity:e=>e.layout.fanartBackgroundOpacity}),offset(){let t="90px";return 0===e("#sub-menu-container").length&&(t="50px"),e(window).width()<1280&&(t="50px"),t}},async mounted(){try{await Object(o.g)(()=>null!==this.enabled)}catch(e){}if(!this.enabled)return;const{opacity:t,slug:n,offset:s}=this;if(n){const o="".concat(a.e,"/api/v2/series/").concat(n,"/asset/fanart?api_key=").concat(a.b),{$wrap:i}=e.backstretch(o);i.css("top",s),i.css("opacity",t).fadeIn(500),this.created=!0}},destroyed(){this.created&&e.backstretch("destroy")},watch:{opacity(t){if(this.created){const{$wrap:n}=e("body").data("backstretch");n.css("opacity",t).fadeIn(500)}}}}}).call(this,n(4))},function(e,t,n){var s=n(216);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("680016fc",s,!1,{})},function(e,t,n){"use strict";(function(e){var s=n(3),a=n(1),o=n(78),i=n(2),l=n(6),r=n(19),c=n(17),d=n(130),u=n.n(d),p=(n(219),n(23));t.a={name:"config-general",components:{AppLink:i.a,ConfigTemplate:i.c,ConfigTextbox:i.d,ConfigTextboxNumber:i.e,ConfigToggleSlider:i.f,LanguageSelect:i.h,Multiselect:u(),VPopover:p.a,ToggleButton:c.ToggleButton,RootDirs:o.a},directives:{tooltip:p.b},data:()=>({defaultPageOptions:[{value:"home",text:"Shows"},{value:"schedule",text:"Schedule"},{value:"history",text:"History"},{value:"news",text:"News"},{value:"IRC",text:"IRC"}],privacyLevelOptions:[{value:"high",text:"HIGH"},{value:"normal",text:"NORMAL"},{value:"low",text:"LOW"}],githubBranchesForced:[],resetBranchSelected:null}),beforeMount(){this.$nextTick(()=>{e("#config-components").tabs()})},computed:{...Object(a.e)({config:e=>e.config,configLoaded:e=>e.consts.statuses.length>0,layout:e=>e.layout,statuses:e=>e.consts.statuses,indexers:e=>e.indexers,system:e=>e.system}),...Object(a.d)(["getStatus"]),indexerDefault:{get(){const{config:e}=this,{indexerDefault:t}=e;return t||0},set(e){this.config.indexerDefault=e}},indexerListOptions(){const{indexers:e}=this;return[{text:"All Indexers",value:0},...Object.values(e.indexers).map(e=>({value:e.id,text:e.name}))]},datePresetOptions(){const{config:e}=this,{datePresets:t}=e;return[{value:"%x",text:"Use System Default"},...t.map(e=>({value:e,text:Object(r.a)(new Date,Object(l.d)(e))}))]},timePresetOptions(){const{config:e}=this,{timePresets:t}=e;return[{value:"%x",text:"Use System Default"},...t.map(e=>({value:e,text:Object(r.a)(new Date,Object(l.d)(e))}))]},availableThemesOptions(){const{config:e}=this,{availableThemes:t}=e;return t?t.map(e=>({value:e.name,text:"".concat(e.name," (").concat(e.version,")")})):[]},cpuPresetOptions(){const{system:e}=this,{cpuPresets:t}=e;return t?Object.keys(t).map(e=>({value:e,text:e})):[]},defaultDeletedEpOptions(){const{config:e,getStatus:t}=this;let n=[];return n=e.skipRemovedFiles?["skipped","ignored"].map(e=>t({key:e})):["skipped","ignored","archived"].map(e=>t({key:e})),n.every(e=>void 0!==e)?n.map(e=>({text:e.name,value:e.value})):[]},githubRemoteBranchesOptions(){const{config:e,githubBranches:t,githubBranchForceUpdate:n}=this,{system:s}=this,{username:a,password:o,token:i}=e.git;if(!s.gitRemoteBranches)return[];!s.gitRemoteBranches.length>0&&n();let l=[];return l=(a&&o||i)&&e.developer?t:a&&o||i?t.filter(e=>["master","develop"].includes(e)):t.filter(e=>["master"].includes(e)),l.map(e=>({text:e,value:e}))},githubBranches(){const{system:e,githubBranchesForced:t}=this;return e.gitRemoteBranches||t},githubTokenPopover(){const{config:e}=this;return"

    Copy the generated token and paste it in the token input box.

    "+'

    ')+'


    '}},methods:{...Object(a.c)(["setConfig","setTheme","getApiKey"]),async githubBranchForceUpdate(){const e=await Object(s.c)("home/branchForceUpdate");e.data._size>0&&(this.githubBranchesForced=e.data.resetBranches)},async generateApiKey(){const{getApiKey:e,save:t}=this;try{await e(),this.$snotify.success("Saving and reloading the page, to utilize the new api key","Warning",{timeout:5e3}),setTimeout(()=>{t()},500),setTimeout(()=>{location.reload()},500)}catch(e){this.$snotify.error("Error while trying to get a new api key","Error")}},async changeTheme(e){const{setTheme:t}=this;try{await t({themeName:e}),this.$snotify.success("Saving and reloading the page","Saving",{timeout:5e3}),setTimeout(()=>{location.reload()},1e3)}catch(e){this.$snotify.error("Error while trying to change the theme","Error")}},async save(){const{config:e,layout:t,setConfig:n}=this;this.saving=!0;const{availableThemes:s,backlogOverview:a,datePresets:o,loggingLevels:i,logs:l,timePresets:r,randomShowSlug:c,recentShows:d,themeName:u,...p}=e,h={section:"main",config:Object.assign({},p,{layout:t},{logs:{debug:e.logs.debug,dbDebug:e.logs.dbDebug,actualLogDir:e.logs.actualLogDir,nr:e.logs.nr,size:e.logs.size,subliminalLog:e.logs.subliminalLog,privacyLevel:e.logs.privacyLevel}})};try{await n(h),this.$snotify.success("Saved general config","Saved",{timeout:5e3})}catch(e){this.$snotify.error("Error while trying to save general config","Error")}finally{this.saving=!1}}}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){var s=n(1);t.a={name:"root-dirs",inheritAttrs:!1,data:()=>({rootDirs:[]}),beforeMount(){const{rawRootDirs:e,transformRaw:t}=this;this.rootDirs=t(e)},computed:{...Object(s.e)({rawRootDirs:e=>e.config.rootDirs}),paths(){return this.rootDirs.map(e=>e.path)},selectedRootDir:{get(){const{rootDirs:e}=this,t=e.find(e=>e.selected);return t&&0!==e.length?t.path:null},set(e){const{rootDirs:t}=this;this.rootDirs=t.map(t=>(t.selected=t.path===e,t))}},defaultRootDir:{get(){const{rootDirs:e}=this,t=e.find(e=>e.default);return t&&0!==e.length?t.path:null},set(e){const{rootDirs:t}=this;this.rootDirs=t.map(t=>(t.default=t.path===e,t))}}},filters:{markDefault:e=>e.default?"* ".concat(e.path):e.path},methods:{transformRaw(e){if(e.length<2)return[];const t=parseInt(e[0],10);return e.slice(1).map((e,n)=>({path:e,default:n===t,selected:n===t}))},add(){const{$el:t,rootDirs:n,selectedRootDir:s,defaultRootDir:a,saveRootDirs:o}=this;e(t).nFileBrowser(e=>{if(0===e.length)return;const t=n.find(t=>t.path===e);if(t&&t.path!==s)return void(this.selectedRootDir=e);const i=null===a;n.push({path:e,default:i,selected:i}),o()})},edit(){const{$el:t,rootDirs:n,selectedRootDir:s,saveRootDirs:a}=this;e(t).nFileBrowser(e=>{if(0===e.length)return;const t=n.find(t=>t.path===e);if(t&&t.path!==s){const a=t.default;this.rootDirs=n.reduce((t,n)=>{if(n.path===s)return t;const o=n.path===e;return n.selected=o,n.default=a&&o,t.push(n),t},[])}else n.find(e=>e.selected).path=e,this.selectedRootDir=e,a()},{initialDir:s})},remove(){const{rootDirs:e,selectedRootDir:t,defaultRootDir:n,saveRootDirs:s}=this,a=e.findIndex(e=>e.selected),o=t,i=e.filter(e=>!e.selected);if(i.length>0){const e=a>0?a-1:0;this.selectedRootDir=i[e].path}else this.selectedRootDir=null;null!==this.defaultRootDir&&o===n&&(this.defaultRootDir=t),this.rootDirs=i,s()},setDefault(){const{selectedRootDir:e,defaultRootDir:t,saveRootDirs:n}=this;e!==t&&(this.defaultRootDir=e,n())},saveRootDirs(){const{$store:e,paths:t,defaultRootDir:n}=this,s=t.slice();if(null!==n&&0!==t.length){const e=s.findIndex(e=>e===n);s.splice(0,0,e.toString())}return e.dispatch("setConfig",{section:"main",config:{rootDirs:s}})}},watch:{rawRootDirs(e){const{transformRaw:t}=this;this.rootDirs=t(e)},rootDirs:{handler(t){this.$emit("update",t),this.$nextTick(()=>{e(this.$refs.rootDirs).trigger("change")})},deep:!0,immediate:!1},paths(e,t){JSON.stringify(e)!==JSON.stringify(t)&&this.$emit("update:paths",e)}}}}).call(this,n(4))},function(e,t,n){var s=n(218);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("571cda75",s,!1,{})},function(e,t,n){var s=n(221);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("760015ea",s,!1,{})},function(e,t,n){"use strict";(function(e){var s=n(1),a=n(17),o=n(2);t.a={name:"config-post-processing",components:{AppLink:o.a,FileBrowser:o.g,NamePattern:o.i,SelectList:o.n,ToggleButton:a.ToggleButton},data:()=>({presets:[{pattern:"%SN - %Sx%0E - %EN",example:"Show Name - 2x03 - Ep Name"},{pattern:"%S.N.S%0SE%0E.%E.N",example:"Show.Name.S02E03.Ep.Name"},{pattern:"%Sx%0E - %EN",example:"2x03 - Ep Name"},{pattern:"S%0SE%0E - %EN",example:"S02E03 - Ep Name"},{pattern:"Season %0S/%S.N.S%0SE%0E.%Q.N-%RG",example:"Season 02/Show.Name.S02E03.720p.HDTV-RLSGROUP"}],processMethods:[{value:"copy",text:"Copy"},{value:"move",text:"Move"},{value:"hardlink",text:"Hard Link"},{value:"symlink",text:"Symbolic Link"}],timezoneOptions:[{value:"local",text:"Local"},{value:"network",text:"Network"}],metadataProviderSelected:null}),methods:{...Object(s.c)(["setConfig"]),onChangeSyncFiles(e){const{postprocessing:t}=this;t.syncFiles=e.map(e=>e.value)},onChangeAllowedExtensions(e){const{postprocessing:t}=this;t.allowedExtensions=e.map(e=>e.value)},onChangeExtraScripts(e){const{postprocessing:t}=this;t.extraScripts=e.map(e=>e.value)},saveNaming(e){const{postprocessing:t}=this;this.configLoaded&&(t.naming.pattern=e.pattern,t.naming.multiEp=e.multiEpStyle)},saveNamingSports(e){const{postprocessing:t}=this;this.configLoaded&&(t.naming.patternSports=e.pattern,t.naming.enableCustomNamingSports=e.enabled)},saveNamingAbd(e){const{postprocessing:t}=this;this.configLoaded&&(t.naming.patternAirByDate=e.pattern,t.naming.enableCustomNamingAirByDate=e.enabled)},saveNamingAnime(e){const{postprocessing:t}=this;this.configLoaded&&(t.naming.patternAnime=e.pattern,t.naming.animeMultiEp=e.multiEpStyle,t.naming.animeNamingType=e.animeNamingType,t.naming.enableCustomNamingAnime=e.enabled)},async save(){const{postprocessing:e,metadata:t,setConfig:n}=this;if(!this.configLoaded)return;this.saving=!0;const s=Object.assign({},{postProcessing:e,metadata:t}),{multiEpStrings:a,reflinkAvailable:o,extraScriptsUrl:i,...l}=e;s.postProcessing=l;try{await n({section:"main",config:s}),this.$snotify.success("Saved Post-Processing config","Saved",{timeout:5e3})}catch(e){this.$snotify.error("Error while trying to save Post-Processing config","Error")}finally{this.saving=!1}},getFirstEnabledMetadataProvider(){const{metadata:e}=this,t=Object.values(e.metadataProviders).find(e=>e.showMetadata||e.episodeMetadata);return void 0===t?"kodi":t.id}},computed:{...Object(s.e)(["config","metadata","postprocessing","system"]),configLoaded(){const{postprocessing:e}=this;return null!==e.processAutomatically},multiEpStringsSelect(){const{postprocessing:e}=this;return e.multiEpStrings?Object.keys(e.multiEpStrings).map(t=>({value:Number(t),text:e.multiEpStrings[t]})):[]}},beforeMount(){this.$nextTick(()=>{e("#config-components").tabs()})},watch:{"metadata.metadataProviders":function(e){const{getFirstEnabledMetadataProvider:t}=this;Object.keys(e).length>0&&(this.metadataProviderSelected=t())}}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){var s=n(3),a=n(1),o=n(2);t.a={name:"config-notifications",components:{AppLink:o.a,ConfigTemplate:o.c,ConfigTextbox:o.d,ConfigTextboxNumber:o.e,ConfigToggleSlider:o.f,SelectList:o.n,ShowSelector:o.o},data:()=>({prowlSelectedShow:null,prowlSelectedShowApiKeys:[],prowlPriorityOptions:[{text:"Very Low",value:-2},{text:"Moderate",value:-1},{text:"Normal",value:0},{text:"High",value:1},{text:"Emergency",value:2}],pushoverPriorityOptions:[{text:"Lowest",value:-2},{text:"Low",value:-1},{text:"Normal",value:0},{text:"High",value:1},{text:"Emergency",value:2}],pushoverSoundOptions:[{text:"Default",value:"default"},{text:"Pushover",value:"pushover"},{text:"Bike",value:"bike"},{text:"Bugle",value:"bugle"},{text:"Cash Register",value:"cashregister"},{text:"classical",value:"classical"},{text:"Cosmic",value:"cosmic"},{text:"Falling",value:"falling"},{text:"Gamelan",value:"gamelan"},{text:"Incoming",value:"incoming"},{text:"Intermission",value:"intermission"},{text:"Magic",value:"magic"},{text:"Mechanical",value:"mechanical"},{text:"Piano Bar",value:"pianobar"},{text:"Siren",value:"siren"},{text:"Space Alarm",value:"spacealarm"},{text:"Tug Boat",value:"tugboat"},{text:"Alien Alarm (long)",value:"alien"},{text:"Climb (long)",value:"climb"},{text:"Persistent (long)",value:"persistant"},{text:"Pushover Echo (long)",value:"echo"},{text:"Up Down (long)",value:"updown"},{text:"None (silent)",value:"none"}],pushbulletDeviceOptions:[{text:"All devices",value:""}],traktMethodOptions:[{text:"Skip all",value:0},{text:"Download pilot only",value:1},{text:"Get whole show",value:2}],pushbulletTestInfo:"Click below to test.",joinTestInfo:"Click below to test.",twitterTestInfo:"Click below to test.",twitterKey:"",emailSelectedShow:null,emailSelectedShowAdresses:[]}),computed:{...Object(a.e)(["config","indexers","notifiers"]),traktNewTokenMessage(){const{accessToken:e}=this.notifiers.trakt;return"New "},traktIndexersOptions(){const{indexers:e}=this,{traktIndexers:t}=e.main;return Object.keys(e.indexers).filter(e=>t[e]).map(t=>({text:t,value:e.indexers[t].id}))}},created(){const{getShows:e}=this;e()},beforeMount(){this.$nextTick(()=>{e("#config-components").tabs()})},mounted(){e("#trakt_pin").on("keyup change",()=>{0===e("#trakt_pin").val().length?(e("#TraktGetPin").removeClass("hide"),e("#authTrakt").addClass("hide")):(e("#TraktGetPin").addClass("hide"),e("#authTrakt").removeClass("hide"))})},methods:{...Object(a.c)(["getShows","setConfig"]),onChangeProwlApi(e){this.notifiers.prowl.api=e.map(e=>e.value)},savePerShowNotifyList(e,t){const{emailSelectedShow:n,prowlSelectedShow:a}=this,o=new FormData;"prowl"===e?(o.set("show",a),o.set("prowlAPIs",t.map(e=>e.value))):(o.set("show",n),o.set("emails",t.map(e=>e.value))),s.c.post("home/saveShowNotifyList",o)},async prowlUpdateApiKeys(e){this.prowlSelectedShow=e;const t=await Object(s.c)("home/loadShowNotifyLists");if(t.data._size>0){const n=t.data[e].prowl_notify_list?t.data[e].prowl_notify_list.split(","):[];this.prowlSelectedShowApiKeys=e?n:[]}},async emailUpdateShowEmail(e){this.emailSelectedShow=e;const t=await Object(s.c)("home/loadShowNotifyLists");if(t.data._size>0){const n=t.data[e].list?t.data[e].list.split(","):[];this.emailSelectedShowAdresses=e?n:[]}},emailUpdateAddressList(e){this.notifiers.email.addressList=e.map(e=>e.value)},async getPushbulletDeviceOptions(){const{api:t}=this.notifiers.pushbullet;if(!t)return this.pushbulletTestInfo="You didn't supply a Pushbullet api key",e("#pushbullet_api").find("input").focus(),!1;const n=await Object(s.c)("home/getPushbulletDevices",{params:{api:t}}),a=[],{data:o}=n;if(!o)return!1;a.push({text:"All devices",value:""});for(const e of o.devices)!0===e.active&&a.push({text:e.nickname,value:e.iden});this.pushbulletDeviceOptions=a,this.pushbulletTestInfo="Device list updated. Please choose a device to push to."},async testPushbulletApi(){const{api:t}=this.notifiers.pushbullet;if(!t)return this.pushbulletTestInfo="You didn't supply a Pushbullet api key",e("#pushbullet_api").find("input").focus(),!1;const n=await Object(s.c)("home/testPushbullet",{params:{api:t}}),{data:a}=n;a&&(this.pushbulletTestInfo=a)},async testJoinApi(){const{api:t}=this.notifiers.join;if(!t)return this.joinTestInfo="You didn't supply a Join api key",e("#join_api").find("input").focus(),!1;const n=await Object(s.c)("home/testJoin",{params:{api:t}}),{data:a}=n;a&&(this.joinTestInfo=a)},async twitterStep1(){this.twitterTestInfo=MEDUSA.config.loading;const e=await Object(s.c)("home/twitterStep1"),{data:t}=e;window.open(t),this.twitterTestInfo="Step1: Confirm Authorization"},async twitterStep2(){const e={},{twitterKey:t}=this;if(e.key=t,e.key){const t=await Object(s.c)("home/twitterStep2",{params:{key:e.key}}),{data:n}=t;this.twitterTestInfo=n}else this.twitterTestInfo="Please fill out the necessary fields above."},async twitterTest(){try{const e=await Object(s.c)("home/testTwitter"),{data:t}=e;this.twitterTestInfo=t}catch(e){this.twitterTestInfo="Error while trying to request for a test on the twitter api."}},async save(){const{notifiers:e,setConfig:t}=this;this.saving=!0;try{await t({section:"main",config:{notifiers:e}}),this.$snotify.success("Saved Notifiers config","Saved",{timeout:5e3})}catch(e){this.$snotify.error("Error while trying to save notifiers config","Error")}finally{this.saving=!1}},testGrowl(){const t={};if(t.host=e.trim(e("#growl_host").val()),t.password=e.trim(e("#growl_password").val()),!t.host)return e("#testGrowl-result").html("Please fill out the necessary fields above."),void e("#growl_host").addClass("warning");e("#growl_host").removeClass("warning"),e(this).prop("disabled",!0),e("#testGrowl-result").html(MEDUSA.config.loading),e.get("home/testGrowl",{host:t.host,password:t.password}).done(t=>{e("#testGrowl-result").html(t),e("#testGrowl").prop("disabled",!1)})},testProwl(){const t={};if(t.api=e.trim(e("#prowl_api").find("input").val()),t.priority=e("#prowl_priority").find("input").val(),!t.api)return e("#testProwl-result").html("Please fill out the necessary fields above."),void e("#prowl_api").find("input").addClass("warning");e("#prowl_api").find("input").removeClass("warning"),e(this).prop("disabled",!0),e("#testProwl-result").html(MEDUSA.config.loading),e.get("home/testProwl",{prowl_api:t.api,prowl_priority:t.priority}).done(t=>{e("#testProwl-result").html(t),e("#testProwl").prop("disabled",!1)})},testKODI(){const t={},n=e.map(e("#kodi_host").find("input"),e=>e.value).filter(e=>""!==e);if(t.host=n.join(","),t.username=e.trim(e("#kodi_username").val()),t.password=e.trim(e("#kodi_password").val()),!t.host)return e("#testKODI-result").html("Please fill out the necessary fields above."),void e("#kodi_host").find("input").addClass("warning");e("#kodi_host").find("input").removeClass("warning"),e(this).prop("disabled",!0),e("#testKODI-result").html(MEDUSA.config.loading),e.get("home/testKODI",{host:t.host,username:t.username,password:t.password}).done(t=>{e("#testKODI-result").html(t),e("#testKODI").prop("disabled",!1)})},testPHT(){const t={client:{}},n=e.map(e("#plex_client_host").find("input"),e=>e.value).filter(e=>""!==e);if(t.client.host=n.join(","),t.client.username=e.trim(e("#plex_client_username").val()),t.client.password=e.trim(e("#plex_client_password").val()),!t.client.host)return e("#testPHT-result").html("Please fill out the necessary fields above."),void e("#plex_client_host").find("input").addClass("warning");e("#plex_client_host").find("input").removeClass("warning"),e(this).prop("disabled",!0),e("#testPHT-result").html(MEDUSA.config.loading),e.get("home/testPHT",{host:t.client.host,username:t.client.username,password:t.client.password}).done(t=>{e("#testPHT-result").html(t),e("#testPHT").prop("disabled",!1)})},testPMS(){const t={server:{}},n=e.map(e("#plex_server_host").find("input"),e=>e.value).filter(e=>""!==e);if(t.server.host=n.join(","),t.server.username=e.trim(e("#plex_server_username").val()),t.server.password=e.trim(e("#plex_server_password").val()),t.server.token=e.trim(e("#plex_server_token").val()),!t.server.host)return e("#testPMS-result").html("Please fill out the necessary fields above."),void e("#plex_server_host").find("input").addClass("warning");e("#plex_server_host").find("input").removeClass("warning"),e(this).prop("disabled",!0),e("#testPMS-result").html(MEDUSA.config.loading),e.get("home/testPMS",{host:t.server.host,username:t.server.username,password:t.server.password,plex_server_token:t.server.token}).done(t=>{e("#testPMS-result").html(t),e("#testPMS").prop("disabled",!1)})},testEMBY(){const t={};if(t.host=e("#emby_host").val(),t.apikey=e("#emby_apikey").val(),!t.host||!t.apikey)return e("#testEMBY-result").html("Please fill out the necessary fields above."),e("#emby_host").addRemoveWarningClass(t.host),void e("#emby_apikey").addRemoveWarningClass(t.apikey);e("#emby_host,#emby_apikey").children("input").removeClass("warning"),e(this).prop("disabled",!0),e("#testEMBY-result").html(MEDUSA.config.loading),e.get("home/testEMBY",{host:t.host,emby_apikey:t.apikey}).done(t=>{e("#testEMBY-result").html(t),e("#testEMBY").prop("disabled",!1)})},testBoxcar2(){const t={};if(t.accesstoken=e.trim(e("#boxcar2_accesstoken").val()),!t.accesstoken)return e("#testBoxcar2-result").html("Please fill out the necessary fields above."),void e("#boxcar2_accesstoken").addClass("warning");e("#boxcar2_accesstoken").removeClass("warning"),e(this).prop("disabled",!0),e("#testBoxcar2-result").html(MEDUSA.config.loading),e.get("home/testBoxcar2",{accesstoken:t.accesstoken}).done(t=>{e("#testBoxcar2-result").html(t),e("#testBoxcar2").prop("disabled",!1)})},testPushover(){const t={};if(t.userkey=e("#pushover_userkey").val(),t.apikey=e("#pushover_apikey").val(),!t.userkey||!t.apikey)return e("#testPushover-result").html("Please fill out the necessary fields above."),e("#pushover_userkey").addRemoveWarningClass(t.userkey),void e("#pushover_apikey").addRemoveWarningClass(t.apikey);e("#pushover_userkey,#pushover_apikey").removeClass("warning"),e(this).prop("disabled",!0),e("#testPushover-result").html(MEDUSA.config.loading),e.get("home/testPushover",{userKey:t.userkey,apiKey:t.apikey}).done(t=>{e("#testPushover-result").html(t),e("#testPushover").prop("disabled",!1)})},testLibnotify(){e("#testLibnotify-result").html(MEDUSA.config.loading),e.get("home/testLibnotify",t=>{e("#testLibnotify-result").html(t)})},settingsNMJ(){const t={};t.host=e("#nmj_host").val(),t.host?(e("#testNMJ-result").html(MEDUSA.config.loading),e.get("home/settingsNMJ",{host:t.host},t=>{null===t&&(e("#nmj_database").removeAttr("readonly"),e("#nmj_mount").removeAttr("readonly"));const n=e.parseJSON(t);e("#testNMJ-result").html(n.message),e("#nmj_database").val(n.database),e("#nmj_mount").val(n.mount),n.database?e("#nmj_database").prop("readonly",!0):e("#nmj_database").removeAttr("readonly"),n.mount?e("#nmj_mount").prop("readonly",!0):e("#nmj_mount").removeAttr("readonly")})):(alert("Please fill in the Popcorn IP address"),e("#nmj_host").focus())},testNMJ(){const t={};t.host=e.trim(e("#nmj_host").val()),t.database=e("#nmj_database").val(),t.mount=e("#nmj_mount").val(),t.host?(e("#nmj_host").removeClass("warning"),e(this).prop("disabled",!0),e("#testNMJ-result").html(MEDUSA.config.loading),e.get("home/testNMJ",{host:t.host,database:t.database,mount:t.mount}).done(t=>{e("#testNMJ-result").html(t),e("#testNMJ").prop("disabled",!1)})):(e("#testNMJ-result").html("Please fill out the necessary fields above."),e("#nmj_host").addClass("warning"))},settingsNMJv2(){const t={};if(t.host=e("#nmjv2_host").val(),t.host){e("#testNMJv2-result").html(MEDUSA.config.loading),t.dbloc="";const n=document.getElementsByName("nmjv2_dbloc");for(let e=0,s=n.length;e{null===t&&e("#nmjv2_database").removeAttr("readonly");const n=e.parseJSON(t);e("#testNMJv2-result").html(n.message),e("#nmjv2_database").val(n.database),n.database?e("#nmjv2_database").prop("readonly",!0):e("#nmjv2_database").removeAttr("readonly")})}else alert("Please fill in the Popcorn IP address"),e("#nmjv2_host").focus()},testNMJv2(){const t={};t.host=e.trim(e("#nmjv2_host").val()),t.host?(e("#nmjv2_host").removeClass("warning"),e(this).prop("disabled",!0),e("#testNMJv2-result").html(MEDUSA.config.loading),e.get("home/testNMJv2",{host:t.host}).done(t=>{e("#testNMJv2-result").html(t),e("#testNMJv2").prop("disabled",!1)})):(e("#testNMJv2-result").html("Please fill out the necessary fields above."),e("#nmjv2_host").addClass("warning"))},testFreeMobile(){const t={};if(t.id=e.trim(e("#freemobile_id").val()),t.apikey=e.trim(e("#freemobile_apikey").val()),!t.id||!t.apikey)return e("#testFreeMobile-result").html("Please fill out the necessary fields above."),t.id?e("#freemobile_id").removeClass("warning"):e("#freemobile_id").addClass("warning"),void(t.apikey?e("#freemobile_apikey").removeClass("warning"):e("#freemobile_apikey").addClass("warning"));e("#freemobile_id,#freemobile_apikey").removeClass("warning"),e(this).prop("disabled",!0),e("#testFreeMobile-result").html(MEDUSA.config.loading),e.get("home/testFreeMobile",{freemobile_id:t.id,freemobile_apikey:t.apikey}).done(t=>{e("#testFreeMobile-result").html(t),e("#testFreeMobile").prop("disabled",!1)})},testTelegram(){const t={};if(t.id=e.trim(e("#telegram_id").val()),t.apikey=e.trim(e("#telegram_apikey").val()),!t.id||!t.apikey)return e("#testTelegram-result").html("Please fill out the necessary fields above."),e("#telegram_id").addRemoveWarningClass(t.id),void e("#telegram_apikey").addRemoveWarningClass(t.apikey);e("#telegram_id,#telegram_apikey").removeClass("warning"),e(this).prop("disabled",!0),e("#testTelegram-result").html(MEDUSA.config.loading),e.get("home/testTelegram",{telegram_id:t.id,telegram_apikey:t.apikey}).done(t=>{e("#testTelegram-result").html(t),e("#testTelegram").prop("disabled",!1)})},testDiscord(){const{notifiers:t}=this;if(!t.discord.webhook)return e("#testDiscord-result").html("Please fill out the necessary fields above."),void e("#discord_webhook").addRemoveWarningClass(t.discord.webhook);e("#discord_id,#discord_apikey").removeClass("warning"),e(this).prop("disabled",!0),e("#testDiscord-result").html(MEDUSA.config.loading),e.get("home/testDiscord",{discord_webhook:t.discord.webhook,discord_tts:t.discord.tts}).done(t=>{e("#testDiscord-result").html(t),e("#testDiscord").prop("disabled",!1)})},testSlack(){const t={};if(t.webhook=e.trim(e("#slack_webhook").val()),!t.webhook)return e("#testSlack-result").html("Please fill out the necessary fields above."),void e("#slack_webhook").addRemoveWarningClass(t.webhook);e("#slack_webhook").removeClass("warning"),e(this).prop("disabled",!0),e("#testSlack-result").html(MEDUSA.config.loading),e.get("home/testslack",{slack_webhook:t.webhook}).done(t=>{e("#testSlack-result").html(t),e("#testSlack").prop("disabled",!1)})},TraktGetPin(){window.open(e("#trakt_pin_url").val(),"popUp","toolbar=no, scrollbars=no, resizable=no, top=200, left=200, width=650, height=550"),e("#trakt_pin").prop("disabled",!1)},authTrakt(){const t={};t.pin=e("#trakt_pin").val(),0!==t.pin.length&&e.get("home/getTraktToken",{trakt_pin:t.pin}).done(t=>{e("#testTrakt-result").html(t),e("#authTrakt").addClass("hide"),e("#trakt_pin").prop("disabled",!0),e("#trakt_pin").val(""),e("#TraktGetPin").removeClass("hide")})},testTrakt(){const t={};return t.username=e.trim(e("#trakt_username").val()),t.trendingBlacklist=e.trim(e("#trakt_blacklist_name").val()),t.username?/\s/g.test(t.trendingBlacklist)?(e("#testTrakt-result").html("Check blacklist name; the value needs to be a trakt slug"),void e("#trakt_blacklist_name").addClass("warning")):(e("#trakt_username").removeClass("warning"),e("#trakt_blacklist_name").removeClass("warning"),e(this).prop("disabled",!0),e("#testTrakt-result").html(MEDUSA.config.loading),void e.get("home/testTrakt",{username:t.username,blacklist_name:t.trendingBlacklist}).done(t=>{e("#testTrakt-result").html(t),e("#testTrakt").prop("disabled",!1)})):(e("#testTrakt-result").html("Please fill out the necessary fields above."),void e("#trakt_username").addRemoveWarningClass(t.username))},traktForceSync(){e("#testTrakt-result").html(MEDUSA.config.loading),e.getJSON("home/forceTraktSync",t=>{e("#testTrakt-result").html(t.result)})},testEmail(){let t="";const n=e("#testEmail-result");n.html(MEDUSA.config.loading);let s=e("#email_host").val();s=s.length>0?s:null;let a=e("#email_port").val();a=a.length>0?a:null;const o=e("#email_tls").find("input").is(":checked")?1:0;let i=e("#email_from").val();i=i.length>0?i:"root@localhost";const l=e("#email_username").val().trim(),r=e("#email_password").val();let c="";null===s&&(c+='
  • You must specify an SMTP hostname!
  • '),null===a?c+='
  • You must specify an SMTP port!
  • ':(null===a.match(/^\d+$/)||parseInt(a,10)>65535)&&(c+='
  • SMTP port must be between 0 and 65535!
  • '),c.length>0?(c="
      "+c+"
    ",n.html(c)):(t=prompt("Enter an email address to send the test to:",null),null===t||0===t.length||null===t.match(/.*@.*/)?n.html('

    You must provide a recipient email address!

    '):e.get("home/testEmail",{host:s,port:a,smtp_from:i,use_tls:o,user:l,pwd:r,to:t},t=>{e("#testEmail-result").html(t)}))},testPushalot(){const t={};if(t.authToken=e.trim(e("#pushalot_authorizationtoken").val()),!t.authToken)return e("#testPushalot-result").html("Please fill out the necessary fields above."),void e("#pushalot_authorizationtoken").addClass("warning");e("#pushalot_authorizationtoken").removeClass("warning"),e(this).prop("disabled",!0),e("#testPushalot-result").html(MEDUSA.config.loading),e.get("home/testPushalot",{authorizationToken:t.authToken}).done(t=>{e("#testPushalot-result").html(t),e("#testPushalot").prop("disabled",!1)})}}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){var s=n(3),a=n(1),o=n(2);t.a={name:"config-search",components:{AppLink:o.a,ConfigTemplate:o.c,ConfigTextbox:o.d,ConfigTextboxNumber:o.e,ConfigToggleSlider:o.f,FileBrowser:o.g,SelectList:o.n},data:()=>({configLoaded:!1,checkPropersIntervalLabels:[{text:"24 hours",value:"daily"},{text:"4 hours",value:"4h"},{text:"90 mins",value:"90m"},{text:"45 mins",value:"45m"},{text:"30 mins",value:"30m"},{text:"15 mins",value:"15m"}],nzbGetPriorityOptions:[{text:"Very low",value:-100},{text:"Low",value:-50},{text:"Normal",value:0},{text:"High",value:50},{text:"Very high",value:100},{text:"Force",value:900}],clientsConfig:{torrent:{blackhole:{title:"Black hole"},utorrent:{title:"uTorrent",description:"URL to your uTorrent client (e.g. http://localhost:8000)",labelOption:!0,labelAnimeOption:!0,seedTimeOption:!0,pausedOption:!0,testStatus:"Click below to test"},transmission:{title:"Transmission",description:"URL to your Transmission client (e.g. http://localhost:9091)",pathOption:!0,removeFromClientOption:!0,seedLocationOption:!0,seedTimeOption:!0,pausedOption:!0,testStatus:"Click below to test"},deluge:{title:"Deluge (via WebUI)",shortTitle:"Deluge",description:"URL to your Deluge client (e.g. http://localhost:8112)",pathOption:!0,removeFromClientOption:!0,labelOption:!0,labelAnimeOption:!0,seedLocationOption:!0,pausedOption:!0,verifySSLOption:!0,testStatus:"Click below to test"},deluged:{title:"Deluge (via Daemon)",shortTitle:"Deluge",description:"IP or Hostname of your Deluge Daemon (e.g. scgi://localhost:58846)",pathOption:!0,removeFromClientOption:!0,labelOption:!0,labelAnimeOption:!0,seedLocationOption:!0,pausedOption:!0,verifySSLOption:!0,testStatus:"Click below to test"},downloadstation:{title:"Synology DS",description:"URL to your Synology DS client (e.g. http://localhost:5000)",pathOption:!0,testStatus:"Click below to test"},rtorrent:{title:"rTorrent",description:"URL to your rTorrent client (e.g. scgi://localhost:5000
    or https://localhost/rutorrent/plugins/httprpc/action.php)",pathOption:!0,labelOption:!0,labelAnimeOption:!0,verifySSLOption:!0,testStatus:"Click below to test"},qbittorrent:{title:"qBittorrent",description:"URL to your qBittorrent client (e.g. http://localhost:8080)",labelOption:!0,labelAnimeOption:!0,pausedOption:!0,verifySSLOption:!0,testStatus:"Click below to test"},mlnet:{title:"MLDonkey",description:"URL to your MLDonkey (e.g. http://localhost:4080)",verifySSLOption:!0,testStatus:"Click below to test"}},nzb:{blackhole:{title:"Black hole"},nzbget:{title:"NZBget",description:"NZBget RPC host name and port number (not NZBgetweb!) (e.g. localhost:6789)",testStatus:"Click below to test"},sabnzbd:{title:"SABnzbd",description:"URL to your SABnzbd server (e.g. http://localhost:8080/)",testStatus:"Click below to test"}}},httpAuthTypes:{none:"None",basic:"Basic",digest:"Digest"}}),computed:{...Object(a.e)(["clients","search","system"]),torrentUsernameIsDisabled(){const{clients:e}=this,{torrents:t}=e,{host:n,method:s}=t,a=n||"";return!(!["rtorrent","deluge"].includes(s)||"rtorrent"===s&&!a.startsWith("scgi://"))},torrentPasswordIsDisabled(){const{clients:e}=this,{torrents:t}=e,{host:n,method:s}=t;return!("rtorrent"!==s||"rtorrent"===s&&!(n||"").startsWith("scgi://"))},authTypeIsDisabled(){const{clients:e}=this,{torrents:t}=e,{host:n,method:s}=t;return!("rtorrent"===s&&!(n||"").startsWith("scgi://"))}},beforeMount(){this.$nextTick(()=>{e("#config-components").tabs()})},methods:{...Object(a.c)(["setConfig"]),async testTorrentClient(){const{clients:e}=this,{torrents:t}=e,{method:n,host:a,username:o,password:i}=t;this.clientsConfig.torrent[n].testStatus=MEDUSA.config.loading;const l={torrent_method:n,host:a,username:o,password:i},r=await s.c.get("home/testTorrent",{params:l});this.clientsConfig.torrent[n].testStatus=r.data},async testNzbget(){const{clients:e}=this,{nzb:t}=e,{nzbget:n}=t,{host:a,username:o,password:i,useHttps:l}=n;this.clientsConfig.nzb.nzbget.testStatus=MEDUSA.config.loading;const r={host:a,username:o,password:i,use_https:l},c=await s.c.get("home/testNZBget",{params:r});this.clientsConfig.nzb.nzbget.testStatus=c.data},async testSabnzbd(){const{clients:e}=this,{nzb:t}=e,{sabnzbd:n}=t,{host:a,username:o,password:i,apiKey:l}=n;this.clientsConfig.nzb.sabnzbd.testStatus=MEDUSA.config.loading;const r={host:a,username:o,password:i,apikey:l},c=await s.c.get("home/testSABnzbd",{params:r});this.clientsConfig.nzb.sabnzbd.testStatus=c.data},async save(){const{clients:e,search:t,setConfig:n}=this;this.saving=!0;const s=Object.assign({},{search:t},{clients:e});try{await n({section:"main",config:s}),this.$snotify.success("Saved Search config","Saved",{timeout:5e3})}catch(e){this.$snotify.error("Error while trying to save search config","Error")}finally{this.saving=!1}}},watch:{"clients.torrents.host"(e){const{clients:t}=this,{torrents:n}=t,{method:s}=n;if("rtorrent"===s){if(!e)return;e.startsWith("scgi://")&&(this.clients.torrents.username="",this.clients.torrents.password="",this.clients.torrents.authType="none")}"deluge"===s&&(this.clients.torrents.username="")},"clients.torrents.method"(e){this.clientsConfig.torrent[e].removeFromClientOption||(this.search.general.removeFromClient=!1)}}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){var s=n(19),a=n(135),o=n(1),i=n(2),l=n(6),r=n(30),c=n(82),d=n(21),u=n(26),p=n(76),h=n(136),m=n(134),f=n.n(m),g=n(77);h.a.addLocale(f.a),t.a={name:"show",components:{AppLink:i.a,VueGoodTable:c.a,Backstretch:d.a,PlotInfo:i.j,ShowHeader:u.a,QualityPill:g.a},metaInfo(){if(!this.show||!this.show.title)return{title:"Medusa"};const{title:e}=this.show;return{title:e,titleTemplate:"%s | Medusa"}},props:{showIndexer:{type:String},showId:{type:Number}},data(){const{getCookie:e}=this,t=[25,50,100,250,500];return{invertTable:!0,isMobile:!1,subtitleSearchComponents:[],columns:[{label:"NFO",field:"content.hasNfo",type:"boolean",sortable:!1,hidden:e("displayShow-hide-field-NFO")},{label:"TBN",field:"content.hasTbn",type:"boolean",sortable:!1,hidden:e("displayShow-hide-field-TBN")},{label:"Episode",field:"episode",type:"number",hidden:e("displayShow-hide-field-Episode")},{label:"Abs. #",field:"absoluteNumber",type:"number",hidden:e("displayShow-hide-field-Abs. #")},{label:"Scene",field:e=>{const{getSceneNumbering:t}=this;return t(e)},sortable:!1,hidden:e("displayShow-hide-field-Scene")},{label:"Scene Abs. #",field:e=>{const{getSceneAbsoluteNumbering:t}=this;return t(e)},type:"number",sortFn:(e,t)=>et?1:0,hidden:e("displayShow-hide-field-Scene Abs. #")},{label:"Title",field:"title",hidden:e("displayShow-hide-field-Title")},{label:"File",field:"file.location",hidden:e("displayShow-hide-field-File")},{label:"Size",field:"file.size",type:"number",formatFn:l.e,hidden:e("displayShow-hide-field-Size")},{label:"Air date",field:this.parseDateFn,sortable:!1,hidden:e("displayShow-hide-field-Air date")},{label:"Download",field:"download",sortable:!1,hidden:e("displayShow-hide-field-Download")},{label:"Subtitles",field:"subtitles",sortable:!1,hidden:e("displayShow-hide-field-Subtitles")},{label:"Status",field:"status",hidden:e("displayShow-hide-field-Status")},{label:"Search",field:"search",sortable:!1,hidden:e("displayShow-hide-field-Search")}],perPageDropdown:t,paginationPerPage:(()=>{const n=e("displayShow-pagination-perPage");return n?t.includes(n)?n:500:50})(),selectedEpisodes:[],failedSearchEpisode:null,backlogSearchEpisodes:[],filterByOverviewStatus:!1,timeAgo:new h.a("en-US")}},computed:{...Object(o.e)({shows:e=>e.shows.shows,configLoaded:e=>null!==e.layout.fanartBackground,config:e=>e.config,layout:e=>e.layout,stateSearch:e=>e.search}),...Object(o.d)({show:"getCurrentShow",getOverviewStatus:"getOverviewStatus"}),indexer(){return this.showIndexer||this.$route.query.indexername},id(){return this.showId||Number(this.$route.query.seriesid)||void 0},theme(){const{layout:e}=this,{themeName:t}=e;return t||"light"},orderSeasons(){const{filterByOverviewStatus:e,invertTable:t,show:n}=this;if(!n.seasons)return[];let s=n.seasons.sort((e,t)=>e.season-t.season).filter(e=>0!==e.season);if(e&&e.filter(e=>e.checked).length{const s=this.getOverviewStatus(t.status,t.quality,n.config.qualities),a=e.find(e=>e.name===s);return!a||a.checked});t.push(Object.assign({episodes:i},o))}s=t}return t?s.reverse():s},specials(){const{show:e}=this;return e.seasons?e.seasons.filter(e=>0===e.season):[]}},created(){const{getShows:e}=this;e()},mounted(){const{id:t,indexer:n,getShow:s,setEpisodeSceneNumbering:a,setAbsoluteSceneNumbering:o,setInputValidInvalid:i,$store:l}=this;l.commit("currentShow",{indexer:n,id:t}),s({id:t,indexer:n,detailed:!0}),this.$watch("show",()=>{this.$nextTick(()=>this.reflowLayout())}),["load","resize"].map(e=>window.addEventListener(e,()=>{this.reflowLayout()})),e(document.body).on("click",".seasonCheck",t=>{const n=t.currentTarget,s=e(n).attr("id");e("#collapseSeason-"+s).collapse("show");const a="s"+s;e(".epCheck:visible").each((t,s)=>{e(s).attr("id").split("e")[0]===a&&(s.checked=n.checked)})}),e(document.body).on("change",".sceneSeasonXEpisode",t=>{const n=t.currentTarget,s=e(n).val();e(n).val(s.replace(/[^0-9xX]*/g,""));const o=e(n).attr("data-for-season"),l=e(n).attr("data-for-episode");if(""===s)return void a(o,l,null,null);const r=e(n).val().match(/^(\d+)x(\d+)$/i),c=e(n).val().match(/^(\d+)$/i);let d=null,u=null,p=!1;r?(d=r[1],u=r[2],p=i(!0,e(n))):c?(d=o,u=c[1],p=i(!0,e(n))):p=i(!1,e(n)),p&&a(o,l,d,u)}),e(document.body).on("change",".sceneAbsolute",t=>{const n=t.currentTarget;e(n).val(e(n).val().replace(/[^0-9xX]*/g,""));const s=e(n).attr("data-for-absolute"),a=e(n).val().match(/^(\d{1,3})$/i);let i=null;a&&(i=a[1]),o(s,i)})},methods:{humanFileSize:l.e,...Object(o.c)({getShow:"getShow",getShows:"getShows",getEpisodes:"getEpisodes"}),statusQualityUpdate(e){const{selectedEpisodes:t,setStatus:n,setQuality:s}=this;null!==e.newQuality&&"Change quality to:"!==e.newQuality&&s(e.newQuality,t),null!==e.newStatus&&"Change status to:"!==e.newStatus&&n(e.newStatus,t)},setQuality(e,t){const{id:n,indexer:s,getEpisodes:a,show:o}=this,i={};t.forEach(t=>{i[t.slug]={quality:parseInt(e,10)}}),api.patch("series/"+o.id.slug+"/episodes",i).then(i=>{console.info("patched show ".concat(o.id.slug," with quality ").concat(e)),[...new Set(t.map(e=>e.season))].forEach(e=>{a({id:n,indexer:s,season:e})})}).catch(e=>{console.error(String(e))})},setStatus(e,t){const{id:n,indexer:s,getEpisodes:a,show:o}=this,i={};t.forEach(t=>{i[t.slug]={status:e}}),api.patch("series/"+o.id.slug+"/episodes",i).then(i=>{console.info("patched show ".concat(o.id.slug," with status ").concat(e)),[...new Set(t.map(e=>e.season))].forEach(e=>{a({id:n,indexer:s,season:e})})}).catch(e=>{console.error(String(e))}),3===e&&this.$modal.show("query-start-backlog-search",{episodes:t})},parseDateFn(e){const{layout:t,timeAgo:n}=this,{dateStyle:o,timeStyle:i}=t,{fuzzyDating:r}=t;if(!e.airDate)return"";if(r)return n.format(new Date(e.airDate));if("%x"===o)return new Date(e.airDate).toLocaleString();const c=Object(a.a)(e.airDate);return Object(s.a)(c,Object(l.d)("".concat(o," ").concat(i)))},rowStyleClassFn(e){const{getOverviewStatus:t,show:n}=this;return t(e.status,e.quality,n.config.qualities).toLowerCase().trim()},addFileSize:e=>Object(l.e)(e.episodes.reduce((e,t)=>e+(t.file.size||0),0)),searchSubtitle(e,t,n){const{id:s,indexer:a,getEpisodes:o,show:i,subtitleSearchComponents:l}=this,r=new(Vue.extend(p.a))({propsData:{show:i,season:t.season,episode:t.episode,key:t.originalIndex,lang:n},parent:this});r.$on("update",e=>{"new subtitles found"===e.reason&&o({id:s,indexer:a,season:t.season})});const c=document.createElement("div"),d=0===t.season?"table-specials":"table-seasons";this.$refs[d].$refs["row-".concat(t.originalIndex)][0].after(c),r.$mount(c),l.push(r)},reflowLayout(){console.debug("Reflowing layout"),this.$nextTick(()=>{this.movecheckboxControlsBackground()}),Object(r.a)()},movecheckboxControlsBackground(){const t=e("#checkboxControls").height()+10,n=e("#checkboxControls").offset().top-3;e("#checkboxControlsBackground").height(t),e("#checkboxControlsBackground").offset({top:n,left:0}),e("#checkboxControlsBackground").show()},setEpisodeSceneNumbering(t,n,s,a){const{$snotify:o,id:i,indexer:l,show:r}=this;r.config.scene||o.warning("To change episode scene numbering you need to enable the show option `scene` first","Warning",{timeout:0}),""===s&&(s=null),""===a&&(a=null),e.getJSON("home/setSceneNumbering",{indexername:l,seriesid:i,forSeason:t,forEpisode:n,sceneSeason:s,sceneEpisode:a},s=>{null===s.sceneSeason||null===s.sceneEpisode?e("#sceneSeasonXEpisode_"+i+"_"+t+"_"+n).val(""):e("#sceneSeasonXEpisode_"+i+"_"+t+"_"+n).val(s.sceneSeason+"x"+s.sceneEpisode),s.success||(s.errorMessage?alert(s.errorMessage):alert("Update failed."))})},setAbsoluteSceneNumbering(t,n){const{$snotify:s,id:a,indexer:o,show:i}=this;i.config.scene||s.warning("To change an anime episode scene numbering you need to enable the show option `scene` first","Warning",{timeout:0}),""===n&&(n=null),e.getJSON("home/setSceneNumbering",{indexername:o,seriesid:a,forAbsolute:t,sceneAbsolute:n},n=>{null===n.sceneAbsolute?e("#sceneAbsolute_"+a+"_"+t).val(""):e("#sceneAbsolute_"+a+"_"+t).val(n.sceneAbsolute),n.success||(n.errorMessage?alert(n.errorMessage):alert("Update failed."))})},setInputValidInvalid:(t,n)=>t?(e(n).css({"background-color":"#90EE90",color:"#FFF","font-weight":"bold"}),!0):(e(n).css({"background-color":"#FF0000",color:"#FFF !important","font-weight":"bold"}),!1),anyEpisodeNotUnaired:e=>e.episodes.filter(e=>"Unaired"!==e.status).length>0,episodesInverse(e){const{invertTable:t}=this;return e.episodes?t?e.episodes.slice().reverse():e.episodes:[]},getSceneNumbering(e){const{show:t}=this,{sceneNumbering:n,xemNumbering:s}=t;if(!t.config.scene)return{season:0,episode:0};if(0!==n.length){const t=n.filter(t=>t.source.season===e.season&&t.source.episode===e.episode);if(0!==t.length)return t[0].destination}if(0!==s.length){const t=s.filter(t=>t.source.season===e.season&&t.source.episode===e.episode);if(0!==t.length)return t[0].destination}return{season:e.scene.season||0,episode:e.scene.episode||0}},getSceneAbsoluteNumbering(e){const{show:t}=this,{sceneAbsoluteNumbering:n,xemAbsoluteNumbering:s}=t;return t.config.anime&&t.config.scene?Object.keys(n).length>0&&n[e.absoluteNumber]?n[e.absoluteNumber].sceneAbsolute:Object.keys(s).length>0&&s[e.absoluteNumber]?s[e.absoluteNumber].sceneAbsolute:e.scene.absoluteNumber:e.scene.absoluteNumber},beforeBacklogSearchModalClose(e){this.backlogSearchEpisodes=e.params.episodes},beforeFailedSearchModalClose(e){this.failedSearchEpisode=e.params.episode},retryDownload(e){const{stateSearch:t}=this;return t.general.failedDownloads.enabled&&["Snatched","Snatched (Proper)","Snatched (Best)","Downloaded"].includes(e.status)},search(e,t){const{show:n}=this;let s={};e&&(s={showSlug:n.id.slug,episodes:[],options:{}},e.forEach(e=>{s.episodes.push(e.slug),this.$refs["search-".concat(e.slug)].src="images/loading16-dark.gif"})),api.put("search/".concat(t),s).then(t=>{1===e.length?(console.info("started search for show: ".concat(n.id.slug," episode: ").concat(e[0].slug)),this.$refs["search-".concat(e[0].slug)].src="images/queued.png",this.$refs["search-".concat(e[0].slug)].disabled=!0):console.info("started a full backlog search")}).catch(t=>{console.error(String(t)),e.forEach(t=>{s.episodes.push(t.slug),this.$refs["search-".concat(e[0].slug)].src="images/no16.png"})}).finally(()=>{this.failedSearchEpisode=null,this.backlogSearchEpisodes=[]})},queueSearch(e){const{$modal:t,search:n,retryDownload:s}=this,a=e.slug;if(e){if(!0===this.$refs["search-".concat(a)].disabled)return;s(e)?t.show("query-mark-failed-and-search",{episode:e}):n([e],"backlog")}},showSubtitleButton(e){const{config:t,show:n}=this;return 0!==e.season&&t.subtitles.enabled&&n.config.subtitlesEnabled&&!["Snatched","Snatched (Proper)","Snatched (Best)","Downloaded"].includes(e.status)},totalSeasonEpisodeSize:e=>e.episodes.filter(e=>e.file&&e.file.size>0).reduce((e,t)=>e+t.file.size,0),getSeasonExceptions(e){const{show:t}=this,{allSceneExceptions:n}=t;let s={class:"display: none"},a=[],o=!1;if(t.xemNumbering.length>0){const n=t.xemNumbering.filter(t=>t.source.season===e);a=[...new Set(n.map(e=>e.destination.season))],o=Boolean(a.length)}return n.find(t=>t.season===e)&&(s={id:"xem-exception-season-".concat(o?a[0]:e),alt:o?"[xem]":"[medusa]",src:o?"images/xem.png":"images/ico/favicon-16.png",title:o?a.reduce((e,t)=>e.concat(n.find(e=>e.season===t).exceptions),[]).join(", "):n.find(t=>t.season===e).exceptions.join(", ")}),s},getCookie(e){const t=this.$cookies.get(e);return JSON.parse(t)},setCookie(e,t){return this.$cookies.set(e,JSON.stringify(t))},updateEpisodeWatched(e,t){const{id:n,indexer:s,getEpisodes:a,show:o}=this,i={};i[e.slug]={watched:t},api.patch("series/".concat(o.id.slug,"/episodes"),i).then(o=>{console.info("patched episode ".concat(e.slug," with watched set to ").concat(t)),a({id:n,indexer:s,season:e.season})}).catch(e=>{console.error(String(e))}),e.watched=t},updatePaginationPerPage(e){const{setCookie:t}=this;this.paginationPerPage=e,t("displayShow-pagination-perPage",e)},onPageChange(e){this.loadEpisodes(e.currentPage)},neededSeasons(e){const{paginationPerPage:t,show:n}=this;let s=1,a=0;const o={};for(let i=n.seasonCount.length-1;i>=0;i--){const{season:l}=n.seasonCount[i];if(0===l)break;if(s in o?o[s].push(l):o[s]=[l],a+=n.seasonCount[i].episodeCount,a/t>s&&(s++,o[s]=[l]),s>e)break}return o[e]||[]},loadEpisodes(e){const{id:t,indexer:n,getEpisodes:s}=this;(async(t,n)=>{for(const a of this.neededSeasons(e))await s({id:t,indexer:n,season:a})})(t,n)}},watch:{"show.id.slug":function(e){const{getEpisodes:t,id:n,indexer:s}=this;if(e){Object(r.c)(e,this);const{show:a}=this;a.seasons||(this.loadEpisodes(1),a.seasonCount.length>0&&0===a.seasonCount[0].season&&t({id:n,indexer:s,season:0}))}},columns:{handler:function(e){const{setCookie:t}=this;for(const n of e)n&&t("displayShow-hide-field-".concat(n.label),n.hidden)},deep:!0}}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){var s=n(131),a=n(132),o=n(133),i=n(1),l=n(3),r=n(6),c=n(30),d=n(2);const u=(...e)=>e.find(e=>!Number.isNaN(e)&&null!=e);t.a={name:"show-header",components:{AppLink:d.a,Asset:d.b,QualityPill:d.l,StateSwitch:d.p,Truncate:s.a},props:{type:{type:String,default:"show",validator:e=>["show","snatch-selection"].includes(e)},showIndexer:{type:String},showId:{type:Number},showSeason:{type:Number},showEpisode:{type:Number},manualSearchType:{type:String}},data:()=>({jumpToSeason:"jump",selectedStatus:"Change status to:",selectedQuality:"Change quality to:",overviewStatus:[{id:"wanted",checked:!0,name:"Wanted"},{id:"allowed",checked:!0,name:"Allowed"},{id:"preferred",checked:!0,name:"Preferred"},{id:"skipped",checked:!0,name:"Skipped"},{id:"snatched",checked:!0,name:"Snatched"}]}),computed:{...Object(i.e)({config:e=>e.config,layout:e=>e.layout,shows:e=>e.shows.shows,indexerConfig:e=>e.indexers.indexers,displaySpecials:e=>e.layout.show.specials,qualities:e=>e.consts.qualities.values,statuses:e=>e.consts.statuses,search:e=>e.search,configLoaded:e=>null!==e.layout.fanartBackground}),...Object(i.d)({show:"getCurrentShow",getOverviewStatus:"getOverviewStatus",getQualityPreset:"getQualityPreset",getStatus:"getStatus"}),indexer(){return this.showIndexer||this.$route.query.indexername},id(){return this.showId||Number(this.$route.query.seriesid)||void 0},season(){return u(this.showSeason,Number(this.$route.query.season))},episode(){return u(this.showEpisode,Number(this.$route.query.episode))},showIndexerUrl(){const{show:e,indexerConfig:t}=this;if(!e.indexer)return;const n=e.id[e.indexer],s=t[e.indexer].showUrl;return"".concat(s).concat(n)},activeShowQueueStatuses(){const{showQueueStatus:e}=this.show;return e?e.filter(e=>!0===e.active):[]},showGenres(){const{show:e,dedupeGenres:t}=this,{imdbInfo:n}=e,{genres:s}=n;let a=[];return s&&(a=t(s.split("|"))),a},episodeSummary(){const{getOverviewStatus:e,show:t}=this,{seasons:n}=t,s={Unaired:0,Skipped:0,Wanted:0,Snatched:0,Preferred:0,Allowed:0};return n.forEach(n=>{n.episodes.forEach(n=>{s[e(n.status,n.quality,t.config.qualities)]+=1})}),s},changeStatusOptions(){const{search:e,getStatus:t,statuses:n}=this;if(0===n.length)return[];const s=["wanted","skipped","ignored","downloaded","archived"].map(e=>t({key:e}));return e.useFailedDownloads&&s.push(t({key:"failed"})),s},combinedQualities(){const{allowed:e,preferred:t}=this.show.config.qualities;return Object(r.c)(e,t)},seasons(){const{show:e}=this;return e.seasonCount.map(e=>e.season)}},mounted(){["load","resize"].map(e=>window.addEventListener(e,()=>{this.reflowLayout()})),this.$watch("show",(function(e){if(e){const{reflowLayout:e}=this;this.$nextTick(()=>e())}}),{deep:!0})},methods:{...Object(i.c)(["setSpecials"]),combineQualities:r.c,humanFileSize:r.e,changeStatusClicked(){const{changeStatusOptions:e,changeQualityOptions:t,selectedStatus:n,selectedQuality:s}=this;this.$emit("update",{newStatus:n,newQuality:s,statusOptions:e,qualityOptions:t})},toggleSpecials(){const{setSpecials:e}=this;e(!this.displaySpecials)},reverse:e=>e?e.slice().reverse():[],dedupeGenres:e=>e?[...new Set(e.slice(0).map(e=>e.replace("-"," ")))]:[],getCountryISO2ToISO3:e=>Object(a.getLanguage)(e).iso639_2en,toggleConfigOption(e){const{show:t}=this,{config:n}=t;this.show.config[e]=!this.show.config[e];const s={config:{[e]:n[e]}};l.a.patch("series/"+t.id.slug,s).then(t=>{this.$snotify.success("".concat(s.config[e]?"enabled":"disabled"," show option ").concat(e),"Saved",{timeout:5e3})}).catch(e=>{this.$snotify.error('Error while trying to save "'+t.title+'": '+e.message||!1,"Error")})},reflowLayout(){this.$nextTick(()=>{this.moveSummaryBackground()}),Object(c.b)()},moveSummaryBackground(){const t=e("#summary");if(0===Object.keys(t).length)return;const n=t.height()+10,s=t.offset().top+5;e("#summaryBackground").height(n),e("#summaryBackground").offset({top:s,left:0}),e("#summaryBackground").show()}},watch:{jumpToSeason(e){if("jump"!==e){let t=50*(this.seasons.length-e);t=Math.max(500,Math.min(t,2e3));let n=-50;n-=window.matchMedia("(min-width: 1281px)").matches?40:0;const s="season-".concat(e);console.debug("Jumping to #".concat(s," (").concat(t,"ms)")),Object(o.scrollTo)('[name="'.concat(s,'"]'),t,{container:"body",easing:"ease-in-out",offset:n}),window.location.hash=s,this.jumpToSeason="jump"}}}}}).call(this,n(4))},function(e,t,n){var s=n(227);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("efa9da08",s,!1,{})},function(e,t,n){var s=n(229);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("4dd134cc",s,!1,{})},function(e,t,n){var s=n(241);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(12).default)("05f22efc",s,!1,{})},function(e,t,n){"use strict";(function(e){var s=n(1),a=n(6),o=n(25),i=n(21),l=n(2);t.a={name:"edit-show",components:{AnidbReleaseGroupUi:o.a,AppLink:l.a,Backstretch:i.a,ConfigTemplate:l.c,ConfigTextboxNumber:l.e,ConfigToggleSlider:l.f,FileBrowser:l.g,LanguageSelect:l.h,QualityChooser:l.k,SelectList:l.n},metaInfo(){if(!this.show||!this.show.title)return{title:"Medusa"};const{title:e}=this.show;return{title:e,titleTemplate:"%s | Medusa"}},props:{showIndexer:{type:String},showId:{type:Number}},data:()=>({saving:!1,loadError:null}),computed:{...Object(s.e)({indexers:e=>e.indexers,layout:e=>e.layout,episodeStatuses:e=>e.consts.statuses}),...Object(s.d)({show:"getCurrentShow",getStatus:"getStatus"}),indexer(){return this.showIndexer||this.$route.query.indexername},id(){return this.showId||Number(this.$route.query.seriesid)||void 0},showLoaded(){return Boolean(this.show.id.slug)},defaultEpisodeStatusOptions(){return 0===this.episodeStatuses.length?[]:["wanted","skipped","ignored"].map(e=>this.getStatus({key:e}))},availableLanguages(){return this.indexers.main.validLanguages?this.indexers.main.validLanguages.join(","):""},combinedQualities(){const{allowed:e,preferred:t}=this.show.config.qualities;return Object(a.c)(e,t)},saveButton(){return!1===this.saving?"Save Changes":"Saving..."},globalIgnored(){return this.$store.state.search.filters.ignored.map(e=>e.toLowerCase())},globalRequired(){return this.$store.state.search.filters.required.map(e=>e.toLowerCase())},effectiveIgnored(){const{globalIgnored:e}=this,t=this.show.config.release.ignoredWords.map(e=>e.toLowerCase());return this.show.config.release.ignoredWordsExclude?Object(a.a)(e,t):Object(a.b)(e.concat(t))},effectiveRequired(){const{globalRequired:e}=this,t=this.show.config.release.requiredWords.map(e=>e.toLowerCase());return this.show.config.release.requiredWordsExclude?Object(a.a)(e,t):Object(a.b)(e.concat(t))}},created(){this.loadShow()},updated(){e("#config-components").tabs()},methods:{...Object(s.c)(["getShow","setShow"]),async loadShow(e){const{$store:t,id:n,indexer:s,getShow:a}=e||this;t.commit("currentShow",{indexer:s,id:n});try{this.loadError=null,await a({indexer:s,id:n,detailed:!1})}catch(e){const{data:t}=e.response;t&&t.error?this.loadError=t.error:this.loadError=String(e)}},async saveShow(e){const{show:t,showLoaded:n}=this;if(!n)return;if(!["show","all"].includes(e))return;this.saving=!0;const s=t.config,a={config:{aliases:s.aliases,defaultEpisodeStatus:s.defaultEpisodeStatus,dvdOrder:s.dvdOrder,seasonFolders:s.seasonFolders,anime:s.anime,scene:s.scene,sports:s.sports,paused:s.paused,location:s.location,airByDate:s.airByDate,subtitlesEnabled:s.subtitlesEnabled,release:{requiredWords:s.release.requiredWords,ignoredWords:s.release.ignoredWords,requiredWordsExclude:s.release.requiredWordsExclude,ignoredWordsExclude:s.release.ignoredWordsExclude},qualities:{preferred:s.qualities.preferred,allowed:s.qualities.allowed},airdateOffset:s.airdateOffset},language:t.language};a.config.anime&&(a.config.release.blacklist=s.release.blacklist,a.config.release.whitelist=s.release.whitelist);const{indexer:o,id:i,setShow:l}=this;try{await l({indexer:o,id:i,data:a}),this.$snotify.success('You may need to "Re-scan files" or "Force Full Update".',"Saved",{timeout:5e3})}catch(e){this.$snotify.error("Error while trying to save ".concat(this.show.title,": ").concat(e.message||"Unknown"),"Error")}finally{this.saving=!1}},onChangeIgnoredWords(e){this.show.config.release.ignoredWords=e.map(e=>e.value)},onChangeRequiredWords(e){this.show.config.release.requiredWords=e.map(e=>e.value)},onChangeAliases(e){this.show.config.aliases=e.map(e=>e.value)},onChangeReleaseGroupsAnime(e){this.show.config.release.whitelist=e.whitelist,this.show.config.release.blacklist=e.blacklist},updateLanguage(e){this.show.language=e}}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){var s=n(1);t.a={name:"history",template:"#history-template",data:()=>({layoutOptions:[{value:"compact",text:"Compact"},{value:"detailed",text:"Detailed"}]}),computed:{...Object(s.e)({config:e=>e.config,stateLayout:e=>e.layout}),historyLayout:{get(){const{stateLayout:e}=this;return e.history},set(e){const{setLayout:t}=this;t({page:"history",layout:e})}}},mounted(){const t=this.$watch("stateLayout.history",()=>{t();const{historyLayout:n,config:s}=this;e("#historyTable:has(tbody tr)").tablesorter({widgets:["saveSort","zebra","filter"],sortList:[[0,1]],textExtraction:function(){if("detailed"===n)return{0:t=>e(t).find("time").attr("datetime"),1:t=>e(t).find("a").text(),4:t=>e(t).attr("quality")};const t={0:t=>e(t).find("time").attr("datetime"),1:t=>e(t).find("a").text(),2:t=>void 0===e(t).find("img").attr("title")?"":e(t).find("img").attr("title"),3:t=>e(t).text()};return s.subtitles.enabled?(t[4]=t=>void 0===e(t).find("img").attr("title")?"":e(t).find("img").attr("title"),t[5]=t=>e(t).attr("quality")):t[4]=t=>e(t).attr("quality"),t}(),headers:"detailed"===n?{0:{sorter:"realISODate"}}:{0:{sorter:"realISODate"},2:{sorter:"text"}}})});e("#history_limit").on("change",(function(){window.location.href=e("base").attr("href")+"history/?limit="+e(this).val()}))},methods:{...Object(s.c)({setLayout:"setLayout"})}}}).call(this,n(4))},function(e,t,n){"use strict";(function(e){var s=n(1),a=n(27),o=n.n(a),i=n(3),l=n(2);t.a={name:"home",template:"#home-template",components:{AppLink:l.a},data:()=>({layoutOptions:[{value:"poster",text:"Poster"},{value:"small",text:"Small Poster"},{value:"banner",text:"Banner"},{value:"simple",text:"Simple"}],postSortDirOptions:[{value:"0",text:"Descending"},{value:"1",text:"Ascending"}]}),computed:{...Object(s.e)({config:e=>e.config,stateLayout:e=>e.layout}),layout:{get(){const{stateLayout:e}=this;return e.home},set(e){const{setLayout:t}=this;t({page:"home",layout:e})}}},methods:{...Object(s.c)({setLayout:"setLayout",setConfig:"setConfig"}),initializePosterSizeSlider(){const t=t=>{let n,s,a,o;t<125?(a=3,o=4):t<175?(n=9,s=40,a=4,o=5):(n=11,s=50,a=6,o=6),e("#posterPopup").remove(),void 0===n?e(".show-details").hide():(e(".show-details").show(),e(".show-dlstats, .show-quality").css("fontSize",n),e(".show-network-image").css("width",s)),e(".show-container").css({width:t,borderWidth:o,borderRadius:a})};let n;"undefined"!=typeof Storage&&(n=parseInt(localStorage.getItem("posterSize"),10)),("number"!=typeof n||isNaN(n))&&(n=188),t(n),e("#posterSizeSlider").slider({min:75,max:250,value:n,change(n,s){"undefined"!=typeof Storage&&localStorage.setItem("posterSize",s.value),t(s.value),e(".show-grid").isotope("layout")}})}},beforeMount(){this.$nextTick(()=>{e("#showTabs").tabs()})},mounted(){const{$snotify:t,config:n,stateLayout:s,setConfig:a}=this;e(document.body).on("click",".resetsorting",()=>{e("table").trigger("filterReset")}),e(document.body).on("input","#filterShowName",o()(()=>{e(".show-grid").isotope({filter(){return e(this).attr("data-name").toLowerCase().includes(e("#filterShowName").val().toLowerCase())}})},500)),e(document.body).on("change","#postersort",(function(){e(".show-grid").isotope({sortBy:e(this).val()}),e.get(e(this).find("option[value="+e(this).val()+"]").attr("data-sort"))})),e(document.body).on("change","#postersortdirection",(function(){e(".show-grid").isotope({sortAscending:"1"===e(this).val()}),e.get(e(this).find("option[value="+e(this).val()+"]").attr("data-sort"))})),e(document.body).on("change","#showRootDir",(function(){i.a.patch("config/main",{selectedRootIndex:parseInt(e(this).val(),10)}).then(e=>{console.info(e),window.location.reload()}).catch(e=>{console.info(e)})}));const l=new LazyLoad({threshold:500});window.addEventListener("load",()=>{e("#showTabs").tabs({activate(){e(".show-grid").isotope("layout")}}),e(".progressbar").each((function(){const t=e(this).data("progress-percentage"),n=100===t?100:t>80?80:t>60?60:t>40?40:20;e(this).progressbar({value:t}),e(this).data("progress-text")&&e(this).append('
    '+e(this).data("progress-text")+"
    "),e(this).find(".ui-progressbar-value").addClass("progress-"+n)})),e("img#network").on("error",(function(){e(this).parent().text(e(this).attr("alt")),e(this).remove()})),e("#showListTableSeries:has(tbody tr), #showListTableAnime:has(tbody tr)").tablesorter({debug:!1,sortList:[[7,1],[2,0]],textExtraction:{0:t=>e(t).find("time").attr("datetime"),1:t=>e(t).find("time").attr("datetime"),3:t=>e(t).find("span").prop("title").toLowerCase(),4:t=>e(t).find("a[data-indexer-name]").attr("data-indexer-name"),5:t=>e(t).find("span").text().toLowerCase(),6:t=>e(t).find("span:first").text(),7:t=>e(t).data("show-size"),8:t=>e(t).find("img").attr("alt"),10:t=>e(t).find("img").attr("alt")},widgets:["saveSort","zebra","stickyHeaders","filter","columnSelector"],headers:{0:{sorter:"realISODate"},1:{sorter:"realISODate"},2:{sorter:"showNames"},4:{sorter:"text"},5:{sorter:"quality"},6:{sorter:"eps"},7:{sorter:"digit"},8:{filter:"parsed"},10:{filter:"parsed"}},widgetOptions:{filter_columnFilters:!0,filter_hideFilters:!0,filter_saveFilters:!0,filter_functions:{5(e,t,n){let s=!1;const a=Math.floor(t%1*1e3);if(""===n)s=!0;else{let e=n.match(/(<|<=|>=|>)\s+(\d+)/i);e&&("<"===e[1]?a="===e[1]?a>=parseInt(e[2],10)&&(s=!0):">"===e[1]&&a>parseInt(e[2],10)&&(s=!0)),e=n.match(/(\d+)\s(-|to)\s+(\d+)/i),e&&("-"!==e[2]&&"to"!==e[2]||a>=parseInt(e[1],10)&&a<=parseInt(e[3],10)&&(s=!0)),e=n.match(/(=)?\s?(\d+)\s?(=)?/i),e&&("="!==e[1]&&"="!==e[3]||parseInt(e[2],10)===a&&(s=!0)),!isNaN(parseFloat(n))&&isFinite(n)&&parseInt(n,10)===a&&(s=!0)}return s}},columnSelector_mediaquery:!1},sortStable:!0,sortAppend:[[2,0]]}).bind("sortEnd",()=>{l.handleScroll()}).bind("filterEnd",()=>{l.handleScroll()}),e(".show-grid").imagesLoaded(()=>{this.initializePosterSizeSlider(),e(".loading-spinner").hide(),e(".show-grid").show().isotope({itemSelector:".show-container",sortBy:s.posterSortby,sortAscending:s.posterSortdir,layoutMode:"masonry",masonry:{isFitWidth:!0},getSortData:{name(t){const n=e(t).attr("data-name")||"";return(s.sortArticle?n:n.replace(/^((?:The|A|An)\s)/i,"")).toLowerCase()},network:"[data-network]",date(t){const n=e(t).attr("data-date");return n.length&&parseInt(n,10)||Number.POSITIVE_INFINITY},progress(t){const n=e(t).attr("data-progress");return n.length&&parseInt(n,10)||Number.NEGATIVE_INFINITY},indexer(t){const n=e(t).attr("data-indexer");return void 0===n?Number.NEGATIVE_INFINITY:n.length&&parseInt(n,10)||Number.NEGATIVE_INFINITY}}}).on("layoutComplete arrangeComplete removeComplete",()=>{l.update(),l.handleScroll()});let t=null;e(".show-container").on("mouseenter",(function(){const n=e(this);"none"===n.find(".show-details").css("display")&&(t=setTimeout(()=>{t=null,e("#posterPopup").remove();const s=n.clone().attr({id:"posterPopup"}),a=n.offset().left,o=n.offset().top;s.css({position:"absolute",margin:0,top:o,left:a}),s.find(".show-details").show(),s.on("mouseleave",(function(){e(this).remove()})),s.css({zIndex:"9999"}),s.appendTo("body");let i=o+n.height()/2-219,l=a+n.width()/2-125;const r=e(window).scrollTop(),c=e(window).scrollLeft(),d=r+e(window).innerHeight(),u=c+e(window).innerWidth();id&&(i=d-438-5),l+250+5>u&&(l=u-250-5),s.animate({top:i,left:l,width:250,height:438})},300))})).on("mouseleave",()=>{null!==t&&clearTimeout(t)}),l.update(),l.handleScroll()}),e("#popover").popover({placement:"bottom",html:!0,content:'
    '}).on("shown.bs.popover",()=>{e.tablesorter.columnSelector.attachTo(e("#showListTableSeries"),"#popover-target"),s.animeSplitHome&&e.tablesorter.columnSelector.attachTo(e("#showListTableAnime"),"#popover-target")});const o=n.rootDirs,i=n.selectedRootIndex;if(o){const t=o.slice(1);if(t.length>=2){e("#showRoot").show();const n=["All Folders"].concat(t);e.each(n,(t,n)=>{e("#showRootDir").append(e(""))return c;if(e.isArray(c))s=c;else if("object"===e.type(l)&&c&&null===(s=c(n,i,o)))return null}return!1===s&&(s=t.getOptions(n,i,o)),t.processOptions(n,i,s)},processOptions:function(t,n,i){if(!e.isArray(i))return!1;var o,a,s,l,u,c,d=(t=e(t)[0]).config,f=null!=n&&0<=n&&n'+(y.data("placeholder")||y.attr("data-placeholder")||v.filter_placeholder.select||"")+"",b=g.$table.find("thead").find("select."+i.filter+'[data-column="'+o+'"]').val();if(void 0!==a&&""!==a||null!==(a=t.getOptionSource(r,o,l))){if(e.isArray(a)){for(u=0;u"}else""+m!="[object Object]"&&(0<=(c=d=m=(""+m).replace(n.quote,""")).indexOf(v.filter_selectSourceSeparator)&&(c=(f=d.split(v.filter_selectSourceSeparator))[0],d=f[1]),_+=""!==m?"":"");a=[]}p=(g.$filters?g.$filters:g.$table.children("thead")).find("."+i.filter),v.filter_$externalFilters&&(p=p&&p.length?p.add(v.filter_$externalFilters):v.filter_$externalFilters),(h=p.filter('select[data-column="'+o+'"]')).length&&(h[s?"html":"append"](_),e.isArray(a)||h.append(a).val(b),h.val(b))}}},buildDefault:function(e,n){var i,o,a,s=e.config,l=s.widgetOptions,u=s.columns;for(i=0;i=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(13);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(13);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(104);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){var r=n(106);e.exports=function(){return r.Date.now()}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(14))},function(e,t,n){var r=n(105),i=n(182),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},function(e,t,n){var r=n(183),i=n(186);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(107),i=n(184),o=n(185),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(107),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(188),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(14))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,l=1,u={},c=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nt?t:10,u=["img","br"],c=[],d=0,f="",p='([\\w|-]+\\s*(=\\s*"[^"]*")?\\s*)*',h=new RegExp("<\\/?\\w+\\s*"+p+"\\s*\\/\\s*>"),m=new RegExp("<\\/?\\w+\\s*"+p+"\\s*\\/?\\s*>"),g=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w\-]+@([\w][\w\-]+\.)+[a-zA-Z]{2,3})/g,v=new RegExp(""),y=new RegExp("\\W+","g"),_=!0;function b(e){var t=e.indexOf(" ");if(-1===t&&-1===(t=e.indexOf(">")))throw new Error("HTML tag is not well-formed : "+e);return e.substring(1,t)}function C(e,r){var i,o,a=t-d,s=a,l=a=t)break;if(!(_=g.exec(e))||_.index>=t){f+=e.substring(0,C(e));break}for(;_;)r=_[0],i=_.index,f+=e.substring(0,i+r.length-d),e=e.substring(i+r.length),_=g.exec(e);break}if(r=_[0],i=_.index,d+i>t){f+=e.substring(0,C(e,i));break}d+=i,f+=e.substring(0,i),"/"===r[1]?(c.pop(),a=null):(a=h.exec(r))||(o=b(r),c.push(o)),f+=a?a[0]:r,e=e.substring(i+r.length)}return e.length>t-d&&n.ellipsis&&(f+=n.ellipsis),f+=(s="",c.reverse().forEach((function(e,t){-1===u.indexOf(e)&&(s+="")})),s),n.keepImageTag||(f=function(e){var t,n,r=v.exec(e);return r?(t=r.index,n=r[0].length,e.substring(0,t)+e.substring(t+n)):e}(f)),f}},function(e,t,n){var r,i,o,a,s,l,u,c,d,f;d=n(108),e.exports={deepKeys:s=function(e){if(!u(e))throw new Error("deepKeys must be called on an object, not '"+e+"'");return d.flatten(d.map(e,(function(e,t){return u(e)&&!d.isEmpty(e)?d.map(s(e),(function(e){return t+"."+e})):[t]})))},deepClone:r=function(e){var t,n,i,o;if(null==e)return e;for(n=0,i=(o=[Date,Number,String,Boolean]).length;n