PageSourceSearch

https://lendering.com/webman/desktop/dist/dsm.desktop.bundle.js?v=1780907689

js lendering.com collected 2026-09-26 14:34:57 UTC 103,201 bytes, 1 lines download raw bytes

vendor: 15,968 bytes, line 1
1!function(){var t={2545:function(t,e,o){var i=o(1822)(o(7400),"DataView");t.exports=i},6586:function(t,e,o){var i=o(7753),n=o(2452),s=o(2115),r=o(8256),a=o(7426);function c(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var i=t[e];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=n,c.prototype.get=s,c.prototype.has=r,c.prototype.set=a,t.exports=c},6301:function(t,e,o){var i=o(9417),n=o(2470),s=o(6165),r=o(1873),a=o(2556);function c(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var i=t[e];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=n,c.prototype.get=s,c.prototype.has=r,c.prototype.set=a,t.exports=c},4538:function(t,e,o){var i=o(1822)(o(7400),"Map");t.exports=i},4554:function(t,e,o){var i=o(9448),n=o(7738),s=o(6575),r=o(7238),a=o(8738);function c(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var i=t[e];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=n,c.prototype.get=s,c.prototype.has=r,c.prototype.set=a,t.exports=c},4825:function(t,e,o){var i=o(1822)(o(7400),"Promise");t.exports=i},6151:function(t,e,o){var i=o(1822)(o(7400),"Set");t.exports=i},3694:function(t,e,o){var i=o(6301),n=o(7354),s=o(5863),r=o(2367),a=o(748),c=o(7569);function u(t){var e=this.__data__=new i(t);this.size=e.size}u.prototype.clear=n,u.prototype.delete=s,u.prototype.get=r,u.prototype.has=a,u.prototype.set=c,t.exports=u},6539:function(t,e,o){var i=o(7400).Symbol;t.exports=i},9942:function(t,e,o){var i=o(7400).Uint8Array;t.exports=i},6902:function(t,e,o){var i=o(1822)(o(7400),"WeakMap");t.exports=i},594:function(t){t.exports=function(t,e){for(var o=-1,i=null==t?0:t.length;++o<i&&!1!==e(t[o],o,t););return t}},263:function(t){t.exports=function(t,e){for(var o=-1,i=null==t?0:t.length,n=0,s=[];++o<i;){var r=t[o];e(r,o,t)&&(s[n++]=r)}return s}},8213:function(t,e,o){var i=o(4701),n=o(2900),s=o(9785),r=o(3854),a=o(2383),c=o(8519),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var o=s(t),l=!o&&n(t),h=!o&&!l&&r(t),d=!o&&!l&&!h&&c(t),p=o||l||h||d,m=p?i(t.length,String):[],g=m.length;for(var f in t)!e&&!u.call(t,f)||p&&("length"==f||h&&("offset"==f||"parent"==f)||d&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||a(f,g))||m.push(f);return m}},7141:function(t){t.exports=function(t,e){for(var o=-1,i=e.length,n=t.length;++o<i;)t[n+o]=e[o];return t}},1928:function(t,e,o){var i=o(8799),n=o(5638),s=Object.prototype.hasOwnProperty;t.exports=function(t,e,o){var r=t[e];s.call(t,e)&&n(r,o)&&(void 0!==o||e in t)||i(t,e,o)}},3382:function(t,e,o){var i=o(5638);t.exports=function(t,e){for(var o=t.length;o--;)if(i(t[o][0],e))return o;return-1}},1876:function(t,e,o){var i=o(5159),n=o(98);t.exports=function(t,e){return t&&i(e,n(e),t)}},5947:function(t,e,o){var i=o(5159),n=o(3893);t.exports=function(t,e){return t&&i(e,n(e),t)}},8799:function(t,e,o){var i=o(2630);t.exports=function(t,e,o){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}},699:function(t,e,o){var i=o(3694),n=o(594),s=o(1928),r=o(1876),a=o(5947),c=o(2734),u=o(7561),l=o(1102),h=o(7048),d=o(1385),p=o(9759),m=o(3533),g=o(6541),f=o(2078),S=o(7635),v=o(9785),y=o(3854),w=o(8247),I=o(1611),b=o(7614),k=o(98),D=o(3893),x="[object Arguments]",$="[object Function]",N="[object Object]",_={};_[x]=_["[object Array]"]=_["[object ArrayBuffer]"]=_["[object DataView]"]=_["[object Boolean]"]=_["[object Date]"]=_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Map]"]=_["[object Number]"]=_[N]=_["[object RegExp]"]=_["[object Set]"]=_["[object String]"]=_["[object Symbol]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_["[object Error]"]=_[$]=_["[object WeakMap]"]=!1,t.exports=function t(e,o,C,O,T,A){var M,E=1&o,Y=2&o,P=4&o;if(C&&(M=T?C(e,O,T,A):C(e)),void 0!==M)return M;if(!I(e))return e;var B=v(e);if(B){if(M=g(e),!E)return u(e,M)}else{var j=m(e),F=j==$||"[object GeneratorFunction]"==j;if(y(e))return c(e,E);if(j==N||j==x||F&&!T){if(M=Y||F?{}:S(e),!E)return Y?h(e,a(M,e)):l(e,r(M,e))}else{if(!_[j])return T?e:{};M=f(e,j,E)}}A||(A=new i);var L=A.get(e);if(L)return L;A.set(e,M),b(e)?e.forEach((function(i){M.add(t(i,o,C,i,e,A))})):w(e)&&e.forEach((function(i,n){M.set(n,t(i,o,C,n,e,A))}));var V=B?void 0:(P?Y?p:d:Y?D:k)(e);return n(V||e,(function(i,n){V&&(i=e[n=i]),s(M,n,t(i,o,C,n,e,A))})),M}},158:function(t,e,o){var i=o(1611),n=Object.create,s=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var o=new t;return t.prototype=void 0,o}}();t.exports=s},1324:function(t,e,o){var i=o(7141),n=o(9785);t.exports=function(t,e,o){var s=e(t);return n(t)?s:i(s,o(t))}},9736:function(t,e,o){var i=o(6539),n=o(4840),s=o(1258),r=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?n(t):s(t)}},5829:function(t,e,o){var i=o(9736),n=o(2360);t.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}},7657:function(t,e,o){var i=o(3533),n=o(2360);t.exports=function(t){return n(t)&&"[object Map]"==i(t)}},6729:function(t,e,o){var i=o(8338),n=o(9678),s=o(1611),r=o(6532),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,d=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||n(t))&&(i(t)?d:a).test(r(t))}},6903:function(t,e,o){var i=o(3533),n=o(2360);t.exports=function(t){return n(t)&&"[object Set]"==i(t)}},6972:function(t,e,o){var i=o(9736),n=o(4194),s=o(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 s(t)&&n(t.length)&&!!r[i(t)]}},186:function(t,e,o){var i=o(6016),n=o(962),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return n(t);var e=[];for(var o in Object(t))s.call(t,o)&&"constructor"!=o&&e.push(o);return e}},9464:function(t,e,o){var i=o(1611),n=o(6016),s=o(1586),r=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return s(t);var e=n(t),o=[];for(var a in t)("constructor"!=a||!e&&r.call(t,a))&&o.push(a);return o}},4701:function(t){t.exports=function(t,e){for(var o=-1,i=Array(t);++o<t;)i[o]=e(o);return i}},4833:function(t,e,o){var i=o(6127),n=/^\s+/;t.exports=function(t){return t?t.slice(0,i(t)+1).replace(n,""):t}},9334:function(t){t.exports=function(t){return function(e){return t(e)}}},5825:function(t,e,o){var i=o(9942);t.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}},2734:function(t,e,o){t=o.nmd(t);var i=o(7400),n=e&&!e.nodeType&&e,s=n&&t&&!t.nodeType&&t,r=s&&s.exports===n?i.Buffer:void 0,a=r?r.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var o=t.length,i=a?a(o):new t.constructor(o);return t.copy(i),i}},1859:function(t,e,o){var i=o(5825);t.exports=function(t,e){var o=e?i(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.byteLength)}},9377:function(t){var e=/\w*$/;t.exports=function(t){var o=new t.constructor(t.source,e.exec(t));return o.lastIndex=t.lastIndex,o}},4116:function(t,e,o){var i=o(6539),n=i?i.prototype:void 0,s=n?n.valueOf:void 0;t.exports=function(t){return s?Object(s.call(t)):{}}},3428:function(t,e,o){var i=o(5825);t.exports=function(t,e){var o=e?i(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}},7561:function(t){t.exports=function(t,e){var o=-1,i=t.length;for(e||(e=Array(i));++o<i;)e[o]=t[o];return e}},5159:function(t,e,o){var i=o(1928),n=o(8799);t.exports=function(t,e,o,s){var r=!o;o||(o={});for(var a=-1,c=e.length;++a<c;){var u=e[a],l=s?s(o[u],t[u],u,o,t):void 0;void 0===l&&(l=t[u]),r?n(o,u,l):i(o,u,l)}return o}},1102:function(t,e,o){var i=o(5159),n=o(3080);t.exports=function(t,e){return i(t,n(t),e)}},7048:function(t,e,o){var i=o(5159),n=o(791);t.exports=function(t,e){return i(t,n(t),e)}},4937:function(t,e,o){var i=o(7400)["__core-js_shared__"];t.exports=i},2630:function(t,e,o){var i=o(1822),n=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=n},9120:function(t,e,o){var i="object"==typeof o.g&&o.g&&o.g.Object===Object&&o.g;t.exports=i},1385:function(t,e,o){var i=o(1324),n=o(3080),s=o(98);t.exports=function(t){return i(t,s,n)}},9759:function(t,e,o){var i=o(1324),n=o(791),s=o(3893);t.exports=function(t){return i(t,s,n)}},5899:function(t,e,o){var i=o(4479);t.exports=function(t,e){var o=t.__data__;return i(e)?o["string"==typeof e?"string":"hash"]:o.map}},1822:function(t,e,o){var i=o(6729),n=o(5371);t.exports=function(t,e){var o=n(t,e);return i(o)?o:void 0}},2173:function(t,e,o){var i=o(8023)(Object.getPrototypeOf,Object);t.exports=i},4840:function(t,e,o){var i=o(6539),n=Object.prototype,s=n.hasOwnProperty,r=n.toString,a=i?i.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),o=t[a];try{t[a]=void 0;var i=!0}catch(t){}var n=r.call(t);return i&&(e?t[a]=o:delete t[a]),n}},3080:function(t,e,o){var i=o(263),n=o(5937),s=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols,a=r?function(t){return null==t?[]:(t=Object(t),i(r(t),(function(e){return s.call(t,e)})))}:n;t.exports=a},791:function(t,e,o){var i=o(7141),n=o(2173),s=o(3080),r=o(5937),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)i(e,s(t)),t=n(t);return e}:r;t.exports=a},3533:function(t,e,o){var i=o(2545),n=o(4538),s=o(4825),r=o(6151),a=o(6902),c=o(9736),u=o(6532),l="[object Map]",h="[object Promise]",d="[object Set]",p="[object WeakMap]",m="[object DataView]",g=u(i),f=u(n),S=u(s),v=u(r),y=u(a),w=c;(i&&w(new i(new ArrayBuffer(1)))!=m||n&&w(new n)!=l||s&&w(s.resolve())!=h||r&&w(new r)!=d||a&&w(new a)!=p)&&(w=function(t){var e=c(t),o="[object Object]"==e?t.constructor:void 0,i=o?u(o):"";if(i)switch(i){case g:return m;case f:return l;case S:return h;case v:return d;case y:return p}return e}),t.exports=w},5371:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},7753:function(t,e,o){var i=o(5718);t.exports=function(){this.__data__=i?i(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,o){var i=o(5718),n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var o=e[t];return"__lodash_hash_undefined__"===o?void 0:o}return n.call(e,t)?e[t]:void 0}},8256:function(t,e,o){var i=o(5718),n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}},7426:function(t,e,o){var i=o(5718);t.exports=function(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},6541:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t){var o=t.length,i=new t.constructor(o);return o&&"string"==typeof t[0]&&e.call(t,"index")&&(i.index=t.index,i.input=t.input),i}},2078:function(t,e,o){var i=o(5825),n=o(1859),s=o(9377),r=o(4116),a=o(3428);t.exports=function(t,e,o){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return i(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return n(t,o);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,o);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return s(t);case"[object Symbol]":return r(t)}}},7635:function(t,e,o){var i=o(158),n=o(2173),s=o(6016);t.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:i(n(t))}},2383:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,o){var i=typeof t;return!!(o=null==o?9007199254740991:o)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t<o}},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,o){var i,n=o(4937),s=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!s&&s in t}},6016:function(t){var e=Object.prototype;t.exports=function(t){var o=t&&t.constructor;return t===("function"==typeof o&&o.prototype||e)}},9417:function(t){t.exports=function(){this.__data__=[],this.size=0}},2470:function(t,e,o){var i=o(3382),n=Array.prototype.splice;t.exports=function(t){var e=this.__data__,o=i(e,t);return!(o<0||(o==e.length-1?e.pop():n.call(e,o,1),--this.size,0))}},6165:function(t,e,o){var i=o(3382);t.exports=function(t){var e=this.__data__,o=i(e,t);return o<0?void 0:e[o][1]}},1873:function(t,e,o){var i=o(3382);t.exports=function(t){return i(this.__data__,t)>-1}},2556:function(t,e,o){var i=o(3382);t.exports=function(t,e){var o=this.__data__,n=i(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this}},9448:function(t,e,o){var i=o(6586),n=o(6301),s=o(4538);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(s||n),string:new i}}},7738:function(t,e,o){var i=o(5899);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},6575:function(t,e,o){var i=o(5899);t.exports=function(t){return i(this,t).get(t)}},7238:function(t,e,o){var i=o(5899);t.exports=function(t){return i(this,t).has(t)}},8738:function(t,e,o){var i=o(5899);t.exports=function(t,e){var o=i(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this}},5718:function(t,e,o){var i=o(1822)(Object,"create");t.exports=i},962:function(t,e,o){var i=o(8023)(Object.keys,Object);t.exports=i},1586:function(t){t.exports=function(t){var e=[];if(null!=t)for(var o in Object(t))e.push(o);return e}},8125:function(t,e,o){t=o.nmd(t);var i=o(9120),n=e&&!e.nodeType&&e,s=n&&t&&!t.nodeType&&t,r=s&&s.exports===n&&i.process,a=function(){try{return s&&s.require&&s.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(o){return t(e(o))}}},7400:function(t,e,o){var i=o(9120),n="object"==typeof self&&self&&self.Object===Object&&self,s=i||n||Function("return this")();t.exports=s},7354:function(t,e,o){var i=o(6301);t.exports=function(){this.__data__=new i,this.size=0}},5863:function(t){t.exports=function(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}},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,o){var i=o(6301),n=o(4538),s=o(4554);t.exports=function(t,e){var o=this.__data__;if(o instanceof i){var r=o.__data__;if(!n||r.length<199)return r.push([t,e]),this.size=++o.size,this;o=this.__data__=new s(r)}return o.set(t,e),this.size=o.size,this}},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""}},6127:function(t){var e=/\s/;t.exports=function(t){for(var o=t.length;o--&&e.test(t.charAt(o)););return o}},454:function(t,e,o){var i=o(699);t.exports=function(t){return i(t,5)}},6726:function(t,e,o){var i=o(1611),n=o(2846),s=o(1936),r=Math.max,a=Math.min;t.exports=function(t,e,o){var c,u,l,h,d,p,m=0,g=!1,f=!1,S=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var o=c,i=u;
1return c=u=void 0,m=e,h=t.apply(i,o)}function y(t){return m=t,d=setTimeout(I,e),g?v(t):h}function w(t){var o=t-p;return void 0===p||o>=e||o<0||f&&t-m>=l}function I(){var t=n();if(w(t))return b(t);d=setTimeout(I,function(t){var o=e-(t-p);return f?a(o,l-(t-m)):o}(t))}function b(t){return d=void 0,S&&c?v(t):(c=u=void 0,h)}function k(){var t=n(),o=w(t);if(c=arguments,u=this,p=t,o){if(void 0===d)return y(p);if(f)return clearTimeout(d),d=setTimeout(I,e),v(p)}return void 0===d&&(d=setTimeout(I,e)),h}return e=s(e)||0,i(o)&&(g=!!o.leading,l=(f="maxWait"in o)?r(s(o.maxWait)||0,e):l,S="trailing"in o?!!o.trailing:S),k.cancel=function(){void 0!==d&&clearTimeout(d),m=0,c=p=u=d=void 0},k.flush=function(){return void 0===d?h:b(n())},k}},5638:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},2900:function(t,e,o){var i=o(5829),n=o(2360),s=Object.prototype,r=s.hasOwnProperty,a=s.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(t){return n(t)&&r.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},9785:function(t){var e=Array.isArray;t.exports=e},68:function(t,e,o){var i=o(8338),n=o(4194);t.exports=function(t){return null!=t&&n(t.length)&&!i(t)}},3854:function(t,e,o){t=o.nmd(t);var i=o(7400),n=o(7714),s=e&&!e.nodeType&&e,r=s&&t&&!t.nodeType&&t,a=r&&r.exports===s?i.Buffer:void 0,c=(a?a.isBuffer:void 0)||n;t.exports=c},8338:function(t,e,o){var i=o(9736),n=o(1611);t.exports=function(t){if(!n(t))return!1;var e=i(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,o){var i=o(7657),n=o(9334),s=o(8125),r=s&&s.isMap,a=r?n(r):i;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}},7614:function(t,e,o){var i=o(6903),n=o(9334),s=o(8125),r=s&&s.isSet,a=r?n(r):i;t.exports=a},5193:function(t,e,o){var i=o(9736),n=o(2360);t.exports=function(t){return"symbol"==typeof t||n(t)&&"[object Symbol]"==i(t)}},8519:function(t,e,o){var i=o(6972),n=o(9334),s=o(8125),r=s&&s.isTypedArray,a=r?n(r):i;t.exports=a},98:function(t,e,o){var i=o(8213),n=o(186),s=o(68);t.exports=function(t){return s(t)?i(t):n(t)}},3893:function(t,e,o){var i=o(8213),n=o(9464),s=o(68);t.exports=function(t){return s(t)?i(t,!0):n(t)}},2846:function(t,e,o){var i=o(7400);t.exports=function(){return i.Date.now()}},5937:function(t){t.exports=function(){return[]}},7714:function(t){t.exports=function(){return!1}},9783:function(t,e,o){var i=o(6726),n=o(1611);t.exports=function(t,e,o){var s=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return n(o)&&(s="leading"in o?!!o.leading:s,r="trailing"in o?!!o.trailing:r),i(t,e,{leading:s,maxWait:e,trailing:r})}},1936:function(t,e,o){var i=o(4833),n=o(1611),s=o(5193),r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(s(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=i(t);var o=a.test(t);return o||c.test(t)?u(t.slice(2),o?2:8):r.test(t)?NaN:+t}}},e={};function o(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={id:i,loaded:!1,exports:{}};return t[i](s,s.exports,o),s.loaded=!0,s.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){"use strict";var t=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{class:t.desktopCls,style:t.viewStyle,attrs:{id:t.mountId},on:{scroll:t.onScroll}},[o("v-shortcut-area",{ref:"area",attrs:{"mount-id":t.mountId,"icon-items":t.validIconItems,"icon-category":t.iconCategory},on:{"update:iconItems":function(e){t.validIconItems=e},"update:icon-items":function(e){t.validIconItems=e},"save-state":t.onSaveState}}),t._v(" "),t.showFooterBtn?o("footer-btn",{attrs:{"custom-class":t.footerCls,title:t.footerTitle},on:{click:t.onClickFooterBtn}}):t._e()],1)};function e(t){const e=new SYNO.SDS.DesktopStyleParser;SYNO.SDS.Element.addStyle(document.documentElement,"background-image",`url(${e.getDefaultWallpaperPath()})`),SYNO.SDS.Element.addStyle(document.documentElement,"background-color","transparent"),SYNO.SDS.Element.addStyle(document.documentElement,"background-position","center center"),SYNO.SDS.Element.addStyle(document.documentElement,"background-repeat","no-repeat"),SYNO.SDS.Element.addStyle(document.documentElement,"background-size","cover"),t&&t.show()}function i(){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)}))}t._withStripped=!0;var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ul",{staticClass:"sds-desktop-shortcut",attrs:{role:"menu",id:"sds-desktop-shortcut"}},[o("v-layout",{ref:"layout",attrs:{"aria-label":t.$i18n("common","desktop"),"icon-width":t.iconWidth,"icon-height":t.iconHeight,"horizontal-margin":4,"icon-items":t.iconItems,"icon-category":t.iconCategory,"multiple-select":t.multipleSelect},on:{"over-item":t.overItem,reposition:t.rePosition,"drop-on-desktop":t.onDropOnDesktop,"drop-on-container":t.onDropOnContainer,"update:iconItems":t.updateIconItems,drop:t.onDrop,"add-icon-item":t.onAddIconItem,"remove-icon-item":t.onRemoveIconItem,"update:multipleSelect":function(e){t.multipleSelect=e},"update:multiple-select":function(e){t.multipleSelect=e},"start-drag":t.onStartDrag,"save-state":t.onSaveState},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.onTabKeyDown.apply(null,arguments)}}}),t._v(" "),o("v-select-range",{ref:"selectRange",on:{"selected-index":t.onSelectedIndex}})],1)};n._withStripped=!0;var s=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition-group",{ref:"transition-group",staticClass:"sds-desktop-layout",attrs:{tabindex:"0",name:"remove",tag:"div"},nativeOn:{focus:function(e){return t.onFocus.apply(null,arguments)},keydown:function(e){return t.onKeyDown.apply(null,arguments)}}},[t._l(t.iconItems,(function(e,i){return[t.isAppItem(e)?o("v-app-item",t._b({key:e.id,ref:"items",refInFor:!0,attrs:{tabindex:"0","icon-category":t.iconCategory,index:i,"row-cnt":t.rowCnt,"col-cnt":t.colCnt,"icon-width":t.iconWidth,"icon-height":t.iconHeight,layout:t.layout,"default-anim":t.defaultAnim,"container-shown":t.containerShown,"vertical-margin":t.verticalMargin,"horizontal-margin":t.horizontalMargin},on:{remove:t.onRemoveIconItem,"launch-app":t.onLaunchApp,"save-state":t.onSaveState,"add-to-desktop":t.onAddToDesktop},nativeOn:{focus:function(o){return t.onItemFocus(e.id)}}},"v-app-item",e,!1)):t.isDropdownItem(e)?o("v-dropdown-item",t._b({key:e.id,ref:"items",refInFor:!0,attrs:{tabindex:"0","icon-category":t.iconCategory,index:i,"row-cnt":t.rowCnt,"col-cnt":t.colCnt,layout:t.layout,"default-anim":t.defaultAnim,"container-shown":t.containerShown,"icon-width":t.iconWidth,"icon-height":t.iconHeight,"vertical-margin":t.verticalMargin,"horizontal-margin":t.horizontalMargin},on:{remove:t.onRemoveIconItem,"launch-app":t.onLaunchApp,"save-state":t.onSaveState,"add-to-desktop":t.onAddToDesktop},nativeOn:{focus:function(o){return t.onItemFocus(e.id)}}},"v-dropdown-item",e,!1)):t.isVirtualGroup(e)?o("v-virtual-group-item",t._b({key:e.id,ref:"items",refInFor:!0,attrs:{tabindex:"0","sub-items":e.subItems,"virtual-group-title":e.virtualGroupTitle,"icon-category":t.iconCategory,index:i,"row-cnt":t.rowCnt,"col-cnt":t.colCnt,"icon-width":t.iconWidth,"icon-height":t.iconHeight,layout:t.layout,"default-anim":t.defaultAnim,"container-shown":t.containerShown,"vertical-margin":t.verticalMargin,"horizontal-margin":t.horizontalMargin}
1,on:{"update:subItems":function(o){return t.$set(e,"subItems",o)},"update:sub-items":function(o){return t.$set(e,"subItems",o)},"update:virtualGroupTitle":function(o){return t.$set(e,"virtualGroupTitle",o)},"update:virtual-group-title":function(o){return t.$set(e,"virtualGroupTitle",o)},"launch-app":t.onLaunchApp,"save-state":t.onSaveState,"show-sub-container":t.onSubContainerShow,"hide-sub-container":t.onSubContainerHide,"add-icon-item":t.onAddIconItem,remove:t.onRemoveIconItem},nativeOn:{focus:function(o){return t.onItemFocus(e.id)}}},"v-virtual-group-item",e,!1)):o("v-icon-item",t._b({key:e.id,ref:"items",refInFor:!0,attrs:{tabindex:"0","icon-category":t.iconCategory,index:i,"row-cnt":t.rowCnt,"col-cnt":t.colCnt,"icon-width":t.iconWidth,"icon-height":t.iconHeight,"vertical-margin":t.verticalMargin,"horizontal-margin":t.horizontalMargin,layout:t.layout,"default-anim":t.defaultAnim,"container-shown":t.containerShown},on:{remove:t.onRemoveIconItem,"launch-app":t.onLaunchApp,"save-state":t.onSaveState},nativeOn:{focus:function(o){return t.onItemFocus(e.id)}}},"v-icon-item",e,!1))]}))],2)};s._withStripped=!0;var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("li",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.tip,expression:"tip"},{name:"clickoutside",rawName:"v-clickoutside",value:t.onClickOutside,expression:"onClickOutside"},{name:"long-press",rawName:"v-long-press",value:t.onContextMenu,expression:"onContextMenu"}],staticClass:"launch-icon icon-item",class:t.itemCls,style:t.itemStyle,attrs:{"aria-label":t.displayDesc,role:"menuitem",index:t.index,"syno-id":t.className},on:{click:t.onClick,keydown:t.onKeyDown,contextmenu:t.onContextMenu,mouseenter:t.onHover}},[o("div",{staticClass:"image",class:t.imageCls,style:t.iconStyle},[o("div",{ref:"badge-wrap",staticClass:"sds-application-notify-badge-num-wrap"},[o("transition",{attrs:{name:"bounce"}},[t.hasBadge?o("badge",{key:t.badgeNum}):t._e()],1)],1)]),t._v(" "),t.showStatusIcon?o("status-icon",{attrs:{"is-loading-status":t.isLoadingStatus,size:t.isClassical?"small":""}}):t._e(),t._v(" "),o("item-title",{style:t.textStyle,attrs:{text:t.localizeTitle}}),t._v(" "),t.showMenu?o("v-portal",{attrs:{"mount-to":"#sds-desktop","target-style":t.menuStyle}},[t.showMenu?o("v-menu",{ref:"menu",attrs:{"syno-id":"icon-item-icon-item-menu-0",width:"auto"},on:{"menu-close":function(e){t.showMenu=!1}}},[t.canOpenNewWindow?o("v-menu-item",{attrs:{"syno-id":"icon-item-icon-item-menu-item-0"},on:{click:t.openNewWindow}},[t._v(t._s(t.$i18n("desktop","open_in_new_window")))]):t._e(),t._v(" "),o("v-menu-item",{attrs:{"syno-id":"icon-item-icon-item-menu-item-1"},on:{click:function(e){return t.remove({saveState:!0})}}},[t._v(t._s(t.$i18n("desktop","remove_shortcut")))])],1):t._e()],1):t._e()],1)};r._withStripped=!0;var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("li",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.tip,expression:"tip"}],staticClass:"launch-icon",class:t.itemCls,style:t.itemStyle,attrs:{"aria-label":t.desc,role:"menuitem",index:t.index,"syno-id":t.id},on:{keydown:t.onKeyDown}},[o("div",{staticClass:"image icon-title",class:t.imageCls}),t._v(" "),o("item-title",{attrs:{text:t.localizeTitle}})],1)};function c(){}function u(t,e,o,i,n,s,r,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=o,u._compiled=!0),i&&(u.functional=!0),s&&(u._scopeId="data-v-"+s),r?(c=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__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=c):n&&(c=a?function(){n.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:n),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}a._withStripped=!0;var l=u({components:{itemTitle:{functional:!0,name:"ItemTitle",props:{text:{type:String,default:""}},render(t,{props:e,data:o}){const i=e.text.split("<br>").reduce(((e,o,i)=>(i>0&&e.push(t("br")),e.push(o),e)),[]);return t("div",{staticClass:"text",attrs:{elementtiming:"desktop-item-title"},style:o.style},i)}}},props:{id:{type:String,default:void 0},updateCnt:{type:Number,default:0},type:{type:String,default:void 0},url:{type:String,default:void 0},inVirtualGroup:{type:Boolean,default:!1},className:{type:String,default:""},jsID:{type:String,default:""},needHide:{type:Boolean,default:!1},needUpdate:{type:Boolean,default:!1},iconCategory:{type:String,default:"Desktop"},packageStatus:{type:String,default:null},isPackage:{type:Boolean,default:!1},pkgId:{type:String,default:void 0},index:{type:Number,default:-1},colCnt:{type:Number,default:0},rowCnt:{type:Number,default:0},iconWidth:{type:Number,default:0},iconHeight:{type:Number,default:0},horizontalMargin:{type:Number,default:0},verticalMargin:{type:Number,default:0},layout:{type:String,default:"row"},isSelected:{type:Boolean,default:!1},defaultAnim:{type:Boolean,default:!0},containerShown:{type:Boolean,default:!1},icon:{type:String,default:void 0},absoluteIcon:{type:String,default:void 0},isModule:{type:Boolean,default:!1},moduleTitle:{type:String,default:void 0},param:{type:Object,default:void 0},withShadow:{type:Boolean,default:!1}},data(){return{currentPackageStatus:this.packageStatus,desc:void 0,repositionAnim:!1,itemStyle:{left:"0px",top:"0px"},mounted:!1,showMenu:!1,menuX:0,menuY:0,tip:""}},computed:{canOpenNewWindow(){if(this.isModule)return!1;const t=SYNO.SDS.Config.FnMap[this.className||this.jsID],e=this.getType();return"url"===e||"standalone"===e||!0===t.config.allowStandalone||("url"===e||"legacy"===e)&&"_self"!==t.config.urlTarget},isClassical(){return"ClassicalDesktop"===this.iconCategory},iconStyle(){return{"background-image":`url(${this.iconSrc||""})`}},itemCls(){return{"transition-cls":this.repositionAnim,"sds-desktop-icon-selected":this.isSelected,"in-virtual-group":this.inVirtualGroup,"classical-desktop":this.isClassical,[this.currentPackageStatus]:!!this.currentPackageStatus}},imageCls(){return{"with-shadow":this.withShadow}},menuStyle(){return{left:`${this.menuX}px`,top:`${this.menuY}px`}},title(){const{className:t,jsID:e,updateCnt:o}=this,i=SYNO.SDS.Config.FnMap[t||e];
1return i&&i.config?this.isModule?this.moduleTitle:i.config.title:""},formatedTitle(){const{className:t,jsID:e}=this,o=SYNO.SDS.Config.FnMap[t||e];return o&&o.config?o.config.formatedTitle:""},displayDesc(){return this.desc||this.plainTitle||this.title||""},iconSrc(){const{iconCategory:t,className:e,jsID:o,updateCnt:i}=this,n=SYNO.SDS.Config.FnMap[e||o];if(!n||!n.config)return"";let s;return s=this.absoluteIcon?this.absoluteIcon:this.isModule?`${encodeURI(n.config.jsBaseURL)}/${this.icon}`:`${encodeURI(n.config.jsBaseURL)}/${n.config.icon||n.config.icon_32}`,s=SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(s,t),void 0!==n.config.version&&(s=`${s}&app_version=${n.config.version}`),s},plainTitle(){const{title:t,className:e}=this;return SYNO.SDS.UIString.GetLocalizedString(t||"",e)},localizeTitle(){const{title:t,formatedTitle:e,className:o,jsID:i}=this;if(this.isModule)return SYNO.SDS.UIString.GetLocalizedString(this.moduleTitle,o);const n=SYNO.SDS.Config.FnMap[o||i];return n&&n.config?SYNO.SDS.UIString.GetLocalizedString(e||t||"",o):""},showStatusIcon(){return this.currentPackageStatus&&"start"!==this.currentPackageStatus},isLoadingStatus(){return this.currentPackageStatus&&"doing"===this.currentPackageStatus}},watch:{index:{handler(t){const e=this.mounted;this.refreshByIndex(t,e&&this.defaultAnim)},immediate:!0},rowCnt(){this.refreshByIndex(this.index)},colCnt(){this.refreshByIndex(this.index)},defaultAnim(t){!1===t&&(this.repositionAnim=!1)},packageStatus(t){this.currentPackageStatus=t,this.updateTip()},displayDesc(){this.updateTip()}},created(){},async mounted(){await this.$nextTick(),this.mounted=!0,this.updateTip()},methods:{getType(){const t=SYNO.SDS.Config.FnMap[this.className||this.jsID];return this.type||t.config.type},shouldOpenNewWindow(t){const e=SYNO.SDS.Config.FnMap[this.className||this.jsID],o=this.getType();return"url"===o||"standalone"===o||!0===e.config.allowStandalone&&function(t){return t.ctrlKey||t.shiftKey||t.altKey}(t)||"legacy"===o},launch(t){this.$emit("launch-app"),this.launchPackageCenterIfNeeded()||this.launchApp(t)},launchPackageCenterIfNeeded(){return!!SYNO.SDS.Packages.shouldLaunchPkgCenter(this.currentPackageStatus)&&(SYNO.SDS.AppLaunch("SYNO.SDS.PkgManApp.Instance",{action:"open",packages:[this.pkgId]}),!0)},launchApp(t){const e=SYNO.SDS.Config.FnMap[this.className||this.jsID];this.shouldOpenNewWindow(t)?"_self"===e.config.urlTarget?window.onbeforeunload=null:this.openNewWindow():SYNO.SDS.AppLaunch(this.className,this.param,!0)},updateTip(){let t=SYNO.SDS.htmlEncode(this.displayDesc),e="";this.isPackage&&(e=SYNO.SDS.Packages.getPackageTip(this.pkgId),e&&(t+=` - [${e}]`)),this.tip={content:t,isHtml:!0}},onContextMenu(t){this.showMenu=!0,this.menuX=t.pageX,this.menuY=t.pageY},refreshByIndex(t,e){let o,i,n,s,r=this.horizontalMargin,a=this.verticalMargin,c=this.iconWidth,u=this.iconHeight;"col"===this.layout?(o=t%this.colCnt,i=Math.floor(t/this.colCnt)):(o=Math.floor(t/this.rowCnt),i=t%this.rowCnt),n=o*(c+r),s=i*(u+a),this.setPosition([n,s],e)},async setPosition([t,e],o=!1){this.repositionAnim=o,o&&await this.$nextTick(),this.itemStyle={left:`${t}px`,top:`${e}px`}},async remove({saveState:t=!1}={}){this.showMenu=!1,await this.$nextTick(),this.$emit("remove",this.id,{saveState:t})},saveState(){this.$emit("save-state")},onHover(){const t=SYNO.SDS.Config.FnMap[this.className||this.jsID];if(!t)return;const e=this.getType();"url"===e||"standalone"===e||"legacy"===e&&"url"===t.config.urlDefMode||SYNO.SDS.JSLoad(this.className,c)},onClick(t){this.$el.__isDragging||this.launch(t)},onClickOutside(){this.showMenu=!1},onKeyDown(t){if("Enter"===t.key)return this.onKeyEnter(t)},onKeyEnter(t){this.launch(t)}}},a,[],!1,null,null,null);l.options.__file="src/components/icon-item/item.vue";var h=l.exports,d=function(t,e){var o=e._c;return o("div",{staticClass:"item-status-icon",class:e.props.size},[e.props.isLoadingStatus?o("div",{staticClass:"item-outer"},[e._m(0)]):e._e()])};d._withStripped=!0;var p=u({props:{isLoadingStatus:{type:Boolean,default:!1},size:{type:String,default:""}}},d,[function(t,e){var o=e._c;return o("div",{staticClass:"item-inner"},[o("span",{staticClass:"item-loading-bar"})])}],!0,null,null,null);p.options.__file="src/components/icon-item/status-icon.vue";var m=p.exports;function g(t){return!0===t.isVirtualGroup||"SYNO.SDS.VirtualGroup"===t.className}function f(t){return"TEMP"===t.className}function S(t){return SYNO.SDS.StatusNotifier.isAppValid(t.className)&&!0===t.isModule}function v(t){return g(t)?function(t){return!(t.subItems&&t.subItems.length>0)||t.subItems.some((t=>f(t)||v(t)))}(t):f(t)||S(t)||SYNO.SDS.AppUtil.isValidApp(t.className)}function y(t){if(!SYNO.SDS.PollingTask.BadgeInfo)return 0;const e=t.className,o=S(t),i=SYNO.SDS.PollingTask.BadgeInfo.data;if(!i||!i[e])return 0;
1const n=i[e],s=n.time||0,r=n.lastView||0;return n?o&&n.fn&&t.param&&t.param.fn?n.fn[t.param.fn]&&s>=r?n.fn[t.param.fn].unread:0:s>=r?n.unread:0:0}var w=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"notify-badge"})};w._withStripped=!0;var I=u({},w,[],!1,null,null,null);I.options.__file="src/components/badge.vue";var b=I.exports,k={components:{statusIcon:m,Badge:b},extends:h,props:{textColor:{type:String,default:"#FFFFFF"}},data(){return{badgeNum:0}},computed:{hasBadge(){return this.badgeNum>0},textStyle(){return{color:this.textColor}}},async mounted(){await this.$nextTick(),this.updateBadgeNum(),SYNO.SDS.StatusNotifier.on("badgenumget",this.updateBadgeNum,this)},beforeDestroy(){SYNO.SDS.StatusNotifier.un("badgenumget",this.updateBadgeNum,this)},methods:{updateBadgeNum(){if(!SYNO.SDS.PollingTask||!SYNO.SDS.PollingTask.BadgeInfo)return;const t=y(this);this.badgeNum=t},isTemp(){return"TEMP"===this.className},getExtraElements(){return this.$refs.menu?[this.$refs.menu]:[]},openNewWindow(){SYNO.SDS.WindowLaunch(this.className,null,null,this)},onHover(){this.isTemp()||h.methods.onHover.apply(this,arguments)}}},D=u(k,r,[],!1,null,null,null);D.options.__file="src/components/icon-item/icon-item.vue";var x=D.exports,$=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("li",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.tip,expression:"tip"},{name:"clickoutside",rawName:"v-clickoutside",value:t.clickOutside,expression:"clickOutside"},{name:"long-press",rawName:"v-long-press",value:t.onContextMenu,expression:"onContextMenu"}],ref:"virtual-group-item",staticClass:"launch-icon",class:t.itemCls,style:t.itemStyle,attrs:{"aria-label":t.displayDesc,role:"menuitem",index:t.index,"syno-id":t.id},on:{click:function(e){return t.toggleSubContainer(!0)},keydown:t.onKeyDown,contextmenu:t.onContextMenu}},[o("div",{ref:"image",staticClass:"image",on:{mouseleave:t.onMouseLeave,mousemove:t.onMouseMove}},[o("div",{staticClass:"virtual-group-icon-background"}),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.showBigPreview,expression:"showBigPreview"}],staticClass:"sds-grouping-big-preview-icon",style:t.bigPreviewIconStyle}),t._v(" "),t._l(t.previewItems,(function(e,i){return o("div",{directives:[{name:"show",rawName:"v-show",value:!t.showBigPreview,expression:"!showBigPreview"}],key:e.id,staticClass:"sds-grouping-preview-icon",style:t.previewItemStyle(i,e)})})),t._v(" "),o("div",{ref:"badge-wrap",staticClass:"sds-application-notify-badge-num-wrap"},[o("transition",{attrs:{name:"bounce"}},[t.hasBadge?o("badge",{key:t.badgeNum}):t._e()],1)],1)],2),t._v(" "),o("item-title",{style:t.textStyle,attrs:{text:t.localizeTitle}}),t._v(" "),t.showSubContainer?o("v-portal",{attrs:{"mount-to":"#sds-desktop","target-style":t.subContainerStyle}},[o("div",{key:"container",ref:"subContainer",staticClass:"white-scrollerbar sds-sub-container",attrs:{tabindex:"0"}},[o("div",{staticClass:"virtual-group-background"},[o("div",{staticClass:"virtual-group-arrow"})]),t._v(" "),o("div",{staticClass:"virtual-group-input-wrapper"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.title,expression:"title"}],staticClass:"sds-sub-container-desc",attrs:{type:"text",maxlength:"64"},domProps:{value:t.title},on:{input:function(e){e.target.composing||(t.title=e.target.value)}}})]),t._v(" "),o("v-perfect-scrollbar",{ref:"ps"},[o("div",{staticClass:"sds-sub-container-div-ct"},t._l(t.validSubItems,(function(e,i){return o("v-icon-item",t._b({key:e.id,ref:"subItems",refInFor:!0,attrs:{tabindex:"0","icon-category":t.iconCategory,index:i,"col-cnt":3,layout:"col","horizontal-margin":42,"icon-width":64,"icon-height":128,"in-virtual-group":""},on:{"launch-app":function(e){return t.toggleSubContainer(!1)},remove:t.onSubItemRemove,"save-state":t.onSaveState}},"v-icon-item",e,!1))})),1)])],1)]):t._e(),t._v(" "),t.showMenu?o("v-portal",{attrs:{"mount-to":"#sds-desktop","target-style":t.menuStyle}},[o("v-menu",{ref:"menu",attrs:{"syno-id":"icon-item-virtual-group-item-menu-0",width:"auto"},on:{"menu-close":function(e){t.showMenu=!1}}},[o("v-menu-item",{attrs:{"syno-id":"icon-item-virtual-group-item-menu-item-0"},on:{click:function(e){return t.remove({saveState:!0})}}}
1,[t._v(t._s(t.$i18n("desktop","remove_shortcut")))])],1)],1):t._e()],1)};$._withStripped=!0;var N={methods:{notifyOver(){},notifyDrop(){},notifyValidDrop(){},notifyInvalidDrop(){},onDragOver(){},onValidDrop(){},onInvalidDrop(){},onDrop(){},onStartDrag(){},onEndDrag(){},getMultipleTargetGhost(){},getGhostCls(){return this.currentGhostCls||"sds-launch-icon-dragging-proxy x-dd-drag-proxy"},getTargetContent(t){let e;return this.multipleSelect?e=this.getMultipleTargetGhost():(e=t.el.outerHTML,e=e.replace(/left:\s*\w*;/,""),e=e.replace(/top:\s*\w*;/,"")),`\n\t\t\t\t<div class="x-dd-drop-icon"></div>\n\t\t\t\t<div class="x-dd-drag-ghost">\n\t\t\t\t\t${e}\n\t\t\t\t</div>`},removeDragProxy(){if(this.$options.ddTargets)for(const t of this.$options.ddTargets)t.purge();this.$options.ddTargets=[]},initDragProxy(t,e,{newDragZone:o=!1}={}){this.$options.dragZone&&!o||(this.$options.dragZone=new this.$DragZone(e,{order:10,notifyOver:this.notifyOver.bind(this),notifyDrop:this.notifyDrop.bind(this),notifyValidDrop:this.notifyValidDrop.bind(this),notifyInvalidDrop:this.notifyInvalidDrop.bind(this)})),this.$options.ddTargets=[];for(const e of t){if(e.$el._markDraggable){e.$el._ddTarget.ghostCls=this.getGhostCls();continue}const t=new this.$DragDropTarget(e.$el,{ghostCls:this.getGhostCls(),startDrag:this.onStartDrag.bind(this),onDragOver:this.onDragOver.bind(this),onValidDrop:this.onValidDrop.bind(this),onInvalidDrop:this.onInvalidDrop.bind(this),onDrop:this.onDrop.bind(this),endDrag:this.onEndDrag.bind(this),getTargetContent:this.getTargetContent.bind(this)},{});this.$ddm.registerDragTarget(t),this.$options.ddTargets.push(t)}return this.$options.ddTargets}}};const _={PREV_ICON:Symbol("PREV_ICON"),NEXT_ICON:Symbol("NEXT_ICON"),OVER_ICON:Symbol("OVER_ICON")};var C={components:{vIconItem:x},extends:h,mixins:[N],props:{subItems:{type:Array,default:()=>[]},virtualGroupTitle:{type:String,default:""},ghostCls:{type:String,default:"sds-launch-icon-dragging-proxy x-dd-drag-proxy"},textColor:{type:String,default:"#FFFFFF"}},data(){return{badgeNum:0,bigPreviewIconSrc:null,showBigPreview:!1,showSubContainer:!1,subTop:0,subLeft:0,fakeSubItemAdded:!1,taskId:void 0,isDragging:!1,subItemWidth:110,subItemHeight:128,subColCnt:3,currentSubItems:this.subItems}},computed:{hasBadge(){return this.badgeNum>0},textStyle(){return{color:this.textColor}},validSubItems:{set(t){t=t.slice();let e=[];for(let[t,o]of this.currentSubItems.entries())v(o)||e.push({index:t,item:o});this.currentSubItems=t;for(let{index:t,item:o}of e)this.currentSubItems.splice(t,0,o)},get(){return this.currentSubItems.filter((t=>v(t)))}},title:{set(t){this.$emit("update:virtualGroupTitle",t),this.saveState()},get(){return this.virtualGroupTitle}},subContainerStyle(){return{top:`${this.subTop}px`,left:`${this.subLeft}px`}},previewItems(){return this.validSubItems.slice(0,4)},imageWidth(){return"Desktop"===this.iconCategory?64:48},bigPreviewIconStyle(){return{backgroundImage:this.bigPreviewIconSrc?`url('${this.bigPreviewIconSrc}')`:"none"}},previewItemWidth(){return"Desktop"===this.iconCategory?28:20},previewItemHeight(){return"Desktop"===this.iconCategory?28:20},currentGhostCls(){let t=this.ghostCls;return"ClassicalDesktop"===this.iconCategory&&(t+=" classical"),t},previewIconCategory(){return"ClassicalDesktop"===this.iconCategory?"HeaderV4":"Header"}},watch:{async showSubContainer(t){if(t){await this.$nextTick();const[t,e]=this.$alignManager.getAlignToXY(this.$refs.subContainer,this.$refs.image,"l->r",[16,0]);this.subTop=e,this.subLeft=t,this.removeDragProxy(),this.initDragProxy(this.$refs.subItems,this.$refs.subContainer,{newDragZone:!0}),await this.$nextTick(),this.$refs.subContainer.focus(),this.$emit("show-sub-container",this.$options.dragZone,this)}else this.removeTempSubItem(),this.$emit("hide-sub-container",this)},subItems:{async handler(t){this.currentSubItems=t,await this.$nextTick(),this.$refs.subItems&&this.$refs.subContainer&&this.initDragProxy(this.$refs.subItems,this.$refs.subContainer)},immediate:!0}},async mounted(){await this.$nextTick(),this.updateBadgeNum(),SYNO.SDS.StatusNotifier.on("badgenumget",this.updateBadgeNum,this)},beforeDestroy(){SYNO.SDS.StatusNotifier.un("badgenumget",this.updateBadgeNum,this)},methods:{updateBadgeNum(){if(!SYNO.SDS.PollingTask||!SYNO.SDS.PollingTask.BadgeInfo)return;const t=this.validSubItems.reduce(((t,e)=>
1t+y(e)),0);this.badgeNum=t},onDrop(){this.saveState()},getExtraElements(){let t=[];return this.$refs.subContainer&&t.push(this.$refs.subContainer),this.$refs.menu&&t.push(this.$refs.menu),this.$refs.subItems&&(t=t.concat(this.$refs.subItems)),t},onStartDrag(t,e,o){this.isDragging=!0,this.registerDesktopZone(o)},onEndDrag(){window.setTimeout((()=>{this.isDragging=!1}),0)},registerDesktopZone(t){const e=new this.$DragZone(document.querySelector("#sds-desktop"),{notifyValidDrop:this.dropOnDesktop.bind(this)});t.registerDragZones([this.$options.dragZone,e])},dropOnDesktop(t,e,o){const i=+o.el.getAttribute("index"),n=this.validSubItems[i];this.$emit("add-icon-item",n);const s=this.validSubItems.filter((t=>t!==n));this.validSubItems=s,this.taskId&&window.clearTimeout(this.taskId),0===s.length?this.destroy({saveState:!0}):this.$emit("update:subItems",this.currentSubItems)},toggleSubContainer(t){this.showSubContainer=t},async destroy({saveState:t=!1}={}){this.showSubContainer=!1,await this.$nextTick(),await this.remove({saveState:t}),this.$destroy()},async remove({saveState:t=!1}={}){this.showMenu=!1,await this.$nextTick(),this.showSubContainer=!1,await this.$nextTick(),this.$emit("remove",this.id,{saveState:t})},async clickOutside(){this.isDragging||(this.showSubContainer=!1,await this.$nextTick()),this.showMenu=!1},previewItemIconSrc(t,e="preview"){const o=SYNO.SDS.Config.FnMap[t.className||t.jsID];if(!o||!o.config)return"";let i;return i=t.absoluteIcon?t.absoluteIcon:t.isModule?`${encodeURI(o.config.jsBaseURL)}/${t.icon}`:`${encodeURI(o.config.jsBaseURL)}/${o.config.icon||o.config.icon_32}`,i="preview"!==e||t.isModule?SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(i,this.iconCategory):SYNO.SDS.UIFeatures.IconSizeManager.getIconPath(i,this.previewIconCategory),void 0!==o.config.version&&(i=`${i}&app_version=${o.config.version}`),i},previewItemStyle(t,e){if(e)return{left:6+this.previewItemWidth*(t%2)+"px",top:6+this.previewItemHeight*Math.floor(t/2)+"px",backgroundImage:`url('${this.previewItemIconSrc(e)}')`}},onMouseMove(t){const e=Math.floor(t.offsetX/this.imageWidth*this.validSubItems.length);e<0||e>=this.validSubItems.length?this.showBigPreview=!1:(this.showBigPreview||(this.showBigPreview=!0),this.bigPreviewIconSrc=this.previewItemIconSrc(this.validSubItems[e],"large"))},onMouseLeave(t){this.showBigPreview=!1},removeTempSubItem(){this.$options.fakeItem=null;const t=this.validSubItems.filter((t=>"TEMP"!==t.className));this.validSubItems=t,this.saveState()},fillItemByMetaProp(t,e){e.className=t.getMetaProp("className"),!0===t.getMetaProp("isModule")?(e.isModule=t.getMetaProp("isModule"),e.params=t.getMetaProp("params"),e.moduleTitle=t.getMetaProp("moduleTitle"),e.icon=t.getMetaProp("icon")):(e.pkgId=t.getMetaProp("pkgId"),e.isPackage=t.getMetaProp("isPackage"),e.packageStatus=t.getMetaProp("packageStatus"))},notifyValidDrop(t,e,o){if(o.getMetaProp("fromDesktop")&&e===this.$options.dragZone){let t=this.validSubItems.find((t=>"TEMP"===t.className));this.fillItemByMetaProp(o,t),this.$options.fakeItem=null}},getFakeItem(){const t=this.$refs.subItems.find((t=>"TEMP"===t.className));return t?t.$el:null},async addFakeSubItem(){let t=this.validSubItems.slice();return t.push({className:"TEMP",id:i(),repositionAnimated:!1}),this.validSubItems=t,await this.$nextTick(),this.$options.fakeItem=this.getFakeItem(),!0},notifyOver(t,e,o){const i=this.$refs.ps&&this.$refs.ps.$el?this.$refs.ps.$el.scrollTop:0,n=[t.pageX-this.subLeft-20,t.pageY-this.subTop-61+i];let s=Math.floor(n[0]/this.subItemWidth),r=Math.floor(n[1]/this.subItemHeight);const a=n[0]%this.subItemWidth<=32?_.PREV_ICON:_.NEXT_ICON;let c=+o.el.getAttribute("index"),u=r*this.subColCnt+s;if(o._meta&&o._meta.fromDesktop){if(!this.$options.fakeItem)return;c=+this.$options.fakeItem.getAttribute("index")}a===_.PREV_ICON&&u>c?u--:a===_.NEXT_ICON&&u<c&&u++,this.taskId&&window.clearTimeout(this.taskId),this.taskId=window.setTimeout((()=>this.rePosition(c,u,o)),100)},rePosition(t,e,o){if(e>=this.validSubItems.length||e<0||t>=this.validSubItems.length||t<0)return;const i=this.validSubItems[t],n=this.validSubItems[e];if(i&&n&&t!==e){const o=this.validSubItems.slice();o.splice(e,0,o.splice(t,1)[0]),this.validSubItems=o,this.$emit("update:subItems",this.currentSubItems),this.saveState()}},async onSubItemRemove(t,{saveState:e=!1}={}){const o=this.validSubItems.filter((e=>e.id!==t));this.validSubItems=o,await this.$nextTick(),0===o.length?this.destroy({saveState:e}):this.$emit("update:subItems",this.currentSubItems)},onSaveState(){this.$emit("save-state")},onFolderKeyDown(t){"Escape"===t.key&&(this.toggleSubContainer(!1),this.$refs["virtual-group-item"].focus())},onKeyEnter(t){this.toggleSubContainer(!this.showSubContainer)}}},O=u(C,$,[],!1,null,null,null);O.options.__file="src/components/icon-item/virtual-group-item.vue";var T=O.exports,A=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("li",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.tip,expression:"tip"},{name:"clickoutside",rawName:"v-clickoutside",value:t.onClickOutside,expression:"onClickOutside"},{name:"long-press",rawName:"v-long-press",value:t.onContextMenu,expression:"onContextMenu"}],staticClass:"launch-icon app-item-icon",class:[t.itemCls],style:t.itemStyle,attrs:{"aria-label":t.displayDesc,role:"menuitem",index:t.index,"syno-id":t.className},on:{click:t.onClick,keydown:t.onKeyDown,contextmenu:t.onContextMenu,mouseenter:t.onHover}},[o("div",{ref:"image",staticClass:"image",style:t.iconStyle},[o("transition",{attrs:{name:"bounce"}},[t.hasBadge?o("badge",{key:t.badgeNum}):t._e()],1)],1),t._v(" "),t.showStatusIcon?o("status-icon",{attrs:{"is-loading-status":t.isLoadingStatus}}):t._e(),t._v(" "),o("item-title",{class:t.textCls,attrs:{text:t.localizeTitle}}),t._v(" "),t.newApp?o("div",{staticClass:"new-app-item-background"}):t._e(),t._v(" "),t.showMenu?o("v-portal",{attrs:{"mount-to":"body","target-style":t.menuStyle}},[o("v-menu",{ref:"menu",attrs:{"syno-id":"icon-item-app-item-menu-0",width:"auto"},on:{"menu-close":function(e){t.showMenu=!1}}},[t.canOpenNewWindow?o("v-menu-item",{attrs:{"syno-id":"icon-item-app-item-menu-item-0"},on:{click:t.openNewWindow}},[t._v(t._s(t.$i18n("desktop","open_in_new_window")))]):t._e(),t._v(" "),o("v-menu-item",{attrs:{"syno-id":"icon-item-app-item-menu-item-1"},on:{click:t.addToDesktop}}
1,[t._v(t._s(t.$i18n("common","add_to_desktop")))])],1)],1):t._e()],1)};A._withStripped=!0;var M=u({components:{statusIcon:m,Badge:b},extends:h,props:{newApp:{type:Boolean,default:!1}},data(){return{badgeNum:0}},computed:{hasBadge(){return this.badgeNum>0},itemCls(){return{"transition-cls":this.repositionAnim,[this.currentPackageStatus]:!!this.currentPackageStatus}},textCls(){return{"new-app":this.newApp}}},watch:{containerShown(t){t&&this.updateBadgeNum()}},async mounted(){await this.$nextTick(),this.mounted=!0,this.updateTip(),this.updateBadgeNum(),SYNO.SDS.StatusNotifier.on("badgenumget",this.updateBadgeNum,this)},beforeDestroy(){SYNO.SDS.StatusNotifier.un("badgenumget",this.updateBadgeNum,this)},methods:{updateBadgeNum(){if(!SYNO.SDS.PollingTask||!SYNO.SDS.PollingTask.BadgeInfo)return;const t=y(this);this.badgeNum=t},getExtraElements(){return this.$refs.menu?[this.$refs.menu]:[]},openNewWindow(){SYNO.SDS.WindowLaunch(this.className,null,null,this)},addToDesktop(){this.showMenu=!1,this.$emit("add-to-desktop",this.id)}}},A,[],!1,null,null,null);M.options.__file="src/components/icon-item/app-item.vue";var E=M.exports,Y=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("li",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.tip,expression:"tip"},{name:"clickoutside",rawName:"v-clickoutside",value:t.onClickOutside,expression:"onClickOutside"},{name:"long-press",rawName:"v-long-press",value:t.onContextMenu,expression:"onContextMenu"}],staticClass:"launch-icon app-item-icon dropdown-item-icon",class:t.itemCls,style:t.itemStyle,attrs:{"aria-label":t.displayDesc,role:"menuitem",index:t.index,"syno-id":t.className},on:{click:t.onClick,contextmenu:t.onContextMenu,mouseenter:t.onHover,keydown:t.onKeyDown}},[o("div",{ref:"image",staticClass:"image",style:t.iconStyle}),t._v(" "),t.showStatusIcon?o("status-icon",{attrs:{"is-loading-status":t.isLoadingStatus,size:"small"}}):t._e(),t._v(" "),o("item-title",{class:t.textCls,attrs:{text:t.localizeTitle}}),t._v(" "),t.showMenu?o("v-portal",{attrs:{"mount-to":"body","target-style":t.menuStyle}},[o("v-menu",{ref:"menu",attrs:{"syno-id":"icon-item-dropdown-item-menu-0",width:"auto"},on:{"menu-close":function(e){t.showMenu=!1}}},[t.canOpenNewWindow?o("v-menu-item",{attrs:{"syno-id":"icon-item-dropdown-item-menu-item-0"},on:{click:t.openNewWindow}},[t._v(t._s(t.$i18n("desktop","open_in_new_window")))]):t._e(),t._v(" "),o("v-menu-item",{attrs:{"syno-id":"icon-item-app-item-menu-item-1"},on:{click:t.addToDesktop}},[t._v(t._s(t.$i18n("common","add_to_desktop")))])],1)],1):t._e()],1)};function P(){}Y._withStripped=!0;var B=u({extends:E,data(){return{}},methods:{getExtraElements(){return this.$refs.menu?[this.$refs.menu]:[]},openNewWindow(){SYNO.SDS.WindowLaunch(this.className,null,null,this)},onHover(){const t=SYNO.SDS.Config.FnMap[this.className||this.jsID];"url"===t.config.type||"standalone"===t.config.type||"legacy"===t.config.type&&"url"===t.config.urlDefMode||SYNO.SDS.JSLoad(this.className,P)},onClickOutside(){this.showMenu=!1}}},Y,[],!1,null,null,null);B.options.__file="src/components/icon-item/dropdown-item.vue";var j=B.exports;const F={REPOSITION:Symbol("REPOSITION"),OVER_ITEM:Symbol("OVER_ITEM")};function L(t){return!0===t.isVirtualGroup||"SYNO.SDS.VirtualGroup"===t.className}function V(t){return void 0!==t}var W={components:{vAppItem:E,vIconItem:x,vVirtualGroupItem:T,vDropdownItem:j},mixins:[N],props:{prevThreshold:{type:Number,default:17},nextThreshold:{type:Number,default:80},iconCategory:{type:String,default:"Desktop"},iconWidth:{type:Number,default:0},iconHeight:{type:Number,default:0},iconItems:{type:Array,default:()=>[]},multipleSelect:{type:Boolean,default:!1},layout:{type:String,default:"row"},ghostCls:{type:String,default:"sds-launch-icon-dragging-proxy x-dd-drag-proxy"},defaultAnim:{type:Boolean,default:!0},allowReposition:{type:Boolean,default:!0},containerShown:{type:Boolean,default:!1},getContainerEl:{type:Function,default:void 0},containerBasis:{type:Array,default:()=>[0,0]},horizontalMargin:{type:Number,default:0},verticalMargin:{type:Number,default:0}},data(){return{layoutXY:[0,0],taskId:void 0,rowCnt:0,colCnt:0,focusedIndex:-1}},computed:{currentGhostCls(){let t=this.ghostCls;return"ClassicalDesktop"===this.iconCategory&&(t+=" classical"),t}},watch:{async iconItems(){await this.$nextTick(),this.registerDD()}},async mounted(){await this.$nextTick(),this.containerEl=this.getContainerEl?this.getContainerEl():this.$el,this.reLayout(),this.registerDD()},methods:{isValidOverItem(t,e){if(t===e)return!1;const o=this.iconItems[t],i=this.iconItems[e];return!(!o||!i)},onLaunchApp(){this.$emit("launch-app")}
1,clearTask(){this.taskId&&window.clearTimeout(this.taskId)},registerDragZone(t){t.registerDragZone(this.$options.dragZone),t.onDrop=this.onDrop.bind(this)},unregisterDragZone(t){t.unregisterDragZone(this.$options.dragZone)},getCursorOverType(t){return t<=this.prevThreshold?_.PREV_ICON:t>=this.nextThreshold?_.NEXT_ICON:_.OVER_ICON},removeDD(){this.removeDragProxy()},registerDD(){this.$el&&this.$refs.items&&this.initDragProxy(this.$refs.items,this.containerEl)},reLayout(){if(this.$el){const{x:t,y:e}=this.containerEl.getBoundingClientRect();this.layoutXY=[t+this.containerBasis[0],e+this.containerBasis[1]],this.rowCnt=Math.floor(this.$el.clientHeight/this.iconHeight),this.colCnt=Math.floor(this.$el.clientWidth/this.iconWidth)}},getMultipleTargetGhost(){let t='<div class="sds-desktop-dd-ct">',e=0;for(const o of this.$refs.items)if(o.isSelected){let i=o.$el.outerHTML;i=i.replace(/left:\s*\w*;/,""),i=i.replace(/top:\s*\w*;/,`top: ${64*e}px`),t+=i,e++}return t+="</div>",t},getAllItemsEl(){return this.$refs.items?this.$refs.items.map((t=>t.$el)):[]},onAddToDesktop(t){this.$emit("add-to-desktop",this.getItemById(t))},onAddIconItem(t){this.$emit("add-icon-item",t)},onRemoveIconItem(t,e){this.$emit("remove-icon-item",t,e)},getItemById(t){return{...this.iconItems.find((e=>e.id===t))}},getIconItemById(t){return this.$refs.items?this.$refs.items.find((e=>e.id===t)):null},openSubContainer(t){const e=this.getIconItemById(t);e&&(e.toggleSubContainer(!0),e.addFakeSubItem())},onSubContainerShow(t,e){this.$options.dragOverItemTarget&&(this.$options.subContainerDragZone=t,this.$options.dragOverItemTarget.unregisterDragZone(this.$options.dragZone),this.$options.dragOverItemTarget.registerDragZone(t),this.$options.virtualGroupItem=e),this.$options.subContainerOpenerItem=e},onSubContainerHide(){this.$options.subContainerOpenerItem=null},onStartDrag(t,e,o){this.$options.subContainerOpenerItem&&this.$options.subContainerOpenerItem.toggleSubContainer(!1),o.isDragZoneRegistered(this.$options.dragZone)||o.registerDragZone(this.$options.dragZone),this.$emit("start-drag",t,e,o)},onEndDrag(t){this.$emit("end-drag",t)},isVirtualGroup(t){return L(t)},isAppItem(t){return"app"===t.itemType},isDropdownItem(t){return"dropdown"===t.itemType},dragOnNode(t,e,o,i){this.taskId&&window.clearTimeout(this.taskId),this.isValidOverItem(t,e)?i===F.REPOSITION?(this.taskId=window.setTimeout((()=>this.rePosition(t,e,o)),100),this.$ddm.updateGhostCls("x-dd-reposition-ok")):(this.taskId=window.setTimeout((()=>this.overItem(t,e,o)),800),L(this.iconItems[t])?this.$ddm.updateInvalidGhostCls():this.$ddm.updateValidGhostCls()):this.$ddm.updateInvalidGhostCls()},dropOnNode(t,e,o,i,n){n===F.OVER_ITEM&&(this.$options.subContainerDragZone&&i===this.$options.subContainerDragZone?this.$emit("drop-on-container",t,e,o):this.$emit("drop-on-desktop",t,e,o))},rePosition(t,e,o){this.allowReposition&&this.$emit("reposition",t,e,o)},overItem(t,e,o){this.$options.dragOverItemTarget=o,this.$emit("over-item",t,e,o)},notifyDrop(){this.$emit("drop")},onDrop(t,e,o){if(!o.isDragging)return;const{from:i,to:n,cursorOverType:s}=this.getDragInfo(t,e,o);this.taskId&&window.clearTimeout(this.taskId),s===_.OVER_ICON&&this.dropOnNode(i,n,o,e,F.OVER_ITEM),this.$options.virtualGroupItem&&(e!==this.$options.subContainerDragZone&&this.$options.virtualGroupItem.toggleSubContainer(!1),this.$options.subContainerDragZone=null,this.$options.virtualGroupItem=null,this.$options.dragOverItemTarget=null)},notifyOver(t,e,o){if(this.multipleSelect)return;const{from:i,to:n,cursorOverType:s}=this.getDragInfo(t,e,o);s===_.PREV_ICON||s===_.NEXT_ICON?this.dragOnNode(i,n,o,F.REPOSITION):this.dragOnNode(i,n,o,F.OVER_ITEM)},getDragInfo(t,e,o,{from:i,to:n}={}){const s=[t.pageX-this.layoutXY[0],t.pageY-this.layoutXY[1]+this.containerEl.scrollTop];let r,a=Math.floor(s[0]/(this.iconWidth+this.horizontalMargin)),c=Math.floor(s[1]/(this.iconHeight+this.verticalMargin));return a<0||c<0?{from:-1,to:-1,cursorOverType:r}:(i=V(i)?i:+o.el.getAttribute("index"),V(n)||("row"===this.layout?(r=this.getCursorOverType(s[1]%this.iconHeight),n=a*this.rowCnt+c):(r=this.getCursorOverType(s[0]%this.iconWidth),n=c*this.colCnt+a),r===_.PREV_ICON&&n>i?n--:r===_.NEXT_ICON&&n<i&&n++),{from:i,to:n,cursorOverType:r})},onSaveState(){this.$emit("update:iconItems",this.iconItems),this.$emit("save-state")},onFocus(){this.focusItemByIndex(-1)},onItemFocus(t){this.focusItemById(t)},onKeyDown(t){return"ArrowUp"===t.key||"ArrowLeft"===t.key?this.focusPrevItem():"ArrowDown"===t.key||"ArrowRight"===t.key?this.focusNextItem():void 0},focusItemByIndex(t=-1){const e=this.iconItems[t];this.focusItem(e)},focusItemById(t){const e=this.iconItems.find((e=>e.id===t));this.focusItem(e)},focusItem(t){this.focusedIndex=this.iconItems.findIndex((e=>e===t));const e=this.getIconItemById(t&&t.id);e&&e.$el.focus()},focusPrevItem(){const t=this.focusedIndex>0?this.focusedIndex:this.iconItems.length;this.focusItemByIndex((t-1)%this.iconItems.length)},focusNextItem(){const t=this.focusedIndex>=0?this.focusedIndex:-1;this.focusItemByIndex((t+1)%this.iconItems.length)},focus(){this.$refs["transition-group"].$el.focus()}}},z=u(W,s,[],!1,null,null,null);z.options.__file="src/components/shortcut-area/layout.vue";var R=z.exports,H=function(){var t=this,e=t.$createElement,o=t._self._c||e;return t.isSelecting?o("div",{ref:"selectRange",staticClass:"sds-desktop-select-range",style:t.rangeStyle}):t._e()};H._withStripped=!0;var Z=o(9783),U=u({props:{},data(){return{beginX:0,beginY:0,x:0,y:0,width:0,height:0,isSelecting:!1,offsetX:0,offsetY:0,selectedIndex:[]}},computed:{rangeStyle(){return{left:this.x-this.offsetX+"px",top:this.y-this.offsetY+"px",width:`${this.width}px`,height:`${this.height}px`}}},watch:{},mounted(){const t=document.body;this.$options.onDesktopMouseDown=this.onDesktopMouseDown.bind(this),this.$options.onDesktopMouseMove=this.onDesktopMouseMove.bind(this),this.$options.onDesktopMouseUp=this.onDesktopMouseUp.bind(this),this.$options.onDesktopMouseUp=this.onDesktopMouseUp.bind(this),t.addEventListener("mousedown",this.$options.onDesktopMouseDown)},beforeDestroy(){document.body.removeEventListener("mousedown",this.$options.onDesktopMouseDown)},methods:{injectDesktopEl(t){this.$options.desktopEl=t},injectIconItemsEl(t){this.$options.iconItemsEl=t},onDesktopMouseDown(t){if(t.target===this.$options.desktopEl&&1===t.buttons){this.isSelecting=!0;const e=this.$options.desktopEl.getBoundingClientRect();this.offsetX=e.x,this.offsetY=e.y;const o=document.body;o.addEventListener("mouseleave",this.$options.onDesktopMouseLeave),o.addEventListener("mouseup",this.$options.onDesktopMouseUp),o.addEventListener("mousemove",this.$options.onDesktopMouseMove),this.beginX=this.x=t.pageX,this.beginY=this.y=t.pageY}},onDesktopMouseLeave(t){this.isSelecting=!1},onDesktopMouseUp(t){const e=document.body;this.isSelecting=!1,this.width=this.height=this.x=this.y=0,e.removeEventListener("mouseleave",this.$options.onDesktopMouseLeave),e.removeEventListener("mouseup",this.$options.onDesktopMouseUp),e.removeEventListener("mousemove",this.$options.onDesktopMouseMove),this.collisionDetect()},onDesktopMouseMove(t){if(!this.isSelecting)return;const e=t.pageX-this.beginX,o=t.pageY-this.beginY;this.x=e>0?this.beginX:t.pageX,this.y=o>0?this.beginY:t.pageY,this.width=Math.abs(e),this.height=Math.abs(o),this.collisionDetect()},collisionDetect:o.n(Z)()((function(){if(!this.$refs.selectRange)return;let t=[];for(const i of this.$options.iconItemsEl)if(e=i.getBoundingClientRect(),o=this.$refs.selectRange.getBoundingClientRect(),!(e.right<o.left||e.left>o.right||e.bottom<o.top||e.top>o.bottom)){const e=+i.getAttribute("index");t.push(e)}var e,o;this.$emit("selected-index",t)}),50)}},H,[],!1,null,"3808cc37",null);function G(t){return!0===t.isVirtualGroup||"SYNO.SDS.VirtualGroup"===t.className}U.options.__file="src/components/shortcut-area/select-range.vue";var K={components:{vLayout:R,vSelectRange:U.exports},props:{iconCategory:{type:String,default:"Desktop"},iconItems:{type:Array,default:()=>[]},mountId:{type:String,default:""}},data(){return{multipleSelect:!1,selectedIndex:[]}},computed:{iconHeight(){return"Desktop"===this.iconCategory?120:104},iconWidth(){return 132},shortcutAreaCls(){return{classical:"ClassicalDesktop"===this.iconCategory}}},watch:{async iconItems(){await this.$nextTick(),this.$refs.selectRange.injectIconItemsEl(this.$refs.layout.getAllItemsEl())}},async mounted(){await this.$nextTick(),this.$refs.selectRange.injectDesktopEl(this.$refs.layout.$el),this.$refs.selectRange.injectIconItemsEl(this.$refs.layout.getAllItemsEl())},methods:{getLayout({returnElement:t=!1}={}){return t?this.$refs.layout.$el:this.$refs.layout}
1,getDragInfo(t,e,o,i){if(this.$refs.layout)return this.$refs.layout.getDragInfo(t,e,o,i)},reLayout(){return this.$refs.layout.reLayout()},registerDragZone(t){this.$refs.layout.registerDragZone(t)},getIconItemById(t){return this.$refs.layout?this.$refs.layout.getIconItemById(t):null},async onStartDrag(t,e,o){const i=+o.el.getAttribute("index");this.multipleSelect&&!this.selectedIndex.includes(i)&&(this.multipleSelect=!1,this.clearSelected(),await this.$nextTick(),this.$ddm.setGhostHtml(this.$refs.layout.getTargetContent(o)))},clearSelected(){this.selectedIndex=[];const t=this.iconItems.map(((t,e)=>({...t,isSelected:!1})));this.$emit("update:iconItems",t)},onSelectedIndex(t){this.selectedIndex=[];const e=this.iconItems.map(((e,o)=>{if(G(e))return e;const i=t.includes(o);return i&&this.selectedIndex.push(o),{...e,isSelected:i}}));this.multipleSelect=this.selectedIndex.length>0,this.$emit("update:iconItems",e)},onAddIconItem(t){t.id||(t.id=i());let e=this.iconItems.slice();e.push(t),this.$emit("update:iconItems",e)},async onRemoveIconItem(t,e){let o=[];this.multipleSelect?(o=this.selectedIndex.map((t=>this.iconItems[t].id)),o.includes(t)||(o=[t],this.multipleSelect=!1)):o=[t];const i=this.iconItems.filter((t=>!o.includes(t.id)));this.$emit("update:iconItems",i),await this.$nextTick(),!0===e.saveState&&this.onSaveState(),await this.$nextTick(),this.clearSelected()},rePosition(t,e){e>=this.iconItems.length||e<0||t!==e&&(this.iconItems.splice(e,0,this.iconItems.splice(t,1)[0]),this.$emit("update:iconItems",this.iconItems))},isValidOverItem(t,e){if(t===e)return!1;const o=this.iconItems[t],i=this.iconItems[e];return!(!o||!i||G(o))},fillMetaProp(t,e){t.addMetaProp("fromDesktop",!0),t.addMetaProp("className",e.className),e.isModule?(t.addMetaProp("isModule",e.isModule),t.addMetaProp("params",e.params),t.addMetaProp("moduleTitle",e.moduleTitle),t.addMetaProp("icon",e.icon)):(t.addMetaProp("pkgId",e.pkgId),t.addMetaProp("isPackage",e.isPackage),t.addMetaProp("packageStatus",e.packageStatus))},overItem(t,e,o){if(!this.isValidOverItem(t,e))return;const i=this.iconItems[t],n=this.iconItems[e];this.fillMetaProp(o,i),G(n)?this.$refs.layout.openSubContainer(n.id):this.onCreateVirtualGroup(e,!0)},moveItemInVirtualGroup(t,e){let o=this.iconItems.slice();const i=this.iconItems[e];if(Array.isArray(t)){for(const e of t)this.iconItems[e].isSelected&&(this.iconItems[e].isSelected=!1,i.subItems.push(this.iconItems[e]));for(let e=t.length-1;e>=0;e--)o.splice(t[e],1)}else i.subItems.push(this.iconItems[t]),o.splice(t,1);this.$emit("update:iconItems",o)},removeItem(t){this.iconItems.splice(t,1),this.$emit("update:iconItems",this.iconItems),this.onSaveState()},onDrop(){this.onSaveState()},onDropOnContainer(t,e,o){this.removeItem(t)},async onDropMultipleItemsOnDesktop(t){this.selectedIndex.includes(t)||t<0||t>=this.iconItems.length||(G(this.iconItems[t])||(this.onCreateVirtualGroup(t,!1),await this.$nextTick()),this.moveItemInVirtualGroup(this.selectedIndex,t),this.multipleSelect=!1)},async onDropOnDesktop(t,e,o){this.multipleSelect?this.onDropMultipleItemsOnDesktop(e):this.isValidOverItem(t,e)&&(G(this.iconItems[e])||(this.onCreateVirtualGroup(e,!1),await this.$nextTick()),this.moveItemInVirtualGroup(t,e))},async onCreateVirtualGroup(t,e=!1){let o=this.iconItems.slice();const n=o[t],s={className:"SYNO.SDS.VirtualGroup",virtualGroupTitle:"New Group",isVirtualGroup:!0,id:n.id,defaultOpenContainer:e,subItems:[{...n,id:i()}]};o[t]=s,this.$emit("update:iconItems",o),e&&(await this.$nextTick(),this.$refs.layout.openSubContainer(s.id))},updateIconItems(t){this.$emit("update:iconItems",t)},onSaveState(){this.$emit("save-state")},onTabKeyDown(t){t.shiftKey||(t.preventDefault(),SYNO.SDS.TaskBar.getShowAllButton().focus())}}},X=u(K,n,[],!1,null,null,null);X.options.__file="src/components/shortcut-area/shortcut-area.vue";var q=X.exports,J=function(t,e){return(0,e._c)("div",{staticClass:"sds-desktop-footer-btn",class:e.props.customClass,attrs:{title:e.props.title},on:{click:e.listeners.click}})};J._withStripped=!0;var Q=u({props:{customClass:{type:String,default:"sds-bug-report"},title:{type:String,default:""}}},J,[],!0,null,null,null);Q.options.__file="src/components/footer-btn/footer-btn.vue";var tt=Q.exports,et=o(6726),ot=o.n(et),it=o(454),nt=o.n(it),st={methods:{usePlugin(t,e){let o=new t({module:this});this[e]=o}}};class rt{constructor(){this.initHotkeyEvents(),SYNO.SDS.Element.on(SYNO.SDS.GetBody(),"keydown",this.onKeyDown,this),SYNO.SDS.Element.on(SYNO.SDS.GetBody(),"keypress",this.onKeyPress,this);const t=SYNO.SDS.UserSettings.getProperty("Desktop","hotkey_disabled");this.hotkeyEnabled=!0!==t}initHotkeyEvents(){const t=[[!1,!0,"KeyW",this.onSwitchWindow],[!1,!0,"KeyS",this.onFocusDesktop],[!1,!0,"KeyQ",this.onToggleAllWin],[!1,!0,"KeyH",this.onLaunchHelp],[!1,!0,"KeyA",this.onMainMenu],[!0,!1,"KeyF",this.onSearch],[!1,!0,"KeyP",this.onSearch],[!1,!0,"KeyD",this.onSearch],[!1,!0,"KeyM",this.onSearch],[!1,!0,"KeyV",this.onSearch]];this.Alt_FnMap={},this.Ctrl_FnMap={},this.Ctrl_Alt_FnMap={},t.forEach((t=>{t[0]&&t[1]?this.Ctrl_Alt_FnMap[t[2]]=t[3]:t[0]&&!t[1]?this.Ctrl_FnMap[t[2]]=t[3]:!t[0]&&t[1]&&(this.Alt_FnMap[t[2]]=t[3])}))}isEventSuspended(t){return"text"===document.activeElement.type||"textarea"===document.activeElement.type||"password"===document.activeElement.type||"true"===t.target.contentEditable||this.hotkeySuspended||!1===this.hotkeyEnabled}setHotkeyEnabled(t){this.hotkeyEnabled=t,SYNO.SDS.UserSettings.setProperty("Desktop","hotkey_disabled",!t)}setHotkeySuspended(t){this.hotkeySuspended=t}onKeyDown(t){const e=t.code;this.isEventSuspended(t)||(t.altKey&&t.ctrlKey&&e in this.Ctrl_Alt_FnMap?(t.preventDefault(),this.Ctrl_Alt_FnMap[e](t)):t.altKey&&e in this.Alt_FnMap?(t.preventDefault(),this.Alt_FnMap[e](t)):t.ctrlKey&&e in this.Ctrl_FnMap&&(t.preventDefault(),this.Ctrl_FnMap[e](t)))}onKeyPress(t){this.isEventSuspended(t)||"?"===t.key&&(t.preventDefault(),this.showTips(t))}onSwitchWindow(){SYNO.SDS.TaskButtons.setNextItem(),SYNO.SDS.TaskButtons.bringFocusWinUp()}onFocusDesktop(){SYNO.SDS.DesktopMgr.show(SYNO.SDS.Desktop)}onToggleAllWin(){SYNO.SDS.WindowMgr.toggleAllWin()}onMainMenu(){const t=SYNO.SDS.DesktopMgr.isTop(SYNO.SDS.AppView)?SYNO.SDS.Desktop:SYNO.SDS.AppView;SYNO.SDS.DesktopMgr.show(t)}onLaunchHelp(){const t=SYNO.SDS.WindowMgr.getActiveAppWindow();t&&t.onClickHelp()}onSearch(t){var e="all";switch(t.key){case"d":e="document";break;case"p":e="image";break;case"m":e="audio";break;case"v":e="video"}const o=SYNO.SDS.TaskBar.findSystemTrayButtons("search");o.click&&o.click(t,{searchType:e})}showTips(t){SYNO.SDS.AppLaunch("SYNO.SDS.HotkeyMgr.Instance",{target:t.target},!1)}}const at=["subItems","type","url","className","id","param","virtualGroupTitle","icon","absoluteIcon","isModule","moduleTitle","withShadow"],ct=[{className:"SYNO.SDS.PkgManApp.Instance"},{className:"SYNO.SDS.AdminCenter.Application"},{className:"SYNO.SDS.App.FileStation3.Instance"},{className:"SYNO.SDS.HelpBrowser.Application"},{className:"SYNO.SDS.CSTN.Instance"},{className:"SYNO.SDS.Drive.Application"},{className:"SYNO.Foto.AppInstance"},{className:"SYNO.SDS.App.DSMAgent.Instance"}],ut=[{className:"SYNO.SDS.PkgManApp.Instance"},{className:"SYNO.SDS.AdminCenter.Application"},{className:"SYNO.SDS.App.FileStation3.Instance"},{className:"SYNO.SDS.HelpBrowser.Application"},{className:"SYNO.SDS.SurveillanceStation"}],lt=[{className:"SYNO.SDS.ClusterManager.Instance"},{className:"SYNO.SDS.AdminCenter.Application"},{className:"SYNO.SDS.App.FileStation3.Instance"},{className:"SYNO.SDS.HelpBrowser.Application"}];function ht(){return document.body.clientWidth}function dt(){return document.body.clientHeight}function pt(t){let e=[];for(let o of t){let t={};for(const e of at)o[e]&&(t[e]=o[e]);g(t)&&(t.subItems=pt(t.subItems)),e.push(t)}return e}function mt(t){for(const e of t){e.subItems&&mt(e.subItems);const t=SYNO.SDS.Packages.getInfo(e.className);t&&(e.isPackage=!0,e.pkgId=t.pkgId,e.packageStatus=t.status)}return t}var gt={components:{vShortcutArea:q,footerBtn:tt},mixins:[st],props:{manager:{type:Object,default:void 0},mountId:{type:String,default:"sds-desktop"}},data(){return{textColor:"#FFFFFF",iconItems:[],showDesktop:!0,height:dt(),width:ht(),iconCategory:void 0,inFront:!0,refreshCnt:0}},computed:{viewStyle(){return{width:`${this.width}px`,height:`${this.height}px`,opacity:this.showDesktop?1:0}
1},validIconItems:{set(t){t=t.slice();let e=[];for(let[t,o]of this.iconItems.entries())v(o)||e.push({index:t,item:o});this.iconItems=t;for(let{index:t,item:o}of e)this.iconItems.splice(t,0,o)},get(){return this.iconItems.filter((t=>v(t)))}},desktopCls(){return{"sent-back":!this.inFront}},footerTitle(){return this.isMobile?this.$i18n("common","mobile_edition"):this.isBeta?this.$i18n("pkgmgr","report_desc"):""},footerCls(){return this.isMobile?"sds-mobile-edition":this.isBeta?"sds-bug-report":""},showFooterBtn(){return this.isBeta||this.isMobile},isBeta(){return"Beta"===_S("buildphase")&&_S("is_admin")},isMobile(){return _S("isMobile")&&_S("is_admin")}},watch:{async showDesktop(t){t&&(await this.$nextTick(),this.reLayout())}},created(){this.$options.wallpaper=function(){const t=new SYNO.SDS.DesktopStyleParser;return e(),new SYNO.SDS.Background(Object.assign(t.getWallpaperCfg({wallpaper_path:"",isBottomWallpaper:!0}),{renderTo:"sds-wallpaper"}))}(),this.bindEvent()},beforeDestroy(){this.$options.manager&&this.$options.manager.unregister(this),this.$options.resizeObserver.disconnect(),delete this.$options.resizeObserver},mounted(){SYNO.SDS.StatusNotifier.on("appprivilegechanged",this.refresh,this),SYNO.SDS.StatusNotifier.on("servicechanged",this.refresh,this),this.initManager(SYNO.SDS.DesktopMgr),this.initShowAllButton(),this.initStartButton(),this.loadShortcutItems(),this.getIconCategory(),this.usePlugin(rt,"hotkeyPlugin"),window.localStorage&&window.localStorage.setItem("supported-browser",!0)},methods:{hideWallpaper(){var t;t=this.$options.wallpaper,SYNO.SDS.Element.addStyle(document.documentElement,"background-image","none"),SYNO.SDS.Element.addStyle(document.documentElement,"background-color","#FFFFFF"),t&&t.hide()},showWallpaper(){e(this.$options.wallpaper)},focus(){this.$refs.area&&this.$refs.area.$refs.layout&&this.$refs.area.$refs.layout.focus()},appendChild(t){this.$children.push(t),t.$parent=this},setBackground(t){const e=new SYNO.SDS.DesktopStyleParser;this.$options.wallpaper.updateConfig(Object.assign(e.getWallpaperCfg(t)))},createDragZone(){return this.$options.dragZone||(this.$options.dragZone=new this.$DragZone(this.$refs.area.getLayout({returnElement:!0}))),this.$options.dragZone},onExternalValidDrop(t,e,o){const{to:i}=this.$refs.area.getDragInfo(t,e,o,{from:1/0}),n=nt()(o.payload.dragData);this.addLaunchItem(n,i,{saveState:!0})},registerDragElements(t,e){const o=this.createDragZone();for(const i of t){const t=new this.$DragDropTarget(i.dom,{ghostCls:e||"sds-launch-icon-dragging-proxy",onValidDrop:this.onExternalValidDrop.bind(this),getTargetContent:function(t){return`\n\t\t\t\t\t\t\t<div class="x-dd-drop-icon"></div>\n\t\t\t\t\t\t\t<div class="x-dd-drag-ghost">\n\t\t\t\t\t\t\t\t${t.el.outerHTML}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`}.bind(this)},{dragData:i.dragData});this.$ddm.registerDragTarget(t),t.registerDragZone(o)}},getMsgBox(t,e={}){return t?SYNO.SDS.WindowMgr.openModalWindow(t,e).window:(this.$options.msgBox&&!this.$options.msgBox.isDestroyed||(this.$options.msgBox=new SYNO.SDS.MessageBoxV5({modal:!0,draggable:!1,renderTo:document.body})),this.$options.msgBox.getWrapper())},getIconCategory(){const t=SYNO.SDS.UserSettings.getProperty("Desktop","desktopStyle");this.iconCategory="classical"===t?"ClassicalDesktop":"Desktop"},onWindowResize(){this.width=ht(),this.height=dt(),this.reLayout()},onClickFooterBtn(){this.isMobile?window.location="?forceDesktop=0":this.isBeta&&(_S("is_admin")?SYNO.SDS.AppLaunch("SYNO.SDS.SupportForm.Application"):window.open("http://myds.synology.com/support/beta_dsm_form.php","_blank"))},reLayout:ot()((function(){this.$refs.area.reLayout(),this.$options.wallpaper.resize()}),100),bindEvent(){this.$options.resizeObserver=new ResizeObserver((()=>{this.onWindowResize()})),this.$options.resizeObserver.observe(document.body),SYNO.SDS.Packages.registerPackageStatusChange(this.onPackageStatusChange,this),SYNO.SDS.Packages.registerAllPackagesChange(this.onPackageStatusChange,this)},bindHotKeyPlugin(){this.$options.hotkeyPlugin=new SYNO.SDS.DesktopHotKeyPlugin({module:this})},getWidth(){return this.width},getHeight(){return this.height},getElement(){return this.$el},getEl(){return this.$options.extEl||(this.$options.extEl=new Ext.Element(this.$el)),this.$options.extEl},mask(){var t;return null===(t=this.getEl())||void 0===t?void 0:t.mask()},unmask(){var t;return null===(t=this.getEl())||void 0===t?void 0:t.unmask()},show(){this.toggle(!0)},hide(){this.toggle(!1),this.showDesktop=!1},getIconItemById(t){return this.$refs.area.getIconItemById(t)},initManager(t){this.$options.manager=t,this.$options.manager.register(this)},initTaskbarButton(t){if(!_S("standalone"))return SYNO.SDS.TaskBar.addDesktopViewButton(t)},initStartButton(){SYNO.SDS.TaskBar&&SYNO.SDS.TaskBar.getStartButton().$on("click",this.onToggle.bind(this))},initShowAllButton(){SYNO.SDS.TaskBar&&SYNO.SDS.TaskBar.getShowAllButton().$on("click",this.onShowAll.bind(this))},onPackageStatusChange(t,e){this.refresh()},onShowAll(){this.$options.manager.show(this),SYNO.SDS.WindowMgr.toggleAllWin(this.$options.showAllButton)}
1,onToggle(){this.$options.manager.show(SYNO.SDS.AppView)},toggle(t){SYNO.SDS.AppView&&SYNO.SDS.AppView.isDropdownType?(t?SYNO.SDS.Desktop.toFront():SYNO.SDS.Desktop.toBack(),!1===this.showDesktop&&(this.showDesktop=!0)):this.showDesktop=t,t&&this.focus(),SYNO.SDS.TaskBar.getStartButton().toggle(!t)},toFront(){this.inFront=!0},toBack(){this.inFront=!1},isOnTop(){return!0===this.isFront},async appItemOnDrag(t,e){this.$options.manager.show(this);const o=this.addLaunchItem(t);await this.$nextTick();const i=this.$refs.area.getIconItemById(o);e.el=i.$el,this.$refs.area.registerDragZone(e)},refresh:ot()((function(){this.refreshCnt++,this.saveState(),this.loadShortcutItems()}),400),addLaunchItem(t,e=-1,{saveState:o=!1}={}){return t.id||(t.id=i()),t.textColor=this.textColor,t.updateCnt=this.refreshCnt,-1===e?this.iconItems.push(t):(e=Math.min(e,this.iconItems.length),this.iconItems.splice(e,0,t)),o&&this.onSaveState(),t.id},removeLaunchItem(t,{saveState:e=!1}={}){let o=!1;const i=this.iconItems.findIndex((e=>e.id===t));-1!==i&&(this.iconItems.splice(i,1),o=!0);for(let e of this.iconItems)if(g(e)&&e.subItems){const i=e.subItems.findIndex((e=>e.id===t));-1!==i&&(e.subItems.splice(i,1),o=!0)}return e&&this.onSaveState(),o},getShortcutsItems(){const t=SYNO.SDS.UserSettings.getProperty("Desktop","ShortcutItems")||(SYNO.SDS.isNVR?ut:"yes"===_D("support_hyper_converged")?lt:ct);return nt()(t)},loadShortcutItems(){this.iconItems=[];let t=this.getShortcutsItems();t=mt(t);for(const e of t)this.addLaunchItem(e,-1);this.updateTextColor()},getTextColor(t){const e=Object.assign({},SYNO.SDS.UserSettings.getProperty("Desktop","wallpaper")||{});let o="#FFFFFF";return t&&Ext.apply(e,t,{customize_color:!1,customize_wallpaper:!1}),e.customize_color&&(o=e.text_color||"#FFFFFF"),2===e.version&&(o=e.text_color||"#FFFFFF"),o},updateTextColor(t){this.textColor=this.getTextColor(t);for(let t of this.iconItems)this.$set(t,"textColor",this.textColor)},onScroll(t){const e=t.target;e&&e.scrollTop>0&&(e.scrollTop=0)},saveState(){let t=pt(this.iconItems);t=nt()(t),SYNO.SDS.UserSettings.setProperty("Desktop","ShortcutItems",t)},onSaveState:ot()((function(){this.saveState()}),200)}},ft=u(gt,t,[],!1,null,null,null);ft.options.__file="src/pages/desktop/desktop.vue";var St=ft.exports,vt=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{directives:[{name:"show",rawName:"v-show",value:t.showDesktop,expression:"showDesktop"}],style:t.viewStyle,attrs:{id:t.mountId}})};function yt(){return document.body.clientWidth}function wt(){return document.body.clientHeight}vt._withStripped=!0;var It={components:{},mixins:[],props:{mountId:{type:String,default:"sds-desktop"}},data(){return{height:wt(),width:yt(),showDesktop:!0}},computed:{viewStyle(){return{width:`${this.width}px`,height:`${this.height}px`,"overflow-x":this.width<=1e3?"auto":"hidden","overflow-y":this.width<=580?"auto":"hidden",background:"transparent","background-size":"100% 100%",top:"0px"}}},watch:{},created(){},beforeDestroy(){this.$options.resizeObserver.disconnect(),delete this.$options.resizeObserver},mounted(){this.bindEvent(),window.localStorage.setItem("supported-browser",!0)},methods:{appendChild(t){this.$children.push(t),t.$parent=this},show(){this.showDesktop=!0},hide(){this.showDesktop=!1},getMsgBox(){return this.$options.msgBox&&!this.$options.msgBox.isDestroyed||(this.$options.msgBox=new SYNO.SDS.MessageBoxV5({modal:!0,draggable:!1,renderTo:document.body})),this.$options.msgBox.getWrapper()},onWindowResize(){this.width=yt(),this.height=wt()},bindEvent(){this.$options.resizeObserver=new ResizeObserver((()=>{this.onWindowResize()})),this.$options.resizeObserver.observe(document.body)},getWidth(){return this.width},getHeight(){return this.height},getEl(){return this.$options.extEl||(this.$options.extEl=new Ext.Element(this.$el)),this.$options.extEl},mask(){var t;return null===(t=this.getEl())||void 0===t?void 0:t.mask()},unmask(){var t;return null===(t=this.getEl())||void 0===t?void 0:t.unmask()},getElement(){return this.$el},async doLayout(){if(this.width=yt(),this.height=wt(),await this.$nextTick(),SYNO&&SYNO.SDS&&SYNO.SDS.AppMgr&&_S("standaloneAppName")){const t=SYNO.SDS.AppMgr.getByAppName(_S("standaloneAppName"));t&&t[0]&&t[0].window&&t[0].window.onWindowResize()}}}},bt=u(It,vt,[],!1,null,null,null);bt.options.__file="src/pages/desktop/standalone-desktop.vue";
1var kt=bt.exports;function Dt(t,e,o){if(t&&t._isVue)return Dt(t.$el,e,o);var i=t&&t.style;if(i){if(null==o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),o?void 0===e?o:o[e]:o;e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=o+("string"==typeof o?"":"px")}}class xt{constructor(t){this.desktopEl=document.createElement("div"),this.desktopEl.id=t,document.body.appendChild(this.desktopEl)}hide(){Dt(this.desktopEl,"display","none")}show(){Dt(this.desktopEl,"display","block")}getElement(){return this.desktopEl}mask(){return this.maskEl=document.createElement("div"),function(t,e){if(t.classList.add)for(const o of e.split(" "))t.classList.add(o);else t.className.indexOf(e)<0&&(t.className+=` ${e}`)}(this.maskEl,"ext-el-mask"),document.body.appendChild(this.maskEl),this.maskEl}unmask(){var t,e;null===(t=this.maskEl)||void 0===t||null===(e=t.parentNode)||void 0===e||e.removeChild(this.maskEl),delete this.maskEl}getEl(){const t=this.desktopEl;return{dom:t,id:this.desktopEl.id,mask:()=>this.mask(),unmask:()=>this.unmask(),addClass(e){let o=e;Array.isArray(e)||(o=e.split(" ")),t.classList.add?t.classList.add(...o):t.className.indexOf(e)<0&&(t.className+=` ${e}`)},removeClass(e){let o=e;if(Array.isArray(e)||(o=e.split(" ")),t.classList.remove)t.classList.remove(...o);else for(const e of o)t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,""))}}}appendChild(){}doLayout(){}}var $t=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{directives:[{name:"show",rawName:"v-show",value:t.showAppView,expression:"showAppView"}],staticClass:"syno-sds-appview",class:t.menuClass,style:t.viewStyle,attrs:{id:t.mountId},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.preventDefault(),t.close())},transitionend:t.onTransitionEnd}},[o("div",{staticClass:"syno-sds-appview-container",on:{click:t.onClickAppPanel}},[o("v-search-field",{ref:"search",nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onSearchTabKeyDown.apply(null,arguments))}},model:{value:t.searchText,callback:function(e){t.searchText=e},expression:"searchText"}})],1),t._v(" "),o("div",{staticClass:"sds-shortcut-wrapper"},[o("div",{ref:"shortcut-zone-left",staticClass:"shortcut-zone",style:t.shortcutStyle,on:{click:t.onClickAppPanel}}),t._v(" "),o("div",{ref:"shortcut-zone-right",staticClass:"shortcut-zone right-zone",style:t.shortcutStyle,on:{click:t.onClickAppPanel}})]),t._v(" "),o("div",{staticClass:"sds-app-panel",on:{click:t.onClickAppPanel}},[t.showNoResult?o("div",{staticClass:"sds-desktop-no-result"},[t._v("\n\t\t\t"+t._s(t.$i18n("search","no_search_result"))+"\n\t\t")]):t._e(),t._v(" "),o("v-scrollbar",{ref:"ps",staticClass:"app-menu-scrollbar",on:{scroll:t.onScroll}},[o("div",{staticClass:"app-layout-wrapper",style:t.layoutStyle},[o("v-layout",{directives:[{name:"show",rawName:"v-show",value:t.showSearchLayout,expression:"showSearchLayout"}],key:"search-layout",ref:"search-layout",staticClass:"search-layout",attrs:{"aria-label":t.$i18n("common","user_app"),"container-basis":t.containerBasis,"get-container-el":function(){return t.$refs.ps.$el},"icon-width":t.iconWidth,"icon-height":t.iconHeight,"icon-items":t.filterItemIcon,"icon-category":t.iconCategory,layout:"col","prev-threshold":t.threshold,"next-threshold":t.threshold,"ghost-cls":"appview-icon-dragging-proxy x-dd-drag-proxy","default-anim":!1,"allow-reposition":!1,"container-shown":t.showAppView},on:{reposition:t.onReposition,"start-drag":t.onStartDrag,"end-drag":t.onEndDrag,"launch-app":t.onLaunchApp,"add-to-desktop":t.onAddToDesktop},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onLayoutTabKeyDown.apply(null,arguments))}}}),t._v(" "),o("v-layout",{directives:[{name:"show",rawName:"v-show",value:!t.showSearchLayout,expression:"!showSearchLayout"}],key:"layout",ref:"layout",attrs:{"aria-label":t.$i18n("common","user_app"),"container-basis":t.containerBasis,"get-container-el":function(){return t.$refs.ps.$el},"icon-width":t.iconWidth,"icon-height":t.iconHeight,"icon-items":t.iconItems,"icon-category":t.iconCategory,layout:"col","prev-threshold":t.threshold,"next-threshold":t.threshold,"ghost-cls":"appview-icon-dragging-proxy x-dd-drag-proxy","container-shown":t.showAppView},on:{"update:iconItems":function(e){t.iconItems=e},"update:icon-items":function(e){t.iconItems=e},reposition:t.onReposition,"start-drag":t.onStartDrag,"end-drag":t.onEndDrag,"launch-app":t.onLaunchApp,"add-to-desktop":t.onAddToDesktop},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onLayoutTabKeyDown.apply(null,arguments))}}}
1)],1)]),t._v(" "),o("transition",{attrs:{name:"bounce"}},[t.showAddIcon?o("div",{staticClass:"add-icon",style:t.addIconStyle}):t._e()])],1)])};$t._withStripped=!0;var Nt=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"search-field",class:t.fieldClass,style:t.fieldStyle,on:{click:function(t){t.stopPropagation()}}},[o("input",{ref:"input",staticClass:"search-field-input",attrs:{type:"text",size:"16",autocomplete:"off",role:"search","aria-label":t.placeholder,placeholder:t.placeholder},domProps:{value:t.value},on:{input:function(e){return t.updateValue(e.target.value)},focus:t.onFocus,blur:t.onBlur}}),t._v(" "),o("button",{directives:[{name:"show",rawName:"v-show",value:""!==t.value,expression:"value !== ''"}],staticClass:"search-field-clear-btn",attrs:{type:"button"},on:{click:t.onClear}})])};Nt._withStripped=!0;var _t=u({components:{},props:{placeholder:{type:String,default:_JSLIBSTR("uicommon","search")},width:{type:Number,default:278},value:{type:String,default:void 0},theme:{type:String,default:"menu"}},data(){return{isFocused:!1}},computed:{fieldStyle(){return{width:`${this.width}px`}},fieldClass(){return{"search-field-focused":this.isFocused,dropdown:"dropdown"===this.theme}}},created(){},mounted(){},methods:{updateValue(t){this.$emit("input",t)},onBlur(){this.isFocused=!1},onFocus(){this.isFocused=!0},onClear(){this.$emit("input","")},focus(){this.$refs.input.focus()}}},Nt,[],!1,null,null,null);function Ct(){return document.body.clientWidth}function Ot(){return document.body.clientHeight}_t.options.__file="src/components/search-field/search-field.vue";var Tt={components:{vLayout:R,vSearchField:_t.exports},props:{iconCategory:{type:String,default:"AppView"},mountId:{type:String,default:"syno-sds-appview"}},data(){return{iconItems:[],layoutWidth:0,layoutHeight:0,showAppView:!1,taskId:void 0,showAddIcon:!1,addIconX:0,addIconY:0,searchText:"",isDragging:!1,width:Ct(),height:Ot(),animateCls:!1,itemType:"app",refreshCnt:0,filterItemIcon:[],showSearchLayout:!1,containerBasis:[0,0]}},computed:{viewStyle(){return{width:`${this.width}px`,height:`${this.height}px`}},menuClass(){return{"syno-sds-appview-animate":this.animateCls}},threshold(){return this.iconWidth/2},iconHeight(){return 156},iconWidth(){return 172},layoutStyle(){return{width:`${this.layoutWidth}px`,height:"100%"}},shortcutStyle(){return{width:(this.width-this.layoutWidth)/2+"px"}},addIconStyle(){return{top:`${this.addIconY}px`,left:`${this.addIconX}px`}},showNoResult(){return this.showSearchLayout&&this.filterItemIcon.length<=0},isDropdownType(){return"dropdown"===this.itemType}},watch:{searchText:ot()((function(t){this.showSearchLayout=""!==t,this.showSearchLayout?this.doFilter():this.filterItemIcon=[]}),200),async showAppView(t){!0===t&&this.validateItemIcons(),await this.onShowAppView(t)},async showSearchLayout(t){await this.$nextTick(),this.reLayout()}},beforeDestroy(){this.$options.manager&&this.$options.manager.unregister(this)},async mounted(){this.initEvent(),this.initManager(SYNO.SDS.DesktopMgr),await this.$nextTick(),this.updateBadge();const t=[this.$refs["shortcut-zone-left"],this.$refs["shortcut-zone-right"]];this.$options.shortcutDragZones=t.map((t=>new this.$DragZone(t,{notifyValidDrop:this.dropOnDesktop.bind(this),notifyOver:this.dragOnShortcut.bind(this),order:11,isOver(t,e,o){return function(t,e,o){return t.right>e&&t.left<e&&t.bottom>o&&t.top<o}(e,t.pageX,t.pageY)}}))),this.validateItemIcons(),SYNO.SDS.Packages.registerPackageStatusChange(this.onPackageStatusChange,this),SYNO.SDS.Packages.registerAllPackagesChange(this.refresh,this)},methods:{doFilter(){this.filterItemIcon=this.iconItems.filter((t=>{const e=SYNO.SDS.Config.FnMap[t.className||t.jsID];return SYNO.SDS.UIString.GetLocalizedString(e.config.title||"",t.className).toLowerCase().includes(this.searchText.toLowerCase())}))},destroy(){this.$el.parentNode.removeChild(this.$el),this.$destroy()},initManager(t){this.$options.manager=t,this.$options.manager.register(this)},initEvent(){window.addEventListener("resize",this.onWindowResize.bind(this))},updateBadge(){SYNO.SDS.Taskbar&&SYNO.SDS.Taskbar.updateStartBadge()},onWindowResize(){this.width=Ct(),this.height=Ot(),this.debounceReLayout()},validateItemIcons(){let t=new Map;for(let e of this.iconItems)t.set(e.className,e);this.iconItems=SYNO.SDS.AppUtil.getApps().map((e=>{const o=SYNO.SDS.Packages.getInfo(e);let n;return n=t.has(e)?t.get(e):{className:e,id:i(),itemType:this.itemType},n.newApp=SYNO.SDS.AppUtil.isNewApp(n.className),n.updateCnt=this.refreshCnt,o&&(n.isPackage=!0,n.pkgId=o.pkgId,n.packageStatus=o.status),n}))},notifyInstalled(t){const e=t.length;let o=SYNO.SDS.UserSettings.getProperty("Desktop","new_app_list")||[],i=0;for(let n=0;n<e;n++)SYNO.SDS.AppUtil.isValidApp(t[n])&&-1===o.indexOf(t[n])&&(o.push(t[n]),i++);i>0&&SYNO.SDS.UserSettings.setProperty("Desktop","new_app_list",o),SYNO.SDS.Desktop&&SYNO.SDS.Desktop.refresh(),this.refresh()},refresh(){this.refreshCnt++,this.validateItemIcons(),this.updateBadge()},onPackageStatusChange(t){this.validateItemIcons()},async onShowAppView(t){this.setNotifyMessageVisible(!t),t?(this.deactiveTaskbar(),await this.$nextTick(),this.reLayout(),this.$refs.layout.removeDD(),this.$refs.layout.registerDD(),this.$refs["search-layout"].removeDD(),this.$refs["search-layout"].registerDD(),this.animateCls=!0):(this.activeTaskbar(),this.clearNewApp(),this.animateCls=!1)},deactiveTaskbar(){SYNO.SDS.TaskBar&&SYNO.SDS.TaskBar.deactivate()},activeTaskbar(){SYNO.SDS.TaskBar&&SYNO.SDS.TaskBar.activate()},setNotifyMessageVisible(t){t?SYNO.SDS.NotifyMgr.show():SYNO.SDS.NotifyMgr.hide()},clearNewApp(){SYNO.SDS.AppUtil.clearNewApp();for(let t of this.iconItems)t.newApp=!1;this.updateBadge()},onLaunchApp(){this.$options.manager.show(SYNO.SDS.Desktop)}
1,onClickAppPanel(t){this.isDragging||this.$refs.ps.$el.className.includes("ps--scrolling")||(this.showAppView=!1,this.searchText="",this.$options.manager.show(SYNO.SDS.Desktop))},mountAddIcon(t,e){this.showAddIcon=!0,this.addIconX=t,this.addIconY=e,window.setTimeout((()=>{this.removeAddIcon()}),1e3)},removeAddIcon(){this.showAddIcon=!1},addToDesktop(t){t.itemType="desktop",t.id=i(),SYNO.SDS.Desktop.addLaunchItem(t,-1,{saveState:!0})},dropOnDesktop(t,e,o){if(this.taskId&&window.clearTimeout(this.taskId),this.mountAddIcon(t.pageX,t.pageY),SYNO.SDS.Desktop){const t=+o.el.getAttribute("index");let e;e=this.showSearchLayout?{...this.filterItemIcon[t]}:{...this.iconItems[t]},this.addToDesktop(e)}},dragOnShortcut(t,e,o){this.showAppView&&(this.taskId&&window.clearTimeout(this.taskId),this.$ddm.updateValidGhostCls(),this.$refs.layout.clearTask(),this.taskId=window.setTimeout((()=>this.dragItemToShortcut(o)),500))},dragItemToShortcut(t){if(t.addMetaProp("fromAppView",!0),this.showAppView=!1,SYNO.SDS.Desktop){const e=+t.el.getAttribute("index");let o;o=this.showSearchLayout?{...this.filterItemIcon[e]}:{...this.iconItems[e]},o.itemType="desktop",o.id=i(),t.unregisterDragZones(this.$options.shortcutDragZones),SYNO.SDS.Desktop.appItemOnDrag(o,t)}},onAddToDesktop(t){this.addToDesktop(t)},onStartDrag(t,e,o){this.isDragging=!0,o.registerDragZones(this.$options.shortcutDragZones)},onEndDrag(t){window.setTimeout((()=>{this.isDragging=!1}),0)},debounceReLayout:ot()((function(){this.reLayout()}),200),async reLayout(){if(!this.$el)return;const t=Math.floor(.76*this.$el.clientWidth/this.iconWidth);this.layoutWidth=this.iconWidth*t,this.layoutHeight=this.$el.clientHeight,await this.$nextTick(),this.containerBasis=[this.$refs.layout.$el.offsetLeft,this.$refs.layout.$el.offsetTop],await this.$nextTick(),this.$refs.layout.reLayout(),this.$refs["search-layout"].reLayout()},hide(){this.toggle(!1)},async toggle(t){this.showAppView=t},onReposition(t,e,o){e>=this.iconItems.length||e<0||t!==e&&(this.iconItems.splice(e,0,this.iconItems.splice(t,1)[0]),this.saveState())},saveState(){SYNO.SDS.UserSettings.setProperty("Desktop","appview_order",this.iconItems.map((t=>t.className)))},close(){this.$options.manager.show(SYNO.SDS.Desktop),SYNO.SDS.TaskBar.getStartButton().focus()},focus(){this.focusLayout()},focusSearchField(){var t;null===(t=this.$refs.search)||void 0===t||t.focus()},focusLayout(){(this.showSearchLayout?this.$refs["search-layout"]:this.$refs.layout).focus()},onSearchTabKeyDown(){this.focusLayout()},onLayoutTabKeyDown(){this.focusSearchField()},onScroll(){this.$refs.layout.reLayout(),this.$refs["search-layout"].reLayout()},onTransitionEnd(t){t.target===this.$el&&(this.focusSearchField(),this.reLayout())}}},At=u(Tt,$t,[],!1,null,null,null);At.options.__file="src/pages/app-menu/app-menu.vue";var Mt=At.exports,Et=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{directives:[{name:"show",rawName:"v-show",value:t.showAppView,expression:"showAppView"}],staticClass:"syno-sds-dropdown-menu",class:t.dropdownCls,style:t.viewStyle,attrs:{id:t.mountId},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.preventDefault(),t.close())},transitionend:t.onTransitionEnd}},[o("div",{staticClass:"syno-sds-dropdown-container"},[o("v-search-field",{ref:"search",attrs:{theme:"dropdown",width:408},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onSearchTabKeyDown.apply(null,arguments))}},model:{value:t.searchText,callback:function(e){t.searchText=e},expression:"searchText"}})],1),t._v(" "),o("div",{staticClass:"syno-sds-dropdown-layout-wrapper"},[t.showNoResult?o("div",{staticClass:"sds-desktop-no-result"},[t._v("\n\t\t\t"+t._s(t.$i18n("search","no_search_result"))+"\n\t\t")]):t._e(),t._v(" "),o("v-scrollbar",{ref:"ps",staticClass:"dropdown-menu-scrollbar"},[o("v-layout",{directives:[{name:"show",rawName:"v-show",value:t.showSearchLayout,expression:"showSearchLayout"}],key:"search-layout",ref:"search-layout",staticClass:"search-layout",attrs:{"get-container-el":function(){return t.$refs.ps.$el},"container-basis":[12,0],"vertical-margin":16,"aria-label":t.$i18n("common","user_app"),"icon-width":t.iconWidth,"icon-height":t.iconHeight,"icon-items":t.filterItemIcon,"icon-category":t.iconCategory,layout:"col","prev-threshold":t.threshold,"next-threshold":t.threshold,"ghost-cls":"dropdown-icon-dragging-proxy x-dd-drag-proxy","default-anim":!1,"allow-reposition":!1,"container-shown":t.showAppView},on:{reposition:t.onReposition,"start-drag":t.onStartDrag,"end-drag":t.onEndDrag,"launch-app":t.onLaunchApp,"add-to-desktop":t.onAddToDesktop},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onLayoutTabKeyDown.apply(null,arguments))}}}),t._v(" "),o("v-layout",{directives:[{name:"show",rawName:"v-show",value:!t.showSearchLayout,expression:"!showSearchLayout"}],key:"layout",ref:"layout",attrs:{"get-container-el":function(){return t.$refs.ps.$el},"container-basis":[12,0],"vertical-margin":16,"aria-label":t.$i18n("common","user_app"),"icon-width":t.iconWidth,"icon-height":t.iconHeight,"icon-items":t.iconItems,"icon-category":t.iconCategory,layout:"col","prev-threshold":t.threshold,"next-threshold":t.threshold,"ghost-cls":"dropdown-icon-dragging-proxy x-dd-drag-proxy","container-shown":t.showAppView},on:{"update:iconItems":function(e){t.iconItems=e},"update:icon-items":function(e){t.iconItems=e},reposition:t.onReposition,"start-drag":t.onStartDrag,"end-drag":t.onEndDrag,"launch-app":t.onLaunchApp,"add-to-desktop":t.onAddToDesktop},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:(e.preventDefault(),t.onLayoutTabKeyDown.apply(null,arguments))}}}
1)],1)],1),t._v(" "),o("div",{ref:"shortcut-zone",staticClass:"syno-sds-dropdown-shortcut-zone",style:t.shortcutZoneStyle,on:{click:t.onClickHide}}),t._v(" "),o("transition",{attrs:{name:"bounce"}},[t.showAddIcon?o("div",{staticClass:"add-icon",style:t.addIconStyle}):t._e()])],1)};Et._withStripped=!0;var Yt={extends:Mt,props:{},data(){return{itemType:"dropdown",viewHeight:0}},computed:{shortcutZoneStyle(){return{width:`${this.width}px`,height:`${this.height}px`}},viewStyle(){return{width:"432px",height:`${this.viewHeight>this.height-12?this.height-12:this.viewHeight}px`}},threshold(){return this.iconWidth/2},iconHeight(){return 88},iconWidth(){return 132},dropdownCls(){return{"syno-sds-dropdown-animate":this.animateCls}}},watch:{async showSearchLayout(t){await this.$nextTick(),this.reLayout()}},created(){},async mounted(){await this.$nextTick()},beforeDestroy(){},methods:{async onShowAppView(t){await Mt.methods.onShowAppView.apply(this,arguments),t&&this.createDropZones()},setNotifyMessageVisible(t){},deactiveTaskbar(){SYNO.SDS.TaskBar&&SYNO.SDS.TaskBar.bringToBack()},activeTaskbar(){SYNO.SDS.TaskBar&&SYNO.SDS.TaskBar.bringToFront()},onClickHide(t){this.isDragging||(this.searchText="",this.showAppView=!1,this.$options.manager.show(SYNO.SDS.Desktop))},createDropZones(){const t=[this.$refs["shortcut-zone"]];this.$options.shortcutDragZones=t.map((t=>new this.$DragZone(t,{notifyValidDrop:this.dropOnDesktop.bind(this),notifyOver:this.dragOnShortcut.bind(this)})))},mountAddIcon(t,e){this.showAddIcon=!0,this.addIconX=t,this.addIconY=e,window.setTimeout((()=>{this.removeAddIcon()}),1e3)},removeAddIcon(){this.showAddIcon=!1},dropOnDesktop(t,e,o){if(this.taskId&&window.clearTimeout(this.taskId),this.mountAddIcon(t.pageX,t.pageY),SYNO.SDS.Desktop){const t=+o.el.getAttribute("index");let e;e=this.showSearchLayout?{...this.filterItemIcon[t]}:{...this.iconItems[t]},e.itemType="desktop",e.id=i(),SYNO.SDS.Desktop.addLaunchItem(e,-1,{saveState:!0})}},dragOnShortcut(t,e,o){this.showAppView&&(this.taskId&&window.clearTimeout(this.taskId),this.$ddm.updateValidGhostCls(),this.$refs.layout.clearTask(),this.taskId=window.setTimeout((()=>this.dragItemToShortcut(o)),500))},dragItemToShortcut(t){if(t.addMetaProp("fromAppView",!0),this.showAppView=!1,SYNO.SDS.Desktop){const e=+t.el.getAttribute("index");let o;o=this.showSearchLayout?{...this.filterItemIcon[e]}:{...this.iconItems[e]},o.itemType="desktop",o.id=i(),this.unregisterDragZone(t),t.unregisterDragZones(this.$options.shortcutDragZones),SYNO.SDS.Desktop.appItemOnDrag(o,t)}},unregisterDragZone(t){this.$refs.layout.unregisterDragZone(t),this.$refs["search-layout"].unregisterDragZone(t)},onStartDrag(t,e,o){this.isDragging=!0,o.registerDragZones(this.$options.shortcutDragZones)},onEndDrag(t){window.setTimeout((()=>{this.isDragging=!1}),0)},async reLayout(){if(!this.$el)return;const t=Math.ceil(this.iconItems.length/3);this.viewHeight=t*(this.iconHeight+16)+60,await this.$nextTick(),this.$refs.layout.reLayout(),this.$refs["search-layout"].reLayout()},onTransitionEnd(t){t.target===this.$el&&(this.focusSearchField(),this.reLayout())}}},Pt=u(Yt,Et,[],!1,null,null,null);Pt.options.__file="src/pages/app-menu/dropdown-menu.vue";var Bt=Pt.exports;function jt(){const t=document.querySelector("#login-inject-viewport");t&&(t.setAttribute("content",""),t.parentNode.removeChild(t))}SYNO.SDS.CreateDesktop=function(t){jt();const e=document.createElement("div");e.id=t,document.body.appendChild(e);const o=new(Vue.extend(St))({propsData:{mountId:t}});return o.$mount(e),o},SYNO.SDS.CreatePureDesktop=function(t="sds-desktop"){return jt(),new xt(t)},SYNO.SDS.CreateStandaloneDesktop=function(t){jt();const e=document.createElement("div");e.id=t,document.body.appendChild(e);const o=new(Vue.extend(kt))({propsData:{mountId:t}});return o.$mount(e),o},SYNO.SDS.CreateAppView=function(t,{dropdown:e=!1}={}){const o=document.createElement("div");o.id=t,document.body.appendChild(o);const i=new(e?Vue.extend(Bt):Vue.extend(Mt))({propsData:{mountId:t}});return i.$mount(o),i},SYNO.SDS.CreateActiveAppView=function(t){return SYNO.SDS.CreateAppView(t,{dropdown:"classical"===SYNO.SDS.UserSettings.getProperty("Desktop","appMenuStyle")})},SYNO.SDS.DesktopMgr=new class{constructor(){this.views=[],this.topView=null}register(t){this.views.push(t)}unregister(t){this.views=this.views.filter((e=>t!==e))}
1isTop(t){return this.topView===t}show(t){for(const e of this.views)e===t?(this.topView=t,e.toggle(!0)):e.toggle(!1)}startUpgrading(){var t,e,o;this.hideAll(),null===(t=SYNO.SDS.TaskBar)||void 0===t||t.hide(),null===(e=SYNO.SDS.NotifyMgr)||void 0===e||e.disable(),null===(o=SYNO.SDS.Packages)||void 0===o||o.stopNotifyThirdPartyChanged()}stopUpgrading(){var t,e,o;this.show(SYNO.SDS.Desktop),null===(t=SYNO.SDS.TaskBar)||void 0===t||t.show(),null===(e=SYNO.SDS.NotifyMgr)||void 0===e||e.enable(),null===(o=SYNO.SDS.Packages)||void 0===o||o.startNotifyThirdPartyChanged()}hideAll(){for(const t of this.views)t.hide(!1);this.topView=null}}}()}();

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.