vendor: 4,123 bytes, line 1
1!function(){var t={2545:function(t,e,s){var n=s(1822)(s(7400),"DataView");t.exports=n},6586:function(t,e,s){var n=s(7753),i=s(2452),o=s(2115),r=s(8256),a=s(7426);function u(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=r,u.prototype.set=a,t.exports=u},6301:function(t,e,s){var n=s(9417),i=s(2470),o=s(6165),r=s(1873),a=s(2556);function u(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=r,u.prototype.set=a,t.exports=u},4538:function(t,e,s){var n=s(1822)(s(7400),"Map");t.exports=n},4554:function(t,e,s){var n=s(9448),i=s(7738),o=s(6575),r=s(7238),a=s(8738);function u(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=r,u.prototype.set=a,t.exports=u},4825:function(t,e,s){var n=s(1822)(s(7400),"Promise");t.exports=n},6151:function(t,e,s){var n=s(1822)(s(7400),"Set");t.exports=n},3694:function(t,e,s){var n=s(6301),i=s(7354),o=s(5863),r=s(2367),a=s(748),u=s(7569);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=r,c.prototype.has=a,c.prototype.set=u,t.exports=c},6539:function(t,e,s){var n=s(7400).Symbol;t.exports=n},9942:function(t,e,s){var n=s(7400).Uint8Array;t.exports=n},6902:function(t,e,s){var n=s(1822)(s(7400),"WeakMap");t.exports=n},9349:function(t){t.exports=function(t,e,s){switch(s.length){case 0:return t.call(e);case 1:return t.call(e,s[0]);case 2:return t.call(e,s[0],s[1]);case 3:return t.call(e,s[0],s[1],s[2])}return t.apply(e,s)}},594:function(t){t.exports=function(t,e){for(var s=-1,n=null==t?0:t.length;++s<n&&!1!==e(t[s],s,t););return t}},263:function(t){t.exports=function(t,e){for(var s=-1,n=null==t?0:t.length,i=0,o=[];++s<n;){var r=t[s];e(r,s,t)&&(o[i++]=r)}return o}},8213:function(t,e,s){var n=s(4701),i=s(2900),o=s(9785),r=s(3854),a=s(2383),u=s(8519),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var s=o(t),l=!s&&i(t),p=!s&&!l&&r(t),h=!s&&!l&&!p&&u(t),d=s||l||p||h,f=d?n(t.length,String):[],m=f.length;for(var v in t)!e&&!c.call(t,v)||d&&("length"==v||p&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||a(v,m))||f.push(v);return f}},6070:function(t){t.exports=function(t,e){for(var s=-1,n=null==t?0:t.length,i=Array(n);++s<n;)i[s]=e(t[s],s,t);return i}},7141:function(t){t.exports=function(t,e){for(var s=-1,n=e.length,i=t.length;++s<n;)t[i+s]=e[s];return t}},1928:function(t,e,s){var n=s(8799),i=s(5638),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,s){var r=t[e];o.call(t,e)&&i(r,s)&&(void 0!==s||e in t)||n(t,e,s)}},3382:function(t,e,s){var n=s(5638);t.exports=function(t,e){for(var s=t.length;s--;)if(n(t[s][0],e))return s;return-1}},1876:function(t,e,s){var n=s(5159),i=s(98);t.exports=function(t,e){return t&&n(e,i(e),t)}},5947:function(t,e,s){var n=s(5159),i=s(3893);t.exports=function(t,e){return t&&n(e,i(e),t)}},8799:function(t,e,s){var n=s(2630);t.exports=function(t,e,s){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:s,writable:!0}):t[e]=s}},699:function(t,e,s){var n=s(3694),i=s(594),o=s(1928),r=s(1876),a=s(5947),u=s(2734),c=s(7561),l=s(1102),p=s(7048),h=s(1385),d=s(9759),f=s(3533),m=s(6541),v=s(2078),b=s(7635),y=s(9785),g=s(3854),S=s(8247),w=s(1611),k=s(7614),_=s(98),T=s(3893),x="[object Arguments]",N="[object Function]",O="[object Object]",C={};C[x]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[O]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[N]=C["[object WeakMap]"]=!1,t.exp
vendor: 17,504 bytes, line 1
1orts=function t(e,s,D,$,A,B){var j,M=1&s,Y=2&s,I=4&s;if(D&&(j=A?D(e,$,A,B):D(e)),void 0!==j)return j;if(!w(e))return e;var E=y(e);if(E){if(j=m(e),!M)return c(e,j)}else{var P=f(e),z=P==N||"[object GeneratorFunction]"==P;if(g(e))return u(e,M);if(P==O||P==x||z&&!A){if(j=Y||z?{}:b(e),!M)return Y?p(e,a(j,e)):l(e,r(j,e))}else{if(!C[P])return A?e:{};j=v(e,P,M)}}B||(B=new n);var W=B.get(e);if(W)return W;B.set(e,j),k(e)?e.forEach((function(n){j.add(t(n,s,D,n,e,B))})):S(e)&&e.forEach((function(n,i){j.set(i,t(n,s,D,i,e,B))}));var V=E?void 0:(I?Y?d:h:Y?T:_)(e);return i(V||e,(function(n,i){V&&(n=e[i=n]),o(j,i,t(n,s,D,i,e,B))})),j}},158:function(t,e,s){var n=s(1611),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var s=new t;return t.prototype=void 0,s}}();t.exports=o},3545:function(t,e,s){var n=s(7141),i=s(2889);t.exports=function t(e,s,o,r,a){var u=-1,c=e.length;for(o||(o=i),a||(a=[]);++u<c;){var l=e[u];s>0&&o(l)?s>1?t(l,s-1,o,r,a):n(a,l):r||(a[a.length]=l)}return a}},9867:function(t,e,s){var n=s(6747),i=s(7948);t.exports=function(t,e){for(var s=0,o=(e=n(e,t)).length;null!=t&&s<o;)t=t[i(e[s++])];return s&&s==o?t:void 0}},1324:function(t,e,s){var n=s(7141),i=s(9785);t.exports=function(t,e,s){var o=e(t);return i(t)?o:n(o,s(t))}},9736:function(t,e,s){var n=s(6539),i=s(4840),o=s(1258),r=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?i(t):o(t)}},5829:function(t,e,s){var n=s(9736),i=s(2360);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},7657:function(t,e,s){var n=s(3533),i=s(2360);t.exports=function(t){return i(t)&&"[object Map]"==n(t)}},6729:function(t,e,s){var n=s(8338),i=s(9678),o=s(1611),r=s(6532),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,p=c.hasOwnProperty,h=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?h:a).test(r(t))}},6903:function(t,e,s){var n=s(3533),i=s(2360);t.exports=function(t){return i(t)&&"[object Set]"==n(t)}},6972:function(t,e,s){var n=s(9736),i=s(4194),o=s(2360),r={};r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!r[n(t)]}},186:function(t,e,s){var n=s(6016),i=s(962),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var s in Object(t))o.call(t,s)&&"constructor"!=s&&e.push(s);return e}},9464:function(t,e,s){var n=s(1611),i=s(6016),o=s(1586),r=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=i(t),s=[];for(var a in t)("constructor"!=a||!e&&r.call(t,a))&&s.push(a);return s}},4459:function(t,e,s){var n=s(551),i=s(2630),o=s(1137),r=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=r},5733:function(t){t.exports=function(t,e,s){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(s=s>i?i:s)<0&&(s+=i),i=e>s?0:s-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}},4701:function(t){t.exports=function(t,e){for(var s=-1,n=Array(t);++s<t;)n[s]=e(s);return n}},4282:function(t,e,s){var n=s(6539),i=s(6070),o=s(9785),r=s(5193),a=n?n.prototype:void 0,u=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(r(e))return u?u.call(e):"";var s=e+"";return"0"==s&&1/e==-1/0?"-0":s}},9334:function(t){t.exports=function(t){return function(e){return t(e)}}},830:function(t,e,s){var n=s(6747),i=s(1159),o=s(4373),r=s(7948);t.exports=function(t,e){return e=n(e,t),null==(t=o(t,e))||delete t[r(i(e))]}},6747:function(t,e,s){var n=s(9785),i=s(318),o=s(3419),r=s(5567);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:o(r(t))}},5825:function(t,e,s){var n=s(9942);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},2734:function(t,e,s){t=s.nmd(t);var n=s(7400),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,r=o&&o.exports===i?n.Buffer:void 0,a=r?r.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var s=t.length,n=a?a(s):new t.constructor(s);return t.copy(n),n}},1859:function(t,e,s){var n=s(5825);t.exports=function(t,e){var s=e?n(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.byteLength)}},9377:function(t){var e=/\w*$/;t.exports=function(t){var s=new t.constructor(t.source,e.exec(t));return s.lastIndex=t.lastIndex,s}},4116:function(t,e,s){var n=s(6539),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},3428:function(t,e,s){var n=s(5825);t.exports=function(t,e){var s=e?n(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.length)}},7561:function(t){t.exports=function(t,e){var s=-1,n=t.length;for(e||(e=Array(n));++s<n;)e[s]=t[s];return e}},5159:function(t,e,s){var n=s(1928),i=s(8799);t.exports=function(t,e,s,o){var r=!s;s||(s={});for(var a=-1,u=e.length;++a<u;){var c=e[a],l=o?o(s[c],t[c],c,s,t):void 0;void 0===l&&(l=t[c]),r?i(s,c,l):n(s,c,l)}return s}},1102:function(t,e,s){var n=s(5159),i=s(3080);t.exports=function(t,e){return n(t,i(t),e)}},7048:function(t,e,s){var n=s(5159),i=s(791);t.exports=function(t,e){return n(t,i(t),e)}},4937:function(t,e,s){var n=s(7400)["__core-js_shared__"];t.exports=n},7820:function(t,e,s){var n=s(861);t.exports=function(t){return n(t)?void 0:t}},2630:function(t,e,s){var n=s(1822),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},4288:function(t,e,s){var n=s(9754),i=s(1871),o=s(3132);t.exports=function(t){return o(i(t,void 0,n),t+"")}},9120:function(t,e,s){var n="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g;t.exports=n},1385:function(t,e,s){var n=s(1324),i=s(3080),o=s(98);t.exports=function(t){return n(t,o,i)}},9759:function(t,e,s){var n=s(1324),i=s(791),o=s(3893);t.exports=function(t){return n(t,o,i)}},5899:function(t,e,s){var n=s(4479);t.exports=function(t,e){var s=t.__data__;return n(e)?s["string"==typeof e?"string":"hash"]:s.map}},1822:function(t,e,s){var n=s(6729),i=s(5371);t.exports=function(t,e){var s=i(t,e);return n(s)?s:void 0}},2173:function(t,e,s){var n=s(8023)(Object.getPrototypeOf,Object);t.exports=n},4840:function(t,e,s){var n=s(6539),i=Object.prototype,o=i.hasOwnProperty,r=i.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),s=t[a];try{t[a]=void 0;var n=!0}catch(t){}var i=r.call(t);return n&&(e?t[a]=s:delete t[a]),i}},3080:function(t,e,s){var n=s(263),i=s(5937),o=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols,a=r?function(t){return null==t?[]:(t=Object(t),n(r(t),(function(e){return o.call(t,e)})))}:i;t.exports=a},791:function(t,e,s){var n=s(7141),i=s(2173),o=s(3080),r=s(5937),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,o(t)),t=i(t);return e}:r;t.exports=a},3533:function(t,e,s){var n=s(2545),i=s(4538),o=s(4825),r=s(6151),a=s(6902),u=s(9736),c=s(6532),l="[object Map]",p="[object Promise]",h="[object Set]",d="[object WeakMap]",f="[object DataView]",m=c(n),v=c(i),b=c(o),y=c(r),g=c(a),S=u;(n&&S(new n(new ArrayBuffer(1)))!=f||i&&S(new i)!=l||o&&S(o.resolve())!=p||r&&S(new r)!=h||a&&S(new a)!=d)&&(S=function(t){var e=u(t),s="[object Object]"==e?t.constructor:void 0,n=s?c(s):"";if(n)switch(n){case m:return f;case v:return l;case b:return p;case y:return h;case g:return d}return e}),t.exports=S},5371:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},7753:function(t,e,s){var n=s(5718);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},2452:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},2115:function(t,e,s){var n=s(5718),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var s=e[t];return"__lodash_hash_undefined__"===s?void 0:s}return i.call(e,t)?e[t]:void 0}},8256:function(t,e,s){var n=s(5718),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},7426:function(t,e,s){var n=s(5718);t.exports=function(t,e){var s=this.__data__;return this.size+=this.has(t)?0:1,s[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},6541:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t){var s=t.length,n=new t.constructor(s);return s&&"string"==typeof t[0]&&e.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},2078:function(t,e,s){var n=s(5825),i=s(1859),o=s(9377),r=s(4116),a=s(3428);t.exports=function(t,e,s){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(t,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return o(t);case"[object Symbol]":return r(t)}}},7635:function(t,e,s){var n=s(158),i=s(2173),o=s(6016);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(i(t))}},2889:function(t,e,s){var n=s(6539),i=s(2900),o=s(9785),r=n?n.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(r&&t&&t[r])}},2383:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,s){var n=typeof t;return!!(s=null==s?9007199254740991:s)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<s}},318:function(t,e,s){var n=s(9785),i=s(5193),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var s=typeof t;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=t&&!i(t))||r.test(t)||!o.test(t)||null!=e&&t in Object(e)}},4479:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},9678:function(t,e,s){var n,i=s(4937),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!o&&o in t}},6016:function(t){var e=Object.prototype;t.exports=function(t){var s=t&&t.constructor;return t===("function"==typeof s&&s.prototype||e)}},9417:function(t){t.exports=function(){this.__data__=[],this.size=0}},2470:function(t,e,s){var n=s(3382),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,s=n(e,t);return!(s<0||(s==e.length-1?e.pop():i.call(e,s,1),--this.size,0))}},6165:function(t,e,s){var n=s(3382);t.exports=function(t){var e=this.__data__,s=n(e,t);return s<0?void 0:e[s][1]}},1873:function(t,e,s){var n=s(3382);t.exports=function(t){return n(this.__data__,t)>-1}},2556:function(t,e,s){var n=s(3382);t.exports=function(t,e){var s=this.__data__,i=n(s,t);return i<0?(++this.size,s.push([t,e])):s[i][1]=e,this}},9448:function(t,e,s){var n=s(6586),i=s(6301),o=s(4538);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},7738:function(t,e,s){var n=s(5899);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},6575:function(t,e,s){var n=s(5899);t.exports=function(t){return n(this,t).get(t)}},7238:function(t,e,s){var n=s(5899);t.exports=function(t){return n(this,t).has(t)}},8738:function(t,e,s){var n=s(5899);t.exports=function(t,e){var s=n(this,t),i=s.size;return s.set(t,e),this.size+=s.size==i?0:1,this}},2941:function(t,e,s){var n=s(6651);t.exports=function(t){var e=n(t,(function(t){return 500===s.size&&s.clear(),t})),s=e.cache;return e}},5718:function(t,e,s){var n=s(1822)(Object,"create");t.exports=n},962:function(t,e,s){var n=s(8023)(Object.keys,Object);t.exports=n},1586:function(t){t.exports=function(t){var e=[];if(null!=t)for(var s in Object(t))e.push(s);return e}},8125:function(t,e,s){t=s.nmd(t);var n=s(9120),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,r=o&&o.exports===i&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||r&&r.binding&&r.binding("util")}catch(t){}}();t.exports=a},1258:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},8023:function(t){t.exports=function(t,e){return function(s){return t(e(s))}}},1871:function(t,e,s){var n=s(9349),i=Math.max;t.exports=function(t,e,s){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,r=-1,a=i(o.length-e,0),u=Array(a);++r<a;)u[r]=o[e+r];r=-1;for(var c=Array(e+1);++r<e;)c[r]=o[r];return c[e]=s(u),n(t,this,c)}}},4373:function(t,e,s){var n=s(9867),i=s(5733);t.exports=function(t,e){return e.length<2?t:n(t,i(e,0,-1))}},7400:function(t,e,s){var n=s(9120),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},3132:function(t,e,s){var n=s(4459),i=s(9591)(n);t.exports=i},9591:function(t){var e=Date.now;t.exports=function(t){var s=0,n=0;return function(){var i=e(),o=16-(i-n);if(n=i,o>0){if(++s>=800)return arguments[0]}else s=0;return t.apply(void 0,arguments)}}},7354:function(t,e,s){var n=s(6301);t.exports=function(){this.__data__=new n,this.size=0}},5863:function(t){t.exports=function(t){var e=this.__data__,s=e.delete(t);return this.size=e.size,s}},2367:function(t){t.exports=function(t){return this.__data__.get(t)}},748:function(t){t.exports=function(t){return this.__data__.has(t)}},7569:function(t,e,s){var n=s(6301),i=s(4538),o=s(4554);t.exports=function(t,e){var s=this.__data__;if(s instanceof n){var r=s.__data__;if(!i||r.length<199)return r.push([t,e]),this.size=++s.size,this;s=this.__data__=new o(r)}return s.set(t,e),this.size=s.size,this}},3419:function(t,e,s){var n=s(2941),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,r=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,s,n,i){e.push(n?i.replace(o,"$1"):s||t)})),e}));t.exports=r},7948:function(t,e,s){var n=s(5193);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},6532:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},551:function(t){t.exports=function(t){return function(){return t}}},5638:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},9754:function(t,e,s){var n=s(3545);t.exports=function(t){return null!=t&&t.length?n(t,1):[]}},9729:function(t,e,s){var n=s(9867);t.exports=function(t,e,s){var i=null==t?void 0:n(t,e);return void 0===i?s:i}},1137:function(t){t.exports=function(t){return t}},2900:function(t,e,s){var n=s(5829),i=s(2360),o=Object.prototype,r=o.hasOwnProperty,a=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&r.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},9785:function(t){var e=Array.isArray;t.exports=e},68:function(t,e,s){var n=s(8338),i=s(4194);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},3854:function(t,e,s){t=s.nmd(t);var n=s(7400),i=s(7714),o=e&&!e.nodeType&&e,r=o&&t&&!t.nodeType&&t,a=r&&r.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u},8338:function(t,e,s){var n=s(9736),i=s(1611);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},4194:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},8247:function(t,e,s){var n=s(7657),i=s(9334),o=s(8125),r=o&&o.isMap,a=r?i(r):n;t.exports=a},1611:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},2360:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},861:function(t,e,s){var n=s(9736),i=s(2173),o=s(2360),r=Function.prototype,a=Object.prototype,u=r.toString,c=a.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var s=c.call(e,"constructor")&&e.constructor;return"function"==typeof s&&s instanceof s&&u.call(s)==l}},7614:function(t,e,s){var n=s(6903),i=s(9334),o=s(8125),r=o&&o.isSet,a=r?i(r):n;t.exports=a},5193:function(t,e,s){var n=s(9736),i=s(2360);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==n(t)}},8519:function(t,e,s){var n=s(6972),i=s(9334),o=s(8125),r=o&&o.isTypedArray,a=r?i(r):n;t.exports=a},98:function(t,e,s){var n=s(8213),i=s(186),o=s(68);t.exports=function(t){return o(t)?n(t):i(t)}},3893:function(t,e,s){var n=s(8213),i=s(9464),o=s(68);t.exports=function(t){return o(t)?n(t,!0):i(t)}},1159:function(t){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},6651:function(t,e,s){var n=s(4554);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var s=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=s.cache;if(o.has(i))return o.get(i);var r=t.apply(this,n);return s.cache=o.set(i,r)||o,r};return s.cache=new(i.Cache||n),s}
1i.Cache=n,t.exports=i},8159:function(t,e,s){var n=s(6070),i=s(699),o=s(830),r=s(6747),a=s(5159),u=s(7820),c=s(4288),l=s(9759),p=c((function(t,e){var s={};if(null==t)return s;var c=!1;e=n(e,(function(e){return e=r(e,t),c||(c=e.length>1),e})),a(t,l(t),s),c&&(s=i(s,7,u));for(var p=e.length;p--;)o(s,e[p]);return s}));t.exports=p},5937:function(t){t.exports=function(){return[]}},7714:function(t){t.exports=function(){return!1}},5567:function(t,e,s){var n=s(4282);t.exports=function(t){return null==t?"":n(t)}}},e={};function s(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n](o,o.exports,s),o.loaded=!0,o.exports}s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,{a:e}),e},s.d=function(t,e){for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){"use strict";var t=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"taskbar-wrapper",class:t.taskbarWrapper,attrs:{id:t.mountId}},[s("div",{staticClass:"taskbar-left-wrapper"},[s("show-all-button",{ref:"showall-button",attrs:{"syno-id":"taskbar-show-all-button"}}),t._v(" "),s("start-button",{ref:"start-button",attrs:{"syno-id":"taskbar-start-button","unread-num":t.newAppsNum}})],1),t._v(" "),s("taskbar-buttons-container",{attrs:{"is-preview-enabled":t.isPreviewEnabled}}),t._v(" "),s("tray-container",{directives:[{name:"show",rawName:"v-show",value:t.showTrayContainer,expression:"showTrayContainer"}],ref:"tray-container"}),t._v(" "),t.masked?s("div",{staticClass:"taskbar-mask"}):t._e()],1)};t._withStripped=!0;var e=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$i18n("helptoc","mainmenu"),expression:"$i18n('helptoc', 'mainmenu')"}],staticClass:"start-button",class:t.startButtonClass,attrs:{"syno-id":t.synoId,"aria-label":t.$i18n("helptoc","mainmenu")},on:{click:function(e){return t.$emit("click",e)}}},[s("button",{ref:"dot-anchor",staticClass:"start-button-img"},[s("transition",{attrs:{name:"bounce"}},[t.unreadNum>0?s("badge",{key:t.unreadNum}):t._e()],1)],1)])};e._withStripped=!0;var n=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"tray-notify-badge"})};function i(t,e,s,n,i,o,r,a){var u,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=s,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),r?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=u):i&&(u=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,u):[u]}return{exports:t,options:c}}n._withStripped=!0;var o=i({},n,[],!1,null,null,null);o.options.__file="src/components/tray/badge.vue";var r=o.exports,a=i({components:{Badge:r},props:{unreadNum:{type:Number,default:0}},data(){return{pressed:!1}},computed:{startButtonClass(){return{pressed:this.pressed}}},methods:{getDotAnchor(){return this.$refs["dot-anchor"]},toggle(t){this.pressed=t},focus(){this.getDotAnchor()&&this.getDotAnchor().focus()}}},e,[],!1,null,null,null);a.options.__file="src/components/button/start-button.vue";var u=a.exports,c=function(){var t=this,e=t.$createElement;return(t._self._c||e)("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.desc,expression:"desc"}],staticClass:"show-all-button",attrs:{"syno-id":t.synoId,"aria-label":t.desc},on:{click:function(e){return t.$emit("click",e)}}})};c._withStripped=!0;var l=i({data(){return{desc:this.$i18n("desktop","show_desktop")}},methods:{focus(){this.$el&&this.$el.focus()}}},c,[],!1,null,null,null);
1l.options.__file="src/components/button/show-all-button.vue";var p=l.exports,h=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"taskbar-button-wrapper",class:t.taskbarCls,attrs:{id:"sds-taskbar-button-"+t.button.id,"syno-id":t.button.appName||t.button.id},on:{click:t.onClick,contextmenu:t.onContextMenu}},[s("div",{staticClass:"taskbar-button",style:t.buttonStyle},[t.showMenu?s("v-portal",{attrs:{"mount-to":"body","target-style":t.menuStyle}},[s("v-menu",{directives:[{name:"clickoutside",rawName:"v-clickoutside.children",value:function(){return t.showMenu=!1},expression:"() => showMenu = false",modifiers:{children:!0}}],ref:"menu",attrs:{"syno-id":"button-taskbar-button-menu-0",width:"auto"},on:{"menu-close":function(e){t.showMenu=!1}}},[t.button.actionsVisible.pin?s("v-menu-item",{attrs:{"syno-id":"button-taskbar-button-menu-item-0",disabled:!t.button.actionsEnable.pin},on:{click:t.onTogglePinned}},[t._v(t._s(t.pinnedText))]):t._e(),t._v(" "),t.button.actionsVisible.maximize?s("v-menu-item",{attrs:{"syno-id":"button-taskbar-button-menu-item-1",disabled:!t.button.actionsEnable.maximize},on:{click:t.onClickMaximize}},[t._v(t._s(t.$i18n("desktop","maximize")))]):t._e(),t._v(" "),t.button.actionsVisible.minimize?s("v-menu-item",{attrs:{"syno-id":"button-taskbar-button-menu-item-2",disabled:!t.button.actionsEnable.minimize},on:{click:t.onClickMinimize}},[t._v(t._s(t.$i18n("desktop","minimize")))]):t._e(),t._v(" "),t.button.actionsVisible.restore?s("v-menu-item",{attrs:{"syno-id":"button-taskbar-button-menu-item-3",disabled:!t.button.actionsEnable.restore},on:{click:t.onClickRestore}},[t._v(t._s(t.$i18n("desktop","restore")))]):t._e(),t._v(" "),t.button.actionsVisible.close?s("v-menu-item",{attrs:{"syno-id":"button-taskbar-button-menu-item-4",disabled:!t.button.actionsEnable.close},on:{click:t.onClickClose}},[t._v(t._s(t.$i18n("common","close")))]):t._e()],1)],1):t._e()],1)])};h._withStripped=!0;var d=i({props:{button:{type:Object,default:()=>({})}},data(){return{showMenu:!1,menuX:0,menuY:0}},watch:{"button.state"(t){}},computed:{menuStyle(){return{left:`${this.menuX}px`,top:`${this.menuY}px`}},taskbarCls(){switch(this.button.state){case"normal":default:return this.button.state;case"loading":return["launched","loading"];case"active":return["launched","active"];case"deactive":return["launched","deactive"]}},buttonStyle(){return{"background-image":`url(${this.getTaskbarIcon()||""})`}},pinnedText(){return this.button.pinned?this.$i18n("desktop","taskbar_unpin"):this.$i18n("desktop","taskbar_pin")}},methods:{onTogglePinned(){this.button.pinned?this.button.setPinned(!1):this.button.setPinned(!0)},onClickClose(){this.button.closeWindow()},onClickRestore(){this.button.restore()},onClickMinimize(){this.button.minimize()},onClickMaximize(){this.button.maximize()},onClick(){this.button.onClick()},onContextMenu(t){this.showMenu=!0,this.menuX=t.pageX,this.menuY=t.pageY},getTaskbarIcon(){const t=this.button.jsConfig,e=t.jsBaseURL+"/"+(t.icon||t.icon_16);let s=SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(e,"Taskbar");return t.version&&(s=`${s}&app_version=${t.version}`),s}}},h,[],!1,null,null,null);d.options.__file="src/components/button/taskbar-button.vue";var f=d.exports,m=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"container",staticClass:"taskbar-buttons-container",attrs:{tabindex:"0","aria-activedescendant":t.activeDescendant},on:{keydown:t.onKeyDown}},[s("transition",{attrs:{name:"fade"}},[s("div",{directives:[{name:"show",rawName:"v-show",value:t.visibleTaskButtons.length>0,expression:"visibleTaskButtons.length > 0"}],ref:"wrapper",staticClass:"taskbar-buttons-wrapper",class:t.wrapperClass},[s("transition-group",{attrs:{name:"fade"}},t._l(t.visibleTaskButtons,(function(e,n){return s("taskbar-button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.getTooltip(e),expression:"getTooltip(button)"}],key:e.id,ref:"button",refInFor:!0,class:t.getTaskButtonsClass(n),attrs:{button:e,"aria-label":t.getTooltip(e)},nativeOn:{mouseover:function(s){return t.onTaskButtonMouseOver(n,e)},mouseout:function(e){return t.onTaskButtonMouseOut(n)}}})})),1),t._v(" "),t.isOverflow?s("overflow-button",{attrs:{buttons:t.overflowButtons}}):t._e()],1)]),t._v(" "),-1!==t.hoverIndex?s("v-portal",{attrs:{"mount-to":"#sds-desktop","target-style":t.previewBoxStyle}},[s("transition",{attrs:{name:"fade",mode:"out-in",appear:""}},[s("preview-box",{ref:"preview-box",attrs:{button:t.visibleTaskButtons[t.hoverIndex]}})],1)],1):t._e()],1)};m._withStripped=!0;var v=Vuex,b=s.n(v),y=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"button",staticClass:"overflow-menu-button-wrapper",class:t.wrapperClass,on:{click:t.onClick}},[s("button",{staticClass:"overflow-menu-button",attrs:{tabindex:0}}),t._v(" "),t.showMenu?s("v-portal",{attrs:{"mount-to":"#sds-desktop","target-style":t.menuStyle}},[s("v-menu",{ref:"menu",staticClass:"overflow-menu",attrs:{"syno-id":"button-overflow-button-menu-0",width:"auto"},on:{"menu-close":function(e){t.showMenu=!1}}},[t._l(t.buttons,(function(e,n){return[s("v-menu-item",{key:"menu-"+n,attrs:{"syno-id":"button-overflow-button-menu-item-0"},on:{click:function(s){return t.onMenuItemClick(e)}}},[s("img",{staticClass:"taskbar-icon",attrs:{src:t.getTaskbarIcon(e)}}),t._v(" "),s("span",{staticClass:"taskbar-title"},[t._v(t._s(e.getWindowTitle()))])]),t._v(" "),n!==t.buttons.length-1?s("v-menu-divider",{key:"divider-"+n,attrs:{"syno-id":"button-overflow-button-menu-divider-0"}}):t._e()]}))],2)],1):t._e()],1)};y._withStripped=!0;var g=i({props:{buttons:{type:Array,default:()=>[]}},data(){return{showMenu:!1,menuPos:[0,0]}},watch:{async showMenu(t){if(t){await this.$nextTick();const[t,e]=this.$alignManager.getAlignToXY(this.$refs.menu.$el,this.$refs.button,"t->b",[0,0]);this.menuPos=[t,e]}}},computed:{menuStyle(){return{left:`${this.menuPos[0]}px`,top:`${this.menuPos[1]}px`}},wrapperClass(){return{pressed:this.showMenu}}},methods:{getTaskbarIcon(t){const e=t.jsConfig,s=e.jsBaseURL+"/"+(e.icon||e.icon_16);let n=SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(s,"Taskbar");return e.version&&(n=`${n}&app_version=${e.version}`),n},onClick(){this.showMenu=!this.showMenu},onMenuItemClick(t){t.onClick()}}},y,[],!1,null,null,null);g.options.__file="src/components/button/overflow-button.vue";var S=g.exports,w=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"preview-box-wrapper"},[s("div",{staticClass:"preview-desc"},[t._v(t._s(t.button.getWindowTitle()))]),t._v(" "),s("div",{staticClass:"preview-box"}
1,[s("div",{ref:"anchor",staticClass:"preview-anchor"}),t._v(" "),s("div",{staticClass:"preview-mask"})]),t._v(" "),s("div",{staticClass:"preview-arrow"})])};w._withStripped=!0;var k=window["syno-vue-components"];const _=k.element.css,T=k.element.addClass;var x=i({props:{button:{type:Object,default:()=>({})}},mounted(){this.addClonedEl()},methods:{addClonedEl(){let t=0;const e=this.button.genPreviewNode();e.removeAttribute("id"),_(e,"display","block"),_(e,"visibility","hidden"),this.$refs.anchor.appendChild(e);const{clientWidth:s,clientHeight:n}=e;let i=160/s;return n*i>100&&(i=100/n,t=(160-s*i)/2),i=Math.min(i,1),T(e,"preview-box-win-clone"),_(e,"transform",`scale(${i})`),_(e,"left",`${t}px`),_(e,"top","0px"),_(e,"z-index","-1"),_(e,"visibility","visible"),e}}},w,[],!1,null,null,null);x.options.__file="src/components/preview-box.vue";var N=x.exports;const O=44;var C=i({components:{TaskbarButton:f,OverflowButton:S,PreviewBox:N},props:{isPreviewEnabled:{type:Boolean,default:!1}},data(){return{overflowIndex:-1,showPreviewBox:!1,previewPos:[0,0],hoverIndex:-1,activeTaskButtonIdx:0}},watch:{async hoverIndex(t){if(-1!==t){await this.$nextTick();const[e,s]=this.$alignManager.getAlignToXY(this.$refs["preview-box"].$el,this.$refs.button[t].$el,"t->b",[0,14]);this.previewPos=[e,s]}}},computed:{...(0,v.mapState)(["taskButtons"]),activeDescendant(){if(this.visibleTaskButtons.length>0){const t=Math.min(Math.max(this.activeTaskButtonIdx,0),this.visibleTaskButtons.length-1);return`sds-taskbar-button-${this.visibleTaskButtons[t].id}`}return""},visibleTaskButtons(){return-1===this.overflowIndex?this.taskButtons:this.taskButtons.slice(0,this.overflowIndex)},overflowButtons(){return this.taskButtons.slice(this.overflowIndex)},isOverflow(){return-1!==this.overflowIndex},wrapperClass(){return{overflow:this.isOverflow}},previewBoxStyle(){return{left:`${this.previewPos[0]}px`,top:`${this.previewPos[1]}px`}}},mounted(){this.fetchPinnedTaskButtons(),this.$nextTick((()=>{this.createResizeObserver()}))},methods:{...(0,v.mapActions)(["fetchPinnedTaskButtons"]),getTooltip(t){return("normal"===t.state||!this.isPreviewEnabled)&&t.getWindowTitle()},getTaskButtonsClass(t){return{last:t===this.visibleTaskButtons.length-1,first:0===t}},createResizeObserver(){this.$options.resizeObserver=new ResizeObserver(this.onResize.bind(this)),this.$options.resizeObserver.observe(this.$refs.container),this.$options.resizeObserver.observe(this.$refs.wrapper)},handleOverflow(){const{clientWidth:t}=this.$refs.container;let e=this.taskButtons.length*O-t,s=Math.ceil(e/O),n=this.taskButtons.length-s;e=t-n*O,e<40&&(s++,e+=O),e>84&&(s--,e-=O),n=this.taskButtons.length-s,this.overflowIndex=n},handleResize(){const{clientWidth:t}=this.$refs.container;t<this.taskButtons.length*O?this.handleOverflow():this.overflowIndex=-1},onResize(t){for(const e of t)if(e.target===this.$refs.container||e.target===this.$refs.wrapper)return void this.handleResize()},onTaskButtonMouseOver(t,e){this.$options.hoverTimer&&clearTimeout(this.$options.hoverTimer),this.$options.hoverTimer=window.setTimeout((()=>{e.isReady()&&this.isPreviewEnabled?this.hoverIndex=t:this.hoverIndex=-1}),300)},onTaskButtonMouseOut(t){this.$options.hoverTimer&&clearTimeout(this.$options.hoverTimer),this.hoverIndex=-1},onKeyDown(t){const e=t.code||t.which||t.keyCode,s=this.visibleTaskButtons.length;switch(e){case"ArrowUp":case"ArrowLeft":this.activeTaskButtonIdx=(this.activeTaskButtonIdx-1+s)%s;break;case"ArrowDown":case"ArrowRight":this.activeTaskButtonIdx=(this.activeTaskButtonIdx+1)%s;break;case"Enter":case"Space":this.$refs.button[this.activeTaskButtonIdx].onClick(t)}}}},m,[],!1,null,null,null);C.options.__file="src/components/taskbar-buttons-container.vue";var D=C.exports,$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"tray-container",class:t.containerClass},[t.hasVisibleWidgets?[t._l(t.getVisibleWidgets,(function(t){return s("widget-tray-item",{key:t.id,attrs:{button:t}})})),t._v(" "),s("div",{staticClass:"split",class:t.widgetSplitClass})]:t._e(),t._v(" "),t.hasVisibleTrayButtons?[t._l(t.getVisibleTrayButtons,(function(t){return s("tray-item",{key:t.id,ref:"tray-buttons",refInFor:!0,attrs:{type:"tray",button:t}})})),t._v(" "),s("div",{staticClass:"split"})]:t._e(),t._v(" "),s("span",{ref:"system-tray-wrapper",staticClass:"system-tray-wrapper",attrs:{tabindex:"0","aria-activedescendant":"sds-taskbar-tray-item-"+t.systemTrayButtons[t.systemActiveIdx].id,role:"listbox"},on:{keydown:t.onSystemKeyPress}},t._l(t.getVisibleSystemTrayButtons,(function(e){return s("tray-item",{key:e.id,ref:"system-buttons",refInFor:!0,attrs:{type:"system",button:e},on:{click:function(s){return t.onClick(s,e)}}})})),1)],2)};$._withStripped=!0;var A=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"widget-tray-item"}
1,[e("div",{ref:"anchor",staticClass:"render-anchor"})])};A._withStripped=!0;var B=i({props:{button:{type:Object,default:()=>({})}},async mounted(){await this.$nextTick(),this.button.render(this.$refs.anchor)}},A,[],!1,null,null,null);B.options.__file="src/components/tray/widget-tray-item.vue";var j=B.exports,M=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.getTip,expression:"getTip"}],staticClass:"tray-item",class:t.buttonCls,attrs:{role:"button","aria-label":t.getTip,"aria-disabled":t.button.disabled,"syno-id":t.button.id,id:"sds-taskbar-tray-item-"+t.button.id,tabindex:"-1"},on:{click:function(e){return t.onClick(e)}}},[s("transition",{attrs:{name:"bounce"}},[t.hasBadge?s("badge",{key:t.button.getUnreadNum()}):t._e()],1),t._v(" "),s("div",{ref:"dot-anchor"})],1)};M._withStripped=!0;var Y=i({components:{Badge:r},props:{type:{type:String,default:"system"},button:{type:Object,default:()=>({})},tip:{type:[String,Boolean],default:!1}},computed:{getTip(){return this.tip?this.tip:this.button.tip},buttonCls(){return[this.button.iconClass,{pressed:this.button.pressed,disabled:this.button.disabled},this.type]},hasBadge(){return this.button.getUnreadNum()>0}},async mounted(){this.button.instance=this,await this.$nextTick(),this.button.setEl(this.$el)},beforeDestroy(){this.button.setEl(null),this.button.instance=null},methods:{clearUnreadNumber(){this.button.setUnreadNum(0)},updateUnreadNumber(t){this.button.setUnreadNum(t)},onClick(t){this.button.disabled||(this.$emit("click"),this.button.click&&this.button.click(t))},getDotAnchor(){return this.$refs["dot-anchor"]}}},M,[],!1,null,null,null);Y.options.__file="src/components/tray/tray-item.vue";var I=i({components:{WidgetTrayItem:j,TrayItem:Y.exports},data(){return{systemActiveIdx:0}},computed:{...(0,v.mapGetters)(["getVisibleSystemTrayButtons","getVisibleTrayButtons","hasVisibleTrayButtons","getVisibleWidgets","hasVisibleWidgets","findSystemTrayButtons"]),...(0,v.mapState)(["trayButtons","systemTrayButtons","widgetButtons"]),containerClass(){return{"has-tray":this.hasVisibleTrayButtons||this.hasVisibleWidgets}},widgetSplitClass(){return{"has-right-tray":this.hasVisibleTrayButtons}},searchTip(){return SYNO.SDS.StatusNotifier.isAppEnabled("SYNO.Finder.Application")?this.$i18n("common","search_now_placeholder"):this.$i18n("user","search_user")}},mounted(){this.updateWidgetButtonVisible()},methods:{updateWidgetButtonVisible(){this.findSystemTrayButtons("widget").setVisible(_S("is_admin"))},onClick(t,e){switch(e.id){case"user":return this.onClickUser(t,e);case"widget":return this.onClickWidget(e);case"search":return this.onClickSearch(e);case"notify":return this.onClickNotify(e)}},onClickUser(t,e){},onClickWidget(t){},onClickNotify(t){},onClickSearch(t){},onSystemKeyPress(t){const e=t.code||t.which||t.keyCode,s=this.systemTrayButtons.length;let n=null;switch(e){case"ArrowUp":case"ArrowLeft":this.systemActiveIdx=(this.systemActiveIdx-1+s)%s;break;case"ArrowDown":case"ArrowRight":this.systemActiveIdx=(this.systemActiveIdx+1)%s;break;case"Enter":case"Space":n=this.$refs["system-buttons"][this.systemActiveIdx],n&&n.onClick(t,n)}},focusSystemTray(){this.$refs["system-tray-wrapper"]&&this.$refs["system-tray-wrapper"].focus()}}},$,[],!1,null,null,null);I.options.__file="src/components/tray-container.vue";var E=I.exports;const P="hidden",z="normal",W="deactive";var V=i({name:"TaskBar",components:{StartButton:u,ShowAllButton:p,TaskbarButtonsContainer:D,TrayContainer:E},props:{mountId:{type:String,default:"sds-taskbar"}},data(){return{state:z,bringBack:!1,masked:!1,hasGrayOverlay:!1,isPreviewEnabled:!!SYNO.SDS.UIFeatures.test("previewBox")&&!1!==SYNO.SDS.UserSettings.getProperty("Desktop","enableTaskbarThumbnail"),showTrayContainer:!0,newAppsNum:0}},mounted(){SYNO.SDS.StatusNotifier.on("windowBeforeMaximize",this.onWindowMaximize,this),SYNO.SDS.StatusNotifier.on("windowRestore",this.onWindowRestore,this),SYNO.SDS.StatusNotifier.on("windowMinimize",this.onWindowMinimize,this),SYNO.SDS.StatusNotifier.on("windowActivate",this.onWindowActivate,this),SYNO.SDS.StatusNotifier.on("windowClose",this.onWindowClose,this)},beforeDestroy(){SYNO.SDS.StatusNotifier.un("windowBeforeMaximize",this.onWindowMaximize),SYNO.SDS.StatusNotifier.un("windowRestore",this.onWindowRestore),SYNO.SDS.StatusNotifier.un("windowMinimize",this.onWindowMinimize),SYNO.SDS.StatusNotifier.un("windowActivate",this.onWindowActivate),SYNO.SDS.StatusNotifier.un("windowClose",this.onWindowClose)}
1,computed:{...(0,v.mapGetters)(["findSystemTrayButtons"]),taskbarWrapper(){return{hidden:this.isHidden,"bring-back":this.bringBack,"gray-overlay":this.hasGrayOverlay}},isHidden(){return this.state===P||this.state===W}},methods:{...(0,v.mapActions)(["addTaskButton","addTray","addWidget"]),...(0,v.mapMutations)(["ADD_TASK_BUTTON"]),getStartButton(){return this.$refs["start-button"]},getShowAllButton(){return this.$refs["showall-button"]},getTrayContainerEl(){return this.$refs["tray-container"].$el},toggleTrayContainer(t){this.showTrayContainer=t},focusTrayContainer(){return this.$refs["tray-container"].focusSystemTray()},height(){return this.state===P?0:this.$el?this.$options.cacheHeight?this.$options.cacheHeight:this.$options.cacheHeight=this.$el.clientHeight:0},getHeight(){return this.height()},deactivate(){this.state=W,this.bringBack=!0},activate(){this.state=z,this.bringBack=!1},hide(){this.state=P,this.bringBack=!0},show(){this.state=z,this.bringBack=!1},bringToBack(){this.bringBack=!0},bringToFront(){this.bringBack=!1},mask(){this.masked=!0},unmask(){this.masked=!1},enablePreviewBox(){this.isPreviewEnabled=!0},disablePreviewBox(){this.isPreviewEnabled=!1},toggleGrayOverlay(t,e){const s=SYNO.SDS.WindowMgr.getMaximizeAppWindowCount(e);t?this.hasGrayOverlay=!0:s<=0&&(this.hasGrayOverlay=!1)},onWindowMaximize(t){t&&t.toggleGrayOverlay&&this.toggleGrayOverlay(!0,t)},onWindowRestore(t){t&&t.toggleGrayOverlay&&this.toggleGrayOverlay(!1,t)},onWindowMinimize(t){t&&t.toggleGrayOverlay&&this.toggleGrayOverlay(!1,t)},onWindowActivate(t){t&&t.toggleGrayOverlay&&t.maximized&&this.toggleGrayOverlay(!0,t)},onWindowClose(t){t&&t.toggleGrayOverlay&&this.toggleGrayOverlay(!1,t)},getSearchBox(){const t=this.$store.state.systemTrayButtons.find((t=>"search"===t.id));return t?t.trayComp:null},updateStartBadge(){const t=SYNO.SDS.UserSettings.getProperty("Desktop","new_app_list")||[];this.newAppsNum=t.length}}},t,[],!1,null,null,null);V.options.__file="src/App.vue";var U=V.exports;function G(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}function R({appName:t,windowName:e}={}){return(SYNO.SDS.UserSettings.getProperty("taskbar","pined")||[]).find((s=>t===s.appName&&e===s.windowName))}function F(t){return SYNO.SDS.StatusNotifier.isAppEnabled(t.appName)}class L{constructor({appName:t,windowName:e,id:s,params:n={},store:i}={}){if(SYNO.SDS.Packages.isPackage(t)){const e=SYNO.SDS.Packages.getPkgId(t);SYNO.SDS.Packages.registerPackageStatusChange(this.onPackageStatusChange,this,e)}this.appName=t,this.windowName=e,this.id=s||G();const o=SYNO.SDS.Config.FnMap[this.appName||this.windowName];this.jsConfig=Object.freeze(Object.assign({},o.config)),this.store=i,this.appWindow=null,this.state="normal",this.actionState="",this.pinned=!1,this.actionsEnable={pin:!0,minimize:!0,maximize:!0,restore:!0,close:!0},this.actionsVisible={pin:!1,minimize:!1,maximize:!1,restore:!1,close:!1},Object.assign(this,n),this.updateActionVisible()}onPackageStatusChange(){F(this)||this.destroy()}isSame({appName:t,windowName:e,state:s}){return t&&t===this.appName&&e&&e===this.windowName&&s&&s===this.state}setState(t){this.state=t,this.updateActionVisible()}isReady(){return"normal"!==this.state&&"loading"!==this.state}getWindowTitle(){if(this.appWindow){var t,e,s,n;const i=(null===(t=(e=this.appWindow).getPreviewTitle)||void 0===t?void 0:t.call(e))??(null===(s=(n=this.appWindow).getTitle)||void 0===s?void 0:s.call(n));return this.appWindow._isVue?SYNO.SDS.UIString.GetLocalizedString(i,this.appWindow.$options.jsConfig.jsID):SYNO.SDS.UIString.GetLocalizedString(i,this.appWindow.jsConfig.jsID)}return SYNO.SDS.UIString.GetLocalizedString(this.jsConfig.title,this.jsConfig.jsID)}updateActionState(t){switch(this.actionState=t,t){case"maximize":this.actionsEnable.restore=!0,this.actionsEnable.minimize=!0,this.actionsEnable.maximize=!1;break;case"minimize":this.actionsEnable.restore=!0,this.actionsEnable.minimize=!1,this.actionsEnable.maximize=!1;break;case"restore":this.actionsEnable.restore=!0,this.actionsEnable.minimize=!0,this.actionsEnable.maximize=!this.appWindow.maximized;break;case"mask":this.actionsEnable.maximize=!1,this.actionsEnable.restore=!1;break;case"unmask":this.actionsEnable.maximize=!this.appWindow.maximized,this.actionsEnable.restore=!!this.appWindow.maximized}}updateActionVisible(){var t,e,s,n;this.isLaunch()?(this.actionsVisible.pin=this.pinned||!1!==(null===(t=this.appWindow)||void 0===t?void 0:t.pinable)&&!R({appName:this.appName,windowName:this.windowName}),this.actionsVisible.minimize=null===(e=this.appWindow)||void 0===e?void 0:e.minimizable,this.actionsVisible.maximize=null===(s=this.appWindow)||void 0===s?void 0:s.maximizable,this.actionsVisible.restore=null===(n=this.appWindow)||void 0===n?void 0:n.maximizable,this.actionsVisible.close=!0):(this.actionsVisible.pin=this.pinned,this.actionsVisible.minimize=!1,this.actionsVisible.maximize=!1,this.actionsVisible.restore=!1,this.actionsVisible.close=!1)}isLaunch(){return"loading"===this.state||"active"===this.state||"deactive"===this.state}isPin(){return this.pinned}setPinned(t){this.pinned=t,this.pinned?this.store.dispatch("addPinnedTaskButton",{button:this}):(this.store.dispatch("removePinnedTaskButton",{button:this}),"normal"===this.state&&this.destroy())}updatePinnedState(){}resetToPinnedState(){this.appWindow=null,this.state="normal",this.actionState="",this.pinned=!0,this.actionsEnable={pin:!0,minimize:!0,maximize:!0,restore:!0,close:!0},this.actionsVisible={pin:!0,minimize:!1,maximize:!1,restore:!1,close:!1}}init(t){this.appWindow=t,this.updateActionVisible()}destroy(){this.pinned&&F(this)?this.store.dispatch("resetTaskButtonToPinned",{button:this}):this.store.dispatch("removeTaskButton",{button:this})}bringWinUp(){this.appWindow&&(this.appWindow.show(!1),this.appWindow.focus(),this.updateActionState("restore"))}launchApp(t){SYNO.SDS.AppLaunch(this.appName,Object.assign({windowName:this.windowName},t),!0)}maximize(){this.appWindow.maximize(),this.appWindow.show(),this.updateActionState("maximize")}minimize(){this.appWindow.minimize(),this.updateActionState("minimize")}restore(){this.appWindow.hidden?this.appWindow.show():this.appWindow.maximized&&this.appWindow.restore(
1),this.updateActionState("restore")}closeWindow(){this.appWindow.close()}onLaunch(t){this.launchApp(t)}onClick(){if("normal"===this.state)return this.onLaunch({}),void SYNO.SDS.DesktopMgr.show(SYNO.SDS.Desktop);const t=SYNO.SDS.WindowMgr.getActive(),e=t&&t.getTopWin?t.getTopWin():null;SYNO.SDS.DesktopMgr.isTop(SYNO.SDS.Desktop)?t&&e===this.appWindow?this.appWindow.minimize():this.bringWinUp():SYNO.SDS.DesktopMgr.show(SYNO.SDS.Desktop)}getAppWindowEl(){return this.appWindow._isVue?this.appWindow.$el:this.appWindow.el.dom}genPreviewNode(){return this.appWindow.genPreviewNode?this.appWindow.genPreviewNode(this):this.getAppWindowEl().cloneNode(!0)}}function K(){}const H=k.fn.isDefined;class Q{constructor({id:t=null,store:e,onClick:s,iconClass:n,tip:i,getTrayClass:o,trayPropsData:r,attach:a,...u}){this.id=t||G(),this.visible=!1,this.setIconClass(n),this.attach=a,this.attach&&(this.attach.taskButton=this),this.tip=i||!1,this.store=e,this.onClick=s,this.onHide=K,this.onShow=K,this.pressed=!1,this.disabled=!1,this.unreadNum=0,this.getTrayClass=o,this.trayPropsData=r||{},Object.assign(this,u)}disable(){this.disabled=!0}enable(){this.disabled=!1}on(t,e){switch(t){case"click":this.onClick=e;break;case"hide":this.onHide=e;break;case"show":this.onShow=e}}setIconClass(t){Array.isArray(t)?this.iconClass=t.join(" "):this.iconClass=t||""}setTip(t){this.tip=t}setVisible(t){this.visible=t,t?this.onShow():this.onHide()}destroyTrayComp(){this.trayComp&&(this.trayComp.$destroy(),this.trayComp=null)}click(t,e={}){if(!this.disabled){if(this.getTrayClass)if(this.trayComp)this.trayComp.$emit("click-tray");else{const t=this.getTrayClass();this.mountEl=document.createElement("div"),this.trayComp=new t({propsData:{button:this,...this.trayPropsData,...e}}),(SYNO.SDS.Desktop&&SYNO.SDS.Desktop.$el||document.body).appendChild(this.mountEl),this.trayComp.$mount(this.mountEl),SYNO.SDS.Desktop.appendChild(this.trayComp)}this.onClick&&this.onClick(t,this)}}hide(){this.setVisible(!1)}show(){this.setVisible(!0)}isVisible(){return this.visible}toggle(t){H(t)?this.pressed=t:this.pressed=!this.pressed}setEl(t){this.el=t}setUnreadNum(t){this.unreadNum=t}getUnreadNum(){return this.unreadNum}destroy(){this.trayComp&&(this.trayComp.$destroy(),this.trayComp=null),this.attach&&this.attach.taskButton&&delete this.attach.taskButton,this.store&&this.store.dispatch("removeTrayButton",{button:this})}}class q{constructor({id:t,widgetClass:e,widgetWindow:s,store:n,instance:i}){this.id=t||G(),this.widgetClass=e,this.widgetWindow=s,this.store=n,this.instance=i,this.widgetInst=null,this.visible=!1}setTooltip(){}setIcon(){}setVisible(t){this.visible=t,!1===this.visible&&this.widgetInst&&(this.widgetInst.destroy(),this.widgetInst=null)}hide(){this.setVisible(!1)}show(){this.setVisible(!0)}isVisible(){return this.visible}render(t){this.widgetInst||(this.widgetInst=new this.widgetClass({renderTo:t,instance:this.instance}))}getWidgetInst(){return this.widgetInst}}var X=new(b().Store)({state:{widgetButtons:[],taskButtons:[],trayButtons:[],systemTrayButtons:[new Q({id:"notify",iconClass:"notify-button",disabled:!0,visible:!0}),new Q({id:"user",iconClass:"user-button",getTrayClass:()=>SYNO.SDS.UserMenu,visible:!0}),new Q({id:"widget",iconClass:"widget-button",tip:_T("widget","widget_view"),visible:!1}),new Q({id:"search",iconClass:"search-button",getTrayClass:()=>SYNO.SDS.SearchBox,visible:!0})]},mutations:{ADD_WIDGET(t,{widgetClass:e,callback:s,instance:n}){const i=new q({store:this,widgetClass:e,instance:n});return t.widgetButtons.push(i),s(i)},ADD_TRAY(t,{instance:e,callback:s,...n}){if(e.taskButton)return void s(e.taskButton);const i=new Q({store:this,attach:e,...n});t.trayButtons.push(i),s(i)},REMOVE_TRAY_BUTTON(t,{button:e}){const s=t.trayButtons.indexOf(e);s>=0&&t.trayButtons.splice(s,1)},ADD_TASK_BUTTON(t,e){let s=(n=t.taskButtons,i={appName:e.appName,windowName:e.windowName},n.find((t=>t.isPin()&&!t.isLaunch()&&i&&i.appName===t.appName&&i&&i.windowName===t.windowName)));var n,i;s||(s=new L({appName:e.appName,windowName:e.windowName,store:this,params:e.params||{}}),t.taskButtons.push(s)),e.callback&&e.callback(s)},REMOVE_TASK_BUTTON(t,e){const s=t.taskButtons.indexOf(e.button);s>=0&&t.taskButtons.splice(s,1)},UPDATE_TASK_BUTTON_ACTION_VISIBLE(t){for(const e of t.taskButtons)e.updateActionVisible()}},actions:{addWidget({commit:t},e){return new Promise(((s,n)=>{t("ADD_WIDGET",{callback(t){s(t)},...e})}))},addTray({commit:t},e){return new Promise(((s,n)=>{t("ADD_TRAY",{callback(t){s(t)},...e}),SYNO.SDS.StatusNotifier.fireEvent("taskbuttonchanged")}))},removeTrayButton({commit:t},e){t("REMOVE_TRAY_BUTTON",e),SYNO.SDS.StatusNotifier.fireEvent("taskbuttonchanged")},addTaskButton({commit:t},e){return new Promise(((s,n)=>{t("ADD_TASK_BUTTON",{callback(t){s(t)},...e}),SYNO.SDS.StatusNotifier.fireEvent("taskbuttonchanged")}))},removeTaskButton({commit:t},e){t("REMOVE_TASK_BUTTON",e),SYNO.SDS.StatusNotifier.fireEvent("taskbuttonchanged")},resetTaskButtonToPinned(t,e){e.button&&e.button.resetToPinnedState(),SYNO.SDS.StatusNotifier.fireEvent("taskbuttonchanged")},addPinnedTaskButton({commit:t},e){const{appName:s,windowName:n}=e.button;let i=SYNO.SDS.UserSettings.getProperty("taskbar","pined")||[];R({appName:s,windowName:n})||(i.push({appName:s,windowName:n}),SYNO.SDS.UserSettings.setProperty("taskbar","pined",i),t("UPDATE_TASK_BUTTON_ACTION_VISIBLE"))},removePinnedTaskButton({commit:t},e){const{appName:s,windowName:n}=e.button;let i=SYNO.SDS.UserSettings.getProperty("taskbar","pined")||[];const o=R({appName:s,windowName:n});if(!o)return;const r=i.indexOf(o);i.splice(r,1),SYNO.SDS.UserSettings.setProperty("taskbar","pined",i),t("UPDATE_TASK_BUTTON_ACTION_VISIBLE")},async fetchPinnedTaskButtons({dispatch:t}){let e=[],s=SYNO.SDS.UserSettings.getProperty("taskbar","pined")||[];for(const i of s){if(!F(n=i)||"SYNO.SDS.App.FileTaskMonitor.Instance"===n.appName||"SYNO.SDS.App.WelcomeAp
1p.Instance"===n.appName||"SYNO.SDS.LogViewer.Application"===n.appName||"SYNO.SDS.SystemInfoApp.Application"===n.appName||"SYNO.SDS.ControlPanel.Instance"===n.appName)continue;const s=await t("addTaskButton",{...i,params:{pinned:!0}});e.push({appWindow:s.appWindow,windowName:s.windowName})}var n;s.length!==e.length&&SYNO.SDS.UserSettings.setProperty("taskbar","pined",e)}},getters:{getVisibleTrayButtons(t){return t.trayButtons.filter((t=>t.visible))},getVisibleSystemTrayButtons(t){return t.systemTrayButtons.filter((t=>t.visible))},hasVisibleTrayButtons(t,e){return e.getVisibleTrayButtons.length>0},getVisibleWidgets(t){return t.widgetButtons.filter((t=>t.visible))},hasVisibleWidgets(t,e){return e.getVisibleWidgets.length>0},findSystemTrayButtons:t=>e=>t.systemTrayButtons.find((t=>t.id===e))}}),J=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-modal-window",{ref:"window",staticClass:"sds-user-about-window",attrs:{"mask-container":!1,"syno-id":"about-window","show-header":!1,width:"520",height:"288"}},[s("div",{staticClass:"title"},[t._v(t._s(t.$i18n("about","dsm")))]),t._v(" "),s("div",{staticClass:"version"},[t._v(t._s(t.$i18n("about","version_desc")+" "+t.version))]),t._v(" "),s("div",{staticClass:"links-info"},[s("div",{staticClass:"link-block"},[s("a",{staticClass:"link link-font",attrs:{href:"https://sy.to/dsm7legal",target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.$i18n("about","terms")))])]),t._v(" "),s("div",{staticClass:"link-block"},[s("a",{staticClass:"link link-font",attrs:{href:"https://www.synology.com",target:"_blank",rel:"noopener noreferrer"}},[t._v("www.synology.com")])])]),t._v(" "),s("div",{staticClass:"footer-info"},[s("div",{staticClass:"copyright"},[t._v(" "+t._s(t.year)+" ")]),t._v(" "),s("div",{staticClass:"logo"})]),t._v(" "),s("v-window-header-tool-wrapper",{attrs:{"show-fullscreen":!1,"show-help":!1,"show-minimize":!1,"show-maximize":!1,maximized:!1,"dark-theme":!1,"show-close":""},on:{close:t.onClose}})],1)};J._withStripped=!0;var Z=i({name:"SystemAboutWindow",data:()=>({title:"",year:void 0,version:void 0}),mounted(){this.year=String.format(_T("copyright","copyright"),Date.parseDate(_S("builddate"),"Y/m/d").getUTCFullYear()),this.version=`${_S("productversion")}-${_S("version")}`,SYNO.SDS.WindowMgr&&SYNO.SDS.WindowMgr.maskContainer()},beforeDestroy(){SYNO.SDS.WindowMgr&&SYNO.SDS.WindowMgr.unmaskContainer()},methods:{onClose(){this.$refs.window.onClose()}}},J,[],!1,null,null,null);Z.options.__file="src/windows/system-about-window.vue";var tt=Z.exports,et=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-message-box-window",{ref:"window",staticClass:"sds-feasibility-window",attrs:{"syno-id":"feasibility-window",width:"520","max-height":"500",height:"auto","mask-container":!0},scopedSlots:t._u([{key:"content",fn:function(){return[s("v-form",{attrs:{"syno-id":"feasibility-form"}},[s("v-form-item",{attrs:{textonly:"","hide-label":"","syno-id":"feasibility-form-desc-item"}},[t._v("\n "+t._s(t.desc)+"\n ")]),t._v(" "),t._l(t.actionStrs,(function(t,e){return[s("div",{key:e,staticClass:"bullet-point"},[s("v-rich-text",{attrs:{text:t,"parse-tags":"['br', 'li', 'ul', 'ol', 'a', 'span', 'b', 'p', 'font']"}})],1)]}))],2)]},proxy:!0}])})};et._withStripped=!0;var st=i({name:"FeasibilityCheckWindow",props:{desc:{type:String,default:""},actionStrs:{type:Array,default:()=>[]}}},et,[],!1,null,null,null);st.options.__file="src/windows/feasibility-window.vue";var nt=st.exports,it=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("taskbar-menu",{staticClass:"user-menu",attrs:{title:t.title,button:t.button},on:{"menu-close":t.onMenuClose}},[s("v-menu-item",{attrs:{"syno-id":"menu-user-menu-menu-item-0"},on:{click:t.onClickUserSettings}},[s("span",{staticClass:"menu-icon user"}),t._v("\n\t\t"+t._s(t.$i18n("common","user_setting"))+"\n\t")]),t._v(" "),t.admin?[s("v-menu-divider",{attrs:{"syno-id":"menu-user-menu-menu-divider-0"}}),t._v(" "),s("v-menu-item",{attrs:{"syno-id":"menu-user-menu-menu-item-1"},on:{click:t.onClickReboot}},[s("span",{staticClass:"menu-icon reboot"}),t._v("\n\t\t\t"+t._s(t.$i18n("system","reboot_opt"))+"\n\t\t")]),t._v(" "),t.supportPoweroff?s("v-menu-item",{attrs:{"syno-id":"menu-user-menu-menu-item-2"},on:{click:t.onClickPoweroff}},[s("span",{staticClass:"menu-icon poweroff"}),t._v("\n\t\t\t"+t._s(t.poweroffText)+"\n\t\t")]):t._e()]:t._e(),t._v(" "),s("v-menu-divider",{attrs:{"syno-id":"menu-user-menu-menu-divider-1"}}),t._v(" "),s("v-menu-item",{attrs:{"syno-id":"menu-user-menu-menu-item-3"},on:{click:t.onClickAbout}},[s("span",{staticClass:"menu-icon about"}),t._v("\n\t\t"+t._s(t.$i18n("personal_settings","about"))+"\n\t")]),t._v(" "),s("v-menu-divider",{attrs:{"syno-id":"menu-user-menu-menu-divider-2"}}
1),t._v(" "),s("v-menu-item",{attrs:{"syno-id":"menu-user-menu-menu-item-4"},on:{click:t.onClickLogout}},[s("span",{staticClass:"menu-icon logout"}),t._v("\n\t\t"+t._s(t.$i18n("common","logout"))+"\n\t")])],2)};it._withStripped=!0;var ot=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-menu",{directives:[{name:"clickoutside",rawName:"v-clickoutside.children",value:function(){return t.$emit("menu-close")},expression:"() => $emit('menu-close')",modifiers:{children:!0}}],ref:"menu",staticClass:"taskbar-menu",attrs:{"syno-id":"menu-menu-menu-0",width:t.width},on:{"menu-close":function(e){return t.$emit("menu-close")}}},[s("div",{staticClass:"taskbar-title",attrs:{role:"presentation"}},[t._t("title",(function(){return[t._v("\n\t\t"+t._s(t.title)+"\n\t\t")]}))],2),t._v(" "),t._t("default")],2)};ot._withStripped=!0;const rt=k.element.css;var at=i({props:{width:{type:[Number,String],default:200},title:{type:String,default:""},button:{type:Object,default:()=>({})},alignment:{type:String,default:"t->b"},offset:{type:Array,default:()=>[0,10]}},beforeDestroy(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.button&&(this.button.toggle(!1),this.button.trayComp=null)},async mounted(){await this.$nextTick(),this.alignButton(),this.$refs.menu.addExtraElement&&this.$refs.menu.addExtraElement(this.button.el),this.button.toggle(!0),SYNO.SDS.StatusNotifier.fireEvent("taskBarPanelShow")},methods:{alignButton(){if(!this.button.el)return;const[t,e]=this.$alignManager.getAlignToXY(this.$el,this.button.el,this.alignment,this.offset);rt(this.$el,"left",`${t}px`),rt(this.$el,"top",`${e}px`)},getExtraElements(){return this.button&&this.button.el?[this.button.el]:[]}}},ot,[],!1,null,null,null);at.options.__file="src/menu/menu.vue";var ut=at.exports,ct=i({components:{TaskbarMenu:ut},props:{button:{type:Object,default:()=>({})}},created(){this.$on("click-tray",(()=>{this.$destroy()}))},data(){return{title:_S("user"),admin:_S("is_admin"),supportPoweroff:"yes"===_D("support_poweroff")||"yes"===_D("support_halt"),poweroffText:"yes"===_D("support_poweroff")?this.$i18n("system","poweroff_opt"):this.$i18n("system","halt_opt")}},methods:{onMenuClose(){this.$destroy(),SYNO.SDS.TaskBar.focusTrayContainer()},showRebootPowerOffWin(t){SYNO.SDS.RebootPowerOff.HAShow(this,t,(function(t){new SYNO.SDS.RebootPowerOff.Window(t).show()}))},onClickPoweroff(){!0===_S("ha_support_pw_btn")?this.showRebootPowerOffWin("poweroff"):SYNO.SDS.System.PowerOff()},onClickReboot(){!0===_S("ha_support_pw_btn")?this.showRebootPowerOffWin("reboot"):SYNO.SDS.System.Reboot()},onClickUserSettings(){SYNO.SDS.DesktopMgr.show(SYNO.SDS.Desktop),SYNO.SDS.AppLaunch("SYNO.SDS.App.PersonalSettings.Instance",{},!1)},onClickAbout(){SYNO.SDS.DesktopMgr.show(SYNO.SDS.Desktop),SYNO.SDS.WindowMgr.openModalWindow(SYNO.SDS.SystemAboutWindow)},onClickLogout(){SYNO.SDS.UserSettings.save({callback:()=>{SYNO.SDS.System.Logout()}})}}},it,[],!1,null,null,null);ct.options.__file="src/menu/user-menu.vue";var lt=ct.exports,pt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"show",rawName:"v-show",value:t.shown,expression:"shown"},{name:"clickoutside",rawName:"v-clickoutside",value:t.onClickOutside,expression:"onClickOutside"}],staticClass:"regular-search-box"},[s("i",{ref:"arrow",staticClass:"search-box-arrow"}),t._v(" "),s("v-single-select",{ref:"select",attrs:{"syno-id":"search-box-search-box-single-select-0",placeholder:t.$i18n("log","search"),search:t.onSearch,"popup-container":function(){return"#regular-search-box-dropdown-anchor"},"max-height":368,width:"auto","display-field":"title","value-field":"id",clearable:""},on:{select:t.onSelect},scopedSlots:t._u([{key:"inner-option",fn:function(e){var n=e.option;return[s("img",{staticClass:"option-icon",attrs:{src:t.getIcon(n)}}),t._v(" "),s("div",{staticClass:"option-title"},[t._v(t._s(n.title))]),t._v(" "),n.owner?s("div",{staticClass:"option-category"},[t._v(t._s(t.getAppName(n)))]):t._e()]}}])}),t._v(" "),s("div",{staticClass:"search-box-dropdown",attrs:{id:"regular-search-box-dropdown-anchor"}})],1)};pt._withStripped=!0;const ht=k.element.css;var dt=i({props:{title:{type:String,default:""},button:{type:Object,default:()=>({})},alignment:{type:String,default:"t->b"},offset:{type:Array,default:()=>[0,4]}},data(){return{shown:!1}},created(){this.$on("click-tray",(()=>{this.hideBox()}))},async mounted(){this.button&&this.button.toggle(!0),this.showBox()},beforeDestroy(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),this.button&&this.button.toggle(!1),this.$options.onDocMouseDown&&document.removeEventListener("mousedown",this.$options.onDocMouseDown),this.button.trayComp=null},methods:{getExtraElements(){return this.button&&this.button.el?[this.button.el]:[]},getAppName(t){return SYNO.SDS.Utils.GetAppTitle(t.owner)},onClickOutside(){this.shown&&this.onClose()},async onSearch(t){if(!t)return{};try{return{Application:{options:(await synowebapi.promises.request({api:"SYNO.Core.UISearch",method:"uisearch",version:1,params:{lang:_S("lang"),type:"app",query:t}})).items}}}catch(t){}},async onSelect(t){const e=SYNO.SDS.Utils.ParseSearchID(t.id);e.className&&(SYNO.SDS.AppLaunch(e.className,e.params),await this.$nextTick(),this.$destroy())},getIcon(t){if("app"===t.type)return SYNO.SDS.Utils.GetAppIcon(t.owner||SYNO.SDS.Utils.ParseSearchID(t.id).className,"TreeIcon")},alignButton(){if(!this.button.el)return;const[t,e]=this.$alignManager.getAlignToXY(this.$el,SYNO.SDS.TaskBar.getTrayContainerEl(),"tr->br",this.offset);ht(this.$el,"left",`${t}px`),ht(this.$el,"top",`${e}px`)},alignArrow(){const[t]=this.$alignManager.getAlignToXY(this.$refs.arrow,this.button.el,this.alignment,[0,0],!0,!0,this.$el);ht(this.$refs.arrow,"left",`${t}px`)},onClose(){SYNO.SDS.TaskBar.focusTrayContainer(),this.$destroy()},onDocMouseDown(t){const e=t.target;if(!this.button.el.contains(e)&&SYNO.SDS.StatusNotifier.isAppEnabled("SYNO.Finder.Application")){const t=SYNO.SDS.AppMgr.getByAppName("SYNO.Finder.Spotlight.Application")[0],s=Ext.query(".syno-finder-spotlight-menu");!t||t.window.el.dom.contains(e)||s.length&&(!s.length||s[0].contains(e))||(t.window.hide(),this.hideBox())}},launchSynoFinderApp(t){this.$options.onDocMouseDown=this.onDocMouseDown.bind(this),document.addEventListener("mousedown",this.$options.onDocMouseDown),SYNO.SDS.AppLaunch("SYNO.Finder.Spotlight.Application",{type:t})},async showBox(t){SYNO.SDS.StatusNotifier.isAppEnabled("SYNO.Finder.Application")?(SYNO.SDS.StatusNotifier.fireEvent("toggleFinderSpotlight"),this.launchSynoFinderApp(t)):(this.shown=!0,await this.$nextTick(),this.alignButton(),this.alignArrow(),this.$refs.select.focusInput()),this.button.toggle(!0)},hideBox(){SYNO.SDS.StatusNotifier.isAppEnabled("SYNO.Finder.Application")?SYNO.SDS.StatusNotifier.fireEvent("toggleFinderSpotlight"):this.shown=!1,this.button.toggle(!1),this.onClose()},toggleBox(t){SYNO.SDS.StatusNotifier.isAppEnabled("SYNO.Finder.Application")&&(this.button.pressed?this.hideBox():this.showBox(t))}}},pt,[],!1,null,null,null);dt.options.__file="src/search-box/search-box.vue";var ft=dt.exports,mt=s(9729),vt=s.n(mt),bt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("taskbar-menu",{directives:[{name:"show",rawName:"v-show",value:t.showMenu,expression:"showMenu"}],ref:"menu",staticClass:"bkg-group-task-tray",class:t.wrapperCls,attrs:{button:t.button,width:400,offset:t.offset},on:{"menu-close":t.onMenuClose},scopedSlots:t._u([{key:"title",fn:function(){return[t._v("\n\t\t"+t._s(t.title)+"\n\t\t"),t.currentTrayGroup.enableTrayTooltip?s("v-whitetip",{attrs:{size:"small"}},[t._v("\n\t\t\t"+t._s(t.tooltip)+"\n\t\t")]):t._e()]},proxy:!0}])},[t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.isEmpty,expression:"isEmpty"}],staticClass:"empty-wrapper"},[s("span",{staticClass:"empty-text"},[t._v("\n\t\t\t"+t._s(t.$i18n("bkg-task","empty"))+"\n\t\t")])]),t._v(" "),s("v-perfect-scrollbar",[s("div",{directives:[{name:"show",rawName:"v-show",value:!t.isEmpty,expression:"!isEmpty"}],staticClass:"groups-wrapper"}
1,[t._l(t.activeGroups,(function(t){var e=t[0],n=t[1];return s("group-task-card",{key:e,attrs:{group:n}})})),t._v(" "),t._l(t.activeTasks,(function(t){return s(t.instance,{key:t.key,tag:"component",attrs:{task:t}})}))],2)])],1)};bt._withStripped=!0;var yt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"task-card group"},[s("div",{staticClass:"title-wrapper"},[s("i",{staticClass:"icon",style:t.iconStyle}),t._v(" "),t.hasTitle?s("span",{staticClass:"title"},[t._v(t._s(t.title))]):t._e()]),t._v(" "),s("div",{staticClass:"groups-wrapper"},t._l(t.activeTasks,(function(t){return s(t.instance,{key:t.key,tag:"component",attrs:{task:t}})})),1)])};yt._withStripped=!0;var gt=i({props:{group:{type:Object,default:()=>({})}},computed:{hasTitle(){return this.group.i18n},title(){const t=this.group.i18n.split(":");return t.length>=3?_TT(...t)||this.group.i18n:this.$i18n(...t)},iconSrc(){if(!this.group.iconClass)return SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(this.group.iconPath,"BackgroundTaskIcon");const t=SYNO.SDS.Config.FnMap[this.group.iconClass];if(!t)return SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(this.group.iconPath,"BackgroundTaskIcon");let e=`${encodeURI(t.config.jsBaseURL)}/${this.group.iconPath||t.config.icon||t.config.icon_32}`;return e=SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(e,"BackgroundTaskIcon"),void 0!==t.config.version&&(e=`${e}&app_version=${t.config.version}`),e},iconStyle(){return{"background-image":`url(${this.iconSrc||""})`}},activeTasks(){return this.group.tasks.filter((t=>t.activate&&t.auth))}}},yt,[],!1,null,null,null);gt.options.__file="src/bkg-mgr/components/task-card/group-task-card.vue";var St=i({components:{TaskbarMenu:ut,GroupTaskCard:gt.exports},props:{button:{type:Object,default:()=>({})},trayGroup:{type:Object,default:()=>({})}},created(){this.$on("click-tray",(()=>{this.showMenu=!this.showMenu}))},data(){return{currentTrayGroup:this.trayGroup,offset:[0,6],showMenu:!0}},computed:{...(0,v.mapGetters)(["someTaskVisible"]),wrapperCls(){return[this.currentTrayGroup.key]},title(){let t=(this.currentTrayGroup.i18n||"bkg-task:tray_title").split(":");return t.length>=3?_TT(...t)||this.currentTrayGroup.i18n:this.$i18n(...t)},activeGroups(){return Object.entries(this.currentTrayGroup.groups).filter((([,t])=>t.activate&&t.auth))},activeTasks(){return this.currentTrayGroup.tasks.filter((t=>t.activate&&t.auth))},isEmpty(){return!this.someTaskVisible},tooltip(){let t=(this.currentTrayGroup.customTrayTooltip||"bkg-task:title_hint").split(":");return t.length>=3?_TT(...t)||this.currentTrayGroup.customTrayTooltip:this.$i18n(...t)}},watch:{async showMenu(t){t&&(await this.$nextTick(),this.$refs.menu&&this.$refs.menu.alignButton())}},methods:{setTrayGroup(t){this.currentTrayGroup=t},onMenuClose(){this.showMenu=!1,SYNO.SDS.TaskBar.focusTrayContainer()}}},bt,[],!1,null,null,null);St.options.__file="src/bkg-mgr/components/group-task-tray.vue";var wt=St.exports;class kt{constructor({vueInst:t,taskInst:e}){this.vueInst=t,this.taskInst=e,this.statusApi=e.statusApi,this.startApi=e.startApi,this.resumeApi=e.resumeApi,this.pauseApi=e.pauseApi,this.stopApi=e.stopApi}onPostTask(t){this.vueInst&&this.vueInst.onPostTask&&this.vueInst.onPostTask(t)}onDeleteTask(t){this.vueInst&&this.vueInst.onDeleteTask&&this.vueInst.onDeleteTask(t)}start(){return synowebapi.promises.request({...this.startApi})}stop(){return synowebapi.promises.request({...this.stopApi})}pause(){if(this.pauseApi)return synowebapi.promises.request({...this.pauseApi})}resume(){if(this.resumeApi)return synowebapi.promises.request({...this.resumeApi})}status(){return synowebapi.promises.request({...this.statusApi})}}var _t=Vue,Tt=s.n(_t);const xt=new(b().Store)({state:{tasks:{}},mutations:{ADD_TASK(t,{key:e,taskInst:s,callback:n,vueInst:i}){const o=new kt({vueInst:i,taskInst:s});Tt().set(t.tasks,e,o),n(o),SYNO.SDS.BackgroundTrayMgr.registerTask(e,o)},REMOVE_TASK(t,{key:e}){Tt().delete(t.tasks,e),SYNO.SDS.BackgroundTrayMgr.unregisterTask(e)},SET_VISIBLE(t,{key:e,visible:s}){t.tasks[e].visible=s}},actions:{addTask({commit:t},e){return new Promise((s=>{t("ADD_TASK",{...e,callback(t){s(t)}})}))},removeTask({commit:t},e){t("REMOVE_TASK",e)},setVisible({commit:t},e){t("SET_VISIBLE",{...e})}},getters:{getTaskByKey:t=>e=>t.tasks[e],someTaskVisible(t){return Object.values(t.tasks)}}});var Nt=s(8159),Ot=s.n(Nt);function Ct(t){return Object.entries(t.tasksData).reduce(((t,[,e])=>(e.status&&t.add(e.status),t)),new Set)}function Dt(t,e){let s=new Set(t);for(let t of e)s.add(t);return s}function $t(t){let e=new Set;if(t.groups)for(const[,s]of Object.entries(t.groups))e=Dt(e,$t(s));if(t.tasks)for(const s of t.tasks)e=Dt(e,Ct(s));return t.status=e}function At(t){let e=!1;if(t.groups)for(const[,s]of Object.entries(t.groups)){const t=At(s);e=e||t}return t.tasks&&(e=e||t.tasks.some((t=>t.auth))),t.auth=e}function Bt(t){let e=!1;if(t.groups)for(const[,s]of Object.entries(t.groups)){const t=Bt(s);e=e||t}return t.tasks&&(e=e||t.tasks.some((t=>t.activate))),t.activate=e}function jt(t,e){return!(e&&e>t)}class Mt{constructor(){this.traysMap=Object.create(null),this.activeTraysMap=Object.create(null),this.activeTasksMap=Object.create(null),this.fetchGroupsTasks()}registerTask(t,e){this.activeTasksMap[t]=e}unregisterTask(t){delete this.activeTasksMap[t]}registerSocketEvent(){SYNO.SDS.SocketInst.registerWebAPIEvent({api:"SYNO.Core.Backgroun
1dTask",version:1,method:"get",custom:"post_task"},this.onPostTask.bind(this)),SYNO.SDS.SocketInst.registerWebAPIEvent({api:"SYNO.Core.BackgroundTask",version:1,method:"get",custom:"delete_task"},this.onDeleteTask.bind(this))}onConfigChanged(t){this._configChangeDefer=this._configChangeDefer||Promise.resolve(),this._configChangeDefer=this._configChangeDefer.then((async()=>{if(!1===jt(t.task_conf_time.sec,this._configTime))return;const{newGroups:e,traysMap:s}=this.processPatchGroupTasks(t.task_groups);this.groups=e,this.traysMap=s,await this.handleTrays()}))}onPostTask(t){this._fetched&&(t.emit_time&&!1===jt(t.emit_time.sec,this._postTime)||this.processPostTask(t.items))}onDeleteTask(t){this._fetched||(this._deleteTaskQueue=this._deleteTaskQueue||[],this._deleteTaskQueue.push(t)),t.emit_time&&!1===jt(t.emit_time.sec,this._deleteTime)||this.processDeleteTask(t.items)}processDeleteTaskQueue(){if(this._fetched&&this._deleteTaskQueue)for(const t of this._deleteTaskQueue)this.onDeleteTask(t)}findTaskByResponseItem(t={group:null,function:null}){if(this.groups[t.group]&&this.groups[t.group].tasks)return this.groups[t.group].tasks.find((e=>e.originalKey===t.function))}findGroupByResponseItem(t={group:null}){return this.groups[t.group]}processPostTask(t=[]){for(const e of t){const t=this.findTaskByResponseItem(e);if(t){const s=Ot()(e,["group","function","task"]);Tt().set(t.tasksData,e.task,s),t.activate=!0;const n=this.activeTasksMap[t.key];n&&n.onPostTask&&n.onPostTask(e),t.tasksData&&t.tasksData[e.task]&&(t.tasksData[e.task].status=e.status||"")}}this.handleTrays()}processDeleteTask(t=[]){for(const e of t)if(e.function){const t=this.findTaskByResponseItem(e);if(t){null===e.task?t.tasksData={}:Tt().delete(t.tasksData,e.task),0===Object.keys(t.tasksData).length&&(t.activate=!1);const s=this.activeTasksMap[t.key];s&&s.onDeleteTask&&s.onDeleteTask(e)}}else{const t=this.findGroupByResponseItem(e);for(const s of t.tasks){const t=this.activeTasksMap[s.key];t&&t.onDeleteTask&&t.onDeleteTask(e)}t&&(t.tasks=[])}this.handleTrays()}getTask(t){return this.activeTasksMap[t]}async fetchGroupsTasks(){this._fetched=!1,this.registerSocketEvent();const t=await synowebapi.promises.request({api:"SYNO.Core.BackgroundTask",method:"get",version:1});if(!1===jt(t.task_conf_time.sec,this._configTime))return;const{sanitizedGroups:e,traysMap:s}=this.processGroupsTasks(t.task_groups);this._fetched=!0,this.groups=e,this.traysMap=s,this.processDeleteTaskQueue(),this.handleTrays()}getGroups(t){return this.groups[t]}getAllActiveTasks(){let t=[];for(const[,e]of Object.entries(this.traysMap)){for(const[,s]of Object.entries(e.groups))for(const e of s.tasks)e.activate&&t.push(e);for(const s of e.tasks)s.activate&&t.push(s)}return t}fetchTasksInstance(){const t=this.getAllActiveTasks();return Promise.all(t.map((async t=>{try{await t.getInstance()}catch(t){SYNO.Debug.error(t)}return t})))}async authTasks(){const t=this.getAllActiveTasks();await Promise.all(t.map((async t=>{if(t.alreadyAuth)return t.auth;const e=new t.instance;let s=!1;e._auth?s=await e._auth(t):SYNO.Debug.error(`${t.jsId} should implement _auth method`),e.$destroy(),t.alreadyAuth=!0,t.auth=s})))}async handleTrays(){await this.fetchTasksInstance(),await this.authTasks();let t=new Set;for(const[e,s]of Object.entries(this.traysMap))if($t(s),1===s.status.size?s.trayStatus=[...s.status][0]:s.trayStatus="",Bt(s)&&At(s)){s.trayClass=Tt().extend(wt).extend({store:xt}),this.activeTraysMap[e]&&(this.activeTraysMap[e].trayComp&&this.activeTraysMap[e].trayComp.setTrayGroup(s),this.activeTraysMap[e].trayPropsData=Object.freeze({trayGroup:s}));const n=await SYNO.SDS.TaskBar.addTray({id:e,iconClass:[s.trayIconClass,"bkg-mgr-tray",s.trayStatus],getTrayClass:()=>s.trayClass,trayPropsData:Object.freeze({trayGroup:s}),instance:s,visible:!0});n.setIconClass([s.trayIconClass,"bkg-mgr-tray",s.trayStatus]),this.activeTraysMap[e]=n,t.add(e)}else this.activeTraysMap[e]&&(this.activeTraysMap[e].destroy(),delete this.activeTraysMap[e]);const e=Object.create(null);for(const[s,n]of Object.entries(this.activeTraysMap))t.has(s)?e[s]=n:n.destroy();this.activeTraysMap=e}processPatchGroupTasks(t){const{sanitizedGroups:e,traysMap:s}=this.processGroupsTasks(t);for(const[t,s]of Object.entries(e)){const e=this.groups[t];if(e){s.isTray&&e.isTray&&(s.taskButton=e.taskButton);for(const t of s.tasks){const s=e.tasks.find((e=>e.key===t.key));s&&(t.auth=s.auth,t.activate=s.activate)}}}return{newGroups:e,traysMap:s}}putDefaultTray({sanitizedGroups:t,traysMap:e}){const s={i18n:"bkg-task:tray_title",isTray:!0,enableTrayTooltip:!0,activate:!1,status:new Set,auth:!1,_tasks:{},groups:{},key:"@default"};return e["@default"]=s,t["@default"]=s,{sanitizedGroups:t,traysMap:e}}processGroupsTasks(t){let e=Object.create(null),s=Object.create(null);({sanitizedGroups:e,traysMap:s}=this.putDefaultTray({sanitizedGroups:e,traysMap:s}));for(const[n,i]of Object.entries(t)){const t={i18n:i.i18n,isTray:i.is_tray,enableTrayTooltip:i.enable_tray_tooltip,customTrayTooltip:i.custom_tray_tooltip,trayStatus:"running",iconClass:i.icon_class,iconPath:i.icon_path,trayIconClass:i.tray_icon_class,activate:!1,status:new Set,auth:!1,_tasks:i.functions||{},belongTray:i.belong_tray,groups:{},key:n};i.is_tray&&(s[n]=t),e[n]=t}
1for(const[n,i]of Object.entries(t)){const t=e[n];t.isTray&&(t.groups=i.tray_groups.reduce(((t,s)=>(e[s]&&(t[s]=e[s]),t)),{})),t.belongTray||t.isTray||(s["@default"].groups[n]=t)}for(const[t,s]of Object.entries(e)){for(const[e,n]of Object.entries(s.groups))n.tasks=this.processTasks(n._tasks,`${t}:${e}`);s.isTray&&(s.tasks=this.processTasks(s._tasks,t))}return{sanitizedGroups:e,traysMap:s}}processTask(t){return{actionPrivileges:t.action_privileges,allowUsers:t.allow_users,appPrivileges:t.application_privileges,i18n:t.i18n,jsId:t.ui_component,tasksData:t.tasks||{},key:t.key,activate:Object.keys(t.tasks).length>0,auth:null,alreadyAuth:!1,originalKey:t.originalKey,async getInstance(){return this.instance?this.instance:(await SYNO.SDS.JSLoadPromise(this.jsId),this.instance=vt()(window,this.jsId))}}}processTasks(t,e){return Object.entries(t).map((([t,s])=>this.processTask({key:`${e}:${t}`,originalKey:t,...s})))}}var Yt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"bkg-mgr-card-wrapper"},[s("div",{staticClass:"title-wrapper"},[s("div",{staticClass:"title"},[t._t("title",(function(){return[t._v("\n\t\t\t\t"+t._s(t.title)+"\n\t\t\t")]}))],2),t._v(" "),t._t("task-actions"),t._v(" "),s("div",{staticClass:"detail-actions"},[t.detailApp?s("bkg-detail",{on:{click:t.onDetailClick}}):t._e()],1)],2),t._v(" "),s("div",{staticClass:"info-wrapper"},[s("bkg-hr"),t._v(" "),t._t("info-wrapper",(function(){return[s("bkg-info-block",[s("div",{staticClass:"status-wrapper"},[s("bkg-status",{attrs:{status:t.status}}),t._v(" "),s("bkg-status-title",{attrs:{status:t.status,"status-title":t.statusTitle,"has-ellipsis-anim":t.hasEllipsisAnim}}),t._v(" "),t.hasStatusActions?s("div",{staticClass:"status-actions"},[t._t("status-actions",(function(){return[t.isPaused?s("bkg-resume",{on:{click:t.onResume}}):s("bkg-pause",{attrs:{options:t.pauseOptions},on:{click:t.onPause}}),t._v(" "),s("bkg-cancel",{on:{click:t.onCancel}})]}))],2):t._e()],1),t._v(" "),s("div",{staticClass:"info"},[t._t("info")],2)])]}))],2)])};Yt._withStripped=!0;var It=function(t,e){return(0,e._c)("i",e._g(e._b({ref:e.data.ref,staticClass:"icon-status",class:e.props.status},"i",e.data.attrs,!1),e.listeners))};It._withStripped=!0;var Et=i({props:{status:{type:String,default:"running",validator(t){return["running","pause","search","schedule","prepare"]}}}},It,[],!0,null,null,null);Et.options.__file="src/bkg-mgr/components/details/status.vue";var Pt=Et.exports,zt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"status-title",class:t.statusCls},[s("span",{staticClass:"text"},[t._v(t._s(t.currentStatusTitle))])])};zt._withStripped=!0;const Wt=["running","search","prepare"];var Vt=i({props:{status:{type:String,default:"running",validator(t){return["running","pause","search","schedule","prepare"]}},statusTitle:{type:String,default:void 0},hasEllipsisAnim:{type:Boolean,default:void 0}},computed:{statusCls(){let t=Wt.includes(this.status);return void 0!==this.hasEllipsisAnim&&(t=this.hasEllipsisAnim),{"ellipsis-anim":t}},currentStatusTitle(){return this.statusTitle?this.statusTitle:this.$i18n("bkg-mgr",this.status)}}},zt,[],!1,null,null,null);Vt.options.__file="src/bkg-mgr/components/details/status-title.vue";var Ut=Vt.exports,Gt=function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",t._g(t._b({directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$i18n("common","cancel"),expression:"$i18n('common', 'cancel')"}],staticClass:"icon-cancel action-button"},"i",t.$attrs,!1),t.$listeners))};Gt._withStripped=!0;var Rt=i({},Gt,[],!1,null,null,null);Rt.options.__file="src/bkg-mgr/components/action-buttons/cancel.vue";var Ft=Rt.exports,Lt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$i18n("common","pause"),expression:"$i18n('common', 'pause')"}],staticClass:"icon-pause action-button",attrs:{"syno-id":"action-buttons-pause-button-0",type:"styleless","menu-align":"tr->br"},on:{click:t.onClick},scopedSlots:t._u([t.options?{key:"dropdown",fn:function(){return[s("v-menu",{attrs:{"syno-id":"action-buttons-pause-menu-0",width:"200px"}}
1,t._l(t.options,(function(e){return s("v-menu-item",{key:e.value,attrs:{"syno-id":"action-buttons-pause-menu-item-0",title:e.label},on:{selected:function(s){return t.onItemSelect(e)}}})})),1)]},proxy:!0}:null],null,!0)})};Lt._withStripped=!0;var Kt=i({props:{options:{type:[Boolean,Array],default:!1}},methods:{onClick(){this.options||this.$emit("click")},onItemSelect(t){this.$emit("click",t)}}},Lt,[],!1,null,null,null);Kt.options.__file="src/bkg-mgr/components/action-buttons/pause.vue";var Ht=Kt.exports,Qt=function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",t._g(t._b({directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$i18n("common","resume"),expression:"$i18n('common', 'resume')"}],staticClass:"icon-resume action-button"},"i",t.$attrs,!1),t.$listeners))};Qt._withStripped=!0;var qt=i({},Qt,[],!1,null,null,null);qt.options.__file="src/bkg-mgr/components/action-buttons/resume.vue";var Xt=qt.exports,Jt=function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",t._g(t._b({directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$i18n("bkg-task","open_detail"),expression:"$i18n('bkg-task', 'open_detail')"}],staticClass:"icon-detail action-button"},"i",t.$attrs,!1),t.$listeners))};Jt._withStripped=!0;var Zt=i({},Jt,[],!1,null,null,null);Zt.options.__file="src/bkg-mgr/components/action-buttons/detail.vue";var te=Zt.exports,ee=i({functional:!0,render(t,e){return t("div",{staticClass:"info-block",...e.data},e.children)}},void 0,void 0,!1,null,null,null);ee.options.__file="src/bkg-mgr/components/info/info-block.vue";var se=ee.exports,ne=i({functional:!0,render(t,e){return t("hr",{staticClass:"bkg-info-hr",...e.data},e.children)}},void 0,void 0,!1,null,null,null);ne.options.__file="src/bkg-mgr/components/info/hr.vue";var ie=ne.exports,oe=i({components:{BkgStatus:Pt,BkgCancel:Ft,BkgPause:Ht,BkgResume:Xt,BkgStatusTitle:Ut,BkgInfoBlock:se,BkgDetail:te,BkgHr:ie},props:{task:{type:Object,default:()=>({})},status:{type:String,default:"running",validator(t){return["running","pause","search","schedule","prepare"].includes(t)}},statusTitle:{type:String,default:void 0},isPaused:{type:Boolean,default:!1},detailApp:{type:[Boolean,Object],default(){return{appJsId:"",params:{}}}},pauseOptions:{type:[Boolean,Array],default:!1},hasStatusActions:{type:Boolean,default:!0},hasEllipsisAnim:{type:Boolean,default:void 0}},mounted(){},computed:{...(0,v.mapGetters)(["getTaskByKey"]),title(){const t=this.task.i18n.split(":");return t.length>=3?_TT(...t)||this.task.i18n:this.$i18n(...t)}},methods:{getTask(){return this.getTaskByKey(this.task.key)},onPause(t){this.getTask().pause(),this.$emit("pause",t)},onResume(){this.getTask().resume(),this.$emit("resume")},onCancel(){this.getTask().stop()},onDetailClick(){SYNO.SDS.AppLaunch(this.detailApp.appJsId,this.detailApp.params),this.$root.onMenuClose()}}},Yt,[],!1,null,null,null);oe.options.__file="src/bkg-mgr/components/task-card/basic-task-card.vue";var re=oe.exports;const ae=t=>t.api&&t.method&&t.version;var ue={name:"BkgTaskInstance",render(){return this.$slots.default},props:{statusApi:{type:Object,required:!0,default(){return{api:"SYNO.API.Example",method:"status",version:1,params:{}}},validator:ae},startApi:{type:Object,default(){return{api:"SYNO.API.Example",method:"start",version:1,params:{}}},validator:ae},stopApi:{type:Object,required:!0,default(){return{api:"SYNO.API.Example",method:"stop",version:1,params:{}}},validator:ae},pauseApi:{type:Object,default:void 0},resumeApi:{type:Object,default:void 0},task:{type:Object,default:()=>({})}},data(){return{bkgTask:null}},async mounted(){this.bkgTask=await this.addTask({key:this.task.key,taskInst:this,vueInst:this.$vnode.context})},beforeDestroy(){this.removeTask({key:this.task.key})},computed:{},methods:{...(0,v.mapActions)(["addTask","removeTask","setVisible"])}},ce=function(t,e){return(0,e._c)("v-progress-bar",{staticClass:"bkg-progress-bar",attrs:{title:e.props.title,"percent-text":e.props.percentText,percent:e.props.percent,info:e.props.info,paused:e.props.paused,disabled:e.props.disabled}})};ce._withStripped=!0;var le=i({props:{title:{type:String,default:""},percentText:{type:String,default:""},percent:{type:[String,Number],default:0},info:{type:String,default:""},paused:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}}},ce,[],!0,null,null,null);le.options.__file="src/bkg-mgr/components/info/progress-bar.vue";var pe=le.exports,he=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"resume-info"},[s("div",{staticClass:"postpone"},[t._v("\n\t\t"+t._s(t.$i18n("bkg-task","postpone_until"))+":\n\t\t"),s("span",{staticClass:"time-info"},[t._v(t._s(t.timeInfo))])]),t._v(" "),t._t("after",(function(){return[t.whitetip?s("v-whitetip",{attrs:{size:"small"}},[t._t("whitetip-content")],2):t._e()]}))],2)};he._withStripped=!0;var de=i({props:{whitetip:{type:Boolean,default:!1},time:{type:Date,default:()=>new Date}},computed:{timeInfo(){return SYNO.SDS.DateTimeFormatter(this.time,{type:"datetime",showDiffDateOnly:!0,showDiffYearOnly:!0})}},methods:{}},he,[],!1,null,null,null);de.options.__file="src/bkg-mgr/components/info/resume-info.vue";var fe=de.exports,me=i({functional:!0,render(t,e){return t("div",{staticClass:"primary-info",...e.data},e.children)}},void 0,void 0,!1,null,null,null);me.options.__file="src/bkg-mgr/components/info/primary.vue";var ve=me.exports,be=i({functional:!0,render(t,e){return t("div",{staticClass:"desc-info",...e.data},e.children)}},void 0,void 0,!1,null,null,null);be.options.__file="src/bkg-mgr/components/info/description.vue";var ye=be.exports,ge=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$i18n("common","stop"),expression:"$i18n('common', 'stop')"}],staticClass:"icon-stop action-button",attrs:{"syno-id":"action-buttons-stop-button-0",type:"styleless","menu-align":"tr->br"},on:{click:t.onClick},scopedSlots:t._u([t.options?{key:"dropdown",fn:function(){return[s("v-menu",{attrs:{"syno-id":"action-buttons-stop-menu-0",width:"200px"}}
1,t._l(t.options,(function(e){return s("v-menu-item",{key:e.value,attrs:{"syno-id":"action-buttons-stop-menu-item-0",title:e.label},on:{selected:function(s){return t.onItemSelect(e)}}})})),1)]},proxy:!0}:null],null,!0)})};ge._withStripped=!0;var Se=i({props:{options:{type:[Boolean,Array],default:!1}},methods:{onClick(){this.options||this.$emit("click")},onItemSelect(t){this.$emit("click",t)}}},ge,[],!1,null,null,null);Se.options.__file="src/bkg-mgr/components/action-buttons/stop.vue";var we=Se.exports,ke={install(t,e={}){t.component("bkg-task-instance",ue),t.component("bkg-basic-task-card",re),t.component("bkg-progress-bar",pe),t.component("bkg-resume-info",fe),t.component("bkg-primary-info",ve),t.component("bkg-desc",ye),t.component("bkg-info-block",se),t.component("bkg-hr",ie),t.component("bkg-cancel-btn",Ft),t.component("bkg-pause-btn",Ht),t.component("bkg-resume-btn",Xt),t.component("bkg-stop-btn",we),t.component("bkg-status",Pt),t.component("bkg-status-title",Ut)}};const _e=Vue.extend({template:'\n\t\t<div>\n\t\t\t<v-notification v-bind="config"/>\n\t\t</div>\n\t',name:"DesktopNotification",props:{config:{type:Object,default:()=>({})}}});class Te{constructor(){if(void 0===this.createTray)throw new TypeError("Must Provide Method createTray");if(void 0===this.showNotification)throw new TypeError("Must Provide Method showNotification");this._notifyTray=null}get instance(){return this._notifyTray}needSkip(t){if(SYNO.SDS.NotifyMgr.isDisabled())return!0;let e=SYNO.SDS.UserSettings.getProperty("SYNO.SDS.DSMNotify.Setting.Application","notifcationSettings")||[];for(let s of e)if(t===s.app&&"off"===s.dsmnotify)return!0}sendDesktopNotification(t,e){e=Ext.util.Format.stripTags(e);let s=new window.Notification(t,{body:e,icon:"webman/resources/images/icon_dsm_64.png?v=4933"});s.onshow=function(){setTimeout((function(){s.close()}),1e4)}}notify(t,e,s,n,i){if(this.needSkip(t))return;!0===i&&(e=Ext.util.Format.htmlEncode(e),s=Ext.util.Format.htmlEncode(s)),"number"!=typeof n&&(n=5e3);let o=!1;if((-1<s.indexOf("<input ")||-1<s.indexOf("<a "))&&(o=!0),!o&&window.Notification&&"granted"===window.Notification.permission&&SYNO.SDS.UserSettings.getProperty("Desktop","enableDesktopNotification"))this.sendDesktopNotification(e,s);else{let t=this.createTray(e,s,n);if(!t)return void SYNO.Debug("cannot found notification instance.");this.showNotification(t)}}}class xe extends Te{constructor(){super(),this._vueWrapper=null}get vueWrapper(){return this._vueWrapper}createInstance(t){let e=document.createElement("div"),s=document.createDocumentFragment();return s.appendChild(e),t.$mount(e),this._notifyTray=this.findNotificationVueInst(t),this._notifyTray&&document.querySelector("body").appendChild(s),this._notifyTray}createTray(t,e,s){return this._vueWrapper=new _e({propsData:{config:{title:t,body:e,activeDuration:s}}}),this.createInstance(this._vueWrapper)}findNotificationVueInst(t){if("Notification"===t.$options.name)return t;if(t.$children.length>0)for(var e=t.$children,s=0;e[s];++s){var n=e[s];if("Notification"===n.$options.name)return n;n.$children.length>0&&(e=e.concat(n.$children))}return null}showNotification(t){SYNO.SDS.StatusNotifier.fireEvent("systemTrayNotifyMsg"),t.show()}}class Ne extends xe{createTray(t){return this.createInstance(t)}notify(t,e){if(this.needSkip(t))return;if(!(e instanceof Vue))return void SYNO.Debug(e," is not a vue instance");this._vueWrapper=e;let s=this.createTray(e);if(!s)return void SYNO.Debug("cannot found notification instance.");let n=!1;s.$el&&(-1<s.$el.innerHTML.indexOf("<input ")||-1<s.$el.innerHTML.indexOf("<a "))&&(n=!0),!n&&window.Notification&&"granted"===window.Notification.permission&&SYNO.SDS.UserSettings.getProperty("Desktop","enableDesktopNotification")?(this.sendDesktopNotification(s.title,s.$el.innerHTML),s.$destroy()):this.showNotification(s)}}SYNO.SDS.SystemTray={notifyMsg(...t){return SYNO.Deprecated("SYNO.SDS.SystemTray","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.notifyMsg(...t)},notifyVueMsg(...t){return SYNO.Deprecated("SYNO.SDS.SystemTray","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.notifyVueMsg(...t)},notifyVueCustomizeMsg(...t){return SYNO.Deprecated("SYNO.SDS.SystemTray","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.notifyVueCustomizeMsg(...t)}},SYNO.SDS._SystemTrayMsgMgr={disable(){SYNO.Deprecated("SYNO.SDS._SystemTrayMsgMgr","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.disable()},enable(){SYNO.Deprecated("SYNO.SDS._SystemTrayMsgMgr","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.enable()},hide(){SYNO.Deprecated("SYNO.SDS._SystemTrayMsgMgr","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.hide()},show(){SYNO.Deprecated("SYNO.SDS._SystemTrayMsgMgr","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.show()},register(...t){SYNO.Deprecated("SYNO.SDS._SystemTrayMsgMgr","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.register(...t)},unregister(...t){SYNO.Deprecated("SYNO.SDS._SystemTrayMsgMgr","SYNO.SDS.NotifyMgr"),SYNO.SDS.NotifyMgr.unregister(...t)}},SYNO.SDS.CreateTaskBar=function(t="sds-taskbar"){const e=document.createElement("div");e.id=t,document.body.appendChild(e);const s=new(Vue.extend(U))({propsData:{mountId:t},store:X});return s.$mount(e),s}
1,SYNO.SDS.CreateBackgroundTrayMgr=function(){return Vue.use(ke),new Mt},SYNO.SDS.SystemAboutWindow=Vue.extend(tt),SYNO.SDS.SystemFeasibilityWindow=Vue.extend(nt),SYNO.SDS.UserMenu=Vue.extend(lt),SYNO.SDS.SearchBox=Vue.extend(ft),SYNO.SDS._NotifyMgr=class{constructor(){this.buttons=[],this.widgetButtons=[],this.msgQueue=[],this.disabled=!1;_S("standalone")&&Object.assign({id:"sds-tray-panel"},{hidden:!0}),SYNO.SDS.Element.on(window,"resize",this.alignAll,this)}notifyMsg(t,e,s,n,i){return this.notifyVueMsg(t,e,s,n,i)}notifyVueMsg(t,e,s,n,i){const o=new xe;return o.notify(t,e,s,n,i),o.instance}notifyVueCustomizeMsg(t,e){let s=new Ne;return s.notify(t,e),s.vueWrapper}alignAll(){let t=SYNO.SDS.TaskBar?SYNO.SDS.TaskBar.height()+8:8;for(let e=0;e<this.msgQueue.length;++e){const s=this.msgQueue[e];s&&(s.setTop(t),t+=s.getHeight()-6)}}register(t){if(this.disabled)return;let e=0;for(;this.msgQueue[e];)e++;this.msgQueue[e]=t,t._show(),this.alignAll()}unregister(t){if(this.disabled)return;let e=this.msgQueue.indexOf(t);-1!==e&&(t.$destroy&&t.$destroy(),this.msgQueue[e]=null)}disable(){this.hide(),this.disabled=!0}enable(){this.show(),this.disabled=!1}isDisabled(){return this.disabled}hide(){for(const t of this.msgQueue)t&&t.setVisible&&t.setVisible(!1)}show(){for(const t of this.msgQueue)t&&t.setVisible&&t.setVisible(!0)}}}()}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.