webpackJsonp([0,3],[function(e,t,n){var i,r;i=[n(1522),n(959)],r=function(e,t){"use strict";t.start()}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(){var e=s.default.initial(arguments).concat({escape:!0});return new l.default.SafeString(c.default.apply(c.default,e))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(4),l=r(o),u=n(6),c=r(u);t.default=i,e.exports=t.default},,,function(e,t,n){e.exports=n(1517)},,function(e,t,n){
var i,r;i=[n(141)],r=function(e){"use strict";return function(){return e.t.apply(e,arguments)}}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";e.exports=n(250)},,,function(e,t,n){"use strict";function i(e,t){if(!t)return e;(0,x.default)(b.default.isArray(t),"An adapter interface must be an array of method names");var n={};return t.forEach(function(t){n[t]=function(){return e[t].apply(e,arguments)}}),n}function r(e,t){if(e.hasOwnProperty(t)){var n=e[t];n&&b.default.isFunction(n.destroy)&&n.destroy(),
delete e[t]}}function a(e){for(var t in e)r(e,t)}function s(e,t,n){(0,x.default)(void 0!==t,"An implementation for "+e+" must be provided when registering"),C[e]=i(t,n);var r=_[e];r&&(delete _[e],r.resolve(C[e]))}function o(e,t,n){f(e)||s(e,t(),n)}function l(e){b.default.each(e,function(e,t){var n=void 0,i=void 0;b.default.isArray(e)?(n=e[0],i=e[1]):n=e,s(t,n,i)})}function u(e){b.default.each(e,function(e,t){var n=void 0,i=void 0;b.default.isArray(e)?(n=e[0],i=e[1]):n=e,o(t,n,i)})}function c(e){return f(e)?S.default.Deferred().resolve(C[e]).promise():(_[e]||(_[e]=S.default.Deferred()),
_[e].promise())}function d(e,t,n){C.hasOwnProperty(e)&&(T[e]=C[e]),s(e,t,n)}function h(e){T.hasOwnProperty(e)&&(r(C,e),s(e,T[e]),delete T[e])}function p(){a(C),a(T)}function f(e){return C.hasOwnProperty(e)}function m(e){return(0,x.default)(f(e),"An implementation for "+e+" has not been registered"),C[e]}function v(e){var t=m(e);if(b.default.isFunction(t)){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.apply(void 0,i)}(0,x.default)(void 0===t,e+" is not a function. Use `resolve` instead of `execute`.");
}var g=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.register=s,t.registerOnce=o,t.registerAll=l,t.registerAllOnce=u,t.waitFor=c,t.swapIn=d,t.swapOut=h,t.reset=p,t.hasRegistered=f,t.resolve=m,t.execute=v;var y=n(3),b=g(y),w=n(5),S=g(w),P=n(38),x=g(P),C={},T={},_={}},function(e,t,n){"use strict";var i=n(1469).default;t.default=i||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},t.__esModule=!0;
},function(e,t){"use strict";function n(e,t,n){return e===t?n.fn(this):n.inverse(this)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(38),o=i(s),l=n(26),u=i(l),c={_map:{},register:function(e,t){(0,o.default)(a.default.isFunction(t),'The "'+e+'" command must be a function'),this._map[e]=t},registerAll:function(e){var t=this;a.default.each(e,function(e,n){
t.register(n,e)})},reset:function(){this._map={}},execute:function(e){var t=this._map[e];if((0,o.default)(t,'The "'+e+'" command has not been registered'),t){(0,u.default)("[Commands] Executing",e);for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.apply(void 0,i)}}};t.default=c,e.exports=t.default},function(e,t){"use strict";t.default=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},t.__esModule=!0;
},function(e,t){"use strict";t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.__esModule=!0},function(e,t,n){"use strict";var i=n(568).default;t.default=function(e,t,n){for(var r=!0;r;){var a=e,s=t,o=n;l=c=u=void 0,r=!1,null===a&&(a=Function.prototype);var l=i(a,s);if(void 0!==l){if("value"in l)return l.value;var u=l.get;if(void 0===u)return;return u.call(o)}var c=Object.getPrototypeOf(a);if(null===c)return;e=c,t=s,n=o,r=!0}},t.__esModule=!0;
},function(e,t,n){"use strict";var i=n(567).default,r=n(1471).default;t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=i(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r?r(e,t):e.__proto__=t)},t.__esModule=!0},function(e,t,n){var i,r,a=n(1466).default;i=[n(3),n(53)],r=function(e,t){"use strict";function n(e){return!0}function i(t){return e.isObject(t)&&!e.isArray(t);
}function r(i,r){r||(r={});var a=e.defaults(r,{typeName:i,parse:e.bind(t.parseType,t,i),stringify:e.bind(t.stringifyType,t,i)});return a.validate=r.validate?s(r.validate):n,a.isRequired=e.extend({},a,{validate:function(e){return null!=e&&a.validate(e)}}),a}function s(e){return function(t){return null==t||e(t)}}var o=["boolean","integer","float","string","object","array"],l={any:r("any"),"boolean":r("boolean",{validate:e.isBoolean}),integer:r("integer",{validate:a}),"float":r("float",{validate:e.isNumber
}),string:r("string",{validate:e.isString}),object:r("object",{validate:i}),array:r("array",{validate:e.isArray}),list:r("list",{validate:e.isArray}),encodedString:r("encodedString",{validate:e.isString}),queryString:r("queryString",{validate:i}),instanceOf:function(){var t=e.toArray(arguments);return r("instanceOf",{validate:function(n){return e.some(t,function(e){return n instanceof e})}})},oneOf:function(){var t=e.toArray(arguments);return r("oneOf",{validate:function(n){return e.contains(t,n);
}})},oneOfType:function(){var t=e.toArray(arguments);return r("oneOfType",{validate:function(n){return e.some(t,function(e){return e.validate(n)})}})},custom:function(e){return r("custom",{validate:e})},getAttrTypeFor:function(e){if(null==e)return l.any;for(var t=0,n=o.length;t<n;t++){var i=o[t],r=l[i];if(r.validate(e))return r}return l.any}};return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";t.default=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);
return t.default=e,t},t.__esModule=!0},function(e,t,n){var i,r,a=n(89).default;i=[n(3),n(37),n(5),n(8),n(53),n(279),n(38),n(22),n(26),n(296),n(206),n(18),n(64),n(70),n(54)],r=function(e,t,n,i,r,s,o,l,u,c,d,h,p,f,m){"use strict";var v=/^change:[\w]+$/,g=t.Model.extend({mixins:[d],name:"AbstractModel",responseType:p.xml,hasInitialRelations:!1,_context:["parent","skipCache"],cache:null,cacheKey:function(e){return e[this.idAttribute]},constructor:function(n,i){n||(n={}),i||(i={});var r;if(this.initialize!==t.Model.prototype.initialize&&(r=this.initialize,
this.initialize=function(){}),e.each(this.getContext(),function(e){var t=this.findOption(i,e);void 0!==t&&(this[e]=t)},this),!this.cache||this.findOption(i,"skipCache"))return t.Model.prototype.constructor.apply(this,arguments),this._initModel(i),void(r&&(r.apply(this,arguments),this.initialize=r));var a=this.findOption(i,"onlyIfCached"),s=this.cache.getItemCacheKey(this,n),o=this.cache.get(s);return o?(this.uninitialize(),a||(this.preserveCachedAttributes&&(o.isPreservingAttributes=!0),i.parse?n=o.parse(n):e.extend(n,o._getRelations(this.syncedRelations,n)),
o.set(n),o.isPreservingAttributes=!1),e.each(this.getContext(),function(e){o.setContext(e,this[e]||o[e])},this),i.collection&&(o.collection=i.collection),o._computedEntityID&&o.updateEntity(),o):a?{}:(t.Model.prototype.constructor.apply(this,arguments),this._initModel(i),r&&(r.apply(this,arguments),this.initialize=r),void this.cache.store(this,s))},uninitialize:function(){this.stopListening()},_initModel:function(e){m.get("shouldCreateStateTree")&&this.entityID&&(this.state=this.toState()),this._initRelations(e),
this._initDerived(e),this._initState()},_initRelations:function(t){this._relationListeners={};var n=e.extend({},this.sessionRelations,this.syncedRelations);e.each(n,function(t,n){this._initRelation(t,n);var i=e.bind(this._initRelation,this,t,n);this.on("change:"+n,i)},this),this.hasInitialRelations=!0,this.set(this._getRelations(this.sessionRelations,this.attributes)),t.parse||this.set(this._getRelations(this.syncedRelations,this.attributes))},_initRelation:function(t,n){var i=this._resolveRelationDefinition(t),r=i.relationClass,a=this.get(n),s=this.previous(n),o=a&&a instanceof r,l=s&&s instanceof r;
l&&e.has(this._relationListeners,n)&&(s.off("all",this._relationListeners[n]),this._relationListeners[n]=null),o&&this._forwardRelationEvents(a,n)},_initDerived:function(){e.each(this.derivedAttrs,this._setDerived,this)},_initState:function(){m.get("shouldCreateStateTree")&&(this.state=this.toState(),this.updateState=this.updateState.bind(this),this._computedEntityID&&this.updateEntity(),this.on("all",this.onEvent,this))},findOption:function(e,t){return e[t]||e.collection&&e.collection[t]},getContext:function(){
if(!this.context)return this._context;var t=e.result(this,"context");return this._context.concat(t)},setContext:function(t,n){if(this.getContext().indexOf(t)!==-1&&this[t]!==n){if(this[t]=n,this.hasDerived(t)){var i=this.derivedAttrs[t],r=i.call(this);this.set(t,r)}if("parent"!==t){var a=e.extend({},this.sessionRelations,this.syncedRelations);e.each(a,function(e,i){var r=this.get(i);r&&r.setContext(t,n)},this)}}},getScopedKey:function(t){return null!=t&&e.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+t:t;
},getState:function(){return this._computedEntityID||this.state},updateState:function(){var e=this.getState();this.state=this.toState();var t=this.getState();this._computedEntityID&&t!==e&&this.updateEntity(),this.trigger("statechange",this,t,e)},updateEntity:function(){o(this.entityType,this.name+" requires an `entityType`"),i.trigger("change:entity",{type:this.entityType,id:this._computedEntityID,model:this})},toState:function(){var t=a(this.attributes),n=e.reduce(t,this.reduceState,{possibleEntityContainers:[]
},this);return Object.defineProperty(n,"possibleEntityContainers",{enumerable:!1}),this.entityID&&(this._computedEntityID=this.entityID(n)),n},reduceState:function(e,t){var n=this.attributes[t];return n&&n.getState?(e.possibleEntityContainers.push(t),e[t]=n.getState(),e):n&&n.initialize?e:(e[t]=n,e)},shouldUpdateRelationState:function(e,t,n){return t!==n},toJSON:function(){function i(n,i){var a=this.get(i);if(a){var o;o=r.excludeDefaults?a instanceof t.Collection?a.map(function(t){return s(e.result(t,"defaults"),t.toJSON(r));
}):s(e.result(a,"defaults"),a.toJSON(r)):a.toJSON(r),m[i]=o}}var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],a=this.syncedAttrs,o=this.sessionRelations,l=this.syncedRelations,u=this.attributes,c={};for(var d in u){var h=o&&e.has(o,d),p=l&&e.has(l,d),f=r.syncedOnly&&(!a||!e.has(a,d));h||p||f||(c[d]=u[d])}var m=n.extend(!0,{},c);return r.syncedOnly||e.each(o,i,this),e.each(l,i,this),m},clone:function(){var t=e.extend(e.pick(this,this.getContext()),{skipCache:!0});return new this.constructor(this.toJSON(),t)||null;
},copy:function(t){o(t instanceof this.constructor,"Only a model of the same type may be copied");var n=t.toJSON();return e.extend(n,this._getRelations(this.sessionRelations,n,{parse:!0}),this._getRelations(this.syncedRelations,n,{parse:!0})),this.set(n)},restoreDefaults:function(t){var n={};return e.each(this.attributes,function(t,i){this.derivedAttrs&&e.has(this.derivedAttrs,i)||(n[i]=void 0)},this),e.extend(n,this._getRelations(this.sessionRelations,{},{reset:!0}),this._getRelations(this.syncedRelations,{},{
reset:!0}),e.result(this,"defaults"),t),this.set(n)},set:function(n,i,r){var a;e.isObject(n)?(a=n,r=i):(a={})[n]=i,r||(r={});var s,o=this.shouldPreserveAttributes();return!o&&r.merge&&this.preserveCachedAttributes&&(s=!0,o=!0,this.isPreservingAttributes=!0),o&&(a=this._removePreservedAttrs(a)),t.Model.prototype.set.call(this,a,r),s&&(this.isPreservingAttributes=!1),this},hasAttr:function(t){var n=this.sessionAttrs&&e.has(this.sessionAttrs,t),i=this.syncedAttrs&&e.has(this.syncedAttrs,t);return!(!n&&!i);
},hasRelation:function(t){var n=this.sessionRelations&&e.has(this.sessionRelations,t),i=this.syncedRelations&&e.has(this.syncedRelations,t);return!(!n&&!i)},hasDerived:function(t){return!(!this.derivedAttrs||!e.has(this.derivedAttrs,t))},validate:function(t,n){var i=e.extend({},this.sessionAttrs,this.syncedAttrs,this.sessionRelations,this.syncedRelations),r=this._validateTypes(t,i);return r&&o(!1,r),r},parse:function(e,t){return t&&t.save?this.attributes:this.convert(e,t)},convert:function(t,n){var i,a=t,s=e.result(this,"responseType");
e.isString(a)&&(i=!0,e.isFunction(this.augmentResponseText)&&(a=this.augmentResponseText(a,s)),a=s.parse(a),s===p.json&&(a=r.splitChildren(a))),e.isFunction(this.augmentResponse)&&(a=this.augmentResponse(a,s)),i&&this.rootPropertyName&&e.has(a,this.rootPropertyName)&&(a=a[this.rootPropertyName]),e.isArray(a)&&(a=e.first(a));var o,l={};e.each(this.sessionAttrs,function(t,n){e.has(a,n)&&(l[n]=a[n])}),e.each(this.syncedAttrs,function(t,n){if(e.has(a,n)){var i,r=t;r.typeName||(r=t.type,i=e.omit(t,"type")),
l[n]=r===h.string?a[n]:r.parse(a[n],i)}else this.has(n)&&(o||(o=e.result(this,"defaults")),l[n]=o&&e.has(o,n)?o[n]:void 0)},this);var u=e.extend({},n,{parse:!0});return e.extend(l,this._getRelations(this.syncedRelations,a,u)),l},save:function(i,r,a){var s;null==i||"object"==typeof i?(s=i,a=r):(s={})[i]=r;var o=e.extend({save:!0},a),l=e.extend(this.getSaveParams(s),o.data);if(e.isEmpty(l))return o.success&&o.success(this),n.Deferred().resolve(this);o.data=l;var u=o.success;return o.success=function(e,t,n){
e.cache&&e.cache.store(e),u&&u(e,t,n)},t.Model.prototype.save.call(this,s,o)},sync:function(n,i,r){var a=r?e.clone(r):{};if("create"===n||"update"===n){var s=a.data,o=a.url||e.result(this,"saveUrl")||e.result(this,"syncUrl")||e.result(this,"url");a.url=l.join(o,s),a.data=""}return t.Model.prototype.sync.call(this,n,i,a)},getSaveParams:function(t){var n=this._getSaveAttrs(t),i=e.reduce(n,function(t,n,i){var r=n.definition,a=n.value,s=i;if(!r)return t[s]=a,t;var o=r.relationClass;if(o){var l,u=o.prototype.model;
r.rootPropertyName?l=r.rootPropertyName:a.rootPropertyName?l=a.rootPropertyName:u&&u.prototype&&(l=u.prototype.rootPropertyName),a=a.getSaveParams(),l&&(s=l)}else{var c,d;e.has(r,"type")?(c=r.type,d=e.omit(r,"type")):c=r,a=c.stringify(a,d)}return t[s]=a,t},{},this);return i},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void o(!1,this.name+" is already capturing events");var t=this.set,n=[],i=e.clone(this.attributes);this.set=function(i,r,a){var s,o=e.extend({},a,{
silent:!0});return"object"==typeof i?(s=i,a=r):(s={})[i]=r,e.each(s,function(e,i){this.get(i)!==e&&(n.push({key:i,value:e}),t.call(this,i,e,o))},this),e.each(this._derivedListeners,function(e){var i=e.key,r=this.derivedAttrs[i],a=r.call(this);this.get(i)!==a&&(n.push({key:i,value:a}),t.call(this,i,a,o))},this),this},this.releaseCapturedChangeEvents=function(){this.set=t,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,this._previousAttributes=i,this._changing=!0,e.each(n,function(e){
this.trigger("change:"+e.key,this,e.value)},this),this._changing=!1,e.isEmpty(n)||this.trigger("change",this,{})},this.discardCapturedChangeEvents=function(){this.set=t,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,n.length=0}},spyOnGet:function(e){var t=[],n=this.get;return this.get=function(e){return t.push("change:"+e),this.hasRelation(e)&&t.push("change:"+e+".change"),n.apply(this,arguments)},e.call(this),this.get=n,t},shouldPreserveAttributes:function(){return!!(this.isPreservingAttributes||this.collection&&this.collection.isPreservingAttributes);
},_removePreservedAttrs:function(t){var n=e.reduce(t,function(t,n,i){var r=this.get(i);return e.isObject(r)||e.isUndefined(n)||(t[i]=n),t},{},this);return n},_resolveRelationDefinition:function(t){return e.isFunction(t)?t.call(this):t},_getRelations:function(n,i,a){i||(i={}),a||(a={});var s={};return e.each(n,function(n,l){var u=this._resolveRelationDefinition(n),c=u.relationClass;o(c,this.name+" requires a `relationClass` for the "+l+" relation");var d=l;a.parse&&!e.has(i,l)&&e.has(u,"rootPropertyName")&&(d=u.rootPropertyName);
var h=i[d],p=this.shouldPreserveAttributes();if(h instanceof c)return void(s[l]=h);if(!h&&u.deferred)return void(p||(s[l]=void 0));var f=a.reset?null:this.get(l),m=f instanceof c,v=c.prototype instanceof t.Collection;if(v?h=r.parseArray(h):h||(h={}),m){f.isPreservingAttributes=p||f.preserveCachedAttributes;var g=u.setOptions;e.isFunction(g)&&(g=g.call(this,a)),v?f.set(h,e.extend({parse:a.parse,remove:!f.isPreservingAttributes},g)):(a.parse&&(h=f.parse(h)),f.set(h,g)),f.isPreservingAttributes=!1}else{
var y={parse:a.parse};if(e.each(this.getContext(),function(e){y[e]=this[e]},this),!v){var b=u.attrs;e.isFunction(b)&&(b=b.call(this,i)),h=e.extend({},h,b)}var w=u.options;e.isFunction(w)&&(w=w.call(this,i)),e.extend(y,{parent:this},w),f=new c(h,y)}s[l]=f},this),s},_forwardRelationEvents:function(t,n){function i(){var i=arguments[0];if("change"!==i){if("statechange"===i)return void(this.shouldUpdateRelationState.apply(this,e.rest(arguments,1))&&f.scheduleUpdate(this.updateState,this));var a=e.toArray(arguments);
a[0]="change:"+n+"."+i,this.trigger.apply(this,a),e.contains(r,i)||(this.trigger("change:"+n+".change",this,t),this.trigger("change",this))}}var r=["sync","request","sort","invalid","error","add","remove"];t.on("all",i,this),this._relationListeners[n]=i},_setDerived:function(t,n){var i,r=this.spyOnGet(function(){var e=this.set;this.set=function(){o(!1,this.name+" blocked `set` in the "+n+" attribute. Derived attributes are read-only.")},i=t.call(this),this.set=e});this.set(n,i),e.each(r,function(e){
this._addDerivedListener(n,e,t)},this)},_addDerivedListener:function(t,n,i){this._derivedListeners||(this._derivedListeners=[]);var r={key:t,name:n,callback:e.bind(this._setDerived,this,i,t)},a=e.findWhere(this._derivedListeners,{key:t,name:r.name});a||(this._derivedListeners.push(r),this.on(r.name,r.callback))},_getSaveAttrs:function(t){var n;if(t)n=e.reduce(t,function(e,t,n){return e[n]={definition:this.syncedAttrs[n],value:t},e},{},this);else{var i=e.extend({},this.syncedAttrs,this.syncedRelations);
n=e.reduce(i,function(t,n,i){var r=this._resolveRelationDefinition(n),a=r.save;return e.isFunction(a)&&(a=a.call(this)),a&&(t[i]={definition:r,value:this.get(i)}),t},{},this)}return n},_validateTypes:function(n,i){var r=a(n),s=e.reduce(r,function(r,a){if(this.hasDerived(a))return r;if(!e.has(i,a))return r.push(this.name+" received an unknown attribute: "+a+". All attributes must be defined in `sessionAttrs`, `syncedAttrs`, `sessionRelations`, or `syncedRelations`."),r;var s,o=n[a],l=this._resolveRelationDefinition(i[a]),u=l.relationClass;
s=u?this.hasInitialRelations?h.instanceOf(u):u.prototype instanceof t.Collection?h.oneOfType(h.array,h.object):h.object:l.type?l.type:l;var c=s.validate;return c?c(o)||r.push(a+" of type "+s.typeName+" has an invalid value: "+JSON.stringify(o)):r.push(a+" has an unknown type. Specify the type in the attribute definition or use attrTypes.any as a wildcard type."),r},[],this);if(s.length>0)return s.join("\n")},onEvent:function(e){v.test(e)&&f.scheduleUpdate(this.updateState,this)}});return g}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e,t){var n=l.default.partials[e],i=s.default.extend({},t.hash.context||this,t.hash);return new l.default.SafeString(n(i))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(4),l=r(o);t.default=i,e.exports=t.default},,function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(645),a=i(r);t.autobind=a.default;var s=n(803),o=i(s);t.after=o.default;
var l=n(804),u=i(l);t.compose=u.default;var c=n(805),d=i(c);t.debounce=d.default;var h=n(806),p=i(h);t.memoize=p.default;var f=n(807),m=i(f);t.once=m.default;var v=n(437),g=i(v);t.throttle=g.default},function(e,t,n){"use strict";var i=n(198).default;t.default=function(){function e(e,t,n){for(var r=0;r<t.length;r++){var a=t[r],s=a.decorators,o=a.key;if(delete a.key,delete a.decorators,a.enumerable=a.enumerable||!1,a.configurable=!0,("value"in a||a.initializer)&&(a.writable=!0),s){for(var l=0;l<s.length;l++){
var u=s[l];if("function"!=typeof u)throw new TypeError("The decorator for method "+a.key+" is of the invalid type "+typeof u);a=u(e,o,a)||a}if(void 0!==a.initializer){n[o]=a;continue}}i(e,o,a)}}return function(t,n,i,r,a){return n&&e(t.prototype,n,r),i&&e(t,i,a),t}}(),t.__esModule=!0},function(e,t,n){var i,r;i=[n(3),n(37),n(5),n(38),n(22),n(206),n(64),n(70),n(54)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=t.Collection.extend({mixins:[a],responseType:s.xml,instanceOptions:["url","path","pageStart","pageSize","persistInCache","skipCache"],
_context:["parent"],cache:null,cacheKey:function(){return e.result(this,"url")},constructor:function(i,r){r||(r={}),e.each(this.getContext(),function(e){var t=r[e];void 0!==t&&this.setContext(e,t)},this);var a=e.result(this,"instanceOptions");if(e.each(a,function(t){e.has(r,t)&&(this[t]=r[t])},this),null==this.pageStart&&null==this.pageSize||(this.pageStart||(this.pageStart=0),this.pageSize||(this.pageSize=0)),r.populated&&this.resetPopulatePromise(n.Deferred().resolve().promise()),!this.cache||this.skipCache)return t.Collection.prototype.constructor.apply(this,arguments),
void this._initState();this.initialize.apply(this,arguments);var s=this.cache.getItemCacheKey(this),o=this.cache.get(s);return this.uninitialize(),o?o:r.onlyIfCached?{}:(t.Collection.prototype.constructor.apply(this,arguments),this._initState(),void this.cache.store(this,s))},uninitialize:function(){this.stopListening()},_initState:function(){l.get("shouldCreateStateTree")&&(this.state=this.toState(),this.updateState=this.updateState.bind(this),this.on("reset update sort",this.onCollectionChange,this),
this.on("statechange",this.onStateChange,this))},getContext:function(){if(!this.context)return this._context;var t=e.result(this,"context");return this._context.concat(t)},setContext:function(e,t){this.getContext().indexOf(e)!==-1&&this[e]!==t&&(this[e]=t,this.each(function(n){n.setContext(e,t)}))},getState:function(){return this.state},updateState:function(){var e=this.getState();this.state=this.toState();var t=this.getState();this.trigger("statechange",this,t,e)},toState:function(){return this.reduce(this.reduceState,[]);
},reduceState:function(e,t){var n=t.getState();return n&&e.push(n),e},shouldUpdateModelState:function(e,t,n){return t!==n},sync:function(){return this.cache&&this.cache.store(this),t.sync.apply(this,arguments)},syncUrl:function(){var t="";if(this.url&&(t=e.result(this,"url")),this.path&&(t=r.join([t,e.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var n={"X-Plex-Container-Start":this.pageStart||0,"X-Plex-Container-Size":this.pageSize||0};t=r.join(t,n)}return t},parse:function(e,t){
return this.convert(e)},convert:function(t){var n=t;if(e.isString(n)){var i=e.result(this,"responseType");e.isFunction(this.augmentResponseText)&&(n=this.augmentResponseText(n,i)),n=i.parse(n)}if(e.isFunction(this.augmentResponse)&&(n=this.augmentResponse(n)),e.isArray(n))return n;var r=this.model.prototype.rootPropertyName;if(!r)return n;var a=n[r];return a?(e.isArray(a)||(a=[a]),a):[]},clone:function(t){t||(t=this.models);var n=e.result(this,"instanceOptions"),i=e.extend(e.pick(this,n),e.pick(this,this.getContext()),{
skipCache:!0,persistInCache:!1});return new this.constructor(t,i)||null},cloneDeep:function(t){t||(t=this.models);var n=e.map(t,function(e){return e.clone()});return this.clone(n)},clear:function(t){t=e.extend({silent:!0},t),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],t)},getSaveParams:function(){return this.map(function(e){return e.getSaveParams()})},onCollectionChange:function(){o.scheduleUpdate(this.updateState,this)},onStateChange:function(e,t,n){e!==this&&this.shouldUpdateModelState(e,t,n)&&o.scheduleUpdate(this.updateState,this);
}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},,function(e,t,n){"use strict";function i(e,t,n){return!(0,s.default)(e.props,t)||!(0,s.default)(e.state,n)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(306),s=r(a);e.exports=t.default},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){return e===t}function r(e){var t=arguments.length<=1||void 0===arguments[1]?i:arguments[1],n=null,r=null;
return function(){for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return null!==n&&n.length===a.length&&a.every(function(e,i){return t(e,n[i])})?r:(n=a,r=e.apply(void 0,a))}}function a(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var n=t.map(function(e){return typeof e}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, "+("instead received the following types: ["+n+"]"))}return t}function s(e){
for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),s=0;s<t;s++)r[s]=arguments[s];var o=0,l=r.pop(),u=a(r),c=e.apply(void 0,[function(){return o++,l.apply(void 0,arguments)}].concat(i)),d=function(e,t){for(var i=arguments.length,r=Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];var s=u.map(function(n){return n.apply(void 0,[e,t].concat(r))});return c.apply(void 0,n(s))};return d.resultFunc=l,d.recomputations=function(){
return o},d.resetRecomputations=function(){return o=0},d}}function o(){return s(r).apply(void 0,arguments)}function l(e){var t=arguments.length<=1||void 0===arguments[1]?o:arguments[1];if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce(function(e,t,i){
return e[n[i]]=t,e},{})})}t.__esModule=!0,t.defaultMemoize=r,t.createSelectorCreator=s,t.createSelector=o,t.createStructuredSelector=l},,function(e,t,n){var i,r;/*!
	  Copyright (c) 2016 Jed Watson.
	  Licensed under the MIT License (MIT), see
	  http://jedwatson.github.io/classnames
	*/
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var r=typeof i;if("string"===r||"number"===r)e.push(i);else if(Array.isArray(i))e.push(n.apply(null,i));else if("object"===r)for(var s in i)a.call(i,s)&&i[s]&&e.push(s)}}return e.join(" ")}var a={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(i=[],r=function(){return n}.apply(t,i),!(void 0!==r&&(e.exports=r)))}()},function(e,t,n){var i,r;i=[n(73)],r=function(e){"use strict";var t=new e({
"interface":["get","save","populate"]});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e,t,n,i,r,a,s,o){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,i,r,a,s,o],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}e.exports=i},function(e,t,n){var i,r;i=[n(3),n(9)],
r=function(e,t){"use strict";var n=t.CollectionView.extend({appendHtml:function(e,n,i){return this.sorted?this.sortedAppendHtml.apply(this,arguments):this.reversed?this.reversedAppendHtml.apply(this,arguments):t.CollectionView.prototype.appendHtml.apply(this,arguments)},sortedAppendHtml:function(e,t,n){if(e.isBuffering){var i=e.elBuffer.childNodes;i.length<=n?e.elBuffer.appendChild(t.el):e.elBuffer.insertBefore(t.el,i[n]),e._bufferedChildren.push(t)}else{var r=e.itemViewContainer?e.$(e.itemViewContainer):e.$el,a=r.children();
a.size()<=n?r.append(t.el):a.eq(n).before(t.el)}},reversedAppendHtml:function(e,t,n){if(e.isBuffering)e.elBuffer.insertBefore(t.el,e.elBuffer.firstChild),e._bufferedChildren.push(t);else{var i=e.itemViewContainer?e.$(e.itemViewContainer):e.$el;i.prepend(t.el)}},measureList:function(){if(this.children.length){var t=this.children._views,n=t[e.first(e.keys(t))];e.defer(e.bind(function(){this.itemWidth=n.$el.outerWidth(!0),this.itemHeight=n.$el.outerHeight(!0),this.itemMarginRight=parseInt(n.$el.css("margin-right"),10),
this.itemMarginBottom=parseInt(n.$el.css("margin-bottom"),10),this.triggerMethod("measure",this)},this))}},getViewForModel:function(e){var t=this.children._indexByModel[e.cid];return this.children._views[t]},reorder:function(){var t=this.children,n=this.collection.models,i=e.map(n,function(e,n){var i=t.findByModel(e);return i._index=n,i.el});this.$el.append(i)},onCollectionRendered:function(){this.measure&&this.measureList()}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";
function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var r=n(1942),a=i(r),s=n(1943),o=i(s);t.Provider=a.default,t.connect=o.default},function(e,t,n){var i,r;i=[n(3),n(581),n(26)],r=function(e,t,n){"use strict";function i(t,n){e.isArray(n)?e.each(n,t):t(n)}function r(t){return e.reduce(t,function(e,t){var i=t.split("="),r=i[0],a=i[1];try{r=decodeURIComponent(r),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(r)?Array.isArray(e[r])?e[r].push(a):e[r]=[e[r],a]:e[r]=a;
}catch(s){n.warn("Unable to decode query string at "+r)}return e},{})}var a=new t((!1),"",(!0)),s={parseXML:function(e){var t=a.parseXmlString(e);if(!t)return n.warn("parseXML: No XML document created"),{};if(t.getElementsByTagName("parsererror").length)return n.warn("parseXML: Errors found while parsing XML document"),{};try{return a.xml2json(t)}catch(i){return n.warn("parseXML: Unable to parse XML: "+i.message),{}}},replaceXMLElementNames:function(t,n,i){e.isArray(n)||(n=[n]);var r=n.join("|"),a=new RegExp("<("+r+")","g"),s=new RegExp("</("+r+")>","g");
return t=t.replace(a,"<"+i+' elementName="$1"'),t=t.replace(s,"</"+i+">")},parseEncodedString:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];if(null==n)e[t]="";else try{e[t]=decodeURIComponent(n)}catch(i){}}}e&&i(n,t)},parseInteger:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];null==n||""===n?e[t]=0:e[t]=parseInt(n,10)}}e&&i(n,t)},parseFloat:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){
function n(t){if(e.hasOwnProperty(t)){var n=e[t];null===n||""===n?e[t]=0:e[t]=parseFloat(n)}}e&&i(n,t)}),parseBoolean:function(e,t){function n(t){if(e.hasOwnProperty(t)){var n=e[t];e[t]=1===Number(n)||"true"===n}}e&&i(n,t)},parseArray:function(t,n){function r(n){if(t.hasOwnProperty(n)){var i=t[n];e.isArray(i)||(t[n]=[i])}else t[n]=[]}t&&i(r,n)},parseQueryString:function(t,n,a){function s(n){if(t.hasOwnProperty(n)){var i=t[n];if(!e.isObject(i))return e.isString(i)&&(i=i.trim().replace(/^(\?|#)/,""))?void(t[n]=r(i.split(a))):void(t[n]={});
}}t&&(a||(a="&"),i(s,n))}};return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1806),n(3),n(5),n(44)],r=function(e,t,n,i){"use strict";var r=i.extend({className:"confirm-modal modal modal-sm fade",template:e,ui:{doubleConfirmMessage:".double-confirm-message",confirmBtn:".confirm-btn",confirmLabel:".confirm-btn .btn-label"},events:t.extend({"click .confirm-btn":"onConfirm"},i.prototype.events),whitelistedOptions:["title","message","confirmLabel","cancelLabel","hasDanger","hideCancel"],
initialize:function(e){i.prototype.initialize.apply(this,arguments),this.async=e.async,this.data=t.pick(e,this.whitelistedOptions),this.promise=n.Deferred()},serializeData:function(){return t.defaults(this.data,{confirmLabel:"Yes",cancelLabel:"No"})},onRender:function(){i.prototype.onRender.apply(this,arguments),setTimeout(t.bind(function(){this.ui.confirmBtn.focus()},this),this.focusDelay)},onHide:function(e){i.prototype.onHide.apply(this,arguments),this.promise.reject()},onConfirm:function(e){if(e.preventDefault(),
this.options.requireDoubleConfirm&&!this.hasConfirmedOnce){this.hasConfirmedOnce=!0;var t=this.options.doubleConfirmMessage,n=this.options.doubleConfirmLabel;return t&&this.ui.doubleConfirmMessage.text(t),void(n&&this.ui.confirmLabel.text(n))}this.promise.resolve(),this.async?this.ui.confirmBtn.addClass("active"):this.hide()}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},,,function(e,t,n){"use strict";function i(e){var t=v.get(e);if(!t)return[];var n=u.default.compact(u.default.map(m,function(e){
if(t.hasOwnProperty(e))return v.get(t[e])}));return n.unshift(t),n}function r(e){var t=v.get(e);if(t){var n=t.grandchild||t.child;return n?v.get(n):t}}function a(e){var t=r(e);return!!t&&t.typeString!==e}var s=n(11).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),c=n(145),d=o(c),h=n(6),p=o(h),f=["id","typeString"],m=["grandparent","parent","child","grandchild"],v=(0,d.default)(f,[{id:1,typeString:"movie",title:function(){return(0,p.default)("Movie")},plural:function(){
return(0,p.default)("Movies")},element:"video"},{id:2,typeString:"show",title:function(){return(0,p.default)("Show")},plural:function(){return(0,p.default)("Shows")},element:"directory",child:3,grandchild:4},{id:3,typeString:"season",title:function(){return(0,p.default)("Season")},plural:function(){return(0,p.default)("Seasons")},element:"directory",parent:2,child:4},{id:4,typeString:"episode",title:function(){return(0,p.default)("Episode")},plural:function(){return(0,p.default)("Episodes")},element:"video",
grandparent:2,parent:3},{id:5,typeString:"trailer",title:function(){return(0,p.default)("Trailer")},plural:function(){return(0,p.default)("Trailers")},element:"video"},{id:6,typeString:"comic",title:function(){return(0,p.default)("Comic")},plural:function(){return(0,p.default)("Comics")},element:"photo"},{id:7,typeString:"person",title:function(){return(0,p.default)("Person")},plural:function(){return(0,p.default)("People")},element:"directory"},{id:8,typeString:"artist",title:function(){return(0,
p.default)("Artist")},plural:function(){return(0,p.default)("Artists")},element:"directory",child:9,grandchild:10},{id:9,typeString:"album",title:function(){return(0,p.default)("Album")},plural:function(){return(0,p.default)("Albums")},element:"directory",parent:8,child:10},{id:10,typeString:"track",title:function(){return(0,p.default)("Track")},plural:function(){return(0,p.default)("Tracks")},element:"audio",grandparent:8,parent:9},{id:11,typeString:"picture",title:function(){return(0,p.default)("Picture");
},plural:function(){return(0,p.default)("Pictures")},element:"photo"},{id:12,typeString:"clip",title:function(){return(0,p.default)("Clip")},plural:function(){return(0,p.default)("Clips")},element:"video"},{id:13,typeString:"photo",title:function(){return(0,p.default)("Photo")},plural:function(){return(0,p.default)("Photos")},element:"photo",parent:14},{id:14,typeString:"photoAlbum",title:function(){return(0,p.default)("Photo Album")},plural:function(){return(0,p.default)("Photo Albums")},element:"directory",
child:13},{id:15,typeString:"playlist",title:function(){return(0,p.default)("Playlist")},plural:function(){return(0,p.default)("Playlists")},element:"directory"},{id:16,typeString:"playlistFolder",title:function(){return(0,p.default)("Playlist")},plural:function(){return(0,p.default)("Playlists")},element:"directory",child:15},{id:1001,typeString:"userPlaylistItem",title:function(){return(0,p.default)("Clip")},plural:function(){return(0,p.default)("Clips")},element:"video"}]);t.default=s({},v,{getRelatedMediaTypes:i,
getChildMediaType:r,typeHasChildMedia:a}),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(14).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(66),p=u(h),f=n(30),m=u(f),v=n(38),g=u(v),y=n(23),b=n(41),w=n(27),S=u(w),P=n(1536),x=u(P),C=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),(0,g.default)(!e.onClick,"Use `onPress` instead of `onClick` for reliable behavior on touch screens"),
this._preventFocus=!1,this._preventOnClick=!1,this._isTouch=!1,this._isActive=!1,this._isFocused=!1,this.state={isActive:!1,isFocused:!1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,S.default)(this,e,t)}},{key:"_activate",value:function(e){this._isActive=e,this.setState({isActive:e})}},{key:"_focus",value:function(e){this._isFocused=e,this.setState({isFocused:e})}},{key:"_shouldPreventFocus",value:function(){if(this.props.allowFocusOnPress)return!1;var e=p.default.findDOMNode(this)===document.activeElement;
return!e}},{key:"_press",value:function(e){var t=this.props.onPress;t&&t(e)}},{key:"onTouchStart",decorators:[y.autobind],value:function(e){this._isTouch=!0,this._preventFocus=this._shouldPreventFocus(),1===e.touches.length&&this._activate(!0),this.props.onTouchStart&&this.props.onTouchStart(e)}},{key:"onTouchMove",decorators:[y.autobind],value:function(e){this._activate(!1),this.props.onTouchMove&&this.props.onTouchMove(e)}},{key:"onTouchEnd",decorators:[y.autobind],value:function n(e){var t=this.props,i=t.to,r=t.target,a=t.isDisabled,n=t.onTouchEnd;
this._isActive&&!a&&(!i||r&&"_self"!==r||(e.preventDefault(),window.location.href=i),this._press(e)),this._activate(!1),n&&n(e)}},{key:"onTouchCancel",decorators:[y.autobind],value:function(e){this._isTouch=!1,this._activate(!1),this.props.onTouchCancel&&this.props.onTouchCancel(e)}},{key:"onMouseDown",decorators:[y.autobind],value:function(e){this._isTouch||(this._preventFocus=this._shouldPreventFocus(),0===e.button&&this._activate(!0),this.props.onMouseDown&&this.props.onMouseDown(e))}},{key:"onMouseUp",
decorators:[y.autobind],value:function u(e){if(!this._isTouch){var t=this.props,n=t.isDisabled,u=t.onMouseUp;this._isActive&&!n&&(this._press(e),this._preventOnClick=!0),this._activate(!1),u&&u(e)}}},{key:"onMouseLeave",decorators:[y.autobind],value:function(e){this._isTouch||(this._isActive&&this.setState({isActive:!1}),this.props.onMouseLeave&&this.props.onMouseLeave(e))}},{key:"onClick",decorators:[y.autobind],value:function(e){this._preventFocus=!1;var t=this.props.isDisabled;this._preventOnClick||this._isTouch||this._isActive||!this._isFocused||t||this._press(e),
this._preventOnClick=!1,this._isTouch=!1}},{key:"onFocus",decorators:[y.autobind],value:function(e){return this._preventFocus?void(this._preventFocus=!1):(this._focus(!0),void(this.props.onFocus&&this.props.onFocus(e)))}},{key:"onBlur",decorators:[y.autobind],value:function(e){this._focus(!1),this.props.onBlur&&this.props.onBlur(e)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.to,i=e.kind,r=e.size,a=e.isSelected,s=e.isDisabled,u=e.component,c=l(e,["className","to","kind","size","isSelected","isDisabled","component"]),h=this.state,p=h.isActive,f=h.isFocused,v={},g=u;
return n?(g="a",v.href=n,v["aria-role"]="link"):v["aria-role"]="button",v.className=(0,m.default)(t,x.default.link,x.default[i],r&&x.default[r],a&&x.default.isSelected,s&&"isDisabled",p&&"isActive",f&&"isFocused"),"button"!==g&&"input"!==g||(v.type=c.type||"button",v.disabled=s),d.default.createElement(g,o({},c,v,{onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onTouchCancel:this.onTouchCancel,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onMouseLeave:this.onMouseLeave,
onClick:this.onClick,onFocus:this.onFocus,onBlur:this.onBlur}))}}]),t}(c.Component);C.propTypes={component:c.PropTypes.string,className:c.PropTypes.string,to:c.PropTypes.string,target:c.PropTypes.string,kind:c.PropTypes.oneOf(b.kinds.all),size:c.PropTypes.oneOf(b.sizes.all),isSelected:c.PropTypes.bool,isDisabled:c.PropTypes.bool,allowFocusOnPress:c.PropTypes.bool,onPress:c.PropTypes.func,onTouchStart:c.PropTypes.func,onTouchMove:c.PropTypes.func,onTouchEnd:c.PropTypes.func,onTouchCancel:c.PropTypes.func,
onMouseDown:c.PropTypes.func,onMouseUp:c.PropTypes.func,onMouseLeave:c.PropTypes.func,onClick:c.PropTypes.func,onFocus:c.PropTypes.func,onBlur:c.PropTypes.func},C.defaultProps={component:"button",kind:b.kinds.DEFAULT,isSelected:!1,isDisabled:!1,allowFocusOnPress:!1},t.default=C,e.exports=t.default},function(e,t,n){"use strict";var i=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(876),a=i(r);t.directions=a;var s=n(305),o=i(s);t.kinds=o;var l=n(878),u=i(l);t.sizes=u;var c=n(877),d=i(c);
t.scrollDirections=d;var h=n(879),p=i(h);t.tooltipAttachments=p},function(e,t,n){"use strict";var i=n(79),r=i;e.exports=r},function(e,t,n){"use strict";function i(e,t){var n=s.default.invert(e);return s.default.reduce(e,function(e,i){return e[i]=t[n[i]],e},{})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(29),l=r(o),u={playing:"playing",paused:"paused",stopped:"paused",error:"paused",buffering:"playing"},c=l.default.extend({types:{VIDEO:"video",MUSIC:"music",
PHOTO:"photo"},elements:{VIDEO:"video",MUSIC:"audio",PHOTO:"photo"},streams:{VIDEO:"video",MUSIC:"audio",PHOTO:"photo"},states:{STOPPED:"stopped",PAUSED:"paused",PLAYING:"playing",BUFFERING:"buffering",ERROR:"error"},slideshowStates:{PLAYING:"playing",PAUSED:"paused"},castStates:{ERROR:"IDLE",STOPPED:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING",BUFFERING:"BUFFERING"},mediaStates:{LOADING:"LOADING",BUFFERING:"BUFFERING",READY:"READY",ERROR:"ERROR"},initialize:function(){this.typeByElement=i(this.elements,this.types),
this.elementByType=i(this.types,this.elements),this.typeByStream=i(this.streams,this.types),this.streamByType=i(this.types,this.streams),this.statebyCastState=i(this.castStates,this.states),this.castStateByState=i(this.states,this.castStates)},getTypeByElement:function(e){return this.typeByElement[e]},getElementByType:function(e){return this.elementByType[e]},getTypeByStream:function(e){return this.typeByStream[e]},getStreamByType:function(e){return this.streamByType[e]},getStateByCastState:function(e){
return this.statebyCastState[e]},getCastStateByState:function(e){return this.castStateByState[e]},getSlideshowStateByState:function(e){return u[e]}}),d=new c;t.default=d,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(9),n(8)],r=function(e,t,n,i){"use strict";var r=0,a=[],s=n.Layout.extend({className:"modal fade",focusDelay:500,animationDelay:500,events:{"hide.bs.modal":"onHide"},initialize:function(e){this.once("render",function(){r+=1,i.trigger("anyModalOpen")}),this.once("close",function(){
r-=1,0===r&&i.trigger("allModalsClosed")})},hide:function(){this.isClosed||this.isHidden||this.$el.modal("hide")},onRender:function(){this.rerender||(this.isForced?this.$el.modal({backdrop:"static",keyboard:!1}):(this.listenTo(i,"shortcut:escape",e.bind(function(){a[0]===this&&this.hide()},this)),this.listenToOnce(this,"close",function(){var e=a.indexOf(this);e!==-1&&a.splice(e,1)}),a.unshift(this),this.$el.modal()),t(":focus").blur())},onHide:function(t){this.isHidden=!0,e.each(this.panes,function(e,t){
var n=e.constructor.onModalClose;n&&n.apply(this)},this),setTimeout(e.bind(function(){i.trigger("hide:modal",this),this.trigger("close")},this),this.animationDelay)}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(37),n(5),n(35),n(38),n(22),n(127),n(206)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=t.Model.extend({mixins:[o],cache:new s,constructor:function(n,i){n||(n={}),i||(i={}),this.server=this.findOption(i,"server"),this.section=this.findOption(i,"section"),
this.channel=this.findOption(i,"channel"),this.device=this.findOption(i,"device"),this.parent=this.findOption(i,"parent");var r=this.findOption(i,"skipCache");if(r)return void t.Model.prototype.constructor.apply(this,arguments);var a=this.cache.getItemCacheKey(this,n),s=this.cache.get(a);if(s)return i.parse&&(n=s.parse(n)),this.preserveCachedAttributes&&this.preserveCachedAttributes(i.url)?e.each(n,function(t,n){e.isUndefined(s.get(n))&&!e.isUndefined(t)&&s.set(n,t)}):s.set(n),s.server=this.server||s.server,
s.section=this.section||s.section,s.channel=this.channel||s.channel,s.device=this.device||s.device,s.parent=this.parent||s.parent,i.collection&&(s.collection=i.collection),s;var o=this.findOption(i,"onlyIfCached");return o?{}:(t.Model.prototype.constructor.apply(this,arguments),void this.cache.store(this,a))},findOption:function(e,t){return e[t]||e.collection&&e.collection[t]},clone:function(){var e={server:this.server,section:this.section,channel:this.channel,parent:this.parent,skipCache:!0};return new this.constructor(this.attributes,e)||null;
},convert:function(t){var n=e.isObject(t)?t:i.parseXML(t);return n},parse:function(t,n){var i=this.convert(t);return this.whitelistedAttrs&&(i=e.pick(i,this.whitelistedAttrs)),i},save:function(i,r,s){var o,l,u,c=this.attributes;null==i||"object"==typeof i?(o=i,s=r):(o={})[i]=r,s=e.extend({validate:!0},s);var d=this.getSaveParams(o,s);if(e.extend(d,s.data),o&&!s.wait){if(!this.set(o,s))return!1}else if(!this._validate(o,s))return!1;if(o&&s.wait&&(this.attributes=e.extend({},c,o)),e.isEmpty(d)&&!s.force)return s.success&&s.success(this),
n.Deferred().resolve(this);void 0===s.parse&&(s.parse=!0);var h=this,p=s.success;s.success=function(t){if(h.attributes=c,t){var n=h.parse(t,s);if(s.wait&&(n=e.extend(o||{},n)),e.isObject(n)&&!h.set(n,s))return!1;h.cache.store(h)}p&&p(h,t,s),h.trigger("sync",h,t,s)},t.wrapError(this,s),l=this.isNew()?"create":s.patch?"patch":"update","patch"===l&&(s.attrs=o);var f=e.result(this,"saveUrl")||e.result(this,"url");return e.isEmpty(d)||(s.url=a.join(f,d)),s.data="",u=this.sync(l,this,s),o&&s.wait&&(this.attributes=c),
u},getSaveParams:function(e,t){return this.isNew()?e||this.toJSON():this.changedAttributes(e)||{}},getScopedKey:function(t){return null!=t&&e.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+t:t},restoreDefaults:function(t){var n=e.result(this,"defaults");if(!n)return this.clear(t);var i,r=this.attributes;for(i in r)i in n||this.unset(i,t);return this.set(n,t),this},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void r(!1,"This model is already capturing events");
var t=this.set,n={};this.set=function(i,r,a){var s;"object"==typeof i?(s=i,a=r):(s={})[i]=r;var o=e.extend({},a,{silent:!0}),l=t.call(this,s,o);return e.extend(n,this.changed),l},this.releaseCapturedChangeEvents=function(){e.each(n,function(e,t){this.trigger("change:"+t,this,e)},this),e.isEmpty(n)||this.trigger("change",this,{}),n={},this.set=t,this.releaseCapturedChangeEvents=null}}});return l.extend=function(){var e=t.Model.extend.apply(this,arguments);return e.prototype.cache=new s,e},l}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(198).default;t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i(e,r.key,r)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),t.__esModule=!0},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(174),a=i(r),s=n(173),o=i(s),l=n(78),u=i(l),c=u.default.extend({background:!0,
setup:function(e){this.minSize=!0,this.type=e.type,this.modelAttribute=e.modelAttribute||"thumb",e.placeholder!==!1&&(this.model&&this.model.get("isFolder")?this.placeholderClass=o.default.folder:e.placeholderClass||(this.placeholderClass=o.default[this.type])),u.default.prototype.setup.apply(this,arguments)},setDimensions:function(e){e.width?e.height=a.default.getPosterHeight(this.type,e.width):e.height&&(e.width=a.default.getPosterWidth(this.type,e.height)),u.default.prototype.setDimensions.call(this,e);
},setModel:function(e,t){u.default.prototype.setModel.apply(this,arguments),this.model&&this.model.get("isFolder")&&(this.placeholderClass=o.default.folder)}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.className,i=r(e,["name","className"]),s=i["aria-label"];return l.default.createElement("i",a({className:(0,c.default)(t,n),"aria-hidden":!s},i))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u);
i.propTypes={name:o.PropTypes.string.isRequired,className:o.PropTypes.string,"aria-label":o.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(198).default;t.default=function(e,t,n){return t in e?i(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.__esModule=!0},,function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function i(){try{if(!Object.assign)return!1;
var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}var r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=i()?Object.assign:function(e,t){
for(var i,s,o=n(e),l=1;l<arguments.length;l++){i=Object(arguments[l]);for(var u in i)r.call(i,u)&&(o[u]=i[u]);if(Object.getOwnPropertySymbols){s=Object.getOwnPropertySymbols(i);for(var c=0;c<s.length;c++)a.call(i,s[c])&&(o[s[c]]=i[s[c]])}}return o}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="SHOW_ALERT";t.SHOW_ALERT=n;var i="SAVE_SETTINGS";t.SAVE_SETTINGS=i;var r="DOWNLOAD_SERVER";t.DOWNLOAD_SERVER=r;var a="DISCOVER_SERVERS";t.DISCOVER_SERVERS=a;var s="CHANGE_PRIMARY_SERVER";
t.CHANGE_PRIMARY_SERVER=s;var o="REDIRECT_TO_ROUTE";t.REDIRECT_TO_ROUTE=o;var l="REDIRECT_TO_HTTP";t.REDIRECT_TO_HTTP=l;var u="GARBAGE_COLLECT_ENTITIES";t.GARBAGE_COLLECT_ENTITIES=u;var c="SELECT_ITEM";t.SELECT_ITEM=c;var d="SELECT_MODELS";t.SELECT_MODELS=d;var h="DESELECT_ALL_ITEMS";t.DESELECT_ALL_ITEMS=h;var p="DESELECT_MODELS";t.DESELECT_MODELS=p;var f="DESELECT_COLLECTION";t.DESELECT_COLLECTION=f;var m="SELECT_RANGE";t.SELECT_RANGE=m;var v="DESELECT_RANGE";t.DESELECT_RANGE=v;var g="PLAY_SELECTED_ITEMS";
t.PLAY_SELECTED_ITEMS=g;var y="ADD_SELECTED_ITEMS_TO_PLAYLIST";t.ADD_SELECTED_ITEMS_TO_PLAYLIST=y;var b="UPDATE_SELECTED_ITEMS_WATCHED_STATUS";t.UPDATE_SELECTED_ITEMS_WATCHED_STATUS=b;var w="EDIT_SELECTED_ITEMS";t.EDIT_SELECTED_ITEMS=w;var S="REFRESH_SELECTED_ITEMS";t.REFRESH_SELECTED_ITEMS=S;var P="ANALYZE_SELECTED_ITEMS";t.ANALYZE_SELECTED_ITEMS=P;var x="SYNC_METADATA_ITEMS";t.SYNC_METADATA_ITEMS=x;var C="OPTIMIZE_METADATA_ITEMS";t.OPTIMIZE_METADATA_ITEMS=C;var T="MERGE_SELECTED_ITEMS";t.MERGE_SELECTED_ITEMS=T;
var _="DELETE_SELECTED_ITEMS";t.DELETE_SELECTED_ITEMS=_;var E="FETCH_PLANS";t.FETCH_PLANS=E;var k="POPULATE_PLANS";t.POPULATE_PLANS=k;var I="FETCH_UNWATCHED_WATCH_LATER_LIST";t.FETCH_UNWATCHED_WATCH_LATER_LIST=I;var A="POPULATE_UNWATCHED_WATCH_LATER_LIST";t.POPULATE_UNWATCHED_WATCH_LATER_LIST=A;var M="FETCH_UNWATCHED_RECOMMENDED_LIST";t.FETCH_UNWATCHED_RECOMMENDED_LIST=M;var D="POPULATE_UNWATCHED_RECOMMENDED_LIST";t.POPULATE_UNWATCHED_RECOMMENDED_LIST=D;var R="UPDATE_USER";t.UPDATE_USER=R;var O="CLEAR_UPDATE_USER_ERROR";
t.CLEAR_UPDATE_USER_ERROR=O;var L="TEST_SERVER";t.TEST_SERVER=L;var N="FETCH_LIBRARIES";t.FETCH_LIBRARIES=N;var U="POPULATE_LIBRARIES";t.POPULATE_LIBRARIES=U;var F="ADD_LIBRARY";t.ADD_LIBRARY=F;var j="START_LIBRARY_REFRESH";t.START_LIBRARY_REFRESH=j;var B="SHARE_LIBRARIES";t.SHARE_LIBRARIES=B;var z="ENABLE_HTTP_FALLBACK";t.ENABLE_HTTP_FALLBACK=z;var V="OPTIMIZE_DATABASE";t.OPTIMIZE_DATABASE=V;var H="CLEAN_BUNDLES";t.CLEAN_BUNDLES=H;var q="EMPTY_TRASH";t.EMPTY_TRASH=q;var W="DELETE_SERVER";t.DELETE_SERVER=W;
var K="RESET_QUICK_SEARCH";t.RESET_QUICK_SEARCH=K;var Q="FETCH_QUICK_SEARCH";t.FETCH_QUICK_SEARCH=Q;var Y="CHANGE_SEARCH_QUERY";t.CHANGE_QUICK_SEARCH_QUERY=Y;var G="CHANGE_SEARCH_SETTINGS";t.CHANGE_QUICK_SEARCH_SETTINGS=G;var $="SELECT_SEARCH_RESULT";t.SELECT_QUICK_SEARCH_RESULT=$;var X="NAVIGATE_SEARCH_RESULT";t.NAVIGATE_QUICK_SEARCH_RESULT=X;var J="PLAY_SEARCH_RESULT";t.PLAY_QUICK_SEARCH_RESULT=J;var Z="FETCH_SEARCH";t.FETCH_SEARCH=Z;var ee="EDIT_LIBRARY";t.EDIT_LIBRARY=ee;var te="POPULATE_METADATA_LIST_RANGE";
t.POPULATE_METADATA_LIST_RANGE=te;var ne="REPOPULATE_METADATA_LIST_RANGE";t.REPOPULATE_METADATA_LIST_RANGE=ne;var ie="PLAY_METADATA_LIST";t.PLAY_METADATA_LIST=ie;var re="SHUFFLE_METADATA_LIST";t.SHUFFLE_METADATA_LIST=re;var ae="ADD_METADATA_LIST_TO_PLAYLIST";t.ADD_METADATA_LIST_TO_PLAYLIST=ae;var se="SYNC_METADATA_LIST";t.SYNC_METADATA_LIST=se;var oe="OPTIMIZE_METADATA_LIST";t.OPTIMIZE_METADATA_LIST=oe;var le="SELECT_METADATA_LIST_ITEM";t.SELECT_METADATA_LIST_ITEM=le;var ue="DESELECT_METADATA_LIST_ITEM";
t.DESELECT_METADATA_LIST_ITEM=ue;var ce="DESELECT_ALL_METADATA_LIST_ITEMS";t.DESELECT_ALL_METADATA_LIST_ITEMS=ce;var de="ADD_METADATA_ITEM_TO_PLAYLIST";t.ADD_METADATA_ITEM_TO_PLAYLIST=de;var he="ANALYZE_METADATA_ITEM";t.ANALYZE_METADATA_ITEM=he;var pe="DELETE_METADATA_ITEM";t.DELETE_METADATA_ITEM=pe;var fe="DELETE_METADATA_ITEM_VERSION";t.DELETE_METADATA_ITEM_VERSION=fe;var me="DOWNLOAD_METADATA_ITEM_VERSION";t.DOWNLOAD_METADATA_ITEM_VERSION=me;var ve="EDIT_METADATA_ITEM";t.EDIT_METADATA_ITEM=ve;var ge="FIX_METADATA_ITEM_MATCH";
t.FIX_METADATA_ITEM_MATCH=ge;var ye="GET_METADATA_ITEM_INFO";t.GET_METADATA_ITEM_INFO=ye;var be="MARK_METADATA_ITEM_UNWATCHED";t.MARK_METADATA_ITEM_UNWATCHED=be;var we="MARK_METADATA_ITEM_WATCHED";t.MARK_METADATA_ITEM_WATCHED=we;var Se="OPTIMIZE_METADATA_ITEM";t.OPTIMIZE_METADATA_ITEM=Se;var Pe="PLAY_METADATA_ITEM";t.PLAY_METADATA_ITEM=Pe;var xe="PLAY_METADATA_ITEM_VERSION";t.PLAY_METADATA_ITEM_VERSION=xe;var Ce="PLAY_RELATED_MIX";t.PLAY_RELATED_MIX=Ce;var Te="PLAY_PRIMARY_EXTRA";t.PLAY_PRIMARY_EXTRA=Te;
var _e="QUEUE_METADATA_ITEM";t.QUEUE_METADATA_ITEM=_e;var Ee="RATE_METADATA_ITEM";t.RATE_METADATA_ITEM=Ee;var ke="RECOMMEND_METADATA_ITEM";t.RECOMMEND_METADATA_ITEM=ke;var Ie="REFRESH_METADATA_ITEM";t.REFRESH_METADATA_ITEM=Ie;var Ae="SHARE_METADATA_ITEM";t.SHARE_METADATA_ITEM=Ae;var Me="SPLIT_METADATA_ITEM_APART";t.SPLIT_METADATA_ITEM_APART=Me;var De="SYNC_METADATA_ITEM";t.SYNC_METADATA_ITEM=De;var Re="UNMATCH_METADATA_ITEM";t.UNMATCH_METADATA_ITEM=Re;var Oe="WATCH_METADATA_ITEM_LATER";t.WATCH_METADATA_ITEM_LATER=Oe;
var Le="REPOPULATE_PAGE";t.REPOPULATE_PAGE=Le;var Ne="VIEW_ITEM_DETAILS";t.VIEW_ITEM_DETAILS=Ne;var Ue="INIT_HUBS_PAGE";t.INIT_HUBS_PAGE=Ue;var Fe="FETCH_HUBS";t.FETCH_HUBS=Fe;var je="POPULATE_HUBS";t.POPULATE_HUBS=je;var Be="INIT_METADATA_LIST_PAGE";t.INIT_METADATA_LIST_PAGE=Be},function(e,t,n){var i,r;i=[n(3),n(581),n(26)],r=function(e,t,n){"use strict";var i=new t((!1),"",(!0)),r=["Directory","Video","Track","Photo","Playlist"],a=e.reduce(r,function(e,t){return e[t]="Metadata",e},{}),s={parseType:function(e,t,n){
var i=this.getByType("parse",e,this._parseTypeMap);return i?i(t,n):t},stringifyType:function(t,n,i){if(e.isString(n))return n;if(null==n)return"";var r=this.getByType("stringify",t,this._stringifyTypeMap);return r?r(n,i):n},getByType:function(t,n,i){if(i&&e.has(i,n))return i[n];var r=n.charAt(0).toUpperCase()+n.slice(1),a=t+r;return e.has(this,a)?(i[n]=this[a],this[a]):void 0},parseBoolean:function(e){return 1===Number(e)||"true"===e},stringifyBoolean:function(e){return e?"1":"0"},parseInteger:function(e){
return null==e||""===e?0:parseInt(e,10)},parseFloat:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return null==e||""===e?0:parseFloat(e)}),parseString:function(e){return null==e?"":e.toString()},parseEncodedString:function(e){if(null==e)return"";try{return decodeURIComponent(e)}catch(t){return n.warn("[Parser] Unable to parse encoded string"),e}},parseArray:function(t){return t?e.isArray(t)?t:[t]:[]},parseList:function(t){
return t?e.isArray(t)?t:t.split(","):[]},stringifyList:function(e){return e.join(",")},parseQueryString:function(t,i){if(i||(i={}),e.isObject(t))return t;if(!e.isString(t))return{};if(t=t.trim().replace(/^(\?|#)/,""),!t)return{};var r=i.separator||"&";return e.reduce(t.split(r),function(e,t){var i=t.split("="),r=i[0],a=i[1];try{r=decodeURIComponent(r),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(r)?Array.isArray(e[r])?e[r].push(a):e[r]=[e[r],a]:e[r]=a}catch(s){n.warn("[Parser] Unable to decode query string at "+r);
}return e},{})},stringifyQueryString:function(t,n){n||(n={});var i=n.separator||"&",r=e.map(e.keys(t),function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])});return r.join(i)},parseJSON:function(t){try{return JSON.parse(t)}catch(i){var r=e.isString(t)?t.substring(0,50):"no response";return n.warn("[Parser] Unable to parse JSON: "+i.message+" ("+r+")"),{}}},parseXML:function(e){var t=i.parseXmlString(e);if(!t)return n.warn("[Parser] No XML document created"),{};if(t.getElementsByTagName("parsererror").length)return n.warn("[Parser] Errors found while parsing XML document"),
{};try{return i.xml2json(t)}catch(r){return n.warn("[Parser] Unable to parse XML: "+r.message),{}}},replaceXMLElementNames:function(t,n,i){e.isArray(n)||(n=[n]);var r=n.join("|"),a=new RegExp("<("+r+")","g"),s=new RegExp("</("+r+")>","g");return t=t.replace(a,"<"+i+' elementName="$1"'),t=t.replace(s,"</"+i+">")},replaceMetadataXMLElementNames:function(e){return this.replaceXMLElementNames(e,r,"Metadata")},splitChildren:function(t){var n=t&&t._children;return e.isArray(n)&&(n.forEach(function(e){var n=e._elementType;
if(e.elementName=n,n){var i=a[n]||n;t[i]||(t[i]=[]),t[i].push(this.splitChildren(e))}}.bind(this)),t._children=null),t},reset:function(){this._parseTypeMap={json:this.parseJSON,xml:this.parseXML},this._stringifyTypeMap={}}};return s.reset(),s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(37),o=i(s),l=n(960),u=o.default.Model.extend({defaults:a.default.extend({allowFlash:!1,allowServerUpdates:!1,
testPrivateConnectionsWhenPublicAddressDoesNotMatch:!0,allowHttpsMediaServerConnections:!1,allowLoopbackDiscovery:!1,allowMixedContent:!1,allowBaseImagePreloading:!0,allowBaseImageBlobs:!0,emulateCNP:!1,heartbeatInterval:1e4,allowManualServers:!1,allowCloudSyncServers:!1,allowMobileServers:!1,maximumConcurrentConnectionTests:5,shouldCreateFlexModels:!1,shouldCreateStateTree:!1,proxied:!1,requiresSignIn:!0,myPlexScheme:"https",myPlexUrl:"plex.tv",requiresPlexPass:!1,myPlexAccessToken:null,alerts:null,
continueUrl:null,primaryServer:null},l,window.PLEXWEB)}),c=new u;t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(340).default,r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(5),u=r(l),c=n(6),d=r(c),h=n(35),p=r(h),f=n(53),m=r(f),v=n(22),g=a(v),y=n(285),b=r(y),w=n(92),S=r(w),P=n(39),x=r(P),C=n(71),T=r(C),_=n(170),E=r(_),k=n(59),I=a(k),A=n(77),M=r(A),D=n(220),R=r(D),O=n(127),L=r(O),N=n(18),U=r(N),F=n(64),j=r(F),B=n(20),z=r(B),V=n(731),H=r(V),q=n(401),W=r(q),K=n(733),Q=r(K),Y=z.default.extend({
name:"MetadataModel",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey","relatedOptions"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:I.METADATA_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,M.default)(this.entityType,e.ratingKey,this.server.entityID())},idAttribute:"ratingKey",rootPropertyName:"Metadata",cache:new L.default,
preserveCachedAttributes:!0,url:function(){return this.get("key")},urlRoot:function(){return this.get("key")},cacheKey:function(e){this.isLibraryItem(this.identifier,e.key)||(e=this.normalizeChannelKey(e));var t=this.extractChildrenKey(e.key);return this.server&&this.server.getScopedKey(t.key)},sessionAttrs:{indirectHttpHeaders:U.default.object},syncedAttrs:{elementName:U.default.string,ratingKey:U.default.string,parentRatingKey:U.default.string,grandparentRatingKey:U.default.string,key:U.default.string,
childrenKey:U.default.string,parentKey:U.default.string,grandparentKey:U.default.string,primaryExtraKey:U.default.string,guid:U.default.string,librarySectionID:U.default.string,librarySectionUUID:U.default.string,type:U.default.string,title:U.default.string,titleSort:U.default.string,originalTitle:U.default.string,parentTitle:U.default.string,grandparentTitle:U.default.string,year:U.default.string,tagline:U.default.string,summary:U.default.string,studio:U.default.string,contentRating:U.default.string,
originallyAvailableAt:U.default.string,thumb:U.default.string,parentThumb:U.default.string,grandparentThumb:U.default.string,banner:U.default.string,art:U.default.string,parentArt:U.default.string,grandparentArt:U.default.string,theme:U.default.string,parentTheme:U.default.string,grandparentTheme:U.default.string,chapterSource:U.default.string,ratingImage:U.default.string,audienceRating:U.default.float,audienceRatingImage:U.default.string,metadataState:U.default.string,mediaState:U.default.string,
isChannelItem:U.default.boolean,rating:U.default.float,userRating:U.default.float,index:U.default.integer,parentIndex:U.default.integer,absoluteIndex:U.default.integer,duration:U.default.integer,viewOffset:U.default.integer,viewCount:U.default.integer,childCount:U.default.integer,leafCount:U.default.integer,viewedLeafCount:U.default.integer,ratingCount:U.default.integer,extraType:U.default.integer,lastViewedAt:U.default.integer,addedAt:U.default.integer,updatedAt:U.default.integer,deletedAt:U.default.integer,
playlistID:U.default.integer,playlistType:U.default.string,smart:U.default.boolean,composite:U.default.string,durationInSeconds:U.default.integer,playlistItemID:U.default.integer,Media:U.default.array,Collection:U.default.array,Director:U.default.array,Producer:U.default.array,Writer:U.default.array,Genre:U.default.array,Mood:U.default.array,Country:U.default.array,Label:U.default.array,Role:U.default.array,Location:U.default.array},sessionRelations:{children:function(){return{relationClass:n(87)
}}},syncedRelations:{chapters:{relationClass:H.default,rootPropertyName:"Chapter",deferred:!0},overlays:{relationClass:W.default,rootPropertyName:"Overlay",deferred:!0},onDeck:function(){return{relationClass:Y,rootPropertyName:"OnDeck",deferred:!0}},related:function(){var e={skipCache:!0};return this.relatedOptions&&o.default.extend(e,this.relatedOptions),{relationClass:n(210),rootPropertyName:"RelatedHubs",deferred:!0,options:e}},popularLeaves:function(){return{relationClass:n(87),rootPropertyName:"PopularLeaves",
deferred:!0}},extras:function(){return{relationClass:n(87),rootPropertyName:"Extras",deferred:!0,attrs:function(e){return{containerKey:g.join([e.key,"extras"])}}}},concerts:{relationClass:Q.default,rootPropertyName:"Concert",deferred:!0}},derivedAttrs:{identifier:function(){return this.identifier},mediaTagPrefix:function(){return this.mediaTagPrefix},mediaTagVersion:function(){return this.mediaTagVersion},allowSync:function(){return this.allowSync},containerKey:function(){return this.containerKey;
},isLibraryItem:function(){return this.isLibraryItem(this.get("identifier"),this.get("key"))},isPlaylist:function(){var e=x.default.get("playlist"),t=e.typeString;return this.get("type")===t},isFolder:function(){return/\/folder\?parent\=/.test(this.get("key"))},isExtra:function(){return!!this.get("extraType")},unviewedLeafCount:function(){var e=this.get("leafCount"),t=this.get("viewedLeafCount");if(e)return e-t},compositeTranscodeUrl:function(){var e=this.get("composite");if(e)return(0,R.default)(this.server,e);
},thumbTranscodeUrl:function(){var e=this.get("thumb");if(e)return(0,R.default)(this.server,e)},parentThumbTranscodeUrl:function(){var e=this.get("parentThumb");if(e)return(0,R.default)(this.server,e)},grandparentThumbTranscodeUrl:function(){var e=this.get("grandparentThumb");if(e)return(0,R.default)(this.server,e)},artTranscodeUrl:function(){var e=this.get("art");if(e)return(0,R.default)(this.server,e)},parentArtTranscodeUrl:function(){var e=this.get("parentArt");if(e)return(0,R.default)(this.server,e);
},grandparentArtTranscodeUrl:function(){var e=this.get("grandparentArt");if(e)return(0,R.default)(this.server,e)},downloadUrl:function(){var e=this,t=this.get("Media");if(t&&1===t.length){var n=function(){var n=o.default.first(o.default.first(t).Part),i=n&&n.key;if(i)return{v:function(){return e.server.resolveUrl(i,{appendToken:!0})}}}();if("object"==typeof n)return n.v}}},defaults:{rating:0,isChannelItem:!1,Media:[],Collection:[],Director:[],Producer:[],Writer:[],Genre:[],Mood:[],Country:[],Label:[],
Role:[],Location:[]},initialize:function(){this.setChildrenKey(this.get("childrenKey")),this.on("socket:timeline",this.onSocketTimeline,this),this.on("change:childrenKey",this.onChildrenKeyChange,this)},uninitialize:function(){this.off("socket:timeline",this.onSocketTimeline,this),this.off("change:childrenKey",this.onChildrenKeyChange,this),this.stopListening()},fetch:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return e.data&&(this._populatedParams=o.default.extend({},this._populatedParams,e.data)),
e.usePopulatedParams&&(e.data=this._populatedParams),z.default.prototype.fetch.call(this,e)},augmentResponseText:function(e,t){return t===j.default.xml?m.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var i=e[t];void 0!==i&&n.setContext(t,i)});var i=e[this.rootPropertyName];i&&(i.librarySectionID=e.librarySectionID,i.librarySectionUUID=e.librarySectionUUID);var r=i||e,a=r.Related,s=r.OnDeck,l=this.extractChildrenKey(r.key);
return l.childrenKey&&(r.childrenKey=l.childrenKey,r.key=l.key),t===j.default.xml&&(r.Media=this.convertMediaItems(r.Media)),a&&(r.RelatedHubs=o.default.compact([].concat(a.Hub,a.Metadata))),s&&(r.OnDeck=s.Metadata),this.normalize(r)},extractChildrenKey:function(e){var t=/(.*)\/(children|items)$/.exec(e),n=void 0;return t&&(n=e,e=t[1]),{childrenKey:n,key:e}},setChildrenKey:function(e){e&&("album"===this.get("type")&&(e=g.join(e,{includeRelated:1})),this.get("children").set("containerKey",e))},convertMediaItems:function(e){
var t=m.default.parseArray(e);return o.default.each(t,function(e){p.default.parseBoolean(e,["indirect","optimizedForStreaming","premium"]),p.default.parseInteger(e,["id","duration","width","height","bitrate","audioChannels","proxyType"]),p.default.parseArray(e,"Part"),o.default.each(e.Part,function(e){e.exists=null==e.exists||m.default.parseBoolean(e.exists),e.accessible=null==e.accessible||m.default.parseBoolean(e.accessible),p.default.parseInteger(e,["id","duration","size"]),p.default.parseBoolean(e,"optimizedForStreaming"),
p.default.parseEncodedString(e,"file"),p.default.parseArray(e,"Stream"),o.default.each(e.Stream,function(e){p.default.parseBoolean(e,["selected","default","forced","timed","cabac","hasScalingMatrix","headerStripping"]),p.default.parseInteger(e,["id","index","streamType","duration","width","height","bitrate","bitDepth","level","refFrames","samplingRate","channels","minLines"]),p.default.parseFloat(e,"frameRate")})})}),this.addNoneSubtitlesStreams(t)},addNoneSubtitlesStreams:function(e){var t=T.default.get("subtitles");
return o.default.each(e,function(e){var n=o.default.first(e.Part);if(n&&n.Stream&&(0,b.default)(e)){var i=(0,S.default)(e,{streamType:t.id,selected:!0}),r={id:0,streamType:t.id,language:(0,d.default)("None")};i.length||(r.selected=!0),n.Stream.unshift(r)}}),e},normalize:function(e){return this.isLibraryItem(this.identifier,e.key)?e=this.normalizeType(e):(e=this.normalizeChannelKey(e),e=this.normalizeChannelType(e),e=this.normalizeChannelMetadata(e)),e},normalizeType:function(e){return"photo"===e.type&&e.childrenKey&&(e.type="photoAlbum"),
"photoalbum"===e.type&&(e.type="photoAlbum"),e},normalizeChannelKey:function(e){var t=e.key&&e.key.split("/");return t&&(1===t.length&&this.containerKey&&(e.hasInvalidKey=!0,e.originalKey=e.key,e.key=this.containerKey+"/"+e.key),e.ratingKey||(e.ratingKey=e.originalKey||e.key)),e},normalizeChannelType:function(e){return e.type||(e.mediaType?e.type=e.mediaType:e.elementName&&(e.type=e.elementName.toLowerCase())),/image/i.test(e.type)?e.type="photo":/(movie|episode|video)/i.test(e.type)&&(e.type="clip"),
x.default.get(e.type)||(e.type="channelDirectory"),e},normalizeChannelMetadata:function(e){return e.label?e.title=e.label:e.artist&&(e.track?(e.title=e.track,e.originalTitle=e.artist,e.parentTitle=e.album,e.grandparentTitle=e.albumArtist):e.album?(e.title=e.album,e.parentTitle=e.artist):e.title=e.artist),e.totalTime&&(e.duration=e.totalTime),e},refreshChildren:function(){var e=this.get("children");e&&e.populatePromise&&e.fetch().always(function(){e.get("metadataItems").invoke("refreshChildren")});
},resolveIndirect:function(e,t){var n=this,i=u.default.Deferred();if(!e||!t)return i.reject(this).promise();if(!e.indirect)return i.resolve(this).promise();if(t.postURL){var r=o.default.find([this.server,this.server.parent.get("primaryServer")],function(e){return e&&e.get("isConnected")&&e.get("isFullServer")&&!e.get("activeConnection").get("isPossiblyCrossNetworkProtected")});if(r)return this.resolvePostUrl(e,t,r)}var a=t.key;this.server.get("isCloud")&&(a=this.server.swizzleNodeUrl(a));var s=u.default.ajax(this.server.getXHROptions(a));
return s.done(function(r){n.mergeIndirectResponse(r,e,t)?i.resolve(n):i.reject(n)}),s.fail(function(){i.reject(n)}),i.promise()},resolvePostUrl:function(e,t,n){var i=this,r=u.default.Deferred(),a=t.key,s=t.postURL,o=n.getXHROptions("/system/proxy");o.headers=o.headers||{},o.headers["X-Plex-Url"]=s;var l=u.default.ajax(o);return l=l.then(function(e,t,n){var r=g.join(a,{postURL:s});i.server.get("isCloud")&&(r=i.server.swizzleNodeUrl(r));var o=i.server.getXHROptions(r);return o.type="POST",o.headers=o.headers||{},
o.data=n.getAllResponseHeaders()+"\r\n"+e,u.default.ajax(o)}),l.done(function(n,a,s){i.mergeIndirectResponse(n,e,t)?r.resolve(i):r.reject(i)}),l.fail(function(){r.reject(i)}),r.promise()},mergeIndirectResponse:function(e,t,n){var r=m.default.parseXML(m.default.replaceMetadataXMLElementNames(e));if(!(r&&r.Metadata&&r.Metadata.Media&&r.Metadata.Media.Part))return!1;var a=o.default.first(this.convertMediaItems(r.Metadata.Media)),s=m.default.parseArray(a.Part),l=o.default.first(s);if(!a||!l)return!1;if(a.indirect=!1,
o.default.extend(t,o.default.omit(a,"Part")),o.default.extend(n,l),s.length>1){var u;(u=t.Part).push.apply(u,i(s.slice(1)))}if(r.httpHeaders){for(var c,d=new RegExp("([^=]+)=([^&]+)&?","g"),h={};c=d.exec(r.httpHeaders);)c[1]in h?(o.default.isArray(h[c[1]])||(h[c[1]]=[h[c[1]]]),h[c[1]].push(c[2])):h[c[1]]=c[2];this.set("indirectHttpHeaders",h)}return!0},batchAdd:function(e,t,n){var i=o.default.map(e,function(e){return e.get("ratingKey")}),r=g.join(["/library/metadata",i.join(","),t,"add"],{tag:n}),a=this.server.getXHROptions(r,{
type:"PUT"});return u.default.ajax(a)},getDownloadUrl:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.get("Media")[e];if(t){var n=o.default.first(t.Part),i=n&&n.key;if(i)return this.server.resolveUrl(i,{appendToken:!0})}},getFilepath:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.get("Media")[e];if(t){var n=o.default.first(t.Part);if(n)return n.file}},getLocation:function(){var e=this.get("Location");return e.length?o.default.first(e).path:this.getFilepath();
},getMediaKey:function(){var e=o.default.first(this.get("Media"));if(e){var t=o.default.first(e.Part);if(t)return t.key}return this.get("key")},isLibraryItem:function(e,t){return e?"com.plexapp.plugins.library"===e:/^(\/sync\/[\w\d-\/]*)?\/library\//.test(t)},isPlexMusicItem:function(){var e=this.section;return e&&"com.plexapp.agents.plexmusic"===e.get("agent")},onSocketTimeline:function(e){e.state===E.default.PROCESSED?(this.fetch({usePopulatedParams:!0}),this.refreshChildren()):e.state===E.default.DELETED&&this.trigger("destroy",this,this.collection);
},onChildrenKeyChange:function(e,t){this.setChildrenKey(t)}});t.default=Y,e.exports=t.default},function(e,t,n){var i,r;i=[n(61)],r=function(e){"use strict";var t={isHostedHttps:"https:"===window.location.protocol,hasConsole:!!(window.console&&window.console.log&&window.console.log.call),hasWebSocket:!!window.WebSocket,hasEventSource:!!window.EventSource,hasReplaceState:!(!window.history||!window.history.replaceState),hasFileUpload:!!(window.File&&window.FileList&&window.FileReader),hasMediaSource:!(!window.MediaSource&&!window.WebKitMediaSource),
hasObjectUrl:function(){var t="ie"===e.id&&11===parseInt(e.version,10);return!t&&!e.presto&&!!(window.URL&&window.URL.createObjectURL&&window.URL.revokeObjectURL)}(),hasBlob:function(){try{return!!new Blob}catch(e){return!1}}(),hasFullscreen:function(){var e=document.createElement("div");return!!(e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen)}(),hasCanvas:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}(),
hasTouchScreen:!!("ontouchstart"in window),hasPageVisibility:function(){return document.hidden===!0||document.hidden===!1}(),hasWebKitPageVisibility:function(){return document.webkitHidden===!0||document.webkitHidden===!1}(),isChromeApp:!(!window.chrome||!window.chrome.storage)};return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){for(var t;t=e._renderedComponent;)e=t;return e}function r(e,t){var n=i(e);n._nativeNode=t,t[m]=n}function a(e){var t=e._nativeNode;
t&&(delete t[m],e._nativeNode=null)}function s(e,t){if(!(e._flags&f.hasCachedChildNodes)){var n=e._renderedChildren,a=t.firstChild;e:for(var s in n)if(n.hasOwnProperty(s)){var o=n[s],l=i(o)._domID;if(null!=l){for(;null!==a;a=a.nextSibling)if(1===a.nodeType&&a.getAttribute(p)===String(l)||8===a.nodeType&&a.nodeValue===" react-text: "+l+" "||8===a.nodeType&&a.nodeValue===" react-empty: "+l+" "){r(o,a);continue e}h(!1)}}e._flags|=f.hasCachedChildNodes}}function o(e){if(e[m])return e[m];for(var t=[];!e[m];){
if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,i;e&&(i=e[m]);e=t.pop())n=i,t.length&&s(i,e);return n}function l(e){var t=o(e);return null!=t&&t._nativeNode===e?t:null}function u(e){if(void 0===e._nativeNode?h(!1):void 0,e._nativeNode)return e._nativeNode;for(var t=[];!e._nativeNode;)t.push(e),e._nativeParent?void 0:h(!1),e=e._nativeParent;for(;t.length;e=t.pop())s(e,e._nativeNode);return e._nativeNode}var c=n(138),d=n(605),h=n(32),p=c.ID_ATTRIBUTE_NAME,f=d,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={
getClosestInstanceFromNode:o,getInstanceFromNode:l,getNodeFromInstance:u,precacheChildNodes:s,precacheNode:r,uncacheNode:a};e.exports=v},function(e,t){"use strict";function n(e){return encodeURIComponent(e||"")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="servers";t.SERVER=n;var i="libraries";t.LIBRARY=i;var r="hubs";t.HUB=r;var a="metadataLists";t.METADATA_LIST=a;var s="metadataItems";
t.METADATA_ITEM=s;var o="sessionItems";t.SESSION_ITEM=o;var l="userPlaylistItems";t.USER_PLAYLIST_ITEM=l},function(e,t,n){var i,r;i=[n(3),n(37),n(5),n(35),n(22),n(277),n(206)],r=function(e,t,n,i,r,a,s){"use strict";var o=t.Collection.extend({mixins:[s],cache:new a,constructor:function(e,i){if(i||(i={}),this.server=i.server,this.section=i.section,this.channel=i.channel,this.device=i.device,this.parent=i.parent,this.allowInCache=i.allowInCache,this.persistInCache=i.persistInCache,this.skipCache=i.skipCache,
i.url&&(this.url=i.url),i.path&&(this.path=i.path),null==i.pageStart&&null==i.pageSize||(this.pageStart=i.pageStart||0,this.pageSize=i.pageSize||0),i.populated&&this.resetPopulatePromise(n.Deferred().resolve().promise()),!i.allowInCache&&!i.persistInCache)return void t.Collection.prototype.constructor.apply(this,arguments);this.initialize.apply(this,arguments);var r=this.cache.getItemCacheKey(this),a=this.cache.get(r);return this.uninitialize(),i.onlyIfCached&&(a||(a={})),a?a:(t.Collection.prototype.constructor.apply(this,arguments),
void this.cache.store(this,r))},uninitialize:function(){this.stopListening()},sync:function(){return(this.allowInCache||this.persistInCache)&&this.cache.store(this),t.sync.apply(this,arguments)},syncUrl:function(){var t="";if(this.url&&(t=e.result(this,"url")),this.path&&(t=r.join([t,e.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var n=this.pageStart||0,i=this.pageSize||0,a={};a["X-Plex-Container-Start"]=n,a["X-Plex-Container-Size"]=i,t=r.join(t,a)}return t},convert:function(t,n){
var r=e.isObject(t)?t:i.parseXML(t);if(!n)return r;var a=r[n];return a?(e.isArray(a)||(a=[a]),a):[]},clone:function(e){var t={server:this.server,section:this.section,parent:this.parent,url:this.url};return e||(e=this.models),new this.constructor(e,t)},cloneDeep:function(e){return e||(e=this.map(function(e){return e.clone()})),this.clone(e)},clear:function(t){t=e.extend({silent:!0},t),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],t)}});return o.extend=function(){var e=t.Collection.extend.apply(this,arguments);
return e.prototype.cache=new a,e},o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(29)],r=function(e,t){"use strict";var n=/version\/(\d+(\.\d+)?)/i,i=/(?:chrome|crios|gfibertv)[\/-](\d+(\.\d+)?)/i,r=/firefox[ \/](\d+(\.\d+)?)/i,a=/(msie |rv:)(\d+(\.\d+)?)/i,s=/(?:applewebkit|safari)\/(\d+(\.\d+)?)/i,o=function(e){var t=/\(.* ([^\)]+)\)$/.exec(e);return t&&t[1]||void 0},l=t.extend({browsers:[{id:"konvergo",name:"Plex Media Player",webkit:!0,regex:/plexmediaplayer/i,versionRegex:/plexmediaplayer (\d+\.\d+\.\d+)/i
},{id:"anvergo",name:"Anvergo",webkit:!0,regex:/anvergo/i,versionRegex:/anvergo.*-(.*)/i},{id:"wiiu",name:"Wii U",regex:/wiiu/i,versionRegex:s,webkit:!0},{id:"ps3",name:"Unknown Browser",webkit:!0,regex:/\(PLAYSTATION 3 \d\./},{id:"ps4",name:"Unknown Browser",webkit:!0,regex:/\(PlayStation 4 \d\./},{id:"ps3",name:"Mystery 3",webkit:!0,regex:/\(PlayStation 3\)/,versionRegex:s},{id:"ps4",name:"Mystery 4",webkit:!0,regex:/\(PlayStation 4\)/,versionRegex:s},{id:"edge",name:"Microsoft Edge",regex:/edge|(windows phone.+chrome)/i,
versionRegex:/edge\/(\d+(\.\d+)?)/i},{id:"ie",name:"Internet Explorer",msie:!0,regex:/(msie|trident|iemobile)/i,versionRegex:a,versionMatchIndex:2},{id:"opera",name:"Opera",presto:!0,regex:/opera/i,versionRegex:n},{id:"opera",name:"Opera",webkit:!0,regex:/OPR\//,versionRegex:/OPR\/\s?(\d+(\.\d+)?)/},{id:"vivaldi",name:"Vivaldi",webkit:!0,regex:/vivaldi/i,versionRegex:/Vivaldi\/\s?(\d+(\.\d+)?)/},{id:"chrome",name:"Chrome",webkit:!0,regex:/(chrome|crios|gfiber)/i,versionRegex:i},{id:"firefox",name:"Firefox",
gecko:!0,regex:/firefox/i,versionRegex:r},{id:"safari",name:"Safari",webkit:!0,regex:/macintosh.+safari/i,versionRegex:n},{id:"safari",name:"Safari",webkit:!0,regex:/applewebkit/i,versionRegex:s}],platforms:[{id:"wpe",name:"WebKit for Wayland",tv:!0,regex:/WPE$/},{id:"netcast",name:"NetCast",tv:!0,predicate:function(e){return/netcast/i.test(e)&&!/web[o0]s/i.test(e)}},{id:"webos",name:"webOS",tv:!0,predicate:function(e){var t=/web[o0]s/i.test(e)&&/large screen/i.test(e);return!!this.version(e)&&t},
version:function(e){try{return JSON.parse(window.PalmSystem.deviceInfo).platformVersion}catch(t){}}},{id:"weboshybrid",name:"webOS",tv:!0,predicate:function(e){var t=/web[o0]s/i.test(e)&&/large screen/i.test(e);return!(!t||!window.NetCastGetMouseOnOff)}},{id:"blackberry",name:"Blackberry",mobile:!0,regex:/BlackBerry|RIM|BB10/,version:function(e){var t=/PlayBook/.test(e)?/Tablet OS (\d+\.\d+)/:n,i=t.exec(e);return i&&i[1]}},{id:"ps3",name:"PlayStation 3",tv:!0,regex:/P(lay)?S(tation )?3/i,version:function(e){
return window.WM_devSettings?window.WM_devSettings.version:void 0}},{id:"ps4",name:"PlayStation 4",tv:!0,regex:/P(lay)?S(tation )?4/i,version:function(e){return window.WM_devSettings?window.WM_devSettings.version:void 0}},{id:"wiiu",name:"Wii U",tv:!0,regex:/Nintendo WiiU/},{id:"tizen",name:"Tizen",tv:!0,predicate:function(e){return!!this.version(e)},version:function(e){var t=/Tizen (\d+.\d+)/.exec(e);return t&&t[1]||void 0}},{id:"sta",name:"Smart TV Alliance",tv:!0,version:function u(t){var u,n;if(/SmartTvA/.test(t))n=/SmartTvA\/(\d+\.\d+)/.exec(t),
u=n&&n[1]||u;else{var i=[/Linux i686.+Chromium\/18/,/nettv\/4.2/i,/toshiba-dtv/i,/viera/i],r=[/nettv\/4/i],a=[/nettv/i],s=function(e){return e.test(t)};e.some(i,s)?u="2.0":e.some(r,s)?u="1.0":e.some(a,s)&&(u="0")}return u},predicate:function(e){return void 0!==this.version(e)}},{id:"tivo",name:"TiVo",tv:!0,regex:/TiVo/,version:function(e){var t=/TCD[^,]+/.exec(e);return t&&t[0]||void 0}},{id:"viziomtk",name:"Vizio MTK",tv:!0,predicate:function(e){return/opera/i.test(e)&&"undefined"!=typeof iMTK_JSP;
}},{id:"viziosigma",name:"Vizio Sigma",tv:!0,predicate:function(e){return/opera/i.test(e)&&/vizio/i.test(e)},version:function(e){var t=/\/([^\s]+) \(Vizio/.exec(e);return t&&t[1]||void 0}},{id:"operatvstore",name:"Opera TV Store",tv:!0,predicate:function(e){var t=/Opera TV Store/.test(e),n=/TV Store/.test(e)&&/OMI\//.test(e);return t||n}},{id:"operatv",name:"Opera TV",tv:!0,regex:/opera\/\d+\.\d+ \(linux (mips|arm)/i},{id:"android",name:"Android",tv:!0,regex:/Anvergo-Android/,version:function(e){
var t=/Android (\d+\.\d+)/.exec(e);return t&&t[1]}},{id:"ios",name:"iOS",mobile:!0,regex:/(iphone|ipad|ipod)/i,version:function(e){var t=/OS (\d+_\d+)/.exec(e);return t&&t[1]?t[1].replace("_","."):void 0}},{id:"windowsphone",name:"Windows Phone",mobile:!0,regex:/windows phone/i,version:function(e){var t=/windows phone[ os]*(\d+\.\d+);/i.exec(e);return t&&t[1]}},{id:"android",name:"Android",mobile:!0,regex:/android/i,version:function(e){var t=/Android (\d+\.\d+)/.exec(e);return t&&t[1]}},{id:"webos",
name:"webOS",mobile:!0,predicate:function(e){return/hpwOS/.test(e)||/web[o0]s/i.test(e)&&!/large screen/i.test(e)},version:function(e){var t=/(?:hpw|web)OS\/(\d+\.\d+)/.exec(e);return t&&t[1]}},{id:"openelec-rpi2",name:"OpenELEC (Raspberry Pi)",tv:!0,regex:/plexmediaplayer.*openelec-rpi2/i,version:o},{id:"openelec",name:"OpenELEC",tv:!0,regex:/plexmediaplayer.*openelec/i,version:o},{id:"linuxkonvergo",name:"Linux",tv:!0,regex:/plexmediaplayer.*linux/i,version:o},{id:"osxkonvergo",name:"OSX",tv:!0,
regex:/plexmediaplayer.*mac/i,version:o},{id:"windowskonvergo",name:"Windows",tv:!0,regex:/plexmediaplayer.*win/i,version:o},{id:"linux",name:"Linux",regex:/linux/i},{id:"osx",name:"OSX",regex:/Macintosh/,version:function(e){var t=/OS X (\d+)[_.]?(\d+)?/.exec(e);if(t)return t[2]?t[1]+"."+t[2]:t[1]}},{id:"windows",name:"Windows",regex:/Windows/,version:function(e){var t={"6.0":"Vista / Server 2008",6.1:"7 / Server 2008 R2",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},n=/Windows [^\d;\)]*(\d+\.\d+)/.exec(e);
if(n)return t[n[1]]}}],id:"unknown",name:"Unknown Browser",version:"0",platformID:"unknown",platform:"Unknown Platform",platformVersion:"0",webkit:!1,gecko:!1,msie:!1,presto:!1,tv:!1,mobile:!1,constructor:function(e){var t="",n="";e?(t=e.userAgent,n=e.platform):null!=navigator&&(t=navigator.userAgent,n=navigator.platform),this.detect({userAgent:t,platform:n})},detect:function(t){var n,i=this.runTests(this.browsers,t),r=this.runTests(this.platforms,t);i&&(this.id=i.id,this.name=i.name,this.version=this.getVersion(t.userAgent,i.versionRegex,i.versionMatchIndex||1),
this.webkit=!!i.webkit,this.gecko=!!i.gecko,this.msie=!!i.msie,this.presto=!!i.presto),r&&(n=e.isFunction(r.version)?r.version(t.userAgent):r.version,this.platform=r.name,this.platformID=r.id,this.platformVersion=n||this.platformVersion,this.mobile=!!r.mobile,this.tv=!!r.tv),this.tv||(this.platformModifierKey="osx"===this.platformID||"ios"===this.platformID?"command":"ctrl")},runTests:function(e,t){for(var n,i,r,a=0;i!==!0&&(r=e[a++]);)n=t[r.context||"userAgent"],r.regex?i=r.regex.test(n):r.predicate&&(i=r.predicate(n));
return r},getVersion:function(e,t,n){var i=e.match(t);return i&&i.length>n&&i[n]||"0"},toJSON:function(){var e={};for(var t in this)this[t]&&"browsers"!==t&&"platforms"!==t&&(e[t]=this[t]);return e}});return new l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";function n(e,t,n){return e!==t?n.fn(this):n.inverse(this)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),i={
canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=i},function(e,t,n){var i,r;i=[n(3),n(53)],r=function(e,t){"use strict";function n(n,i){i||(i={});var r=e.defaults(i,{typeName:n,parse:e.bind(t.parseType,t,n)});return r}var i={xml:n("xml"),json:n("json"),text:n("text")};return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},,function(e,t,n){"use strict";e.exports=n(604);
},function(e,t,n){"use strict";function i(e){return function(){return e.apply(this,s.default.initial(arguments))}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.containerClassName,i=e.labelClassName,r=e.size,a=e.label,o=(0,l.default)(t,p.default[r]);return a?s.default.createElement("div",{className:(0,l.default)(n,p.default.spinnerContainer)},s.default.createElement("div",{
className:o}),s.default.createElement("div",{className:(0,l.default)(i,p.default.spinnerLabel)},a)):s.default.createElement("div",{className:o,"aria-label":(0,c.default)("Loading")})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(30),l=r(o),u=n(6),c=r(u),d=n(41),h=n(1533),p=r(h);i.propTypes={className:a.PropTypes.string,containerClassName:a.PropTypes.string,labelClassName:a.PropTypes.string,label:a.PropTypes.string,size:a.PropTypes.oneOf(d.sizes.all)},i.defaultProps={
size:d.sizes.MEDIUM},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(37),u=r(l),c=n(10),d=n(38),h=r(d),p=n(22),f=a(p),m=n(56),v=r(m),g=n(284),y=r(g),b=n(59),w=a(b),S=n(77),P=r(S),x=n(127),C=r(x),T=n(216),_=r(T),E=n(31),k=r(E),I=n(140),A=r(I),M=n(26),D=r(M),R=n(13),O=r(R),L=n(54),N=r(L),U=n(18),F=r(U),j=n(389),B=r(j),z=n(266),V=r(z),H=n(20),q=r(H),W=n(393),K=r(W),Q=n(263),Y=r(Q),G=n(124),$=r(G),X=n(719),J=r(X),Z=n(269),ee=r(Z),te=n(102),ne=r(te),ie=n(103),re=r(ie),ae=n(755),se=r(ae),oe=n(758),le=r(oe),ue=n(125),ce=r(ue),de=n(753),he=r(de),pe=n(760),fe=r(pe),me=n(759),ve=r(me),ge={
PENDING:"pending",CONNECTED:"connected",UNAVAILABLE:"unavailable",UNAUTHORIZED:"unauthorized"},ye={PENDING:"pending",RESOLVED:"resolved",REJECTED:"rejected"},be={SECONDARY:"secondary"},we=["camera_upload","cloudsync","content_filter","home","lyrics","music_videos","pass","premium_music_metadata","sync","trailers"],Se=q.default.extend({mixins:[V.default],name:"ServerModel",entityType:w.SERVER,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,P.default)(this.entityType,e.machineIdentifier||this.cid);
},idAttribute:"machineIdentifier",connectionTestTimeout:1e4,cache:new C.default,persistInCache:!0,sessionAttrs:{connectionTestResult:F.default.oneOf(ge.PENDING,ge.CONNECTED,ge.UNAVAILABLE,ge.UNAUTHORIZED).isRequired,promiseState:F.default.oneOf(ye.PENDING,ye.RESOLVED,ye.REJECTED).isRequired,sections:F.default.instanceOf(Y.default).isRequired,playlists:F.default.instanceOf(J.default).isRequired,playQueueManager:F.default.instanceOf(K.default).isRequired,isShared:F.default.boolean.isRequired,isBundled:F.default.boolean.isRequired,
isCloud:F.default.boolean.isRequired,isMerged:F.default.boolean.isRequired,cloudAccount:F.default.instanceOf(se.default).isRequired,update:F.default.instanceOf(le.default),settings:F.default.instanceOf(ce.default).isRequired,alerts:F.default.instanceOf(he.default).isRequired,transcodeJobs:F.default.instanceOf(fe.default).isRequired,sessions:F.default.instanceOf(ve.default).isRequired,superToken:F.default.string,accessToken:F.default.string,sourceTitle:F.default.string,publicAddressMatches:F.default.boolean,
httpsRequired:F.default.boolean,presence:F.default.boolean,home:F.default.boolean,synced:F.default.boolean,createdAt:F.default.integer,lastSeenAt:F.default.integer,serverClass:F.default.oneOf(be.SECONDARY)},sessionRelations:{activeConnection:{relationClass:ne.default,deferred:!0},connections:{relationClass:ee.default,options:function(){return{server:this}}}},syncedAttrs:{machineIdentifier:F.default.string,friendlyName:F.default.string,startState:F.default.string,version:F.default.string,platform:F.default.string,
platformVersion:F.default.string,sync:F.default.boolean,multiuser:F.default.boolean,transcoderLyrics:F.default.boolean,myPlex:F.default.boolean,myPlexMappingState:F.default.string,myPlexSigninState:F.default.string,myPlexSubscription:F.default.boolean,myPlexUsername:F.default.string,transcoderPhoto:F.default.boolean,transcoderAudio:F.default.boolean,transcoderVideo:F.default.boolean,transcoderVideoRemuxOnly:F.default.boolean,transcoderSubtitles:F.default.boolean,transcoderActiveVideoSessions:F.default.integer,
allowMediaDeletion:F.default.boolean,allowCameraUpload:F.default.boolean,allowChannelAccess:F.default.boolean,allowSync:F.default.boolean,companionProxy:F.default.boolean,updatedAt:F.default.integer,radioProviders:F.default.list,countryCode:F.default.string,ownerFeatures:F.default.list},derivedAttrs:{debugName:function(){var e=this.get("machineIdentifier"),t=this.get("connections"),n=1===t.length&&t.at(0).get("isLoopback"),i=this.get("friendlyName");return!i&&n&&(i="[Loopback]"),i||(e?"["+e+"]":"[Anonymous]");
},shortVersion:function(){var e=this.get("version"),t=/(\d+\.){2,3}\d+/.exec(e);return o.default.first(t)||e},isConnected:function(){return this.get("connectionTestResult")===ge.CONNECTED},isUnavailable:function(){return this.get("connectionTestResult")===ge.UNAVAILABLE},isUnauthorized:function(){return this.get("connectionTestResult")===ge.UNAUTHORIZED},isResolved:function(){return this.get("promiseState")===ye.RESOLVED},isRejected:function(){return this.get("promiseState")===ye.REJECTED},isRelayed:function(){
var e=this.get("activeConnection");return!(!e||!e.get("isRelayed"))},isSecure:function(){var e=this.get("activeConnection");return!(!e||!e.get("isSecure"))},hasHttpsConnections:function(){var e=this.get("connections");return!!e.findWhere({isHttps:!0})},hasFallbackConnections:function(){var e=this.get("connections");return!!e.findWhere({isFallback:!0})},isCloudSyncServer:function(){return!!this.get("synced")},isMobileServer:function(){return!this.get("synced")&&this.get("serverClass")===be.SECONDARY;
},isFullServer:function(){return!this.get("isCloud")&&!this.get("isCloudSyncServer")&&!this.get("isMobileServer")},isCloudBased:function(){return this.get("isCloud")||this.get("isCloudSyncServer")},isFullOwnedServer:function(){return this.get("isFullServer")&&!this.get("isShared")},isPrimaryEligible:function(){return!(!N.default.get("allowCloudSyncServers")&&this.get("isCloudSyncServer"))&&(!(!N.default.get("allowMobileServers")&&this.get("isMobileServer"))&&(!!this.get("machineIdentifier")&&!this.get("isUnauthorized")&&!this.get("isCloud")));
},isOutOfDate:function(){if(this.get("isCloudSyncServer"))return!1;var e="0.9.16.0";return!this.isVersionOrNewer(e)},isClaimed:function(){return this.get("isConnected")?"ok"===this.get("myPlexSigninState"):void 0},hasManualConnection:function(){var e=this.get("connections");return e.some(function(e){return e.get("sources").some(function(e){return/^manual/.test(e.id)})})},shared:function(){return this.get("isShared")},bundled:function(){return this.get("isBundled")},cloud:function(){return this.get("isCloud");
},merged:function(){return this.get("isMerged")},connected:function(){var e=this.get("connectionTestResult")===ge.PENDING;return e?null:this.get("isConnected")},available:function(){var e=this.get("connectionTestResult")===ge.PENDING;return e?null:!this.get("isUnavailable")},authorized:function(){var e=this.get("connectionTestResult")===ge.PENDING;return e?null:this.get("isResolved")},relayed:function(){return this.get("isRelayed")}},defaults:function(){return{connectionTestResult:ge.PENDING,promiseState:ye.PENDING,
sections:new Y.default([],{server:this}),playlists:new J.default({},{server:this}),playQueueManager:new K.default({server:this}),cloudAccount:new se.default({},{server:this}),update:N.default.get("allowServerUpdates")?new le.default({},{server:this}):null,settings:new ce.default([],{server:this}),alerts:new he.default([],{server:this}),transcodeJobs:new fe.default([],{server:this}),sessions:new ve.default([],{server:this}),isShared:!1,isBundled:!1,isCloud:!1,isMerged:!1}},url:function Pe(){var e=arguments.length<=0||void 0===arguments[0]?this.get("activeConnection"):arguments[0];
(0,h.default)(e,"An active or manual connection is required for a server url");var Pe=o.default.result(e,"url");return/\/$/.test(Pe)||(Pe+="/"),Pe},initialize:function(){this._reset(),this.on("change:machineIdentifier",this.onMachineIdentifierChange,this),this.listenTo(this.get("connections"),{remove:this.onConnectionRemove,reset:this.onConnectionsReset})},uninitialize:function(){this.off("change:machineIdentifier",this.onMachineIdentifierChange,this),this.stopListening()},updateEntity:function(){
if(!this.get("isMerged"))return q.default.prototype.updateEntity.apply(this,arguments)},fetch:function(){return u.default.Model.prototype.fetch.apply(this,arguments)},resolveUrl:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(/^\w+:\/\//.test(e))return e;var n=t.useLoopback?"http://127.0.0.1:32400/":this.url(t.connection),i=this.get("accessToken"),r=o.default.extend({},t.params);return t.appendHeaders&&o.default.defaults(r,this.getHeaders()),t.appendToken&&i&&(r["X-Plex-Token"]=i),
f.join([n,e],r)},swizzleUrl:function(e,t){var n=e.match(/^\w+:\/\/.+?(\/.+)$/),i=n?n[1]:e;return this.resolveUrl(i,t)},getXHROptions:function(e,t){return i({url:this.resolveUrl(e),dataType:"text",headers:this.getHeaders()},t)},getHeaders:function(){var e=A.default.getInstance(),t=o.default.clone(e),n=this.get("accessToken");n&&(t["X-Plex-Token"]=n);var i=k.default.get("language");return i&&(t["Accept-Language"]=i),t},addConnection:function(e){e.sources||(e.sources=[{id:"internal"}]);var t=this.get("connections"),n=new ne.default(e),i=t.get(n.id);
if(i){var r=i.get("sources");return r.set(e.sources,{remove:!1}),i}return t.add(e)},hasSource:function(e){return this.get("connections").some(function(t){return t.hasSource(e)})},removeSource:function(e){for(var t=this.get("connections"),n=t.length-1;n>=0;){var i=t.at(n),r=i.get("sources");r.remove(e),n--}},testAllConnections:function(){var e=this,t=this.get("connections");return(0,D.default)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName")),this._reset(),t.each(function(t){
e.testConnection(t)}),this.populatePromise},testOnlyUntestedConnections:function(){var e=this,t=this.get("connections");return t.each(function(t){(t.get("isUntested")||t.get("isAborted"))&&e.testConnection(t)}),this.populatePromise},testConnection:function(e){var t={server:this,connection:e};this.get("promiseState")===ye.REJECTED&&this._reset();var n=O.default.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this));return n},abortAllConnectionTests:function(){
var e=this,t=this.get("connections");(0,D.default)("[Connections] Aborting all pending connection tests for",this.get("debugName")),t.each(function(t){e.abortConnectionTest(t)})},abortConnectionTest:function(e){var t={server:this,connection:e};O.default.execute("abortServerConnectionTest",t)},populateIdentity:function(e){var t=this;if(this._identityPromise)return this._identityPromise;var n=O.default.execute("populateServerIdentity",{server:this,connection:e});return n.done(function(e){t.set("machineIdentifier",e);
}),this._identityPromise=n,n},updateCacheKey:function(){var e=this.get("debugName"),t=this.cacheKey(this.attributes),n=this.cache.get(t);if(n){var i=n.get("debugName");D.default.warn("[Identity] %s and %s (cached) collide",e,i),n.get("isConnected")||!this.get("isConnected")?((0,D.default)("[Identity] Merging %s into %s (cached)",e,i),n.merge(this)):((0,D.default)("[Identity] Merging %s (cached) into %s",i,e),this.merge(n),this.cache.store(this,t))}else this.cache.store(this,t)},merge:function(e){
var t=this;e.set("isMerged",!0),e.get("isBundled")&&this.set("isBundled",!0),e.get("connections").each(function(e){t.addConnection(e.toJSON())}),this.collection&&(this.collection.remove(e.cid,{silent:!0}),this.collection._byId[this.id]=this,this.collection.trigger("remove",e,this.collection),this.collection.trigger("update",this.collection)),this.cache.remove(e),N.default.get("shouldCreateStateTree")&&this.updateEntity()},hasOwnerFeature:function(e){if(this.supports("ownerFeatures")){var t=this.get("ownerFeatures");
return!!t&&t.indexOf(e)>-1}return!!this.get("myPlexSubscription")&&we.indexOf(e)>-1},supports:function(e){var t=this.get(e);if(o.default.isBoolean(t))return t;var n=re.default[e];return null!=n&&this.isVersionOrNewer(n)},isVersionOrNewer:function(e){var t=this.get("shortVersion");return!e||(0,y.default)(t,e)},getSectionForItem:function(e){if(e.section)return e.section;if(e.get("isSection"))return e;var t=e.get("librarySectionID");if(t){var n=new $.default({key:e.get("librarySectionID")},{server:e.server,
onlyIfCached:!0});return n}return e.parent?this.getSectionForItem(e.parent):void 0},canAllowHttpFallback:function(){if(!this.get("isFullServer"))return!1;if(v.default.isHostedHttps&&!N.default.get("allowMixedContent"))return!1;var e=k.default.get("allowHttpFallback"),t=e===_.default.ALWAYS,n=e===_.default.SAME_NETWORK,i=t||n&&this.get("publicAddressMatches");return!!i},hasOtherLoopbackServer:function(){return!!this.collection&&this.collection.hasLoopbackServer()},hasLocalConnection:function(){var e=this.get("activeConnection");
return e&&e.get("isPrivate")},hasLoopbackConnection:function(){var e=this.get("activeConnection");return e&&e.get("isLoopback")},hasSecureConnection:function(){return this.get("isSecure")},authenticate:function(e){this._resolve({accessToken:e})},deauthenticate:function(){this._reject({accessToken:null})},_reset:function(){this.startCapturingChangeEvents(),this.set("promiseState",ye.PENDING),this._resetPopulate(),this.releaseCapturedChangeEvents()},_resolve:function(e){var t=o.default.extend({connectionTestResult:ge.CONNECTED,
promiseState:ye.RESOLVED},e);this.startCapturingChangeEvents(),this.set(t),this._resolvePopulate(),this.releaseCapturedChangeEvents()},_reject:function(e){var t=this.get("connections");t.hasOnlyFailedConnections()&&D.default.warn("[Connections] All connections to %s failed",this.get("debugName"));var n=t.findWhere({isUnauthorized:!0})?ge.UNAUTHORIZED:ge.UNAVAILABLE,i=o.default.extend({connectionTestResult:n,promiseState:ye.REJECTED},e);this.startCapturingChangeEvents(),this.set(i),this._rejectPopulate(),
this.releaseCapturedChangeEvents()},_checkActiveConnection:function(){var e=this.get("activeConnection"),t=this.get("connections");if(e&&!t.contains(e)){var n=t.getBestConnection();n?this.set("activeConnection",n):this.testAllConnections()}},onMachineIdentifierChange:function(e,t){this.collection?this.listenToOnce(this.collection,"change:machineIdentifier",function(){this.updateCacheKey()}):this.updateCacheKey()},onConnectionRemove:function(e,t){t.length?this._checkActiveConnection():(this.trigger("change:connections.remove",e,t),
this.trigger("change:connections.change",this,t),this.trigger("destroy",this,this.collection))},onConnectionsReset:function(e,t){e.length?this._checkActiveConnection():(this.trigger("change:connections.reset",e,t),this.trigger("change:connections.change",this,e),this.trigger("destroy",this,this.collection))},onConnectionTestSuccess:function(e,t){var n=this.get("connections").getBestConnection();if(n!==this.get("activeConnection")&&D.default.info("[Connections] Active connection to %s is %s",this.get("debugName"),n.id),
this._resolve(i({activeConnection:n},t)),N.default.get("allowLoopbackDiscovery")){var r=this.get("connections"),a=this.get("activeConnection"),s=a.get("isPrivate"),o=!!r.findWhere({isLoopback:!0});!s||o||this.hasOtherLoopbackServer()||((0,D.default)("[Connections] Adding possible loopback connection for",this.get("debugName")),this.addConnection(a.getLoopbackAttributes()))}},onConnectionTestError:function(e,t){var n=this;if(!e.get("isAborted")){if(e.get("isHttps")&&!e.get("isUnauthorized"))if(this.canAllowHttpFallback()){
var i=this.addConnection({scheme:"http",address:e.get("address"),port:e.get("port"),isFallback:!0});(0,D.default)("[Connections] Added insecure fallback connection for %s at %s",this.get("debugName"),i.id)}else D.default.warn("[Connections] Prevented fallback to insecure connection for ",this.get("debugName"));var r=this.get("connections");!this.id&&e.get("isUnauthorized")&&this.populateIdentity(e),r.hasOnlyFailedConnections()&&(this.id||!this._identityPromise?this._reject():this._identityPromise.always(function(){
r.hasOnlyFailedConnections()&&n._reject()}))}}},{connectionTestResults:ge,promiseStates:ye,serverClasses:be});(0,B.default)(Se,function(){return{relationClass:(0,c.resolve)("ServerFlexModel"),options:{server:this}}}),t.default=Se,e.exports=t.default},function(e,t,n){"use strict";function i(){w&&(w=clearTimeout(w))}function r(){S&&(S=clearTimeout(S))}function a(){i(),r();var e=(0,f.default)(),t=void 0;for(g=!0;m.length&&(!t||t-e<y);)m.pop()(),t=(0,f.default)();g=!1,m.length?w=setTimeout(a,b):P&&(S=setTimeout(P,b));
}function s(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];null!=e.budget&&(y=e.budget),null!=e.delay&&(b=e.delay)}function o(){i(),r(),g=!1,v=!1,P=null,m.length=0}function l(e){for(i(),r(),g=!0,v=!0;m.length;)m.pop()();if(e)try{e()}catch(t){(0,h.default)(!1,t.name+": "+t.message)}P&&P(),g=!1,v=!1}function u(e,t){return t.isStateTreeRoot?(P=e,void(g||S||(S=setTimeout(P,b)))):v?void e():(r(),m[0]!==e&&m.unshift(e),void(g||w||(w=setTimeout(a,b))))}var c=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.configure=s,t.resetUpdates=o,t.scheduleImmediateUpdate=l,t.scheduleUpdate=u;var d=n(38),h=c(d),p=n(459),f=c(p),m=[],v=!1,g=!1,y=1e3/60,b=1e3/60,w=void 0,S=void 0,P=void 0},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),a=i(r),s=n(145),o=i(s),l=["id","typeString"],u=(0,o.default)(l,[{id:1,typeString:"video",key:"videoStreamID",title:function(){return(0,a.default)("Video")}},{id:2,typeString:"audio",key:"audioStreamID",title:function(){
return(0,a.default)("Audio")}},{id:3,typeString:"subtitles",key:"subtitleStreamID",title:function(){return(0,a.default)("Subtitles")}},{id:4,typeString:"lyrics",key:"lyricStreamID",title:function(){return(0,a.default)("Lyrics")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(429),l=r(o),u=n(74),c=i(u),d=n(52),h=r(d),p=(0,c.default)(h.SHOW_ALERT,function(e){return s.default.isString(e)?{
type:l.ERROR,message:e}:e});t.showAlert=p;var f=(0,c.default)(h.SAVE_SETTINGS);t.saveSettings=f;var m=(0,c.default)(h.DOWNLOAD_SERVER);t.downloadServer=m;var v=(0,c.default)(h.DISCOVER_SERVERS);t.discoverServers=v;var g=(0,c.default)(h.CHANGE_PRIMARY_SERVER);t.changePrimaryServer=g;var y=(0,c.default)(h.REDIRECT_TO_ROUTE);t.redirectToRoute=y;var b=(0,c.default)(h.REDIRECT_TO_HTTP);t.redirectToHttp=b;var w=(0,c.default)(h.GARBAGE_COLLECT_ENTITIES);t.garbageCollectEntities=w},function(e,t,n){"use strict";
var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(5),o=i(s),l=n(29),u=i(l),c=n(50),d=i(c),h=u.default.extend({mixins:d.default,initialize:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];t.interface&&(this.interface=t.interface),t.props&&(this.props=t.props),a.default.each(this.interface,function(t){e[t]=a.default.bind(e._proxy,e,t)})},_proxy:function(e){for(var t=this.getInstance(),n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];
return t[e].apply(t,i)},register:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];this.hasInstance()&&!t.ignorePrevious&&(this._previousInstance=this.getInstance()),this._instance=e,t.silent||this.trigger("change:instance",e)},registerOnce:function(e){if(!this.hasInstance()){var t=e();this.register(t.instance||t,t.options||void 0)}},restorePrevious:function(){this._previousInstance&&this.register(this._previousInstance)},registered:function(){var e=o.default.Deferred();
return this.hasInstance()?e.resolve():this.listenToOnce(this,"change:instance",e.resolve),e.promise()},getInstance:function(){if(this.hasInstance())return this._instance;throw new Error("Nothing has been registered to this adapter.")},hasInstance:function(){return null!=this._instance},prop:function(e){if(a.default.contains(this.props,e))return this.getInstance()[e];throw new Error("The "+e+" property has not been defined for this adapter")}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";
function i(e){return e}function r(e,t){(0,o.default)("string"==typeof e,'Action creators must have a "type". Have you misspelled a constant?');var n="function"==typeof t?t:i;return function(){var t={type:e,payload:n.apply(void 0,arguments)};return t}}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(38),o=a(s);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function i(e){return(0,l.default)((0,s.default)(e),"Action handlers must be plain objects"),
function(t,n,i){var r=n.type,a=n.payload;return!!e.hasOwnProperty(r)&&(e[r](t,a,i),!0)}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(283),s=r(a),o=n(38),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,a.createSelector)(function(e,t){var n=t.serverEntityID;return n},o.default,function(e,t){return t[e]})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(28),s=n(275),o=r(s);e.exports=t.default;
},function(e,t){"use strict";function n(e,t){if(t){var n=[];n.push(e);for(var i=arguments.length,r=Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];for(var s=0,o=r.length;s<o;s++){var l=r[s];l&&n.push(l)}return n.push(t),n.join("--")}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(9),n(10),n(56),n(176),n(428),n(54)],r=function(e,t,n,i,r,a,s,o){"use strict";var l="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",u=n.ItemView.extend({
tagName:"img",background:!1,backgroundSize:"",cache:new s,initialize:function(t){t||(t={}),e.bindAll(this,"onLoad","onError","loadImage"),this.url=t.url,this.server=t.server,this.placeholder=t.placeholder,this.placeholderClass=t.placeholderClass,this.modelAttribute=t.modelAttribute,this.ignoreAttributeChanges=t.ignoreAttributeChanges,this.exposeUrl=t.exposeUrl,this.resetOnError=t.resetOnError,this.emptyImage=t.explicitEmpty?"url("+l+")":"",t.background&&(this.background=t.background),t.backgroundSize&&(this.backgroundSize=t.backgroundSize),
t.format&&(this.format=t.format),t.quality&&(this.quality=t.quality),e.isFunction(t.getUrl)&&(this.getUrl=t.getUrl),this.allowBaseImageBlobs=o.get("allowBaseImageBlobs"),this.allowBaseImagePreloading=o.get("allowBaseImagePreloading"),this.setup(t)},setup:function(e){this.setDimensions(e),this.setFilters(e.filters),this.setModel(e.model,e)},setDimensions:function(e){e.width&&e.height&&(this.transcode=!0,this.width=e.width,this.height=e.height)},setFilters:function(e){this.filters=e||void 0},hasFilters:function(){
return void 0!==this.filters},setModel:function(e,t){t||(t={}),this.stopListening(),this.src=null,this.model=e,e&&(this.server||(this.server=e.server),t.url||this.modelAttribute&&(this.url=this.getUrl(e.get(this.modelAttribute)),this.ignoreAttributeChanges||this.listenTo(e,"change:"+this.modelAttribute,this.onChange)))},setElement:function(e){n.ItemView.prototype.setElement.apply(this,arguments),this.render({force:!0})},getPixelRatio:function(){return window.overridePixelRatio||window.devicePixelRatio||1;
},getUrl:function(e){return e},getTranscodeUrl:function(e){if(!this.server||!this.transcode)return e;var t=i.resolve("appModel"),n=this.getPixelRatio();return a.image(this.server,e,{fallbackServer:t.get("primaryServer"),width:this.width*n,height:this.height*n,minSize:this.minSize,filters:this.filters,format:this.format,quality:this.quality})},render:function(e){return e||(e={}),this.url||this.placeholder||this.placeholderClass?this.src?(e.force&&this.showImage(this.src),this):(this.isPlaceholderRendered&&this.url||this.showPlaceholder(),
this.url&&this.load(this.url,this.transcode).then(this.onLoad,this.onError,this.onLoad),this):this},showPlaceholder:function(){return this.isPlaceholderRendered=!0,this.$el.removeClass("loaded"),this.placeholderClass?(this.$el.addClass(this.placeholderClass),void this.$el.css("background-image",this.emptyImage)):this.placeholder?void this.showImage(this.placeholder):void this.clearImage()},clearImage:function(){this.background?this.$el.css("background-image",this.emptyImage):this.showImage(l)},showImage:function(e){
return this.background?void this.showBackgroundImage(e):void this.$el.attr("src",e).removeAttr("width").removeAttr("height")},showBackgroundImage:function(e){this.$el.css("background-image","url("+e+")")},load:function(e){if(!e)return t.Deferred().reject().promise();if(e=this.getTranscodeUrl(e),this.exposeUrl&&this.$el.attr("data-image-url",e),this.allowBaseImageBlobs&&r.hasBlob&&r.hasObjectUrl){var n=this.loadBlob(e);return n=n.then(this.loadImage,null,this.loadImage)}return this.allowBaseImagePreloading?this.loadImage(e):t.Deferred().resolve(e).promise();
},loadBlob:function(n){var i=t.Deferred();this.cancel();var r=this.cache.getBlobUrl(n);if(r)return i.resolve(r),i.promise();var a=this.cache.getPlaceholder(n);a&&i.notify(a,!0);var s=new XMLHttpRequest;return s.open("GET",n,!0),s.responseType="arraybuffer",this.xhr=s,s.onreadystatechange=e.bind(function(){if(4===s.readyState)if(s.onreadystatechange=null,this.xhr=null,200===s.status){var e=new Blob([s.response],{type:"image/jpeg"}),t=window.URL.createObjectURL(e);this.cache.store({url:n,blobUrl:t}),
i.resolve(t)}else i.reject()},this),s.send(),i.promise()},loadImage:function(e,n){var i=t.Deferred(),r=new Image;return r.onload=function(){r.onload=r.onabort=r.onerror=null,n?i.notify(e,r.width,r.height):i.resolve(e,r.width,r.height)},r.onabort=r.onerror=function(){r.onload=r.onabort=r.onerror=null,i.reject()},r.src=e,i.promise()},cancel:function(){this.xhr&&(this.xhr.onreadystatechange=null,this.xhr.abort(),this.xhr=null)},onLoad:function(e,t,n){if(this.backgroundSize){var i=t&&t>this.width||n&&n>this.height?this.backgroundSize:"auto";
this.$el[0].style.backgroundSize=i}this.src=e,this.placeholderClass&&this.$el.removeClass(this.placeholderClass),this.$el.addClass("loaded"),this.showImage(e),this.trigger("load",e,t,n)},onError:function(){this.resetOnError&&this.showPlaceholder(),this.trigger("error")},onClose:function(){this.cancel()},onChange:function(e,t){return t=this.getUrl(t),this.url===t?this:(this.url=t,this.src=null,void this.render())}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";function n(e){
return function(){return e}}var i=function(){};i.thatReturns=n,i.thatReturnsFalse=n(!1),i.thatReturnsTrue=n(!0),i.thatReturnsNull=n(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";var i=n(1974);e.exports={debugTool:i}},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(73),a=i(r),s=new a.default({"interface":["get","set","remove","clear"]});t.default=s,e.exports=t.default;
},function(e,t,n){var i,r;i=[n(3),n(285),n(293),n(26)],r=function(e,t,n,i){"use strict";var r=e.extend({},n,{type:"video",qualities:{bitrate:[64,96,208,320,720,1500,2e3,3e3,4e3,8e3,1e4,12e3,2e4],videoResolution:["220x128","220x128","284x160","420x240","576x320","720x480","1280x720","1280x720","1280x720","1920x1080","1920x1080","1920x1080","1920x1080"],videoQuality:[10,20,30,30,40,60,60,75,100,60,75,90,100]},getAvailableQualitiesFor:function(e,n,i){if(!e||!n)return[];var r=n.get("transcoderVideo"),a=n.get("transcoderVideoRemuxOnly"),s=t(e),o=!(!s||!s.bitrate),l=!!e.videoResolution;
if(!r||a||!o&&!l)return[];var u=o?this.getAvailableQualitiesBelowBitrate(s.bitrate,i):this.getAvailableQualitiesBelowResolution(e.videoResolution,i);return u},getAvailableQualitiesBelowBitrate:function(e,t){return t||(t={}),t.comparator=function(t){var n=this.qualities.bitrate[t];return n>=e},this.getAvailableQualities(t)},getAvailableQualitiesBelowResolution:function(e,t){t||(t={});var n=this.getHeightFromResolution(e);return t.comparator=function(e){var t=this.qualities.videoResolution[e],i=this.getHeightFromResolution(this.getResolutionFromSize(t));
return i>=n},this.getAvailableQualities(t)},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)},getMinimumQuality:function(e,t){var n=e===r.ORIGINAL?Number.MAX_VALUE:e,i=t===r.ORIGINAL?Number.MAX_VALUE:t;return n<i?e:t},getMaximumQuality:function(e,t){return this.getMinimumQuality(e,t)===e?t:e}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),a=i(r),s=n(145),o=i(s),l=["key","typeID","typeString"],u=(0,
o.default)(l,[{key:"movies",typeID:"1",typeString:"movie",title:function(){return(0,a.default)("Movies")},defaultAgent:"com.plexapp.agents.imdb",defaultLanguage:"en",defaultScanner:"Plex Movie Scanner",sectionTypeIcon:"plex-icon-movies-560"},{key:"tv",typeID:"2",typeString:"show",title:function(){return(0,a.default)("TV Shows")},defaultAgent:"com.plexapp.agents.thetvdb",defaultLanguage:"en",defaultScanner:"Plex Series Scanner",sectionTypeIcon:"plex-icon-shows-560"},{key:"music",typeID:"8",typeString:"artist",
title:function(){return(0,a.default)("Music")},defaultAgent:"com.plexapp.agents.lastfm",defaultLanguage:"en",defaultScanner:"Plex Music Scanner",sectionTypeIcon:"plex-icon-music-560",exclusiveAgents:["com.plexapp.agents.plexmusic"],exclusiveScanners:["Plex Premium Music Scanner"]},{key:"photos",typeID:"13",typeString:"photo",title:function(){return(0,a.default)("Photos")},defaultAgent:"com.plexapp.agents.none",defaultLanguage:"xn",defaultScanner:"Plex Photo Scanner",sectionTypeIcon:"plex-icon-photos-560"
},{key:"videos",typeID:"1",typeString:"movie",title:function(){return(0,a.default)("Home Videos")},defaultAgent:"com.plexapp.agents.none",defaultLanguage:"xn",defaultScanner:"Plex Video Files Scanner",sectionTypeIcon:"plex-icon-clips-560"}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(30),p=u(h),f=n(1927),m=u(f),v=n(1926),g=u(v),y=n(23),b=n(472),w=n(27),S=u(w),P=n(112),x=u(P),C=n(41),T=n(1531),_=u(T),E=function(e){
function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isScrolling:!1},this._currentScrollTop=0,this._currentScrollLeft=0}return r(t,e),a(t,[{key:"componentDidMount",value:function(){this._scrollTo(this.props)}},{key:"componentWillReceiveProps",value:function(e){e.scrollTop===this.props.scrollTop&&e.scrollLeft===this.props.scrollLeft||this.setState({isScrolling:!0})}},{key:"shouldComponentUpdate",value:function(e,t){return(0,S.default)(this,e,t);
}},{key:"componentDidUpdate",value:function(e){this.state.isScrolling&&(this._scrollTimeoutID&&clearTimeout(this._scrollTimeoutID),this._scrollTimeoutID=setTimeout(this.onScrollTimeout,this.props.isScrollingTimeout)),this._scrollTo(this.props)}},{key:"componentWillUnmount",value:function(){this._clearTimeouts(),this._cancelScrollTo()}},{key:"_setScrollPosition",value:function(e){var t=e.scrollTop,n=e.scrollLeft;this._clearTimeouts(),this._currentScrollTop=t,this._currentScrollLeft=n,this._animationFrameID=requestAnimationFrame(this.onScrollPositionChange);
}},{key:"_updateScrollPosition",value:function(e){var t=e.scrollTop,n=e.scrollLeft;null!=t&&(this.refs.scroller.scrollTop=t),null!=n&&(this.refs.scroller.scrollLeft=n)}},{key:"_scrollTo",value:function(e){var t=e.scrollTop,n=e.scrollLeft;if(null!=t||null!=n){var i=null!=t&&t!==this._currentScrollTop,r=null!=n&&n!==this._currentScrollLeft;if(i||r){if(!this.props.smoothScroll)return this._currentScrollTop=t,this._currentScrollLeft=n,void this._updateScrollPosition({scrollTop:t,scrollLeft:n});var a=this.props.smoothScrollDuration/1e3,s={
ease:g.default.Power3.easeOut,onUpdate:this.onScrollToUpdate,onComplete:this.onScrollToComplete};this._scrollToPosition={},i&&(s.scrollTop=Math.min(t,this.refs.scroller.scrollHeight-this.refs.scroller.clientHeight),this._scrollToPosition.scrollTop=this.refs.scroller.scrollTop),r&&(s.scrollLeft=Math.min(n,this.refs.scroller.scrollWidth-this.refs.scroller.clientWidth),this._scrollToPosition.scrollLeft=this.refs.scroller.scrollLeft),this._cancelScrollTo(),this._scrollToTween=m.default.to(this._scrollToPosition,a,s);
}}}},{key:"_cancelScrollTo",value:function(){this._scrollToTween&&(this._scrollToTween.kill(),this._scrollToTween=null)}},{key:"_clearTimeouts",value:function(){this._animationFrameID&&cancelAnimationFrame(this._animationFrameID),this._scrollTimeoutID&&clearTimeout(this._scrollTimeoutID)}},{key:"onScroll",decorators:[y.autobind],value:function(e){if(e.target===this.refs.scroller){var t=e.target.scrollTop,n=e.target.scrollLeft,i=t!==this._currentScrollTop,r=n!==this._currentScrollLeft;(i||r)&&this._setScrollPosition({
scrollTop:t,scrollLeft:n})}}},{key:"onScrollPositionChange",decorators:[y.autobind],value:function(){this._animationFrameID=null,this.props.onScrollPositionChange({scrollTop:this._currentScrollTop,scrollLeft:this._currentScrollLeft})}},{key:"onScrollTimeout",decorators:[y.autobind],value:function(){this.setState({isScrolling:!1})}},{key:"onScrollToUpdate",decorators:[y.autobind],value:function(){this._updateScrollPosition(this._scrollToPosition),this.props.onScrollToUpdate&&this.props.onScrollToUpdate(this._scrollToPosition);
}},{key:"onScrollToComplete",decorators:[y.autobind],value:function(){this._scrollToTween=null,this._scrollToPosition=null,this.props.onScrollToComplete&&this.props.onScrollToComplete()}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,i=t.children,r=t.scrollDirection,a=t.autoScroll,s=t.onScroll,u=t.onScrollPositionChange,c=o(t,["className","children","scrollDirection","autoScroll","onScroll","onScrollPositionChange"]);return d.default.createElement("div",l({ref:"scroller",className:(0,
p.default)(n,_.default.scroller,_.default[r],a&&_.default.auto),onScroll:u?(0,x.default)(this.onScroll,s):s},c),u?(0,b.mapValidComponents)(i,function(t){return d.default.cloneElement(t,{isScrolling:e.state.isScrolling,scrollTop:e._currentScrollTop,scrollLeft:e._currentScrollLeft})}):i)}}]),t}(c.Component);E.propTypes={className:c.PropTypes.string,children:c.PropTypes.node.isRequired,scrollDirection:c.PropTypes.oneOf(C.scrollDirections.all).isRequired,autoScroll:c.PropTypes.bool,smoothScroll:c.PropTypes.bool,
smoothScrollDuration:c.PropTypes.number.isRequired,scrollTop:c.PropTypes.number,scrollLeft:c.PropTypes.number,isScrollingTimeout:c.PropTypes.number.isRequired,onScroll:c.PropTypes.func,onScrollPositionChange:c.PropTypes.func,onScrollToUpdate:c.PropTypes.func,onScrollToComplete:c.PropTypes.func},E.defaultProps={scrollDirection:C.scrollDirections.VERTICAL,autoScroll:!1,smoothScroll:!0,smoothScrollDuration:400,isScrollingTimeout:100},t.default=E,e.exports=t.default},function(e,t){var n=Object;e.exports={
create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){"use strict";var i=n(51),r=n(123),a=(n(42),n(364),"function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103),s={key:!0,ref:!0,__self:!0,__source:!0},o=function(e,t,n,i,r,s,o){var l={$$typeof:a,type:e,key:t,ref:n,
props:o,_owner:s};return l};o.createElement=function(e,t,n){var i,a={},l=null,u=null,c=null,d=null;if(null!=t){u=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key,c=void 0===t.__self?null:t.__self,d=void 0===t.__source?null:t.__source;for(i in t)t.hasOwnProperty(i)&&!s.hasOwnProperty(i)&&(a[i]=t[i])}var h=arguments.length-2;if(1===h)a.children=n;else if(h>1){for(var p=Array(h),f=0;f<h;f++)p[f]=arguments[f+2];a.children=p}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)void 0===a[i]&&(a[i]=m[i]);
}return o(e,l,u,c,d,r.current,a)},o.createFactory=function(e){var t=o.createElement.bind(null,e);return t.type=e,t},o.cloneAndReplaceKey=function(e,t){var n=o(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},o.cloneElement=function(e,t,n){var a,l=i({},e.props),u=e.key,c=e.ref,d=e._self,h=e._source,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=r.current),void 0!==t.key&&(u=""+t.key);var f;e.type&&e.type.defaultProps&&(f=e.type.defaultProps);for(a in t)t.hasOwnProperty(a)&&!s.hasOwnProperty(a)&&(void 0===t[a]&&void 0!==f?l[a]=f[a]:l[a]=t[a]);
}var m=arguments.length-2;if(1===m)l.children=n;else if(m>1){for(var v=Array(m),g=0;g<m;g++)v[g]=arguments[g+2];l.children=v}return o(e.type,u,c,d,h,p,l)},o.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},e.exports=o},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(53),l=i(o),u=n(59),c=r(u),d=n(77),h=i(d),p=n(168),f=i(p),m=n(18),v=i(m),g=n(64),y=i(g),b=n(20),w=i(b),S=n(167),P=i(S),x=w.default.extend({
mixins:[f.default],name:"MetadataListModel",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:c.METADATA_LIST,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0],t=e.listIdentifier;if(!t){var n=e.containerKey||e.key,i=n&&n.match(/([^\?]+)/);i&&(t=i[1])}return(0,h.default)(this.entityType,t,this.server.entityID());
},idAttribute:"containerKey",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey")||this.get("key"))},sessionAttrs:{isMetadataList:v.default.boolean,listIdentifier:v.default.string,containerKey:v.default.string,containerTitle:v.default.string,currentPageStart:v.default.integer,currentPageSize:v.default.integer,populatedRange:v.default.object,isPending:v.default.boolean,isPopulated:v.default.boolean,error:v.default.object},syncedAttrs:{key:v.default.string,
totalSize:v.default.integer,viewGroup:v.default.string,title:v.default.string,thumb:v.default.string,art:v.default.string,banner:v.default.string,theme:v.default.string,allowSync:v.default.boolean},syncedRelations:{metadataItems:{relationClass:P.default,rootPropertyName:"Metadata",options:function(e){return{containerKey:e.containerKey||e.key}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},derivedAttrs:{firstItemType:function(){var e=this.getCollection().first();return e?e.get("type"):this.attributes.firstItemType;
},isFirstItemLibraryItem:function(){var e=this.getCollection().first();return e?e.get("isLibraryItem"):this.attributes.isFirstItemLibraryItem}},defaults:function(){return{isMetadataList:!0,populatedRange:{start:0,end:0,size:0},isPending:!0,isPopulated:!1,error:null}},initialize:function(e){this._totalSizeAdjustment=0,this.startPopulatedRangeMonitor(),this.on("change:key change:containerKey",this.onContainerKeyChange,this)},uninitialize:function(){this.off("change:key change:containerKey",this.onContainerKeyChange,this),
this.stopListening()},augmentResponseText:function(e,t){return t===y.default.xml?l.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var i=e[t];void 0!==i&&n.setContext(t,i)});var i=l.default.parseArray(e.Metadata),r=l.default.parseInteger(e.totalSize);return this.allowAllLeaves||(e.Metadata=s.default.reject(i,function(e){var t=/\/allLeaves$/.test(e.key);return t&&(this._totalSizeAdjustment-=1),t},this)),r&&this._totalSizeAdjustment&&(e.totalSize=r-this._totalSizeAdjustment),
e},onContainerKeyChange:function(e,t){var n=this.get("metadataItems"),i=this.syncedRelations.metadataItems.options(this.attributes);s.default.each(i,function(e,t){n.setContext(t,e)})}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(38),o=i(s),l=n(18),u=i(l),c=n(387),d=i(c),h=n(788),p=i(h),f=d.default.extend({name:"UserStorageModel",storageKey:"users",sessionAttrs:{activeUserID:u.default.integer
},syncedRelations:{users:{relationClass:p.default}},initialize:function(){this.debouncedSave=a.default.debounce(function(){(0,o.default)(!arguments.length,"Set attributes before using `debouncedSave` so the model is immediately updated. Otherwise, race conditions may occur."),this.save()},2e3)},getActiveUser:function(){var e=this.get("users"),t=this.get("activeUserID");if(t)return e.get(t)},clearActiveUser:function(){var e=this.getActiveUser();return e&&e.clearSensitiveAttributes(),this.unset("activeUserID"),
this.save()},getActiveServers:function(){var e=this.getActiveUser();if(e)return e.get("servers")}});t.default=new f,e.exports=t.default},,,function(e,t,n){"use strict";function i(){E.ReactReconcileTransaction&&S?void 0:v(!1)}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=E.ReactReconcileTransaction.getPooled(!0)}function a(e,t,n,r,a,s){i(),S.batchedUpdates(e,t,n,r,a,s)}function s(e,t){return e._mountOrder-t._mountOrder;
}function o(e){var t=e.dirtyComponentsLength;t!==g.length?v(!1):void 0,g.sort(s),y++;for(var n=0;n<t;n++){var i=g[n],r=i._pendingCallbacks;i._pendingCallbacks=null;var a;if(p.logTopLevelRenders){var o=i;i._currentElement.props===i._renderedComponent._currentElement&&(o=i._renderedComponent),a="React update: "+o.getName(),console.time(a)}if(f.performUpdateIfNecessary(i,e.reconcileTransaction,y),a&&console.timeEnd(a),r)for(var l=0;l<r.length;l++)e.callbackQueue.enqueue(r[l],i.getPublicInstance())}}
function l(e){return i(),S.isBatchingUpdates?(g.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=y+1))):void S.batchedUpdates(l,e)}function u(e,t){S.isBatchingUpdates?void 0:v(!1),b.enqueue(e,t),w=!0}var c=n(51),d=n(598),h=n(122),p=n(609),f=(n(80),n(164)),m=n(255),v=n(32),g=[],y=0,b=d.getPooled(),w=!1,S=null,P={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),T()):g.length=0}},x={
initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},C=[P,x];c(r.prototype,m.Mixin,{getTransactionWrappers:function(){return C},destructor:function(){this.dirtyComponentsLength=null,d.release(this.callbackQueue),this.callbackQueue=null,E.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return m.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n);
}}),h.addPoolingTo(r);var T=function(){for(;g.length||w;){if(g.length){var e=r.getPooled();e.perform(o,null,e),r.release(e)}if(w){w=!1;var t=b;b=d.getPooled(),t.notifyAll(),d.release(t)}}},_={injectReconcileTransaction:function(e){e?void 0:v(!1),E.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:v(!1),"function"!=typeof e.batchedUpdates?v(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?v(!1):void 0,S=e}},E={ReactReconcileTransaction:null,batchedUpdates:a,enqueueUpdate:l,flushBatchedUpdates:T,
injection:_,asap:u};e.exports=E},function(e,t,n){"use strict";function i(e,t){var n=[];if(e){var i=s.default.first(e.Part);i&&i.Stream&&n.push.apply(n,s.default.where(i.Stream,t))}return n}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){var i=e.get("entities").get(t);if(i){var r=i.get(n);if(r)return r.get("model")}s.default.warn('An entity does not exist with the type "%s" and id "%s"',t,n);
}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(26),s=r(a);e.exports=t.default},function(e,t,n){"use strict";var i=n(19).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),s=i(a),o=n(47),l=r(o),u=l.default.extend({getUrl:function(e){if(e){var t=this.getPixelRatio();return s.join(e,{size:Math.round(this.width*t)})}return e}});t.default=u,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(10),n(6),n(39),n(45)],r=function(e,t,n,i,r){
"use strict";function a(e){return e.get("unviewedLeafCount")>0}function s(e){var t=e.get("viewCount"),n=e.get("viewOffset");return!(t&&!n)}function o(e){return!(!e||e.get("isFolder"))&&!i.get(e.get("type")).child}function l(e){return!a(e)}function u(e){return!s(e)}var c={movie:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDeleteVersions:!0,showDownload:!0,showEdit:!0,showFixMatch:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMatch:!0,showPlay:!0,showPlayVersion:!0,showPlayTrailer:!0,
showQueue:!0,showRefresh:!0,showSplitApart:!0,showSync:!0,showConvert:!0,showUnmatch:!0},show:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showFixMatch:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMatch:!0,showPlayAll:!0,showPlayUnwatched:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,showConvert:!0,showUnmatch:!0},season:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlayAll:!0,showPlayUnwatched:!0,showQueue:!0,
showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0},episode:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDeleteVersions:!0,showDownload:!0,showEdit:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showPlayVersion:!0,showQueue:!0,showRefresh:!0,showSync:!0,showConvert:!0},artist:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showFixMatch:!0,showMerge:!0,showMatch:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,
showUnmatch:!0},album:{showAddToPlaylist:!0,showEdit:!0,showDelete:!0,showFixMatch:!0,showMatch:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSplitApart:!0,showSync:!0,showUnmatch:!0},track:{showAddToPlaylist:!0,showAnalyze:!0,showDelete:!0,showDownload:!0,showEdit:!0,showInfo:!0,showPlayMix:!0,showPlayMusicVideo:!0,showQueue:!0,showSelect:!0,showSync:!0},photoAlbum:{showAddToPlaylist:!0,showEdit:!0,showPlay:!0,showQueue:!0,showShuffle:!0,showSync:!0},photo:{showAddToPlaylist:!0,
showAnalyze:!0,showDelete:!0,showDownload:!0,showEdit:!0,showInfo:!0,showSync:!0},clip:{showEdit:!0,showInfo:!0,showPlay:!0,showPlayVersion:!0,showShare:!0,showWatchLater:!0},userPlaylistItem:{showDeleteFromUserPlaylist:!0,showInfo:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showShare:!0,showSync:!0,showWatchLater:!0},playlist:{showDelete:!0,showEdit:!0,showPlay:!0,showQueue:!0,showShuffle:!0,showSync:!0},movieSection:{showAddToCollection:!0,showAddToPlaylist:!0,showAnalyze:!0,showEdit:!0,
showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},showSection:{showAddToCollection:!0,showAddToPlaylist:!0,showEdit:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},seasonSection:{showAddToPlaylist:!0,showEdit:!0,showMarkUnwatched:!0,showMarkWatched:!0,showMerge:!0,showPlay:!0,
showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},episodeSection:{showAddToPlaylist:!0,showAnalyze:!0,showMarkUnwatched:!0,showMarkWatched:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showConvert:!0,showDelete:!0},artistSection:{showAddToCollection:!0,showAddToPlaylist:!0,showEdit:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0},albumSection:{showAddToPlaylist:!0,
showEdit:!0,showMerge:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0},trackSection:{showAddToPlaylist:!0,showEdit:!0,showPlay:!0,showQueue:!0,showRefresh:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0},photoSection:{showAddToPlaylist:!0,showAnalyze:!0,showPlay:!0,showQueue:!0,showSelect:!0,showShuffle:!0,showSync:!0,showDelete:!0}},d={showListDropdown:["showShuffle","showQueue","showRefresh","showSync","showDownload","showWatchLater","showShare","showInfo"]
},h=r.extend({initialize:function(e,n){n||(n={});var i=t.resolve("appModel");this.item=n.item,this.playQueue=n.playQueue,this.parent=this.item||this.section,this.showAdvanced=n.showAdvanced,this.user=i.get("user"),this.signedIn=this.user.get("signedIn"),this.devices=this.user.get("devices"),this.setDefaults(n.type),this.listenToParent(),this.listenTo(this.user,{"change:signedIn":this.onSignedInChange,"change:providers.change":this.onUserProvidersChange}),this.listenTo(this.devices,"reset",this.onDevicesChange),
this.listenTo(this,{"change:selecting":this.onSelectingChange,"change:selectedItems":this.onSelectedItemsChange})},setDefaults:function(t){t&&t!==this.type&&(this.type=t,this.section&&(t+="Section"),this.defaults=e.clone(c[t]||{}),this.defaults.selecting=!1,this.defaults.selectedItems=[],this.clear().set(this.defaults))},setParent:function(e){this.parent&&this.stopListening(this.parent),this.server&&this.stopListening(this.server),this.item=e.item,this.section=e.section,this.parent=this.item||this.section,
this.listenToParent()},listenToParent:function(){if(this.section){var e=this.parent.get("currentType");e&&this.setDefaults(e.get("typeString")),this.listenTo(this.parent,{"change:currentType":this.onCurrentTypeChange,"change:allowSync":this.onAllowSyncChange})}else this.item&&(this.setDefaults(this.item.get("type")),this.listenTo(this.parent,{"change:primaryExtraKey":this.onPrimaryExtraChange,"change:unviewedLeafCount":this.onViewStateChange,"change:viewOffset":this.onViewStateChange,"change:viewCount":this.onViewStateChange
}),this.showAdvanced&&this.listenTo(this.parent,{"change:guid":this.onGuidChange,"change:Media":this.onMediaChange}));this.parent&&(this.server=this.parent.server,this.shared=this.server.get("shared"),this.synced=!this.server.get("isFullServer"),this.multiuser=this.server.get("multiuser"),this.playQueues=this.server.get("playQueueManager"),this.listenTo(this.server,"change:shared",this.onServerSharedChange)),this.updateAll()},updateAll:function(){this.updateSelectionStates(),this.updateAction("showPlay",this.canPlay),
this.updateAction("showPlayAll",this.canPlay),this.updateAction("showPlayUnwatched",this.canPlay),this.updateAction("showPlayVersion",this.canPlayVersion),this.updateAction("showPlayMix",this.canPlayMix),this.updateAction("showPlayTrailer",this.canPlayPrimaryExtra),this.updateAction("showPlayMusicVideo",this.canPlayPrimaryExtra),this.updateAction("showShuffle",this.canPlay,{shuffle:!0}),this.updateAction("showQueue",this.canQueue),this.updateAction("showEdit",this.canEdit),this.updateAction("showRefresh",this.canRefresh),
this.updateAction("showSync",this.canSync),this.updateAction("showConvert",this.canConvert),this.updateAction("showDownload",this.canDownload),this.updateAction("showAddToPlaylist",this.canAddToPlaylist),this.updateAction("showWatchLater",this.canWatchLater),this.updateAction("showShare",this.canShare),this.updateAction("showDelete",this.canDelete),this.updateAction("showDeleteVersions",this.canDeleteVersions),this.updateAction("showInfo",this.isMedia),this.updateAction("showMarkWatched",this.canMarkWatched),
this.updateAction("showMarkUnwatched",this.canMarkUnwatched),this.showAdvanced&&(this.updateAction("showSelect",this.canMultiSelect),this.updateAction("showAnalyze",this.canMultiAction),this.updateAction("showMerge",this.canMerge),this.updateAction("showAddToCollection",this.canMultiAction),this.updateAction("showMatch",this.canMatch),this.updateAction("showFixMatch",this.canFixMatch),this.updateAction("showUnmatch",this.canUnmatch),this.updateAction("showSplitApart",this.canSplitApart)),this.updateDropdown("showListDropdown");
},updateAction:function(e,t,n){var i=!!this.defaults&&this.defaults[e];this.set(e,t.call(this,i,n))},updateDropdown:function(t){var n=d[t],i=e.map(n,function(e){return this.get(e)},this);this.set(t,e.some(i))},updateSelectionStates:function(){var t=this.getActionTargets();if(t){var n=t[0].get("type"),i="show"===n||"season"===n,r=this.get("selectedItems"),o=!(!r||!r.length),c=e.some(r,function(e){return e.get("isFolder")}),d=!!e.some(t,i?a:s),h=!!e.some(t,i?l:u);this.set({selecting:o,hasSelectedFolder:c,
hasUnwatched:d,hasWatched:h})}},canPlay:function(e,t){return!!e&&(!(this.parent&&!this.playQueues.canCreateFor(this.parent,t))&&(!this.item||!this.item.get("isFolder")&&!this.item.get("hasInvalidKey")))},canQueue:function(e){return this.isMedia(e)&&this.canPlay(e)},canPlayVersion:function(e,t){return!(!e||!this.item)&&this.item.get("Media").length>1},canPlayMix:function(e){if(!e||!this.item)return!1;var t=this.item.get("related");return!(!t||!t.findWhere({browse:!1}))},canPlayPrimaryExtra:function(e){
return!(!e||!this.item)&&!!this.item.get("primaryExtraKey")},canAddToPlaylist:function(t){if(!t||!this.server)return!1;if(this.playQueue&&this.playQueue.get("isRadio"))return!1;var n,i=this.server.supports("playlists"),r=this.parent&&this.parent.get("currentSubset");if(r){var a=this.get("selectedItems"),s=e.some(a,function(e){return e.get("isFolder")});n=("all"===r.id||a&&a.length>0)&&!s}else n=this.item&&this.item.get("isLibraryItem");return i&&n},canRefresh:function(t){if(!t||this.synced)return!1;
var n=this.getActionTargets(),i=e.every(n,function(e){var t=this.shared&&e.get("isPlaylist"),n=e.get("isSection"),i=!this.shared&&(n||e.get("isLibraryItem")&&!e.get("isFolder"));return t||i},this);return i},canDownload:function(e){return(!this.playQueue||!this.playQueue.get("isRadio"))&&this.canRefresh(e)},canEdit:function(e){if(!e||!this.canRefresh(e))return!1;var t=this.getActionTargets();return!(t&&t.length>1&&!t[0].server.supports("batchEdit"))},canMultiSelect:function(e){return!!e&&(!this.shared||this.multiuser);
},canMultiAction:function(e){return!!e&&(this.item?this.canEdit(e):!this.shared&&!this.synced&&this.section)},canMarkWatched:function(e){if(!e)return!1;if(!this.item&&!this.section)return!1;if(!this.canMultiSelect(e)&&!o(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;var n=t[0];return!n.get("isSection")&&!n.get("isFolder")&&this.get("hasUnwatched")},canMarkUnwatched:function(e){if(!e)return!1;if(!this.canMultiSelect(e)&&!o(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;
var n=t[0];return!n.get("isSection")&&!n.get("isFolder")&&this.get("hasWatched")},canMatch:function(e){return this.canEdit(e)&&!this.canUnmatch(e)},canFixMatch:function(e){return this.canEdit(e)&&this.canUnmatch(e)},canUnmatch:function(e){if(!e||!this.item||this.shared||this.synced)return!1;var t=this.item.get("guid");return!(!t||/(local|none)\:\/\//.test(t))},canSplitApart:function(t){if(!t||!this.item||this.shared||this.synced)return!1;var n;if("movie"===this.type){var i=this.item.get("Media");n=e.filter(i,function(e){
return!e.proxyType})}else n=this.item.get("Location");return n.length>1&&this.server.supports("splitApart")},canMerge:function(e){if(!e)return!1;if(!this.canEdit(e))return!1;if(!this.server.supports("merge"))return!1;var t=this.get("selectedItems");return!(!t||t.length<2)},canSync:function(e){if(!e||!this.parent||this.synced)return!1;var t=this.devices.filterSyncDevices(this.item);if(!t.length)return!1;var n=this.shared?"sharedSync":"sync",i=this.server.supports(n);if(!i||this.parent.get("isFolder"))return!1;
var r;if(this.shared){var a=this.section||this.item.section;r=a&&a.get("allowSync")}else r=this.parent.get("allowSync")||this.parent.collection&&this.parent.collection.allowSync;return!!r},canConvert:function(e){if(!e||!this.parent||this.shared||this.synced)return!1;var t=this.server.supports("streamReady"),n=this.server.get("transcoderVideo");return!(!t||!n||this.parent.get("isFolder"))},canWatchLater:function(e){if(!e||!this.item)return!1;var t="video"===i.getChildMediaType(this.type).element,n=!!this.item.get("url"),r=!this.item.userPlaylistKey||"queue"!==this.item.userPlaylistKey;
return this.signedIn&&this.user.get("queueUid")&&t&&n&&r},canShare:function(e){if(e){var t=this.item&&this.item.isLibraryItem();return!t&&this.signedIn&&!this.user.get("restricted")}},canDelete:function(t){if(!t)return!1;if(this.item&&!this.item.get("isSection"))return this.canDeleteSingleItem(this.item);if(!this.canMultiSelect(t))return!1;var n=this.getActionTargets();return!!n&&e.every(n,this.canDeleteSingleItem,this)},canDeleteSingleItem:function(e){if(!e||this.synced||e.get("isSection"))return!1;
if(!o(e)&&!e.server.supports("compositeDelete"))return!1;var t=!(!e.get("isLibraryItem")||!this.server.get("allowMediaDeletion")||this.shared),n=e.get("playlistType");return t||n},canDeleteVersions:function(t){if(!t||!this.item||this.shared||this.synced)return!1;if(!this.server.get("allowMediaDeletion"))return!1;var n=this.item.get("Media"),i=e.filter(n,function(e){return!!e.proxyType});return!!i.length},isMedia:function(e){if(!e)return!1;if(this.playQueue&&this.playQueue.get("isRadio"))return!1;if(!this.item)return!0;
var t="photo"===this.type&&!this.item.get("isLibraryItem");return!t&&!this.item.get("isFolder")},shouldStartTrackingSelecting:function(e){var t=this.canMultiSelect(this.get("showSelect")),n=e.metaKey||e.ctrlKey||e.shiftKey;return t&&(n||this.get("selecting"))},selectItems:function(t,n){if(0!==t.length){var i=this.get("selectedItems"),r=e.bind(this.updateAll,this),a=e.filter(t,function(t){return!e.contains(i,t)});e.each(a,function(e){e.selected=!0,i.push(e),this.listenTo(e,{"change:viewCount":r,"change:viewOffset":r,
"change:unviewedLeafCount":r,"change:viewedLeafCount":r})},this);var s=this.sortSelectedItems(i,n);this.set("selectedItems",s),this.trigger("change:selectedItems",this,s)}},sortSelectedItems:function(t,n){var i=n&&n.superset;return i?e.sortBy(t,function(e){return i.indexOf(e)}):e.clone(t)},deselectItems:function(t,n){if(0!==t.length){var i=this.get("selectedItems");e.each(t,function(t){var n=e.indexOf(i,t);n!==-1&&(t.selected=!1,i.splice(n,1),this.stopListening(t))},this),i.length||this.set("selecting",!1),
this.trigger("change:selectedItems",this,i)}},selectItem:function(e,t){this.selectItems([e],t)},deselectItem:function(e,t){this.deselectItems([e],t)},deselectAll:function(){var t=this.get("selectedItems");t&&0!==t.length&&(e.each(t,function(e){e.selected=!1}),t.length=0,this.trigger("change:selectedItems",this,t))},getActionTargets:function(){var e=this.get("selectedItems");return e&&e.length>0?e:this.parent?[this.parent]:void 0},getActionTargetsTitle:function(){var e=this.getActionTargets();if(1===e.length){
var t=e[0];return t.get("isSection")?t.getSyncTitle():t.get("title")}return 2===e.length?n("{1} and {2}",e[0].get("title"),e[1].get("title")):3===e.length?n("{1}, {2}, and {3}",e[0].get("title"),e[1].get("title"),e[2].get("title")):n("{1}, {2}, and {3} others",e[0].get("title"),e[1].get("title"),e.length-2)},onSignedInChange:function(e,t){this.signedIn=t,this.updateAction("showWatchLater",this.canWatchLater),this.updateAction("showShare",this.canShare),this.updateDropdown("showListDropdown")},onCurrentTypeChange:function(e,t){
this.deselectAll(),this.setDefaults(t.get("typeString")),this.updateAll()},onAllowSyncChange:function(){this.updateAction("showSync",this.canSync)},onPrimaryExtraChange:function(){this.updateAction("showPlayTrailer",this.canPlayPrimaryExtra),this.updateAction("showPlayMusicVideo",this.canPlayPrimaryExtra)},onViewStateChange:function(){this.updateSelectionStates(),this.updateAction("showMarkWatched",this.canMarkWatched),this.updateAction("showMarkUnwatched",this.canMarkUnwatched)},onGuidChange:function(){
this.updateAction("showUnmatch",this.canUnmatch),this.updateAction("showMatch",this.canMatch),this.updateAction("showFixMatch",this.canFixMatch)},onMediaChange:function(){this.updateAction("showDeleteVersions",this.canDeleteVersions)},onServerSharedChange:function(e,t){this.shared=t,this.updateAll()},onDevicesChange:function(){this.updateAction("showSync",this.canSync)},onSelectingChange:function(e,t){t||this.deselectAll()},onSelectedItemsChange:function(e,t){this.updateAll()}});return h}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1769),n(5),n(3),n(9),n(6),n(8),n(108),n(143),n(144),n(130),n(221),n(31),n(13),n(481),n(95),n(1191),n(113),n(187),n(116)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y){"use strict";var b=i.Layout.extend({mixins:[p],tagName:"li",className:"striped-list-item media-list-item",template:e,visible:!1,ui:{container:".media-list-inner-item",actions:".media-actions",dropdown:".media-actions-dropdown"},regions:{rating:".media-rating",progress:".media-progress"
},events:{"mouseenter > a":"onMouseEnter","mouseleave > a":"onMouseLeave","mousedown > a":"onMouseDown","click > a":"onClick","click .play-btn":"onPlayClick","click .play-unwatched-btn":"onPlayUnwatchedClick","click .edit-btn":"onEditClick","click .more-btn":"onMoreClick","click .media-title-link":"onTitleClick","hide.bs.dropdown .media-actions-dropdown":"onDropdownHide"},onlyAfterRender:["select","deselect"],initialize:function(e){n.bindAll(this,"onResize"),this.skipFirstRender=e.skipFirstRender,
this.continuousPlay=e.continuousPlay;var t;this.model&&(t=this.model.get("type")),t||(t=e.type),this.type=t,this.isPhotoSection=this.model&&this.model.section&&"photo"===this.model.section.get("type"),"clip"===this.type&&this.isPhotoSection&&(this.type="photo"),this.sort=e.sort,this.$el.addClass(this.type),this.sort&&/^(?:addedAt|originallyAvailableAt|rating|mediaHeight|duration)$/.test(this.sort)&&this.$el.addClass("show-sort"),this.parentMediaActions=e.mediaActions;var i=this.model&&this.model.server||this.parentMediaActions&&this.parentMediaActions.server;
this.mediaActions=new f({},{item:this.model,type:t,server:i}),this.listenTo(this.mediaActions,{"change:showPlay":this.onActionsChange,"change:showEdit":this.onActionsChange,"change:showListDropdown":this.onActionsChange}),a.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),this.multiuser=this.model.server.get("multiuser");var e=this.model.toJSON(),t="#!/server/"+encodeURIComponent(this.model.server.id);
if(e.isFolder)t+="/section/"+encodeURIComponent(this.model.section.id)+"/folder/"+encodeURIComponent(e.key);else if(e.isChannelItem){var n=this.model.channel,i=n.id?n.id:n.get("identifier");t+="/channel/"+encodeURIComponent(i),t+="clip"===e.type?"/details/"+encodeURIComponent(e.key):"/"+encodeURIComponent(e.key)}else"userPlaylistItem"===e.type?t="#!/playlist/"+this.model.userPlaylistKey+"/details/"+e.id:t+="/details/"+encodeURIComponent(e.key);return{item:e,url:t,selected:this.model.selected,showActions:this.showActions(),
sort:this.sort}},render:function(){return this.model?this.skipFirstRender?(this.skipFirstRender=!1,this):(this.visible=!0,void i.Layout.prototype.render.apply(this,arguments)):this},show:function(){this.model&&!this.visible&&(this.image&&this.image.setModel(this.model),this.mediaActions&&this.mediaActions.setParent({item:this.model}),this.visible=!0,this.render())},hide:function(){this.model&&this.visible&&(this.image&&this.image.cancel(),this.visible=!1,this.stopListening(this.model),this.$el.empty());
},select:function(){this.ui.container.addClass("selected")},deselect:function(){this.ui.container.removeClass("selected")},getPosterUrl:function(e){return"show"===this.type?this.model.get("grandparentThumb")||this.model.get("parentThumb")||e:e||this.model.get("parentThumb")||this.model.get("grandparentThumb")},showActions:function(){return this.mediaActions&&(this.mediaActions.get("showPlay")||this.mediaActions.get("showEdit")||this.mediaActions.get("showListDropdown"))},canPlaySiblings:function(){
return!this.model.get("isExtra")&&(!/^\/search\/?/.test(this.model.get("containerKey"))&&/^(track|photo|clip|userPlaylistItem)$/.test(this.type))},bindings:{".play-btn":{model:"mediaActions",modelAttribute:"showPlay",manual:!0,autohide:!0},".play-unwatched-btn":{model:"mediaActions",modelAttribute:"showPlayUnwatched",manual:!0,autohide:!0},".edit-btn":{model:"mediaActions",modelAttribute:"showEdit",manual:!0,autohide:!0},".more-btn":{model:"mediaActions",modelAttribute:"showListDropdown",manual:!0,
autohide:!0},".unwatched-icon":{modelAttribute:"viewCount",modelListeners:["viewCount","viewOffset"],manual:!0,autohide:function(){if(!this.bypassShowUnwatchedIconsSetting&&!d.get("showUnwatchedIcons"))return!1;if(!/^(movie|episode|userPlaylistItem)$/.test(this.model.get("type")))return!1;if(this.model.get("isFolder"))return!1;if(this.shared&&!this.multiuser)return!1;var e=this.model.get("viewCount"),t=this.model.get("viewOffset");return!e||t},formatter:function(e,t){var n=this.model.get("viewOffset");
n&&t.toggleClass("unwatched-icon-partial",!0)}},".media-title":{modelAttribute:"title",modelListeners:["title","parentTitle","grandparentTitle"],isHtml:!0,formatter:function(e){var t=this.model.get("grandparentTitle")||this.model.get("parentTitle")||e,i=this.model.get("type");return/^(season|episode|album|track)$/.test(i)&&!this.model.get("isChannelItem")?'<span class="btn-metadata-link media-title-link">'+n.escape(t)+"</span>":n.escape(t)}},".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","parentTitle","grandparentTitle","year"],
autohide:!0,formatter:function(e){var t;if("userPlaylistItem"===this.model.get("type"))this.model.get("recommender")&&(t=r("from {1}",this.model.get("recommender")));else{var n=this.model.get("grandparentTitle")||this.model.get("parentTitle");t=n?this.model.get("title"):e}return this.$el.toggleClass("show-subtitle",!!t),t}},".media-subtitle-2":{modelAttribute:"index",modelListeners:["index","message"],autohide:!0,formatter:function(e){var t=this.model.get("type");return"userPlaylistItem"===t?this.model.get("message"):"episode"===t?s({
seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "}):void 0}},".media-context":{modelAttribute:"sourceTitle",manual:!0,formatter:function(e,t){var n=!!this.model.get("librarySectionID"),i=n?this.model.server.get("friendlyName"):e;t.toggleClass("multiserver-only",n),t.text(i)}},".media-added-at":{modelAttribute:"addedAt",autohide:!0,formatter:function(e){return u(e)}},".media-available-at":{modelAttribute:"originallyAvailableAt",
autohide:!0,formatter:function(e){return o(e)}},".media-resolution":{modelAttribute:"Media",autohide:!0,formatter:function(e){return e&&e.length?c(e[0].videoResolution):""}},".media-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return l(e)}},".video-badge":{modelAttribute:"type",manual:!0,autohide:function(e){return"clip"===e&&this.isPhotoSection}}},onRender:function(){this.image&&this.image.setElement(this.ui.poster),("rating"===this.sort||this.showRating)&&this.rating.show(new v({
model:this.model,disabled:!0})),this.progress&&this.progress.show(new m({model:this.model}))},onClose:function(){this.image&&this.image.close(),this.dropdown&&this.dropdown.close(),a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e,this.mediaActions&&this.mediaActions.stopListening()},onActionsChange:function(e){if(this.isRendered){var t=!this.showActions();this.ui.container.toggleClass("hide-actions",t),this.ui.actions.toggleClass("hidden",t)}},onClick:function(e){
this.stopTrackingSelecting(e,function(){var t=this.model.get("type"),n=/^(track|photo)$/;if(this.isPhotoSection&&(n=/^(track|photo|clip)$/),n.test(t)){e.preventDefault();var i={item:this.model,siblings:this.canPlaySiblings()};"photo"===t&&(i.autoplay=!1),h.execute("playMedia",i)}})},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),h.execute("playMedia",{item:this.model,continuous:this.continuousPlay,siblings:this.canPlaySiblings()})},onPlayUnwatchedClick:function(e){e.preventDefault(),
e.stopImmediatePropagation(),h.execute("playMedia",{item:this.model,unwatched:!0,siblings:this.canPlaySiblings()})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var i=t(e.currentTarget),r=i.hasClass("btn-loading")?i:this.$el;if(!r.hasClass("active")){r.addClass("active");var s=this.model.fetch();s.done(n.bind(function(){a.trigger("show:modal",new y({mediaActions:this.mediaActions}))},this)),s.always(n.bind(function(){r.removeClass("active")},this))}},onMoreClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),t(".media-actions-dropdown").trigger("hide.bs.dropdown"),this.dropdown=new g({model:this.model,mediaActions:this.mediaActions}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover on-top");var n=t(e.currentTarget),i=this.ui.actions.position().top,r=this.dropdown.getPosition(n,this.containerSize,i);this.ui.dropdown.css(r)},onTitleClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),
a.trigger("navigate","details",{serverID:this.model.server.id,key:this.model.get("grandparentKey")||this.model.get("parentKey")})},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover on-top"))}});return b}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(44)],r=function(e,t,n){"use strict";var i=n.extend({className:"select-modal modal modal-sm fade",events:e.extend({"click a":"onClick"},n.prototype.events),
initialize:function(){n.prototype.initialize.apply(this,arguments),this.promise=t.Deferred()},onRender:function(){n.prototype.onRender.apply(this,arguments)},onHide:function(e){n.prototype.onHide.apply(this,arguments),this.promise.reject()},onClick:function(e){e.preventDefault(),this.promise.resolve(t(e.currentTarget).data("value")),this.hide()}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={LIBRARY:"library",
CONTINUE_WATCHING:"continueWatching",PRE_PLAY:"prePlay",SEARCH_ALL_SERVERS:"searchAllServers",SEARCH:"search",QUICK_SEARCH:"quickSearch"};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(246),r=i({bubbled:null,captured:null}),a=i({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,
topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,
topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),s={topLevelTypes:a,PropagationPhases:r};e.exports=s},function(e,t,n){"use strict";function i(e,t,n,i){
this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var a in r)if(r.hasOwnProperty(a)){var o=r[a];o?this[a]=o(n):"target"===a?this.target=i:this[a]=n[a]}var l=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return l?this.isDefaultPrevented=s.thatReturnsTrue:this.isDefaultPrevented=s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}var r=n(51),a=n(122),s=n(79),o=(n(42),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),l={
type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};r(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=s.thatReturnsTrue);
},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<o.length;n++)this[o[n]]=null}}),i.Interface=l,i.augmentClass=function(e,t){var n=this,i=function(){};i.prototype=n.prototype;var s=new i;r(s,e.prototype),e.prototype=s,e.prototype.constructor=e,e.Interface=r({},n.Interface,t),e.augmentClass=n.augmentClass,a.addPoolingTo(e,a.fourArgumentPooler)},a.addPoolingTo(i,a.fourArgumentPooler),
e.exports=i},function(e,t,n){var i,r;i=[n(3),n(449),n(446),n(143),n(144),n(862)],r=function(e,t,n,i,r,a){"use strict";var s={tagsRenderer:a,tagsRendererOptions:{},defaultBindings:{".item-title":{modelAttribute:"title"},".item-year":{modelAttribute:"year"},".item-progress":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,n){var i=this.model.get("duration"),r=t(e,i);r&&n.css("width",r+"%"),n.parent().toggleClass("hidden",!r)}},".item-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){
return e?r(e):0}},".item-unwatched-label":{modelAttribute:"viewCount",modelListeners:["viewCount","viewOffset"],manual:!0,autohide:function(e){if(this.shared&&!this.multiuser)return!1;var t=this.model.get("viewOffset");return!e&&!t}},".item-unavailable-btn":{modelAttribute:"Media",manual:!0,autohide:function(e){var t=n(e);return!!t.length}},".item-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return i(e)}},".item-tagline":{modelAttribute:"tagline",autohide:!0
},".item-genre":{modelAttribute:"Genre",autohide:!0,isHtml:!0,formatter:function(t){if(!t||!t.length)return"";var n=this.tagsRenderer(e.extend({},this.tagsRendererOptions,{model:this.model,key:"genre",tags:t,maxLen:50,maxTags:2}));return n}},".item-director":{modelAttribute:"Director",manual:!0,autohide:!0,formatter:function(t,n){if(!t||!t.length)return"";var i=this.tagsRenderer(e.extend({},this.tagsRendererOptions,{model:this.model,key:"director",tags:t,maxLen:50,maxTags:3}));return n.find(".metadata-tag-list").html(i),
i}},".item-writer":{modelAttribute:"Writer",manual:!0,autohide:!0,formatter:function(t,n){if(!t||!t.length)return"";var i=this.tagsRenderer(e.extend({},this.tagsRendererOptions,{model:this.model,key:"writer",tags:t,maxLen:50,maxTags:3}));return n.find(".metadata-tag-list").html(i),i}},".item-cast":{modelAttribute:"Role",manual:!0,autohide:!0,formatter:function(t,n){if(!t||!t.length)return"";var i=this.tagsRenderer(e.extend({},this.tagsRendererOptions,{model:this.model,key:"actor",tags:t,maxLen:50,
maxTags:5}));return n.find(".metadata-tag-list").html(i),i}},".item-summary":{modelAttribute:"summary",autohide:!0},".item-content-rating":{modelAttribute:"contentRating",autohide:!0},".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e.length},autohide:function(e){return e>1}},".details-unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&!!e}},".content-rating-flag-container":{modelAttribute:"contentRating",
manual:!0,autohide:!0},".studio-flag-container":{modelAttribute:"studio",manual:!0,autohide:!0}}};return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(38),o=i(s),l=n(302),u=i(l),c=n(18),d=i(c),h=n(20),p=i(h),f=n(748),m=i(f),v={UNTESTED:"untested",PENDING:"pending",CONNECTED:"connected",UNAUTHORIZED:"unauthorized",UNAVAILABLE:"unavailable",ABORTED:"aborted"},g=d.default.boolean.isRequired,y=p.default.extend({
name:"ConnectionModel",context:["server"],idAttribute:"uri",sessionAttrs:{currentTest:d.default.custom(function(e){return a.default.isFunction(e.abort)}),testState:d.default.oneOf(v.UNTESTED,v.PENDING,v.CONNECTED,v.UNAUTHORIZED,v.UNAVAILABLE,v.ABORTED).isRequired,isBundled:g,isFallback:g,isRelayed:g,currentReachabilityTest:d.default.custom(function(e){return a.default.isFunction(e.abort)}),isPossiblyCrossNetworkProtected:d.default.boolean.isRequired},sessionRelations:{sources:{relationClass:m.default
}},syncedAttrs:{uri:d.default.string,scheme:d.default.string,address:d.default.string,port:d.default.string},derivedAttrs:{isUntested:function(){return this.get("testState")===v.UNTESTED},isPending:function(){return this.get("testState")===v.PENDING},isConnected:function(){return this.get("testState")===v.CONNECTED},isUnauthorized:function(){return this.get("testState")===v.UNAUTHORIZED},isUnavailable:function(){return this.get("testState")===v.UNAVAILABLE},isFailed:function(){return this.get("isUnauthorized")||this.get("isUnavailable");
},isAborted:function(){return this.get("testState")===v.ABORTED},isLoopback:function(){var e=this.get("address");return"localhost"===e||u.default.isLoopbackAddress(e)},isPrivate:function(){return this.get("isLoopback")||u.default.isPrivateAddress(this.get("address"))},isHttps:function(){return"https"===this.get("scheme")},isSecure:function(){return this.get("isLoopback")||this.get("isHttps")},isPlexDirect:function(){return/\.plex\.direct:/.test(this.get("uri"))}},defaults:{testState:v.UNTESTED,isBundled:!1,
isFallback:!1,isRelayed:!1,isPossiblyCrossNetworkProtected:!1},url:function(){return this.get("uri")},constructor:function(e,t){var n=a.default.clone(e);a.default.isObject(e)&&!e.uri&&((0,o.default)(e.scheme&&e.address,"A server connection requires either a uri or a scheme and address. "+e.scheme+"://"+e.address),n.uri=e.scheme+"://"+e.address,e.port&&(n.uri+=":"+e.port)),p.default.prototype.constructor.call(this,n,t)},initialize:function(){this.listenTo(this.get("sources"),"remove reset",this.onSourcesChange);
},augmentResponse:function(e){var t=e.protocol;return t?a.default.extend({},e,{scheme:t}):e},getAddressFromUri:function(){var e=document.createElement("a");return e.href=this.get("uri"),e.hostname},getIpAddressFromPlexDirectAddress:function(){var e=this.get("address");if(/\.plex\.direct$/.test(e)){var t=e.indexOf(".");t>0&&(e=e.substring(0,t),e=e.replace(/\-/g,"."))}return e},getLoopbackAttributes:function(){var e={scheme:"http",address:"127.0.0.1",port:this.get("port")};return e},hasSource:function(e){
return this.get("sources").some(function(t){return e&&t.get("id")===e})},onSourcesChange:function(){this.get("sources").length||this.trigger("destroy",this,this.collection)}},{testStates:v});t.default=y,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={defaultSections:"0.9.17.3",ownerFeatures:"0.9.17.0",replaceTranscodeTarget:"0.9.17.0",quickSearch:"0.9.16.0",claimServer:"0.9.14.2",searchSpecificType:"0.9.14.2",linkedYearMetadata:"0.9.14.0",musicViewOffset:"0.9.14.0",
streamReady:"0.9.14.0",syncOriginalQuality:"0.9.14.0",allPartsStreamSelection:"0.9.12.5",sharedChannels:"0.9.12.5",shortenTranscodeURL:"0.9.12.5",companionProxy:"0.9.12.5",editSimilarArtists:"0.9.12.2",neuterRedirect:"0.9.12.0",audioAsVideo:"0.9.12.0",compositeDelete:"0.9.12.0",batchEdit:"0.9.12.0",premiumMusic:"0.9.12.0",transientToken:"0.9.12.0",softSubtitles:"0.9.12.0",sharedSyncStatus:"0.9.11.14",reachability:"0.9.11.14",photoPlayQueues:"0.9.11.12",publicNowPlaying:"0.9.11.3",labels:"0.9.11.2",
updater:"0.9.11.1",playItemsBatchAdd:"0.9.9.16",playlists:"0.9.9.13",imageFilters:"0.9.9.13",hubFilterSigns:"0.9.9.12",cancelAllUpdates:"0.9.9.10",playQueues:"0.9.9.6",sectionSettings:"0.9.9.6",hubFilters:"0.9.9.2",streamingMKV:"0.9.9.16",chunkedHTTP:"0.9.9.3",sharedSync:"0.9.9.3",dash:"0.9.8.6",specificMediaDeletion:"0.9.7.23",sharedSettings:"0.9.7.23",syncNotifications:"0.9.7.23",universalMusicTranscoder:"0.9.8.3",universalTranscoder:"0.9.7.17",sync:"0.9.7.10",artworkUpload:"0.9.7.9",firstRunPref:"0.9.7.3",
timelineState:"0.9.7.2",cleanBundles:"0.9.7.0",advancedFilters:"0.9.7.0",search:"0.9.7.0",merge:"0.9.7.0",splitApart:"0.9.7.0"};t.default=n,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(9),n(10),n(8),n(111),n(55),n(391),n(126),n(210)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u,c=!1,d=n.Controller.extend({populateView:function(e){e||(e={}),e.showLoading!==!1&&r.trigger("show:loading",{navigating:!0}),this.abortPendingPopulate();var n={options:e},i=t.Deferred().resolve(n).promise(),a=this.populateUser(i,n);
return a=this.populateServer(a,e.serverID,n),e.primaryServer&&(a=this.populatePrimaryServer(a,n)),e.sectionID&&(a=this.populateSection(e,a,n)),e.key&&(a=this.populateMetadata(e,a,n)),e.channelID&&(a=this.populateChannel(e,a,n)),e.channelKey&&(a=this.populateChannelMetadata(e,a,n)),a=a.then(function(){return t.Deferred().resolve(n).promise()},function(e){return c?c=!1:r.trigger("navigate","unauthorized",{result:n,silent:!0}),t.Deferred().reject(n).promise()}),u=a,a},abortPendingPopulate:function(){
u&&"pending"===u.state()&&(c=!0),a.abortAll("page")},populateUser:function(e,n){var r=i.resolve("appModel"),a=r.get("user"),s=function(){var e=a.get("isLocked"),i=t.Deferred();return e?i.reject(n):i.resolve(n),i.promise()},o=a.get("lockState")===l.lockStates.PENDING?a.server.populate():t.Deferred().resolve().promise();return e=o.then(s,s)},populateServer:function(e,n,a){var s=i.resolve("appModel");return e=e.then(function(){var e=s.get("servers"),i=void 0;if(!n)return e.populateAnyServer();if(/^transient/.test(n)){
var o=s.get("transientServer");if(!o||o.id!==n)return r.trigger("navigate:refresh:dashboard"),t.Deferred().reject().promise();i=t.Deferred().resolve(o).promise()}else i=e.populateServer(n);return i.done(function(e){a.server=e}),i.fail(function(){a.server=e.get(n)}),i})},populatePrimaryServer:function(e,n){var r=i.resolve("appModel");return e=e.then(function(){function e(t,s){s||(r.off("change:isWaitingForPrimaryServer",e),a=r.get("primaryServer"),a?(n.server=a,a.populate().done(i.resolve).fail(i.reject)):i.reject());
}var i=t.Deferred(),a=r.get("primaryServer");return a?(n.server=a,i.resolve().promise()):r.get("isWaitingForPrimaryServer")?(r.on("change:isWaitingForPrimaryServer",e),i.promise()):i.reject().promise()})},populateSection:function(e,n,i){return n=n.then(function(){return i.server.get("sections").populate()}),n=n.then(function(n){var r=i.item,a=e.sectionID;if(r&&(a=r.get("librarySectionID"),!a||!i.server.get("isFullServer")))return t.Deferred().resolve();var s=n.get(a);return s?(i.section=s,r&&r.setContext("section",s),
t.Deferred().resolve(s)):t.Deferred().reject()})},populateMetadata:function(t,n,i){return n=n.then(function(){var n=new s({key:t.key},{server:i.server,relatedOptions:t.relatedOptions});return i.item=n,n.fetch({scope:"page",data:e.extend({checkFiles:"1",includeExtras:"1",includeRelated:"1",includeRelatedCount:"0",includeOnDeck:"1",includeChapters:"1"},t.populateData)})}),n=this.populateSection(t,n,i)},populateChannel:function(e,t,n){return t=t.then(function(){var t=e.channelID,i={};/^\/\w+\//.test(t)?i.key=t:i.identifier=t;
var r=new o(i,{server:n.server});return n.channel=r,r.fetch({scope:"page"})})},populateChannelMetadata:function(e,t,n){return t=t.then(function(){var t=new o({key:e.channelKey},{server:n.server,channel:n.channel});return n.channelItem=t,t.fetch({scope:"page"})})}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(37),n(9),n(10),n(8),n(139)],r=function(e,t,n,i,r,a){"use strict";var s=n.AppRouter.extend({initialize:function(){this.uniqueRoutes=e.uniq(e.values(this.appRoutes)),
this.fragments=e.invert(this.appRoutes),this.listenTo(this,"route",this.onRoute),this.listenTo(r,"navigate",this.onNavigate)},resolveUrlFragment:function(t,n){var i=t.match(/:\w+/g);return i&&e.each(i,function(e){var i=e.slice(1),r=n[i];if(null==r){var a=new RegExp("\\([^\\)]*"+e+"[^\\)]*\\)","g");t=t.replace(a,"")}else t=t.replace(e,encodeURIComponent(r))}),t.replace(/\(|\)/g,"")},onRoute:function(n){var r=i.resolve("appModel"),s=r.get("history"),o=r.get("forwardHistory"),l=t.history.getFragment();
l===o[0]?s.push(o.shift()):l!==e.last(s)&&(s.push(l),o.splice(0)),a.trackView(n),r.trigger("change:history",r,s)},onNavigate:function(t,n){if(e.indexOf(this.uniqueRoutes,t)!==-1){n||(n={});var i=!1;if(null!=n.silent&&(i=n.silent,delete n.silent),null==n.trigger&&(n.trigger=!0),i)this.controller[t].apply(this.controller,e.values(n));else{var r=this.resolveUrlFragment(this.fragments[t],n);this.navigate(r,{trigger:n.trigger,replace:n.replace})}}}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
"use strict";function i(e){if(e<=0||!s.default.isNumber(e))return"0:00";var t=l.default.duration(e),n=t.seconds(),i=t.minutes(),r=t.hours()+24*t.days(),a="";return a=n<10?":0"+n:":"+n,a=i<10&&r>0?"0"+i+a:i+a,r>0&&(a=r+":"+a),a}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(65),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(455),a=i(r),s=n(67),o=i(s);t.default=(0,
o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.seasonPrefix||"S{1}",n=e.episodePrefix||"E{1}",i=e.seasonIndex,r=e.episodeIndex;if((r>0||0===r)&&i<1e3){e.noLeadingZero||(i=(0,c.default)(i),r=(0,c.default)(r));var a=e.separator||"";return(0,l.default)(t,i)+a+(0,l.default)(n,r)}return e.date?(0,s.default)(e.date).format("M/D/YY"):""}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a),o=n(6),l=r(o),u=n(291),c=r(u);t.default=i,
e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=s.default.Deferred();return e.always(function(){t.resolve.apply(t,arguments)}),t.promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a);t.default=i,e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),a=i(r),s=n(5),o=i(s),l=n(10),u=n(29),c=i(u),d=n(26),h=i(d),p=n(444),f=i(p),m=c.default.extend({initialize:function(){a.default.bindAll(this,"onAjaxSend","onAjaxComplete"),this.requests=[],this.byId={}},startListening:function(){var e=(0,o.default)(document);e.on("ajaxSend",this.onAjaxSend),e.on("ajaxComplete",this.onAjaxComplete)},stopListening:function(){var e=(0,o.default)(document);e.off("ajaxSend",this.onAjaxSend),e.off("ajaxComplete",this.onAjaxComplete)},abortAll:function(e){
for(var t=this.requests.length-1;t>-1;t--){var n=this.requests[t];null!=e&&e!==n.settings.scope||this.abort(n)}},abort:function(e){var t=a.default.isString(e)?this.byId[e]:e;t&&(t.xhr.aborting=!0,t.xhr.abort(),this.remove(t))},store:function(e,t){var n=a.default.uniqueId("r");e.rid=n;var i={xhr:e,settings:t};return this.requests.push(i),this.byId[n]=i,i},remove:function(e){var t=a.default.indexOf(this.requests,e);t>-1&&this.requests.splice(t,1),this.byId.hasOwnProperty(e.xhr.rid)&&delete this.byId[e.xhr.rid];
},onAjaxSend:function(e,t,n){var i=this;if(!n.skipCorsWithRedirect){var r=this.store(t,n);t.always(function(){t.aborting||i.remove(r)})}},onAjaxComplete:function(e,t,n){var i=(0,f.default)(t);if(!t.aborting&&i){var r=(0,l.resolve)("appModel").get("servers").find(function(e){var t=e.get("activeConnection"),i=t&&t.get("isConnected"),r=a.default.result(t,"url");return!!i&&0===n.url.indexOf(r)});r&&((0,h.default)('[Connections] Active connection to "%s" lost authorization',r.get("debugName")),r.trigger("error:connection",r));
}}});t.default=new m,e.exports=t.default},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=0,n=t.length;e<n;e++){var i=t[e];"function"==typeof i&&i.apply(void 0,arguments)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){var i,r;i=[n(1670),n(5),n(3),n(236),n(13)],r=function(e,t,n,i,r){"use strict";var a=i.extend({tagName:"span",className:"rating star-rating",template:e,
disabled:!0,modelEvents:{"change:rating":"onRatingChange","change:userRating":"onRatingChange"},events:n.extend({mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},i.prototype.events),initialize:function(e){i.prototype.initialize.apply(this,arguments);var t=this.model.server.get("shared")&&!this.model.server.get("multiuser");this.disabled=e.disabled||t,this.passive=e.passive,this.updateRating()},updateRating:function(){this.metadataRating=this.model.get("rating")||0,this.userRating=this.model.get("userRating"),
this.setValue(this.userRating>0?this.userRating:this.metadataRating)},normalizeRating:function(e){return Math.round(e/2)},serializeData:function(){var e=this.normalizeRating(this.currentValue);return{stars:[e>0,e>1,e>2,e>3,e>4]}},getValueForPosition:function(e){var t=this.$el,n=e-t.offset().left,i=n/t.width();return i=Math.min(Math.max(i,0),1),i=2*Math.ceil(5*i)},persistValue:function(){var e=this.currentValue||-1;r.execute("rate",{item:this.model,rating:e,passive:this.passive}),this.updateRating(),
this.render()},displayValue:function(e){this.$el.data("value",e);var n=this.normalizeRating(e),i=this.$(".star-icon");i.each(function(e){var i=n>e;t(this).toggleClass("star",i).toggleClass("dislikes",!i)}),this.$el.toggleClass("unrated",!e)},onRender:function(){i.prototype.onRender.apply(this,arguments),this.$el.toggleClass("unrated",!this.currentValue),this.$el.toggleClass("user-rating",this.userRating>0),this.$el.toggleClass("disabled",this.disabled)},onRatingChange:function(e,t){this.updateRating(),
this.render()},onMouseEnter:function(e){this.disabled||(this.$el.addClass("user-rating"),this.$el.removeClass("unrated"))},onMouseLeave:function(e){this.disabled||this.render()},onMouseMove:function(e){if(!this.disabled)if(this.dragging)this.updateForPosition(e.pageX);else{var t=this.getValueForPosition(e.pageX);this.displayValue(t)}},onDragComplete:function(){this.disabled||this.persistValue()}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(37),n(9),n(10),n(6),n(8),n(43),n(39),n(82),n(222),n(219),n(165),n(259),n(31),n(13),n(101),n(191)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v){"use strict";var g=n.Layout.extend({mixins:m,posterWidth:250,ui:{poster:".item-poster"},regions:{rating:".rating-container",summary:".summary-container",audio:".item-audio",subtitles:".item-subtitles",studio:".studio-flag-container",contentRating:".content-rating-flag-container",videoResolution:".video-audio-flags-container",audioCodec:".video-audio-flags-container",audioChannels:".video-audio-flags-container",poster:".details-poster-container",list:".details-list-region"
},events:{"click .details-poster-container > .play-btn":"onPlayClick","click .item-unavailable-btn":"onUnavailableClick"},initialize:function(n){e.bindAll(this,"onResize","onScroll");var r=i.resolve("appModel");this.mediaActions=n.mediaActions,this.children=this.model.get("children"),this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),this.multiuser=this.model.server.get("multiuser"),this.progress=new t.Model({loading:!1,failed:!1}),this.listenTo(r,"change:primaryPlayer",this.onPrimaryPlayerChange),
this.pageSize&&(a.trigger("content.subscribe:resize",this.onResize),a.trigger("content.subscribe:scroll",this.onScroll)),this.mirror()},serializeData:function(){var e=this.model.server.get("playQueueManager"),t=this.model.get("grandparentKey"),n=this.model.get("parentKey");return{serverID:this.model.server.id,grandparentKey:n?encodeURIComponent(t):null,parentKey:n?encodeURIComponent(n):null,canPlay:e.canCreateFor(this.model),limited:this.shared||this.synced}},mirror:function(){if(this.allowMirror){
var e;e=this.model.get("isPlaylist")?this.model.get("playlistType"):o.getChildMediaType(this.model.get("type")).element;var t=s.getTypeByElement(e),n=d.getInstance(t,{isPassive:!0});n&&n.mirror({item:this.model})}},populatePage:function(){this.progress.set("loading",!0);var t=this.children.populateRange({start:0,end:this.children.get("populatedRange").end+this.pageSize,scope:"page"});return t.always(e.bind(function(){this.progress.set("loading",!1)},this)),t},getPreferredMedia:function(){var e=i.resolve("appModel"),t=o.getChildMediaType(this.model.get("type")).element,n={
item:this.model,type:t,profile:h.prop(t),transcodeServer:u.resolveTranscodeServer({type:t,item:this.model,fallbackServer:e.get("primaryServer")}),allowDirectPlay:p.get("directPlay"),allowedAC3Containers:p.get("allowAC3")?"mp4":null,subtitlesBurnLevel:p.get("subtitlesBurnLevel")};return t===s.types.VIDEO&&(n.quality=l.getCurrentQuality(this.model,p.getInstance())),c.getMediaDecision(n).media},onRender:function(){if(this.children&&this.ListConstructor){var t;t=this.pageSize?this.populatePage():this.children.fetch({
scope:"page"}),t.fail(e.bind(function(){a.trigger("show:alert",{type:"error",message:r("There was a problem loading these items.")}),this.progress.set("failed",!0)},this)),this.list.append(new this.ListConstructor({model:this.model,mediaActions:this.mediaActions,listModel:this.children,collection:this.children.get("metadataItems"),itemViewOptions:this.listItemViewOptions}))}this.starRatingView&&this.rating.show(this.starRatingView),this.audioDropdown&&this.audio.append(this.audioDropdown),this.subtitlesDropdown&&this.subtitles.append(this.subtitlesDropdown),
this.posterImage&&this.posterImage.setElement(this.ui.poster),this.studioFlag&&this.studio.show(this.studioFlag),this.contentRatingFlag&&this.contentRating.show(this.contentRatingFlag),this.videoResolutionFlag&&this.videoResolution.append(this.videoResolutionFlag),this.audioCodecFlag&&this.audioCodec.append(this.audioCodecFlag),this.audioChannelsFlag&&this.audioChannels.append(this.audioChannelsFlag),this.summaryView&&this.summary.append(this.summaryView)},onClose:function(){this.posterImage&&this.posterImage.close(),
this.pageSize&&(a.trigger("content.unsubscribe:resize",this.onResize),a.trigger("content.unsubscribe:scroll",this.onScroll))},onPrimaryPlayerChange:function(e,t){t&&this.mirror()},onPlayClick:function(e){e.preventDefault(),f.execute("playMedia",{item:this.model})},onUnavailableClick:function(e){e.preventDefault(),a.trigger("show:modal",new v({model:this.model}))},onResize:function(e){this.containerSize=e},onScroll:function(e){if(!this.progress.get("loading")){var t=this.model.get("children"),n=e.scrollHeight-this.containerSize.innerHeight,i=n-e.scrollTop<10,r=t.get("populatedRange").end<t.get("totalSize");
i&&r&&this.populatePage()}}});return g}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1802),n(3),n(5),n(37),n(6),n(8),n(39),n(402),n(265),n(1198),n(97)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=c.extend({name:"addToPlaylistModal",className:"add-to-playlist-modal select-modal modal modal-sm fade",template:e,ui:{addBtn:".add-btn",newPlaylist:".message"},regions:{list:".playlists-container"},events:t.extend({"click .playlist":"onPlaylistClick","keyup .message":"onNewPlaylistKeyUp",
"click .message":"onNewPlaylistClick","click .add-btn":"onAddClick"},c.prototype.events),initialize:function(e){c.prototype.initialize.apply(this,arguments),this.items=e.items,this.title=e.title,(!this.items||1===this.items.length&&this.items[0]===this.model)&&(this.ignoreTargets=!0),this.model.get("isMetadataList")?this.leafType=s.getChildMediaType(this.model.get("firstItemType")).element:this.model.get("playQueueID")?this.leafType=this.model.get("mediaType"):this.leafType=s.getChildMediaType(this.model.get("type")).element,
this.smart=this.model.get("isSection")&&this.ignoreTargets,this.playlistList=new o({},{server:this.model.server,section:new i.Model({currentType:this.leafType,onlyDumb:!0})}),this.playlists=this.playlistList.getCollection(),this.loading=!0,this.playlistList.populate().always(this.whenRendered(this.onPopulated))},serializeData:function(){return{loading:this.loading,showExisting:!this.smart,hasPlaylists:this.playlists.length>0}},toggleAddButton:function(){var e=this.ui.newPlaylist.val().trim();this.ui.addBtn.toggleClass("disabled",!e);
},suggestTitleIfEmpty:function(){""===this.ui.newPlaylist.val()&&(this.ui.newPlaylist.val(this.title),this.ui.newPlaylist.select(),this.toggleAddButton())},_addToPlaylist:function(e){this.ui.addBtn.addClass("active");var n,i=this.model.server;this.ignoreTargets||(n=i.supports("playItemsBatchAdd")?this.items:t.first(this.items));var s=e.addContent(this.model,{items:n});return s.done(this.whenRendered(this.hide)),s.fail(this.whenRendered(function(){this.ui.addBtn.removeClass("active"),a.trigger("show:alert",{
type:"error",message:r("There was a problem adding to the playlist.")})})),s},_createPlaylist:function(){var e=this.ui.newPlaylist.val().trim();if(e){var n=new l({title:e,playlistType:this.leafType,smart:this.smart},{server:this.model.server}),i=this._addToPlaylist(n);i.then(t.bind(function(){a.trigger("navigate","playlist",{serverID:n.server.id,key:n.get("ratingKey")})},this))}},onRender:function(){c.prototype.onRender.apply(this,arguments),this.smart&&setTimeout(this.whenRendered(function(){this.ui.newPlaylist.focus(),
this.suggestTitleIfEmpty()}),this.focusDelay)},onPopulated:function(){this.loading=!1,this.render(),this.list.show(new u({collection:this.playlists}))},onNewPlaylistKeyUp:function(e){this.toggleAddButton(),13===e.keyCode&&this._createPlaylist()},onNewPlaylistClick:function(){this.suggestTitleIfEmpty()},onPlaylistClick:function(e){e.preventDefault();var t=n(e.currentTarget),i=t.data("id"),r=this.playlists.get(i);this._addToPlaylist(r)},onAddClick:function(e){e.preventDefault(),this.ui.addBtn.isDisabled()||this._createPlaylist();
}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(590),n(3),n(5),n(65),n(6),n(8),n(13),n(1009),n(503),n(504),n(1136),n(1133),n(1134),n(44),n(177)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f){"use strict";var m={movie:["general","tags","sharing","poster","art","info"],show:["general","tags","sharing","poster","banner","art"],season:["general","poster","art","info"],episode:["general","tags","poster","art","info"],artist:["general","tags","poster","art"],album:["general","tags","sharing","poster","art","info"],
track:["general","tags","info"],photoAlbum:["general","poster","art"],photo:["general","sharing","info"]},v=["poster","art","banner","info"],g=p.extend({mixins:[f],name:"editMetadataModal",className:"edit-metadata-modal modal modal-lg fade",template:e,panes:{general:{constructor:l},tags:{constructor:u},poster:{constructor:d},art:{constructor:d},banner:{constructor:d},sharing:{constructor:c},info:{constructor:h}},events:t.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit",
"submit .edit-metadata-form":"onFormSubmit"},p.prototype.events),ui:{saveBtn:".save-btn",message:".form-message",navPane:".modal-nav-pane",loadingIndicator:".modal-body-pane .loading-inline"},regions:{paneRegion:".pane-region"},onlyAfterRender:["saveChanges","showPane","showNav"],initialize:function(e){p.prototype.initialize.apply(this,arguments);var i,s=e.mediaActions,l=e.items||(s?s.getActionTargets():[this.model]),u=l[0];this.model=new o({},{server:u.server,metadataItems:l}),i=u.section||u.get("librarySectionID")?n.Deferred().resolve().promise():u.populate(),
i=i.then(t.bind(function(){return this.model.setContext("section",u.server.getSectionForItem(u)),this.model.populate()},this)),i.done(t.bind(function(){this.model.set("originalSaveParams",this.model.getSaveParams()),this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(a,"shortcut:save",this.saveChanges)},this)),i.fail(t.bind(function(){this.ui.message.text(r("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=m[this.model.get("type")]||m.movie;
this.model.get("isSingleMetadataItem")||(e=t.difference(e,v));var n=t.reduce(e,function(e,t){return e[t]=!0,e},{}),i=r("Edit {1}",this.model.get("aggregateTitle"),{escape:!0}),a={item:this.model.toJSON(),panes:n,selectedPane:this.selectedPane,paneTitle:i};return a},paneConstructorArg:function(){return{type:this.selectedPane}},invalidChangedAttrs:function(e){var n=[];if("track"===this.model.get("type")){var r=t.has(e,"artist.id.value")||t.has(e,"artist.title.value")||t.has(e,"album.id.value")||t.has(e,"album.title.value"),a=e["album.id.value"]||e["album.title.value"],s=e["artist.id.value"]||e["artist.title.value"],o=!r||s&&a;
o||(s||n.push("grandparentTitle"),a||n.push("parentTitle"))}if(t.has(e,"originallyAvailableAt.value")){var l=e["originallyAvailableAt.value"];/^\d{4}$/.test(l)&&(e["originallyAvailableAt.value"]+="-01-01",l=e["originallyAvailableAt.value"]),""===l||i(l,"YYYY-MM-DD",!0).isValid()?this.model.set("originallyAvailableAt",l):n.push("originallyAvailableAt")}return n},markInvalid:function(e){this.paneRegion.currentView.markInvalid(e)},showNav:function(){this.ui.navPane.removeClass("hidden")},saveChanges:function(){
var e=this.ui.saveBtn,i=this.ui.message;if(!e.isDisabled()){i.text(""),this.paneRegion.currentView.flushChanges();var a=[],o=this.model.getSaveParams(),l=this.invalidChangedAttrs(o);if(l.length)return void this.markInvalid(l);e.addClass("active"),t.each(["poster","banner","art"],function(e){var t=this.model.get(e);t&&a.push(s.execute("changeArtwork",{item:this.model.getSingleMetadataItem(),artworkType:e,artworkRatingKey:t}))},this),a.push(this.model.save());var u=n.when.apply(n,a);u.done(t.bind(function(){
this.hide()},this)),u.fail(function(){i.text(r("Your changes could not be saved."))}),u.always(function(){e.removeClass("active")})}},onPaneShow:function(e,t){this.listenTo(t,"focusSubmit",function(){this.ui.saveBtn.focus()})},onPaneHide:function(e,t){t.flushChanges(),this.stopListening(t)},onFormSubmit:function(e){e.preventDefault(),this.saveChanges()}});return g}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1808),n(3),n(5),n(6),n(8),n(35),n(22),n(83),n(39),n(13),n(124),n(1139),n(1142),n(1145),n(1147),n(1141),n(44),n(235),n(177)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y){"use strict";var b=v.extend({mixins:[y],name:"editSectionModal",className:"edit-section-modal modal modal-lg fade",template:e,panes:{type:{constructor:f,nextPane:"folders",dependentPanes:["folders"]},folders:{constructor:h,nextPane:"create",dependentPanes:["create","advanced"]},create:{constructor:p,nextPane:"advanced"},advanced:{constructor:d},error:{constructor:m}},panesModel:"tempModel",ui:{sidebar:".modal-nav-list",createBtn:".create-btn",saveBtn:".save-btn",
message:".form-message",headerSectionType:".section-type-title"},regions:{paneRegion:".pane-region"},events:t.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onSaveClick","click .delete-btn":"onDeleteClick","submit .edit-section-type-form":"onGeneralFormSubmit"},v.prototype.events),onlyAfterRender:["showPane","updateMessage","updateSectionTitle","updateSectionTitleDestabilized","updateSaveBtn"],paneConstructorArg:function(){return{isDefaultSection:this.isDefaultSection}},initialize:function(e){
v.prototype.initialize.apply(this,arguments),this.server=e.server,this.redirect=e.redirect,this.isDefaultSection=e.isDefaultSection,this.model?(this.tempModel=this.model.clone(),this.tempModel.collection=this.model.collection):this.tempModel=new c({},{server:this.server,collection:this.server.get("sections")}),this.listenTo(this.tempModel,"change:type",this.onSectionTypeChange),this.showPane(e.selectedPane||"type"),this.tempModel.isNew()&&e.seedAttrs&&this.tempModel.set(this.tempModel.parse(e.seedAttrs)),
this._deferred=n.Deferred(),this.promise=this._deferred.promise()},serializeData:function(){var e=this.tempModel,t=e.isNew(),n={add:t,edit:!t,section:e&&e.toJSON(),selectedPane:this.selectedPane,canDelete:this.isDefaultSection||this.model&&!this.model.isNew()};return n},updateMessage:function(e){this.ui.message.text(e||"")},updateSaveBtn:function w(){var e=this.ui.saveBtn,n=this.panes[this.selectedPane],w=t.bind(function(t){var i=n.nextPane,r=this.tempModel.isNew(),a=!n.constructor.prototype.validate||0===n.constructor.prototype.validate(this.tempModel).length,s=!this.getReachablePanes().isAnyInvalid;
this.ui.createBtn.toggleClass("hidden",!t);var o,l=s||r&&a;o=i,t||"create"!==i||(o=!1),s&&(o=!1),t&&"create"===i&&(o=!0),t&&"advanced"===i&&(o=!0),e.toggleClass("save",!o),e.toggleClass("next",!!o),e.toggleClass("disabled",!l)},this),i="music"===this.tempModel.get("type")&&this.tempModel.server.supports("premiumMusic");i?this.paneRegion.currentView.populateAgents().then(function(e){var t=e.findWhere({identifier:"com.plexapp.agents.plexmusic"});w(t)}):w(!1)},updateSectionTitle:function(){var e=o.get(this.tempModel.get("type"));
if(e){this.updateSectionTitleDestabilized();var t=i(e.title,{escape:!0});this.ui.headerSectionType.html(t)}},updateSectionTitleDestabilized:function(){this.ui.headerSectionType.addClass("section-type-title-unstable"),this.ui.headerSectionType.triggerReflow(),this.ui.headerSectionType.removeClass("section-type-title-unstable")},save:function(){var e=this.ui.saveBtn;this.updateMessage(""),e.addClass("active");var n=this.saveModel();n.always(function(){e.removeClass("active")}),n.fail(t.bind(function(e){
503===e.status?r.trigger("show:modal",new g({model:this.server})):this.updateMessage(i("Your changes could not be saved."))},this)),n.then(t.bind(function(){if(!this.redirect)return this._deferred.resolve(),void this.hide();var e={serverID:this.model.server.id,sectionID:this.model.id};return"artist"!==this.model.get("type")?(r.trigger("navigate","section",e),this._deferred.resolve(),void this.hide()):(e.type=l.get("album").id,e.sortKey="addedAt",e.sortDirection="desc",this._deferred.resolve(),this.hide(),
void r.trigger("navigate","sectionType",e))},this))},saveModel:function(){var e;return this.tempModel.isNew()?(e=this.tempModel.save(),e=e.then(t.bind(function(e,t,n){var i=a.parseXML(e);if(201===n.status){if(i.Directory&&(i=i.Directory),!i.key){var r=n.getResponseHeader("Location");r&&(i.key=r.substring(r.lastIndexOf("/")+1))}var s=this.server;return s.supports("advancedFilters")&&(i.filters=!0),this.model=new c(i,{parse:!0,server:this.server}),s.get("sections").add(this.model),n}},this))):(this.model.copy(this.tempModel),
e=this.model.save()),e=e.then(t.bind(this.saveSettings,this)),e=e.then(t.bind(this.saveAgentSettings,this))},saveSettings:function(){var e=n.Deferred().resolve(this.model).promise();if(!this.server.supports("sectionSettings"))return e;var i=this.tempModel.settings;if(!i)return e;var r=this.getSettingsChanges(i);if(t.isEmpty(r))return e;var a=i.first(),o=a.getSaveParams(r),l=s.join(["/library/sections/",this.model.id,"/prefs"],o),u=t.extend(this.server.getXHROptions(l),{type:"PUT"});return n.ajax(u).promise().then(function(){
return e})},saveAgentSettings:function(){var e=n.Deferred().resolve(this.model).promise(),i=this.tempModel.agentSettings;if(!this.tempModel.agentSettings)return e;var r=this.getSettingsChanges(i);if(t.isEmpty(r))return e;var a=i.first(),o=a.getSaveParams(r),l=t.result(i,"url"),u=s.join([l,"/set"],o),c=a.server.getXHROptions(u);return n.ajax(c).promise().then(function(){return e})},getSettingsChanges:function(e){var t=e.filter(function(e){return e.changedAttributes()}).reduce(function(e,t){var n=t.get("value");
return"bool"===t.get("type")&&(n=n?"1":"0"),e[t.get("id")]=n,e},{});return t},onPaneShow:function(e,t){this.listenTo(t,"valid",this.updateSaveBtn),this.listenTo(t,"invalid",this.updateSaveBtn),this.updateSaveBtn()},onPaneHide:function(e,t){this.stopListening(t,"valid",this.updateSaveBtn),this.stopListening(t,"invalid",this.updateSaveBtn)},onChangePaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget);t.isDisabled()||this.showPane(t.data("pane"))},onSaveClick:function(e){e.preventDefault();
var t=this.ui.saveBtn;if(!t.isDisabled())if(t.hasClass("next")){var n=this.panes[this.selectedPane].nextPane;n&&!this.ui.sidebar.find("."+n+"-btn").isDisabled()&&this.showPane(n)}else this.save()},onDeleteClick:function(e){e.preventDefault();var t=u.execute("deleteSection",{section:this.model});this.isDefaultSection||t.done(function(){r.trigger("navigate","dashboard")})},onGeneralFormSubmit:function(e){this.onSaveClick(e)},onSectionTypeChange:function(){this.updateSaveBtn()}});return b}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=i.PropTypes.shape({machineIdentifier:i.PropTypes.string.isRequired,allowSync:i.PropTypes.bool,allowMediaDeletion:i.PropTypes.bool,transcoderVideo:i.PropTypes.bool,isFullServer:i.PropTypes.bool.isRequired,isFullOwnedServer:i.PropTypes.bool.isRequired});t.default=r,e.exports=t.default},,function(e,t,n){var i=n(1501)("wks"),r=n(1504),a=n(345).Symbol;e.exports=function(e){return i[e]||(i[e]=a&&a[e]||(a||r)("Symbol."+e));
}},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){"use strict";var i=n(32),r=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},a=function(e,t){var n=this;if(n.instancePool.length){var i=n.instancePool.pop();return n.call(i,e,t),i}return new n(e,t)},s=function(e,t,n){var i=this;if(i.instancePool.length){var r=i.instancePool.pop();return i.call(r,e,t,n),
r}return new i(e,t,n)},o=function(e,t,n,i){var r=this;if(r.instancePool.length){var a=r.instancePool.pop();return r.call(a,e,t,n,i),a}return new r(e,t,n,i)},l=function(e,t,n,i,r){var a=this;if(a.instancePool.length){var s=a.instancePool.pop();return a.call(s,e,t,n,i,r),s}return new a(e,t,n,i,r)},u=function(e){var t=this;e instanceof t?void 0:i(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,d=r,h=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||d,n.poolSize||(n.poolSize=c),
n.release=u,n},p={addPoolingTo:h,oneArgumentPooler:r,twoArgumentPooler:a,threeArgumentPooler:s,fourArgumentPooler:o,fiveArgumentPooler:l};e.exports=p},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(83),l=i(o),u=n(468),c=i(u),d=n(39),h=i(d),p=n(59),f=r(p),m=n(77),v=i(m),g=n(18),y=i(g),b=n(20),w=i(b),S=n(127),P=i(S),x=n(737),C=i(x),T=n(264),_=i(T),E=n(728),k=i(E),I=n(727),A=i(I),M=n(397),D=i(M),R=n(720),O=i(R),L=n(723),N=i(L),U=n(398),F=i(U),j=n(399),B=i(j),z=n(722),V=i(z),H=n(396),q=i(H),W=n(725),K=i(W),Q=w.default.extend({
name:"SectionModel",context:["server"],entityType:f.LIBRARY,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,v.default)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",rootPropertyName:"Directory",cache:new P.default,persistInCache:!0,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.key)},url:function Y(){if(this.isNew())return s.default.result(this,"urlRoot")||s.default.result(this.collection,"url");var e=s.default.isNaN(parseInt(this.id,10)),Y=e?this.id:"/library/sections/"+this.id;
return Y},sessionAttrs:{isSection:y.default.boolean,currentFilters:y.default.array,currentFolderKey:y.default.string},syncedAttrs:{key:y.default.oneOfType(y.default.string,y.default.integer),uuid:y.default.string,thumb:y.default.string,art:y.default.string,createdAt:y.default.integer,updatedAt:y.default.integer,allowAdvancedFilters:y.default.boolean,allowSync:y.default.boolean,refreshing:y.default.boolean,name:{type:y.default.string,save:!0},title:{type:y.default.string,save:!0},type:{type:y.default.string,
save:!0},agent:{type:y.default.string,save:!0},scanner:{type:y.default.string,save:!0},language:{type:y.default.string,save:!0},importFromiTunes:{type:y.default.boolean,save:!0}},syncedRelations:{locations:function(){return{relationClass:K.default,rootPropertyName:"Location",options:{section:this},save:!0}}},sessionRelations:{items:function(){return{relationClass:C.default,options:{section:this}}},currentSubset:function(){return{relationClass:_.default,options:{section:this}}},currentFirstCharacter:function(){
return{relationClass:q.default,deferred:!0}},currentType:function(){return{relationClass:D.default,deferred:!0}},currentSort:function(){return{relationClass:B.default,deferred:!0}},types:function(){return{relationClass:A.default,options:{section:this}}},subsets:function(){return{relationClass:k.default,options:{section:this}}},filters:function(){var e=this.get("allowAdvancedFilters")?O.default:N.default;return{relationClass:e,options:{section:this}}},sorts:function(){return{relationClass:F.default,
options:{section:this}}},firstCharacters:function(){return{relationClass:V.default,options:{section:this}}}},defaults:function(){return{isSection:!0,currentType:null,currentFilters:[],currentSort:null,currentFirstCharacter:null,currentFolderKey:null,currentSubset:c.default.get("all")}},initialize:function(e){this.updateMediaTypes(this,e.type),this.set({currentType:this.get("types").at(0)}),this.on("change:type",this.updateMediaTypes,this)},uninitialize:function(){this.off("change:type",this.updateMediaTypes,this),
this.stopListening()},augmentResponse:function(e){return e.allowAdvancedFilters=!!e.filters,delete e.filters,e},getSectionType:function(){var e=this.get("type");return l.default.get(e)},getSaveParams:function(e){var t=w.default.prototype.getSaveParams.apply(this,arguments);if("type"in t){var n=l.default.get(t.type);n&&(t.type=n.typeString)}return"title"in t&&(t.name=t.title,delete t.title),s.default.isObject(t.type)&&(t.type=t.type.typeString),"Location"in t&&(t.location=s.default.pluck(t.Location,"path"),
delete t.Location),t},getSyncTitle:function(e){var t=this.get("title"),n=[],i=this.get("currentSubset"),r=this.get("currentFilters");return e?(s.default.each(e,function(e){n.push(e.get("title"))}),t+": "+n.join(", ")):"all"!==i.id?t+": "+i.get("title"):r.length?(s.default.each(r,function(e){n.push(e.titles.join(", "))}),t+": "+n.join(",")):t},setAgentAndScanner:function(e,t,n,i){var r=e.defaultAgent,a=e.defaultScanner;if(i){var s=e.exclusiveAgents,o=e.exclusiveScanners,l=t.hasExclusiveAgent(s),u=n.hasExclusiveScanner(o);
l&&(r=s[0]),u&&(a=o[0])}this.set({agent:r,scanner:a})},updateMediaTypes:function(e,t){var n=h.default.getRelatedMediaTypes(t);this.get("types").reset(n)}});t.default=Q,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(60),n(757)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:"/:/prefs",initialize:function(e,t){this.server.on("socket:setting",function(e){var t=this.get(e.id);t&&(e=t.parse(e),t.set("value",e.value),"FriendlyName"===e.id&&e.value?this.server.set("friendlyName",e.value):"allowMediaDeletion"===e.id&&this.server.set("allowMediaDeletion",e.value));
},this)},parse:function(t){var n=this.convert(t,"Setting");return e.filter(n,function(e){return e.id})}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(49).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(37),c=r(u),d=n(582),h=r(d),p=n(10),f=n(81),m=r(f),v=n(31),g=r(v),y=n(220),b=r(y),w=n(266),S=r(w),P=n(54),x=r(P),C=n(18),T=r(C),_=n(389),E=r(_),k=n(20),I=r(k),A=n(88),M=r(A),D=n(444),R=r(D),O=n(419),L=r(O),N=n(418),U=r(N),F=n(414),j=r(F),B=n(417),z=r(B),V=n(772),H=r(V),q=n(412),W=r(q),K=n(774),Q=r(K),Y=n(776),G=r(Y),$=n(780),X=r($),J=n(775),Z=r(J),ee=n(770),te=r(ee),ne={
PENDING:"pending",LOCKED:"locked",UNLOCKED:"unlocked"},ie={EMPTY:"",UNSUBSCRIBED:"unsubscribed",ACTIVE:"active",ERROR:"error",REMOVED:"removed"},re=I.default.extend({mixins:[S.default],name:"UserModel",context:["server"],url:"/api/v2/user",sessionAttrs:{isSignedIn:T.default.boolean.isRequired,hasInvalidToken:T.default.boolean.isRequired,lastPrimaryServerID:T.default.string,lockState:T.default.oneOf(ne.PENDING,ne.LOCKED,ne.UNLOCKED).isRequired,devices:T.default.instanceOf(H.default).isRequired,homeUsers:T.default.instanceOf(W.default).isRequired,
friends:T.default.instanceOf(Q.default).isRequired,invites:T.default.instanceOf(G.default).isRequired,sentInvites:T.default.instanceOf(G.default).isRequired,socialNetworks:T.default.instanceOf(X.default).isRequired,homeDetails:T.default.instanceOf(Z.default).isRequired},sessionRelations:{announcements:{relationClass:te.default}},syncedAttrs:{id:T.default.integer,uuid:T.default.string,authToken:T.default.string,username:T.default.string,email:T.default.string,emailOnlyAuth:T.default.boolean,title:T.default.string,
locale:T.default.string,thumb:T.default.string,pin:T.default.string,home:T.default.boolean,restricted:T.default.boolean,guest:T.default.boolean,homeSize:T.default.integer,maxHomeSize:T.default.integer,queueUid:T.default.string,queueEmail:T.default.string,hasAllEntitlements:T.default.boolean,mailingListActive:T.default.boolean,mailingListStatus:T.default.oneOf(ie.EMPTY,ie.UNSUBSCRIBED,ie.ACTIVE,ie.ERROR,ie.REMOVED)},syncedRelations:{subscription:{relationClass:L.default},roles:{relationClass:U.default
},entitlements:{relationClass:j.default},providers:{relationClass:z.default}},derivedAttrs:{isLocked:function(){return this.get("lockState")===ne.LOCKED},isUnlocked:function(){return this.get("lockState")===ne.UNLOCKED},isFullUser:function(){return!!this.get("username")},isEmployee:function(){return!!this.get("roles").get("employee")},isNinja:function(){return this.get("isEmployee")||!!this.get("roles").get("ninja")},hasPlexPass:function(){return!!this.get("subscription").get("active")},canGoPremium:function(){
var e=this.get("homeSize")>1;return this.get("signedIn")&&!this.get("restricted")&&!this.get("hasPlexPass")&&!e},thumbTranscodeUrl:function(){var e=this.get("thumb");if(e)return(0,b.default)(this.server,e)},signedIn:function(){return this.get("isSignedIn")},locked:function(){var e=this.get("lockState");return e===ne.LOCKED||e!==ne.UNLOCKED&&null}},defaults:function(){var e={server:this.server,parent:this};return{isSignedIn:!1,hasInvalidToken:!1,lockState:ne.PENDING,devices:new H.default([],e),homeUsers:new W.default([],e),
friends:new Q.default([],e),invites:new G.default([],e),sentInvites:new G.default([],s.default.extend({subset:"requested"},e)),socialNetworks:new X.default([],e),homeDetails:new Z.default({},e)}},initialize:function(e,t){this._resetPopulate(),this.onHomeUsersChange(this,this.get("homeUsers")),this.on("change:homeUsers",this.onHomeUsersChange,this),this.listenTo(this.server,{"change:isConnected":this.onServerConnectedChange,"change:isUnavailable":this.onServerUnavailableChange})},uninitialize:function(){
this.off("change:homeUsers",this.onHomeUsersChange,this),this.stopListening()},fetch:function(){return c.default.Model.prototype.fetch.apply(this,arguments)},augmentResponse:function(e){var t=e.roles,n=e.entitlements,i=e.providers,r=s.default.extend({},e,{roles:t&&t.role,hasAllEntitlements:n&&n.all,entitlements:n&&n.entitlement,providers:i&&i.provider});return r},signInWithStoredToken:function(){var e=this,t=m.default.get("myPlexAccessToken");t.done(function(t){var n=e.server.getXHROptions(s.default.result(e,"url")),r=s.default.extend({},n.headers,i({},"X-Plex-Token",t));
n.headers=r;var a=l.default.ajax(n);a.done(function(t){var n=e.get("homeDetails"),i=n.fetch({headers:r});i.always(function(){var i=e.parse(t),r=e.get("lockState");if(r!==ne.UNLOCKED){var a=x.default.get("proxied")||g.default.get("autoLogin"),s=!!i.guest&&!n.get("guestEnabled"),o=!!i.home&&(!a||s);r=o?ne.LOCKED:ne.UNLOCKED}e.signIn(i,{lockState:r})})}),a.fail(function(t){if(!t.aborting){var n=(0,R.default)(t);e.signOut({hasInvalidToken:n}),e.server.testAllConnections(),n&&e.clearAccessToken()}})}),
t.fail(function(){e.signOut()})},signIn:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=s.default.isString(e)?this.parse(e):e,r=i.authToken,a=s.default.extend({isSignedIn:!0},i,t);return this._resolve(a,n),m.default.set("myPlexAccessToken",r)},signOut:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._reject(e),l.default.Deferred().resolve().promise()},activateStoredUser:function(e){
M.default.set("activeUserID",e);var t=M.default.getActiveUser();if(t){var n=t.get("lastPrimaryServerID");this.set("lastPrimaryServerID",n)}},clearAccessToken:function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken&&delete window.PLEXWEB.myPlexAccessToken;var e=m.default.remove("myPlexAccessToken");return e=e.then(function(){return M.default.clearActiveUser()})},hashPIN:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.get("authToken"):arguments[1];return h.default.SHA256_hash(e+t);
},hasEntitlement:function(e){var t=this.get("hasAllEntitlements"),n=this.get("entitlements");return!(!t&&!n.get(e))},hasHome:function(){return!!this.get("pin")||this.get("homeUsers").length>1},isFullUser:function(){return this.get("isFullUser")},isEmployee:function(){return this.get("isEmployee")},isNinja:function(){return this.get("isNinja")},hasPlexPass:function(){return this.get("hasPlexPass")},_resolve:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];this.startCapturingChangeEvents(),
this.activateStoredUser(e.id),this.set(e),this._resolvePopulate(),this.server.authenticate(e.authToken),t.silent?this.discardCapturedChangeEvents():this.releaseCapturedChangeEvents()},_reject:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];this.startCapturingChangeEvents(),this.restoreDefaults(e),this._rejectPopulate(),this.server.deauthenticate(),t.silent?this.discardCapturedChangeEvents():this.releaseCapturedChangeEvents()},onHomeUsersChange:function(e,t){var n=e.previous("homeUsers");
n&&this.stopListening(n),this.listenTo(this.get("homeUsers"),"reset add remove",this.onHomeUsersUpdate)},onHomeUsersUpdate:function(){this.set("homeSize",this.get("homeUsers").length),this.get("homeDetails").fetch()},onServerConnectedChange:function(e,t){t&&this.signInWithStoredToken()},onServerUnavailableChange:function(e,t){t&&this.signOut({lockState:this.get("lockState")})}},{lockStates:ne,mailingListStates:ie});(0,E.default)(re,function(){return{relationClass:(0,p.resolve)("UserFlexModel")}}),
t.default=re,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(276)],r=function(e,t){"use strict";var n=t.extend({maxCycles:5,maxSize:100,getItemCacheKey:function(t,n){if(e.isFunction(t.cacheKey))return n||(n=t.toJSON()),t.cacheKey(n)}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i;i=function(){"use strict";return{NORMAL:0,LOCAL:42,CLOUD:43}}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i,r;i=[n(3),n(22),n(6),n(108),n(39),n(464),n(400)],r=function(e,t,n,i,r,a,s){
"use strict";var o={uri:function(t,n){var i=n&&n.items;if(i&&i.length){if(i.length>1)return this.getBatchLibraryMetadataURI(i,n);t||(t=e.first(i))}return t.get("isSection")?this.getSectionURI(t,n):t.get("isMetadataList")?this.getMetadataListURI(t,n):t.get("isPlaylist")?this.getPlaylistURI(t,n):t.get("isChannelItem")?this.getChannelURI(t,n):this.getLibraryMetadataURI(t,n)},getSectionURI:function(n,i){var a,s=e.result(n,"url"),o=n.get("currentSubset"),l=n.get("currentFolderKey"),u=n.get("currentType");
if("folder"===o.id)a=l?l:t.join([s,"all"]);else{var c=n.get("items"),d=c.getParams();if(d.type&&delete d.type,d.timelineState&&delete d.timelineState,d.unwatchedLeaves){var h=r.getChildMediaType(n.get("type")).typeString;d[h+".unwatched"]=1,delete d.unwatchedLeaves}u&&(d.sourceType=u.id),a=t.join([s,o.id],d),a=c.replaceSpecialFilterOperators(a)}return this._resolveURI({prefix:"library",parts:[n.get("uuid"),"directory",a]})},getBatchLibraryMetadataURI:function(t,n){var i=this._getSectionInfo(e.first(t)),r=e.map(t,function(e){
return e.get("ratingKey")}),a="/library/metadata/"+r.join(",");return this._resolveURI({prefix:"library",parts:[i.sectionUUID,"directory",a]})},getLibraryMetadataURI:function(n,i){i||(i={});var r,a=this._getSectionInfo(n),o=e.result(n,"url");return i.excludeSeedItem&&(o=t.join(o,{excludeSeedItem:1})),r=n.models||n.collectionName||n instanceof s?"directory":"item",this._resolveURI({prefix:"library",parts:[a.sectionUUID,r,o]})},getMetadataListURI:function(e,t){var n=this._getSectionInfo(e);return this._resolveURI({
prefix:"library",parts:[n.sectionUUID,"directory",e.get("containerKey")]})},getPlaylistURI:function(e,t){return this._resolveURI({prefix:"playlist",parts:["",e.get("guid")]})},getChannelURI:function(t,n){n||(n={});var i=e.result(t,"url"),r=t.get("items").length?"directory":"item";return this._resolveURI({prefix:"channel",parts:[t.channel.get("identifier"),r,i]})},title:function(t,n){var i=n&&n.items;if(i&&i.length){if(i.length>1)return this.getBatchLibraryMetadataTitle(i,n);t=e.first(i)}return t.get("isSection")?this.getSectionTitle(t,n):t.get("isMetadataList")?this.getMetadataListTitle(t,n):this.getLibraryMetadataTitle(t,n);
},getSectionTitle:function(t){var n=t.get("title"),i=t.get("currentSubset"),r=t.get("currentFilters");if("all"!==i.id)return n+": "+i.get("title");if(!r.length)return n;var a=e.flatten(e.map(r,function(e){return e.titles}));return n+": "+a.join(", ")},getMetadataListTitle:function(e){return e.get("containerTitle")||e.get("title")},getBatchLibraryMetadataTitle:function(t){var n=e.map(t,function(e){return e.get("title")});return a(n)},getLibraryMetadataTitle:function(e){var t=e.get("grandparentTitle")||e.get("parentTitle"),n=e.get("title");
if(t&&(n=t+" - "+n),"episode"===e.get("type")){var r=i({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" "});n+=" ("+r+")"}return n},_resolveURI:function(t){var n=t.parts,i=e.map(n,function(e){return e?encodeURIComponent(e):""});return t.prefix+"://"+i.join("/")},_getSectionInfo:function(t){var n=t.get("librarySectionUUID"),i=t.get("librarySectionID");if(!n||!i){var r=t.server.getSectionForItem(t);e.isEmpty(r)||(n=r.get("uuid"),
i=r.id)}return{sectionUUID:n,sectionID:i}}};return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){return(0,s.default)(e,{limit:"past"})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(801),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){var i;i=function(){"use strict";var e={languages:{aa:"Afaraf",af:"Afrikaans",ab:"Abkhazian",ak:"Akan",sq:"Shqip",am:"Amharic",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",an:"Aragon\xe9s",
hy:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",as:"Assamese",av:"\u0430\u0432\u0430\u0440 \u043c\u0430\u0446\u04c0",ae:"avesta",ay:"aymar aru",az:"az\u0259rbaycan dili",ba:"\u0431\u0430\u0448\u04a1\u043e\u0440\u0442 \u0442\u0435\u043b\u0435",bm:"bamanankan",eu:"euskara",be:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bn:"Bengali",bh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",bi:"Bislama",bs:"bosanski jezik",br:"brezhoneg",bg:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0435\u0437\u0438\u043a",
my:"Burmese",ca:"Catal\xe0",ch:"Chamoru",ce:"\u043d\u043e\u0445\u0447\u0438\u0439\u043d \u043c\u043e\u0442\u0442",cu:"\u0469\u0437\u044b\u043a\u044a \u0441\u043b\u043e\u0432\u0463\u043d\u044c\u0441\u043a\u044a",cv:"\u0447\u04d1\u0432\u0430\u0448 \u0447\u04d7\u043b\u0445\u0438",kw:"Kernewek",co:"corsu",cr:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",dv:"Divehi",dz:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",en:"English","en-GB":"English (UK)",eo:"Esperanto",et:"eesti",ee:"E\u028begbe",fo:"f\xf8royskt",
fj:"vosa Vakaviti",fy:"Frysk",ff:"Fulfulde",ka:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",gd:"G\xe0idhlig",ga:"Gaeilge",gl:"Galego",gv:"Gaelg",gn:"Ava\xf1e&apos;\u1ebd",gu:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",ht:"Krey\xf2l ayisyen",ha:"\u0647\u064e\u0648\u064f\u0633\u064e",hz:"Otjiherero",hi:"\u0939\u093f\u0928\u094d\u0926\u0940",ho:"Hiri Motu",hr:"hrvatski",ig:"As\u1ee5s\u1ee5 Igbo",is:"\xcdslenska",io:"Ido",ii:"\ua188\ua320\ua4bf Nuosuhxop",iu:"\u1403\u14c4\u1483\u144e\u1450\u1466",ie:"Interlingue",
ia:"Interlingua",id:"Bahasa Indonesia",ik:"I\xf1upiaq",jv:"basa Jawa",kl:"kalaallisut",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",ks:"\u0915\u0936\u094d\u092e\u0940\u0930\u0940",kr:"Kanuri",kk:"\u049a\u0430\u0437\u0430\u049b \u0442\u0456\u043b\u0456",km:"Khmer",ki:"G\u0129k\u0169y\u0169",rw:"Ikinyarwanda",ky:"\u043a\u044b\u0440\u0433\u044b\u0437 \u0442\u0438\u043b\u0438",kv:"\u043a\u043e\u043c\u0438 \u043a\u044b\u0432",kg:"KiKongo",kj:"Kuanyama",ku:"Kurd\xee",lo:"Lao",la:"latine",lv:"latvie\u0161u valoda",
li:"Limburgs",ln:"Ling\xe1la",lt:"lietuvi\u0173 kalba",lb:"L\xebtzebuergesch",lu:"Luba-Katanga",lg:"Luganda",mk:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 \u0458\u0430\u0437\u0438\u043a",mh:"Kajin M\u0327aje\u013c",ml:"Malayalam",mi:"te reo M\u0101ori",mr:"\u092e\u0930\u093e\u0920\u0940",ms:"bahasa Melayu",mg:"Malagasy fiteny",mt:"Malti",mo:"Moldavian",mn:"\u043c\u043e\u043d\u0433\u043e\u043b",na:"Ekakair\u0169 Naoero",nv:"Din\xe9 bizaad",nr:"isiNdebele (North)",nd:"isiNdebele (South)",
ng:"Owambo",ne:"\u0928\u0947\u092a\u093e\u0932\u0940",nn:"Norsk nynorsk",nb:"Norsk bokm\xe5l",ny:"chiChe\u0175a",oc:"Occitan",oj:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",or:"Oriya",om:"Afaan Oromoo",os:"\u0438\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",pi:"\u092a\u093e\u0934\u093f",ps:"\u067e\u069a\u062a\u0648",qu:"Runa Simi",rm:"rumantsch grischun",ro:"rom\xe2n\u0103",rn:"kiRundi",sg:"y\xe2ng\xe2 t\xee s\xe4ng\xf6",sa:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",
sr:"\u0441\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",si:"Sinhala",sk:"sloven\u010dina",sl:"Sloven\u0161\u010dina",se:"Davvis\xe1megiella",sm:"gagana fa&apos;a Samoa",sn:"chiShona",sd:"\u0938\u093f\u0928\u094d\u0927\u0940",so:"Soomaaliga",st:"Sesotho",sc:"sardu",ss:"SiSwati",su:"Basa Sunda",sw:"Kiswahili",ty:"Reo Tahiti",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",tt:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",te:"Telugu",tg:"\u0442\u043e\u04b7\u0438\u043a\u04e3",tl:"Wikang Tagalog",th:"\u0e44\u0e17\u0e22",
bo:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",ti:"Tigrinya",to:"faka Tonga",tn:"Setswana",ts:"Xitsonga",tk:"T\xfcrkmen",tw:"Twi",ug:"Uy\u01a3urq\u0259",uk:"\u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648",uz:"O&apos;zbek",ve:"Tshiven\u1e13a",vi:"Ti\u1ebfng Vi\u1ec7t",vo:"Volap\xfck",cy:"Cymraeg",wa:"Walon",wo:"Wollof",xh:"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",yo:"Yor\xf9b\xe1",za:"Sa\u026f cue\u014b\u0185",zu:"isiZulu",pb:"Portugu\xeas (Brasil)",
fr:"Fran\xe7ais","fr-CA":"Fran\xe7ais Canadien",de:"Deutsch",sv:"Svenska",no:"Norsk",da:"Dansk",fi:"Suomeksi",nl:"Nederlands",it:"Italiano",es:"Espa\xf1ol","es-419":"Espa\xf1ol (Latinoam\xe9rica)",pl:"Polski",hu:"Magyar",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",tr:"T\xfcrk\xe7e",zh:"\u4e2d\u6587","zh-TW":"\u81fa\u8a9e",ru:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a",he:"\u05e2\u05d1\u05e8\u05d9\u05ea",ja:"\u65e5\u672c\u8a9e",pt:"Portugu\xeas","pt-BR":"Portugu\xeas Brasileiro",
ko:"\ud55c\uad6d\uc5b4",cs:"\u010de\u0161tina",fa:"\u0641\u0627\u0631\u0633\u06cc",xx:"Unknown",xn:"None"},getLanguageName:function(e){return this.languages[e]||""},parseHeader:function(e){return e&&e.match(/[a-zA-z\-]{2,10}/g)||[]},closestLanguage:function(t){var n,i;t=t||[];for(var r=0,a=t.length;r<a&&(i=t[r],"xx"!==i&&"xn"!==i&&(e.languages[i]?n=i:i.indexOf("-")>0&&(n=e.closestLanguage([i.split("-")[0]]))),!n);r++);return n}};return e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){
var i;i=function(){"use strict";var e={waitingRegex:/^(transcoded|downloaded|directplay|processed)$/,processingRegex:/^(pending|transcoding|downloading)$/,failedRegex:/^(failed|error)$/,addVersionHeader:function(e,t){return t||(t={}),t.headers||(t.headers={}),t.headers["X-Plex-Sync-Version"]=e,t},addVersionHeaderForDevice:function(e,t){var n=e&&e.get("SyncList");return n&&n.version?this.addVersionHeader(n.version,t):t},getSyncStateFromPart:function(e){return e.transcodeState||e.syncState},getSyncStateContextFromPart:function(e){
return e.transcodeStateContext||e.syncStateContext}};return e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i,r;i=[n(1706),n(3),n(5),n(9),n(6),n(8)],r=function(e,t,n,i,r,a){"use strict";var s=i.ItemView.extend({className:"summary",template:e,ui:{summary:".metadata-summary",divider:".summary-divider",dividerBtn:".summary-divider-btn"},events:{"click .summary-divider-btn":"onMoreSummaryClick"},onlyAfterRender:["onDeferredRender","updateDividerBtnVisibility"],bindings:{".item-summary":{
modelAttribute:"summary",autohide:!0,isHtml:!0,formatter:function(e){if(this.$el.toggleClass("hidden",!e),this.updateDividerBtnVisibility(),e){var i=t.map(t.compact(e.split("\n")),function(e){return n.trim(t.escape(e))});if(i.length)return"<p>"+i.join("</p><p>")+"</p>"}}}},initialize:function(){this.listenTo(a,"resize",this.onResize),this.listenTo(this.model,"change:summary",this.onSummaryChange)},updateDividerBtn:function(e){var t=r(e?"More":"Less");this.ui.dividerBtn.html(t)},updateDividerBtnVisibility:function(){
if(this.originalHeight){var e=this.ui.summary.prop("scrollHeight");e<=this.originalHeight?this.ui.divider.addClass("hidden"):(this.updateDividerBtn(!this.expanded),this.ui.divider.removeClass("hidden"))}},onRender:function(){t.defer(t.bind(this.onDeferredRender,this))},onDeferredRender:function(){this.expanded=!1;var e=this.ui.summary.prop("scrollHeight"),t=this.ui.summary.prop("clientHeight");this.originalHeight=t,e>t&&(this.ui.summary.css("max-height",t+"px"),this.ui.divider.removeClass("hidden"));
},onResize:function(){this.isClosed||this.updateDividerBtnVisibility()},onMoreSummaryClick:function(){var e=this.ui.summary.prop("scrollHeight")+100;this.expanded?(this.ui.summary.css("max-height",this.originalHeight+"px"),this.expanded=!1):(this.ui.summary.css("max-height",e+"px"),this.expanded=!0),this.updateDividerBtn(!this.expanded)},onSummaryChange:function(){this.originalHeight&&(this.expanded&&this.ui.summary.css("max-height",this.originalHeight+"px"),this.onDeferredRender())}});return s}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(162),n(868)],r=function(e,t){"use strict";var n=t.extend({className:"container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1832),n(5),n(148),n(227),n(488),n(487),n(44),n(1255),n(1254),n(1256),n(1251)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=s.extend({mixins:[n],name:"convertModal",className:"convert-modal modal fade",template:e,regions:{bodyRegion:".modal-body-region"},initialize:function(e){
s.prototype.initialize.apply(this,arguments),this.server=this.model?this.model.server:e.item.server;var t={server:this.server,allowInCache:!0};this.playlists=new i([],t),this.targets=new r([],t),this.profiles=new a([],t)},initialState:"loading",states:{loading:{nextState:"form",onEnter:function(){this.bodyRegion.show(new o),this.listenForStateRequests();var e=t.when(this.playlists.populate(),this.targets.populate(),this.profiles.populate(),this.server.get("sections").populate());e.done(this.whenRendered(function(){
this.playlist=this.playlists.first(),this.playlist?this.enterNextState():this.enterState("error")})),e.fail(this.whenRendered(function(){this.enterState("error")}))}},form:{nextState:"success",onEnter:function(){this.bodyRegion.show(new l({model:this.model,item:this.options.item,items:this.options.items,playlist:this.playlist,targets:this.targets,profiles:this.profiles})),this.listenForStateRequests()}},success:{onEnter:function(){this.model?this.hide():(this.bodyRegion.show(new u({server:this.server
})),this.listenForStateRequests())}},error:{onEnter:function(e){this.bodyRegion.show(new c({status:e})),this.listenForStateRequests()}}},listenForStateRequests:function(){this.bodyRegion&&this.bodyRegion.currentView&&this.listenTo(this.bodyRegion.currentView,{"request:state":this.enterState,"request:nextState":this.enterNextState})},onRender:function(){s.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.kind,s=r(e,["className","children","kind"]);return l.default.createElement(p.default,a({className:(0,c.default)(t,m.default.menuItem,m.default[i]),role:"menuitem"},s),n)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(41),h=n(40),p=s(h),f=n(1550),m=s(f);i.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,kind:o.PropTypes.oneOf(d.kinds.all)
},i.defaultProps={kind:d.kinds.DEFAULT},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(1464).default,r=n(1465).default;t.default=function(){function e(e,t){var n=[],r=!0,a=!1,s=void 0;try{for(var o,l=i(e);!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){a=!0,s=u}finally{try{!r&&l.return&&l.return()}finally{if(a)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(r(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance");
}}(),t.__esModule=!0},function(e,t,n){"use strict";function i(e,t){return(e&t)===t}var r=n(32),a={MUST_USE_PROPERTY:1,HAS_SIDE_EFFECTS:2,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=a,n=e.Properties||{},s=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&o._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var d in n){
o.properties.hasOwnProperty(d)?r(!1):void 0;var h=d.toLowerCase(),p=n[d],f={attributeName:h,attributeNamespace:null,propertyName:d,mutationMethod:null,mustUseProperty:i(p,t.MUST_USE_PROPERTY),hasSideEffects:i(p,t.HAS_SIDE_EFFECTS),hasBooleanValue:i(p,t.HAS_BOOLEAN_VALUE),hasNumericValue:i(p,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:i(p,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:i(p,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(!f.mustUseProperty&&f.hasSideEffects?r(!1):void 0,f.hasBooleanValue+f.hasNumericValue+f.hasOverloadedBooleanValue<=1?void 0:r(!1),
l.hasOwnProperty(d)){var m=l[d];f.attributeName=m}s.hasOwnProperty(d)&&(f.attributeNamespace=s[d]),u.hasOwnProperty(d)&&(f.propertyName=u[d]),c.hasOwnProperty(d)&&(f.mutationMethod=c[d]),o.properties[d]=f}}},s=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:s,ATTRIBUTE_NAME_CHAR:s+"\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040",
properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<o._isCustomAttributeFunctions.length;t++){var n=o._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},injection:a};e.exports=o},function(e,t,n){var i,r;i=[n(73)],r=function(e){"use strict";var t=e.extend({"interface":["enable","disable","set","trackView","trackEvent"],register:function(e){this._Analytics=e},init:function(e){return this._instance=new this._Analytics(e),this._instance;
}});return new t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(73)],r=function(e){"use strict";var t=new e({props:["X-Plex-Client-Identifier","X-Plex-Device","X-Plex-Device-Name","X-Plex-Device-Screen-Resolution","X-Plex-Device-Vendor","X-Plex-Model","X-Plex-Platform","X-Plex-Platform-Version","X-Plex-Product","X-Plex-Provides","X-Plex-Version"]});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(73)],r=function(e){"use strict";var t=new e({"interface":["getLanguages","load","t"]
});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";function n(e){return e.entities}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=arguments.length<=1||void 0===arguments[1]?"MMMM D, YYYY":arguments[1];return e?(0,s.default)(e).format(t):""}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";
function i(e){var t=s.default.duration(e),n=t.hours()+24*t.days(),i=t.minutes(),r=t.seconds();return n&&i?(0,l.default)("{1} hr {2} min",n,i):n?(0,l.default)("{1} hr",n):i?(0,l.default)("{1} min",i):r>0?(0,l.default)("{1} sec",r):""}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a),o=n(6),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=o.default.clone(e);return t.title=o.default.result(t,"title"),t.hasOwnProperty("plural")&&(t.plural=o.default.result(t,"plural")),
t}function r(e,t){function n(e){for(var t in a){var n=a[t],r=n[e];if(r)return i(r)}u.default.warn("No type was found for "+e)}function r(){return t.map(function(e){return i(e)})}var a={};return e.forEach(function(e){a[e]=t.reduceRight(function(t,n){var i=n[e];return null!=i&&(t[i]=n),t},{})}),{get:n,getAll:r}}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=a(s),l=n(26),u=a(l);e.exports=t.default},function(e,t,n){var i,r;i=[n(9)],r=function(e){"use strict";
var t=e.Layout.extend({regions:{content:".content"}});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(9),n(223)],r=function(e,t,n){"use strict";var i={selectable:!0,events:{mousedown:"onMouseDown",mouseup:"onMouseUp",mouseleave:"onMouseUp"},itemEvents:{select:"onItemSelect",autoselect:"onItemAutoselect"},itemViewOptions:function(){return{mediaActions:this.parentMediaActions||this.mediaActions}},initialize:function(e){e.listModel&&e.mediaActions&&(this.listModel=e.listModel,
this.mediaActions=e.mediaActions,this.listenTo(this.mediaActions,{"change:selectedItems":this.onMediaActionsSelectedItemsChange,"change:selecting":this.onMediaActionsSelectingChange}),this.shiftRange={start:-1,end:-1})},isViewSelected:function(t){var n=this.mediaActions.get("selectedItems");if(0===n.length)return!1;var i=t.model,r=e.indexOf(n,i);if(r!==-1)return!0;var a=i.get("children"),s=a&&a.length&&a.every(function(e){return e.selected});return!!s},singleSelect:function(e){this.shiftRange.end=-1;
var t=e.model;this.isViewSelected(e)?(this.shiftRange.start=-1,this.deselectItem(t),e.deselect()):(this.shiftRange.start=this.collection.indexOf(t),this.previousCollectionOffset=this.listModel.get("populatedRange").start,this.selectItem(t),e.select())},multiSelect:function(t){if(this.getViewForModel){var i=this.collection.indexOf(t.model),r=this.listModel.get("populatedRange").start,a=this.previousCollectionOffset-r,s=[],o=[];if(this.previousCollectionOffset=r,this.shiftRange.start<0)this.shiftRange.start=i,
s.push(t.model),t.select();else if(this.shiftRange.end<0)this.shiftRange.start+=a,this.shiftRange.end=i,n.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){s.push(t);var n=this.getViewForModel(t);n&&n.select()}},this);else{n.each(this.shiftRange,function(e){var t=this.collection.at(e);t&&o.push(t)},this),this.shiftRange.start+=a,this.shiftRange.end=i,n.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){s.push(t);var n=this.getViewForModel(t);n&&n.select()}},this);var l=[o].concat(s);
o=e.without.apply(e,l),e.each(o,function(e){var t=this.getViewForModel(e);t&&t.deselect()},this)}this.mediaActions.selectItems(s,{superset:this.collection}),this.mediaActions.deselectItems(o,{superset:this.collection})}},selectItem:function(e){this.mediaActions.selectItem(e,{superset:this.collection})},deselectItem:function(e){this.mediaActions.deselectItem(e,{superset:this.collection})},forwardItemViewEvents:function(n){this.stopListening(n,"all"),this.listenTo(n,"all",function(i){var r=Array.prototype.slice.call(arguments);
r[0]="itemview:"+i,r.splice(1,0,n);var a=t.normalizeMethods.call(this,this.itemEvents);"undefined"!=typeof a&&e.isFunction(a[i])&&a[i].apply(this,r),t.triggerMethod.apply(this,r)},this)},onMediaActionsSelectedItemsChange:function(e,t){this.getViewForModel&&(t&&t.length||(this.shiftRange.start=-1,this.shiftRange.end=-1,this.collection.each(function(e){var t=this.getViewForModel(e);t&&t.deselect&&t.deselect()},this)))},onMediaActionsSelectingChange:function(e){this.$el.toggleClass("hide-actions",e);
},onClose:function(){this.mediaActions&&this.mediaActions.deselectAll()},onMouseDown:function(e,t){this.isMouseDown=!0},onMouseUp:function(e,t){this.isMouseDown=!1},onItemSelect:function(e,t,n){this.selectable&&(n||(n={}),n.multiSelect?this.multiSelect(t):this.singleSelect(t))},onItemAutoselect:function(e,t,n){this.isMouseDown&&this.onItemSelect.apply(this,arguments)},onItemRemoved:function(e){e.model.selected&&(this.deselectItem(e.model),e.deselect())}};return i}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(3)],r=function(e){"use strict";var t={currentState:null,enterState:function(t){if(t!==this.currentState){var n=this.currentState,i=this.states[t];if(!i)throw new Error("The state machine is unable to enter undefined state: "+t);if(n){var r=this.states[n];if(e.isFunction(r.onExit)){var a=r.onExit.call(this);if(a===!1)return}}if(this.currentState=t,e.isFunction(i.onEnter)){var s=i.onEnter.apply(this,e.rest(arguments));if(s===!1)return void(this.currentState=n)}this.triggerMethod("stateMachineChange",{
from:n,to:t})}},enterNextState:function(){var e;if(this.currentState){var t=this.states[this.currentState];e=t.nextState}else{if(!this.initialState)throw new Error("An initial state must be defined for the state machine");e=this.initialState}e?this.enterState(e):this.triggerMethod("stateMachineComplete")}};return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(74),s=i(a),o=n(52),l=r(o),u=(0,
s.default)(l.RESET_QUICK_SEARCH);t.resetQuickSearch=u;var c=(0,s.default)(l.FETCH_QUICK_SEARCH);t.fetchQuickSearch=c;var d=(0,s.default)(l.CHANGE_QUICK_SEARCH_QUERY);t.changeQuickSearchQuery=d;var h=(0,s.default)(l.CHANGE_QUICK_SEARCH_SETTINGS);t.changeQuickSearchSettings=h;var p=(0,s.default)(l.SELECT_QUICK_SEARCH_RESULT);t.selectQuickSearchResult=p;var f=(0,s.default)(l.NAVIGATE_QUICK_SEARCH_RESULT);t.navigateQuickSearchResult=f;var m=(0,s.default)(l.PLAY_QUICK_SEARCH_RESULT);t.playQuickSearchItem=m;
},function(e,t,n){var i,r;i=[n(1841),n(3),n(5),n(10),n(6),n(8),n(35),n(13),n(411),n(270),n(1028),n(44),n(1263),n(1271),n(1262),n(1266),n(1270),n(1267),n(94)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y){"use strict";var b=d.extend({name:"editFriendModal",className:"edit-friend-modal modal modal-lg fade",template:e,panes:{username:p,general:f,ownedServer:m,sharedServer:v,restrictions:g},ui:{poster:".modal-poster",title:".modal-title",message:".form-message",nextBtn:".next-btn",submitBtn:".submit-btn"
},regions:{nav:".modal-nav-pane",body:".modal-body-pane"},events:t.extend({"submit #share-server-form":"onSubmit"},d.prototype.events),initialize:function(e){d.prototype.initialize.apply(this,arguments),e||(e={}),this.type=e.type||"friend",this.isAdmin=e.isAdmin,this.defaultPaneType=e.defaultPaneType,this.defaultPaneID=e.defaultPaneID,"home"===this.type&&this.initHomeUser(e),this.initModel(e),this.initServerOverviews(e),this.initServerShares(e),this.image=new y({model:this.model,type:"friend",width:40
}),this.listenTo(this.body,"show",this.onShowPane)},initHomeUser:function(e){var t=i.resolve("appModel");if(this.homeUser=e.homeUser,this.homeUser){var n=t.get("user"),r=n.get("friends");this.model=r.findWhere({id:e.homeUser.id}),this.tempHomeUser=this.homeUser.clone()}else this.tempHomeUser=new u({admin:!1},{server:t.get("user").server})},initModel:function(e){var t=i.resolve("appModel");this.model?this.tempModel=this.model.cloneDeep():(this.tempModel=new l({},{server:t.get("user").server}),this.tempModel.parseServers({
Server:[]}))},initServerOverviews:function(e){var n=i.resolve("appModel"),r=n.get("servers"),a=n.get("user"),s=this.tempModel.get("serverOverviews");s||(s=new c([],{server:a.server,parent:this.tempModel}),this.tempModel.set("serverOverviews",s));var o=r.filter(function(e){var t=!e.get("shared")&&!e.get("cloud"),n=e.get("isFullServer")||e.get("isCloudSyncServer");return e.id&&t&&n});t.each(o,function(e){var t=s.add({machineIdentifier:e.id,name:e.get("friendlyName")});t.populate()})},initServerShares:function(e){
var t=this.tempModel.get("serverShares");t.each(function(e){e.populate()})},serializeData:function(){return{type:this.type,title:this.tempModel.get("title")}},showNextPane:function(e){var t,n={};if(e||(e=this.tempModel.isNew()?"username":this.defaultPaneType||"general"),"ownedServer"===e||"sharedServer"===e){var i,r;if("ownedServer"===e?(i=this.tempModel.get("serverOverviews"),r="serverOverview"):(i=this.tempModel.get("serverShares"),r="serverShare"),i.length){var a;this.defaultPaneID&&(a=i.findWhere({
machineIdentifier:this.defaultPaneID})),a||(a=i.first()),t=a.id,n[r]=a}else e="general"}t||(t=e),this.showPane(e,t,n)},showPane:function(e,n,i){this.currentPane&&(this.currentPane.flushChanges(),this.stopListening(this.currentPane),"username"===this.currentPane.paneID&&(this.ui.title.text(this.tempModel.get("username")||this.tempModel.get("title")),this.findExistingFriend()));var r=this.panes[e],a=new r(t.extend({paneID:n,model:this.tempModel,homeUser:this.tempHomeUser,type:this.type,isAdmin:this.isAdmin
},i));return this.listenTo(a,{"change:pane":this.onChangePane,"change:errorMessage":this.onErrorMessageChange,"enable:submit":this.onEnableSubmit,"destroy:homeUser":this.onHomeUserDestroy,"destroy:friend":this.onFriendDestroy,"destroy:serverShare":this.onServerShareDestroy,"disable:guest":this.onGuestDisable}),this.currentPane=a,this.nav.currentView.selectItem(n),this.body.show(a),a},getSubmitBtn:function(){return this.currentPane&&"username"===this.currentPane.paneID?this.ui.nextBtn:this.ui.submitBtn;
},findExistingFriend:function(){var e,t=i.resolve("appModel"),n=t.get("user"),r=n.get("friends"),a=this.tempModel.get("username");if(this.tempModel.get("restricted")?e=r.findWhere({restricted:!0,title:a}):(e=r.findWhere({username:a}),e||(e=r.findWhere({email:a}))),e){var s=this.tempModel.get("serverOverviews");this.model=e,this.tempModel=e.cloneDeep(),this.tempModel.set("serverOverviews",s),this.initServerShares(),this.image.setModel(this.model),this.image.render(),this.nav.currentView.setModel(this.tempModel);
}},sendRequests:function(){var e=this.tempHomeUser&&this.tempHomeUser.isNew(),o=!e&&this.tempModel.isNew(),l=[];l.push(this.sendFriendInvite()),l.push(this.sendHomeInvite());var u=n.when.apply(n,l);return u=u.then(t.bind(function(){return Array.prototype.push.apply(l,this.sendServerShareInvites()),this.tempModel.isNew()||l.push(this.tempModel.save({},{parse:!1})),this.tempHomeUser&&!e&&l.push(this.tempHomeUser.save()),n.when.apply(n,l)},this)),u.done(t.bind(function(){var e=i.resolve("appModel"),t=e.get("user");
t.get("friends").fetch(),"home"===this.type&&t.get("homeUsers").fetch(),this.tempModel.get("restricted")||t.get("sentInvites").fetch(),this.hide()},this)),u.fail(t.bind(function(n){var i=s.parseXML(n.responseText),l=i&&i.status;t.isString(l)||(l=r(e?"This user could not be added to your home.":o?"An invite could not be sent to this user.":"Your changes could not be saved.")),a.trigger("show:alert",{type:"error",message:l})},this)),u},sendFriendInvite:function(){if("friend"===this.type){var e=this.tempModel.get("serverShares").getActiveCount();
return this.tempModel.isNew()&&!e?this.tempModel.save({user:this.tempModel.get("username")}):void 0}},sendHomeInvite:function(){if("home"===this.type&&this.tempHomeUser.isNew()){var e=this.tempHomeUser.save();return e.done(t.bind(function(){if(this.tempHomeUser.get("restricted")){this.tempModel.set("id",this.tempHomeUser.id);var e=i.resolve("appModel"),t=e.get("user");t.set("home",!0)}this.showHomeWarnings()},this)),e}},showHomeWarnings:function(){o.execute("showHomeWarningsModal")},sendServerShareInvites:function(){
var e=this.model&&this.model.get("serverShares").filterByOwned(),n=this.tempModel.get("serverShares").filterByOwned(),i=e?e.pluck("machineIdentifier"):[],r=n?n.pluck("machineIdentifier"):[],a=t.union(i,r),s=[];return t.each(a,function(t){var i=e&&e.findWhere({machineIdentifier:t}),r=n&&n.findWhere({machineIdentifier:t}),a=i&&i.isActive(),l=r&&r.isActive();l?s.push(o.execute("shareServer",{user:this.tempModel,serverShare:r})):a&&s.push(i.destroy({wait:!0}))},this),s},onRender:function(){d.prototype.onRender.apply(this,arguments),
this.image.setElement(this.ui.poster);var e=new h({model:this.tempModel});this.listenTo(e,"change:pane",this.onChangePane),this.nav.show(e),this.showNextPane()},onClose:function(){this.image.close()},onChangePane:function(e,t,n){t||(t=e),this.showPane(e,t,n)},onShowPane:function(){var e="username"===this.currentPane.paneID;this.nav.currentView.toggleDisabled(e),this.ui.nextBtn.toggleClass("hidden",!e),this.ui.submitBtn.toggleClass("hidden",e)},onErrorMessageChange:function(e){this.ui.message.text(e);
},onEnableSubmit:function(e){this.getSubmitBtn().toggleClass("disabled",!e)},onHomeUserDestroy:function(){if(this.homeUser){var e=o.execute("removeHomeUser",{homeUser:this.homeUser});e.done(t.bind(this.hide,this))}},onFriendDestroy:function(){if(this.model){var e=o.execute("removeFriend",{friend:this.model});e.done(t.bind(this.hide,this))}},onServerShareDestroy:function(e){var n=o.execute("removeServerShare",{serverShare:e});n.done(t.bind(function(){var t=this.model.get("serverShares");t.remove(e.id),
this.showNextPane("general")},this))},onGuestDisable:function(){var e=i.resolve("appModel"),n=o.execute("toggleGuest",{user:e.get("user"),enable:!1});n.done(t.bind(this.hide,this))},onSubmit:function(e){e.preventDefault();var n=this.getSubmitBtn();if(!n.isDisabled()){if("username"===this.currentPane.paneID)return void this.showNextPane("ownedServer");n.addClass("active"),this.currentPane.flushChanges(),this.sendRequests().fail(t.bind(function(){this.ui.submitBtn.removeClass("active")},this))}}});return b;
}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1905),n(3),n(9),n(6)],r=function(e,t,n,i){"use strict";var r=n.Layout.extend({className:"form-group",template:e,isDisabled:!0,isActive:!1,ui:{submitBtn:".submit-btn",message:".form-message"},events:{"change #server-settings-form input[name]":"onInputChange","keyup #server-settings-form input[type=text]":"onInputChange","change #server-settings-form select[name]":"onInputChange","submit #server-settings-form":"onSubmit"},initialize:function(e){
this.changes=e.changes},serializeData:function(){return t.where(this.collection.toJSON(),{group:this.options.group,hidden:!1})},enable:function(){this.isDisabled=!1,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},updateModel:function(e,t){var n=this.collection.get(e);if(n)return n.set("value",t)},onRender:function(){t.isEmpty(this.changes)||this.enable()},onInputChange:function(e){var t=e.currentTarget,n=t.name,i=t.value,r=t.value;if(n){"checkbox"===t.type&&(r=t.checked,r||(i="0"));
var a=this.updateModel(n,r);a&&(this.changes[t.name]=i,this.enable())}},onSubmit:function(e){e.preventDefault(),this.trigger("save")},onBeforeSave:function(){this.isActive=!0,this.ui.submitBtn.addClass("active")},onAfterSave:function(e){var t;this.isActive=!1,this.ui.submitBtn.removeClass("active"),e?(this.isDisabled=!0,this.ui.submitBtn.addClass("disabled"),t=i("Your changes have been saved.")):t=i("Your changes could not be saved."),this.ui.message.text(t)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.kind,s=e.size,o=r(e,["className","children","kind","size"]);return l.default.createElement(p.default,a({className:(0,c.default)(t,m.default.button,m.default[i],m.default[s])},o),n)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(41),h=n(40),p=s(h),f=n(1534),m=s(f);i.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,
kind:o.PropTypes.oneOf(d.kinds.all),size:o.PropTypes.oneOf(d.sizes.all)},i.defaultProps={kind:d.kinds.DEFAULT,size:d.sizes.MEDIUM},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.errorClassName,s=e.name,o=e.hasError,u=r(e,["children","className","errorClassName","name","hasError"]);return l.default.createElement("label",a({},u,{className:(0,c.default)(n,o&&i),htmlFor:s}),t)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(1541),h=s(d);i.propTypes={children:o.PropTypes.node.isRequired,className:o.PropTypes.string,errorClassName:o.PropTypes.string,name:o.PropTypes.string,hasError:o.PropTypes.bool},i.defaultProps={className:h.default.label,errorClassName:h.default.hasError},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default,c=n(19).default;Object.defineProperty(t,"__esModule",{
value:!0});var d=n(7),h=u(d),p=n(66),f=u(p),m=n(30),v=u(m),g=n(23),y=n(230),b=c(y),w=n(27),S=u(w),P=n(472),x=n(112),C=u(x),T=n(337),_=c(T),E=n(41),k=n(159),I=u(k),A=n(160),M=u(A),D=n(226),R=u(D),O=n(84),L=u(O),N=n(528),U=u(N),F=n(1348),j=u(F),B=n(1548),z=u(B),V=(0,I.default)(M.default.menuSpeed),H={appear:z.default.enter,appearActive:z.default.enterActive,enter:z.default.enter,enterActive:z.default.enterActive,leave:z.default.leave,leaveActive:z.default.leaveActive},q=function(e){function t(){s(this,t),
i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this._openMenu()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,S.default)(this,e,t)}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen?this._openMenu():e.isOpen&&!this.props.isOpen&&this._closeMenu()}},{key:"componentWillUnmount",value:function(){this.props.isOpen&&this._closeMenu()}},{key:"_openMenu",value:function(){
_.startScopedFocus(f.default.findDOMNode(this.refs.menu)),document.addEventListener("mouseup",this.onWindowPress),document.addEventListener("touchend",this.onWindowPress),document.addEventListener("keydown",this.onKeyDown)}},{key:"_closeMenu",value:function(){document.removeEventListener("mouseup",this.onWindowPress),document.removeEventListener("touchend",this.onWindowPress),document.removeEventListener("keydown",this.onKeyDown)}},{key:"onWindowPress",decorators:[g.autobind],value:function(e){var t=this.props.target,n=f.default.findDOMNode(this.refs.menu),i=n&&n.contains(e.target),r=!i&&f.default.findDOMNode(t),a=r&&r.contains(e.target);
i||a||this.props.onMenuClose()}},{key:"onKeyDown",decorators:[g.autobind],value:function(e){var t=e.keyCode;t===b.TAB?_.scopeTabEvent(e):t===b.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.props.onMenuClose(),_.restorePreviousFocus())}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,i=e.target,r=e.options,a=e.isOpen,s=e.scrollerProps,u=e.onMenuClose,c=o(e,["className","children","target","options","isOpen","scrollerProps","onMenuClose"]);return h.default.createElement(U.default,{
className:z.default.menuPortal,target:i,options:r,isOpen:a,closeTimeout:V},h.default.createElement(R.default,{ref:"menu",isOpen:a,transitionName:H,transitionAppearTimeout:V,transitionEnterTimeout:V,transitionLeaveTimeout:V},a&&h.default.createElement(j.default,l({className:(0,v.default)(t,z.default.menu)},c),h.default.createElement(L.default,s,(0,P.mapValidComponents)(n,function(e){var t=(0,C.default)(u,e.props.onPress);return h.default.cloneElement(e,{onPress:t})})))))}}]),t}(d.Component);q.propTypes={
className:d.PropTypes.string,children:d.PropTypes.node.isRequired,target:d.PropTypes.object,options:d.PropTypes.object,isOpen:d.PropTypes.bool.isRequired,scrollerProps:d.PropTypes.object,onMenuClose:d.PropTypes.func.isRequired},q.defaultProps={scrollerProps:{scrollDirection:E.scrollDirections.NONE}},t.default=q,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(7),d=u(c),h=n(539),p=u(h),f=n(40),m=u(f),v=n(1559),g=u(v),y=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.tooltip,i=e.hideOnPress,r=e.onPress,a=o(e,["children","tooltip","hideOnPress","onPress"]);return d.default.createElement(p.default,l({className:g.default.toolbarButton,component:m.default,tooltip:n,tooltipClassName:g.default.toolbarTooltip,
hideOnPress:i,onPress:r},a),t)}}]),t}(c.Component);y.propTypes={children:c.PropTypes.node,tooltip:c.PropTypes.string,hideOnPress:c.PropTypes.bool,onPress:c.PropTypes.func},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(u.default,r({iconClassName:d.default.icon,icon:"plex-icon-alert-560"},e))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(196),u=a(l),c=n(1587),d=a(c);t.default=i,e.exports=t.default;
},function(e,t,n){"use strict";function i(e){var t=e.children,n=r(e,["children"]);return o.default.createElement(u.default,null,o.default.createElement(d.default,n,t))}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(334),u=a(l),c=n(332),d=a(c);i.propTypes={children:s.PropTypes.node},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.message,n=e.children;return s.default.createElement("div",null,s.default.createElement("p",{
className:l.default.sidebarMessage},t),n)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(1608),l=r(o);i.propTypes={message:a.PropTypes.string.isRequired,children:a.PropTypes.node},t.default=i,e.exports=t.default},function(e,t){"use strict";function n(e){var t=parseFloat(e,10),n=e.match(/m?s/);switch(n&&(n=n[0]),n){case"s":return 1e3*t;case"ms":return t}return 0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){
"use strict";e.exports={defaultSpeed:"0.2s",slowSpeed:"0.6s",fastSpeed:"0.1s",motionEasing:"cubic-bezier(0.6, 0.4, 0.2, 1.4)",menuSpeed:"0.15s",modalSpeed:"0.2s",tooltipSpeed:"0.15s",starSpeed:"0.3s",posterFlipSpeed:"0.8s",selectCircleSpeed:"0.15s"}},function(e,t){e.exports={}},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){var i,r,a="";return a+=' <h2 class="text-muted">',(r=n.subtitle)?i=r.call(e,{hash:{},data:t}):(r=e&&e.subtitle,i=typeof r===c?r.call(e,{
hash:{},data:t}):r),(i||0===i)&&(a+=i),a+="</h2> "}function s(e,t){var i,r,a="";return a+=" <p>",(r=n.message)?i=r.call(e,{hash:{},data:t}):(r=e&&e.message,i=typeof r===c?r.call(e,{hash:{},data:t}):r),(i||0===i)&&(a+=i),a+="</p> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,l,u="",c="function",d=this;return u+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>',(l=n.title)?o=l.call(t,{hash:{},data:r}):(l=t&&t.title,o=typeof l===c?l.call(t,{hash:{},
data:r}):l),(o||0===o)&&(u+=o),u+="</h1> ",o=n.if.call(t,t&&t.subtitle,{hash:{},inverse:d.noop,fn:d.program(1,a,r),data:r}),(o||0===o)&&(u+=o),u+=" ",o=n.if.call(t,t&&t.message,{hash:{},inverse:d.noop,fn:d.program(3,s,r),data:r}),(o||0===o)&&(u+=o),u+=" </div> </div>"})},function(e,t,n){"use strict";function i(e){if(m){var t=e.node,n=e.children;if(n.length)for(var i=0;i<n.length;i++)v(t,n[i],null);else null!=e.html?t.innerHTML=e.html:null!=e.text&&h(t,e.text)}}function r(e,t){e.parentNode.replaceChild(t.node,e),
i(t)}function a(e,t){m?e.children.push(t):e.node.appendChild(t.node)}function s(e,t){m?e.html=t:e.node.innerHTML=t}function o(e,t){m?e.text=t:h(e.node,t)}function l(){return this.node.nodeName}function u(e){return{node:e,children:[],html:null,text:null,toString:l}}var c=n(599),d=n(365),h=n(629),p=1,f=11,m="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),v=d(function(e,t,n){
t.node.nodeType===f||t.node.nodeType===p&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===c.html)?(i(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),i(t))});u.insertTreeBefore=v,u.replaceChildWithTree=r,u.queueChild=a,u.queueHTML=s,u.queueText=o,e.exports=u},function(e,t,n){"use strict";function i(){r.attachRefs(this,this._currentElement)}var r=n(1984),a=(n(80),n(32)),s={mountComponent:function(e,t,n,r,a){var s=e.mountComponent(t,n,r,a);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(i,e),
s},getNativeNode:function(e){return e.getNativeNode()},unmountComponent:function(e,t){r.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,a){var s=e._currentElement;if(t!==s||a!==e._context){var o=r.shouldUpdateRefs(s,t);o&&r.detachRefs(e,s),e.receiveComponent(t,n,a),o&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(i,e)}},performUpdateIfNecessary:function(e,t,n){return e._updateBatchNumber!==n?void(null!=e._updateBatchNumber&&e._updateBatchNumber!==n+1?a(!1):void 0):void e.performUpdateIfNecessary(t);
}};e.exports=s},function(e,t,n){var i,r;i=[n(3),n(10),n(73),n(6),n(8),n(26)],r=function(e,t,n,i,r,a){"use strict";var s=n.extend({initialize:function(){this.controllers=[]},register:function(e){this.controllers.push(e)},getInstance:function(n,s){s||(s={});var o,l=t.resolve("appModel"),u=l.get("primaryPlayer");o=u&&!s.forceLocal?u.get("protocol")||"legacy":"local";var c=e.find(this.controllers,function(e){var t=o===e.protocol,i=n===e.type||"*"===e.type;return t&&i});if(c)return c.create(n,s);if(s.forceLocal)throw new Error("No player controller found for: "+n);
return a.warn("A player did not match the protocol ("+o+") and type ("+n+")."),r.trigger("show:alert",{type:"error",message:i("Playback of this media is not supported with the selected player.")}),this.getInstance(n,{forceLocal:!0})}});return new s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(37),n(279),n(26),n(81),n(38),n(56)],r=function(e,t,n,i,r,a,s,o){"use strict";function l(t,n){return t?e.reduce(n,function(e,n,i){return t.indexOf(i)===-1&&(e[i]=n),e},{}):n;
}function u(e,t){var n;try{n=e._getStorageKey()}catch(i){n="no storageKey"}r.error("StorageModel ("+n+") "+t)}var c=n.Model.extend({sessionAttrs:[],save:function(t,r,a){var s,o=this.attributes;if(null==t||"object"==typeof t?(s=t,a=r):(s={})[t]=r,a=e.extend({validate:!0},a),s&&!a.wait){if(!this.set(s,a))return!1}else if(!this._validate(s,a))return!1;s&&a.wait&&(this.attributes=e.extend({},o,s)),void 0===a.parse&&(a.parse=!0);var u=this,c=a.success;a.success=function(){u.attributes=o,c&&c(u,o,a),u.trigger("sync",u,o,a);
},n.wrapError(this,a);var d=this._getStorage(),h=this._getStorageKey(),p=this.attributes;if(!d.getInstance().persistDefaults){var f=e.result(this,"defaults");p=i(f,p)}var m=e.result(this,"sessionAttrs");p=l(m,p);var v=this.serialize(p),g=d.set(h,v);return g.done(a.success).fail(a.error),s&&a.wait&&(this.attributes=o),g},populate:function(){return this.populatePromise||(this.populatePromise=this.fetch.apply(this,arguments)),this.populatePromise},fetch:function(t){t=t?e.clone(t):{},void 0===t.parse&&(t.parse=!0);
var i=this,r=t.success;t.success=function(e){return!!i.set(i.parse(e,t),t)&&(r&&r(i,e,t),void i.trigger("sync",i,e,t))},n.wrapError(this,t);var a=this._getStorage().get(this._getStorageKey());return a.done(t.success).fail(t.error),this.populatePromise=a,a},destroy:function d(t){t=t?e.clone(t):{};var i=this,r=t.success,d=function(){i.trigger("destroy",i,i.collection,t)};t.success=function(e){t.wait&&d(),r&&r(i,e,t),i.trigger("sync",i,e,t)},n.wrapError(this,t);var a=this._getStorage().remove(this._getStorageKey());
return a.done(t.success).fail(t.error),t.wait||d(),a},serialize:function(e){var t="";try{t=JSON.stringify(e)}catch(n){u(this,"serialization error: "+n.message)}return t},parse:function(t){var n;if(null==t)return n;if(e.isObject(t))return t;try{n=JSON.parse(t);var i=e.result(this,"sessionAttrs");n=l(i,n)}catch(r){var a=e.isString(t)?t.substring(0,50):"no response";u(this,"parse error: "+r.message+" ("+a+")")}return n},sync:function(){throw new Error("storage model doesn`t allow syncing to server");
},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void s(!1,"This model is already capturing events");var t=this.set,n={};this.set=function(i,r,a){var s;"object"==typeof i?(s=i,a=r):(s={})[i]=r;var o=e.extend({},a,{silent:!0}),l=t.call(this,s,o);return e.extend(n,this.changed),l},this.releaseCapturedChangeEvents=function(){e.each(n,function(e,t){this.trigger("change:"+t,this,e)},this),e.isEmpty(n)||this.trigger("change",this,{}),n={},this.set=t,this.releaseCapturedChangeEvents=null;
}},_getStorageKey:function(){var t=e.result(this,"storageKey");if(!t)throw new Error("storageKey is required");return t},_getStorage:function(){return a}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(53),a=i(r),s=n(64),o=i(s),l=n(25),u=i(l),c=n(55),d=i(c),h=u.default.extend({name:"MetadataCollection",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey"],
model:d.default,url:function(){return this.containerKey},augmentResponseText:function(e,t){return t===o.default.xml?a.default.replaceMetadataXMLElementNames(e):e},splitByType:function(){var e={};return this.each(function(t){var n=t.get("type");e.hasOwnProperty(n)?e[n].push(t):e[n]=[t]}),e}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(5),l=i(o),u=n(223),c=i(u),d=n(22),h=r(d),p={
getCollectionName:function(){return this.collectionName||"items"},getCollection:function(){return this.get(this.getCollectionName())},getTotalSize:function(){return this.get("totalSize")||this.get("populatedRange").size},getPaginatedUrl:function(e){var t=this.get("currentPageStart"),n=this.get("currentPageSize");if(null!=t||null!=n){var i={"X-Plex-Container-Start":t||0,"X-Plex-Container-Size":n||0};return h.join(e,i)}return e},getCollectionChangeEvents:function(){var e=this.getCollectionName(),t=["change:"+e+".update","change:"+e+".reset"];
return t.join(" ")},startPopulatedRangeMonitor:function(){this.updatePopulatedRange(),this.on(this.getCollectionChangeEvents(),this.updatePopulatedRange,this)},stopPopulatedRangeMonitor:function(){this.off(this.getCollectionChangeEvents(),this.updatePopulatedRange,this)},fetchRange:function(e){var t=s.default.extend({},e,{remove:!1});return e.prepend&&(t.at=0),this.set({currentPageStart:e.start,currentPageSize:e.size}),this.fetch(t).promise()},populateRange:function(e){var t=this.getCollection(),n=this.get("populatedRange"),i=c.default.difference(e,n)[0];
if(!i)return l.default.Deferred().resolve().promise();if(i=c.default.degap(i,n),this.hasPendingPopulate()){var r=this.get("currentPageStart")!==i.start,a=this.get("currentPageSize")!==i.size;if(!r&&!a)return this.populatePromise;this.abortPendingPopulate()}if(e.reloadThreshold&&i.size>e.reloadThreshold)return t.reset(),this.populateRange(s.default.omit(e,"reloadThreshold"));var o=s.default.extend({},e,i,{prepend:i.start<n.start});return this.fetchRange(o)},repopulateRange:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=this.get("populatedRange").end;
return e||t?(this.set({currentPageStart:0,currentPageSize:Math.max(t,e)}),this.abortPendingPopulate(),this.fetch()):l.default.Deferred().resolve().promise()},updatePopulatedRange:function(){var e=this.get("currentPageStart"),t=this.get("populatedRange").start,n=this.get("populatedRange").size,i=this.getCollection().length,r=void 0;r=n?Math.min(t,null==e?1/0:e):e||t,this.set("populatedRange",{start:r,end:r+i,size:i})}};t.default=p,e.exports=t.default},function(e,t,n){var i;i=function(){"use strict";
var e={AUTO:"auto",AVOID:"avoid",ALWAYS:"always",NEVER:"never"};return e.settings=[{value:e.AUTO,title:"Automatic"},{value:e.AVOID,title:"Only image formats"},{value:e.ALWAYS,title:"Always"}],e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i;i=function(){"use strict";var e={CREATED:0,PROGRESS:1,MATCHING:2,DOWNLOADING_METADATA:3,LOADING_METADATA:4,PROCESSED:5,ANALYZING:6,DELETED:9};return e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){"use strict";function i(e){return e?e<60?(0,
s.default)("{1} sec left",Math.ceil(e)):(0,s.default)("{1} min left",Math.ceil(e/60)):""}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.episodePrefix||"E{1}",n=e.episodeIndex;return n>0||0===n?(e.noLeadingZero||(n=(0,c.default)(n)),(0,l.default)(t,n)):e.date?(0,s.default)(e.date).format("M/D/YY"):""}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a),o=n(6),l=r(o),u=n(291),c=r(u);
t.default=i,e.exports=t.default},function(e,t,n){var i;i=function(){"use strict";var e="placeholder-standard",t="placeholder-square",n="placeholder-widescreen",i="placeholder-folder",r="placeholder-friend",a={movie:e,show:e,season:e,episode:n,artist:t,album:t,track:t,photo:t,photoAlbum:t,clip:n,userPlaylistItem:n,playlist:t,playlistFolder:t,channel:t,channelDirectory:t,folder:i,friend:r,device:t,poster:e,art:n,banner:n};return a}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i;i=function(){
"use strict";var e={sizes:{movie:"portrait",show:"portrait",season:"portrait",episode:"landscape",artist:"square",album:"square",track:"square",photo:"square",photoAlbum:"square",clip:"landscape",playlist:"square",playlistFolder:"square",userPlaylistItem:"landscape",channel:"square",channelDirectory:"square",folder:"portrait",friend:"square",poster:"portrait",art:"landscape",banner:"banner"},ratios:{portrait:1/1.5,square:1,landscape:16/9,banner:5.2},getRatioByType:function(e){return this.ratios[this.sizes[e]];
},getPosterWidthUsingRatio:function(e,t){return Math.round(this.ratios[e]*t)},getPosterHeightUsingRatio:function(e,t){return Math.round(this.ratios[e]&t)},getPosterWidth:function(e,t){return Math.round(t*this.getRatioByType(e))},getPosterHeight:function(e,t){return Math.round(t/this.getRatioByType(e))}};return e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t){"use strict";function n(e,t,n){return null==n&&(n=e+"s"),1===t?e:n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,
e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(22),n(26),n(102),n(445),n(448)],r=function(e,t,n,i,r,a){"use strict";var s={extensions:{dash:".mpd",hls:".m3u8",http:""},logParams:function(t,i){n.group("[Transcoder] %s options",t),e.forEach(i,function(e,t){return n.info("%s: %s",t,e)}),n.groupEnd()},serializeParams:function(n,i){var r,a={},s={},o=/^X-Plex/;return e.each(n,function(e,t){o.test(t)?s[t]=e:a[t]=e}),a=t.stringifyParams(a),s=t.stringifyParams(s),r=a&&s?a+"&"+s:a||s},image:function(t,n,r){
if(!n)return"";var a,s=r.fallbackServer,o=!1;if(s&&s.get("isConnected")){var l=s.get("isFullServer"),u=s.get("activeConnection").get("isPossiblyCrossNetworkProtected");a=l&&!u?s:null}if(a)if(t.get("cloud"))o=!0;else if(!t.get("isFullServer")){var c=!t.get("activeConnection").get("isPrivate"),d=a.get("activeConnection").get("isPrivate");o=c||d}var h=o?a:t,p=h.id===t.id;t.get("cloud")&&(n=o?a.resolveUrl(n,{appendToken:!0}):t.resolveUrl(n,{appendToken:!0,connection:new i({scheme:"https",address:"node.plexapp.com",
port:"32443"})}));var f={url:t.resolveUrl(n,{useLoopback:p,appendToken:!0}),width:r.width&&Math.round(parseFloat(r.width)),height:r.height&&Math.round(parseFloat(r.height))};r.minSize&&(f.minSize=1),r.format&&(f.format=r.format),r.quality&&(f.quality=r.quality),r.filters&&e.each(r.filters,function(e,t){void 0!==e&&(f[t]=e)});var m="/photo/:/transcode?"+this.serializeParams(f,h);return h.resolveUrl(m,{appendToken:!0})},music:function(t,n,i){var r=e.first(n.get("Media"));if(r){var a=e.first(r.Part);
if(a){var s,o;return t.supports("universalMusicTranscoder")?(s=e.extend({path:t.resolveUrl(n.get("key"),{useLoopback:!0}),mediaIndex:0,partIndex:0},i),o="/music/:/transcode/universal/start.mp3"):(s={identifier:n.get("identifier"),url:t.resolveUrl(a.key,{useLoopback:!0}),format:"mp3",audioCodec:"libmp3lame",audioBitrate:320,audioSamples:44100},o="/music/:/transcode/generic.mp3"),this.logParams("Music",s),s=e.extend(s,t.getHeaders()),t.resolveUrl(o+"?"+this.serializeParams(s,t))}}},video:function(t,n,i,s,o){
o||(o={});var l=t.id===n.server.id,u=n.server.get("cloud")?t:n.server,c=e.extend({path:u.resolveUrl(n.get("key"),{useLoopback:l,appendToken:!l}),mediaIndex:r(n,i.id),partIndex:a(i,s.key),protocol:"hls",offset:0,fastSeek:1,directPlay:0,directStream:1,subtitleSize:100,audioBoost:100},o);c.path=c.path.replace(/^http[s]?:\/\/node.plexapp.com:[\d]+\//,t.url()),this.logParams("Video",c);var d=n.get("indirectHttpHeaders");d&&(c.httpCookies=d.Cookie,c.userAgent=d["User-Agent"]),c=e.extend(c,t.getHeaders());
var h=this.extensions[c.protocol],p="/video/:/transcode/universal/start"+h;return t.resolveUrl(p+"?"+this.serializeParams(c,t))}};return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3)],r=function(e){"use strict";function t(e,t){var n=t.constructor.prototype.validate;return n?n(e):[]}function n(e){var n=this.panes[e],i=a.call(this,n);return 0===t.call(this,i,n).length}function i(e,t){return e.concat(this.panes[t].dependentPanes||[])}function r(){var t=this.$(".change-pane-btn");
t.addClass("disabled").removeClass("selected"),e.each(this.getReachablePanes(),function(e){t.filter("."+e+"-btn").removeClass("disabled")},this),t.filter("."+this.selectedPane+"-btn").addClass("selected")}function a(e){return this[e.model]||this[this.panesModel]||this.model}var s={showPane:function(t){if(t!==this.selectedPane){var n=this.paneRegion.currentView;n&&(this.stopListening(n,"valid",r),this.stopListening(n,"invalid",r),this.$el.removeClass("pane-"+this.selectedPane),this.onPaneHide&&this.onPaneHide(this.selectedPane,n)),
this.selectedPane=t;var i=this.panes[t],s=i.constructor,o=this.paneConstructorArg?this.paneConstructorArg():{},l=new s(e.extend(o,{model:a.call(this,i)}));if(l.onModalClose){this._paneOnModalCloseCallbacks||this.listenToOnce(this,"close",function(){e.each(this._paneOnModalCloseCallbacks,function(e){e[1].call(e[0])},this),this._paneOnModalCloseCallbacks=null});var u=this._paneOnModalCloseCallbacks||[];u.push([l,l.onModalClose]),this._paneOnModalCloseCallbacks=e.uniq(u,function(e){return e[1]})}this.listenTo(l,"valid",r),
this.listenTo(l,"invalid",r),r.call(this),this.onPaneShow&&this.onPaneShow(t,l),this.$el.addClass("pane-"+t),this.paneRegion.show(l),r.call(this)}},getReachablePanes:function(){for(var t,r,a=e.reduce(this.panes,function(t,n){return e.union(t,n.dependentPanes||[])},[]),s=e.filter(e.keys(this.panes),function(t){return!e.contains(a,t)}),o=s;o.length;)t=e.filter(o,n,this),r=r||t.length!==o.length,o=e.reduce(t,i,[],this),s=s.concat(o);return s.isAnyInvalid=r,s},onChangePaneClick:function(e){e.preventDefault();
var t=this.$(e.currentTarget);t.isDisabled()||this.showPane(t.data("pane"))}};return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(60),n(999)],r=function(e,t){"use strict";var n=e.extend({model:t,url:"/status/sessions/background",parse:function(e){return this.convert(e,"TranscodeJob")}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(35),n(45),n(1003)],r=function(e,t,n,i,r){"use strict";var a=i.extend({whitelistedAttrs:["id","type","title","composite","target","targetTagID","locationID","Status","MediaSettings","Policy","Location","Device"],
saveAttrs:["type","title","target","targetTagID","locationID","MediaSettings","Policy","Location","Device"],defaultCounts:{video:5,audio:50,photo:50},warningCounts:{video:10,audio:100,photo:100},defaults:function(){return{type:42,locationID:-1,Status:{},MediaSettings:{},Policy:{},Location:{},Device:{},children:new r({},{server:this.server,generator:this,parent:this})}},urlRoot:function(){var e=this.playlistID||this.parent.id;return"/playlists/"+e+"/items"},cacheKey:function(e){return this.server&&this.server.getScopedKey(e.id);
},isDirectory:function(){var e=this.get("Location");if(e.uri)return/(playlist\:\/\/|library\:\/\/([\w-]*)\/directory\/)/.test(e.uri)},initialize:function(e,t){this.playlistID=t.playlistID},convert:function(t){var i=e.isObject(t)?t:n.parseXML(t);return i.Item&&(i=i.Item),n.parseInteger(i,["id","version","targetTagID","locationID"]),i.Status&&n.parseInteger(i.Status,["itemsCount","itemsCompleteCount","itemsSuccessfulCount","itemsFailedCount","itemsDisabledCount","totalSize"]),i.Policy&&(n.parseInteger(i.Policy,"value"),
n.parseBoolean(i.Policy,"unwatched")),i.MediaSettings&&n.parseInteger(i.MediaSettings,["maxVideoBitrate","videoQuality"]),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs)},cloneDeep:function(){var e=this.toJSON(),n={server:this.server,section:this.section,channel:this.channel,device:this.device,parent:this.parent,skipCache:!0};return new this.constructor(t.extend(!0,{},e),n)||null},getSaveParams:function(t,n){if(e.isEmpty(t)){var r=this.pick(this.saveAttrs),a=r.Policy;
return e.isBoolean(a.unwatched)&&(a.unwatched=a.unwatched?1:0),r.targetTagID&&(delete r.MediaSettings,delete r.Device),{Item:r}}return i.prototype.getSaveParams.apply(this,arguments)},setPolicyDefaultsFor:function(t){var n={scope:this.isDirectory()?"count":"all",unwatched:!1};return"count"===n.scope&&(n.value=this.defaultCounts[t]),e.defaults(this.get("Policy"),n),this},shouldShowPolicyWarning:function(e,t){var n=this.get("Policy").scope;return"count"===n?t>this.warningCounts[e]:"all"===n&&this.isDirectory();
}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(277),n(25),n(1020)],r=function(e,t,n,i){"use strict";var r=n.extend({name:"AgentCollection",context:["server","mediaTypeID","primaryAgentID","relatedAgentID"],model:i,cache:new t,cacheKey:function(){var t=e.result(this,"url");return this.server&&this.server.getScopedKey(t)},url:function(){var e="/system/agents";return this.primaryAgentID?e+"/contributors?mediaType="+this.mediaTypeID+"&primaryAgent="+this.primaryAgentID:this.relatedAgentID?e+"/"+this.relatedAgentID+"/config/"+this.mediaTypeID:this.mediaTypeID?e+"?mediaType="+this.mediaTypeID:e;
},hasExclusiveAgent:function(t){return!!e.intersection(this.pluck("identifier"),t).length}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(74),o=r(s),l=n(52),u=a(l),c=(0,o.default)(u.POPULATE_METADATA_LIST_RANGE);t.populateMetadataListRange=c;var d=(0,o.default)(u.REPOPULATE_METADATA_LIST_RANGE);t.repopulateMetadataListRange=d;var h=(0,o.default)(u.PLAY_METADATA_LIST);
t.playMetadataList=h;var p=(0,o.default)(u.ADD_METADATA_LIST_TO_PLAYLIST);t.addMetadataListToPlaylist=p;var f=(0,o.default)(u.SYNC_METADATA_LIST);t.syncMetadataList=f;var m=(0,o.default)(u.OPTIMIZE_METADATA_LIST);t.optimizeMetadataList=m;var v=(0,o.default)(u.SELECT_METADATA_LIST_ITEM);t.selectMetadataListItem=v;var g=(0,o.default)(u.DESELECT_METADATA_LIST_ITEM);t.deselectMetadataListItem=g;var y=(0,o.default)(u.DESELECT_ALL_METADATA_LIST_ITEMS);t.deselectAllMetadataListItems=y;var b=(0,o.default)(u.PLAY_METADATA_LIST,function(e){
return i({},e,{shuffle:!0})});t.shuffleMetadataList=b},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(74),o=r(s),l=n(52),u=a(l),c=(0,o.default)(u.TEST_SERVER);t.testServer=c;var d=(0,o.default)(u.FETCH_LIBRARIES);t.fetchLibraries=d;var h=(0,o.default)(u.POPULATE_LIBRARIES);t.populateLibraries=h;var p=(0,o.default)(u.ADD_LIBRARY);t.addLibrary=p;var f=(0,o.default)(u.START_LIBRARY_REFRESH);t.startLibraryRefresh=f;
var m=(0,o.default)(u.SHARE_LIBRARIES);t.shareLibraries=m;var v=(0,o.default)(u.ENABLE_HTTP_FALLBACK);t.enableHttpFallback=v;var g=(0,o.default)(u.OPTIMIZE_DATABASE);t.optimizeDatabase=g;var y=(0,o.default)(u.CLEAN_BUNDLES);t.cleanBundles=y;var b=(0,o.default)(u.EMPTY_TRASH);t.emptyTrash=b;var w=(0,o.default)(u.DELETE_SERVER);t.deleteServer=w;var S=(0,o.default)(u.START_LIBRARY_REFRESH,function(e){return i({},e,{force:!0})});t.startLibraryForceRefresh=S;var P=(0,o.default)(u.START_LIBRARY_REFRESH,function(e){
return i({},e,{cancel:!0})});t.cancelLibraryRefresh=P},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(74),s=i(a),o=n(52),l=r(o),u=(0,s.default)(l.REPOPULATE_PAGE);t.repopulatePage=u;var c=(0,s.default)(l.VIEW_ITEM_DETAILS);t.viewItemDetails=c},function(e,t){"use strict";function n(e){return e.experienceSettings}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){
return e.multiSelect}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){var i,r;i=[n(1680),n(3),n(9),n(8)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({className:"alert-bar",template:e,events:{"click .close-btn":"onCloseClick"},initialize:function(e){this.alert=e.alert,this.alert&&this.$el.addClass(this.alert.type)},hide:function(){i.trigger("hide:bar","alertbar")},serializeData:function(){return this.alert},onCloseClick:function(e){e.preventDefault(),
this.hide()}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1709),n(3),n(5),n(9),n(6),n(8),n(22),n(39),n(13),n(55),n(95),n(315),n(314),n(115),n(193),n(191),n(192),n(135)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g){"use strict";var y=i.ItemView.extend({tagName:"ul",className:"dropdown-menu",template:e,ui:{divider:".divider"},events:{"click .play-version-btn":"onPlayVersionClick","click .play-all-btn":"onPlayAllClick","click .play-shuffled-btn":"onPlayShuffledClick",
"click .play-next-btn":"onPlayNextClick","click .add-to-queue-btn":"onAddToQueueClick","click .play-mix-btn":"onPlayMixClick","click .play-primary-extra-btn":"onPlayPrimaryExtraClick","click .add-to-playlist-btn":"onAddToPlaylistClick","click .refresh-btn":"onRefreshClick","click .sync-btn":"onSyncClick","click .convert-btn":"onConvertClick","click .mark-watched-btn":"onMarkWatchedClick","click .mark-unwatched-btn":"onMarkUnwatchedClick","click .watch-later-btn":"onWatchLaterClick","click .share-btn":"onShareClick",
"click .recommend-btn":"onRecommendClick","click .delete-btn":"onDeleteClick","click .info-btn":"onInfoClick","click .download-btn":"onDownloadClick"},initialize:function(e){this.mediaType=o.get(this.model.get("type")),this.mediaActions=new c({},{item:this.model}),n(".dropdown.open .dropdown-toggle").dropdown("toggle")},serializeData:function(){var e,t;if(this.mediaActions.get("showDownload")){e=this.model.getDownloadUrl();var n=this.model.getFilepath();n&&(t=s.getLastSegment(n))}return{downloadUrl:e,
downloadName:t}},getPosition:function(e,t,n){var i=e.position().left;return e.offset().top+this.$el.outerHeight()>t.offset.top+t.outerHeight&&(n-=this.$el.height()-e.height()),e.offset().left+this.$el.outerWidth()>t.offset.left+t.width&&(i-=this.$el.width()-e.outerWidth()),{top:n,left:i}},bindingsModel:"mediaActions",bindings:{".play-version-btn":{modelAttribute:"showPlayVersion",manual:!0,autohide:!0},".play-all-btn":{modelAttribute:"showPlayAll",manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",
manual:!0,autohide:!0},".play-next-btn, .add-to-queue-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".play-mix-btn":{modelAttribute:"showPlayMix",manual:!0,autohide:!0,formatter:function(e,t){if(e){var n=this.model.get("related"),i=n.findWhere({browse:!1}),a=i.get("title");a&&t.text(r("Play {1}",a))}return e}},".play-trailer-btn":{modelAttribute:"showPlayTrailer",manual:!0,autohide:!0},".play-music-video-btn":{modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0},".add-to-playlist-btn":{
modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".refresh-btn":{modelAttribute:"showRefresh",manual:!0,autohide:!0},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",manual:!0,autohide:!0},".download-btn":{modelAttribute:"showDownload",manual:!0,autohide:!0},".watch-later-btn":{
modelAttribute:"showWatchLater",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){var e=this.ui.divider,t=e.prevAll(":not(:has(.hidden))").length,n=e.nextAll(":not(:has(.hidden))").length;e.toggleClass("hidden",!t||!n)},onClose:function(){this.mediaActions.stopListening()},onPlayVersionClick:function(e){
e.preventDefault(),a.trigger("show:modal",new d({model:this.model}))},onPlayAllClick:function(e){e.preventDefault(),l.execute("playMedia",{item:this.model})},onPlayShuffledClick:function(e){e.preventDefault(),l.execute("playMedia",{item:this.model,shuffle:!0})},onPlayPrimaryExtraClick:function(e){e.preventDefault();var n=this.model.server.getSectionForItem(this.model);if(!t.isEmpty(n)){var i=new u({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:n.get("uuid")},{server:this.model.server,
section:this.model.section});l.execute("playMedia",{item:i})}},onPlayNextClick:function(e){return e.preventDefault(),n(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void l.execute("queueMedia",{item:this.model,next:!0})},onAddToQueueClick:function(e){return e.preventDefault(),n(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void l.execute("queueMedia",{item:this.model,next:!1})},onPlayMixClick:function(e){e.preventDefault();var t=this.model.get("related"),n=t.findWhere({
browse:!1});n.set("type","track"),l.execute("playMedia",{item:n})},onAddToPlaylistClick:function(e){return e.preventDefault(),n(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void a.trigger("show:modal",new p({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onRefreshClick:function(e){e.preventDefault(),l.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onMarkWatchedClick:function(e){e.preventDefault(),
l.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),l.execute("markUnwatched",{item:this.model})},onSyncClick:function(e){e.preventDefault(),l.execute("showSyncModal",{item:this.model})},onConvertClick:function(e){e.preventDefault(),a.trigger("show:modal",new g({item:this.model}))},onWatchLaterClick:function(e){e.preventDefault(),l.execute("watchLater",{item:this.model})},onShareClick:function(e){e.preventDefault(),a.trigger("show:modal",new f({model:this.model
}))},onRecommendClick:function(e){e.preventDefault(),a.trigger("show:modal",new v({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),this.model.get("playlistType")?l.execute("deletePlaylist",{item:this.model}):l.execute("deleteItems",{item:this.model,skipRedirect:!0})},onInfoClick:function(e){e.preventDefault(),a.trigger("show:modal",new m({model:this.model}))},onDownloadClick:function(e){e.preventDefault(),this.model.get("Media").length>1?a.trigger("show:modal",new h({model:this.model
})):window.location.href=this.model.getDownloadUrl()}});return y}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1718),n(3),n(5),n(9),n(10)],r=function(e,t,n,i,r){"use strict";var a=i.ItemView.extend({id:"primary-server-dropdown",tagName:"span",className:"dropdown",template:e,events:{"click .dropdown-menu a":"onServerClick"},initialize:function(e){e||(e={});var t=r.resolve("appModel");this.showSharedServers=e.showSharedServers,this.model=t.get("primaryServer"),this.collection=t.get("servers"),
this.listenTo(t,"change:primaryServer",this.render),this.listenTo(this.collection,{"change:friendlyName":this.render,"change:authorized":this.onServerAuthorizedChange})},serializeData:function(){var e=this.collection.reduce(function(e,t){var n=t.get("shared"),i=t.get("sections");if(n&&!(this.showSharedServers&&i&&i.findWhere({allowSync:!0})))return e;var r=t.toJSON();return r.authorized&&!(r.cloud||r.synced||r.isOutOfDate)&&e.push(r),e},[],this);return{showDropdown:e.length>1,servers:e,currentServer:this.model?this.model.toJSON():null
}},onServerAuthorizedChange:function(e,t){t&&this.render()},onServerClick:function(e){e.preventDefault();var t=r.resolve("appModel"),i=n(e.currentTarget).data("id"),a=this.collection.get(i);a&&t.set("primaryServer",a)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(9),n(22),n(83),n(180),n(493),n(492),n(1021),n(125)],r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c=n.Layout.extend({ui:{formGroup:".form-group"},onlyAfterRender:["showValidationResult"],
serializeData:function(){var e={};return this.model.isNew()?e.add=!0:e.edit=!0,e.section=this.model.toJSON(),e},showValidationResult:function(t){var n=this.ui.formGroup;n.removeClass("has-error"),e.each(t,function(e){n.filter("."+e+"-group").addClass("has-error")}),this.trigger(t.length?"invalid":"valid")},createMenuOptions:function(t,n){return e.map(t,function(e){return'<option value="'+e.value+'"'+(e.value===n?" selected":"")+">"+e.label+"</option>"}).join("\n")},getSectionType:function(){if(this.model.sectionType)return this.model.sectionType;
var e=this.model.get("type"),t=r.get(e);return"movie"===e&&"com.plexapp.agents.none"===this.model.get("agent")&&(t=r.get("videos")),this.model.sectionType=t,t},setSectionType:function(e){this.model.sectionType=e},populateAgents:function(){var e=this.getSectionType();return e?(this.model.agents||(this.model.agents=new a([],{server:this.model.server,mediaTypeID:e.typeID})),this.model.agents.populate().then(function(e){return e})):t.Deferred().reject().promise()},populateScanners:function(){var e=this.getSectionType();
return e?(this.model.scanners||(this.model.scanners=new s([],{server:this.model.server,sectionTypeID:e.typeID})),this.model.scanners.populate().then(function(e){return e})):t.Deferred().reject().promise()},populateAgentsProxy:function(){var e=this.getSectionType().exclusiveAgents,n=new o(this.model.agents,e,this.model.get("agent"));return this.model.agentsProxy=n,t.Deferred().resolve(n).promise()},populateScannersProxy:function(){var e=this.getSectionType().exclusiveScanners,n=new l(this.model.scanners,e,this.model.get("scanner"));
return this.model.scannersProxy=n,t.Deferred().resolve(n).promise()},populateSectionSettings:function(){if(!this.model.server.supports("sectionSettings"))return t.Deferred().resolve().promise();if(!this.model.settings){var e=new u([],{server:this.model.server});if(this.model.isNew()){var n={type:this.getSectionType().typeID,agent:this.model.get("agent")};e.url=i.join(["/library/sections/prefs"],n)}else e.url=i.join(["/library/sections/",this.model.id,"/prefs"]);this.model.settings=e}var r=this.model.settings.populate();
return r},populateSectionAgentSettings:function(){if(!this.model.agentSettings){var e=new u([],{server:this.model.server,url:i.join(["/:/plugins/",this.model.get("agent"),"/prefs"])});this.model.agentSettings=e}var t=this.model.agentSettings.populate();return t},onModalClose:function(){this.model.scanners=null,this.model.scannersProxy=null,this.model.agents=null,this.model.agentsProxy=null,this.model.settings=null}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1771),n(3),n(5),n(96),n(47)],
r=function(e,t,n,i,r){"use strict";var a=i.extend({className:"poster-item media-tile-list-item",template:e,ui:{container:".media-poster-container",poster:".media-poster",actions:".media-poster-actions",dropdown:".media-actions-dropdown",subtitle1Fill:".media-subtitle-1-fill",subtitle2Fill:".media-subtitle-2-fill"},initialize:function(e){i.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=this.model.section&&"photo"===this.model.section.get("type")?"photo":this.type,t=150;
"episode"===e?e="show":"clip"!==e&&"userPlaylistItem"!==e||(t=250),this.image=new r({model:this.model,type:e,getUrl:this.getPosterUrl,width:t})},updateDim:function(){var e=this.model.get("mediaState"),t=this.model.get("metadataState"),n=t&&"created"!==t||e,i=!!this.model.get("deletedAt");n||i?this.$el.addClass("dim"):this.$el.removeClass("dim")},bindings:t.extend({},i.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=i.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments);
return"userPlaylistItem"!==this.model.get("type")&&this.ui.subtitle1Fill.toggleClass("hidden",!!t),t}},".media-subtitle-2":{modelAttribute:"index",modelListeners:["index","message"],autohide:!0,formatter:function(e){var t=i.prototype.bindings[".media-subtitle-2"].formatter.apply(this,arguments);return"episode"===this.model.get("type")&&this.ui.subtitle2Fill.toggleClass("hidden",!!t),t}},".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e.length},autohide:function(e){return!/^(clip|userPlaylistItem)$/.test(this.model.get("type"))&&e>1;
}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&(!/^(artist|album)$/.test(this.model.get("type"))&&!!e)}},".analyzing-icon":{modelAttribute:"mediaState",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),e}},".matching-icon":{modelAttribute:"metadataState",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),"matching"===e}},".metadata-icon":{modelAttribute:"metadataState",manual:!0,autohide:!0,
formatter:function(e,t){return this.updateDim(),"processing"===e||"loading"===e}},".trash-icon":{modelAttribute:"deletedAt",manual:!0,autohide:!0,formatter:function(e,t){return this.updateDim(),e}}})});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1814),n(3),n(5),n(10),n(802),n(832),n(858),n(22),n(44),n(13),n(95)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";function d(e){var n=t.reject(e,function(e){return 0===e.id}),i=t.sortBy(n,"streamType");return t.map(i,function(e){
return g(e,"streamType")})}function h(e){return t.map(e.get("Media"),function(e){return t.extend(g(e,"Part"),{Part:t.map(e.Part,function(e){return t.extend(g(e,"Stream"),{file:e.file,exists:e.exists,accessible:e.accessible,Stream:d(e.Stream)})})})})}var p=["id","key","index","videoCodec","audioCodec","audioChannels","default","selected","languageCode","codecID","accessible","exists","provider","lines","minLines","follow","requiredBandwidths","deepAnalysisVersion","deepAnalysisDate"],f={size:a.formatBytes,
duration:r.formatPlayerTime,codec:s.toUpperCase,format:s.toUpperCase,container:s.toUpperCase,videoResolution:a.formatResolution,channels:a.formatAudioChannels,level:a.formatVideoLevel,bitrateMode:s.toUpperCase,accessible:s.formatBoolean,exists:s.formatBoolean,optimizedForStreaming:s.formatBoolean,timed:s.formatBoolean,file:o.getLastSegment},m={optimizedForStreaming:"Web Optimized",has64bitOffsets:"Has 64bit Offsets",cabac:"CABAC",postURL:"URL"},v={frameRate:" fps",dialogNorm:" dB",bitrate:" kbps",
samplingRate:" Hz"},g=function(e,n){var i={properties:[]};for(var r in e)if(r!==n&&t.indexOf(p,r)===-1){var a=m[r],o=e[r];f[r]&&(o=f[r](o)),o&&(v[r]&&(o+=v[r]),a||(a=s.formatPropertyLabel(r)),i.properties.push({name:a,value:o}))}return n&&e&&(i[n]=e[n]),i},y=l.extend({name:"mediaInfoModal",className:"media-info-modal modal modal-lg fade",template:e,ui:{scroller:".modal-body-scroll",files:".files > ul",stickyProps:".media > .props, .part > .props"},events:t.extend({"click .delete-btn":"onDeleteClick"
},l.prototype.events),modelEvents:{"change:Media":"onMediaChange"},initialize:function(e){l.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("onMediaChange","onScroll"),this.loading=!1,this.media=h(this.model),this.mediaActions=new c({},{item:this.model}),this.hasStreams()||(this.loading=!0,this.model.fetch().always(this.whenRendered(function(){this.model.changed.hasOwnProperty("Media")||this.updateMedia()})))},serializeData:function(){var e=this.model.get("key"),t=i.resolve("appModel"),n=t.get("user"),r=this.model.server;
return this.model.get("isLibraryItem")&&(e=o.join(e,{checkFiles:1,includeExtras:1})),{key:e,url:this.model.server.resolveUrl(e,{appendToken:!0}),media:this.media,hasFiles:this.hasFiles(),hasStreams:this.hasStreams()||this.loading,showDeleteFile:r.supports("specificMediaDeletion"),showFilepath:!r.get("shared")||n.isNinja(),loading:this.loading}},updateMedia:function(){this.loading=!1,this.rerender=!0,this.ui.scroller.off("scroll",this.onScroll),this.media=h(this.model),this.render()},hasFiles:function(){
return!!t.chain(this.media).pluck("Part").flatten().pluck("file").compact().size().value()},hasStreams:function(){return!!t.chain(this.media).pluck("Part").flatten().pluck("Stream").flatten().size().value()},bindingsModel:"mediaActions",bindings:{".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0}},onRender:function(){l.prototype.onRender.apply(this,arguments),this.ui.scroller.on("scroll",this.onScroll),this.$el.tooltip({selector:".files .label",placement:"bottom"})},onClose:function(){
this.ui.scroller.off("scroll",this.onScroll)},onMediaChange:function(){if(!this.isHidden)return this.model.get("Media").length?void this.updateMedia():void this.hide()},onDeleteClick:function(e){e.preventDefault(),u.execute("deleteMediaItem",{item:this.model,index:n(e.currentTarget).data("media-item")})},onScroll:function(){var e=this.ui.scroller.scrollTop(),t=this.ui.scroller.offset().top;return this.ui.files.length&&(t+=parseInt(this.ui.files.css("margin-bottom"),10)),t<0?void setTimeout(this.onScroll,500):void this.ui.stickyProps.each(function(){
var i=n(this),r=i.parent().height()-i.height(),a=e-this.parentNode.offsetTop,s=Math.min(Math.max(a,0),r);s&&s===a?(i.addClass("sticky"),i.css("top",t)):(i.removeClass("sticky"),i.css("top",s))})}});return y}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1817),n(5),n(3),n(10),n(13),n(44),n(97),n(1234)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=s.extend({name:"recommendModal",className:"recommend-modal select-modal modal modal-sm fade",template:e,playlistIDs:null,ui:{sendBtn:".send-btn",
messageContainer:".message-container",message:".message"},regions:{list:".friends-container"},events:n.extend({"click .friend":"onFriendClick","click .friends-btn":"onFriendsClick","click .send-btn":"onSendClick"},a.prototype.events),initialize:function(){s.prototype.initialize.apply(this,arguments);var e=i.resolve("appModel"),t=e.get("user");this.collection=t.get("friends").filterByUnrestricted(),this.playlistIDs=[]},serializeData:function(){return{hasFriends:!!this.collection.length}},onRender:function(){
s.prototype.onRender.apply(this,arguments),this.list.show(new o({collection:this.collection}))},onClose:function(){this.collection.destroy()},onFriendClick:function(e){e.preventDefault();var i=t(e.currentTarget),r=i.data("id");i.hasClass("selected")?this.playlistIDs.splice(n.indexOf(this.playlistIDs,r),1):this.playlistIDs.push(r),i.toggleClass("selected"),this.playlistIDs.length?(this.ui.sendBtn.removeClass("disabled"),this.ui.messageContainer.removeClass("invisible")):(this.ui.sendBtn.addClass("disabled"),
this.ui.messageContainer.addClass("invisible"))},onFriendsClick:function(e){this.hide()},onSendClick:function(e){e.preventDefault();var t=this.ui.sendBtn;if(!t.isDisabled()){t.addClass("active");var i={item:this.model,playlistIDs:this.playlistIDs,message:this.ui.message.val()},a=r.execute("recommend",i);a.done(n.bind(this.onSendSuccess,this)),a.fail(n.bind(this.onSendError,this))}},onSendSuccess:function(){this.hide()},onSendError:function(){this.ui.sendBtn.removeClass("active")}});return l}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1823),n(5),n(3),n(10),n(13),n(44),n(97)],r=function(e,t,n,i,r,a,s){"use strict";var o=s.extend({name:"shareModal",className:"share-modal select-modal modal modal-sm fade",template:e,linkedNetworks:null,networkIDs:null,maxLength:null,ui:{shareBtn:".share-btn",messageContainer:".message-container",charactersRemaining:".characters-remaining",message:".message"},events:n.extend({"click .network":"onNetworkClick","keyup .message":"onMessageKeyUp",
"click .share-btn":"onShareClick"},a.prototype.events),initialize:function(){s.prototype.initialize.apply(this,arguments);var e=i.resolve("appModel");this.user=e.get("user"),this.socialNetworks=this.user.get("socialNetworks"),this.linkedNetworks=this.socialNetworks.where({linked:!0}),this.autoSelect=1===this.linkedNetworks.length,this.networkIDs=[]},serializeData:function(){for(var e=[],t=0,n=this.linkedNetworks.length;t<n;t++)e.push(this.linkedNetworks[t].toJSON());return{networks:e,accountUrl:this.user.server.get("accountUrl"),
autoSelect:this.autoSelect}},calculateMaxLength:function(){var e=null,t=this.socialNetworks;n.each(this.networkIDs,function(n){var i=t.get(n),r=i.get("maxLength")||null;(null===e||e>r)&&(e=r)}),this.maxLength=e,this.calculateCharactersRemaining()},calculateCharactersRemaining:function(){var e=this.ui.message.val(),t=this.maxLength-e.length;return null===this.maxLength?void this.ui.charactersRemaining.addClass("hidden"):(t<0?(this.ui.charactersRemaining.addClass("error").removeClass("hidden"),this.ui.shareBtn.addClass("disabled")):(this.ui.charactersRemaining.removeClass("error hidden"),
this.ui.shareBtn.removeClass("disabled")),void this.ui.charactersRemaining.text(this.maxLength-e.length))},onRender:function(){s.prototype.onRender.apply(this,arguments),this.autoSelect&&(this.networkIDs.push(this.linkedNetworks[0].id),this.calculateMaxLength())},onNetworkClick:function(e){e.preventDefault();var i=t(e.currentTarget),r=i.data("id");i.hasClass("selected")?this.networkIDs.splice(n.indexOf(this.networkIDs,r),1):this.networkIDs.push(r),i.toggleClass("selected"),this.networkIDs.length?(this.ui.shareBtn.removeClass("disabled"),
this.ui.messageContainer.removeClass("invisible")):(this.ui.shareBtn.addClass("disabled"),this.ui.messageContainer.addClass("invisible")),this.calculateMaxLength()},onMessageKeyUp:function(e){this.calculateCharactersRemaining()},onShareClick:function(e){e.preventDefault();var t=this.ui.shareBtn;if(!t.isDisabled()){t.addClass("active");var i={item:this.model,networkIDs:this.networkIDs,message:this.ui.message.val()},a=r.execute("share",i);a.done(n.bind(this.onShareSuccess,this)),a.fail(n.bind(this.onShareError,this));
}},onShareSuccess:function(){this.hide()},onShareError:function(){this.ui.shareBtn.removeClass("active")}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1853),n(3),n(5),n(10),n(54),n(44),n(1275),n(1273),n(1272)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=a.extend({name:"userSelectModal",className:"user-select-modal modal modal-transparent fade",template:e,transparent:!0,panes:{users:s,pin:o},regions:{content:".modal-content",alertBar:".modal-alert"},initialize:function(e){
a.prototype.initialize.apply(this,arguments);var t=i.resolve("appModel");this.options=e,this.isForced=e.isForced,this.user=t.get("user"),this.promise=n.Deferred()},showPane:function(e,n){this.currentPane&&this.stopListening(this.currentPane);var i=this.panes[e],r=new i(t.extend({},this.options,n));return this.listenTo(r,{"change:pane":this.onChangePane,resolve:this.onResolve,reject:this.onReject}),this.currentPane=r,this.content.show(r),r},showAlertBar:function(){var e=r.get("alerts");r.set("alerts",null);
var n=new l({alert:t.first(e)});this.alertBar.show(n)},onRender:function(){a.prototype.onRender.apply(this,arguments),this.model?this.showPane("pin",{focusDelay:this.focusDelay}):this.showPane("users"),this.showAlertBar()},onHide:function(e){a.prototype.onHide.apply(this,arguments),"pending"===this.promise.state()&&this.promise.reject()},onChangePane:function(e,t){this.showPane(e,t)},onResolve:function(e){return r.has("continueUrl")&&!this.options.isEditing?void(window.location=r.get("continueUrl")):(this.promise.resolve(e),
void this.hide())},onReject:function(){this.promise.reject(),this.hide()}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,t){o(this,n),r(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.hasBlurred=!1}return a(n,t),s(n,[{key:"componentWillMount",value:function(){this.initializeInputState(this.props,this.context)}},{key:"componentWillReceiveProps",value:function(e,t){(0,b.default)(t.formState,this.context.formState)||this.handleStateChange(e,t);
}},{key:"shouldComponentUpdate",value:function(e,t,n){var i=n.formState,r=e.name,a=!!i[r];return a||this.initializeInputState(e,n),a}},{key:"initializeInputState",value:function(e,t){var n=t.onInputChange,i=e.name,r=e.initialValue;n(l({},i,{errors:[],showErrors:!1,value:r}))}},{key:"handleStateChange",value:function(e,t,n){var i=t.onInputChange,r=t.formState,a=e.name,s=r[a],o=null!=n?n:s.value,u=this.calculateErrors(o,r,e);s.value===o&&h.default.isEqual(s.errors,u)||i(l({},a,{errors:u,showErrors:this.hasBlurred&&0!==u.length,
value:o}))}},{key:"calculateErrors",value:function(e,t,n){var i=n.validations,r=i.map(function(n){return n(e,t)}).filter(function(e){return null!=e});return r}},{key:"onChange",decorators:[m.autobind],value:function(e){this.handleStateChange(this.props,this.context,e)}},{key:"onBlur",decorators:[m.autobind],value:function(){if(!this.hasBlurred){this.hasBlurred=!0;var e=this.context,t=e.onInputChange,n=e.formState,i=this.props.name,r=n[i],a=this.calculateErrors(r.value,n,this.props);t(l({},i,u({},r,{
errors:a,showErrors:0!==a.length})))}}},{key:"render",value:function(){var t=this.props,n=t.name,i=t.errors,r=this.context.formState[n];if(!r)return null;var a=i.length>0,s=r.value,o=r.errors,l=r.showErrors;return f.default.createElement(e,u({},this.props,{showErrors:!!a||l,errors:a?i:o,value:s,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur}))}}]),n}(p.Component);return t.displayName="FormInput("+(0,g.default)(e)+")",t.WrappedComponent=e,t.propTypes={name:p.PropTypes.string.isRequired,
initialValue:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.bool]).isRequired,errors:p.PropTypes.arrayOf(p.PropTypes.string),validations:p.PropTypes.arrayOf(p.PropTypes.func)},t.contextTypes={formState:p.PropTypes.object,onInputChange:p.PropTypes.func},t.defaultProps={validations:[],errors:[]},t}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(49).default,u=n(11).default,c=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),h=c(d),p=n(7),f=c(p),m=n(23),v=n(304),g=c(v),y=n(306),b=c(y);
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.contentClassName,n=e.iconClassName,i=e.titleClassName,s=e.descriptionClassName,o=e.footerClassName,u=e.children,d=e.kind,h=e.icon,f=e.title,v=e.description,y=e.footer,b=r(e,["contentClassName","iconClassName","titleClassName","descriptionClassName","footerClassName","children","kind","icon","title","description","footer"]);return l.default.createElement(m.default,a({className:g.default.emptyPage},b),l.default.createElement("div",{
className:t},!!h&&l.default.createElement(p.default,{name:h,className:(0,c.default)(g.default[d],n)}),!!f&&l.default.createElement("div",{className:i},f),!!v&&l.default.createElement("div",{className:s},v),u),!!y&&l.default.createElement("div",{className:o},y))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(41),h=n(48),p=s(h),f=n(84),m=s(f),v=n(1586),g=s(v);i.propTypes={contentClassName:o.PropTypes.string,iconClassName:o.PropTypes.string,
titleClassName:o.PropTypes.string,descriptionClassName:o.PropTypes.string,footerClassName:o.PropTypes.string,children:o.PropTypes.node,icon:o.PropTypes.string,kind:o.PropTypes.oneOf(d.kinds.all),title:o.PropTypes.string,description:o.PropTypes.string,footer:o.PropTypes.string},i.defaultProps={contentClassName:g.default.content,iconClassName:g.default.icon,titleClassName:g.default.title,descriptionClassName:g.default.description,footerClassName:g.default.footer,kind:d.kinds.DEFAULT},t.default=i,e.exports=t.default;
},function(e,t,n){"use strict";function i(e,t){if(t)switch(t){case F.default.PRE_PLAY:switch(e){case"season":return[j,Q];case"episode":return[j,K];case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":return[V]}break;case F.default.CONTINUE_WATCHING:switch(e){case"movie":return[j,X,H];case"clip":return[j,X];case"episode":return[z,X,J]}break;case F.default.SEARCH_ALL_SERVERS:switch(e){case"movie":return[j,H,ee,ne];case"show":return[j,Y,ee,ne];case"episode":return[z,j,W,ee,ne];case"actor":return[te,ee,ne];
case"genre":return[te,ee,ne];case"director":return[te,ee,ne];case"artist":return[j,G,ee,ne];case"album":return[B,j,ee,ne];case"track":return[z,ee,V,ne];case"photo":return[V,q,ee,ne];case"photoAlbum":return[j,q,ee,ne];case"clip":return[j,q,ee,ne];case"playlist":return[j,$,ee,ne]}break;case F.default.SEARCH:switch(e){case"movie":return[j,H,ee];case"show":return[j,Y,ee];case"episode":return[z,j,W,ee];case"actor":return[te,ee];case"genre":return[te,ee];case"director":return[te,ee];case"artist":return[j,G,ee];
case"album":return[B,j,ee];case"track":return[z,ee,V];case"photo":return[V,q,ee];case"photoAlbum":return[j,q,ee];case"clip":return[j,q,ee];case"playlist":return[j,$,ee]}break;case F.default.QUICK_SEARCH:switch(e){case"movie":return[V,H];case"show":return[V,Y];case"episode":return[V,z];case"artist":return[V,G];case"album":return[V,B];case"track":return[V,Z];case"photo":return[V,q];case"photoAlbum":return[V,q];case"clip":return[V,q];case"playlist":return[V,$];default:return[V,ee]}}switch(e){case"movie":
return[j,H];case"show":return[j,Y];case"season":return[B,j];case"episode":return[z,j,W];case"artist":return[j];case"album":return[B,j];case"track":return[z,V];case"photo":return[V];case"photoAlbum":return[j];case"clip":return[j];case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":return[z,V];default:return[V]}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(1364),s=r(a),o=n(324),l=r(o),u=n(1374),c=r(u),d=n(1366),h=r(d),p=n(548),f=r(p),m=n(1368),v=r(m),g=n(1367),y=r(g),b=n(1372),w=r(b),S=n(1365),P=r(S),x=n(1370),C=r(x),T=n(1371),_=r(T),E=n(1369),k=r(E),I=n(1373),A=r(I),M=n(549),D=r(M),R=n(557),O=r(R),L=n(1375),N=r(L),U=n(98),F=r(U),j={
key:"titleLink",component:l.default,selectProps:function(e){var t=e.server,n=e.metadataKey,i=e.title;return{server:t,linkKey:n,linkTitle:i}}},B={key:"parentTitleLink",component:l.default,selectProps:function(e){var t=e.server,n=e.parentKey,i=e.parentTitle;return{server:t,linkKey:n,linkTitle:i}}},z={key:"grandparentTitleLink",component:l.default,selectProps:function(e){var t=e.server,n=e.grandparentKey,i=e.grandparentTitle;return{server:t,linkKey:n,linkTitle:i}}},V={key:"title",component:s.default
},H={key:"year",component:c.default},q={key:"addedDate",component:h.default,selectProps:function(e){var t=e.addedAt;return{date:1e3*t}}},W={key:"seasonEpisodeIndex",component:f.default},K={key:"episodeIndex",component:v.default},Q={key:"episodeCount",component:y.default},Y={key:"seasonCount",component:w.default},G={key:"albumCount",component:P.default},$={key:"itemCount",component:C.default},X={key:"minutesLeft",component:_.default},J={key:"continueWatchingEpisode",component:k.default},Z={key:"trackParents",
component:A.default},ee={key:"searchReason",component:O.default},te={key:"tagTitleLink",component:D.default},ne={key:"serverNameLink",component:N.default};e.exports=t.default},function(e,t,n){e.exports={"default":n(1482),__esModule:!0}},function(e,t,n){"use strict";var i=n(249),r=n(358),a=n(362),s=n(620),o=n(622),l=n(32),u={},c=null,d=function(e,t){e&&(r.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},h=function(e){return d(e,!0)},p=function(e){return d(e,!1)},f={injection:{
injectEventPluginOrder:i.injectEventPluginOrder,injectEventPluginsByName:i.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?l(!1):void 0;var r=u[t]||(u[t]={});r[e._rootNodeID]=n;var a=i.registrationNameModules[t];a&&a.didPutListener&&a.didPutListener(e,t,n)},getListener:function(e,t){var n=u[t];return n&&n[e._rootNodeID]},deleteListener:function(e,t){var n=i.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=u[t];r&&delete r[e._rootNodeID];
},deleteAllListeners:function(e){for(var t in u)if(u[t][e._rootNodeID]){var n=i.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete u[t][e._rootNodeID]}},extractEvents:function(e,t,n,r){for(var a,o=i.plugins,l=0;l<o.length;l++){var u=o[l];if(u){var c=u.extractEvents(e,t,n,r);c&&(a=s(a,c))}}return a},enqueueEvents:function(e){e&&(c=s(c,e))},processEventQueue:function(e){var t=c;c=null,e?o(t,h):o(t,p),c?l(!1):void 0,a.rethrowCaughtError()},__purge:function(){u={}},__getListenerBank:function(){
return u}};e.exports=f},function(e,t,n){"use strict";function i(e,t,n){var i=t.dispatchConfig.phasedRegistrationNames[n];return b(e,i)}function r(e,t,n){var r=t?y.bubbled:y.captured,a=i(e,n,r);a&&(n._dispatchListeners=v(n._dispatchListeners,a),n._dispatchInstances=v(n._dispatchInstances,e))}function a(e){e&&e.dispatchConfig.phasedRegistrationNames&&m.traverseTwoPhase(e._targetInst,r,e)}function s(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?m.getParentInstance(t):null;
m.traverseTwoPhase(n,r,e)}}function o(e,t,n){if(n&&n.dispatchConfig.registrationName){var i=n.dispatchConfig.registrationName,r=b(e,i);r&&(n._dispatchListeners=v(n._dispatchListeners,r),n._dispatchInstances=v(n._dispatchInstances,e))}}function l(e){e&&e.dispatchConfig.registrationName&&o(e._targetInst,null,e)}function u(e){g(e,a)}function c(e){g(e,s)}function d(e,t,n,i){m.traverseEnterLeave(n,i,o,e,t)}function h(e){g(e,l)}var p=n(99),f=n(199),m=n(358),v=n(620),g=n(622),y=(n(42),p.PropagationPhases),b=f.getListener,w={
accumulateTwoPhaseDispatches:u,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:h,accumulateEnterLeaveDispatches:d};e.exports=w},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(100),a=n(368),s={view:function(e){if(e.view)return e.view;var t=a(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};r.augmentClass(i,s),e.exports=i},function(e,t,n){var i,r;
/**!
	 * Sortable
	 * @author	RubaXa   <trash@rubaxa.org>
	 * @license MIT
	 */
!function(a){"use strict";i=a,r="function"==typeof i?i.call(t,n,t,e):i,!(void 0!==r&&(e.exports=r))}(function(){"use strict";function e(e,t){this.el=e,this.options=t=v({},t),e[R]=this;var i={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(e.nodeName)?"li":">*",ghostClass:"sortable-ghost",ignore:"a, img",filter:null,animation:0,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,
dataIdAttr:"data-id",delay:0};for(var r in i)!(r in t)&&(t[r]=i[r]);var s=t.group;s&&"object"==typeof s||(s=t.group={name:s}),["pull","put"].forEach(function(e){e in s||(s[e]=!0)}),t.groups=" "+s.name+(s.put.join?" "+s.put.join(" "):"")+" ";for(var o in this)"_"===o.charAt(0)&&(this[o]=n(this,this[o]));a(e,"mousedown",this._onTapStart),a(e,"touchstart",this._onTapStart),a(e,"dragover",this),a(e,"dragenter",this),V.push(this._onDragOver),t.store&&this.sort(t.store.get(this))}function t(e){b&&b.state!==e&&(l(b,"display",e?"none":""),
!e&&b.state&&w.insertBefore(b,g),b.state=e)}function n(e,t){var n=z.call(arguments,2);return t.bind?t.bind.apply(t,[e].concat(n)):function(){return t.apply(e,n.concat(z.call(arguments)))}}function i(e,t,n){if(e){n=n||L,t=t.split(".");var i=t.shift().toUpperCase(),r=new RegExp("\\s("+t.join("|")+")\\s","g");do if(">*"===i&&e.parentNode===n||(""===i||e.nodeName.toUpperCase()==i)&&(!t.length||((" "+e.className+" ").match(r)||[]).length==t.length))return e;while(e!==n&&(e=e.parentNode))}return null}function r(e){
e.dataTransfer.dropEffect="move",e.preventDefault()}function a(e,t,n){e.addEventListener(t,n,!1)}function s(e,t,n){e.removeEventListener(t,n,!1)}function o(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(D," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(D," ")}}function l(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return L.defaultView&&L.defaultView.getComputedStyle?n=L.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),
void 0===t?n:n[t];t in i||(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function u(e,t,n){if(e){var i=e.getElementsByTagName(t),r=0,a=i.length;if(n)for(;r<a;r++)n(i[r],r);return i}return[]}function c(e){e.draggable=!1}function d(){F=!1}function h(e,t){var n=e.lastElementChild,i=n.getBoundingClientRect();return t.clientY-(i.top+i.height)>5&&n}function p(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function f(e){for(var t=0;e&&(e=e.previousElementSibling);)"TEMPLATE"!==e.nodeName.toUpperCase()&&t++;
return t}function m(e,t){var n,i;return function(){void 0===n&&(n=arguments,i=this,setTimeout(function(){1===n.length?e.call(i,n[0]):e.apply(i,n),n=void 0},t))}}function v(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var g,y,b,w,S,P,x,C,T,_,E,k,I,A,M={},D=/\s+/g,R="Sortable"+(new Date).getTime(),O=window,L=O.document,N=O.parseInt,U=!!("draggable"in L.createElement("div")),F=!1,j=function(e,t,n,i,r,a,s){var o=L.createEvent("Event"),l=(e||t[R]).options,u="on"+n.charAt(0).toUpperCase()+n.substr(1);
o.initEvent(n,!0,!0),o.item=i||t,o.from=r||t,o.clone=b,o.oldIndex=a,o.newIndex=s,l[u]&&l[u].call(e,o),t.dispatchEvent(o)},B=Math.abs,z=[].slice,V=[],H=m(function(e,t,n){if(n&&t.scroll){var i,r,a,s,o=t.scrollSensitivity,l=t.scrollSpeed,u=e.clientX,c=e.clientY,d=window.innerWidth,h=window.innerHeight;if(x!==n&&(P=t.scroll,x=n,P===!0)){P=n;do if(P.offsetWidth<P.scrollWidth||P.offsetHeight<P.scrollHeight)break;while(P=P.parentNode)}P&&(i=P,r=P.getBoundingClientRect(),a=(B(r.right-u)<=o)-(B(r.left-u)<=o),
s=(B(r.bottom-c)<=o)-(B(r.top-c)<=o)),a||s||(a=(d-u<=o)-(u<=o),s=(h-c<=o)-(c<=o),(a||s)&&(i=O)),M.vx===a&&M.vy===s&&M.el===i||(M.el=i,M.vx=a,M.vy=s,clearInterval(M.pid),i&&(M.pid=setInterval(function(){i===O?O.scrollTo(O.pageXOffset+a*l,O.pageYOffset+s*l):(s&&(i.scrollTop+=s*l),a&&(i.scrollLeft+=a*l))},24)))}},30);return e.prototype={constructor:e,_onTapStart:function(e){var t=this,n=this.el,r=this.options,a=e.type,s=e.touches&&e.touches[0],o=(s||e).target,l=o,u=r.filter;if(!("mousedown"===a&&0!==e.button||r.disabled)&&(o=i(o,r.draggable,n))){
if(_=f(o),"function"==typeof u){if(u.call(this,e,o,this))return j(t,l,"filter",o,n,_),void e.preventDefault()}else if(u&&(u=u.split(",").some(function(e){if(e=i(l,e.trim(),n))return j(t,e,"filter",o,n,_),!0})))return void e.preventDefault();r.handle&&!i(l,r.handle,n)||this._prepareDragStart(e,s,o)}},_prepareDragStart:function(e,t,n){var i,r=this,s=r.el,o=r.options,l=s.ownerDocument;n&&!g&&n.parentNode===s&&(I=e,w=s,g=n,S=g.nextSibling,k=o.group,i=function(){r._disableDelayedDrag(),g.draggable=!0,
o.ignore.split(",").forEach(function(e){u(g,e.trim(),c)}),r._triggerDragStart(t)},a(l,"mouseup",r._onDrop),a(l,"touchend",r._onDrop),a(l,"touchcancel",r._onDrop),o.delay?(a(l,"mousemove",r._disableDelayedDrag),a(l,"touchmove",r._disableDelayedDrag),r._dragStartTimer=setTimeout(i,o.delay)):i())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),s(e,"mousemove",this._disableDelayedDrag),s(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){
e?(I={target:g,clientX:e.clientX,clientY:e.clientY},this._onDragStart(I,"touch")):U?(a(g,"dragend",this),a(w,"dragstart",this._onDragStart)):this._onDragStart(I,!0);try{L.selection?L.selection.empty():window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(){w&&g&&(o(g,this.options.ghostClass,!0),e.active=this,j(this,w,"start",g,w,_))},_emulateDragOver:function(){if(A){l(y,"display","none");var e=L.elementFromPoint(A.clientX,A.clientY),t=e,n=" "+this.options.group.name,i=V.length;
if(t)do{if(t[R]&&t[R].options.groups.indexOf(n)>-1){for(;i--;)V[i]({clientX:A.clientX,clientY:A.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);l(y,"display","")}},_onTouchMove:function(e){if(I){var t=e.touches?e.touches[0]:e,n=t.clientX-I.clientX,i=t.clientY-I.clientY,r=e.touches?"translate3d("+n+"px,"+i+"px,0)":"translate("+n+"px,"+i+"px)";A=t,l(y,"webkitTransform",r),l(y,"mozTransform",r),l(y,"msTransform",r),l(y,"transform",r),e.preventDefault()}},_onDragStart:function(e,t){var n=e.dataTransfer,i=this.options;
if(this._offUpEvents(),"clone"==k.pull&&(b=g.cloneNode(!0),l(b,"display","none"),w.insertBefore(b,g)),t){var r,s=g.getBoundingClientRect(),o=l(g);y=g.cloneNode(!0),l(y,"top",s.top-N(o.marginTop,10)),l(y,"left",s.left-N(o.marginLeft,10)),l(y,"width",s.width),l(y,"height",s.height),l(y,"opacity","0.8"),l(y,"position","fixed"),l(y,"zIndex","100000"),w.appendChild(y),r=y.getBoundingClientRect(),l(y,"width",2*s.width-r.width),l(y,"height",2*s.height-r.height),"touch"===t?(a(L,"touchmove",this._onTouchMove),
a(L,"touchend",this._onDrop),a(L,"touchcancel",this._onDrop)):(a(L,"mousemove",this._onTouchMove),a(L,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else n&&(n.effectAllowed="move",i.setData&&i.setData.call(this,n,g)),a(L,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(e){var n,r,a,s=this.el,o=this.options,u=o.group,c=u.put,p=k===u,f=o.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),!o.dragoverBubble&&e.stopPropagation()),k&&!o.disabled&&(p?f||(a=!w.contains(g)):k.pull&&c&&(k.name===u.name||c.indexOf&&~c.indexOf(k.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){
if(H(e,o,this.el),F)return;if(n=i(e.target,o.draggable,s),r=g.getBoundingClientRect(),a)return t(!0),void(b||S?w.insertBefore(g,b||S):f||w.appendChild(g));if(0===s.children.length||s.children[0]===y||s===e.target&&(n=h(s,e))){if(n){if(n.animated)return;v=n.getBoundingClientRect()}t(p),s.appendChild(g),this._animate(r,g),n&&this._animate(v,n)}else if(n&&!n.animated&&n!==g&&void 0!==n.parentNode[R]){C!==n&&(C=n,T=l(n));var m,v=n.getBoundingClientRect(),P=v.right-v.left,x=v.bottom-v.top,_=/left|right|inline/.test(T.cssFloat+T.display),E=n.offsetWidth>g.offsetWidth,I=n.offsetHeight>g.offsetHeight,A=(_?(e.clientX-v.left)/P:(e.clientY-v.top)/x)>.5,M=n.nextElementSibling;
F=!0,setTimeout(d,30),t(p),m=_?n.previousElementSibling===g&&!E||A&&E:M!==g&&!I||A&&I,m&&!M?s.appendChild(g):n.parentNode.insertBefore(g,m?M:n),this._animate(r,g),this._animate(v,n)}}},_animate:function(e,t){var n=this.options.animation;if(n){var i=t.getBoundingClientRect();l(t,"transition","none"),l(t,"transform","translate3d("+(e.left-i.left)+"px,"+(e.top-i.top)+"px,0)"),t.offsetWidth,l(t,"transition","all "+n+"ms"),l(t,"transform","translate3d(0,0,0)"),clearTimeout(t.animated),t.animated=setTimeout(function(){
l(t,"transition",""),l(t,"transform",""),t.animated=!1},n)}},_offUpEvents:function(){var e=this.el.ownerDocument;s(L,"touchmove",this._onTouchMove),s(e,"mouseup",this._onDrop),s(e,"touchend",this._onDrop),s(e,"touchcancel",this._onDrop)},_onDrop:function(t){var n=this.el,i=this.options;clearInterval(this._loopId),clearInterval(M.pid),clearTimeout(this.dragStartTimer),s(L,"drop",this),s(L,"mousemove",this._onTouchMove),s(n,"dragstart",this._onDragStart),this._offUpEvents(),t&&(t.preventDefault(),!i.dropBubble&&t.stopPropagation(),
y&&y.parentNode.removeChild(y),g&&(s(g,"dragend",this),c(g),o(g,this.options.ghostClass,!1),w!==g.parentNode?(E=f(g),j(null,g.parentNode,"sort",g,w,_,E),j(this,w,"sort",g,w,_,E),j(null,g.parentNode,"add",g,w,_,E),j(this,w,"remove",g,w,_,E)):(b&&b.parentNode.removeChild(b),g.nextSibling!==S&&(E=f(g),j(this,w,"update",g,w,_,E),j(this,w,"sort",g,w,_,E))),e.active&&j(this,w,"end",g,w,_,E)),w=g=y=S=b=P=x=I=A=C=T=k=e.active=null,this.save())},handleEvent:function(e){var t=e.type;"dragover"===t||"dragenter"===t?g&&(this._onDragOver(e),
r(e)):"drop"!==t&&"dragend"!==t||this._onDrop(e)},toArray:function(){for(var e,t=[],n=this.el.children,r=0,a=n.length,s=this.options;r<a;r++)e=n[r],i(e,s.draggable,this.el)&&t.push(e.getAttribute(s.dataIdAttr)||p(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach(function(e,r){var a=n.children[r];i(a,this.options.draggable,n)&&(t[e]=a)},this),e.forEach(function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))})},save:function(){var e=this.options.store;e&&e.set(this)},closest:function(e,t){
return i(e,t||this.options.draggable,this.el)},option:function(e,t){var n=this.options;return void 0===t?n[e]:void(n[e]=t)},destroy:function(){var e=this.el;e[R]=null,s(e,"mousedown",this._onTapStart),s(e,"touchstart",this._onTapStart),s(e,"dragover",this),s(e,"dragenter",this),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),V.splice(V.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},e.utils={on:a,off:s,css:l,find:u,bind:n,is:function(e,t){
return!!i(e,t,e)},extend:v,throttle:m,closest:i,toggleClass:o,index:f},e.version="1.2.0",e.create=function(t,n){return new e(t,n)},e})},function(e,t,n){!function(t,i){e.exports=i(n(3),n(37))}(this,function(e,t){function n(n){return{underscore:e,backbone:t}[n]}var i=function(e){function t(e){var n=t.cache[e];if(!n){var i={};n=t.cache[e]={id:e,exports:i},t.modules[e].call(i,n,i)}return n.exports}return t.cache=[],t.modules=[function(e,i){function r(e,t){this._superset=e,this._filtered=new o(e,t),this._sorted=new l(this._filtered,t),
this._paginated=new u(this._sorted,t),c(this._paginated,this),d.call(this,this._filtered,f),d.call(this,this._sorted,v),d.call(this,this._paginated,y),this.initialize(t)}var a=n("underscore"),s=n("backbone"),o=t(2),l=t(5),u=t(4),c=t(1),d=t(7),h={superset:function(){return this._superset},getFilteredLength:function(){return this._filtered.length},removeTransforms:function(){return this._filtered.resetFilters(),this._sorted.removeSort(),this._paginated.removePagination(),this},destroy:function(){this.stopListening(),
this._filtered.destroy(),this._sorted.destroy(),this._paginated.destroy(),this.length=0,this.trigger("obscura:destroy")}},p=["filterBy","removeFilter","resetFilters","refilter","hasFilter","getFilters"],f=["filtered:add","filtered:remove","filtered:reset"],m=["setSort","reverseSort","removeSort"],v=["sorted:add","sorted:remove"],g=["setPerPage","setPage","getPerPage","getNumPages","getPage","hasNextPage","hasPrevPage","nextPage","prevPage","movePage","removePagination","firstPage","lastPage"],y=["paginated:change:perPage","paginated:change:page","paginated:change:numPages"],b=["add","create","remove","set","reset","sort","parse","sync","fetch","push","pop","shift","unshift"];
a.each(p,function(e){h[e]=function(){var t=o.prototype[e].apply(this._filtered,arguments);return t===this._filtered?this:t}}),a.each(g,function(e){h[e]=function(){var t=u.prototype[e].apply(this._paginated,arguments);return t===this._paginated?this:t}}),a.each(m,function(e){h[e]=function(){var t=l.prototype[e].apply(this._sorted,arguments);return t===this._sorted?this:t}}),a.each(b,function(e){h[e]=function(){throw new Error("Backbone.Obscura: Unsupported method: "+e+"called on read-only proxy")};
}),a.extend(r.prototype,h,s.Events),r=s.Collection.extend(r.prototype),r.FilteredCollection=o,r.SortedCollection=l,r.PaginatedCollection=u,e.exports=r},function(e,t){function i(e,t){function n(){t.length=e.length}function i(n){var i=r.toArray(arguments),a="change"===n||"change:"===n.slice(0,7);"reset"===n&&(t.models=e.models),r.contains(o,n)?(r.contains(["add","remove","destroy"],n)?i[2]=t:r.contains(["reset","sort"],n)&&(i[1]=t),t.trigger.apply(this,i)):a&&t.contains(i[1])&&t.trigger.apply(this,i);
}var l={};return r.each(r.functions(a.Collection.prototype),function(t){r.contains(s,t)||(l[t]=function(){return e[t].apply(e,arguments)})}),r.extend(t,a.Events,l),t.listenTo(e,"all",n),t.listenTo(e,"all",i),t.models=e.models,n(),t}var r=n("underscore"),a=n("backbone"),s=["_onModelEvent","_prepareModel","_removeReference","_reset","add","initialize","sync","remove","reset","set","push","pop","unshift","shift","sort","parse","fetch","create","model","off","on","listenTo","listenToOnce","bind","trigger","once","stopListening"],o=["add","remove","reset","sort","destroy","sync","request","error"];
e.exports=i},function(e,i){function r(){this._filterResultCache={}}function a(e){for(var t in this._filterResultCache)this._filterResultCache.hasOwnProperty(t)&&delete this._filterResultCache[t][e]}function s(e,t){this._filters[e]&&a.call(this,e),this._filters[e]=t,this.trigger("filtered:add",e)}function o(e){delete this._filters[e],a.call(this,e),this.trigger("filtered:remove",e)}function l(e){this._filterResultCache[e.cid]||(this._filterResultCache[e.cid]={});var t=this._filterResultCache[e.cid];
for(var n in this._filters)if(this._filters.hasOwnProperty(n)&&(t.hasOwnProperty(n)||(t[n]=this._filters[n].fn(e)),!t[n]))return!1;return!0}function u(e){e||(e={});var t=[];this._superset&&(t=this._superset.filter(g.bind(l,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length}function c(){u.call(this,{reset:!0})}function d(){var e=!(!this._superset||!this._superset.comparator);u.call(this,{reset:e})}function h(e){if(this._filterResultCache[e.cid]={},
l.call(this,e)){if(!this._collection.get(e.cid)){for(var t=this.superset().indexOf(e),n=null,i=t-1;i>=0;i-=1)if(this.contains(this.superset().at(i))){n=this.indexOf(this.superset().at(i))+1;break}n=n||0,this._collection.add(e,{at:n})}}else this._collection.get(e.cid)&&this._collection.remove(e);this.length=this._collection.length}function p(e){this._filterResultCache[e.cid]={},l.call(this,e)||this._collection.get(e.cid)&&this._collection.remove(e)}function f(e,t,n){"change:"===e.slice(0,7)&&p.call(this,arguments[1]);
}function m(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length}function v(e){this._superset=e,this._collection=new y.Collection(e.toArray()),b(this._collection,this),this.resetFilters(),this.listenTo(this._superset,"reset",c),this.listenTo(this._superset,"sort",d),this.listenTo(this._superset,"add change",h),this.listenTo(this._superset,"remove",m),this.listenTo(this._superset,"all",f)}var g=n("underscore"),y=n("backbone"),b=t(1),w=t(3),S={defaultFilterName:"__default",
filterBy:function(e,t){return t||(t=e,e=this.defaultFilterName),s.call(this,e,w(t)),u.call(this),this},removeFilter:function(e){return e||(e=this.defaultFilterName),o.call(this,e),u.call(this),this},resetFilters:function(){return this._filters={},r.call(this),this.trigger("filtered:reset"),u.call(this),this},superset:function(){return this._superset},refilter:function(e){return"object"==typeof e&&e.cid?h.call(this,e):(r.call(this),u.call(this)),this},getFilters:function(){return g.keys(this._filters);
},hasFilter:function(e){return g.contains(this.getFilters(),e)},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("filtered:destroy")}};g.extend(v.prototype,S,y.Events),e.exports=v},function(e,t){function i(e,t){return function(n){return n.get(e)===t}}function r(e,t){return function(n){return t(n.get(e))}}function a(e,t){return l.isArray(t)||(t=null),{fn:e,keys:t}}function s(e){var t=l.keys(e),n=l.map(t,function(t){var n=e[t];
return l.isFunction(n)?r(t,n):i(t,n)}),s=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};return a(s,t)}function o(e,t){return l.isFunction(e)?a(e,t):l.isObject(e)?s(e):void 0}var l=n("underscore");e.exports=o},function(e,i){function r(){var e=this.getPage()*this.getPerPage(),t=e+this.getPerPage();return[e,t]}function a(){var e=r.call(this);this._collection.reset(this.superset().slice(e[0],e[1]))}function s(){var e=(this._totalPages,this.superset().length),t=this.getPerPage(),n=e%t===0?e/t:Math.floor(e/t)+1,i=this._totalPages!==n;
if(this._totalPages=n,i&&this.trigger("paginated:change:numPages",{numPages:n}),this.getPage()>=n)return this.setPage(n-1),!0}function o(){s.call(this)||a.call(this)}function l(e,t){for(var n=d.max([e.length,t.length]),i=0,r=0;i<n;i+=1,r+=1)if(e[i]!==t[r])if(t[i-1]===e[i])r-=1;else{if(t[i+1]!==e[i])return e[i];r+=1}}function u(e,t,n){if(!s.call(this)){var i=r.call(this),a=i[0],o=i[1],u=l(this.superset().slice(a,o),this._collection.toArray()),c=l(this._collection.toArray(),this.superset().slice(a,o));
c&&this._collection.remove(c),u&&this._collection.add(u,{at:this.superset().indexOf(u)-a})}}function c(e,t){this._superset=e,this._collection=new h.Collection(e.toArray()),this._page=0,this.setPerPage(t&&t.perPage?t.perPage:null),p(this._collection,this),this.listenTo(this._superset,"add remove",u),this.listenTo(this._superset,"reset sort",o)}var d=n("underscore"),h=n("backbone"),p=t(1),f={removePagination:function(){return this.setPerPage(null),this},setPerPage:function(e){return this._perPage=e,
o.call(this),this.setPage(0),this.trigger("paginated:change:perPage",{perPage:e,numPages:this.getNumPages()}),this},setPage:function(e){var t=0,n=this.getNumPages()-1;return e=e>t?e:t,e=e<n?e:n,e=e<0?0:e,this._page=e,a.call(this),this.trigger("paginated:change:page",{page:e}),this},getPerPage:function(){return this._perPage||this.superset().length||1},getNumPages:function(){return this._totalPages},getPage:function(){return this._page},hasNextPage:function(){return this.getPage()<this.getNumPages()-1;
},hasPrevPage:function(){return this.getPage()>0},nextPage:function(){return this.movePage(1),this},prevPage:function(){return this.movePage(-1),this},firstPage:function(){this.setPage(0)},lastPage:function(){this.setPage(this.getNumPages()-1)},movePage:function(e){return this.setPage(this.getPage()+e),this},superset:function(){return this._superset},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this._page=0,this._totalPages=0,this.length=0,this.trigger("paginated:destroy");
}};d.extend(c.prototype,f,h.Events),e.exports=c},function(e,i){function r(e){return d.isFunction(e)?e:function(t){return t.get(e)}}function a(e){return this._comparator?this._reverse?f(this._collection.toArray(),e,r(this._comparator)):d.sortedIndex(this._collection.toArray(),e,r(this._comparator)):this._superset.indexOf(e)}function s(e){var t=a.call(this,e);this._collection.add(e,{at:t})}function o(e){this.contains(e)&&this._collection.remove(e)}function l(e){this.contains(e)&&this._collection.indexOf(e)!==a.call(this,e)&&(this._collection.remove(e),
s.call(this,e))}function u(){if(!this._comparator)return void this._collection.reset(this._superset.toArray());var e=this._superset.sortBy(this._comparator);this._collection.reset(this._reverse?e.reverse():e)}function c(e){this._superset=e,this._reverse=!1,this._comparator=null,this._collection=new h.Collection(e.toArray()),p(this._collection,this),this.listenTo(this._superset,"add",s),this.listenTo(this._superset,"remove",o),this.listenTo(this._superset,"change",l),this.listenTo(this._superset,"reset",u);
}var d=n("underscore"),h=n("backbone"),p=t(1),f=t(6),m={setSort:function(e,t){return this._reverse="desc"===t,this._comparator=e,u.call(this),e?this.trigger("sorted:add"):this.trigger("sorted:remove"),this},reverseSort:function(){return this._reverse=!this._reverse,u.call(this),this},removeSort:function(){return this.setSort(),this},superset:function(){return this._superset},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("sorted:destroy");
}};d.extend(c.prototype,m,h.Events),e.exports=c},function(e,t){function i(e){return a.isFunction(e)?e:function(t){return t[e]}}function r(e,t,n,r){n=null==n?a.identity:i(n);for(var s=n.call(r,t),o=0,l=e.length;o<l;){var u=o+l>>>1;n.call(r,e[u])<s?l=u:o=u+1}return o}var a=n("underscore");e.exports=r},function(e,t){function i(e,t){r.each(t,function(t){this.listenTo(e,t,function(){var e=r.toArray(arguments);e.unshift(t),this.trigger.apply(this,e)})},this)}var r=n("underscore");e.exports=i}],t(0)}();return i;
})},,function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(73),a=i(r),s=new a.default({"interface":["get","set","remove","clear"]});t.default=s,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(37),n(111)],r=function(e,t,n,i){"use strict";var r={hasPendingPopulate:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},populate:function(){return this.populatePromise?this.populatePromise:this.fetch.apply(this,arguments);
},fetch:function(){var i,r=t.Deferred();if(this.hasPendingPopulate())return this.populatePromise;i=this._fetch?this._fetch.apply(this,arguments):this instanceof n.Collection?n.Collection.prototype.fetch.apply(this,arguments):n.Model.prototype.fetch.apply(this,arguments);var a=r.promise();return a.rid=i.rid,this.populatePromise=a,i.done(e.bind(function(e){this.populatePromise=t.Deferred().resolveWith(this,[this]).promise(),r.resolveWith(this,[this,e])},this)),i.fail(e.bind(function(e){this.populatePromise=null,
r.rejectWith(this,[this,e])},this)),a},abortPendingPopulate:function(){return this.hasPendingPopulate()&&i.abort(this.populatePromise.rid),this.populatePromise},resetPopulatePromise:function(e){return this.hasPendingPopulate()||(this.populatePromise=e),this.populatePromise}};return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(89).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(53),l=r(o),u=n(71),c=r(u),d=n(127),h=r(d),p=n(18),f=r(p),m=n(20),v=r(m),g=n(55),y=r(g),b=n(743),w=r(b),S=v.default.extend({
name:"PlayQueueItemModel",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],idAttribute:"playQueueItemID",cache:new h.default,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.playQueueItemID)},sessionAttrs:{isPlayQueueItem:f.default.boolean},syncedAttrs:{playQueueItemID:f.default.integer,queueIndex:f.default.integer,key:f.default.string,ratingKey:f.default.string,type:f.default.string,advertisement:f.default.boolean,allowSkipAfter:f.default.integer,syncItemId:f.default.integer,
generatorID:f.default.integer,generatorType:f.default.integer,clientIdentifier:f.default.string,target:f.default.string},syncedRelations:{metadataItem:{relationClass:y.default,deferred:!0},lyricsStreams:{relationClass:w.default,deferred:!0}},defaults:{isPlayQueueItem:!0},augmentResponse:function(e){var t=s.default.pick(e,i(this.syncedAttrs));t.metadataItem=e;var n=s.default.first(l.default.parseArray(e.Media));if(n){var r=s.default.first(l.default.parseArray(n.Part));if(r){var a=l.default.parseArray(r.Stream);
a&&!function(){var e=c.default.get("lyrics");t.lyricsStreams=s.default.filter(a,function(t){return l.default.parseInteger(t.streamType)===e.id})}()}}return t}});t.default=S,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(8),n(129),n(35),n(22),n(45),n(262)],r=function(e,t,n,i,r,a,s,o){"use strict";var l={audio:["Track"],photo:["Photo","Video"],video:["Video"]},u=s.extend({idAttribute:"playQueueID",defaults:{selectedItem:null,mediaType:null,collection:null,server:null,owned:!0,hasUserAdditions:!1,
repeatAll:!1,shuffled:!1,hasUpNext:!1,playQueueID:null,playQueueVersion:0,playQueueSelectedItemID:null,message:null},url:function(){return"/playQueues/"+this.id},initialize:function(e,t){this.set("server",t.server),this.set("collection",new o([],{server:t.server}))},_fetch:function(){var t=e.result(this,"url");return this._ajax("GET",t)},convert:function(t){var n=e.isObject(t)?t:r.parseXML(t);return r.parseInteger(n,["playQueueVersion","playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID"]),
r.parseArray(n,"Metadata"),r.parseBoolean(n,"playQueueShuffled"),n.stationService?(r.parseBoolean(n,"allowRepeat"),r.parseBoolean(n,"allowSeek"),r.parseBoolean(n,"allowShuffle"),r.parseBoolean(n,"allowSkipPrevious"),r.parseInteger(n,"stationSkipsPerHour"),r.parseInteger(n,"serviceSkipsPerDay"),n.isRadio=!0):n.isRadio=!1,n},parse:function(t){var n=l[this.get("mediaType")].concat("Directory");t=r.replaceXMLElementNames(t,n,"Metadata");var i=this.convert(t),a=["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","message","isRadio","stationTitle","stationThumb","stationService","allowRepeat","allowSeek","allowShuffle","allowSkipPrevious","stationSkipsPerHour","serviceSkipsPerDay"];
i.playQueueVersion>this.get("playQueueVersion")&&a.push("playQueueID","playQueueVersion");var s=e.pick(i,a);return s.shuffled=!!i.playQueueShuffled,s.hasUpNext=!!i.playQueueLastAddedItemID,this.set(s),this.parseElementCollection(i)},parseElementCollection:function(t){var n=t.Metadata,i=e(n).pluck("playQueueItemID").indexOf(t.playQueueSelectedItemID.toString()),r=parseInt(t.playQueueSelectedItemOffset,10),a=r-i,s=this.get("collection");return t.identifier&&s.setContext("identifier",t.identifier),t.mediaTagPrefix&&s.setContext("mediaTagPrefix",t.mediaTagPrefix),
t.mediaTagVersion&&s.setContext("mediaTagVersion",t.mediaTagVersion),e.each(n,function(e,t){e.queueIndex=a+t}),n.message=t.message,n.totalSize=parseInt(t.playQueueTotalCount,10),n.availableRange={start:a,end:a+n.length},n},_ajax:function(t,i){var r={repeat:this.get("repeatAll")?1:0,includeChapters:1};"audio"===this.get("mediaType")&&(r.includeRelated=1),i=a.join(i,r);var s=e.extend(this.get("server").getXHROptions(i),{type:t}),o=this._$ajax(s),l=e.bind(function(e){var t=this.parse(e);t.message&&n.trigger("show:alert",{
type:"error",message:t.message});var i=this.get("collection");i.totalSize=t.totalSize,i.availableRange=t.availableRange,i.reset(t,{parse:!0}),this.set("selectedItem",this.getCurrentItem())},this);return o.done(l,this)},_$ajax:function(e){return t.ajax(e)},getCurrentItem:function(){var e=this.get("playQueueSelectedItemID");return this.get("collection").findWhere({playQueueItemID:e})||null},queueContent:function(t,n){n||(n={});var r={type:this.get("mediaType")};if(t.get("playlistType"))r.playlistID=t.get("ratingKey");else{
var s=e.pick(n,"unwatched","items","excludeSeedItem");r.uri=i.uri(t,s)}return n.firstItem&&(r.key=n.firstItem.get("key")),n.extrasPrefixCount&&(r.extrasPrefixCount=n.extrasPrefixCount),r.shuffle=n.shuffle?1:0,n.continuous&&"episode"===t.get("type")&&(r.continuous=1),this.isNew()?this._addContentPromise=this._ajax("POST",a.join("/playQueues",r)):(r.next=n.next?1:0,this.set("hasUserAdditions",!0),this._addContentPromise=this._ajax("PUT",a.join(e.result(this,"url"),r))),this._addContentPromise},addContent:function(t,n){
return this.queueContent(t,n).then(e.bind(this._setSelectedItem,this,n))},_setSelectedItem:function(e){var t;if(e&&e.firstItem){var n=e.firstItem.get("key");t=this.get("collection").find(function(e){return e.get("key")===n})}else t=this.get("collection").at(0);this.set("selectedItem",t)},removeItem:function(n){if(n.get("playQueueItemID")===this.get("selectedItem").get("playQueueItemID"))return t.Deferred().resolve().promise();this.set("hasUserAdditions",!0);var i=a.join([e.result(this,"url"),"/items/",n.get("playQueueItemID")]);
return this._ajax("DELETE",i)},moveItem:function(n,i){if(n===this.get("selectedItem").get("playQueueItemID"))return t.Deferred().resolve().promise();var r=i||this.get("selectedItem").get("playQueueItemID");this.set("hasUserAdditions",!0);var s={after:r},o=a.join([e.result(this,"url"),"/items/",n,"/move"],s);return this._ajax("PUT",o)},isItemQueueable:function(t){var n=e(t).result("url"),i=t.get("playlistType")||/\/(?:library|hubs|services\/gracenote)\//.test(n);if(!i)return!1;var r=/\/sync\//.test(n);
if(r)return!1;var a=/\/folder/.test(n);if(a)return!1;var s=/\/theme\//.test(n);if(s)return!1;var o=t.get("currentSubset")&&t.get("currentSubset").id;if("folder"===o||"recentlyViewedShows"===o)return!1;var l=t.get("type")&&("photoAlbum"===t.get("type")||"photo"===t.get("type")),u="photo"===t.viewGroup||l,c=t.server.supports("photoPlayQueues");return c||!u},toggleShuffle:function(){var t=[e.result(this,"url")];return this.get("shuffled")?t.push("/unshuffle"):t.push("/shuffle"),this._ajax("PUT",a.join(t));
},setRepeatAll:function(e){return this.set("repeatAll",e),this.fetch()},yieldOwnership:function(){this.set("owned",!1);var n=this._addContentPromise||t.Deferred().resolve().promise();return n.then(e.bind(function(){return this.get("playQueueID")&&this.get("collection").length>0?e.result(this,"url")+"?own=1&window=200":null},this))},takeOwnership:function(){if(this.get("owned"))return t.Deferred().resolve().promise();this.set("owned",!0);var n=e.result(this,"url")+"?own=1";return this._ajax("GET",n);
},supports:function(){return!0},getIdFromKey:function(e){var t=/playQueues\/([^\/?]+)/.exec(e);return t&&t[1]||null}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(395),u=i(l),c=o.default.extend({name:"FilterModel",context:["server","section","type","standalone"],idAttribute:"filter",rootPropertyName:"Directory",defaults:{advanced:!1},syncedAttrs:{filter:a.default.string,
filterType:a.default.string,type:a.default.string,key:a.default.string,title:a.default.string,advanced:a.default.boolean},syncedRelations:{options:{relationClass:u.default}}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(49).default,r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(8),u=r(l),c=n(53),d=r(c),h=n(22),p=a(h),f=n(277),m=r(f),v=n(110),g=r(v),y=n(64),b=r(y),w=n(25),S=r(w),P=n(400),x=r(P),C=S.default.extend({name:"HubCollection",
context:["server","section","hubKey","count","includeEmpty","excludes","allowSync","maxLength"],responseContext:["allowSync"],model:x.default,cache:new m.default,url:function(){var e="/hubs";this.hubKey?e=this.hubKey:this.section&&(e="/hubs/sections/"+encodeURIComponent(this.section.id));var t={excludeFields:"summary"};return this.count&&(t.count=this.count),this.includeEmpty&&(t.includeEmpty=1),this.excludes&&this.excludes.length&&this.excludes.forEach(function(e){t["exclude"+(0,g.default)(e)]=1;
}),p.join(e,t)},initialize:function(){this.section&&this.listenTo(u.default,"clear:sections:hubs",this.clear)},fetch:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=o.default.clone(e);return e.onlyTransient&&this.populatePromise&&(t.remove=!1,t.url=p.join(o.default.result(this,"url"),{onlyTransient:1})),S.default.prototype.fetch.call(this,t)},augmentResponseText:function(e,t){return t===b.default.xml?d.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){
var t=this,n=this.model.prototype.rootPropertyName;if(e&&n){o.default.isArray(e)?e=i({},n,e):e[n]&&!o.default.isArray(e[n])&&(e=i({},n,[e[n]]));var r=e[n],a=r&&r.length;if(a){if(!this.includeEmpty)for(;a&&a--;)r[a].size<=0&&r.splice(a,1);this.maxLength&&r.splice(this.maxLength),e.size>r.length&&(e.size=String(r.length))}}return this.responseContext.forEach(function(n){var i=e[n];void 0!==i&&t.setContext(n,i)}),e}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.key,n=e.getModel,i=(0,
u.default)(t),a="is"+i+"Pending",s="is"+i+"Populated",l=t?t+"Error":"error";return function(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=n(e,i),c=t?u.get(t):u,d=u.sessionAttrs;(0,o.default)(!!d,u.name+" is missing session attributes"),(0,o.default)(d.hasOwnProperty(a),u.name+" is missing a session attribute for "+a),(0,o.default)(d.hasOwnProperty(s),u.name+" is missing a session attribute for "+s),(0,o.default)(d.hasOwnProperty(l),u.name+" is missing a session attribute for "+l),
u.set(a,!0),c.fetch(i.options).done(function(){var e;u.set((e={},r(e,a,!1),r(e,s,!0),r(e,l,null),e))}).fail(function(e,t){var n;u.set((n={},r(n,a,!1),r(n,l,t),n))})}}var r=n(49).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(38),o=a(s),l=n(110),u=a(l);e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,a.createSelector)(function(e,t){var n=t.libraryEntityID;return n},o.default,function(e,t){return t[e]})}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=i;var a=n(28),s=n(422),o=r(s);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),a=n(142),s=i(a),o=(0,r.createSelector)(s.default,function(e){return e.metadataItems});t.default=o,e.exports=t.default},function(e,t){"use strict";function n(e){return e.user}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(29)],r=function(e,t){"use strict";
var n=t.extend({initialize:function(){this._entries=[]},wrapAll:function(t,n,i){e.each(t,function(e){this.wrap(e,n,i)},this)},wrap:function(t,n,i){i[t]=e.wrap(i[t],e.bind(function(t){var r=e.toArray(arguments).slice(1);return n.call(i)?t.apply(i,r):void this.add({fn:t,args:r,context:i})},this))},add:function(e){this._entries.push(e)},process:function(){e.each(this._entries,function(e){var t=e.context||this;e.fn.apply(t,e.args)},this),this.clear()},clear:function(){this._entries.length=0}});return n;
}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i;i=function(){"use strict";var e={NEVER:"never",SAME_NETWORK:"samenetwork",ALWAYS:"always"};return e.settings=[{value:e.NEVER,title:"Never"},{value:e.SAME_NETWORK,title:"On same network as server"},{value:e.ALWAYS,title:"Always"}],e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){"use strict";function i(e){if(e){var t=o[e.code+"-"+e.field]||o[e.code];return t?t():e.message}}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.getErrorText=i;var a=n(6),s=r(a),o={1001:function(){return(0,s.default)("User could not be authenticated")},"1010-login":function(){return(0,s.default)("Login is required")},"1010-password":function(){return(0,s.default)("Password is required")},"1010-email":function(){return(0,s.default)("Email is required")},"1011-username":function(){return(0,s.default)("Username has already been taken")},"1011-email":function(){return(0,s.default)("email has already been taken")},1030:function(){
return(0,s.default)("User could not be authenticated. This account only allows signing in with email address")},1031:function(){return(0,s.default)("User could not be authenticated. This IP appears to be having trouble signing in to an account (detected repeated failures)")},"1032-password":function(){return(0,s.default)("Password must be at least 8 characters")},"1033-password":function(){return(0,s.default)("Password is too weak")},"1034-password":function(){return(0,s.default)("Password must be different from username or email address");
},"1035-email":function(){return(0,s.default)("Email is not a valid email address")},"1036-username":function(){return(0,s.default)("Username must not be an email address")},"1037-username":function(){return(0,s.default)("Username contains invalid characters")},"1038-pin":function(){return(0,s.default)("Pin must be 4 digits")},"1039-passwordConfirmation":function(){return(0,s.default)("Confirm Password must match Password")},1040:function(){return(0,s.default)("Invalid Password")}};t.default=o},function(e,t,n){
"use strict";function i(e){var t=f.find(function(t){var n=r(t,1),i=n[0];return e<=i}),n=r(t,2),i=n[1];return i(e)}var r=n(137).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(435),o=a(s),l=n(144),u=a(l),c=n(434),d=a(c),h=n(433),p=a(h),f=[[54e5,o.default],[864e5,u.default],[6048e5,d.default],[1/0,p.default]];t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(285),n(452),n(453),n(92),n(446),n(43),n(82),n(71),n(128),n(169),n(26)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p){
"use strict";var f={getMediaDecision:function(t){var n=this.augmentProfile(t);if(p.info("[MDE] Augmented profile:",n),t.media)return this.analyzeMedia(t.media,n,t);var i=t.item,r=i.get("Media");if(!r.length)return{canPlay:!0,canDirectPlay:!0};if(1===r.length)return this.analyzeMedia(e.first(r),n,t);var a=e.map(r,function(e){return this.analyzeMedia(e,n,t)},this);return this.getBestDecision(a)},augmentProfile:function(n){var i=n.profile;if(!i)throw new Error("MDE: No player profile provided for "+n.type);
var r=t.extend(!0,{},i.directPlay),a=t.extend(!0,{},i.directStream),s=r.generic;s&&delete r.generic;var o=n.allowedAC3Containers,u="*"===o;!u&&o&&(o=e.isArray(o)?o:[o]);var c=n.allowedEAC3Containers,d="*"===c;!d&&c&&(c=e.isArray(c)?c:[c]);var h=n.allowedDCAContainers,p="*"===h;return!p&&h&&(h=e.isArray(h)?h:[h]),e.each(r,function(t,i){this.mergeGenericOptions(t,s),this.mergeMaxQualityOptions(t,n),(u||o&&e.contains(o,i))&&this.addAudioCodec("ac3",t,n),(d||c&&e.contains(c,i))&&this.addAudioCodec("eac3",t,n),
(p||h&&e.contains(h,i))&&this.addAudioCodec("dca",t,n);var r=l.getStreamByType(n.type),a=t[r];if(a){var f=a.codecs;e.each(f,function(e,t){this.mergeMaxQualityOptions(e,n,!0),n.videoCodecOptions&&n.videoCodecOptions[t]&&this.mergeVideoCodecOptions(e,n.videoCodecOptions[t])},this)}},this),this.mergeMaxQualityOptions(a,n),n.videoCodecOptions&&n.type===l.types.VIDEO&&a.video&&e.each(a.video.codecs,function(e,t){n.videoCodecOptions[t]&&this.mergeVideoCodecOptions(e,n.videoCodecOptions[t])},this),{directPlay:r,
directStream:a}},mergeGenericOptions:function(t,n){n&&(e.defaults(t,e.omit(n,"video","audio")),e.each(["audio","video"],function(i){var r=n[i],a=t[i];r&&(a||(a={},t[i]=a),e.defaults(a,e.omit(r,"codecs")),r.codecs&&e.each(r.codecs,function(t,n){e.defaults(this.ensureCodecs(n,a),t)},this))},this))},mergeVideoCodecOptions:function(t,n){e.each(n,function(e,n){t[n]=e},this)},ensureCodecs:function(e,t){return t.codecs||(t.codecs={}),t.codecs[e]||(t.codecs[e]={}),t.codecs[e]},mergeMaxQualityOptions:function(t,n,i){
var r=[{option:"bitrate",setting:"maxBitrate"},{option:"videoResolution",setting:"maxVideoResolution"}];e.each(r,function(e){if("videoResolution"!==e.option||n.type===l.types.VIDEO){var r=this.getMaxQualityOption(t,e.option,n);if(null!=r){var a=e.setting,s=l.getStreamByType(n.type);t.hasOwnProperty(a)?t[a]=r:t.hasOwnProperty(s)?t[s][a]=r:i||(t[s]={},t[s][a]=r)}}},this)},getMaxQualityOption:function(e,t,n){var i=n.quality||{},r="max"+t.charAt(0).toUpperCase()+t.slice(1),a=i[t],s=this.getPrimaryStreamProperty(e,r,n);
if("videoResolution"===t&&a&&(a=u.getResolutionFromSize(a)),a||s){var o;return o=a&&s?Math.min(a,s):a||s}},addAudioCodec:function(e,t,n){t.audio||(t.audio={}),this.ensureCodecs(e,t.audio)},analyzeMedia:function(t,n,s){p.info("[MDE] Starting analysis of",this.getMediaTitle(t)),p("[MDE] Analyzing direct play");var o=this.canDirectPlay(t,n.directPlay,s),u={transcodeServer:s.transcodeServer,media:t,canDirectPlay:o.result,canDirectPlayFailedCheck:o.failedCheck},c=s.transcoderOptions||{};if(e.isFunction(c)&&(c=c(u)),
s.type===l.types.VIDEO){p("[MDE] Analyzing video direct stream");var d=i(t);if(d){var h=this.canDirectStream(d,n.directStream.video,s,c);u.canDirectStreamVideo=h.result,u.canDirectStreamVideoFailedCheck=h.failedCheck}}if(s.type!==l.types.PHOTO){p("[MDE] Analyzing audio direct stream");var f=r(t);if(f){var h=this.canDirectStream(f,n.directStream.audio,s,c);u.canDirectStreamAudio=h.result,u.canDirectStreamAudioFailedCheck=h.failedCheck}}var m=a(u.media);return m&&(p("[MDE] Analyzing subtitles"),e.extend(u,this.analyzeSubtitles(m,s))),
p("[MDE] Analyzing playability"),e.extend(u,this.canPlay(u,s)),e.extend(u,this.getEffectiveQuality(t,n.directStream,s)),p.group("[MDE] Finished analysis of",this.getMediaTitle(t)),this.getDecisionLogs(u).forEach(function(e){return p.info(e)}),p.groupEnd(),u},canDirectPlay:function(t,n,a){if(a.forceDirectPlay)return p("[MDE] Direct play forced"),{result:!0};if(a.allowDirectPlay===!1)return p.warn("[MDE] Direct play failed; option is disabled"),{result:!1,failedCheck:"allowDirectPlay"};if(a.type===l.types.VIDEO&&!this.canDirectPlayVideo(t,a))return{
result:!1,failedCheck:"canDirectPlayVideo"};var o=n[t.container];if(!o)return p.warn("[MDE] Direct play failed; unsupported container:",t.container),{result:!1,failedCheck:"containerProfile"};var u=e.keys(o);if(u&&u.length){for(var d=0,h=u.length;d<h;d++){var f=u[d],m=o[f];if("mimeType"===f){if(!a.skipCanPlayTypeTest&&!this.canPlayType(l.getElementByType(a.type),m))return p.warn("[MDE] Direct play failed; canPlayType test, %s: %s",f,m),{result:!1,failedCheck:"canPlayType"}}else if("video"===f||"audio"===f){
var v=c.get(f),g=s(t,{streamType:v.id}),y="video"===f?i(t):r(t);if(!y)continue;var b="audio"===f&&y!==g[0];if(b&&!a.allowMultiTrackAudio)return p.warn("[MDE] Direct play failed; multi-track audio is required"),{result:!1,failedCheck:"allowMultiTrackAudio"};var w=this.analyzeStream(y,m,a);if(!w.result)return{result:!1,failedCheck:w.failedCheck}}else if("photo"===f){var w=this.analyzeStream(e.first(t.Part),m,a);if(!w.result)return{result:!1,failedCheck:w.failedCheck}}else if(!this.validateProfileProperty(f,m,t))return{
result:!1,failedCheck:"validateProfileProperty:"+f}}return{result:!0}}return{result:!0}},canDirectPlayVideo:function(t,n){if(!n.allowDirectPlay)return p.warn("[MDE] Direct play failed; option is disabled"),!1;if("hls"===t.protocol&&!n.hasFlash&&!n.hasNativeHLS)return p.warn("[MDE] Direct play failed; cannot play HLS"),!1;if("flv"===t.container&&!n.hasFlash)return p.warn("[MDE] Direct play failed; cannot play FLV"),!1;var i=e.first(t.Part);return n.allowSecureDirectPlay!==!1||!i||!/^https:\/\//.test(i.key)||(p.warn("[MDE] Direct play prevented; cannot play via HTTPS"),
!1)},canPlayType:function(e,t){if(e===l.elements.PHOTO)return!0;var n=document.createElement(e);return!(!n.canPlayType||!n.canPlayType(t).replace(/^no$/,""))},canDirectStream:function(e,t,n,i){return i.directStream?this.analyzeStream(e,t,n):(p.warn("[MDE] Direct stream failed; option is disabled"),{result:!1,failedCheck:"options:directStream"})},analyzeStream:function m(e,t,n){var i=t&&t.codecs&&t.codecs[e.codec];for(var r in t){var a=t[r];if("codecs"===r){var s=a[e.codec];if(!s)return{result:!1,
failedCheck:"noCodecInProfile:"+e.codec};var m=this.analyzeStream(e,s,n);if(!m.result)return{result:!1,failedCheck:m.failedCheck}}else if(!(i&&r in i||this.validateProfileProperty(r,a,e)))return{result:!1,failedCheck:"validateProfileProperty:"+r}}return{result:!0}},validateProfileProperty:function(t,n,i){var r,a=t.match(/^max(\w)(\w*)/);if(a){if(t=a[1].toLowerCase()+a[2],r=i[t],null==r&&p.warn("[MDE] Unable to validate %s; re-analyze the media if possible",t),null!=r&&"videoResolution"===t&&(r=u.getHeightFromResolution(r),
n=u.getHeightFromResolution(n)),null!=r&&r>n)return p.warn("[MDE] Invalid profile property; %s: %s > %s",t,r,n),!1}else if(r=i[t],null==r&&p.warn("[MDE] Unable to validate %s; re-analyze the media if possible",t),r!==n&&!e.contains(n,r))return p.warn("[MDE] Invalid profile property; %s: %s !== %s",t,r,n),!1;return!0},analyzeSubtitles:function(e,t){var n=t.subtitlesBurnLevel||h.ALWAYS,i=e.codec;return p("[MDE] Subtitle codec:",i),p("[MDE] Burn level:",n),n===h.ALWAYS?(p.warn("[MDE] Direct play failed; asked to always burn subtitles"),
{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:burnLevelAlways",canDirectStreamVideo:!1}):t.transcodeServer.supports("softSubtitles")?n===h.NEVER?{useSoftSubtitles:!0}:(p.warn("[MDE] Direct play failed; %s subtitles",i),/^(pgs|vobsub)$/i.test(i)?(p.warn("[MDE] Soft subtitles failed; bitmap subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):/^(ass|ssa)$/i.test(i)&&n===h.AUTO?(p.warn("[MDE] Soft subtitles failed; ASS subtitles"),
{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):{useSoftSubtitles:!0,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles"}):(p.warn("[MDE] Direct play failed; server support requires burn subtitles"),p.warn("[MDE] Soft subtitles failed; server version"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:softSubtitlesUnsupported",canDirectStreamVideo:!1})},canPlay:function(e,t){var n=this.validateParts(e,t)||this.validateTranscoder(e,t);
return n?{canPlay:!1,errorMessage:n}:{canPlay:!0}},validateParts:function(t,i){var r=o(t.media);if(r.length){p.warn("[MDE] Unable to play; missing parts");var a=e.first(r);return n(1===Number(a.exists)?"Please check the permissions for this file.":"Please check that the file exists and the necessary drive is mounted.")}},validateTranscoder:function(t,i){if(!t.canDirectPlay){var r,a=i.type,s=a===l.types.MUSIC,o=a===l.types.VIDEO,c=i.transcodeServer,d=c.get("transcoderAudio"),h=c.get("transcoderVideo");
if(s||"track"===i.item.get("type")){if(r=n("This server is not powerful enough to convert music."),o&&!h)return p.warn("[MDE] Unable to play; server unable to transcode music using video transcoder"),r;if(s&&!d)return p.warn("[MDE] Unable to play; server unable to transcode music using audio transcoder"),r}else if(o){var f=n("This server is not powerful enough to convert video. You may be able to enable playback by increasing your quality setting."),m=t.canDirectStreamVideo||!c.get("transcoderVideoRemuxOnly");
if(r=n("This server is not powerful enough to convert video."),!h||!m){if(p.warn("[MDE] Unable to play; server unable to transcode video"),c.get("isCloudSyncServer"))switch(t.canDirectPlayFailedCheck){case"validateProfileProperty:maxLevel":return n("Synced media cannot be converted to a lower H.264 level.");case"validateProfileProperty:maxBitrate":return n("Synced media cannot be converted to a lower quality.");case"allowDirectPlay":default:return n("Converting is not supported for synced media.");
}if(i.quality){if(i.quality.index===u.ORIGINAL)return r;var v=e.clone(i);return v.quality=e.extend({index:u.ORIGINAL},e.pick(i.quality,"attribute")),this.getMediaDecision(v).canDirectPlay?f:r}return f}}}},getEffectiveQuality:function(e,t,n){var r=n.quality,a={},s={};if(e.bitrate||p.warn("[MDE] Unable to determine effective quality; re-analyze the media if possible"),n.type===l.types.VIDEO){a.bitrate=e.bitrate,a.videoResolution=u.getHeightFromResolution(e.videoResolution);var o=this.getPrimaryStreamProperty(t,"maxBitrate",n);
if(o){var c=i(e),d=c?c.bitrate:e.bitrate;a.bitrate=Math.min(d,o),s.maxVideoBitrate=o}if(r){var h=r.videoResolution;if(h){var f=u.getResolutionFromSize(r.videoResolution),m=u.getHeightFromResolution(f);a.videoResolution=Math.min(a.videoResolution,m)}s.videoQuality=r.videoQuality,s.videoResolution=r.videoResolution}}else if(n.type===l.types.MUSIC){a.bitrate=e.bitrate;var v=this.getPrimaryStreamProperty(t,"maxBitrate",n);v&&(a.bitrate=Math.min(e.bitrate,v),s.maxAudioBitrate=v)}return a.transcoderQualityOptions=s,
a},getPrimaryStreamProperty:function(e,t,n){var i=l.getStreamByType(n.type),r=e[i],a=e[t];return null==a&&r&&(a=r[t]),a},getMediaTitle:function(t){var n=t.title||t.videoResolution||t.bitrate,r=e.compact([t.container,t.videoCodec,t.audioCodec]),a=i(t);return a&&r.push(a.level,a.profile),r.length&&(n+=" ("+r.join(", ")+")"),n},getDecisionLogs:function(t){var n=["canPlay: "+t.canPlay,"canDirectPlay: "+t.canDirectPlay],i=t.canDirectStreamVideo;null!=i&&n.push("canDirectStreamVideo: "+i);var r=t.canDirectStreamAudio;
null!=r&&n.push("canDirectStreamAudio: "+r);var a=t.useSoftSubtitles;null!=a&&n.push("useSoftSubtitles: "+a);var s=t.bitrate;null==s||e.isNaN(s)||n.push("bitrate: "+s);var o=t.videoResolution;return null==o||e.isNaN(o)||n.push("videoResolution: "+o),n},getBestDecision:function(t){var n=e.last(this.sortDecisions(t));return p.group("[MDE] Selected %s to play",this.getMediaTitle(n.media)),this.getDecisionLogs(n).forEach(function(e){return p.info(e)}),p.groupEnd(),n},sortDecisions:function(t){return e.chain(t).reverse().sortBy(this.preferHigherBitrate,this).sortBy(this.preferMoreAudioChannels,this).sortBy(this.preferDirectStreamAudio,this).sortBy(this.preferHigherResolution,this).sortBy(this.preferDirectStreamVideo,this).sortBy(this.preferDirectPlay,this).sortBy(this.preferHigherResolutionIfCapable,this).sortBy(this.preferCloudIfRemote,this).sortBy(this.preferPlayable,this).value();
},preferPlayable:function(e){return void 0===e.canPlay?null:e.canPlay},preferCloudIfRemote:function(e){var t=e.media.proxyType===d.CLOUD;return e.transcodeServer.hasLocalConnection()?!t:t},preferHigherResolutionIfCapable:function(e){var t=e.transcodeServer,n=t.get("transcoderVideo"),i=t.get("transcoderVideoRemuxOnly");return n&&!i&&(e.canDirectPlay||e.canDirectStreamVideo)?this.preferHigherResolution(e):null},preferDirectPlay:function(e){return void 0===e.canDirectPlay?null:e.canDirectPlay},preferDirectStreamVideo:function(e){
return void 0===e.canDirectStreamVideo?null:e.canDirectStreamVideo},preferHigherResolution:function(e){return void 0===e.videoResolution?null:e.videoResolution},preferDirectStreamAudio:function(e){return void 0===e.canDirectStreamAudio?null:e.canDirectStreamAudio},preferMoreAudioChannels:function(e){var t=e.media.audioChannels;return void 0===t?null:t},preferHigherBitrate:function(e){return void 0===e.bitrate?null:e.bitrate}};return f}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";
function i(e,t,n){var i=(0,u.resolve)("appModel"),r=i.get("servers"),s=r.find(function(e){var t=e.get("activeConnection");return e.get("isConnected")&&e.get("isFullServer")&&t.get("isPrivate")});return l.default.image(e,t,a({fallbackServer:s},n))}function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return i.apply(void 0,t)}}var a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.imageTranscodeUrl=i,t.default=r;var o=n(176),l=s(o),u=n(10);
},function(e,t,n){"use strict";function i(e){if(!e)return"";if("8k"===e)return"8K";if("4k"===e)return"4K";var t=parseInt(e,10);return s.default.isNaN(t)?e.toUpperCase():e+"p"}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(43),n(824),n(447),n(450),n(219),n(169),n(297),n(26),n(103)],r=function(e,t,n,i,r,a,s,o,l,u,c,d){"use strict";var h={getPlayerDecision:function(n){e.defaults(n,{offset:0,
minVersionForDASH:d.dash,minVersionForStreamingMKV:d.streamingMKV,transcoderOptions:{}});var i={playbackSessionID:u(),transcodeSessionID:u(),offset:n.offset},r=this.populateMedia(i,n);return r=r.then(e.bind(function(){return this.resolveMedia(i,n)},this)),r=r.then(function(){return t.when(i.url)}),r=r.then(function(e){return i.url=e,i})},populateMedia:function(n,i){var a=t.Deferred(),s=e.bind(a.resolve,a,n);return i.requireAnalysis&&r(i.item)?i.item.fetch({scope:"player"}).always(s):e.defer(s),a.promise();
},resolveMedia:function(n,i){var r=e.extend({transcodeServer:this.resolveTranscodeServer(i)},i),a=o.getMediaDecision(r),s=a.media,l=t.Deferred();return e.extend(n,a),s?n.canPlay?"webkit"===s.protocol?(c.warn("[PDE] Webkit videos are not supported"),n.redirect=!0,l.reject(n).promise()):"embed"===s.protocol?(c.warn("[PDE] An embed is required"),n.embed=!0,n.part=e.first(s.Part),l.reject(n).promise()):this.resolvePart(n,i):(c.warn("[PDE] Unable to play item;",n.errorMessage),l.reject(n).promise()):this.resolveUrls(n,i);
},resolveTranscodeServer:function(e){var t=e.item.server,n=e.fallbackServer;if(t===n||!n||!n.get("isConnected"))return t;var r;return e.type===i.types.VIDEO?r="transcoderVideo":e.type===i.types.MUSIC&&(r="transcoderAudio"),r&&!t.get(r)&&n.get(r)?n:t},resolvePart:function(t,n){return n.part?t.part=n.part:n.offset?1===t.media.Part.length?t.part=t.media.Part[0]:(t.part=a(t.media,n.offset),t.offset=s(t.media,t.part,n.offset)):t.part=e.first(t.media.Part),t.media.indirect?this.resolveIndirect(t,n):this.resolveUrls(t,n);
},resolveIndirect:function(n,i){c("[PDE] Resolving indirect item");var r=i.item.resolveIndirect(n.media,n.part),a=e.bind(function(){return this.resolveMedia(n,i)},this),s=e.bind(function(){return t.Deferred().reject(n).promise()},this);return r=r.then(a,s)},resolveUrls:function(e,n){var i=t.Deferred();return this.validatePlayerType(e,n)?(this.validateSoftSubtitles(e,n)?e.subtitlesUrl=this.resolveSubtitlesUrl(e,n):e.useSoftSubtitles&&(e.useSoftSubtitles=!1),c.group("[PDE] Player decision"),c.info("Player:",e.playerType),
c.info("Protocol:",e.protocol),c.info("Direct Play:",e.canDirectPlay),c.groupEnd(),e.canDirectPlay?e.url=this.resolveDirectPlayUrl(e,n):e.url=this.resolveTranscoderUrl(e,n),i.resolve(e).promise()):i.reject(e).promise()},validatePlayerType:function(e,t){return e.media&&t.type&&t.type!==i.types.PHOTO?e.canDirectPlay?("hls"===e.media.protocol?(e.protocol="hls",e.playerType=t.hasNativeHLS?"html":"flash"):(e.protocol="http",e.playerType="flv"===e.media.container?"flash":"html"),!0):this.validatePlayerTranscodeProtocol(e,t):(e.protocol="http",
e.playerType="html",!0)},validatePlayerTranscodeProtocol:function(e,t){var r,a=e.transcodeServer,s=t.transcodeProtocol,o=!0,l=!0,u=!0;if(s&&(o="dash"===s,l="http"===s,u="hls"===s),u&&t.hasNativeHLS)return e.protocol="hls",e.playerType="html",!0;if(l&&t.hasStreamingMKV){if(a.isVersionOrNewer(t.minVersionForStreamingMKV))return e.protocol="http",e.playerType="html",!0;r=t.minVersionForStreamingMKV}if(o&&t.hasDASH){if(a.isVersionOrNewer(t.minVersionForDASH))return e.protocol="dash",e.playerType="html",
!0;r=t.minVersionForDASH}return t.type===i.types.MUSIC?(e.protocol="http",e.playerType="html",!0):u&&t.hasFlash?(e.protocol="hls",e.playerType="flash",!0):(r?e.errorMessage=n("Please update Plex Media Server. This feature requires {1} or later.",r):e.errorMessage=n("Streaming this media is unsupported."),!1)},validateSoftSubtitles:function(e,t){return e.useSoftSubtitles&&"html"!==e.playerType?(c.warn("[PDE] Only the HTML player supports soft subtitles"),!1):e.useSoftSubtitles},resolveDirectPlayUrl:function(e,t){
var n=t.item,i=e.part,r={"X-Plex-Session-Identifier":e.playbackSessionID};if(i){var a=/(googlevideo|youtube).com/.test(i.key);return"flv"===i.container&&a&&i.postURL?i.postURL:n.server.resolveUrl(i.key,{appendHeaders:!0,params:r})}return n.server.resolveUrl(n.get("key"),{appendHeaders:!0,params:r})},resolveTranscoderUrl:function(t,n){var r=n.item,a=t.media,s=t.part,o=n.transcoderOptions;e.isFunction(o)&&(o=o(t)),o=e.extend({},t.transcoderQualityOptions,o,{protocol:t.protocol,"X-Plex-Session-Identifier":t.playbackSessionID,
session:t.transcodeSessionID,offset:t.offset/1e3}),n.type===i.types.VIDEO&&(t.useSoftSubtitles?(o.subtitles="auto",n.subtitlesBurnLevel===l.AVOID&&(o.advancedSubtitles="text")):o.subtitles="burn");var u=n.profileExtra;e.isFunction(u)&&(u=u(t)),o["X-Plex-Client-Profile-Extra"]=u,("hls"===o.protocol&&!n.useOffsetHLS||"dash"===o.protocol)&&(c("[PDE] DASH and HLS should seek forward by default, offset=0"),o.offset=0),"hls"===o.protocol&&n.useOffsetHLS&&(t.useOffsetHLS=!0,o.offset&&(c("[PDE] HLS started with an offset, copyts=0"),
o.copyts=0)),"http"===o.protocol&&(n.type===i.types.MUSIC?(t.useOffsetHTTP=!0,o.copyts=0):o.copyts=1),"http"!==o.protocol||t.canDirectPlay||(o["X-Plex-Chunked"]=1),e.each(e.keys(o),function(e){var t=o[e];null==t&&delete o[e]});var d=n.type,h=n.transcoder,p=t.transcodeServer;return d===i.types.VIDEO?h.video(p,r,a,s,o):d===i.types.MUSIC?h.music(p,r,o):d===i.types.PHOTO?(o.fallbackServer=n.fallbackServer,h.image(p,r.getMediaKey(),o)):void 0},resolveSubtitlesUrl:function(e,t){var n=this.resolveTranscoderUrl(e,t),i=n.substring(n.indexOf("?"));
return e.transcodeServer.resolveUrl("/video/:/transcode/universal/subtitles"+i)}};return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3)],r=function(e){"use strict";function t(t){var n=e.clone(t);return"undefined"!=typeof n.last?(n.end=n.last+1,n.size=n.end-n.start):"undefined"!=typeof n.size?(n.end=n.start+n.size,n.last=n.end-1):"undefined"!=typeof n.end&&(n.last=n.end-1,n.size=n.end-n.start),n}function n(n,i){return e.filter(e.map(n,t),function(e){return i?e.size>=0:e.size>0;
})}var i={augment:t,difference:function(e,i,r){e=t(e),i=t(i);var a=[{start:e.start,last:Math.min(e.last,i.start-1)},{start:Math.max(e.start,i.end),last:e.last}];return n(a,r)},union:function(e,i,r){if(e=t(e),i=t(i),e.start>i.start){var a=e;e=i,i=a}var s=[e];return i.start<=e.end?s[0].last=Math.max(i.last,e.last):s.push(i),n(s,r)},degap:function(e,n){var i=t(e);return n=t(n),n.size?(i.start>n.end&&(i={start:n.end,end:i.end}),i.end<n.start&&(i={start:i.start,end:n.start}),t(i)):i},each:function(e,n,i){
e=t(e);for(var r=Math.min(e.start,e.end),a=Math.max(e.start,e.end);r<=a;r++)n.call(i,r)},roundByPage:function(e,n){return e=t(e),t({start:Math.floor(e.start/n)*n,end:Math.ceil(e.end/n)*n})}};return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(78)],r=function(e){"use strict";var t=e.extend({setup:function(e){if(e.className&&this.$el.addClass(e.className),this.model=e.model,this.server=e.model.server,e.flag){var t=this.model.get("Media");this.flag=e.flag,t&&t.length&&(this.path=t[0][this.flag]),
this.ignoreAttributeChanges||this.listenTo(this.model,"change:Media",this.onMediaChange)}else this.flag=e.modelAttribute,this.path=this.model.get(this.flag),this.ignoreAttributeChanges||this.listenTo(this.model,"change:"+this.flag,this.onChange);this.prefix=this.model.get("mediaTagPrefix"),this.version=this.model.get("mediaTagVersion"),this.path&&(this.url=this.getUrl(this.path)),this.setDimensions(e)},getUrl:function(e){return this.prefix+this.flag+"/"+encodeURIComponent(e)+"?t="+this.version},onMediaChange:function(e,t){
this.onChange(e,t&&t.length?t[0][this.flag]:null)}});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(38),p=u(h),f=n(23),m=n(27),v=u(m),g=n(1523),y=u(g),b=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isMeasured:!1,
width:0,height:0}}return r(t,e),a(t,[{key:"componentDidMount",value:function(){this._requestFrame()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._cancelFrame(),this._clearTimeout()}},{key:"_requestFrame",decorators:[f.autobind],value:function(){this._cancelFrame(),this._frameRequestID=requestAnimationFrame(this._measure)}},{key:"_cancelFrame",value:function(){this._frameRequestID&&(this._frameRequestID=cancelAnimationFrame(this._frameRequestID));
}},{key:"_clearTimeout",value:function(){this._measureTimeoutID&&(this._measureTimeoutID=clearTimeout(this._measureTimeoutID))}},{key:"_measure",decorators:[f.autobind],value:function(){var e=this.props,t=e.ignoreWidth,n=e.ignoreHeight,i=this.refs.container,r=i.getBoundingClientRect(),a=r.width||0,s=r.height||0,o={isMeasured:!0,width:t?void 0:a,height:n?void 0:s};this.setState(o),this.props.onMeasure&&this.props.onMeasure(o),this._reset()}},{key:"_reset",value:function(){var e=this.refs.expandContainer,t=this.refs.shrinkContainer;
e.scrollTop=1e5,e.scrollLeft=1e5,t.scrollTop=1e5,t.scrollLeft=1e5}},{key:"onScroll",decorators:[f.autobind],value:function(e){this._cancelFrame(),this._clearTimeout(),this._measureTimeoutID=setTimeout(this._requestFrame,this.props.resizeTimeout)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,i=o(e,["className","children"]),r="function"!=typeof n;return(0,p.default)(this.props.onMeasure||!r,"There are two ways to use the `Measure` component:\n      1. Use a `children` function that returns a node, e.g. `({ width, height }) => PropTypes.node`\n      2. Treat `Measure` as a controlled component with an `onMeasure` callback and `children` node"),
d.default.createElement("div",l({ref:"container",className:t},i),r?n:n(this.state),d.default.createElement("div",{ref:"expandContainer",className:y.default.scrollContainer,onScroll:this.onScroll},d.default.createElement("div",{className:y.default.expandContent})),d.default.createElement("div",{ref:"shrinkContainer",className:y.default.scrollContainer,onScroll:this.onScroll},d.default.createElement("div",{className:y.default.shrinkContent})))}}]),t}(c.Component);b.propTypes={className:c.PropTypes.string,
style:c.PropTypes.object,children:c.PropTypes.oneOfType([c.PropTypes.node,c.PropTypes.func]).isRequired,ignoreWidth:c.PropTypes.bool,ignoreHeight:c.PropTypes.bool,resizeTimeout:c.PropTypes.number.isRequired,onMeasure:c.PropTypes.func},b.defaultProps={className:y.default.container,ignoreWidth:!1,ignoreHeight:!1,resizeTimeout:100},t.default=b,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(7),u=o(l),c=n(1941),d=o(c),h=n(27),p=o(h),f=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){return u.default.createElement(d.default,this.props)}}]),t}(l.Component);f.propTypes={className:l.PropTypes.string,children:l.PropTypes.node,component:l.PropTypes.string,transitionName:l.PropTypes.shape({
appear:l.PropTypes.string,appearActive:l.PropTypes.string,enter:l.PropTypes.string,enterActive:l.PropTypes.string,leave:l.PropTypes.string,leaveActive:l.PropTypes.string}).isRequired,transitionAppear:l.PropTypes.bool,transitionEnter:l.PropTypes.bool,transitionLeave:l.PropTypes.bool,transitionAppearTimeout:l.PropTypes.number,transitionEnterTimeout:l.PropTypes.number,transitionLeaveTimeout:l.PropTypes.number},f.defaultProps={component:"div",transitionName:{appear:"appear",enter:"enter",leave:"leave"
},transitionAppear:!0,transitionEnter:!0,transitionLeave:!0},t.default=f,e.exports=t.default},function(e,t,n){var i,r;i=[n(128),n(60),n(997)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:"/playlists?type="+e.LOCAL,parse:function(e){return this.convert(e,"Playlist")}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(74),o=r(s),l=n(52),u=a(l),c=(0,
o.default)(u.ADD_METADATA_ITEM_TO_PLAYLIST);t.addMetadataItemToPlaylist=c;var d=(0,o.default)(u.ANALYZE_METADATA_ITEM);t.analyzeMetadataItem=d;var h=(0,o.default)(u.DELETE_METADATA_ITEM);t.deleteMetadataItem=h;var p=(0,o.default)(u.DELETE_METADATA_ITEM_VERSION);t.deleteMetadataItemVersion=p;var f=(0,o.default)(u.DOWNLOAD_METADATA_ITEM_VERSION);t.downloadMetadataItemVersion=f;var m=(0,o.default)(u.EDIT_METADATA_ITEM);t.editMetadataItem=m;var v=(0,o.default)(u.FIX_METADATA_ITEM_MATCH);t.fixMetadataItemMatch=v;
var g=(0,o.default)(u.GET_METADATA_ITEM_INFO);t.getMetadataItemInfo=g;var y=(0,o.default)(u.MARK_METADATA_ITEM_UNWATCHED);t.markMetadataItemUnwatched=y;var b=(0,o.default)(u.MARK_METADATA_ITEM_WATCHED);t.markMetadataItemWatched=b;var w=(0,o.default)(u.OPTIMIZE_METADATA_ITEM);t.optimizeMetadataItem=w;var S=(0,o.default)(u.PLAY_METADATA_ITEM);t.playMetadataItem=S;var P=(0,o.default)(u.PLAY_METADATA_ITEM_VERSION);t.playMetadataItemVersion=P;var x=(0,o.default)(u.PLAY_PRIMARY_EXTRA);t.playPrimaryExtra=x;
var C=(0,o.default)(u.PLAY_RELATED_MIX);t.playRelatedMix=C;var T=(0,o.default)(u.QUEUE_METADATA_ITEM);t.queueMetadataItem=T;var _=(0,o.default)(u.RATE_METADATA_ITEM);t.rateMetadataItem=_;var E=(0,o.default)(u.RECOMMEND_METADATA_ITEM);t.recommendMetadataItem=E;var k=(0,o.default)(u.REFRESH_METADATA_ITEM);t.refreshMetadataItem=k;var I=(0,o.default)(u.SHARE_METADATA_ITEM);t.shareMetadataItem=I;var A=(0,o.default)(u.SPLIT_METADATA_ITEM_APART);t.splitMetadataItemApart=A;var M=(0,o.default)(u.SYNC_METADATA_ITEM);
t.syncMetadataItem=M;var D=(0,o.default)(u.UNMATCH_METADATA_ITEM);t.unmatchMetadataItem=D;var R=(0,o.default)(u.WATCH_METADATA_ITEM_LATER);t.watchMetadataItemLater=R;var O=(0,o.default)(u.QUEUE_METADATA_ITEM,function(e){return i({},e,{next:!1})});t.addMetadataItemToQueue=O;var L=(0,o.default)(u.PLAY_METADATA_ITEM,function(e){return i({},e,{unwatched:!1})});t.playMetadataItemAll=L;var N=(0,o.default)(u.QUEUE_METADATA_ITEM,function(e){return i({},e,{next:!0})});t.playMetadataItemNext=N;var U=(0,o.default)(u.PLAY_METADATA_ITEM,function(e){
return i({},e,{shuffle:!0})});t.shuffleMetadataItem=U},function(e,t,n){"use strict";function i(){return(0,l.createSelector)((0,h.default)(),function(e){var t=o.default.pick(e,"friendlyName","machineIdentifier","allowSync","allowMediaDeletion","transcoderVideo","isFullServer","isFullOwnedServer");return t})}function r(){return(0,c.default)(i(),function(e){return e})}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=a(s),l=n(28),u=n(273),c=a(u),d=n(76),h=a(d);
e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=9;t.TAB=n;var i=13;t.ENTER=i;var r=16;t.SHIFT=r;var a=17;t.CONTROL=a;var s=27;t.ESCAPE=s;var o=38;t.UP_ARROW=o;var l=40;t.DOWN_ARROW=l;var u=91;t.META_1=u;var c=93;t.META_2=c;var d=224;t.META_3=d},function(e,t,n){"use strict";var i=n(569).default,r=n(570).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(59);i(t,r(a,i));var s="searchResults";t.SEARCH_RESULT=s;var o="syncMetadataItems";
t.SYNC_METADATA_ITEM=o},function(e,t,n){var i,r;i=[n(1697),n(3),n(9),n(8),n(31),n(10),n(149),n(13),n(55),n(95),n(1088),n(1103),n(1116),n(1120),n(1119),n(1115),n(1113),n(1112),n(1117),n(1114),n(1118),n(1121)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y,b,w,S){"use strict";var P={movie:h,show:p,season:f,episode:m,artist:v,album:g,photoAlbum:y,clip:b,userPlaylistItem:b,playlist:w},x={playlist:{blur:5,saturation:50}},C=n.Layout.extend({className:"details-container",template:e,regions:{details:".row"
},events:{"click .pivot-link":"onPivotClick"},onlyAfterRender:["playTheme"],initialize:function(){var e=this.model.get("type"),n={};t(x).has(e)&&(n=x[e]),this.mediaActions=new u({},{item:this.model,type:e,showAdvanced:!0}),a.resolve("appModel").get("primaryServer")===this.model.server&&a.resolve("appStore").dispatch(s.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),section:this.model.get("librarySectionID")})),this.once("render",t.bind(function(){i.trigger("show:background",{
model:this.model,imageFilters:n}),i.trigger("show:bar","actionbar",new c({model:this.model,mediaActions:this.mediaActions})),this.model.get("isLibraryItem")&&i.trigger("show:bar","breadcrumbbar",new d({model:this.model}))},this)),this.playTheme()},playTheme:function(){if(r.get("playThemeMusic")){var e=this.model.get("grandparentTheme")||this.model.get("parentTheme")||this.model.get("theme");if(!e)return null;var t=new l({theme:e,key:e,parentKey:this.model.get("key"),type:"track",Media:[]},{server:this.model.server
});o.execute("playBackgroundMedia",{item:t,volume:50})}},onRender:function(){var e,n=this.model.get("type");if(t(P).has(n)){var i=P[n];e=new i({model:this.model,mediaActions:this.mediaActions})}else e=new S({model:this.model});this.details.append(e,this.$el)},onClose:function(){i.trigger("hide:bar","actionbar"),a.resolve("appModel").get("primaryServer")===this.model.server&&a.resolve("appStore").dispatch(s.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),section:null})),this.model.get("isLibraryItem")&&i.trigger("hide:bar","breadcrumbbar");
},onPivotClick:function(e){var t=this.model.section;if(t){var n=t.get("items");n.scrollPosition=0}}});return C}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(19).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),s=i(a),o=n(78),l=r(o),u=n(173),c=r(u),d=l.default.extend({background:!0,setup:function(e){this.model=e.model,e.noPlaceholder||(this.placeholderClass=c.default.playlist);var t=this.getPixelRatio(),n={width:Math.round((e.width||e.height||256)*t),
height:Math.round((e.height||e.width||256)*t),rows:e.rows||2,cols:e.columns||2,border:e.border||0,media:e.media||"thumb",repeat:e.unique?0:1},i=this.model.get("composite");i&&(this.url=this.model.server.resolveUrl(s.join(i,n),{appendToken:!0}))}});t.default=d,e.exports=t.default},function(e,t,n){var i,r;i=[n(1805),n(3),n(5),n(6),n(8),n(22),n(44)],r=function(e,t,n,i,r,a,s){"use strict";var o=s.extend({name:"channelSettingsModal",className:"channel-settings-modal modal fade",template:e,ui:{submitBtn:".submit-btn"
},events:t.extend({"change input[name]":"onInputChange","change select[name]":"onInputChange","submit #channel-settings-form":"onSubmit"},s.prototype.events),initialize:function(){s.prototype.initialize.apply(this,arguments),this.changes={}},serializeData:function(){var e=this.model.get("title")||this.model.get("name");return{title:e?e:"Preferences...",settings:this.collection.toJSON()}},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked),this.changes[t.name]=n;
},onSubmit:function(e){if(e.preventDefault(),t.isEmpty(this.changes))return void this.hide();var s=this.ui.submitBtn;if(!s.hasClass("active")){s.addClass("active");var o=this.collection.first(),l=o.getSaveParams(this.changes),u=t.result(this.collection,"url"),c=a.join([u,"/set"],l),d=n.ajax(o.server.getXHROptions(c));d.done(t.bind(function(){this.hide()},this)),d.fail(t.bind(function(){r.trigger("show:alert",{type:"error",message:i("There was a problem saving these settings.")})},this)),d.always(function(){
s.removeClass("active")})}}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1813),n(3),n(44)],r=function(e,t,n){"use strict";var i=n.extend({name:"libraryFailureModal",className:"confirm-modal modal modal-sm fade",template:e,events:t.extend({"click .confirm-btn":"hide"},n.prototype.events),serializeData:function(){return{serverID:this.model.id,isSignedIn:"ok"===this.model.get("myPlexSigninState"),hasPlexPass:this.model.get("myPlexSubscription")}}});return i}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1877),n(3),n(5),n(9)],r=function(e,t,n,i){"use strict";var r=i.ItemView.extend({className:"player-slider",template:e,dragging:!1,ui:{thumb:".player-slider-thumb",track:".player-slider-track",progress:".player-slider-progress"},events:{mousedown:"onMouseDown",touchstart:"onTouchStart"},onlyAfterRender:["displayValue"],initialize:function(e){t.bindAll(this,"onMouseMove","onMouseUp","onTouchMove","onTouchEnd"),this.$document=n(document),this.currentValue=e.value||0;
},startDragging:function(){this.dragging=!0,this.$el.addClass("active")},stopDragging:function(){this.dragging=!1,this.$el.removeClass("active"),this.triggerMethod("dragComplete")},updateForPosition:function(e,t){var n=this.getValueForPosition(e);this.setValue(n)&&this.displayValue(n,t)},getValueForPosition:function(e){var t=this.ui.track,n=e-t.offset().left,i=n/t.width();return i=Math.min(Math.max(i,0),1),i=Math.round(100*i)},setValue:function(e){return this.currentValue=e,this.trigger("change:value",e),
!0},displayValue:function(e,t){this.ui.thumb.css("left",e+"%"),this.ui.progress.css("width",e+"%"),this.$el.data("value",e)},onRender:function(){this.displayValue(this.currentValue)},onClose:function(){this.$document.off("mousemove",this.onMouseMove),this.$document.off("mouseup",this.onMouseUp),this.$document.off("touchmove",this.onTouchMove),this.$document.off("touchend",this.onTouchEnd)},onMouseDown:function(e){e.preventDefault(),this.$document.on("mousemove",this.onMouseMove),this.$document.on("mouseup",this.onMouseUp),
this.startDragging(),this.setValue(this.getValueForPosition(e.pageX))},onTouchStart:function(e){this.$document.on("touchmove",this.onTouchMove),this.$document.on("touchend",this.onTouchEnd),this.startDragging();var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX)},onMouseMove:function(e){e.preventDefault(),this.updateForPosition(e.pageX)},onTouchMove:function(e){e.preventDefault();var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX)},onMouseUp:function(e){e.preventDefault(),
this.$document.off("mousemove",this.onMouseMove),this.$document.off("mouseup",this.onMouseUp),this.updateForPosition(e.pageX),this.stopDragging()},onTouchEnd:function(e){this.$document.off("touchmove",this.onTouchMove),this.$document.off("touchend",this.onTouchEnd);var t=e.originalEvent.touches[0];t&&this.updateForPosition(t.pageX),this.stopDragging()}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=e.children,n=r(e,["children"]);return o.default.createElement("div",n,t);
}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(1540),u=a(l);i.propTypes={children:s.PropTypes.node.isRequired},i.defaultProps={className:u.default.group},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(14).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(10),p=n(6),f=u(p),m=n(23),v=n(112),g=u(v),y=n(27),b=u(y),w=n(41),S=n(152),P=u(S),x=n(533),C=u(x),T=n(534),_=u(T),E=n(537),k=u(E),I=n(535),A=u(I),M=n(536),D=u(M),R=n(1553),O=u(R),L=function(e){
function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isAccordGiven:!1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,b.default)(this,e,t)}},{key:"onCancel",decorators:[m.autobind],value:function(){var e=(0,h.resolve)("metrics");e.trackClick(o({},this.props.metricsProperties,{page:this.props.metricsPage,action:"cancel"}))}},{key:"onAccordChange",decorators:[m.autobind],value:function(e){this.setState({isAccordGiven:e.target.checked
})}},{key:"render",value:function(){var e=this.props,t=e.metricsPage,n=e.metricsProperties,i=e.kind,r=e.title,a=e.message,s=e.accordMessage,u=e.confirmLabel,c=e.cancelLabel,h=e.hideCancelButton,p=e.onConfirm,m=e.onCancel,v=l(e,["metricsPage","metricsProperties","kind","title","message","accordMessage","confirmLabel","cancelLabel","hideCancelButton","onConfirm","onCancel"]),y=!!s,b=y&&!this.state.isAccordGiven;return d.default.createElement(_.default,o({className:O.default.confirmModal,metricsPage:t,
metricsProperties:n,onModalClose:(0,g.default)(this.onCancel,m)},v),d.default.createElement(k.default,{className:O.default.modalHeader},r),d.default.createElement(A.default,{bodyClassName:O.default.modalBody},a,y&&d.default.createElement("label",{className:O.default.accordLabel},d.default.createElement("input",{type:"checkbox",className:O.default.accordInput,checked:this.state.isAccordGiven,onChange:this.onAccordChange}),s)),d.default.createElement(D.default,{className:O.default.modalFooter},!h&&d.default.createElement(P.default,{
className:O.default.cancelButton,kind:w.kinds.DEFAULT,onPress:(0,g.default)(this.onCancel,m)},c||(0,f.default)("Cancel")),d.default.createElement(C.default,o({},n,{page:t,action:"confirm"}),d.default.createElement(P.default,{className:O.default.confirmButton,"data-autofocus":!0,kind:i,isDisabled:b,onPress:p},u||(0,f.default)("OK")))))}}]),t}(c.Component);L.propTypes={className:c.PropTypes.string,metricsPage:c.PropTypes.string.isRequired,metricsProperties:c.PropTypes.object,kind:c.PropTypes.oneOf(w.kinds.all),
title:c.PropTypes.string.isRequired,message:c.PropTypes.string.isRequired,accordMessage:c.PropTypes.string,confirmLabel:c.PropTypes.string,cancelLabel:c.PropTypes.string,hideCancelButton:c.PropTypes.bool,onConfirm:c.PropTypes.func.isRequired,onCancel:c.PropTypes.func},L.defaultProps={kind:w.kinds.PRIMARY},t.default=L,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(34),d=n(72),h=n(1379),p=o(h),f=function(e){
function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"componentWillUnmount",value:function(){this.props.garbageCollectEntities()}},{key:"render",value:function(){return u.default.createElement(p.default,this.props)}}]),t}(l.Component);f.propTypes={garbageCollectEntities:l.PropTypes.func.isRequired},t.default=(0,c.connect)(null,{garbageCollectEntities:d.garbageCollectEntities})(f),e.exports=t.default},function(e,t,n){"use strict";
function i(e){var t=e.children,n=r(e,["children"]);return l.default.createElement("div",a({className:c.default.pageHeader},n),t)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1576),c=s(u);i.propTypes={children:o.PropTypes.node},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return{isWaitingForPrimaryServer:e.isWaitingForPrimaryServer,primaryServerEntityID:e.primaryServer}}var r=n(16).default,a=n(17).default,s=n(46).default,o=n(15).default,l=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(34),h=n(70),p=n(72),f=n(1380),m=l(f),v=function(e){function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){e.machineIdentifier&&e.machineIdentifier!==this.props.machineIdentifier&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];
(0,h.scheduleImmediateUpdate)(function(){e.machineIdentifier&&e.changePrimaryServer(e.machineIdentifier)})}},{key:"render",value:function(){return c.default.createElement(m.default,this.props)}}]),t}(u.Component);v.propTypes={machineIdentifier:u.PropTypes.string,changePrimaryServer:u.PropTypes.func.isRequired},t.default=(0,d.connect)(i,{changePrimaryServer:p.changePrimaryServer})(v),e.exports=t.default},function(e,t,n){"use strict";function i(e){return{primaryServerEntityID:e.primaryServer,serverEntityIDs:e.servers
}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(34),s=n(72),o=n(1429),l=r(o),u={onServerMenuOpen:s.discoverServers},c=(0,a.connect)(i,u)(l.default);t.default=c,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(t)switch(t){case l.default.PRE_PLAY:switch(e){case"episode":return d}break;case l.default.CONTINUE_WATCHING:return d}switch(e){case"movie":return u;case"show":return u;case"season":return u;case"episode":return u;case"artist":return c;case"album":
return c;case"track":return c;case"photo":return c;case"photoAlbum":return c;case"clip":return d;case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":case"concert":return d;case"mixed":return u;default:return c}}function r(e,t,n){var r=i(t,n);return Math.round(e*r)}function a(e,t,n){var r=i(t,n);return Math.round(e/r)}var s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAspectRatio=i,t.getWidth=r,t.getHeight=a;var o=n(98),l=s(o),u=1/1.5;t.PORTRAIT=u;var c=1;t.SQUARE=c;var d=16/9;
t.LANDSCAPE=d},function(e,t){e.exports={dashboardContainer:"DashboardView-dashboardContainer-16bIk",sidebarContainer:"DashboardView-sidebarContainer-2OSHY",pageContainer:"DashboardView-pageContainer-2hxyK"}},function(e,t,n){"use strict";var i={};e.exports=i},function(e,t,n){"use strict";var i=n(32),r=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:i(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=r},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s="",o="function",l=this.escapeExpression;return s+='<div class="sidebar-container '+l((a=t&&t.styles,a=null==a||a===!1?a:a.sidebarContainer,typeof a===o?a.apply(t):a))+'"></div> <div class="page-container '+l((a=t&&t.styles,a=null==a||a===!1?a:a.pageContainer,typeof a===o?a.apply(t):a))+'"></div> '})},function(e,t){"use strict";var n={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,
onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},i={getNativeProps:function(e,t){if(!t.disabled)return t;var i={};for(var r in t)!n[r]&&t.hasOwnProperty(r)&&(i[r]=t[r]);return i}};e.exports=i},function(e,t,n){"use strict";function i(){if(o)for(var e in l){var t=l[e],n=o.indexOf(e);if(n>-1?void 0:s(!1),!u.plugins[n]){t.extractEvents?void 0:s(!1),u.plugins[n]=t;var i=t.eventTypes;for(var a in i)r(i[a],t,a)?void 0:s(!1)}}}function r(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?s(!1):void 0,
u.eventNameDispatchConfigs[n]=e;var i=e.phasedRegistrationNames;if(i){for(var r in i)if(i.hasOwnProperty(r)){var o=i[r];a(o,t,n)}return!0}return!!e.registrationName&&(a(e.registrationName,t,n),!0)}function a(e,t,n){u.registrationNameModules[e]?s(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var s=n(32),o=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,
injectEventPluginOrder:function(e){o?s(!1):void 0,o=Array.prototype.slice.call(e),i()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];l.hasOwnProperty(n)&&l[n]===r||(l[n]?s(!1):void 0,l[n]=r,t=!0)}t&&i()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var i=u.registrationNameModules[t.phasedRegistrationNames[n]];
if(i)return i}return null},_resetEventPlugins:function(){o=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var i=u.registrationNameModules;for(var r in i)i.hasOwnProperty(r)&&delete i[r]}};e.exports=u},function(e,t,n){"use strict";var i=n(51),r=n(600),a=n(602),s=n(601),o=n(1963),l=n(86),u=(n(607),n(616)),c=n(618),d=n(628),h=(n(42),l.createElement),p=l.createFactory,f=l.cloneElement,m=i,v={Children:{
map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:d},Component:a,createElement:h,cloneElement:f,isValidElement:l.isValidElement,PropTypes:u,createClass:s.createClass,createFactory:p,createMixin:function(e){return e},DOM:o,version:c,__spread:m};e.exports=v},function(e,t,n){"use strict";function i(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=f++,h[e[v]]={}),h[e[v]]}var r,a=n(51),s=n(99),o=n(249),l=n(1977),u=n(619),c=n(625),d=n(370),h={},p=!1,f=0,m={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",
topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",
topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",
topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",
topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),g=a({},l,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,r=i(n),a=o.registrationNameDependencies[e],l=s.topLevelTypes,u=0;u<a.length;u++){
var c=a[u];r.hasOwnProperty(c)&&r[c]||(c===l.topWheel?d("wheel")?g.ReactEventListener.trapBubbledEvent(l.topWheel,"wheel",n):d("mousewheel")?g.ReactEventListener.trapBubbledEvent(l.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(l.topWheel,"DOMMouseScroll",n):c===l.topScroll?d("scroll",!0)?g.ReactEventListener.trapCapturedEvent(l.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(l.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):c===l.topFocus||c===l.topBlur?(d("focus",!0)?(g.ReactEventListener.trapCapturedEvent(l.topFocus,"focus",n),
g.ReactEventListener.trapCapturedEvent(l.topBlur,"blur",n)):d("focusin")&&(g.ReactEventListener.trapBubbledEvent(l.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(l.topBlur,"focusout",n)),r[l.topBlur]=!0,r[l.topFocus]=!0):m.hasOwnProperty(c)&&g.ReactEventListener.trapBubbledEvent(c,m[c],n),r[c]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){
if(void 0===r&&(r=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!r&&!p){var e=u.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),p=!0}}});e.exports=g},function(e,t,n){"use strict";var i={};e.exports=i},function(e,t,n){"use strict";var i=n(246),r=i({prop:null,context:null,childContext:null});e.exports=r},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(201),a=n(619),s=n(367),o={screenX:null,screenY:null,clientX:null,clientY:null,
ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:s,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+a.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+a.currentScrollTop}};r.augmentClass(i,o),e.exports=i},function(e,t,n){"use strict";var i=n(32),r={reinitializeTransaction:function(){
this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,r,a,s,o,l){this.isInTransaction()?i(!1):void 0;var u,c;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),c=e.call(t,n,r,a,s,o,l),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(d){}else this.closeAll(0)}finally{
this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var i=t[n];try{this.wrapperInitData[n]=a.OBSERVED_ERROR,this.wrapperInitData[n]=i.initialize?i.initialize.call(this):null}finally{if(this.wrapperInitData[n]===a.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(r){}}}},closeAll:function(e){this.isInTransaction()?void 0:i(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r,s=t[n],o=this.wrapperInitData[n];try{r=!0,o!==a.OBSERVED_ERROR&&s.close&&s.close.call(this,o),
r=!1}finally{if(r)try{this.closeAll(n+1)}catch(l){}}}this.wrapperInitData.length=0}},a={Mixin:r,OBSERVED_ERROR:{}};e.exports=a},function(e,t){"use strict";function n(e){return r[e]}function i(e){return(""+e).replace(a,n)}var r={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},a=/[&><"']/g;e.exports=i},function(e,t,n){var i,r;i=[n(73)],r=function(e){"use strict";var t=new e({"interface":["init","enable","disable","set","capture"]});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(73)],r=function(e){"use strict";var t=new e({props:["shortcuts"]});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(73)],r=function(e){"use strict";var t=new e({props:["capabilities","video","music","photo"]});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),a=i(r),s=n(29),o=i(s),l=n(26),u=i(l),c=o.default.extend({getStorage:function(){},get:function(e){
var t=this;return this._catchStorageError(function(n){var i=window.PLEXWEB,r=i&&e in i?i[e]:n.getItem(e);if(null==r)throw new Error(e+" is not in "+t.storageName);return r})},set:function(e,t){var n=this;return this._catchStorageError(function(i){if(!e)throw new Error("Unable to set value in "+n.storageName+" without a key");if(null==t)throw new Error("Unable to set null or undefined value for "+e+" in "+n.storageName+". Use the remove function.");return i.setItem(e,t)})},remove:function(e){return this._catchStorageError(function(t){
return t.removeItem(e)})},clear:function(){return this._catchStorageError(function(e){return e.clear()})},_catchStorageError:function(e){var t=a.default.Deferred();try{t.resolve(e(this.getStorage()))}catch(n){u.default.warn(n.message),t.reject(n)}return t.promise()}});t.default=c,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(43),n(827),n(825),n(826),n(139),n(410),n(746)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u={playbackDuration:0,modelDefaults:function(){var t=e.omit(e.result(this.model,"defaults"),["playQueueItem","metadataItem","playQueue","transcodeServer","state","stopped","paused","playing","buffering","error","volume","shuffled","repeatAll","slideshowState","slideshowPlaying","slideshowPaused"]),n=this.model.get("playQueue"),i=!!this.previousItem,r=!!this.nextItem&&!this.currentItem.get("isAdvertisement");
return this.webRadioUsage&&r&&(r=this.webRadioUsage.get("canSkipNext")),e.extend(t,{playQueueItem:this.currentItem,metadataItem:this.currentItem.get("metadataItem"),type:this.type,canRepeat:!0,canSkipPrevious:i,canSkipNext:r,canShuffle:!n.get("hasUpNext"),shuffled:n.get("shuffled")})},modelOverrides:function(){var e={};this.webRadioUsage&&!this.webRadioUsage.get("canSkipNext")&&(e.canSkipNext=!1);var t=this.model.get("playQueue");t&&t.get("isRadio")&&(t.get("allowSeek")||(e.canSeek=!1),t.get("allowRepeat")||(e.canRepeat=!1,
e.showPlayQueue=!1),t.get("allowShuffle")||(e.canShuffle=!1,e.showPlayQueue=!1),t.get("allowSkipPrevious")||(e.canSkipPrevious=!1,e.showPlayQueue=!1));var n=this.currentItem.get("advertisement");return n&&(e.canSkipPrevious=!1,e.canSkipNext=!1,e.canSeek=!1,e.showPlayQueue=!1),this.currentItem.server.get("transcoderLyrics")||(e.showLyrics=!1),e},initialize:function(n){this.stoppedSessions={},this.stop=e.wrap(this.stop,e.bind(function(e){return!this.model||this.model.get("stopped")?t.Deferred().resolve().promise():e.apply(this,[].slice.call(arguments,1));
},this)),this.seekBackward=e.bind(this.seek,this,-1e4,0,0),this.seekForward=e.bind(this.seek,this,3e4,0,3e3)},request:function(t){return this.pendingRequests||(this.pendingRequests=[]),this.pendingRequests.push(t),t.always(e.bind(function(){var n=e.indexOf(this.pendingRequests,t);this.pendingRequests.splice(n,1)},this)),t},waitForRequests:function(){return t.when.apply(t,this.pendingRequests)},reset:function(t){this.currentItem&&(this.timeline({state:n.states.STOPPED,continuing:!0}),this.stopTimeline(),
this.stopSession()),this.currentItem=t,this.previousItem=this.getPreviousItem(t),this.nextItem=this.getNextItem(t),this.setRadioPolicy();var i=e.extend(e.result(this,"modelDefaults"),this.modelOverrides());return this.model.set(i),t},getItemAtOffset:function(e,t,n){if(t||(t=this.model.get("playQueueItem")),!t)return null;var i=this.model.get("playQueue"),r=t.get("ratingKey");if(!r)return null;n||(n={});var a=i.get("collection"),s=a.findWhere({ratingKey:r}),o=a.indexOf(s),l=o+e,u=n.loop&&a.length>1||this.model.get("repeatAll");
return l>=0&&l<a.length?a.at(l):u?(l=(l+a.length)%a.length,a.at(l)):null},getPreviousItem:function(e,t){return this.getItemAtOffset(-1,e,t)},getNextItem:function(e,t){return this.getItemAtOffset(1,e,t)},mirror:function(){},play:function(){},pause:function(){},playPause:function(){this.model.get("state")===n.states.PAUSED?this.play():this.pause()},setPosition:function(e,t){},canSeek:function(e){return!!this.model.get("canSeek")&&(e!==this.model.get("position")&&e<=this.model.get("duration")&&e>=0);
},seek:function(e,t,n,i){var r=this.model.get("position")+e,a=0+(t>=0?t:0),s=this.model.get("duration")-(n>=0?n:0);r=Math.max(a,Math.min(r,s)),this.setPosition(r,i)},setVolume:function(e){},decreaseVolume:function(e){var t=this.model.get("volume");e=e||10,this.setVolume(Math.round(Math.max(t-e,0)))},increaseVolume:function(e){var t=this.model.get("volume");e=e||10,this.setVolume(Math.round(Math.min(t+e,100)))},skipPrevious:function(){return!!this.model.get("canSkipPrevious")&&(!!this.previousItem&&this.reset(this.previousItem));
},skipNext:function(e){if(!e||!e.organic){if(!this.model.get("canSkipNext"))return!1;this.webRadioUsage&&!this.currentItem.get("advertisement")&&this.webRadioUsage.registerSkip()}if(!this.nextItem)return!1;var t=this.model.get("playQueue");if(t&&t.get("isRadio")){var n=this.nextItem,i=this.getNextItem(n),r=i&&this.getNextItem(i);i&&r||this.refreshPlayQueue()}return this.reset(this.nextItem)},skipTo:function(e){var t=this.model.get("playQueueItem");if(t&&t.get("key")===e)return!1;var n=this.model.get("playQueue"),i=n.get("collection"),r=i.findWhere({
key:e});return this.reset(r)},toggleShuffle:function(){var e=this.model.get("playQueue");this.model.get("canShuffle")&&e.toggleShuffle()},nextRepeat:function(){var t=this.model.get("playQueue");if(this.model.get("canRepeat")){var n=!this.model.get("repeatAll")&&!this.model.get("repeatItem"),i=this.model.get("repeatAll")&&!this.model.get("repeatItem");t.setRepeatAll(n).done(e.bind(function(){this.model.set({repeatAll:n,repeatItem:i})},this))}},removeItem:function(e){return this.model.get("playQueue").removeItem(e);
},moveItem:function(e,t){return this.model.get("playQueue").moveItem(e,t)},refreshPlayQueue:function(){var e=this.model.get("playQueue");e.fetch()},stop:function(e){this._fadeInterval&&clearInterval(this._fadeInterval),e&&e.silent||this.model.set("state",n.states.STOPPED);var t=this.model.get("metadataItem"),i=t.server.get("playQueueManager");if(i){var r=this.model.get("playQueue"),a=i.getFor(t);a&&r&&a===r&&i.remove(r.get("mediaType"))}this.stopListening(),this.webRadioUsage&&(this.stopListening(this.webRadioUsage),
this.webRadioUsage.stop())},fadeOut:function(){this._fadeInterval&&clearInterval(this._fadeInterval),this._fadeInterval=setInterval(e.bind(function(){var e=this.model.get("volume");e<=0?this.stop():this.decreaseVolume(5)},this),50)},timeline:function(n){return n||(n={}),e.defaults(n,this.model.attributes),this.companion||!n.metadataItem?t.Deferred().resolve().promise():this.request(i(n))},startTimeline:function(){this.companion||this.serverTimelineInterval||(this.serverTimelineInterval=setInterval(e.bind(this.timeline,this),i.DELAY));
},stopTimeline:function(){this.serverTimelineInterval=clearInterval(this.serverTimelineInterval),this.trackPlaybackEvent()},updatePlayQueue:function(){var e=this.model.get("playQueue"),n=this.model.get("playQueueItem");return e.get("playQueueSelectedItemID")!==n.get("playQueueItemID")?e.fetch():t.Deferred().resolve().promise()},ping:function(){return this.companion?t.Deferred().resolve().promise():this.request(r(this.model.get("transcodeServer"),this.transcodeSessionID))},startPing:function(){var t=this.model.get("directPlay"),i=!this.companion&&this.type!==n.types.PHOTO;
!i||t||this.pingInterval||(this.pingInterval=setInterval(e.bind(this.ping,this),r.DELAY))},stopPing:function(){this.pingInterval=clearInterval(this.pingInterval)},stopSession:function(i){var r=this.transcodeSessionID,s=r||e.uniqueId("no-session-"),o=i&&i.xhrOptions||{};if(this.stoppedSessions.hasOwnProperty(s))return this.stoppedSessions[s];this.subcontroller&&this.subcontroller.stop(i);var l;return l=r&&this.type!==n.types.PHOTO&&!this.model.get("directPlay")?this.request(a(this.model.get("transcodeServer"),r,o)):t.Deferred().resolve().promise(),
this.stoppedSessions[s]=l,l},startPlaybackTracking:function(){this.companion||this.playbackInterval||(this.playbackInterval=setInterval(e.bind(function(){this.playbackDuration++},this),1e3))},stopPlaybackTracking:function(){this.playbackInterval=clearInterval(this.playbackInterval)},trackPlaybackEvent:function(){if(!this.companion){o.incPlaybackCount();var e=this.model.get("metadataItem"),t=e.get("identifier");s.trackEvent({eventCategory:"Playback",eventAction:e.get("type"),eventLabel:t,eventValue:this.playbackDuration
}),this.playbackDuration=0}},setRadioPolicy:function(){var t=this.model.get("playQueue");if(this.webRadioUsage){if(this.webRadioUsage.get("playQueue")===t)return;this.stopListening(this.webRadioUsage),this.webRadioUsage.stop(),this.webRadioUsage=null}if(this.webRadioAdvertisementTimeout&&(this.webRadioAdvertisementTimeout=clearTimeout(this.webRadioAdvertisementTimeout)),t&&t.get("isRadio")){var n=e.extend(e.pick(t.attributes,l.playQueueAttributes),{playQueue:t});this.webRadioUsage=new l(n),this.listenTo(this.webRadioUsage,"change",function(e){
var t=e.changedAttributes();t&&this.model.set(t)});var i=this.currentItem;i.get("advertisement")&&i.get("allowSkipAfter")&&(this.webRadioAdvertisementTimeout=setTimeout(e.bind(function(){this.model.set("canSkipNext",!!this.nextItem)},this),1e3*i.get("allowSkipAfter")))}},previousChapter:function(){var e=Math.max(this.model.get("lastSeekPosition"),this.model.get("position")),t=this.getPreviousChapterTime(e-5e3);void 0!==t&&this.setPosition(t)},nextChapter:function(){var e=Math.max(this.model.get("lastSeekPosition"),this.model.get("position")),t=this.getNextChapterTime(e);
void 0!==t&&this.setPosition(t)},getPreviousChapterTime:function(e){var t=this.model.get("metadataItem"),n=t.get("chapters");if(n&&n.length){for(var i=n.length-1;i>=0;i--){var r=n.at(i),a=r.get("startTimeOffset");if(a<e)return a}return 0}},getNextChapterTime:function(e){var t=this.model.get("metadataItem"),n=t.get("chapters");if(n&&n.length)for(var i=0;i<n.length;i++){var r=n.at(i),a=r.get("startTimeOffset");if(a>e)return a}},stepBackward:function(){var e=this.model.get("metadataItem"),t=e.get("chapters");
t&&t.length?this.previousChapter():this.seek(-6e5,0,0)},stepForward:function(){var e=this.model.get("metadataItem"),t=e.get("chapters");t&&t.length?this.nextChapter():this.seek(6e5,0,3e3)}};return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(207),o=i(s),l=a.default.extend({name:"PlayQueueItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],model:o.default
});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(124),o=i(s),l=a.default.extend({name:"SectionCollection",context:["server"],model:o.default,url:"/library/sections"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(6),o=i(s),l=n(18),u=i(l),c=n(20),d=i(c),h=["all","recentlyAdded","recentlyViewed","recentlyViewedShows","onDeck","newest","folder"],p=d.default.extend({
name:"SectionSubsetModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",sessionAttrs:{selected:u.default.boolean},syncedAttrs:{key:u.default.string,title:u.default.string,secondary:u.default.boolean},derivedAttrs:{primary:function(){return!this.get("secondary")&&a.default.contains(h,this.get("key"))}},defaults:{selected:!1},augmentResponse:function(e){return"all"===e.key&&(e.title=(0,o.default)("All")),e}},{whitelistedPrimaryKeySubsets:h});t.default=p,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(5),l=i(o),u=n(22),c=r(u),d=n(129),h=i(d),p=n(18),f=i(p),m=n(20),v=i(m),g=n(87),y=i(g),b=v.default.extend({name:"PlaylistModel",context:["server","containerKey"],idAttribute:"ratingKey",rootPropertyName:"Playlist",urlRoot:"/playlists",saveUrl:function(){return"/library/metadata/"+this.id},sessionAttrs:{isPlaylist:f.default.boolean,isLibraryItem:f.default.boolean},
syncedAttrs:{ratingKey:f.default.string,key:f.default.string,guid:f.default.string,type:f.default.string,playlistType:f.default.string,title:f.default.string,titleSort:f.default.string,composite:f.default.string,summary:f.default.string,smart:f.default.boolean,allowSync:f.default.boolean,duration:f.default.integer,durationInSeconds:f.default.integer,leafCount:f.default.integer,addedAt:f.default.integer,updatedAt:f.default.integer},sessionRelations:{children:{relationClass:y.default,attrs:function(e){
var t={};return"audio"===e.playlistType&&(t.includeRelated=1),{containerKey:c.join(["/playlists",e.ratingKey,"items"],t)}},options:function(){return{playlist:this}}}},defaults:{isPlaylist:!0,isLibraryItem:!0},findItem:function(e){return this.get("children").getCollection().findWhere({playlistItemID:e})},moveItem:function(e,t){var n=t?{after:t}:{},i=c.join([s.default.result(this,"url"),"/items/",e,"/move"],n),r=s.default.extend(this.server.getXHROptions(i),{type:"PUT"}),a=l.default.ajax(r),o=this.get("children").getCollection(),u=this.findItem(e);
o.remove(u);var d=this.findItem(t),h=d?o.indexOf(d)+1:0;return o.add(u,{at:h}),a},removeItem:function(e){var t=this,n=c.join([s.default.result(this,"url"),"/items/",e]),i=s.default.extend(this.server.getXHROptions(n),{type:"DELETE"}),r=l.default.ajax(i);r.then(function(e){t.set(t.parse(e))});var a=this.get("children").getCollection(),o=this.findItem(e);return a.remove(o),r},addContent:function(e,t){var n=this,i=this.isNew()?"POST":"PUT",r=[s.default.result(this,"url")],a={};this.isNew()?(a.type=this.get("playlistType"),
a.title=this.get("title"),a.smart=this.get("smart")?1:0):r.push("/items"),e.get("playQueueID")?a.playQueueID=e.get("playQueueID"):a.uri=h.default.uri(e,t);var o=c.join(r,a),u=s.default.extend(e.server.getXHROptions(o),{type:i}),d=l.default.ajax(u);return d.then(function(e){n.set(n.parse(e))}),d.promise()},isLibraryItem:function(e,t){return!0},isPlexMusicItem:function(){return!1}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(5),a=i(r),s=n(38),o=i(s),l={fetch:function(){return(0,o.default)(!1,"A model or collection with a controlled populate promise cannot be fetched directly"),this.populatePromise},hasPendingPopulate:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},_resetPopulate:function(){return this.hasPendingPopulate()||(this._populateDeferred=a.default.Deferred(),this.populatePromise=this._populateDeferred.promise()),this.populatePromise},_resolvePopulate:function(){
return"resolved"===this.populatePromise.state()?this.populatePromise:("rejected"===this.populatePromise.state()&&this._resetPopulate(),this._populateDeferred.resolveWith(this,[this]),this.populatePromise)},_rejectPopulate:function(){return"rejected"===this.populatePromise.state()?this.populatePromise:("resolved"===this.populatePromise.state()&&this._resetPopulate(),this._populateDeferred.rejectWith(this,[this]),this.populatePromise)}};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),a=i(r),s=n(18),o=i(s),l=n(55),u=i(l),c=n(207),d=i(c),h=n(208),p=i(h),f=n(392),m=i(f),v=n(69),g=i(v),y=n(43),b=i(y),w=a.default.extend({name:"PlayerModel",sessionAttrs:{playQueueItem:o.default.instanceOf(d.default),metadataItem:o.default.instanceOf(u.default),media:o.default.object,part:o.default.object,url:o.default.string,subtitlesUrl:o.default.string,playQueue:o.default.instanceOf(p.default,m.default),transcodeServer:o.default.instanceOf(g.default),
friendlyName:o.default.string,mediaIndex:o.default.integer,partIndex:o.default.integer,partCount:o.default.integer,qualityIndex:o.default.integer,videoStreamID:o.default.integer,audioStreamID:o.default.integer,subtitleStreamID:o.default.integer,type:o.default.oneOf(b.default.types.VIDEO,b.default.types.MUSIC,b.default.types.PHOTO),state:o.default.oneOf(b.default.states.STOPPED,b.default.states.PAUSED,b.default.states.PLAYING,b.default.states.BUFFERING,b.default.states.ERROR),bufferingMessage:o.default.string,
errorMessage:o.default.string,ready:o.default.boolean,loaded:o.default.boolean,ended:o.default.boolean,finished:o.default.boolean,embedHtml:o.default.string,duration:o.default.integer,position:o.default.float,lastSeekPosition:o.default.integer,offset:o.default.integer,volume:o.default.integer,startBuffer:o.default.integer,endBuffer:o.default.float,percentBuffered:o.default.integer,shuffled:o.default.boolean,repeatAll:o.default.boolean,repeatItem:o.default.boolean,directPlay:o.default.boolean,videoDimensions:o.default.object,
playbackSessionID:o.default.string,transcodeSessionID:o.default.string,softSubtitlesFailed:o.default.boolean,forceWebkitVideoFullscreen:o.default.boolean,canPlayPause:o.default.boolean,canStop:o.default.boolean,canSeek:o.default.boolean,canSetVolume:o.default.boolean,canSetVideoStream:o.default.boolean,canSetAudioStream:o.default.boolean,canSetSubtitleStream:o.default.boolean,canSetQuality:o.default.boolean,canShuffle:o.default.boolean,canRepeat:o.default.boolean,canLyrics:o.default.boolean,canSkipPrevious:o.default.boolean,
canSkipNext:o.default.boolean,showSeekBar:o.default.boolean,showAudioStream:o.default.boolean,showSubtitleStream:o.default.boolean,showQuality:o.default.boolean,showPlayQueue:o.default.boolean,showShuffle:o.default.boolean,showRepeat:o.default.boolean,showLyrics:o.default.boolean,showMinimize:o.default.boolean,showMaximize:o.default.boolean,showEnterFullscreen:o.default.boolean,showExitFullscreen:o.default.boolean},defaults:function(){return{playQueueItem:null,metadataItem:null,media:null,part:null,
url:null,subtitlesUrl:null,playQueue:null,transcodeServer:null,mediaIndex:-1,partIndex:-1,partCount:1,qualityIndex:null,videoStreamID:null,audioStreamID:null,subtitleStreamID:null,type:null,state:b.default.states.STOPPED,bufferingMessage:null,errorMessage:null,ready:!1,loaded:!1,ended:!1,finished:!1,embedHtml:null,duration:0,position:0,lastSeekPosition:null,offset:0,volume:100,startBuffer:0,endBuffer:0,percentBuffered:0,shuffled:!1,repeatAll:!1,repeatItem:!1,directPlay:!1,videoDimensions:null,playbackSessionID:null,
transcodeSessionID:null,softSubtitlesFailed:!1,canPlayPause:!1,canStop:!1,canSeek:!1,canSetVolume:!1,canSetVideoStream:!1,canSetAudioStream:!1,canSetSubtitleStream:!1,canSetQuality:!1,canShuffle:!1,canRepeat:!1,canSkipPrevious:!1,canSkipNext:!1,canLyrics:!1,showSeekBar:!1,showAudioStream:!1,showSubtitleStream:!1,showQuality:!1,showPlayQueue:!1,showShuffle:!1,showRepeat:!1,showMinimize:!1,showMaximize:!1,showEnterFullscreen:!1,showExitFullscreen:!1,showLyrics:!1,forceWebkitVideoFullscreen:!1}},derivedAttrs:{
stopped:function(){return this.get("state")===b.default.states.STOPPED},paused:function(){return this.get("state")===b.default.states.PAUSED},playing:function(){return this.get("state")===b.default.states.PLAYING},buffering:function(){return this.get("state")===b.default.states.BUFFERING},error:function(){return this.get("state")===b.default.states.ERROR},positionPercentage:function S(){var e=this.get("duration"),t=this.get("position"),S=e?Math.min(Math.max(t/e*100,0),100):0;return S}},initialize:function(){
this.on("change:state",this.onStateChange)},onStateChange:function(e,t){t!==b.default.states.STOPPED&&e.set("ended",!1)}});t.default=w,e.exports=t.default},function(e,t,n){var i,r;i=[n(39),n(60),n(207)],r=function(e,t,n){"use strict";var i=t.extend({model:n,windowSize:{audio:13,video:8},initialize:function(e,t){if(e)throw new Error("Models cannot be passed directly to an UpNextCollection.");this.collection=this.parent.get("playQueue").get("collection"),this.listenTo(this.collection,"reset sync",this._filter),
this.listenTo(this.parent,"change:playQueueItem",this._filter),this.listenTo(this.parent,"change:repeatAll change:repeatItem",this._filter),this._filter()},_filter:function(){var t=this.parent.get("playQueueItem").get("metadataItem"),n=this.collection.findWhere({ratingKey:t.get("ratingKey")}),i=this.collection.indexOf(n),r=e.getChildMediaType(t.get("type")).element,a=this.windowSize[r],s=this.collection.reject(function(e){return e.get("advertisement")}).slice(i+1,i+a);if(this.parent.get("repeatAll")){
var o=Math.max(a-s.length,0),l=this.collection.slice(0,Math.min(i,o));s=s.concat(l)}this.set(s)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(25),o=i(s),l=n(102),u=i(l),c=n(54),d=i(c),h=n(302),p=i(h),f=function(e,t){return!e.get("isLoopback")&&t.get("isLoopback")?t:!t.get("isLoopback")&&e.get("isLoopback")?e:!e.get("isPrivate")&&t.get("isPrivate")?t:!t.get("isPrivate")&&e.get("isPrivate")?e:!e.get("isHttps")&&t.get("isHttps")?t:!t.get("isHttps")&&e.get("isHttps")?e:e;
},m=o.default.extend({name:"ConnectionCollection",context:["server"],model:u.default,getBestConnection:function(){var e=d.default.get("allowHttpsMediaServerConnections"),t=!this.server||this.server.get("isCloudBased")||e,n=this.filter(function(e){return e.get("isConnected")&&(t||!e.get("isHttps"))});if(n.length)return a.default.reduce(n,f)},hasBetterConnectionCandidates:function(){var e=this.server&&this.server.get("activeConnection");return this.some(function(t){var n=t.get("isUntested")||t.get("isPending"),i=!e||t!==e&&f(t,e)===t;
return n&&i})},hasOnlyFailedConnections:function(){return this.every(function(e){return e.get("isFailed")})},hasMultiplePrivateV4Subnets:function(){var e=void 0;return this.some(function(t){var n=t.get("address");if(t.get("isPrivate")&&p.default.isValidV4Address(n)){var i=p.default.getV4Subnet(n);return e||(e=i),e!==i}})}});t.default=m,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({urlRoot:"/api/home/users",whitelistedAttrs:["id","uuid","admin","protected","restricted","guest","title","username","email","thumb"],
convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return i.User&&(i=i.User),t.parseInteger(i,"id"),t.parseBoolean(i,["admin","protected","restricted","guest"]),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs)},getSaveParams:function(t,i){if(e.isEmpty(t)){var r={};return this.get("restricted")?r.title=this.get("title"):this.isNew()&&(r.invitedEmail=this.get("username")),r}return n.prototype.getSaveParams.apply(this,arguments)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(3),n(132),n(179)],r=function(e,t,n){"use strict";var i=n.extend({whitelistedAttrs:["id","version","metadataType","contentType","title","rootTitle","machineIdentifier","clientIdentifier","Server","Status","MediaSettings","Policy","Location"],saveAttrs:["version","metadataType","title","rootTitle","machineIdentifier","MediaSettings","Policy","Location"],defaults:function(){return{Status:{},MediaSettings:{},Policy:{},Location:{},Device:{}}},urlRoot:function(){var e=this.get("clientIdentifier");
if(e)return"/devices/"+e+"/sync_items"},sync:function(e,i,r){var a=t.addVersionHeaderForDevice(this.device,r);return n.prototype.sync.call(this,e,i,a)},getSaveParams:function(t,i){if(e.isEmpty(t)){var r=this.pick(this.saveAttrs),a=r.Policy;return e.isBoolean(a.unwatched)&&(a.unwatched=a.unwatched?1:0),{SyncItem:r}}return n.prototype.getSaveParams.apply(this,arguments)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=e.key,n=e.actionSuffix,i=e.getModel,r=(0,
s.default)(t||n),a=(0,l.default)(t),o="is"+a+"Populated";return function(e,t,n){var a=i(e,t);a.get(o)||n({type:"FETCH_"+r,payload:t})}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(462),s=r(a),o=n(110),l=r(o);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),a=n(306),s=i(a),o=(0,r.createSelectorCreator)(r.defaultMemoize,s.default);t.default=o,e.exports=t.default},function(e,t,n){
"use strict";function i(){return(0,a.createSelector)(function(e,t){var n=t.metadataItemEntityID;return n},o.default,function(e,t){return t[e]})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(28),s=n(213),o=r(s);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),a=n(142),s=i(a),o=(0,r.createSelector)(s.default,function(e){return e.servers});t.default=o,e.exports=t.default},function(e,t,n){
var i,r;i=[n(3),n(29),n(8),n(26),n(50)],r=function(e,t,n,i,r){"use strict";var a=t.extend({mixins:r,maxCycles:3,maxSize:50,isListening:!1,initialize:function(){this._cache={},this.size=0,this.cycles=[],this.cycle()},startListening:function(){this.isListening||(this.isListening=!0,this.listenTo(n,{"cycle:cache":this.cycle,"clearWhere:cache":this.clearWhere,"clearAll:cache":this.clearAll,"clearCycles:cache":this.clearCycles}))},get:function(t){var n=this._cache[t];return n&&n._cacheCycle&&this.setItemCycle(n,t,e.first(this.cycles)),
n},store:function(t,n){n||(n=this.getItemCacheKey(t)),this.remove(t),n&&(this.startListening(),t._cacheKey=n,this._cache[n]=t,this.size++,t.persistInCache||this.setItemCycle(t,n,e.first(this.cycles)))},getItemCacheKey:function(t){return e.result(t,"cacheKey")},setItemCycle:function(e,t,n){var i=e._cacheCycle;i&&i.hasOwnProperty(t)&&delete i[t],e._cacheCycle=n,n[t]=e},cycle:function(){this.size>this.maxSize&&(i.warn("Cache overflow, size: "+this.size),e.each(this.cycles.slice(1),this.removeCycle,this)),
this.cycles.unshift({}),this.cycles.length>Math.max(this.maxCycles,1)&&this.removeCycle(e.last(this.cycles))},remove:function(e){if(e&&e._cacheKey){var t=e._cacheKey;this._cache.hasOwnProperty(t)&&(delete this._cache[t],this.size--),e._cacheCycle&&(e._cacheCycle.hasOwnProperty(t)&&delete e._cacheCycle[t],delete e._cacheCycle),delete e._cacheKey}},removeCycle:function(t){e.each(e.values(t),this.remove,this);var n=e.indexOf(this.cycles,t);this.cycles.splice(n,1)},clearWhere:function(t){var n=e.where(e.values(this._cache),t);
e.each(n,this.remove,this)},clearAll:function(){e.each(e.values(this._cache),this.remove,this),this.cycles.length=0,this.cycle(),this.stopListening(),this.isListening=!1},clearCycles:function(){for(var e=this.cycles;e.length;)this.removeCycle(e[e.length-1]);this.cycle()}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(276)],r=function(e,t){"use strict";var n=t.extend({maxCycles:3,maxSize:20,get:function(e){var n=t.prototype.get.apply(this,arguments);return n&&n.every(function(e){
return!(!e.cache||!e.cache.isListening)&&(e.cache.store(e),!0)}),n},getItemCacheKey:function(t){var n=e.result(t,"url");return t.server&&(n=t.server.getScopedKey(n)),n}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="https://forums.plex.tv";t.FORUMS_URL=n;var i="https://support.plex.tv";t.SUPPORT_URL=i;var r="https://status.plex.tv";t.SYSTEM_STATUS_URL=r;var a="https://plex.tv/subscription/about";t.PLEX_PASS_INFO_URL=a;
var s="https://plex.tv/gifts";t.PLEX_PASS_GIFT_URL=s;var o="https://plex.tv/subscription/new";t.PLEX_PASS_SUBSCRIBE_URL=o},function(e,t,n){"use strict";function i(e,t){return e?s.default.reduce(t,function(t,n,i){return e[i]!==n&&(t[i]=n),t},{}):t}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(454),a=i(r),s=n(67),o=i(s);t.default=(0,
o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(463),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(298),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t){"use strict";function n(e){if(!e||"object"!=typeof e)return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;
if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&i(n)===r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var i=function(e){return Function.prototype.toString.call(e)},r=i(Object);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if((0,s.default)(null!=t,"No `minVersion` supplied to `isVersionOrNewer`. Have you misspelled a constant?"),!e)return!0;for(var n=t.split("."),i=e.split("."),r=0,a=n.length;r<a;r++)if(r<i.length){var o=parseInt(n[r],10),l=parseInt(i[r],10);
if(o<l)return!0;if(o>l)return!1}return!0}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(38),s=r(a);e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=l.default.get("video").id,n=(0,c.default)(e,{streamType:t});return s.default.first(n)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(71),l=r(o),u=n(92),c=r(u);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){if(e){var i=(0,
l.default)(e,{streamType:t.id});s.default.each(i,function(e){e.selected=e.id===n})}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(92),l=r(o);t.default=i,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){t<6e4||e.get("isLibraryItem")&&1!==e.get("extraType")&&(t>.9*n?(e.set("viewOffset",0),e.set("viewCount",1)):e.set("viewOffset",Math.round(t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){
"use strict";function i(e){return e=parseInt(e,10),e?e<2?(0,s.default)("Mono"):e<3?(0,s.default)("Stereo"):(e-1).toString()+".1":""}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=r(a);t.default=i,e.exports=t.default},function(e,t){"use strict";function n(e){return e?"dca"===e?"DTS":e.toUpperCase():""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t){var n=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);
return(e/Math.pow(1e3,n)).toFixed(t)+" "+i[n+1]}Object.defineProperty(t,"__esModule",{value:!0});var i=["bps","kbps","Mbps","Gbps","Tbps"];t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e){if(e=parseInt(e,10),s.default.isNaN(e))return"";var t=e<10?"0":"";return t+e}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=s.default.pick(t,"type","controller","media","offset","media","autoplay","useMiniPlayer","isSwitchingPlayers","inline","playQueue","isFromCompanion","background"),i=t.playQueue;
if(e=i?i.get("selectedItem"):e,n.model=e,n.autoplay=n.autoplay!==!1,e&&"track"===e.get("type")&&e.server.supports("musicViewOffset")){var r=e.get("metadataItem")||e,a=r.get("viewOffset");s.default.isNumber(a)&&(n.offset=a)}return n.offset&&(n.offset=parseInt(n.offset,10)||0),n.type||(n.type=l.default.getTypeByElement((0,c.default)(e))),n}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(43),l=r(o),u=n(839),c=r(u);t.default=i,e.exports=t.default},function(e,t,n){
var i,r;i=[n(3),n(26)],r=function(e,t){"use strict";var n={ORIGINAL:-1,qualities:{},getQualityByIndex:function(t){if(t<0)return{index:this.ORIGINAL};var n={index:t};return e.each(this.qualities,function(i,r){n[r]=e.result(this.qualities,r)[t]},this),n},getQualityCount:function(){var t=e.first(e.keys(this.qualities));return e.result(this.qualities,t).length},getQualityAttribute:function(e){var t,n=e.get("isLibraryItem"),i=e.get("isExtra")&&!/^file:\/\//.test(e.get("guid"));return t=n&&!i?e.server.hasLocalConnection()?"localQuality":"remoteQuality":"channelQuality",
"video"!==this.type?this.type+"!"+t:t},getSyncQualityAttribute:function(){return"syncQuality!"+this.type},getCurrentQuality:function(n,i){var r=this.getQualityAttribute(n),a=i.get(r);return a>=this.getQualityCount()&&(t.warn("Quality index "+a+" is out of bounds"),a=i.defaults[r],i.save(r,a)),e.extend(this.getQualityByIndex(a),{attribute:r})},getAvailableQualities:function(e){e||(e={});var t=e.lowestQualityIndex,n=e.highestQualityIndex,i=e.comparator,r=[];n===this.ORIGINAL&&(n=void 0);for(var a=0,s=this.getQualityCount();a<s;a++)if(!(t&&a<t)){
if(n&&a>n)return r;if(i&&i.call(this,a))return r;r.push(this.getQualityByIndex(a))}return r},getResolutionFromSize:function(e){var t=e.split("x"),n=parseInt(t[1],10);return n>2560?"8k":n>1100?"4k":n>720?"1080":n>576?"720":n>480?"576":n>360?"480":"sd"},getHeightFromResolution:function(e){switch(e){case"8k":return 5120;case"4k":return 2560;case"1080":return 1080;case"720":return 720;case"576":return 576;case"480":return 480;case"sd":return 360;default:return 360}},getNearestIndex:function(e,t){if(!t)return this.ORIGINAL;
var n=e.indexOf(t);if(n<0){n=0;for(var i=0,r=e.length;i<r;i++){var a=e[i];if(a>t)break;n=i}}return n}};return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){return e=s.default.isArray(e)?e:s.default.toArray(arguments),l.default.when.apply(l.default,s.default.map(e,c.default))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(109),c=r(u);t.default=i,e.exports=t.default},function(e,t){"use strict";function n(e){
return e?e.toUpperCase():""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(){return Math.random().toString(36).substr(2)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t){if(!e)return"";
if(e.length>t){for(var n=e.substring(0,t-3);/\S/.test(n.charAt(n.length-1))===!1&&n.length>1;)n=n.slice(0,-1);return n+"..."}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){if(!e)return"";if(e.length>t){n=n||Math.floor((t-3)/2);var i=t-3-n;return e.substr(0,n)+"..."+e.substr(e.length-i)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),a=i(r),s=n(145),o=i(s),l=["id","typeString"],u=(0,o.default)(l,[{id:1,typeString:"trailer",title:function(){return(0,a.default)("Trailer")}},{id:2,typeString:"deletedScene",title:function(){return(0,a.default)("Deleted Scene")}},{id:3,typeString:"interview",title:function(){return(0,a.default)("Interview")}},{id:4,typeString:"musicVideo",title:function(){return(0,a.default)("Music Video")}},{id:5,typeString:"behindTheScenes",title:function(){
return(0,a.default)("Behind the Scenes")}},{id:6,typeString:"scene",title:function(){return(0,a.default)("Scene")}},{id:7,typeString:"liveMusicVideo",title:function(){return(0,a.default)("Live Music Video")}},{id:8,typeString:"lyricMusicVideo",title:function(){return(0,a.default)("Lyric Music Video")}},{id:9,typeString:"concert",title:function(){return(0,a.default)("Concert")}},{id:10,typeString:"featurette",title:function(){return(0,a.default)("Featurette")}},{id:11,typeString:"short",title:function(){
return(0,a.default)("Short")}},{id:12,typeString:"other",title:function(){return(0,a.default)("Other")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),a=i(r),s=n(145),o=i(s),l=["id","typeString"],u=(0,o.default)(l,[{id:0,typeString:"tag",title:function(){return(0,a.default)("Tag")}},{id:1,typeString:"genre",title:function(){return(0,a.default)("Genre")}},{id:2,typeString:"collection",title:function(){
return(0,a.default)("Collection")}},{id:3,typeString:"bookmark",title:function(){return(0,a.default)("Bookmark")}},{id:4,typeString:"director",title:function(){return(0,a.default)("Director")}},{id:5,typeString:"writer",title:function(){return(0,a.default)("Writer")}},{id:6,typeString:"actor",title:function(){return(0,a.default)("Actor")}},{id:7,typeString:"producer",title:function(){return(0,a.default)("P")}},{id:8,typeString:"country",title:function(){return(0,a.default)("country")}},{id:9,typeString:"chapter",
title:function(){return(0,a.default)("Chapter")}},{id:10,typeString:"review",title:function(){return(0,a.default)("Review")}},{id:11,typeString:"label",title:function(){return(0,a.default)("Label")}},{id:42,typeString:"versionBackgroundProcessingTarget",title:function(){return(0,a.default)("Version Background Processing Target")}},{id:200,typeString:"make",title:function(){return(0,a.default)("Make")}},{id:201,typeString:"model",title:function(){return(0,a.default)("Model")}},{id:202,typeString:"aperture",
title:function(){return(0,a.default)("Aperture")}},{id:203,typeString:"exposure",title:function(){return(0,a.default)("Exposure")}},{id:204,typeString:"iso",title:function(){return(0,a.default)("ISO")}},{id:205,typeString:"lens",title:function(){return(0,a.default)("Lens")}},{id:206,typeString:"device",title:function(){return(0,a.default)("Device")}},{id:300,typeString:"mood",title:function(){return(0,a.default)("Mood")}},{id:301,typeString:"bpm",title:function(){return(0,a.default)("BPM")}},{id:302,
typeString:"composer",title:function(){return(0,a.default)("Composer")}},{id:303,typeString:"featuring",title:function(){return(0,a.default)("Featuring")}},{id:304,typeString:"trackArtist",title:function(){return(0,a.default)("Track Artist")}},{id:305,typeString:"similarArtist",title:function(){return(0,a.default)("Similar Artist")}},{id:306,typeString:"concert",title:function(){return(0,a.default)("Concert")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=u.exec(e);
if(null!=t)return{octets:o.default.map(o.default.rest(t),function(e){return parseInt(e,10)})}}function r(e){if(c.test(e)){var t=e.split("::"),n=t[0].match(d),i={parts:[]};if(null!=n){if(n.length>8)return;i.parts=o.default.map(n,function(e){return parseInt(e,16)})}if(t.length>1){var r=t[1].match(d),a=o.default.map(r,function(e){return parseInt(e,16)}),s=8-i.parts.length-a.length;if(s<0||8===s)return;o.default.times(s,function(){i.parts.push(0)}),i.parts=i.parts.concat(a)}return i}}var a=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/,u=/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/,c=/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/i,d=/[a-f0-9]{1,4}/gi,h={
isValidPort:function(e){return l.test(e)},isValidAddress:function(e){return this.isValidV4Address(e)||this.isValidV6Address(e)},isLoopbackAddress:function(e){return"localhost"===e||this.isLoopbackV4Address(e)||this.isLoopbackV6Address(e)},isPrivateAddress:function(e){return this.isPrivateV4Address(e)||this.isPrivateV6Address(e)},isPlexDirectAddress:function(e){return/plex\.direct$/.test(e)},isValidV4Address:function(e){var t=i(e);return!(!t||!o.default.all(t.octets,function(e){return e>=0&&e<=255;
}))},isLoopbackV4Address:function(e){var t=i(e);return!(!t||127!==t.octets[0]&&!o.default.all(t.octets,function(e){return 0===e}))},isPrivateV4Address:function(e){var t=i(e);if(t){if(10===t.octets[0])return!0;if(172===t.octets[0]&&t.octets[1]>=16&&t.octets[1]<=31)return!0;if(192===t.octets[0]&&168===t.octets[1])return!0}return!1},isValidV6Address:function(e){var t=r(e);return!(!t||!o.default.all(t.parts,function(e){return e>=0&&e<=65535}))},isLoopbackV6Address:function(e){var t=r(e);if(t){var n=o.default.all(o.default.take(t.parts,7),function(e){
return 0===e});return n&&1===o.default.last(t.parts)}return!1},isPrivateV6Address:function(e){var t=r(e);return!!(t&&t.parts[0]>=64512&&t.parts[0]<=65023)},getV4Subnet:function(e){return h.isValidV4Address(e)?e.split(".").slice(0,-1).join("."):""}};t.default=h,e.exports=t.default},function(e,t,n){var i,r;i=[n(1648),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"circle-progress",template:e,size:30,lineWidth:5,strokeColor:"#cc7b19",hasSize:!1,ui:{svg:".circle-progress-bar",svgCircle:".circle-progress-bar circle"
},bindings:{".circle-progress-text":{modelAttribute:"text"}},modelEvents:{"change:progress":"onProgressChange"},initialize:function(e){this.size=e.size||this.size,this.lineWidth=e.lineWidth||this.lineWidth,this.strokeColor=e.strokeColor||this.strokeColor,this.size&&(this.$el.width(this.size),this.$el.height(this.size))},drawProgressBar:function(){var e=this.size,t=e/2,n=t-this.lineWidth,i=Math.PI*(2*n);this.hasSize||(this.ui.svg.attr("width",e),this.ui.svg.attr("height",e),this.ui.svgCircle.attr("r",n),
this.ui.svgCircle.attr("cx",t),this.ui.svgCircle.attr("cy",t),this.ui.svgCircle.attr("stroke-dasharray",i),this.ui.svgCircle.css("stroke-width",this.lineWidth),this.ui.svgCircle.css("stroke",this.strokeColor),this.hasSize=!0);var r=this.model.get("progress"),a=(100-r)/100*i;this.ui.svgCircle.css("stroke-dashoffset",a)},onRender:function(){this.drawProgressBar()},onProgressChange:function(){this.drawProgressBar()}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";function n(e){
return e.displayName||e.name||"Component"}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="default";t.DEFAULT=n;var i="primary";t.PRIMARY=i;var r="success";t.SUCCESS=r;var a="danger";t.DANGER=a;var s=[n,i,r,a];t.all=s},function(e,t,n){"use strict";function i(e,t){if(e===t)return!0;var n=r(e),i=r(t);if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,s=0;s<n.length;s++)if(!a.call(t,n[s])||e[n[s]]!==t[n[s]])return!1;
return!0}var r=n(89).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r={handleCollectUsageData:function(e){var t=(0,i.resolve)("appModel");this._appModel=t,this._adapter=e,this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.onPrimaryServerChange(t,t.get("primaryServer"))},_toggleAdapter:function(e){var t=this._adapter;e===!0?t.enable():e===!1&&t.disable();
},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");n&&(this.stopListening(n),this.stopListening(n.get("settings")));var i=void 0;if(t){var r=t.get("settings"),a=r.get("collectUsageData");i=a?a.get("value"):i,this.listenTo(r,"add change",this.onSettingsModelChange)}this._toggleAdapter(i)},onSettingsModelChange:function(e,t,n){if("collectUsageData"===e.id){var i=this._appModel.get("primaryServer");i&&i.id===e.server.id&&this._toggleAdapter(e.get("value"))}}};t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(74),s=i(a),o=n(52),l=r(o),u=(0,s.default)(l.SELECT_ITEM);t.selectItem=u;var c=(0,s.default)(l.SELECT_MODELS);t.selectModels=c;var d=(0,s.default)(l.DESELECT_ALL_ITEMS);t.deselectAllItems=d;var h=(0,s.default)(l.DESELECT_MODELS);t.deselectModels=h;var p=(0,s.default)(l.DESELECT_COLLECTION);t.deselectCollection=p;var f=(0,s.default)(l.SELECT_RANGE);t.selectRange=f;var m=(0,s.default)(l.DESELECT_RANGE);
t.deselectRange=m;var v=(0,s.default)(l.PLAY_SELECTED_ITEMS);t.playSelectedItems=v;var g=(0,s.default)(l.ADD_SELECTED_ITEMS_TO_PLAYLIST);t.addSelectedItemsToPlaylist=g;var y=(0,s.default)(l.UPDATE_SELECTED_ITEMS_WATCHED_STATUS);t.updateSelectedItemsWatchedStatus=y;var b=(0,s.default)(l.EDIT_SELECTED_ITEMS);t.editSelectedItems=b;var w=(0,s.default)(l.REFRESH_SELECTED_ITEMS);t.refreshSelectedItems=w;var S=(0,s.default)(l.ANALYZE_SELECTED_ITEMS);t.analyzeSelectedItems=S;var P=(0,s.default)(l.SYNC_METADATA_ITEMS);
t.syncSelectedItems=P;var x=(0,s.default)(l.OPTIMIZE_METADATA_ITEMS);t.optimizeSelectedItems=x;var C=(0,s.default)(l.MERGE_SELECTED_ITEMS);t.mergeSelectedItems=C;var T=(0,s.default)(l.DELETE_SELECTED_ITEMS);t.deleteSelectedItems=T;var _=(0,s.default)(l.PLAY_SELECTED_ITEMS,function(){return{shuffle:!0}});t.shuffleSelectedItems=_;var E=(0,s.default)(l.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(){return{watched:!0}});t.markSelectedItemsWatched=E;var k=(0,s.default)(l.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(){
return{watched:!1}});t.markSelectedItemsUnwatched=k},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(74),s=i(a),o=n(52),l=r(o),u=(0,s.default)(l.FETCH_PLANS);t.fetchPlans=u;var c=(0,s.default)(l.POPULATE_PLANS);t.populatePlans=c;var d=(0,s.default)(l.FETCH_UNWATCHED_WATCH_LATER_LIST);t.fetchUnwatchedWatchLaterList=d;var h=(0,s.default)(l.POPULATE_UNWATCHED_WATCH_LATER_LIST);t.populateUnwatchedWatchLaterList=h;var p=(0,s.default)(l.FETCH_UNWATCHED_RECOMMENDED_LIST);
t.fetchUnwatchedRecommendedList=p;var f=(0,s.default)(l.POPULATE_UNWATCHED_RECOMMENDED_LIST);t.populateUnwatchedRecommendedList=f;var m=(0,s.default)(l.UPDATE_USER);t.updateUser=m;var v=(0,s.default)(l.CLEAR_UPDATE_USER_ERROR);t.clearUpdateUserError=v},function(e,t,n){var i,r;i=[n(1723),n(3),n(5),n(9),n(92),n(71),n(13)],r=function(e,t,n,i,r,a,s){"use strict";var o=i.ItemView.extend({tagName:"span",className:"dropdown",template:e,modelEvents:{"change:Media":"render","change:streams":"render"},events:{
"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=a.get(e.type),this.disabled=e.disabled,this.media=e.media},serializeData:function(){var e=this.model.server.get("multiuser"),n=this.model.server.get("shared"),i=r(this.media,{streamType:this.streamType.id}),a=r(this.media,{streamType:this.streamType.id,selected:!0}),s=t.first(a);return{showDropdown:!this.disabled&&i.length>1&&(!n||e),type:this.streamType.typeString,streams:i,selectedStream:s}},onRender:function(){this.$el.attr("id",this.streamType.typeString+"-dropdown");
},onStreamClick:function(e){e.preventDefault();var t=n(e.currentTarget),i=t.data("id");s.execute("selectStream",{item:this.model,streamType:this.streamType,streamID:i})}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(37),n(9),n(8),n(223),n(466),n(147),n(863),n(644)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=o.extend({mixins:s,paginated:!0,scrollPosition:0,scrollDirection:"down",mergeDelay:5e3,viewsByModel:{},initialize:function(t){o.prototype.initialize.apply(this,arguments),
e.bindAll(this,"onResize","onScroll"),this.listModel=t.listModel,this.mediaActions=t.mediaActions,s.initialize.apply(this,arguments),null!=t.paginated&&(this.paginated=t.paginated),this.channelName=t.channelName||"content",this.initializingScrollPosition=!0,this.merge=e.throttle(e.bind(this.merge,this),this.mergeDelay),this.listModel.scrollPosition&&(this.restoringScrollPosition=!0,this.scrollPosition=this.listModel.scrollPosition),this.listenTo(this.collection,"reset",this.onCollectionReset),this.listenTo(this.collection,"add",this.onCollectionAdd),
this.listenTo(this.collection,"remove",this.onCollectionRemove),i.trigger(this.channelName+".subscribe:resize",this.onResize),i.trigger(this.channelName+".subscribe:scroll",this.onScroll),i.trigger("start:scrollListener")},getLockIndexes:function(){var t,n=this.getVisibleBounds(),i=this.getLockBounds(),r=this.getIndexBounds(),a=e.range(n.from,n.to+1),s=e.range(n.to+1,i.to+1),o=e.range(n.from-1,i.from-1,-1);return"down"===this.scrollDirection?(o.reverse(),t=a.concat(s,o)):(a.reverse(),o.reverse(),
t=a.concat(o,s)),e.filter(t,function(e){return e>=r.from&&e<=r.to},this)},getVisibleBounds:function(){if(this.itemHeight&&this.itemsPerRow&&this.itemsPerPage){var e=Math.floor(this.scrollPosition/this.itemHeight)*this.itemsPerRow;return e>this.getTotalSize()&&(this.scrollPosition=0,e=0),{from:e,to:e+this.itemsPerPage-1+2*this.itemsPerRow}}return{from:0,to:0}},getLockBounds:function(){var e=this.getPageSize(),t=this.getVisibleBounds();return{from:t.from-e,to:t.to+e}},prepareCells:function(t){var n=this.getIndexBounds();
this.pool.filter(function(e){return n.from<=e.id&&n.to>=e.id},this);var i=e.reject(t,this.getModelForId,this);if(i.length&&this.paginated){if(this.listModel.populatePromise&&"pending"===this.listModel.populatePromise.state())return void this.listModel.populatePromise.done(e.bind(this.prepareCells,this,t));var a=r.roundByPage({start:e.min(i),last:e.max(i)},2*this.getPageSize()),s=this.listModel.populateRange(a);this.trigger("change:loading",!0,{prepend:"up"===this.scrollDirection}),s.always(e.bind(function(){
this.trigger("change:loading",!1)},this))}},moveCell:function(e){if(e.updatedCSS||(e.view.$el.css({position:"absolute"}),e.updatedCSS=!0),this.itemWidth&&this.itemsPerRow){var t=e.id%this.itemsPerRow,n=Math.floor(e.id/this.itemsPerRow);e.view.$el.translate(t*this.itemWidth,n*this.itemHeight),e.movedToIndex=e.id}},moveElement:function(){},createCellView:function(i){var r=n.getOption(this,"itemViewOptions");e.isFunction(r)&&(r=r.call(this,i)),r=e.clone(r),r.model=this.getModelForId(i.id),r.mediaActions=this.mediaActions,
i.el&&(r.el=i.el);var a=n.getOption(this,"itemView");a._ensureElementExtension||(a._ensureElementExtension=a.extend({_ensureElement:function(){var n=this.el?e.result(this,"el"):t.$("<"+e.result(this,"tagName")+">");this.setElement(n,!1);var i=e.extend({},e.result(this,"attributes"));this.id&&(i.id=e.result(this,"id")),this.className&&(i.class=e.result(this,"className")),this.$el.attr(i)}}));var s=new a._ensureElementExtension(r);return i.el||(this.$el.append(s.$el),i.el=s.el),this.forwardItemViewEvents(s),
s.remove=function(){return this.stopListening(),this.$el.unbind(),this.$el.empty(),this},s},getPageSize:function(){return this.itemsPerPage||1},clearAllReusedCells:function(){this.pool.each(function(e){var t=e.filledWithIndex===e.id,n=e.filledWithIndex===-1;t||n||(this.clearCell(e),e.filledWithIndex=-1)},this)},getTotalSize:function(){return this.listModel.getTotalSize()},fillCell:function(e){var t=this.getModelForId(e.id);return!(!t||t!==e.view.model||e.view.isClosed)||(this.clearCell(e),!!t&&(e.view=this.createCellView(e),
e.view.render(),this.indexViewByModel(e.view),!0))},clearCell:function(e){var t=e.view;t.model&&delete this.viewsByModel[t.model.cid],t.isClosed||t.close()},getIndexBounds:function(){return{from:0,to:this.getTotalSize()-1}},getModelForId:function(e){var t=this.listModel.get("populatedRange"),n=e-t.start;if(!(n<0))return this.collection.at(n)},getViewForModel:function(e){return this.viewsByModel[e.cid]},indexViewByModel:function(e){this.viewsByModel[e.model.cid]=e},render:function(){this.updateHeight(),
this.restoringScrollPosition||(o.prototype.render.apply(this,arguments),this.clearAllReusedCells())},updateHeight:function(){this.recalculateHeight&&(this.recalculateHeight=!1,this.listHeight=Math.ceil(this.getIndexBounds().to/this.itemsPerRow)*this.itemHeight-this.itemMarginBottom,this.$el.css("height",this.listHeight),this.initScrolling())},itemViewOptions:function(){var t,n,i=this.listModel.section;if(i){var r=i.get("currentType"),a=this.listModel.getSort();if(t=r&&r.get("typeString"),a){var s=a.split(":");
s.length&&(n=e.first(s))}}else t="clip";return{type:t,sort:n}},measureItem:function(){var t=this.createCellView({id:this.listModel.get("populatedRange").start});t.model||(this.remeasureItem=!0),t.render(),t.$el.css("visibility","hidden");var n=t.$el.appendTo(this.$el);e.defer(e.bind(function(){this.itemWidth=n.outerWidth(!0),this.itemHeight=n.outerHeight(!0),this.itemMarginRight=parseInt(n.css("margin-right"),10),this.itemMarginBottom=parseInt(n.css("margin-bottom"),10),t.close(),t.$el.remove(),this.measureContainer(),
this.render()},this))},measureContainer:function(){var e=parseInt(this.$el.css("margin-top"),10),t=parseInt(this.$el.css("margin-bottom"),10);this.containerWidth=this.$el.width(),this.containerHeight=this.containerSize.height-e-t,this.itemsPerRow=Math.floor(this.containerWidth/this.itemWidth),this.itemsPerColumn=Math.floor((this.containerHeight+this.itemMarginBottom)/this.itemHeight),this.itemsPerPage=this.itemsPerRow*this.itemsPerColumn,this.itemsPadding=this.itemsPerRow*Math.max(this.itemsPerColumn,2),
this.itemsPerPageWithPadding=2*this.itemsPadding+this.itemsPerPage,this.itemHeight&&(this.recalculateHeight=!0)},scrollToIndex:function(e){var t=Math.floor(e/this.itemsPerRow),n=t*this.itemHeight;this.restrictScrollDirection=!0,i.trigger("update:scrollPosition",n)},merge:function(){if(!this.isClosed){var t=this.listModel.get("populatedRange"),n=t.start,i=t.end>this.itemsPerPageWithPadding?t.end:this.itemsPerPageWithPadding;if(i){if(n>0)return this.scrollDirection="up",void this.listModel.populateRange({
start:0,size:n});this.listModel.set({currentPageStart:n,currentPageSize:i});var r=this.listModel.fetch();r.done(e.bind(function(){this.listModel.scrollPosition=this.scrollPosition,this.onCollectionReset()},this))}}},initScrolling:function(){this.initializingScrollPosition&&(this.restrictScrollDirection=!0,this.initializingScrollPosition=!1,this.restoringScrollPosition=!1,this.listModel.scrollPosition?i.trigger("update:scrollPosition",this.listModel.scrollPosition):this.containerScrollPosition.scrollTop>0&&i.trigger("update:scrollPosition",0));
},onDeselectAll:function(t){e.each(t,function(e){this.pool.each(function(t){t.view.model===e&&t.view.deselect()},this)},this)},onClose:function(){o.prototype.onClose.apply(this,arguments),s.onClose.apply(this,arguments),i.trigger("stop:scrollListener"),i.trigger(this.channelName+".unsubscribe:resize",this.onResize),i.trigger(this.channelName+".unsubscribe:scroll",this.onScroll),this.listModel.scrollPosition=this.scrollPosition},onCollectionReset:function(t,n){this.isRefreshing||(a.cancel(this.cid),
this.pool.each(function(e){e.id=e.filledWithIndex=this.collection.indexOf(e.view.model)},this),this.pool.reindex(),n&&n.previousModels&&e.each(n.previousModels,this.onCollectionRemove,this),this.initializingScrollPosition=!0,this.measureItem(),this.render(),this.getTotalSize()||this.trigger("change:loading",!1))},onCollectionAdd:function(e){this.remeasureItem&&(this.remeasureItem=!1,this.measureItem(e))},onCollectionRemove:function(e){var t=this.pool.findByModel(e),n=t&&t.view||{model:e,deselect:function(){}
};this.triggerMethod("item:removed",n)},onResize:function(e){this.containerSize=e,this.measureItem(),this.scrollDirection=this.containerWidth>this.$el.width()?"up":"down",this.render()},onScroll:function(e){this.containerScrollPosition=e,this.restoringScrollPosition||(this.itemWidth||this.measureItem(),0!==this.containerScrollPosition.scrollTop&&this.containerScrollPosition.scrollTop<this.scrollPosition?this.scrollDirection="up":this.scrollDirection="down",this.restrictScrollDirection&&(this.scrollDirection="down",
this.restrictScrollDirection=!1),this.scrollPosition=this.containerScrollPosition.scrollTop,this.render())}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1768),n(3),n(96),n(47)],r=function(e,t,n,i){"use strict";var r=n.extend({className:"striped-list-item media-list-item media-details-list-item",template:e,ui:t.extend({poster:".media-poster"},n.prototype.ui),initialize:function(e){n.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},
createImageView:function(){var e=this.type;"episode"===e&&(e="show"),this.image=new i({model:this.model,type:e,getUrl:this.getPosterUrl,height:150})},bindings:t.extend({},n.prototype.bindings,{".media-count-badge":{modelAttribute:"Media",formatter:function(e){return e&&e.length||0},autohide:function(e){return!/^(clip|userPlaylistItem)$/.test(this.model.get("type"))&&e>1}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&(!/^(artist|album)$/.test(this.model.get("type"))&&!!e);
}},".media-tagline":{modelAttribute:"tagline",autohide:!0},".media-summary":{modelAttribute:"summary",autohide:!0}})});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(147),n(33)],r=function(e,t){"use strict";var n=t.extend({mixins:[e],onAddChild:function(e){this.forwardItemViewEvents(e)}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1807),n(3),n(5),n(13),n(97),n(22)],r=function(e,t,n,i,r,a){"use strict";var s=r.extend({name:"downloadVersionModal",
template:e,serializeData:function(){var e=this.model,n=t.map(this.model.get("Media"),function(n,i){var r=t.clone(n);r.downloadUrl=e.getDownloadUrl(i);var s=e.getFilepath(i);return s&&(r.downloadName=a.getLastSegment(s)),r});return{mediaItems:n}},onClick:function(){}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1815),n(3),n(5),n(13),n(97)],r=function(e,t,n,i,r){"use strict";var a=r.extend({name:"playVersionModal",template:e,serializeData:function(){return{mediaItems:this.model.get("Media")
}},onClick:function(e){e.preventDefault();var t=n(e.currentTarget).data("value"),r=this.model.get("Media")[t];i.execute("playMedia",{item:this.model,media:r}),this.promise.resolve(r),this.hide()}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(37),n(9),n(10),n(8),n(43),n(108),n(31),n(165),n(13),n(267),n(1929)],r=function(e,t,n,i,r,a,s,o,l,u,c,d){"use strict";var h=i.Layout.extend({events:{fullscreenchange:"onFullscreenChange",webkitfullscreenchange:"onFullscreenChange",
mousewheel:"onMouseWheel"},shortcutListeners:function(){return{"shortcut:playPause":this.getListenerFor("playPause"),"shortcut:seekBackward":this.getListenerFor("seekBackward"),"shortcut:seekForward":this.getListenerFor("seekForward"),"shortcut:stepBackward":this.getListenerFor("stepBackward"),"shortcut:stepForward":this.getListenerFor("stepForward"),"shortcut:decreaseVolume":this.getListenerFor("decreaseVolume"),"shortcut:increaseVolume":this.getListenerFor("increaseVolume"),"shortcut:skipPrevious":this.getListenerFor("skipPrevious"),
"shortcut:skipNext":this.getListenerFor("skipNext"),"shortcut:toggleFullScreen":this.getListenerFor("toggleFullScreen"),"shortcut:stop":this.getListenerFor("stop")}},initialize:function(n){var i=n.playerModelClass||d;if(this.controller=n.controller,this.isNew=!n.controller,this.type=n.type,this.media=n.media,this.offset=n.offset,this.autoplay=n.autoplay,this.$el.addClass(this.type),this.isNew){var a=r.resolve("appModel"),s=a.get("primaryPlayer");this.controller=u.getInstance(this.type),!this.model&&this.playQueue&&(this.model=this.playQueue.get("selectedItem")),
this.playQueue=n.playQueue,this.metadataItem=this.model.get("metadataItem"),this.playerModel=new i({playQueueItem:this.model,metadataItem:this.metadataItem,playQueue:this.playQueue,volume:this.volumeSettingsKey?l.get(this.volumeSettingsKey):l.getInstance().defaults.volume,friendlyName:s?s.get("friendlyName"):null})}else this.model=this.controller.model.get("playQueueItem"),this.metadataItem=this.model.get("metadataItem"),this.playQueue=this.controller.model.get("playQueue"),this.playerModel=this.controller.model;
this.throttledPersistPlayQueue=e.throttle(e.bind(this.persistPlayQueue,this),1e3),this.$document=t(document),this.$document.on("MSFullscreenChange",e.bind(this.onFullscreenChange,this)),this.$document.on("mozfullscreenchange",e.bind(this.onFullscreenChange,this))},addListeners:function(){var t=r.resolve("appModel");this.listenTo(n.history,"route",this.onRouteChange),this.listenTo(t,"change:primaryPlayer",this.onPrimaryPlayerChange),this.listenTo(this.playerModel,{"change:playQueueItem":this.onPlayerPlayQueueItemChange,
"change:state":this.onPlayerStateChange,"change:volume":this.onPlayerVolumeChange,"change:finished":this.onPlayerFinishedChange,"change:position":this.onPlayerPositionChange}),this.controlsView&&this.listenTo(this.controlsView,{play:this.getListenerFor("play"),pause:this.getListenerFor("pause"),"change:position":this.getListenerFor("setPosition"),"change:volume":this.getListenerFor("setVolume"),enterFullscreen:this.enterFullscreen,exitFullscreen:this.exitFullscreen,previous:this.getListenerFor("skipPrevious"),
next:this.getListenerFor("skipNext"),skip:this.getListenerFor("skipTo"),remove:this.getListenerFor("removeItem"),move:this.getListenerFor("moveItem"),minimize:this.getListenerFor("minimize"),maximize:this.getListenerFor("maximize"),toggleShuffle:this.getListenerFor("toggleShuffle"),nextRepeat:this.getListenerFor("nextRepeat"),stop:this.getListenerFor("stop"),"navigate:grandparent":this.getListenerFor("navigateToGrandparent"),"navigate:item":this.getListenerFor("navigateToItem")}),this.listenTo(a,e.result(this,"shortcutListeners"));
},startPlayback:function(e){return e||(e={}),this.controller.load({model:this.playerModel,autoplay:e.autoplay,silent:this.isNowPlaying(),offset:e.offset})},continuePlayback:function(){},updatePageTitle:function(){var e=this.playerModel.get("state");if(e===s.states.STOPPED)return void(document.title="Plex");var t,n=this.playerModel.get("metadataItem"),i=n.get("type");if("episode"===i){var r=o({seasonIndex:n.get("parentIndex"),episodeIndex:n.get("index"),date:n.get("originallyAvailableAt"),noLeadingZero:!0,
separator:" \xb7 "});t=n.get("grandparentTitle")+" - "+r}else if("track"===i){var a=n.get("originalTitle")||n.get("grandparentTitle");t=a?a+" - "+n.get("title"):n.get("title")}else t=n.get("title");e===s.states.PLAYING||e===s.states.BUFFERING?document.title="\u25b6 "+t:document.title=t},getListenerFor:function(t){return e.isFunction(this[t])?this[t]:e.bind(this.controller[t],this.controller)},minimize:function(){this.isSwitchingPlayers=!0,c.execute("playMedia",{item:this.model,controller:this.controller,
useMiniPlayer:!0,isSwitchingPlayers:!0})},maximize:function(){this.isSwitchingPlayers=!0,c.execute("playMedia",{item:this.model,controller:this.controller,isSwitchingPlayers:!0})},enterFullscreen:function(){var e=this.el.requestFullScreen||this.el.webkitRequestFullScreen||this.el.mozRequestFullScreen||this.el.msRequestFullscreen;e.call(this.el)},exitFullscreen:function(){var e=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen;e.call(document);
},toggleFullScreen:function(){this.playerModel.get("showEnterFullscreen")?this.enterFullscreen():this.exitFullscreen()},stop:function(){this.controller.stop(),a.trigger("hide:player",this)},navigateToGrandparent:function(){var e=this.getNavigationGrandparentKey();this.navigateToLibraryItem(e)||this.navigateToChannelItem()},navigateToItem:function(){var e=this.getNavigationKey();this.navigateToLibraryItem(e)||this.navigateToChannelItem(e)},navigateToLibraryItem:function(e){return!(!e||!this.metadataItem.get("isLibraryItem"))&&(a.trigger("navigate","details",{
serverID:this.model.server.id,key:e}),!0)},navigateToChannelItem:function(e){var t=this.model.channel;return!!t&&(a.trigger("navigate","channel",{serverID:this.model.server.id,channelID:t.id?t.id:t.get("identifier"),key:e}),!0)},getNavigationGrandparentKey:function(){var e=this.metadataItem.get("grandparentKey");if(e)return e;var t=this.metadataItem.get("parentKey");return t},getNavigationKey:function(){return this.metadataItem.get("key")},isNowPlaying:function(){var e=r.resolve("appModel"),t=e.get("primaryPlayer");
if(!t)return!1;var n=t.get("nowPlaying");return!!n.get(this.metadataItem.id)},canAutoplay:function(e){return e!==s.states.PAUSED},persistPlayQueue:function(){var e=this.playerModel;if(e&&this.playQueue.get("playQueueID")){var t=e.get("state");return t===s.states.STOPPED?void c.execute("persistPlayQueue",null):void c.execute("persistPlayQueue",{playQueue:this.playQueue,position:e.get("position"),autoplay:!1})}},onRender:function(){this.isNew?this.startPlayback({autoplay:this.canAutoplay()&&this.autoplay,
offset:this.offset}):this.continuePlayback()},onClose:function(){if(this.$document.off("MSFullscreenChange"),this.$document.off("mozfullscreenchange"),!this.isSwitchingPlayers&&(this.controller.stop(),!this.controller.model)){var e=this.metadataItem.server.get("playQueueManager"),t=e.getFor(this.metadataItem);t===this.playQueue&&e.remove(t.get("mediaType"))}},onRouteChange:function(){this.isMini||a.trigger("hide:player",this)},onPrimaryPlayerChange:function(e,t){var n=this.playerModel.get("state"),i=this.playerModel.get("position"),r=this.controller.mediaElement;
this.playerModel.set("ready",!1),this.playerModel.set("friendlyName",t?t.get("friendlyName"):null),this.controller.stop(),this.controller=u.getInstance(this.type),this.stopListening(),this.addListeners(),this.startPlayback({offset:i,autoplay:this.canAutoplay(n),mediaElement:r})},onPlayerPlayQueueItemChange:function(e,t){this.playQueue.set("selectedItem",t),this.model=this.playQueue.get("selectedItem"),this.metadataItem=this.model.get("metadataItem"),this.updatePageTitle()},onPlayerStateChange:function(e,t){
this.updatePageTitle(),this.persistPlayQueue()},onPlayerVolumeChange:function(e,t){this.volumeSettingsKey&&l.save(this.volumeSettingsKey,t)},onPlayerFinishedChange:function(e,t){if(t){var n=s.getElementByType(this.type);this.model.server.get("playQueueManager").remove(n),a.trigger("hide:player",this)}},onPlayerPositionChange:function(e,t){this.throttledPersistPlayQueue()},onFullscreenChange:function(){var e=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement);
this.playerModel.set("showEnterFullscreen",!e),this.playerModel.set("showExitFullscreen",e)},onMouseWheel:function(e){e.deltaY>0?a.trigger("shortcut:increaseVolume"):e.deltaY<0&&a.trigger("shortcut:decreaseVolume")}});return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(316)],r=function(e,t){"use strict";var n=t.extend({className:"player mini-player",isMini:!0,regions:{controls:".mini-player-controls"},shortcutListeners:function(){var n=t.prototype.shortcutListeners.apply(this,arguments);
return e.omit(n,"shortcut:stop")}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1875),n(5),n(9),n(106),n(6),n(47),n(113),n(1083),n(1079),n(523),n(236),n(1126),n(499),n(1132)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p){"use strict";var f=n.Layout.extend({template:e,muted:!1,mutedVolume:0,ui:{poster:".media-poster",previousBtn:".previous-btn",nextBtn:".next-btn",volumeBtn:".volume-btn",shuffleBtn:".shuffle-btn",repeatBtn:".repeat-btn",scrubPreview:".mini-player-scrub-preview",
scrubPreviewText:".mini-player-scrub-preview>.tooltip-inner",dropdown:"#player-actions-dropdown"},regions:{rating:".rating-container",dropdown:"#player-actions-dropdown",seekBar:".seek-bar-container",volume:".player-volume-slider-container",playQueue:".player-play-queue-container",lyrics:".player-lyrics-container"},modelEvents:{"change:metadataItem":"onMetadataItemChange","change:volume":"onVolumeChange","change:canSkipNextMessage":"onCanSkipNextMessageChange","change:canShuffle":"onCanShuffleChange",
"change:shuffled":"onShuffledChange","change:canRepeat":"onCanRepeatChange","change:repeatAll change:repeatItem":"onRepeatChange"},events:{"click .volume-btn":"onVolumeClick"},triggers:{"click .play-btn":{event:"play",preventDefault:!0},"click .pause-btn":{event:"pause",preventDefault:!0},"click .previous-btn":{event:"previous",preventDefault:!0},"click .next-btn":{event:"next",preventDefault:!0},"click .shuffle-btn":{event:"toggleShuffle",preventDefault:!0},"click .repeat-btn":{event:"nextRepeat",
preventDefault:!0},"click .maximize-btn":{event:"maximize",preventDefault:!0},"click .stop-btn":{event:"stop",preventDefault:!0},"click .media-poster-container":{event:"navigate:item",preventDefault:!0},"click .grandparent-title":{event:"navigate:grandparent",preventDefault:!0},"click .item-title":{event:"navigate:item",preventDefault:!0}},onlyAfterRender:["onVolumeChange","onCanShuffleChange","onShuffledChange","onCanRepeatChange","onRepeatChange"],initialize:function(e){var t=e.upNextCollection;
this.playQueueDropdown=new h({model:this.model,collection:t}),this.lyricsDropdown=new p({model:this.model}),this.setupPosterImage(),this.seekBarView=new u({model:this.model}),this.volumeSlider=new c({className:"player-volume-slider player-slider",value:this.model.get("volume")}),this.listenTo(this.seekBarView,"change:value",this.onSeekBarValueChange),this.listenTo(this.seekBarView,"hover",this.onSeekBarHover),this.listenTo(this.volumeSlider,"change:value",this.onVolumeSliderValueChange),this.listenTo(this.playQueueDropdown,{
"itemview:skip":this.onSkip,"itemview:remove":this.onRemove,move:this.onMove})},getPosterUrl:function(e){return e=e||this.model.get("parentThumb")||this.model.get("grandparentThumb"),e||(this.model.parent?e=this.model.parent.get("thumb"):this.model.channel&&(e=this.model.channel.get("thumb"))),e},setupPosterImage:function(){var e=this.model.get("metadataItem");this.posterImage=new a({model:e,type:e.get("type"),getUrl:this.getPosterUrl,height:80,exposeUrl:!0}),this.listenTo(this.posterImage,"load",this.onPosterLoad);
},updatePosterTitle:function(e){var t=e.get("parentTitle")||e.get("title");this.ui.poster.attr({"data-image-title":t,"data-title":e.get("title"),"data-parent-title":e.get("parentTitle"),"data-grandparent-title":e.get("originalTitle")||e.get("grandparentTitle")})},updateVolumeBtn:function(e){var t=this.ui.volumeBtn;e>50?(this.muted=!1,t.addClass("high"),t.removeClass("low mute")):e<=50&&e>0?(this.muted=!1,t.addClass("low"),t.removeClass("high mute")):(this.muted=!0,t.addClass("mute"),t.removeClass("high low"));
},updateShuffleBtn:function(){var e=this.model.get("canShuffle"),t=this.model.get("shuffled");this.ui.shuffleBtn.toggleClass("disabled",!e),this.ui.shuffleBtn.toggleClass("selected",!!t)},updateRepeatBtn:function(){var e=this.model.get("canRepeat"),t=this.model.get("repeatAll"),n=this.model.get("repeatItem"),i=this.ui.repeatBtn;i.toggleClass("disabled",!e),n&&!t?(i.addClass("one"),i.addClass("selected")):t&&!n?(i.removeClass("one"),i.addClass("selected")):(i.removeClass("one"),i.removeClass("selected"));
},updateAncillaryBtns:function(){var e=this.ui.shuffleBtn.parent(),n=this.model.get("showShuffle")||this.model.get("showRepeat")||this.model.get("showLyrics");t(e).toggleClass("hidden",!n)},updateRatingView:function(e){var t="track"===e.get("type");if(this.$(this.rating.el).toggleClass("hidden",!t),t){var n,i=e.get("isLibraryItem"),r=this.model.get("playQueueItem"),a=this.model.get("playQueue"),u=a&&a.get("isRadio"),c=r.get("advertisement");c?n=l:u?n=o:i&&(n=s),n&&this.rating.show(new n({model:e}));
}},updateMoreActionsDropdown:function(){var e=this.model.get("metadataItem"),t=this.model.get("playQueue");return t&&t.get("isRadio")?void this.ui.dropdown.addClass("hidden"):(this.ui.dropdown.removeClass("hidden"),void this.dropdown.append(new d({model:e,playQueue:t})))},updateControlTooltips:function(){var e=this.model.get("playQueueItem"),t=e.get("advertisement")?r("Your mix will resume shortly."):this.model.get("canSkipNextMessage");this.ui.nextBtn.attr({title:t,"data-original-title":t}),this.$el.tooltip({
selector:".next-btn",container:"body",placement:"top"})},updatePosterImages:function(e){this.posterImage.src=null,this.posterImage.setModel(e),this.posterImage.render()},bindings:{".grandparent-title":{modelAttribute:"metadataItem",autohide:!0,formatter:function(e,t){var n=this.model.get("playQueue");t.toggleClass("clickable",!n.get("isRadio"));var i=e.get("originalTitle")||e.get("grandparentTitle");return i?i:e.channel?e.channel.get("title"):void 0}},".item-title":{modelAttribute:"metadataItem",
autohide:!0,formatter:function(e,t){var n=this.model.get("playQueue");return t.toggleClass("clickable",!n.get("isRadio")),e.get("title")}},".previous-btn":{modelAttribute:"canSkipPrevious",manual:!0,formatter:function(e,t){t.toggleClass("disabled",!e)}},".play-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),e}},".pause-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],
manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),!e}},".stop-btn":{modelAttribute:"canStop",manual:!0,autohide:!0},".next-btn":{modelAttribute:"canSkipNext",manual:!0,formatter:function(e,t){t.toggleClass("disabled",!e)}},".shuffle-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".repeat-btn":{modelAttribute:"showRepeat",manual:!0,autohide:!0},".ancillary-btns":{modelAttribute:"showShuffle",modelListeners:["showShuffle","showRepeat","showLyrics"],
manual:!0,formatter:function(e,t){var n=this.model.get("showRepeat"),i=this.model.get("showLyrics"),r=e||n||i;return t.toggleClass("hidden",!r),null}},".seek-bar-container":{modelAttribute:"showSeekBar",manual:!0,autohide:!0},".mini-controls-numeric-progress":{modelAttribute:"showSeekBar",manual:!0,autohide:!0},".player-position":{modelAttribute:"position",modelListeners:["position","duration"],formatter:function(e){var t=this.model.get("duration");return!!t&&i(e)}},".separator":{modelAttribute:"duration",
formatter:function(e){return!!e&&"/"}},".player-duration":{modelAttribute:"duration",formatter:function(e){return!!e&&i(e)}},".volume-btn":{modelAttribute:"canSetVolume",manual:!0,autohide:!0,formatter:function(e,t){return this.$el.toggleClass("show-volume",e),e}},".maximize-btn":{modelAttribute:"showMaximize",manual:!0,autohide:!0},".minimize-btn":{modelAttribute:"showMinimize",manual:!0,autohide:!0},".media-poster-container":{modelAttribute:"playQueue",manual:!0,formatter:function(e,t){t.toggleClass("clickable",!e.get("isRadio"));
}}},onRender:function(){var e=this.model.get("metadataItem");this.updatePosterTitle(e),this.updateRatingView(e),this.posterImage.setElement(this.ui.poster),this.updateControlTooltips(),this.updateMoreActionsDropdown(),this.seekBar.append(this.seekBarView),this.volume.show(this.volumeSlider),this.playQueue.show(this.playQueueDropdown),this.lyrics.show(this.lyricsDropdown),this.updateAncillaryBtns(),this.updateShuffleBtn(),this.updateRepeatBtn(),this.updateVolumeBtn(this.model.get("volume"))},onClose:function(){
this.posterImage.close()},onMetadataItemChange:function(e,t){this.updatePosterImages(t),this.updatePosterTitle(t),this.updateRatingView(t),this.updateControlTooltips(),this.updateMoreActionsDropdown()},onCanSkipNextMessageChange:function(){this.updateControlTooltips()},onVolumeChange:function(e,t){this.volumeSlider.displayValue(t),this.updateVolumeBtn(t)},onCanShuffleChange:function(e,t){this.updateShuffleBtn()},onShuffledChange:function(e,t){this.updateShuffleBtn()},onCanRepeatChange:function(e,t){
this.updateRepeatBtn()},onRepeatChange:function(e,t){this.updateRepeatBtn()},onPosterLoad:function(e){this.trigger("load:poster",e)},onSeekBarValueChange:function(e){this.trigger("change:position",e)},onSeekBarHover:function(e){this.ui.scrubPreview.toggleClass("in",!!e),e&&(this.ui.scrubPreviewText.text(i(e.time)),this.ui.scrubPreview.css("left",e.position-this.ui.scrubPreview.outerWidth()/2+"px"))},onVolumeSliderValueChange:function(e){this.trigger("change:volume",e)},onVolumeClick:function(e){e.preventDefault(),
this.muted?(this.mutedVolume>0?this.trigger("change:volume",this.mutedVolume):this.trigger("change:volume",100),this.muted=!1,this.mutedVolume=0):(this.muted=!0,this.mutedVolume=this.model.get("volume"),this.trigger("change:volume",0))},onSkip:function(e,t){this.trigger("skip",t)},onRemove:function(e,t){this.trigger("remove",t)},onMove:function(e,t){this.trigger("move",e,t)}});return f}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=e.transitionProps,n=a(e,["transitionProps"]);
return l.default.createElement(h.default,r({style:m,background:!0,minSize:!0,transition:!0,transitionProps:r({className:f.default.imageContainer},c.default,t)},n))}var r=n(11).default,a=n(14).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(565),c=s(u),d=n(469),h=s(d),p=n(1546),f=s(p),m={width:"100%",height:"100%"};i.propTypes={transitionProps:o.PropTypes.object},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.cellX,r=e.cellY,a=e.cellWidth,o=e.cellHeight,l="translate3d("+i+"px, "+r+"px, 0)",u={
position:"absolute",width:a,height:o,WebkitTransform:l,msTransform:l,transform:l};return s.default.createElement("div",{className:t,style:u},n)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a);i.propTypes={className:a.PropTypes.string,children:a.PropTypes.node,cellX:a.PropTypes.number.isRequired,cellY:a.PropTypes.number.isRequired,cellWidth:a.PropTypes.number.isRequired,cellHeight:a.PropTypes.number.isRequired},t.default=i,e.exports=t.default},function(e,t,n){
"use strict";function i(e){var t=e.children,n=e.className,i=e.isSelected,s=r(e,["children","className","isSelected"]);return l.default.createElement(v.default,a({className:(0,c.default)(n,i&&y.default.isSelected)},s),l.default.createElement("div",{className:y.default.menuItemContainer},l.default.createElement("div",{className:y.default.menuLabel},t),i&&l.default.createElement("div",{className:y.default.selectedIcon},l.default.createElement(f.default,{name:"plex-icon-selected-560","aria-label":(0,
h.default)("Selected")}))))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(6),h=s(d),p=n(48),f=s(p),m=n(136),v=s(m),g=n(1552),y=s(g);i.propTypes={children:o.PropTypes.node,className:o.PropTypes.string,isSelected:o.PropTypes.bool},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(u.default,r({className:d.default.toolbarMenu},e))}var r=n(11).default,a=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(154),u=a(l),c=n(1560),d=a(c);t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(6),d=o(c),h=n(23),p=n(27),f=o(p),m=n(48),v=o(m),g=n(527),y=o(g),b=n(1570),w=o(b),S=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={sliderValue:e.columnAdjustment*-1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,f.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._clearTimeout()}},{key:"_clearTimeout",value:function(){this._columnAdjustmentTimeoutID&&clearTimeout(this._columnAdjustmentTimeoutID)}},{key:"onSliderChange",decorators:[h.autobind],value:function(e){var t=this,n=e.steppedValue;this.setState({sliderValue:n}),this._clearTimeout(),this._columnAdjustmentTimeoutID=setTimeout(function(){
t.props.onColumnAdjustmentChange(n*-1)},this.props.columnAdjustmentTimeout)}},{key:"render",value:function(){return u.default.createElement("div",{className:w.default.sliderContainer},u.default.createElement(y.default,{className:w.default.slider,label:(0,d.default)("Poster Size"),value:this.state.sliderValue,min:-1,max:2,stepSize:1,onChange:this.onSliderChange}),u.default.createElement(v.default,{name:"plex-icon-toolbar-grid-560",className:w.default.sliderIcon}))}}]),t}(l.Component);S.propTypes={
columnAdjustment:l.PropTypes.number.isRequired,columnAdjustmentTimeout:l.PropTypes.number.isRequired,onColumnAdjustmentChange:l.PropTypes.func.isRequired},S.defaultProps={columnAdjustmentTimeout:500},t.default=S,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(27),p=u(h),f=n(118),m=u(f),v=n(40),g=u(v),y=function(e){
function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.server,n=e.linkTitle,i=e.linkKey,r=e.onPress,a=o(e,["server","linkTitle","linkKey","onPress"]);if(!n)return null;if(!i)return d.default.createElement("span",a,n);var s=encodeURIComponent(t.machineIdentifier),u=encodeURIComponent(i);return d.default.createElement(g.default,l({
title:n,to:"#!/server/"+s+"/details/"+u,onPress:r},a),n)}}]),t}(c.Component);y.propTypes={className:c.PropTypes.string,server:m.default.isRequired,linkKey:c.PropTypes.string,linkTitle:c.PropTypes.string,onPress:c.PropTypes.func},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.separator;return s.default.createElement("span",{className:l.default.separator},t)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(1573),l=r(o);i.defaultProps={
separator:"\u2014"},i.propTypes={separator:a.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(27),p=u(h),f=n(48),m=u(f),v=n(155),g=u(v),y=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",
value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.icon,i=e.label,r=e.isMenuOpen,a=o(e,["children","icon","label","isMenuOpen"]);return d.default.createElement(g.default,l({"aria-haspopup":!0,tooltip:r?void 0:i,hideOnPress:!1},a),d.default.createElement(m.default,{name:n,"aria-label":i}),t)}}]),t}(c.Component);y.propTypes={children:c.PropTypes.node,icon:c.PropTypes.string.isRequired,label:c.PropTypes.string.isRequired,isMenuOpen:c.PropTypes.bool.isRequired
},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.innerClassName,i=r(e,["children","innerClassName"]);return l.default.createElement(c.default,a({className:h.default.pageContent},i),l.default.createElement("div",{className:n},t))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(84),c=s(u),d=n(1575),h=s(d);i.propTypes={children:o.PropTypes.node,innerClassName:o.PropTypes.string
},i.defaultProps={innerClassName:h.default.innerPageContent},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,h.createSelector)((0,m.default)(),function(e){var t=e.desktop,n=t.libraries,i=t.isLibrariesPending,r=t.librariesError;return{showLibrariesSpinner:i&&!n.length,showLibrariesError:!!r&&!n.length}})}var r=n(16).default,a=n(17).default,s=n(46).default,o=n(15).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(34),h=n(28),p=n(70),f=n(76),m=l(f),v=n(182),g=n(1381),y=l(g),b=function(e){
function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){e.serverEntityID!==this.props.serverEntityID&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,p.scheduleImmediateUpdate)(function(){e.populateLibraries({serverEntityID:e.serverEntityID});
})}},{key:"render",value:function(){return c.default.createElement(y.default,this.props)}}]),t}(u.Component);b.propTypes={serverEntityID:u.PropTypes.string.isRequired,populateLibraries:u.PropTypes.func.isRequired},t.default=(0,d.connect)(i,{populateLibraries:v.populateLibraries})(b),e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(c.default,r({className:h.default.innerEmptyPage,contentClassName:h.default.innerEmptyPageContent,scrollDirection:l.scrollDirections.NONE
},e))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(41),u=n(196),c=a(u),d=n(584),h=a(d);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(c.default,r({className:h.default.innerEmptyPage,contentClassName:h.default.innerEmptyPageContent,scrollDirection:l.scrollDirections.NONE},e))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(41),u=n(331),c=a(u),d=n(584),h=a(d);
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(m.default,r({title:(0,u.default)("There was an unexpected error"),description:(0,u.default)("Please visit our forums if you continue to experience problems")},e),o.default.createElement(p.default,{to:c.FORUMS_URL,target:"_blank",kind:d.kinds.PRIMARY},(0,u.default)("Go to Forums")))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(278),d=n(41),h=n(40),p=a(h),f=n(156),m=a(f);
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.children,i=e.icon,s=e.showSpinner,o=r(e,["className","children","icon","showSpinner"]);return l.default.createElement(v.default,a({className:(0,c.default)(t,y.default.sidebarLink)},o),s?l.default.createElement(f.default,{className:y.default.sidebarLinkSpinner}):l.default.createElement(h.default,{name:i,className:y.default.sidebarLinkIcon}),n)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(48),h=s(d),p=n(68),f=s(p),m=n(40),v=s(m),g=n(1604),y=s(g);i.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,showSpinner:o.PropTypes.bool,icon:o.PropTypes.string.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.children;return s.default.createElement("div",{role:"navigation"},s.default.createElement("div",{className:l.default.sidebarListHeader,role:"header"},t),n)}var r=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(1605),l=r(o);i.propTypes={title:a.PropTypes.string.isRequired,children:a.PropTypes.node},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=r(e,["className"]);return l.default.createElement("div",a({className:(0,c.default)(t,h.default.sidebarListItem)},n))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(1606),h=s(d);
i.propTypes={className:o.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(34),d=n(28),h=n(214),p=o(h),f=n(309),m=n(1453),v=o(m),g=(0,d.createSelector)(p.default,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,plans:t.plans,isPlansPending:t.isPlansPending,isPlansPopulated:t.isPlansPopulated,plansError:t.plansError
}}),y=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"componentWillMount",value:function(){this.props.isSignedIn&&this.props.fetchPlans()}},{key:"componentWillReceiveProps",value:function(e){e.isSignedIn&&e.isSignedIn!==this.props.isSignedIn&&e.fetchPlans()}},{key:"render",value:function(){return u.default.createElement(v.default,this.props)}}]),t}(l.Component);y.propTypes={isSignedIn:l.PropTypes.bool.isRequired,
fetchPlans:l.PropTypes.func.isRequired},t.default=(0,c.connect)(function(e){return g(e)},{fetchPlans:f.fetchPlans})(y),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,t){o(this,n),r(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.state={isMoving:!1}}return a(n,t),s(n,[{key:"componentDidMount",value:function(){this._setRenderedItem(),this._setVisibleItem()}},{key:"componentWillReceiveProps",value:function(e,t){var n=this.props[this.props.keyPropName],i=e[e.keyPropName],r=n&&n===i;
r?this.props.cellIndex!==e.cellIndex&&(this.setState({isMoving:!0}),this._clearMoveTimeout(),this._moveTimeoutID=setTimeout(this.onMoveTimeout,this.props.moveTimeout)):(this._renderedItem=null,this._visibleItem=null,this.setState({isMoving:!1}),this._clearMoveTimeout())}},{key:"shouldComponentUpdate",value:function(e,t){return(0,b.default)(this,e,t)}},{key:"componentDidUpdate",value:function(){this._setRenderedItem(),this._setVisibleItem()}},{key:"componentWillUnmount",value:function(){this._clearMoveTimeout();
}},{key:"_setRenderedItem",value:function(){this.props.isScrolling||(this._renderedItem=this.props[this.props.keyPropName])}},{key:"_setVisibleItem",value:function(){this.props.isVisible&&(this._visibleItem=this.props[this.props.keyPropName])}},{key:"_clearMoveTimeout",value:function(){this._moveTimeoutID&&(this._moveTimeoutID=clearTimeout(this._moveTimeoutID))}},{key:"onMoveTimeout",decorators:[m.autobind],value:function(){this.setState({isMoving:!1})}},{key:"render",value:function(){var t=this.props,n=t.className,i=t.keyPropName,r=t.isScrolling,a=t.isVisible,s=l(t,["className","keyPropName","isScrolling","isVisible"]),o=s[i],c=r&&o!==this._renderedItem,d=!a&&o!==this._visibleItem;
return h.default.createElement(e,u({className:(0,f.default)(n,S.default.cell,this.state.isMoving&&S.default.isMoving),showScrollPlaceholder:c,showOffscreenPlaceholder:d},s))}}]),n}(d.Component);return t.displayName="Virtualized("+(0,g.default)(e)+")",t.WrappedComponent=e,t.propTypes={className:d.PropTypes.string,keyPropName:d.PropTypes.string.isRequired,cellIndex:d.PropTypes.number.isRequired,isScrolling:d.PropTypes.bool.isRequired,isVisible:d.PropTypes.bool.isRequired,moveTimeout:d.PropTypes.number.isRequired
},t.defaultProps={moveTimeout:400},t}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(14).default,u=n(11).default,c=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=c(d),p=n(30),f=c(p),m=n(23),v=n(304),g=c(v),y=n(27),b=c(y),w=n(1619),S=c(w);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){try{e.focus()}catch(t){}}function r(){var e=document.activeElement;e&&e.blur()}function a(e){b=document.activeElement,w=e,r()}function s(e){
(0,v.default)(w,"Call `startScopedFocus(element)` before `scopeTabEvent`");var t=(0,y.default)(w);if(t.length){e.preventDefault();var n=document.activeElement,r=n?t.indexOf(n):-1,a=t.length-1,s=void 0;r===-1?s=e.shiftKey?a:0:(s=e.shiftKey?r-1:r+1,s<0?s=a:s>a&&(s=0)),i(t[s])}}function o(){(0,v.default)(w,"Call `startScopedFocus(element)` before `scopeAutoFocus`");var e=(0,y.default)(w),t=h.default.find(e,function(e){return f.default.parseBoolean(e.getAttribute("data-autofocus"))});t&&i(t)}function l(){
w=null}function u(){b&&(i(b),b=null)}var c=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.resetFocus=r,t.startScopedFocus=a,t.scopeTabEvent=s,t.scopeAutoFocus=o,t.resetScopedFocus=l,t.restorePreviousFocus=u;var d=n(3),h=c(d),p=n(53),f=c(p),m=n(38),v=c(m),g=n(1455),y=c(g),b=void 0,w=void 0},function(e,t,n){"use strict";function i(e){var t=U.default.get(e);return!(!t||!t.child)}function r(e){return!e.hasInvalidKey}function a(e){return!!r(e)&&(e.Media&&e.Media.length>1)}function s(e){
return r(e)}function o(e){return r(e)}function l(e){return!!e.primaryExtraKey}function u(e){return!!R.default.findWhere(e.related,{browse:!1})}function c(e){return!!e.isLibraryItem}function d(e){return!!e.isLibraryItem&&(i(e.type)?e.unviewedLeafCount>0:!e.viewCount||!!e.viewOffset)}function h(e){return!!e.isLibraryItem&&(i(e.type)?e.viewedLeafCount>0:!!e.viewCount||!!e.viewOffset)}function p(e){return!(!e.server.isFullOwnedServer||!e.isLibraryItem)}function f(e){return p(e)}function m(e){return p(e);
}function v(e){return!!p(e)&&!(!e.guid||/(local|none)\:\/\//.test(e.guid))}function g(e){return!!p(e)&&(!!e.guid&&!v(e))}function y(e){return v(e)}function b(e){if(!p(e))return!1;var t=void 0;return t=i(e.type)?e.Location:R.default.filter(e.Media,function(e){return!e.proxyType}),t.length>1}function w(e){return!(!e.server.isFullServer||!e.isLibraryItem)&&!(!e.server.allowSync||!e.allowSync)}function S(e){return!!p(e)&&!!e.server.transcoderVideo}function P(e){return p(e)}function x(e){return!1}function C(e){
return!1}function T(e){return!1}function _(e){return!!p(e)&&!!e.server.allowMediaDeletion}function E(e){if(!p(e))return!1;if(!e.server.allowMediaDeletion)return!1;var t=R.default.filter(e.Media,function(e){return!!e.proxyType});return t.length>0}function k(e){var t="photo"===e.type&&!e.isLibraryItem;return!t}function I(e){return!!e.isLibraryItem&&(!e.activeSelectionType||e.type===e.activeSelectionType)}function A(e){var t=e.type,n=j[t];(0,L.default)(R.default.isArray(n),"getMetadataActionProps: Invalid type, "+t+", provided");
var i=n.reduce(function(n,i){var r=F[i];return(0,L.default)(R.default.isFunction(r),"getMetadataActionProps: Invalid action, "+i+", for "+t),R.default.has(e,i)?n[i]=e[i]:n[i]=r(e),n},{});return i}var M=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var D=n(3),R=M(D),O=n(38),L=M(O),N=n(39),U=M(N),F={showPlay:r,showPlayVersion:a,showPlayAll:r,showShuffle:s,showQueue:o,showPlayTrailer:l,showPlayPlexMix:u,showPlayMusicVideo:l,showAddToPlaylist:c,showMarkWatched:d,showMarkUnwatched:h,
showEdit:p,showRefresh:f,showAnalyze:m,showFixMatch:v,showMatch:g,showUnmatch:y,showSplitApart:b,showSync:w,showOptimize:S,showDownload:P,showWatchLater:x,showShare:C,showRecommend:T,showDelete:_,showDeleteVersion:E,showGetInfo:k,showSelect:I},j={movie:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showDelete","showDeleteVersion","showGetInfo","showSelect"],
show:["showPlay","showPlayAll","showShuffle","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDelete","showSelect"],season:["showPlay","showPlayAll","showShuffle","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showSync","showOptimize","showDelete","showSelect"],episode:["showPlay","showPlayVersion","showQueue","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showSync","showOptimize","showDownload","showDelete","showDeleteVersion","showGetInfo","showSelect"],
artist:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],album:["showPlay","showShuffle","showQueue","showAddToPlaylist","showEdit","showRefresh","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],track:["showPlay","showQueue","showPlayPlexMix","showPlayMusicVideo","showAddToPlaylist","showEdit","showAnalyze","showSync","showDownload","showDelete","showGetInfo","showSelect"],
photoAlbum:["showPlay","showShuffle","showAddToPlaylist","showEdit","showSync","showSelect"],photo:["showPlay","showAddToPlaylist","showEdit","showAnalyze","showSync","showDownload","showDelete","showGetInfo","showSelect"],clip:["showPlay","showPlayVersion","showWatchLater","showShare","showRecommend","showGetInfo","showSelect"],playlist:["showDelete","showEdit","showPlay","showQueue","showShuffle","showSync","showSelect"]};e.exports=t.default},function(e,t){"use strict";e.exports={sliderTrackWidth:"60px",
sliderThumbSize:"12px",tooltipArrowSize:"6px",sidebarWidth:"240px",searchHubTitleHeight:"18px",searchResulWidth:"346px",searchResultHeight:"50px",posterTitlePadding:"10px",posterTitleHeight:"20px",posterCenterCircleSize:"42px",posterBadgeHeight:"24px",posterHoverSlideDistance:"10px",pageHeaderHeight:"60px",breakpointExtraSmall:"480px",breakpointSmall:"768px",breakpointMedium:"992px",breakpointLarge:"1200px"}},function(e,t,n){"use strict";var i=n(566).default;t.default=function(e){if(Array.isArray(e)){
for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return i(e)},t.__esModule=!0},function(e,t,n){var i=n(347);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},,,,,function(e,t,n){var i=n(85),r=n(576);e.exports=n(1489)?function(e,t,n){return i.setDesc(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},,function(e,t,n){var i=n(574),r=n(343);e.exports=function(e){return i(r(e));
}},,function(e,t,n){"use strict";var i=n(1502)(!0);n(575)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";function i(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){if(2!==arguments.length)throw new o("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){
var i=n.inverse||function(){},r=n.fn;return h(t)&&(t=t.call(this)),t===!0?r(this):t===!1||null==t?i(this):d(t)?t.length>0?e.helpers.each(t,n):i(this):r(t)}),e.registerHelper("each",function(e,t){var n,i=t.fn,r=t.inverse,a=0,s="";if(h(e)&&(e=e.call(this)),t.data&&(n=v(t.data)),e&&"object"==typeof e)if(d(e))for(var o=e.length;a<o;a++)n&&(n.index=a,n.first=0===a,n.last=a===e.length-1),s+=i(e[a],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=a,n.first=0===a),s+=i(e[l],{data:n
}),a++);return 0===a&&(s=r(this)),s}),e.registerHelper("if",function(e,t){return h(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||s.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){if(h(e)&&(e=e.call(this)),!s.isEmpty(e))return t.fn(e)}),e.registerHelper("log",function(t,n){var i=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(i,t)})}function a(e,t){
m.log(e,t)}var s=n(354),o=n(353).default,l="1.3.0";t.VERSION=l;var u=4;t.COMPILER_REVISION=u;var c={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};t.REVISION_CHANGES=c;var d=s.isArray,h=s.isFunction,p=s.toString,f="[object Object]";t.HandlebarsEnvironment=i,i.prototype={constructor:i,logger:m,log:a,registerHelper:function(e,t,n){if(p.call(e)===f){if(n||t)throw new o("Arg not supported with multiple helpers");s.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){
p.call(e)===f?s.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};t.logger=m,t.log=a;var v=function(e){var t={};return s.extend(t,e),t};t.createFrame=v},function(e,t){"use strict";function n(e,t){var n;t&&t.firstLine&&(n=t.firstLine,e+=" - "+n+":"+t.firstColumn);for(var r=Error.prototype.constructor.call(this,e),a=0;a<i.length;a++)this[i[a]]=r[i[a]];
n&&(this.lineNumber=n,this.column=t.firstColumn)}var i=["description","fileName","lineNumber","message","name","number","stack"];n.prototype=new Error,t.default=n},function(e,t,n){"use strict";function i(e){return l[e]||"&amp;"}function r(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function a(e){return e instanceof o?e.toString():e||0===e?(e=""+e,c.test(e)?e.replace(u,i):e):""}function s(e){return!e&&0!==e||!(!p(e)||0!==e.length)}var o=n(591).default,l={"&":"&amp;",
"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},u=/[&<>"'`]/g,c=/[&<>"'`]/;t.extend=r;var d=Object.prototype.toString;t.toString=d;var h=function(e){return"function"==typeof e};h(/x/)&&(h=function(e){return"function"==typeof e&&"[object Function]"===d.call(e)});var h;t.isFunction=h;var p=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===d.call(e)};t.isArray=p,t.escapeExpression=a,t.isEmpty=s},function(e,t,n){function i(e){if(!s(e)||h.call(e)!=o||a(e))return!1;
var t=r(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==d}var r=n(1931),a=n(1932),s=n(1933),o="[object Object]",l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=u.call(Object),h=l.toString;e.exports=i},function(e,t,n){"use strict";function i(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function r(e,t,n){c.insertTreeBefore(e,t,n)}function a(e,t,n){Array.isArray(t)?o(e,t[0],t[1],n):v(e,t,n);
}function s(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],l(e,t,n),e.removeChild(n)}e.removeChild(t)}function o(e,t,n,i){for(var r=t;;){var a=r.nextSibling;if(v(e,r,i),r===n)break;r=a}}function l(e,t,n){for(;;){var i=t.nextSibling;if(i===n)break;e.removeChild(i)}}function u(e,t,n){var i=e.parentNode,r=e.nextSibling;r===t?n&&v(i,document.createTextNode(n),r):n?(m(r,n),l(i,r,t)):l(i,e,t)}var c=n(163),d=n(1949),h=n(612),p=(n(57),n(80),n(365)),f=n(371),m=n(629),v=p(function(e,t,n){e.insertBefore(t,n)}),g=d.dangerouslyReplaceNodeWithMarkup,y={
dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:u,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var o=t[n];switch(o.type){case h.INSERT_MARKUP:r(e,o.content,i(e,o.afterNode));break;case h.MOVE_EXISTING:a(e,o.fromNode,i(e,o.afterNode));break;case h.SET_MARKUP:f(e,o.content);break;case h.TEXT_CONTENT:m(e,o.content);break;case h.REMOVE_NODE:s(e,o.fromNode)}}}};e.exports=y},function(e,t,n){"use strict";function i(e){return!!u.hasOwnProperty(e)||!l.hasOwnProperty(e)&&(o.test(e)?(u[e]=!0,
!0):(l[e]=!0,!1))}function r(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var a=n(138),s=(n(57),n(1967),n(80),n(2007)),o=(n(42),new RegExp("^["+a.ATTRIBUTE_NAME_START_CHAR+"]["+a.ATTRIBUTE_NAME_CHAR+"]*$")),l={},u={},c={createMarkupForID:function(e){return a.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(a.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return a.ROOT_ATTRIBUTE_NAME+'=""';
},setAttributeForRoot:function(e){e.setAttribute(a.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(n){if(r(n,t))return"";var i=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?i+'=""':i+"="+s(t)}return a.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return i(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var i=a.properties.hasOwnProperty(t)?a.properties[t]:null;
if(i){var s=i.mutationMethod;if(s)s(e,n);else{if(r(i,n))return void this.deleteValueForProperty(e,t);if(i.mustUseProperty){var o=i.propertyName;i.hasSideEffects&&""+e[o]==""+n||(e[o]=n)}else{var l=i.attributeName,u=i.attributeNamespace;u?e.setAttributeNS(u,l,""+n):i.hasBooleanValue||i.hasOverloadedBooleanValue&&n===!0?e.setAttribute(l,""):e.setAttribute(l,""+n)}}}else if(a.isCustomAttribute(t))return void c.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){if(i(t)){null==n?e.removeAttribute(t):e.setAttribute(t,""+n);
}},deleteValueForProperty:function(e,t){var n=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(n){var i=n.mutationMethod;if(i)i(e,void 0);else if(n.mustUseProperty){var r=n.propertyName;n.hasBooleanValue?e[r]=!1:n.hasSideEffects&&""+e[r]==""||(e[r]="")}else e.removeAttribute(n.attributeName)}else a.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=c},function(e,t,n){"use strict";function i(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function r(e){return e===y.topMouseMove||e===y.topTouchMove;
}function a(e){return e===y.topMouseDown||e===y.topTouchStart}function s(e,t,n,i){var r=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(i),t?m.invokeGuardedCallbackWithCatch(r,n,e):m.invokeGuardedCallback(r,n,e),e.currentTarget=null}function o(e,t){var n=e._dispatchListeners,i=e._dispatchInstances;if(Array.isArray(n))for(var r=0;r<n.length&&!e.isPropagationStopped();r++)s(e,t,n[r],i[r]);else n&&s(e,t,n,i);e._dispatchListeners=null,e._dispatchInstances=null}function l(e){var t=e._dispatchListeners,n=e._dispatchInstances;
if(Array.isArray(t)){for(var i=0;i<t.length&&!e.isPropagationStopped();i++)if(t[i](e,n[i]))return n[i]}else if(t&&t(e,n))return n;return null}function u(e){var t=l(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?v(!1):void 0,e.currentTarget=t?b.getNodeFromInstance(n):null;var i=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,i}function d(e){return!!e._dispatchListeners;
}var h,p,f=n(99),m=n(362),v=n(32),g=(n(42),{injectComponentTree:function(e){h=e},injectTreeTraversal:function(e){p=e}}),y=f.topLevelTypes,b={isEndish:i,isMoveish:r,isStartish:a,executeDirectDispatch:c,executeDispatchesInOrder:o,executeDispatchesInOrderStopAtTrue:u,hasDispatches:d,getInstanceFromNode:function(e){return h.getInstanceFromNode(e)},getNodeFromInstance:function(e){return h.getNodeFromInstance(e)},isAncestor:function(e,t){return p.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return p.getLowestCommonAncestor(e,t);
},getParentInstance:function(e){return p.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return p.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,i,r){return p.traverseEnterLeave(e,t,n,i,r)},injection:g};e.exports=b},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},i=(""+e).replace(t,function(e){return n[e]});return"$"+i}function i(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},i="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+i).replace(t,function(e){
return n[e]})}var r={escape:n,unescape:i};e.exports=r},function(e,t,n){"use strict";function i(e){null!=e.checkedLink&&null!=e.valueLink?u(!1):void 0}function r(e){i(e),null!=e.value||null!=e.onChange?u(!1):void 0}function a(e){i(e),null!=e.checked||null!=e.onChange?u(!1):void 0}function s(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var o=n(616),l=n(253),u=n(32),c=(n(42),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),d={value:function(e,t,n){
return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.");
},onChange:o.func},h={},p={checkPropTypes:function(e,t,n){for(var i in d){if(d.hasOwnProperty(i))var r=d[i](t,i,e,l.prop);if(r instanceof Error&&!(r.message in h)){h[r.message]=!0;s(n)}}},getValue:function(e){return e.valueLink?(r(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(r(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0;
}};e.exports=p},function(e,t,n){"use strict";var i=n(32),r=!1,a={unmountIDFromEnvironment:null,replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){r?i(!1):void 0,a.unmountIDFromEnvironment=e.unmountIDFromEnvironment,a.replaceNodeWithMarkup=e.replaceNodeWithMarkup,a.processChildrenUpdates=e.processChildrenUpdates,r=!0}}};e.exports=a},function(e,t,n){"use strict";function i(e,t,n,i){try{return t(n,i)}catch(a){return void(null===r&&(r=a))}}var r=null,a={invokeGuardedCallback:i,
invokeGuardedCallbackWithCatch:i,rethrowCaughtError:function(){if(r){var e=r;throw r=null,e}}};e.exports=a},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";var i=!1;e.exports=i},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,i,r){
MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,r)})}:e};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var i=r[e];return!!i&&!!n[i]}function i(e){return n}var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=i},function(e,t){"use strict";
function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(i&&e[i]||e[r]);if("function"==typeof t)return t}var i="function"==typeof Symbol&&Symbol.iterator,r="@@iterator";e.exports=n},function(e,t,n){"use strict";/**
	 * Checks if an event is supported in the current execution environment.
	 *
	 * NOTE: This will not work correctly for non-generic events such as `change`,
	 * `reset`, `load`, `error`, and `select`.
	 *
	 * Borrows from Modernizr.
	 *
	 * @param {string} eventNameSuffix Event name, e.g. "click".
	 * @param {?boolean} capture Check if the capture phase is supported.
	 * @return {boolean} True if the event is supported.
	 * @internal
	 * @license Modernizr 3.0.0pre (Custom Build) | MIT
	 */
function i(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i="function"==typeof s[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,a=n(63);a.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=i},function(e,t,n){"use strict";var i=n(63),r=/^[ \r\n\t\f]/,a=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(365),o=s(function(e,t){
e.innerHTML=t});if(i.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(o=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),r.test(t)||"<"===t[0]&&a.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=o},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,i=null===t||t===!1;if(n||i)return n===i;var r=typeof e,a=typeof t;return"string"===r||"number"===r?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key;
}e.exports=n},function(e,t,n){"use strict";function i(e,t){return e&&"object"==typeof e&&null!=e.key?u.escape(e.key):t.toString(36)}function r(e,t,n,a){var h=typeof e;if("undefined"!==h&&"boolean"!==h||(e=null),null===e||"string"===h||"number"===h||s.isValidElement(e))return n(a,e,""===t?c+i(e,0):t),1;var p,f,m=0,v=""===t?c:t+d;if(Array.isArray(e))for(var g=0;g<e.length;g++)p=e[g],f=v+i(p,g),m+=r(p,f,n,a);else{var y=o(e);if(y){var b,w=y.call(e);if(y!==e.entries)for(var S=0;!(b=w.next()).done;)p=b.value,
f=v+i(p,S++),m+=r(p,f,n,a);else for(;!(b=w.next()).done;){var P=b.value;P&&(p=P[1],f=v+u.escape(P[0])+d+i(p,0),m+=r(p,f,n,a))}}else if("object"===h){String(e);l(!1)}}return m}function a(e,t,n){return null==e?0:r(e,"",t,n)}var s=(n(123),n(86)),o=n(369),l=n(32),u=n(359),c=(n(42),"."),d=":";e.exports=a},function(e,t,n){"use strict";var i=(n(51),n(79)),r=(n(42),i);e.exports=r},,,function(e,t){!function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n<t.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[t[n]+"RequestAnimationFrame"],
window.cancelAnimationFrame=window[t[n]+"CancelAnimationFrame"]||window[t[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,n){var i=(new Date).getTime(),r=Math.max(0,16-(i-e)),a=window.setTimeout(function(){t(i+r)},r);return e=i+r,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}()},function(e,t,n){var i,r,i,a,i,s,o;(function(l){!function(a,s){i=s,!(r="function"==typeof i?i.call(t,n,t,e):i)}(this,function(){
var e=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){if(e=i(String(e||"").toLowerCase()),!e||!e.length)return[];var t,n,a,o,l=[],u=e.split(/ +/);for(t=0,n=u.length;t<n;t++){if(a=r(u[t]),this.settings.diacritics)for(o in s)s.hasOwnProperty(o)&&(a=a.replace(new RegExp(o,"g"),s[o]));l.push({string:u[t],regex:new RegExp(a,"i")})}return l},e.prototype.iterator=function(e,t){var n;n=a(e)?Array.prototype.forEach||function(e){for(var t=0,n=this.length;t<n;t++)e(this[t],t,this);
}:function(e){for(var t in this)this.hasOwnProperty(t)&&e(this[t],t,this)},n.apply(e,[t])},e.prototype.getScoreFunction=function(e,t){var n,i,r,a;n=this,e=n.prepareSearch(e,t),r=e.tokens,i=e.options.fields,a=r.length;var s=function(e,t){var n,i;return e?(e=String(e||""),i=e.search(t.regex),i===-1?0:(n=t.string.length/e.length,0===i&&(n+=.5),n)):0},o=function(){var e=i.length;return e?1===e?function(e,t){return s(t[i[0]],e)}:function(t,n){for(var r=0,a=0;r<e;r++)a+=s(n[i[r]],t);return a/e}:function(){
return 0}}();return a?1===a?function(e){return o(r[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,i=0;n<a;n++){if(t=o(r[n],e),t<=0)return 0;i+=t}return i/a}:function(e){for(var t=0,n=0;t<a;t++)n+=o(r[t],e);return n/a}:function(){return 0}},e.prototype.getSortFunction=function(e,n){var i,r,a,s,o,l,u,c,d,h,p;if(a=this,e=a.prepareSearch(e,n),p=!e.query&&n.sort_empty||n.sort,d=function(e,t){return"$score"===e?t.score:a.items[t.id][e]},o=[],p)for(i=0,r=p.length;i<r;i++)(e.query||"$score"!==p[i].field)&&o.push(p[i]);
if(e.query){for(h=!0,i=0,r=o.length;i<r;i++)if("$score"===o[i].field){h=!1;break}h&&o.unshift({field:"$score",direction:"desc"})}else for(i=0,r=o.length;i<r;i++)if("$score"===o[i].field){o.splice(i,1);break}for(c=[],i=0,r=o.length;i<r;i++)c.push("desc"===o[i].direction?-1:1);return l=o.length,l?1===l?(s=o[0].field,u=c[0],function(e,n){return u*t(d(s,e),d(s,n))}):function(e,n){var i,r,a;for(i=0;i<l;i++)if(a=o[i].field,r=c[i]*t(d(a,e),d(a,n)))return r;return 0}:null},e.prototype.prepareSearch=function(e,t){
if("object"==typeof e)return e;t=n({},t);var i=t.fields,r=t.sort,s=t.sort_empty;return i&&!a(i)&&(t.fields=[i]),r&&!a(r)&&(t.sort=[r]),s&&!a(s)&&(t.sort_empty=[s]),{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}},e.prototype.search=function(e,t){var n,i,r,a,s=this;return i=this.prepareSearch(e,t),t=i.options,e=i.query,a=t.score||s.getScoreFunction(i),e.length?s.iterator(s.items,function(e,r){n=a(e),(t.filter===!1||n>0)&&i.items.push({score:n,id:r})}):s.iterator(s.items,function(e,t){
i.items.push({score:1,id:t})}),r=s.getSortFunction(i,t),r&&i.items.sort(r),i.total=i.items.length,"number"==typeof t.limit&&(i.items=i.items.slice(0,t.limit)),i};var t=function(e,t){return"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=o(String(e||"")),t=o(String(t||"")),e>t?1:t>e?-1:0)},n=function(e,t){var n,i,r,a;for(n=1,i=arguments.length;n<i;n++)if(a=arguments[n])for(r in a)a.hasOwnProperty(r)&&(e[r]=a[r]);return e},i=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},r=function(e){
return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},a=Array.isArray||l&&l.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s={a:"[a\xc0\xc1\xc2\xc3\xc4\xc5\xe0\xe1\xe2\xe3\xe4\xe5\u0100\u0101\u0105\u0104]",c:"[c\xc7\xe7\u0107\u0106\u010d\u010c]",d:"[d\u0111\u0110\u010f\u010e]",e:"[e\xc8\xc9\xca\xcb\xe8\xe9\xea\xeb\u011b\u011a\u0112\u0113\u0119\u0118]",i:"[i\xcc\xcd\xce\xcf\xec\xed\xee\xef\u012a\u012b]",l:"[l\u0142\u0141]",n:"[n\xd1\xf1\u0148\u0147\u0144\u0143]",
o:"[o\xd2\xd3\xd4\xd5\xd5\xd6\xd8\xf2\xf3\xf4\xf5\xf6\xf8\u014c\u014d]",r:"[r\u0159\u0158]",s:"[s\u0160\u0161\u015b\u015a]",t:"[t\u0165\u0164]",u:"[u\xd9\xda\xdb\xdc\xf9\xfa\xfb\xfc\u016f\u016e\u016a\u016b]",y:"[y\u0178\xff\xfd\xdd]",z:"[z\u017d\u017e\u017c\u017b\u017a\u0179]"},o=function(){var e,t,n,i,r="",a={};for(n in s)if(s.hasOwnProperty(n))for(i=s[n].substring(2,s[n].length-1),r+=i,e=0,t=i.length;e<t;e++)a[i.charAt(e)]=n;var o=new RegExp("["+r+"]","g");return function(e){return e.replace(o,function(e){
return a[e]}).toLowerCase()}}();return e}),function(r,s){i=s,!(a="function"==typeof i?i.call(t,n,t,e):i)}(this,function(){var e={};e.mixin=function(e){e.plugins={},e.prototype.initializePlugins=function(e){var n,i,r,a=this,s=[];if(a.plugins={names:[],settings:{},requested:{},loaded:{}},t.isArray(e))for(n=0,i=e.length;n<i;n++)"string"==typeof e[n]?s.push(e[n]):(a.plugins.settings[e[n].name]=e[n].options,s.push(e[n].name));else if(e)for(r in e)e.hasOwnProperty(r)&&(a.plugins.settings[r]=e[r],s.push(r));
for(;s.length;)a.require(s.shift())},e.prototype.loadPlugin=function(t){var n=this,i=n.plugins,r=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');i.requested[t]=!0,i.loaded[t]=r.fn.apply(n,[n.plugins.settings[t]||{}]),i.names.push(t)},e.prototype.require=function(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]},e.define=function(t,n){
e.plugins[t]={name:t,fn:n}}};var t={isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}};return e}),function(l,u){s=[n(5),r,a],i=u,o="function"==typeof i?i.apply(t,s):i,!(void 0!==o&&(e.exports=o))}(this,function(e,t,n){"use strict";var i=function(e,t){if("string"!=typeof t||t.length){var n="string"==typeof t?new RegExp(t,"i"):t,i=function(e){var t=0;if(3===e.nodeType){var r=e.data.search(n);if(r>=0&&e.data.length>0){var a=e.data.match(n),s=document.createElement("span");
s.className="highlight";var o=e.splitText(r),l=(o.splitText(a[0].length),o.cloneNode(!0));s.appendChild(l),o.parentNode.replaceChild(s,o),t=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName))for(var u=0;u<e.childNodes.length;++u)u+=i(e.childNodes[u]);return t};return e.each(function(){i(this)})}},r=function(){};r.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[e]:(this._events=this._events||{},
void(e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)))},trigger:function(e){if(this._events=this._events||{},e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},r.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=r.prototype[t[n]]};var a=/Mac/.test(navigator.userAgent),s=65,o=13,l=27,u=37,c=38,d=80,h=39,p=40,f=78,m=8,v=46,g=16,y=a?91:17,b=a?18:17,w=9,S=1,P=2,x=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("form").validity,C=function(e){
return"undefined"!=typeof e},T=function(e){return"undefined"==typeof e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},_=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},E=function(e){return(e+"").replace(/\$/g,"$$$$")},k={};k.before=function(e,t,n){var i=e[t];e[t]=function(){return n.apply(e,arguments),i.apply(e,arguments)}},k.after=function(e,t,n){var i=e[t];e[t]=function(){var t=i.apply(e,arguments);return n.apply(e,arguments),
t}};var I=function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},A=function(e,t){var n;return function(){var i=this,r=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(i,r)},t)}},M=function(e,t,n){var i,r=e.trigger,a={};e.trigger=function(){var n=arguments[0];return t.indexOf(n)===-1?r.apply(e,arguments):void(a[n]=arguments)},n.apply(e,[]),e.trigger=r;for(i in a)a.hasOwnProperty(i)&&r.apply(e,a[i])},D=function(e,t,n,i){e.on(t,n,function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode;
return t.currentTarget=n,i.apply(this,[t])})},R=function(e){var t={};if("selectionStart"in e)t.start=e.selectionStart,t.length=e.selectionEnd-t.start;else if(document.selection){e.focus();var n=document.selection.createRange(),i=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t.start=n.text.length-i,t.length=i}return t},O=function(e,t,n){var i,r,a={};if(n)for(i=0,r=n.length;i<r;i++)a[n[i]]=e.css(n[i]);else a=e.css();t.css(a)},L=function(t,n){if(!t)return 0;var i=e("<test>").css({
position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).appendTo("body");O(n,i,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var r=i.width();return i.remove(),r},N=function(e){var t=null,n=function(n,i){var r,a,s,o,l,u,c,d;n=n||window.event||{},i=i||{},n.metaKey||n.altKey||(i.force||e.data("grow")!==!1)&&(r=e.val(),n.type&&"keydown"===n.type.toLowerCase()&&(a=n.keyCode,s=a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||32===a,a===v||a===m?(d=R(e[0]),
d.length?r=r.substring(0,d.start)+r.substring(d.start+d.length):a===m&&d.start?r=r.substring(0,d.start-1)+r.substring(d.start+1):a===v&&"undefined"!=typeof d.start&&(r=r.substring(0,d.start)+r.substring(d.start+1))):s&&(u=n.shiftKey,c=String.fromCharCode(n.keyCode),c=u?c.toUpperCase():c.toLowerCase(),r+=c)),o=e.attr("placeholder"),!r&&o&&(r=o),l=L(r,e)+4,l!==t&&(t=l,e.width(l),e.triggerHandler("resize")))};e.on("keydown keyup update blur",n),n()},U=function(n,i){var r,a,s,o,l=this;o=n[0],o.selectize=l;
var u=window.getComputedStyle&&window.getComputedStyle(o,null);if(s=u?u.getPropertyValue("direction"):o.currentStyle&&o.currentStyle.direction,s=s||n.parents("[dir]:first").attr("dir")||"",e.extend(l,{order:0,settings:i,$input:n,tabIndex:n.attr("tabindex")||"",tagType:"select"===o.tagName.toLowerCase()?S:P,rtl:/rtl/i.test(s),eventNS:".selectize"+ ++U.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:n.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,
isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===i.loadThrottle?l.onSearchChange:A(l.onSearchChange,i.loadThrottle)}),l.sifter=new t(this.options,{diacritics:i.diacritics}),l.settings.options){for(r=0,a=l.settings.options.length;r<a;r++)l.registerOption(l.settings.options[r]);
delete l.settings.options}if(l.settings.optgroups){for(r=0,a=l.settings.optgroups.length;r<a;r++)l.registerOptionGroup(l.settings.optgroups[r]);delete l.settings.optgroups}l.settings.mode=l.settings.mode||(1===l.settings.maxItems?"single":"multi"),"boolean"!=typeof l.settings.hideSelected&&(l.settings.hideSelected="multi"===l.settings.mode),l.initializePlugins(l.settings.plugins),l.setupCallbacks(),l.setupTemplates(),l.setup()};return r.mixin(U),n.mixin(U),e.extend(U.prototype,{setup:function(){var t,n,i,r,s,o,l,u,c,d=this,h=d.settings,p=d.eventNS,f=e(window),m=e(document),v=d.$input;
if(l=d.settings.mode,u=v.attr("class")||"",t=e("<div>").addClass(h.wrapperClass).addClass(u).addClass(l),n=e("<div>").addClass(h.inputClass).addClass("items").appendTo(t),i=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",v.is(":disabled")?"-1":d.tabIndex),o=e(h.dropdownParent||t),r=e("<div>").addClass(h.dropdownClass).addClass(l).hide().appendTo(o),s=e("<div>").addClass(h.dropdownContentClass).appendTo(r),d.settings.copyClassesToDropdown&&r.addClass(u),t.css({width:v[0].style.width
}),d.plugins.names.length&&(c="plugin-"+d.plugins.names.join(" plugin-"),t.addClass(c),r.addClass(c)),(null===h.maxItems||h.maxItems>1)&&d.tagType===S&&v.attr("multiple","multiple"),d.settings.placeholder&&i.attr("placeholder",h.placeholder),!d.settings.splitOn&&d.settings.delimiter){var w=d.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");d.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}v.attr("autocorrect")&&i.attr("autocorrect",v.attr("autocorrect")),v.attr("autocapitalize")&&i.attr("autocapitalize",v.attr("autocapitalize")),
d.$wrapper=t,d.$control=n,d.$control_input=i,d.$dropdown=r,d.$dropdown_content=s,r.on("mouseenter","[data-selectable]",function(){return d.onOptionHover.apply(d,arguments)}),r.on("mousedown click","[data-selectable]",function(){return d.onOptionSelect.apply(d,arguments)}),D(n,"mousedown","*:not(input)",function(){return d.onItemSelect.apply(d,arguments)}),d.settings.manualInputWidth||N(i),n.on({mousedown:function(){return d.onMouseDown.apply(d,arguments)},click:function(){return d.onClick.apply(d,arguments);
}}),i.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return d.onKeyDown.apply(d,arguments)},keyup:function(){return d.onKeyUp.apply(d,arguments)},keypress:function(){return d.onKeyPress.apply(d,arguments)},resize:function(){d.positionDropdown.apply(d,[])},blur:function(){return d.onBlur.apply(d,arguments)},focus:function(){return d.ignoreBlur=!1,d.onFocus.apply(d,arguments)},paste:function(){return d.onPaste.apply(d,arguments)}}),v.parents().last().find('label[for="'+v.attr("id")+'"]').on("click",function(){
d.onClick.apply(d,arguments)}),m.on("keydown"+p,function(e){d.isCmdDown=e[a?"metaKey":"ctrlKey"],d.isCtrlDown=e[a?"altKey":"ctrlKey"],d.isShiftDown=e.shiftKey}),m.on("keyup"+p,function(e){e.keyCode===b&&(d.isCtrlDown=!1),e.keyCode===g&&(d.isShiftDown=!1),e.keyCode===y&&(d.isCmdDown=!1)}),m.on("mousedown"+p,function(e){if(d.isFocused){if(e.target===d.$dropdown[0]||e.target.parentNode===d.$dropdown[0])return!1;d.$control.has(e.target).length||e.target===d.$control[0]||d.blur(e.target)}}),f.on(["scroll"+p,"resize"+p].join(" "),function(){
d.isOpen&&d.positionDropdown.apply(d,arguments)}),f.on("mousemove"+p,function(){d.ignoreHover=!1}),this.revertSettings={$children:v.children().detach(),tabindex:v.attr("tabindex")},v.attr("tabindex",-1).hide().after(d.$wrapper),e.isArray(h.items)&&(d.setValue(h.items),delete h.items),x&&v.on("invalid"+p,function(e){e.preventDefault(),d.isInvalid=!0,d.refreshState()}),d.updateOriginalInput(),d.refreshItems(),d.refreshState(),d.updatePlaceholder(),d.isSetup=!0,v.is(":disabled")&&d.disable(),d.on("change",this.onChange),
v.data("selectize",d),v.addClass("selectized"),d.trigger("initialize"),h.preload===!0&&d.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,i=t.settings.optgroupLabelField,r={optgroup:function(e){return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[i])+"</div>"},option:function(e,t){return'<div class="option">'+t(e[n])+"</div>"},item:function(e,t){return'<div class="item">'+t(e[n])+"</div>"},option_create:function(e,t){
return'<div class="create">Add <strong>'+t(e.input)+"</strong>&hellip;</div>"}};t.settings.render=e.extend({},r,t.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",
type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in n)n.hasOwnProperty(e)&&(t=this.settings[n[e]],t&&this.on(e,t))},onClick:function(e){var t=this;t.isFocused||(t.focus(),e.preventDefault())},onMouseDown:function(t){var n=this,i=t.isDefaultPrevented();e(t.target);if(n.isFocused){if(t.target!==n.$control_input[0])return"single"===n.settings.mode&&t.target!==n.$control[0]?n.isOpen?n.close():n.open():i||n.setActiveItem(null),!1}else i||window.setTimeout(function(){n.focus()},0)},onChange:function(){
this.$input.trigger("change")},onPaste:function(t){var n=this;n.isFull()||n.isInputHidden||n.isLocked?t.preventDefault():n.settings.splitOn&&setTimeout(function(){for(var t=e.trim(n.$control_input.val()||"").split(n.settings.splitOn),i=0,r=t.length;i<r;i++)n.createItem(t[i])},0)},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var t=String.fromCharCode(e.keyCode||e.which);return this.settings.create&&"multi"===this.settings.mode&&t===this.settings.delimiter?(this.createItem(),
e.preventDefault(),!1):void 0},onKeyDown:function(e){var t=(e.target===this.$control_input[0],this);if(t.isLocked)return void(e.keyCode!==w&&e.preventDefault());switch(e.keyCode){case s:if(t.isCmdDown)return void t.selectAll();break;case l:return void(t.isOpen&&(e.preventDefault(),e.stopPropagation(),t.close()));case f:if(!e.ctrlKey||e.altKey)break;case p:if(!t.isOpen&&t.hasOptions)t.open();else if(t.$activeOption){t.ignoreHover=!0;var n=t.getAdjacentOption(t.$activeOption,1);n.length&&t.setActiveOption(n,!0,!0);
}return void e.preventDefault();case d:if(!e.ctrlKey||e.altKey)break;case c:if(t.$activeOption){t.ignoreHover=!0;var i=t.getAdjacentOption(t.$activeOption,-1);i.length&&t.setActiveOption(i,!0,!0)}return void e.preventDefault();case o:return void(t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),e.preventDefault()));case u:return void t.advanceSelection(-1,e);case h:return void t.advanceSelection(1,e);case w:return void(t.settings.selectOnTab&&t.isOpen&&t.$activeOption?(t.onOptionSelect({
currentTarget:t.$activeOption}),t.settings.allowCreateEmpty&&1===t.settings.maxItems||t.isFull()||e.preventDefault()):t.settings.create&&t.createItem()&&e.preventDefault());case m:return void t.deleteSelection(e,!0);case v:return void t.deleteSelection(e)}return!t.isFull()&&!t.isInputHidden||(a?e.metaKey:e.ctrlKey)?void 0:void e.preventDefault()},onKeyUp:function(e){var t=this;if(t.isLocked)return e&&e.preventDefault();var n=t.$control_input.val()||"";t.lastValue!==n&&(t.lastValue=n,t.onSearchChange(n),
t.refreshOptions(),t.trigger("type",n))},onSearchChange:function(e){var t=this,n=t.settings.load;n&&(t.loadedSearches.hasOwnProperty(e)||(t.loadedSearches[e]=!0,t.load(function(i){n.apply(t,[e,i])})))},onFocus:function(e){var t=this,n=t.isFocused;return t.isDisabled?(t.blur(),e&&e.preventDefault(),!1):void(t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.onSearchChange(""),n||t.trigger("focus"),t.$activeItems.length||(t.showInput(),t.setActiveItem(null),t.refreshOptions(!!t.settings.openOnFocus)),
t.refreshState()))},onBlur:function(e,t){var n=this;if(n.isFocused&&(n.isFocused=!1,!n.ignoreFocus))return n.ignoreBlur||document.activeElement!==n.$dropdown_content[0]?void setTimeout(function(){var e=function(){n.close(),n.setTextboxValue(""),n.setActiveItem(null),n.setActiveOption(null),n.setCaret(n.items.length),n.refreshState(),(t||document.body).focus(),n.ignoreFocus=!1,n.trigger("blur")};n.ignoreFocus=!0,n.settings.selectOnBlur&&n.$activeOption&&1===n.$activeOption.not(".create").length?(n.addItem(n.$activeOption.not(".create").data("value")),
e()):n.settings.create&&n.settings.createOnBlur?n.createItem(null,!1,e):e()}):(n.ignoreBlur=!0,void n.onFocus(e))},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(t){var n,i,r=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),i=e(t.currentTarget),i.hasClass("create")?r.createItem(null,function(){r.settings.closeAfterSelect&&r.close()}):(n=i.attr("data-value"),"undefined"!=typeof n&&(r.lastQuery=null,r.setTextboxValue(""),
r.addItem(n),r.settings.closeAfterSelect?r.close():!r.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&r.setActiveOption(r.getOption(n))))},onItemSelect:function(e){var t=this;t.isLocked||"multi"===t.settings.mode&&(e.preventDefault(),t.setActiveItem(e.currentTarget,e))},load:function(e){var t=this,n=t.$wrapper.addClass(t.settings.loadingClass);t.loading++,e.apply(t,[function(e){t.loading=Math.max(t.loading-1,0),e&&e.length&&(t.addOption(e),t.refreshOptions(t.isFocused&&!t.isInputHidden)),t.loading||n.removeClass(t.settings.loadingClass),
t.trigger("load",e)}])},setTextboxValue:function(e){var t=this.$control_input,n=t.val()!==e;n&&(t.val(e).triggerHandler("update"),this.lastValue=e)},getValue:function(){return this.tagType===S&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){var n=t?[]:["change"];M(this,n,function(){this.clear(t),this.addItems(e,t)})},setActiveItem:function(t,n){var i,r,a,s,o,l,u,c,d=this;if("single"!==d.settings.mode){if(t=e(t),!t.length)return e(d.$activeItems).removeClass("active"),
d.$activeItems=[],void(d.isFocused&&d.showInput());if(i=n&&n.type.toLowerCase(),"mousedown"===i&&d.isShiftDown&&d.$activeItems.length){for(c=d.$control.children(".active:last"),s=Array.prototype.indexOf.apply(d.$control[0].childNodes,[c[0]]),o=Array.prototype.indexOf.apply(d.$control[0].childNodes,[t[0]]),s>o&&(u=s,s=o,o=u),r=s;r<=o;r++)l=d.$control[0].childNodes[r],d.$activeItems.indexOf(l)===-1&&(e(l).addClass("active"),d.$activeItems.push(l));n.preventDefault()}else"mousedown"===i&&d.isCtrlDown||"keydown"===i&&this.isShiftDown?t.hasClass("active")?(a=d.$activeItems.indexOf(t[0]),
d.$activeItems.splice(a,1),t.removeClass("active")):d.$activeItems.push(t.addClass("active")[0]):(e(d.$activeItems).removeClass("active"),d.$activeItems=[t.addClass("active")[0]]);d.hideInput(),this.isFocused||d.focus()}},setActiveOption:function(t,n,i){var r,a,s,o,l,u=this;u.$activeOption&&u.$activeOption.removeClass("active"),u.$activeOption=null,t=e(t),t.length&&(u.$activeOption=t.addClass("active"),!n&&C(n)||(r=u.$dropdown_content.height(),a=u.$activeOption.outerHeight(!0),n=u.$dropdown_content.scrollTop()||0,
s=u.$activeOption.offset().top-u.$dropdown_content.offset().top+n,o=s,l=s-r+a,s+a>r+n?u.$dropdown_content.stop().animate({scrollTop:l},i?u.settings.scrollDuration:0):s<n&&u.$dropdown_content.stop().animate({scrollTop:o},i?u.settings.scrollDuration:0)))},selectAll:function(){var e=this;"single"!==e.settings.mode&&(e.$activeItems=Array.prototype.slice.apply(e.$control.children(":not(input)").addClass("active")),e.$activeItems.length&&(e.hideInput(),e.close()),e.focus())},hideInput:function(){this.setTextboxValue(""),
this.$control_input.css({opacity:0}),this.settings.manualInputWidth||this.$control_input.css({position:"absolute",left:this.rtl?1e4:-1e4}),this.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1}),this.settings.manualInputWidth||this.$control_input.css({position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var e=this;e.isDisabled||(e.ignoreFocus=!0,e.$control_input[0].focus(),window.setTimeout(function(){e.ignoreFocus=!1,e.onFocus()},0))},blur:function(e){this.$control_input[0].blur(),
this.onBlur(null,e)},getScoreFunction:function(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())},getSearchOptions:function(){var e=this.settings,t=e.sortField;return"string"==typeof t&&(t=[{field:t}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t}},search:function(t){var n,i,r,a=this,s=a.settings,o=this.getSearchOptions();if(s.score&&(r=a.settings.score.apply(this,[t]),"function"!=typeof r))throw new Error('Selectize "score" setting must be a function that returns a function');
if(t!==a.lastQuery?(a.lastQuery=t,i=a.sifter.search(t,e.extend(o,{score:r})),a.currentResults=i):i=e.extend(!0,{},a.currentResults),s.hideSelected)for(n=i.items.length-1;n>=0;n--)a.items.indexOf(T(i.items[n].id))!==-1&&i.items.splice(n,1);return i},refreshOptions:function(t){var n,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y;"undefined"==typeof t&&(t=!0);var b=this,w=e.trim(b.$control_input.val()),S=b.search(w),P=b.$dropdown_content,x=b.$activeOption&&T(b.$activeOption.attr("data-value"));for(s=S.items.length,"number"==typeof b.settings.maxOptions&&(s=Math.min(s,b.settings.maxOptions)),
o={},l=[],n=0;n<s;n++)for(u=b.options[S.items[n].id],c=b.render("option",u),d=u[b.settings.optgroupField]||"",h=e.isArray(d)?d:[d],r=0,a=h&&h.length;r<a;r++)d=h[r],b.optgroups.hasOwnProperty(d)||(d=""),o.hasOwnProperty(d)||(o[d]=[],l.push(d)),o[d].push(c);for(this.settings.lockOptgroupOrder&&l.sort(function(e,t){var n=b.optgroups[e].$order||0,i=b.optgroups[t].$order||0;return n-i}),p=[],n=0,s=l.length;n<s;n++)d=l[n],b.optgroups.hasOwnProperty(d)&&o[d].length?(f=b.render("optgroup_header",b.optgroups[d])||"",
f+=o[d].join(""),p.push(b.render("optgroup",e.extend({},b.optgroups[d],{html:f})))):p.push(o[d].join(""));if(P.html(p.join("")),b.settings.highlight&&S.query.length&&S.tokens.length)for(n=0,s=S.tokens.length;n<s;n++)i(P,S.tokens[n].regex);if(!b.settings.hideSelected)for(n=0,s=b.items.length;n<s;n++)b.getOption(b.items[n]).addClass("selected");m=b.canCreate(w),m&&(P.prepend(b.render("option_create",{input:w})),y=e(P[0].childNodes[0])),b.hasOptions=S.items.length>0||m,b.hasOptions?(S.items.length>0?(g=x&&b.getOption(x),
g&&g.length?v=g:"single"===b.settings.mode&&b.items.length&&(v=b.getOption(b.items[0])),v&&v.length||(v=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):P.find("[data-selectable]:first"))):v=y,b.setActiveOption(v),t&&!b.isOpen&&b.open()):(b.setActiveOption(null),t&&b.isOpen&&b.close())},addOption:function(t){var n,i,r,a=this;if(e.isArray(t))for(n=0,i=t.length;n<i;n++)a.addOption(t[n]);else(r=a.registerOption(t))&&(a.userOptions[r]=!0,a.lastQuery=null,a.trigger("option_add",r,t))},registerOption:function(e){
var t=T(e[this.settings.valueField]);return!(!t||this.options.hasOwnProperty(t))&&(e.$order=e.$order||++this.order,this.options[t]=e,t)},registerOptionGroup:function(e){var t=T(e[this.settings.optgroupValueField]);return!!t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)},addOptionGroup:function(e,t){t[this.settings.optgroupValueField]=e,(e=this.registerOptionGroup(t))&&this.trigger("optgroup_add",e,t)},removeOptionGroup:function(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],
this.renderCache={},this.trigger("optgroup_remove",e))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(t,n){var i,r,a,s,o,l,u,c=this;if(t=T(t),a=T(n[c.settings.valueField]),null!==t&&c.options.hasOwnProperty(t)){if("string"!=typeof a)throw new Error("Value must be set in option data");u=c.options[t].$order,a!==t&&(delete c.options[t],s=c.items.indexOf(t),s!==-1&&c.items.splice(s,1,a)),n.$order=n.$order||u,c.options[a]=n,o=c.renderCache.item,
l=c.renderCache.option,o&&(delete o[t],delete o[a]),l&&(delete l[t],delete l[a]),c.items.indexOf(a)!==-1&&(i=c.getItem(t),r=e(c.render("item",n)),i.hasClass("active")&&r.addClass("active"),i.replaceWith(r)),c.lastQuery=null,c.isOpen&&c.refreshOptions(!1)}},removeOption:function(e,t){var n=this;e=T(e);var i=n.renderCache.item,r=n.renderCache.option;i&&delete i[e],r&&delete r[e],delete n.userOptions[e],delete n.options[e],n.lastQuery=null,n.trigger("option_remove",e),n.removeItem(e,t)},clearOptions:function(){
var e=this;e.loadedSearches={},e.userOptions={},e.renderCache={},e.options=e.sifter.items={},e.lastQuery=null,e.trigger("option_clear"),e.clear()},getOption:function(e){return this.getElementWithValue(e,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(t,n){var i=this.$dropdown.find("[data-selectable]"),r=i.index(t)+n;return r>=0&&r<i.length?i.eq(r):e()},getElementWithValue:function(t,n){if(t=T(t),"undefined"!=typeof t&&null!==t)for(var i=0,r=n.length;i<r;i++)if(n[i].getAttribute("data-value")===t)return e(n[i]);
return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(t,n){for(var i=e.isArray(t)?t:[t],r=0,a=i.length;r<a;r++)this.isPending=r<a-1,this.addItem(i[r],n)},addItem:function(t,n){var i=n?[]:["change"];M(this,i,function(){var i,r,a,s,o,l=this,u=l.settings.mode;return t=T(t),l.items.indexOf(t)!==-1?void("single"===u&&l.close()):void(l.options.hasOwnProperty(t)&&("single"===u&&l.clear(n),"multi"===u&&l.isFull()||(i=e(l.render("item",l.options[t])),
o=l.isFull(),l.items.splice(l.caretPos,0,t),l.insertAtCaret(i),(!l.isPending||!o&&l.isFull())&&l.refreshState(),l.isSetup&&(a=l.$dropdown_content.find("[data-selectable]"),l.isPending||(r=l.getOption(t),s=l.getAdjacentOption(r,1).attr("data-value"),l.refreshOptions(l.isFocused&&"single"!==u),s&&l.setActiveOption(l.getOption(s))),!a.length||l.isFull()?l.close():l.positionDropdown(),l.updatePlaceholder(),l.trigger("item_add",t,i),l.updateOriginalInput({silent:n})))))})},removeItem:function(e,t){var n,i,r,a=this;
n="object"==typeof e?e:a.getItem(e),e=T(n.attr("data-value")),i=a.items.indexOf(e),i!==-1&&(n.remove(),n.hasClass("active")&&(r=a.$activeItems.indexOf(n[0]),a.$activeItems.splice(r,1)),a.items.splice(i,1),a.lastQuery=null,!a.settings.persist&&a.userOptions.hasOwnProperty(e)&&a.removeOption(e,t),i<a.caretPos&&a.setCaret(a.caretPos-1),a.refreshState(),a.updatePlaceholder(),a.updateOriginalInput({silent:t}),a.positionDropdown(),a.trigger("item_remove",e,n))},createItem:function(t,n){var i=this,r=i.caretPos;
t=t||e.trim(i.$control_input.val()||"");var a=arguments[arguments.length-1];if("function"!=typeof a&&(a=function(){}),"boolean"!=typeof n&&(n=!0),!i.canCreate(t))return a(),!1;i.lock();var s="function"==typeof i.settings.create?this.settings.create:function(e){var t={};return t[i.settings.labelField]=e,t[i.settings.valueField]=e,t},o=I(function(e){if(i.unlock(),!e||"object"!=typeof e)return a();var t=T(e[i.settings.valueField]);return"string"!=typeof t?a():(i.setTextboxValue(""),i.addOption(e),i.setCaret(r),
i.addItem(t),i.refreshOptions(n&&"single"!==i.settings.mode),void a(e))}),l=s.apply(this,[t,o]);return"undefined"!=typeof l&&o(l),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){var e,t=this;t.isRequired&&(t.items.length&&(t.isInvalid=!1),t.$control_input.prop("required",e)),t.refreshClasses()},refreshClasses:function(){var t=this,n=t.isFull(),i=t.isLocked;t.$wrapper.toggleClass("rtl",t.rtl),
t.$control.toggleClass("focus",t.isFocused).toggleClass("disabled",t.isDisabled).toggleClass("required",t.isRequired).toggleClass("invalid",t.isInvalid).toggleClass("locked",i).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",t.isFocused&&!t.isInputHidden).toggleClass("dropdown-active",t.isOpen).toggleClass("has-options",!e.isEmptyObject(t.options)).toggleClass("has-items",t.items.length>0),t.$control_input.data("grow",!n&&!i)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems;
},updateOriginalInput:function(e){var t,n,i,r,a=this;if(e=e||{},a.tagType===S){for(i=[],t=0,n=a.items.length;t<n;t++)r=a.options[a.items[t]][a.settings.labelField]||"",i.push('<option value="'+_(a.items[t])+'" selected="selected">'+_(r)+"</option>");i.length||this.$input.attr("multiple")||i.push('<option value="" selected="selected"></option>'),a.$input.html(i.join(""))}else a.$input.val(a.getValue()),a.$input.attr("value",a.$input.val());a.isSetup&&(e.silent||a.trigger("change",a.$input.val()))},
updatePlaceholder:function(){if(this.settings.placeholder){var e=this.$control_input;this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder),e.triggerHandler("update",{force:!0})}},open:function(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.focus(),e.isOpen=!0,e.refreshState(),e.$dropdown.css({visibility:"hidden",display:"block"}),e.positionDropdown(),e.$dropdown.css({visibility:"visible"}),e.trigger("dropdown_open",e.$dropdown));
},close:function(){var e=this,t=e.isOpen;"single"===e.settings.mode&&e.items.length&&e.hideInput(),e.isOpen=!1,e.$dropdown.hide(),e.setActiveOption(null),e.refreshState(),t&&e.trigger("dropdown_close",e.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0),this.$dropdown.css({width:e.outerWidth(),top:t.top,left:t.left})},clear:function(e){var t=this;t.items.length&&(t.$control.children(":not(input)").remove(),
t.items=[],t.lastQuery=null,t.setCaret(0),t.setActiveItem(null),t.updatePlaceholder(),t.updateOriginalInput({silent:e}),t.refreshState(),t.showInput(),t.trigger("clear"))},insertAtCaret:function(t){var n=Math.min(this.caretPos,this.items.length);0===n?this.$control.prepend(t):e(this.$control[0].childNodes[n]).before(t),this.setCaret(n+1)},deleteSelection:function(t,n){var i,r,a,s,o,l,u,c,d,h=this;if(a=n||void 0===n&&t&&t.keyCode===m?-1:1,s=R(h.$control_input[0]),h.$activeOption&&!h.settings.hideSelected&&(u=h.getAdjacentOption(h.$activeOption,-1).attr("data-value")),
o=[],h.$activeItems.length){for(d=h.$control.children(".active:"+(a>0?"last":"first")),l=h.$control.children(":not(input)").index(d),a>0&&l++,i=0,r=h.$activeItems.length;i<r;i++)o.push(e(h.$activeItems[i]).attr("data-value"));t&&(t.preventDefault(),t.stopPropagation())}else(h.isFocused||"single"===h.settings.mode)&&h.items.length&&(a<0&&0===s.start&&0===s.length?o.push(h.items[h.caretPos-1]):a>0&&s.start===h.$control_input.val().length&&o.push(h.items[h.caretPos]));if(!o.length||"function"==typeof h.settings.onDelete&&h.settings.onDelete.apply(h,[o])===!1)return!1;
for("undefined"!=typeof l&&h.setCaret(l);o.length;)h.removeItem(o.pop());return h.showInput(),h.positionDropdown(),h.refreshOptions(!0),u&&(c=h.getOption(u),c.length&&h.setActiveOption(c)),!0},advanceSelection:function(e,t){var n,i,r,a,s,o,l=this;0!==e&&(l.rtl&&(e*=-1),n=e>0?"last":"first",i=R(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(a=l.$control_input.val().length,s=e<0?0===i.start&&0===i.length:i.start===a,s&&!a&&l.advanceCaret(e,t)):(o=l.$control.children(".active:"+n),o.length&&(r=l.$control.children(":not(input)").index(o),
l.setActiveItem(null),l.setCaret(e>0?r+1:r))))},advanceCaret:function(e,t){var n,i,r=this;0!==e&&(n=e>0?"next":"prev",r.isShiftDown?(i=r.$control_input[n](),i.length&&(r.hideInput(),r.setActiveItem(i),t&&t.preventDefault())):r.setCaret(r.caretPos+e))},setCaret:function(t){var n=this;if(t="single"===n.settings.mode?n.items.length:Math.max(0,Math.min(n.items.length,t)),!n.isPending){var i,r,a,s;for(a=n.$control.children(":not(input)"),i=0,r=a.length;i<r;i++)s=e(a[i]).detach(),i<t?n.$control_input.before(s):n.$control.append(s);
}n.caretPos=t},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var e=this;e.$input.prop("disabled",!0),e.$control_input.prop("disabled",!0).prop("tabindex",-1),e.isDisabled=!0,e.lock()},enable:function(){var e=this;e.$input.prop("disabled",!1),e.$control_input.prop("disabled",!1).prop("tabindex",e.tabIndex),e.isDisabled=!1,e.unlock()},destroy:function(){var t=this,n=t.eventNS,i=t.revertSettings;t.trigger("destroy"),
t.off(),t.$wrapper.remove(),t.$dropdown.remove(),t.$input.html("").append(i.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:i.tabindex}).show(),t.$control_input.removeData("grow"),t.$input.removeData("selectize"),e(window).off(n),e(document).off(n),e(document.body).off(n),delete t.$input[0].selectize},render:function(e,t){var n,i,r="",a=!1,s=this,o=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return"option"!==e&&"item"!==e||(n=T(t[s.settings.valueField]),a=!!n),
a&&(C(s.renderCache[e])||(s.renderCache[e]={}),s.renderCache[e].hasOwnProperty(n))?s.renderCache[e][n]:(r=s.settings.render[e].apply(this,[t,_]),"option"!==e&&"option_create"!==e||(r=r.replace(o,"<$1 data-selectable")),"optgroup"===e&&(i=t[s.settings.optgroupValueField]||"",r=r.replace(o,'<$1 data-group="'+E(_(i))+'"')),"option"!==e&&"item"!==e||(r=r.replace(o,'<$1 data-value="'+E(_(n||""))+'"')),a&&(s.renderCache[e][n]=r),r)},clearCache:function(e){var t=this;"undefined"==typeof e?t.renderCache={}:delete t.renderCache[e];
},canCreate:function(e){var t=this;if(!t.settings.create)return!1;var n=t.settings.createFilter;return(e.length||t.settings.allowCreateEmpty)&&("function"!=typeof n||n.apply(t,[e]))&&("string"!=typeof n||new RegExp(n).test(e))&&(!(n instanceof RegExp)||n.test(e))}}),U.count=0,U.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,selectOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,
addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,allowCreateEmpty:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",manualInputWidth:!1,dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",
dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},e.fn.selectize=function(t){var n=e.fn.selectize.defaults,i=e.extend({},n,t),r=i.dataAttr,a=i.labelField,s=i.valueField,o=i.optgroupField,l=i.optgroupLabelField,u=i.optgroupValueField,c=function(t,n){var o,l,u,c,d=t.attr(r);if(d)for(n.options=JSON.parse(d),o=0,l=n.options.length;o<l;o++)n.items.push(n.options[o][s]);else{var h=e.trim(t.val()||"");if(!i.allowEmptyOption&&!h.length)return;for(u=h.split(i.delimiter),
o=0,l=u.length;o<l;o++)c={},c[a]=u[o],c[s]=u[o],n.options.push(c);n.items=u}},d=function(t,n){var c,d,h,p,f=n.options,m={},v=function(e){var t=r&&e.attr(r);return"string"==typeof t&&t.length?JSON.parse(t):null},g=function(t,r){t=e(t);var l=T(t.attr("value"));if(l||i.allowEmptyOption)if(m.hasOwnProperty(l)){if(r){var u=m[l][o];u?e.isArray(u)?u.push(r):m[l][o]=[u,r]:m[l][o]=r}}else{var c=v(t)||{};c[a]=c[a]||t.text(),c[s]=c[s]||l,c[o]=c[o]||r,m[l]=c,f.push(c),t.is(":selected")&&n.items.push(l)}},y=function(t){
var i,r,a,s,o;for(t=e(t),a=t.attr("label"),a&&(s=v(t)||{},s[l]=a,s[u]=a,n.optgroups.push(s)),o=e("option",t),i=0,r=o.length;i<r;i++)g(o[i],a)};for(n.maxItems=t.attr("multiple")?null:1,p=t.children(),c=0,d=p.length;c<d;c++)h=p[c].tagName.toLowerCase(),"optgroup"===h?y(p[c]):"option"===h&&g(p[c])};return this.each(function(){if(!this.selectize){var r,a=e(this),s=this.tagName.toLowerCase(),o=a.attr("placeholder")||a.attr("data-placeholder");o||i.allowEmptyOption||(o=a.children('option[value=""]').text());
var l={placeholder:o,options:[],optgroups:[],items:[]};"select"===s?d(a,l):c(a,l),r=new U(a,e.extend(!0,{},n,l,t))}})},e.fn.selectize.defaults=U.defaults,e.fn.selectize.support={validity:x},U.define("remove_button",function(t){if("single"!==this.settings.mode){t=e.extend({label:"&times;",title:"Remove",className:"remove",append:!0},t);var n=this,i='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+_(t.title)+'">'+t.label+"</a>",r=function(e,t){var n=e.search(/(<\/[^>]+>\s*)$/);
return e.substring(0,n)+t+e.substring(n)};this.setup=function(){var a=n.setup;return function(){if(t.append){var s=n.settings.render.item;n.settings.render.item=function(e){return r(s.apply(this,arguments),i)}}a.apply(this,arguments),this.$control.on("click","."+t.className,function(t){if(t.preventDefault(),!n.isLocked){var i=e(t.currentTarget).parent();n.setActiveItem(i),n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}}),U.define("restore_on_backspace",function(e){var t=this;e.text=e.text||function(e){
return e[this.settings.labelField]},this.onKeyDown=function(){var n=t.onKeyDown;return function(t){var i,r;return t.keyCode===m&&""===this.$control_input.val()&&!this.$activeItems.length&&(i=this.caretPos-1,i>=0&&i<this.items.length)?(r=this.options[this.items[i]],this.deleteSelection(t,!0)&&(this.setTextboxValue(e.text.apply(this,[r])),this.refreshOptions(!0)),void t.preventDefault()):n.apply(this,arguments)}}()}),U.define("restore_on_focus",function(e){var t=this;e.text=e.text||function(e){return e[this.settings.labelField];
};var n=t.onFocus;this.onFocus=function(t){return function(t){var i=this.caretPos-1;if(i>=0&&i<this.items.length){var r=this.options[this.items[i]],a=e.text.call(this,r);this.removeItem(r[this.settings.valueField]),this.setTextboxValue(a),this.refreshOptions(!0)}return n.apply(this,arguments)}}()}),U})}).call(t,n(5))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(73),a=i(r),s=new a.default({"interface":["load","stop","canPause"]});t.default=s,
e.exports=t.default},function(e,t,n){var i,r;i=[n(73)],r=function(e){"use strict";var t=new e({"interface":["get","set","remove","clear"]});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(6),n(29),n(43),n(92),n(215),n(432),n(71),n(26),n(379)],r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c=n.extend({readyEvent:"loadedmetadata",wrapped:["play","pause","setVolume","setPosition","resume","stop"],initialize:function(t){e.bindAll(this,"onReady","onWaiting","onStalled","onPlaying","onProgress","onTime","onPause","onVolume","onEnded","onError"),
this.type=t,this.backlog=new a,this.backlog.wrapAll(this.wrapped,function(){return!!this.mediaElement},this)},setMediaSrc:function(e,t){l.info("[Player] setting src attribute",e),this.mediaElement.setAttribute("src",e)},removeMediaSrc:function(){l.info("[Player] removing src attribute"),this.mediaElement.setAttribute("src","")},addMediaListeners:function(){var e=this.mediaElement;e.addEventListener(this.readyEvent,this.onReady),e.addEventListener("waiting",this.onWaiting),e.addEventListener("stalled",this.onStalled),
e.addEventListener("playing",this.onPlaying),e.addEventListener("progress",this.onProgress),e.addEventListener("timeupdate",this.onTime),e.addEventListener("pause",this.onPause),e.addEventListener("volumechange",this.onVolume),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError)},removeMediaListeners:function(){var e=this.mediaElement;e.removeEventListener(this.readyEvent,this.onReady),e.removeEventListener("waiting",this.onWaiting),e.removeEventListener("stalled",this.onStalled),
e.removeEventListener("playing",this.onPlaying),e.removeEventListener("progress",this.onProgress),e.removeEventListener("timeupdate",this.onTime),e.removeEventListener("pause",this.onPause),e.removeEventListener("volumechange",this.onVolume),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError)},load:function(e){var t=e.model,n=t.get("url"),i=e.mediaElement||this.createManagedMediaElement();this.backlog.clear(),this.model=t,this.mediaElement=i,this.autoplay=e.autoplay,
this.offset=t.get("position"),this.lastOffset=null;var r=!t.get("directPlay")&&"http"===e.protocol;this.useSeekStreamSwitch=r||e.useOffsetHLS,this.useOffset=e.useOffsetHLS||e.useOffsetHTTP,this.useOffset&&this.model.set("offset",this.offset),i.stream_restart=!1,i.autoplay=this.autoplay,this.addMediaListeners(),l.group("[Player] Load"),l.info("URL:",n),l.info("Autoplay:",this.autoplay),l.info("Offset:",this.offset),l.groupEnd(),"dash"===e.protocol?(u.load(n,i),this.usingDashPlayer=!0):(this.setMediaSrc(n,e.mimeType),
i.load())},play:function(){this.mediaElement.play()},pause:function(){this.mediaElement.pause(),this.mediaElement.autoplay=!1},setVolume:function(e){this.mediaElement.volume=e/100},setPosition:function(e){this.mediaElement.readyState>0&&(this.mediaElement.currentTime=e/1e3)},resume:function(){l.info("[Player] Resuming at "+this.offset),this.setPosition(this.offset),this.offset=0},stop:function(){l.info("[Player] Stopping playback. DashPlayer:",!!this.usingDashPlayer),this.removeMediaListeners(),this.model.set("ready",!1),
this.usingDashPlayer&&(this.usingDashPlayer=!1,u.stop()),this.removeMediaSrc(),this.removeManagedMediaElement(),this.mediaElement=null},preferElementDuration:function(){if(!e.isFinite(this.mediaElement.duration))return!1;if(this.model.get("type")!==i.types.PHOTO){var t=e.first(r(this.model.get("media"),{streamType:o.get("audio").id,selected:!0}));if(t&&"vbr"===t.bitrateMode)return!1}return!0},getErrorMessage:function(e){return t("There was a problem playing this item.")},beforeStreamSwitch:function(){
this.mediaElement&&(this.mediaElement.stream_restart=!0)},createManagedMediaElement:function(){var e=i.getElementByType(this.type),t="audio"===e,n=s(e,t);return n.style.cssText="position:absolute;width:1px;height:1px;",n.managed=!0,n.parentNode||document.body.appendChild(n),n},removeManagedMediaElement:function(){var e=this.mediaElement;e&&e.managed&&(e.managed=!1,e.parentNode&&e.parentNode.removeChild(e))},onReady:function(){var e=this.model;if(!e.get("ready")){l.info("[Player] Playback is ready");
var t=this.mediaElement,n={ready:!0,loaded:!0};if(e.get("type")===i.types.VIDEO&&(n.videoDimensions={width:t.videoWidth,height:t.videoHeight}),this.preferElementDuration()){var r=1e3*t.duration;this.useOffset&&(r+=this.offset),n.duration=Math.round(r)}e.set(n);var a=e.get("volume");null!=a&&this.setVolume(a),this.backlog.process()}},onWaiting:function(){this.model.set("state",i.states.BUFFERING)},onStalled:function(){},onPlaying:function(){this.model.set("state",i.states.PLAYING)},onProgress:function(){
for(var e=this.mediaElement.buffered,t=null,n=null,i=0,r=e.length;i<r;i++){var a=Math.round(1e3*e.start(i)),s=Math.round(1e3*e.end(i));this.useOffset&&(a+=this.offset,s+=this.offset),(null===t||t>a)&&(t=a),(null===n||n<s)&&(n=s)}this.model.set({startBuffer:t,endBuffer:n})},onTime:function(){var e=this.mediaElement,t=this.offset&&!this.useSeekStreamSwitch,n=e.stream_restart;if(t||n)return void(t&&this.resume());var r=1e3*e.currentTime;this.useOffset&&(r+=this.offset);var a=this.lastOffset&&Math.abs(r-this.lastOffset)<100;
if(!(e.paused||a&&this.model.get("buffering"))){var s=this.model;this.lastOffset=r,s.get("buffering")&&s.set("state",i.states.PLAYING),s.set("position",Math.round(r))}},onPause:function(){var e=this.model.get("partIndex")+1<this.model.get("partCount");this.mediaElement.ended&&e||(this.mediaElement.resume_pending||this.mediaElement.stream_restart||this.usingDashPlayer&&u.canPause(this.mediaElement)?this.model.set("state",i.states.BUFFERING):this.model.set("state",i.states.PAUSED))},onVolume:function(){
this.model.set("volume",Math.round(100*this.mediaElement.volume))},onEnded:function(){this.model.set("ended",!0)},onError:function(e){var t=e.target.error,n=t&&t.code;n&&l.warn("[Player] Media element error code: "+n),this.model.set({state:i.states.ERROR,errorMessage:this.getErrorMessage(n)})}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(218),n(29),n(452),n(453),n(445),n(448),n(821),n(43),n(215),n(844),n(26),n(259),n(13),n(50),n(261),n(381)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y){
"use strict";var b=r.extend({mixins:[v,g],playerProfileAdapter:f,resetStreamDebounce:200,handleSetPositionDebounce:0,errorSkipTime:2e3,wrapped:["play","pause","playPause","setVolume","setPosition"],modelDefaults:function(){var t=g.modelDefaults.apply(this,arguments);return e.extend(t,{state:c.states.BUFFERING})},initialize:function(t){t||(t={}),g.initialize.apply(this,arguments),e.bindAll(this,"onDecisionSuccess","onDecisionError"),this.profile=this.playerProfileAdapter.prop(this.type),this.backlog=new d,
this.backlog.wrapAll(this.wrapped,function(){return!!this.subcontroller},this),this.useBufferDetection()&&(this.bufferingDetector=new h,this.bufferingDetector.on("warn",this.onBufferingDetectorWarn,this),this.bufferingDetector.on("buffering",this.onBufferingDetected)),this.resetStreamDebounce&&(this.resetStream=e.debounce(this.resetStream,this.resetStreamDebounce)),this.handleSetPositionDebounce&&(this.handleSetPosition=e.debounce(this.handleSetPosition,this.handleSetPositionDebounce))},load:function(e){
this.originalOptions=e,this.model=e.model,this.autoplay=e.autoplay,this.postplay=e.postplay;var t=this.model.get("playQueue"),n=this.model.get("playQueueItem");return this.reset(n),this.listenTo(this.model,{"change:state":this.onStateChange,"change:repeatAll change:repeatItem":this.onRepeatChange,"change:qualityIndex":this.onQualityIndexChange,"change:audioStreamID":this.onAudioStreamIDChange,"change:subtitleStreamID":this.onSubtitleStreamIDChange,"change:ended":this.onEndedChange,"change:softSubtitlesFailed":this.onSoftSubtitlesFailedChange
}),t&&(this.listenTo(t.get("collection"),"add remove reset sync",this.onPlayQueueChange),this.listenTo(t,"change:hasUpNext change:shuffled",this.onPlayQueueChange)),this.getPlayerDecision(n.get("metadataItem"),e)},reset:function(e){return this.bufferingDetector&&this.bufferingDetector.stop(),g.reset.apply(this,arguments)},populateItem:function(t,n){var i=e.extend({},n,{reset:!0,scope:"player"});if(t.get("isLibraryItem")&&(i.data={checkFiles:"1",includeChapters:"1"}),t.server.get("cloud")){var r=t.get("key");
i.url=t.server.swizzleNodeUrl(r)}return t.populate(i)},loadMediaElement:function(t){this.subcontroller=this.getSubcontrollerByType(this.playerType),this.backlog.process();var n,i=this.profile&&this.profile.protocols,r=this.protocol;r&&i&&i[r]&&(n=i[r].mimeType),this.subcontroller.load(e.extend({},this.originalOptions,{model:this.model,protocol:r,autoplay:this.autoplay,mimeType:n,useOffsetHLS:t.useOffsetHLS,useOffsetHTTP:t.useOffsetHTTP,canDirectPlay:t.canDirectPlay})),this.bufferingDetector&&(this.bufferingDetector.setModel(this.model),
this.bufferingDetector.start())},getSubcontrollerByType:function(e){return new y(this.type)},embed:function(i){var r=this.model.get("metadataItem"),a=t.ajax(r.server.getXHROptions(i.key));a.done(e.bind(function(e){this.model.set("embedHtml",e)},this)),a.fail(e.bind(function(e){this.model.set({state:c.states.ERROR,errorMessage:n("There was a problem embedding this video.")})},this))},redirect:function(t){var n=this.model.get("metadataItem"),i=n.get("url");if(!i&&t){var r=t.key.match(/\/webkit\?url=([^&]+)/);
r&&(i=decodeURIComponent(r[1]))}window.open(i),e.defer(e.bind(function(){this.model.set("finished",!0)},this))},play:function(){this.model.get("state")!==c.states.PLAYING&&this.subcontroller.play()},pause:function(){this.model.get("state")!==c.states.PAUSED&&this.subcontroller.pause()},setPosition:function(e,t){t||(t={}),this.canSeek(e)&&(this.model.set({finished:!1,position:e,lastSeekPosition:e}),this.model.trigger("seeking",this.model),this.bufferingDetector&&this.bufferingDetector.seek(e),this.subcontroller.useSeekStreamSwitch?(this.resetStreamDebounce&&this.pause(),
this.switchStreams(t)):(this.handleSetPositionDebounce&&this.pause(),this.handleSetPosition(e,t)))},handleSetPosition:function(e,t){this.canHandleDebounce()&&(this.subcontroller.setPosition(e),t.autoplay&&this.play())},canHandleDebounce:function(){var e=this.model&&this.model.get("state");return void 0!==e&&e!==c.states.STOPPED},setVolume:function(e){this.model.set("volume",e),this.subcontroller.setVolume(e)},restartCurrent:function(){this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions);
},skipPrevious:function(){var e=g.skipPrevious.apply(this,arguments);return e&&this.switchStreams({autoplay:!0}),e},skipNext:function(){var e=g.skipNext.apply(this,arguments);return e&&this.switchStreams({autoplay:!0}),e},skipNextOrFinish:function(){this.model.get("canSkipNext")?this.skipNext():this.model.set("finished",!0)},skipTo:function(e){var t=g.skipTo.apply(this,arguments);return t&&this.switchStreams({autoplay:!0}),t},switchStreams:function(e){e||(e={}),null==e.autoplay&&(e.autoplay=!this.model.get("paused")),
this.subcontroller&&this.subcontroller.beforeStreamSwitch&&this.subcontroller.beforeStreamSwitch(),this.originalOptions.media=this.model.get("media"),this.originalOptions.part=this.model.get("part"),this.originalOptions.offset=this.model.get("position"),this.pause(),this.resetStream(e)},resetStream:function(t){if(t||(t={}),this.canHandleDebounce()){var n=this.stopSession();n.done(e.bind(function(){this.autoplay=t.autoplay!==!1,this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions);
},this))}},stop:function(e){return p("[PlayerController] Stopping playback"),g.stop.apply(this,arguments),this.bufferingDetector&&(this.bufferingDetector.off("warn",this.onBufferingDetectorWarn),this.bufferingDetector.stop()),this.stopSession(e)},setSkipStates:function(t){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem(),this.model.set(e.extend({},t,{canSkipPrevious:!!this.previousItem,canSkipNext:!!this.nextItem},this.modelOverrides()))},shouldSkipOnError:function(){return!1;
},skipOnError:function(){if(this.shouldSkipOnError()){this.abortSkipOnError(),p.warn("[PlayerController] Item failed to play, automatically skipping to the next item in",i(this.errorSkipTime));var t=e.bind(function(){this.model.get("error")&&this.skipNextOrFinish()},this);this._skipOnErrorTimeout=setTimeout(t,this.errorSkipTime)}},abortSkipOnError:function(){clearTimeout(this._skipOnErrorTimeout)},useBufferDetection:function(){return!0},getErrorMessage:function(e){return e.errorMessage||n("There was a problem playing this item.");
},onDecisionSuccess:function(t){var n=this.model,i=n.get("state"),r=0;if(i!==c.states.STOPPED&&i!==c.states.ERROR){t.part&&t.part.duration&&(r=t.part.duration),this.playbackSessionID=t.playbackSessionID,this.transcodeSessionID=t.transcodeSessionID,this.playerType=t.playerType,this.protocol=t.protocol;var d=t.media,h=t.part,p=a(d),f=s(d),m=n.get("playQueueItem"),v=m.get("lyricsStreams");this.model.set(e.extend({media:d,part:h,url:t.url,subtitlesUrl:t.subtitlesUrl,transcodeServer:t.transcodeServer,
mediaIndex:d?o(n.get("metadataItem"),d.id):0,partIndex:h?l(d,h.key):0,partCount:u(t.media),audioStreamID:p?p.id:0,subtitleStreamID:f?f.id:0,state:this.autoplay?c.states.BUFFERING:c.states.PAUSED,position:t.offset,duration:r,directPlay:t.canDirectPlay,playbackSessionID:t.playbackSessionID,transcodeSessionID:t.transcodeSessionID,softSubtitlesFailed:!1,canLyrics:v&&v.length>0},this.modelOverrides())),this.loadMediaElement(t)}},onDecisionError:function(e){var t=this.model,n=t.get("state");if(n!==c.states.STOPPED&&n!==c.states.ERROR){
var i=this.playerProfileAdapter.prop("capabilities");return e.embed&&i.embed?void this.embed(e.part):e.redirect&&i.redirect?void this.redirect(e.part):void t.set({state:c.states.ERROR,errorMessage:this.getErrorMessage(e)})}},onQualityIndexChange:function(e,t){var n=e.previous("qualityIndex");null!=t&&null!=n&&this.switchStreams()},onAudioStreamIDChange:function(e,t){var n=e.previous("audioStreamID");null!=t&&null!=n&&this.switchStreams()},onSubtitleStreamIDChange:function(e,t){var n=e.previous("subtitleStreamID");
null!=t&&null!=n&&this.switchStreams()},onPlayQueueChange:function(){var e=this.model.get("playQueue");e&&this.model.set({canShuffle:!e.get("hasUpNext"),shuffled:e.get("shuffled")}),this.setSkipStates()},onRepeatChange:function(e,t){this.setSkipStates()},onStateChange:function(t,n){var i=this.timeline();p("[PlayerController] State change",n),n===c.states.PLAYING&&i.done(e.bind(this.updatePlayQueue,this)),n===c.states.STOPPED||n===c.states.ERROR?this.stopTimeline():this.startTimeline(),n===c.states.PAUSED?this.startPing():this.stopPing(),
n===c.states.PLAYING?this.startPlaybackTracking():this.stopPlaybackTracking(),n===c.states.ERROR?this.skipOnError():this.abortSkipOnError()},onEndedChange:function(e,t){if(t){var n=e.get("partIndex"),i=e.get("partCount");if(++n>=i)this.model.get("repeatItem")?this.restartCurrent():this.nextItem&&!this.postplay?this.skipNext():(!this.nextItem&&this.postplay?this.stop():this.pause(),this.model.set("finished",!0));else{var r=e.get("media");this.model.set({part:r.Part[n],position:0}),this.switchStreams({
autoplay:!0})}}},onSoftSubtitlesFailedChange:function(e,t){!t||e.get("stopped")||e.get("error")||this.switchStreams()},onBufferingDetected:function(){this.model.set("state",c.states.BUFFERING)},onBufferingDetectorWarn:function(e){var t,i=this.bufferingDetector.reasons,r=e.reason,a=this.bufferingDetector.recommendations,s=e.recommendation,o=n(this.type===c.types.VIDEO?"video":"track");t=r===i.TRANSCODER?s===a.ORIGINAL_QUALITY?n("The server is not powerful enough to convert this {1} for smooth playback. Try playing at the original quality.",o):n("The server is not powerful enough to convert this {1} for smooth playback.",o):r===i.NETWORK?s===a.LOWER_QUALITY?n("Your connection to the server is not fast enough to stream this {1}. Check your network or try a lower quality.",o):n("Your connection to the server is not fast enough to stream this {1}. Check your network.",o):n("We are having trouble playing this {1}. Please check your playback setup.",o),
this.model.set("bufferingMessage",t)}});return b}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(386),a=i(r),s=a.default.extend({supportsRetry:function(e){return e.get("isCloud")}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(50),a=i(r),s=n(386),o=i(s),l=o.default.extend({mixins:[a.default],initialize:function(e){
var t=e.appModel;o.default.prototype.initialize.apply(this,arguments),this.appModel=t,this.listenTo(this.appModel,"change:primaryServer",this.onPrimaryServerChange)},supportsRetry:function(e){var t=this.appModel.get("primaryServer");return!!t&&t.id===e.id},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");n&&this.stop(n),t&&t.get("isUnavailable")&&this.start(t)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),a=i(r),s=n(6),o=i(s),l=n(8),u=i(l),c=n(29),d=i(c),h=n(56),p=i(h),f=n(170),m=i(f),v=n(26),g=i(v),y=n(50),b=i(y),w=d.default.extend({mixins:[b.default],initialize:function(e){this.name=e.name||"ServerEventManager",this.appModel=e.appModel,this.servers=this.appModel.get("servers"),this.isValidServer=e.isValidServer,this.supportsLongPolling=e.supportsLongPolling,this.showTimelineStatus=e.showTimelineStatus,this.ServerEventConnection=e.ServerEventConnection,this.connections={},this._serverRetryManager=new e.ServerRetryManager({
appModel:this.appModel,callback:this.retryServerConnections.bind(this),logFormat:"[Connections] Retrying server events connection for %s in %s seconds"})},start:function(){this.listenTo(this.servers,{"change:isResolved":this.onServerResolvedChange,"change:isRejected":this.onServerRejectedChange,remove:this.onServerRemove,reset:this.onServersReset}),this.showTimelineStatus&&this.listenTo(u.default,"timeline",this.onTimeline)},stop:function(){this.stopListening(),this._serverRetryManager.stopAll(),
this.connections={}},connect:function(e){var t=e.server,n=this.connections[t.id];n||(n=new this.ServerEventConnection({server:t}),this.connections[t.id]=n,this.listenTo(n,{open:this.onOpen,close:this.onClose,error:this.onClose}));var i=n.open(),r=n.socket?n.socket.url:n.pollUrl;return(0,g.default)("["+this.name+"] Opening server event connection to "+t.get("debugName")+" at "+r),i},disconnectAll:function(){var e=this;a.default.each(this.connections,function(t){e.disconnect({connection:t})})},disconnect:function(e){
var t=e.connection;if(t||(t=this.connections[e.server.id]),t){var n=t.socket?t.socket.url:t.pollUrl,i=t.server;(0,g.default)("["+this.name+"] Closing server event connection to "+i.get("debugName")+" at "+n),this.stopListening(t),this._serverRetryManager.stop(t.server),t.close(),delete this.connections[t.server.id]}},retryServerConnections:function(e){this.isValidServer(e)&&e.get("isResolved")&&this.connect({server:e})},onServerResolvedChange:function(e,t){var n=this.connections[e.id];this.isValidServer(e)&&t&&!n&&(p.default.hasWebSocket||this.supportsLongPolling?this.connect({
server:e}):e.trigger("socket:websocket",{error:!0}))},onServerRejectedChange:function(e,t){t&&this.disconnect({server:e})},onServerRemove:function(e){var t=this.connections[e.id];if(t&&(this.disconnect({connection:t}),e.get("isMerged")&&t)){var n=this.servers.get(e.id);this.connect({server:n})}},onServersReset:function(e,t){var n=this,i=t.previousModels;a.default.each(i,function(t){e.contains(t)||n.disconnect({server:t})})},onTimeline:function(e){var t=void 0;switch(e.state){case m.default.CREATED:
t="Created {1} in {2} on {3}";break;case m.default.MATCHING:t="Matching {1} in {2} on {3}";break;case m.default.DOWNLOADING_METADATA:t="Downloading metadata for {1} in {2} on {3}";break;case m.default.LOADING_METADATA:t="Loading metadata for {1} in {2} on {3}";break;case m.default.PROCESSED:t="Finished processing {1} in {2} on {3}";break;case m.default.ANALYZING:t="Analyzing {1} in {2} on {3}";break;case m.default.DELETED:t="Deleted {1} in {2} on {3}"}if(t&&e.sectionID>0){var n=e.title||(0,o.default)("an item"),i=e.section?e.section.get("title"):"section "+e.sectionID;
u.default.trigger("show:status",e.server,(0,o.default)(t,n,i,e.server.get("friendlyName")))}},onOpen:function(e){var t=this.connections[e.id],n=t.socket?t.socket.url:t.pollUrl;g.default.info("["+this.name+"] Opened server event connection to "+e.get("debugName")+" at "+n),this._serverRetryManager.stop(e)},onClose:function(e){g.default.warn("["+this.name+"] Unexpectedly closed server event connection to "+e.get("debugName")),this._serverRetryManager.start(e)}});t.default=w,e.exports=t.default},function(e,t,n){
"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(29),o=i(s),l=n(26),u=i(l),c=o.default.extend({maximumDelay:30,initialize:function(e){var t=e.callback,n=e.logFormat;this._serversBeingRetried={},this.callback=t,this.logFormat=n},start:function(e){this._serversBeingRetried[e.id]||this.supportsRetry(e)&&(this._serversBeingRetried[e.id]={server:e,attempt:1},this._scheduleRetry(e))},stop:function(e){var t=this._serversBeingRetried[e.id];t&&(clearTimeout(t.timeout),
delete this._serversBeingRetried[e.id])},stopAll:function(){var e=this;a.default.each(this._serversBeingRetried,function(t,n){clearTimeout(t.timeout),delete e._serversBeingRetried[n]})},supportsRetry:function(e){return!0},_scheduleRetry:function(e){var t=this,n=this._serversBeingRetried[e.id],i=Math.min(this.maximumDelay,n.attempt);(0,u.default)(this.logFormat,e.get("debugName"),i),n.timeout=setTimeout(function(){t.callback(e),n.attempt++,t._scheduleRetry(e)},1e3*i)}});t.default=c,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(279),o=i(s),l=n(38),u=i(l),c=n(81),d=i(c),h=n(64),p=i(h),f=n(20),m=i(f),v=m.default.extend({name:"AbstractStorageModel",responseType:p.default.json,save:function(e,t){var n=this,i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=this.attributes,s=void 0;if(null==e||a.default.isObject(e)?(s=e,i=t):(s={})[e]=t,i=a.default.extend({validate:!0},i),this._warnUnsupportedOptions(i),
s&&!i.wait){if(!this.set(s,i))return!1}else if(!this._validate(s,i))return!1;s&&i.wait&&(this.attributes=a.default.extend({},r,s));var l=this.toJSON({syncedOnly:!0,excludeDefaults:!0});d.default.getInstance().persistDefaults||(l=(0,o.default)(a.default.result(this,"defaults"),l));var u=this._serialize(l),c=d.default.set(this._getStorageKey(),u);return c.done(function(){n.attributes=r,n.trigger("sync",n,r,i)}),c.fail(function(e){n.trigger("error",n,e,i)}),s&&i.wait&&(this.attributes=r),c},destroy:function(){
var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this._warnUnsupportedOptions(t),t.wait||this.trigger("destroy",this,this.collection,t);var n=d.default.remove(this._getStorageKey());return n.done(function(n){t.wait&&e.trigger("destroy",e,e.collection,t),e.trigger("sync",e,n,t)}),n.fail(function(n){e.trigger("error",e,n,t)}),n},sync:function(){this._logError("does not support syncing to a server")},_getStorageKey:function(){var e=a.default.result(this,"storageKey");return(0,
u.default)(e,this.name+" requires a `storageKey` property"),e},_fetch:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this._warnUnsupportedOptions(t);var n=d.default.get(this._getStorageKey());return n.done(function(n){n&&e.set(e.parse(n)),e.trigger("sync",e,n,t)}),n.fail(function(n){e.trigger("error",e,n,t)}),n},_serialize:function(e){var t="";try{t=JSON.stringify(e)}catch(n){this._logError("serialization error: "+n.message)}return t},_warnUnsupportedOptions:function(e){
e.parse&&this._logError("does not support the `parse` option. The response from storage is always parsed."),e.success&&this._logError("does not support a `success` callback. Use the returned promise."),e.error&&this._logError("does not support an `error` callback. Use the returned promise.")},_logError:function(e){var t=void 0;try{t=this._getStorageKey()}catch(n){t="no storageKey"}(0,u.default)(!1,this.name+" ("+t+") "+e)}});t.default=v,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(109),n(45)],
r=function(e,t,n,i){"use strict";var r=i.extend({fetch:function(){return this.storage.fetch().then(e.bind(function(){var e=this._readFromStorage();return e?(this.set(e),this):t.Deferred().reject()},this))},save:function(t){return n(this.storage.fetch()).then(e.bind(function(){return t&&this.set(t),this._saveToStorage(this.toJSON())},this))},destroy:function(){return n(this.storage.fetch()).then(e.bind(function(){return this.storage.unset(e.result(this,"storageKey")),this.storage.save()},this))},_readFromStorage:function(){
return this.storage.get(e.result(this,"storageKey"))},_saveToStorage:function(t){return this.storage.save(e.result(this,"storageKey"),t)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e,t){return l.default.get("shouldCreateFlexModels")&&(e.prototype.sessionRelations=r({},e.prototype.sessionRelations,a({},"desktop",t))),e}var r=n(11).default,a=n(49).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(54),l=s(o);e.exports=t.default;
},function(e,t,n){"use strict";var i=n(19).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),s=i(a),o=n(168),l=r(o),u=n(18),c=r(u),d=n(20),h=r(d),p=n(713),f=r(p),m=h.default.extend({mixins:[l.default],name:"ChannelListModel",context:["server"],idAttribute:"key",collectionName:"channels",url:function v(){var e=this.get("key"),v=e?e:s.join(["/channels",this.get("subset")]);return this.getPaginatedUrl(v)},sessionAttrs:{key:c.default.string,subset:c.default.oneOf("all","recentlyViewed"),
currentPageStart:c.default.integer,currentPageSize:c.default.integer,populatedRange:c.default.object},syncedAttrs:{totalSize:c.default.integer,viewGroup:c.default.string,title1:c.default.string,title2:c.default.string},syncedRelations:{channels:{relationClass:f.default,rootPropertyName:"Directory",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{subset:"all",populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()}});t.default=m,
e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(53),a=i(r),s=n(18),o=i(s),l=n(64),u=i(l),c=n(20),d=i(c),h=n(87),p=i(h),f=d.default.extend({name:"ChannelModel",context:["server","channel"],idAttribute:"key",url:function(){return this.id?this.id:this.identifierUrl(this.get("identifier"))},identifierUrl:function(e){return"/:/plugins/"+e+"/root"},syncedAttrs:{key:o.default.string,identifier:o.default.string,type:o.default.string,
name:o.default.string,title1:o.default.string,title2:o.default.string,message:o.default.string,summary:o.default.string,thumb:o.default.string,art:o.default.string,prefsKey:o.default.string,searchKey:o.default.string,installed:o.default.boolean,noCache:o.default.boolean,allowSync:o.default.boolean,hasPrefs:o.default.boolean,hasStoreServices:o.default.boolean,share:o.default.boolean,lastAccessedAt:o.default.integer},syncedRelations:{metadataList:{relationClass:p.default,attrs:function(e){return{containerKey:e.key?e.key:this.identifierUrl(e.identifier)
}},options:function(e){return{channel:this,skipCache:!0}}}},derivedAttrs:{title:function(){return this.get("name")||this.get("title2")||this.get("title1")}},augmentResponseText:function(e,t){return t===u.default.xml?a.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){if(this.has("key")&&(e.key=this.get("key")),"none"===e.key&&delete e.key,e.key){var t=e.key.match(/^\/(\w+)\//);t&&(e.type=t[1])}e.title&&(e.name=e.title);for(var n=a.default.parseArray(e.Metadata),i=n.length-1;i>=0;i--){
var r=n[i];if(r.isChannelItem=!0,r.settings||r.search){var s=r.settings?"prefsKey":"searchKey";e[s]=r.key,n.splice(i,1)}}return e.Metadata=n,e.metadataList=e,e}});t.default=f,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(45),n(831),n(834),n(828),n(262)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.extend({defaults:{selectedItem:null,mediaType:null,collection:null,owned:!0,lastAddedItem:null,hasUserAdditions:!1},url:"",initialize:function(e){this.set({mediaType:e.mediaType,collection:new s([],{
type:e.mediaType,server:e.server})})},fetch:function(){return t.Deferred().resolve().promise()},queueContent:function(n,s,o){o||(o={});var l=t.Deferred().resolve().promise(),u=n.get("isPlayQueueItem")?n.get("metadataItem"):n;return this.isItemQueueable(u)&&(u.get("children")&&e.result(u.get("children"),"url")&&(l=l.then(function(){return u.get("children").populate()})),l=l.done(e.bind(function(){this.set({lastAddedItem:u,hasUpNext:!0,hasUserAdditions:this.get("collection").length>0,shuffled:!!o.shuffled
});var t=this.get("collection").indexOf(s);t===-1&&(t=0);var n=o.next?{at:t+1}:{},l=i(u);if(l){var c=l.filter(r);o.shuffle&&(c=e(c).shuffle());var d=e.map(c,e.bind(a,this));this.get("collection").add(d,n)}else this.get("collection").add(a.apply(this,[u]),n);this.get("collection").trigger("reset",this.get("collection"))},this))),l},addContent:function(t,n){return this.queueContent(t,this.get("selectedItem"),n).then(e.bind(this._setSelectedItem,this,n))},_setSelectedItem:function(e){var t=null;e&&e.firstItem?t=this.get("collection").find(function(t){
return t.get("key")===e.firstItem.get("key")}):this.get("collection").length&&(t=this.get("collection").at(0)),this.set("selectedItem",t)},removeItem:function(e){return e.get("playQueueItemID")===this.get("selectedItem").get("playQueueItemID")?t.Deferred().resolve().promise():(this.set("hasUserAdditions",!0),this.get("collection").remove(e),this.get("collection").trigger("reset",this.get("collection")),t.Deferred().resolve().promise())},moveItem:function(e,n){if(e===this.get("selectedItem").get("playQueueItemID"))return t.Deferred().resolve().promise();
var i=this.get("collection"),r=i.findWhere({playQueueItemID:e});i.remove(r);var a=n||this.get("selectedItem").get("playQueueItemID"),s=i.findWhere({playQueueItemID:a}),o=i.indexOf(s)+1;return this.set("hasUserAdditions",!0),i.add(r,{at:o}),i.trigger("reset",i),t.Deferred().resolve().promise()},isItemQueueable:function(t){if(t.get("currentSubset")&&"photo"!==t.viewGroup)return!1;if("photoAlbum"===t.get("type")&&!t.get("isLibraryItem"))return!1;var n=["track","episode","movie","photo","clip","userPlaylistItem","photoAlbum","album","season"],a=e(n).contains(t.get("type")),s=i(t),o=s&&s.any(r);
return a||o},toggleShuffle:function(){return t.Deferred().resolve().promise()},setRepeatAll:function(e){return t.Deferred().resolve().promise()},yieldOwnership:function(n){n=n||{};var r,a=this.get("lastAddedItem");return r=a.server.get("synced")||n.absoluteUrl?e.result(i(a),"url"):this.get("selectedItem").get("key"),t.Deferred().resolve(r).promise()},takeOwnership:function(){return t.Deferred().resolve().promise()},supports:function(e){return!(e&&(e.unwatched||e.remoteRefresh))}});return o}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(29),n(50),n(39),n(392),n(208)],r=function(e,t,n,i,r,a){"use strict";var s=t.extend({mixins:n,initialize:function(e){this.server=e.server,this._queues={audio:null,photo:null,video:null},this.canCreateOnLocal=r.prototype.isItemQueueable,this.doesLocalSupport=r.prototype.supports},createFor:function(e,t){t=t||e;var n;n=t.get("isUserPlaylist")?"video":t.get("isPlaylist")?t.get("playlistType"):t.get("isMetadataList")?i.getChildMediaType(t.get("firstItemType")).element:e.get("element")||i.getChildMediaType(t.get("type")).element;
var s=null;return this.canCreateOnServer(e)?s=new a({mediaType:n},{server:this.server}):this.canCreateOnLocal(e)&&(s=new r({mediaType:n},{server:this.server})),this._queues[n]=s,this.trigger("change change:playQueue:"+n,s),s},getForType:function(e){return this._queues[e]},createForType:function(e,t){var n=null;return n=t.onServer?new a({mediaType:e},{server:this.server}):new r({mediaType:e}),this._queues[e]=n,this.trigger("change change:playQueue:"+e,n),n},getFor:function(e){var t=e.get("type");if(!t||"channelDirectory"===t)return null;
var n;n=e.get("isUserPlaylist")?"video":e.get("isPlaylist")?e.get("playlistType"):e.get("element")||i.getChildMediaType(t).element;var r=this._queues[n];return r&&r.isItemQueueable(e)?r:null},get:function(t){return e.findWhere(this._queues,{id:t})},populateQueue:function(e,t){var n=new a({playQueueID:e,mediaType:t},{server:this.server});return this._queues[t]=n,n.populate()},remove:function(e){var t=this._queues[e];t&&(this._queues[e]=null,this.trigger("change remove:playQueue:"+e,t))},removeAll:function(){
e.each(e.keys(this._queues),this.remove,this)},canCreateOnServer:function(e){return this.server.supports("playQueues")&&this.server.get("isFullServer")&&a.prototype.isItemQueueable(e)},doesServerSupport:function(e){return this.server.supports("playQueues")&&a.prototype.supports(e)},canCreateFor:function(e,t){return this.canCreateOnServer(e)&&this.doesServerSupport(t)||this.canCreateOnLocal(e)&&this.doesLocalSupport(t)}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(710)],
r=function(e,t){"use strict";var n=t.extend({initialize:function(t){this.playQueue=t.playQueue,this.includeSelectedItem=t.includeSelectedItem,this.addFilter(e.bind(this.filterUpNext,this)),this.listenForUpNextChanges()},listenForUpNextChanges:function(){var t=e.debounce(this.onPlayQueueChange),n=["change:playQueueSelectedItemID","change:playQueueLastAddedItemID"];this.listenTo(this.playQueue,n.join(" "),t),this.listenTo(this.playQueue.get("collection"),"change:queueIndex",t)},filterUpNext:function(e){
var t=this.superset.indexOf(e),n=this.playQueue.getUpNextRange(),i=n.start,r=n.end;return this.includeSelectedItem||(i+=1),t>=i&&t<=r},onPlayQueueChange:function(){this.refilter()}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(25),o=i(s),l=n(721),u=i(l),c=o.default.extend({name:"FilterOptionCollection",context:["server","section","type","standalone"],model:u.default,url:function d(){
var e=a.default.result(this.section,"url"),d=e+"/"+this.parent.id;return this.type?d+="?type="+this.type:this.standalone||(d+="?"+this.getUrlParams()),d},getUrlParams:function(){var e=this,t={},n=[],i=this.section.get("currentType"),r=this.section.get("currentFilters");return i&&(t.type=i.id),a.default.each(r,function(n){n.key!==e.parent.id&&n.values.length&&(t[n.key]=n.values.join(","))}),a.default.each(t,function(e,t){"unviewedLeafCount"===t?n.push(t+">="+e):n.push(t+"="+e)}),n.join("&")},augmentResponse:function(e){
return e.Directory&&!a.default.isArray(e.Directory)&&(e.Directory=[e.Directory]),e.Directory=a.default.filter(e.Directory,function(e){return e.title}),e},search:function(e){var t=this.filter(function(t){return t.get("title").toLowerCase().indexOf(e.toLowerCase())>-1});return this.clone(t)}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"FirstCharacterModel",
context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:a.default.string,title:a.default.string,size:a.default.integer},urlRoot:function(){return"/library/sections/"+this.section.id+"/firstCharacter"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"MediaTypeModel",context:["server","section"],sessionAttrs:{id:a.default.integer,
typeString:a.default.string,title:a.default.string,plural:a.default.string,element:a.default.string,child:a.default.integer,grandchild:a.default.integer,parent:a.default.integer,grandparent:a.default.integer,selected:a.default.boolean},defaults:{selected:!1}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(22),l=r(o),u=n(25),c=i(u),d=n(399),h=i(d),p=c.default.extend({name:"SortCollection",
context:["server","section","typeID"],model:h.default,url:function(){var e=s.default.result(this.section,"url"),t=this.typeID||this.section.get("currentType").id,n=t?{type:t}:{};return l.join([e,"/sorts"],n)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l={ASCENDING:"asc",DESCENDING:"desc"},u=o.default.extend({name:"SortModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",
sessionAttrs:{selected:a.default.boolean,direction:a.default.string},syncedAttrs:{key:a.default.string,title:a.default.string,isDefault:a.default.boolean,defaultDirection:a.default.string},defaults:{selected:!1},augmentResponse:function(e){return e.defaultDirection||(e.defaultDirection=e.default||l.ASCENDING),e.isDefault=!!e.default,e.direction||(e.direction=e.defaultDirection),e},reverseSortDirection:function(){var e=this.get("direction")||this.get("defaultDirection");e=e&&e!==l.ASCENDING?l.ASCENDING:l.DESCENDING,
this.set("direction",e)}},{directions:l});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(53),s=i(a),o=n(59),l=r(o),u=n(77),c=i(u),d=n(18),h=i(d),p=n(64),f=i(p),m=n(20),v=i(m),g=n(87),y=i(g),b=v.default.extend({name:"HubModel",context:["server","section","allowSync"],entityType:l.HUB,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,c.default)(this.entityType,e.hubIdentifier,this.server.entityID(),this.section&&this.section.entityID());
},idAttribute:"hubIdentifier",rootPropertyName:"Hub",url:function(){return this.get("key")||this.get("hubKey")},sessionAttrs:{isMetadataListPending:h.default.boolean,isMetadataListPopulated:h.default.boolean,metadataListError:h.default.object},syncedAttrs:{key:h.default.string,hubKey:h.default.string,hubIdentifier:h.default.string,title:h.default.string,type:h.default.string,size:h.default.integer,more:h.default.boolean,random:h.default.boolean,browse:h.default.boolean},syncedRelations:{metadataList:{
relationClass:y.default}},defaults:{isMetadataListPending:!0,isMetadataListPopulated:!1,metadataListError:null},initialize:function(){this.listenTo(this.get("metadataList"),"change:populatedRange",this.onPopulatedRangeChange)},augmentResponseText:function(e,t){return t===f.default.xml?s.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){var t=s.default.parseInteger(e.size)||0;return e.metadataList={listIdentifier:e.hubIdentifier,containerKey:e.key||e.hubKey,Metadata:e.Metadata,
size:t},e},onPopulatedRangeChange:function(e,t){var n=t.size,i=e.get("totalSize"),r={size:n};null!=i&&(r.more=i>n),this.set(r)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(735),o=i(s),l=a.default.extend({name:"OverlayCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),s=i(a),o=n(132),l=i(o),u=n(22),c=r(u),d=n(168),h=i(d),p=n(18),f=i(p),m=n(20),v=i(m),g=n(736),y=i(g),b=v.default.extend({mixins:[h.default],name:"PlaylistListModel",context:["server","section"],idAttribute:"key",collectionName:"playlists",url:function(){return this.getPaginatedUrl(s.default.result(this,"containerKey"))},containerKey:function(){var e=this.section.get("currentType"),t=this.section.get("currentSort"),n={type:15};return t?n.sort=t.id+":"+(t.get("direction")||"asc"):n.sort="titleSort:asc",
e&&(n.playlistType=e),this.section.get("onlyDumb")&&(n.smart=0),c.join("/playlists/all",n)},sessionAttrs:{isPlaylistList:f.default.boolean,currentPageStart:f.default.integer,currentPageSize:f.default.integer,populatedRange:f.default.object},syncedAttrs:{totalSize:f.default.integer},syncedRelations:{playlists:{relationClass:y.default,rootPropertyName:"Playlist",options:function(e){return{containerKey:s.default.result(this,"containerKey")}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},
defaults:function(){return{isPlaylistList:!0,populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},sync:function(e,t,n){var i=l.default.addVersionHeader(2,n);return v.default.prototype.sync.call(this,e,t,i)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(220),a=i(r),s=n(18),o=i(s),l=n(20),u=i(l),c=u.default.extend({name:"TagModel",context:["server","section"],idAttribute:"tag",
syncedAttrs:{id:o.default.integer,tag:{type:o.default.string,save:!0},tagType:o.default.integer,librarySectionType:o.default.integer,librarySectionID:o.default.string,role:o.default.string,thumb:o.default.string,count:o.default.integer},derivedAttrs:{thumbTranscodeUrl:function(){var e=this.get("thumb");if(e)return(0,a.default)(this.server,e)}}});t.default=c,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(45),n(167)],r=function(e,t,n,i){"use strict";var r=n.extend({whitelistedAttrs:["friendlyName","label","capabilities"],
defaults:{protocolCapabilities:["playback","timeline","mirror","playqueues"]},initialize:function(){this.set("nowPlaying",new i([],{server:this.server}))},parse:function(n){var i=e.pick(n,this.whitelistedAttrs);return i.friendlyName=t("<div/>").html(i.friendlyName).text(),i.protocol=n.receiverType,i.volume=n.volume.level,i.muted=n.volume.muted,i}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(18),o=i(s),l=n(267),u=i(l),c=n(43),d=i(c),h=u.default.extend({
name:"PhotoPlayerModel",sessionAttrs:a.default.extend({},u.default.prototype.sessionAttrs,{slideshowState:o.default.oneOf(d.default.slideshowStates.PLAYING,d.default.slideshowStates.PAUSED)}),defaults:function(){return a.default.extend({},u.default.prototype.defaults.apply(this),{slideshowState:d.default.slideshowStates.PAUSED,slideshowPaused:!0,slideshowPlaying:!1})},derivedAttrs:a.default.extend({},u.default.prototype.derivedAttrs,{slideshowPaused:function(){return this.get("slideshowState")===d.default.slideshowStates.PAUSED;
},slideshowPlaying:function(){return this.get("slideshowState")===d.default.slideshowStates.PLAYING}})});t.default=h,e.exports=t.default},function(e,t,n){var i,r;i=[n(380),n(467),n(166),n(388)],r=function(e,t,n,i){"use strict";var r=2592e5,a=n.extend({storageKey:"resumePlayQueue",serialize:function(e){return n.prototype.serialize.call(this,t.augmentDictionary(e,{ttl:r}))},_getStorage:function(){return e}}),s=i.extend({initialize:function(e,t){i.prototype.initialize.apply(this,arguments),this.user=t.user,
this.storage=new a},storageKey:function(){return this.user.id},toJSON:function(){var e=i.prototype.toJSON.apply(this,arguments);return t.augmentObj(e,r,!0)}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(22),u=a(l),c=n(140),d=r(c),h=n(18),p=r(h),f=n(20),m=r(f),v=n(167),g=r(v),y=m.default.extend({name:"PlexPlayerModel",context:["server"],idAttribute:"machineIdentifier",
rootPropertyName:"Server",sessionAttrs:{nowPlaying:p.default.instanceOf(g.default).isRequired},syncedAttrs:{machineIdentifier:p.default.string,name:p.default.string,address:p.default.string,port:p.default.string,deviceClass:p.default.string,version:p.default.string,product:p.default.string,protocol:p.default.string,protocolVersion:p.default.string,protocolCapabilities:p.default.list},derivedAttrs:{friendlyName:function(){return this.get("name")}},defaults:function(){return{nowPlaying:new g.default([],{
server:this.server})}},url:function(){return"http://"+this.get("address")+":"+this.get("port")+"/"},getXHROptions:function(e,t){return i({url:this.resolveUrl(e),dataType:"text",headers:this.getHeaders()},t)},resolveUrl:function(e){return/^\w+:\/\//.test(e)?e:u.join([o.default.result(this,"url"),e])},getHeaders:function(){var e=d.default.getInstance(),t=o.default.clone(e);return t}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),s=i(a),o=n(59),l=r(o),u=n(77),c=i(u),d=n(127),h=i(d),p=n(18),f=i(p),m=n(55),v=i(m),g=v.default.extend({name:"SessionModel",entityType:l.SESSION_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,c.default)(this.entityType,e.sessionKey,this.server.entityID())},idAttribute:"sessionKey",cache:new h.default,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.sessionKey)},syncedAttrs:s.default.extend({},v.default.prototype.syncedAttrs,{
sessionKey:f.default.string,Player:f.default.object,User:f.default.object,TranscodeSession:f.default.object})});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(18),o=i(s),l=n(20),u=i(l),c=n(765),d=i(c),h=u.default.extend({name:"StoredServerModel",idAttribute:"machineIdentifier",syncedAttrs:{machineIdentifier:o.default.string,friendlyName:o.default.string,accessToken:o.default.string,sourceTitle:o.default.string,
home:o.default.boolean,synced:o.default.boolean,serverClass:o.default.string,isShared:o.default.boolean,version:o.default.string,publicAddressMatches:o.default.boolean},syncedRelations:{connections:{relationClass:d.default}},copyFromServer:function(e){var t={};a.default.each(this.syncedAttrs,function(n,i){t[i]=e.get(i)}),this.set(t)}});t.default=h,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(54),n(166)],r=function(e,t,n){"use strict";var i=n.extend({storageKey:"sessionstats",incPlaybackCount:function(){
this.save("playbackCount",this.get("playbackCount")+1)},startSession:function(){var n=(new Date).getTime();this.save({playbackCount:0,startTime:n,heartbeatTime:n}),setInterval(e.bind(function(){this.save("heartbeatTime",(new Date).getTime())},this),t.get("heartbeatInterval"))}});return new i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(35),n(45),n(778)],r=function(e,t,n,i,r){"use strict";var a=i.extend({whitelistedAttrs:["id","home","protected","restricted","title","username","email","thumb","recommendationsPlaylistId","allowSync","allowCameraUpload","allowChannels","filterMovies","filterTelevision","filterMusic","filterPhotos"],
saveAttrs:["allowSync","allowCameraUpload","allowChannels","filterMovies","filterTelevision","filterMusic","filterPhotos"],filterAttrs:["filterMovies","filterTelevision","filterMusic","filterPhotos"],urlRoot:function(){return this.get("home")?"/api/users":"/api/friends"},convert:function(t){var i=e.isObject(t)?t:n.parseXML(t);return i.User&&(i=i.User),n.parseInteger(i,"id"),n.parseBoolean(i,["home","protected","restricted","allowSync","allowCameraUpload","allowChannels"]),n.parseQueryString(i,["filterMovies","filterTelevision","filterMusic","filterPhotos"],"|"),
n.parseArray(i,"Server"),i},parse:function(t){var n=this.convert(t);return this.parseServers(n),n=e.pick(n,this.whitelistedAttrs)},parseServers:function(e){var t=this.get("serverShares"),n=e.Server;t?t.set(n,{parse:!0}):(t=new r(n,{server:this.server,parent:this,populated:!0,parse:!0}),this.set("serverShares",t))},cloneDeep:function(){var e=this.toJSON();e.Server=e.serverShares.toJSON(),e.serverShares=null;var n={server:this.server,section:this.section,channel:this.channel,parent:this.parent,parse:!0,
skipCache:!0};return new this.constructor(t.extend(!0,{},e),n)||null},getSaveParams:function(t,n){if(e.isEmpty(t)){var r=this.pick(this.saveAttrs);return e.map(r,function(t,n,i){e.isBoolean(t)?i[n]=t?"1":"0":e.contains(this.filterAttrs,n)&&(i[n]=this.stringifyFilter(t))},this),r}return i.prototype.getSaveParams.apply(this,arguments)},stringifyFilter:function(t){var n=e.map(e.keys(t),function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])});return n.join("|")}});return a}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(60),n(270)],r=function(e,t){"use strict";var n=e.extend({model:t,url:"/api/home/users",parse:function(e){return this.convert(e,"User")}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(132),n(60),n(271)],r=function(e,t,n,i){"use strict";var r=n.extend({model:i,url:function(){return this.device?"/devices/"+this.device.get("clientIdentifier")+"/sync_items":"/servers/"+this.parent.id+"/sync_lists"},sync:function(e,i,r){
var a=t.addVersionHeaderForDevice(this.device,r);return n.prototype.sync.call(this,e,i,a)},parse:function(t){var n=this.convert(t),i=[],r=function(t,n){n&&(e.isArray(n)||(n=[n]),e.each(n,function(e){e.clientIdentifier=t,i.push(e)}))};return n.SyncList&&!e.isArray(n.SyncList)&&(n.SyncList=[n.SyncList]),e.each(n.SyncList,function(e){r(e.clientIdentifier,e.SyncItems.SyncItem)}),n.SyncItems&&r(n.clientIdentifier,n.SyncItems.SyncItem),i},filterByServer:function(e){var t=this.filter(function(t){var n=t.get("Server");
return n&&n.machineIdentifier===e});return this.clone(t)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(782),o=i(s),l=a.default.extend({name:"UserEntitlementCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(22),l=r(o),u=n(59),c=r(u),d=n(77),h=i(d),p=n(18),f=i(p),m=n(55),v=i(m),g=v.default.prototype,y=v.default.extend({
name:"UserPlaylistItemModel",entityType:c.USER_PLAYLIST_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,h.default)(this.entityType,e.id,this.server.entityID())},context:["server","section","channel","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],idAttribute:"id",cache:null,url:function(){return l.join(["/pms/playlists/",this.userPlaylistKey,"items",this.id])},sessionAttrs:s.default.extend({},g.sessionAttrs,{
isUserPlaylistItem:f.default.boolean}),syncedAttrs:s.default.extend({},g.syncedAttrs,{id:f.default.integer,sourceTitle:f.default.string,recommender:f.default.string,message:f.default.string}),defaults:s.default.extend({},g.defaults,{isUserPlaylistItem:!0}),augmentResponse:function(e){var t=g.augmentResponse.call(this,e);if(t.type="userPlaylistItem",t.ratingKey=t.url,t.thumb){var n=/\?(\d+)$/.exec(t.thumb);n&&(t.addedAt=n[1])}return t}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";
var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(6),l=i(o),u=n(53),c=i(u),d=n(22),h=r(d),p=n(168),f=i(p),m=n(18),v=i(m),g=n(64),y=i(g),b=n(20),w=i(b),S=n(785),P=i(S),x={WATCH_LATER:"queue",RECOMMENDED:"recommendations"},C={ALL:"all",UNWATCHED:"unwatched",WATCHED:"watched"},T=w.default.extend({mixins:[f.default],name:"UserPlaylistModel",context:["server"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(s.default.result(this,"containerKey"));
},containerKey:function(){return h.join(["/pms/playlists",this.get("key"),this.get("subset")])},sessionAttrs:{isUserPlaylist:v.default.boolean,key:v.default.oneOf(x.WATCH_LATER,x.RECOMMENDED).isRequired,subset:v.default.oneOf(C.ALL,C.UNWATCHED,C.WATCHED).isRequired,currentPageStart:v.default.integer,currentPageSize:v.default.integer,populatedRange:v.default.object},syncedAttrs:{totalSize:v.default.integer,identifier:v.default.string,mediaTagPrefix:v.default.string,mediaTagVersion:v.default.string,
viewGroup:v.default.string,title:v.default.string},syncedRelations:{metadataItems:{relationClass:P.default,rootPropertyName:"Metadata",options:function(e){return{identifier:e.identifier,mediaTagPrefix:e.mediaTagPrefix,mediaTagVersion:e.mediaTagVersion,containerKey:s.default.result(this,"containerKey"),userPlaylistKey:e.key}},setOptions:function(e){return{remove:e.remove,at:e.at}}}},derivedAttrs:{label:function(){var e=this.get("key");return e===x.WATCH_LATER?(0,l.default)("Watch Later"):e===x.RECOMMENDED?(0,
l.default)("Recommended"):void 0},helpRoute:function(){var e=this.get("key");if(e===x.WATCH_LATER)return"#!/playlist/"+e+"/help"},playlistRoute:function(){return"#!/playlist/"+this.get("key")}},defaults:function(){return{isUserPlaylist:!0,subset:C.ALL,populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===y.default.xml?c.default.replaceMetadataXMLElementNames(e):e},filterWatched:function(){var e=this.get("metadataItems"),t=e.filter(function(e){
return!!e.get("viewCount")});return e.clone(t)},filterUnwatched:function(){var e=this.get("metadataItems"),t=e.filter(function(e){return!e.get("viewCount")});return e.clone(t)}},{keys:x,subsets:C});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(786),o=i(s),l=a.default.extend({name:"UserProviderCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(787),o=i(s),l=a.default.extend({name:"UserRoleCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(18),o=i(s),l=n(20),u=i(l),c=n(783),d=i(c),h=u.default.extend({name:"UserSubscriptionModel",syncedAttrs:{active:o.default.boolean,status:o.default.string,plan:o.default.string},syncedRelations:{features:{
relationClass:d.default}},augmentResponse:function(e){var t=e.features;return t&&t.feature?a.default.extend({},e,{features:t.feature}):e}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.server,n=t.getXHROptions("/library/metadata/"+e.id+"/analyze",{type:"PUT"});e.set("mediaState",u.ANALYZING);var i=o.default.ajax(n).fail(function(t){e.unset("mediaState")});return i.promise()}var r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;
var s=n(5),o=r(s),l=n(799),u=a(l);e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.server,n=t.getXHROptions("/library/metadata/"+e.id+"/refresh",{type:"PUT"});e.set("metadataState",u.QUEUED);var i=o.default.ajax(n).fail(function(t){e.unset("metadataState")});return i.promise()}var r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(5),o=r(s),l=n(431),u=a(l);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(28),a=n(142),s=i(a),o=(0,r.createSelector)(s.default,function(e){return e.libraries});t.default=o,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,a.createSelector)(function(e,t){var n=t.metadataListEntityID;return n},o.default,function(e,t){return t[e]})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(28),s=n(425),o=r(s);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(28),a=n(142),s=i(a),o=(0,r.createSelector)(s.default,function(e){return e.hubs});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),a=n(142),s=i(a),o=(0,r.createSelector)(s.default,function(e){return e.metadataLists});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(28),o=n(427),l=i(o),u=(0,
s.createSelector)(l.default,function(e){return a.default.where(e,{isConnected:!0,isOutOfDate:!0})});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),a=n(275),s=i(a),o=(0,r.createSelector)(s.default,function(e){return e.servers},function(e,t){return t?t.map(function(t){return e[t]}):[]});t.default=o,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(56),n(276)],r=function(e,t,n){"use strict";var i=n.extend({
maxCycles:3,maxSize:50,imageParamsRegex:/&?(width|height|minSize)=([^&]+)/g,initialize:function(){n.prototype.initialize.apply(this,arguments),this._infoMemo={}},store:function(t,n){if(n||(n=this.getItemCacheKey(t)),n){var i=t.url,r=this.getImageInfo(i),a={url:i,blobUrl:t.blobUrl,size:r.size},s=this.get(n);if(s){if(!s.images.hasOwnProperty(i)){var o=s.sizes;s.images[i]=a;var l=e.sortedIndex(o,a,"size");o.splice(l,0,a)}}else s={images:{},sizes:[a]},s.images[i]=a,this.startListening(),s._cacheKey=n,
this._cache[n]=s,this.size++,t.persistInCache||this.setItemCycle(s,n,e.first(this.cycles))}},getItemCacheKey:function(e){var t=this.getImageInfo(e.url);return t.key},getImageInfo:function(e){if(this._infoMemo.hasOwnProperty(e))return this._infoMemo[e];var t={width:0,height:0,minSize:0},n=e.replace(this.imageParamsRegex,function(e,n,i){return t[n]=parseInt(i,10),""}),i={key:n,size:t.width*t.height+t.minSize};return this._infoMemo[e]=i,i},removeImageInfo:function(e){this._infoMemo.hasOwnProperty(e)&&delete this._infoMemo[e];
},getBlobUrl:function(e){var t=this.getImageInfo(e),n=this.get(t.key);if(n){var i=n.images[e];if(i)return i.blobUrl}},getPlaceholder:function(t){var n=this.getImageInfo(t),i=this.get(n.key);if(i){if(i.images[t])return;var r=e.last(i.sizes);return r.blobUrl}},remove:function(i,r){n.prototype.remove.apply(this,arguments),e.each(i.sizes,function(e){this.removeImageInfo(e.url),t.hasObjectUrl&&window.URL.revokeObjectURL(e.blobUrl)},this)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="error";t.ERROR=n;var i="success";t.SUCCESS=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DISABLED:0,ENABLED:1,VERBOSE:2};n.settings=[{value:n.DISABLED,title:"Disabled"},{value:n.ENABLED,title:"Enabled"},{value:n.VERBOSE,title:"Verbose"}],t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="queued";t.QUEUED=n;var i="matching";t.MATCHING=i;
var r="processing";t.PROCESSING=r;var a="loading";t.LOADING=a},function(e,t){"use strict";function n(e){return e.toLowerCase()}function i(e,t){e=n(e);var a=!i.preventRecycle&&t;if(a&&r[e])return r[e];var s=document.createElement(e);return a&&(r[e]=s),s}Object.defineProperty(t,"__esModule",{value:!0});var r={};t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=s.default.duration(e),n=365*t.years(),i=30*t.months(),r=n+i+t.days(),a=r>1||r<=0?(0,l.default)("days"):(0,l.default)("day");
return r+" "+a}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a),o=n(6),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=s.default.duration(e),n=t.days(),i=t.hours(),r=n>1?(0,l.default)("days"):(0,l.default)("day"),a=i>1||i<=0?(0,l.default)("hours"):(0,l.default)("hour");return n&&i?n+" "+r+", "+i+" "+a:n?n+" "+r:i+" "+a}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a),o=n(6),l=r(o);t.default=i,
e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=s.default.duration(e),n=24*t.days()*60,i=60*t.hours(),r=t.minutes()+i+n,a=t.seconds();return r?(0,l.default)("{1} min",r):a>0?(0,l.default)("{1} sec",a):""}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a),o=n(6),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=arguments.length<=1||void 0===arguments[1]?"MMMM D, YYYY":arguments[1];return e?s.default.unix(e).format(t):"";
}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return function(t,n,i){var a=i.value;return i.value=(0,r.throttle)(a,e),i}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(3);e.exports=t.default},function(e,t,n){var i,r;i=[n(3)],r=function(e){"use strict";var t={pms:/plex.*media.*server|plex.*media.*hub/i,osx:/macosx/i,pht:/konvergo|plex.*home.*theater|plex.*media.*center/i,
win8:/windows/i,wp:/windows.*phone|wince/i,ios:/ios/i,android:/android/i,chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet.*explorer|explorer.*windows/i,opera:/opera/i,wiiu:/wii.*u/i,samsung:/samsung/i,roku:/roku/i,atv:/plex.*atv|tvos/i,gtv:/google.*tv/i,cloudsync:/cloudsync/i,dlna:/dlna/i,xbox:/xbox|mystery.*5/i,linux:/linux/i},n=e.pairs(t),i={},r={getIcon:function(t){var r="default";return t?i.hasOwnProperty(t)?i[t]:(e.every(n,function(e){var n=e[1].test(t);return n&&(r=e[0],i[t]=r),
!n}),r):r}};return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";function n(){return window.overridePixelRatio||window.devicePixelRatio||1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(143),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(290),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(221),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(299),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t){"use strict";
function n(e){return!(!e||!e.status)&&(401===e.status||422===e.status)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=e.get("Media"),i=s.default.indexOf(n,s.default.findWhere(n,{id:t}));return i}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=[];return s.default.isArray(e)||(e=[e]),s.default.each(e,function(e){
var n=e.Part;n&&s.default.each(n,function(e){e.exists!==!1&&e.accessible!==!1||t.push(e)})}),t}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=void 0;if(e.Part.length>1)for(var i=0,r=0,a=e.Part.length;r<a&&(n=e.Part[r],n.duration)&&(i+=n.duration,!(i>t));r++);else n=s.default.first(e.Part);return n}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=e.Part,i=s.default.indexOf(n,s.default.findWhere(n,{key:t}));return i}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t){"use strict";function n(e,t){return e>t?50:e<=0||t<=0?0:Math.round(e/t*100)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){var i=n;if(e.Part.length>1)for(var r=0,a=e.Part.length;r<a;r++){
var s=e.Part[r];if(!s.duration)break;if(t.key===s.key)break;i-=s.duration}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){var i=(0,s.default)(e,t);if(n=(0,l.default)(i,n)){var r=(0,c.default)(e,i,t);return"/library/parts/"+i.id+"/indexes/"+n+"/"+r}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(447),s=r(a),o=n(822),l=r(o),u=n(450),c=r(u);t.default=i,e.exports=t.default},function(e,t,n){
"use strict";function i(e){var t=l.default.get("audio").id,n=(0,c.default)(e,{streamType:t,selected:!0});return s.default.first(n)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(71),l=r(o),u=n(92),c=r(u);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=l.default.get("subtitles").id,n=(0,c.default)(e,{streamType:t,selected:!0}),i=s.default.first(n);if(i&&i.id>0)return i}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),s=r(a),o=n(71),l=r(o),u=n(92),c=r(u);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){if(!e)return(0,s.default)("None");var t=e.language||(0,s.default)("Unknown"),n=l.default.get(e.streamType),i=n&&n.typeString,r=e.codec,a=[];return"subtitles"===i&&r?(a.push(r.toUpperCase()),e.key&&a.push((0,s.default)("External")),e.forced&&a.push((0,s.default)("Forced"))):"audio"===i&&r&&(a.push((0,c.default)(r)),e.channels&&a.push((0,h.default)(e.channels))),a.length?t+" ("+a.join(" ")+")":t;
}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=r(a),o=n(71),l=r(o),u=n(289),c=r(u),d=n(288),h=r(d);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.bitrate||e.maxVideoBitrate,n=e.videoResolution;if(!t&&!n)return(0,s.default)("Unknown");var i=[];if(t){var r=t<1e3||t%1e3===0?0:1;i.push((0,c.default)(t,r))}if(n&&(!t||t>=1e3)){var a=l.default.getResolutionFromSize(n);i.push((0,h.default)(a))}return i.join(" ")}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(6),s=r(a),o=n(82),l=r(o),u=n(290),c=r(u),d=n(221),h=r(d);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(e=parseInt(e,10),t=t||1,s.default.isNaN(e))return"";if(0===e)return"0 Bytes";var n=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,n)).toFixed(t)+" "+o[n]}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=["Bytes","KB","MB","GB","TB"];t.default=i,e.exports=t.default},function(e,t,n){
"use strict";function i(e){var t=e.item||e.items[0];if((0,y.default)(e))return s.default.Deferred().resolve((0,c.default)(t,e)).promise();var n=s.default.Deferred();return e.notify=n.notify,(0,f.default)(t,e).then(function(n){return e.itemDecision=n,(0,h.default)(t,e)}).done(n.resolve).fail(function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];e.silent||((0,v.default)(),l.default.warn("[PlayMedia] Unable to queue item; failed to get next unwatched item"));var t="Couldn't get the next item to play. code: "+e.status;
l.default.warn("[PlayMedia]",t),n.reject(t)}),n.promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o=n(26),l=r(o),u=n(292),c=r(u),d=n(841),h=r(d),p=n(838),f=r(p),m=n(458),v=r(m),g=n(843),y=r(g);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){l.default.trigger("show:alert",{type:"error",message:e||(0,s.default)("Sorry, there was a problem playing this item.")})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(6),s=r(a),o=n(8),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return l?performance.now():Date.now()-u}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(26),s=r(a),o=!!window.performance,l=o&&!!window.performance.now,u=void 0;l||(s.default.warn("`performance.now` is not available; a `Date.now()` fallback will be used instead."),u=o&&performance.timing&&performance.timing.navigationStart?performance.timing.navigationStart:Date.now()),
e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}):""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={encode:function(e){var t="",i=void 0,r=void 0,a="",s=void 0,o=void 0,l=void 0,u="",c=0;do i=e.charCodeAt(c++),
r=e.charCodeAt(c++),a=e.charCodeAt(c++),s=i>>2,o=(3&i)<<4|r>>4,l=(15&r)<<2|a>>6,u=63&a,isNaN(r)?l=u=64:isNaN(a)&&(u=64),t=t+n.charAt(s)+n.charAt(o)+n.charAt(l)+n.charAt(u),i=r=a="",s=o=l=u="";while(c<e.length);return t},decode:function(e){var t="",i=void 0,r=void 0,a="",s=void 0,o=void 0,l=void 0,u="",c=0,d=/[^A-Za-z0-9\+\/\=]/g;if(d.exec(e))throw new Error('There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, "+", "/", and "="\nExpect errors in decoding.');
e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do s=n.indexOf(e.charAt(c++)),o=n.indexOf(e.charAt(c++)),l=n.indexOf(e.charAt(c++)),u=n.indexOf(e.charAt(c++)),i=s<<2|o>>4,r=(15&o)<<4|l>>2,a=(3&l)<<6|u,t+=String.fromCharCode(i),64!==l&&(t+=String.fromCharCode(r)),64!==u&&(t+=String.fromCharCode(a)),i=r=a="",s=o=l=u="";while(c<e.length);return unescape(t)}};t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return(0,l.default)((0,s.default)(e).join("_"))}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(859),s=r(a),o=n(295),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&l.default.parseBoolean(e)?(0,s.default)("Yes"):(0,s.default)("No")}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=r(a),o=n(53),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){if(e&&e.length){var t=e.length;return 1===t?e[0]:2===t?(0,s.default)("{1} and {2}",e[0],e[1]):3===t?(0,s.default)("{1}, {2}, and {3}",e[0],e[1],e[2]):(0,
s.default)("{1}, {2}, and {3} others",e[0],e[1],e.length-2)}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return(0,s.default)((0,o.getLastSegment)(e||""),t)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(299),s=r(a),o=n(22);t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(26),n(10),n(377)],r=function(e,t,n){"use strict";function i(t,n){
l=setTimeout(function(){l=null,r(),e.times(n,a),o.length&&i(t,n)},t)}function r(){var t=(new Date).getTime();o=e.filter(o,function(e){return e.expire>t})}function a(){for(var e=0;e<o.length;e++){var n=o[e],i=!1;try{i=n.fn.call(n.thisArg,n.arg)}catch(r){t.error(r.name+": "+r.message),i=!0}if(i){o.splice(e,1);break}}}var s={defaultWait:10,defaultBatchSize:2,timeout:3e4,enqueue:function(e,t,r,a,s){var u={fn:e,thisArg:t,cancelToken:r,expire:(new Date).getTime()+this.timeout,arg:s};if(void 0===a?o.push(u):o.splice(a,0,u),
!l){var c=n.hasRegistered("experience")?n.resolve("experience").taskThrottle:{},d=c.wait||this.defaultWait,h=c.batchSize||this.defaultBatchSize;i(d,h)}},cancel:function(t){o=e.filter(o,function(e){return e.cancelToken!==t})},throttleWithRAF:function(e,t){var n=function i(){i.rafID&&window.cancelAnimationFrame(i.rafID),i.rafID=window.requestAnimationFrame(function(){delete i.rafID,e.call(t)})};return n}},o=[],l=null;return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3)],
r=function(e){"use strict";var t={augmentDictionary:function(n,i){return i=i||{},e.reduce(n,function(n,r,a){var s=(new Date).getTime(),o=e.isFunction(i.ttl)?i.ttl(a,r):i.ttl,l=e.isFunction(i.refresh)?i.refresh(a,r):i.refresh,u=e.isObject(r)?t.augmentObj(r,o,l,s):null;return u&&(n[a]=u),n},{})},augmentObj:function(e,t,n,i){var r=e._ttl;if(i=i||(new Date).getTime(),r){if(n)r.expireAt=i+t;else if(r.expireAt<=i)return null}else r={expireAt:i+t};return e._ttl=r,e}};return t}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),a=i(r),s=n(145),o=i(s),l=["key"],u=(0,o.default)(l,[{key:"all",title:function(){return(0,a.default)("All")}},{key:"unwatched",title:function(){return(0,a.default)("Unwatched")}},{key:"newest",title:function(){return(0,a.default)("Recently Released")}},{key:"recentlyAdded",title:function(){return(0,a.default)("Recently Added")}},{key:"recentlyViewed",title:function(){return(0,a.default)("Recently Viewed");
}},{key:"recentlyViewedShows",title:function(){return(0,a.default)("Recently Viewed Shows")}},{key:"onDeck",title:function(){return(0,a.default)("On Deck")}},{key:"folder",title:function(){return(0,a.default)("By Folder")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";function i(e){return b.default.createElement("img",e)}function r(e){var t=e.src,n=e.style,i=e.width,r=e.height,a=e.backgroundSize,o=e.backgroundPosition,l=d(e,["src","style","width","height","backgroundSize","backgroundPosition"]),u=s({
backgroundImage:"url("+t+")",backgroundSize:a,backgroundPosition:o,width:i,height:r},n);return b.default.createElement("div",s({style:u},l))}function a(e){var t=e.component,n=e.transitionProps,i=e.isLoaded,r=e.style,a=e.src,o=e.prevSrc,l=d(e,["component","transitionProps","isLoaded","style","src","prevSrc"]),u=t;return b.default.createElement(N.default,n,i&&b.default.createElement(u,s({style:j(2,r)},l,{src:a,key:a})),!i&&o&&b.default.createElement(u,s({style:j(1,r)},l,{src:o,key:o})))}var s=n(11).default,o=n(16).default,l=n(17).default,u=n(24).default,c=n(15).default,d=n(14).default,h=n(2).default,p=n(19).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.ImgTag=i,t.BackgroundImgTag=r,t.TransitionImg=a;var f=n(3),m=h(f),v=n(5),g=h(v),y=n(7),b=h(y),w=n(23),S=n(22),P=p(S),x=n(439),C=h(x),T=n(56),_=h(T),E=n(848),k=h(E),I=n(428),A=h(I),M=n(27),D=h(M),R=n(565),O=h(R),L=n(226),N=h(L),U=new A.default;t.cache=U;var F="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";t.EMPTY_IMAGE=F,r.propTypes={src:y.PropTypes.string,width:y.PropTypes.number,height:y.PropTypes.number,style:y.PropTypes.object,
backgroundSize:y.PropTypes.string,backgroundPosition:y.PropTypes.string},r.defaultProps={backgroundSize:"cover",backgroundPosition:"center"};var j=function(e,t){return s({position:"absolute",zIndex:e},t)};a.propTypes={component:y.PropTypes.oneOf([i,r]),transitionProps:y.PropTypes.shape(N.default.propTypes),isLoaded:y.PropTypes.bool,prevSrc:y.PropTypes.string,src:y.PropTypes.string,style:y.PropTypes.object};var B=function(e){function t(e,n){c(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isLoaded:!1,url:this.getImageUrl(e),src:F,prevSrc:F}}return l(t,e),u(t,[{key:"componentDidMount",value:function(){this.loadImage(this.props,this.state.url)}},{key:"componentWillReceiveProps",value:function(e){var t=this.getImageUrl(e),n=this.state.url;if(n!==t){var i=this.state.src;this.setState({isLoaded:!1,url:t,prevSrc:i}),this.loadImage(e,t)}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,D.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this.abortImage();
}},{key:"getImageUrl",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];if(e.src)return e.src;if(e.url){var t=(0,C.default)(),n=s({width:Math.round(e.width*t),height:Math.round(e.height*t)},e.filters);e.minSize&&(n.minSize=1),e.format&&(n.format=e.format),e.quality&&(n.quality=e.quality);var i=m.default.result(e,"url"),r=i.indexOf("?"),a=i;return r>-1?(a=P.join(i.substring(0,r),n),a+=a.indexOf("?")===-1?"?":"&",a+=i.substring(r+1)):a=P.join(a,n),a}}},{key:"getImageProps",
value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=e.exposeUrl,n=e.backgroundSize,i=e.backgroundPosition,r=e.width,a=e.height,s=e.style,o=e.className,l=this.state,u=l.src,c=l.url;return{"data-image-url":t?c:void 0,src:u,style:s,className:o,backgroundSize:n,backgroundPosition:i,width:r,height:a}}},{key:"loadImage",value:function(e,t){if(void 0===e&&(e=this.props),this.abortImage(),t){var n=e.src?this.preloadImage({url:t}):this.loadBlob({url:t});this._cancelable=(0,
k.default)(n),this._cancelable.promise.then(this.onLoad,this.onError,this.onLoad)}}},{key:"loadBlob",value:function(e){var t=this,n=e.url;if(!this.props.allowImageBlobs)return this.preloadImage({url:n});var i=g.default.Deferred(),r=U.getBlobUrl(n);if(r)return i.resolve({url:r}),i.promise();var a=U.getPlaceholder(n);a&&i.notify({url:a,isPlaceholder:!0});var s=new XMLHttpRequest;return s.open("GET",n,!0),s.responseType="arraybuffer",this._xhr=s,s.onreadystatechange=function(){if(4===s.readyState)if(s.onreadystatechange=null,
t._xhr=null,200===s.status){var e=new Blob([s.response],{type:"image/jpeg"}),r=window.URL.createObjectURL(e);U.store({url:n,blobUrl:r}),i.resolve({url:r})}else i.reject({url:n})},s.send(),i.then(this.preloadImage,this.onError,this.preloadImage),i.promise()}},{key:"preloadImage",decorators:[w.autobind],value:function(e){if(!this.props.allowImagePreloading)return g.default.Deferred().resolve(e).promise();var t=g.default.Deferred(),n=new Image,i=e.url,r=e.isPlaceholder;return n.onload=function(){n.onload=n.onabort=n.onerror=null,
r?t.notify(e):t.resolve(e)},n.onabort=n.onerror=function(){n.onload=n.onabort=n.onerror=null,t.reject(e)},n.src=i,t.promise()}},{key:"abortImage",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.abort(),this._xhr=null),this._cancelable&&this._cancelable.cancel()}},{key:"onLoad",decorators:[w.autobind],value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.url;this.setState({isLoaded:!0,src:t}),this.props.onLoad(this.state.url,t)}},{key:"onError",
decorators:[w.autobind],value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.url,n=e.isCanceled,i=void 0!==n&&n;i||(this.setState({isLoaded:!0,src:F}),this.props.onError(this.state.url,t))}},{key:"render",value:function(){var e=this.props,t=e.background,n=e.transition,o=e.transitionProps,l=this.state,u=l.isLoaded,c=l.prevSrc,d=t?r:i,h=this.getImageProps();return n?b.default.createElement(a,s({component:d,isLoaded:u,prevSrc:c,transitionProps:o},h)):b.default.createElement(d,s({},h,{
src:u?h.src:c}))}}]),t}(y.Component);B.propTypes={className:y.PropTypes.string,src:y.PropTypes.string,url:y.PropTypes.oneOfType([y.PropTypes.string,y.PropTypes.func]),background:y.PropTypes.bool,backgroundSize:y.PropTypes.string,backgroundPosition:y.PropTypes.string,exposeUrl:y.PropTypes.bool,width:y.PropTypes.number,height:y.PropTypes.number,minSize:y.PropTypes.bool,format:y.PropTypes.string,quality:y.PropTypes.number,filters:y.PropTypes.shape({blur:y.PropTypes.number,background:y.PropTypes.string,
opacity:y.PropTypes.number,saturation:y.PropTypes.number}),transition:y.PropTypes.bool,transitionProps:y.PropTypes.shape(N.default.propTypes),allowImageBlobs:y.PropTypes.bool,allowImagePreloading:y.PropTypes.bool,onLoad:y.PropTypes.func,onError:y.PropTypes.func},B.defaultProps={exposeUrl:!1,transition:!1,background:!1,minSize:!1,transitionProps:s({},O.default,{style:{position:"relative"}}),filters:{},allowImageBlobs:_.default.hasBlob&&_.default.hasObjectUrl,allowImagePreloading:!0,onLoad:function(){},
onError:function(){}},t.default=B},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(66),d=o(c),h=n(597),p=o(h),f=n(23),m=n(27),v=o(m),g=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this._portal=null,this._portalRef=null,this._closeTimeoutID=null}return r(t,e),a(t,[{key:"componentDidMount",value:function(){
this.props.isOpen&&this.renderPortal(this.props)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"componentDidUpdate",value:function(e){this.props.isOpen?(this._closeTimeoutID=clearTimeout(this._closeTimeoutID),this.renderPortal(this.props)):this._portal&&(this.props.closeTimeout&&this.renderPortal(this.props),this._closeTimeoutID||(this._closeTimeoutID=setTimeout(this.removePortal,this.props.closeTimeout)))}},{key:"componentWillUnmount",value:function(){this.removePortal();
}},{key:"_setAttrs",value:function(e,t){this._setClassName(e,t.className),this._setStyle(e,t.style)}},{key:"_setClassName",value:function(e,t){null!=t&&(e.className=t)}},{key:"_setStyle",value:function(e,t){t&&p.default.setValueForStyles(e,t)}},{key:"renderPortal",value:function(e){var t=this.props.onPortalRef,n=this._portal||document.createElement("div");this._setAttrs(n,e),this._portal||document.body.appendChild(n);var i=u.default.Children.only(e.children);this._portal=n;var r=d.default.unstable_renderSubtreeIntoContainer(this,i,n);
this._portalRef!==r&&(this._portalRef=r,t&&(t(null),t(this._portalRef)))}},{key:"removePortal",decorators:[f.autobind],value:function(){var e=this.props.onPortalRef,t=this._portal;t&&(d.default.unmountComponentAtNode(t),document.body.removeChild(t)),this._portal=null,this._portalRef=null,e&&e(null),this._closeTimeoutID=clearTimeout(this._closeTimeoutID)}},{key:"render",value:function(){return null}}]),t}(l.Component);g.propTypes={className:l.PropTypes.string,style:l.PropTypes.object,children:l.PropTypes.node.isRequired,
onPortalRef:l.PropTypes.func,isOpen:l.PropTypes.bool,closeTimeout:l.PropTypes.number},l.PropTypes.defaultProps={isOpen:!0,closeTimeout:0},t.default=g,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(11).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),c=l(u),d=n(7),h=l(d),p=n(30),f=l(p),m=n(474),v=l(m),g=n(873),y=l(g),b=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state=this._getListState(e),this._keyPool=(0,y.default)("cell")}return r(t,e),a(t,[{key:"componentWillMount",value:function(){this.props.onListUpdate&&this.props.onListUpdate(this.state)}},{key:"componentWillReceiveProps",value:function(e){this.setState(this._getListState(e))}},{key:"shouldComponentUpdate",value:function(e,t){var n=this.props,i=this.state;return e.items!==n.items||e.size!==n.size||(e.viewportWidth!==n.viewportWidth||e.viewportHeight!==n.viewportHeight||(e.listTop!==n.listTop||e.listLeft!==n.listLeft||(e.isScrolling!==n.isScrolling||(e.layout!==n.layout||(t.visibleStartIndex!==i.visibleStartIndex||(t.visibleEndIndex!==i.visibleEndIndex||(t.partiallyVisibleStartIndex!==i.partiallyVisibleStartIndex||(t.partiallyVisibleEndIndex!==i.partiallyVisibleEndIndex||(t.renderStartIndex!==i.renderStartIndex||t.renderEndIndex!==i.renderEndIndex)))))))));
}},{key:"componentWillUpdate",value:function(e,t){this.props.onListUpdate&&t!==this.state&&this.props.onListUpdate(t)}},{key:"_getListState",value:function(e){var t=this._getListStyle(e),n=e.layout.getRangesForPosition(e.scrollTop,e.scrollLeft,e.size);return{listStyle:t,visibleStartIndex:n.visibleStartIndex,visibleEndIndex:n.visibleEndIndex,partiallyVisibleStartIndex:n.partiallyVisibleStartIndex,partiallyVisibleEndIndex:n.partiallyVisibleEndIndex,renderStartIndex:n.renderStartIndex,renderEndIndex:n.renderEndIndex
}}},{key:"_getListStyle",value:function(e){var t=e.items,n=e.size,i=e.layout,r=e.viewportWidth,a=e.viewportHeight,s=e.listTop,o=e.listLeft,l={viewportWidth:r,viewportHeight:a,listTop:s,listLeft:o};return i.getListStyle(l,n,t)}},{key:"renderCells",value:function(){var e=this.props,t=e.keyPropName,n=e.items,i=e.itemsOffset,r=e.size,a=e.layout,s=e.cellRenderer,l=e.isScrolling,u=e.onPageRequest,d=this.state,h=d.renderStartIndex,p=d.renderEndIndex,f=d.partiallyVisibleStartIndex,m=d.partiallyVisibleEndIndex,v=r>n.length&&p===n.length-1,g=this._keyPool.getKeys(h,p,n,i,t),y=[];
return c.default.each(g,function(e,i){var u=e.index,d=e.item,h=u>=f&&u<=m,p=a.getPositionForIndex(u,r,n);null===d&&(v=!0);var g=o({key:i,keyPropName:t,isVisible:h,isScrolling:l,cellIndex:u},p);c.default.isString(d)?g[t]=d:g=o({},d,g),y.push(s(g))}),v&&!l&&u&&u({startIndex:h,endIndex:p}),y}},{key:"render",value:function(){var e=this._getListStyle(this.props);return h.default.createElement("div",{className:(0,f.default)(this.props.className,this.props.isScrolling&&"isScrolling"),style:e},this.renderCells());
}}]),t}(d.Component);b.propTypes={className:d.PropTypes.string,keyPropName:d.PropTypes.string.isRequired,items:d.PropTypes.array.isRequired,itemsOffset:d.PropTypes.number.isRequired,size:d.PropTypes.number.isRequired,layout:v.default.isRequired,cellRenderer:d.PropTypes.func.isRequired,viewportWidth:d.PropTypes.number,viewportHeight:d.PropTypes.number,listTop:d.PropTypes.number,listLeft:d.PropTypes.number,isScrolling:d.PropTypes.bool,scrollTop:d.PropTypes.number,scrollLeft:d.PropTypes.number,onListUpdate:d.PropTypes.func,
onPageRequest:d.PropTypes.func},b.defaultProps={keyPropName:"entityID",itemsOffset:0,viewportWidth:0,viewportHeight:0,listTop:0,listLeft:0,isScrolling:!1},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){var i=0;return d.default.Children.map(e,function(e){if(d.default.isValidElement(e)){var r=i;return i++,t.call(n,e,r)}return e})}function r(e,t,n){var i=0;return d.default.Children.forEach(e,function(e){d.default.isValidElement(e)&&(t.call(n,e,i),i++)})}function a(e){
var t=0;return d.default.Children.forEach(e,function(e){d.default.isValidElement(e)&&t++}),t}function s(e){var t=!1;return d.default.Children.forEach(e,function(e){!t&&d.default.isValidElement(e)&&(t=!0)}),t}function o(e,t){var n=void 0;return r(e,function(i,r){!n&&t(i,r,e)&&(n=i)}),n}function l(e,t,n){var i=[],r=0;return d.default.Children.forEach(e,function(e){d.default.isValidElement(e)&&(t.call(n,e,r)&&i.push(e),r++)}),i}var u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.mapValidComponents=i,
t.forEachValidComponents=r,t.numberOfValidComponents=a,t.hasValidComponent=s,t.findValidComponent=o,t.findValidComponents=l;var c=n(7),d=u(c)},function(e,t,n){"use strict";function i(){function e(e,t){E=e.listTop,k=e.listLeft,(0,s.default)(o||e.viewportHeight,"A grid list must have a viewport height or a fixed number of rows"),(0,s.default)(c||e.viewportWidth,"A grid list must have a viewport width or a fixed number of columns");var n=e.viewportWidth-w-C,i=e.viewportHeight-y-P;a===u?n-=k:i-=E,I=T({
innerViewportWidth:n,innerViewportHeight:i,innerHorizontalPadding:f,innerVerticalPadding:v}),A=_({cellWidth:I,innerViewportWidth:n,innerViewportHeight:i,innerHorizontalPadding:f,innerVerticalPadding:v}),M=o||Math.floor((i+v)/(A+v)),D=c||Math.floor((n+f)/(I+f)),R=D*M;var r=a===u?D*(I+f)-f:Math.ceil(t/M)*(I+f)-f,l=a===u?Math.ceil(t/D)*(A+v)-v:M*(A+v)-v;return{width:r+w+C,height:l+y+P}}function t(e){(0,s.default)(void 0!==I,"`getListStyle` must be called before `getPositionForIndex`");var t=void 0,n=void 0;
a===u?(t=e%D,n=Math.floor(e/D)):(t=Math.floor(e/M),n=e%M);var i=t*(I+f)+k+C,r=n*(A+v)+E+y;return{cellX:i,cellY:r,cellWidth:I,cellHeight:A}}function n(e,t,n){(0,s.default)(void 0!==I,"`getListStyle` must be called before `getRangesForPosition`");var i=a===u?D:M,r=a===u?(e-E)/(A+v):(t-k)/(I+f),o=R+2*i+h*i*2,c=Math.round(r)*i,d=c+R-1,p=Math.floor(r)*i,m=c+R+i-1,g=p-i*h,y=(0,l.default)(g,n)+o-1;return y>=n&&(g=n-o),{visibleStartIndex:(0,l.default)(c,n),visibleEndIndex:(0,l.default)(d,n),partiallyVisibleStartIndex:(0,
l.default)(p,n),partiallyVisibleEndIndex:(0,l.default)(m,n),renderStartIndex:(0,l.default)(g,n),renderEndIndex:(0,l.default)(y,n)}}var i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=i.direction,a=void 0===r?u:r,o=i.rows,c=i.columns,d=i.overscan,h=void 0===d?0:d,p=i.innerHorizontalPadding,f=void 0===p?0:p,m=i.innerVerticalPadding,v=void 0===m?0:m,g=i.outerPaddingTop,y=void 0===g?0:g,b=i.outerPaddingRight,w=void 0===b?0:b,S=i.outerPaddingBottom,P=void 0===S?0:S,x=i.outerPaddingLeft,C=void 0===x?0:x,T=i.getCellWidth,_=i.getCellHeight,E=void 0,k=void 0,I=void 0,A=void 0,M=void 0,D=void 0,R=void 0;
return{options:i,getListStyle:e,getPositionForIndex:t,getRangesForPosition:n}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(38),s=r(a),o=n(874),l=r(o),u="vertical";t.VERTICAL=u;var c="horizontal";t.HORIZONTAL=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=i.PropTypes.shape({getListStyle:i.PropTypes.func.isRequired,getPositionForIndex:i.PropTypes.func.isRequired,getRangesForPosition:i.PropTypes.func.isRequired
});t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=i.PropTypes.shape({start:i.PropTypes.number.isRequired,end:i.PropTypes.number.isRequired,size:i.PropTypes.number.isRequired});t.default=r,e.exports=t.default},function(e,t,n){var i;i=function(){"use strict";var e={PLAY:"PLAY",PAUSE:"PAUSE",SEEK:"SEEK",STOP:"STOP",PREVIOUS:"PREVIOUS",NEXT:"NEXT",SKIPTO:"SKIPTO",SHOWDETAILS:"SHOWDETAILS",REFRESHPLAYQUEUE:"REFRESHPLAYQUEUE",
SETSTREAM:"SETSTREAM",SETQUALITY:"SETQUALITY"};return e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i,r;i=[n(29),n(701),n(31)],r=function(e,t,n){"use strict";var i=e.extend({mixins:t,constructor:function(){this.basePath="translations/",this.translations={},n.getInstance().on("change:language",function(e,t){this.load(t)},this)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(10),n(6),n(29),n(8),n(286),n(43),n(71),n(50),n(261),n(13),n(36)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d){"use strict";var h=i.extend({mixins:[l,u],companion:!0,modelDefaults:function(){var t=u.modelDefaults.apply(this,arguments),n=this.type===s.types.MUSIC,i=this.type===s.types.PHOTO;return e.extend(t,{state:s.states.BUFFERING,showMinimize:!0,showMaximize:!n,showSeekBar:!i,showShuffle:n})},modelOverrides:function(){var e=u.modelOverrides.apply(this,arguments),t=this.model.get("metadataItem"),n=t.get("type")===s.types.PHOTO;return(n||this.model.get("playQueue").get("collection").length<2)&&(e.showPlayQueue=!1),
e},initialize:function(t){u.initialize.apply(this,arguments),e.bindAll(this,"skipPrevious","skipNext"),this.type=t.type,this.manager=t.manager,this.player=this.manager.player},getServerConnection:function(e,t){t||(t={});var n=e.get("activeConnection");return n&&n.get("isLoopback")&&(n=e.get("connections").find(function(e){return e.get("isConnected")&&!e.get("isLoopback")})),n?{protocol:n.get("scheme")||"http",address:n.getAddressFromUri(),port:n.get("port")}:void(t.isRequired&&this.showLoopbackWarning(e));
},showLoopbackWarning:function(e){var i=t.resolve("appModel"),a=i.get("user");if(!a.get("signedIn")||"ok"!==e.get("myPlexSigninState")){var s;s=n(a.get("signedIn")?"This server is unavailable to the player. Please sign this server in to your Plex account and try again.":"This server is unavailable to the player. Please sign in to your Plex account and try again.");var o=new d({title:n("Unable to Cast"),message:s,confirmLabel:n("OK"),cancelLabel:n("Ignore")});o.promise.done(function(){r.trigger("hide:player"),
a.get("signedIn")?r.trigger("navigate","serverSettings",{serverID:e.id}):r.trigger("navigate","login",{silent:!0})}),r.trigger("show:modal",o)}},getTransientToken:function(e){return c.execute("getTransientToken",{server:e})},reset:function(t){var n={loop:"photo"===this.type};return this.currentItem=t,this.previousItem=this.getPreviousItem(t,n),this.nextItem=this.getNextItem(t,n),this.model.set(e.extend(e.result(this,"modelDefaults"),this.modelOverrides())),t},stop:function(e){u.stop.apply(this,arguments);
var n=t.resolve("appModel"),i=this.model.get("playQueue");i&&!n.get("primaryPlayer")&&i.takeOwnership(),this.manager.resetActiveController(this.type)},setStream:function(e,t){},refreshRemotePlayQueue:function(){},onFinishedChange:function(e,t){t&&(this.manager.resetActiveController(this.type),r.trigger("hide:player"))},onMetadataItemChange:function(){var t,n,i=this.model.get("metadataItem"),r=this.model.get("mediaIndex"),a=this.model.get("partIndex"),s=i.get("Media");if(t=r>1&&s.length>r?s[r]:e.first(s)){
var o=t.Part;n=a>1&&o.length>a?o[a]:e.first(o)}this.model.set({media:t,part:n})},onAudioStreamIDChange:function(e,t){var n=e.previous("audioStreamID");if(null!=t&&null!=n){if(this.isTimelineChange){var i=o.get("audio");return void a(e.get("media"),i,t)}this.setStream("audio",t)}},onSubtitleStreamIDChange:function(e,t){var n=e.previous("subtitleStreamID");if(null!=t&&null!=n){if(this.isTimelineChange){var i=o.get("subtitles");return void a(e.get("media"),i,t)}this.setStream("subtitles",t)}},onPlayQueueChange:function(){
this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem();var t=e.pick(e.result(this,"modelDefaults"),["showPlayQueue","canSkipPrevious","canSkipNext","canShuffle","shuffled"]);this.model.set(e.extend(t,this.modelOverrides())),this.refreshRemotePlayQueue()}});return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(10),n(29),n(43),n(39),n(13),n(50),n(26),n(102),n(69),n(55),n(87),n(208)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){"use strict";var p=n.extend({
mixins:[s],types:[i.types.VIDEO,i.types.MUSIC,i.types.PHOTO],initialize:function(){var e=t.resolve("appModel");this.items={},this.containers={},this.activeControllerTypes={},this.listenTo(e,"change:primaryPlayer",this.onPrimaryPlayerChange)},start:function(e){this.player&&this.stop(),o.info("Casting to "+e.get("friendlyName")),this.player=e,e&&this.listenTo(e.get("nowPlaying"),"add",this.onNowPlayingAdd)},stop:function(){if(this.player){o("Stopped casting to "+this.player.get("friendlyName"));var e=this.player.get("nowPlaying");
e.clear(),this.stopListening(e),this.player=null}this.items={},this.containers={},this.activeControllerTypes={}},resetActiveController:function(e){this.activeControllerTypes[e]=!1},createController:function(e,t){return t.isPassive||(this.activeControllerTypes[e]=!0),new this.controller({type:e,manager:this})},updateNowPlaying:function(t){var n=t.type,r=t.key,a=t.state===i.states.STOPPED||t.state===i.states.ERROR,s=this.items[n],o=this.containers[n];if(s){if(r===s.get("key")&&!a)return;this.removeFromNowPlaying(s,t);
}r&&!a&&this.addToNowPlaying(e.extend({},t,{previousItem:s,previousContainer:o}))},addToNowPlaying:function(t){var n=t.type,r=t.machineIdentifier,a=t.key,s=t.containerKey,o=t.previousContainer;"node"===r&&(r="myPlex");var p=new u({machineIdentifier:r},{onlyIfCached:!0});if(!e.isEmpty(p)){if("myPlex"===r){var f=p.parent.get("primaryServer");a=f?f.resolveUrl(a):p.resolveUrl(a,{connection:new l({scheme:"https",address:"node.plexapp.com",port:"32443"})})}var m=new c({key:a},{server:p,skipCache:!0}),v=m.populate();
this.items[n]=m;var g;if(o&&o.key===s)g=o.playQueue;else{var y=m.server.get("playQueueManager"),b=i.getElementByType(n),w=h.prototype.getIdFromKey(s);if(null!==w)g=y.getForType(b),g&&g.get("playQueueID")===w||(g=y.createForType(b,{onServer:!0}),g.set("playQueueID",w),v=v.then(function(){return g.fetch({reset:!0})}));else{var S;s&&(S=new d({containerKey:s},{server:p,skipCache:!0}),v=v.then(function(){return S.populate()})),v=v.then(function(){g=y.createForType(b,{onServer:!1});var e=S?S.get("metadataItems"):m;
return g.addContent(e)})}v.done(function(){var e=g.get("collection").findWhere({key:a});g.set("selectedItem",e)})}this.containers[n]={key:s,playQueue:g},v.done(e.bind(function(){m.set("key",a);var e=this.player.get("nowPlaying");e.add(m)},this)),v.fail(e.bind(function(){this.removeFromNowPlaying(m,t)},this))}},removeFromNowPlaying:function(e,t){this.items[t.type]=null,this.containers[t.type]=null;var n=this.player.get("nowPlaying");n.remove(e)},onPrimaryPlayerChange:function(e,t){t&&t.get("protocol")===this.protocol?this.start(t):this.stop();
},onNowPlayingAdd:function(e){var t=e.get("type");if(t){var n=r.getChildMediaType(t),s=i.getTypeByElement(n.element);this.activeControllerTypes[s]||a.execute("playMedia",{item:e,useMiniPlayer:!0,isFromCompanion:!0})}}});return p}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8)],r=function(e,t,n,i){"use strict";function r(r){var a=r.server,s="/sync/refreshSynclists",o=e.extend(a.getXHROptions(s),{type:"PUT"}),l=t.ajax(o);return r.skipContent||(l=l.then(function(n){
var i="/sync/refreshContent",r=e.extend(a.getXHROptions(i),{type:"PUT"});return t.ajax(r)})),l.done(function(){r.silent||i.trigger("show:alert",{type:"success",message:n("Synced items were refreshed.")})}),l.promise()}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3)],r=function(e){"use strict";var t={triggerAutoselect:function(e){this.trigger("autoselect",{shiftKey:e.shiftKey})},stopTrackingSelecting:function(e,t){return this.isTrackingSelecting?(e.preventDefault(),
void(this.isTrackingSelecting=!1)):void(t&&t.call(this,e))},onMouseEnter:function(e){this.parentMediaActions&&this.parentMediaActions.get("selecting")&&this.triggerAutoselect(e)},onMouseLeave:function(e){this.stopTrackingSelecting(e)},onMouseDown:function(t){if(this.parentMediaActions&&this.parentMediaActions.shouldStartTrackingSelecting(t)){var n=e.bind(function(){this.ignoreOnClick=!0},this);this.listenToOnce(this.parentMediaActions,"change:selectedItems",n),this.isTrackingSelecting=!0,this.trigger("select",{
multiSelect:t.shiftKey}),this.stopListening(this.parentMediaActions,"change:selectedItems",n)}},onClick:function(e){this.ignoreOnClick&&(this.ignoreOnClick=!1,e.preventDefault())}};return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3)],r=function(e){"use strict";var t={collectionEvents:{"update reset sort":"onTracksUpdate"},markDiscNumbers:function(){if(this.collection.server.supports("premiumMusic")){var e=this.collection.reduce(function(e,t,n){var i=t.get("parentIndex");
return i!==e.lastDiscNumber&&(e.markers[n]=i,e.lastDiscNumber=i,e.count+=1),e},{markers:{},lastDiscNumber:null,count:0});return this.discMarkers=e.markers,e.count}},onRender:function(){var t=this.markDiscNumbers();1!==t&&e.each(this.discMarkers,e.bind(function(e,t){this.$("li:eq("+t+") .disc-number").removeClass("hidden")},this))},onTracksUpdate:function(){this.render()}};return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(61),n(169),n(216),n(706)],r=function(e,t,n,i,r){
"use strict";var a=r.extend({storageKey:"settingsv2",defaults:e.extend({},r.prototype.defaults,{playThemeMusic:!1,keyboardShortcuts:!0,showUnwatchedIcons:!1,showAdvancedSettings:!1,allowHttpFallback:i.NEVER,localQuality:-1,remoteQuality:8,channelQuality:-1,dash:!0,directPlay:!0,directStream:!0,preferAAC:"wiiu"===t.id||"edge"===t.id,allowAC3:!1,subtitleSize:100,subtitlesBurnLevel:n.ALWAYS,audioBoost:100,"syncQuality!video":8,"syncQuality!music":2,"syncQuality!photo":2,sidebarOpen:!1,videoPlayerVolume:100,
musicPlayerVolume:100,announcementsLastReadTimestamp:0,serverUpdateDismissedVersion:"",hasDismissedPremiumMusicAlert:!1,hasSkippedInstallServer:!1,viewedUnclaimedServers:[],dismissedUnclaimedServers:[],listType:"media-tile-list","listType!track":"media-list"}),getListTypeKey:function(e){var t="listType";return e&&(t+="!"+e.get("typeString")),t},getListType:function(t){var n,i;return t=t||{},e.has(t,"mediaType")&&e.isObject(t.mediaType)&&(i=this.getListTypeKey(t.mediaType)),n=this.get(i)||this.get(t.fallbackKey)||this.get("listType");
},saveListType:function(t,n){var i=this.getListTypeKey(t);this.save(i,n),e.isEqual(i,"listType")||this.trigger("change:listType",this,n)},getSectionListType:function(e,t){var n;return e&&(t=t||e.get("currentType"),n=e.getScopedKey("listType")),this.getListType({mediaType:t,fallbackKey:n})}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(25),n(995)],r=function(e,t){"use strict";var n=e.extend({name:"FilePathCollection",context:["server"],model:t,url:"/services/browse"
});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(25),n(996)],r=function(e,t){"use strict";var n=e.extend({name:"MatchResultCollection",context:["server"],model:t,url:function(){return"/library/metadata/"+this.parent.id+"/matches"}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(128),n(60),n(998)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:"/playQueues?type="+e.LOCAL,parse:function(e){return this.convert(e,"PlayQueue");
}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(128),n(60),n(1e3)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:"/clients/profiles?type="+e.LOCAL,parse:function(e){return this.convert(e,"Profile")}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(128),n(60),n(1005)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:"/library/tags?type="+e.LOCAL,comparator:function(e){return e.get("MediaSettings").maxVideoBitrate;
},parse:function(e){return this.convert(e,"Tag")}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e,t,n){var i=/!$/.test(n),r=/\.id$/.test(n);if(i||r)return e[n]=t,e;var a=n.match(/^(.+)\.(.+)/);return a&&(e.type=p.default.get(a[1]).id,n=a[2]),e[n+".query"]=t,e}var r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(53),u=r(l),c=n(22),d=a(c),h=n(39),p=r(h),f=n(64),m=r(f),v=n(25),g=r(v),y=n(1008),b=r(y),w=g.default.extend({
name:"MetadataAutocompleteResultCollection",context:["server","section","multiMetadataItem","query"],model:b.default,url:function(){var e={type:p.default.get(this.multiMetadataItem.get("type")).id,limit:10};return e=o.default.reduce(this.query,i,e),d.join([this.multiMetadataItem.sectionUrl(),"autocomplete"],e)},augmentResponseText:function(e,t){return t===m.default.xml?u.default.replaceMetadataXMLElementNames(e):e}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var i=n(19).default,r=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(231),s=i(a),o=n(77),l=r(o),u=n(127),c=r(u),d=n(55),h=r(d),p=h.default.extend({name:"SyncMetadataModel",entityType:s.SYNC_METADATA_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,l.default)(this.entityType,e.ratingKey,this.syncItemId,this.server.entityID())},context:["server","device","syncItemId"],cache:new c.default,cacheKey:function(){var e=h.default.prototype.cacheKey.apply(this,arguments);
return e+"!"+this.syncItemId}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(1012),o=i(s),l=a.default.extend({name:"SearchHubCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(203)],r=function(e,t){"use strict";var n=t.extend({constructor:function(n,i,r,a){this.exclusiveAgents=i,this.agentIdentifier=r,t.call(this,n,a),this.filterBy(e.bind(this.filterExclusiveAgent,this));
},filterExclusiveAgent:function(e){var t=e.get("identifier"),n=this.exclusiveAgents;if(!n)return!0;var i=this.agentIdentifier,r=n.indexOf(i)!==-1,a=n.indexOf(t)!==-1,s=r?t===i:!a;return s}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(25),n(1024)],r=function(e,t,n){"use strict";var i=t.extend({name:"ScannerCollection",context:["server","sectionTypeID"],model:n,url:function(){return"/system/scanners/"+this.sectionTypeID},hasExclusiveScanner:function(t){return!!e.intersection(this.pluck("name"),t).length;
}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i;i=function(){"use strict";var e={PRODUCTION:"9AC194DC",QA:"4289C4E0",CUSTOM:"custom"};return e.settings=[{value:e.PRODUCTION,title:"Production"},{value:e.QA,title:"QA"},{value:e.CUSTOM,title:"Custom"}],e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i,r;i=[n(3),n(5),n(582),n(22),n(176),n(82),n(461),n(31)],r=function(e,t,n,i,r,a,s,o){"use strict";var l="KQMIY6GATPC63AIMC4R2",u=s.decode("k3U6GLkZOoNIoSgjDshPErvqMIFdE0xMTx8kgsrhnC0="),c="protocols=http-live-streaming,http-mp4-streaming,http-streaming-video,http-streaming-video-720p,http-mp4-video,http-mp4-video-720p;videoDecoders=h264{profile:high&resolution:1080&level:51};audioDecoders=mp3,aac{bitrate:160000}",d=e.extend({},r,{
video:function(e,n,i,a,s){if(s||(s={}),e.supports("universalTranscoder"))return r.video(e,n,i,a,s);var o=t.Deferred(),l=this.getTranscoderUrl(e,n,a,s),u=t.ajax(e.getXHROptions(l));return u.done(function(t){var n=t.replace(/[\s\S]+(session.+?\.m3u8)[\s\S]+/,"$1"),i=e.resolveUrl("video/:/transcode/segmented/")+n;o.resolve(i)}),u.fail(function(){o.reject()}),o.promise()},getTranscoderUrl:function(t,r,d,h){var p=a.getCurrentQuality(r,o.getInstance()).index,f=Math.round((new Date).getTime()/1e3),m={identifier:r.get("identifier"),
key:t.resolveUrl(r.get("key"),{useLoopback:!0}),url:t.resolveUrl(d.key,{useLoopback:!0}),session:h.session,offset:0,quality:p,subtitleSize:o.get("subtitleSize"),audioBoost:o.get("audioBoost"),"3g":0},v=r.get("indirectHttpHeaders");v&&(m.httpCookies=v.Cookie,m.userAgent=v["User-Agent"]);var g=i.join("/video/:/transcode/segmented/start.m3u8",m);n.HMAC_SHA256_init(u),n.HMAC_SHA256_write(g+"@"+f);var y=n.HMAC_SHA256_finalize(),b=s.encode(n.array_to_string(y)),w=c;o.get("preferAAC")&&(w=c.replace("audioDecoders=mp3,aac","audioDecoders=aac")),
o.get("directStream")||(w=c.replace(/videoDecoders=[^;]+;audioDecoders=[^;]+/,""));var S=e.extend(t.getHeaders(),{"X-Plex-Access-Key":l,"X-Plex-Access-Code":b,"X-Plex-Access-Time":f,"X-Plex-Client-Capabilities":w});return i.join(g,S)}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1666),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"loading",template:e,initialize:function(e){e&&e.inline&&this.$el.addClass("loading-inline")}});return n}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1669),n(3),n(5),n(9),n(8),n(10),n(13),n(1087)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=i.Layout.extend({className:"sign-in-container container",template:e,ui:{form:"#user-account-form"},regions:{form:"#user-account-form"},events:{"submit form":"onSubmit","click .why-sign-in-btn":"onWhySignInClick","click .back-to-sign-in-btn":"onBackToSignInClick","click .skip-btn":"onSkipClick"},initialize:function(e){e||(e={}),this.isFirstRun=!!e.isFirstRun,
this.showWhySignIn=!1},serializeData:function(){return{showSkip:this.isFirstRun,showWhySignIn:this.showWhySignIn}},signIn:function(e){return this.form.currentView.validateAll(this.ui.form[0],["username","password"],e)?s.execute("signIn",e).done(function(){a.resolve("metrics").trackEvent({event:"client:signin",interaction:!0,properties:{mode:"password",firstRun:this.isFirstRun}})}.bind(this)):n.Deferred().reject().promise()},signUp:function(e){return this.form.currentView.validateAll(this.ui.form[0],null,e)?s.execute("signUp",e).done(function(){
a.resolve("metrics").trackEvent({event:"client:signup",interaction:!0,properties:{firstRun:this.isFirstRun}})}.bind(this)):n.Deferred().reject().promise()},onRender:function(){this.form.show(new o({isFirstRun:this.isFirstRun,showRememberMe:!0}))},onSubmit:function(e){e.preventDefault();var n=e.currentTarget,i=this.form.currentView.ui.submitBtn;if(!i.hasClass("active")){i.addClass("active");var a={username:n.username.value,email:n.email.value,password:n.password.value,confirm:n.confirm.value,remember:n.remember.checked
},s=this.form.currentView.$el.hasClass("sign-in-form")?this.signIn(a):this.signUp(a);s.done(function(){r.trigger("navigate:refresh")}),s.fail(t.bind(function(){i.removeClass("active")},this))}},onWhySignInClick:function(e){e.preventDefault(),a.resolve("metrics").trackClick({page:"signIn",action:"whatsThis",firstRun:this.isFirstRun}),this.showWhySignIn=!0,this.render()},onBackToSignInClick:function(e){e.preventDefault(),this.showWhySignIn=!1,this.render()},onSkipClick:function(e){e.preventDefault(),
a.resolve("metrics").trackClick({page:"signIn",action:"skip",firstRun:this.isFirstRun}),this.trigger("skipSignIn")}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1681),n(3),n(9),n(148)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({mixins:[i],className:"alert transition-in",template:e,alertDuration:2e3,transitionDuration:500,events:{mouseenter:"onMouseEnter",mouseleave:"onMouseLeave","click .close-btn":"onCloseClick"},initialState:"transitionIn",states:{
transitionIn:{nextState:"visible",onEnter:function(){this.$el.triggerReflow(),this.$el.removeClass("transition-in"),this.startTransition()}},visible:{nextState:"transitionOut",onEnter:function(){this.transitionOutTimeout=setTimeout(this.enterNextState,this.alertDuration)}},transitionOut:{onEnter:function(){this.$el.addClass("transition-out"),this.startTransition()}}},initialize:function(e){this.bindAllWhenRendered(["enterNextState"]),t.isString(e)&&(e={message:e}),this.type=e.type,this.message=e.message,
this.type&&this.$el.addClass("has-"+this.type)},serializeData:function(){return{type:this.type,message:this.message}},startTransition:function(){setTimeout(this.enterNextState,this.transitionDuration)},onRender:function(){t.defer(this.enterNextState)},onStateMachineComplete:function(){this.close()},onMouseEnter:function(e){clearTimeout(this.transitionOutTimeout)},onMouseLeave:function(e){"visible"===this.currentState&&(clearTimeout(this.transitionOutTimeout),this.transitionOutTimeout=setTimeout(this.enterNextState,this.alertDuration/2));
},onCloseClick:function(e){e.preventDefault(),"visible"===this.currentState&&(clearTimeout(this.transitionOutTimeout),this.enterNextState())}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1711),n(3),n(5),n(9),n(202),n(8),n(33),n(1192),n(1125),n(115)],r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c=i.CompositeView.extend({id:"player-play-queue-dropdown",tagName:"span",className:"dropup",itemView:o,emptyView:l,itemViewContainer:"ol",template:e,modelEvents:{"change:showPlayQueue":"onShowPlayQueueChange"
},events:{"click .save-btn":"onSaveClick","mousewheel .play-queue-list":"onPlayQueueMouseWheel"},serializeData:function(){var e=this.model.get("playQueue"),t=e.get("isRadio"),n=e.server&&e.server.supports("playlists"),i=e.supports({playlists:!0});return{canEdit:this.model.get("showPlayQueue"),canPlaylist:!t&&i&&n}},appendHtml:function(e,t,n){return s.prototype.sortedAppendHtml.apply(this,[e,t,n+1])},onRender:function(){if(this.$el.parent().toggleClass("hidden",!this.model.get("showPlayQueue")),this.model.get("showPlayQueue")){
var e=function(e){var t=n(e.item).data("play-queue-id"),i=n(e.item).prev(".play-queue-list-item").data("play-queue-id");this.trigger("move",t,i)},i=this.$el.children(".dropdown-menu")[0];this.sortable=new r(i,{draggable:"li.play-queue-list-item",animation:200,onUpdate:t.bind(e,this)})}},onShowPlayQueueChange:function(){this.render()},onSaveClick:function(){a.trigger("show:modal",new u({model:this.model.get("playQueue")}))},onPlayQueueMouseWheel:function(e){e.stopPropagation()}});return c}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1716),n(9),n(10),n(8),n(13),n(1128)],r=function(e,t,n,i,r,a){"use strict";var s=t.Layout.extend({id:"primary-player-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:e,regions:{list:".dropdown-menu"},events:{"click .cast-btn":"onCastClick"},initialize:function(e){e||(e={});var t=n.resolve("appModel");this.showNowPlaying=e.showNowPlaying,this.players=t.get("players"),this.listenTo(t,{"change:primaryPlayer":this.onPrimaryPlayerChange,
"change:isCastApiAvailable":this.render,"change:isCastDeviceAvailable":this.render}),this.listenTo(this.players,"update reset",this.render),this.setup()},setup:function(){var e=n.resolve("appModel"),t=e.get("primaryPlayer");if(t){var i=t.get("nowPlaying");this.listenTo(i,"update reset",this.render)}},serializeData:function(){var e=n.resolve("appModel");return{primaryPlayer:!!e.get("primaryPlayer"),showDropdown:!e.get("isCastApiAvailable")}},onRender:function(){var e=n.resolve("appModel"),t=e.get("isCastDeviceAvailable")||!!this.players.length,i=!e.get("isCastApiAvailable")&&t;
this.$el.toggleClass("hidden",!t),i&&this.list.append(new a({showNowPlaying:this.showNowPlaying}),this.$el)},onPrimaryPlayerChange:function(e,t){var i=n.resolve("appModel"),r=i.previous("primaryPlayer");r&&this.stopListening(r.get("nowPlaying")),this.setup(),this.render()},onCastClick:function(e){e.preventDefault(),i.trigger("cast:launch")}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1719),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({id:"section-dropdown",
tagName:"span",className:"dropdown",template:e,modelEvents:{"change:title":"render"},serializeData:function(){var e=this.model.server.supports("playlists");return{showDropdown:this.collection.length>1||e,showPlaylists:e,sections:this.collection.toJSON(),serverID:this.model.server.id,currentSectionTitle:this.options.title||this.model.get("title"),currentSectionKey:this.options.key||this.model.get("key")}}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(9),n(6)],
r=function(e,t,n,i){"use strict";var r=n.Layout.extend({events:{"click .edit-lock-addon":"onLockClick","keyup .lockable-field:not(.selectized)":"onLockableFieldChange","change .lockable-field:not(.selectized)":"onLockableFieldChange"},ui:{form:".edit-metadata-form"},serializeData:function(){var e=this.model.get("lockedFields"),t={};e&&e.each(function(e){t[e.get("name")]=e.get("locked")});var n=this.model.toJSON(),r=this.model.get("mixedFields"),a={originallyAvailableAt:i("YYYY-MM-DD")};return r&&r.forEach(function(e){
a[e]=i("MIXED")}),{item:n,locked:t,placeholders:a,canReparent:this.canReparent,canEditSimilarArtists:this.canEditSimilarArtists,disableIndices:!this.canReparent}},flushChanges:function(){},getLockedFieldsArray:function(){var n=this.ui.form,i=this.model.get("lockedFields").reduce(function(e,t){return e[t.get("name")]=t.get("locked"),e},{});return n.find(".edit-lock-addon").each(function(e,n){var r=t(n),a=r.data("field");r.hasClass("locked")?i[a]=!0:a in i&&(i[a]=!1)}),e.map(i,function(e,t){return{
name:t,locked:e}})},onLockClick:function(e){e.preventDefault();var n=t(e.currentTarget);n.hasClass("disabled")||t(e.currentTarget).toggleClass("locked")},onLockableFieldChange:function(e){var n=e instanceof t?e:t(e.currentTarget);if(!e.force){var i=n.data("original-value");if(void 0===i&&(i=n.attr("value")||n.val()),n.data("original-value",i),n.val()===i)return}n.siblings(".edit-lock-addon").addClass("locked")}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1724),n(1726),n(1729),n(1733),n(1735),n(1736),n(1738),n(1740),n(1742),n(1737),n(3),n(5),n(6),n(39),n(502),n(1137),n(113)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v){"use strict";function g(e){return c.reduce(e,function(e,t){return e[t]=!0,e},{})}var y={movie:i,show:o,season:s,episode:n,artist:t,album:e,track:l,photoAlbum:r,photo:a,playlist:u},b=f.extend({regions:{ratingRegion:".rating-region"},ui:c.extend({selectizeInputs:".selectize input[type=text]"},f.prototype.ui),initialize:function(e){var t=this.model.get("type");this.template=y[t]||y.movie;var n=p.get(t);this.canSelectize=this.model.server.supports("batchEdit")&&n,
this.canReparent=this.model.server.supports("batchEdit")},serializeData:function(){var e=f.prototype.serializeData.apply(this,arguments);return e.supportsLinkedYears=this.model.server.supports("linkedYearMetadata"),e},flushChanges:function(){var e=this.ui.form,t=e.find(".selectize input[tabindex=-1]"),n=g(c.pluck(t,"name")),i=g(c.pluck(e.find("[type=number]"),"name")),r=c(e.serializeArray()).reject(function(e){return n[e.name]},this),a=c.reduce(r,function(e,t){if(i[t.name]){var n=d.trim(t.value);if(n)return e[t.name]=parseFloat(n,10),
e;if(!this.model.get(t.name))return e}return e[t.name]=t.value,e},{},this);c.each(t,function(e){var t=d(e),n=t.data("updateAttr"),i=t.data("altUpdateAttr"),r=t.data("isText"),s=e.selectize.getValue();if(i)if(r)a[n]=s,a[i]=null;else{var o=e.selectize.options[s];if(o){var l=o[t.data("autocompleteAttr")];a[n]=l,a[i]=s}}else a[n]=s});var s=this.model.get("lockedFields");s&&s.set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(a)},markInvalid:function(e){this.$(".form-group").removeClass("has-error"),
c(e).each(function(e){var t=this.$('.form-group[data-attr="'+e+'"]');t.addClass("has-error"),t.find(".control-error").text(h("Required"))},this)},onRender:function(){if(this.$(".rating-region").length>0&&this.ratingRegion.show(new v({model:this.model,passive:!0})),this.canSelectize){var e=this;this.ui.selectizeInputs.each(function(t,n){m(e,n)})}}});return b}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1734),n(1741),n(1730),n(1727),n(1725),n(1743),n(3),n(5),n(110),n(124),n(502),n(1138),n(378)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d){"use strict";var h=c.extend({templatesByType:{movie:e,show:t,episode:n,artist:i,album:r,track:a},ui:s.extend({tagInputs:".tag-input-hidden"},c.prototype.ui),events:s.extend({"change .lockable-field":"onLockableFieldChange"},c.prototype.events),initialize:function(e){this.template=this.templatesByType[this.model.get("type")]||this.templatesByType.movie,this.canAutocomplete=this.model.server.supports("batchEdit"),this.canEditSimilarArtists=this.model.server.supports("editSimilarArtists"),
this.getSection()},getSection:function(){var e=this.model.section;if(!e){var t=this.model.get("librarySectionID");e=new u({key:t},{server:this.model.server})}this.section=e},flushChanges:function(){var e=this.ui.form,t=s.reduce(e.serializeArray(),function(e,t){return e[t.name]=t.value,e},{}),n=s.reduce(this.ui.tagInputs,function(e,t){var n=t.selectize,i=o(t).data("name"),r=o(t).data("attr");return e[r]=s.map(n.items,function(e){var t=n.options[e];return{tag:t.tag,id:t.id}}),this.model["original.tag."+i]=s.toArray(n.options),
e},{},this);s.each(n,function(e,t){this.model.get(t).set(e,{parse:!0})},this),this.model.get("lockedFields").set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(t)},onRender:function(){var e=this;this.ui.tagInputs.each(function(t,n){d(e,n)})}});return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1754),n(37),n(9),n(6),n(171),n(148),n(303)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.Layout.extend({mixins:[a],className:"conversion-status",template:e,regions:{progressBarRegion:".progress-bar-region"
},initialize:function(e){this.initialState=e.initialState,this.initialErrorMessage=e.initialErrorMessage,this.generator=e.generator,this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.progressModel=new t.Model({progress:0,remaining:0,speed:0})},states:{pending:{onEnter:function(){this.$el.addClass("pending")},onExit:function(){this.$el.removeClass("pending")}},converting:{onEnter:function(){this.$el.addClass("converting")},onExit:function(){this.$el.removeClass("converting");
}},processed:{onEnter:function(){this.$el.addClass("processed")},onExit:function(){this.$el.removeClass("processed")}},disabled:{onEnter:function(){this.$el.addClass("disabled")},onExit:function(){this.$el.removeClass("disabled")}},error:{onEnter:function(){this.$el.addClass("error")},onExit:function(){this.$el.removeClass("error")}}},bindingsModel:"progressModel",bindings:{".conversion-status-converting-label":{model:"pausedSetting",modelAttribute:"value",formatter:function(e){return i(e?"Paused":"Converting");
}},".conversion-status-pending-label":{model:"pausedSetting",modelAttribute:"value",formatter:function(e){return i(e?"Paused":"Waiting")}},".conversion-status-converting-speed":{modelAttribute:"speed",autohide:!0,formatter:function(e){if(e){var t=Math.round(10*e)/10;return t>10&&(t=Math.round(t)),"("+t+"x)"}}},".conversion-status-converting-percentage":{modelAttribute:"progress",formatter:function(e){return Math.round(e)+"%"}},".conversion-status-converting-progress-separator":{modelAttribute:"remaining",
manual:!0,autohide:function(e){return e&&this.progressModel.get("speed")}},".conversion-status-converting-remaining":{modelAttribute:"remaining",autohide:!0,formatter:function(e){if(this.progressModel.get("speed"))return r(e)}}},serializeData:function(){return{initialErrorMessage:this.initialErrorMessage}},findTranscodeJob:function(){return this.transcodeJob=this.transcodeJobs.find(function(e){var t=this.model.get("ratingKey"),n=this.generator?this.generator.id:this.model.get("generatorID"),i=this.model.get("syncItemId"),r=t&&t===e.get("ratingKey"),a=n&&n===e.get("generatorID"),s=i&&i===e.get("syncItemId");
return r&&(a||s)},this),this.transcodeJob&&(this.stopListening(this.transcodeJobs),this.enterState("converting"),this.progressModel.set({progress:this.transcodeJob.get("progress"),speed:this.transcodeJob.get("speed"),remaining:this.transcodeJob.get("remaining")}),this.listenTo(this.transcodeJob,{remove:this.onTranscodeJobRemove,"change:progress":this.onTranscodeProgressChange,"change:speed":this.onTranscodeSpeedChange,"change:remaining":this.onTranscodeRemainingChange})),this.transcodeJob},onRender:function(){
this.enterState(this.initialState||"pending"),this.findTranscodeJob()||this.listenTo(this.transcodeJobs,"reset add",this.findTranscodeJob),this.progressBarRegion.append(new s({model:this.progressModel,size:30,lineWidth:3}))},onTranscodeJobRemove:function(e){this.enterState("pending")},onTranscodeProgressChange:function(e,t){this.progressModel.set("progress",t)},onTranscodeSpeedChange:function(e,t){this.progressModel.set("speed",t)},onTranscodeRemainingChange:function(e,t){this.progressModel.set("remaining",t);
}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(9),n(173),n(39),n(47)],r=function(e,t,n,i){"use strict";var r=e.ItemView.extend({tagName:"li",ui:{poster:".media-poster"},bindings:{".media-title":{modelAttribute:"title"}},initialize:function(e){this.type=this.model.get("type");var t=n.get(this.type).element,r=this.posterWidth[t]||40,a="movie"===this.type?"art":"thumb",s="movie"===this.type?"art":this.type;this.image=new i({model:this.model,type:s,getUrl:this.getPosterUrl,
width:r,modelAttribute:a})},getPosterUrl:function(e){return e=e||this.model.get("parentThumb")||this.model.get("grandparentThumb"),e||(this.model.parent?e=this.model.parent.get("thumb"):this.model.channel&&(e=this.model.channel.get("thumb"))),e},onRender:function(){this.image.setElement(this.ui.poster)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1184)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"tile-list media-tile-list extra-tile-list",
itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(311),n(312)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list virtual-list media-list media-details-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(311),n(96)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list virtual-list media-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(311),n(190)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"tile-list virtual-list media-tile-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1214)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list side-bar-list",itemView:t,initialize:function(e){var t=this.collection.section;e.disabled?this.$el.addClass("disabled"):t&&(this.listenTo(t,"change:currentType",this.onCurrentTypeChange),
t.get("pseudo")||this.collection.populate({reset:!0,scope:"page"}))},onCurrentTypeChange:function(e,t){this.collection.section.set("currentSort",null,{silent:!0}),e.get("pseudo")||this.collection.fetch({reset:!0,scope:"page"})}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1792),n(3),n(5),n(9),n(10),n(6),n(8),n(175),n(150)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=i.ItemView.extend({className:"friend-server-status-container",template:e,events:{"click .server-share-edit-btn":"onEditClick"
},initialize:function(){var e=r.resolve("appModel");this.collection=this.model.get("serverShares"),this.servers=e.get("servers"),this.attachedServers=[],this.collection.each(this.addServerShare,this),this.listenTo(this.collection,{add:this.onServerShareAdd,remove:this.onServerShareRemove,"change:numLibraries":this.render}),this.listenTo(this.servers,"add",this.onServerAdd)},serializeData:function(){var e=r.resolve("appModel"),t={owned:this.getLibrariesData({owned:!0}),shared:this.getLibrariesData({
owned:!1}),canEdit:!e.get("user").get("restricted")};return t.owned.numLibraries||t.shared.numLibraries||(t.showEmptyMessage=!0),t},getLibrariesData:function(e){var t={friendLabel:a(this.model.get("restricted")?"user":"friend"),status:this.getServerStatus(e),hasActiveShare:!!this.collection.findWhere({pending:!1,owned:e.owned})};return t.numLibraries=this.collection.getLibraryCount({pending:!t.hasActiveShare,owned:e.owned}),t.libraryLabel=o(a("library"),t.numLibraries,a("libraries")),t},getServerStatus:function(e){
for(var t,n=0,i=this.collection.length;n<i;n++){var r=this.collection.at(n);if(r.get("owned")===e.owned){var a=this.servers.get(r.get("machineIdentifier")),s=a&&a.get("connected");if(s===!1)return"unavailable";s&&(t="available")}}return t},addServerShare:function(e){var t=this.servers.get(e.get("machineIdentifier"));t&&this.attachServer(t)},removeServerShare:function(e){var t=this.servers.get(e.get("machineIdentifier"));t&&!e.get("owned")&&this.detachServer(t)},attachServer:function(e){this.attachedServers.push(e),
this.listenTo(e,"change:connected",this.render)},detachServer:function(e){var n=t.indexOf(this.attachedServers,e);n>-1&&this.attachedServers.splice(n,1),this.stopListening(e)},onServerShareAdd:function(e){this.addServerShare(e),this.render()},onServerShareRemove:function(e){this.removeServerShare(e),this.render()},onServerAdd:function(e){this.collection.findWhere({machineIdentifier:e.id})&&(this.attachServer(e),this.render())},onEditClick:function(e){e.preventDefault();var t=n(e.currentTarget);if(!t.isDisabled()){
var i,r=t.hasClass("owned"),a=this.collection.findWhere({owned:r});a&&(i=a.get("machineIdentifier")),s.trigger("show:modal",new l({model:this.model,defaultPaneType:r?"ownedServer":"sharedServer",defaultPaneID:i}))}}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1794),n(5),n(9),n(10),n(6),n(8),n(13),n(94),n(512),n(150),n(194)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=n.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:e,
ui:{poster:".card-poster"},regions:{details:".card-details"},events:{"click .pin-btn":"onPINClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},initialize:function(e){var t=i.resolve("appModel"),n=t.get("user"),r=n.get("friends"),a=r.get(this.model.id);this.isAdmin=e.isAdmin,this.isSignedInUser=this.model.id===n.id,this.image=new o({model:this.model,type:"friend",width:80}),a?this.friend=a:this.listenTo(r,"add",this.onFriendAdd)},serializeData:function(){return{isSignedInUser:this.isSignedInUser
}},canEditPIN:function(){var e=this.isSignedInUser&&!this.model.get("restricted"),t=this.isAdmin&&this.model.get("restricted")&&!this.model.get("guest");return e||t},showStatusView:function(){this.friend&&this.details.append(new l({model:this.friend}))},bindings:{".username":{modelAttribute:"title"},".admin-icon":{modelAttribute:"admin",autohide:!0,manual:!0},".user-type":{modelAttribute:"restricted",autohide:!0,formatter:function(e){return this.model.get("guest")?r("Guest User"):e?r("Managed User"):void 0;
}},".pin-protected-btn":{modelAttribute:"protected",manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.canEditPIN()),e}},".pin-unprotected-btn":{modelAttribute:"protected",manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.canEditPIN()),!e}},".edit-btn":{modelAttribute:"admin",manual:!0,autohide:!0,formatter:function(e){var t=i.resolve("appModel"),n=t.get("user"),r=this.isAdmin||!n.get("restricted")&&!this.model.get("restricted");return r&&!this.isSignedInUser;
}},".delete-btn":{modelAttribute:"admin",manual:!0,autohide:!0,formatter:function(e){return this.isAdmin&&!this.isSignedInUser&&!this.model.get("guest")}}},onRender:function(){this.image.setElement(this.ui.poster),this.showStatusView()},onClose:function(){this.image.close()},onFriendAdd:function(e){e.id===this.model.id&&(this.friend=e,this.showStatusView())},onPINClick:function(e){e.preventDefault(),t(e.currentTarget).isDisabled()||a.trigger("show:modal",new c({model:this.model,isEditing:!0}))},onEditClick:function(e){
e.preventDefault(),a.trigger("show:modal",new u({type:"home",homeUser:this.model,isAdmin:this.isAdmin}))},onDeleteClick:function(e){e.preventDefault(),s.execute("removeHomeUser",{homeUser:this.model})}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1229)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list card-tile-list",itemView:t,sorted:!0});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(590),n(3),n(5),n(6),n(8),n(503),n(44),n(177)],
r=function(e,t,n,i,r,a,s,o){"use strict";var l={playlist:["general"]},u=s.extend({mixins:[o],name:"editPlaylistModal",className:"edit-metadata-modal modal modal-lg fade",template:e,panes:{general:{constructor:a}},panesModel:"tempModel",events:t.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},s.prototype.events),ui:{saveBtn:".save-btn",message:".form-message",navPane:".modal-nav-pane",loadingIndicator:".modal-body-pane .loading-inline"
},regions:{paneRegion:".pane-region"},onlyAfterRender:["saveChanges","showPane","showNav"],initialize:function(e){s.prototype.initialize.apply(this,arguments);var a,o,l,u=e.mediaActions;if(u?(l=u.getActionTargets(),a=l[0]):(a=e.model,l=[a]),this.model=a,this.tempModel=a.clone(),!o){var c=n.Deferred();c.resolve(),o=c.promise()}o=o.done(t.bind(function(){this.tempModel.set(a.attributes),1===l.length&&this.tempModel.set("key",l[0].get("key")),this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(r,"shortcut:save",this.saveChanges);
},this)),o.fail(t.bind(function(){this.ui.message.text(i("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=l[this.model.get("type")]||l.movie,n=t.reduce(e,function(e,t){return e[t]=!0,e},{}),r=t.escape(i("Edit {1}",this.model.get("title"))),a={item:this.model.toJSON(),panes:n,selectedPane:this.selectedPane,paneTitle:r};return a},paneConstructorArg:function(){return{type:this.selectedPane}},showNav:function(){this.ui.navPane.removeClass("hidden");
},saveChanges:function(){var e=this.ui.saveBtn,r=this.ui.message;if(!e.isDisabled()){r.text(""),this.paneRegion.currentView.flushChanges();var a=t.reduce(this.model.changedAttributes(this.tempModel.attributes),function(e,t,n){return e[n]=t,e},{});e.addClass("active");var s=[];t.isEmpty(a)||s.push(this.model.save(a));var o=n.when.apply(n,s);o.done(t.bind(function(){this.hide()},this)),o.fail(function(){r.text(i("Your changes could not be saved."))}),o.always(function(){e.removeClass("active")})}},
onPaneShow:function(e,t){this.listenTo(t,"focusSubmit",function(){this.ui.saveBtn.focus()})},onPaneHide:function(e,t){t.flushChanges(),this.stopListening(t)},onFormSubmit:function(e){e.preventDefault(),this.saveChanges()}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1809),n(3),n(5),n(6),n(44),n(1123),n(177),n(1304),n(1305)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=r.extend({mixins:[s],name:"fixIncorrectMatch",className:"fix-incorrect-match-modal modal modal-lg fade",
template:e,panes:{form:{constructor:o},results:{constructor:l}},ui:{searchBtn:".search-btn"},regions:{paneRegion:".pane-region",autoMatchDropdownRegion:".auto-match-dropdown-region"},events:t.extend({"click .auto-match-agent":"hide","click .match-result":"hide","click .search-options-btn":"onSearchOptionsClick","click .cancel-btn":"onCancelClick","click .search-btn":"onSearchClick","submit #fix-incorrect-match-form":"onSearchSubmit"},r.prototype.events),onlyAfterRender:["showPane","updateSearchBtn"],
initialize:function(){r.prototype.initialize.apply(this,arguments),o.prototype.setupAgents.apply(this),l.prototype.setupResults.apply(this),this.showPane("results")},serializeData:function(){var e={location:this.model.getLocation(),showNavigation:!this.model.isPlexMusicItem()};return e},updateSearchBtn:function(e){this.ui.searchBtn.toggleClass("disabled","form"!==e)},fetchResults:function(e){var n=t.reduce(e.serializeArray(),function(e,t){return e[t.name]=t.value,e},{manual:1});this.model.results.fetch({
reset:!0,data:n,processData:!0,timeout:0})},bindings:{".modal-title-text":{modelAttribute:"guid",formatter:function(e){return i(/com\.plexapp\.agents\.none\:\/\//.test(e)?"Match":"Fix Incorrect Match")}}},onRender:function(){r.prototype.onRender.apply(this,arguments),this.autoMatchDropdownRegion.show(new a({model:this.model,collection:this.model.agentsProxy}))},onPaneShow:function(e){this.updateSearchBtn(e)},onSearchOptionsClick:function(e){e.preventDefault(),this.showPane("form")},onCancelClick:function(e){
e.preventDefault(),"results"!==this.selectedPane?this.showPane("results"):this.hide()},onSearchClick:function(e){e.preventDefault();var t=n(e.currentTarget);if(!t.isDisabled()){var i=t.closest("form");this.fetchResults(i),this.showPane("results")}},onSearchSubmit:function(e){e.preventDefault();var t=n(e.currentTarget),i=t.find("search-btn");i.isDisabled()||(this.fetchResults(t),this.showPane("results"))}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1812),n(3),n(44)],
r=function(e,t,n){"use strict";function i(e){return t.reduce(e,function(e,t,n){var i=r(t);if(0===n)return e.concat(i);var a=i.length>1;return e.concat({plain:!0,split:a,s:"or"},i)},[])}function r(e){var n=e.match(/(.+) (.+)/);if(n)return r(n[1]).concat({plain:!0,s:"then"}).concat(r(n[2]));var i=e.match(/(.+)\+(\S+)/);if(i)return r(i[1]).concat({plain:!0,s:"+"}).concat(r(i[2]));var a=t.reduce([[/command/,"\u2318"],[/up/,"\u2191"],[/down/,"\u2193"],[/left/,"\u2190"],[/right/,"\u2192"]],function(e,t){
return e.replace(t[0],t[1])},e);return[{s:a}]}var a=n.extend({name:"keyboardShortcutsModal",className:"keyboard-shortcuts-modal modal fade",template:e,orderedGroups:[{group:"navigation",label:"Navigation"},{group:"actions",label:"Actions"},{group:"player",label:"Player"}],initialize:function(e){n.prototype.initialize.apply(this,arguments),this.shortcuts=e.shortcuts},serializeData:function(){var e={};t.each(this.shortcuts,function(t){var n=t.group;e[n]||(e[n]=[]),e[n].push(this.humanizeShortcut(t));
},this);var n=t.map(this.orderedGroups,function(n){var i=t.clone(n);return i.shortcuts=e[n.group],i},this);return{groups:n}},humanizeShortcut:function(e){return e=t.clone(e),e.keys=i(e.keys),e}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1816),n(3),n(10),n(8),n(44)],r=function(e,t,n,i,r){"use strict";var a=r.extend({name:"plexPassModal",template:e,serializeData:function(){var e=n.resolve("appModel"),t=e.get("user").server;return{plexPassUrl:t.get("plexPassUrl"),
friendlyName:this.model.get("friendlyName"),isClaimed:this.model.get("isClaimed")}}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1828),n(3),n(9),n(43),n(39)],r=function(e,t,n,i,r){"use strict";var a=n.ItemView.extend({className:"convert-policy-container",template:e,ui:{policyUnwatchedInput:"#convert-policy-unwatched",policyScopeInput:"#convert-policy-scope",policyValueInput:"#convert-policy-value",policyWarning:".convert-warning"},events:{"change input[name=policyUnwatched]":"onPolicyUnwatchedChange",
"change input[name=policyScope]":"onPolicyScopeChange","keyup input[name=policyValue]":"onPolicyValueChange","change input[name=policyValue]":"onPolicyValueChange"},initialize:function(e){this.type=r.get(this.model.get("metadataType")||"movie"),this.childElement=r.getChildMediaType(this.type.typeString).element,this.model.setPolicyDefaultsFor(this.childElement)},serializeData:function(){var e={isSync:this.options.isSync,isCloudSync:this.options.isCloudSync,isDirectory:this.model.isDirectory(),policy:this.model.get("Policy")
};return e.showLimitWarning=this.model.shouldShowPolicyWarning(this.childElement,e.policy.value),e.showUnwatched=e.isDirectory&&this.childElement===i.elements.VIDEO,e},updatePolicyValue:function(){var e=this.model.get("Policy"),n=Math.abs(parseInt(this.ui.policyValueInput.val(),10));this.ui.policyValueInput.val(t.isNaN(n)?"":n),t.isNaN(n)&&(n=0),e.value="all"===e.scope?null:n;var i=this.model.shouldShowPolicyWarning(this.childElement,n);this.ui.policyWarning.toggleClass("hidden",!i)},onPolicyUnwatchedChange:function(e){
var t=this.model.get("Policy");t.unwatched=this.ui.policyUnwatchedInput.prop("checked")},onPolicyScopeChange:function(e){var t=this.model.get("Policy");t.scope=this.ui.policyScopeInput.prop("checked")?this.ui.policyScopeInput.val():"all",this.updatePolicyValue()},onPolicyValueChange:function(e){this.updatePolicyValue()}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1837),n(5),n(148),n(227),n(488),n(487),n(44),n(1259),n(1260),n(1257)],r=function(e,t,n,i,r,a,s,o,l,u){
"use strict";var c=s.extend({mixins:[n],name:"syncModal",className:"convert-modal modal fade",template:e,regions:{bodyRegion:".modal-body-region"},initialize:function(e){s.prototype.initialize.apply(this,arguments),this.device=this.model?this.model.device:e.device},initialState:"form",states:{form:{nextState:"success",onEnter:function(){this.bodyRegion.show(new o({model:this.model,item:this.options.item,items:this.options.items,device:this.device})),this.listenForStateRequests()}},success:{onEnter:function(){
this.model?this.hide():(this.bodyRegion.show(new l({server:this.options.item.server,device:this.device})),this.listenForStateRequests())}},error:{onEnter:function(){this.bodyRegion.show(new u),this.listenForStateRequests()}}},listenForStateRequests:function(){this.bodyRegion&&this.bodyRegion.currentView&&this.listenTo(this.bodyRegion.currentView,{"request:state":this.enterState,"request:nextState":this.enterNextState})},onRender:function(){s.prototype.onRender.apply(this,arguments),this.enterNextState();
},onStateMachineComplete:function(){this.hide()}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1852),n(3),n(6),n(8),n(44)],r=function(e,t,n,i,r){"use strict";var a=r.extend({name:"homeWarningModal",template:e,events:t.extend({"click .server-settings-btn":"onServerSettingsClick"},r.prototype.events),initialize:function(e){r.prototype.initialize.apply(this,arguments),this.type=e.type},serializeData:function(){var e;return e=n("pin"===this.type?"You've added a PIN restriction":"You've joined a Plex Home"),
{intro:e}},onServerSettingsClick:function(e){e.preventDefault(),this.hide(),i.trigger("navigate","serverSettings")}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1856),n(9),n(10),n(94)],r=function(e,t,n,i){"use strict";var r=t.ItemView.extend({tagName:"li",className:"user-select-list-item",template:e,ui:{container:".user-select-container",poster:".user-poster"},events:{"click a":"onClick"},initialize:function(e){this.disabled=e.disabled,this.posterImage=new i({
model:this.model,type:"friend",width:80});var t=n.resolve("appModel"),r=t.get("primaryServer");r&&r.supports("imageFilters")&&(this.backgroundImage=new i({model:this.model,type:"friend",width:120,background:!0,filters:{blur:20,opacity:50,background:"000000"}}),this.backgroundImage.placeholderClass=!1)},serializeData:function(){return{disabled:this.disabled}},bindings:{".username":{modelAttribute:"title"},".protected-icon":{modelAttribute:"protected",autohide:!0,manual:!0},".admin-icon":{modelAttribute:"admin",
autohide:!0,manual:!0}},onRender:function(){this.posterImage.setElement(this.ui.poster),this.backgroundImage&&this.backgroundImage.setElement(this.ui.container)},onClose:function(){this.posterImage.close(),this.backgroundImage&&this.backgroundImage.close()},onClick:function(e){e.preventDefault(),this.trigger("selectUser",this.model)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1876),n(3),n(236)],r=function(e,t,n){"use strict";var i=n.extend({className:function(){
var e=this.model.get("canSeek");return"player-seek-bar player-slider"+(e?"":" disabled")},template:e,ui:{thumb:".player-slider-thumb",track:".player-slider-track",progress:".player-slider-progress",buffer:".player-slider-buffer"},modelEvents:{"change:position":"onPositionChange","change:startBuffer":"onBufferChange","change:endBuffer":"onBufferChange","change:canSeek":"onCanSeekChange"},events:t.extend({mouseenter:"onMouseMove",mousemove:"onMouseMove",mouseleave:"onMouseLeave"},n.prototype.events),
normalizeValue:function(e){var t=this.model.get("duration");return e=t?e/t*100:0,e=Math.min(Math.max(e,0),100)},getValueForPosition:function(e){var t=this.model.get("duration"),n=this.ui.track,i=e-n.offset().left,r=i/n.width();return r=Math.min(Math.max(r,0),1),r*=t,Math.round(r)},setValue:function(e){this.model.get("canSeek")&&n.prototype.setValue.apply(this,arguments)},displayValue:function(e){e=this.normalizeValue(e),this.dragging&&(e>=100||!this.model.get("canSeek"))||n.prototype.displayValue.call(this,e);
},onRender:function(){this.displayValue(this.model.get("position"))},onPositionChange:function(e,t){this.displayValue(t)},onBufferChange:function(e,t){var n=this.model.get("endBuffer"),i=this.normalizeValue(n);this.ui.buffer.css("width",i+"%")},onCanSeekChange:function(e,t){this.$el.toggleClass("disabled",!t)},onMouseMove:function(e){var t=e.pageX,n=this.getValueForPosition(t);this.trigger("hover",{position:t,time:n})},onMouseLeave:function(e){this.trigger("hover",!1)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1897),n(9),n(10),n(8),n(514),n(1224)],r=function(e,t,n,i,r,a){"use strict";var s=t.Layout.extend({className:"friends-container col-sm-8 col-md-9",template:e,ui:{inviteListHeader:".invite-list-header",friendListHeader:".friend-list-header",pendingListHeader:".pending-list-header"},regions:{inviteList:".invite-list-container",friendList:".friend-list-container",pendingList:".pending-list-container"},initialize:function(){var e=n.resolve("appModel"),t=e.get("user");return t.get("restricted")?void i.trigger("navigate","users",{
subset:"home"}):(this.collection=t.get("friends").filterByUnrestricted(),this.invites=t.get("invites").filterByFriends(),this.sentInvites=t.get("sentInvites").filterByFriends(),void this.addListeners())},addListeners:function(){this.listenTo(this.invites,"reset add remove",this.onInvitesChange),this.listenTo(this.sentInvites,"reset add remove",this.onInvitesChange)},updateHeaders:function(){var e=!!this.invites.length,t=!!this.sentInvites.length,n=e||t;this.ui.friendListHeader.toggleClass("hidden",!n),
this.ui.inviteListHeader.toggleClass("hidden",!e),this.ui.pendingListHeader.toggleClass("hidden",!t),this.ui.friendListHeader.toggleClass("top",!e),this.ui.inviteListHeader.toggleClass("top",e)},onRender:function(){this.friendList.show(new a({collection:this.collection})),this.inviteList.show(new r({collection:this.invites})),this.pendingList.show(new r({collection:this.sentInvites})),this.updateHeaders()},onClose:function(){this.collection.destroy&&this.collection.destroy(),this.invites.destroy(),
this.sentInvites.destroy()},onInvitesChange:function(){this.updateHeaders()}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.count,i=e.kind;return o.default.createElement("div",{className:(0,d.default)(t,p.default.badge,p.default[i],!n&&p.default.isHidden)},n)}var r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=r(s),l=n(305),u=a(l),c=n(30),d=r(c),h=n(1527),p=r(h);i.propTypes={className:s.PropTypes.string,
count:s.PropTypes.number,kind:s.PropTypes.oneOf(u.all)},i.defaultProps={kind:u.DEFAULT},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.kind,i=e.size,r=e.direction,a=e.isSelected;return s.default.createElement("div",{className:(0,l.default)(t,d.default.disclosureArrow,d.default[r],d.default[n],d.default[i],a&&d.default.isSelected)})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(30),l=r(o),u=n(41),c=n(1529),d=r(c);
i.propTypes={className:a.PropTypes.string,direction:a.PropTypes.oneOf(u.directions.all),kind:a.PropTypes.oneOf(u.kinds.all),size:a.PropTypes.oneOf(u.sizes.all),isSelected:a.PropTypes.bool},i.defaultProps={direction:u.directions.DOWN,kind:u.kinds.DEFAULT,size:u.sizes.MEDIUM,isSelected:!1},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(3),d=u(c),h=n(7),p=u(h),f=n(30),m=u(f),v=n(38),g=u(v),y=n(23),b=n(27),w=u(b),S=n(112),P=u(S),x=n(40),C=u(x),T=n(1532),_=u(T),E=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDragging:!1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._stopListeningForDrag()}},{key:"_listenForDrag",value:function(e){e?(document.addEventListener("touchmove",this.onTouchMove),
document.addEventListener("touchcancel",this.onTouchEnd),document.addEventListener("touchend",this.onTouchEnd)):(document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp))}},{key:"_stopListeningForDrag",value:function(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("touchcancel",this.onTouchEnd),
document.removeEventListener("touchend",this.onTouchEnd)}},{key:"_startDrag",value:function(e,t){document.body.classList.add(_.default.isDragging),this.setState({isDragging:!0}),this._changeValue(this._getValueForPosition(e)),this._listenForDrag(t),this.props.onDragStart&&this.props.onDragStart()}},{key:"_drag",value:function(e){this._changeValue(this._getValueForPosition(e))}},{key:"_stopDrag",value:function(e){document.body.classList.remove(_.default.isDragging),this._stopListeningForDrag();var t=this._getValueForPosition(e),n=this._getSteppedValue(t);
this._changeValue(t),this.setState({isDragging:!1}),this.props.onDragComplete&&this.props.onDragComplete({positionValue:t,steppedValue:n})}},{key:"_getValueForPosition",value:function(e){var t=this.props,n=t.min,i=t.max;(0,g.default)(i>n,"The max, "+i+", must be greater than the min, "+n);var r=this.refs.track,a=r.getBoundingClientRect(),s=a.left+document.body.scrollLeft,o=e-s,l=o/r.offsetWidth;return l=Math.min(Math.max(l,0),1),(i-n)*l+n}},{key:"_getSteppedValue",value:function(e){var t=this.props,n=t.min,i=t.max,r=t.stepSize;
if(!r)return e;(0,g.default)(r>=1,"The step size, "+r+", must be greater or equal to 1");var a=Math.round(e/r)*r;return Math.min(Math.max(a,n),i)}},{key:"_getStickyValue",value:function(e){var t=this.props,n=t.max,i=t.min,r=t.stepSize,a=t.stickiness;if(!r||!a)return e;var s=this._getSteppedValue(e),o=Math.abs(s-e)/(n-i);return o<a/100?s:e}},{key:"_changeValue",value:function(e){e!==this.props.value&&this.props.onChange({positionValue:e,steppedValue:this._getSteppedValue(e)})}},{key:"_getPercent",
value:function(e,t,n){return(e-t)/(n-t)*100}},{key:"onMouseDown",decorators:[y.autobind],value:function(e){e.preventDefault(),0===e.button&&this._startDrag(e.pageX)}},{key:"onTouchStart",decorators:[y.autobind],value:function(e){e.preventDefault();var t=d.default.first(e.touches);t&&this._startDrag(t.pageX,!0)}},{key:"onMouseMove",decorators:[y.autobind],value:function(e){this._drag(e.pageX)}},{key:"onTouchMove",decorators:[y.autobind],value:function(e){var t=d.default.first(e.touches);t&&this._drag(t.pageX);
}},{key:"onMouseUp",decorators:[y.autobind],value:function(e){this._stopDrag(e.pageX)}},{key:"onTouchEnd",decorators:[y.autobind],value:function(e){var t=d.default.first(e.changedTouches);t&&this._stopDrag(t.pageX)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.trackClassName,i=e.fillClassName,r=e.thumbClassName,a=e.label,s=e.value,u=e.min,c=e.max,d=e.showFill,h=e.autoHideThumb,f=e.onMouseDown,v=e.onTouchStart,g=o(e,["className","trackClassName","fillClassName","thumbClassName","label","value","min","max","showFill","autoHideThumb","onMouseDown","onTouchStart"]),y=this.state.isDragging,b=this._getPercent(this._getStickyValue(s),u,c);
return p.default.createElement("div",l({className:(0,m.default)(t,y&&_.default.isDragging,h&&_.default.hasAutoHideThumb),onMouseDown:(0,P.default)(this.onMouseDown,f),onTouchStart:(0,P.default)(this.onTouchStart,v)},g),p.default.createElement("div",{ref:"track",className:n},d&&p.default.createElement("div",{className:i,style:{width:b+"%"}})),p.default.createElement(C.default,{className:r,style:{left:b+"%"},"aria-role":"slider","aria-labelledby":a,"aria-valuemin":u,"aria-valuemax":c,"aria-valuenow":s
}))}}]),t}(h.Component);E.propTypes={className:h.PropTypes.string,trackClassName:h.PropTypes.string,fillClassName:h.PropTypes.string,thumbClassName:h.PropTypes.string,label:h.PropTypes.string,value:h.PropTypes.number.isRequired,min:h.PropTypes.number.isRequired,max:h.PropTypes.number.isRequired,stepSize:h.PropTypes.number.isRequired,stickiness:h.PropTypes.number.isRequired,showFill:h.PropTypes.bool.isRequired,autoHideThumb:h.PropTypes.bool.isRequired,onMouseDown:h.PropTypes.func,onTouchStart:h.PropTypes.func,
onChange:h.PropTypes.func.isRequired,onDragStart:h.PropTypes.func,onDragComplete:h.PropTypes.func},E.defaultProps={className:_.default.slider,trackClassName:_.default.track,fillClassName:_.default.fill,thumbClassName:_.default.thumb,min:0,max:100,stepSize:0,stickiness:10,showFill:!1,autoHideThumb:!1},t.default=E,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var u=n(7),c=l(u),d=n(66),h=l(d),p=n(2013),f=l(p),m=n(23),v=n(27),g=l(v),y=n(470),b=l(y),w=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this._tether=null}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._destroy()}},{key:"_destroy",value:function(){this._tether&&(this._tether.destroy(),this._tether=null)}},{key:"onPortalRef",
decorators:[m.autobind],value:function(e){return e?void(this._tether=new f.default(o({element:h.default.findDOMNode(e).parentNode,target:h.default.findDOMNode(this.props.target)},this.props.options))):void this._destroy()}},{key:"render",value:function(){return c.default.createElement(b.default,o({},this.props,{onPortalRef:this.onPortalRef}))}}]),t}(u.Component);w.propTypes={target:u.PropTypes.object,options:u.PropTypes.object},w.defaultProps={options:{skipMoveElement:!0,attachment:"top left",targetAttachment:"bottom left",
constraints:[{to:"window",attachment:"together",pin:!0}]}},t.default=w,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(40),p=u(h),f=n(526),m=u(f),v=n(1535),g=u(v),y=d.default.createElement(m.default,{isSelected:!0}),b=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return r(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=o(e,["children"]);return d.default.createElement(p.default,l({className:g.default.button,"aria-haspopup":!0,isSelected:!0},n),t,y)}}]),t}(c.Component);b.propTypes={children:c.PropTypes.node.isRequired},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.circleClassName,i=e.iconClassName,s=e.title,o=r(e,["className","circleClassName","iconClassName","title"]);return l.default.createElement(f.default,a({
className:t},o),l.default.createElement("div",{className:n},l.default.createElement(h.default,{name:"plex-icon-play-560",className:i,"aria-label":(0,c.default)("Play {1}",s)})))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(6),c=s(u),d=n(48),h=s(d),p=n(40),f=s(p),m=n(1537),v=s(m);i.propTypes={className:o.PropTypes.string,circleClassName:o.PropTypes.string,iconClassName:o.PropTypes.string,title:o.PropTypes.string.isRequired
},i.defaultProps={className:v.default.playButton,circleClassName:v.default.playCircle,iconClassName:v.default.playIcon},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(30),p=u(h),f=n(23),m=n(1544),v=u(m),g=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return r(t,e),a(t,[{key:"onChange",decorators:[f.autobind],value:function(e){this.props.onChange(e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.type,r=e.name,a=e.hasError,s=o(e,["className","errorClassName","type","name","hasError"]);return d.default.createElement("input",l({},s,{id:r,name:r,type:i,className:(0,p.default)(t,a&&n),onChange:this.onChange}))}}]),t}(c.Component);g.defaultProps={className:v.default.input,errorClassName:v.default.hasError,
type:"text",hasError:!1},g.propTypes={className:c.PropTypes.string,errorClassName:c.PropTypes.string,type:c.PropTypes.oneOf(["text","password"]),name:c.PropTypes.string.isRequired,hasError:c.PropTypes.bool,onChange:c.PropTypes.func.isRequired},t.default=g,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(14).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(23),p=n(27),f=u(p),m=n(112),v=u(m),g=n(875),y=u(g),b=n(474),w=u(b),S=n(225),P=u(S),x=n(471),C=u(x),T=n(84),_=u(T),E=n(1547),k=u(E),I=function(e){
function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isRestoringScrollPosition:!1,isMeasured:!1,width:null,height:null,scrollTop:0,scrollLeft:0},this._currentScrollIndex=0,e.scrollPositionStorageKey&&(this._scrollPositionKey=y.default.getPageKey()+"!scrollPosition!"+e.scrollPositionStorageKey)}return r(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.scrollIndex?this._scrollToIndex(this.props.scrollIndex):this._restoreScrollPosition();
}},{key:"shouldComponentUpdate",value:function(e,t){return(0,f.default)(this,e,t)}},{key:"componentDidUpdate",value:function(e){var t=this.props.scrollIndex;t!==e.scrollIndex&&this._scrollToIndex(t)}},{key:"componentWillUnmount",value:function(){this._scrollPositionKey&&y.default.set(this._scrollPositionKey,{scrollTop:this.state.scrollTop,scrollLeft:this.state.scrollLeft})}},{key:"_restoreScrollPosition",value:function(){var e=this;if(this._scrollPositionKey){var t=y.default.get(this._scrollPositionKey);
t&&this.setState(o({isRestoringScrollPosition:!0},t),function(){e.setState({isRestoringScrollPosition:!1})})}}},{key:"_scrollToIndex",value:function(e){if(null!=e&&e!==this._currentScrollIndex){var t=this.props.layout,n=t.options,i=t.getPositionForIndex,r=i(Math.max(e,0)),a=n.outerPaddingTop||0,s=n.outerPaddingLeft||0;this.setState({scrollTop:r.cellY-a,scrollLeft:r.cellX-s})}}},{key:"onScrollPositionChange",decorators:[h.autobind],value:function(e){var t=e.scrollTop,n=e.scrollLeft;this.setState({
scrollTop:t,scrollLeft:n})}},{key:"onListUpdate",decorators:[h.autobind],value:function(e){var t=e.visibleStartIndex;this._currentScrollIndex=t,this.props.onListScrollIndexChange&&this.props.scrollIndex!==t&&this.props.onListScrollIndexChange(t)}},{key:"onMeasure",decorators:[h.autobind],value:function(e){var t=e.width,n=e.height;this.setState({isMeasured:!0,width:t,height:n})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.scrollerClassName,i=e.ignoreWidth,r=e.ignoreHeight,a=e.scrollDirection,s=e.onListUpdate,u=l(e,["className","scrollerClassName","ignoreWidth","ignoreHeight","scrollDirection","onListUpdate"]),c=this.state,h=c.isMeasured,p=c.isRestoringScrollPosition,f=c.width,m=c.height,g=c.scrollTop,y=c.scrollLeft;
return d.default.createElement(P.default,{className:t,ignoreWidth:i,ignoreHeight:r,onMeasure:this.onMeasure},h&&d.default.createElement(_.default,{className:n,smoothScroll:!p,scrollDirection:a,scrollTop:g,scrollLeft:y,onScrollPositionChange:this.onScrollPositionChange},d.default.createElement(C.default,o({viewportWidth:f,viewportHeight:m,onListUpdate:(0,v.default)(this.onListUpdate,s)},u))))}}]),t}(c.Component);I.propTypes={className:c.PropTypes.string,scrollerClassName:c.PropTypes.string,layout:w.default,
ignoreWidth:c.PropTypes.bool,ignoreHeight:c.PropTypes.bool,scrollDirection:c.PropTypes.string,scrollIndex:c.PropTypes.number,scrollPositionStorageKey:c.PropTypes.string,onListUpdate:c.PropTypes.func,onListScrollIndexChange:c.PropTypes.func},I.defaultProps={scrollerClassName:k.default.scroller},t.default=I,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),c=n(7),d=o(c),h=n(10),p=n(23),f=n(27),m=o(f),v=n(112),g=o(v),y=function(e){
function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onPress",decorators:[p.autobind],value:function(e){(0,h.resolve)("metrics").trackClick(u.default.omit(this.props,"children"))}},{key:"render",value:function(){var e=d.default.Children.only(this.props.children);return d.default.cloneElement(e,{onPress:(0,g.default)(this.onPress,e.props.onPress)
})}}]),t}(c.Component);y.propTypes={children:c.PropTypes.element.isRequired,page:c.PropTypes.string.isRequired,action:c.PropTypes.string.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(2).default,u=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=l(c),h=n(66),p=l(h),f=n(23),m=n(230),v=u(m),g=n(27),y=l(g),b=n(337),w=u(b),S=n(159),P=l(S),x=n(160),C=l(x),T=n(470),_=l(T),E=n(226),k=l(E),I=n(48),A=l(I),M=n(40),D=l(M),R=n(1350),O=l(R),L=n(1554),N=l(L),U=(0,
P.default)(C.default.modalSpeed),F={appear:N.default.enter,appearActive:N.default.enterActive,enter:N.default.enter,enterActive:N.default.enterActive,leave:N.default.leave,leaveActive:N.default.leaveActive},j=d.default.createElement(A.default,{name:"plex-icon-remove-560"}),B=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this._openModal()}},{key:"shouldComponentUpdate",
value:function(e,t){return(0,y.default)(this,e,t)}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen?this._openModal():e.isOpen&&!this.props.isOpen&&this._closeModal()}},{key:"componentWillUnmount",value:function(){this.props.isOpen&&this._closeModal()}},{key:"_openModal",value:function(){w.startScopedFocus(p.default.findDOMNode(this.refs.modal)),this._autoFocusTimeoutID=setTimeout(w.scopeAutoFocus,U),document.addEventListener("keydown",this.onKeyDown)}},{key:"_closeModal",
value:function(){clearTimeout(this._autoFocusTimeoutID),document.removeEventListener("keydown",this.onKeyDown)}},{key:"_isBackdropTarget",value:function(e){var t=this._findEventTarget(e);if(t){var n=p.default.findDOMNode(this.refs.modal);return!n||!n.contains(t)}return!1}},{key:"_findEventTarget",value:function(e){var t=e.changedTouches;if(!t)return e.target;if(1===t.length){var n=t[0];return document.elementFromPoint(n.clientX,n.clientY)}}},{key:"onBackdropBeginPress",decorators:[f.autobind],value:function(e){
this._isBackdropPressed=this._isBackdropTarget(e)}},{key:"onBackdropEndPress",decorators:[f.autobind],value:function(e){this._isBackdropPressed&&this._isBackdropTarget(e)&&this.props.onModalClose(),this._isBackdropPressed=!1}},{key:"onTouchMove",decorators:[f.autobind],value:function(e){this._isBackdropPressed=!1}},{key:"onTouchCancel",decorators:[f.autobind],value:function(e){this._isBackdropPressed=!1}},{key:"onClosePress",decorators:[f.autobind],value:function(e){this.props.onModalClose()}},{key:"onKeyDown",
decorators:[f.autobind],value:function(e){var t=e.keyCode;t===v.TAB?w.scopeTabEvent(e):t===v.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.props.onModalClose(),w.restorePreviousFocus())}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.backdropClassName,i=e.children,r=e.metricsPage,a=e.metricsProperties,s=e.isOpen;return d.default.createElement(_.default,{isOpen:s,closeTimeout:U},d.default.createElement(k.default,{className:N.default.modalContainer,transitionName:F,transitionAppearTimeout:U,
transitionEnterTimeout:U,transitionLeaveTimeout:U},s&&d.default.createElement(O.default,o({},a,{page:r}),d.default.createElement("div",{className:n,onMouseDown:this.onBackdropBeginPress,onMouseUp:this.onBackdropEndPress,onTouchStart:this.onBackdropBeginPress,onTouchEnd:this.onBackdropEndPress,onTouchMove:this.onTouchMove,onTouchCancel:this.onTouchCancel},d.default.createElement("div",{ref:"modal",className:t},d.default.createElement(D.default,{className:N.default.closeButton,onPress:this.onClosePress
},j),i)))))}}]),t}(c.Component);B.propTypes={className:c.PropTypes.string,backdropClassName:c.PropTypes.string,children:c.PropTypes.node,metricsPage:c.PropTypes.string.isRequired,metricsProperties:c.PropTypes.object,isOpen:c.PropTypes.bool.isRequired,onModalClose:c.PropTypes.func.isRequired},B.defaultProps={className:N.default.modal,backdropClassName:N.default.modalBackdrop},t.default=B,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.bodyClassName,i=r(e,["children","bodyClassName"]);
return l.default.createElement(c.default,a({className:h.default.modalScroller,autoScroll:!0},i),l.default.createElement("div",{className:n},t))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(84),c=s(u),d=n(1555),h=s(d);i.propTypes={children:o.PropTypes.node,bodyClassName:o.PropTypes.string},i.defaultProps={bodyClassName:h.default.modalBody},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=r(e,["children"]);
return l.default.createElement("div",a({className:c.default.modalFooter},n),t)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1556),c=s(u);i.propTypes={children:o.PropTypes.node},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=r(e,["children"]);return l.default.createElement("div",a({className:c.default.modalHeader},n),t)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var o=n(7),l=s(o),u=n(1557),c=s(u);i.propTypes={children:o.PropTypes.node},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=r(e,["children"]);return l.default.createElement("div",a({className:c.default.toolbar},n),t)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1558),c=s(u);i.propTypes={children:o.PropTypes.node},t.default=i,e.exports=t.default},function(e,t,n){"use strict";
var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(23),p=n(27),f=u(p),m=n(112),v=u(m),g=n(1351),y=u(g),b=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isOpen:!1},this._isHovered=!1,this._isFocused=!1}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,f.default)(this,e,t);
}},{key:"onMouseEnter",decorators:[h.autobind],value:function(e){this.props.showOnHover&&(this._isHovered=!0,this.setState({isOpen:!0}))}},{key:"onMouseLeave",decorators:[h.autobind],value:function(e){this.props.showOnHover&&(this._isHovered=!1,this.setState({isOpen:this._isFocused}))}},{key:"onFocus",decorators:[h.autobind],value:function(e){this.props.showOnFocus&&(this._isFocused=!0,this.setState({isOpen:!0}))}},{key:"onBlur",decorators:[h.autobind],value:function(e){this.props.showOnFocus&&(this._isFocused=!1,
this.setState({isOpen:this._isHovered}))}},{key:"onPress",decorators:[h.autobind],value:function(e){this.props.hideOnPress&&(this._isHovered=!1,this._isFocused=!1,this.setState({isOpen:!1}))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.component,i=e.tooltip,r=e.tooltipClassName,a=e.tooltipAttachment,s=e.tooltipTarget,u=e.tooltipOptions,c=e.onMouseEnter,h=e.onMouseLeave,p=e.onFocus,f=e.onBlur,m=e.onPress,g=o(e,["children","component","tooltip","tooltipClassName","tooltipAttachment","tooltipTarget","tooltipOptions","onMouseEnter","onMouseLeave","onFocus","onBlur","onPress"]),b=this.state.isOpen;
return d.default.createElement(n,l({ref:"target",onMouseEnter:(0,v.default)(this.onMouseEnter,c),onMouseLeave:(0,v.default)(this.onMouseLeave,h),onFocus:(0,v.default)(this.onFocus,p),onBlur:(0,v.default)(this.onBlur,f),onPress:(0,v.default)(this.onPress,m)},g),d.default.createElement(y.default,{className:r,attachment:a,options:u,target:s||this.refs.target,isOpen:!!i&&b},i),t)}}]),t}(c.Component);b.propTypes={children:c.PropTypes.node,className:c.PropTypes.string,component:c.PropTypes.func.isRequired,
tooltip:c.PropTypes.string,tooltipClassName:c.PropTypes.string,tooltipAttachment:c.PropTypes.string,tooltipTarget:c.PropTypes.object,tooltipOptions:c.PropTypes.object,showOnHover:c.PropTypes.bool.isRequired,showOnFocus:c.PropTypes.bool.isRequired,hideOnPress:c.PropTypes.bool.isRequired,onMouseEnter:c.PropTypes.func,onMouseLeave:c.PropTypes.func,onFocus:c.PropTypes.func,onBlur:c.PropTypes.func,onPress:c.PropTypes.func},b.defaultProps={showOnHover:!0,showOnFocus:!0,hideOnPress:!0},t.default=b,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(6),d=o(c),h=n(23),p=n(855),f=o(p),m=n(41),v=n(27),g=o(v),y=n(1457),b=o(y),w=n(48),S=o(w),P=n(40),x=o(P),C=n(532),T=o(C),_=n(1562),E=o(_),k=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={showActions:!1,enablePrevious:!1,enableNext:!1,listHeight:"auto",
scrollIndex:0},this._isReady=!1}return r(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.more&&!this.props.totalSize&&this.props.onPageRequest({startIndex:0,endIndex:this.props.size}),this.props.size||this.props.totalSize||(this._isReady=!0,this.props.onListReady())}},{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"onListUpdate",decorators:[h.autobind],value:function(e){var t=e.visibleStartIndex,n=e.visibleEndIndex,i=e.renderEndIndex,r=e.listStyle,a=this.props.onListReady,s=this._isReady?void 0:a;
this._isReady=!0,this._visibleStartIndex=t,this._visibleEndIndex=n,this._pageSize=this._visibleEndIndex-this._visibleStartIndex;var o=t>0,l=i>n;this.setState({showActions:o||l,enablePrevious:o,enableNext:l,listHeight:r.height},s)}},{key:"onListScrollIndexChange",decorators:[h.autobind],value:function(e){this.setState({scrollIndex:e})}},{key:"onPreviousPress",decorators:[h.autobind],value:function(e){this.setState({scrollIndex:this._visibleStartIndex-this._pageSize-1})}},{key:"onNextPress",decorators:[h.autobind],
value:function(e){this.setState({scrollIndex:this._visibleEndIndex+1})}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.hubLink,i=e.listType,r=e.listContext,a=e.size,s=e.more,o=e.random,l=e.totalSize,c=e.keyPropName,h=e.itemsOffset,p=e.items,v=e.cellRenderer,g=e.columnAdjustment,y=e.onPageRequest,w=this.state,P=w.showActions,C=w.enablePrevious,_=w.enableNext,k=w.listHeight;if(!a&&!l)return null;var I=(0,f.default)(t),A=s?a+1:a,M={visibility:"auto"===k?"hidden":"inherit"},D={height:k,
overflow:"hidden"};return u.default.createElement("div",{className:E.default.hubContainer,style:M},u.default.createElement("div",{className:E.default.hubHeader},u.default.createElement("div",{className:E.default.hubTitle},n?u.default.createElement(x.default,{className:E.default.hubLink,to:n},I):I),P&&u.default.createElement("div",{className:E.default.hubActions},u.default.createElement(x.default,{className:E.default.hubScrollButton,isDisabled:!C,onPress:this.onPreviousPress},u.default.createElement(S.default,{
name:"plex-icon-hub-prev-560","aria-label":(0,d.default)("Previous Page")})),u.default.createElement(x.default,{className:E.default.hubScrollButton,isDisabled:!_,onPress:this.onNextPress},u.default.createElement(S.default,{name:"plex-icon-hub-next-560","aria-label":(0,d.default)("Next Page")})))),u.default.createElement("div",{style:D},u.default.createElement(T.default,{ref:"list",ignoreHeight:!0,keyPropName:c,itemsOffset:h,items:p,listType:i,listContext:r,scrollDirection:m.scrollDirections.HORIZONTAL,
scrollIndex:this.state.scrollIndex,size:o?a:l||A,layout:(0,b.default)(i,r,g),cellRenderer:v,onListUpdate:this.onListUpdate,onListScrollIndexChange:this.onListScrollIndexChange,onPageRequest:y})))}}]),t}(l.Component);k.propTypes={machineIdentifier:l.PropTypes.string,hubIdentifier:l.PropTypes.string.isRequired,containerKey:l.PropTypes.string,title:l.PropTypes.string.isRequired,hubLink:l.PropTypes.string,type:l.PropTypes.string.isRequired,size:l.PropTypes.number.isRequired,more:l.PropTypes.bool,random:l.PropTypes.bool,
listType:l.PropTypes.string.isRequired,listContext:l.PropTypes.string.isRequired,keyPropName:l.PropTypes.string.isRequired,itemsOffset:l.PropTypes.number.isRequired,items:l.PropTypes.array.isRequired,cellRenderer:l.PropTypes.func.isRequired,totalSize:l.PropTypes.number,columnAdjustment:l.PropTypes.number.isRequired,onListReady:l.PropTypes.func,onPageRequest:l.PropTypes.func},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,g.createSelector)((0,S.default)(),x.default,function(e,t){
var n=p.default.pick(e,"totalSize","populatedRange","allowSync","isPending","isPopulated","error","firstItemType","isFirstItemLibraryItem");return r({columnAdjustment:t.columnAdjustment,metadataItemEntityIDs:e.metadataItems},n)})}var r=n(11).default,a=n(16).default,s=n(17).default,o=n(24).default,l=n(15).default,u=n(14).default,c=n(2).default,d=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var h=n(3),p=c(h),f=n(7),m=c(f),v=n(34),g=n(28),y=n(23),b=n(70),w=n(423),S=c(w),P=n(184),x=c(P),C=n(181),T=d(C),_=function(e){
function t(){l(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.metadataListEntityID;t!==this.props.metadataListEntityID&&this._populate(e)}},{key:"componentWillUnmount",value:function(){var e=this.props.metadataListEntityID;this.props.deselectAllMetadataListItems({metadataListEntityID:e})}},{key:"_populate",value:function(){
var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.initialSize&&(0,b.scheduleImmediateUpdate)(function(){e.populateMetadataListRange({metadataListEntityID:e.metadataListEntityID,startIndex:0,endIndex:e.initialSize})})}},{key:"onPageRequest",decorators:[y.autobind],value:function(e){var t=this.props,n=t.metadataListEntityID,i=t.populateMetadataListRange;i(r({metadataListEntityID:n},e))}},{key:"render",value:function(){var e=this.props,t=e.component,n=(e.populateMetadataListRange,
u(e,["component","populateMetadataListRange"]));return m.default.createElement(t,r({onPageRequest:this.onPageRequest},n))}}]),t}(f.Component);_.propTypes={metadataListEntityID:f.PropTypes.string.isRequired,component:f.PropTypes.func.isRequired,initialSize:f.PropTypes.number,listKey:f.PropTypes.string,listTitle:f.PropTypes.string,populateMetadataListRange:f.PropTypes.func.isRequired,deselectAllMetadataListItems:f.PropTypes.func.isRequired},t.default=(0,v.connect)(i,T)(_),e.exports=t.default},function(e,t,n){
"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(6),p=u(h),f=n(300),m=u(f),v=n(27),g=u(v),y=n(98),b=u(y),w=n(564),S=u(w),P=n(197),x=u(P),C=n(336),T=u(C),_=n(320),E=u(_),k=n(1360),I=u(k),A=n(547),M=u(A),D=n(1563),R=u(D),O=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{
key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cellX,i=e.cellY,r=e.cellWidth,a=e.cellHeight,s=e.showScrollPlaceholder,u=e.showOffscreenPlaceholder,c=e.listType,h=e.listContext,f=e.type,v=e.extraType,g=o(e,["className","cellX","cellY","cellWidth","cellHeight","showScrollPlaceholder","showOffscreenPlaceholder","listType","listContext","type","extraType"]),y=!g.metadataKey,w=h===b.default.CONTINUE_WATCHING,P=!f||c&&"mixed"!==c,C=v&&m.default.get(v),T=C?C.typeString:f,_=P?c:T,k=(0,
S.default)(r,null,_,g,h),A=(0,x.default)(_,h);return d.default.createElement(E.default,{className:t,cellX:n,cellY:i,cellWidth:r,cellHeight:a},d.default.createElement(I.default,l({type:f,extraType:v,cardWidth:k.width,cardHeight:k.height,imageUrl:k.url,isPlaceholder:y||s,isOffscreen:u},g)),d.default.createElement("div",{className:w?R.default.continueWatchingTitleContainer:R.default.titleContainer},y?(0,p.default)("Loading..."):A.map(function(e,t){return d.default.createElement(M.default,l({key:t,isSecondary:t>0,
isSplitLeft:w&&0===t,isSplitRight:w&&1===t},g,e))})))}}]),t}(c.Component);O.propTypes={className:c.PropTypes.string,cellX:c.PropTypes.number.isRequired,cellY:c.PropTypes.number.isRequired,cellWidth:c.PropTypes.number.isRequired,cellHeight:c.PropTypes.number.isRequired,showScrollPlaceholder:c.PropTypes.bool,showOffscreenPlaceholder:c.PropTypes.bool,listType:c.PropTypes.string,listContext:c.PropTypes.string,metadataKey:c.PropTypes.string,type:c.PropTypes.string,extraType:c.PropTypes.number,thumbTranscodeUrl:c.PropTypes.func,
grandparentThumbTranscodeUrl:c.PropTypes.func,artTranscodeUrl:c.PropTypes.func},t.default=(0,T.default)(O),e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,m.createSelector)((0,w.default)(),(0,P.default)(),C.default,_.default,function(e,t,n,i){void 0===e&&(e={});var a=e.key,s=u(e,["key"]),o=n.activeSelectionType;return r({},s,{metadataKey:a,server:t,activeSelectionType:o,activeSelectionIDs:i})})}var r=n(11).default,a=n(16).default,s=n(17).default,o=n(24).default,l=n(15).default,u=n(14).default,c=n(2).default,d=n(19).default;
Object.defineProperty(t,"__esModule",{value:!0});var h=n(7),p=c(h),f=n(34),m=n(28),v=n(23),g=n(39),y=c(g),b=n(274),w=c(b),S=n(229),P=c(S),x=n(185),C=c(x),T=n(1073),_=c(T),E=n(228),k=d(E),I=n(1463),A=c(I),M=n(181),D=n(542),R=c(D),O=r({selectMetadataListItem:M.selectMetadataListItem,deselectMetadataListItem:M.deselectMetadataListItem},k),L=function(e){function t(){l(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onSelectItem",decorators:[v.autobind],
value:function(e){var t=this.props.metadataListEntityID;this.props.selectMetadataListItem(r({metadataListEntityID:t},e))}},{key:"onDeselectItem",decorators:[v.autobind],value:function(e){var t=this.props.metadataListEntityID;this.props.deselectMetadataListItem(r({metadataListEntityID:t},e))}},{key:"render",value:function(){var e=this.props,t=e.activeSelectionIDs,n=e.ratingKey,i=e.type,a=i&&y.default.getChildMediaType(i),s=a&&a.element;return p.default.createElement(R.default,r({},this.props,{selectionKey:"ratingKey",
selectionType:s,isSelected:(0,A.default)(t,n),onSelectItem:this.onSelectItem,onDeselectItem:this.onDeselectItem}))}}]),t}(h.Component);L.propTypes={serverEntityID:h.PropTypes.string.isRequired,metadataListEntityID:h.PropTypes.string,metadataItemEntityID:h.PropTypes.string,activeSelectionIDs:h.PropTypes.array.isRequired,ratingKey:h.PropTypes.string,type:h.PropTypes.string,selectMetadataListItem:h.PropTypes.func.isRequired,deselectMetadataListItem:h.PropTypes.func.isRequired},t.default=(0,f.connect)(i,O)(L),
e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return!!h.default.find(e,function(e){return t[e]})}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(11).default,u=n(14).default,c=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),h=c(d),p=n(7),f=c(p),m=n(23),v=n(27),g=c(v),y=n(6),b=c(y),w=n(41),S=n(154),P=c(S),x=n(136),C=c(x),T=n(1349),_=c(T),E=["showPlay","showPlayVersion","showPlayAll","showShuffle","showQueue","showPlayPlexMix","showPlayTrailer","showPlayMusicVideo","showAddToPlaylist"],k=["showEdit","showMarkWatched","showMarkUnwatched","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo"],I=f.default.createElement(_.default,null),A=function(e){
function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{serverEntityID:this.props.serverEntityID,metadataItemEntityID:this.props.metadataItemEntityID}}},{key:"onPlayPress",decorators:[m.autobind],value:function(e){this.props.playMetadataItem(this._getActionPayload())}},{key:"onPlayVersionPress",decorators:[m.autobind],
value:function(e){this.props.playMetadataItemVersion(this._getActionPayload())}},{key:"onPlayAllPress",decorators:[m.autobind],value:function(e){this.props.playMetadataItemAll(this._getActionPayload())}},{key:"onShufflePress",decorators:[m.autobind],value:function(e){this.props.shuffleMetadataItem(this._getActionPayload())}},{key:"onPlayNextPress",decorators:[m.autobind],value:function(e){this.props.playMetadataItemNext(this._getActionPayload())}},{key:"onAddToQueuePress",decorators:[m.autobind],
value:function(e){this.props.addMetadataItemToQueue(this._getActionPayload())}},{key:"onPlayPlexMixPress",decorators:[m.autobind],value:function(e){this.props.playRelatedMix(this._getActionPayload())}},{key:"onPlayPrimaryExtraPress",decorators:[m.autobind],value:function(e){this.props.playPrimaryExtra(this._getActionPayload())}},{key:"onAddToPlaylistPress",decorators:[m.autobind],value:function(e){this.props.addMetadataItemToPlaylist(this._getActionPayload())}},{key:"onMarkWatchedPress",decorators:[m.autobind],
value:function(e){this.props.markMetadataItemWatched(this._getActionPayload())}},{key:"onMarkUnwatchedPress",decorators:[m.autobind],value:function(e){this.props.markMetadataItemUnwatched(this._getActionPayload())}},{key:"onEditPress",decorators:[m.autobind],value:function(e){this.props.editMetadataItem(this._getActionPayload())}},{key:"onRefreshPress",decorators:[m.autobind],value:function(e){this.props.refreshMetadataItem(this._getActionPayload())}},{key:"onAnalyzePress",decorators:[m.autobind],
value:function(e){this.props.analyzeMetadataItem(this._getActionPayload())}},{key:"onFixMatchPress",decorators:[m.autobind],value:function(e){this.props.fixMetadataItemMatch(this._getActionPayload())}},{key:"onUnmatchPress",decorators:[m.autobind],value:function(e){this.props.unmatchMetadataItem(this._getActionPayload())}},{key:"onSplitApartPress",decorators:[m.autobind],value:function(e){this.props.splitMetadataItemApart(this._getActionPayload())}},{key:"onSyncPress",decorators:[m.autobind],value:function(e){
this.props.syncMetadataItem(this._getActionPayload())}},{key:"onOptimizePress",decorators:[m.autobind],value:function(e){this.props.optimizeMetadataItem(this._getActionPayload())}},{key:"onDownloadVersionPress",decorators:[m.autobind],value:function(e){this.props.downloadMetadataItemVersion(this._getActionPayload())}},{key:"onWatchLaterPress",decorators:[m.autobind],value:function(e){this.props.watchMetadataItemLater(this._getActionPayload())}},{key:"onSharePress",decorators:[m.autobind],value:function(e){
this.props.shareMetadataItem(this._getActionPayload())}},{key:"onRecommendPress",decorators:[m.autobind],value:function(e){this.props.recommendMetadataItem(this._getActionPayload())}},{key:"onDeletePress",decorators:[m.autobind],value:function(e){var t=this._getActionPayload();this.props.deleteMetadataItem(l({},t,{skipRedirect:!0}))}},{key:"onDeleteVersionPress",decorators:[m.autobind],value:function(e){this.props.deleteMetadataItemVersion(this._getActionPayload())}},{key:"onGetInfoPress",decorators:[m.autobind],
value:function(e){this.props.getMetadataItemInfo(this._getActionPayload())}},{key:"render",value:function(){var e=this.props,t=e.target,n=e.isOpen,r=e.onMenuClose,a=u(e,["target","isOpen","onMenuClose"]),s=i(E,a),o=i(k,a),l=s&&o;return f.default.createElement(P.default,{target:t,isOpen:n,onMenuClose:r},a.showPlay&&f.default.createElement(C.default,{onPress:this.onPlayPress},a.playLabel||(0,b.default)("Play")),a.showPlayVersion&&f.default.createElement(C.default,{onPress:this.onPlayVersionPress},(0,
b.default)("Play Version...")),a.showPlayAll&&f.default.createElement(C.default,{onPress:this.onPlayAllPress},(0,b.default)("Play All")),a.showShuffle&&f.default.createElement(C.default,{onPress:this.onShufflePress},(0,b.default)("Shuffle")),a.showQueue&&f.default.createElement(C.default,{onPress:this.onPlayNextPress},(0,b.default)("Play Next")),a.showQueue&&f.default.createElement(C.default,{onPress:this.onAddToQueuePress},(0,b.default)("Add to Queue")),a.showPlayPlexMix&&f.default.createElement(C.default,{
onPress:this.onPlayPlexMixPress},(0,b.default)("Play Plex Mix")),a.showPlayTrailer&&f.default.createElement(C.default,{onPress:this.onPlayPrimaryExtraPress},(0,b.default)("Play Trailer")),a.showPlayMusicVideo&&f.default.createElement(C.default,{onPress:this.onPlayPrimaryExtraPress},(0,b.default)("Play Music Video")),a.showAddToPlaylist&&f.default.createElement(C.default,{onPress:this.onAddToPlaylistPress},(0,b.default)("Add to Playlist...")),l&&I,a.showEdit&&f.default.createElement(C.default,{onPress:this.onEditPress
},(0,b.default)("Edit")),a.showMarkWatched&&f.default.createElement(C.default,{onPress:this.onMarkWatchedPress},(0,b.default)("Mark Watched")),a.showMarkUnwatched&&f.default.createElement(C.default,{onPress:this.onMarkUnwatchedPress},(0,b.default)("Mark Unwatched")),a.showRefresh&&f.default.createElement(C.default,{onPress:this.onRefreshPress},(0,b.default)("Refresh")),a.showAnalyze&&f.default.createElement(C.default,{onPress:this.onAnalyzePress},(0,b.default)("Analyze")),a.showFixMatch&&f.default.createElement(C.default,{
onPress:this.onFixMatchPress},(0,b.default)("Fix Match...")),a.showMatch&&f.default.createElement(C.default,{onPress:this.onFixMatchPress},(0,b.default)("Match...")),a.showUnmatch&&f.default.createElement(C.default,{onPress:this.onUnmatchPress},(0,b.default)("Unmatch")),a.showSplitApart&&f.default.createElement(C.default,{onPress:this.onSplitApartPress},(0,b.default)("Split Apart")),a.showSync&&f.default.createElement(C.default,{onPress:this.onSyncPress},(0,b.default)("Sync...")),a.showOptimize&&f.default.createElement(C.default,{
onPress:this.onOptimizePress},(0,b.default)("Optimize...")),a.showDownload&&f.default.createElement(C.default,{to:a.downloadUrl&&a.downloadUrl(),download:!!a.downloadUrl,onPress:!a.downloadUrl&&this.onDownloadVersionPress},(0,b.default)("Download")),a.showWatchLater&&f.default.createElement(C.default,{onPress:this.onWatchLaterPress},(0,b.default)("Watch Later")),a.showShare&&f.default.createElement(C.default,{onPress:this.onSharePress},(0,b.default)("Share...")),a.showRecommend&&f.default.createElement(C.default,{
onPress:this.onRecommendPress},(0,b.default)("Recommend...")),a.showDelete&&f.default.createElement(C.default,{kind:w.kinds.DANGER,onPress:this.onDeletePress},(0,b.default)("Delete")),a.showDeleteVersion&&f.default.createElement(C.default,{kind:w.kinds.DANGER,onPress:this.onDeleteVersionPress},(0,b.default)("Delete Version")),a.showGetInfo&&f.default.createElement(C.default,{onPress:this.onGetInfoPress},(0,b.default)("Get Info")))}}]),t}(p.Component);A.propTypes={serverEntityID:p.PropTypes.string.isRequired,
metadataItemEntityID:p.PropTypes.string.isRequired,target:p.PropTypes.object,isOpen:p.PropTypes.bool.isRequired,onMenuClose:p.PropTypes.func.isRequired,playLabel:p.PropTypes.string,showPlay:p.PropTypes.bool,showPlayVersion:p.PropTypes.bool,showPlayAll:p.PropTypes.bool,showShuffle:p.PropTypes.bool,showQueue:p.PropTypes.bool,showPlayPlexMix:p.PropTypes.bool,showPlayTrailer:p.PropTypes.bool,showPlayMusicVideo:p.PropTypes.bool,showAddToPlaylist:p.PropTypes.bool,showEdit:p.PropTypes.bool,showMarkWatched:p.PropTypes.bool,
showMarkUnwatched:p.PropTypes.bool,showRefresh:p.PropTypes.bool,showAnalyze:p.PropTypes.bool,showFixMatch:p.PropTypes.bool,showMatch:p.PropTypes.bool,showUnmatch:p.PropTypes.bool,showSplitApart:p.PropTypes.bool,showSync:p.PropTypes.bool,showOptimize:p.PropTypes.bool,downloadUrl:p.PropTypes.func,showDownload:p.PropTypes.bool,showWatchLater:p.PropTypes.bool,showShare:p.PropTypes.bool,showRecommend:p.PropTypes.bool,showDelete:p.PropTypes.bool,showDeleteVersion:p.PropTypes.bool,showGetInfo:p.PropTypes.bool,
playMetadataItem:p.PropTypes.func,playMetadataItemVersion:p.PropTypes.func,playMetadataItemAll:p.PropTypes.func,shuffleMetadataItem:p.PropTypes.func,playMetadataItemNext:p.PropTypes.func,addMetadataItemToQueue:p.PropTypes.func,playRelatedMix:p.PropTypes.func,playPrimaryExtra:p.PropTypes.func,addMetadataItemToPlaylist:p.PropTypes.func,markMetadataItemWatched:p.PropTypes.func,markMetadataItemUnwatched:p.PropTypes.func,editMetadataItem:p.PropTypes.func,refreshMetadataItem:p.PropTypes.func,analyzeMetadataItem:p.PropTypes.func,
fixMetadataItemMatch:p.PropTypes.func,unmatchMetadataItem:p.PropTypes.func,splitMetadataItemApart:p.PropTypes.func,syncMetadataItem:p.PropTypes.func,optimizeMetadataItem:p.PropTypes.func,downloadMetadataItemVersion:p.PropTypes.func,watchMetadataItemLater:p.PropTypes.func,shareMetadataItem:p.PropTypes.func,recommendMetadataItem:p.PropTypes.func,deleteMetadataItem:p.PropTypes.func,deleteMetadataItemVersion:p.PropTypes.func,getMetadataItemInfo:p.PropTypes.func},t.default=A,e.exports=t.default},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.type,i=e.width,r=e.height,a=p[n];if(!a)return null;var o={fontSize:Math.max(14,Math.min(Math.round(i/4),42)),lineHeight:r+"px"};return s.default.createElement(c.default,{name:a,className:(0,l.default)(t,h.default.placeholderIcon),style:o})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(30),l=r(o),u=n(48),c=r(u),d=n(1568),h=r(d),p={movie:"plex-icon-movies-560",show:"plex-icon-shows-560",season:"plex-icon-shows-560",
episode:"plex-icon-shows-560",artist:"plex-icon-artist-560",album:"plex-icon-music-560",track:"plex-icon-music-560",photo:"plex-icon-photos-560",photoAlbum:"plex-icon-photos-560",clip:"plex-icon-clips-560",userPlaylistItem:"plex-icon-clips-560"};i.propTypes={className:a.PropTypes.string,type:a.PropTypes.string,width:a.PropTypes.number.isRequired,height:a.PropTypes.number.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.type,n=e.isOffscreen,i=e.url,a=e.width,s=e.height,l=e.transitionProps,c=e.onLoad,h=e.onError;
r(e,["type","isOffscreen","url","width","height","transitionProps","onLoad","onError"]);return n?null:i?o.default.createElement(u.default,{url:i,width:a,height:s,backgroundPosition:"artist"===t?"center top":"center",transitionProps:l,onLoad:c,onError:h}):o.default.createElement(d.default,{type:t,width:a,height:s})}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(319),u=a(l),c=n(545),d=a(c);i.propTypes={type:s.PropTypes.string,isOffscreen:s.PropTypes.bool,
width:s.PropTypes.number.isRequired,height:s.PropTypes.number.isRequired,url:s.PropTypes.oneOfType([s.PropTypes.func,s.PropTypes.string]),transitionProps:s.PropTypes.object,onLoad:s.PropTypes.func,onError:s.PropTypes.func},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.component,i=e.selectProps,s=e.isSecondary,o=e.isSplitLeft,u=e.isSplitRight,d=r(e,["className","component","selectProps","isSecondary","isSplitLeft","isSplitRight"]),p=i?i(d):d;return l.default.createElement(n,a({
className:(0,c.default)(t,h.default.title,s&&h.default.isSecondary,o&&h.default.isSplitLeft,u&&h.default.isSplitRight),isSecondary:s},p))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(1571),h=s(d);i.propTypes={className:o.PropTypes.string,component:o.PropTypes.func.isRequired,selectProps:o.PropTypes.func,isSecondary:o.PropTypes.bool,isSplitLeft:o.PropTypes.bool,isSplitRight:o.PropTypes.bool},t.default=i,e.exports=t.default;
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.server,i=e.metadataKey,r=e.parentKey,a=e.title,o=e.parentTitle,l=e.index,u=e.parentIndex,d=e.originallyAvailableAt,p=e.isSecondary,m=e.onPress,v=encodeURIComponent(n.machineIdentifier),g=encodeURIComponent(i),w=encodeURIComponent(r),S=(0,c.default)({seasonIndex:u,noLeadingZero:!0}),P=(0,h.default)({episodeIndex:l,date:d,noLeadingZero:!0});return s.default.createElement("span",{className:t},l>0&&s.default.createElement(f.default,{className:p&&y.default.isSecondary,
title:o,to:"#!/server/"+v+"/details/"+w,onPress:m},S),l>0&&b,s.default.createElement(f.default,{className:p&&y.default.isSecondary,title:a,to:"#!/server/"+v+"/details/"+g,onPress:m},P))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(118),l=r(o),u=n(823),c=r(u),d=n(172),h=r(d),p=n(40),f=r(p),m=n(325),v=r(m),g=n(1572),y=r(g),b=s.default.createElement(v.default,{separator:"\xb7"});i.propTypes={className:a.PropTypes.string,server:l.default.isRequired,metadataKey:a.PropTypes.string.isRequired,
parentKey:a.PropTypes.string.isRequired,title:a.PropTypes.string,parentTitle:a.PropTypes.string,index:a.PropTypes.number,parentIndex:a.PropTypes.number,originallyAvailableAt:a.PropTypes.string,isSecondary:a.PropTypes.bool.isRequired,onPress:a.PropTypes.func},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.server,i=e.id,s=e.reasonID,o=e.librarySectionType,u=e.tagType,d=e.tag,h=e.onPress,p=r(e,["className","server","id","reasonID","librarySectionType","tagType","tag","onPress"]),m=encodeURIComponent(n.machineIdentifier),v=encodeURIComponent(d),g=c.default.get(u),y=g.typeString;
return l.default.createElement(f.default,a({className:t,title:d,to:"#!/server/"+m+"/section/"+s+"/filter/"+o+"/"+y+"/"+i+"/"+v,onPress:h},p),d)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(301),c=s(u),d=n(118),h=s(d),p=n(40),f=s(p);i.propTypes={className:o.PropTypes.string,server:h.default.isRequired,id:o.PropTypes.number.isRequired,reasonID:o.PropTypes.number.isRequired,librarySectionType:o.PropTypes.number.isRequired,tagType:o.PropTypes.number.isRequired,
tag:o.PropTypes.string,onPress:o.PropTypes.func},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(p.default,r({tooltip:(0,u.default)("Add to Playlist")},e),o.default.createElement(d.default,{name:"plex-icon-toolbar-add-to-playlist-560","aria-label":(0,u.default)("Add to Playlist")}))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(48),d=a(c),h=n(155),p=a(h);t.default=i,
e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.playLabel,n=void 0===t?(0,c.default)("Play"):t,i=r(e,["playLabel"]);return l.default.createElement(f.default,a({tooltip:n},i),l.default.createElement(h.default,{name:"plex-icon-toolbar-play-560","aria-label":n}))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(6),c=s(u),d=n(48),h=s(d),p=n(155),f=s(p);i.propTypes={playLabel:o.PropTypes.string},t.default=i,
e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(p.default,r({tooltip:(0,u.default)("Shuffle")},e),o.default.createElement(d.default,{name:"plex-icon-toolbar-shuffle-560","aria-label":(0,u.default)("Shuffle")}))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(48),d=a(c),h=n(155),p=a(h);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(p.default,r({
tooltip:(0,u.default)("Sync")},e),o.default.createElement(d.default,{name:"plex-icon-toolbar-sync-560","aria-label":(0,u.default)("Sync")}))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(48),d=a(c),h=n(155),p=a(h);t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(34),o=n(28),l=n(427),u=i(l),c=n(426),d=i(c),h=n(72),p=n(1403),f=i(p),m=(0,
o.createSelector)(u.default,function(e){return!!a.default.findWhere(e,{isDownForMaintenance:!0})}),v=(0,o.createSelector)(u.default,function(e){return!!a.default.findWhere(e,{hasFailedResources:!0})}),g=(0,o.createStructuredSelector)({outOfDateServers:d.default,isDownForMaintenance:m,hasFailedResources:v,hasPlexPass:function(e){return e.user.hasPlexPass},isUserRestricted:function(e){return!!e.user.restricted}}),y={onDownloadServer:h.downloadServer},b=(0,s.connect)(function(e){return g(e)},y)(f.default);
t.default=b,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,p.createSelector)((0,b.default)(),function(e){return e.ui.hubsPage},C,function(e,t,n){return{friendlyName:e.friendlyName,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer,hasLibraries:!!e.desktop.libraries.length,hubEntityIDs:t.hubs||[],isHubsPending:t.isHubsPending,hubsError:t.hubsError,isEmpty:n}})}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(7),d=u(c),h=n(34),p=n(28),f=n(23),m=n(70),v=n(424),g=u(v),y=n(76),b=u(y),w=n(182),S=n(1066),P=n(1406),x=u(P),C=(0,p.createSelector)(g.default,function(e){return e.ui.hubsPage.hubs},function(e){for(var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=t.length;n--;){var i=t[n],r=e[i];if(r.size||r.totalSize)return!1}return!0}),T={addLibrary:w.addLibrary,initHubsPage:S.initHubsPage,fetchHubs:S.fetchHubs},_=function(e){function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return a(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.hubKey;t!==this.props.hubKey&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.hubKey&&(0,m.scheduleImmediateUpdate)(function(){e.initHubsPage({serverEntityID:e.serverEntityID,hubKey:e.hubKey}),e.fetchHubs({options:{onlyTransient:!0}})})}},{key:"onAddLibraryPress",decorators:[f.autobind],
value:function(e){this.props.addLibrary({serverEntityID:this.props.serverEntityID})}},{key:"render",value:function(){return d.default.createElement(x.default,l({onAddLibraryPress:this.onAddLibraryPress},this.props))}}]),t}(c.Component);_.propTypes={serverEntityID:c.PropTypes.string.isRequired,hubKey:c.PropTypes.string.isRequired,addLibrary:c.PropTypes.func.isRequired,initHubsPage:c.PropTypes.func.isRequired,fetchHubs:c.PropTypes.func.isRequired},t.default=(0,h.connect)(i,T)(_),e.exports=t.default;
},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.isMetadataItem,i=e.isPlaceholder,s=e.onPlayPress,o=r(e,["title","isMetadataItem","isPlaceholder","onPlayPress"]),u=o.width,d=o.type,p=(0,c.default)(u,null,d,o),m={width:p.width,height:p.height,borderRadius:n?null:"50%"};return i?l.default.createElement("div",{className:v.default.poster,style:m}):l.default.createElement("div",{className:v.default.card,style:m},n&&l.default.createElement(h.default,{className:v.default.playButton,tabIndex:"-1",
title:t,onPress:s}),l.default.createElement(f.default,a({},p,o,{title:t,isMetadataItem:n})))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(564),c=s(u),d=n(530),h=s(d),p=n(1423),f=s(p),m=n(1600),v=s(m);i.propTypes={isPlaceholder:o.PropTypes.bool,isMetadataItem:o.PropTypes.bool.isRequired,type:o.PropTypes.string,width:o.PropTypes.number.isRequired,title:o.PropTypes.string.isRequired,onPlayPress:o.PropTypes.func},t.default=i,
e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.reason,i=e.reasonID,r=e.reasonTitle,a=e.librarySectionID,s=e.librarySectionType,o=encodeURIComponent(t.machineIdentifier),l=encodeURIComponent(r),u="#!/server/"+o+"/",c="actor"===n||"director"===n,d="section"===n;return c?u+("section/"+a+"/filter/"+s+"/"+n+"/"+i+"/"+l):d?u+("section/"+i):void 0}function r(e){var t=e.className,n=e.originalTitle,r=e.reason,a=e.reasonTitle,s=e.onPress;if(!r)return null;if("originalTitle"===r)return o.default.createElement("span",{
className:t},n);if(!a)return null;var l=i(e),c={director:(0,u.default)("by"),actor:(0,u.default)("with"),section:(0,u.default)("in")};return l?o.default.createElement("span",{className:t},c[r]," ",o.default.createElement(p.default,{title:a,tabIndex:"-1",to:l,onPress:s},a)):o.default.createElement("span",{className:t},c[r]+" "+a)}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(118),d=a(c),h=n(40),p=a(h);r.propTypes={className:s.PropTypes.string,
server:d.default.isRequired,originalTitle:s.PropTypes.string,reason:s.PropTypes.string,reasonID:s.PropTypes.number,reasonTitle:s.PropTypes.string,librarySectionID:s.PropTypes.string,librarySectionType:s.PropTypes.number,onPress:s.PropTypes.func},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,y.createSelector)(_.default,function(e,t){var n=t.searchResultEntityID;return n},function(e,t){return e[t]})}function r(){return(0,y.createSelector)((0,C.default)(),i(),k.default,function(e,t,n){
var i,r=t.key,a=t.tagItem,l=t.metadataItem,u=h(t,["key","tagItem","metadataItem"]),c=l?n[l]:a,d=c.entityID,p=c.key,f=h(c,["entityID","key"]),m=l?"metadataKey":"tagKey";return s((i={searchResultKey:r},o(i,m,p),o(i,"metadataItemEntityID",d),o(i,"server",e),o(i,"isMetadataItem",!!l),i),f,u)})}function a(){return(0,w.default)(r(),function(e){return e})}var s=n(11).default,o=n(49).default,l=n(16).default,u=n(17).default,c=n(46).default,d=n(15).default,h=n(14).default,p=n(2).default,f=n(19).default;Object.defineProperty(t,"__esModule",{
value:!0});var m=n(7),v=p(m),g=n(34),y=n(28),b=n(273),w=p(b),S=n(27),P=p(S),x=n(229),C=p(x),T=n(1072),_=p(T),E=n(213),k=p(E),I=n(228),A=f(I),M=function(e){function t(){d(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return u(t,e),c(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.component,n=h(e,["component"]);return v.default.createElement(t,n)}}]),t}(m.Component);M.propTypes={
serverEntityID:m.PropTypes.string.isRequired,searchResultEntityID:m.PropTypes.string.isRequired,component:m.PropTypes.func.isRequired},t.default=(0,g.connect)(a,A)(M),e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,f.createSelector)(g.default,b.default,(0,S.default)(),function(e,t,n){var i=t.activeSelectionItems,a=t.activeSelectionType;return{activeSelectionItems:i.map(function(t){return r({},t,{model:e[t.model]})}),activeSelectionType:a,server:n}})}var r=n(11).default,a=n(16).default,s=n(17).default,o=n(24).default,l=n(15).default,u=n(2).default,c=n(19).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=u(d),p=n(34),f=n(28),m=n(23),v=n(213),g=u(v),y=n(185),b=u(y),w=n(229),S=u(w),P=n(308),x=c(P),C=n(1425),T=u(C),_=function(e){function t(){l(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onDeselectAllPress",decorators:[m.autobind],value:function(e){this.props.deselectAllItems()}},{key:"render",value:function(){return h.default.createElement(T.default,r({onDeselectAllPress:this.onDeselectAllPress
},this.props))}}]),t}(d.Component);_.propTypes={deselectAllItems:d.PropTypes.func.isRequired},t.default=(0,p.connect)(i,x)(_),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(30),d=o(c),h=n(6),p=o(h),f=n(27),m=o(f),v=n(48),g=o(v),y=n(1611),b=o(y),w=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.isConnected,i=e.isUnavailable,r=e.isSecure;return i?u.default.createElement(g.default,{className:(0,d.default)(t,b.default.alertIcon),name:"plex-icon-alert-560","aria-label":(0,p.default)("Unavailable")}):r&&n?u.default.createElement(g.default,{className:(0,d.default)(t,b.default.secureIcon),name:"plex-icon-lock-560","aria-label":(0,
p.default)("Secure")}):null}}]),t}(l.Component);w.propTypes={className:l.PropTypes.string,isConnected:l.PropTypes.bool,isUnavailable:l.PropTypes.bool,isSecure:l.PropTypes.bool},t.default=w,e.exports=t.default},function(e,t){"use strict";function n(e){var t=e.cellWidth,n=e.aspectRatio,i=e.titleHeight,r=void 0===i?0:i;return Math.floor(t/n+r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){var t=e.innerViewportWidth,n=e.innerHorizontalPadding,i=void 0===n?0:n,r=e.minCellWidth,a=e.minColumns,s=void 0===a?0:a,o=e.maxColumns,l=void 0===o?1/0:o,u=e.columnAdjustment,c=void 0===u?0:u,d=Math.floor((t+i)/(r+i)),h=void 0;
return h=d<s?s:d>l?l:d,h=Math.max(h+c,1),Math.max(Math.floor((t+i)/h)-i,0)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return function(n){return o.default.createElement(t,r({serverEntityID:e.serverEntityID,metadataListEntityID:e.metadataListEntityID,listType:e.listType,listContext:e.listContext},n))}}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(7),o=a(s);e.exports=t.default;
},function(e,t,n){"use strict";function i(e){return e.thumbTranscodeUrl||e.parentThumbTranscodeUrl||e.grandparentThumbTranscodeUrl}function r(e){return e.artTranscodeUrl||e.parentArtTranscodeUrl||e.grandparentArtTranscodeUrl}function a(e,t,n){if(n)switch(n){case u.default.PRE_PLAY:switch(e){case"season":return t.thumbTranscodeUrl;case"episode":return t.thumbTranscodeUrl;case"album":return t.thumbTranscodeUrl;case"track":return t.thumbTranscodeUrl}break;case u.default.CONTINUE_WATCHING:switch(e){case"movie":
return r(t);case"episode":return r(t)}}switch(e){case"movie":return t.thumbTranscodeUrl;case"show":return t.thumbTranscodeUrl;case"season":return i(t);case"episode":return t.grandparentThumbTranscodeUrl;case"artist":return t.thumbTranscodeUrl;case"album":return i(t);case"track":return i(t);case"photo":return t.thumbTranscodeUrl;case"photoAlbum":return t.thumbTranscodeUrl;case"clip":return t.thumbTranscodeUrl;case"playlist":return t.compositeTranscodeUrl;default:return t.thumbTranscodeUrl}}function s(e,t,n,i,r){
var s=null==e?(0,c.getWidth)(t,n,r):e,o=null==t?(0,c.getHeight)(e,n,r):t,l=a(n,i,r);return{url:l,width:s,height:o}}var o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var l=n(98),u=o(l),c=n(243);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(160),a=i(r),s=n(159),o=i(s),l=n(1620),u=i(l),c=(0,o.default)(a.default.slowSpeed),d={transitionName:u.default,transitionAppear:!0,transitionAppearTimeout:c,
transitionEnterTimeout:c,transitionLeaveTimeout:2*c};t.default=d,e.exports=t.default},function(e,t,n){e.exports={"default":n(1474),__esModule:!0}},function(e,t,n){e.exports={"default":n(1481),__esModule:!0}},function(e,t,n){e.exports={"default":n(1483),__esModule:!0}},function(e,t,n){"use strict";var i=n(1470).default,r=n(568).default,a=n(198).default;t.default=function(e,t){for(var n=i(t),s=0;s<n.length;s++){var o=n[s],l=r(t,o);l&&l.configurable&&void 0===e[o]&&a(e,o,l)}return e},t.__esModule=!0;
},function(e,t){"use strict";t.default=function(e,t){var n=t({},e);return delete n.default,n},t.__esModule=!0},function(e,t,n){var i=n(572),r=n(120)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=(t=Object(e))[r])?n:a?i(t):"Object"==(s=i(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n={}.hasOwnProperty;
e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(572);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var i=n(1497),r=n(119),a=n(1499),s=n(346),o=n(573),l=n(161),u=n(1494),c=n(577),d=n(85).getProto,h=n(120)("iterator"),p=!([].keys&&"next"in[].keys()),f="@@iterator",m="keys",v="values",g=function(){return this};e.exports=function(e,t,n,y,b,w,S){u(n,t,y);var P,x,C=function(e){if(!p&&e in k)return k[e];
switch(e){case m:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},T=t+" Iterator",_=b==v,E=!1,k=e.prototype,I=k[h]||k[f]||b&&k[b],A=I||C(b);if(I){var M=d(A.call(new e));c(M,T,!0),!i&&o(k,f)&&s(M,h,g),_&&I.name!==v&&(E=!0,A=function(){return I.call(this)})}if(i&&!S||!p&&!E&&k[h]||s(k,h,A),l[t]=A,l[T]=g,b)if(P={values:_?A:C(v),keys:w?A:C(m),entries:_?C("entries"):A},S)for(x in P)x in k||a(k,x,P[x]);else r(r.P+r.F*(p||E),t,P);
return P}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(85).setDesc,r=n(573),a=n(120)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(571),r=n(120)("iterator"),a=n(161);e.exports=n(90).getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||a[i(e)];
}},function(e,t,n){n(1508);var i=n(161);i.NodeList=i.HTMLCollection=i.Array},function(e,t){function n(e,t,n){"use strict";function i(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function r(a){var s,o,l;if(a.nodeType==y.DOCUMENT_NODE){var u,c;for(o=a.firstChild,u=0,c=a.childNodes.length;u<c;u+=1)if(a.childNodes[u].nodeType!==y.COMMENT_NODE){o=a.childNodes[u];break}return n?s=r(o):(s={},l=i(o),s[l]=r(o)),s}if(a.nodeType==y.ELEMENT_NODE){var d=0,h=a.childNodes;
s=new Object;for(var p=0;p<h.length;p++)if(o=h.item(p),l=i(o),d++,null==s[l])s[l]=r(o);else{if(null!=s[l]&&!(s[l]instanceof Array)){var f=s[l];s[l]=[],s[l].push(f)}for(var m=0;null!=s[l][m];)m++;s[l][m]=r(o)}for(var v=0;v<a.attributes.length;v++){var g=a.attributes.item(v);d++;for(var b=g.value,w=0,S=e.length;w<S;w++){var P=e[w];P.test.call(this,g.value)&&(b=P.converter.call(this,g.value))}s[t+g.name]=b}if(null!=s["#text"]){var x=s["#text"];"string"==typeof x?(x=x.replace(/[\r\n]/g,""),s["#text"]=x,
1==d&&(s=x)):delete s["#text"]}return s}return a.nodeType==y.TEXT_NODE||a.nodeType==y.CDATA_SECTION_NODE?a.nodeValue:a.nodeType==y.COMMENT_NODE?null:void 0}function a(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):e}function s(e){var t="";return null!=e.__cdata&&(t+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(t+=g?a(e.__text):e.__text),t}function o(e){var t="";return e instanceof Object?t+=s(e):null!=e&&(t+=g?a(e):e),
t}function l(e,t){return e.indexOf(t,e.length-t.length)!==-1}function u(e,t){return!!(l(t.toString(),"_asArray")||0==t.toString().indexOf("_")||e[t]instanceof Function)}function c(e){var t=0;if(e instanceof Object)for(var n in e)u(e,n)||t++;return t}function d(e){var t=[];if(e instanceof Object)for(var n in e){var i=n.toString(),r=i.charAt(0);n.indexOf("__")==-1&&("_"===r||r===r.toLowerCase()&&r!==r.toUpperCase())&&t.push(n)}return t}function h(e,t,n){var i="";if(0==e.length)i+=p(e,t,n,!0);else for(var r=0;r<e.length;r++)i+=p(e[r],t,d(e[r]),!1),
i+=m(e[r]),i+=f(e[r],t);return i}function p(e,t,n,i){var r="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+t;if(null!=n)for(var s=0;s<n.length;s++){var o=n[s],l=a(e[o]);r+=" "+o.substr(1)+"='"+l+"'"}return r+=i?"/>":">"}function f(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function m(e){var t="",n=c(e);if(n>0)for(var i in e)if(!u(e,i)){var r=e[i],a=d(r);if(null==r||void 0==r)t+=p(r,i,a,!0);else if(r instanceof Object)if(r instanceof Array)t+=h(r,i,a);else{var s=c(r);s>0||null!=r.__text||null!=r.__cdata?(t+=p(r,i,a,!1),
t+=m(r),t+=f(r,i)):t+=p(r,i,a,!0)}else t+=p(r,i,a,!1),t+=o(r),t+=f(r,i)}return t+=o(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var v="1.0.11",g=!1,y={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(e){var t;if(window.DOMParser){var n=new window.DOMParser;t=n.parseFromString(e,"text/xml")}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t;
},this.xml2json=function(e){return r(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return this.xml2json(t)},this.getVersion=function(){return v},this.escapeMode=function(e){g=e},this.json2xml_str=function(e){return m(e)}}e.exports=n},function(e,t){function n(e){for(var t=e.length,n=new Array(t),i=0;i<t;i++)n[i]=e.charCodeAt(i);return n}function i(e){for(var t="",n=0;n<e.length;n++)t+=SHA256_hexchars[e[n]>>4]+SHA256_hexchars[15&e[n]];return t}function r(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);
return t}function a(){SHA256_H=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),SHA256_buf=new Array,SHA256_len=0}function s(e){"string"==typeof e?SHA256_buf=SHA256_buf.concat(n(e)):SHA256_buf=SHA256_buf.concat(e);for(var t=0;t+64<=SHA256_buf.length;t+=64)b(SHA256_H,SHA256_buf.slice(t,t+64));SHA256_buf=SHA256_buf.slice(t),SHA256_len+=e.length}function o(){if(SHA256_buf[SHA256_buf.length]=128,SHA256_buf.length>56){for(var e=SHA256_buf.length;e<64;e++)SHA256_buf[e]=0;
b(SHA256_H,SHA256_buf),SHA256_buf.length=0}for(var e=SHA256_buf.length;e<59;e++)SHA256_buf[e]=0;SHA256_buf[59]=SHA256_len>>>29&255,SHA256_buf[60]=SHA256_len>>>21&255,SHA256_buf[61]=SHA256_len>>>13&255,SHA256_buf[62]=SHA256_len>>>5&255,SHA256_buf[63]=SHA256_len<<3&255,b(SHA256_H,SHA256_buf);for(var t=new Array(32),e=0;e<8;e++)t[4*e+0]=SHA256_H[e]>>>24,t[4*e+1]=SHA256_H[e]>>16&255,t[4*e+2]=SHA256_H[e]>>8&255,t[4*e+3]=255&SHA256_H[e];return delete SHA256_H,delete SHA256_buf,delete SHA256_len,t}function l(e){
var t;return a(),s(e),t=o(),i(t)}function u(e){"string"==typeof e?HMAC_SHA256_key=n(e):HMAC_SHA256_key=(new Array).concat(e),HMAC_SHA256_key.length>64&&(a(),s(HMAC_SHA256_key),HMAC_SHA256_key=o());for(var t=HMAC_SHA256_key.length;t<64;t++)HMAC_SHA256_key[t]=0;for(var t=0;t<64;t++)HMAC_SHA256_key[t]^=54;a(),s(HMAC_SHA256_key)}function c(e){s(e)}function d(){for(var e=o(),t=0;t<64;t++)HMAC_SHA256_key[t]^=106;a(),s(HMAC_SHA256_key),s(e);for(var t=0;t<64;t++)HMAC_SHA256_key[t]=0;return delete HMAC_SHA256_key,
o()}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function m(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function v(e,t,n){return n^e&(t^n)}function g(e,t,n){return e&t^n&(e^t)}function y(e,t){for(var n=16;n<64;n++)t[n]=p(t[n-2])+t[n-7]+h(t[n-15])+t[n-16]&4294967295;for(var i=(new Array).concat(e),n=0;n<64;n++){var r=i[7]+m(i[4])+v(i[4],i[5],i[6])+SHA256_K[n]+t[n],a=f(i[0])+g(i[0],i[1],i[2]);
i.pop(),i.unshift(r+a&4294967295),i[4]=i[4]+r&4294967295}for(var n=0;n<8;n++)e[n]=e[n]+i[n]&4294967295}function b(e,t){for(var n=new Array(16),i=0;i<16;i++)n[i]=t[4*i+0]<<24|t[4*i+1]<<16|t[4*i+2]<<8|t[4*i+3];y(e,n)}SHA256_hexchars=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"),SHA256_K=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),
t.array_to_string=r,t.SHA256_hash=l,t.HMAC_SHA256_init=u,t.HMAC_SHA256_write=c,t.HMAC_SHA256_finalize=d},function(e,t){e.exports={isSecondary:"MetadataTitleEpisodeTitleIndex-isSecondary-2jbOu MetadataPosterTitle-isSecondary-2s6Ip"}},function(e,t){e.exports={innerEmptyPage:"InnerEmptyPage-innerEmptyPage-3Yx76 EmptyPage-emptyPage-1JClc resetFont-resetFont-GoU5_",innerEmptyPageContent:"InnerEmptyPage-innerEmptyPageContent-2Reex EmptyPage-content-1Asia"}},function(e,t,n){"use strict";var i=n(79),r={listen:function(e,t,n){
return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:i}},registerDefault:function(){}};e.exports=r},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){
if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function i(e){return s?void 0:a(!1),h.hasOwnProperty(e)||(e="*"),o.hasOwnProperty(e)||("*"===e?s.innerHTML="<link />":s.innerHTML="<"+e+"></"+e+">",o[e]=!s.firstChild),o[e]?h[e]:null}var r=n(63),a=n(32),s=r.canUseDOM?document.createElement("div"):null,o={},l=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],d=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],h={
"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c},p=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];p.forEach(function(e){h[e]=d,
o[e]=!0}),e.exports=i},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function i(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=0;s<i.length;s++)if(!r.call(t,i[s])||!n(e[i[s]],t[i[s]]))return!1;return!0}var r=Object.prototype.hasOwnProperty;e.exports=i},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var i="";return i+=' <li><a class="btn-gray change-pane-btn general-btn" data-pane="general" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> '+m(n(1).call(e,"General",{hash:{},data:t}))+" </a></li> "}function o(e,t){var i="";return i+=' <li><a class="btn-gray change-pane-btn tags-btn" data-pane="tags" href="#"> <i class="modal-nav-icon glyphicon tags"></i> '+m(n(1).call(e,"Tags",{hash:{},data:t}))+" </a></li> "}function l(e,t){var i="";return i+=' <li><a class="btn-gray change-pane-btn sharing-btn" data-pane="sharing" href="#"> <i class="modal-nav-icon glyphicon parents"></i> '+m(n(1).call(e,"Sharing",{
hash:{},data:t}))+" </a></li> "}function u(e,t){var i="";return i+=' <li><a class="btn-gray change-pane-btn poster-btn" data-pane="poster" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+m(n(1).call(e,"Poster",{hash:{},data:t}))+" </a></li> "}function c(e,t){var i="";return i+=' <li><a class="btn-gray change-pane-btn banner-btn" data-pane="banner" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+m(n(1).call(e,"Banner",{hash:{},data:t}))+" </a></li> "}function d(e,t){var i="";
return i+=' <li><a class="btn-gray change-pane-btn art-btn" data-pane="art" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+m(n(1).call(e,"Background",{hash:{},data:t}))+" </a></li> "}function h(e,t){var i="";return i+=' <li><a class="btn-gray change-pane-btn info-btn" data-pane="info" href="#"> <i class="modal-nav-icon glyphicon circle-info"></i> '+m(n(1).call(e,"Info",{hash:{},data:t}))+" </a></li> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var p,f="",m=this.escapeExpression,v="function",g=this;
return f+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon pencil"></i> ',p=t&&t.paneTitle,p=typeof p===v?p.apply(t):p,(p||0===p)&&(f+=p),f+='</h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar hidden"> <ul class="list modal-nav-list"> ',p=i.if.call(t,(p=t&&t.panes,
null==p||p===!1?p:p.general),{hash:{},inverse:g.noop,fn:g.program(1,s,a),data:a}),(p||0===p)&&(f+=p),f+=" ",p=i.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.tags),{hash:{},inverse:g.noop,fn:g.program(3,o,a),data:a}),(p||0===p)&&(f+=p),f+=" ",p=i.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.sharing),{hash:{},inverse:g.noop,fn:g.program(5,l,a),data:a}),(p||0===p)&&(f+=p),f+=" ",p=i.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.poster),{hash:{},inverse:g.noop,fn:g.program(7,u,a),data:a}),(p||0===p)&&(f+=p),
f+=" ",p=i.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.banner),{hash:{},inverse:g.noop,fn:g.program(9,c,a),data:a}),(p||0===p)&&(f+=p),f+=" ",p=i.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.art),{hash:{},inverse:g.noop,fn:g.program(11,d,a),data:a}),(p||0===p)&&(f+=p),f+=" ",p=i.if.call(t,(p=t&&t.panes,null==p||p===!1?p:p.info),{hash:{},inverse:g.noop,fn:g.program(13,h,a),data:a}),(p||0===p)&&(f+=p),f+=' </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> <div class="loading loading-inline"></div> </div> </div> <div class="modal-footer"> <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+m(n(1).call(t,"Cancel",{
hash:{},data:a}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+m(n(1).call(t,"Save Changes",{hash:{},data:a}))+"</span> </button> </div> </div> </div> "})},function(e,t){"use strict";function n(e){this.string=e}n.prototype.toString=function(){return""+this.string},t.default=n},,function(e,t,n){"use strict";var i=n(1939),r=window.Raven,a=new i;a.noConflict=function(){return window.Raven=r,a},a.afterLoad(),
e.exports=a},function(e,t){"use strict";function n(e){return void 0===e}function i(e){return"function"==typeof e}function r(e){return"[object String]"===m.toString.call(e)}function a(e){return"object"==typeof e&&null!==e}function s(e){for(var t in e)return!1;return!0}function o(e){return a(e)&&"[object Error]"===m.toString.call(e)||e instanceof Error}function l(e,t){var i,r;if(n(e.length))for(i in e)d(e,i)&&t.call(null,i,e[i]);else if(r=e.length)for(i=0;i<r;i++)t.call(null,i,e[i])}function u(e,t){
return t?(l(t,function(t,n){e[t]=n}),e):e}function c(e,t){return e.length<=t?e:e.substr(0,t)+"\u2026"}function d(e,t){return m.hasOwnProperty.call(e,t)}function h(e){for(var t,n=[],i=0,a=e.length;i<a;i++)t=e[i],r(t)?n.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&n.push(t.source);return new RegExp(n.join("|"),"i")}function p(e){var t=[];return l(e,function(e,n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.join("&")}function f(){var e=window.crypto||window.msCrypto;
if(!n(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var i=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return i(t[0])+i(t[1])+i(t[2])+i(t[3])+i(t[4])+i(t[5])+i(t[6])+i(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,n="x"==e?t:3&t|8;return n.toString(16)})}var m=Object.prototype;e.exports={isUndefined:n,isFunction:i,isString:r,isObject:a,isEmptyObject:s,isError:o,
each:l,objectMerge:u,truncate:c,hasKey:d,joinRegExp:h,urlencode:p,uuid4:f}},function(e,t,n){"use strict";t.__esModule=!0;var i=n(7);t.default=i.PropTypes.shape({subscribe:i.PropTypes.func.isRequired,dispatch:i.PropTypes.func.isRequired,getState:i.PropTypes.func.isRequired})},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var i={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,
columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},r=["Webkit","ms","Moz","O"];Object.keys(i).forEach(function(e){r.forEach(function(t){i[n(t,e)]=i[e]})});var a={background:{backgroundAttachment:!0,
backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0
},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:i,shorthandPropertyExpansions:a};e.exports=s},function(e,t,n){"use strict";var i=n(596),r=n(63),a=(n(80),n(1623),n(2003)),s=n(1629),o=n(1633),l=(n(42),o(function(e){return s(e)})),u=!1,c="cssFloat";if(r.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(h){u=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat");
}var p={createMarkupForStyles:function(e,t){var n="";for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];null!=r&&(n+=l(i)+":",n+=a(i,r,t)+";")}return n||null},setValueForStyles:function(e,t,n){var r=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=a(s,t[s],n);if("float"!==s&&"cssFloat"!==s||(s=c),o)r[s]=o;else{var l=u&&i.shorthandPropertyExpansions[s];if(l)for(var d in l)r[d]="";else r[s]=""}}}};e.exports=p},function(e,t,n){"use strict";function i(){this._callbacks=null,this._contexts=null}var r=n(51),a=n(122),s=n(32);
r(i.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?s(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},checkpoint:function(){return this._callbacks?this._callbacks.length:0},rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e);
},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),a.addPoolingTo(i),e.exports=i},function(e,t){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=n},function(e,t,n){"use strict";function i(e){return(""+e).replace(w,"$&/")}function r(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var i=e.func,r=e.context;i.call(r,t,e.count++)}function s(e,t,n){
if(null==e)return e;var i=r.getPooled(t,n);g(e,a,i),r.release(i)}function o(e,t,n,i){this.result=e,this.keyPrefix=t,this.func=n,this.context=i,this.count=0}function l(e,t,n){var r=e.result,a=e.keyPrefix,s=e.func,o=e.context,l=s.call(o,t,e.count++);Array.isArray(l)?u(l,r,n,v.thatReturnsArgument):null!=l&&(m.isValidElement(l)&&(l=m.cloneAndReplaceKey(l,a+(!l.key||t&&t.key===l.key?"":i(l.key)+"/")+n)),r.push(l))}function u(e,t,n,r,a){var s="";null!=n&&(s=i(n)+"/");var u=o.getPooled(t,s,r,a);g(e,l,u),
o.release(u)}function c(e,t,n){if(null==e)return e;var i=[];return u(e,i,null,t,n),i}function d(e,t,n){return null}function h(e,t){return g(e,d,null)}function p(e){var t=[];return u(e,t,null,v.thatReturnsArgument),t}var f=n(122),m=n(86),v=n(79),g=n(373),y=f.twoArgumentPooler,b=f.fourArgumentPooler,w=/\/+/g;r.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},f.addPoolingTo(r,y),o.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,
this.count=0},f.addPoolingTo(o,b);var S={forEach:s,map:c,mapIntoWithKeyPrefixInternal:u,count:h,toArray:p};e.exports=S},function(e,t,n){"use strict";function i(e,t){var n=P.hasOwnProperty(t)?P[t]:null;C.hasOwnProperty(t)&&(n!==w.OVERRIDE_BASE?v(!1):void 0),e&&(n!==w.DEFINE_MANY&&n!==w.DEFINE_MANY_MERGED?v(!1):void 0)}function r(e,t){if(t){"function"==typeof t?v(!1):void 0,p.isValidElement(t)?v(!1):void 0;var n=e.prototype,r=n.__reactAutoBindPairs;t.hasOwnProperty(b)&&x.mixins(e,t.mixins);for(var a in t)if(t.hasOwnProperty(a)&&a!==b){
var s=t[a],u=n.hasOwnProperty(a);if(i(u,a),x.hasOwnProperty(a))x[a](e,s);else{var c=P.hasOwnProperty(a),d="function"==typeof s,h=d&&!c&&!u&&t.autobind!==!1;if(h)r.push(a,s),n[a]=s;else if(u){var f=P[a];!c||f!==w.DEFINE_MANY_MERGED&&f!==w.DEFINE_MANY?v(!1):void 0,f===w.DEFINE_MANY_MERGED?n[a]=o(n[a],s):f===w.DEFINE_MANY&&(n[a]=l(n[a],s))}else n[a]=s}}}}function a(e,t){if(t)for(var n in t){var i=t[n];if(t.hasOwnProperty(n)){var r=n in x;r?v(!1):void 0;var a=n in e;a?v(!1):void 0,e[n]=i}}}function s(e,t){
e&&t&&"object"==typeof e&&"object"==typeof t?void 0:v(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?v(!1):void 0,e[n]=t[n]);return e}function o(e,t){return function(){var n=e.apply(this,arguments),i=t.apply(this,arguments);if(null==n)return i;if(null==i)return n;var r={};return s(r,n),s(r,i),r}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function c(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var i=t[n],r=t[n+1];
e[i]=u(e,r)}}var d=n(51),h=n(602),p=n(86),f=(n(253),n(252),n(615)),m=n(245),v=n(32),g=n(246),y=n(121),b=(n(42),y({mixins:null})),w=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),S=[],P={mixins:w.DEFINE_MANY,statics:w.DEFINE_MANY,propTypes:w.DEFINE_MANY,contextTypes:w.DEFINE_MANY,childContextTypes:w.DEFINE_MANY,getDefaultProps:w.DEFINE_MANY_MERGED,getInitialState:w.DEFINE_MANY_MERGED,getChildContext:w.DEFINE_MANY_MERGED,render:w.DEFINE_ONCE,componentWillMount:w.DEFINE_MANY,
componentDidMount:w.DEFINE_MANY,componentWillReceiveProps:w.DEFINE_MANY,shouldComponentUpdate:w.DEFINE_ONCE,componentWillUpdate:w.DEFINE_MANY,componentDidUpdate:w.DEFINE_MANY,componentWillUnmount:w.DEFINE_MANY,updateComponent:w.OVERRIDE_BASE},x={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)r(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=d({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=d({},e.contextTypes,t)},getDefaultProps:function(e,t){
e.getDefaultProps?e.getDefaultProps=o(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=d({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},C={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},T=function(){};d(T.prototype,h.prototype,C);var _={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindPairs.length&&c(this),
this.props=e,this.context=t,this.refs=m,this.updater=n||f,this.state=null;var i=this.getInitialState?this.getInitialState():null;"object"!=typeof i||Array.isArray(i)?v(!1):void 0,this.state=i};t.prototype=new T,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],S.forEach(r.bind(null,t)),r(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:v(!1);for(var n in P)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){S.push(e);
}}};e.exports=_},function(e,t,n){"use strict";function i(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||r}var r=n(615),a=(n(80),n(364),n(245)),s=n(32);n(42);i.prototype.isReactComponent={},i.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?s(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate");
};e.exports=i},function(e,t,n){"use strict";var i=n(356),r=n(1965),a={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,unmountIDFromEnvironment:function(e){}};e.exports=a},function(e,t,n){"use strict";var i=n(57),r=n(1976),a=n(611),s=n(164),o=n(91),l=n(618),u=n(2004),c=n(623),d=n(2008);n(42);r.inject();var h={findDOMNode:u,render:a.render,unmountComponentAtNode:a.unmountComponentAtNode,version:l,unstable_batchedUpdates:o.batchedUpdates,
unstable_renderSubtreeIntoContainer:d};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:i.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=c(e)),e?i.getNodeFromInstance(e):null}},Mount:a,Reconciler:s});e.exports=h},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function i(){
if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=l.getValue(e);null!=t&&r(this,Boolean(e.multiple),t)}}function r(e,t,n){var i,r,a=u.getNodeFromInstance(e).options;if(t){for(i={},r=0;r<n.length;r++)i[""+n[r]]=!0;for(r=0;r<a.length;r++){var s=i.hasOwnProperty(a[r].value);a[r].selected!==s&&(a[r].selected=s)}}else{for(i=""+n,r=0;r<a.length;r++)if(a[r].value===i)return void(a[r].selected=!0);a.length&&(a[0].selected=!0)}}function a(e){
var t=this._currentElement.props,n=l.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),c.asap(i,this),n}var s=n(51),o=n(248),l=n(360),u=n(57),c=n(91),d=(n(42),!1),h={getNativeProps:function(e,t){return s({},o.getNativeProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=l.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:a.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||d||(d=!0);
},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var i=l.getValue(t);null!=i?(e._wrapperState.pendingUpdate=!1,r(e,Boolean(t.multiple),i)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?r(e,Boolean(t.multiple),t.defaultValue):r(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=h},function(e,t,n){
"use strict";function i(){if(d.current){var e=d.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function r(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;a("uniqueKey",e,t)}}function a(e,t,n){var r=i();if(!r){var a="string"==typeof n?n:n.displayName||n.name;a&&(r=" Check the top-level render call using <"+a+">.")}var s=f[e]||(f[e]={});if(s[r])return null;s[r]=!0;var o={parentOrOwner:r,url:" See https://fb.me/react-warning-keys for more information.",
childOwner:null};return t&&t._owner&&t._owner!==d.current&&(o.childOwner=" It was passed a child from "+t._owner.getName()+"."),o}function s(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var i=e[n];u.isValidElement(i)&&r(i,t)}else if(u.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var a=h(e);if(a&&a!==e.entries)for(var s,o=a.call(e);!(s=o.next()).done;)u.isValidElement(s.value)&&r(s.value,t)}}function o(e,t,n,r){for(var a in t)if(t.hasOwnProperty(a)){
var s;try{"function"!=typeof t[a]?p(!1):void 0,s=t[a](n,a,e,r)}catch(o){s=o}if(s instanceof Error&&!(s.message in m)){m[s.message]=!0;i()}}}function l(e){var t=e.type;if("function"==typeof t){var n=t.displayName||t.name;t.propTypes&&o(n,t.propTypes,e.props,c.prop),"function"==typeof t.getDefaultProps}}var u=n(86),c=n(253),d=(n(252),n(123)),h=(n(364),n(369)),p=n(32),f=(n(42),{}),m={},v={createElement:function(e,t,n){var i="string"==typeof e||"function"==typeof e,r=u.createElement.apply(this,arguments);
if(null==r)return r;if(i)for(var a=2;a<arguments.length;a++)s(arguments[a],e);return l(r),r},createFactory:function(e){var t=v.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var i=u.cloneElement.apply(this,arguments),r=2;r<arguments.length;r++)s(arguments[r],i.type);return l(i),i}};e.exports=v},function(e,t){"use strict";var n,i={injectEmptyComponentFactory:function(e){n=e}},r={create:function(e){return n(e)}};r.injection=i,e.exports=r},function(e,t){"use strict";var n={
logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function i(e){return a(document.documentElement,e)}var r=n(1969),a=n(1624),s=n(586),o=n(587),l={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=o();return{focusedElem:e,selectionRange:l.hasSelectionCapabilities(e)?l.getSelection(e):null}},restoreSelection:function(e){var t=o(),n=e.focusedElem,r=e.selectionRange;
t!==n&&i(n)&&(l.hasSelectionCapabilities(n)&&l.setSelection(n,r),s(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=r.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,i=t.end;
if(void 0===i&&(i=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(i,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var a=e.createTextRange();a.collapse(!0),a.moveStart("character",n),a.moveEnd("character",i-n),a.select()}else r.setOffsets(e,t)}};e.exports=l},function(e,t,n){"use strict";function i(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n;i++)if(e.charAt(i)!==t.charAt(i))return i;return e.length===t.length?-1:n}function r(e){
return e?e.nodeType===D?e.documentElement:e.firstChild:null}function a(e){return e.getAttribute&&e.getAttribute(I)||""}function s(e,t,n,i,r){var a;if(b.logTopLevelRenders){var s=e._currentElement.props,o=s.type;a="React mount: "+("string"==typeof o?o:o.displayName||o.name),console.time(a)}var l=S.mountComponent(e,n,null,v(e,t),r);a&&console.timeEnd(a),e._renderedComponent._topLevelWrapper=e,U._mountImageIntoNode(l,t,e,i,n)}function o(e,t,n,i){var r=x.ReactReconcileTransaction.getPooled(!n&&g.useCreateElement);
r.perform(s,null,e,t,r,n,i),x.ReactReconcileTransaction.release(r)}function l(e,t,n){for(S.unmountComponent(e,n),t.nodeType===D&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function u(e){var t=r(e);if(t){var n=m.getInstanceFromNode(t);return!(!n||!n._nativeParent)}}function c(e){var t=r(e),n=t&&m.getInstanceFromNode(t);return n&&!n._nativeParent?n:null}function d(e){var t=c(e);return t?t._nativeContainerInfo._topLevelWrapper:null}var h=n(163),p=n(138),f=n(251),m=(n(123),n(57)),v=n(1960),g=n(1964),y=n(86),b=n(609),w=(n(80),
n(1980)),S=n(164),P=n(617),x=n(91),C=n(245),T=n(626),_=n(32),E=n(371),k=n(372),I=(n(42),p.ID_ATTRIBUTE_NAME),A=p.ROOT_ATTRIBUTE_NAME,M=1,D=9,R=11,O={},L=1,N=function(){this.rootID=L++};N.prototype.isReactComponent={},N.prototype.render=function(){return this.props};var U={TopLevelWrapper:N,_instancesByReactRootID:O,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,i){return U.scrollMonitor(n,function(){P.enqueueElementInternal(e,t),i&&P.enqueueCallbackInternal(e,i)}),e},_renderNewRootComponent:function(e,t,n,i){
!t||t.nodeType!==M&&t.nodeType!==D&&t.nodeType!==R?_(!1):void 0,f.ensureScrollValueMonitoring();var r=T(e);x.batchedUpdates(o,r,t,n,i);var a=r._instance.rootID;return O[a]=r,r},renderSubtreeIntoContainer:function(e,t,n,i){return null==e||null==e._reactInternalInstance?_(!1):void 0,U._renderSubtreeIntoContainer(e,t,n,i)},_renderSubtreeIntoContainer:function(e,t,n,i){P.validateCallback(i,"ReactDOM.render"),y.isValidElement(t)?void 0:_(!1);var s=y(N,null,null,null,null,null,t),o=d(n);if(o){var l=o._currentElement,c=l.props;
if(k(c,t)){var h=o._renderedComponent.getPublicInstance(),p=i&&function(){i.call(h)};return U._updateRootComponent(o,s,n,p),h}U.unmountComponentAtNode(n)}var f=r(n),m=f&&!!a(f),v=u(n),g=m&&!o&&!v,b=U._renderNewRootComponent(s,n,g,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):C)._renderedComponent.getPublicInstance();return i&&i.call(b),b},render:function(e,t,n){return U._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==M&&e.nodeType!==D&&e.nodeType!==R?_(!1):void 0;
var t=d(e);if(!t){u(e),1===e.nodeType&&e.hasAttribute(A);return!1}return delete O[t._instance.rootID],x.batchedUpdates(l,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,a,s){if(!t||t.nodeType!==M&&t.nodeType!==D&&t.nodeType!==R?_(!1):void 0,a){var o=r(t);if(w.canReuseMarkup(e,o))return void m.precacheNode(n,o);var l=o.getAttribute(w.CHECKSUM_ATTR_NAME);o.removeAttribute(w.CHECKSUM_ATTR_NAME);var u=o.outerHTML;o.setAttribute(w.CHECKSUM_ATTR_NAME,l);var c=e,d=i(c,u);" (client) "+c.substring(d-20,d+20)+"\n (server) "+u.substring(d-20,d+20);
t.nodeType===D?_(!1):void 0}if(t.nodeType===D?_(!1):void 0,s.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else E(t,e),m.precacheNode(n,t.firstChild)}};e.exports=U},function(e,t,n){"use strict";var i=n(246),r=i({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=r},function(e,t,n){"use strict";function i(e){if("function"==typeof e.type)return e.type;var t=e.type,n=d[t];return null==n&&(d[t]=n=u(t)),n}function r(e){
return c?void 0:l(!1),new c(e)}function a(e){return new h(e)}function s(e){return e instanceof h}var o=n(51),l=n(32),u=null,c=null,d={},h=null,p={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){h=e},injectComponentClasses:function(e){o(d,e)}},f={getComponentClassForElement:i,createInternalComponent:r,createInstanceForText:a,isTextComponent:s,injection:p};e.exports=f},function(e,t,n){"use strict";var i=n(86),r=n(32),a={NATIVE:0,COMPOSITE:1,EMPTY:2,getType:function(e){
return null===e||e===!1?a.EMPTY:i.isValidElement(e)?"function"==typeof e.type?a.COMPOSITE:a.NATIVE:void r(!1)}};e.exports=a},function(e,t,n){"use strict";function i(e,t){}var r=(n(42),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){i(e,"forceUpdate")},enqueueReplaceState:function(e,t){i(e,"replaceState")},enqueueSetState:function(e,t){i(e,"setState")}});e.exports=r},function(e,t,n){"use strict";function i(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t;
}function r(e){function t(t,n,i,r,a,s){if(r=r||x,s=s||i,null==n[i]){var o=w[a];return t?new Error("Required "+o+" `"+s+"` was not specified in "+("`"+r+"`.")):null}return e(n,i,r,a,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,n,i,r,a){var s=t[n],o=v(s);if(o!==e){var l=w[r],u=g(s);return new Error("Invalid "+l+" `"+a+"` of type "+("`"+u+"` supplied to `"+i+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function s(){return r(S.thatReturns(null))}function o(e){
function t(t,n,i,r,a){if("function"!=typeof e)return new Error("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var o=w[r],l=v(s);return new Error("Invalid "+o+" `"+a+"` of type "+("`"+l+"` supplied to `"+i+"`, expected an array."))}for(var u=0;u<s.length;u++){var c=e(s,u,i,r,a+"["+u+"]");if(c instanceof Error)return c}return null}return r(t)}function l(){function e(e,t,n,i,r){if(!b.isValidElement(e[t])){var a=w[i];return new Error("Invalid "+a+" `"+r+"` supplied to "+("`"+n+"`, expected a single ReactElement."));
}return null}return r(e)}function u(e){function t(t,n,i,r,a){if(!(t[n]instanceof e)){var s=w[r],o=e.name||x,l=y(t[n]);return new Error("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+i+"`, expected ")+("instance of `"+o+"`."))}return null}return r(t)}function c(e){function t(t,n,r,a,s){for(var o=t[n],l=0;l<e.length;l++)if(i(o,e[l]))return null;var u=w[a],c=JSON.stringify(e);return new Error("Invalid "+u+" `"+s+"` of value `"+o+"` "+("supplied to `"+r+"`, expected one of "+c+"."))}return r(Array.isArray(e)?t:function(){
return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function d(e){function t(t,n,i,r,a){if("function"!=typeof e)return new Error("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var s=t[n],o=v(s);if("object"!==o){var l=w[r];return new Error("Invalid "+l+" `"+a+"` of type "+("`"+o+"` supplied to `"+i+"`, expected an object."))}for(var u in s)if(s.hasOwnProperty(u)){var c=e(s,u,i,r,a+"."+u);if(c instanceof Error)return c}return null;
}return r(t)}function h(e){function t(t,n,i,r,a){for(var s=0;s<e.length;s++){var o=e[s];if(null==o(t,n,i,r,a))return null}var l=w[r];return new Error("Invalid "+l+" `"+a+"` supplied to "+("`"+i+"`."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function p(){function e(e,t,n,i,r){if(!m(e[t])){var a=w[i];return new Error("Invalid "+a+" `"+r+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e);
}function f(e){function t(t,n,i,r,a){var s=t[n],o=v(s);if("object"!==o){var l=w[r];return new Error("Invalid "+l+" `"+a+"` of type `"+o+"` "+("supplied to `"+i+"`, expected `object`."))}for(var u in e){var c=e[u];if(c){var d=c(s,u,i,r,a+"."+u);if(d)return d}}return null}return r(t)}function m(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(m);if(null===e||b.isValidElement(e))return!0;var t=P(e);if(!t)return!1;
var n,i=t.call(e);if(t!==e.entries){for(;!(n=i.next()).done;)if(!m(n.value))return!1}else for(;!(n=i.next()).done;){var r=n.value;if(r&&!m(r[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function g(e){var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){return e.constructor&&e.constructor.name?e.constructor.name:x}var b=n(86),w=n(252),S=n(79),P=n(369),x="<<anonymous>>",C={
array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),any:s(),arrayOf:o,element:l(),instanceOf:u,node:p(),objectOf:d,oneOf:c,oneOfType:h,shape:f};e.exports=C},function(e,t,n){"use strict";function i(e){s.enqueueUpdate(e)}function r(e,t){var n=a.get(e);return n?n:null}var a=(n(123),n(363)),s=n(91),o=n(32),l=(n(42),{isMounted:function(e){var t=a.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var a=r(e);
return a?(a._pendingCallbacks?a._pendingCallbacks.push(t):a._pendingCallbacks=[t],void i(a)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],i(e)},enqueueForceUpdate:function(e){var t=r(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,i(t))},enqueueReplaceState:function(e,t){var n=r(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,i(n))},enqueueSetState:function(e,t){var n=r(e,"setState");if(n){var a=n._pendingStateQueue||(n._pendingStateQueue=[]);
a.push(t),i(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,i(e)},validateCallback:function(e,t){e&&"function"!=typeof e?o(!1):void 0}});e.exports=l},function(e,t){"use strict";e.exports="15.1.0"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function i(e,t){if(null==t?r(!1):void 0,null==e)return t;var n=Array.isArray(e),i=Array.isArray(t);
return n&&i?(e.push.apply(e,t),e):n?(e.push(t),e):i?[e].concat(t):[e,t]}var r=n(32);e.exports=i},function(e,t,n){"use strict";function i(e,t,n){var i=e,r=void 0===i[n];r&&null!=t&&(i[n]=t)}function r(e){if(null==e)return e;var t={};return a(e,i,t),t}var a=(n(359),n(373));n(42);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function i(e){for(var t;(t=e._renderedNodeType)===r.COMPOSITE;)e=e._renderedComponent;
return t===r.NATIVE?e._renderedComponent:t===r.EMPTY?null:void 0}var r=n(614);e.exports=i},function(e,t,n){"use strict";function i(){return!a&&r.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var r=n(63),a=null;e.exports=i},function(e,t,n){"use strict";function i(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function r(e){if(o[e])return o[e];if(!s[e])return e;var t=s[e];
for(var n in t)if(t.hasOwnProperty(n)&&n in l)return o[e]=t[n];return""}var a=n(63),s={animationend:i("Animation","AnimationEnd"),animationiteration:i("Animation","AnimationIteration"),animationstart:i("Animation","AnimationStart"),transitionend:i("Transition","TransitionEnd")},o={},l={};a.canUseDOM&&(l=document.createElement("div").style,"AnimationEvent"in window||(delete s.animationend.animation,delete s.animationiteration.animation,delete s.animationstart.animation),"TransitionEvent"in window||delete s.transitionend.transition),
e.exports=r},function(e,t,n){"use strict";function i(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function r(e){var t,n=null===e||e===!1;if(n)t=o.create(r);else if("object"==typeof e){var a=e;!a||"function"!=typeof a.type&&"string"!=typeof a.type?u(!1):void 0,t="string"==typeof a.type?l.createInternalComponent(a):i(a.type)?new a.type(a):new c(a)}else"string"==typeof e||"number"==typeof e?t=l.createInstanceForText(e):u(!1);
t._mountIndex=0,t._mountImage=null;return t}var a=n(51),s=n(1957),o=n(608),l=n(613),u=(n(80),n(32)),c=(n(42),function(e){this.construct(e)});a(c.prototype,s.Mixin,{_instantiateReactComponent:r});e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&i[e.type]||"textarea"===t)}var i={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n;
},function(e,t,n){"use strict";function i(e){return r.isValidElement(e)?void 0:a(!1),e}var r=n(86),a=n(32);e.exports=i},function(e,t,n){"use strict";var i=n(63),r=n(256),a=n(371),s=function(e,t){e.textContent=t};i.canUseDOM&&("textContent"in document.documentElement||(s=function(e,t){a(e,r(t))})),e.exports=s},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){if(0===t.length)return arguments.length<=0?void 0:arguments[0];var e=t[t.length-1],n=t.slice(0,-1);
return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){function i(){f===p&&(f=p.slice())}function a(){return h}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return i(),f.push(e),function(){if(t){t=!1,i();var n=f.indexOf(e);f.splice(n,1)}}}function u(e){if(!(0,s.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");
if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,h=d(h,e)}finally{m=!1}for(var t=p=f,n=0;n<t.length;n++)t[n]();return e}function c(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");d=e,u({type:o.INIT})}if("function"==typeof t&&"undefined"==typeof n&&(n=t,t=void 0),"undefined"!=typeof n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");
return n(r)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var d=e,h=t,p=[],f=p,m=!1;return u({type:o.INIT}),{dispatch:u,subscribe:l,getState:a,replaceReducer:c}}t.__esModule=!0,t.ActionTypes=void 0,t.default=r;var a=n(355),s=i(a),o=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t.default=n},,,,,,function(e,t,n){
(function(e){+function(e){"use strict";var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,i=n.is("input")?"val":"html",r=n.data();e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){"loadingText"==e?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons"]');
if(e.length){var t=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===t.prop("type")&&e.find(".active").removeClass("active")}this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var i=e(this),r=i.data("bs.button"),a="object"==typeof n&&n;r||i.data("bs.button",r=new t(this,a)),"toggle"==n?r.toggle():n&&r.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,
this},e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),t.preventDefault()})}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";function t(){e(i).remove(),e(r).each(function(t){var i=n(e(this));i.hasClass("open")&&(i.trigger(t=e.Event("hide.bs.dropdown")),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown"))})}function n(t){var n=t.attr("data-target");
n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}var i=".dropdown-backdrop",r="[data-toggle=dropdown]",a=function(t){e(t).on("click.bs.dropdown",this.toggle)};a.prototype.toggle=function(i){var r=e(this);if(!r.is(".disabled, :disabled")){var a=n(r),s=a.hasClass("open");if(t(),!s){if("ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t),
a.trigger(i=e.Event("show.bs.dropdown")),i.isDefaultPrevented())return;a.toggleClass("open").trigger("shown.bs.dropdown"),r.focus()}return!1}},a.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var a=n(i),s=a.hasClass("open");if(!s||s&&27==t.keyCode)return 27==t.which&&a.find(r).focus(),i.click();var o=e("[role=menu] li:not(.divider):visible a",a);if(o.length){var l=o.index(o.filter(":focus"));38==t.keyCode&&l>0&&l--,
40==t.keyCode&&l<o.length-1&&l++,~l||(l=0),o.eq(l).focus()}}}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("dropdown");i||n.data("dropdown",i=new a(this)),"string"==typeof t&&i[t].call(n)})},e.fn.dropdown.Constructor=a,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.bs.dropdown.data-api",t).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",r,a.prototype.toggle).on("keydown.bs.dropdown.data-api",r+", [role=menu]",a.prototype.keydown);
}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,i=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,
this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var i=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),i&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var r=e.Event("shown.bs.modal",{relatedTarget:t});i?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(r);
}).emulateTransitionEnd(300):n.$element.focus().trigger(r)}))},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal());
},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){
e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&n;if(this.$backdrop=e('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this));
},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,i){return this.each(function(){var r=e(this),a=r.data("bs.modal"),s=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);
a||r.data("bs.modal",a=new t(this,s)),"string"==typeof n?a[n](i):s.show&&a.show(i)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),i=n.attr("href"),r=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),a=r.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},r.data(),n.data());t.preventDefault(),r.modal(a,this).one("hide",function(){n.is(":visible")&&n.focus();
})}),e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,i){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i);for(var r=this.options.trigger.split(" "),a=r.length;a--;){var s=r[a];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var o="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(o+"."+this.type,this.options.selector,e.proxy(this.enter,this)),
this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){
n[e]!=i&&(t[e]=i)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show()},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);
return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,a=r.test(i);
a&&(i=i.replace(r,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var s=this.getPosition(),o=n[0].offsetWidth,l=n[0].offsetHeight;if(a){var u=this.$element.parent(),c=i,d=document.documentElement.scrollTop||document.body.scrollTop,h="body"==this.options.container?window.innerWidth:u.outerWidth(),p="body"==this.options.container?window.innerHeight:u.outerHeight(),f="body"==this.options.container?0:u.offset().left;
i="bottom"==i&&s.top+s.height+l-d>p?"top":"top"==i&&s.top-d-l<0?"bottom":"right"==i&&s.right+o>h?"left":"left"==i&&s.left-o<f?"right":i,n.removeClass(c).addClass(i)}var m=this.getCalculatedOffset(i,s,o,l);this.applyPlacement(m,i),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,i=this.tip(),r=i[0].offsetWidth,a=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),o=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(o)&&(o=0),e.top=e.top+s,e.left=e.left+o,
i.offset(e).addClass("in");var l=i[0].offsetWidth,u=i[0].offsetHeight;if("top"==t&&u!=a&&(n=!0,e.top=e.top+a-u),/bottom|top/.test(t)){var c=0;e.left<0&&(c=e.left*-2,e.left=0,i.offset(e),l=i[0].offsetWidth,u=i[0].offsetHeight),this.replaceArrow(c-r+l,l,"left")}else this.replaceArrow(u-a,u,"top");n&&i.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),
e.removeClass("fade in top bottom left right")},t.prototype.hide=function(){function t(){"in"!=n.hoverState&&i.detach()}var n=this,i=this.tip(),r=e.Event("hide.bs."+this.type);if(this.$element.trigger(r),!r.isDefaultPrevented())return i.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i.one(e.support.transition.end,t).emulateTransitionEnd(150):t(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","");
},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,i){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-i,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-i/2,left:t.left-n}:{top:t.top+t.height/2-i/2,
left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){
this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var i=e(this),r=i.data("bs.tooltip"),a="object"==typeof n&&n;
r||i.data("bs.tooltip",r=new t(this,a)),"string"==typeof n&&r[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(e)}).call(t,n(5))},function(e,t,n){(function(e){+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){
var n=!1,i=this;e(this).one(e.support.transition.end,function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t()})}(e)}).call(t,n(5))},function(e,t,n){(function(e){/*!
	 * jQuery scrollintoview() plugin and :scrollable selector filter
	 *
	 * Version 1.8 (14 Jul 2011)
	 * Requires jQuery 1.4 or newer
	 *
	 * Copyright (c) 2011 Robert Koritnik
	 * Licensed under the terms of the MIT license
	 * http://www.opensource.org/licenses/mit-license.php
	 */
!function(e){var t={vertical:{x:!1,y:!0},horizontal:{x:!0,y:!1},both:{x:!0,y:!0},x:{x:!0,y:!1},y:{x:!1,y:!0}},n={duration:"fast",direction:"both"},i=/^(?:html)$/i,r=function(t,n){n=n||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle);var i=!(!document.defaultView||!document.defaultView.getComputedStyle),r={top:parseFloat(i?n.borderTopWidth:e.css(t,"borderTopWidth"))||0,left:parseFloat(i?n.borderLeftWidth:e.css(t,"borderLeftWidth"))||0,
bottom:parseFloat(i?n.borderBottomWidth:e.css(t,"borderBottomWidth"))||0,right:parseFloat(i?n.borderRightWidth:e.css(t,"borderRightWidth"))||0};return{top:r.top,left:r.left,bottom:r.bottom,right:r.right,vertical:r.top+r.bottom,horizontal:r.left+r.right}},a=function(t){var n=e(window),a=i.test(t[0].nodeName);return{border:a?{top:0,left:0,bottom:0,right:0}:r(t[0]),scroll:{top:(a?n:t).scrollTop(),left:(a?n:t).scrollLeft()},scrollbar:{right:a?0:t.innerWidth()-t[0].clientWidth,bottom:a?0:t.innerHeight()-t[0].clientHeight
},rect:function(){var e=t[0].getBoundingClientRect();return{top:a?0:e.top,left:a?0:e.left,bottom:a?t[0].clientHeight:e.bottom,right:a?t[0].clientWidth:e.right}}()}};e.fn.extend({scrollIntoView:function(r){r=e.extend({},n,r),r.direction=t["string"==typeof r.direction&&r.direction.toLowerCase()]||t.both;var s="";r.direction.x===!0&&(s="horizontal"),r.direction.y===!0&&(s=s?"both":"vertical");var o=this.eq(0),l=o.closest(":scrollable("+s+")");if(l.length>0){l=l.eq(0);var u={e:a(o),s:a(l)};if(r.center){
var c=(u.s.rect.bottom-u.s.rect.top-(u.e.rect.bottom-u.e.rect.top))/2,d=(u.s.rect.right-u.s.rect.left-(u.e.rect.right-u.e.rect.left))/2;r.direction.y&&(u.e.rect.top-=c,u.e.rect.bottom+=c),r.direction.x&&(u.e.rect.left-=d,u.e.rect.right+=d)}var h={top:u.e.rect.top-(u.s.rect.top+u.s.border.top),bottom:u.s.rect.bottom-u.s.border.bottom-u.s.scrollbar.bottom-u.e.rect.bottom,left:u.e.rect.left-(u.s.rect.left+u.s.border.left),right:u.s.rect.right-u.s.border.right-u.s.scrollbar.right-u.e.rect.right},p={};
r.direction.y===!0&&(h.top<0?p.scrollTop=u.s.scroll.top+h.top:h.top>0&&h.bottom<0&&(p.scrollTop=u.s.scroll.top+Math.min(h.top,-h.bottom))),r.direction.x===!0&&(h.left<0?p.scrollLeft=u.s.scroll.left+h.left:h.left>0&&h.right<0&&(p.scrollLeft=u.s.scroll.left+Math.min(h.left,-h.right))),e.isEmptyObject(p)?e.isFunction(r.complete)&&r.complete.call(l[0]):(i.test(l[0].nodeName)&&(l=e("html,body")),l.animate(p,r.duration).eq(0).queue(function(t){e.isFunction(r.complete)&&r.complete.call(l[0]),t()}))}return this;
}});var s={auto:!0,scroll:!0,visible:!1,hidden:!1};e.extend(e.expr[":"],{scrollable:function(e,n,r,a){var o=t["string"==typeof r[3]&&r[3].toLowerCase()]||t.both,l=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null):e.currentStyle,u={x:s[l.overflowX.toLowerCase()]||!1,y:s[l.overflowY.toLowerCase()]||!1,isRoot:i.test(e.nodeName)};if(!u.x&&!u.y&&!u.isRoot)return!1;var c={height:{scroll:e.scrollHeight,client:e.clientHeight},width:{scroll:e.scrollWidth,
client:e.clientWidth},scrollableX:function(){return(u.x||u.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(u.y||u.isRoot)&&this.height.scroll>this.height.client}};return o.y&&c.scrollableY()||o.x&&c.scrollableX()}})}(e)}).call(t,n(5))},function(e,t,n){var i,r;i=[n(5),n(1925)],r=function(e,t){"use strict";e.fn.translate=function(e,n){var i=t.csstransforms3d?"translate3d("+e+"px, "+n+"px, 0)":"translate("+e+"px, "+n+"px)";if(1===this.length){var r=this[0].style;"webkitTransform"in r?r.webkitTransform=i:"OTransform"in r?r.OTransform=i:r.transform=i;
}else this.css("transform",i)}}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length?i.apply(void 0,t):r.apply(void 0,t)}function i(e){var t=void 0;return"undefined"!=typeof Reflect?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach(function(t){if("constructor"!==t){
var n=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof n.value&&Object.defineProperty(e.prototype,t,r(e,t,n))}}),e}function r(e,t,n){var i=n.value;if("function"!=typeof i)throw new Error("@autobind decorator can only be applied to methods not: "+typeof i);return{configurable:!0,get:function(){if(this===e.prototype)return i;var n=i.bind(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,
e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1518),a=i(r),s=n(29),o=i(s),l=o.default.extend({constructor:function(e){this.ga=this.createGaQueue(),(0,a.default)("create",e,"auto")},createGaQueue:function(){var e=function t(){t.queue.push(arguments)};return e.queue=[],e.run=function(){for(;e.queue.length;)a.default.apply(window,e.queue.shift())},e},enable:function(){this.ga.run&&this.ga.run(),this.ga=a.default},disable:function(){
this.ga=function(){}},set:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t={name:"appName",version:"appVersion"},n={};for(var i in e)n[t[i]||i]=e[i];(0,a.default)("set",n)},trackView:function(e){this.ga("send",{hitType:"appview",description:e})},trackEvent:function(e){this.ga("send","event",e)}});t.default=l,e.exports=t.default},function(e,t,n){var i,r;i=[n(29),n(26)],r=function(e,t){"use strict";var n=e.extend({enable:function(){t("[Analytics] Enabled")},disable:function(){
t("[Analytics] Disabled")},set:function(e){t("[Analytics] Set options:",e)},trackView:function(e){t('[Analytics] Tracked view "%s"',e)},trackEvent:function(e){t("[Analytics] Tracked event:",e)}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(26),a=i(r),s={init:function(e){(0,a.default)('[ErrorTracker] Initialized with id="%s"',e)},enable:function(){(0,a.default)("[ErrorTracker] Enabled")},
disable:function(){(0,a.default)("[ErrorTracker] Disabled")},set:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,a.default)("[ErrorTracker] Set options:",e)},capture:function(e,t){a.default.error("[ErrorTracker] Captured error:",e,t)}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o={defaults:{},enabled:!0,url:"https://metrics.plex.tv/collect/event",
enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},set:function(e){this.defaults=i({},this.defaults,e)},trackView:function(e,t){this.trackEvent(i({event:"client:view",interaction:!0,properties:e},t))},trackClick:function(e,t){this.trackEvent(i({event:"client:click",interaction:!0,properties:e},t))},trackEvent:function(e){if(this.enabled){var t=s.default.extend(!0,{},this.defaults,e),n=JSON.stringify(t);navigator.sendBeacon?navigator.sendBeacon(this.url,n):s.default.ajax({type:"POST",
url:this.url,contentType:"application/json",data:n})}}};t.default=o,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(593),a=i(r);a.default.debug=!1;var s={},o={},l={userTitle:"username",userID:"id"},u=!1,c={init:function(e){a.default.config(e)},enable:function(){u||(u=!0,a.default.install())},disable:function(){u&&(u=!1,a.default.uninstall())},set:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];
for(var t in e){var n=e[t];"release"===t?a.default.setRelease(n):l[t]?(o[l[t]]=n,a.default.setUserContext(o)):(s[t]=n,a.default.setTagsContext(s))}},capture:function(e,t){a.default.captureException(e,t)}};t.default=c,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=["enable","disable","set","trackView","trackClick","trackEvent"];t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(1519),a=i(r),s=n(29),o=i(s),l=o.default.extend({load:function(e,t){this.dashPlayer&&this.stop(),this.dashPlayer=new a.default.BasicPlayer({url:e,mediaElement:t}),this.dashPlayer.init()},stop:function(){var e=this.dashPlayer;this.dashPlayer=null;try{e.destroy()}catch(t){}},canPause:function(e){return e.autopause_pending||e.autopaused}});t.default=l,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(43),n(222),n(176),n(382)],r=function(e,t,n,i,r){"use strict";var a=r.extend({
type:t.types.MUSIC,modelDefaults:function(){var t=r.prototype.modelDefaults.apply(this,arguments);return e.extend(t,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:!0,showSeekBar:!0,showShuffle:!0,showRepeat:!0,showLyrics:!0,showPlayQueue:!0})},getPlayerDecision:function(e,t){this.backlog.clear();var n=this.getPlayerDecisionPromise(e,t);return n.done(this.onDecisionSuccess),n.fail(this.onDecisionError),n},getPlayerDecisionPromise:function(e,t){return n.getPlayerDecision({type:this.type,profile:this.profile,
item:e,offset:t.offset,fallbackServer:t.fallbackServer,transcoder:i})},shouldSkipOnError:function(){return!0}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(29),n(56),n(43),n(50),n(261)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.extend({mixins:[a,s],type:r.types.PHOTO,slideshowDelay:5e3,skipTransition:!1,modelDefaults:function(){var t=s.modelDefaults.apply(this,arguments);return e.extend(t,{ready:!0,canPlayPause:!0,canStop:!0,showEnterFullscreen:i.hasFullscreen
})},initialize:function(t){s.initialize.apply(this,arguments),this.loop=!(!t||!t.loop),e.bindAll(this,"skipPrevious","skipNext")},load:function(e){return this.model=e.model,e.autoplay?this.play():this.pause(),this.reset(this.model.get("playQueueItem")),this.listenTo(this.model,{"change:state":this.onStateChange,"change:loaded":this.onLoadedChange,"change:error":this.onErrorChange}),t.Deferred().resolve().promise()},reset:function(t){this.currentItem&&this.timeline({state:r.states.STOPPED,continuing:!0
});var n={loop:this.loop};return this.currentItem=t,this.previousItem=this.getPreviousItem(t,n),this.nextItem=this.getNextItem(t,n),this.model.set(e.result(this,"modelDefaults")),this.timeline().done(e.bind(this.updatePlayQueue,this)),t},play:function(){this.model.set({state:r.states.PLAYING,slideshowState:r.slideshowStates.PLAYING}),this.model.get("loaded")&&(this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay)),this.model.get("errorMessage")&&(this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay/2)),
this.startPlaybackTracking()},pause:function(){this.model.set({state:r.states.PAUSED,slideshowState:r.slideshowStates.PAUSED}),this.slideshowTimeout=clearTimeout(this.slideshowTimeout),this.stopPlaybackTracking()},skipPrevious:function(e){return e||(e={}),this.skipTransition=!!e.manual,this.previousItem&&(this.slideshowTimeout=clearTimeout(this.slideshowTimeout)),this.model.set("state",r.states.BUFFERING),s.skipPrevious.apply(this,arguments)},skipNext:function(e){return e||(e={}),this.skipTransition=!!e.manual,
this.nextItem&&(this.slideshowTimeout=clearTimeout(this.slideshowTimeout)),this.model.set("state",r.states.BUFFERING),s.skipNext.apply(this,arguments)},stop:function(e){s.stop.apply(this,arguments),this.slideshowTimeout=clearTimeout(this.slideshowTimeout),this.stopPlaybackTracking(),this.trackPlaybackEvent()},onStateChange:function(t,n){this.timeline().done(e.bind(this.updatePlayQueue,this))},onLoadedChange:function(e,t){t&&(this.model.get("slideshowState")===r.slideshowStates.PLAYING?(clearTimeout(this.slideshowTimeout),
this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay),this.model.set("state",r.states.PLAYING)):this.model.set("state",r.states.PAUSED))},onErrorChange:function(e,t){t&&this.model.get("slideshowState")===r.slideshowStates.PLAYING&&(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay/2))}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0
});var r=n(260),a=i(r),s=a.default.extend({storageName:"BasicVolatileStorage",initialize:function(){var e={};this.api={getItem:function(t){return e[t]},setItem:function(t,n){e[t]=n},removeItem:function(t){delete e[t]},clear:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]}}},getStorage:function(){return this.api}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(260),a=i(r);try{"string"==typeof localStorage.getItem&&delete localStorage.getItem,
"string"==typeof localStorage.setItem&&delete localStorage.setItem,"string"==typeof localStorage.removeItem&&delete localStorage.removeItem,"string"==typeof localStorage.clear&&delete localStorage.clear}catch(s){}var o=a.default.extend({storageName:"PersistentWebStorage",getStorage:function(){return window.localStorage}});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(260),a=i(r),s=a.default.extend({storageName:"VolatileWebStorage",
getStorage:function(){return window.sessionStorage}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";function i(e){return 401===e.status||403===e.status||406===e.status}function r(e){var t=e.server,n=e.connection;return!S.default.get("testPrivateConnectionsWhenPublicAddressDoesNotMatch")&&!t.get("isCloud")&&!t.get("isTransient")&&!t.get("publicAddressMatches")&&n.get("isPrivate")}function a(e,t){var n=t.server,i=n.get("debugName");return b.default.warn("[Connections] Aborting connection test for %s at %s because secure connections are disallowed",i,e),
l(e,t)}function s(e,t){var n=t.server,i=n.get("debugName");return b.default.warn("[Connections] Aborting connection test for %s at %s because location does not match",i,e),l(e,t)}function o(e,t){var n=t.server,i=n.get("debugName");return b.default.warn("[Connections] Aborting connection test for %s at %s due to mixed content prevention",i,e),l(e,t)}function l(e,t){var n=t.connection,i=m.default.Deferred();return p.default.defer(function(){n.set({currentTest:null,testState:x.default.testStates.UNAVAILABLE
}),i.reject(n)}),i.promise()}function u(e,t){function n(t){(0,b.default)("[Connections] %s connected at %s",l,e),s.set({currentTest:null,testState:x.default.testStates.CONNECTED}),o.resolve(s,t)}function r(t){var n={currentTest:null};if(t.aborting)(0,b.default)("[Connections] Aborted pending connection test for %s at %s",l,e),n.testState=x.default.testStates.ABORTED;else{var r=i(t)?x.default.testStates.UNAUTHORIZED:x.default.testStates.UNAVAILABLE;b.default.warn("[Connections] %s is %s at %s (Status %s)",l,r,e,t.status),
n.testState=r}s.set(n),o.reject(s,t)}var a=t.server,s=t.connection,o=m.default.Deferred(),l=a.get("debugName");(0,b.default)("[Connections] Testing connection for %s at %s",l,e);var u=a.getXHROptions(e);u.timeout=a.connectionTestTimeout,S.default.get("emulateCNP")&&!S.default.get("proxied")&&s.get("isPrivate")&&(u.url="cnpfail"+u.url);var c=m.default.ajax(u);return s.set({currentTest:c,testState:x.default.testStates.PENDING}),c.done(function(t,i,s){if(a.get("isCloud"))return void n();var o=a.parse(t),u=o&&o.machineIdentifier;
!u||a.id&&o.machineIdentifier!==a.id?(b.default.warn("[Connections] %s has an unexpected machine identifier at %s",l,e),r(s)):n(o)}),c.fail(r),o.promise()}function c(e){var t=e.server,n=e.connection,i=t.resolveUrl(e.url||"/",{connection:n});return S.default.get("allowHttpsMediaServerConnections")||!n.get("isHttps")||t.get("isCloudBased")?S.default.get("allowMixedContent")||!g.default.isHostedHttps||n.get("isHttps")?r(e)?s(i,e):u(i,e):o(i,e):a(i,e)}var d=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=c;var h=n(3),p=d(h),f=n(5),m=d(f),v=n(56),g=d(v),y=n(26),b=d(y),w=n(54),S=d(w),P=n(102),x=d(P);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(668),a=i(r);t.testServerConnection=a.default;var s=n(666),o=i(s);t.abortServerConnectionTest=o.default;var l=n(667),u=i(l);t.populateServerIdentity=u.default;var c=n(672),d=i(c);t.signIn=d.default;var h=n(673),p=i(h);t.signOut=p.default;var f=n(671),m=i(f);t.resetUser=m.default;
var v=n(674),g=i(v);t.switchUser=g.default;var y=n(670),b=i(y);t.authenticateWithServer=b.default;var w=n(669),S=i(w);t.authenticateWithHash=S.default;var P=n(662),x=i(P);t.selectStream=x.default;var C=n(663),T=i(C);t.updateWatchedStatus=T.default;var _=n(660),E=i(_);t.deleteFile=E.default;var k=n(661),I=i(k);t.deleteItem=I.default;var A=n(665),M=i(A);t.resumePlayQueue=M.default;var D=n(664),R=i(D);t.persistPlayQueue=R.default},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8)],r=function(e,t,n,i){"use strict";
function r(r){var a,s=r.item,o=r.media,l=s.server;if(o){var u="/library/metadata/"+s.id+"/media/"+o.id,c=e.extend(l.getXHROptions(u),{type:"DELETE"});a=t.ajax(c),a.done(function(){var t=r.item.get("Media");t.splice(e.indexOf(t,o),1),s.trigger("change:Media",s,s.get("Media"))})}else a=s.destroy({wait:!0});return a.fail(function(e){var t=n(403===e.status?"Ensure that media deletion is enabled for library content in your server settings.":"There was a problem deleting this item.");i.trigger("show:alert",{
type:"error",message:t})}),a}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(8),n(13),n(55)],r=function(e,t,n,i){"use strict";function r(e){var t=n.execute("deleteFile",e);return t.done(function(){var t=e.item,n=a(t.get("parentKey"),e);if(!n)return void s(e);var i=n.get("children").getCollection();if(i.length)return void o(n.get("key"),e);n.trigger("destroy",n,n.collection);var r=a(t.get("grandparentKey"),e);if(!r)return void s(e);var l=r.get("children").getCollection();
l.length?o(r.get("key"),e):s(e)}),t}function a(t,n){if(!t)return!1;var r=new i({key:t},{server:n.item.server,onlyIfCached:!0});return!e.isEmpty(r)&&r}function s(e){if(!e.skipRedirect){var n=e.item;n.section?t.trigger("navigate","section",{serverID:n.server.id,sectionID:n.section.id}):t.trigger("navigate:back")}}function o(e,n){if(!n.skipRedirect){var i=n.item;t.trigger("navigate","details",{serverID:i.server.id,key:e})}}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(286),n(22)],
r=function(e,t,n,i,r,a){"use strict";function s(s){var o=t.Deferred(),l=s.item,u=l.server,c=s.media||e.first(l.get("Media")),d=s.part||c&&e.first(c.Part),h=s.streamType,p=s.streamID;if(!c||!d)return o.reject().promise();var f={};f[h.key]=p,!s.media&&u.supports("allPartsStreamSelection")&&(f.allParts=1);var m=a.join(["/library/parts/",d.id],f),v=e.extend(u.getXHROptions(m),{type:"PUT"}),g=t.ajax(v);return g.done(function(){r(c,h,p),l.trigger("change:streams"),o.resolve()}),g.fail(function(e){i.trigger("show:alert",{
type:"error",message:n("There was a problem selecting the stream for this item.")}),o.reject(e)}),o.promise()}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(39),n(22)],r=function(e,t,n,i,r,a){"use strict";function s(r){var s,u,c=r.watched;r.item?(s=r.item,u=[s]):r.items&&(u=r.items,s=u[0]);var d=e.map(u,function(e){var n=c?"scrobble":"unscrobble",i={identifier:e.get("identifier")||"com.plexapp.plugins.library"};e.server.get("isCloudSyncServer")?(i.key=e.get("key"),
i.ratingKey=e.get("ratingKey")):i.key=e.get("ratingKey");var r=a.join(["/:/",n],i),s=t.ajax(e.server.getXHROptions(r));return s.done(function(){l(e,c),o(e,c)}),s}),h=t.when.apply(t,d);return h.fail(function(){var e;e=n(c?"There was a problem marking this item as watched.":"There was a problem marking this item as unwatched."),i.trigger("show:alert",{type:"error",message:e})}),h}function o(e,t){var n=r.get(e.get("type"));if(n&&"directory"===n.element){e.set({unviewedLeafCount:t?0:e.get("leafCount"),
viewedLeafCount:t?e.get("leafCount"):0});var i=e.get("children")||e.get("items");i&&i.getCollection().each(function(e){o(e,t)})}else e.set({viewOffset:0,viewCount:t?1:0})}function l(e,t){var n,i=r.get(e.get("type")),a=e.parent;if(a&&a.get("isMetadataList")&&(a=a.parent),a&&(n=r.get(a.get("type"))),n&&n.id===i.parent){var s,o="directory"===i.element;t?s=o?e.get("unviewedLeafCount"):1:(s=o?e.get("viewedLeafCount"):1,s*=-1),a.set({unviewedLeafCount:a.get("unviewedLeafCount")-s,viewedLeafCount:a.get("viewedLeafCount")+s
}),l(a,t)}}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(109),n(43),n(406)],r=function(e,t,n,i,r,a){"use strict";function s(n,a){var s=a.playQueue;if(!s.get("playQueueID")||!s.server)return t.Deferred().reject().promise();var o=r.getTypeByElement(s.get("mediaType"));if("music"!==o)return t.Deferred().reject().promise();var l=e.pick(a,"position","autoplay","inline");return l=e.extend(l,{serverID:s.server.id,playQueueID:s.get("playQueueID"),mediaType:o
}),i(n.fetch()).then(e.bind(n.save,n,l))}function o(e){return e.destroy()}function l(e){var t=n.resolve("appModel"),i=t.get("user"),r=new a({},{user:i});return e?s(r,e):o(r)}return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(10),n(43),n(13),n(406)],r=function(e,t,n,i,r){"use strict";var a=function(a){var s=t.resolve("appModel"),o=new r({},{user:a}),l=o.fetch().then(function(){return s.get("servers").populateServer(o.get("serverID"))}).then(function(e){return e.get("playQueueManager").populateQueue(o.get("playQueueID"),n.getElementByType(o.get("mediaType")));
}).then(function(t){return e.when(t,o.get("position"),o.get("autoplay"),o.get("mediaType"),o.get("inline"))}).then(function(e,t,n,r,a){return"music"!==r?i.execute("persistPlayQueue",null):i.execute("playMedia",{type:r,item:e,playQueue:e,offset:t,autoplay:n,inline:a})}).fail(function(){i.execute("persistPlayQueue",null)});return l};return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){return(0,r.resolve)("serverConnectionTestManager").abortConnectionTest(e)}
Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.connection;if(t.id)return l.default.Deferred().resolve(t.id).promise();var i=t.resolveUrl("/identity",{connection:n}),r=s.default.extend(t.getXHROptions(i),{timeout:t.connectionTestTimeout});(0,h.default)("[Identity] Requesting the machine identifier of "+t.get("debugName")+" at "+i);var a=l.default.ajax(r).promise();return a=a.then(function(e){
var n=l.default.Deferred(),i=c.default.parseXML(e),r=i&&i.machineIdentifier;return r?((0,h.default)("[Identity] Machine identifier found for "+t.get("debugName")+": "+r),!t.collection||t.collection.get(r)?n.resolve(r):(t.collection.populateServer({isCloud:!0}).done(function(e){e.get("resources").populate().always(function(){n.resolve(r)})}),t.collection.findServer({isCloud:!0}).done(function(e){e.populate().fail(function(){n.resolve(r)})}).fail(function(){n.resolve(r)}))):n.reject(),n.promise()}),
a.fail(function(){h.default.warn("[Identity] Machine identifier not found for "+t.get("debugName")+" at "+i)}),a}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(53),c=r(u),d=n(26),h=r(d);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return(0,r.resolve)("serverConnectionTestManager").queueConnectionTest(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.default=i,e.exports=t.default},function(e,t,n){
"use strict";function i(e){var t=s.default.Deferred().resolve().promise(),n=s.default.Deferred().reject().promise(),i=u.default.getActiveUser();if(!i)return n;var r=i.get("pin"),a=i.get("authToken");if(!r&&!e.pin)return t;var l=(0,o.resolve)("appModel").get("user"),c=l.hashPIN(e.pin,a);return r===c?t:n}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o=n(10),l=n(88),u=r(l);t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(5),n(3),n(10),n(22),n(54)],
r=function(e,t,n,i,r){"use strict";function a(t){var r=t.homeUser,a=n.resolve("appModel"),s=a.get("user"),o=r.get("uuid")||s.get("uuid"),l={pin:t.pin},u=i.join(["/api/v2/home/users/",o,"/switch"],l),c=r.server.getXHROptions(u,{type:"POST",xhrFields:{withCredentials:!1}});return e.ajax(c).promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(){var e=(0,a.resolve)("appModel"),t=e.get("user"),n=t.server,i=t.clearAccessToken();return i.fail(function(){p.default.warn("Failed to clear the access token and user storage");
}).always(function(){e.set("history",[]),d.default.abortAll(),t.signOut(),t.uninitialize(),t.initialize(),o.default.trigger("clearAll:cache"),n.cache.store(n)}),(0,u.default)(i)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(10),s=n(8),o=r(s),l=n(109),u=r(l),c=n(111),d=r(c),h=n(26),p=r(h);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=(0,u.resolve)("appModel").get("user"),n=void 0;
n=e.username&&e.password?t.server.getXHROptions("/api/v2/users/signin",{type:"POST",data:{login:e.username,password:e.password}}):t.server.getXHROptions("/api/v2/user?X-Plex-Token="+e.accessToken);var i=l.default.ajax(n).promise();return i=i.then(function(n){return e.remember?d.default.restorePrevious():d.default.register(p.default.getInstance()),t.signIn(n)}),i.fail(function(t){var n=void 0;if(!e.silent){var i=t.responseText&&b.default.parseXML(t.responseText),r=i&&i.error,a=s.default.isArray(r)?s.default.first(r):r;
n=a?s.default.isObject(a)?(0,w.getErrorText)(a):a:(0,m.default)("There was a problem signing in to Plex."),g.default.trigger("show:alert",{type:"error",message:n})}}),i}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(10),c=n(81),d=r(c),h=n(205),p=r(h),f=n(6),m=r(f),v=n(8),g=r(v),y=n(53),b=r(y),w=n(217);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){var e=u.default.execute("resetUser");return e=e.then(function(){return d.default.restoreDefaults(),
d.default.save()}),e=e.then(function(){o.default.trigger("reset:servers")})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=(r(a),n(8)),o=r(s),l=n(13),u=r(l),c=n(88),d=r(c);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=(0,s.resolve)("appModel").get("user"),n=t.get("signedIn"),i=t.id!==e.homeUser.id,a=e.allowGuestLock,o=i||a,l=n?c.default.execute("authenticateWithServer",e):c.default.execute("authenticateWithHash",e);
return n&&o?l=l.then(function(t){return r(t,e)}):l.done(function(){t.set("lockState",h.default.lockStates.UNLOCKED)}),l}function r(e,t){var n=(0,s.resolve)("appModel").get("user"),i=c.default.execute("resetUser");return i=i.then(function(){return n.activateStoredUser(t.homeUser.id),l.default.trigger("reset:servers"),n.signIn(e,{lockState:h.default.lockStates.UNLOCKED})})}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(10),o=n(8),l=a(o),u=n(13),c=a(u),d=n(126),h=a(d);t.default=i,
e.exports=t.default},function(e,t,n){"use strict";function i(){return l.default.startListening(),s.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(5),s=r(a),o=n(111),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function i(){c.default.init("UA-6111912-18");var e={name:l.default.prop("X-Plex-Product"),version:l.default.prop("X-Plex-Version"),dimension1:l.default.prop("X-Plex-Product"),dimension2:l.default.prop("X-Plex-Client-Identifier"),
dimension3:l.default.prop("X-Plex-Platform"),dimension4:l.default.prop("X-Plex-Platform-Version"),dimension5:l.default.prop("X-Plex-Device"),dimension6:l.default.prop("X-Plex-Version")};return l.default.prop("X-Plex-Model")&&(e.dimension7=l.default.prop("X-Plex-Model")),l.default.prop("X-Plex-Device-Screen-Resolution")&&(e.screenResolution=l.default.prop("X-Plex-Device-Screen-Resolution")),c.default.set(e),c.default.enable(),s.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=i;var a=n(5),s=r(a),o=n(140),l=r(o),u=n(139),c=r(u),d=n(647);r(d);e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=void 0;return e.get("clientID")?t=u.default.set("clientID",e.get("clientID")):(t=u.default.get("clientID"),t=t.then(function(t){e.set("clientID",t)},function(){var t=(0,p.default)();return e.set("clientID",t),u.default.set("clientID",t)})),t}function r(e){var t=u.default.get("skipSignIn");return t.always(function(t){e.set("skipSignIn","1"===t);
}),t}function a(){var e=(0,o.resolve)("appModel"),t=i(e),n=r(e);return(0,d.default)(t,n)}var s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var o=n(10),l=n(81),u=s(l),c=n(294),d=s(c),h=n(297),p=s(h);e.exports=t.default},function(e,t,n){"use strict";function i(e){return e.get("isCloud")}function r(){var e=new h.default({name:"CloudServerEventManager",appModel:(0,l.resolve)("appModel"),isValidServer:i,supportsLongPolling:!0,showTimelineStatus:!1,ServerEventConnection:c.default,
ServerRetryManager:f.default});return e.start(),o.default.Deferred().resolve().promise()}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(5),o=a(s),l=n(10),u=n(850),c=a(u),d=n(385),h=a(d),p=n(383),f=a(p);e.exports=t.default},function(e,t,n){"use strict";function i(){c.default.init("https://67349abf654648e18514f1fbcb1603c8@app.getsentry.com/34246");var e={lifecycle:"started",release:"0ba15a2ecb4bf0f4cbc8119d93070b8edcd97881",version:l.default.prop("X-Plex-Version")
};return l.default.props.forEach(function(t){var n=l.default.prop(t);n&&(e[t]=n)}),c.default.set(e),c.default.enable(),s.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(5),s=r(a),o=n(140),l=r(o),u=n(257),c=r(u),d=n(648);r(d);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=(0,o.resolve)("appModel").get("user"),t=(0,o.resolve)("metrics"),n=void 0;return n="bundled",t.set({userId:e.id,deviceIdentifier:u.default.prop("X-Plex-Client-Identifier"),
context:{device:{product:u.default.prop("X-Plex-Product"),version:u.default.prop("X-Plex-Version"),platform:u.default.prop("X-Plex-Platform"),platformVersion:u.default.prop("X-Plex-Platform-Version"),device:u.default.prop("X-Plex-Device"),deviceName:u.default.prop("X-Plex-Device-Name"),model:u.default.prop("X-Plex-Model"),screenResolution:u.default.prop("X-Plex-Device-Screen-Resolution"),environment:n}}}),t.enable(),s.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=i;var a=n(5),s=r(a),o=n(10),l=n(140),u=r(l);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=h.default.get("connections");return e=e.then(function(e){if(e)try{var t=function(){var t=JSON.parse(e),n=t.users;if(!n)return{v:void 0};var i=[];return n.forEach(function(e){var n=e.entitlements,r=e.servers,a={id:e.id,authToken:e.accessToken,title:e.title,pin:e.pin,home:e.home,hasAllEntitlements:!!e.entitlements&&e.entitlements.hasOwnProperty("all"),lastPrimaryServerID:t.lastPrimaryServerID,
entitlements:[],servers:[]};n&&s.default.each(n,function(e,t){e&&a.entitlements.push({id:t})}),r&&r.forEach(function(e){var t=e.connections,n=e.sources,i=!(!t||!t.length),r=!(!n||!n.length);if(e.machineIdentifier&&i&&r){var o={machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,sourceTitle:e.shared?e.friendlyName:void 0,accessToken:e.accessToken,synced:e.synced,isShared:e.shared,connections:[]};t.forEach(function(e){var t={uri:e.uri,scheme:e.scheme,address:e.address,port:e.port,sources:[]
};s.default.contains(n,"myPlex")?t.sources.push({id:"myPlex"}):t.sources.push({id:"internal"}),o.connections.push(t)}),a.servers.push(o)}}),i.push(a)}),{v:h.default.set("users",JSON.stringify({users:i}))}}();if("object"==typeof t)return t.v}catch(n){(0,l.default)(!1,"Unable to migrate stored connections: "+n.message)}}),e=e.then(function(){return h.default.remove("connections")}),(0,c.default)(e)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(38),l=r(o),u=n(109),c=r(u),d=n(81),h=r(d);
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){(0,g.default)("[Servers] Resetting...");var e=(0,y.resolve)("appModel"),t=e.get("servers");(0,y.resolve)("serverManager").stop(),(0,y.resolve)("primaryServerManager").stop(),(0,y.resolve)("manualServerManager").stop(),(0,y.resolve)("serverConnectionManager").stop(),(0,y.resolve)("serverConnectionTestManager").reset(),t.uninitialize(),t.reset(),t.initialize(),r()}function r(){(0,g.default)("[Servers] Initializing..."),a(),s(),
o(),l(),u(),(0,y.resolve)("serverManager").start(),(0,y.resolve)("primaryServerManager").start(),(0,y.resolve)("manualServerManager").start(),(0,y.resolve)("serverConnectionManager").start(),(0,g.default)("[Servers] Finished initialization")}function a(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=e.get("cloudServer");n.addConnection({scheme:w.default.get("myPlexScheme")||P.default.get("myPlexScheme"),address:w.default.get("myPlexUrl")||P.default.get("myPlexUrl")}),t.add(n)}function s(e){
var t=(0,y.resolve)("appModel"),n=t.get("servers"),i=C.default.getActiveServers();i&&i.each(function(e){if(e.get("connections").length)try{var i=new _.default(e.toJSON(),{parent:t});n.add(i)}catch(r){g.default.warn(r)}})}function o(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=P.default.get("primaryServer");if(n){var i=new _.default({machineIdentifier:n.machineIdentifier,friendlyName:n.name,isShared:n.shared,superToken:n.superToken,accessToken:n.accessToken,sourceTitle:n.sourceTitle},{parent:e
});i.addConnection({scheme:n.scheme,address:n.address,port:n.port}),t.add(i)}}function l(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=new _.default({isBundled:!0},{parent:e});n.addConnection({scheme:window.location.protocol.replace(":",""),address:window.location.hostname,port:window.location.port,isBundled:!0}),t.add(n)}function u(){if(P.default.get("allowLoopbackDiscovery")){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=new _.default({},{parent:e});n.addConnection({scheme:"http",
address:"127.0.0.1",port:"32400"}),t.add(n)}}function c(){return r(),m.default.on("reset:servers",i),p.default.Deferred().resolve().promise()}var d=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var h=n(5),p=d(h),f=n(8),m=d(f),v=n(26),g=d(v),y=n(10),b=n(31),w=d(b),S=n(54),P=d(S),x=n(88),C=d(x),T=n(69),_=d(T);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=s.default.Deferred();return s.default.when(c.default.populate(),h.default.populate()).always(function(){
var t=c.default.get("language");l.default.load(t).always(function(){e.resolve()})}),e.promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(5),s=r(a),o=n(141),l=r(o),u=n(31),c=r(u),d=n(88),h=r(d);e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,s.default)()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(681),s=r(a);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=s.default.Deferred(),t=u.default.get("myPlexAccessToken");
return t.done(function(e){var t=(0,o.resolve)("appModel").get("user"),n=d.default.get("users"),i=n.findWhere({authToken:e});i&&t.activateStoredUser(i.id)}),t.always(function(){e.resolve()}),e.promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(5),s=r(a),o=n(10),l=n(81),u=r(l),c=n(88),d=r(c);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),a=i(r),s=n(50),o=i(s),l=n(139),u=i(l),c=n(410),d=i(c),h=a.default.extend({
mixins:o.default,start:function(){var e=d.default.populate();e.done(function(){var e=d.default.get("heartbeatTime")-d.default.get("startTime"),t=Math.round(e/1e3),n=d.default.get("playbackCount");u.default.trackEvent({eventCategory:"App",eventAction:"Shutdown",eventValue:t,metric1:n})}),e.always(function(){d.default.startSession(),u.default.trackEvent({eventCategory:"App",eventAction:"Start",eventValue:1,sessionControl:"start"})})}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(26),a=i(r),s=n(29),o=i(s),l=n(8),u=i(l),c=n(50),d=i(c),h=n(38),p=i(h),f=n(31),m=i(f),v=n(88),g=i(v),y=n(54),b=i(y),w=n(126),S=i(w),P=o.default.extend({mixins:d.default,collectionNames:[],initialize:function(e){this.user=e},start:function(){var e=this,t=this.user;this.previousUserID=t.id;var n={change:this.onUserChange},i=["isSignedIn","isLocked","isUnlocked","hasInvalidToken"];i.forEach(function(i){var r=t.get(i),a=i.charAt(0).toUpperCase()+i.slice(1),s=e["on"+a+"Change"];
n["change:"+i]=s,r&&s.call(e,t,r)}),this.listenTo(t,n);var r=b.default.get("proxied")||m.default.get("autoLogin")||t.get("isUnlocked");(0,a.default)("[UserManager] autoLogin",r),r||this._lockIfInHome()},_lockIfInHome:function(){var e=g.default.getActiveUser();e&&e.get("home")&&this.user.set("lockState",S.default.lockStates.LOCKED)},onHasInvalidTokenChange:function(e,t){(0,p.default)(!1,"onHasInvalidTokenChange() must be implemented")},onIsUnlockedChange:function(e,t){(0,p.default)(!1,"onIsUnlockedChange() must be implemented");
},onUserChange:function(e){if(this.user.get("isSignedIn")){var t=g.default.getActiveUser();if(t)t.copyFromUser(e);else{var n=g.default.get("users");n.add(e.toJSON(),{parse:!0})}g.default.debouncedSave()}},onIsSignedInChange:function(e,t){if(!t)return void this.stopListening(e,"change:hasInvalidToken",this.onHasInvalidTokenChange);t&&e.get("isLocked")&&(this.previousUserID=e.id),this.listenTo(e,"change:hasInvalidToken",this.onHasInvalidTokenChange);var n={reset:!0};this.collectionNames.forEach(function(t){
return e.get(t).populate(n)})},onIsLockedChange:function(e,t){t&&(this.previousUserID=e.id,this.listenTo(e,"change:isUnlocked",this.onNextIsUnlockedChange))},onNextIsUnlockedChange:function(e,t){var n=this;t&&(this.stopListening(e,"change:isUnlocked",this.onNextIsUnlockedChange),setTimeout(function(){var e=n.previousUserID,t=e&&e===n.user.id?"navigate:refresh":"navigate:refresh:dashboard";u.default.trigger(t)},0))}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),a=i(r),s=n(50),o=i(s),l=a.default.extend({mixins:o.default,start:function(){}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(89).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(29),s=r(a),o=n(8),l=r(o),u=n(50),c=r(u),d=n(69),h=r(d),p=n(764),f=r(p),m="manualServer",v=s.default.extend({mixins:[c.default],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers");
},start:function(){this.listenTo(f.default,"change",this.onManualConnectionChange),this.initManualServer()},stop:function(){this.stopListening()},initManualServer:function(){function e(e){var t=f.default.get("ip"+e),n=f.default.get("port"+e);t&&n&&this.addManualConnection(t,n,e)}e.call(this,1),e.call(this,2)},removeManualConnection:function(e,t,n){var i=this.appModel.get("primaryServer"),r=m+n,a=this.servers.find(function(e){return e.hasSource(r)});if(a){a.removeSource("internal"),a.removeSource(r);
var s=a.get("connections").findWhere({isConnected:!0});s||a!==i||l.default.trigger("navigate","dashboard",{replace:!0})}},addManualConnection:function(e,t,n){var i=m+n,r={scheme:"http",address:e,port:t.toString(),sources:{id:i}},a=new h.default({friendlyName:e});a.addConnection(r),this.servers.add(a)},onManualConnectionChange:function(e){var t=i(e.changed)[0],n=t.slice(-1),r="ip"+n,a="port"+n,s=e.previous(r),o=e.previous(a),l=e.get(r),u=e.get(a);s&&o&&this.removeManualConnection(s,o,n),l&&u&&this.addManualConnection(l,u,n);
}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),a=n(29),s=i(a),o=n(50),l=i(o),u=s.default.extend({mixins:l.default,start:function(){var e=(0,r.resolve)("appModel").get("user");this.listenTo(e,"change:id",this.onUserIDChange)},onUserIDChange:function(e,t){(0,r.resolve)("metrics").set({userId:t})}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(5),a=i(r),s=n(29),o=i(s),l=n(50),u=i(l),c=n(26),d=i(c),h=n(54),p=(i(h),o.default.extend({mixins:[u.default],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers")},start:function(e){this.stop(),this.listenTo(this.appModel,{"change:primaryServer":this.onPrimaryServerChange,"change:primaryServer.change:isPrimaryEligible":this.onPrimaryServerEligibleChange,"change:primaryServer.change:isOutOfDate":this.onPrimaryServerOutOfDateChange,"change:isWaitingForServers":this.onWaitingForServersChange
}),this.listenTo(this.servers,{"update reset":this.onServersUpdate}),this._setPrimaryServer()},stop:function(){this.stopListening(),this._primaryServerPromise=null},fetchPrimaryRelations:function(e){},_setPrimaryServer:function(){var e=this;if(this._primaryServerPromise)return this._primaryServerPromise;this.appModel.set({primaryServer:null,isWaitingForPrimaryServer:!0});var t=this._waitForPrimaryServer();return this._primaryServerPromise=t,t.done(function(n){if(t===e._primaryServerPromise){if(e._primaryServerPromise=null,
e.appModel.get("primaryServer"))return;var i="0.9.16.0",r=!n.get("version")&&!n.get("isRejected");i&&(n.get("isOutOfDate")||r)?((0,d.default)("[Primary Server] The server, %s, is waiting for a version",n.get("debugName")),e._setPrimaryServer()):e.appModel.set({primaryServer:n,isWaitingForPrimaryServer:!1})}}).fail(function(){t===e._primaryServerPromise&&(e._primaryServerPromise=null,e.appModel.set("isWaitingForPrimaryServer",!1))}),t},_waitForPrimaryServer:function(){var e=this,t=this.appModel.get("user"),n=t.get("lastPrimaryServerID"),i=void 0;
return n?((0,d.default)("[Primary Server] Waiting for the last primary server, %s, to connect",n),i=this.servers.populateServer({machineIdentifier:n,isPrimaryEligible:!0,isOutOfDate:!1})):i=a.default.Deferred().reject().promise(),i=i.then(null,function(){return(0,d.default)("[Primary Server] Waiting for any owned server to connect"),e.servers.populateServer({isFullOwnedServer:!0,isPrimaryEligible:!0,isOutOfDate:!1})}),i=i.then(null,function(){return(0,d.default)("[Primary Server] Waiting for any eligible server to connect"),
e.servers.populateServer({isPrimaryEligible:!0,isOutOfDate:!1})}),i=i.then(null,function(){return(0,d.default)("[Primary Server] Waiting for any eligible server"),e.servers.findServer({isPrimaryEligible:!0,isOutOfDate:!1})})},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");if(n&&this.stopListening(n),t){d.default.info("[Primary Server] %s is now the primary server",t.get("debugName"));var i=e.get("user");i.set("lastPrimaryServerID",t.id),t.get("isConnected")?this.fetchPrimaryRelations(t):this.listenTo(t,"change:isConnected",this.onPrimaryServerConnectedChange);
}else e.get("isWaitingForPrimaryServer")?(0,d.default)("[Primary Server] Waiting to set the primary server"):d.default.warn("[Primary Server] No primary server found")},onPrimaryServerEligibleChange:function(e,t){var n=this.appModel.get("user");t||((0,d.default)("[Primary Server] The previous primary server, %s, is unauthorized",e.get("debugName")),n.unset("lastPrimaryServerID"),this._setPrimaryServer())},onPrimaryServerOutOfDateChange:function(e,t){var n=this.appModel.get("user");t&&((0,d.default)("[Primary Server] The previous primary server, %s, is out of date",e.get("debugName")),
n.unset("lastPrimaryServerID"),this._setPrimaryServer())},onPrimaryServerConnectedChange:function(e,t){t&&this.fetchPrimaryRelations(e)},onWaitingForServersChange:function(e,t){if(t){var n=e.get("primaryServer"),i=!n||!this.servers.get(n.id),r=e.get("isWaitingForPrimaryServer");i&&!r&&this._setPrimaryServer()}},onServersUpdate:function(){var e=this.appModel.get("user"),t=this.appModel.get("primaryServer");if(t){var n=t&&!this.servers.get(t.id);n&&((0,d.default)("[Primary Server] The previous primary server, %s, was removed",t.get("debugName")),
e.unset("lastPrimaryServerID"),this._setPrimaryServer())}else this._setPrimaryServer()}}));t.default=p,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(8),c=r(u),d=n(29),h=r(d),p=n(383),f=r(p),m=n(384),v=r(m),g=n(50),y=r(g),b=n(26),w=r(b),S=n(88),P=r(S),x=n(69),C=r(x),T=h.default.extend({mixins:[y.default],browserConnectionChangeDelay:2e3,initialize:function(e){s.default.bindAll(this,"onBrowserConnectionChange"),
this.appModel=e.appModel,this.servers=this.appModel.get("servers");var t={callback:this.retryServerConnections.bind(this),logFormat:"[Connections] Retrying connection tests for %s in %s seconds"};this._cloudServerRetryManager=new f.default(t),this._primaryServerRetryManager=new v.default(i({},t,{appModel:this.appModel}))},start:function(){this.stop();var e=(0,l.default)(window);e.on("online",this.onBrowserConnectionChange),e.on("offline",this.onBrowserConnectionChange),this.listenTo(c.default,{"test:servers":this.onTestAllServers,
"test:server":this.onTestServer}),this.listenTo(this.servers,{add:this.onServerAdd,remove:this.onServerRemove,reset:this.onServersReset,"error:connection":this.onServerConnectionError,"change:connections.add":this.onServerConnectionAdd,"change:connections.remove":this.onServerConnectionRemove,"change:connections.reset":this.onServerConnectionsReset,"change:connections.change:isConnected":this.onServerConnectionConnectedChange,"change:connections.change:sources.change":this.onServerConnectionSourcesChange,
"change:accessToken":this.onServerAccessTokenChange,"change:isConnected":this.onServerConnectedChange,"change:isUnavailable":this.onServerUnavailableChange,"change:publicAddressMatches":this.onServerPublicAddressMatchesChange}),this.servers.invoke("testOnlyUntestedConnections")},stop:function(){this.stopListening(),this._cloudServerRetryManager.stopAll(),this._primaryServerRetryManager.stopAll();var e=(0,l.default)(window);e.off("online",this.onBrowserConnectionChange),e.off("offline",this.onBrowserConnectionChange);
},retryServerConnections:function(e){e.testAllConnections()},_startFailedServerRetries:function(e){e.get("isCloud")?this._cloudServerRetryManager.start(e):this._primaryServerRetryManager.start(e)},_stopFailedServerRetries:function(e){e.get("isCloud")?this._cloudServerRetryManager.stop(e):this._primaryServerRetryManager.stop(e)},_removeConnection:function(e){var t=e.server,n=P.default.getActiveServers();if((0,w.default)("[Connections] Removed connection %s from %s",e.id,t.get("debugName")),t.abortConnectionTest(e),
n){var i=n.get(t.id),r=i&&i.get("connections");r&&r.get(e.id)&&(r.remove(e.id),r.length||n.remove(t.id),P.default.debouncedSave())}},onBrowserConnectionChange:function(e){var t=this;(0,w.default)("[Connections] Browser online status changed to",window.navigator.onLine),clearTimeout(this.browserConnectionChangeTimeout),this.browserConnectionChangeTimeout=setTimeout(function(){t.servers.invoke("testAllConnections")},this.browserConnectionChangeDelay)},onTestAllServers:function(){this.servers.invoke("testAllConnections");
},onTestServer:function(e){e.testAllConnections()},onServerAdd:function(e){e.testOnlyUntestedConnections()},onServerRemove:function(e){var t=P.default.getActiveServers(),n=void 0;if(e.abortAllConnectionTests(),this._stopFailedServerRetries(e),t)if(e.get("isMerged")){var i=e.previous("machineIdentifier");i&&(n=t.get(i),n&&(n.set("machineIdentifier",e.id),P.default.debouncedSave()))}else n=t.get(e.id),n&&(t.remove(e.id),P.default.debouncedSave())},onServersReset:function(e,t){var n=this,i=t.previousModels;
s.default.each(i,function(t){e.contains(t)||(t.abortAllConnectionTests(),n._stopFailedServerRetries(t))})},onServerConnectionError:function(e){if(w.default.warn("[Connections] Possible connection error for %s, retrying connection tests",e.get("debugName")),e.get("isCloud")){var t=this.appModel.get("user");t.signInWithStoredToken()}else e.testAllConnections()},onServerConnectionAdd:function(e){var t=e.server;(0,w.default)("[Connections] Added connection %s for %s",e.id,t.get("debugName")),t.testConnection(e);
},onServerConnectionRemove:function(e){this._removeConnection(e)},onServerConnectionsReset:function(e,t){var n=this,i=t.previousModels;s.default.each(i,function(t){e.contains(t)||n._removeConnection(t)})},onServerConnectionConnectedChange:function(e,t){var n=e.server,i=e.get("isBundled"),r=e.get("isFallback"),a=e.get("isRelayed"),o=t&&!i&&!r&&!a,l=P.default.getActiveServers();if(n.id&&!n.get("isCloud")&&o&&l){var u=l.get(n.id);if(u)u.copyFromServer(n);else{var c=s.default.omit(n.toJSON(),"connections");
u=l.add(c,{merge:!0,parse:!0})}u.get("connections").add(e.toJSON(),{merge:!0,parse:!0}),P.default.debouncedSave()}},onServerConnectionSourcesChange:function(e,t){var n=e.server,i=P.default.getActiveServers(),r=i&&i.get(n.id);if(r){var a=r.get("connections"),s=a.get(e.id);if(s){var o=s.get("sources");o.set(t.toJSON()),P.default.debouncedSave()}}},onServerAccessTokenChange:function(e,t){e.get("isCloud")||((0,w.default)("[Connections] Access token for %s changed to %s",e.get("debugName"),t),e.get("isUnauthorized")&&e.set("connectionTestResult",C.default.connectionTestResults.PENDING),
e.testAllConnections())},onServerConnectedChange:function(e,t){t&&this._stopFailedServerRetries(e)},onServerUnavailableChange:function(e,t){t&&this._startFailedServerRetries(e)},onServerPublicAddressMatchesChange:function(e,t){void 0!==t&&e.testAllConnections()}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){return function(i){return i.server===e&&i.connection.id===t.id&&i.url===n}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(10),c=n(29),d=r(c),h=n(111),p=r(h),f=n(54),m=r(f),v=d.default.extend({
initialize:function(e){this.appModel=e.appModel,this.queued=[],this.executing=[],this.maximumConcurrent=m.default.get("maximumConcurrentConnectionTests"),this.throttledStartProcessing=s.default.throttle(this._startProcessing.bind(this),50,{leading:!1})},queueConnectionTest:function(e){var t=e.server,n=e.connection,i=e.url,r=this._queuedOrExecuting(t,n,i);if(r)return r.deferred.promise();var a=l.default.Deferred();return this.queued.push({server:t,connection:n,url:i,deferred:a}),this._sortQueue(),
this.throttledStartProcessing(),a.promise()},abortConnectionTest:function(e){var t=e.server,n=e.connection,i=e.url;return this._abortCurrentTest(n),this._removeQueuedOrExecuting(t,n,i),l.default.Deferred().resolve().promise()},reset:function(){this.queued.length=0,this.executing.length=0},_sortQueue:function(){var e=this,t=this.appModel.get("user").get("lastPrimaryServerID");this.queued.sort(function(n,i){var r=n.server,a=i.server,s=n.connection,o=i.connection,l=e._isManualConnection(s),u=e._isManualConnection(o),c=e._isMatchingLocation(r,s),d=e._isMatchingLocation(a,o);
return r.id===t&&a.id!==t?-1:a.id===t&&r.id!==t?1:r.get("isCloud")&&!a.get("isCloud")?-1:a.get("isCloud")&&!r.get("isCloud")?1:!s.get("isConnected")&&o.get("isConnected")?-1:!o.get("isConnected")&&s.get("isConnected")?1:!r.get("isShared")&&a.get("isShared")?-1:!a.get("isShared")&&r.get("isShared")?1:r.get("isFullServer")&&!a.get("isFullServer")?-1:a.get("isFullServer")&&!r.get("isFullServer")?1:!r.get("isCloudSyncServer")&&a.get("isCloudSyncServer")?-1:!a.get("isCloudSyncServer")&&r.get("isCloudSyncServer")?1:l&&!u?-1:u&&!l?1:s.get("isBundled")&&!o.get("isBundled")?-1:o.get("isBundled")&&!s.get("isBundled")?1:c&&!d?-1:d&&!c?1:0;
})},_startProcessing:function(){s.default.times(this.maximumConcurrent-this.executing.length,this._process.bind(this))},_process:function(){var e=this;if(!(this.executing.length>=this.maximumConcurrent)&&this.queued.length){var t=this.queued.shift();this._abortCurrentTest(t.connection);var n=(0,u.resolve)("testServerConnection"),i=n(s.default.pick(t,["server","connection","url"]));this.executing.push(t),i.done(function(e,n){t.deferred.resolve(e,n)}),i.fail(function(e,n){t.deferred.reject(e,n)}),i.always(function(){
var n=e.executing.indexOf(t);e.executing.splice(n,1),e._process()})}},_abortCurrentTest:function(e){var t=e.get("currentTest");t&&"pending"===t.state()&&(p.default.abort(t.rid),t.abort())},_isManualConnection:function(e){return e.get("sources").some(function(e){return 0===e.id.indexOf("manualServer")})},_isMatchingLocation:function(e,t){var n=e.get("publicAddressMatches"),i=t.get("isPrivate");return n&&i||!n&&!i},_queuedOrExecuting:function(e,t,n){var r=i(e,t,n);return s.default.find(this.executing,r)||s.default.find(this.queued,r);
},_removeQueuedOrExecuting:function(e,t,n){var r=i(e,t,n),a=s.default.findIndex(this.executing,r),o=s.default.findIndex(this.queued,r);a>=0&&this.executing.splice(a,1),o>=0&&this.queued.splice(o,1)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var i=n(89).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(29),l=r(o),u=n(8),c=r(u),d=n(26),h=r(d),p=n(50),f=r(p),m=n(69),v=r(m),g=n(409),y=r(g),b=n(88),w=r(b),S=i(y.default.prototype.syncedAttrs),P=l.default.extend({
mixins:[f.default],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers")},start:function(){var e=this;this.stop(),this.listenTo(this.servers,{"change:promiseState":this.onServerPromiseStateChange,remove:this.onServerRemove,"update reset":this.onServersUpdateReset,"change:resources.add":this.onResourceAdd,"change:resources.remove":this.onResourceRemove,"change:resources.update":this.onResourcesUpdate,"change:resources.reset":this.onResourcesReset}),S.forEach(function(t){
e.listenTo(e.servers,"change:"+t,e.onStoredServerAttributeChange.bind(e,t))}),this._checkFoundAllServers()},stop:function(){this.stopListening()},_checkFoundAllServers:function(){this.servers.shouldWaitForInitialServers()?this._waitForServers():this.servers.shouldWaitForResources()?this._waitForServers():this.servers.shouldWaitForPendingServers()?this._waitForServers():this._foundAllServers()},_waitForServers:function(){this.servers.waitForServers(),this.appModel.set("isWaitingForServers",!0)},_foundAllServers:function(){
this.servers.foundAllServers(),this.appModel.set("isWaitingForServers",!1)},_fetchResources:function(e){var t=this;(0,h.default)("[Servers] Finding resources through %s",e.get("debugName")),this._waitForServers();var n=e.get("resources"),i=n.fetch().done(function(){(0,h.default)("[Servers] Found %s resources through %s",n.length,e.get("debugName")),e.set({hasFailedResources:!1,isDownForMaintenance:!1})}).fail(function(t,n){h.default.warn("[Servers] Failed to request resources through %s",e.get("debugName")),
e.set({hasFailedResources:!0,isDownForMaintenance:503===n.status})}).always(function(){return t._checkFoundAllServers()});return i},_convertResourceToServer:function(e){(0,h.default)("[Servers] %s was found through %s",e.get("name"),e.server.get("debugName"));var t="Plex Media Server"===e.get("product"),n=new v.default({machineIdentifier:e.id,friendlyName:e.get("name"),version:t?e.get("productVersion"):void 0,isShared:!e.get("owned"),accessToken:e.get("accessToken"),sourceTitle:e.get("sourceTitle"),
publicAddressMatches:e.get("publicAddressMatches"),httpsRequired:e.get("httpsRequired"),presence:e.get("presence"),home:e.get("home"),synced:e.get("synced"),serverClass:t?void 0:v.default.serverClasses.SECONDARY,createdAt:e.get("createdAt"),lastSeenAt:e.get("lastSeenAt")},{parent:this.appModel});return e.get("connections").each(function(t){var i=[{id:e.server.id}],r=s.default.extend(t.toJSON(),{sources:i});n.addConnection(r)}),n},_removeResource:function(e){(0,h.default)("[Servers] %s was removed as a resource from %s",e.get("name"),e.server.id);
var t=this.servers.get(e.id);t&&t.removeSource(e.server.id)},_pruneStaleSources:function(e){for(var t=e.get("resources"),n=this.servers.length-1;n>=0;){var i=this.servers.at(n),r=t.get(i.id);if(r)for(var a=i.get("connections"),s=a.length-1;s>=0;){var o=a.at(s),l=o.get("sources");if(l.get(e.id)){var u=r.get("connections");u.get(o.id)||o.get("sources").remove(e.id)}s--}else i.removeSource(e.id);n--}},_setAuthorized:function(){var e=!!this.servers.findWhere({isConnected:!0,isCloud:!1}),t=!!this.servers.findWhere({
isResolved:!0,isCloud:!0});this.appModel.set("authorized",e||t)},_setMultiServer:function(){var e=this.servers.where({isConnected:!0,isCloud:!1});this.appModel.set("multiserver",e.length>1)},onServerPromiseStateChange:function(e,t){if(t===v.default.promiseStates.RESOLVED){var n=e.get("resources");n&&this._fetchResources(e)}this._setAuthorized(),this._setMultiServer(),this._checkFoundAllServers()},onStoredServerAttributeChange:function(e,t,n){var i=w.default.getActiveServers(),r=i&&i.get(t.id);r&&null!=n&&r.get(e)!==n&&(r.set(e,n),
w.default.debouncedSave())},onServerRemove:function(e){h.default.warn("[Servers] %s was removed",e.get("debugName")),e.cache.remove(e),c.default.trigger("clearWhere:cache",{server:e})},onServersUpdateReset:function(){this._setAuthorized(),this._setMultiServer(),this._checkFoundAllServers()},onResourceAdd:function(e){if(s.default.contains(e.get("provides"),"server")){var t=this._convertResourceToServer(e);this.servers.add(t)}},onResourceRemove:function(e){this._removeResource(e)},onResourcesUpdate:function(e){
this._pruneStaleSources(e.server),this._checkFoundAllServers()},onResourcesReset:function(e,t){var n=this,i=t.previousModels;s.default.each(i,function(t){e.contains(t)||n._removeResource(t)}),this._checkFoundAllServers()}});t.default=P,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(101)],r=function(e,t){"use strict";var n={bindings:e.extend({".artist-title":{modelAttribute:"parentTitle"},".album-title":{modelAttribute:"title"}},e.pick(t.defaultBindings,[".item-year",".item-genre"]))};return n;
}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(101)],r=function(e,t){"use strict";var n={bindings:e.pick(t.defaultBindings,[".item-title",".item-genre"])};return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(101)],r=function(e,t){"use strict";var n={bindings:e.pick(t.defaultBindings,[".item-title",".item-year",".item-duration",".item-tagline",".item-genre",".item-director",".item-writer",".item-cast",".item-content-rating",".content-rating-flag-container",".studio-flag-container"])
};return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(101),n(108)],r=function(e,t,n){"use strict";var i={bindings:e.extend({".show-title":{modelAttribute:"grandparentTitle"},".episode-title":{modelAttribute:"title"},".episode-index":{modelAttribute:"index",formatter:function(e){return n({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "})}}},e.pick(t.defaultBindings,[".item-year",".item-progress",".item-duration",".item-unwatched-label",".item-unavailable-btn",".item-available-at",".item-director",".item-writer",".item-cast",".item-content-rating",".media-count-badge",".content-rating-flag-container"]))
};return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(101)],r=function(e,t){"use strict";var n={bindings:e.pick(t.defaultBindings,[".item-title",".item-year",".item-progress",".item-duration",".item-unwatched-label",".item-unavailable-btn",".item-tagline",".item-genre",".item-director",".item-writer",".item-cast",".item-content-rating",".media-count-badge",".content-rating-flag-container",".studio-flag-container"])};return n}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(3),n(101)],r=function(e,t){"use strict";var n={bindings:e.pick(t.defaultBindings,[".item-title",".item-year",".item-duration",".item-genre",".item-content-rating",".details-unwatched-count-badge",".content-rating-flag-container",".studio-flag-container"])};return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(296),n(8)],r=function(e,t,n,i){"use strict";var r={},a={languages:{en:"en.json","en-GB":"en-GB.json",af:"af.json",my:"my.json",
ca:"ca.json",cs:"cs.json",sr:"sr.json",da:"da.json",de:"de.json",et:"et.json",es:"es.json","es-419":"es-419.json",el:"el.json",fr:"fr.json","fr-CA":"fr-CA.json",hr:"hr.json",is:"is.json",it:"it.json",lt:"lt.json",hu:"hu.json",nl:"nl.json",no:"no.json",pl:"pl.json",pt:"pt.json","pt-BR":"pt-BR.json",ru:"ru.json",ro:"ro.json",sk:"sk.json",sl:"sl.json",fi:"fi.json",sv:"sv.json",vi:"vi.json",tr:"tr.json",uk:"uk.json",bg:"bg.json",zh:"zh.json","zh-TW":"zh-TW.json",ja:"ja.json",ko:"ko.json",th:"th.json",
fa:"fa.json",ar:"ar.json",he:"he.json"},loadingPromise:null,loadingLanguage:null,getLanguages:function(){return this.languages},getTranslation:function(e){if(this.translations[this.language])return this.translations[this.language][e]},load:function(n){if(this.loadingLanguage&&this.loadingLanguage===n)return this.loadingPromise;var i,r=this.getLanguages();return i=e.has(r,n)?e.has(this.translations,n)?t.Deferred().resolve().promise():t.ajax({dataType:"json",url:this.basePath+r[n]}):t.Deferred().reject().promise(),
this.loadingLanguage=n,this.loadingPromise=i,i.done(e.bind(this.onLoadSuccess,this,i)),i.fail(e.bind(this.onLoadError,this,i)),i},t:function(t){if(!t)return"";var i,a,s=1,o=arguments.length;e.isObject(arguments[o-1])&&(a=arguments[o-1],o-=1);var l=this.getTranslation(t)||t;for(a&&a.escape&&(l=e.escape(l));s<o;)i=r[s],i||(i=new RegExp(n("{"+s+"}"),"g"),r[s]=i),l=l.replace(i,arguments[s]),s++;return l},onLoadSuccess:function(e,t){var n=this.loadingLanguage;e===this.loadingPromise&&(this.loadingPromise=null,
this.loadingLanguage=null,this.language=n,t&&(this.translations[n]=t),i.trigger("change:language",n))},onLoadError:function(e){e===this.loadingPromise&&(this.loadingPromise=null,this.loadingLanguage=null)}};return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={exclusiveBoolAttr:function(e){var t=this;this.listenTo(this,"change:"+e,function(n,i){i&&t.each(function(t){t.set(e,t===n&&i)})})}};t.default=n,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(5),o=i(s),l=n(1930),u=i(l),c=n(38),d=i(c),h=0,p=100,f={createASSRenderer:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];a.default.bindAll(this,"renderSubtitles","resizeSubtitles","getPosition","onSubtitleFailure"),(0,d.default)(e.element,"No element defined for ASS renderer"),this.delay=e.delay||h,this.rendererOptions=e.rendererOptions||{},this.subtitleSize=e.subtitleSize||p,
this.el=e.element,this.$el=(0,o.default)(this.el),this.clock=new u.default.renderers.AutoClock(this.getPosition,500),this.debouncedResize=a.default.debounce(this.resizeSubtitles,200),this.listenTo(this.model,{"change:playing":this.onPlayingChange,"change:paused":this.onPausedChange,"change:buffering":this.onPausedChange,"change:stopped":this.onStoppedChange,"change:error":this.onStoppedChange,"change:showFullScreen":this.onShowFullScreenChange}),this.loadSubtitles().then(this.renderSubtitles,this.onSubtitleFailure);
},loadSubtitles:function(){var e=this;this.xhr=new XMLHttpRequest;var t=new u.default.parser.XhrStream(this.xhr),n=new u.default.parser.StreamParser(t);return this.xhr.open("GET",this.model.get("subtitlesUrl"),!0),this.xhr.send(),this.xhr.onreadystatechange=function(){4===e.xhr.readyState&&200!==e.xhr.status&&e.onSubtitleFailure()},n.minimalASS},renderSubtitles:function(e){var t=a.default.defaults(this.rendererOptions,{enableSvg:!0,preciseOutlines:!1});this.renderer=new u.default.renderers.WebRenderer(e,this.clock,this.el,t),
this.setSubtitleSize(),this.resizeSubtitles(),(0,o.default)(window).on("resize",this.debouncedResize)},setSubtitleSize:function(){var e=this.renderer._ass._properties,t=this.subtitleSize/100;e._resolutionX/=t,e._resolutionY/=t},resizeSubtitles:function(){this.renderer.resize(this.$el.width(),this.$el.height())},getPosition:function(){var e=this.model.get("position"),t=this.model.get("offset")||0,n=(e-t+this.delay)/1e3;return n},closeASSRenderer:function(){(0,o.default)(window).off("resize",this.debouncedResize),
this.clock.disable(),this.xhr&&(this.xhr.onreadystatechange=null)},onPlayingChange:function(e,t){t&&this.clock.play()},onPausedChange:function(e,t){t&&this.clock.pause()},onStoppedChange:function(e,t){t&&this.clock.disable()},onShowFullScreenChange:function(e,t){this.resizeSubtitles()},onSubtitleFailure:function(){this.model.set("softSubtitlesFailed",!0)}};t.default=f,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(37),n(108)],r=function(e,t,n){"use strict";var i={ui:{background:".post-play-background",
previousPoster:".item-previous .media-poster",nextPoster:".item-next .media-poster",nextTitle:".next-title",nextSubtitle:".next-subtitle",nextIndex:".next-index",countdown:".countdown"},createCountdown:function(e){this.totalSeconds=e,this.secondsLeft=this.totalSeconds,this.progressModel=new t.Model({text:this.secondsLeft}),this.updateCountdown()},serializeData:function(){var e=this.nextMetadataItem.get("title"),t=this.nextMetadataItem.get("grandparentTitle"),n={previous:{title:this.previousMetadataItem.get("title")||this.previousMetadataItem.get("grandparentTitle"),
subtitle:this.episodeIndexFor(this.previousMetadataItem)||this.previousMetadataItem.get("year")},next:{title:t||e,summary:this.nextMetadataItem.get("summary")}};return t?(n.next.subtitle=e,n.next.index=this.episodeIndexFor(this.nextMetadataItem)):n.next.subtitle=this.nextMetadataItem.get("year"),n},episodeIndexFor:function(e){var t="";return"episode"===e.get("type")&&(t=n({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "
})),t},updateCountdown:function(){var t=(new Date).getTime(),n=t-(this.startTime||t);this.startTime=t,this.secondsLeft-=n/1e3,this.secondsLeft>0?(this.progressModel.set("progress",100*(this.secondsLeft/this.totalSeconds)),this.progressModel.set("text",Math.ceil(this.secondsLeft)),this.countdownAnimator=window.requestAnimationFrame(e.bind(this.updateCountdown,this))):this.trigger("next")},onClose:function(){window.cancelAnimationFrame(this.countdownAnimator)}};return i}.apply(t,i),!(void 0!==r&&(e.exports=r));
},,function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(166),a=i(r),s=n(712),o=a.default.extend({defaults:s.defaultValues});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),a=i(r),s=n(38),o=i(s),l=n(18),u=i(l),c=n(20),d=i(c),h=n(756),p=i(h),f=n(69),m=i(f),v=n(747),g=i(v),y=n(763),b=i(y),w=n(126),S=i(w),P=d.default.extend({name:"AppModel",isStateTreeRoot:!0,
sessionAttrs:{clientID:u.default.string,authorized:u.default.boolean.isRequired,multiserver:u.default.boolean.isRequired,skipSignIn:u.default.boolean.isRequired,isWaitingForServers:u.default.boolean.isRequired,isWaitingForPrimaryServer:u.default.boolean.isRequired,history:u.default.array.isRequired,forwardHistory:u.default.array.isRequired},sessionRelations:{servers:{relationClass:p.default},cloudServer:{relationClass:m.default,deferred:!0},primaryServer:{relationClass:m.default,deferred:!0},transientServer:{
relationClass:b.default,deferred:!0},user:{relationClass:S.default,deferred:!0}},defaults:function(){var e=new g.default({machineIdentifier:"myPlex"},{parent:this});return{authorized:!1,multiserver:!1,skipSignIn:!1,isWaitingForServers:!1,isWaitingForPrimaryServer:!1,history:[],forwardHistory:[],cloudServer:e,user:new S.default({},{server:e,parent:this})}},constructor:function(){this._pendingEntities=[],this.listenTo(a.default,"change:entity",this.onEntityChange),d.default.prototype.constructor.apply(this,arguments);
},initialize:function(){this._pendingEntities.forEach(this._addEntity.bind(this))},_addEntity:function(e){var t=e.type,n=e.id,i=e.model,r=this.get("entities");(0,o.default)(r,"Use `createEntitiesModelClass` to create an `entities` session relation in a platform's app model"),r.get(t).add({id:n,model:i},{merge:!0})},onEntityChange:function(e){this.has("entities")?this._addEntity(e):this._pendingEntities.push(e)}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(25),a=i(r),s=n(709),o=i(s),l=a.default.extend({name:"EntityCollection",model:o.default,toState:function(){var e=this.reduce(this.reduceState,{possibleEntityContainers:[]});return Object.defineProperty(e,"possibleEntityContainers",{enumerable:!1}),e},reduceState:function(e,t){return e.possibleEntityContainers.push(t.id),e[t.id]=t.getState(),e}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(18),s=r(a),o=n(20),l=r(o),u=l.default.extend({name:"EntityModel",sessionAttrs:{id:s.default.string.isRequired},sessionRelations:{model:{relationClass:l.default,deferred:!0}},toState:function(){var e=this.get("model"),t=i({entityID:this.id},e.state);return Object.defineProperty(t,"possibleEntityContainers",{value:e.state.possibleEntityContainers,enumerable:!1}),t},shouldUpdateRelationState:function(){return!0}});t.default=u,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(37),n(29),n(50)],
r=function(e,t,n,i){"use strict";var r=n.extend({mixins:[i],defaultFilterName:"__default",whitelistedEvents:["add","remove","reset","sort","destroy","sync","request","error"],blacklistedMethods:["_onModelEvent","_prepareModel","_removeReference","_reset","add","initialize","sync","remove","reset","set","push","pop","unshift","shift","sort","parse","fetch","create","model","off","on","listenTo","listenToOnce","bind","trigger","once","stopListening"],constructor:function(e,n){this.superset=e,this._collection=new t.Collection(e.toArray()),
this._proxyCollection(this._collection),this.resetFilters(),this.listenTo(e,{add:this.onSupersetAdd,remove:this.onSupersetRemove,reset:this.onSupersetReset}),this.initialize(n)},_proxyCollection:function(e){this.models=e.models,this._proxyCollectionMethods(e),this._proxyCollectionLength(e),this._proxyCollectionEvents(e)},_proxyCollectionMethods:function(n){var i={};e.each(e.functions(t.Collection.prototype),function(t){e.contains(this.blacklistedMethods,t)||(i[t]=function(){return n[t].apply(n,arguments);
})},this),e.extend(this,i)},_proxyCollectionLength:function(e){var t=function(){this.length=e.length};this.listenTo(e,"all",t),t.call(this)},_proxyCollectionEvents:function(t){var n=function(n){var i=e.toArray(arguments),r="change"===n||"change:"===n.slice(0,7);"reset"===n&&(this.models=t.models),e.contains(this.whitelistedEvents,n)?(e.contains(["add","remove","destroy"],n)?i[2]=this:e.contains(["reset","sort"],n)&&(i[1]=this),this.trigger.apply(this,i)):r&&this.contains(i[1])&&this.trigger.apply(this,i);
};this.listenTo(t,"all",n)},addFilter:function(t,n){return n||(n=t,t=this.defaultFilterName),e.has(this._filters,t)&&this._invalidateCacheForFilter(t),this._filters[t]=this._createFilter(n),this._execFilters(),this.trigger("filtered:add",t),this},removeFilter:function(e){return e||(e=this.defaultFilterName),delete this._filters[e],this._invalidateCacheForFilter(e),this._execFilters(),this.trigger("filtered:remove",e),this},resetFilters:function(){return this._filters={},this._invalidateCache(),this._execFilters(),
this.trigger("filtered:reset"),this},getFilters:function(){return e.keys(this._filters)},hasFilter:function(t){return e.contains(this.getFilters(),t)},refilter:function(t){return e.isObject(t)&&t.cid?this.onSupersetAdd(t):(this._invalidateCache(),this._execFilters()),this},destroy:function(){return this.stopListening(),this.superset=null,this._collection.reset([]),this.length=0,this.trigger("filtered:destroy"),this},_createFilter:function(t,n){if(e.isFunction(t))return t;throw new Error("Unsupported filter type");
},_execFilters:function(t){t||(t={});var n=[];this.superset&&(n=this.superset.filter(e.bind(this._execFiltersOnModel,this))),t.reset?this._collection.reset(n):this._collection.set(n),this.length=this._collection.length},_execFiltersOnModel:function(t){this._filterResultCache[t.cid]||(this._filterResultCache[t.cid]={});var n=this._filterResultCache[t.cid];for(var i in this._filters)if(e.has(this._filters,i)&&(e.has(n,i)||(n[i]=this._filters[i](t)),!n[i]))return!1;return!0},_invalidateCache:function(){
this._filterResultCache={}},_invalidateCacheForFilter:function(t){for(var n in this._filterResultCache)e.has(this._filterResultCache,n)&&delete this._filterResultCache[n][t]},onSupersetAdd:function(e){if(this._filterResultCache[e.cid]={},this._execFiltersOnModel(e)){if(!this._collection.get(e.cid)){for(var t=this.superset.indexOf(e),n=0,i=t-1;i>=0;i-=1)if(this.contains(this.superset.at(i))){n=this.indexOf(this.superset.at(i))+1;break}this._collection.add(e,{at:n})}}else this._collection.get(e.cid)&&this._collection.remove(e);
this.length=this._collection.length},onSupersetRemove:function(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length},onSupersetReset:function(){this._execFilters({reset:!0})}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(60)],r=function(e){"use strict";var t=e.extend({pageSize:10,pages:function(){return Math.max(Math.ceil(this.length/this.pageSize),1)},page:function(e,t){t||(t={});var n,i=0;return n=t.reverse?this.length-e*this.pageSize:e*this.pageSize-this.pageSize,
n<0&&(i=n,n=0),this.models.slice(n,n+this.pageSize+i)}});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(18),o=i(s),l=n(131),u=i(l),c=n(430),d=i(c),h=window.PLEXWEB_INLINE&&window.PLEXWEB_INLINE.acceptLanguage,p=window.navigator,f=void 0;h?f=u.default.parseHeader(h):p.languages?f=p.languages:p.language?f=[p.language]:p.userLanguage&&(f=[p.userLanguage]);var m=u.default.closestLanguage(f)||"en",v={
language:{type:o.default.string,defaultValue:m},autoLogin:{type:o.default.boolean,defaultValue:!1},extrasPrefixCount:{type:o.default.integer,defaultValue:0},debugLevel:{type:o.default.integer,defaultValue:d.default.DISABLED}},g=a.default.mapObject(v,function(e){return e.type});t.defaultTypes=g;var y=a.default.mapObject(v,function(e){return e.defaultValue});t.defaultValues=y,t.default=v},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),a=i(r),s=n(25),o=i(s),l=n(391),u=i(l),c=o.default.extend({
name:"ChannelCollection",context:["server","channel"],model:u.default,url:function(){return this.containerKey},initialize:function(){this.listenTo(a.default,"clear:channels",this.reset)},sortByTitle:function(e){return e.get("title").toLowerCase()},sortByLastAccess:function(e){return-e.get("lastAccessedAt")},filterByType:function(e){var t=this.filter(function(t){return t.get("type")===e});return this.clone(t)}});t.default=c,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(37),n(8),n(31),n(716),n(715)],
r=function(e,t,n,i,r,a,s){"use strict";var o=/(auth_token=|accessToken=|X-Plex-Token=)(\"?\w+\"?)/g,l=/(email=)(\"?[^&]+\"?)/g,u=/(password=)([^&]+)/,c=/(address=|host=|uri=)(\"?[^&]+\"?)/g,d=function(e){return e=e.replace(o,"$1TOKEN"),e.replace(u,"$1PASSWORD")},h=function(e){return e&&e.hasOwnProperty("X-Plex-Token")&&(e["X-Plex-Token"]="TOKEN"),e&&e.hasOwnProperty("Authorization")&&(e.Authorization="BASIC AUTHORIZATION"),e},p=function(e){if(e)return e=e.replace(o,'$1"TOKEN"'),e=e.replace(l,'$1"EMAIL"'),
e=e.replace(c,'$1"IP ADRRESS"')},f=n.Collection.extend({model:s,initialize:function(t,n){e.bindAll(this,"onAjaxComplete"),this.parent=n.parent,a.parent=n.parent,this.listenTo(r,"change:instance",this.onSettingsAdapterInstanceChange),r.hasInstance()&&this.onSettingsAdapterInstanceChange(),this.reconfigure()},reconfigure:function(){this.settings&&this.settings.get("debugLevel")?this.start():this.stop()},start:function(){this.enabled||(this.enabled=!0,this.reset(),this.listenTo(i,"log:message",this.onLogMessage),
n.history.on("route",this.onRoute,this),t(document).on("ajaxComplete",this.onAjaxComplete))},stop:function(){this.enabled&&(this.enabled=!1,this.reset(),this.stopListening(i),n.history.off("route",this.onRoute,this),t(document).off("ajaxComplete",this.onAjaxComplete))},destroy:function(){this.stop(),this.stopListening()},add:function(){this.length>200&&this.shift(),n.Collection.prototype.add.apply(this,arguments)},toJSON:function(){var t=n.Collection.prototype.toJSON.apply(this,arguments);return t.unshift(e.extend({
type:"info"},a.toJSON())),t},toJSONString:function(){return JSON.stringify(this.toJSON(),null,2)},onSettingsAdapterInstanceChange:function(){this.settings&&(this.stopListening(this.settings),this.settings=null),r.hasInstance()&&(this.settings=r.getInstance(),this.listenTo(this.settings,"change:debugLevel",this.reconfigure)),this.reconfigure()},onLogMessage:function(e){this.add(e)},onRoute:function(e,t,n){var i={type:"navigation",route:t,args:n,fragment:window.location.hash};this.add(i)},onAjaxComplete:function(t,n,i){
var r={type:"ajax",url:d(i.url),status:n.status};e.isEmpty(i.headers)||(r.headers=h(i.headers)),e.isEmpty(i.data)||(r.params=i.data),200===n.status?2===this.settings.get("debugLevel")?r.response=p(n.responseText):r.responseLength=n.responseText?n.responseText.length:0:(r.statusText=n.statusText,r.response=p(n.responseText)),this.add(r)}});return f}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(37)],r=function(e){"use strict";var t=e.Model.extend({initialize:function(e,t){this.set("time",new Date);
}});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(37),n(61)],r=function(e,t,n){"use strict";var i=t.Model.extend({initialize:function(e,t){this.set("host",window.location.host),this.set("userAgent",window.navigator.userAgent),this.set("browser",n)},toJSON:function(){var n=this.parent.get("primaryServer"),i=this.parent.get("user"),r=i.get("features");return this.set("version","2.7.0"),n&&(n.get("activeConnection")&&this.set("primaryServerUrl",n.url()),this.set("primaryServerAuthToken",!!n.get("accessToken")),
this.set("primaryServerVersion",n.get("versionFull"))),this.set("username",i.get("username")),this.set("cloudUrl",i.server.get("connections")),this.set("cloudAccessToken",!!i.server.get("accessToken")),r&&this.set("userFeatures",e.keys(r).join(", ")),t.Model.prototype.toJSON.apply(this,arguments)}});return new i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(394)],r=function(e,t){"use strict";var n=t.extend({initialize:function(t){this.playQueue=t.playQueue,this.addFilter(e.bind(this.filterAfterUpNext,this)),
this.listenForUpNextChanges()},filterAfterUpNext:function(e){var t=this.superset.indexOf(e),n=this.playQueue.getUpNextRange();return t>n.end}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(22),n(129),n(132),n(45),n(167),n(35)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=a.extend({idAttribute:"ratingKey",whitelistedAttrs:["guid","addedAt","composite","duration","key","leafCount","playlistType","ratingKey","smart","summary","title","type","allowSync"],
defaults:function(){return{children:new s([],{server:this.server,parent:this,url:function(){var e,t="/playlists/"+this.parent.id+"/items";return"audio"===this.parent.get("playlistType")&&(e={includeRelated:1}),n.join(t,e)}})}},urlRoot:"/playlists",saveUrl:function(){return"/library/metadata/"+this.id},cacheKey:function(e){if(e.key)return this.server&&this.server.getScopedKey(e.key)},initialize:function(){this.listenToOnce(this.get("children"),"add",function(e){this.set("art",e.get("art"))})},sync:function(e,t,n){
var i=r.addVersionHeader(2,n);return a.prototype.sync.call(this,e,t,i)},parse:function(e){var t=this.convert(e);return t.Playlist&&(t=t.Playlist),o.parseInteger(t,["duration","leafCount","addedAt"]),o.parseBoolean(t,["smart","allowSync"]),t.isPlaylist=!0,t},findItem:function(e){return this.get("children").findWhere({playlistItemID:e})},moveItem:function(i,r){var a=r?{after:r}:{},s=n.join([e.result(this,"url"),"/items/",i,"/move"],a),o=e.extend(this.server.getXHROptions(s),{type:"PUT"}),l=t.ajax(o),u=this.get("children"),c=this.findItem(i);
u.remove(c);var d=this.findItem(r),h=d?u.indexOf(d)+1:0;return u.add(c,{at:h}),l},removeItem:function(i){i=i.toString();var r=n.join([e.result(this,"url"),"/items/",i]),a=e.extend(this.server.getXHROptions(r),{type:"DELETE"}),s=t.ajax(a);s.then(e.bind(function(e){this.set(this.parse(e))},this));var o=this.get("children"),l=this.findItem(i);return o.remove(l),s},addContent:function(r,a){var s=this.isNew()?"POST":"PUT",o=[e.result(this,"url")],l={};this.isNew()?(l.type=this.get("playlistType"),l.title=this.get("title"),
l.smart=this.get("smart")?1:0):o.push("/items"),r.get("playQueueID")?l.playQueueID=r.get("playQueueID"):l.uri=i.uri(r,a);var u=n.join(o,l),c=e.extend(r.server.getXHROptions(u),{type:s}),d=t.ajax(c);return d.then(e.bind(function(e){this.set(this.parse(e))},this)),d.promise()},isLibraryItem:function(){return!0},isPlexMusicItem:function(){return!1}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(45),a=i(r),s=n(398),o=i(s),l=n(402),u=i(l),c=a.default.extend({
name:"PlaylistsSectionModel",defaults:function(){return{pseudo:!0,currentType:0,sorts:new o.default([],{section:this,server:this.server}),items:new u.default({},{section:this,server:this.server})}},url:function(){return"/playlists"}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(22),l=r(o),u=n(25),c=i(u),d=n(209),h=i(d),p=c.default.extend({name:"FilterCollection",context:["server","section","includeAdvanced"],
model:h.default,comparator:"filterType",includeAdvanced:!0,url:function(){var e=s.default.result(this.section,"url"),t=this.section.get("currentType"),n={includeAdvanced:this.includeAdvanced?1:0};return t&&(n.type=t.id),l.join([e,"/filters"],n)},findUnwatchedFilter:function(){return this.get("unwatched")||this.get("unwatchedLeaves")}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({
name:"FilterOptionModel",context:["server","section","type","standalone"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:a.default.string,type:a.default.string,title:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(25),o=i(s),l=n(396),u=i(l),c=o.default.extend({name:"FirstCharacterCollection",context:["server","section"],model:u.default,url:function d(){var e=a.default.result(this.section,"url")+"/firstCharacter",t=this.getUrlParams(),d=t?e+"?"+t:e;
return d},getUrlParams:function(){var e={},t=[],n=this.section.get("currentType");n&&(e.type=n.id);var i=this.section.get("currentFilters");return a.default.each(i,function(t){t.values.length&&(e[t.key]=t.values.join(","))}),a.default.each(e,function(n,i){"unviewedLeafCount"===i?t.push(i+">="+e[i]):t.push(i+"="+e[i])}),t.join("&")}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(25),o=i(s),l=n(724),u=i(l),c=o.default.extend({
name:"LinearFilterCollection",context:["server","section"],model:u.default,url:function(){return a.default.result(this.section,"url")},filterBySecondary:function(){var e=this.filter(function(e){return e.get("secondary")});return this.clone(e)}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(395),u=i(l),c=o.default.extend({name:"LinearFilterModel",context:["server","section"],idAttribute:"key",
rootPropertyName:"Directory",syncedAttrs:{secondary:a.default.boolean,key:a.default.string,title:a.default.string},syncedRelations:{options:{relationClass:u.default}},defaults:{secondary:!1}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(726),o=i(s),l=a.default.extend({name:"LocationCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"LocationModel",context:["server","section"],rootPropertyName:"Location",syncedAttrs:{id:a.default.integer,path:{type:a.default.string,save:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(397),o=i(s),l=a.default.extend({name:"MediaTypeCollection",context:["server","section"],
model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(25),o=i(s),l=n(264),u=i(l),c=o.default.extend({name:"SectionSubsetCollection",context:["server","section"],model:u.default,url:function(){return a.default.result(this.section,"url")},filterPrimaries:function(){var e=this.filter(function(e){return e.get("primary")});return this.clone(e)}});t.default=c,e.exports=t.default},function(e,t,n){
var i,r;i=[n(3),n(5),n(109),n(468),n(39),n(264),n(45)],r=function(e,t,n,i,r,a,s){"use strict";var o=s.extend({initialize:function(t,n){this.storage=n.storage,this.section=n.section,this.type=n.type,this.filters=n.filters,this.sortKey=n.sortKey,this.sortDirection=n.sortDirection,this.subset=n.subset,this.debouncedStorageSave=e.debounce(e.bind(this.storage.save,this.storage),300)},_fetch:function(t){t=t||{};var i=n(this.storage.fetch());return i=i.done(e.bind(function(){this.type&&this.storage.set("typeID",this.type),
this.sortKey&&this.sortDirection&&this.storage.set({sortKey:this.sortKey,sortDirection:this.sortDirection}),this.subset&&this.storage.set("subset",this.subset),this.filters&&this.filters.length&&this.storage.set("filters",this.filters)},this)),i=i.then(e.bind(function(){return this.fetchSort().then(e.bind(function(e){e&&e.set("direction",this.storage.get("sortDirection")||e.get("defaultDirection"))},this))},this)),i=i.done(e.bind(this.storage.save,this.storage)),i.then(e.constant(this))},fetchSort:function(){
if(!this.section.server.get("isFullServer"))return t.Deferred().reject().promise();var n=this.section.get("sorts");n.typeID=this.storage.get("typeID");var i=n.fetch();return n.typeID=null,i=i.then(e.bind(function(){var e,t=this.storage.get("sortKey");return t&&(e=n.findWhere({key:t})),this.sort=e||n.findWhere({isDefault:!0}),this.sort},this))},getType:function(){var e=this.storage.get("typeID")||r.get(this.section.get("type")).id,t=this.section.get("types");return t.get(e)},getSubsetModel:function(){
var e,t=this.storage.get("subset");t&&(e=i.get(t)),e||(this.storage.set("subset","all"),e=i.get("all"));var n=new a(e,{server:this.section.server,section:this.section});return n},getSort:function(){return this.sort&&this.sort.set("selected",!0),this.sort},getFilters:function(){return this.storage.get("filters")||[]},refreshAttributes:function(){var e=this.section.get("currentType");e&&this.storage.set("typeID",e.get("id"));var t=this.section.get("currentSubset");t&&this.storage.set("subset",t.get("key"));
var n=this.section.get("currentSort");n&&(this.storage.set("sortKey",n.get("key")),this.storage.set("sortDirection",n.get("direction")||n.get("defaultDirection")));var i=this.section.get("currentFilters");this.storage.set("filters",i)},getSectionAttrs:function(){return{currentType:this.getType(),currentSubset:this.getSubsetModel(),currentSort:this.getSort(),currentFilters:this.getFilters()}},addListeners:function(){this.listenTo(this.section,{"change:currentType":this.onValueChange,"change:currentSort":this.onValueChange,
"change:currentSubset":this.onValueChange,"change:currentFilters":this.onValueChange}),this.listenTo(this.section.get("sorts"),"change:direction",this.onValueChange)},removeListeners:function(){this.stopListening(this.section),this.stopListening(this.section.get("sorts"))},onValueChange:function(){this.refreshAttributes(),this.debouncedStorageSave()}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(467),n(166),n(388)],r=function(e,t,n){"use strict";var i=7776e6,r=t.extend({
storageKey:"sectionViewState",serialize:function(n){return t.prototype.serialize.call(this,e.augmentDictionary(n,{ttl:i}))}}),a=n.extend({initialize:function(e,t){n.prototype.initialize.apply(this,arguments),this.section=t.section,this.storage=new r},storageKey:function(){return this.section.getScopedKey("attrs")},toJSON:function(){var t=n.prototype.toJSON.apply(this,arguments);return e.augmentObj(t,i,!0)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(732),o=i(s),l=a.default.extend({name:"ChapterCollection",context:["server","section"],model:o.default,modelId:function(e){return e.id+"_"+e.index}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"ChapterModel",context:["server","section"],syncedAttrs:{id:a.default.integer,tag:a.default.string,
index:a.default.integer,startTimeOffset:a.default.integer,endTimeOffset:a.default.integer,thumb:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(734),o=i(s),l=a.default.extend({name:"ConcertCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});
var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"ConcertModel",context:["server","section"],syncedAttrs:{id:a.default.integer,at:a.default.integer,tag:a.default.string,venue:a.default.string,city:a.default.string,country:a.default.string,url:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"OverlayModel",context:["server","section"],
syncedAttrs:{key:a.default.string,marginTop:a.default.integer,marginRight:a.default.integer,marginBottom:a.default.integer,marginLeft:a.default.integer,width:a.default.integer,height:a.default.integer,alignHorizontal:a.default.string,alignVertical:a.default.string,relative:a.default.string,imageScaling:a.default.string,marginScaling:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(265),o=i(s),l=a.default.extend({
name:"PlaylistCollection",context:["server","containerKey"],model:o.default,url:function(){return this.containerKey}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(22),l=r(o),u=n(39),c=i(u),d=n(87),h=i(d),p={unviewedLeafCount:">="},f=h.default.extend({name:"SectionMetadataListModel",context:["server","section","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],url:function m(){
var e=[],t=void 0,n=void 0,i=this.section.get("currentFolderKey");if(i)e.push(i);else if(e.push(s.default.result(this.section,"url")),t=this.section.get("currentSubset").id,this.section.get("allowAdvancedFilters"))"recentlyAdded"!==t&&"newest"!==t||(t="all"),e.push(t),n=this.getParams();else{var r=this.section.get("currentFilters");r.length?e=[r[0].values[0]]:e.push(t)}var m=l.join(e,n);return m=this.replaceSpecialFilterOperators(m),this.set("containerKey",m),this.server.get("isFullServer")?this.getPaginatedUrl(m):m;
},getParams:function(){var e=this.getFilterParams(),t=this.getMediaTypeID(),n=this.getSort();return t&&t!==c.default.get("photo").id&&(e.type=t),n&&(e.sort=n),this.section.get("refreshing")&&this.server.supports("timelineState")&&(e.timelineState=1),e},getFilterParams:function(){var e=this.section.get("currentFilters"),t={};return s.default.each(e,function(e){e.values.length&&(t[e.key]=e.values.map(decodeURIComponent).join(","))}),t},getMediaTypeID:function(){var e=this.section.get("currentSubset").id,t=this.section.get("currentType").id||c.default.get(this.section.get("type")).id;
return/^(onDeck|recentlyAdded|recentlyViewed|newest)$/.test(e)?t===c.default.get("show").id||t===c.default.get("season").id?t=c.default.get("episode").id:t!==c.default.get("artist").id&&t!==c.default.get("track").id||(t=c.default.get("album").id):/^recentlyViewedShows$/.test(e)&&(t=c.default.get("show").id),t},getSort:function(){var e=this.section.get("currentSort"),t=this.section.get("currentSubset").id;return"recentlyAdded"===t?"addedAt:desc":"newest"===t?"originallyAvailableAt:desc":e?e.id+":"+e.get("direction"):void 0;
},replaceSpecialFilterOperators:function(e){return s.default.each(p,function(t,n){e=e.replace(n+"=",n+t)}),e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(403),o=i(s),l=a.default.extend({name:"TagCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(740),o=i(s),l=a.default.extend({
name:"LyricsLineCollection",context:["server","section"],model:o.default,eachSpan:function(e){this.each(function(t){t.get("spans").each(e)})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(741),u=i(l),c=o.default.extend({name:"LyricsLineModel",context:["server","section"],syncedAttrs:{startOffset:a.default.integer,endOffset:a.default.integer},syncedRelations:{spans:{relationClass:u.default,
rootPropertyName:"Span"}},defaults:{startOffset:-1,endOffset:-1}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(742),o=i(s),l=a.default.extend({name:"LyricsSpanCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=-1,u=-1,c=o.default.extend({
name:"LyricsSpanModel",context:["server","section"],sessionAttrs:{active:a.default.boolean},syncedAttrs:{startOffset:a.default.integer,endOffset:a.default.integer,text:a.default.string},defaults:{startOffset:l,endOffset:u},isPositionWithin:function(e){var t=this.get("startOffset"),n=this.get("endOffset");if(t===l)return!1;var i=e>=t,r=e<=n||n===u;return i&&r}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(702),o=i(s),l=n(744),u=i(l),c=a.default.extend({
mixins:[o.default],name:"LyricsStreamCollection",context:["server","section"],model:u.default,initialize:function(){this.exclusiveBoolAttr("selected")}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(19).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),s=i(a),o=n(18),l=r(o),u=n(20),c=r(u),d=n(739),h=r(d),p=c.default.extend({name:"LyricsStreamModel",context:["server","section"],rootPropertyName:"Lyrics",url:function(){return s.join(this.get("key"),{
format:"xml"})},sessionAttrs:{follow:l.default.boolean},syncedAttrs:{id:l.default.integer,key:l.default.string,streamType:l.default.integer,index:l.default.integer,title:l.default.string,selected:l.default.boolean,codec:l.default.string,provider:l.default.string,format:l.default.string,minLines:l.default.integer,timed:l.default.boolean},syncedRelations:{lines:{relationClass:h.default,rootPropertyName:"Line"}},defaults:{follow:!0,selected:!1}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";
var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(407),o=i(s),l=a.default.extend({name:"PlexPlayerCollection",context:["server"],model:o.default,url:"/clients"});t.default=l,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(6),n(45)],r=function(e,t,n){"use strict";var i=36e5,r=n.extend({defaults:function(){return{canSkipNext:!0,stationSkipsPerHour:1/0,skips:[]}},initialize:function(){var t=[this.get("stationSkipsPerHour"),0];t=e.reject(t,function(e){return e===1/0;
}),this.maxLength=Math.max.apply(Math,t)},updateTimeout:function(n){this.timeout&&(this.timeout=clearTimeout(this.timeout));var r=this.get("stationSkipsPerHour");if(r!==1/0){var a=n-i,s=e.filter(this.get("skips"),function(e){return e>=a}),o=s.length>=r?i-(n-e.last(s)):null,l=!o,u=l?"":t("You can skip {1} songs an hour per mix.",this.get("stationSkipsPerHour"));this.set({canSkipNext:l,canSkipNextMessage:u}),o>0&&(this.timeout=setTimeout(e.bind(function(){this.updateTimeout((new Date).getTime())},this),o));
}},registerSkip:function(){var e=(new Date).getTime(),t=this.get("skips");t.unshift(e),t.length>this.maxLength&&(t.length=this.maxLength),this.updateTimeout(e)},stop:function(){this.timeout&&clearTimeout(this.timeout)}},{playQueueAttributes:["stationSkipsPerHour"]});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(19).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),s=i(a),o=n(26),l=r(o),u=n(13),c=r(u),d=n(18),h=r(d),p=n(54),f=r(p),m=n(69),v=r(m),g=n(269),y=r(g),b=n(102),w=r(b),S=n(393),P=r(S),x=n(750),C=r(x),T=n(849),_=r(T),E=v.default.connectionTestResults,k=v.default.promiseStates,I=v.default.extend({
name:"CloudServerModel",connectionTestUrl:"/pms/:/ip",sessionAttrs:{connectionTestResult:h.default.oneOf(E.PENDING,E.CONNECTED,E.UNAVAILABLE,E.UNAUTHORIZED).isRequired,promiseState:h.default.oneOf(k.PENDING,k.RESOLVED,k.REJECTED).isRequired,playQueueManager:h.default.instanceOf(P.default).isRequired,isShared:h.default.boolean.isRequired,isBundled:h.default.boolean.isRequired,isCloud:h.default.boolean.isRequired,isMerged:h.default.boolean.isRequired,isDownForMaintenance:h.default.boolean.isRequired,
hasFailedResources:h.default.boolean.isRequired,friendlyName:h.default.string,accessToken:h.default.string,baseUrl:h.default.string.isRequired,plexPassUrl:h.default.string.isRequired,accountUrl:h.default.string.isRequired,cloudSyncUrl:h.default.string.isRequired,appsUrl:h.default.string.isRequired,helpUrl:h.default.string.isRequired},sessionRelations:{activeConnection:{relationClass:w.default,deferred:!0},connections:{relationClass:y.default,options:function(){return{server:this}}},resources:{relationClass:C.default,
options:function(){return{server:this}}}},defaults:function(){var e=f.default.get("myPlexScheme")+"://"+f.default.get("myPlexUrl");return{connectionTestResult:E.PENDING,promiseState:k.PENDING,playQueueManager:new P.default({server:this}),isShared:!1,isBundled:!1,isCloud:!0,isMerged:!1,isDownForMaintenance:!1,hasFailedResources:!1,friendlyName:"plex.tv",baseUrl:e,plexPassUrl:s.join([e,"/subscription/about"]),accountUrl:s.join([e,"/users/edit"]),cloudSyncUrl:s.join([e,"/cloudsync/providers"]),appsUrl:s.join([e,"/downloads"]),
helpUrl:"http://support.plex.tv/hc/en-us"}},swizzleNodeUrl:function(e){var t=this.parent.get("primaryServer"),n=t&&t.get("isConnected")&&t.get("isFullServer")&&t.get("allowChannelAccess");return n?t.swizzleUrl(e):this.swizzleUrl(e,{connection:new w.default({scheme:"https",address:"node.plexapp.com",port:"32443"})})},testAllConnections:function(){var e=this,t=this.get("connections");(0,l.default)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName"));var n=t.map(function(t){
return e.testConnection(t)});return(0,_.default)(n)},testConnection:function(e){var t={server:this,connection:e,url:this.connectionTestUrl},n=c.default.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this));return n},abortConnectionTest:function(e){var t={server:this,connection:e,url:this.connectionTestUrl};c.default.execute("abortServerConnectionTest",t)},deauthenticate:function(){this.get("resources").clear(),this._reject({connectionTestResult:this.get("connectionTestResult"),
accessToken:null})},onConnectionTestSuccess:function(e){var t=this.get("connections").getBestConnection();l.default.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this.startCapturingChangeEvents(),this.set({isDownForMaintenance:!1,connectionTestResult:E.CONNECTED,activeConnection:t}),this.releaseCapturedChangeEvents()},onConnectionTestError:function(e,t){e.get("isAborted")||this.get("connections").hasOnlyFailedConnections()&&this._reject({isDownForMaintenance:503===t.status
})}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(749),o=i(s),l=a.default.extend({name:"ConnectionSourceCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"ConnectionSourceModel",context:["server"],sessionAttrs:{
id:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(19).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),s=i(a),o=n(54),l=r(o),u=n(25),c=r(u),d=n(751),h=r(d),p=c.default.extend({model:h.default,context:["server"],url:function(){var e={};return l.default.get("allowHttpsMediaServerConnections")&&(e.includeHttps=1),s.join("/api/resources",e)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(269),u=i(l),c=o.default.extend({name:"ResourceModel",context:["server"],idAttribute:"clientIdentifier",rootPropertyName:"Device",urlRoot:"/api/resources",syncedAttrs:{clientIdentifier:a.default.string,name:a.default.string,sourceTitle:a.default.string,accessToken:a.default.string,product:a.default.string,productVersion:a.default.string,platform:a.default.string,platformVersion:a.default.string,device:a.default.string,provides:a.default.list,owned:a.default.boolean,
home:a.default.boolean,synced:a.default.boolean,presence:a.default.boolean,publicAddressMatches:a.default.boolean,httpsRequired:a.default.boolean,createdAt:a.default.integer,lastSeenAt:a.default.integer},syncedRelations:{connections:{relationClass:u.default,rootPropertyName:"Connection"}}});t.default=c,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({idAttribute:"key",whitelistedAttrs:["key","name","defaultAudioLanguage","autoSelectAudio","defaultSubtitleLanguage","subtitleMode"],
url:function(){return this.get("key")},convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return i.Account&&(i=i.Account),t.parseBoolean(i,"autoSelectAudio"),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(711),n(754)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:"/servers",pageSize:20,limit:1e3,initialize:function(){this.startTime=new Date,this.listenTo(this.server,"socket:setting",this.onSettingChange),
this.listenTo(this.server,"socket:timeline",this.onTimeline),this.listenTo(this.server,"socket:status",this.onStatus),this.listenTo(this.server,"socket:playing",this.onPlaying),this.listenTo(this.server,"socket:websocket",this.onWebSocket)},add:function(e){this.length+1>this.limit&&this.remove(this.at(0)),t.prototype.add.apply(this,arguments)},onSettingChange:function(t){t.label&&this.add(e.extend({_type:"setting"},t),{parse:!0})},onTimeline:function(t){1===t.state||t.sectionID<0||this.add(e.extend({
_type:"timeline"},t),{parse:!0})},onStatus:function(t){"ProgressNotification"!==t._elementType&&this.add(e.extend({_type:"status"},t),{parse:!0})},onPlaying:function(t){this.add(e.extend({_type:"playing"},t),{parse:!0})},onWebSocket:function(t){this.add(e.extend({_type:"websocket"},t),{parse:!0})}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(45)],r=function(e){"use strict";var t=0,n=e.extend({idAttribute:"id",parse:function(e){var n=e;return n.time=new Date,n.id="evt"+t++,
"preference"===n._type&&(n.value=String(n.value)),n}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({url:"/myplex/account",whitelistedAttrs:["username","mappingState","mappingError","mappingErrorMessage","signInState","publicAddress","publicPort","privateAddress","privatePort","subscriptionActive","subscriptionState"],defaults:{signedIn:!1,remoteAccessState:"",mappingState:"",mappingError:"",mappingErrorMessage:"",
signInState:"",publicAddress:"",publicPort:"",privateAddress:"",privatePort:""},isNew:function(){return!this.get("signedIn")},convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return e.defaults(i,e.result(this,"defaults")),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs),"ok"===n.signInState?n.signedIn=!0:(n.signedIn=!1,n.username=""),n.signedIn&&"mapped"===n.mappingState&&!n.mappingError?n.remoteAccessState="ok":n.signedIn&&!n.mappingError||(n.remoteAccessState="unreachable"),
n},isWaiting:function(){var e=this.get("remoteAccessState");return"connecting"===e||"disconnecting"===e}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){if(!e.length)return"(none)";var t=s.default.map(e,function(e){return e.get("debugName")});return t.join(", ")}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(26),c=r(u),d=n(266),h=r(d),p=n(25),f=r(p),m=n(69),v=r(m),g=f.default.extend({mixins:[h.default],
name:"ServerCollection",model:v.default,initialize:function(){this._resetPopulate()},comparator:function(e){var t=e.get("isFullOwnedServer"),n=e.get("isShared"),i=e.get("friendlyName")||"",r=t?"0":"1";return r+=n?"1":"0",r+=i.toLowerCase()},shouldWaitForInitialServers:function(){var e=this.filter(function(e){var t=!e.id||!!e.get("resources");return t&&e.hasPendingPopulate()});return!!e.length&&((0,c.default)("[Servers] Waiting for initial servers =",i(e)),!0)},shouldWaitForResources:function(){var e=this.reduce(function(e,t){
var n=t.get("isResolved"),i=t.get("resources"),r=i&&i.hasPendingPopulate();return n&&r&&e.push(t),e},[]);return!!e.length&&((0,c.default)("[Servers] Waiting for additional resources from",i(e)),!0)},shouldWaitForPendingServers:function(){if(this.findWhere({isConnected:!0}))return!1;var e=this.filter(function(e){return e.hasPendingPopulate()});return!!e.length&&((0,c.default)("[Servers] Waiting for pending servers =",i(e)),!0)},waitForServers:function(){this._resetPopulate()},foundAllServers:function(){
var e=this.where({isConnected:!0}),t=i(e);(0,c.default)("[Servers] Found all servers =",t),e.length?this._resolvePopulate():this._rejectPopulate()},populateAnyServer:function(){function e(e){var t=u.indexOf(e);t>-1&&(u.splice(t,1),this.hasOnlyRejectedServers(u)&&o.reject())}function t(e,t){var n=s.default.contains(u,e);n&&t&&o.resolve(e)}function n(e,t){var n=s.default.contains(u,e);n&&t&&this.hasOnlyRejectedServers(u)&&o.reject()}var r=this,a=arguments.length<=0||void 0===arguments[0]?this.models:arguments[0],o=l.default.Deferred(),u=a.slice(0),d=s.default.find(u,function(e){
return e.get("isResolved")});return d?((0,c.default)("[Servers] Populate any server chose %s where servers = %s",d.get("debugName"),i(u)),o.resolve(d).promise()):this.hasOnlyRejectedServers(u)?o.reject().promise():(this.on({remove:e,"change:isResolved":t,"change:isRejected":n},this),o.always(function(){r.off("change:isResolved",t,r),r.off("change:isRejected",n,r)}),o.promise())},populateServer:function(e){return this.findServer(e,!0).then(function(e){return e.populate()})},findServer:function(e,t){
function n(){var e=this,i=this.filterServers(r,t);i?(d=i,i.done(function(e){d===i&&o.resolve(e)}),i.fail(function(){d===i&&(a||!e.hasPendingPopulate()?o.reject():e.populate().always(n.bind(e)))})):this.hasPendingPopulate()||o.reject()}var i=this,r=s.default.isString(e)?{machineIdentifier:e}:e,a=s.default.has(r,"machineIdentifier"),o=l.default.Deferred(),u=s.default.map(s.default.keys(r),function(e){return"change:"+e}),c="add "+u.join(" "),d=void 0;return n.call(this),this.on(c,n,this),this.populate().always(function(){
d||o.reject()}),o.always(function(){i.off(c,n,i)}),o.promise()},filterServers:function(e,t){var n=this.where(e);if(n.length)return t?this.populateAnyServer(n):l.default.Deferred().resolve(n[0]).promise()},hasOnlyRejectedServers:function(){var e=arguments.length<=0||void 0===arguments[0]?this.models:arguments[0];return s.default.every(e,function(e){return e.get("isRejected")})},hasLoopbackServer:function(){var e=arguments.length<=0||void 0===arguments[0]?this.models:arguments[0];return!!s.default.find(e,function(e){
var t=e.get("activeConnection");return!!t&&t.get("isLoopback")})}});t.default=g,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({idAttribute:"id",url:"/:/prefs",defaults:{type:"string",summary:"",label:"",group:""},whitelistedAttrs:["id","label","default","summary","value","type","group","advanced","option","hidden","enumValues","values"],convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return"bool"===i.type?t.parseBoolean(i,"value"):"int"!==i.type&&"enum"!==i.type||t.parseInteger(i,"value"),
t.parseBoolean(i,["advanced","hidden"]),i},parse:function(t){var n=this.convert(t);if(n=e.pick(n,this.whitelistedAttrs),n.enumValues&&!e.isArray(n.enumValues)&&(n.enumValues=e.map(n.enumValues.split("|"),function(e){var t=e.indexOf(":"),i=t>0?e.slice(t+1):e,r=t>0?e.slice(0,t):e;return"int"===n.type&&(r=parseInt(r,10)),{label:i,value:r}})),"enum"===n.type&&n.values&&!e.isArray(n.values)){var i=0;n.enumValues=e.map(n.values.split("|"),function(e){return{label:e,value:i++}})}return n},getSaveParams:function(t,n){
if(e.has(t,"FriendlyName")&&this.server.set("friendlyName",t.FriendlyName),e.has(t,"allowMediaDeletion")&&this.server.set("allowMediaDeletion","1"===String(t.allowMediaDeletion)),e.isEmpty(t)){var i={};return i[this.get("id")]=this.get("value"),i}return"value"in t&&(t[this.get("id")]=t.value,delete t.value),t}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(8),n(35),n(45)],r=function(e,t,n,i,r){"use strict";var a=r.extend({url:"/updater/status",whitelistedAttrs:["status","canInstall","downloadURL","state","progress","version","error","added","fixed"],
defaults:{state:"none",progress:0,version:"",error:"",added:"",fixed:"",shouldInstall:!1},fetch:function(){return this.server.supports("updater")?r.prototype.fetch.apply(this,arguments):t.Deferred().reject().promise()},convert:function(t){var n=e.isObject(t)?t:i.parseXML(t);return i.parseBoolean(n,"canInstall"),i.parseInteger(n,"status"),n.Release&&i.parseInteger(n.Release,"progress"),n},parse:function(t,n){var i=this.convert(t);return i=e.extend(i,i.Release),i=e.pick(i,this.whitelistedAttrs),0!==i.status&&(i.state="error"),
i}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(167),a=i(r),s=n(408),o=i(s),l=a.default.extend({name:"SessionCollection",model:o.default,url:"/status/sessions"});t.default=l,e.exports=t.default},function(e,t,n){var i,r;i=[n(60),n(761)],r=function(e,t){"use strict";var n=e.extend({model:t,url:"/sync/transcodeQueue",parse:function(e){return this.convert(e,"TranscodeJob")}});return n}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({idAttribute:"syncItemId",whitelistedAttrs:["syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","title","thumb"],convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return t.parseInteger(i,"syncItemId"),t.parseFloat(i,["progress","speed"]),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs)}});return i}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({idAttribute:"key",whitelistedAttrs:["key","progress","throttled","speed","duration","videoDecision","audioDecision","protocol","container","videoCodec","audioCodec","audioChannels","width","height"],url:function(){return"/transcode/sessions/"+this.id},convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return i.TranscodeSession&&(i=i.TranscodeSession),t.parseBoolean(i,"throttled"),
t.parseInteger(i,["duration","audioChannels"]),i.progress=parseFloat(i.progress),i.speed=parseFloat(i.speed),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(18),o=i(s),l=n(69),u=i(l),c=n(10),d=u.default.prototype,h=u.default.extend({name:"TransientServerModel",cache:null,persistInCache:!1,sessionAttrs:a.default.extend({},u.default.prototype.sessionAttrs,{
isTransient:o.default.boolean,originalMachineIdentifier:o.default.string}),defaults:function p(){var p=u.default.prototype.defaults.apply(this,arguments);return a.default.extend({},p,{friendlyName:"Transient Server",isTransient:!0})},initialize:function(e){var t=e.machineIdentifier,n=(0,c.resolve)("appModel"),i=n.get("servers").get(t);i&&a.default.extend(e,i.pick("publicAddressMatches","version")),u.default.prototype.initialize.apply(this,arguments)},addConnection:function(){var e=d.addConnection.apply(this,arguments),t=e.getIpAddressFromPlexDirectAddress();
return t&&e.set("address",t),this.testConnection(e),e},testConnection:function(e){var t=this.get("originalMachineIdentifier");return this.get("originalMachineIdentifier")&&this.set("machineIdentifier",t),d.testConnection.apply(this,arguments)},updateCacheKey:function(){},onConnectionTestSuccess:function(e,t){var n=this.get("machineIdentifier");return t=a.default.extend({},t,{machineIdentifier:"transient-"+n,originalMachineIdentifier:n}),d.onConnectionTestSuccess.call(this,e,t)},onConnectionTestError:function(e,t){
e.get("isAborted")||(e.get("isHttps")&&this.addConnection({scheme:"http",address:e.getIpAddressFromPlexDirectAddress(),port:e.get("port")}),this.get("connections").hasOnlyFailedConnections()&&this._reject())}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(166),a=i(r),s=a.default.extend({storageKey:"manualServers",defaults:{port1:"32400",port2:"32400"}});t.default=new s,e.exports=t.default},function(e,t,n){
"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(766),o=i(s),l=a.default.extend({name:"StoredConnectionCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(767),u=i(l),c=o.default.extend({name:"StoredConnectionModel",idAttribute:"uri",syncedAttrs:{uri:a.default.string,scheme:a.default.string,address:a.default.string,
port:a.default.string},syncedRelations:{sources:{relationClass:u.default}}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(768),o=i(s),l=a.default.extend({name:"StoredConnectionSourceCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({
name:"StoredConnectionSourceModel",syncedAttrs:{id:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(409),o=i(s),l=a.default.extend({name:"StoredServerCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(771),o=i(s),l=a.default.extend({name:"AnnouncementCollection",
model:o.default,context:["server"],url:"api/announcements"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"AnnouncementModel",context:["server"],rootPropertyName:"Announcement",syncedAttrs:{id:a.default.integer,title:a.default.string,content:a.default.string,imageUrl:a.default.string,style:a.default.string,url:a.default.string,expireAt:a.default.string,notifyAt:a.default.string,
read:{type:a.default.boolean,save:!0}},markAsRead:function(){this.get("read")||this.save("read",!0)}});t.default=l,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(60),n(773)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:"/devices.xml",parse:function(e){return this.convert(e,"Device")},filterSyncDevices:function(t){var n=!(!t||!t.channel),i=t&&t.get("isPlaylist"),r=this.filter(function(e){var t=e.get("SyncList"),r=t&&t.version>=2,a=n&&e.get("isCloudSync"),s=i&&!r;return e.supports("sync-target")&&!a&&!s;
}),a=e.sortBy(r,function(e){return!e.get("isCloudSync")});return this.clone(a)},filterByProducts:function(t){var n=this.filter(function(n){return e.contains(t,n.get("product"))});return this.clone(n)},products:function r(){var r=this.map(function(e){return e.get("product")});return e.uniq(r)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45),n(413)],r=function(e,t,n,i){"use strict";var r=n.extend({whitelistedAttrs:["id","clientIdentifier","name","product","productVersion","platform","platformVersion","device","model","provides","screenResolution","screenDensity","lastSeenAt","SyncList"],
url:function(){return"/devices/"+this.id+".xml"},initialize:function(e,t){this.set("syncItems",new i([],{server:this.server,device:this}))},convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return t.parseInteger(i,"lastSeenAt"),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs),n.isCloudSync="cloudsync"===n.platform,n.provides?n.provides=n.provides.split(","):n.provides=[],n},supports:function(t){var n=this.get("provides");return e.indexOf(n,t)>-1}});return r;
}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(203),n(60),n(411)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:"/api/users",parse:function(e){return this.convert(e,"User")},filterByHome:function(){var t=new e(this);return t.filterBy(function(e){return e.get("home")}),t},filterByUnrestricted:function(){var t=new e(this);return t.filterBy(function(e){return!e.get("restricted")}),t},filterByServerShares:function(t){var n=new e(this);return n.filterBy(function(e){
var n=e.get("serverShares");return!!n.findWhere({machineIdentifier:t})}),n}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({url:"/api/home",whitelistedAttrs:["id","guestUserID","guestEnabled","name"],convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return t.parseInteger(i,"id"),t.parseBoolean(i,["guestEnabled"]),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs);
},getSaveParams:function(t,i){return e.isEmpty(t)?{guestEnabled:this.get("guestEnabled")?"1":"0"}:n.prototype.getSaveParams.apply(this,arguments)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(203),n(60),n(777)],r=function(e,t,n){"use strict";var i=t.extend({model:n,url:function(){return"/api/invites/"+this.subset},initialize:function(e,t){t||(t={}),this.subset=t.subset||"requests"},parse:function(e){return this.convert(e,"Invite")},filterByHome:function(){var t=new e(this);
return t.filterBy(function(e){return e.get("home")}),t},filterByFriends:function(){var t=new e(this);return t.filterBy(function(e){return!e.get("home")}),t}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(22),n(45)],r=function(e,t,n,i){"use strict";var r=i.extend({whitelistedAttrs:["id","friend","server","home","friendlyName","username","email","thumb","createdAt","Server"],urlRoot:"/api/invites/requests",url:function a(){var a;if(this.isNew())a=e.result(this,"urlRoot");else{
var t=this.pick("friend","server","home");e.each(e.keys(t),function(e){t[e]=t[e]?"1":"0"}),a=this.collection?e.result(this.collection,"url"):e.result(this,"urlRoot"),a=a.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.get("id")),a=n.join(a,t)}return a},convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);t.parseInteger(i,"createdAt"),t.parseBoolean(i,["friend","server","home"]),t.parseArray(i,"Server");var r=i.Server;return e.each(r,function(e){t.parseInteger(e,"numLibraries")}),i},parse:function(t){
var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(60),n(779)],r=function(e,t,n){"use strict";var i=t.extend({model:n,filterByOwned:function(e){var t=this.filter(function(e){return e.get("owned")});return this.clone(t)},filterByShared:function(e){var t=this.filter(function(e){return!e.get("owned")&&!e.get("pending")});return this.clone(t)},getLibraryCount:function(t){var n=this.where(t);return e.reduce(n,function(e,t){
return e+=t.get("numLibraries")},0)},getOwnedLibraryCount:function(){return this.getLibraryCount({owned:!0})},getSharedLibraryCount:function(){return this.getLibraryCount({owned:!1})},getActiveCount:function(){return this.reduce(function(e,t){return t.isActive()&&e++,e},0)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({whitelistedAttrs:["id","serverId","machineIdentifier","name","owned","admin","pending","lastSeenAt","invitedAt","acceptedAt","allLibraries","numLibraries","allowSync","allowCameraUpload","allowChannels","Section"],
urlRoot:function(){return"/api/servers/"+this.get("machineIdentifier")+"/shared_servers"},isActive:function(){return!(!this.get("numLibraries")&&!this.get("allLibraries"))},convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);i.SharedServer&&(i=i.SharedServer),t.parseInteger(i,["id","serverId","lastSeenAt","invitedAt","acceptedAt","numLibraries"]),t.parseBoolean(i,["owned","admin","pending","allLibraries","allowSync","allowCameraUpload","allowChannels"]),t.parseArray(i,"Section");var r=i.Section;
return e.each(r,function(e){t.parseInteger(e,"id"),t.parseBoolean(e,"shared")}),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs),!n.numLibraries&&n.Section.length&&(n.numLibraries=e.where(n.Section,{shared:!0}).length),n}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(60),n(781)],r=function(e,t){"use strict";var n=e.extend({model:t,url:"/pms/social/networks",parse:function(e){return this.convert(e,"Directory")}});return n}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({idAttribute:"key",whitelistedAttrs:["key","title","linked","maxLength"],convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return t.parseBoolean(i,["linked","maxLength"]),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"UserEntitlementModel",syncedAttrs:{id:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(784),o=i(s),l=a.default.extend({name:"UserFeatureCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({
name:"UserFeatureModel",syncedAttrs:{id:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(415),o=i(s),l=a.default.extend({name:"UserPlaylistItemCollection",context:["server","identifier","mediaTagPrefix","mediaTagVersion","containerKey","userPlaylistKey"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"UserProviderModel",syncedAttrs:{id:a.default.string,territory:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"UserRoleModel",syncedAttrs:{id:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(25),a=i(r),s=n(789),o=i(s),l=a.default.extend({name:"StoredUserCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(18),o=i(s),l=n(20),u=i(l),c=n(769),d=i(c),h=n(419),p=i(h),f=n(418),m=i(f),v=n(414),g=i(v),y=n(417),b=i(y),w=u.default.extend({name:"StoredUserModel",additionalRelations:["servers"],syncedAttrs:{id:o.default.integer,authToken:o.default.string,
username:o.default.string,email:o.default.string,title:o.default.string,thumb:o.default.string,pin:o.default.string,home:o.default.boolean,restricted:o.default.boolean,guest:o.default.boolean,hasAllEntitlements:o.default.boolean,lastPrimaryServerID:o.default.string},syncedRelations:{subscription:{relationClass:p.default},roles:{relationClass:m.default},entitlements:{relationClass:g.default},providers:{relationClass:b.default},servers:{relationClass:d.default}},copyFromUser:function(e){var t=this,n={};
a.default.each(this.syncedAttrs,function(t,i){n[i]=e.get(i)}),a.default.each(this.syncedRelations,function(n,i){if(!a.default.contains(t.additionalRelations,i)){var r=t.get(i),s=e.get(i);if(s){var o=s.toJSON();r.set(r.parse(o))}}}),this.set(n)},clearSensitiveAttributes:function(){this.unset("authToken"),this.unset("pin"),this.get("servers").reset()}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(10),o=n(104),l=i(o),u=n(8),c=i(u),d=n(54),h=i(d),p=l.default.extend({
initialize:function(){this.viewFor=this.viewFor.bind(this)},viewFor:function(e,t){var n=this.viewsByType[e];if(n)return new n(t);throw new Error("No view defined for "+e)},login:function(){var e=this,t=(0,s.resolve)("appModel"),n=t.get("servers"),i=n.findWhere({cloud:!0});c.default.trigger("show:loading"),i.populate().done(function(){c.default.trigger("navigate","dashboard")}).fail(function(){var t=i.get("available");if(t!==!0&&t!==!1)return void e.listenToOnce(i,"change:available",e.login);var n=t?e.viewFor("signIn"):e.viewFor("unavailable",{
model:i});c.default.trigger("show:view",n)})},error:function(){c.default.trigger("show:view",this.viewFor("notFound",{type:"404"}))},unauthorized:function(e){var t=this,n=a.default.some(this.getUnauthorizedHandlers(),function(n){return n.call(t,e)});n||c.default.trigger("show:view",this.viewFor("notFound",{type:"media"}))},getUnauthorizedHandlers:function(){return[this.handleLockState,this.handleAuthorized,this.handlePrimaryServer,this.handleServer,this.handleChannelError]},handleLockState:function(e){
var t=(0,s.resolve)("appModel");return t.get("user").get("isLocked")},handleAuthorized:function(e){var t=(0,s.resolve)("appModel"),n=t.get("servers").findWhere({authorized:!0}),i=!n&&!t.get("skipSignIn");return i&&this.populateServersThenRecover(),i},handlePrimaryServer:function(e){var t=e.server,n=e.options;return!(t||!n.primaryServer)&&(c.default.trigger("show:view",this.viewFor("serverRequired")),!0)},handleServer:function(e){var t=e.server,n=e.options,i=this.viewFor,r=(0,s.resolve)("appModel"),a=r.get("cloudServer"),o=void 0,l=void 0;
return!(!n.serverID&&!n.primaryServer)&&(t?t.get("available")?t.get("authorized")||"resolved"!==a.populatePromise.state()?t.get("authorized")||(o=this.populateServersThenRecover()):l=i("unauthorized"):l=i("unavailable",{model:t}):l=i("notFound",{type:"server"}),l&&c.default.trigger("show:view",l),!(!l&&!o))},handleChannelError:function(e){var t=e.options,n=!!t.channelID;return n&&c.default.trigger("show:view",this.viewFor("channelError")),n},populateServersThenRecover:function(){var e=(0,s.resolve)("appModel"),t=e.get("skipSignIn"),n=e.get("servers"),i=n.findWhere({
cloud:!0}),r=this.viewFor;return n.populate().done(function(){var e=n.filter(function(e){return e.get("hasManualConnection")})[0];i.get("authorized")?c.default.trigger("navigate:refresh"):e?e.get("authorized")?c.default.trigger("navigate","dashboard"):c.default.trigger("show:view",r("unavailable",{model:e})):t?c.default.trigger("show:view",r("serverRequired")):c.default.trigger("navigate","login",{silent:!0})}).fail(function(){h.default.get("requiresSignIn")?c.default.trigger("show:view",r("unavailable",{
model:i})):c.default.trigger("show:view",r("serverRequired"))})}});t.default=p,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(37),n(10),n(8),n(105)],r=function(e,t,n,i,r){"use strict";var a=r.extend({initialize:function(){r.prototype.initialize.apply(this,arguments),this.listenTo(i,{"navigate:back":this.onNavigateBack,"navigate:forward":this.onNavigateForward,"navigate:refresh":this.onNavigateRefresh,"navigate:refresh:dashboard":this.onNavigateRefreshDashboard})},onNavigateBack:function(){
var t=n.resolve("appModel"),i=t.get("history"),r=t.get("forwardHistory");return i.length<2?this.navigate("",{trigger:!0}):(r.unshift(i.pop()),void this.navigate(e.last(i),{trigger:!0}))},onNavigateForward:function(){var e=n.resolve("appModel"),t=e.get("forwardHistory");t.length&&this.navigate(t[0],{trigger:!0})},onNavigateRefresh:function(){t.history.loadUrl(t.history.getFragment())}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=e.key,n=e.getModel,i=e.pages,a=void 0===i?1:i,s=e.reloadThreshold,l=void 0===s?4:s,c=(0,
u.default)(t),d="is"+c+"Pending",h="is"+c+"Populated",p=t?t+"Error":"error";return function(e,i){var s=i.startIndex,u=i.endIndex;(0,o.default)("number"==typeof s,"A startIndex must be provided when populating a page of items"),(0,o.default)("number"==typeof u,"An endIndex must be provided when populating a page of items");var c=u-s,f=n(e,i),m=t?f.get(t):f,v=f.sessionAttrs;(0,o.default)(v&&v.hasOwnProperty(d),f.name+" is missing a session attribute for "+d),(0,o.default)(v&&v.hasOwnProperty(h),f.name+" is missing a session attribute for "+h),
(0,o.default)(v&&v.hasOwnProperty(p),f.name+" is missing a session attribute for "+p),f.set(d,!0),m.populateRange({start:s,end:s+c*a+1,reloadThreshold:c*l}).done(function(){var e;f.set((e={},r(e,d,!1),r(e,h,!0),r(e,p,null),e))}).fail(function(e,t){var n;f.set((n={},r(n,d,!1),r(n,p,t),n))})}}var r=n(49).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(38),o=a(s),l=n(110),u=a(l);e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.key,n=e.getModel,i=(0,
u.default)(t),a="is"+i+"Pending",s="is"+i+"Populated",l=t?t+"Error":"error";return function(e,i){var u=i.count,c=n(e,i),d=t?c.get(t):c,h=c.sessionAttrs;(0,o.default)(h&&h.hasOwnProperty(a),c.name+" is missing a session attribute for "+a),(0,o.default)(h&&h.hasOwnProperty(s),c.name+" is missing a session attribute for "+s),(0,o.default)(h&&h.hasOwnProperty(l),c.name+" is missing a session attribute for "+l),c.set(a,!0),d.repopulateRange(u).done(function(){var e;c.set((e={},r(e,a,!1),r(e,s,!0),r(e,l,null),
e))}).fail(function(e,t){var n;c.set((n={},r(n,a,!1),r(n,l,t),n))})}}var r=n(49).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(38),o=a(s),l=n(110),u=a(l);e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){function r(){f===p&&(f=p.slice())}function a(){return t.getState()}function o(e){(0,l.default)("function"==typeof e,"Expected listener to be a function");var t=!0;return r(),f.push(e),function(){if(t){t=!1,r();var n=f.indexOf(e);f.splice(n,1);
}}}function u(e){(0,l.default)((0,s.default)(e),"Actions must be plain objects");var n=e.type,i=!1;return(0,l.default)(null!=n,'Actions must have a "type" property. Have you misspelled a constant?'),m.forEach(function(n){n(t,e,u)&&(i=!0)}),(0,l.default)(i,'The type "'+n+'" does not have a registered action handler'),e}function d(e){(0,l.default)(Array.isArray(e),"Action handlers must be contained within an array"),m=e}function h(){for(var e=p=f,t=0;t<e.length;t++)e[t]()}if((0,l.default)(Array.isArray(e),"Action handlers must be contained within an array"),
(0,l.default)(t instanceof c.default,"A store's model must extend `AbstractModel`"),n)return(0,l.default)("function"==typeof n,"Expected enhancer to be a function"),n(i)(e,t);var p=[],f=p,m=e;return t.on("statechange",h),{dispatch:u,subscribe:o,getState:a,replaceActionHandlers:d}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(283),s=r(a),o=n(38),l=r(o),u=n(20),c=r(u);e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,s.createSelector)((0,
l.default)(),function(e){return e?e.desktop.libraries:void 0})}function r(){return(0,s.createSelector)(c.default,i(),function(e,t){return t?t.map(function(t){return e[t]}):[]})}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(28),o=n(76),l=a(o),u=n(422),c=a(u);e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,a.createSelector)(function(e,t){var n=t.hubEntityID;return n},o.default,function(e,t){return t[e]})}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=i;var a=n(28),s=n(424),o=r(s);e.exports=t.default},function(e,t,n){var i,r,a=n(567).default;i=[n(3),n(29)],r=function(e,t){"use strict";function n(e){for(var t=a(null),n=0,i=e.length;n<i;n++)t[e[n]]=!0;return t}var i=t.extend({initialize:function(){this.pool=[],this.index={}},lockOrCreate:function(t,i,r){var a=n(t);e.each(t,function(t){if(!this.find(t)){var n=e.find(this.pool,function(e){return!a[e.id]},this);n||(n={},this.pool.push(n),n.view=i.call(r,n)),this.index[n.id]=void 0,
this.index[t]=n,n.id=t}},this)},each:function(t,n){e.each(this.pool,t,n)},filter:function(t,n){var i=e.partition(this.pool,t,n),r=i[0],a=i[1];e.each(a,function(e){e.view.close(),e.view.$el.remove()}),this.pool=r},find:function(e){var t=this.index[e];return t&&t.id===e?t:void 0},findByModel:function(t){return e.find(this.pool,function(e){return e.view.model===t})},close:function(){e.each(this.pool,function(e){e.view.close()}),this.pool=[],this.index={}},reindex:function(){var t=this.index={};e.each(this.pool,function(e){
t[e.id]=e})}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3)],r=function(e){"use strict";function t(t){var i=t.get("metadataList").getCollection(),r=i.length,a=t.get("viewGroup");if("Pictures"===a)return n.tileList;if("List"===a)return n.list;if(i.findWhere({type:"photo"}))return n.tileList;var s=e.compact(i.pluck("summary")),o=e.uniq(i.pluck("thumb")),l=i.reduce(function(e,t){var n=t.get("title");return n?e+n.length:e},0),u=l/r;return o.length>r/2&&u<30?n.tileList:s.length>r/2?n.detailsList:n.list;
}var n={tileList:"media-tile-list",detailsList:"media-details-list",list:"media-list"},i={types:n,getListType:t};return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="analyzing";t.ANALYZING=n;var i="thumbnailing";t.THUMBNAILING=i},function(e,t,n){"use strict";function i(e){var t=arguments.length<=1||void 0===arguments[1]?"HH:mm:ss":arguments[1];return e?(0,s.default)(e).format(t):""}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(65),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.limit;return e?("past"===n?e=Math.min(e,(0,s.default)().unix()):"future"===n&&(e=Math.max(e,(0,s.default)().add(1,"second").unix())),s.default.unix(e).fromNow()):""}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(143),a=i(r);t.formatDate=a.default;var s=n(433),o=i(s);t.formatDays=o.default;var l=n(434),u=i(l);t.formatDaysHours=u.default;var c=n(218),d=i(c);t.formatDuration=d.default;var h=n(144),p=i(h);t.formatHoursMinutes=p.default;var f=n(435),m=i(f);t.formatMinutes=m.default;var v=n(171),g=i(v);t.formatMinutesLeft=g.default;var y=n(106),b=i(y);t.formatPlayerTime=b.default;var w=n(130),S=i(w);t.formatTimeAgo=S.default;var P=n(436),x=i(P);t.formatTimestamp=x.default;
var C=n(800),T=i(C);t.formatTime=T.default},function(e,t,n){"use strict";function i(e){return function(t,n,i){var a=i.value;return i.value=(0,r.after)(e,a),i}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(3);e.exports=t.default},function(e,t,n){"use strict";function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,i){var a=i.value;return i.value=r.compose.apply(void 0,[a].concat(t)),i}}Object.defineProperty(t,"__esModule",{value:!0
}),t.default=i;var r=n(3);e.exports=t.default},function(e,t,n){"use strict";function i(e){return function(t,n,i){var a=i.value;return i.value=(0,r.debounce)(a,e),i}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(3);e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){var i=n.value;return n.value=(0,r.memoize)(i),n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(3);e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){var i=n.value;
return n.value=s.default.once(i),n}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(3),s=r(a);e.exports=t.default},function(e,t){"use strict";function n(e){return e.join(", ")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(436),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t,n){
"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(288),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(289),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(295),a=i(r),s=n(67),o=i(s);t.default=(0,
o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(465),a=i(r),s=n(67),o=i(s);t.default=(0,o.default)(a.default),e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),a=n(67),s=i(a);t.default=(0,s.default)(r.getLastSegment),e.exports=t.default},,,,function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(29),a=i(r),s=n(8),o=i(s),l=n(50),u=i(l),c=n(56),d=i(c),h=a.default.extend({mixins:u.default,name:"AbstractReporter",enabled:!1,destroyed:!1,_suspended:!1,initialize:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];e.enabled!==!1&&this.enable()},hasSupport:function(){return!0},enable:function(){this.enabled||this.destroyed||!this.hasSupport()||(this.enabled=!0,this.listenTo(o.default,{"log:message":this.onLog,"log:group":this.onLog,"log:groupCollapsed":this.onLog,
"log:groupEnd":this.onLog}),this.onEnabled())},disable:function(){this.enabled&&(this.enabled=!1,this.stopListening(),this.onDisabled())},destroy:function(){this.destroyed||(this.disable(),this.destroyed=!0,this.onDestroyed())},_suspend:function(){this._suspended||(this._suspended=!0,this.onSuspended())},_resume:function(){this._suspended&&(this._suspended=!1,this.onResumed())},onLog:function(e){if(this._suspended)return void(d.default.hasConsole&&console.warn("[Logging] Ignored log reentrancy:",JSON.stringify(e)));
switch(this._suspend(),e.type){case"log:message":this.onLogMessage(e);break;case"log:group":this.onLogGroup(e);break;case"log:groupCollapsed":this.onLogGroupCollapsed(e);break;case"log:groupEnd":this.onLogGroupEnd(e)}this._resume()},onLogMessage:function(){},onLogGroup:function(){},onLogGroupCollapsed:function(){this.onLogGroup.apply(this,arguments)},onLogGroupEnd:function(){},onEnabled:function(){},onDisabled:function(){},onResumed:function(){},onSuspended:function(){},onDestroyed:function(){}});
t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=n(49).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a,s=n(818),o=r(s),l=n(56),u=r(l),c=n(26),d=r(c),h=(a={},i(a,d.default.LEVEL_LOG,{method:"log",color:"black"}),i(a,d.default.LEVEL_DEBUG,{method:"debug",color:"#d500ff"}),i(a,d.default.LEVEL_INFO,{method:"info",color:"blue"}),i(a,d.default.LEVEL_WARN,{method:"warn",color:"#ff6600"}),i(a,d.default.LEVEL_ERROR,{method:"error",color:"red"}),a);t.config=h;
var p=o.default.extend({name:"ConsoleReporter",hasSupport:function(){return u.default.hasConsole},onLogMessage:function(e){var t=e.message,n=h[e.level],i=console[n&&n.method]||console.log;n&&n.color?i.call(console,"%c"+t,"color: "+n.color+";"):i.call(console,t)},onLogGroup:function(e){var t=console.group||console.log;t.call(console,e.message)},onLogGroupCollapsed:function(e){var t=console.groupCollapsed||console.log;t.call(console,e.message)},onLogGroupEnd:function(){console.groupEnd&&console.groupEnd();
}});t.default=p},function(e,t){"use strict";function n(e,t,n){var i=n;if(e.Part.length>1)for(var r=0,a=e.Part.length;r<a;r++){var s=e.Part[r];if(!s.duration)break;if(t.key===s.key)break;i+=s.duration}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.Part.length:0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(e.indexes){var n=e.indexes.split(",");
if(n.length)return s.default.indexOf(n,t)>-1?t:n[0]}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.seasonPrefix||"S{1}",n=e.seasonIndex;return n>1e3?n:(e.noLeadingZero||(n=(0,l.default)(n)),(0,s.default)(t,n))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=r(a),o=n(291),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){
var t=e?s.default.first(e.get("Media")):null;return!(!t||t.container)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(!t)return s.default.Deferred().resolve().promise();(0,l.default)("[playMedia] ping transcoder");var n=e.supports("universalTranscoder")?"/video/:/transcode/universal/ping?session="+t:"/video/:/transcode/segmented/ping?session="+t;return s.default.ajax(e.getXHROptions(n));
}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o=n(26),l=r(o);i.DELAY=3e4,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){if(!t)return l.default.Deferred().resolve().promise();(0,c.default)("[playMedia] stop transcoder");var i=e.supports("universalTranscoder")?"/video/:/transcode/universal/stop?session="+t:"/video/:/transcode/segmented/stop?session="+t;return n=s.default.extend(e.getXHROptions(i),n),l.default.ajax(n)}var r=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(26),c=r(u);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=e.playQueueItem,i=e.metadataItem,r=e.media,a=e.part,s=i.get("ratingKey"),l=i.get("type");if(!s)return u.default.Deferred().resolve().promise();var c={ratingKey:s,key:i.get("key"),state:e.state};if(e.continuing&&(c.continuing="1"),n.get("playQueueItemID")&&(c.playQueueItemID=n.get("playQueueItemID")),!("photo"===l||r&&a))return u.default.Deferred().resolve().promise();
if("photo"!==l){var h=i.get("viewOffset")||0,f=r.duration;if(o.default.isNumber(e.position)&&(h=e.position,h=(0,m.default)(r,a,h)),f||o.default.isNumber(e.duration)&&(f=e.duration,r.duration=f),!f)return u.default.Deferred().resolve().promise();h>f&&(h=f),c.time=h,c.duration=f,(0,g.default)(i,h,f)}var v="[Timeline] "+c.state;null!=c.time&&(v+=", "+c.time+"/"+c.duration),(0,p.default)(v);var y=d.join("/:/timeline",c);return t=o.default.extend(i.server.getXHROptions(y),t),e.playbackSessionID&&(t.headers["X-Plex-Session-Identifier"]=e.playbackSessionID),
u.default.ajax(t)}var r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(5),u=r(l),c=n(22),d=a(c),h=n(26),p=r(h),f=n(820),m=r(f),v=n(287),g=r(v);i.DELAY=1e4,t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){u+=1;var t=s.default.extend({},e.attributes,{playQueueItemID:u}),n=new l.default(t,{server:e.server,parent:e.parent,parse:!0});return n}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(207),l=r(o),u=0;
t.default=i,e.exports=t.default},function(e,t){"use strict";function n(e){var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,t)).toFixed(2)+" "+i[t]}Object.defineProperty(t,"__esModule",{value:!0});var i=["B","KB","MB","GB","TB"];t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e=parseInt(e,10),(e/10).toFixed(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e){
return e instanceof s.default.Collection?e:e.getCollection?e.getCollection():e.has("childrenKey")?e.get("children").getCollection():void 0}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(37),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(288),a=i(r);t.formatAudioChannels=a.default;var s=n(289),o=i(s);t.formatAudioCodec=o.default;var l=n(290),u=i(l);t.formatBitrate=u.default;
var c=n(829),d=i(c);t.formatBytes=d.default;var h=n(221),p=i(h);t.formatResolution=p.default;var f=n(454),m=i(f);t.formatStreamLanguage=m.default;var v=n(830),g=i(v);t.formatVideoLevel=g.default;var y=n(455),b=i(y);t.formatVideoQuality=b.default;var w=n(220),S=i(w);t.createImageTranscodeUrl=S.default},function(e,t){"use strict";function n(e){return e>=5&&e<9}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.get("type"),n="channelDirectory"===t,i=n||t&&"directory"===s.default.get(t).element||e.get("isFolder"),r=void 0===e.length;
return r&&!i}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(39),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=t.itemDecision,i=s.default.pick(t,"shuffle","unwatched","continuous","items","excludeSeedItem"),r="movie"===e.get("type")&&!e.get("viewOffset");return r&&t.supportsContinuous&&(i.extrasPrefixCount=l.default.get("extrasPrefixCount")),n.toPlay&&(i.firstItem=n.toPlay),i}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),s=r(a),o=n(31),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=s.default.Deferred(),i=e.server.get("playQueueManager"),r=i.getFor(t.itemDecision.toPlay||t.itemDecision.toAdd),a=(0,l.default)(e,t);return a.model=r.get("selectedItem"),a.playQueue=r,n.resolve(a).promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o=n(292),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){
var n=t.itemDecision,i=e.server.get("playQueueManager"),r=i.getFor(n.toPlay||n.toAdd);return r&&r.get("hasUserAdditions")?t.confirmClearPlayQueue():s.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=s.default.Deferred();if(t.siblings&&e.collection){var i=e.playlist||e.collection;return n.resolve({toPlay:e,toAdd:i}).promise()}var r=e.get("type"),a="show"===r,o="season"===r;
return t.unwatched&&(a||o)?!function(){var t=a?e:new l.default({key:e.get("parentKey")},{server:e.server}),i=t.populate({data:{includeOnDeck:"1"}});i.then(function(){var i=t.get("onDeck"),r=i&&a,s=i&&o&&i.get("parentRatingKey")===e.id;r||s?n.resolve({toPlay:i,toAdd:e}):n.resolve({toAdd:e})}),i.fail(n.reject)}():n.resolve({toAdd:e}),n.promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o=n(55),l=r(o);t.default=i,e.exports=t.default},function(e,t,n){"use strict";
function i(e){return e.get("isUserPlaylist")?"video":e.get("isPlaylist")?e.get("playlistType"):e.get("isMetadataList")?s.default.getChildMediaType(e.get("firstItemType")).element:s.default.getChildMediaType(e.get("type")).element}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(39),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(t.playQueue)return s.default.Deferred().resolve(t.playQueue).promise();var n=t.itemDecision,i=e.server.get("playQueueManager").createFor(n.toAdd,n.toPlay);
if(!i){var r="Couldn't create play queue";return l.default.warn("[PlayMedia]",r),(0,c.default)(),s.default.Deferred().reject(r).promise()}var a=i.addContent(n.toAdd,(0,h.default)(e,t)).then(function(){if(i.get("collection").length)return i;var e=i.get("message");return s.default.Deferred().reject("Couldn't queue item; empty play queue. "+e).promise()});return a.fail(function(e){l.default.warn("[PlayMedia]",e),(0,c.default)()}),a}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o=n(26),l=r(o),u=n(458),c=r(u),d=n(835),h=r(d);
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return(0,f.default)(e,t)?t.isFromCompanion?(0,v.default)(e,t):(c.default.warn("[PlayMedia] Ignoring playback command for currently playing item"),l.default.Deferred().reject({silent:!0}).promise()):(0,y.default)(e,t).done(function(){t.notify(s.default.extend({loading:!0},(0,w.default)(e,t)))}).then(function(){return(0,P.default)(e,t)}).then(function(n){return t.playQueue=n,(0,w.default)(e,t)}).done(function(){h.default.execute("persistPlayQueue",null);
})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(3),s=r(a),o=n(5),l=r(o),u=n(26),c=r(u),d=n(13),h=r(d),p=n(842),f=r(p),m=n(836),v=r(m),g=n(837),y=r(g),b=n(292),w=r(b),S=n(840),P=r(S);e.exports=t.default},function(e,t){"use strict";function n(e,t){var n=t.itemDecision,i=e.server.get("playQueueManager"),r=i.getFor(n.toPlay||n.toAdd);return r&&r.get("selectedItem")&&r.get("selectedItem").get("key")===e.get("key")}Object.defineProperty(t,"__esModule",{value:!0
}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e.controller}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(29),n(82),n(845),n(26),n(50),n(762)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=n.extend({mixins:s,warningThreshold:2e3,networkReasonThreshold:3e3,startDelay:1e4,syncDelay:500,resyncDelay:1e4,reasons:{TRANSCODER:"transcoder",NETWORK:"network",UNKNOWN:"unknown"},recommendations:{
LOWER_QUALITY:"lowerQuality",ORIGINAL_QUALITY:"originalQuality",NONE:"none"},initialize:function(t){e.bindAll(this,"onSyncCheck"),t||(t={}),this.warningThreshold=t.warningThreshold||this.warningThreshold,this.startDelay=t.startDelay||this.startDelay,this.syncDelay=t.syncDelay||this.syncDelay,this.resyncDelay=t.resyncDelay||this.resyncDelay,this._clock=new r,this.setModel(t.model)},setModel:function(e){this.model=e},start:function(){this._hasWarned=!1,this._startedAt=this._clock.now(),this._clock.setPosition(this.model.get("position")),
this.listenTo(this.model,{"change:state":this.onStateChange,"change:position":this.onPositionChange})},stop:function(){this._cancelSyncCheck(),this.stopListening(),this._startedAt=null,this._resyncedAt=null},seek:function(e){this._startedAt=this._clock.now(),this._cancelSyncCheck(),this._clock.pause()},determineReason:function(){var n=t.Deferred(),i=this.determineReasonFromBuffer(),r=this.fetchTranscodeSession();return r.done(e.bind(function(e){var t=this.determineReasonFromTranscode(e);t===this.reasons.UNKNOWN&&(t=i),
n.resolve(t)},this)),r.fail(e.bind(function(){n.resolve(i)},this)),n.promise()},determineReasonFromTranscode:function(e){return!e.get("throttled")&&e.get("speed")<1?this.reasons.TRANSCODER:this.reasons.UNKNOWN},determineReasonFromBuffer:function(){var e=this.model.get("position"),t=this.model.get("endBuffer");return t&&t-e<this.networkReasonThreshold?this.reasons.NETWORK:this.reasons.UNKNOWN},fetchTranscodeSession:function(){if(this.model.get("directPlay"))return t.Deferred().reject().promise();var e=this.model.get("transcodeSessionID"),n=this.model.get("transcodeServer"),i=new o({
key:e},{server:n});return i.fetch()},determineRecommendation:function(t){var n,r=this.model.get("qualityIndex");if(t===this.reasons.TRANSCODER)r>=0&&(n=this.recommendations.ORIGINAL_QUALITY);else if(t===this.reasons.NETWORK){var a=this.model.get("transcodeServer"),s=this.model.get("media"),o=i.getAvailableQualitiesFor(s,a);if(o.length&&this.model.get("canSetQuality")){var l=e.reduce(o,function(e,t){return e&&e.index<t.index?e:t});(r<0||r>l.index)&&(n=this.recommendations.LOWER_QUALITY)}}return n?n:this.recommendations.NONE;
},_scheduleSyncCheck:function(){this._syncChecker||(this._syncChecker=setTimeout(this.onSyncCheck,this.syncDelay))},_cancelSyncCheck:function(){this._syncChecker=clearTimeout(this._syncChecker)},_shouldPlayClock:function(){return this.model.get("playing")||this.model.get("buffering")},onStateChange:function(e,t){this._shouldPlayClock()||(this._cancelSyncCheck(),this._clock.pause(),this._clock.setPosition(e.get("position")))},onPositionChange:function(e,t){this._shouldPlayClock()&&(this._clock.play(),
this._scheduleSyncCheck())},onSyncCheck:function(){var t=this._clock,n=t.now(),i=t.getPosition(),r=this.model.get("position"),s=i-r;this._startedAt+this.startDelay>n?t.setPosition(r):s>this.warningThreshold?(t.setPosition(r),this.model.get("buffering")||this.trigger("buffering"),this._hasWarned||(this._hasWarned=!0,this.determineReason().done(e.bind(function(e){a.warn("Player: Excessive buffering detected; "+e),this.trigger("warn",{reason:e,recommendation:this.determineRecommendation(e)})},this)))):this._resyncedAt?n-this._resyncedAt>this.resyncDelay&&(this._resyncedAt=null,
t.setPosition(r)):this._resyncedAt=n,this._syncChecker=null,this._scheduleSyncCheck()}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(29)],r=function(e,t){"use strict";var n=t.extend({_position:0,_timestamp:null,now:function(){return e.now()},play:function(){null==this._timestamp&&(this._timestamp=this.now())},pause:function(){this._position=this.getPosition(),this._timestamp=null},getPosition:function(){return null!=this._timestamp?this.now()-this._timestamp+this._position:this._position;
},setPosition:function(e){this._position=e,null!=this._timestamp&&(this._timestamp=this.now())}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(293)],r=function(e,t){"use strict";var n=e.extend({},t,{type:"music",qualities:{bitrate:[96,128,192,320]},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(6),n(293)],r=function(e,t,n){"use strict";
var i=e.extend({},n,{type:"photo",qualities:{photoResolution:["720x480","1280x720","1920x1080","3840x2160"],photoQuality:[24,49,74,99],title:function(){return[t("Low"),t("Medium"),t("High"),t("Highest")]}},getNearestIndexToQuality:function(e){return this.getNearestIndex(this.qualities.photoQuality,e)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=s.default.Deferred();return e.then(t.resolve,t.reject,t.notify),{promise:t.promise(),cancel:function(){
t.reject({isCanceled:!0})}}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){if(!e.length)return l.default.Deferred().reject().promise();var t=l.default.Deferred(),n=e.length;return s.default.each(e,function(e){e.done(function(){n--,t.resolveWith(this,arguments)}).fail(function(){n--,0===n&&t.reject()})}),t.promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o);
t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(29),n(56),n(111),n(35),n(50),n(13),n(102),n(69)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=i.extend({lastModified:null,eTag:null,mixins:o,url:function h(){var e=n.resolve("appModel"),t=e.get("user"),i="/sub/"+this.requestType+"/"+t.id+"/"+e.get("clientID"),r=new u({scheme:"websockets"===this.requestType?"wss":"https",address:"pubsub.plex.tv"}),h=this.server.resolveUrl(i,{connection:r,appendToken:!0});return h;
},initialize:function(t){e.bindAll(this,"onSocketOpen","onSocketClose","onSocketError","onSocketMessage","onPollSuccess","onPollError"),this.server=t.server},open:function(){return(this.socket||this.pollRequest)&&this.close(),r.hasWebSocket?(this._deferred=t.Deferred(),this.requestType="websockets",this.socket=new WebSocket(e.result(this,"url")),this.socket.onopen=this.onSocketOpen,this.socket.onclose=this.onSocketClose,this.socket.onerror=this.onSocketError,this.socket.onmessage=this.onSocketMessage,
this._deferred.promise()):this.poll()},close:function(){this.pollRequest&&(a.abort(this.pollRequest.rid),this.pollRequest=null),this._deferred&&"pending"===this._deferred.state()&&this._deferred.reject(),this.socket&&(this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close(),this.socket=null)},poll:function(){this.requestType="longpolling",this.pollUrl=e.result(this,"url");var n=this.server.getXHROptions(this.pollUrl);return n.headers["If-Modified-Since"]=this.lastModified?this.lastModified:"Thu, 01 Jan 1970 00:00:00 GMT",
this.eTag&&(n.headers["If-None-Match"]=this.eTag),this.pollRequest=t.ajax(n).done(this.onPollSuccess).fail(this.onPollError),this.pollRequest.promise()},handleResponse:function(t){if(t){var n=s.parseXML(t);if(e.isObject(n)){var i=this[n.command];e.isFunction(i)&&i.call(this,n)}}},relayStarted:function(e){var t=n.resolve("appModel"),i=t.get("servers"),r=i.get(e.clientIdentifier);r&&r.addConnection({address:e.host,port:e.port,accessToken:r.get("accessToken"),relay:!0})},addUnclaimedServer:function(t){
var i=n.resolve("appModel"),a=new c({},{parent:i}),s=e.isArray(t.Device.Connection)?t.Device.Connection:[t.Device.Connection];e.each(s,function(e){var t=e.uri,n=e.port,i=e.address,r=e.protocol;a.addConnection({uri:t,port:n,address:i,scheme:r,sources:[{id:this.server.id}]})},this),r.isHostedHttps&&!a.get("isSecure")?l.execute("showClaimServerAlertBar",a):i.get("servers").add(a)},onSocketOpen:function(e){this.trigger("open",this.server,e),this._deferred.resolve(this.server,e)},onSocketClose:function(e){
this.close(),this.trigger("close",this.server,e),this._deferred.reject(this.server,e)},onSocketError:function(e){this.close(),this.trigger("error",this.server,e),this._deferred.reject(this.server,e)},onSocketMessage:function(e){this.handleResponse(e.data)},onPollSuccess:function(e,t,n){this.trigger("open",this.server,e),this.lastModified=n.getResponseHeader("Last-Modified"),this.eTag=n.getResponseHeader("ETag"),this.handleResponse(e),this.poll()},onPollError:function(e){this.pollRequest.aborting||this.trigger("error",this.server,e);
}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t={};for(var n in e){var i=e[n];t[i]={relationClass:l.default}}return s.default.extend({sessionRelations:t})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(20),s=r(a),o=n(708),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return(0,h.default)(e)?r(e,t):c.default.isArray(e)?a(e,t):e===t}function r(e,t){for(var n=e.possibleEntityContainers,r=n?n.length:0,a=0;a<r;a++){
var s=n[a],o=e[s];if(i(o,t))return!0}return!1}function a(e,t){for(var n=0,r=e.length;n<r;n++){var a=e[n];if(i(a,t))return!0}return!1}function s(e){for(var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=null!=t.budget?t.budget:m,r=(0,f.default)(),a=e.entities,s=o(a),l=s.length,u={};++v<l;){var c=s[v],d=a[c],h=o(d),p=h.length;for(g+1>=p&&v+1>=l&&(v=-1);++g<p;){var y=h[g];if(i(e,y)||(u[c]||(u[c]=[]),u[c].push(y)),(0,f.default)()-r>=n)return v--,u}g=-1}return v=-1,u}var o=n(89).default,l=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var u=n(3),c=l(u),d=n(283),h=l(d),p=n(459),f=l(p),m=1e3/60,v=-1,g=-1;e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.toLowerCase():""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){return e?e.charAt(0).toLowerCase()+e.slice(1):""}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){
var t=e.toUpperCase(),n=t.match(/(\d{4})S/);if(n){var i=n[1];t=t.replace(i+"S",i+"s")}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={encode:function(e){for(var t="",n=0,i=0;i<e.length;i++){var r=e.charCodeAt(i);r<128||(r<2048?(i>n&&(t+=e.substring(n,i)),n=i+1,t+=String.fromCharCode(192|r>>>6),t+=String.fromCharCode(128|63&r)):(i>n&&(t+=e.substring(n,i)),n=i+1,t+=String.fromCharCode(224|r>>>12),
t+=String.fromCharCode(128|r>>>6&63),t+=String.fromCharCode(128|63&r)))}return n>0&&n<e.length&&(t+=e.substring(n)),0===n?e:t}};t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){for(var t="",n=0,i=e.length;n<i;n++){var r=e.charAt(n),a=r.toUpperCase();t+=0===n?a:r===a?" "+a:r}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(296),a=i(r);
t.escapeRegExp=a.default;var s=n(175),o=i(s);t.pluralize=o.default;var l=n(297),u=i(l);t.random=u.default;var c=n(861),d=i(c);t.toStableJSON=d.default;var h=n(462),p=i(h);t.formatActionType=p.default;var f=n(463),m=i(f);t.formatBoolean=m.default;var v=n(857),g=i(v);t.formatPropertyLabel=g.default;var y=n(853),b=i(y);t.toLowerCase=b.default;var w=n(854),S=i(w);t.toLowerCaseFirstLetter=S.default;var P=n(460),x=i(P);t.toTitleCase=x.default;var C=n(295),T=i(C);t.toUpperCase=T.default;var _=n(110),E=i(_);
t.toUpperCaseFirstLetter=E.default;var k=n(461),I=i(k);t.base64=I.default;var A=n(856),M=i(A);t.utf8=M.default;var D=n(298),R=i(D);t.truncate=R.default;var O=n(465),L=i(O);t.truncateFilename=L.default;var N=n(299),U=i(N);t.truncateMiddle=U.default},function(e,t){"use strict";function n(e){return e?e.match(/^[^A-Z]+|[A-Z]+(?![^A-Z])|[A-Z][^A-Z]+/g)||[]:[]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e?(0,s.default)("<p>"+e+"<p>").text():"";
}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=s.default.keys(e).sort();return JSON.stringify(s.default.reduce(t,function(t,n){return t[n]=e[n],t},{}))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a);t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(298),n(39)],r=function(e,t,n){"use strict";function i(i){function r(n){var r=e.escape(t(n.tag,i.maxLen));
if(!l||!n.id)return r;var a=["#!/server/"+encodeURIComponent(o.server.id),"/section/"+encodeURIComponent(o.id),"/filter","/"+encodeURIComponent(u.id),"/"+encodeURIComponent(i.key),"/"+encodeURIComponent(n.id),"/"+encodeURIComponent(n.tag)];return'<a class="pivot-link" href="'+a.join("")+'">'+r+"</a>"}var a=e.reject(i.tags,function(e){return!e.tag}),s=i.model,o=s.section,l=o&&o.get("allowAdvancedFilters"),u=n.get(s.get("type")),c=i.separator||", ",d="";if(a&&a.length){var h=i.maxTags||a.length;h>a.length&&(h=a.length);
for(var p=0;p<h;p++)d+=r(a[p]),p+1<h&&(d+=c)}return d}return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(9),n(466),n(797)],r=function(e,t,n,i){"use strict";var r=t.View.extend({constructor:function(){t.View.prototype.constructor.apply(this,arguments)},initialize:function(){t.View.prototype.initialize.apply(this,arguments),this.pool=new i(this)},render:function(){this.isRendered||this.triggerMethod("before:render",this),this.isRendered=!0;var e=this.getLockIndexes();
this.pool.lockOrCreate(e,this.createCellView,this),this.scheduleFilling(e),this.prepareCells(e),this.pool.each(this.moveCell,this),this.moveElement(),this.clearVisibleReusedCells()},createCellView:function(n){var i=t.getOption(this,"itemView"),r=t.getOption(this,"itemViewOptions");e.isFunction(r)&&(r=r.call(this,n));var a=new i(r);return a._parentView=this,a.render(),this.$el.append(a.$el),a},scheduleFilling:function(t){n.cancel(this.cid),e.each(t,function(e){var t=this.pool.find(e);t.filledWithIndex!==t.id&&n.enqueue(function(){
var e=this.fillCell(t);return e&&(t.filledWithIndex=t.id),e},this,this.cid)},this)},prepareCells:function(){this.pool.each(this.prepareCell,this)},clearVisibleReusedCells:function(){var e=this.getVisibleBounds();this.pool.each(function(t){var n=t.filledWithIndex===t.id,i=t.filledWithIndex===-1,r=t.id>=e.from&&t.id<=e.to;!r||n||i||(this.clearCell(t),t.filledWithIndex=-1)},this)},_getImmediateChildren:function(){return e.pluck(this.pool.pool,"view")},onClose:function(){n.cancel(this.cid),this.pool.close();
}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1649),a=i(r),s=n(3),o=i(s),l=n(9),u=i(l),c=n(703),d=i(c),h=u.default.ItemView.extend({mixins:[d.default],className:"video-subtitles-renderer",template:a.default,initialize:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=o.default.extend(e,{element:this.el})},onRender:function(){this.createASSRenderer(this.options);
},onClose:function(){this.closeASSRenderer()}});t.default=h,e.exports=t.default},function(e,t,n){var i,r;i=[n(1650),n(3),n(5),n(9),n(78)],r=function(e,t,n,i,r){"use strict";var a=i.ItemView.extend({className:"video-image-overlay",template:e,initialize:function(e){this.videoAspectRatio=e.videoAspectRatio,this.overscan=e.overscan,this.throttledSetStyles=t.throttle(this.whenRendered(this.setStyles),100),this.image=new r({model:this.model,modelAttribute:"key",width:this.model.get("width"),height:this.model.get("height"),
background:!0}),this.setStyles(),"video"===this.model.get("relative")&&n(window).on("resize",this.throttledSetStyles)},setStyles:function(){if("video"===this.model.get("relative")&&!this.videoAspectRatio)return void this.$el.addClass("hidden");var e=this.model.get("alignHorizontal"),t=this.model.get("alignVertical"),n=this.model.get("width"),i=this.model.get("height"),r=0,a=0,s=this.getOffset(),o={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto",backgroundSize:n+"px "+i+"px",
backgroundRepeat:"no-repeat",width:n,height:i};"center"===e?(o.left="50%",r="-50%"):"left"===e?o.left=s.x:"right"===e&&(o.right=s.x),"middle"===t?(o.top="50%",a="-50%"):"top"===t?o.top=s.y:"bottom"===t&&(o.bottom=s.y),o.transform="translate("+r+", "+a+")",o.marginTop=this.model.get("marginTop")||0,o.marginRight=this.model.get("marginRight")||0,o.marginBottom=this.model.get("marginBottom")||0,o.marginLeft=this.model.get("marginLeft")||0,this.$el.css(o),this.$el.removeClass("hidden")},getOffset:function(){
var e={x:0,y:0};if("video"===this.model.get("relative")){var t=n(window).width(),i=n(window).height(),r=t/i;if(this.videoAspectRatio>r){var a=t/this.videoAspectRatio;e.y=(i-a)/2}else{var s=i*this.videoAspectRatio;e.x=(t-s)/2}}return this.overscan&&(e.x+=this.overscan.x,e.y+=this.overscan.y),e},onRender:function(){this.image.setElement(this.$el)},onClose:function(){n(window).off("resize",this.throttledSetStyles),this.image.close()}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1651),n(3),n(5),n(9),n(401),n(865)],r=function(e,t,n,i,r,a){"use strict";var s=i.CompositeView.extend({className:"video-image-overlays-container",template:e,itemView:a,itemViewContainer:".video-player-image-overlays",itemViewOptions:function(){return{videoAspectRatio:this.getVideoAspectRatio(),overscan:this.overscan}},modelEvents:{"change:media":"onMediaChange","change:videoDimensions":"onVideoDimensionsChange"},overscan:null,initialize:function(e){e||(e={}),this.overscan=e.overscan||this.overscan,
this.collection=new r,this.populateCollection()},populateCollection:function(){var e=this.model.get("metadataItem"),t=e&&e.get("overlays");t?this.collection.reset(t.models):this.collection.reset()},getVideoAspectRatio:function(){var e=this.model.get("videoDimensions");if(e)return e.width/e.height},onMediaChange:function(e,t){this.populateCollection()},onVideoDimensionsChange:function(e,t){var n=this.getVideoAspectRatio();n&&this.children.each(function(e){var t=e.model;"video"===t.get("relative")&&(e.videoAspectRatio=n,
e.setStyles())})}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(6),n(146)],r=function(e,t){"use strict";var n=t.extend({serializeData:function(){return{title:e("This channel is not responding.")}}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(146)],r=function(e){"use strict";var t=e.extend({initialize:function(e){this.title=e.title,this.subtitle=e.subtitle,this.message=e.message},serializeData:function(){return{title:this.title,
subtitle:this.subtitle,message:this.message}}});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(6),n(146)],r=function(e,t){"use strict";var n=t.extend({initialize:function(e){this.type=e.type||"404"},serializeData:function(){var t,n;return"404"===this.type?(t=e("You must be lost."),n=e("This page doesn't exist.")):"server"===this.type?(t=e("Media server not found."),n=e("The server you're trying to access doesn't seem to exist.")):(t=e("Media not found."),n=e("The media you're trying to access doesn't seem to exist.")),
{title:t,subtitle:n}}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(146)],r=function(e){"use strict";var t=e.extend({});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(6),n(146)],r=function(e,t){"use strict";var n=t.extend({serializeData:function(){return{title:e("No soup for you!"),subtitle:e("The server you're trying to access doesn't want to let you in. Make sure you're signed in as a user with access to this server.")}}});return n;
}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(6),n(8),n(146)],r=function(e,t,n,i){"use strict";var r=i.extend({modelEvents:{"change:isResolved":"onResolvedChange"},serializeData:function(){var n,i,r=this.model,a=r.get("friendlyName");return r.get("cloud")?r.get("isDownForMaintenance")?(n=t("Plex is down for maintenance."),i=t("Don't worry, it'll be back soon.")):(n=t("Plex is not reachable."),i=t("Make sure your server has an internet connection and any firewalls or other programs are set to allow access.")):(n=t("Server unavailable."),
i=a?t("We couldn't reach \"{1}\". Make sure it's online and try again.",e.escape(a)):t("We couldn't reach this server. Make sure it's online and try again.")),{title:n,subtitle:i}},onResolvedChange:function(e,t){t&&n.trigger("navigate:refresh")}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(){function e(){var e=void 0;return n.length?e=n.shift():(e=t+a,a++),e}var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],n=[],i={},r={},a=0;return{getKeys:function(t,a,o,l,u){
void 0===l&&(l=0),s.default.each(i,function(e,i){var c=e.item;if(null===c)n.push(i);else{var d=s.default.isString(c)?c:c[u],h=o.indexOf(c)+l;(h<t||h>a)&&(n.push(i),delete r[d])}});for(var c=t;c<=a;c++){var d=o[c-l]||null,h=d&&(s.default.isString(d)?d:d[u]),p=d&&r[h];p||(p=e(),d&&(r[h]=p)),i[p]={index:c,item:d}}return n.forEach(function(e){delete i[e]}),n.length=0,s.default.clone(i)}}}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(3),s=r(a);e.exports=t.default;
},function(e,t){"use strict";function n(e,t){return Math.max(Math.min(e,t-1),0)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={},i={getPageKey:function(){return window.location.hash},get:function(e){return n[e]},set:function(e,t){n[e]=t},remove:function(e){delete n[e]},clear:function(){n={}}};t.default=i,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var n="up";t.UP=n;var i="right";t.RIGHT=i;var r="down";t.DOWN=r;var a="left";t.LEFT=a;var s=[n,i,r,a];t.all=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="none";t.NONE=n;var i="vertical";t.VERTICAL=i;var r="horizontal";t.HORIZONTAL=r;var a="omni";t.OMNI=a;var s=[n,i,r,a];t.all=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="small";t.SMALL=n;var i="medium";t.MEDIUM=i;var r="large";t.LARGE=r;var a=[n,i,r];t.all=a;
},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="topLeft";t.TOP_LEFT=n;var i="topCenter";t.TOP_CENTER=i;var r="topRight";t.TOP_RIGHT=r;var a="bottomLeft";t.BOTTOM_LEFT=a;var s="bottomCenter";t.BOTTOM_CENTER=s;var o="bottomRight";t.BOTTOM_RIGHT=o;var l="middleLeft";t.MIDDLE_LEFT=l;var u="middleRight";t.MIDDLE_RIGHT=u;var c=[n,i,r,a,s,o,l,u];t.all=c},function(e,t,n){var i,r;i=[n(8),n(29),n(517)],r=function(e,t,n){"use strict";var i=t.extend({shortcuts:[{keys:["?"],
fn:"help",group:"navigation",label:"Open Keyboard Shortcuts"},{keys:["esc"],fn:"escape",group:"navigation",label:"Close Modal or Close Player"},{keys:["`"],fn:"sidebar",group:"navigation",label:"Toggle Sidebar"},{keys:["g d"],fn:"dashboard",group:"navigation",label:"Navigate to Dashboard"},{keys:["g s"],fn:"settings",group:"navigation",label:"Navigate to Settings"},{keys:["g a"],fn:"activity",group:"navigation",label:"Navigate to Activity"},{keys:["g w"],fn:"watchLater",group:"navigation",label:"Navigate to Watch Later"
},{keys:["g r"],fn:"recommendations",group:"navigation",label:"Navigate to Recommended"},{keys:["g u"],fn:"users",group:"navigation",label:"Navigate to Users"},{keys:["/"],fn:"search",group:"actions",label:"Focus Search"},{keys:["p"],fn:"play",group:"actions",label:"Open Player"},{keys:["e"],fn:"edit",group:"actions",label:"Edit Library or Edit Item"},{keys:["#","del"],fn:"remove",group:"actions",label:"Delete Library or Delete Item"},{keys:["shift+s"],fn:"save",group:"actions",label:"Save Changes"
},{keys:["r"],fn:"refresh",group:"actions",label:"Update Library or Refresh Item"},{keys:["a"],fn:"analyze",group:"actions",label:"Analyze Library or Analyze Item"},{keys:["w"],fn:"markWatched",group:"actions",label:"Mark as Watched"},{keys:["u"],fn:"markUnwatched",group:"actions",label:"Mark as Unwatched"},{keys:["s"],fn:"sync",group:"actions",label:"Sync"},{keys:["i"],fn:"info",group:"actions",label:"Info"},{keys:["space"],fn:"playPause",group:"player",label:"Play or Pause"},{keys:["\\"],fn:"toggleFullScreen",
group:"player",label:"Toggle FullScreen"},{keys:["down"],fn:"decreaseVolume",group:"player",label:"Decrease Volume"},{keys:["up"],fn:"increaseVolume",group:"player",label:"Increase Volume"},{keys:[",","shift+left"],fn:"seekBackward",group:"player",label:"Seek Backward (10 seconds)"},{keys:[".","shift+right"],fn:"seekForward",group:"player",label:"Seek Forward (30 seconds)"},{keys:["[","alt+left"],fn:"stepBackward",group:"player",label:"Step Backward (10 minutes)"},{keys:["]","alt+right"],fn:"stepForward",
group:"player",label:"Step Forward (10 minutes)"},{keys:["left"],fn:"skipPrevious",group:"player",label:"Skip to Previous Item"},{keys:["right"],fn:"skipNext",group:"player",label:"Skip to Next Item"}],triggerShortcut:function(t){var n="shortcut:"+t;if(e.hasListener(n))return e.trigger(n),!1},help:function(t){e.trigger("show:modal",new n({shortcuts:this.shortcuts}))},escape:function(t){e.hasListener("shortcut:escape")?e.trigger("shortcut:escape"):e.hasListener("shortcut:stop")&&e.trigger("shortcut:stop");
},sidebar:function(t){e.trigger("shortcut:sidebar")},dashboard:function(t){e.trigger("navigate","dashboard")},settings:function(t){e.trigger("navigate","settings")},activity:function(t){e.trigger("navigate","activity")},watchLater:function(t){e.trigger("navigate","userPlaylist",{key:"queue"})},recommendations:function(t){e.trigger("navigate","userPlaylist",{key:"recommendations"})},users:function(t){e.trigger("navigate","users")},search:function(e){return this.triggerShortcut("search")},edit:function(e){
return this.triggerShortcut("edit")},play:function(e){return this.triggerShortcut("play")},remove:function(e){return this.triggerShortcut("delete")},save:function(e){return this.triggerShortcut("save")},refresh:function(e){return this.triggerShortcut("refresh")},analyze:function(e){return this.triggerShortcut("analyze")},markWatched:function(e){return this.triggerShortcut("markWatched")},markUnwatched:function(e){return this.triggerShortcut("markUnwatched")},sync:function(e){return this.triggerShortcut("sync");
},info:function(e){return this.triggerShortcut("info")},playPause:function(e){return this.triggerShortcut("playPause")},toggleFullScreen:function(e){return this.triggerShortcut("toggleFullScreen")},decreaseVolume:function(e){return this.triggerShortcut("decreaseVolume")},increaseVolume:function(e){return this.triggerShortcut("increaseVolume")},seekBackward:function(e){return this.triggerShortcut("seekBackward")},seekForward:function(e){return this.triggerShortcut("seekForward")},stepBackward:function(e){
return this.triggerShortcut("stepBackward")},stepForward:function(e){return this.triggerShortcut("stepForward")},skipPrevious:function(e){return this.triggerShortcut("skipPrevious")},skipNext:function(e){return this.triggerShortcut("skipNext")}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(593),o=i(s),l=n(650),u=i(l),c=a.default.extend({},u.default,{init:function(e){o.default.config(e,{
shouldSendCallback:function(e){return/(main|vendors)[\w\d\.]*\.js/.test(e.culprit)}})}});t.default=c,e.exports=t.default},function(e,t,n){var i,r;i=[n(31),n(483),n(141),n(477),n(257),n(881),n(379),n(652),n(43),n(165),n(892),n(886),n(654)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){"use strict";var p={registerAll:function(){r.register(a),s.register(new o);var e=new c,t=new d;u.register({protocol:"plex",type:"*",create:function(t,n){return e.createController(t,n)}}),u.register({protocol:"cast",type:"*",
create:function(e,n){return t.createController(e,n)}}),u.register({protocol:"local",type:l.types.PHOTO,create:function(e){return new h({type:e})}})}};return p}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(882),a=i(r),s=n(81),o=i(s),l=n(205),u=i(l),c=n(380),d=i(c),h=n(656),p=i(h),f=n(657),m=i(f),v=n(140),g=i(v),y=n(884),b=i(y),w=n(139),S=i(w),P=n(646),x=i(P),C=n(258),T=i(C),_=n(880),E=i(_),k=n(259),I=i(k),A=n(893),M=i(A),D=n(43),R=i(D),O=n(165),L=i(O),N=n(890),U=i(N),F=n(889),j=i(F),B={
registerAll:function(){var e=b.default.init();e.done(function(e){return g.default.register(e)});var t=new p.default;return o.default.register(t),u.default.register(new m.default),d.default.register(t),S.default.register(x.default),T.default.register(new E.default),I.default.register(M.default),L.default.register({protocol:"local",type:R.default.types.VIDEO,create:function(e){return new U.default({type:e})}}),L.default.register({protocol:"local",type:R.default.types.MUSIC,create:function(e){return new j.default({
type:e})}}),a.default.registerAll(),e}};t.default=B,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),a=i(r),s=n(10),o=n(61),l=i(o),u={init:function(){var e=(0,s.resolve)("appModel"),t={"X-Plex-Product":"Plex Web","X-Plex-Version":"2.7.0","X-Plex-Client-Identifier":e.get("clientID"),"X-Plex-Platform":l.default.name,"X-Plex-Platform-Version":l.default.version,"X-Plex-Device":l.default.platform,"X-Plex-Device-Name":"Plex Web ("+l.default.name+")"
};return e.on("change:clientID",function(e,n){t["X-Plex-Client-Identifier"]=n}),a.default.Deferred().resolve(t).promise()}};t.default=u,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(8),n(43),n(82),n(287),n(71),n(294),n(302),n(31),n(476),n(478)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){"use strict";var p=h.extend({modelDefaults:function(){var t=h.prototype.modelDefaults.apply(this,arguments),n=this.model.get("playQueue");return e.extend(t,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:this.type!==r.types.PHOTO,
canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showPlayQueue:n.supports({remoteRefresh:!0})})},load:function(i){this.model=i.model,this.mediaElement=i.mediaElement||document.createElement(this.type),this.reset(this.model.get("playQueueItem")),this.listenTo(this.manager,{timeline:this.onTimeline,progress:this.onProgress,error:this.onError,volume:this.onVolumeUpdate}),this.listenTo(this.model,{"change:metadataItem":this.onMetadataItemChange,"change:mediaIndex":this.onMetadataItemChange,
"change:partIndex":this.onMetadataItemChange,"change:qualityIndex":this.onQualityIndexChange,"change:audioStreamID":this.onAudioStreamIDChange,"change:subtitleStreamID":this.onSubtitleStreamIDChange,"change:finished":this.onFinishedChange});var r=this.model.get("playQueue");if(this.listenTo(r.get("collection"),"reset",this.onPlayQueueChange),i.silent)return this.manager.updatePlayer(),t.Deferred().resolve().promise();var s=this.model.get("metadataItem"),o=s.server,u=n.resolve("appModel"),d=u.get("primaryServer"),h=i.offset/1e3||0,p=a.getCurrentQuality(s,c.getInstance()),f=u.get("user"),m={
offset:h,directPlay:c.get("directPlay"),directStream:c.get("directStream"),bitrate:p.bitrate,subtitleSize:c.get("subtitleSize"),audioBoost:c.get("audioBoost"),server:this.getServerInfo(o,{isRequired:!0}),user:{username:f.get("username")}};if(!m.server)return t.Deferred().reject().promise();var v=[];v.push(this.getTransientTokenFor(o,m.server)),d&&o.id!==d.id&&(m.primaryServer=this.getServerInfo(d),m.primaryServer&&v.push(this.getTransientTokenFor(d,m.primaryServer)));var g=t.Deferred().resolve().promise();
return g=r.yieldOwnership({absoluteUrl:!0}).then(function(e){m.containerKey=e}),g=g.then(function(){return l(v)}),g.done(e.bind(function(){var e=new chrome.cast.media.MediaInfo(s.get("key"),this.type);e.customData=m;var t=new chrome.cast.media.LoadRequest(e);t.currentTime=h,t.autoplay=!0,this.manager.loadMedia(t)},this)),g},mirror:function(i){var r=i.item,a=r.server,s=n.resolve("appModel"),o=s.get("primaryServer"),u=s.get("user"),c={server:this.getServerInfo(a,{isRequired:!0}),user:{username:u.get("username")
}};if(!c.server)return t.Deferred().reject().promise();var h=[];h.push(this.getTransientTokenFor(a,c.server)),o&&a.id!==o.id&&(c.primaryServer=this.getServerInfo(o),c.primaryServer&&h.push(this.getTransientTokenFor(o,c.primaryServer)));var p=l(h);return p.done(e.bind(function(){var e=new chrome.cast.media.MediaInfo(r.get("key"),this.type);e.customData=c;var t={type:d.SHOWDETAILS};t.media=e,this.manager.sendCustomMessage(t)},this)),p},getServerInfo:function(t,n){var i=this.getServerConnection(t,n);
if(i){var r=e.extend({machineIdentifier:t.id,transcoderVideo:t.get("transcoderVideo")||!1,transcoderVideoRemuxOnly:t.get("transcoderVideoRemuxOnly")||!1,transcoderAudio:t.get("transcoderAudio")||!1,version:t.get("shortVersion"),myPlexSubscription:t.get("myPlexSubscription"),isVerifiedHostname:"https"===i.protocol&&!u.isValidAddress(i.address)},i);return r}},getTransientTokenFor:function(e,t){var n=this.getTransientToken(e).then(function(e){t.accessToken=e});return n},play:function(){this.model.set("state",r.states.PLAYING),
this.manager.sendCustomMessage({type:d.PLAY})},pause:function(){this.model.set("state",r.states.PAUSED),this.manager.sendCustomMessage({type:d.PAUSE})},setPosition:function(e){if(this.canSeek(e)){this.model.set({state:r.states.BUFFERING,position:e});var t=e/1e3;this.manager.startSeek(t),this.sendPositionRequest(t)}},sendPositionRequest:e.debounce(function(e){this.manager.sendCustomMessage({type:d.SEEK,currentTime:e})},500),setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e/100);
},sendVolumeRequest:e.debounce(function(e){this.manager.sendSessionCommand("setReceiverVolumeLevel",e),e||this.manager.sendSessionCommand("setReceiverMuted",!0)},200),skipPrevious:function(){this.manager.sendCustomMessage({type:d.PREVIOUS})},skipNext:function(){this.manager.sendCustomMessage({type:d.NEXT})},skipTo:function(e){this.manager.sendCustomMessage({type:d.SKIPTO,key:e})},stop:function(e){h.prototype.stop.apply(this,arguments),this.manager.sendCustomMessage({type:d.STOP})},refreshRemotePlayQueue:function(){
this.manager.sendCustomMessage({type:d.REFRESHPLAYQUEUE})},setStream:function(e,t){this.manager.sendCustomMessage({type:d.SETSTREAM,stream:{type:e,id:t}})},setQualityIndex:function(){var e=this.model.get("metadataItem"),t=a.getCurrentQuality(e,c.getInstance());this.manager.sendCustomMessage({type:d.SETQUALITY,bitrate:t.bitrate})},onTimeline:function(t){var i=this.model.get("playQueue"),s=this.model.get("playQueueItem");if(t.containerKey){var o=t.containerKey.split("?")[0],l=e.result(i,"url");if(l&&l!==o)return;
}if(t.key&&t.key!==s.get("key")){var u=i.get("collection");if(s=u.findWhere({key:t.key}),!s)return;this.reset(s)}var c=null;if(t.transcodeServerID){var d=n.resolve("appModel"),h=d.get("servers");c=h.get(t.transcodeServerID)}var p=a.getNearestIndexToBitrate(t.bitrate),f=e.isNumber(t.audioStreamID)?t.audioStreamID:null,m=e.isNumber(t.subtitleStreamID)?t.subtitleStreamID:null;this.isTimelineChange=!0,this.model.set({mediaIndex:t.mediaIndex,partIndex:t.partIndex,qualityIndex:p,audioStreamID:f,subtitleStreamID:m,
transcodeServer:c,state:t.state,ready:!0,loaded:"photo"!==this.type,finished:t.state===r.states.STOPPED,errorMessage:t.errorMessage,duration:Math.round(1e3*t.duration),volume:Math.round(t.volume)}),this.model.hasAttr("slideshowState")&&this.model.set("slideshowState",r.getSlideshowStateByState(t.state)),this.isTimelineChange=!1,this.onProgress(t.position)},onProgress:function(e){var t=this.model.get("metadataItem"),n=this.model.get("duration"),i=Math.round(1e3*e);s(t,i,n),this.model.set("position",i);
},onError:function(e){this.model.set({state:r.states.ERROR,errorMessage:e})},onQualityIndexChange:function(e,t){var n=e.previous("qualityIndex");null==t||null==n||this.isTimelineChange||this.setQualityIndex()},onVolumeUpdate:function(e){this.model.set("volume",Math.round(e))}});return p}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(10),n(6),n(8),n(61),n(215),n(43),n(176),n(494),n(476),n(26),n(31),n(479),n(404),n(885)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f){"use strict";
var m=h.extend({protocol:"cast",namespace:"urn:x-cast:plex",progressDelay:100,controller:f,sessionWrapped:["loadMedia","sendSessionCommand","sendCustomMessage"],mediaSessionWrapped:["sendMediaCommand","startSeek"],appID:function(){var e=d.get("chromecastAppID"),t=d.get("chromecastCustomAppID");return e===l.CUSTOM&&t?t:e||l.PRODUCTION},initialize:function(){if("chrome"===r.id){e.bindAll(this,"onApiAvailable","onApiLoadSuccess","onApiLoadError","onReceiverAvailable","onReceiverAction","onCustomReceiversError","onSessionAvailable","onSessionError","onSessionUpdate","onMediaSessionDiscovered","onMediaSessionError","onMediaSessionUpdate"),
h.prototype.initialize.apply(this,arguments),this.sessionBacklog=new a,this.sessionBacklog.wrapAll(this.sessionWrapped,function(){return!!this.session},this),this.mediaSessionBacklog=new a,this.mediaSessionBacklog.wrapAll(this.mediaSessionWrapped,function(){return!!this.mediaSession},this),this.listenTo(i,"cast:launch",this.onLaunch),window.__onGCastApiAvailable=this.onApiAvailable;var t=document.createElement("script");t.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js",document.head.appendChild(t);
}},load:function(){d.populate({reset:!0}).always(e.bind(function(){var t=e.result(this,"appID"),n=new chrome.cast.SessionRequest(t),i=new chrome.cast.ApiConfig(n,this.onSessionAvailable,this.onReceiverAvailable);chrome.cast.initialize(i,this.onApiLoadSuccess,this.onApiLoadError)},this))},loadCustomReceivers:function(){var e=t.resolve("appModel"),n=e.get("players");n.length&&(this.customReceivers=[],n.each(function(e){var t=new chrome.cast.Receiver(this.getCustomReceiverLabel(e),e.get("name"));t.receiverType=chrome.cast.ReceiverType.CUSTOM,
this.customReceivers.push(t)},this),chrome.cast.setCustomReceivers(this.customReceivers,this.onCustomReceiversSuccess,this.onCustomReceiversError))},getCustomReceiverLabel:function(e){return"custom-"+e.id},stop:function(){this.session&&this.session.stop(null,this.onSessionStopError),h.prototype.stop.apply(this,arguments)},loadMedia:function(e){c("[Cast] Load media command"),this.session.loadMedia(e,this.onMediaSessionDiscovered,this.onMediaSessionError)},sendSessionCommand:function(e,t){c("[Cast] Sending session command: "+e),
this.session[e](t,null,this.onMessageError)},sendMediaCommand:function(e,t){c("[Cast] Sending media command: "+e),this.mediaSession[e](t,null,this.onMessageError)},sendCustomMessage:function(e){c("[Cast] Sending custom message: "+e.type),e.type===u.SEEK&&(this.seeking=!1),this.session.sendMessage(this.namespace,e,null,this.onMessageError)},startSeek:function(e){this.seeking=!0,this.mediaSession.playerState=chrome.cast.media.PlayerState.BUFFERING,this.mediaSession.currentTime=e},error:function(){var e=t.resolve("appModel");
i.trigger("show:alert",{type:"error",message:n("There was a problem connecting to this player.")}),e.set("primaryPlayer",null)},updatePlayer:function(){clearInterval(this.progressInterval);var t=this.mediaSession.media,n=this.mediaSession.customData;if(t&&n){var i=e.extend({machineIdentifier:n.server.machineIdentifier,state:s.getStateByCastState(this.mediaSession.playerState),duration:t.duration,position:this.mediaSession.currentTime,volume:this.getVolumeLevel(this.session.receiver.volume)},e.omit(n,["server","primaryServer","user"]));
i.state===s.states.PLAYING&&"photo"!==t.contentType&&(this.progressInterval=setInterval(e.bind(this.onProgress,this),this.progressDelay)),this.mediaSession.idleReason===chrome.cast.media.IdleReason.ERROR&&(i.state=s.states.ERROR,i.errorMessage=n.errorMessage),this.trigger("timeline",i),this.updateNowPlaying(i)}},updateCustomReceiverDisplayStatus:function(e,n){var i,r,a=t.resolve("appModel");if(n){var s=o.image(n.server,n.get("thumb"),{fallbackServer:a.get("primaryServer"),width:32,height:32,minSize:1
});i=n.get("title"),r=[new chrome.cast.Image(s)]}else{var l=a.get("primaryPlayer");i=l.get("product")||"Plex"}e.displayStatus=new chrome.cast.ReceiverDisplayStatus(i,r),chrome.cast.setReceiverDisplayStatus(e)},updateVolumeState:function(){this.session&&this.trigger("volume",this.getVolumeLevel(this.session.receiver.volume))},getVolumeLevel:function(e){return e.muted?0:100*e.level},resetCustomReceiverDisplayStatus:function(e){e.displayStatus=null,chrome.cast.setReceiverDisplayStatus(e)},resetSession:function(){
this.session&&(this.session.removeUpdateListener(this.onSessionUpdate),this.session=null),this.sessionBacklog.clear()},resetMediaSession:function(){this.mediaSession&&(this.mediaSession.removeUpdateListener(this.onMediaSessionUpdate),this.mediaSession=null),clearInterval(this.progressInterval),this.mediaSessionBacklog.clear()},onPrimaryPlayerChange:function(n,i){h.prototype.onPrimaryPlayerChange.apply(this,arguments);var r=t.resolve("appModel");if(this.activeCustomReceiver){var a=r.previous("primaryPlayer");
a&&this.stopListening(a.get("nowPlaying")),this.resetCustomReceiverDisplayStatus(this.activeCustomReceiver),this.activeCustomReceiver=null}if(i){var s=e.findWhere(this.customReceivers,{label:this.getCustomReceiverLabel(i)});if(s){var o=i.get("nowPlaying");this.updateCustomReceiverDisplayStatus(s),this.activeCustomReceiver=s,this.listenTo(o,"add",this.onCustomNowPlayingAdd),this.listenTo(o,"remove",this.onCustomNowPlayingRemove)}}},onCustomNowPlayingAdd:function(e){this.activeCustomReceiver&&this.updateCustomReceiverDisplayStatus(this.activeCustomReceiver,e);
},onCustomNowPlayingRemove:function(e){this.activeCustomReceiver&&this.updateCustomReceiverDisplayStatus(this.activeCustomReceiver)},onApiAvailable:function(e,t){e?this.load():c.warn("[Cast] "+t)},onApiLoadSuccess:function(){var e=t.resolve("appModel");c("[Cast] Loaded the cast api"),e.set("isCastApiAvailable",!0),this.listenTo(e.get("players"),"add remove reset",this.loadCustomReceivers),this.loadCustomReceivers(),chrome.cast.addReceiverActionListener(this.onReceiverAction)},onApiLoadError:function(e){
var n=t.resolve("appModel");c.error("[Cast] Unable to load the cast api: "+JSON.stringify(e)),n.set("isCastApiAvailable",!1)},onReceiverAvailable:function(e){var n=t.resolve("appModel");e===chrome.cast.ReceiverAvailability.AVAILABLE?(c("[Cast] Receivers are available"),n.set("isCastDeviceAvailable",!0)):(c.warn("[Cast] No receivers are available"),n.set("isCastDeviceAvailable",!1))},onReceiverAction:function(e,n){c("[Cast] "+e.friendlyName+" -> "+n);var i=t.resolve("appModel"),r=/^custom-(.*)/.exec(e.label);
if(r){c.info("[Cast] "+e.friendlyName+" is a custom receiver");var a=i.get("players"),s=a.get(r[1]);"cast"===n?i.set("primaryPlayer",s):"stop"===n&&i.set("primaryPlayer",null)}},onCustomReceiversSuccess:function(){c("[Cast] Custom receivers success")},onCustomReceiversError:function(e){c.warn("[Cast] Custom receivers error: "+JSON.stringify(e))},onLaunch:function(){this.sessionBacklog.clear(),this.mediaSessionBacklog.clear(),chrome.cast.requestSession(this.onSessionAvailable,this.onSessionError)},
onSessionAvailable:function(e){c("[Cast] Session: "+JSON.stringify(e));var n=t.resolve("appModel");if(this.session=e,e.sessionId===chrome.cast.Session.CUSTOM_RECEIVER_SESSION_ID){c.info("[Cast] Custom receiver: "+e.receiver.friendlyName);var i=/^custom-(.*)/.exec(e.receiver.label);if(i){var r=n.get("players");n.set("primaryPlayer",r.get(i[1]))}}else n.set("primaryPlayer",new p(e.receiver,{parse:!0})),e.addUpdateListener(this.onSessionUpdate),e.addMediaListener(this.onMediaSessionDiscovered),e.media.length&&(c("[Cast] Found existing media sessions."),
this.onMediaSessionDiscovered(e.media[0])),this.sessionBacklog.process()},onSessionError:function(e){"cancel"!==e.code&&c.error("[Cast] Unable to launch new session: "+JSON.stringify(e))},onSessionUpdate:function(e){if(e)return void this.updateVolumeState();if(c("[Cast] Session ended"),this.resetSession(),this.resetMediaSession(),!this.activeCustomReceiver){var n=t.resolve("appModel");n.set("primaryPlayer",null)}},onSessionStopError:function(e){c.error("[Cast] Unable to stop session: "+JSON.stringify(e));
},onMediaSessionDiscovered:function(e){return c("[Cast] Media session discovered: "+JSON.stringify(e)),e.playerState===s.castStates.STOPPED?void this.resetMediaSession():(this.mediaSession=e,e.addUpdateListener(this.onMediaSessionUpdate),this.updatePlayer(),void this.mediaSessionBacklog.process())},onMediaSessionError:function(e){c.error("[Cast] Media session error: "+JSON.stringify(e)),this.resetMediaSession(),e.details&&e.details.customData&&this.trigger("error",e.details.customData.errorMessage);
},onMediaSessionUpdate:function(e){return this.seeking?void(this.mediaSession.playerState=chrome.cast.media.PlayerState.BUFFERING):void this.updatePlayer()},onMessageError:function(e){c.warn("[Cast] Message error: "+JSON.stringify(e))},onProgress:function(){this.trigger("progress",this.mediaSession.getEstimatedTime())}});return m}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(1520),n(6),n(29),n(43),n(215),n(26)],r=function(e,t,n,i,r,a,s){"use strict";t.key="fv2ELs9q2gEZxE9uuiAGfhbE9Qhc4DyhZjt1j0GaxUI=";
var o=i.extend({wrapped:["play","pause","playPause","getState","setVolume","setPosition","resume","stop"],initialize:function(t){e.bindAll(this,"onReady","onPlay","onTime","onBuffer","onPause","onVolume","onComplete","onError"),this.type=t,this.backlog=new a,this.backlog.wrapAll(this.wrapped,function(){return!!this.video},this)},load:function(i){this.model=i.model,this.offset=this.model.get("position"),this.backlog.clear(),e.defer(e.bind(function(){var a=t("flash-video-placeholder"),o=this.model.get("url");
return e.isFunction(a.setup)?(s.group("Flash Player"),s("URL: "+o),s("Autoplay: true"),s("Offset: "+this.offset),s.groupEnd(),this.model.set("ready",!0),void(this.video=a.setup({file:o,skin:"swf/jwplayer/plex.xml",flashplayer:"swf/jwplayer/jwplayer.swf",stretching:"uniform",width:"100%",height:"100%",volume:100,mute:!1,autostart:i.autoplay,analytics:{enabled:!1},events:{onReady:this.onReady,onPlay:this.onPlay,onTime:this.onTime,onBuffer:this.onBuffer,onPause:this.onPause,onVolume:this.onVolume,onComplete:this.onComplete,
onError:this.onError}}))):void this.model.set({state:r.states.ERROR,errorMessage:n("Your browser does not support video streaming.")})},this))},play:function(){this.video.play(!0)},pause:function(){this.video.pause(!0)},setVolume:function(e){this.video.setVolume(e)},setPosition:function(e){this.video.seek(e/1e3)},resume:function(){s("resuming at "+this.offset);var e=this.offset;this.offset=null,this.setPosition(e)},stop:function(){this.model.get("loaded")&&this.video.remove(),this.video=null},onReady:function(){
this.model.set("loaded",!0),this.setVolume(this.model.get("volume")),this.backlog.process()},onPlay:function(e){this.model.set("state",r.states.PLAYING)},onTime:function(e){return this.offset?void this.resume():(this.model.set("duration",Math.round(1e3*e.duration)),void this.model.set("position",Math.round(1e3*e.position)))},onBuffer:function(){this.model.set("state",r.states.BUFFERING)},onPause:function(){this.model.set("state",r.states.PAUSED)},onVolume:function(e){this.model.set("volume",e.volume);
},onComplete:function(){this.model.set("ended",!0)},onError:function(e){this.model.set({state:r.states.ERROR,errorMessage:e.message})}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(6),n(61),n(26),n(381)],r=function(e,t,n,i,r){"use strict";var a=r.extend({load:function(e){r.prototype.load.apply(this,arguments),n.mobile&&this.model.set("ready",!0)},resume:function(){i("resuming at "+this.offset);var t=this.offset;this.offset=0,this.autoplay&&(this.mediaElement.resume_pending=!0,
this.pause()),this.resumePositionTimeout=setTimeout(e.bind(function(){this.setPosition(t)},this),1e3),this.autoplay&&(this.resumePlayTimeout=setTimeout(e.bind(function(){this.mediaElement.resume_pending=!1,this.play()},this),1500))},stop:function(){r.prototype.stop.apply(this,arguments),this.resumePositionTimeout=clearTimeout(this.resumePositionTimeout),this.resumePlayTimeout=clearTimeout(this.resumePlayTimeout)},onReady:function(){r.prototype.onReady.apply(this,arguments);var e=this.model.get("showEnterFullscreen")||this.model.get("showExitFullscreen");
!e&&this.mediaElement.webkitSupportsFullscreen&&this.model.set({showEnterFullscreen:!0,forceWebkitVideoFullscreen:!0})}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(10),n(61),n(43),n(222),n(219),n(495),n(653)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=o.extend({type:i.types.MUSIC,modelDefaults:function(){var t=o.prototype.modelDefaults.apply(this,arguments);return e.extend(t,{canPlayPause:!0,canStop:!0,canSetVolume:!n.mobile,showSeekBar:!0,showShuffle:!0,
showRepeat:!0,showLyrics:!0,showPlayQueue:!0})},getPlayerDecision:function(e,t){this.errorTimeout&&(this.errorTimeout=clearTimeout(this.errorTimeout)),this.backlog.clear();var n=this.getPlayerDecisionPromise(e,t);return n.done(this.onDecisionSuccess),n.fail(this.onDecisionError),n},getPlayerDecisionPromise:function(e,n){n=n||{};var i=t.resolve("appModel");return r.getPlayerDecision({type:this.type,profile:this.profile,item:e,offset:n.offset,fallbackServer:i.get("primaryServer"),transcoder:s,profileExtra:function(e){
if(e.transcodeServer.supports("replaceTranscodeTarget"))return a.canPlayType("audio",'audio/ogg; codecs="opus"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=opus)":a.canPlayType("audio",'audio/ogg; codecs="vorbis"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=vorbis)":void 0}})}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(1521),n(10),n(6),n(56),n(61),n(43),n(284),n(82),n(222),n(219),n(169),n(495),n(31),n(382),n(888),n(887),n(103)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g){"use strict";var y=f.extend({type:s.types.VIDEO,modelDefaults:function(){var t=f.prototype.modelDefaults.apply(this,arguments);return e.extend(t,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:!a.mobile,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showSeekBar:!0,showPlayQueue:!0,showEnterFullscreen:r.hasFullscreen})},modelOverrides:function(){var e=f.prototype.modelOverrides.apply(this,arguments);return this.model.get("playQueue").get("collection").length<1&&(e.showPlayQueue=!1),
e},getPlayerDecision:function(t,r){this.backlog.clear();var s=this.populateItem(t);return s=s.then(e.bind(function(){var e=n.resolve("appModel"),i=l.getCurrentQuality(t,p.getInstance());this.model.set("qualityIndex",i.index);var s=u.getPlayerDecision({type:this.type,profile:this.profile,item:t,media:r.media,part:r.part,offset:r.offset,fallbackServer:e.get("primaryServer"),allowDirectPlay:p.get("directPlay"),allowedAC3Containers:p.get("allowAC3")?"mp4":null,subtitlesBurnLevel:this.model.get("softSubtitlesFailed")?d.ALWAYS:p.get("subtitlesBurnLevel"),
hasFlash:this.canPlayFlash(),hasNativeHLS:this.canPlayHLS(),useOffsetHLS:!1,hasDASH:this.canPlayDASH(),hasStreamingMKV:this.canPlayStreamingMKV(),minVersionForStreamingMKV:g.streamingMKV,quality:i,transcoder:h,transcoderOptions:{directStream:p.get("directStream")?1:0,subtitleSize:p.get("subtitleSize"),audioBoost:p.get("audioBoost")},profileExtra:function(e){var t=[];return p.get("preferAAC")&&t.push("add-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=aac)"),"safari"===a.id&&"osx"===a.platformID&&o(a.platformVersion,"10.11")&&t.push("append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3,eac3)"),
t.length?t.join("+"):null}});return s.done(this.onDecisionSuccess),s.fail(this.onDecisionError),s},this),e.bind(function(){this.model.set({state:"error",errorMessage:i("Plex Media Server is not responding.")})},this))},getSubcontrollerByType:function(e){return"flash"===e?new v(this.type):new m(this.type)},canPlayFlash:function(){return t.hasFlashPlayerVersion("10")},canPlayHLS:function b(){var e=this.profile.protocols;if(!e||!e.hls)return!1;var b=c.canPlayType("video",e.hls.mimeType),t="Android"===a.platform;
return b||t},canPlayDASH:function(){var e=this.profile.directPlay;if(!e.hasOwnProperty("mp4"))return!1;var t=c.canPlayType("video",e.mp4.mimeType);return p.get("dash")&&t&&r.hasMediaSource},canPlayStreamingMKV:function(){var e=this.profile.directPlay,t=c.canPlayType("video",e.mp4.mimeType);return p.get("dash")&&"chrome"===a.id&&!a.mobile&&t},getErrorMessage:function(e){var t=f.prototype.getErrorMessage.apply(this,arguments);if(e.transcodeServer&&e.transcodeServer.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){
case"allowDirectPlay":t+=" "+i("Please allow Direct Play in Settings > Web > Player > Show Advanced.");break;case"validateProfileProperty:maxBitrate":default:t+=" "+i("Please increase the Streaming Quality in Settings > Web > Player.")}return t}});return y}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(22),n(43),n(287),n(71),n(109),n(478)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=o.extend({modelDefaults:function(){var t=o.prototype.modelDefaults.apply(this,arguments),n=this.player.get("protocolCapabilities"),i=e.contains(n,"playqueues"),r=this.model.get("playQueue");
return e.extend(t,{canStop:!0,showPlayQueue:!!(i&&r&&r.supports({remoteRefresh:!0}))})},load:function(i){this.model=i.model,this.mediaElement=i.mediaElement||document.createElement(this.type),this.reset(this.model.get("playQueueItem")),this.listenTo(this.manager,"timeline",this.onTimeline),this.listenTo(this.model,{"change:metadataItem":this.onMetadataItemChange,"change:mediaIndex":this.onMetadataItemChange,"change:partIndex":this.onMetadataItemChange,"change:audioStreamID":this.onAudioStreamIDChange,
"change:subtitleStreamID":this.onSubtitleStreamIDChange,"change:finished":this.onFinishedChange});var r=this.model.get("metadataItem"),a=r.server,o=this.getServerInfo(a,{isRequired:!0});if(!o)return t.Deferred().reject().promise();var l=this.model.get("playQueue");if(this.listenTo(l.get("collection"),"reset",this.onPlayQueueChange),i.silent)return t.Deferred().resolve().promise();var u=e.extend({key:r.get("key"),offset:i.offset||0},o),c=t.Deferred().resolve().promise(),d=this.getTransientTokenFor(a,u);
return c=l.yieldOwnership().then(function(e){u.containerKey=e}),c=c.then(function(){return s(d)}),c=c.then(e.bind(function(){var e=n.join("/player/playback/playMedia",u);return this.manager.request(this.player,e)},this))},mirror:function(i){if(e.contains(this.player.get("protocolCapabilities"),"mirror")){var r=i.item,a=r.server,o=this.getServerInfo(a,{isRequired:!0});if(!o)return t.Deferred().reject().promise();var l=e.extend({type:this.type,key:r.get("key")},o),u=s(this.getTransientTokenFor(a,l));
return u=u.then(e.bind(function(){return this.manager.request(this.player,n.join("/player/mirror/details",l))},this))}},getServerInfo:function(t,n){var i=this.getServerConnection(t,n);if(i){var r=e.extend({machineIdentifier:t.id},i);return"myPlex"===r.machineIdentifier&&(r.machineIdentifier="node",r.address="node.plexapp.com"),r}},getTransientTokenFor:function(e,t){var n=this.getTransientToken(e).then(function(e){t.token=e});return n},reset:function(e){return this.hasStarted=!1,o.prototype.reset.apply(this,arguments);
},play:function(){return this.model.set("state",i.states.PLAYING),this.manager.request(this.player,"/player/playback/play?type="+this.type)},pause:function(){return this.model.set("state",i.states.PAUSED),this.manager.request(this.player,"/player/playback/pause?type="+this.type)},setPosition:function(e){if(this.canSeek(e))return this.model.set("position",e),this.sendPositionRequest(e)},sendPositionRequest:e.throttle(function(e){var t={type:this.type,offset:e},i=n.join("/player/playback/seekTo",t);
return this.manager.request(this.player,i)},500),setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e)},sendVolumeRequest:e.throttle(function(e){var t={type:this.type,volume:e},i=n.join("/player/playback/setParameters",t);return this.manager.request(this.player,i)},500),setStream:function(e,t){var n=a.get(e).key;return this.manager.request(this.player,"/player/playback/setStreams?"+n+"="+t+"&type="+this.type)},refreshRemotePlayQueue:function(){var n=this.model.get("playQueue"),i=this.manager.player.get("protocolCapabilities");
if(e.contains(i,"playqueues")){var r=n.get("playQueueID");return this.manager.request(this.player,"/player/playback/refreshPlayQueue?playQueueID="+r)}return t.Deferred().resolve().promise()},skipPrevious:function(){return o.prototype.skipPrevious.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipPrevious?type="+this.type)},skipNext:function(){return o.prototype.skipNext.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipNext?type="+this.type)},
skipTo:function(e){return o.prototype.skipTo.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipTo?type="+this.type+"&key="+e)},stop:function(e){return o.prototype.stop.apply(this,arguments),this.manager.request(this.player,"/player/playback/stop?type="+this.type)},removeItem:function(){var t=o.prototype.removeItem.apply(this,arguments);return t.then(e.bind(this.refreshRemotePlayQueue,this))},moveItem:function(){var t=o.prototype.moveItem.apply(this,arguments);return t.then(e.bind(this.refreshRemotePlayQueue,this));
},onTimeline:function(t){if(this.type===t.type&&!t.continuing){var n=this.model.get("playQueue"),a=this.model.get("playQueueItem");if(t.key&&t.key!==a.get("key")){if(a=n.get("collection").findWhere({key:t.key}),!a)return;this.reset(a)}var s=parseInt(t.playQueueVersion,10);s&&s>n.get("playQueueVersion")&&n.fetch(),t.state!==i.states.STOPPED&&(this.hasStarted=!0);var o=parseInt(t.audioStreamID,10),l=parseInt(t.subtitleStreamID,10);this.isTimelineChange=!0,this.model.set({mediaIndex:t.mediaIndex,partIndex:t.partIndex,
partCount:t.partCount,audioStreamID:e.isNaN(o)?null:o,subtitleStreamID:e.isNaN(l)?null:l,state:t.state,ready:!0,loaded:"photo"!==this.type,finished:this.hasStarted&&t.state===i.states.STOPPED,duration:t.duration,position:t.time,volume:t.volume,shuffled:t.shuffle,repeatAll:t.repeat,canPlayPause:t.controllable.indexOf("playPause")>-1,canStop:t.controllable.indexOf("stop")>-1,canSeek:t.controllable.indexOf("seekTo")>-1,canSetVolume:t.controllable.indexOf("volume")>-1,canSetVideoStream:t.controllable.indexOf("videoStream")>-1,
canSetAudioStream:t.controllable.indexOf("audioStream")>-1,canSetSubtitleStream:t.controllable.indexOf("subtitleStream")>-1,canShuffle:t.controllable.indexOf("shuffle")>-1,canRepeat:t.controllable.indexOf("repeat")>-1,canSkipPrevious:t.controllable.indexOf("skipPrevious")>-1,canSkipNext:t.controllable.indexOf("skipNext")>-1}),this.isTimelineChange=!1,null!=t.time&&r(a.get("metadataItem"),t.time,t.duration)}}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(6),n(8),n(35),n(56),n(22),n(479),n(891)],
r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c=l.extend({protocol:"plex",controller:u,initialize:function(){e.bindAll(this,"error"),l.prototype.initialize.apply(this,arguments)},start:function(e){l.prototype.start.apply(this,arguments),this.commandID=0,this.stopPolling=!1,this.poll()},stop:function(){this.stopPolling=!0,this.pollRequest&&this.pollRequest.abort(),l.prototype.stop.apply(this,arguments)},request:function(n,l,u){u||(u={}),u.skipIncrement||this.commandID++,l=o.join(l,{commandID:this.commandID
});var c=s.isHostedHttps?n.server:n,d=c.getXHROptions(l);return d.headers["X-Plex-Target-Client-Identifier"]=n.id,t.ajax(d).fail(e.bind(function(e){if(!this.stopPolling){var t,n=e.responseText,s=a.parseXML(n);t=s&&s.status?s.status:i("The player is unable to perform this action."),r.trigger("show:alert",{type:"error",message:t})}},this))},poll:function(t){t||(t={});var n=o.join("/player/timeline/poll",{wait:t.wait?1:0});this.pollRequest=this.request(this.player,n,{skipIncrement:!0}),this.pollRequest.done(e.bind(function(e,t,n){
this.player.id===n.getResponseHeader("X-Plex-Client-Identifier")&&this.onTimeline(e),this.poll({wait:!0})},this)),this.pollRequest.fail(e.bind(function(e){this.stopPolling||this.error()},this))},error:function(){var e=n.resolve("appModel");r.trigger("show:alert",{type:"error",message:i("There was a problem connecting to this player.")}),e.set("primaryPlayer",null),e.get("players").fetch({reset:!0})},onTimeline:function(t){var n=a.parseXML(t);a.parseArray(n,"Timeline"),n.commandID<this.commandID||e.each(n.Timeline,function(e){
a.parseInteger(e,["time","duration","volume"]),a.parseBoolean(e,["repeat","shuffle","continuing"]),e.controllable?e.controllable=e.controllable.split(","):e.controllable=[],this.trigger("timeline",e),this.updateNowPlaying(e)},this)}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(61)],r=function(e){"use strict";var t={capabilities:{embed:!0,redirect:!0},video:{protocols:{hls:{mimeType:"application/x-mpegURL"}},directPlay:{generic:{video:{maxWidth:1920,maxHeight:1280,
maxFrameRate:60}},mp4:{mimeType:'video/mp4; codecs="avc1.42E01E"',video:{codecs:{h264:{}}},audio:{codecs:{aac:{}}}},mkv:{mimeType:"video/webm",video:{codecs:{vp8:{}}},audio:{codecs:{vorbis:{}}}},ogg:{mimeType:"video/ogg"},mpegts:{protocol:"hls"},flv:{}},directStream:{video:{codecs:{h264:{}},maxWidth:1920,maxHeight:1280,maxBitDepth:8},audio:{codecs:{aac:{}},maxBitrate:192,maxChannels:2}}},music:{directPlay:{generic:{audio:{maxBitrate:350}},mp4:{mimeType:'audio/mp4; codecs="mp4a.40.5"',audio:{codecs:{
aac:{}}}},mp3:{mimeType:'audio/mpeg; codecs="mp3"',audio:{codecs:{mp3:{}}}},ogg:{mimeType:'audio/ogg; codecs="vorbis"',audio:{codecs:{vorbis:{}}}},wav:{mimeType:"audio/wav",audio:{codecs:{pcm:{}}}}},directStream:{audio:{codecs:{mp3:{}},maxBitrate:320,maxChannels:2}}}};return"ie"===e.id&&"9.0"===e.version&&(t.video.directPlay.mp4.optimizedForStreaming=!0),t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5)],r=function(e){"use strict";function t(t){var n=t.channel,i=n.get("identifier"),r=i?"/system/appstore/apps/"+i:n.get("key"),a=r+"/install",s=n.server.getXHROptions(a),o=e.ajax(s);
return o.done(function(){n.set("installed",!0)}),o.promise()}return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(35)],r=function(e,t,n,i,r){"use strict";function a(a){var s=a.channel,o=s.get("identifier"),l=o?"/system/appstore/apps/"+o:s.get("key"),u=l+"/reset",c=s.server.getXHROptions(u),d=t.ajax(c);return d.done(function(t){var a,s=e.isObject(t)?t:r.parseXML(t);a=s.message?s.message:n("This channel was successfully reset."),i.trigger("show:alert",{
type:"success",message:a})}),d.fail(function(){i.trigger("show:alert",{type:"error",message:n("There was a problem resetting this channel.")})}),d.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(35)],r=function(e,t,n,i,r){"use strict";function a(a){var s=a.channel,o=s.get("identifier"),l=o?"/system/appstore/apps/"+o:s.get("key"),u=l+"/restart",c=s.server.getXHROptions(u),d=t.ajax(c);return d.done(function(t){var a,s=e.isObject(t)?t:r.parseXML(t);
a=s.message?s.message:n("This channel was successfully restarted."),i.trigger("show:alert",{type:"success",message:a})}),d.fail(function(){i.trigger("show:alert",{type:"error",message:n("There was a problem restarting this channel.")})}),d.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(35),n(36)],r=function(e,t,n,i,r,a){"use strict";function s(s){function o(){var o=t.ajax(p);o.done(function(t){var n=e.isObject(t)?t:r.parseXML(t);u.set("installed",!1),
n.message&&!s.skipConfirmation&&i.trigger("show:alert",{type:"success",message:n.message}),l.resolve()}),o.fail(function(e){if(400===e.status){var t=new a({title:n("Unable to Uninstall Channel"),message:n("This channel could not be uninstalled, but you can disable it in the server settings."),confirmLabel:n("OK"),cancelLabel:n("Ignore")});t.promise.done(function(){i.trigger("navigate","serverSettings",{serverID:u.server.id,group:"channels"})}),i.trigger("show:modal",t)}else i.trigger("show:alert",{
type:"error",message:n("This channel could not be uninstalled.")});l.reject(e)})}var l=t.Deferred(),u=s.channel,c=u.get("identifier"),d=c?"/system/appstore/apps/"+c:u.get("key"),h=d+"/uninstall",p=u.server.getXHROptions(h);if(s.skipConfirmation)o();else{var f=new a({title:n("Uninstall Channel"),message:n("Are you sure you want to uninstall this channel?")}),m=f.promise;m.done(o),m.fail(function(){l.reject()}),i.trigger("show:modal",f)}return l.promise()}return s}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(35)],r=function(e,t,n,i,r){"use strict";function a(a){function s(n){var a=e.isObject(n)?n:r.parseXML(n);if(!a||!a.message&&!a.Directory)return void o();if(a.message)h||i.trigger("show:alert",{type:"success",message:a.message}),u.resolve();else{r.parseArray(a,"Directory");var l=a.Directory[0].key,c=t.ajax(d.getXHROptions(l));c.done(s),c.fail(o)}}function o(e){h||i.trigger("show:alert",{type:"error",message:n("There was a problem checking for updates.")
}),u.reject(e)}var l,u=t.Deferred(),c=a.channel,d=c?c.server:a.server,h=a.silent;if(c){var p=c.get("identifier"),f=p?"/system/appstore/apps/"+p:c.get("key");l=f+"/update"}else l="/system/appstore/updates";var m=t.ajax(d.getXHROptions(l));return m.done(s),m.fail(o),u.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(6),n(22),n(8)],r=function(e,t,n,i,r,a){"use strict";function s(s){var o=n.resolve("appModel"),l=o.get("user"),u=l.server,c={url:s.item.get("url")
},d=r.join("/pms/playlists/queue/items",c),h=e.extend(u.getXHROptions(d),{type:"POST"}),p=t.ajax(h).promise();return p.done(function(){a.trigger("show:alert",{type:"success",message:i("{1} added to Watch Later.",s.item.get("title"))})}),p.fail(function(){a.trigger("show:alert",{type:"error",message:i("There was a problem adding to Watch Later.")})}),p}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(569).default,r=n(570).default,a=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(659);i(t,r(s,i));var o=n(924),l=a(o);t.refreshMetadata=l.default;var u=n(901),c=a(u);t.analyzeItems=c.default;var d=n(902),h=a(d);t.analyzeSection=h.default;var p=n(919),f=a(p);t.markWatched=f.default;var m=n(918),v=a(m);t.markUnwatched=v.default;var g=n(926),y=a(g);t.unmatch=y.default;var b=n(925),w=a(b);t.splitApart=w.default;var S=n(921),P=a(S);t.merge=P.default;var x=n(911),C=a(x);t.deleteItems=C.default;var T=n(912),_=a(T);t.deleteMediaItem=_.default;var E=n(916),k=a(E);t.deleteVersions=k.default;
var I=n(914),A=a(I);t.deleteSection=A.default;var M=n(915),D=a(M);t.deleteSectionThumbnails=D.default;var R=n(913),O=a(R);t.deletePlaylist=O.default;var L=n(927),N=a(L);t.updateLibrary=N.default;var U=n(922),F=a(U);t.optimize=F.default;var j=n(905),B=a(j);t.cleanBundles=B.default;var z=n(917),V=a(z);t.emptyTrash=V.default;var H=n(920),q=a(H);t.match=q.default;var W=n(903),K=a(W);t.autoMatch=K.default;var Q=n(904),Y=a(Q);t.changeArtwork=Y.default;var G=n(923),$=a(G);t.rate=$.default;var X=n(909),J=a(X);
t.enableVersionGenerator=J.default;var Z=n(908),ee=a(Z);t.disableVersionGenerator=ee.default;var te=n(910),ne=a(te);t.reprocessVersionGenerator=ne.default;var ie=n(907),re=a(ie);t.deleteVersionGenerator=re.default;var ae=n(906),se=a(ae);t.deleteAllVersionGenerators=se.default;var oe=n(894),le=a(oe);t.installChannel=le.default;var ue=n(898),ce=a(ue);t.updateChannel=ce.default;var de=n(896),he=a(de);t.restartChannel=he.default;var pe=n(895),fe=a(pe);t.resetChannel=fe.default;var me=n(897),ve=a(me);t.uninstallChannel=ve.default;
var ge=n(899),ye=a(ge);t.watchLater=ye.default;var be=n(929),we=a(be);t.playMedia=we.default;var Se=n(928),Pe=a(Se);t.playBackgroundMedia=Pe.default;var xe=n(930),Ce=a(xe);t.queueMedia=Ce.default;var Te=n(933),_e=a(Te);t.connectServer=_e.default;var Ee=n(935),ke=a(Ee);t.reconnectServer=ke.default;var Ie=n(937),Ae=a(Ie);t.signInServer=Ae.default;var Me=n(939),De=a(Me);t.signUpServer=De.default;var Re=n(938),Oe=a(Re);t.signOutServer=Oe.default;var Le=n(936),Ne=a(Le);t.removeServer=Ne.default;var Ue=n(932),Fe=a(Ue);
t.checkForServerUpdates=Fe.default;var je=n(934),Be=a(je);t.installServerUpdates=Be.default;var ze=n(940),Ve=a(ze);t.testServerImage=Ve.default;var He=n(931),qe=a(He);t.getTransientToken=qe.default;var We=n(942),Ke=a(We);t.showTermsOfService=Ke.default;var Qe=n(941),Ye=a(Qe);t.showClaimServerAlertBar=Ye.default;var Ge=n(955),$e=a(Ge);t.showSyncModal=$e.default;var Xe=n(954),Je=a(Xe);t.showHomeWarningsModal=Je.default;var Ze=n(944),et=a(Ze);t.deleteSyncItem=et.default;var tt=n(480),nt=a(tt);t.refreshSyncItems=nt.default;
var it=n(948),rt=a(it);t.removeDevice=rt.default;var at=n(949),st=a(at);t.removeFriend=st.default;var ot=n(943),lt=a(ot);t.acceptInvite=lt.default;var ut=n(947),ct=a(ut);t.rejectInvite=ct.default;var dt=n(953),ht=a(dt);t.shareServer=ht.default;var pt=n(951),ft=a(pt);t.removeServerShare=ft.default;var mt=n(950),vt=a(mt);t.removeHomeUser=vt.default;var gt=n(958),yt=a(gt);t.validateUsername=yt.default;var bt=n(957),wt=a(bt);t.toggleGuest=wt.default;var St=n(945),Pt=a(St);t.lockUser=Pt.default;var xt=n(956),Ct=a(xt);
t.signUp=Ct.default;var Tt=n(952),_t=a(Tt);t.share=_t.default;var Et=n(946),kt=a(Et);t.recommend=kt.default},function(e,t,n){var i,r;i=[n(3),n(5)],r=function(e,t){"use strict";function n(n){var i=n.items;return t.when.apply(t,e.map(i,function(n){var i="/library/metadata/"+n.id+"/analyze",r=e.extend(n.server.getXHROptions(i),{type:"PUT"});return t.ajax(r).promise()}))}return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";
function a(a){function s(){var e=t.ajax(c);e.done(function(){o.resolve()}),e.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem analyzing the library.")}),o.reject(e)}),e.always(function(e){d.hide()})}var o=t.Deferred(),l=a.section,u="/library/sections/"+l.id+"/analyze",c=e.extend(l.server.getXHROptions(u),{type:"PUT"}),d=new r({title:n("Analyze Library"),message:n("Analyzes all the media files in the library. The analysis captures information about the media which helps Plex decide how to optimally play back the media."),
confirmLabel:n("Analyze"),cancelLabel:n("Cancel"),async:!0}),h=d.promise;return h.done(s),h.fail(function(){o.reject()}),i.trigger("show:modal",d),o.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(35),n(22)],r=function(e,t,n,i,r,a){"use strict";function s(s){var o=t.Deferred(),l=s.item,u=s.agent,c={agent:u.id,manual:0},d=a.join(["/library/metadata/",l.id,"/matches"],c),h=e.extend(l.server.getXHROptions(d)),p=t.ajax(h);return p.done(function(s){
var u=e.isObject(s)?s:r.parseXML(s);if(u.SearchResult){var d=u.SearchResult;e.isArray(u.SearchResult)&&(d=u.SearchResult[0]),c={guid:d.guid,name:d.name};var h=a.join(["/library/metadata/",l.id,"/match"],c),p=e.extend(l.server.getXHROptions(h),{type:"PUT"}),f=t.ajax(p);f.done(function(){o.resolve()}),f.fail(function(){i.trigger("show:alert",{type:"error",message:n("There was a problem matching this item.")}),o.reject()})}else i.trigger("show:alert",{type:"error",message:n("No matches were found using this agent.")
}),o.reject()}),p.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem searching for matches.")}),o.reject(e)}),o.promise()}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(22)],r=function(e,t,n){"use strict";function i(i){var a=i.item,s={url:i.artworkRatingKey},o=n.join(["/library/metadata/",a.id,i.artworkType],s),l=e.extend(a.server.getXHROptions(o),{type:"PUT"}),u=t.ajax(l);return u.done(function(e){a.set(r[i.artworkType],e);
}),u.promise()}var r={poster:"thumb",art:"art",banner:"banner"};return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";function a(a){function s(){var e=t.ajax(c);e.done(function(){i.trigger("show:alert",{type:"success",message:n("Unused bundles are being removed.")}),o.resolve()}),e.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem removing unused bundles.")}),o.reject(e)}),e.always(function(e){
d.hide()})}var o=t.Deferred(),l=a.server,u="/library/clean/bundles",c=e.extend(l.getXHROptions(u),{type:"PUT"}),d=new r({title:n("Clean Bundles"),message:n("The media server stores information about your media to disk, as well as posters, artwork, and other media resources from the internet. Running this task deletes any bundles which are no longer in use."),confirmLabel:n("Clean"),cancelLabel:n("Cancel"),async:!0}),h=d.promise;return h.done(s),h.fail(function(){o.reject()}),i.trigger("show:modal",d),
o.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(128),n(36)],r=function(e,t,n,i,r,a){"use strict";function s(a){var s=o(),l=s.promise;return l=l.then(function(){var o="/playlists/generators?type="+r.LOCAL,l=e.extend(a.server.getXHROptions(o),{type:"DELETE"}),u=t.ajax(l).promise();return u.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem deleting all versions.")})}),u.always(function(){s.hide()}),u.promise();
})}function o(){var e=new a({title:n("Delete All Versions"),message:n("Are you sure you want to delete all versions? This cannot be undone."),confirmLabel:n("Delete"),cancelLabel:n("Cancel"),async:!0,hasDanger:!0});return i.trigger("show:modal",e),e}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(6),n(8),n(480),n(36)],r=function(e,t,n,i){"use strict";function r(n){var i=n.generator,r=a(n),s=r.promise.then(function(){var n=i.destroy();return n.fail(function(n){t.trigger("show:alert",{
type:"error",message:e("Unable to stop generating these versions.")})}),n.always(function(){r.hide()}),n});return s}function a(n){var r=n.generator.get("title"),a=r?e("Removing this item will delete all versions created by {1}. Are you sure you want to continue?",r):e("Removing this item will delete all related versions. Are you sure you want to continue?"),s=new i({title:e("Delete Versions"),message:a,confirmLabel:e("Remove"),cancelLabel:e("Cancel"),async:!0,hasDanger:!0});return t.trigger("show:modal",s),
s}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";function a(r){var a=r.generator,o=e.result(a,"url")+"/"+r.ratingKey+"/disable",l=s(),u=l.promise.then(function(){var r=e.extend(a.server.getXHROptions(o),{type:"PUT"}),s=t.ajax(r).promise();return s.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem disabling this version.")})}),s.always(function(){l.hide()}),s});return u}function s(){
var e=new r({title:n("Remove Version"),message:n("Are you sure you want to delete this version? You can enable it again in Optimized Versions Settings."),confirmLabel:n("Remove"),cancelLabel:n("Cancel"),async:!0,hasDanger:!0});return i.trigger("show:modal",e),e}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8)],r=function(e,t,n,i){"use strict";function r(r){var a=r.generator,s=e.result(a,"url")+"/"+r.ratingKey+"/enable",o=e.extend(a.server.getXHROptions(s),{
type:"PUT"}),l=t.ajax(o).promise();return l.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem enabling this version.")})}),l}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8)],r=function(e,t,n,i){"use strict";function r(r){var a=r.generator,s=r.ratingKey,o=e.result(a,"url");s&&(o+="/"+s),o+="/reprocess";var l=e.extend(a.server.getXHROptions(o),{type:"PUT"}),u=t.ajax(l).promise();return u.fail(function(e){var t=n(s?"There was a problem processing this item.":"There was a problem processing these items.");
i.trigger("show:alert",{type:"error",message:t})}),u}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(39),n(13),n(36)],r=function(e,t,n,i,r,a,s){"use strict";function o(n){var i=n.items,r=n.item;i||(i=[r]),r||(r=e.first(i));var s=r.get("Media");if(1===i.length&&s.length>1&&r.server.supports("specificMediaDeletion"))return a.execute("deleteMediaItem",{item:r});var o=l({item:r,items:i}),u=o.promise,c=u.then(function(){var r=e.map(i,function(e){return a.execute("deleteItem",{
item:e,skipRedirect:n.skipRedirect})});return t.when.apply(t,r).always(function(){o.hide()})});return c}function l(e){var t,a,o=e.item,l=e.items,u=l.length>1,c=r.get(o.get("type"));u?(t=c.plural,a=n("Are you sure you want to delete {1} items from your filesystem?",l.length)):(t=c.title,a=n("Are you sure you want to delete this item from your filesystem?"));var d={title:n("Delete {1}",t),message:a,confirmLabel:n("Delete"),cancelLabel:n("Cancel"),async:!0,hasDanger:!0};(u||c.child)&&(d.requireDoubleConfirm=!0,
d.doubleConfirmMessage=n("Multiple files may be deleted."),d.doubleConfirmLabel=n("Yes, I'm sure"));var h=new s(d);return i.trigger("show:modal",h),h}return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(13),n(1246),n(36)],r=function(e,t,n,i,r,a,s){"use strict";function o(e){var t=l(e);return t=t.then(function(t){var n=u(),i=n.promise.then(function(){return r.execute("deleteFile",{item:e.item,media:t}).always(function(){n.hide()})});return i})}function l(e){
var n=t.Deferred(),r=e.item,s=r.get("Media");if(e.index in s)return n.resolve(s[e.index]).promise();var o=new a({model:r}),l=o.promise;return l.done(function(e){n.resolve(s[e])}),l.fail(function(){n.reject()}),i.trigger("show:modal",o),n.promise()}function u(){var e=new s({title:n("Delete File"),message:n("Are you sure you want to delete this file from your filesystem?"),confirmLabel:n("Delete"),cancelLabel:n("Cancel"),async:!0,hasDanger:!0});return i.trigger("show:modal",e),e}return o}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(6),n(8),n(36)],r=function(e,t,n,i){"use strict";function r(r){function a(){var e=r.item.destroy();e.done(function(){n.trigger("navigate","playlists",{serverID:o.id}),s.resolve()}),e.fail(function(e){n.trigger("show:alert",{type:"error",message:t("There was a problem deleting the playlist.")}),s.reject(e)}),e.always(function(e){l.hide()})}var s=e.Deferred(),o=r.item.server,l=new i({title:t("Delete Playlist"),message:t("Are you sure you want to delete {1}? This cannot be undone.",r.item.get("title")),
confirmLabel:t("Delete"),cancelLabel:t("Cancel"),async:!0,hasDanger:!0}),u=l.promise;return u.done(a),u.fail(function(){s.reject()}),n.trigger("show:modal",l),s.promise()}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(10),n(6),n(8),n(183),n(36)],r=function(e,t,n,i,r,a){"use strict";function s(s){function o(){var e=u.destroy({wait:!0});return e?(e.done(function(){var e=t.resolve("appStore");e.dispatch(r.repopulatePage()),l.resolve()}),void e.fail(function(e){i.trigger("show:alert",{
type:"error",message:n("There was a problem deleting the library.")}),l.reject(e)})):void l.resolve()}var l=e.Deferred(),u=s.section,c=new a({title:n("Delete Library"),message:n("Are you sure you want to delete {1}?",u.get("title")),confirmLabel:n("Delete"),cancelLabel:n("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:n("This cannot be undone."),doubleConfirmLabel:n("Yes, I'm sure"),async:!0,hasDanger:!0}),d=c.promise;return d.done(o),d.fail(function(){l.reject()}),i.trigger("show:modal",c),
l.promise().always(function(){c.hide()}),l.promise()}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";function a(a){function s(){var e=t.ajax(u);return e.done(function(e){i.trigger("show:alert",{type:"success",message:n("The preview thumbnails for items in this library were deleted.")})}),e.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem deleting the preview thumbnails for items in this library.")
})}),e.always(function(e){c.hide()}),e}var o=a.section,l="/library/sections/"+o.id+"/indexes",u=e.extend(o.server.getXHROptions(l),{type:"DELETE"}),c=new r({title:n("Delete Preview Thumbnails"),message:n("Are you sure you want to delete the preview thumbnails for items in this library? This cannot be undone."),confirmLabel:n("Delete"),cancelLabel:n("Cancel"),async:!0,hasDanger:!0}),d=c.promise;return d=d.then(function(){return s()}),i.trigger("show:modal",c),d}return a}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(22),n(36)],r=function(e,t,n,i,r,a){"use strict";function s(a){var s=a.item,l=s.server,u=s.get("Media"),c=e.filter(u,function(e){return!!e.proxyType}),d=o({item:s,versions:c}),h=d.promise,p=h.then(function(){var a=r.join(["/library/metadata/",s.id],{proxy:1}),o=e.extend(l.getXHROptions(a),{type:"DELETE"}),h=t.ajax(o);return h.done(function(){e.each(c,function(t){u.splice(e.indexOf(u,t),1)}),s.trigger("change:Media",s,s.get("Media"))}),h.fail(function(e){
var t=n(403===e.status?"Ensure that media deletion is enabled for library content in your server settings.":"There was a problem deleting these versions.");i.trigger("show:alert",{type:"error",message:t})}),h.always(function(){d.hide()}),h.promise()});return p}function o(t){var r,s=t.item,o=t.versions,l=o.length>1;if(l)r=n("Are you sure you want to delete {1} versions of {2}?",o.length,s.get("title"));else{var u=e.first(o);r=n("Are you sure you want to delete the {1} version of {2}?",u.title,s.get("title"));
}var c=new a({title:n(l?"Delete Versions":"Delete Version"),message:r,confirmLabel:n("Delete"),cancelLabel:n("Cancel"),async:!0,hasDanger:!0});return i.trigger("show:modal",c),c}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";function a(a){function s(){e.each(c,function(n){var i="/library/sections/"+n+"/emptyTrash",r=e.extend(u.getXHROptions(i),{type:"PUT"});d.push(t.ajax(r))});var r=t.when.apply(t,d);r.done(function(){
i.trigger("show:alert",{type:"success",message:n("The trash was emptied.")}),o.resolve()}),r.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem emptying the trash.")}),o.reject(e)}),r.always(function(e){p.hide()})}var o=t.Deferred(),l=a.section,u=l?l.server:a.server,c=[],d=[];if(l)c.push(l.id);else{var h=u.get("sections");h.each(function(e){c.push(e.id)})}var p=new r({title:n("Empty Trash"),message:n("By default the media server doesn't remove information for media right away. This helps if a drive is temporarily disconnected. When you empty the trash for a section, all information about missing media is deleted."),
confirmLabel:n("Empty"),cancelLabel:n("Cancel"),async:!0}),f=p.promise;return f.done(s),f.fail(function(){o.reject()}),i.trigger("show:modal",p),o.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(39),n(13),n(36)],r=function(e,t,n,i,r,a,s){"use strict";function o(t){var o,l,u;t.item?(l=t.item,u=[l]):t.items&&(u=t.items,l=u[0]);var c=e.extend({},t,{watched:!1}),d=l.get("type"),h=r.get(d),p=h&&"directory"===h.element,f=(p||u.length>1)&&!t.force,m=1===u.length,v=m&&l.get("isSection")?l.getSyncTitle():l.get("title");
if(f){var g;switch(l.get("type")){case"movie":g=m?n("Are you sure you want to mark {1} as unwatched?",v):n("Are you sure you want to mark these movies as unwatched?");break;case"show":case"season":case"episode":g=m?n("Are you sure you want to mark all episodes of {1} as unwatched?",v):n("Are you sure you want to mark these episodes as unwatched?");break;default:g=m?n("Are you sure you want to mark {1} as unwatched?",v):n("Are you sure you want to mark these items as unwatched?")}var y=new s({title:n("Mark as Unwatched"),
message:g}),b=y.promise;o=b.then(function(){return a.execute("updateWatchedStatus",c)}),i.trigger("show:modal",y)}else o=a.execute("updateWatchedStatus",c);return o}return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(39),n(13),n(36)],r=function(e,t,n,i,r,a,s){"use strict";function o(t){var o,l,u;t.item?(l=t.item,u=[l]):t.items&&(u=t.items,l=u[0]);var c=e.extend({},t,{watched:!0}),d=l.get("type"),h=r.get(d),p=h&&"directory"===h.element,f=(p||u.length>1)&&!t.force,m=1===u.length,v=m&&l.get("isSection")?l.getSyncTitle():l.get("title");
if(f){var g;switch(l.get("type")){case"movie":g=m?n("Are you sure you want to mark {1} as watched?",v):n("Are you sure you want to mark these movies as watched?");break;case"show":case"season":case"episode":g=m?n("Are you sure you want to mark all episodes of {1} as watched?",v):n("Are you sure you want to mark these episodes as watched?");break;default:g=m?n("Are you sure you want to mark {1} as watched?",v):n("Are you sure you want to mark these items as watched?")}var y=new s({title:n("Mark as Watched"),
message:g}),b=y.promise;o=b.then(function(){return a.execute("updateWatchedStatus",c)}),i.trigger("show:modal",y)}else o=a.execute("updateWatchedStatus",c);return o}return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(22)],r=function(e,t,n){"use strict";function i(i){var r=i.item,a={guid:i.guid,name:i.name};"album"===r.get("type")&&i.children&&i.children.reduce(function(e,t){var n=t.get("id");return n&&(e["guid["+n+"]"]=t.get("guid")),e},a);var s=n.join(["/library/metadata/",r.id,"/match"],a),o=e.extend(r.server.getXHROptions(s),{
type:"PUT"});return t.ajax(o).promise()}return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";function a(a){function s(){var e=t.ajax(d);e.done(function(){o.resolve()}),e.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem merging these items.")}),o.reject(e)}),e.always(function(e){h.hide()})}var o=t.Deferred(),l=a.item,u=e.pluck(a.items,"id").join(","),c="/library/metadata/"+l.id+"/merge?ids="+u,d=e.extend(l.server.getXHROptions(c),{
type:"PUT"}),h=new r({title:n("Merge"),message:n("Are you sure you want to merge these items together?"),async:!0}),p=h.promise;return p.done(s),p.fail(function(){o.reject()}),i.trigger("show:modal",h),o.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";function a(a){function s(){var e=t.ajax(c);e.done(function(){i.trigger("show:alert",{type:"success",message:n("The database was optimized.")}),o.resolve();
}),e.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem optimizing this database.")}),o.reject(e)}),e.always(function(e){d.hide()})}var o=t.Deferred(),l=a.server,u="/library/optimize",c=e.extend(l.getXHROptions(u),{type:"PUT"}),d=new r({title:n("Optimize Database"),message:n("Cleans up the library database and ensures it is operating as quickly as possible. This is especially useful when you've added or removed a large amount of media from the library."),confirmLabel:n("Optimize"),
cancelLabel:n("Cancel"),async:!0}),h=d.promise;return h.done(s),h.fail(function(){o.reject()}),i.trigger("show:modal",d),o.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(6),n(8),n(22)],r=function(e,t,n,i){"use strict";function r(r){var a=r.item,s=r.rating,o=a.get("userRating");if(a.set("userRating",s),r.passive)return e.Deferred().resolve().promise();var l={key:a.get("ratingKey"),identifier:a.get("identifier"),rating:s},u=i.join("/:/rate",l),c=e.ajax(a.server.getXHROptions(u));
return c.fail(function(){a.set("userRating",o),n.trigger("show:alert",{type:"error",message:t("There was a problem rating this item.")})}),c.promise()}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(235)],r=function(e,t,n,i,r){"use strict";function a(a){var s,o;return a.item?(s=a.item,o=[s]):(o=a.items,s=o[0]),t.when.apply(t,e.map(o,function(n){var i="/library/metadata/"+n.id+"/refresh",r=e.extend(s.server.getXHROptions(i),{type:"PUT"});return t.ajax(r).promise();
})).fail(function(e){503===e.status?i.trigger("show:modal",new r({model:s.server})):i.trigger("show:alert",{type:"error",message:n("There was a problem refreshing.")})})}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";function a(a){function s(){var r=e.extend(l.server.getXHROptions(u),{type:"PUT"}),s=t.ajax(r);s.done(function(){var e,t=l.get("type");e="show"===t||"artist"===t||"album"===t?"Location":"Media",
l.set(e,l.get(e).slice(0,1)),a.skipNavigate||i.trigger("navigate:back"),o.resolve()}),s.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem splitting this item apart.")}),o.reject(e)}),s.always(function(e){c.hide()})}var o=t.Deferred(),l=a.item,u="/library/metadata/"+l.id+"/split",c=new r({title:n("Split Apart"),message:n("Are you sure you want to split this item apart?"),async:!0}),d=c.promise;return d.done(s),d.fail(function(){o.reject()}),i.trigger("show:modal",c),
o.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8)],r=function(e,t,n,i){"use strict";function r(r){var a=r.item,s="/library/metadata/"+a.id+"/unmatch",o=e.extend(a.server.getXHROptions(s),{type:"PUT"}),l=t.ajax(o);return l.fail(function(){i.trigger("show:alert",{type:"error",message:n("There was a problem unmatching this item.")})}),l.promise()}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36),n(235)],
r=function(e,t,n,i,r,a){"use strict";function s(s){function o(){var e=t.ajax(v);e.done(function(){l.resolve()}),e.fail(function(e){if(503===e.status)i.trigger("show:modal",new a({model:h}));else{var t=n(d?"There was a problem canceling the update.":"There was a problem updating the library.");i.trigger("show:alert",{type:"error",message:t})}l.reject(e)})}var l=t.Deferred(),u=s.section,c=u?u.id:"all",d=s.cancel,h=u?u.server:s.server,p=s.params||{},f={};p.force&&(f.force=1);var m="/library/sections/"+c+"/refresh",v=e.extend(h.getXHROptions(m),{
data:f});if(d&&(v.type="DELETE",u&&u.set("refreshing",!1)),f.force){var g=new r({title:n("Refresh All"),message:n("Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified."),confirmLabel:n("Refresh"),cancelLabel:n("Cancel")}),y=g.promise;y.done(o),y.fail(function(){l.reject()}),i.trigger("show:modal",g)}else o();return l.promise()}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(){m&&(m.stop(),
m.stopListening())}function r(e){i(),m=h.default.getInstance(e.type,{forceLocal:!0});var t=new f.default({playQueueItem:e.model,playQueue:e.playQueue,volume:e.volume}),n=m.load({model:t,autoplay:e.autoplay,offset:e.offset});return m.listenTo(l.default,"audio:fadeOut",function(t){t.exceptKey!==e.model.get("key")&&m.fadeOut()}),m.listenTo(l.default,"audio:stop",function(){m.stop()}),m.listenTo(t,"change:stopped",function(e,t){t&&i()}),n}function a(e){return e?void(v||(0,c.default)(e).then(r)):i()}var s=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),l=s(o),u=n(457),c=s(u),d=n(165),h=s(d),p=n(267),f=s(p),m=null,v=!1;l.default.on("show:player",function(){v=!0}),l.default.on("hide:player",function(){v=!1}),t.default=a,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=(0,o.resolve)("appModel").get("primaryPlayer");return e=s.default.extend({},e,{confirmClearPlayQueue:function(){var e=new m.default({title:(0,u.default)("Play Now"),message:(0,u.default)("This will clear the contents of Up Next and play the selection instead.")
});return d.default.trigger("show:modal",e),e.promise},supportsContinuous:!t||(0,s.default)(t.get("protocolCapabilities")).contains("playqueues")}),(0,p.default)(e).progress(function(e){return d.default.trigger("show:playerLoading",e)}).then(function(e){return d.default.trigger("show:player",e)}).fail(function(e){return d.default.trigger("hide:playerLoading",e)})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(10),l=n(6),u=r(l),c=n(8),d=r(c),h=n(457),p=r(h),f=n(36),m=r(f);
t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(6),n(8),n(13)],r=function(e,t,n,i,r,a){"use strict";function s(s){var o=s.item,l=o.server.get("playQueueManager").getFor(o);if(l){var u=n.resolve("appModel"),c=u.get("primaryPlayer");if(c){var d=c.get("protocolCapabilities");if(!e.contains(d,"playqueues"))return r.trigger("show:alert",{type:"error",message:i("The connected player doesn't support queueing.")}),t.Deferred().resolve().promise()}return l.queueContent(o,s)}return a.execute("playMedia",{
item:o})}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(35),n(22)],r=function(e,t,n,i){"use strict";function r(e){var r=t.Deferred(),a=e.server;if(!a.supports("transientToken"))return r.resolve(a.get("accessToken")).promise();var s={type:e.type||"delegation",scope:e.scope||"all"},o=i.join("/security/token",s),l=t.ajax(a.getXHROptions(o));return l.done(function(e){var t=n.parseXML(e);r.resolve(t.token)}),l.fail(function(e){r.reject(e)}),r.promise()}return r;
}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(22)],r=function(e,t,n){"use strict";function i(i){var r=i.server,a={download:i.download===!1?"0":"1"},s=n.join("/updater/check",a),o=e.extend(r.getXHROptions(s),{type:"PUT"}),l=i.initialState||"checking",u=r.get("update");u.set("state",l);var c=t.ajax(o).promise();return c.fail(function(){u.set("state","error")}),c}return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(6),n(8)],r=function(e,t,n){
"use strict";function i(i){function r(){var e=s.fetch();e.done(function(){var e=s.get("mappingState"),t=i.value&&"unknown"===e,n=!i.value&&"mapped"===e;"waiting"===e||t||n?a||(a=setInterval(r,c)):(a=clearInterval(a),s.isWaiting()&&s.set("remoteAccessState",""),u.resolve())})}var a,s=i.cloudAccount,o=s.server.get("settings"),l=o.get("PublishServerOnPlexOnlineKey"),u=e.Deferred(),c=500;if(!s.isWaiting()){var d=i.value?"connecting":"disconnecting";s.set("remoteAccessState",d)}var h=s.previous("remoteAccessState"),p=l.save({
PublishServerOnPlexOnlineKey:i.value},{timeout:0});return p.done(r),p.fail(function(e){var r;r=t(i.value?"There was a problem connecting your server.":"There was a problem disconnecting your server."),n.trigger("show:alert",{type:"error",message:r}),s.set("remoteAccessState",h),u.reject(e)}),u.promise()}return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(36)],r=function(e,t,n,i,r){"use strict";function a(a){function s(){var e=l.get("update");e.set("state","installing");
var n=t.ajax(c).promise();return n.fail(function(){e.set("state","error")}),n}var o,l=a.server,u="/updater/apply",c=e.extend(l.getXHROptions(u),{type:"PUT"});l.get("activeConnection").get("isLoopback")||(o=new r({title:n("Remote Installation"),confirmLabel:n("Continue"),cancelLabel:n("Cancel"),message:n("The installer may display dialogs that require input. Make sure you have desktop access to the computer running Plex Media Server before continuing."),hasDanger:!0}),i.trigger("show:modal",o));var d=o?o.promise:t.Deferred().resolve().promise();
return d=d.then(function(){return s()})}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(13)],r=function(e,t,n){"use strict";function i(e){var i=e.cloudAccount,r={cloudAccount:i,value:!1},a=n.execute("connectServer",r);return a=a.then(function(){return r.value=!0,n.execute("connectServer",r)}),a=a.then(function(){if(i.get("mappingError"))return t.Deferred().reject().promise()})}return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(6),n(8),n(69),n(36)],
r=function(e,t,n,i,r,a,s){"use strict";function o(t){var n=new a({machineIdentifier:t},{onlyIfCached:!0});if(!e.isEmpty(n))return n}function l(e){var t=e.get("cloudAccount"),n=t.destroy();return n.done(function(){e.set({myPlexSigninState:"none",myPlexSubscription:!1})}),n}function u(e){e.trigger("destroy",e,e.collection),e.cache.remove(e)}function c(a){function c(){var n;if(f)n=f.destroy({wait:!0});else{var i="/api/servers/"+m.id,a=e.extend(p.server.getXHROptions(i),{type:"DELETE"});n=t.ajax(a)}if(m.get("connected")&&"ok"===m.get("myPlexSigninState")){
var s=m.get("cloudAccount");n=n.then(function(){return s.fetch()}),n=n.then(function(){return l(m)})}return m.get("connected")===!1?u(m):n.always(function(){r.trigger("test:server",m),m.populate().fail(function(){u(m)})}),n.always(function(){g.hide()}),n.promise()}var d,h=n.resolve("appModel"),p=h.get("user"),f=a.device,m=a.server||o(f.get("clientIdentifier"));d=i(f?"If you remove the server, all syncs and shares associated with the server will be lost and you will need to sign the server in again to restore access to Plex.":"Are you sure you want to remove this server?");
var v={title:i("Remove Server"),message:d,confirmLabel:i("Remove"),cancelLabel:i("Cancel"),async:!0,hasDanger:!0};f&&(v.requireDoubleConfirm=!0,v.doubleConfirmMessage=i("Are you sure you want to remove this server?"),v.doubleConfirmLabel=i("Yes, I'm sure"));var g=new s(v),y=g.promise;return y=y.then(function(){return c()}),r.trigger("show:modal",g),y}return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=c.default.Deferred(),n=e.cloudAccount,i=e.claim,a=void 0!==i&&i,s=(0,
d.resolve)("appModel").get("cloudServer"),o=n.server,u=void 0;if(a){var h=s.getXHROptions("/api/claim/token");u=c.default.ajax(r({},h,{type:"GET"})),u=u.then(function(e){var t=b.default.parseXML(e),n=t.token,i=o.getXHROptions(p.join("/myplex/claim",{token:n}));return c.default.ajax(r({},i,{type:"POST"}))})}else{var f=e.username,v=e.password,y=o.getXHROptions(p.join("/myplex/account",{username:f,password:v}));u=c.default.ajax(r({},y,{type:"PUT"}))}return u.done(function(i){var r=l.default.isObject(i)?i:b.default.parseXML(i);
r&&"invalid"===r.signInState?(g.default.trigger("show:alert",{type:"error",message:(0,m.default)("The username or password is incorrect.")}),t.reject()):(o.get("accessToken")||o.set("accessToken",s.get("accessToken")),n.set("signedIn",!0),o.set({myPlexSigninState:"ok",myPlexUsername:e.username}),t.resolve())}),u.fail(function(e){n.get("signedIn")===!0&&n.set("signedIn",!1);var i=void 0;i=401===e.status?(0,m.default)("The username or password is incorrect."):(0,m.default)("There was a problem signing in to Plex."),
g.default.trigger("show:alert",{type:"error",message:i}),t.reject(e)}),t.promise()}var r=n(11).default,a=n(2).default,s=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=a(o),u=n(5),c=a(u),d=n(10),h=n(22),p=s(h),f=n(6),m=a(f),v=n(8),g=a(v),y=n(53),b=a(y);t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(6),n(8)],r=function(e,t){"use strict";function n(n){var i=n.cloudAccount,r=i.destroy({timeout:0});return r.done(function(){i.server.set({myPlexSigninState:"none",
myPlexSubscription:!1})}),r.fail(function(){t.trigger("show:alert",{type:"error",message:e("There was a problem signing the server out.")})}),r.promise()}return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(8),n(35)],r=function(e,t,n,i,r){"use strict";function a(a){var s=t.Deferred(),o=a.cloudAccount;o.set("signedIn",!1),o.set({username:"",email:"",password:""});var l=o.save({username:a.username,email:a.email,password:a.password});return l.done(function(t){
var a=e.isObject(t)?t:r.parseXML(t);if(a&&"invalid"===a.signInState){var l;r.parseArray(a,"Error"),l=a.Error.length?e.first(a.Error).error:n("This account information is invalid."),i.trigger("show:alert",{type:"error",message:l}),s.reject()}else o.set("signedIn",!0),s.resolve()}),l.fail(function(e){i.trigger("show:alert",{type:"error",message:n("There was a problem signing up for a Plex account.")}),s.reject(e)}),s.promise()}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;
i=[n(5),n(26)],r=function(e,t){"use strict";function n(n){var i,r=n.server,a=n.connection,s=r.get("friendlyName"),o=(new Date).getTime(),l=r.resolveUrl("/web/img/blank.png?cb="+o,{connection:a}),u=e.Deferred();t("[Servers] Testing image for %s at %s",s,l);var c=new Image;return c.onload=function(){c.onload=c.onerror=c.onabort=null,i=clearTimeout(i),t.info("[Servers] Image test for %s at %s was successful",s,l),u.resolve(r,a)},c.onerror=c.onabort=function(){c.onload=c.onerror=c.onabort=null,i=clearTimeout(i),
t.warn("[Servers] %s at %s unavailable",s,l),u.reject(r,a)},i=setTimeout(function(){c.onload=c.onerror=c.onabort=null,c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",t.warn("[Servers] %s at is unavailable (Timeout)",s,l),u.reject(r,a)},5e3),c.src=l,u.promise()}return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=c.default.get("dismissedUnclaimedServers"),n=t.indexOf(e.id)>-1,i=s.default.history.getFragment();n||/^\!\/setup/.test(i)||l.default.trigger("show:bar","alertbar",new h.default({
model:e}))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(37),s=r(a),o=n(8),l=r(o),u=n(31),c=r(u),d=n(1098),h=r(d);e.exports=t.default},function(e,t,n){var i,r;i=[n(8),n(1250)],r=function(e,t){"use strict";function n(n){e.trigger("show:modal",new t({collection:n.collection}))}return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(6),n(8),n(36),n(194)],r=function(e,t,n,i,r,a,s){"use strict";function o(a){function s(){
var e=o.save(null,{force:!0});o.trigger("destroy",o,c),e.done(function(){f.fetch(),p.get("friends").fetch(),p.get("sentInvites").fetch(),o.get("server")&&p.server.get("resources").fetch(),m.resolve()}),e.fail(function(e){r.trigger("show:alert",{type:"error",message:i("There was a problem accepting this invite.")}),c.add(o,{at:d}),m.reject(e)})}var o=a.invite,c=o.collection,d=c.indexOf(o),h=n.resolve("appModel"),p=h.get("user"),f=p.get("homeUsers"),m=t.Deferred();e.extend(a,{homeUsers:f,signedInHomeUser:f.get(p.id)
});var v=l(a);return v.done(function(){u(a).always(s)}),v.fail(function(){m.reject()}),m.promise}function l(e){if(!e.invite.get("home"))return t.Deferred().resolve().promise();var n;n=i(e.homeUsers.length>1?e.signedInHomeUser.get("admin")?"You are the admin in your current home. If you leave, the remaining users will be removed and managed users will be deleted.":"Are you sure you want to join this home? You will leave your current home.":"The admin of this home will have access to your account. Other users of this home will be able to switch to your account by entering your PIN.");
var s=new a({title:i("Join Home"),message:n,confirmLabel:i("Join"),cancelLabel:i("Cancel"),hasDanger:!0});return r.trigger("show:modal",s),s.promise}function u(e){if(e.invite.get("home")&&!e.signedInHomeUser.get("protected")){var n=new s({model:e.signedInHomeUser,isEditing:!0,isEditWarning:!0});return r.trigger("show:modal",n),n.promise}return t.Deferred().resolve().promise()}return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(6),n(8),n(13),n(36)],r=function(e,t,n,i,r){
"use strict";function a(r){var a=r.syncItem,o=r.server;if(!a.server.get("connected"))return n.trigger("show:alert",{type:"error",message:t("Please sign in to remove sync items.")}),e.Deferred().reject().promise();var l=s(),u=l.promise.then(function(){var e=a.destroy();return e.fail(function(e){n.trigger("show:alert",{type:"error",message:t("There was a problem removing this sync item.")})}),e.always(function(){l.hide()}),e});return u=u.then(function(){return i.execute("refreshSyncItems",{server:o,
silent:!0,skipContent:!0})})}function s(){var e=new r({title:t("Stop Syncing"),message:t("Are you sure you want to stop syncing this item? All files created by this job will be removed from the device."),confirmLabel:t("Remove"),cancelLabel:t("Cancel"),async:!0,hasDanger:!0});return n.trigger("show:modal",e),e}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(81),n(13),n(270)],r=function(e,t,n,i,r,a){"use strict";function s(){return o().then(l).then(u);
}function o(){var e=t.Deferred(),i=n.resolve("appModel"),r=i.get("user"),s=!!r.get("subscription").get("features").get("home");if(s||r.get("homeUsers").length>1){var o=r.get("homeUsers").findWhere({guest:!0}),l=r.get("homeDetails");if(o)e.resolve(o);else{var u=l.populate();u.done(function(){o=new a({id:l.get("guestUserID"),guest:!0},{server:r.server}),e.resolve(o)}),u.fail(function(){e.reject()})}}else e.reject();return e.promise()}function l(e){return r.execute("authenticateWithServer",{homeUser:e
})}function u(e){var i=t.Deferred(),r=n.resolve("appModel"),a=r.get("user"),s=a.clearAccessToken();return s.always(function(){var t=a.signIn(e);t.always(function(){i.resolve()})}),i.promise()}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(3),n(10),n(6),n(8),n(22)],r=function(e,t,n,i,r,a){"use strict";function s(s){var o=n.resolve("appModel"),l=o.get("user"),u=[],c={url:s.item.get("url"),message:s.message};t.each(s.playlistIDs,function(n){var i=a.join(["/pms/playlists/",n,"/items"],c),r=t.extend(l.server.getXHROptions(i),{
type:"POST"});u.push(e.ajax(r))});var d=e.when.apply(e,u);return d.fail(function(e){r.trigger("show:alert",{type:"error",message:i("There was a problem recommending this item.")})}),d.promise()}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(10),n(6),n(8),n(36)],r=function(e,t,n,i){"use strict";function r(t){function i(){var n=r.destroy({wait:!0});return n.done(function(){if(r.get("server")){var t=e.resolve("appModel"),n=t.get("user");n.get("friends").fetch()}}),n.fail(function(){
s(t)}),n.always(function(){o.hide()}),n.promise()}var r=t.invite,o=a(t),l=o.promise;return l=l.then(function(){return i()}),n.trigger("show:modal",o),l}function a(e){var n,r;"requests"===e.subset?(n=t("Reject Invite"),r=t("Are you sure you want to reject this invite?")):(n=t("Cancel Invite"),r=t("Are you sure you want to cancel this invite?"));var a=new i({title:n,message:r,async:!0});return a}function s(e){var i;i=t("requests"===e.subset?"There was a problem rejecting this invite.":"There was a problem canceling this invite."),
n.trigger("show:alert",{type:"error",message:i})}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(6),n(8),n(36)],r=function(e,t,n){"use strict";function i(i){function r(){var n=s.destroy({wait:!0});return n.fail(function(){t.trigger("show:alert",{type:"error",message:e("There was a problem removing this device.")})}),n.always(function(){o.hide()}),n.promise()}var a,s=i.device;a=e(s.get("isCloudSync")?"Deleting the Cloud Sync entry will stop Plex from being able to access any existing Cloud Sync content. You will need to create and upload new sync items.":"If you remove this device, you will need to sign in again on the device to restore access to Plex.");
var o=new n({title:e("Remove Device"),message:a,confirmLabel:e("Remove"),cancelLabel:e("Cancel"),async:!0,hasDanger:!0}),l=o.promise;return l=l.then(function(){return r()}),t.trigger("show:modal",o),l}return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(10),n(6),n(8),n(175),n(36)],r=function(e,t,n,i,r){"use strict";function a(i){function r(){o&&a.set("home",!1);var i=a.destroy({wait:!0});return i.done(function(){var t=e.resolve("appModel"),n=t.get("user"),i=a.get("serverShares");
if(n.get("invites").fetch(),n.get("sentInvites").fetch(),o){var r=n.get("homeUsers");r.fetch()}i.getLibraryCount({owned:!1})&&n.server.get("resources").fetch()}),i.fail(function(){o&&a.set("home",!0),n.trigger("show:alert",{type:"error",message:t("There was a problem removing this friend.")})}),i.always(function(){l.hide()}),i.promise()}var a=i.friend,o=a.get("home"),l=s(i),u=l.promise;return u=u.then(function(){return r()}),n.trigger("show:modal",l),u}function s(n){var a=n.friend,s=a.get("serverShares"),o=s.getLibraryCount({
owned:!0}),l=s.getLibraryCount({owned:!1}),u=o+l,c=a.get("title"),d=t("Are you sure you want to remove {1}?",c),h=i(t("library"),u,t("libraries"));if(o&&l?d+=" "+t("You are sharing {1} {2} with each other.",u,h):o?d+=" "+t("You are sharing {1} {2} with this friend.",o,h):l&&(d+=" "+t("This friend is sharing {1} {2} with you.",l,h)),a.get("home")){var p=e.resolve("appModel"),f=p.get("user"),m=f.get("homeUsers"),v=m.get(f.id);d+=v.get("admin")?" "+t("This friend will be removed from your home."):" "+t("You will be leaving your home.");
}var g=new r({title:t("Remove Friend"),message:d,confirmLabel:t("Remove"),cancelLabel:t("Cancel"),async:!0,hasDanger:!0});return g}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(6),n(8),n(36)],r=function(e,t,n,i,r,a){"use strict";function s(i){function a(){var n=e.extend(s.server.getXHROptions(s.url()),{type:"DELETE"}),r=t.ajax(n);return r.done(function(){var e=h.get(s.id);e?(s.trigger("destroy",s,d),s.get("restricted")?e.trigger("destroy",e,h):e.set("home",!1)):(d.reset([s]),
s.set("admin",!0),h.each(function(e){e.set("home",!1)}));var t=c.hasHome();if(c.set("home",t),!t){var n=c.get("homeDetails");n.clear()}}),r.fail(function(){l(i)}),r.always(function(){p.hide()}),r.promise()}var s=i.homeUser,u=n.resolve("appModel"),c=u.get("user"),d=c.get("homeUsers"),h=c.get("friends"),p=o(i),f=p.promise;return f=f.then(function(){return a()}),r.trigger("show:modal",p),f}function o(e){var t,n,r,s=e.homeUser;e.isSignedInUser?(t=i("Leave Home"),r=i("Leave"),n=i(s.get("admin")?"You are the admin in this home. If you leave, the remaining users will be removed and managed users will be deleted.":"Are you sure you want to leave this home?")):(t=i("Remove User"),
r=i("Remove"),n=i(s.get("restricted")?"Removing a managed user from your home will delete the managed user. Watched status for this user will be lost. This cannot be undone.":"You will no longer be able to switch to this user."));var o=new a({title:t,message:n,confirmLabel:r,cancelLabel:i("Cancel"),async:!0,hasDanger:!0});return o}function l(e){var t;t=i(e.isSignedInUser?"There was a problem leaving this home.":"There was a problem removing this user."),r.trigger("show:alert",{type:"error",message:t
})}return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(10),n(6),n(8),n(36)],r=function(e,t,n,i){"use strict";function r(r){function a(){var i=l.destroy({wait:!0});return i.done(function(){var t=e.resolve("appModel"),n=t.get("user");n.get("friends").fetch(),n.get("invites").fetch(),n.server.get("resources").fetch()}),i.fail(function(){var e;e=t(l.get("owned")?"There was a problem removing this share.":"There was a problem leaving this server."),n.trigger("show:alert",{type:"error",
message:e})}),i.always(function(){u.hide()}),i.promise()}var s,o,l=r.serverShare;l.get("owned")?(s=t("Stop Sharing"),o=t("Are you sure you want to stop sharing with this friend?")):(s=t("Leave Server"),o=t("Are you sure you want to leave this server? You can rejoin at any time."));var u=new i({title:s,message:o,async:!0,hasDanger:!0}),c=u.promise;return c=c.then(function(){return a()}),n.trigger("show:modal",u),c}return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(3),n(10),n(6),n(8),n(22)],
r=function(e,t,n,i,r,a){"use strict";function s(s){var o=n.resolve("appModel"),l=o.get("user"),u=[],c={url:s.item.get("url"),message:s.message};t.each(s.networkIDs,function(n){var i=a.join(["/pms/social/networks/",n,"/share"],c),r=t.extend(l.server.getXHROptions(i),{type:"POST"});u.push(e.ajax(r))});var d=e.when.apply(e,u);return d.fail(function(e){r.trigger("show:alert",{type:"error",message:i("There was a problem sharing this item.")})}),d.promise()}return s}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(3),n(5)],r=function(e,t){"use strict";function n(n){var i,r=n.user,a=n.serverShare,s=a.get("Section");if(!s||!s.length)return t.Deferred().resolve().promise();i=a.get("allLibraries")?[]:e.pluck(e.where(s,{shared:!0}),"id");var o={server_id:a.get("machineIdentifier"),shared_server:{library_section_ids:i}};r.isNew()&&(o.sharing_settings=r.getSaveParams()),a.isNew()&&(r.isNew()?o.shared_server.invited_email=r.get("username"):o.shared_server.invited_id=r.id);var l=a.url(),u=e.extend(r.server.getXHROptions(l),{
type:a.isNew()?"POST":"PUT",contentType:"application/json",data:JSON.stringify(o)});return t.ajax(u).promise()}return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=(0,o.resolve)("appModel").get("user"),n=t.get("homeUsers"),i=n.get(t.id);if(i.get("protected")||n.length>1)return s.default.Deferred().reject().promise();var r=new d.default({model:i,isEditing:!0,isEditWarning:!0});return r.promise.always(function(e){e||u.default.trigger("show:modal",new p.default({
type:"home"}))}),u.default.trigger("show:modal",r),r.promise}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o=n(10),l=n(8),u=r(l),c=n(194),d=r(c),h=n(521),p=r(h);t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(10),n(6),n(8),n(518),n(520),n(1245)],r=function(e,t,n,i,r,a,s){"use strict";function o(o){var l=t.resolve("appModel"),u=l.get("user"),c=o.item.server;if("ok"!==c.get("myPlexSigninState")){var d=n("This server needs to be connected to Plex to sync its content.");
return void i.trigger("show:alert",{type:"error",message:d})}if(!c.get("allowSync"))return void i.trigger("show:modal",new r({model:c}));var h=u.get("devices"),p=h.filterSyncDevices(o.item),f=e.clone(o);if(p.length>1){var m=new s({collection:p}),v=m.promise;v.done(function(e){f.device=p.get(e),i.trigger("show:modal",new a(f))}),i.trigger("show:modal",m)}else f.device=p.first(),i.trigger("show:modal",new a(f))}return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(){
var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=(0,u.resolve)("appModel").get("user"),n=s.default.pick(e,"username","email","password"),i=t.server.getXHROptions("/api/v2/users",{type:"POST",data:n}),r=l.default.ajax(i).promise();return r=r.then(function(n){return e.remember?d.default.restorePrevious():d.default.register(p.default.getInstance()),t.signIn(n,{lockState:P.default.lockStates.UNLOCKED})}),r.fail(function(e){var t=void 0;if(422===e.status){var n=e.responseText&&b.default.parseXML(e.responseText),i=n&&n.error,r=s.default.isArray(i)?s.default.first(i):i;
t=r?s.default.isObject(r)?(0,w.getErrorText)(r):r:(0,m.default)("This account information is invalid.")}else t=(0,m.default)("There was a problem connecting to Plex.");g.default.trigger("show:alert",{type:"error",message:t})}),r}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(5),l=r(o),u=n(10),c=n(81),d=r(c),h=n(205),p=r(h),f=n(6),m=r(f),v=n(8),g=r(v),y=n(53),b=r(y),w=n(217),S=n(126),P=r(S);t.default=i,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(6),n(8),n(35),n(13)],
r=function(e,t,n,i,r){"use strict";function a(a){var s=a.user,o=s.get("homeDetails"),l=s.get("homeSize");o.set("guestEnabled",a.enable);var u=o.save();return u.done(function(){s.get("homeUsers").fetch(),s.get("friends").fetch(),s.hasHome()||r.execute("showHomeWarningsModal"),a.enable||2!==l||o.clear()}),u.fail(function(r){var s=i.parseXML(r.responseText),o=s&&s.status;e.isString(o)||(o=t(a.enable?"Unable to enable guest account":"Unable to disable guest account")),n.trigger("show:alert",{type:"error",
message:o})}),u}return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(35)],r=function(e,t,n){"use strict";function i(i){var r=t.Deferred(),a="/api/users/validate?invited_email="+encodeURIComponent(i.username),s=e.extend(i.server.getXHROptions(a),{type:"POST"}),o=t.ajax(s);return o.done(function(){r.resolve()}),o.fail(function(e){var t=e.responseText,i=n.parseXML(t);r.reject(e,i&&i.status)}),r.promise()}return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),a=i(r),s=n(965),o=i(s),l=n(961),u=i(l);n(964);var c=new a.default.Application;c.addInitializer(function(){return(0,o.default)().then(function(){return(0,u.default)()})}),t.default=c,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={allowFlash:!0,allowServerUpdates:!0,allowHttpsMediaServerConnections:!0,allowCloudSyncServers:!0,shouldCreateFlexModels:!0,
shouldCreateStateTree:!0};t.default=n,e.exports=t.default},function(e,t,n){"use strict";function i(){l.default.trigger("initialize:app");var e=(0,c.default)();return e=e.then(h.default),e=e.then(f.default),e=e.then(v.default),e=e.then(y.default),e=e.then(w.default),e=e.then(P.default),e=e.then(C.default),e=e.then(_.default),e=e.then(k.default),e=e.then(A.default),e=e.then(D.default),e=e.then(O.default),s.default.mobile&&(e=e.then(N.default)),e=e.then(F.default),e=e.then(B.default)}var r=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(61),s=r(a),o=n(8),l=r(o),u=n(967),c=r(u),d=n(976),h=r(d),p=n(963),f=r(p),m=n(971),v=r(m),g=n(677),y=r(g),b=n(675),w=r(b),S=n(966),P=r(S),x=n(968),C=r(x),T=n(970),_=r(T),E=n(972),k=r(E),I=n(678),A=r(I),M=n(975),D=r(M),R=n(969),O=r(R),L=n(974),N=r(L),U=n(973),F=r(U),j=n(977),B=r(j);n(642),n(639),n(641),n(638),n(640),e.exports=t.default},function(e,t,n){"use strict";function i(){u.default.register(new d.default),p.default.register(new m.default),
(0,o.registerAll)({metrics:[b.default,g.default],testServerConnection:S.default}),(0,o.registerAll)({UserFlexModel:E.default,ServerFlexModel:I.default});var e=new T.default;return(0,o.registerAll)({appModel:e,appStore:(0,x.default)(e),logs:new M.default([],{parent:e})}),(0,o.registerAll)({serverManager:new R.default({appModel:e}),primaryServerManager:new L.default({appModel:e}),manualServerManager:new U.default({appModel:e}),serverConnectionManager:new j.default({appModel:e}),serverConnectionTestManager:new z.default({
appModel:e}),serverUpdateManager:new H.default({appModel:e})}),s.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(5),s=r(a),o=n(10),l=n(31),u=r(l),c=n(483),d=r(c),h=n(141),p=r(h),f=n(477),m=r(f),v=n(651),g=r(v),y=n(649),b=r(y),w=n(658),S=r(w),P=n(1071),x=r(P),C=n(986),T=r(C),_=n(1036),E=r(_),k=n(1027),I=r(k),A=n(714),M=r(A),D=n(983),R=r(D),O=n(982),L=r(O),N=n(689),U=r(N),F=n(692),j=r(F),B=n(693),z=r(B),V=n(985),H=r(V);e.exports=t.default;
},function(e,t,n){"use strict";function i(){return u.default.registerAll(d),o.default.Deferred().resolve().promise()}var r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(5),o=r(s),l=n(13),u=r(l),c=n(900),d=a(c);e.exports=t.default},function(e,t,n){var i,r;i=[n(1865),n(1863),n(1864),n(1862),n(1866),n(1860),n(1861),n(4)],r=function(e,t,n,i,r,a,s,o){"use strict";o.registerPartial("setting",e),o.registerPartial("lockableTagInput",t),o.registerPartial("lockableTextInput",n),
o.registerPartial("lockableNumericInput",i),o.registerPartial("textInput",r),o.registerPartial("autocompleteTextInput",a),o.registerPartial("connectError",s)}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(){return(0,l.default)().then(function(){return s.default.registerAll()})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(883),s=r(a),o=n(962),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=(0,
s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(676),s=r(a),o=n(979),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=(0,s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(679),s=r(a),o=n(980),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function i(){
var e=(0,s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(680),s=r(a),o=n(981),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=(0,o.default)();return e.done(function(){(0,a.resolve)("serverUpdateManager").start()}),e}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(10),s=n(682),o=r(s);e.exports=t.default},function(e,t,n){
"use strict";function i(){var e=(0,a.resolve)("appModel").get("experienceSettings"),t=(0,u.default)();return t=t.then(function(){return(0,o.default)(e.populate())})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(10),s=n(109),o=r(s),l=n(683),u=r(l);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=l.default.Deferred(),t=h.default.get("myPlexAccessToken");return t.done(function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken||c.default.register(h.default.getInstance());
}),t.always(function(){e.resolve()}),e.promise()}function r(){var e=l.default.Deferred(),t=c.default.set("plexTestToken",1);return t.done(function(){c.default.remove("plexTestToken")}),t.fail(function(e){var t=new f.default;v.default.warn("Storage module swapped for "+t.storageName+' due to exception: "'+e+'"'),h.default.register(t),c.default.register(t,{ignorePrevious:!0})}),t.always(function(){e.resolve()}),e.promise()}function a(){return i().then(r).then(y.default)}var s=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a;var o=n(5),l=s(o),u=n(81),c=s(u),d=n(205),h=s(d),p=n(655),f=s(p),m=n(26),v=s(m),g=n(684),y=s(g);e.exports=t.default},function(e,t,n){"use strict";function i(){var e=(0,a.resolve)("appModel").get("user"),t=(0,o.default)();return t.done(function(){var t=new u.default(e);t.start();var n=new d.default;n.start()}),t}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(10),s=n(685),o=r(s),l=n(984),u=r(l),c=n(978),d=r(c);e.exports=t.default},function(e,t,n){
"use strict";function i(){function e(e){if((n||arguments[1]instanceof KeyboardEvent&&"esc"===arguments[2])&&h.default.get("keyboardShortcuts"))return e.apply(t,s.default.toArray(arguments).slice(1))}var t=f.default.getInstance(),n=!0;return v.default.on("anyModalOpen",function(){n=!1}),v.default.on("allModalsClosed",function(){n=!0}),s.default.each(t.shortcuts,function(n){c.default.bind(n.keys,s.default.wrap(t[n.fn],e))}),l.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=i;var a=n(3),s=r(a),o=n(5),l=r(o),u=n(1934),c=r(u),d=n(31),h=r(d),p=n(258),f=r(p),m=n(8),v=r(m);e.exports=t.default},function(e,t,n){"use strict";function i(){function e(){s.default.each(m,function(t){document.body.removeEventListener(t,e,!0)});var n=t.src.slice(-f.default.length)===f.default;n&&t.play()}var t=(0,h.default)("audio",!0);try{t.style.cssText="position:absolute;width:1px;height:1px;",t.setAttribute("src",f.default)}catch(n){c.default.error("An error occurred trying to initialize the audio element.");
}return s.default.each(m,function(t){document.body.addEventListener(t,e,!0)}),l.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(3),s=r(a),o=n(5),l=r(o),u=n(26),c=r(u),d=n(432),h=r(d),p=n(1647),f=r(p),m=["touchstart","mousedown","mousemove","click","keydown","keypress"];e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=!e.get("isShared")||e.supports("sharedSyncStatus");return e.get("isFullServer")&&t;
}function r(){var e=new h.default({name:"MediaServerEventManager",appModel:(0,l.resolve)("appModel"),isValidServer:i,supportsLongPolling:!1,showTimelineStatus:!0,ServerEventConnection:c.default,ServerRetryManager:f.default});return e.start(),o.default.Deferred().resolve().promise()}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(5),o=a(s),l=n(10),u=n(1078),c=a(u),d=n(385),h=a(d),p=n(384),f=a(p);e.exports=t.default},function(e,t,n){"use strict";function i(){
return new l.default,s.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(5),s=r(a),o=n(819),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function i(){return new c.default,new h.default,new f.default,new v.default,new y.default,new w.default,new P.default,new C.default,l.default.history.start(),s.default.Deferred().resolve().promise()}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;
var a=n(5),s=r(a),o=n(37),l=r(o),u=n(1043),c=r(u),d=n(1051),h=r(d),p=n(1045),f=r(p),m=n(1041),v=r(m),g=n(1047),y=r(g),b=n(1049),w=r(b),S=n(1039),P=r(S),x=n(1053),C=r(x);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(10),o=n(29),l=i(o),u=n(8),c=i(u),d=n(50),h=i(d),p=n(1097),f=i(p),m=l.default.extend({mixins:h.default,announcementsUpdateDelay:36e5,initialize:function(){this.user=(0,s.resolve)("appModel").get("user"),
a.default.bindAll(this,"updateAnnouncements","onSignedInChange")},start:function(){var e=a.default.debounce(this.onAnnouncementsChange),t=a.default.debounce(this.onSignedInChange);this.listenTo(this.user,{"change:signedIn":t,"change:announcements":e,"change:announcements.reset":e,"change:announcements.update":e,"change:announcements.change:read":e,"change:announcements.change:priority":e}),this.user.populate().fail(t)},stop:function(){clearTimeout(this.announcementsUpdateTimeout),this.user.get("announcements").reset(),
this.stopListening()},updateAnnouncements:function(){!this.user.get("restricted")&&this.user.server.get("isConnected")&&(this.user.get("announcements").fetch(),this.announcementsUpdateTimeout&&clearTimeout(this.announcementsUpdateTimeout),this.announcementsUpdateTimeout=setTimeout(this.updateAnnouncements,this.announcementsUpdateDelay))},onSignedInChange:function(){this.user.get("announcements").reset(),this.updateAnnouncements()},onAnnouncementsChange:function(){if(this.user.get("isSignedIn")&&!this.user.get("restricted")){
var e=this.user.get("announcements"),t=e.findWhere({style:"priority",read:!1});t&&c.default.trigger("show:bar","alertbar",new f.default({model:t}))}}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),a=i(r),s=n(139),o=i(s),l=n(686),u=i(l),c=n(307),d=i(c),h=u.default.extend({mixins:d.default,start:function(){u.default.prototype.start.apply(this,arguments),this.listenTo(a.default,"show:modal",this.onShowModal),
this.handleCollectUsageData(o.default)},onShowModal:function(e){e.name&&o.default.trackView(e.name)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(257),a=i(r),s=n(688),o=i(s),l=n(307),u=i(l),c=o.default.extend({mixins:u.default,start:function(){o.default.prototype.start.apply(this,arguments),this.handleCollectUsageData(a.default)}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),a=n(690),s=i(a),o=n(307),l=i(o),u=s.default.extend({mixins:l.default,start:function(){s.default.prototype.start.apply(this,arguments),this.handleCollectUsageData((0,r.resolve)("metrics"))}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),a=i(r),s=n(691),o=i(s),l=o.default.extend({fetchPrimaryRelations:function(e){var t=this,n=e.get("isFullOwnedServer"),i=e.get("isShared")&&e.supports("sharedSettings");
if((n||i)&&!function(){var n=e.get("settings");n.populate().done(function(){var i=t.appModel.get("primaryServer");i&&i.id===e.id&&t.handlePrimarySettings(e,n)})}(),n){var r=e.get("sessions");r.fetch({reset:!0})}var a=e.get("home"),s=e.get("activeConnection"),o=s.get("isPrivate")||n||a;if(o){var l=this.appModel.get("players");l.reset(),l.setContext("server",e),l.fetch()}},handlePrimarySettings:function(e,t){var n=e.get("shared"),i=t.get("AcceptedEULA"),r=i&&i.get("value")===!1;!n&&r&&a.default.execute("showTermsOfService",{
collection:t})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(694),a=i(r),s=n(13),o=i(s),l=a.default.extend({start:function(){a.default.prototype.start.call(this),this.listenTo(this.servers,"change:isClaimed",this.onClaimedChange)},onClaimedChange:function(e,t){var n=e.get("isFullOwnedServer")&&e.get("isConnected"),i=t===!1&&!e.previous("isClaimed");n&&i&&o.default.execute("showClaimServerAlertBar",e)}});
t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),s=r(a),o=n(8),l=r(o),u=n(6),c=r(u),d=n(13),h=r(d),p=n(687),f=r(p),m=n(36),v=r(m),g=n(194),y=r(g),b=f.default.prototype,w=f.default.extend({collectionNames:["devices","friends","homeDetails","homeUsers","invites","socialNetworks"],onIsSignedInChange:function(e,t){if(b.onIsSignedInChange.apply(this,arguments),e.get("isFullUser")&&t){var n=e.server.getXHROptions("/api/claim/subscribe");
s.default.ajax(i({},n,{type:"POST"}))}},onIsLockedChange:function(e,t){b.onIsLockedChange.apply(this,arguments),t&&l.default.trigger("show:modal",new y.default({isForced:!0}))},onIsUnlockedChange:function(e,t){t&&h.default.execute("resumePlayQueue",e)},onHasInvalidTokenChange:function(e,t){if(t){var n=new v.default({title:(0,c.default)("Invalid Credentials"),message:(0,c.default)("Your credentials have expired. Please sign in again."),confirmLabel:(0,c.default)("OK"),cancelLabel:(0,c.default)("Ignore")
});n.promise.done(function(){l.default.trigger("navigate","login",{silent:!0})}),l.default.trigger("show:modal",n)}}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(29),o=i(s),l=n(8),u=i(l),c=n(31),d=i(c),h=n(50),p=i(h),f=n(13),m=i(f),v=n(1099),g=i(v),y=o.default.extend({mixins:[p.default],bundleUpdatesDelay:36e5,initialize:function(e){this.appModel=e.appModel},start:function(){this.stop(),this.listenTo(this.appModel,{
"change:primaryServer":this.onPrimaryServerChange,"change:primaryServer.change:isConnected":this.onPrimaryServerConnectedChange})},stop:function(){this.stopListening()},isLastHistoryEntry:function(e){var t=this.appModel.get("history"),n=a.default.last(t);return!(!n||!n.indexOf("fragment"))},isLastDismissedVersion:function(e){var t=e.get("shortVersion")||"unknown";return t===d.default.get("serverUpdateDismissedVersion")},checkForServerUpdates:function(e){if(e.get("isConnected")){var t=e.get("update");
e.supports("updater")?t.fetch().then(function(){m.default.execute("checkForServerUpdates",{server:e,download:!1})}):this.isLastDismissedVersion(t)||u.default.trigger("show:bar","alertbar",new g.default({model:t}))}},onPrimaryServerChange:function(e,t){var n=e.previous("primaryServer");return n&&this.stopListening(n.get("update")),t&&t.get("isFullOwnedServer")?(this.listenTo(t.get("update"),"change:state",this.onServerUpdateStateChange),void this.checkForServerUpdates(t)):void clearTimeout(this.bundleUpdatesTimeout);
},onPrimaryServerConnectedChange:function(e,t){this.checkForServerUpdates(e)},onServerUpdateStateChange:function(e,t){this.isLastDismissedVersion(e)||this.isLastHistoryEntry("/settings/server")||/^(available|downloaded|notify)$/.test(t)&&u.default.trigger("show:bar","alertbar",new g.default({model:e}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(19).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(231),o=r(s),l=n(851),u=a(l),c=n(18),d=a(c),h=n(707),p=a(h),f=n(745),m=a(f),v=n(407),g=a(v),y=n(404),b=a(y),w=n(1018),S=a(w),P=n(1030),x=a(P),C=n(1031),T=a(C),_=p.default.extend({
name:"DesktopAppModel",sessionAttrs:i({},p.default.prototype.sessionAttrs,{isFirstRun:d.default.boolean.isRequired,isCastApiAvailable:d.default.boolean.isRequired,isCastDeviceAvailable:d.default.boolean.isRequired,primaryPlayer:d.default.instanceOf(g.default,b.default)}),sessionRelations:i({},p.default.prototype.sessionRelations,{entities:{relationClass:(0,u.default)(o)},players:{relationClass:m.default},multiSelect:{relationClass:S.default},experienceSettings:{relationClass:x.default},ui:{relationClass:T.default
}}),defaults:function(){var e=p.default.prototype.defaults.apply(this,arguments);return i({},e,{isFirstRun:!1,isCastApiAvailable:!1,isCastDeviceAvailable:!1})}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(22),l=r(o),u=n(25),c=i(u),d=n(988),h=i(d),p=c.default.extend({name:"DownloadServerCollection",context:["server"],url:function(){var e=s.default.result(this.server,"url");return l.join([e,"api/downloads/1"]);
},model:h.default});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(989),u=i(l),c=o.default.extend({name:"DownloadServerModel",context:["server"],rootPropertyName:"Type",idAttribute:"name",syncedAttrs:{name:a.default.string},syncedRelations:{platforms:{rootPropertyName:"Platform",relationClass:u.default,options:function(e){return{type:e.name}}}}});t.default=c,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(990),o=i(s),l=a.default.extend({name:"DownloadServerPlatformCollection",context:["server","type"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(18),o=a(s),l=n(20),u=a(l),c=n(991),d=a(c),h=u.default.extend({name:"DownloadServerPlatformModel",
context:["server","type"],rootPropertyName:"Platform",idAttribute:"id",syncedAttrs:{id:o.default.string,name:o.default.string,version:o.default.string,date:o.default.integer,requirements:o.default.string,fixed:o.default.string,added:o.default.string,info:o.default.string},syncedRelations:{releases:{rootPropertyName:"Release",relationClass:d.default}},derivedAttrs:{type:function(){return this.type}},augmentResponse:function(e){var t=e.release_date,n=e.extra_info,a=e.items_fixed,s=e.items_added,o=r(e,["release_date","extra_info","items_fixed","items_added"]);
return i({},o,{info:n,fixed:a,added:s,date:t+"000"})}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(992),o=i(s),l=a.default.extend({name:"DownloadServerReleaseCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({
name:"DownloadServerReleaseModel",context:["server"],modelId:function(){return this.get("build")+"-"+this.get("distro")},syncedAttrs:{label:a.default.string,build:a.default.string,distro:a.default.string,url:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(25),n(994)],r=function(e,t,n){"use strict";var i=t.extend({name:"ArtworkCollection",context:["server","artworkType"],model:n,url:function(){var t=e.result(this.parent,"url");return t+"/"+this.artworkType+"s";
}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(18),n(20)],r=function(e,t){"use strict";var n={POSTER:"poster",ART:"art",BANNER:"banner"},i=t.extend({name:"ArtworkModel",context:["server","artworkType"],idAttribute:"ratingKey",rootPropertyName:"Photo",syncedAttrs:{key:e.string,ratingKey:e.string,thumb:e.string,selected:e.boolean}},{types:n});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(18),n(20)],r=function(e,t){"use strict";var i=t.extend({
name:"FilePathModel",context:["server"],idAttribute:"key",rootPropertyName:"Path",sessionAttrs:{isBackShortcut:e.boolean},sessionRelations:{children:function(){return{relationClass:n(484),options:{url:this.id}}}},syncedAttrs:{key:e.string,title:e.string,path:e.string,home:e.boolean,network:e.boolean}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(18),n(20)],r=function(e,t){"use strict";var i=t.extend({name:"MatchResultModel",context:["server"],idAttribute:"guid",
rootPropertyName:"SearchResult",syncedAttrs:{id:e.integer,guid:e.string,name:e.string,parentGUID:e.string,parentName:e.string,type:e.string,index:e.integer,score:e.integer,thumb:e.string,year:e.integer,matched:e.boolean},syncedRelations:{children:function(){return{relationClass:n(485),rootPropertyName:"SearchResult"}}},derivedAttrs:{normalizedScore:function(){var e=this.get("score");if(null!=e)return Math.min(Math.max(e,0),100)}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(3),n(5),n(22),n(718),n(1001)],r=function(e,t,n,i,r){"use strict";var a=i.extend({defaults:function(){return{children:new r([],{server:this.server,parent:this})}},findItem:function(e){return this.get("children").get(e)},addContent:function(i){var r=[e.result(this,"url"),"items",i.id],a=n.join(r,i.getSaveParams()),s=e.extend(i.server.getXHROptions(a),{type:"PUT"}),o=t.ajax(s);return o.then(e.bind(function(e){this.set(this.parse(e))},this)),o.promise()}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(3),n(5),n(8),n(35),n(22),n(208),n(262)],r=function(e,t,n,i,r,a,s){"use strict";var o=a.extend({whitelistedAttrs:["playQueueID","playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","playQueueLastAddedItemID","playQueueShuffled","playQueueSourceURI","playQueueTotalCount","playQueueVersion","message"],defaults:function(){return{selectedItem:null,mediaType:null,owned:!0,hasUserAdditions:!1,playQueueVersion:0}},metadataElementNames:["Directory","Video","Track","Photo","Hub"],
url:function(){return"/playQueues/"+this.id},initialize:function(){this.listenTo(this,"change:message",this.onMessageChange)},convert:function(t){var n=e.isObject(t)?t:i.parseXML(t);return i.parseBoolean(n,"playQueueShuffled"),i.parseInteger(n,["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueTotalCount","playQueueVersion"]),i.parseArray(n,"Metadata"),n},parse:function(t,n){e.isString(t)&&(t=i.replaceXMLElementNames(t,this.metadataElementNames,"Metadata"));var r=this.convert(t);r.id&&(r.playQueueID=r.id);
var a=e.pick(r,this.whitelistedAttrs);return this.set(a,{silent:!0}),this.pendingChanges=this.changed,this.parseItems(r),a},parseItems:function(t){var n=this.get("collection"),i=t.Metadata,r=!!i.length,a=e.pluck(i,"playQueueItemID").indexOf(t.playQueueSelectedItemID),o=t.playQueueSelectedItemOffset,l=o-a;e.each(i,function(e,n){e.queueIndex=l+n,t.identifier&&(e.identifier=t.identifier),t.mediaTagPrefix&&(e.mediaTagPrefix=t.mediaTagPrefix),t.mediaTagVersion&&(e.mediaTagVersion=t.mediaTagVersion)}),
n?n.set(i,{parse:r}):(n=new s(i,{server:this.server,parent:this,parse:r}),this.set("collection",n)),n.totalSize=t.playQueueTotalCount,n.availableRange={start:l,end:l+n.length}},moveItem:function(n,i){if(n===this.get("playQueueSelectedItemID"))return t.Deferred().resolve().promise();this.set("hasUserAdditions",!0);var a={after:i||-1},s=r.join([e.result(this,"url"),"/items/",n,"/move"],a);return this._ajax("PUT",s)},queueContent:function(){throw new Error("Clients cannot queue background processing items.");
},addContent:function(){throw new Error("Clients cannot add background processing items.")},removeItem:function(){throw new Error("Clients cannot remove background processing items directly. Generators (e.g. sync items) should be deleted.")},yieldOwnership:function(){throw new Error("Only the admin owns the background processing queue.")},takeOwnership:function(){throw new Error("Only the admin owns the background processing queue.")},getUpNextRange:function(){var e=this.get("collection"),t=e.get(this.get("playQueueSelectedItemID")),n=e.indexOf(t),i=Math.max(n,0),r=i,a=this.get("playQueueLastAddedItemID");
if(null!=a){var s=e.get(a),o=e.indexOf(s);o>i&&(r=o)}return{start:i,end:r}},_ajax:function(n,i){var r=e.extend(this.server.getXHROptions(i),{type:n}),a=t.ajax(r);return a.done(e.bind(function(t){this.set(this.parse(t)),e.isEmpty(this.pendingChanges)||(e.each(this.pendingChanges,function(e,t){this.trigger("change:"+t,this,e)},this),this.trigger("change",this),this.pendingChanges=null),this.set("selectedItem",this.getCurrentItem())},this)),a.promise()},onMessageChange:function(e,t){t&&n.trigger("show:alert",{
type:"error",message:t})}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({idAttribute:"key",whitelistedAttrs:["queueItemID","generatorID","targetTagID","syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","ratingKey","title","thumb"],convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return t.parseInteger(i,["queueItemID","generatorID","targetTagID","syncItemId","remaining","size"]),
t.parseFloat(i,["progress","speed"]),i},parse:function(t){var n=this.convert(t);return n=e.pick(n,this.whitelistedAttrs)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({idAttribute:"title",whitelistedAttrs:["title","selected"],convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return t.parseBoolean(i,"selected"),i},parse:function(t,n){var i=this.convert(t);return i=e.pick(i,this.whitelistedAttrs);
}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(22),n(128),n(60),n(179)],r=function(e,t,n,i){"use strict";var r=n.extend({model:i,url:function(){return e.join(["playlists",this.parent.id,"items"],{type:t.LOCAL})},parse:function(e){return this.convert(e,"Item")}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(1004),o=i(s),l=a.default.extend({
name:"VersionGeneratorMetadataCollection",context:["server","generator"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=i(a),o=n(53),l=i(o),u=n(22),c=r(u),d=n(168),h=i(d),p=n(18),f=i(p),m=n(64),v=i(m),g=n(20),y=i(g),b=n(1002),w=i(b),S=y.default.extend({mixins:[h.default],name:"VersionGeneratorMetadataListModel",context:["server","generator"],collectionName:"metadataItems",
url:function P(){var P=c.join([s.default.result(this.generator,"url"),"items"]);return this.getPaginatedUrl(P)},sessionAttrs:{currentPageStart:f.default.integer,currentPageSize:f.default.integer,populatedRange:f.default.object},syncedAttrs:{totalSize:f.default.integer,identifier:f.default.string,mediaTagPrefix:f.default.string,mediaTagVersion:f.default.string,viewGroup:f.default.string,title:f.default.string},syncedRelations:{metadataItems:{relationClass:w.default,rootPropertyName:"Metadata",setOptions:function(e){
return{remove:e.remove,at:e.at}}}},defaults:function(){return{populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===v.default.xml?l.default.replaceMetadataXMLElementNames(e):e}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(18),o=i(s),l=n(20),u=i(l),c=n(55),d=i(c),h=u.default.extend({name:"VersionGeneratorMetadataModel",
context:["server","generator"],idAttribute:"ratingKey",syncedAttrs:a.default.extend({},d.default.prototype.syncedAttrs,{processingState:o.default.string,processingStateContext:o.default.string})});t.default=h,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(35),n(45)],r=function(e,t,n){"use strict";var i=n.extend({whitelistedAttrs:["id","tag","tagType","MediaSettings","Device"],convert:function(n){var i=e.isObject(n)?n:t.parseXML(n);return i},parse:function(t,n){var i=this.convert(t);return i=e.pick(i,this.whitelistedAttrs);
}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(1007),o=i(s),l=a.default.extend({name:"LockedFieldCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"LockedFieldModel",context:["server","section"],
idAttribute:"name",syncedAttrs:{name:{type:a.default.string,save:!0},locked:{type:a.default.boolean,save:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"MetadataAutocompleteResultModel",context:["server","section","multiMetadataItem","query"],idAttribute:"ratingKey",rootPropertyName:"Metadata",syncedAttrs:{elementName:a.default.string,ratingKey:a.default.string,
parentRatingKey:a.default.string,grandparentRatingKey:a.default.string,type:a.default.string,title:a.default.string,parentTitle:a.default.string,grandparentTitle:a.default.string,tag:a.default.string,tagType:a.default.integer}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(49).default,r=n(340).default,a=n(2).default,s=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=a(o),u=n(129),c=a(u),d=n(22),h=s(d),p=n(39),f=a(p),m=n(18),v=a(m),g=n(20),y=a(g),b=n(738),w=a(b),S=n(1006),P=a(S),x={
album:{title:"title",parentRatingKey:"artist.id",parentTitle:"artist.title"},track:{parentRatingKey:"album.id",parentTitle:"album.title",grandparentRatingKey:"artist.id",grandparentTitle:"artist.title"}},C=y.default.extend({name:"MultiMetadataModel",context:["server","section"],rootPropertyName:"Common",isNew:function(){return!1},url:function(){return h.join([this.sectionUrl(),"common"],this.getUrlParams())},saveUrl:function(){return h.join([this.sectionUrl(),"all"],this.getUrlParams())},sectionUrl:function(){
return l.default.result(this.section,"url")},tagRelations:["Collection","Director","Producer","Writer","Genre","Mood","Country","Label","Similar","Role"],sessionAttrs:{metadataItems:v.default.array.isRequired,originalSaveParams:v.default.object,poster:v.default.string,banner:v.default.string,art:v.default.string},syncedAttrs:{mixedFields:v.default.list.isRequired,key:{type:v.default.string,save:!0},ratingKey:{type:v.default.string,save:!0},parentRatingKey:{type:v.default.string,save:!0},grandparentRatingKey:{
type:v.default.string,save:!0},title:{type:v.default.string,save:!0},titleSort:{type:v.default.string,save:!0},originalTitle:{type:v.default.string,save:!0},parentTitle:{type:v.default.string,save:!0},grandparentTitle:{type:v.default.string,save:!0},year:{type:v.default.string,save:!0},tagline:{type:v.default.string,save:!0},summary:{type:v.default.string,save:!0},studio:{type:v.default.string,save:!0},contentRating:{type:v.default.string,save:!0},originallyAvailableAt:{type:v.default.string,save:!0
},rating:{type:v.default.float,save:!0},userRating:{type:v.default.float,save:!0},index:{type:v.default.integer,save:!0},parentIndex:{type:v.default.integer,save:!0}},syncedRelations:{collections:{relationClass:w.default,rootPropertyName:"Collection",save:!0},directors:{relationClass:w.default,rootPropertyName:"Director",save:!0},producers:{relationClass:w.default,rootPropertyName:"Producer",save:!0},writers:{relationClass:w.default,rootPropertyName:"Writer",save:!0},genres:{relationClass:w.default,
rootPropertyName:"Genre",save:!0},moods:{relationClass:w.default,rootPropertyName:"Mood",save:!0},countries:{relationClass:w.default,rootPropertyName:"Country",save:!0},labels:{relationClass:w.default,rootPropertyName:"Label",save:!0},similar:{relationClass:w.default,rootPropertyName:"Similar",save:!0},roles:{relationClass:w.default,rootPropertyName:"Role",save:!0},lockedFields:{relationClass:P.default,rootPropertyName:"Field",save:!0}},derivedAttrs:{type:function(){var e=this.getSingleMetadataItem();
if(e)return e.get("type")},aggregateTitle:function(){var e=this.get("metadataItems");if(e.length)return c.default.title(null,{items:this.get("metadataItems")})},isSingleMetadataItem:function(){return 1===this.get("metadataItems").length}},defaults:function(){return{metadataItems:[],mixedFields:[]}},initialize:function(e,t){this.set("metadataItems",l.default.clone(t.metadataItems))},getSingleMetadataItem:function(){return l.default.first(this.get("metadataItems"))},getUrlParams:function(){var e=f.default.get(this.get("type")),t=l.default.map(this.get("metadataItems"),function(e){
return e.get("ratingKey")});return{type:e.id,id:t.join(",")}},getSaveParams:function(){var e=this,t=y.default.prototype.getSaveParams.apply(this,arguments),n=this.get("originalSaveParams");if(!n)return t;var i={};if(l.default.each(t,function(t,r){var a=n[r];l.default.isEqual(t,a)||l.default.extend(i,e.getSaveParam(r,t,a))}),i.isReparenting){delete i.isReparenting;var r=x[this.get("type")];l.default.each(r,function(t,n){var r=t+".value",a=e.getQueryAttrSibling(t),s=a+".value",o=l.default.has(i,r),u=l.default.has(i,s);
if(o&&u&&r!==s&&delete i[s],!o&&!u){var c=e.get(n);c&&(i[r]=c)}})}return i},getSaveParam:function(e,t,n){if("Field"===e)return this.getFieldSaveParams(e,t,n);if(this.tagRelations.indexOf(e)!==-1)return this.getTagSaveParams(e,t,n);var r=x[this.get("type")];{if(!r||!l.default.has(r,e))return i({},e+".value",t);var a=r[e];if(t)return i({isReparenting:!0},a+".value",t)}},getFieldSaveParams:function(e,t,n){var i=t.reduce(function(e,t){return e[t.name+".locked"]=t.locked,e},{});return i},getTagSaveParams:function(e,t,n){
var i=l.default.map(t,function(e){return e.tag}),a=l.default.map(n,function(e){return e.tag}),s=l.default.without.apply(l.default,[a].concat(r(i))),o=e.toLowerCase(),u={};return i.forEach(function(e,t){u[o+"["+t+"].tag.tag"]=e}),s.length&&(u[o+"[].tag.tag-"]=l.default.map(s,encodeURIComponent).join(",")),u},getQueryAttr:function(e){var t=this.get("type"),n=x[t];return n?n[e]||e:e},getQueryAttrSibling:function(e){var t=this.getQueryAttr(e).match(/(^.*\.)(.*$)/);return t?t[1]+("id"===t[2]?"title":"id"):e;
}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(53),a=i(r),s=n(64),o=i(s),l=n(25),u=i(l),c=n(490),d=i(c),h=u.default.extend({name:"SyncMetadataCollection",context:["server","device","syncItemId"],model:d.default,url:function(){return"/sync/items/"+this.syncItemId},augmentResponseText:function(e,t){return t===o.default.xml?a.default.replaceMetadataXMLElementNames(e):e}});t.default=h,e.exports=t.default},function(e,t,n){
"use strict";function i(e){return e.pluck("results").reduce(function(e,t){return e.concat(t.toArray())},[])}var r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=r(s),l=n(18),u=r(l),c=n(64),d=r(c),h=n(22),p=a(h),f=n(53),m=r(f),v=n(20),g=r(v),y=n(491),b=r(y),w=g.default.extend({name:"QuickSearchModel",context:["server"],url:function(){return p.join("/hubs/search",{query:this.get("query"),sectionId:this.get("sectionID")})},defaults:{query:"",selectedResultEntityID:null,
isSearchPending:!1,isSearchPopulated:!1},sessionAttrs:{query:u.default.string,type:u.default.string,placeholder:u.default.string,sectionID:u.default.string,isSearchPending:u.default.boolean,isSearchPopulated:u.default.boolean,searchError:u.default.object,selectedResultEntityID:u.default.string},syncedRelations:{hubs:{relationClass:b.default,rootPropertyName:"Hub"}},augmentResponseText:function(e,t){return t===d.default.xml?m.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){
return e.Hub=e.Hub.filter(function(e){return"0"!==e.size}),e},selectByOffset:function(e){var t=this,n=i(this.get("hubs")),r=o.default.findIndex(n,function(e){return e.entityID()===t.get("selectedResultEntityID")}),a=n.length-1,s=-1,l=e>0?s:a,u=r+e,c=u<s||u>a,d=c?l:u,h=d===-1?null:n[d].entityID();this.set("selectedResultEntityID",h)},selectByEntityID:function(){var e=arguments.length<=0||void 0===arguments[0]?null:arguments[0];this.set("selectedResultEntityID",e)}});t.default=w,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(1014),u=i(l),c=o.default.extend({name:"SearchHubModel",context:["server"],idAttribute:"hubIdentifier",syncedAttrs:{hubIdentifier:a.default.string,size:a.default.integer,type:a.default.string,title:a.default.string},syncedRelations:{results:{relationClass:u.default,rootPropertyName:"Metadata"}}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(64),o=i(s),l=n(53),u=i(l),c=n(20),d=i(c),h=n(491),p=i(h),f=d.default.extend({name:"SearchModel",context:["server"],url:"/hubs/search",defaults:{query:"",isSearchPending:!1,isSearchPopulated:!1},sessionAttrs:{query:a.default.string,isSearchPending:a.default.boolean,isSearchPopulated:a.default.boolean,searchError:a.default.object},syncedRelations:{hubs:{relationClass:p.default,rootPropertyName:"Hub"}},augmentResponseText:function(e,t){
return t===o.default.xml?u.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){return e.Hub=e.Hub.filter(function(e){return"0"!==e.size}),e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(1015),o=i(s),l=a.default.extend({name:"SearchResultCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(49).default,a=n(14).default,s=n(2).default,o=n(19).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(18),u=s(l),c=n(231),d=o(c),h=n(77),p=s(h),f=n(20),m=s(f),v=n(403),g=s(v),y=n(55),b=s(y),w=m.default.extend({name:"SearchResultModel",context:["server"],entityType:d.SEARCH_RESULT,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,p.default)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",syncedAttrs:{key:u.default.string,reasonID:u.default.integer,reason:u.default.string,reasonTitle:u.default.string
},syncedRelations:{tagItem:{relationClass:g.default,deferred:!0},metadataItem:{relationClass:b.default,deferred:!0}},augmentResponse:function(e){var t=e.key,n=e.reason,s=e.reasonTitle,o=e.reasonID,l=a(e,["key","reason","reasonTitle","reasonID"]),u=l.tag?"tagItem":"metadataItem";return r({key:t,reason:n,reasonTitle:s,reasonID:o},u,i({key:t},l))}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(1017),o=i(s),l=a.default.extend({
name:"MultiSelectItemCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"MultiSelectItemModel",sessionAttrs:{id:a.default.any.isRequired,type:a.default.string.isRequired},sessionRelations:{model:{relationClass:o.default,deferred:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(3),a=i(r),s=n(18),o=i(s),l=n(20),u=i(l),c=n(1016),d=i(c),h=u.default.extend({name:"MultiSelectModel",sessionAttrs:{activeSelectionRange:o.default.object},sessionRelations:{activeSelectionItems:{relationClass:d.default}},derivedAttrs:{activeSelectionType:function(){var e=this.get("activeSelectionItems").first();if(e)return e.get("type")}},initialize:function(){this.listenTo(this.get("activeSelectionItems"),{remove:this.resetSelectionRange,reset:this.resetSelectionRange})},listenToCollection:function(e){
this.stopListening(e),this.listenTo(e,{reset:this.onCollectionReset,remove:this.onCollectionRemove})},resetSelectionRange:function(){this.set("activeSelectionRange",null)},onCollectionReset:function(e,t){var n=this.get("activeSelectionItems"),i=t.previousModels;a.default.each(i,function(t){e.contains(t)||n.remove(t.id)})},onCollectionRemove:function(e){var t=this.get("activeSelectionItems");t.remove(e.id)}});t.default=h,e.exports=t.default},function(e,t,n){var i,r;i=[n(18),n(64),n(20)],r=function(e,t,n){
"use strict";var i=n.extend({name:"AgentAttributionModel",context:["server"],responseType:t.text,syncedAttrs:{content:e.string},url:function(){return"/system/agents/attribution?identifier="+this.parent.id},augmentResponse:function(e){return{content:e}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(18),n(20),n(1019),n(1022)],r=function(e,t,n,i){"use strict";var r=t.extend({name:"AgentModel",context:["server"],idAttribute:"identifier",rootPropertyName:"Agent",sessionAttrs:{
isPrimary:e.boolean,selected:e.boolean},sessionRelations:{attribution:{relationClass:n}},syncedAttrs:{identifier:e.string,name:e.string,enabled:e.boolean,hasPrefs:e.boolean,order:e.string},syncedRelations:{languages:{relationClass:i,rootPropertyName:"Language"}}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(203)],r=function(e,t){"use strict";var n=t.extend({constructor:function(n,i,r,a){this.exclusiveScanners=i,this.scannerName=r,t.call(this,n,a),this.filterBy(e.bind(this.filterExclusiveScanner,this));
},filterExclusiveScanner:function(e){var t=e.get("name"),n=this.exclusiveScanners;if(!n)return!0;var i=this.scannerName,r=n.indexOf(i)!==-1,a=n.indexOf(t)!==-1,s=r?t===i:!a;return s}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(25),n(1023)],r=function(e,t){"use strict";var n=e.extend({name:"LanguageCollection",context:["server"],model:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(131),n(18),n(20)],r=function(e,t,n){"use strict";
var i=n.extend({name:"LanguageModel",context:["server"],idAttribute:"code",rootPropertyName:"Language",syncedAttrs:{code:t.string},derivedAttrs:{name:function(){return e.getLanguageName(this.get("code"))}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(18),n(20)],r=function(e,t){"use strict";var n=t.extend({name:"ScannerModel",context:["server"],rootPropertyName:"Scanner",syncedAttrs:{name:e.string}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(1026),o=i(s),l=a.default.extend({name:"SectionOverviewCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"SectionOverviewModel",context:["server"],rootPropertyName:"Section",syncedAttrs:{id:a.default.integer,key:a.default.string,
type:a.default.string,title:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(263),u=i(l),c=n(1013),d=i(c),h=n(1011),p=i(h),f=o.default.extend({name:"ServerFlexModel",context:["server"],sessionAttrs:{isLibrariesPending:a.default.boolean.isRequired,isLibrariesPopulated:a.default.boolean.isRequired,librariesError:a.default.object},sessionRelations:{libraries:{relationClass:u.default
},quickSearch:{relationClass:p.default},search:{relationClass:d.default}},defaults:{isLibrariesPending:!0,isLibrariesPopulated:!1,librariesError:null}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),a=i(r),s=n(1029),o=i(s),l=a.default.extend({name:"ServerOverviewCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(1025),u=i(l),c=o.default.extend({name:"ServerOverviewModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",urlRoot:"/api/servers",syncedAttrs:{machineIdentifier:a.default.string,name:a.default.string,address:a.default.string,port:a.default.string,version:a.default.string,createdAt:a.default.integer,updatedAt:a.default.integer},syncedRelations:{sections:{relationClass:u.default,rootPropertyName:"Section"}}});t.default=c,
e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(387),o=i(s),l=o.default.extend({name:"ExperienceSettingsModel",storageKey:"experience",syncedAttrs:{columnAdjustment:a.default.integer,searchAllServers:a.default.boolean},defaults:{columnAdjustment:0,searchAllServers:!1}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),a=i(r),s=n(55),o=i(s),l=n(1032),u=i(l),c=n(1033),d=i(c),h=a.default.extend({
name:"DesktopUIModel",sessionRelations:{hubsPage:{relationClass:u.default},metadataListPage:{relationClass:d.default},metadataItem:{relationClass:o.default,deferred:!0}}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(210),u=i(l),c=o.default.extend({name:"HubsPageModel",sessionAttrs:{isHubsPending:a.default.boolean.isRequired,isHubsPopulated:a.default.boolean.isRequired,hubsError:a.default.object
},sessionRelations:{hubs:{relationClass:u.default,deferred:!0}},defaults:{isHubsPending:!0,isHubsPopulated:!1,hubsError:null}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(20),a=i(r),s=n(87),o=i(s),l=a.default.extend({name:"MetadataListPageModel",sessionRelations:{metadataList:{relationClass:o.default,deferred:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(25),a=i(r),s=n(1035),o=i(s),l=a.default.extend({name:"SubscriptionPlanCollection",context:["server"],model:o.default,url:"/api/subscriptions/plans"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=o.default.extend({name:"SubscriptionPlanModel",context:["server"],rootPropertyName:"plan",syncedAttrs:{id:a.default.string,name:a.default.string,price:a.default.float,
formattedPrice:a.default.string,currency:a.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),a=i(r),s=n(20),o=i(s),l=n(416),u=i(l),c=n(1034),d=i(c),h=o.default.extend({name:"UserFlexModel",context:["server"],sessionAttrs:{isPlansPending:a.default.boolean.isRequired,isPlansPopulated:a.default.boolean.isRequired,plansError:a.default.object,isDeletingAvatar:a.default.boolean.isRequired,isUpdatingUser:a.default.boolean.isRequired,
updateUserError:a.default.object,isUnwatchedWatchLaterListPending:a.default.boolean.isRequired,isUnwatchedWatchLaterListPopulated:a.default.boolean.isRequired,unwatchedWatchLaterListError:a.default.object,isUnwatchedRecommendedListPending:a.default.boolean.isRequired,isUnwatchedRecommendedListPopulated:a.default.boolean.isRequired,unwatchedRecommendedListError:a.default.object},sessionRelations:{plans:{relationClass:d.default},unwatchedWatchLaterList:{relationClass:u.default,attrs:{key:u.default.keys.WATCH_LATER,
subset:u.default.subsets.UNWATCHED}},unwatchedRecommendedList:{relationClass:u.default,attrs:{key:u.default.keys.RECOMMENDED,subset:u.default.subsets.UNWATCHED}}},defaults:{isPlansPending:!0,isPlansPopulated:!1,plansError:null,isDeletingAvatar:!1,isUpdatingUser:!1,updateUserError:null,isUnwatchedWatchLaterListPending:!0,isUnwatchedWatchLaterListPopulated:!1,unwatchedWatchLaterListError:null,isUnwatchedRecommendedListPending:!0,isUnwatchedRecommendedListPopulated:!1,unwatchedRecommendedListError:null
}});t.default=h,e.exports=t.default},function(e,t,n){var i,r;i=[n(3),n(5),n(9),n(8)],r=function(e,t,n,i){"use strict";var r=n.Region.extend({resizeSubscribersCallbacks:[],scrollSubscribersCallbacks:[],sidebarDelay:200,scrollDelay:100,initialize:function(n){e.bindAll(this,"onResize","onScroll","onScrollEvent","onSidebarChange"),this.$el=t(this.el),this.channelName=n.channelName;var r={};r[this.channelName+".subscribe:resize"]=this.onResizeSubscribe,r[this.channelName+".unsubscribe:resize"]=this.onResizeUnsubscribe,
r[this.channelName+".subscribe:scroll"]=this.onScrollSubscribe,r[this.channelName+".unsubscribe:scroll"]=this.onScrollUnsubscribe,this.listenTo(i,r)},updateSize:function(){this.size={width:this.$el.width(),height:this.$el.height(),innerWidth:this.$el.innerWidth(),innerHeight:this.$el.innerHeight(),outerWidth:this.$el.outerWidth(),outerHeight:this.$el.outerHeight(),offset:this.$el.offset()}},updateScrollPosition:function(){this.scrollPosition={scrollHeight:this.$el[0].scrollHeight,scrollTop:this.$el[0].scrollTop
}},onShow:function(){this.updateSize(),this.updateScrollPosition()},onResizeSubscribe:function(e){this.resizeSubscribersCallbacks.push(e),1===this.resizeSubscribersCallbacks.length&&(this.updateSize(),this.listenTo(i,{resize:this.onResize,"show:bar hide:bar":this.onSidebarChange})),e(this.size)},onResizeUnsubscribe:function(t){this.resizeSubscribersCallbacks.splice(e.indexOf(this.resizeSubscribersCallbacks,t),1),0===this.resizeSubscribersCallbacks.length&&this.stopListening(i,"resize show:bar hide:bar");
},onScrollSubscribe:function(e){this.scrollSubscribersCallbacks.push(e),1===this.scrollSubscribersCallbacks.length&&(this.updateScrollPosition(),this.$el.on("scroll",this.onScroll)),e(this.scrollPosition)},onScrollUnsubscribe:function(t){this.scrollSubscribersCallbacks.splice(e.indexOf(this.scrollSubscribersCallbacks,t),1),0===this.scrollSubscribersCallbacks.length&&this.$el.off("scroll",this.onScroll)},onResize:function(){this.updateSize(),e.each(this.resizeSubscribersCallbacks,function(e){e(this.size);
},this)},onScroll:function(){this.scrollTimeout=clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(this.onScrollEvent,this.scrollDelay)},onScrollEvent:function(){this.updateScrollPosition(),e.each(this.scrollSubscribersCallbacks,function(e){e(this.scrollPosition)},this)},onSidebarChange:function(t){"sidebar"===t&&e.delay(this.onResize,this.sidebarDelay)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(10),n(6),n(8),n(104),n(486),n(178),n(227),n(1091),n(134)],
r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=a.extend({activity:function(){var t=this.populateView({primaryServer:!0});t.done(e.bind(function(e){var t=e.server;t.get("shared")?this.sync(t.id):r.trigger("show:view",new u({model:t,collection:t.get("alerts"),subset:"alerts"}))},this))},alerts:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){var t=e.server;r.trigger("show:view",new u({model:t,collection:t.get("alerts"),subset:"alerts"}))})},sync:function(t,a){
var s=this.populateView({serverID:"myPlex"});s=s.then(e.bind(function(e){var n;return n=t?{serverID:t}:{primaryServer:!0},this.populateView(n)},this)),s.done(function(e){var t=n.resolve("appModel"),s=t.get("user"),o=s.get("devices"),l=o.populate();l.done(function(){var t=o.filterSyncDevices(),n=a?t.get(a):null;r.trigger("show:view",new u({model:e.server,collection:t,selectedDevice:n,subset:"sync"}))}),l.fail(function(){r.trigger("show:view",new c({title:i("Sync status is unavailable.")}))})})},conversion:function(e){
var n;n=e?{serverID:e}:{primaryServer:!0};var a=this.populateView(n);a.done(function(e){var n,a,d=e.server,h=new s([],{server:d,allowInCache:!0}),p=new o([],{server:d,allowInCache:!0}),f=new l([],{server:d,allowInCache:!0}),m=t.when(h.populate(),p.fetch(),d.get("settings").fetch(),f.populate()).then(function(){n=h.first();var e=f.first();return n&&e?(a=e.get("children"),t.when(n.fetch(),a.fetch())):t.Deferred().reject().promise()});m.done(function(){r.trigger("show:view",new u({model:d,playQueue:n,
transcodeJobs:p,generators:a,subset:"conversion"}))}),m.fail(function(){r.trigger("show:view",new c({title:i("The conversion queue is unavailable.")}))})})},nowPlaying:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){var t=e.server;r.trigger("show:view",new u({model:t,collection:t.get("sessions"),subset:"nowPlaying"}))})}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(105),n(1038)],r=function(e,t){"use strict";var n=e.extend({
controller:new t,appRoutes:{"!/activity":"activity","!/activity/alerts(/:serverID)":"alerts","!/activity/sync(/:serverID)(/:deviceID)":"sync","!/activity/conversion(/:serverID)":"conversion","!/activity/playing(/:serverID)":"nowPlaying","!/status":"activity","!/status/alerts(/:serverID)":"alerts","!/status/sync(/:serverID)(/:deviceID)":"sync","!/status/conversion(/:serverID)":"conversion","!/status/playing(/:serverID)":"nowPlaying"}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(6),n(8),n(104),n(390),n(1107),n(1108),n(1106),n(232),n(134)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=n.extend({channel:function(e,n,i){var a=this.populateView({serverID:e,channelID:n,channelKey:i});a.done(function(e){var n=e.channelItem?e.channelItem:e.channel;t.trigger("show:view",new r({model:n,listModel:n.get("metadataList")}))})},channelDetails:function(e,n,i){var r=this.populateView({serverID:e,channelID:n,channelKey:i});r.done(function(e){var n=e.channelItem.get("metadataList").getCollection(),i=n.first();
t.trigger("show:view",new o({model:i}))})},channels:function(n){var r=this.populateView({serverID:n});r.done(function(n){var r=new i({subset:"all"},{server:n.server}),s=r.get("channels");s.comparator=s.sortByTitle;var o=r.fetch({scope:"page"});o.done(function(){t.trigger("show:view",new a({collection:s}))}),o.fail(function(){t.trigger("show:view",new l({title:e("Your channels are unavailable.")}))})})},directory:function(n,r,a){var o=this.populateView({serverID:n});o.done(function(n){if(n.server.get("shared"))return void t.trigger("show:view",new l({
title:e("The channel directory is restricted from shared users.")}));var o=new i({key:"/system/appstore"},{server:n.server}),u=o.fetch({scope:"page"});u.done(function(){t.trigger("show:view",new s({collection:o.get("channels"),currentKey:r,currentPath:a}))}),u.fail(function(){t.trigger("show:view",new l({title:e("The channel directory is unavailable.")}))})})}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(105),n(1040)],r=function(e,t){"use strict";var n=e.extend({
controller:new t,appRoutes:{"!/server/:serverID/channel/:channelID(/:key)":"channel","!/server/:serverID/channel/:channelID/details/:key":"channelDetails","!/server/:serverID/channels":"channels","!/server/:serverID/directory(/:key)(/:path)":"directory"}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(8),n(22),n(10),n(13),n(790),n(1081),n(1111),n(1110),n(1109),n(497),n(1085),n(1084),n(1148),n(134),n(1149),n(1150),n(1151),n(1152)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g){
"use strict";var y=r.extend({viewsByType:{signIn:u,error:p,channelError:h,notFound:f,serverRequired:m,unauthorized:v,unavailable:g},initialize:function(){r.prototype.initialize.apply(this,arguments),this.listenTo(e,"initialize:app",this.onAppInitialize)},dashboard:function(t,n){this.populateView().done(function(){e.trigger("show:view",new s({selectedServerID:t,selectedLibraryID:n}))})},list:function(n,i){var r=t.parseParams(i);this.populateView().done(function(){e.trigger("show:view",new o({selectedServerID:n,
key:r.key,type:r.type,title:r.title}))})},needsUpdate:function(t){this.populateView().done(function(){var t=n.resolve("appModel");t.get("servers").findWhere({isOutOfDate:!0})?e.trigger("show:view",new l):e.trigger("navigate","dashboard",{replace:!0})})},logout:function(){var t=this.viewFor;i.execute("signOut").done(function(){e.trigger("navigate","login",{silent:!0})}).fail(function(){e.trigger("show:view",t("logoutError"))})},logs:function(){e.trigger("show:view",new c({collection:n.resolve("logs")
}))},info:function(){e.trigger("show:view",new d)},onAppInitialize:function(){this.appView=new a,this.appView.render()}});return y}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(37),n(8),n(791),n(1042)],r=function(e,t,n,i){"use strict";var r=n.extend({controller:new i,appRoutes:{"!/dashboard":"dashboard","!(/server/:serverID)/dashboard(?library=:libraryID)":"dashboard","!(/server/:serverID)/list":"list","!/needsUpdate":"needsUpdate","":"dashboard","!/login":"login","!/unauthorized":"unauthorized",
"!/logs":"logs","!/info":"info","*404":"error"},onNavigateRefreshDashboard:function(){var n=e.history.getFragment();""===n||"!/dashboard"===n?e.history.loadUrl(""):t.trigger("navigate","dashboard")}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(8),n(104),n(1086),n(1303),n(232)],r=function(e,t,n,i,r){"use strict";var a=t.extend({search:function(t,i){var r=this.populateView();r.done(function(){e.trigger("show:view",new n({serverID:t,query:i}))})},section:function(t,n,r){
var a=this.populateView({serverID:t,sectionID:n});a.done(function(t){e.trigger("show:view",new i({model:t.section,subset:r}))})},sectionFolder:function(t,n,r){var a=this.populateView({serverID:t,sectionID:n});a.done(function(t){var n=t.section.get("items");n.scrollPosition=0,e.trigger("show:view",new i({model:t.section,subset:"folder",folderKey:r}))})},sectionFilter:function(t,n,r,a,s,o){var l=this.populateView({serverID:t,sectionID:n});l.done(function(t){var n=t.section.get("currentFilters");n.length=0,
o||(o=s),n.push({key:a,values:s.split(","),titles:o.split(",")}),e.trigger("show:view",new i({model:t.section,type:parseInt(r,10)}))})},sectionType:function(t,n,r,a,s){var o=this.populateView({serverID:t,sectionID:n});o.done(function(t){e.trigger("show:view",new i({model:t.section,type:r,sortKey:a,sortDirection:s}))})},details:function(t,n){var i=this.populateView({serverID:t,key:n,populateData:{includeRelatedCount:"5",includePopularLeaves:"1",includeConcerts:"1"}});i.done(function(t){e.trigger("show:view",new r({
model:t.item}))})}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(105),n(1044)],r=function(e,t){"use strict";var n=e.extend({controller:new t,appRoutes:{"!/server/:serverID/search/:query":"search","!/server/:serverID/section/:sectionID(/:subset)":"section","!/server/:serverID/section/:sectionID/folder/:key":"sectionFolder","!/server/:serverID/section/:sectionID/filter/:type/:key/:value(/:title)":"sectionFilter","!/server/:serverID/section/:sectionID/type/:type/:sortKey/:sortDirection":"sectionType",
"!/server/:serverID/details/:key":"details"}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(6),n(8),n(104),n(265),n(134),n(1301),n(232)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=i.extend({playlists:function(i){var r=this.populateView({serverID:i});r.done(function(i){var r=i.server.get("playlists"),o=i.server.get("sections").populate({scope:"page"}),l=r.get("items").fetch({scope:"page"}),u=r.get("sorts").populate().then(function(e){var t=e.get("titleSort");
t&&(r.set("currentSort",t),t.set("selected",!0))}),c=e.when(o,l,u);c.done(function(){n.trigger("show:view",new s({model:r}))}),c.fail(function(){n.trigger("show:view",new a({title:t("Playlists are unavailable for this server.")}))})})},playlist:function(i,s){var l=this.populateView({serverID:i});l.done(function(i){var l=i.server.get("sections").populate({scope:"page"}),u=new r({ratingKey:s},{server:i.server}),c=u.fetch({scope:"page"});c.fail(function(){n.trigger("show:view",new a({title:t("Playlist not found.")
}))}),e.when(l,c).done(function(){n.trigger("show:view",new o({model:u}))})})}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(105),n(1046)],r=function(e,t){"use strict";var n=e.extend({controller:new t,appRoutes:{"!/server/:serverID/playlists":"playlists","!/server/:serverID/playlist/:key":"playlist"}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(10),n(6),n(8),n(31),n(104),n(752),n(125),n(1309),n(134)],r=function(e,t,n,i,r,a,s,o,l,u){
"use strict";var c=a.extend({settings:function(){return this.webSettings()},webSettings:function(){var e=this.populateView();e.done(function(){function e(){i.trigger("show:view",new l({model:r.getInstance(),subset:"web"}))}var n=t.resolve("appModel"),a=n.get("user"),s=a.get("homeUsers"),o=a.server.populate();o.done(function(){a.get("signedIn")?s.populate().always(e):e()}),o.fail(e)})},serverSettings:function(t,r){var a;a=t?{serverID:t}:{primaryServer:!0};var c=this.populateView(a);c.done(function(t){
var a=t.server;if(a.get("shared"))return void i.trigger("show:view",new u({title:n("Server settings are restricted from shared users.")}));var c=a.get("settings"),d=new s({key:"/accounts/1"},{server:a}),h=a.get("cloudAccount"),p=new o([],{server:a,url:"/system/:/prefs"}),f=e.when(c.fetch(),d.fetch({scope:"page"}),h.fetch({scope:"page"}),p.fetch({scope:"page"}));f.done(function(){i.trigger("show:view",new l({model:a,collection:a.get("settings"),account:d,cloudAccount:h,channelSettings:p,subset:"server",
group:r}))}),f.fail(function(){i.trigger("show:view",new u({title:n("Server settings are unavailable.")}))})})},users:function(r){var a=this.populateView({serverID:"myPlex"});a.done(function(a){var s=t.resolve("appModel"),o=s.get("user"),c=o.get("homeUsers"),d=o.get("friends"),h=o.get("invites"),p=o.get("sentInvites"),f=o.get("homeDetails"),m=e.Deferred(),v=f.fetch();v.done(function(){m.resolve()}),v.fail(function(e,t){404===t.status?m.resolve():m.reject()});var g=e.when(o.fetch({scope:"page"}),c.fetch({
scope:"page"}),d.fetch({scope:"page"}),h.fetch({scope:"page"}),p.fetch({scope:"page"}),m.promise());g.done(function(){var e=!1;"pin"===r?(r="home",e=!0):r||(r=h.length&&!h.findWhere({home:!0})?"friends":"home"),i.trigger("show:view",new l({model:s.get("user"),subset:"users",usersSubset:r,promptPIN:e}))}),g.fail(function(){var e;e=n("friends"===r?"Your friends are unavailable.":"Your home is unavailable."),i.trigger("show:view",new u({title:e}))})})},devices:function(){var e=this.populateView({serverID:"myPlex"
});e.done(function(e){var r=t.resolve("appModel"),a=r.get("user"),s=a.get("devices"),o=s.fetch({scope:"page"});o.done(function(){i.trigger("show:view",new l({model:a,collection:s,subset:"devices"}))}),o.fail(function(){i.trigger("show:view",new u({title:n("Your devices are unavailable.")}))})})}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(105),n(1048)],r=function(e,t){"use strict";var n=e.extend({controller:new t,appRoutes:{"!/settings":"settings","!/settings/web":"webSettings",
"!/settings/server(/:serverID)(/:group)":"serverSettings","!/settings/users":"users","!/settings/users(/:subset)":"users","!/settings/devices":"devices"}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(8),n(104),n(1329)],r=function(e,t,n){"use strict";var i=t.extend({setupBasic:function(t){var i;i=t?{serverID:t}:{primaryServer:!0};var r=this.populateView(i);r.done(function(t){e.trigger("show:view",new n({model:t.server,subset:"setupBasic"}))})},setupLibrary:function(){
var t=this.populateView({primaryServer:!0});t.done(function(t){e.trigger("show:view",new n({model:t.server,subset:"setupLibrary"}))})},setupChannels:function(){var t=this.populateView({primaryServer:!0});t.done(function(t){e.trigger("show:view",new n({model:t.server,subset:"setupChannels"}))})},setupComplete:function(){var t=this.populateView({primaryServer:!0});t.done(function(t){e.trigger("show:view",new n({model:t.server,subset:"setupComplete"}))})}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(105),n(1050)],r=function(e,t){"use strict";var n=e.extend({controller:new t,appRoutes:{"!/setup/library":"setupLibrary","!/setup/channels":"setupChannels","!/setup/complete":"setupComplete","!/setup(/:serverID)":"setupBasic"}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(10),n(6),n(8),n(70),n(31),n(104),n(1306),n(415),n(416),n(1334),n(1332),n(232),n(134),n(1333)],r=function(e,t,i,r,a,s,o,l,u,c,d,h,p,f,m){"use strict";var v=o.extend({
account:function(){var t=e.Deferred(),i=t.promise();n.e(0,function(){t.resolve()}),i=i.then(function(){return this.populateView({serverID:"myPlex"})}.bind(this)),i.done(function(){a.scheduleImmediateUpdate(),r.trigger("show:view",new l)})},userPlaylist:function(e,n){var a=this.populateView({serverID:"myPlex"});a.done(function(a){var s=t.resolve("appModel"),o=s.get("user"),l=new c({key:e},{server:o.server,parent:o}),u=l.fetch({scope:"page"});u.done(function(){r.trigger("show:view",new d({model:s.get("user"),
listModel:l,subset:n}))}),u.fail(function(){r.trigger("show:view",new f({title:i("This playlist is unavailable.")}))})})},userPlaylistDetails:function(e,n){var a=this.populateView({serverID:"myPlex"});a.done(function(a){var s=t.resolve("appModel"),o=s.get("user"),l=new u({id:parseInt(n,10)},{server:a.server,parent:o,containerKey:e}),c=l.fetch({scope:"page"});c.done(function(){r.trigger("show:view",new p({model:l}))}),c.fail(function(){r.trigger("show:view",new f({title:i("This playlist item is unavailable.")
}))})})},queueHelp:function(){var e=this.populateView({serverID:"myPlex"});e.done(function(){var e=t.resolve("appModel"),n=e.get("user");r.trigger("show:view",new m({queueEmail:n.get("queueEmail")}))})},announcements:function(){var e=this.populateView();e.done(function(){var e=t.resolve("appModel"),n=e.get("user"),a=n.get("announcements"),s=a.fetch({scope:"page"});s.done(function(){r.trigger("show:view",new h({collection:a}))}),s.fail(function(){r.trigger("show:view",new f({title:i("Announcements are not available.")
}))})})}});return v}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(105),n(1052)],r=function(e,t){"use strict";var n=e.extend({controller:new t,appRoutes:{"!/account":"account","!/playlist/queue/help":"queueHelp","!/playlist/:key(/:subset)":"userPlaylist","!/playlist/:key/details/:itemID":"userPlaylistDetails","!/announcements":"announcements"}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var r=n(1055),a=i(r),s=n(1060),o=i(s),l=n(1070),u=i(l),c=n(1064),d=i(c),h=n(1062),p=i(h),f=n(1061),m=i(f),v=n(1056),g=i(v),y=n(1059),b=i(y),w=n(1058),S=i(w),P=n(1069),x=i(P),C=n(1065),T=i(C),_=n(1067),E=i(_),k=[a.default,o.default,u.default,d.default,p.default,m.default,g.default,b.default,S.default,x.default,T.default,E.default];t.default=k,e.exports=t.default},function(e,t,n){"use strict";var i=n(49).default,r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0
});var s,o=n(3),l=r(o),u=n(8),c=r(u),d=n(75),h=r(d),p=n(852),f=r(p),m=n(1248),v=r(m),g=n(52),y=a(g),b=n(72),w=(0,h.default)((s={},i(s,y.SHOW_ALERT,function(e,t){c.default.trigger("show:alert",t)}),i(s,y.SAVE_SETTINGS,function(e,t){var n=t.name,i=t.settings;e.get(n).save(i)}),i(s,y.DOWNLOAD_SERVER,function(e,t){var n=new v.default({downloadType:t});c.default.trigger("show:modal",n)}),i(s,y.DISCOVER_SERVERS,function(e){var t=e.get("cloudServer");t.get("isResolved")&&t.get("resources").fetch(),c.default.trigger("test:servers");
}),i(s,y.CHANGE_PRIMARY_SERVER,function(e,t,n){var i=e.get("servers");i.findServer(t).done(function(t){t.get("isOutOfDate")?n((0,b.redirectToRoute)({route:"needsUpdate",options:{replace:!0}})):t.get("isPrimaryEligible")?e.set("primaryServer",t):n((0,b.redirectToRoute)({route:"dashboard"}))}).fail(function(){n((0,b.redirectToRoute)({route:"dashboard"}))})}),i(s,y.REDIRECT_TO_ROUTE,function(e,t){var n=t.route,i=t.options;l.default.defer(function(){c.default.trigger("navigate",n,i)})}),i(s,y.REDIRECT_TO_HTTP,function(e){
var t=window.location.href.replace("https://","http://");window.location=t}),i(s,y.GARBAGE_COLLECT_ENTITIES,function(e){var t=(0,f.default)(e.getState()),n=e.get("entities");l.default.each(t,function(e,t){n.get(t).remove(e)})}),s));t.default=w,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=t.libraryEntityID;return(0,h.default)(e,c.LIBRARY,n)}var r=n(49).default,a=n(2).default,s=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),l=a(o),u=n(59),c=s(u),d=n(93),h=a(d),p=n(75),f=a(p),m=n(117),v=a(m),g=n(52),y=s(g),b=(0,
f.default)(r({},y.EDIT_LIBRARY,function(e,t){var n=i(e,t),r=new v.default({server:n.server,model:n});l.default.trigger("show:modal",r)}));t.default=b,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(74),s=i(a),o=n(52),l=r(o),u=(0,s.default)(l.EDIT_LIBRARY);t.editLibrary=u},function(e,t,n){"use strict";function i(e,t){var n=t.metadataItemEntityID;return(0,g.default)(e,m.METADATA_ITEM,n)}var r=n(11).default,a=n(49).default,s=n(14).default,o=n(2).default,l=n(19).default;
Object.defineProperty(t,"__esModule",{value:!0});var u,c=n(6),d=o(c),h=n(8),p=o(h),f=n(59),m=l(f),v=n(93),g=o(v),y=n(13),b=o(y),w=n(75),S=o(w),P=n(421),x=o(P),C=n(420),T=o(C),_=n(315),E=o(_),k=n(115),I=o(k),A=n(55),M=o(A),D=n(116),R=o(D),O=n(235),L=o(O),N=n(516),U=o(N),F=n(135),j=o(F),B=n(314),z=o(B),V=n(193),H=o(V),q=n(192),W=o(q),K=n(191),Q=o(K),Y=n(72),G=n(183),$=n(52),X=l($),J=(0,S.default)((u={},a(u,X.ADD_METADATA_ITEM_TO_PLAYLIST,function(e,t){var n=i(e,t),r=new I.default({model:n,title:n.get("title")
});p.default.trigger("show:modal",r)}),a(u,X.ANALYZE_METADATA_ITEM,function(e,t,n){var r=i(e,t);(0,T.default)(r).fail(function(e){n((0,Y.showAlert)((0,d.default)("There was a problem analyzing this item.")))})}),a(u,X.DOWNLOAD_METADATA_ITEM_VERSION,function(e,t){var n=i(e,t),r=new z.default({model:n});p.default.trigger("show:modal",r)}),a(u,X.DELETE_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,a=s(t,["metadataItemEntityID"]),o=i(e,{metadataItemEntityID:n});b.default.execute("deleteItems",r({
item:o},a))}),a(u,X.DELETE_METADATA_ITEM_VERSION,function(e,t){var n=i(e,t);b.default.execute("deleteVersions",{item:n})}),a(u,X.EDIT_METADATA_ITEM,function(e,t){var n=i(e,t),r=new R.default({model:n});p.default.trigger("show:modal",r)}),a(u,X.FIX_METADATA_ITEM_MATCH,function(e,t){var n=i(e,t),r=new U.default({model:n});p.default.trigger("show:modal",r)}),a(u,X.GET_METADATA_ITEM_INFO,function(e,t){var n=i(e,t),r=new Q.default({model:n});p.default.trigger("show:modal",r)}),a(u,X.MARK_METADATA_ITEM_WATCHED,function(e,t,n){
var r=i(e,t);b.default.execute("markWatched",{item:r}).done(function(){n((0,G.repopulatePage)())})}),a(u,X.MARK_METADATA_ITEM_UNWATCHED,function(e,t,n){var r=i(e,t);b.default.execute("markUnwatched",{item:r}).done(function(){n((0,G.repopulatePage)())})}),a(u,X.OPTIMIZE_METADATA_ITEM,function(e,t){var n=i(e,t),r=new j.default({item:n});p.default.trigger("show:modal",r)}),a(u,X.PLAY_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,a=s(t,["metadataItemEntityID"]),o=i(e,{metadataItemEntityID:n
}),l=o.get("type"),u={};"show"!==l&&"season"!==l||(u.unwatched=!0),"episode"===l&&(u.continuous=!0),"track"!==l&&"photo"!==l||(u.siblings=!0),b.default.execute("playMedia",r({item:o},u,a))}),a(u,X.PLAY_METADATA_ITEM_VERSION,function(e,t){var n=i(e,t),r=new E.default({model:n});p.default.trigger("show:modal",r)}),a(u,X.PLAY_PRIMARY_EXTRA,function(e,t){var n=i(e,t),r=new M.default({key:n.get("primaryExtraKey"),type:"clip"},{server:n.server,section:n.section});b.default.execute("playMedia",{item:r});
}),a(u,X.PLAY_RELATED_MIX,function(e,t){var n=i(e,t),r=n.get("related"),a=r.findWhere({browse:!1});a.set("type","track"),b.default.execute("playMedia",{item:a})}),a(u,X.QUEUE_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,a=s(t,["metadataItemEntityID"]),o=i(e,{metadataItemEntityID:n});b.default.execute("queueMedia",r({item:o},a))}),a(u,X.RATE_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,a=s(t,["metadataItemEntityID"]),o=i(e,{metadataItemEntityID:n});b.default.execute("rate",r({
item:o},a))}),a(u,X.RECOMMEND_METADATA_ITEM,function(e,t){var n=i(e,t),r=new W.default({model:n});p.default.trigger("show:modal",r)}),a(u,X.REFRESH_METADATA_ITEM,function(e,t,n){var r=i(e,t);(0,x.default)(r).fail(function(e){503===e.status?p.default.trigger("show:modal",new L.default({model:r.server})):n((0,Y.showAlert)((0,d.default)("There was a problem refreshing this item.")))})}),a(u,X.SHARE_METADATA_ITEM,function(e,t){var n=i(e,t),r=new H.default({model:n});p.default.trigger("show:modal",r)}),
a(u,X.SPLIT_METADATA_ITEM_APART,function(e,t,n){var r=i(e,t);b.default.execute("splitApart",{item:r,skipNavigate:!0}).done(function(){n((0,G.repopulatePage)())})}),a(u,X.SYNC_METADATA_ITEM,function(e,t){var n=i(e,t);b.default.execute("showSyncModal",{item:n})}),a(u,X.UNMATCH_METADATA_ITEM,function(e,t){var n=i(e,t);b.default.execute("unmatch",{item:n})}),a(u,X.WATCH_METADATA_ITEM_LATER,function(e,t){var n=i(e,t);b.default.execute("watchLater",{item:n})}),u));t.default=J,e.exports=t.default},function(e,t,n){
"use strict";function i(e,t){var n=t.metadataListEntityID;return(0,m.default)(e,p.METADATA_LIST,n)}var r=n(11).default,a=n(49).default,s=n(14).default,o=n(2).default,l=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var u,c=n(8),d=o(c),h=n(59),p=l(h),f=n(93),m=o(f),v=n(13),g=o(v),y=n(75),b=o(y),w=n(792),S=o(w),P=n(793),x=o(P),C=n(115),T=o(C),_=n(135),E=o(_),k=n(308),I=n(52),A=l(I),M=(0,b.default)((u={},a(u,A.POPULATE_METADATA_LIST_RANGE,(0,S.default)({getModel:i})),a(u,A.REPOPULATE_METADATA_LIST_RANGE,(0,
x.default)({getModel:i})),a(u,A.PLAY_METADATA_LIST,function(e,t){var n=t.metadataListEntityID,a=s(t,["metadataListEntityID"]),o=i(e,{metadataListEntityID:n});g.default.execute("playMedia",r({item:o},a))}),a(u,A.ADD_METADATA_LIST_TO_PLAYLIST,function(e,t){var n=i(e,t),r=new T.default({model:n,title:n.get("title")});d.default.trigger("show:modal",r)}),a(u,A.SYNC_METADATA_LIST,function(e,t){var n=i(e,t);g.default.execute("showSyncModal",{item:n})}),a(u,A.OPTIMIZE_METADATA_LIST,function(e,t){var n=i(e,t),r=new E.default({
item:n});d.default.trigger("show:modal",r)}),a(u,A.SELECT_METADATA_LIST_ITEM,function(e,t,n){var r=t.key,a=t.type,s=t.isRangeSelect,o=i(e,t),l=o.getCollection(),u=l.get(r);u&&n((0,k.selectItem)({type:a,model:u,collection:l,isRangeSelect:s}))}),a(u,A.DESELECT_METADATA_LIST_ITEM,function(e,t,n){var r=t.key,a=i(e,t),s=a.getCollection(),o=s.get(r);o&&n((0,k.deselectModels)([o.id]))}),a(u,A.DESELECT_ALL_METADATA_LIST_ITEMS,function(e,t,n){var r=i(e,t),a=r.getCollection();n((0,k.deselectCollection)(a));
}),u));t.default=M,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(49).default,a=n(1473).default,s=n(2).default,o=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(3),c=s(u),d=n(5),h=s(d),p=n(6),f=s(p),m=n(8),v=s(m),g=n(223),y=s(g),b=n(13),w=s(b),S=n(75),P=s(S),x=n(421),C=s(x),T=n(420),_=s(T),E=n(115),k=s(E),I=n(116),A=s(I),M=n(135),D=s(M),R=n(72),O=n(308),L=n(183),N=n(52),U=o(N),F=(0,P.default)((l={},r(l,U.SELECT_ITEM,function(e,t,n){var i=t.type,r=t.model,a=t.collection,s=t.isRangeSelect,o=void 0!==s&&s,l=e.get("multiSelect"),u=l.get("activeSelectionType"),c=l.get("activeSelectionRange");
if(!u||u===i){if(l.listenToCollection(a),!o||!c||c.collection!==a)return l.set("activeSelectionRange",{collection:a,startModel:r}),void n((0,O.selectModels)([{id:r.id,type:i,model:r}]));var d=c.startModel,h=c.endModel,p=a.indexOf(d),f=a.indexOf(r);if(h){var m=a.indexOf(h);n((0,O.deselectRange)({collection:a,range:{start:p,end:m}}))}l.set("activeSelectionRange",{collection:a,startModel:d,endModel:r}),n((0,O.selectRange)({type:i,collection:a,range:{start:p,end:f}}))}}),r(l,U.SELECT_MODELS,function(e,t){
var n=e.get("multiSelect"),i=n.get("activeSelectionItems");i.add(t)}),r(l,U.DESELECT_ALL_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems");n.reset()}),r(l,U.DESELECT_MODELS,function(e,t){var n=e.get("multiSelect"),i=n.get("activeSelectionItems");i.remove(t)}),r(l,U.DESELECT_COLLECTION,function(e,t,n){var i=e.get("multiSelect"),r=i.get("activeSelectionItems"),a=[];i.stopListening(t),t.each(function(e){r.get(e.id)&&a.push(e.id)}),a.length&&n((0,O.deselectModels)(a))}),r(l,U.SELECT_RANGE,function(e,t,n){
var i=t.type,r=t.collection,a=t.range,s=e.get("multiSelect"),o=s.get("activeSelectionItems"),l=[];y.default.each(a,function(e){var t=r.at(e);t&&!o.get(t.id)&&l.push({id:t.id,type:i,model:t})}),l.length&&n((0,O.selectModels)(l))}),r(l,U.DESELECT_RANGE,function(e,t,n){var i=t.collection,r=t.range,a=e.get("multiSelect"),s=a.get("activeSelectionItems"),o=[];y.default.each(r,function(e){var t=i.at(e);t&&s.get(t.id)&&o.push(t.id)}),o.length&&n((0,O.deselectModels)(o))}),r(l,U.PLAY_SELECTED_ITEMS,function(e,t){
var n=e.get("multiSelect"),r=n.get("activeSelectionItems").pluck("model");w.default.execute("playMedia",i({items:r},t))}),r(l,U.ADD_SELECTED_ITEMS_TO_PLAYLIST,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),i=new k.default({model:c.default.first(n),items:n});v.default.trigger("show:modal",i)}),r(l,U.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(e,t,n){var r=e.get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),s=h.default.Deferred().resolve().promise();
a.forEach(function(e){s=s.then(function(){return w.default.execute("updateWatchedStatus",i({item:e},t))})}),s.fail(function(){var e=t.watched?(0,f.default)("There was an unexpected error marking an item watched."):(0,f.default)("There was an unexpected error marking an item unwatched.");n((0,R.showAlert)(e))}),s.always(function(){n((0,L.repopulatePage)())})}),r(l,U.EDIT_SELECTED_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),i=new A.default({items:n});v.default.trigger("show:modal",i);
}),r(l,U.REFRESH_SELECTED_ITEMS,function(e,t,n){var i=e.get("multiSelect"),r=i.get("activeSelectionItems").pluck("model"),a=h.default.Deferred().resolve().promise();r.forEach(function(e){a=a.then(function(){return(0,C.default)(e)})}),a.fail(function(){n((0,R.showAlert)((0,f.default)("There was an unexpected error refreshing an item.")))})}),r(l,U.ANALYZE_SELECTED_ITEMS,function(e,t,n){var i=e.get("multiSelect"),r=i.get("activeSelectionItems").pluck("model"),a=h.default.Deferred().resolve().promise();
r.forEach(function(e){a=a.then(function(){return(0,_.default)(e)})}),a.fail(function(){n((0,R.showAlert)((0,f.default)("There was an unexpected error analyzing an item.")))})}),r(l,U.SYNC_METADATA_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model");w.default.execute("showSyncModal",{item:c.default.first(n),items:n})}),r(l,U.OPTIMIZE_METADATA_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),i=new D.default({item:c.default.first(n),
items:n});v.default.trigger("show:modal",i)}),r(l,U.MERGE_SELECTED_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),i=a(n),r=i[0],s=i.slice(1);w.default.execute("merge",{item:r,items:s})}),r(l,U.DELETE_SELECTED_ITEMS,function(e,t,n){var i=e.get("multiSelect"),r=i.get("activeSelectionItems").pluck("model"),a=h.default.Deferred().resolve().promise();r.forEach(function(e){a=a.then(function(){return e.destroy({wait:!0})})}),a.fail(function(e){var t=403===e.status?(0,
f.default)("Ensure that media deletion is enabled for library content in your server settings."):(0,f.default)("There was an unexpected error deleting an item.");n((0,R.showAlert)(t))})}),l));t.default=F,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID;return(0,p.default)(e,m.SERVER,n)}function r(e,t){return(0,p.default)(e,m.SEARCH_RESULT,t)}function a(e,t){return i(e,t).get("desktop").get("quickSearch")}var s=n(49).default,o=n(2).default,l=n(19).default;Object.defineProperty(t,"__esModule",{
value:!0});var u,c=n(8),d=o(c),h=n(93),p=o(h),f=n(231),m=l(f),v=n(301),g=o(v),y=n(52),b=l(y),w=n(75),S=o(w),P=n(149),x=n(228),C=(0,S.default)((u={},s(u,b.CHANGE_PRIMARY_SERVER,function(e,t,n){var i=e.get("servers");i.findServer(t).done(function(e){e.get("desktop").get("quickSearch").restoreDefaults()})}),s(u,b.RESET_QUICK_SEARCH,function(e,t){var n=a(e,t);n.restoreDefaults({sectionID:n.get("sectionID"),placeholder:n.get("placeholder"),type:n.get("type")})}),s(u,b.FETCH_QUICK_SEARCH,function(e,t,n){
var i=a(e,t),r=t.query,s=void 0===r?i.get("query"):r,o=t.limit;i.abortPendingPopulate(),i.set("isSearchPending",!0),i.fetch({data:{query:s,limit:o}}).done(function(){i.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(e){i.set({isSearchPending:!1,searchError:e})})}),s(u,b.CHANGE_QUICK_SEARCH_QUERY,function(e,t,n){var i=a(e,t),r=t.query,s=t.serverEntityID;""===r.trim()?n((0,P.resetQuickSearch)({serverEntityID:s})):(i.get("query").length>1&&r.length<2&&n((0,P.resetQuickSearch)({
serverEntityID:s})),i.set("query",r))}),s(u,b.CHANGE_QUICK_SEARCH_SETTINGS,function(e,t){var n=a(e,t),i=t.sectionID,r=void 0===i?n.get("sectionID"):i,s=t.type,o=void 0===s?n.get("type"):s,l=t.placeholder,u=void 0===l?n.get("placeholder"):l;n.set({sectionID:r,type:o,placeholder:u})}),s(u,b.SELECT_QUICK_SEARCH_RESULT,function(e,t){var n=a(e,t);if(0!==n.get("hubs").length){var i=t.searchResultEntityID,r=t.offset;i?n.selectByEntityID(i):r&&n.selectByOffset(r)}}),s(u,b.NAVIGATE_QUICK_SEARCH_RESULT,function(e,t,n){
var s=a(e,t),o=t.serverEntityID,l=t.searchResultEntityID,u=null!=l?r(e,l):r(e,s.get("selectedResultEntityID")),c=i(e,t),h=c.id;if(!u){var p=s.pick("query","type"),f=p.query,m=p.type;return m?d.default.trigger("search:"+m,f):d.default.trigger("navigate","search",{serverID:h,query:f}),void n((0,P.resetQuickSearch)({serverEntityID:o}))}var v=u.pick("tagItem","metadataItem"),y=v.tagItem,b=v.metadataItem;if(y){var w=g.default.get(y.get("tagType")),S=w.typeString;return d.default.trigger("navigate","sectionFilter",{
serverID:h,sectionID:u.get("reasonID"),type:y.get("librarySectionType"),key:S,value:y.get("id"),title:y.get("tag")}),void n((0,P.resetQuickSearch)({serverEntityID:o}))}var x=b.get("type"),C=void 0,T=void 0;switch(x){case"photo":return void n((0,P.playQuickSearchItem)({searchResultEntityID:l}));case"photoAlbum":case"show":case"episode":case"movie":case"album":case"artist":T="details",C=b.get("key");break;case"track":T="details",C=b.get("parentKey");break;case"playlist":T="playlist",C=b.get("ratingKey");
}d.default.trigger("navigate",T,{serverID:h,key:C}),n((0,P.resetQuickSearch)({serverEntityID:o}))}),s(u,b.PLAY_QUICK_SEARCH_RESULT,function(e,t,n){var i=a(e,t),s=t.serverEntityID,o=t.searchResultEntityID,l=t.shuffle,u=void 0!==l&&l,c=null!=o?r(e,o):r(e,i.get("selectedResultEntityID"));return c?void(c.get("metadataItem")&&(n((0,x.playMetadataItem)({metadataItemEntityID:c.get("metadataItem").entityID(),shuffle:u})),n((0,P.resetQuickSearch)({serverEntityID:s})))):void n((0,P.navigateQuickSearchResult)(o));
}),u));t.default=C,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID;return(0,d.default)(e,p.SERVER,n)}function r(e){return e.get("desktop").get("search")}var a=n(49).default,s=n(19).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(52),u=s(l),c=n(93),d=o(c),h=n(59),p=s(h),f=n(75),m=o(f),v=(0,m.default)(a({},u.FETCH_SEARCH,function(e,t,n){var a=e.get("servers"),s=e.get("experienceSettings").get("searchAllServers"),o=t.query,l=t.limit,u=s?a.where({
isFullServer:!0}):[i(e,t)];u.forEach(function(e){var t=r(e);t.get("query")!==o&&t.restoreDefaults(),e.get("isConnected")&&(t.abortPendingPopulate(),t.set({isSearchPending:!0,isSearchPopulated:!!t.get("hubs").length,query:o}),t.fetch({data:{query:o,limit:l}}).done(function(){t.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(e){t.set({isSearchPending:!1,searchError:e})}))})}));t.default=v,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(74),s=i(a),o=n(52),l=r(o),u=(0,s.default)(l.FETCH_SEARCH);t.fetchSearch=u},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID;return(0,S.default)(e,b.SERVER,n)}function r(e,t){var n=i(e,t);return n.get("desktop")}var a=n(49).default,s=n(340).default,o=n(2).default,l=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var u,c=n(5),d=o(c),h=n(6),p=o(h),f=n(8),m=o(f),v=n(22),g=l(v),y=n(59),b=l(y),w=n(93),S=o(w),P=n(429),x=l(P),C=n(216),T=o(C),_=n(31),E=o(_),k=n(75),I=o(k),A=n(211),M=o(A),D=n(272),R=o(D),O=n(117),L=o(O),N=n(150),U=o(N),F=n(1242),j=o(F),B=n(72),z=n(182),V=l(z),H=n(52),q=l(H),W=(0,
I.default)((u={},a(u,q.TEST_SERVER,function(e,t){var n=i(e,t);m.default.trigger("test:server",n)}),a(u,q.FETCH_LIBRARIES,(0,M.default)({key:"libraries",getModel:r})),a(u,q.POPULATE_LIBRARIES,(0,R.default)({key:"libraries",getModel:r})),a(u,q.ADD_LIBRARY,function(e,t){var n=i(e,t),r=new L.default({server:n,redirect:!0});m.default.trigger("show:modal",r)}),a(u,q.START_LIBRARY_REFRESH,function(e,t,n){var a=i(e,t),s=r(e,t),o=s.get("libraries"),l=t.libraryID||"all",u=t.force?{force:1}:void 0,c=g.join(["/library/sections",l,"refresh"],u),h=a.getXHROptions(c);
if(t.cancel&&(h.type="DELETE"),d.default.ajax(h).done(function(){n(V.fetchLibraries({serverEntityID:t.serverEntityID}))}).fail(function(e){var i=t.cancel?(0,p.default)("There was a problem canceling the update."):(0,p.default)("There was a problem updating a library.");n((0,B.showAlert)(i))}),t.libraryID){var f=o.get(l);f&&f.set("refreshing",!t.cancel)}else t.cancel&&o.each(function(e){return e.set("refreshing",!1)})}),a(u,q.SHARE_LIBRARIES,function(e,t){var n=i(e,t);m.default.trigger("show:modal",new U.default({
defaultPaneType:"ownedServer",defaultPaneID:n.id}))}),a(u,q.ENABLE_HTTP_FALLBACK,function(e,t,n){var r=i(e,t),a=new j.default({server:r}),s=a.promise.then(function(){var e=r.get("publicAddressMatches")?T.default.SAME_NETWORK:T.default.ALWAYS;return E.default.save("allowHttpFallback",e)});s.done(function(){n(V.testServer({serverEntityID:t.serverEntityID}))}),m.default.trigger("show:modal",a)}),a(u,q.OPTIMIZE_DATABASE,function(e,t,n){var r=i(e,t),a=r.getXHROptions("/library/optimize",{type:"PUT"});d.default.ajax(a).done(function(){
n((0,B.showAlert)({type:x.SUCCESS,message:(0,p.default)("The database was optimized.")}))}).fail(function(e){n((0,B.showAlert)((0,p.default)("There was a problem optimizing the database.")))})}),a(u,q.CLEAN_BUNDLES,function(e,t,n){var r=i(e,t),a=r.getXHROptions("/library/clean/bundles",{type:"PUT"});d.default.ajax(a).done(function(){n((0,B.showAlert)({type:x.SUCCESS,message:(0,p.default)("Unused bundles are being removed.")}))}).fail(function(e){n((0,B.showAlert)((0,p.default)("There was a problem removing unused bundles.")));
})}),a(u,q.EMPTY_TRASH,function(e,t,n){var a=i(e,t),o=r(e,t),l=o.get("libraries"),u=t.libraryID,c=u?[u]:l.map(function(e){return e.id}),h=c.map(function(e){var t=a.getXHROptions("/library/sections/"+e+"/emptyTrash",{type:"PUT"});return d.default.ajax(t)});d.default.when.apply(d.default,s(h)).done(function(){n((0,B.showAlert)({type:x.SUCCESS,message:(0,p.default)("The trash was emptied.")}))}).fail(function(e){n((0,B.showAlert)((0,p.default)("There was a problem emptying the trash.")))})}),a(u,q.DELETE_SERVER,function(e,t,n){
var r=i(e,t),a=e.get("cloudServer");if(r){if(a.get("isResolved")){var s=a.getXHROptions("/api/servers/"+r.id,{type:"DELETE"});d.default.ajax(s)}var o=a.get("resources"),l=o.get(r.id);if(l&&l.trigger("destroy",l,l.collection),r.get("isFullOwnedServer")&&r.get("isConnected")){var u=r.get("cloudAccount");u.destroy().done(function(){r.set({myPlexSigninState:"none",myPlexSubscription:!1})}).always(function(){n(V.testServer({serverEntityID:t.serverEntityID})),r.populate().fail(function(){r.trigger("destroy",r,r.collection);
})})}else r.trigger("destroy",r,r.collection)}}),u));t.default=W,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID;return(0,h.default)(e,c.SERVER,n)}function r(e){return e.get("ui").get("hubsPage")}var a=n(49).default,s=n(19).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(59),c=s(u),d=n(93),h=o(d),p=n(210),f=o(p),m=n(211),v=o(m),g=n(272),y=o(g),b=n(75),w=o(b),S=n(181),P=n(52),x=s(P),C=(0,w.default)((l={},a(l,x.INIT_HUBS_PAGE,function(e,t){
var n=r(e),a=n.get("hubs"),s=i(e,t);if(!a||a.server!==s||a.url!==t.hubKey){var o=new f.default([],{server:s,hubKey:t.hubKey,count:12});o.reset(),o.abortPendingPopulate(),o.resetPopulatePromise(null),n.restoreDefaults({hubs:o})}}),a(l,x.FETCH_HUBS,(0,v.default)({key:"hubs",getModel:r})),a(l,x.POPULATE_HUBS,(0,y.default)({key:"hubs",getModel:r})),a(l,x.REPOPULATE_PAGE,function(e,t,n){var i=r(e),a=i.get("hubs");a&&a.each(function(e){var t=e.get("metadataList");!e.get("random")&&t.get("containerKey")&&n((0,
S.repopulateMetadataListRange)({metadataListEntityID:t.entityID(),count:a.count}))})}),l));t.default=C,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(74),s=i(a),o=n(52),l=r(o),u=(0,s.default)(l.INIT_HUBS_PAGE);t.initHubsPage=u;var c=(0,s.default)(l.FETCH_HUBS);t.fetchHubs=c;var d=(0,s.default)(l.POPULATE_HUBS);t.populateHubs=d},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID;return(0,
h.default)(e,c.SERVER,n)}function r(e){return e.get("ui").get("metadataListPage")}var a=n(49).default,s=n(19).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(59),c=s(u),d=n(93),h=o(d),p=n(87),f=o(p),m=n(75),v=o(m),g=n(181),y=n(52),b=s(y),w=(0,v.default)((l={},a(l,b.INIT_METADATA_LIST_PAGE,function(e,t){var n=r(e),a=n.get("metadataList"),s=i(e,t);if(!a||a.server!==s||a.get("containerKey")!==t.key){var o=new f.default({containerKey:t.key,containerTitle:t.title},{server:s
});n.set("metadataList",o)}}),a(l,b.REPOPULATE_PAGE,function(e,t,n){var i=r(e),a=i.get("metadataList");a&&n((0,g.repopulateMetadataListRange)({metadataListEntityID:a.entityID()}))}),l));t.default=w,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default,r=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(74),s=i(a),o=n(52),l=r(o),u=(0,s.default)(l.INIT_METADATA_LIST_PAGE);t.initMetadataListPage=u},function(e,t,n){"use strict";function i(e,t){var n=t.metadataItemEntityID;
return(0,c.default)(e,l.METADATA_ITEM,n)}var r=n(49).default,a=n(19).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(59),l=a(o),u=n(93),c=s(u),d=n(75),h=s(d),p=n(211),f=s(p),m=n(52),v=a(m),g=(0,h.default)(r({},v.VIEW_ITEM_DETAILS,(0,f.default)({getModel:function(e,t){var n=i(e,{metadataItemEntityID:t});return e.get("ui").set("metadataItem",n),n.get("children")}})));t.default=g,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e.get("user").get("desktop");
}var r=n(49).default,a=n(14).default,s=n(137).default,o=n(2).default,l=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var u,c=n(3),d=o(c),h=n(5),p=o(h),f=n(53),m=o(f),v=n(75),g=o(v),y=n(211),b=o(y),w=n(272),S=o(w),P=n(52),x=l(P),C=(0,g.default)((u={},r(u,x.FETCH_PLANS,(0,b.default)({key:"plans",getModel:i})),r(u,x.POPULATE_PLANS,(0,S.default)({key:"plans",getModel:i})),r(u,x.FETCH_UNWATCHED_WATCH_LATER_LIST,(0,b.default)({key:"unwatchedWatchLaterList",getModel:i})),r(u,x.POPULATE_UNWATCHED_WATCH_LATER_LIST,(0,
S.default)({key:"unwatchedWatchLaterList",getModel:i})),r(u,x.FETCH_UNWATCHED_RECOMMENDED_LIST,(0,b.default)({key:"unwatchedRecommendedList",getModel:i})),r(u,x.POPULATE_UNWATCHED_RECOMMENDED_LIST,(0,S.default)({key:"unwatchedRecommendedList",getModel:i})),r(u,x.CLEAR_UPDATE_USER_ERROR,function(e){var t=i(e);t.set("updateUserError",null)}),r(u,x.UPDATE_USER,function(e,t,n){var r=i(e),o=e.get("user"),l=t.avatar,u=a(t,["avatar"]);if(r.set({isUpdatingUser:!0,updateUserError:null}),l){for(var c=l.split(","),h=s(c,2),f=h[0],v=h[1],g=f.substr(5),y=atob(v),b=[],w=0;w<y.length;w++)b.push(y.charCodeAt(w));
var S=new Uint8Array(b),P=new Blob([S],{type:g});u.avatar=P}var x=new FormData;d.default.each(u,function(e,t){x.append(t,e)});var C=o.server.getXHROptions(d.default.result(o,"url"),{type:"PUT",processData:!1,contentType:!1,data:x});p.default.ajax(C).done(function(e){t.avatar&&o.fetch();var n=d.default.reduce(t,function(e,t,n){return o.hasAttr(n)&&(e[n]=t),e},{});o.set(n),r.set({isUpdatingUser:!1,updateUserError:null})}).fail(function(e){var t=m.default.parseXML(e.responseText),n=d.default.isArray(t)?t:[t.error],i=d.default.groupBy(n,function(e){
return e.field?e.field:"request"});r.set({isUpdatingUser:!1,updateUserError:i})})}),u));t.default=C,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=(0,s.default)(l.default,e);return t}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(794),s=r(a),o=n(1054),l=r(o);e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(28),a=n(142),s=i(a),o=(0,r.createSelector)(s.default,function(e){
return e.searchResults});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(28),o=n(185),l=i(o),u=void 0,c=(0,s.createSelector)(l.default,function(e){var t=a.default.pluck(e.activeSelectionItems,"id");return u&&a.default.isEqual(u,t)?u:(u=t,t)});t.default=c,e.exports=t.default},function(e,t,n){var i;i=function(){"use strict";var e={NONE:100,SMALL:150,LARGE:200,HUGE:250};return e.settings=[{value:e.NONE,
title:"None"},{value:e.SMALL,title:"Small"},{value:e.LARGE,title:"Large"},{value:e.HUGE,title:"Huge"}],e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i;i=function(){"use strict";var e={PENDING:"pending",ERROR:"error",PROCESSED:"processed",contexts:{OK:"ok",FILE_UNAVAILABLE:"sourceFileUnavailable",METADATA_ERROR:"sourceFileMetadataError",PROFILE_ERROR:"clientProfileError",IO_ERROR:"ioError",TRANSCODER_ERROR:"transcoderError",UNKNOWN_ERROR:"unknownError",ANALYSIS_ERROR:"mediaAnalysisError",
DOWNLOAD_FAILED:"downloadFailed",CANNOT_TRANSCODE:"cannotTranscode"}};return e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i;i=function(){"use strict";var e={PENDING:"pending",FAILED:"failed",COMPLETE:"complete",failureCodes:{INVALID_PATH:"invalidPath",DISK_FULL:"diskFull",DISK_UNWRITABLE:"diskUnwritable"}};return e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i;i=function(){"use strict";var e={TINY:50,SMALL:75,NORMAL:100,LARGE:125,HUGE:200};return e.settings=[{
value:e.TINY,title:"Tiny"},{value:e.SMALL,title:"Small"},{value:e.NORMAL,title:"Normal"},{value:e.LARGE,title:"Large"},{value:e.HUGE,title:"Huge"}],e}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(29),n(8),n(43),n(132),n(50),n(10),n(182),n(183),n(55),n(124),n(408),n(102),n(490),n(179),n(486),n(178)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y){"use strict";var b=i.extend({mixins:o,url:function w(){var e=this.server.get("activeConnection"),t=e.id.replace(/^http/,"ws"),w=this.server.resolveUrl("/:/websockets/notifications",{
connection:new f({uri:t}),appendToken:!0});return w},initialize:function(t){e.bindAll(this,"onOpen","onClose","onError","onMessage"),this.server=t.server},open:function(){return this.socket&&this.close(),this._deferred=t.Deferred(),this.socket=new WebSocket(e.result(this,"url")),this.socket.onopen=this.onOpen,this.socket.onclose=this.onClose,this.socket.onerror=this.onError,this.socket.onmessage=this.onMessage,this._deferred.promise()},close:function(){this._deferred&&"pending"===this._deferred.state()&&this._deferred.reject(),
this.socket&&(this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close(),this.socket=null)},testConnection:function(){if(this.server.get("connected")){var e=this.server.get("update");e&&"installing"===e.get("state")&&this.server.set("connected",null),this.server.trigger("error:connection",this.server)}},preference:function(e){e.key=e.id,e.server=this.server,this.server.trigger("socket:setting",e)},timeline:function(t){t.server=this.server;
var n={server:this.server,onlyIfCached:!0},i=new h({key:t.sectionID},n);if(!e.isEmpty(i)){n.section=i,t.section=i;var a="/library/metadata/"+t.itemID,s=new d({key:a},n);if(e.isEmpty(s)||(t.item=s,s.set({metadataState:t.metadataState,mediaState:t.mediaState}),s.trigger("socket:timeline",t)),t.rootItemID){var o="/library/metadata/"+t.rootItemID,l=new d({key:o},n);e.isEmpty(l)||(l.fetch(),l.refreshChildren())}if(t.parentItemID){var u="/library/metadata/"+t.parentItemID,c=new d({key:u},n);e.isEmpty(c)||(c.fetch(),
c.refreshChildren())}i.trigger("socket:timeline",t)}t.server.trigger("socket:timeline",t),r.trigger("timeline",t)},status:function S(e){var S=e.title+(e.description?": "+e.description:"");if(r.trigger("show:status",this.server,S),this.server.trigger("socket:status",e),"LIBRARY_UPDATE"===e.notificationName){var t=l.resolve("appStore"),n=this.server.entityID();n&&(t.dispatch(u.fetchLibraries({serverEntityID:n})),t.dispatch(c.repopulatePage()))}},progress:function(e){r.trigger("show:status",this.server,e.message),
this.server.trigger("socket:status",e)},playing:function(t){if(t.sessionKey&&!this.server.get("shared")){var i=this.server.get("sessions"),s=i.get(t.sessionKey);if(s&&s.get("key")===t.key)if(t.state===a.states.STOPPED){s.trigger("destroy",s,s.collection),s.cache.remove(s);var o=l.resolve("appStore"),u=this.server.entityID();u&&o.dispatch(c.repopulatePage())}else{var d=s.get("Player");d&&(d.state=t.state,s.trigger("change:Player",s,d)),s.set("viewOffset",t.viewOffset)}else{if(i.hasPendingPopulate())return;
var h=i.fetch();h.done(e.bind(function(){if(s=i.get(t.sessionKey)){var a=l.resolve("appModel"),o=a.get("user"),u=s.get("Player").title,c=s.get("User").title,d=s.get("grandparentTitle"),h=s.get("title");d&&(h=d+" - "+h);var p=n("{1} started playing {2} on {3}.",c,h,u);c&&c!==o.get("username")&&r.trigger("show:status",this.server,p),this.server.trigger("socket:playing",e.extend(t,{username:c||n("Unknown"),title:h,player:u}))}},this))}}},syncState:function(t){var n=new m({key:t.key},{server:this.server,
syncItemId:t.syncItemId,onlyIfCached:!0});if(!e.isEmpty(n)){var i=n.get("Media");e.each(i,function(i){var r=i.Part;e.each(r,function(e){e.transcodeState=t.syncFileState,e.transcodeStateContext=t.syncFileStateContext,e.syncState=t.syncState,e.syncStateContext=t.syncStateContext;var i=s.getSyncStateFromPart(e);s.waitingRegex.test(i)&&(e.key="placeholder"),n.trigger("change:Media",n,n.get("Media"))})})}},backgroundGeneratorState:function(t){var n={server:this.server,onlyIfCached:!0},i=new v({id:t.generatorID
},n);e.isEmpty(i)||i.fetch()},versionState:function(t){var n={server:this.server,onlyIfCached:!0},i=new v({id:t.generatorID},n);if(!e.isEmpty(i)){var r=i.get("children").getCollection(),a=r.get(t.metadataItemID);a&&a.set({processingState:t.state,processingStateContext:t.stateContext})}},backgroundProcessingQueue:function(t){var n=new g([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!e.isEmpty(n)){var i=n.first();i&&i.fetch()}},"transcodeSession.start":function(t){if("static"===t.context){
var n=new y([],{server:this.server,allowInCache:!0,onlyIfCached:!0});e.isEmpty(n)||n.fetch()}},"transcodeSession.update":function(t){if("static"===t.context){var n=new y([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!e.isEmpty(n)){var i=n.get(t.key);i?i.set(i.parse(t)):n.fetch()}}},"transcodeSession.end":function(e){this["transcodeSession.start"].apply(this,arguments)},"update.statechange":function(t){var n=this.server.get("update"),i=e.pick(t,n.whitelistedAttrs);e.defaults(i,e.result(n,"defaults")),
"downloading"===n.get("state")&&"available"===i.state&&(i.state="downloading"),n.set(i)},reachability:function(e){var t=this.server.get("cloudAccount");t.fetch()},account:function(n){if(this.server.set("myPlexSubscription",n.hasPlexPass),this.server.supports("reachability")){var i="/myplex/refreshReachability",r=e.extend(this.server.getXHROptions(i),{type:"PUT"});t.ajax(r)}var a=l.resolve("appModel"),s=a.get("cloudServer"),o=a.get("user");o.get("isSignedIn")&&s.get("resources").fetch()},onOpen:function(e){
this.server.trigger("socket:websocket",{opened:!0}),this.trigger("open",this.server,e),this._deferred.resolve(this.server,e)},onClose:function(e){this.close(),this.server.trigger("socket:websocket",{closed:!0}),this.trigger("close",this.server,e),this._deferred.reject(this.server,e),this.testConnection()},onError:function(e){this.close(),this.server.trigger("socket:websocket",{error:!0}),this.trigger("error",this.server,e),this._deferred.reject(this.server,e),this.testConnection()},onMessage:function(t){
var n;try{n=JSON.parse(t.data)}catch(i){return}var r=n.type,a=this[r];e.each(n._children,function(t){this.trigger("message",t),e.isFunction(a)&&a.call(this,t)},this)}});return b}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1660),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({tagName:"span",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1661),n(3),n(9),n(8),n(26),n(78)],r=function(e,t,n,i,r,a){"use strict";var s=n.ItemView.extend({
className:"background-container",template:e,ui:{background:".background"},onlyAfterRender:["onTransitionIn","onTransitionOut","onImageLoad"],initialize:function(){t.bindAll(this,"onImageLoad"),this.image=new a({width:1280,height:720}),this.listenTo(i,"show:background",this.onTransitionIn),this.listenTo(i,"hide:background",this.onTransitionOut)},load:function(e){if(!this.model)return void r.warn("A background cannot be loaded without a model, current key: "+this.currentKey);if(this.currentBackground!==e||!t.isEmpty(this.imageFilters)||this.image.hasFilters()){
if(this.currentBackground=e,!e)return void this.ui.background.addClass("transition-out");this.image.server=this.model.server,this.image.setFilters(this.imageFilters),this.image.load(e,!0).done(this.onImageLoad)}},showBackground:function(e){this.ui.background.css("background-image","url("+e+")").removeClass("transition-out")},onRender:function(){this.currentSrc&&this.showBackground(this.currentSrc)},onClose:function(){this.image.close()},onTransitionIn:function(e){return this.model&&this.model.id===e.model.id?void this.references++:(this.references=1,
this.model=e.model,this.listenTo(this.model,"change:art",this.onArtChange),this.imageFilters=e.imageFilters||{},this.currentKey=this.model.get("key"),this.ui.background.toggleClass("dim",!!e.dim),void this.load(this.model.get("art")))},onTransitionOut:function(e){if(this.model&&this.model.id===e.id){if(this.references>1)return void this.references--;this.image.cancel(),this.stopListening(this.model),this.model=null,this.currentBackground=null,this.currentSrc=null,this.ui.background.addClass("transition-out");
}},onArtChange:function(e,t){this.load(t)},onImageLoad:function(e){this.currentBackground&&this.showBackground(e),this.currentSrc=e}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1662),n(3),n(5),n(9),n(10),n(8),n(43),n(13),n(54),n(496),n(1080),n(498),n(1100),n(1285),n(1284),n(1279),n(1278),n(1282),n(1280),n(1276),n(186),n(1037)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y,b,w,S){"use strict";var P=i.Layout.extend({el:"#plex",template:e,resizeDelay:200,ui:{
content:"#content",shadow:".scroll-shadow"},customRegions:{background:{prepend:!0,global:!0},content:{selector:"#content",global:!0,scrollable:!0,channelName:"content"},status:{prepend:!0,global:!0},player:{append:!0,global:!0},miniPlayer:{append:!0,global:!0},navbar:{modifier:"show-nav-bar",prepend:!0,global:!0},sidebar:{modifier:"show-side-bar",append:!0},actionbar:{modifier:"show-action-bar",append:!0},breadcrumbbar:{modifier:"show-breadcrumb-bar",append:!0},filterbar:{modifier:"show-filter-bar",
append:!0},alphabar:{modifier:"show-alpha-bar",append:!0},alertbar:{modifier:"show-alert-bar",append:!0,global:!0}},openAlerts:{},initialize:function(){t.bindAll(this,"triggerResizeEvent","onResize","onScroll");var e=r.resolve("appModel");this.user=e.get("user"),this.modals=[],this.playerConstructors={full:{},mini:{}},this.playerConstructors.full[s.types.VIDEO]=p,this.playerConstructors.full[s.types.PHOTO]=g,this.playerConstructors.mini[s.types.VIDEO]=f,this.playerConstructors.mini[s.types.MUSIC]=m,
this.playerConstructors.mini[s.types.PHOTO]=y,t.each(t.keys(this.customRegions),function(e){var n=this.customRegions[e],i=n.selector||t.uniqueId("r");n.scrollable?this.addRegion(e,new S({el:i,channelName:n.channelName})):this.addRegion(e,i)},this),this.listenTo(e,{"change:authorized":this.onAuthorizedChange,"change:isFirstRun":this.onFirstRunChange,"change:multiserver":this.onMultiserverChange}),this.listenTo(this.user,{"change:locked":this.onUserLockedChange}),this.listenTo(a,{"show:loading":this.showLoading,
"show:view":this.showView,"show:alert":this.showAlert,"show:bar":this.showBar,"hide:bar":this.hideBar,"show:modal":this.showModal,"hide:modal":this.hideModal,"show:player":this.showPlayer,"hide:player":this.hidePlayer,"show:playerLoading":this.showPlayerLoading,"hide:playerLoading":this.hidePlayerLoading,"start:scrollListener":this.onStartScrollListener,"stop:scrollListener":this.onStopScrollListener,"update:scrollPosition":this.onUpdateScrollPosition}),n(window).on("resize",this.onResize)},showCustomRegion:function(e,t){
var n=this.customRegions[e],i=this[e];return this.user.get("locked")?(i.lockedView=t,void t.close()):void(n.append?i.append(t,this.$el):n.prepend?i.prepend(t,this.$el):i.show(t))},showLoading:function(){this.hideBar("alertbar"),this.user.get("locked")&&this.resetContentLockedRegions(),this.showCustomRegion("content",new u)},showView:function(e){n(".tooltip").remove(),this.hideBackground(this.currentView,e),a.trigger("cycle:cache"),this.currentView=e,this.showCustomRegion("content",e),this.ui.content.scrollTop(0);
},showAlert:function(e){var t=e.message;if(!this.openAlerts[t]){var n=new d(e);this.openAlerts[t]=!0,this.listenToOnce(n,"close",function(){delete this.openAlerts[t]}),this.$el.append(n.render().el)}},showAlertBar:function(){var e=l.get("alerts");e&&e.length&&(l.set("alerts",null),this.showBar("alertbar",new w({alert:t.first(e)})))},showBar:function(e,t){var n=this.customRegions[e],i=n.modifier;i&&this.$el.addClass(this.customRegions[e].modifier),t&&this.showCustomRegion(e,t)},hideBar:function(e,t){
t||(t={});var n=this.customRegions[e],i=n.modifier;i&&this.$el.removeClass(i),t.preserve||(this[e].lockedView=null,this[e].close())},showModal:function(e){this.modals.push(e);var t=n("body");e.transparent&&t.addClass("show-modal-transparent"),t.append(e.render().el)},hideModal:function(e){var i=t.indexOf(this.modals,e);i>-1&&this.modals.splice(i,1)[0].close(),e.transparent&&!t.findWhere(this.modals,{transparent:!0})&&n("body").removeClass("show-modal-transparent")},showPlayer:function(e){this.hideLoadingMiniPlayerView(),
n(".tooltip").remove();var t=this.player.currentView,i=t&&t.playQueue===e.playQueue;if(e.controller||!i){var a=e.useMiniPlayer||e.type===s.types.MUSIC,o=r.resolve("appModel"),l=o.get("primaryPlayer"),u=l&&"cast"===l.get("protocol"),c=u||e.type===s.types.VIDEO;(c||e.isSwitchingPlayers)&&this.hidePlayer();var d=this.playerConstructors[a?"mini":"full"][e.type],h=new d(e);a?(this.showCustomRegion("miniPlayer",h),this.$el.addClass("show-mini-player")):this.showCustomRegion("player",h)}},showPlayerLoading:function(){
this.showCustomRegion("miniPlayer",new v)},hidePlayer:function(e){e?(this.miniPlayer.currentView===e&&(this.miniPlayer.close(),this.$el.removeClass("show-mini-player")),this.player.currentView===e&&this.player.close()):(this.miniPlayer.close(),this.$el.removeClass("show-mini-player"),this.player.close())},hideBackground:function(e,t){var n=t.model?t.model.get("grandparentTheme")||t.model.get("parentTheme")||t.model.get("theme")||t.model.get("key"):null;a.trigger("audio:fadeOut",{exceptKey:n}),e&&e.model&&a.trigger("hide:background",this.currentView.model);
},hideLoadingMiniPlayerView:function(){this.miniPlayer.currentView instanceof v&&(this.miniPlayer.currentView.$el.remove(),this.miniPlayer.close())},lockAll:function(){var e=t.map(t.keys(this.customRegions),function(e){return this[e]},this);t.each(e,function(e){e.close()},this)},resetContentLockedRegions:function(){t.each(t.keys(this.customRegions),function(e){var t=this.customRegions[e];if(!t.global){var n=this[e];n.lockedView&&(n.lockedView=null)}},this)},restoreAll:function(){var e=r.resolve("appModel");
e.get("authorized")&&this.showBar("navbar",new b({model:e}),{prepend:!0}),this.showCustomRegion("background",this.backgroundView),this.showCustomRegion("status",new h)},triggerResizeEvent:function(){a.trigger("resize")},onRender:function(){this.backgroundView=new c,this.restoreAll()},onAuthorizedChange:function(e,t){if(t){var n=r.resolve("appModel");this.showBar("navbar",new b({model:n}),{prepend:!0});var i=this.user.get("locked");i!==!1&&null!==i||this.showAlertBar()}else this.hideBar("navbar"),
this.hidePlayer(),a.trigger("navigate:refresh")},onFirstRunChange:function(e,t){this.$el.toggleClass("show-first-run",t)},onMultiserverChange:function(e,t){this.$el.toggleClass("show-multiserver",t)},onUserLockedChange:function(e,t){t?this.lockAll():t!==!1&&null!==t||(null===t&&(this.backgroundView=new c),this.restoreAll())},onResize:function(){this.resizeTimeout=clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this.triggerResizeEvent,this.resizeDelay)},onStartScrollListener:function(){
this.ui.content.on("scroll",this.onScroll)},onStopScrollListener:function(){this.ui.content.off("scroll",this.onScroll),this.ui.shadow.addClass("transition-out")},onScroll:function(){var e=this.ui.content.scrollTop();this.ui.shadow.toggleClass("transition-out",e<10)},onUpdateScrollPosition:function(e){this.ui.content[0].scrollTop=e}});return P}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r,a=n(11).default;i=[n(1663),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({template:e,
className:"download-server-pane",serializeData:function(){var e=this.model.toJSON();return a({shouldUseDropup:e.releases.length>4},e)}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1664),n(5),n(3),n(9),n(8),n(13)],r=function(e,t,n,i,r,a){"use strict";var s=10,o=1,l=-1,u=i.ItemView.extend({tagName:"span",className:"rating heart-rating",template:e,disabled:!0,events:{"click .like-meh-btn":"onLikeMehClick","click .dislike-btn":"onDislikeClick"},bindings:{".like-meh-btn":{
modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===s;t.toggleClass("user-rating",n)}},".like-meh-btn > i":{modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===s;t.toggleClass("plex-icon-heart",n),t.toggleClass("plex-icon-heart-empty",!n)}},".dislike-btn":{modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===o;t.toggleClass("user-rating",n)}}},persistRating:function(e){return a.execute("rate",{
item:this.model,rating:e})},onUserRatingChange:function(e,t){this.render()},onLikeMehClick:function(e){this.persistRating(this.model.get("userRating")===s?l:s)},onDislikeClick:function(){return this.model.get("userRating")===o?void this.persistRating(l):void this.persistRating(o).done(n.bind(function(){var e=this.model.server.get("playQueueManager"),t=e.getFor(this.model);t.fetch().then(function(){r.trigger("shortcut:skipNext")})},this))}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1665),n(9),n(10),n(61)],r=function(e,t,n,i){"use strict";var r=t.ItemView.extend({template:e,initialize:function(){var e=n.resolve("appModel");this.listenTo(e,"change:primaryServer",this.render),this.listenTo(e.get("user"),"change:signedIn",this.render)},serializeData:function(){var e=n.resolve("appModel"),t=e.get("user"),r=e.get("primaryServer"),a={host:window.location.host,userAgent:window.navigator.userAgent,browser:i,user:t.toJSON(),hasPlexPass:t.hasPlexPass(),cloudServer:t.server.toJSON(),
cloudServerUrl:t.server.url()};return r&&(a.primaryServer=r.toJSON(),a.primaryServerUrl=r.url()),a}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1667),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"logs-container",template:e,ui:{textarea:"textarea"},collectionEvents:{add:"onAdd"},onlyAfterRender:["onAdd"],serializeData:function(){return{logs:this.collection.toJSONString()}},onAdd:function(e,t){this.ui.textarea.text(this.collection.toJSONString());
}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(247),n(9),n(7),n(66),n(34),n(10),n(59),n(77),n(1414),n(242),n(244)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=t.Layout.extend({className:"search-page-container",template:e,ui:{sidebar:".sidebar-container",page:".page-container"},initialize:function(){this.$el.addClass(c.dashboardContainer)},serializeData:function(){return{styles:c}},mountReact:function(){var e=r.Provider,t=a.resolve("appStore"),c=o(s.SERVER,this.options.serverID);
i.render(n.createElement(e,{store:t},n.createElement(u,{serverEntityID:c})),this.ui.sidebar[0]),i.render(n.createElement(e,{store:t},n.createElement(l,{machineIdentifier:this.options.serverID,serverEntityID:c,query:this.options.query})),this.ui.page[0])},unmountReact:function(){this.isRendered&&(i.unmountComponentAtNode(this.ui.sidebar[0]),i.unmountComponentAtNode(this.ui.page[0]))},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact();
}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1668),n(3),n(9),n(65),n(10)],r=function(e,t,n,i,r){"use strict";var a=n.ItemView.extend({className:"sign-in-form",template:e,validationFields:["username","email","password","confirm"],ui:{submitBtn:"[type=submit]",signInBtn:".sign-in-btn",signUpBtn:".sign-up-btn",username:".username-group",email:".email-group",password:".password-group",confirm:".confirm-group"},events:{"click .sign-in-btn":"onSignInClick","click .sign-up-btn":"onSignUpClick",
"blur input":"onInputBlur","submit form":"onSubmit"},initialize:function(e){this.isFirstRun=e.isFirstRun,this.showRememberMe=e.showRememberMe,r.resolve("metrics").trackView({page:"signIn",firstRun:this.isFirstRun})},serializeData:function(){return{showRememberMe:this.showRememberMe}},validateAll:function(e,n,i){var r=!0;return n||(n=this.validationFields),t.each(n,t.bind(function(t){var n=e[t];this.validate(n,i[t],i)||(r=!1)},this)),r},validate:function(e,n,i){var r,a=e.id;if(t.indexOf(this.validationFields,a)<0)return!0;
var s=this.ui[a];return r="confirm"===e.id?n===e.form.password.value:!!n,s.toggleClass("has-error",!r),r},onSignInClick:function(e){e.preventDefault(),this.ui.signInBtn.addClass("selected"),this.ui.signUpBtn.removeClass("selected"),this.$el.addClass("sign-in-form"),this.$el.removeClass("sign-up-form"),r.resolve("metrics").trackView({page:"signIn",firstRun:this.isFirstRun})},onSignUpClick:function(e){e.preventDefault(),this.ui.signInBtn.removeClass("selected"),this.ui.signUpBtn.addClass("selected"),
this.$el.removeClass("sign-in-form"),this.$el.addClass("sign-up-form"),r.resolve("metrics").trackView({page:"signup",firstRun:this.isFirstRun})},onInputBlur:function(e){var t=e.target,n="checkbox"===t.type?t.checked:t.value;this.validate(t,n)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1671),n(3),n(5),n(9),n(6),n(8),n(22),n(13),n(315),n(314),n(115),n(116),n(515),n(516),n(193),n(192),n(191),n(135)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g){"use strict";var y=["episode","movie","clip","userPlaylistItem"],b={
preventDefault:!0,stopPropagation:!1},w=i.ItemView.extend({className:"action-bar",template:e,ui:{primaryActions:".action-bar-nav",secondaryActions:".dropdown-menu",playBtn:".play-btn",playVersionBtn:".play-version-btn",playAllBtn:".play-all-btn",playUnwatchedBtn:".play-unwatched-btn",playShuffledBtn:".play-shuffled-btn",playTrailerBtn:".play-trailer-btn",playNextBtn:".play-next-btn",addToQueueBtn:".add-to-queue-btn",addToPlaylistBtn:".add-to-playlist-btn",mergeBtn:".merge-btn",secondaryDivider:".secondary-divider",
editBtn:".edit-btn",refreshBtn:".refresh-btn",analyzeBtn:".analyze-btn",markWatchedBtn:".mark-watched-btn",markUnwatchedBtn:".mark-unwatched-btn",syncBtn:".sync-btn",convertBtn:".convert-btn",watchLaterBtn:".watch-later-btn",shareBtn:".share-btn",recommendBtn:".recommend-btn",deleteBtn:".delete-btn",deleteVersionsBtn:".delete-versions-btn",deleteFromUserPlaylistBtn:".delete-from-user-playlist-btn",infoBtn:".info-btn"},triggers:{"click .play-btn":"play","click .play-version-btn":t.extend({event:"playVersion"
},b),"click .download-btn":t.extend({event:"download"},b),"click .play-all-btn":t.extend({event:"play"},b),"click .play-unwatched-btn":"playUnwatched","click .play-shuffled-btn":"playShuffled","click .play-trailer-btn":"playTrailer","click .edit-btn":"edit","click .refresh-btn":"refresh","click .analyze-btn":t.extend({event:"analyze"},b),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .match-btn":t.extend({event:"fixMatch"},b),"click .select-btn":"select",
"click .deselect-btn":"deselect","click .fix-match-btn":t.extend({event:"fixMatch"},b),"click .unmatch-btn":t.extend({event:"unmatch"},b),"click .split-apart-btn":t.extend({event:"splitApart"},b),"click .merge-btn":t.extend({event:"merge"},b),"click .sync-btn":"sync","click .convert-btn":t.extend({event:"convert"},b),"click .watch-later-btn":t.extend({event:"watchLater"},b),"click .share-btn":t.extend({event:"share"},b),"click .recommend-btn":t.extend({event:"recommend"},b),"click .delete-btn":t.extend({
event:"delete"},b),"click .delete-versions-btn":t.extend({event:"deleteVersions"},b),"click .delete-from-user-playlist-btn":t.extend({event:"deleteFromUserPlaylist"},b),"click .info-btn":t.extend({event:"info"},b),"click .play-next-btn":t.extend({event:"playNext"},b),"click .add-to-queue-btn":t.extend({event:"addToQueue"},b),"click .add-to-playlist-btn":"addToPlaylist"},onlyAfterRender:["onPlay","onPlayUnwatched","onPlayShuffled","onPlayTrailer","onEdit","onRefresh","onAnalyze","onMarkWatched","onMarkUnwatched","onSync","onWatchLater","onShare","onRecommend","onDelete","onDeleteFromUserPlaylist","onInfo","onPlayNext","onAddToQueue","onAddToPlaylist","onMerge","updateDropdown"],
initialize:function(e){this.type=this.model.get("type"),this.mediaActions=e.mediaActions,this.listenTo(this.mediaActions,"change",t.throttle(this.updateDropdown,50)),this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),this.listenTo(a,{"shortcut:play":this.onPlay,"shortcut:edit":this.onEdit,"shortcut:refresh":this.onRefresh,"shortcut:analyze":this.onAnalyze,"shortcut:markWatched":this.onMarkWatched,"shortcut:markUnwatched":this.onMarkUnwatched,"shortcut:sync":this.onSync,
"shortcut:delete":this.onDelete,"shortcut:info":this.onInfo}),this.listenTo(a,"shortcut:play",this.onPlayUnwatched),this.listenTo(a,"shortcut:delete",this.onDeleteFromUserPlaylist)},serializeData:function(){var e=t.extend({},this.mediaActions.attributes);if(e.isSingleItem=t.contains(y,this.type),this.mediaActions.get("showDownload")){e.downloadUrl=this.model.getDownloadUrl();var n=this.model.getFilepath();n&&(e.downloadName=s.getLastSegment(n))}return e},updateDropdown:function(){var e=this.ui.secondaryActions.find("a:not(.hidden)"),t=e.hasClass("secondary-only"),n=e.length>2||t;
if(this.$el.toggleClass("show-secondary-actions-dropdown",n),n){var i=this.ui.secondaryDivider,r=i.prevAll(":not(:has(.hidden))").length,a=i.nextAll(":not(:has(.hidden))").length;i.toggleClass("hidden",!r||!a)}},bindingsModel:"mediaActions",bindings:{".play-btn":{modelAttribute:"showPlay",manual:!0,autohide:!0},".play-version-btn":{modelAttribute:"showPlayVersion",manual:!0,autohide:!0},".play-all-btn":{modelAttribute:"showPlayAll",manual:!0,autohide:!0},".play-unwatched-btn":{modelAttribute:"showPlayUnwatched",
manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".play-next-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".add-to-queue-btn":{modelAttribute:"showQueue",manual:!0,autohide:!0},".play-trailer-btn":{modelAttribute:"showPlayTrailer",manual:!0,autohide:!0},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".edit-btn":{modelAttribute:"showEdit",manual:!0,autohide:!0},".refresh-btn":{modelAttribute:"showRefresh",
manual:!0,autohide:!0},".analyze-btn":{modelAttribute:"showAnalyze",manual:!0,autohide:!0},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".match-btn":{modelAttribute:"showMatch",manual:!0,autohide:!0},".select-btn":{modelAttribute:"selecting",manual:!0,autohide:function(e){return!e&&this.mediaActions.get("showSelect")}},".deselect-btn":{modelAttribute:"selecting",manual:!0,autohide:!0},
".fix-match-btn":{modelAttribute:"showFixMatch",manual:!0,autohide:!0},".unmatch-btn":{modelAttribute:"showUnmatch",manual:!0,autohide:!0},".merge-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showMerge"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showMerge")&&!this.model.get("hasSelectedFolder")}},".split-apart-btn":{modelAttribute:"showSplitApart",manual:!0,autohide:!0},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",
manual:!0,autohide:!0},".download-btn":{modelAttribute:"showDownload",manual:!0,autohide:!0},".watch-later-btn":{modelAttribute:"showWatchLater",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0},".delete-versions-btn":{modelAttribute:"showDeleteVersions",manual:!0,autohide:!0},".delete-from-user-playlist-btn":{modelAttribute:"showDeleteFromUserPlaylist",manual:!0,autohide:!0},".info-btn":{
modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.updateDropdown()},onPlay:function(){this.ui.playBtn.isDisabled()&&this.ui.playAllBtn.isDisabled()||o.execute("playMedia",{items:this.mediaActions.getActionTargets()})},onPlayVersion:function(){this.ui.playVersionBtn.isDisabled()||a.trigger("show:modal",new l({model:this.model}))},onDownload:function(){this.model.get("Media").length>1?a.trigger("show:modal",new u({
model:this.model})):window.location.href=this.model.getDownloadUrl()},onPlayUnwatched:function(){this.ui.playUnwatchedBtn.isDisabled()||o.execute("playMedia",{items:this.mediaActions.getActionTargets(),unwatched:!0})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||o.execute("playMedia",{items:this.mediaActions.getActionTargets(),shuffle:!0})},onPlayTrailer:function(){if(!this.ui.playTrailerBtn.isDisabled()){var e=this.model.get("extras"),t=e.get("metadataItems"),n=t.findWhere({key:this.model.get("primaryExtraKey")
});o.execute("playMedia",{items:[n]})}},onEdit:function(){this.ui.editBtn.isDisabled()||(this.model.get("isPlaylist")?a.trigger("show:modal",new h({model:this.model})):a.trigger("show:modal",new d({mediaActions:this.mediaActions})))},onRefresh:function(){this.ui.refreshBtn.isDisabled()||o.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onAnalyze:function(){this.ui.analyzeBtn.isDisabled()||o.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){
this.ui.markWatchedBtn.isDisabled()||o.execute("markWatched",{items:this.mediaActions.getActionTargets()})},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||o.execute("markUnwatched",{items:this.mediaActions.getActionTargets()})},onSelect:function(){this.mediaActions.set("selecting",!0)},onDeselect:function(){this.mediaActions.set("selecting",!1)},onFixMatch:function(){a.trigger("show:modal",new p({model:this.model}))},onUnmatch:function(){o.execute("unmatch",{item:this.model})},
onSplitApart:function(){o.execute("splitApart",{item:this.model})},onSync:function(){this.ui.syncBtn.isDisabled()||o.execute("showSyncModal",{item:this.model,items:this.mediaActions.getActionTargets()})},onConvert:function(){a.trigger("show:modal",new g({item:this.model,items:this.mediaActions.getActionTargets()}))},onWatchLater:function(){this.ui.watchLaterBtn.isDisabled()||o.execute("watchLater",{item:this.model})},onShare:function(){this.ui.shareBtn.isDisabled()||a.trigger("show:modal",new f({
model:this.model}))},onRecommend:function(){this.ui.recommendBtn.isDisabled()||a.trigger("show:modal",new m({model:this.model}))},onDelete:function(){this.ui.deleteBtn.isDisabled()||(this.model.get("playlistType")?o.execute("deletePlaylist",{item:this.model}):o.execute("deleteItems",{items:this.mediaActions.getActionTargets()}))},onDeleteVersions:function(){this.ui.deleteBtn.isDisabled()||o.execute("deleteVersions",{item:this.model})},onDeleteFromUserPlaylist:function(){if(!this.ui.deleteFromUserPlaylistBtn.isDisabled()){
var e=this.model.destroy();e.done(t.bind(function(){n(".tooltip").remove(),a.trigger("navigate","userPlaylist",{key:this.model.userPlaylistKey})},this))}},onInfo:function(){this.ui.infoBtn.isDisabled()||a.trigger("show:modal",new v({model:this.model}))},onPlayNext:function(){this.ui.playNextBtn.isDisabled()||o.execute("queueMedia",{item:this.model,next:!0})},onAddToQueue:function(){this.ui.addToQueueBtn.isDisabled()||o.execute("queueMedia",{item:this.model,next:!1})},onAddToPlaylist:function(){this.ui.addToPlaylistBtn.isDisabled()||a.trigger("show:modal",new c({
model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),n=t.first(e),i=e.slice(1);o.execute("merge",{item:n,items:i})}},onSelectedItemsChange:function(e,t){var n=r(t&&t.length?"Play selected":"Play All");this.ui.playBtn.attr("data-original-title",n)}});return w}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1672),n(5),n(9),n(8),n(1330)],
r=function(e,t,n,i,r){"use strict";var a=n.Layout.extend({className:"playlists-side-bar-container",template:e,regions:{sidebar:".side-bar"},triggers:{"click .options-btn":"toggleSidebar"},onlyAfterRender:["onToggleSidebar"],initialize:function(){this.listenTo(i,{"shortcut:sidebar":this.onToggleSidebar})},onRender:function(){this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.sidebar.append(new r({model:this.model}),this.$el)},onToggleSidebar:function(){t(".tooltip").remove();
var e=this.sidebar.currentView;e.hidden?e.open():e.hide()}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1673),n(3),n(5),n(9),n(10),n(6),n(8),n(13),n(1331),n(1239),n(115),n(116),n(117),n(135)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p){"use strict";var f={preventDefault:!0,stopPropagation:!1},m=i.Layout.extend({className:"section-side-bar-container",template:e,ui:{actionBar:".action-bar",secondaryActions:".dropdown-menu",playBtn:".play-btn",playShuffledBtn:".play-shuffled-btn",
refreshBtn:".refresh-btn",analyzeBtn:".analyze-btn",markWatchedBtn:".mark-watched-btn",markUnwatchedBtn:".mark-unwatched-btn",addToCollectionBtn:".add-to-collection-btn",addToPlaylistBtn:".add-to-playlist-btn",mergeBtn:".merge-btn",syncBtn:".sync-btn",deleteBtn:".delete-btn"},regions:{sidebar:".side-bar"},triggers:{"click .options-btn":"toggleSidebar","click .play-btn":"play","click .play-shuffled-btn":"playShuffled","click .select-btn":"select","click .deselect-btn":"deselect","click .edit-btn":"edit",
"click .refresh-btn":t.extend({event:"refresh"},f),"click .analyze-btn":t.extend({event:"analyze"},f),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .add-to-collection-btn":t.extend({event:"addToCollection"},f),"click .add-to-playlist-btn":"addToPlaylist","click .merge-btn":t.extend({event:"merge"},f),"click .sync-btn":"sync","click .convert-btn":t.extend({event:"convert"},f),"click .delete-btn":t.extend({event:"delete"},f)},initialize:function(e){this.bindAllWhenRendered("updateDropdown");
var t=r.resolve("appModel");this.mediaActions=e.mediaActions,this.type=this.model.get("type"),this.multiuser=this.model.server.get("multiuser"),this.signedIn=t.get("user").get("signedIn"),this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),this.listenTo(s,{"shortcut:sidebar":this.onToggleSidebar,"shortcut:play":this.onPlay,"shortcut:refresh":this.onRefresh,"shortcut:analyze":this.onAnalyze,"shortcut:markWatched":this.onMarkWatched,"shortcut:markUnwatched":this.onMarkUnwatched,
"shortcut:sync":this.onSync,"shortcut:edit":this.onEdit,"shortcut:delete":this.onDelete})},updateDropdown:function(){var e=this.ui.secondaryActions.find("a:not(.hidden)"),t=e.hasClass("secondary-only"),n=e.length>2||t;this.ui.actionBar.toggleClass("show-secondary-actions-dropdown",n)},bindingsModel:"mediaActions",bindings:{".play-btn":{modelAttribute:"showPlay",manual:!0,autohide:!0},".play-shuffled-btn":{modelAttribute:"showShuffle",manual:!0,autohide:!0},".select-btn":{modelAttribute:"selecting",
modelListeners:["selecting","showSelect"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showSelect")&&!e}},".deselect-btn":{modelAttribute:"selecting",manual:!0,autohide:!0},".edit-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showEdit"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showEdit")&&!(!e||!e.length)}},".refresh-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showRefresh"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showRefresh")&&(e&&e.length&&!this.model.get("hasSelectedFolder"));
}},".analyze-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showAnalyze"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showAnalyze")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}},".mark-watched-btn":{modelAttribute:"showMarkWatched",manual:!0,autohide:!0},".mark-unwatched-btn":{modelAttribute:"showMarkUnwatched",manual:!0,autohide:!0},".add-to-collection-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showAddToCollection"],manual:!0,
autohide:function(e){return!!this.mediaActions.get("showAddToCollection")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".merge-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showMerge"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showMerge")&&!this.model.get("hasSelectedFolder")}},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".convert-btn":{modelAttribute:"showConvert",
manual:!0,autohide:!0},".delete-btn":{modelAttribute:"selectedItems",modelListeners:["selectedItems","showDelete"],manual:!0,autohide:function(e){return!!this.mediaActions.get("showDelete")&&(e&&e.length&&!this.model.get("hasSelectedFolder"))}}},onRender:function(){var e=new l({model:this.model,mediaActions:this.mediaActions});this.sidebar.append(e,this.$el),this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.updateDropdown()},onClose:function(){this.mediaActions.stopListening(),
this.mediaActions.deselectAll()},onSelectedItemsChange:function(e,n){if(n){var i=a(n&&n.length?"Play selected":"Play All");this.ui.playBtn.attr("data-original-title",i),t.defer(this.updateDropdown)}},onToggleSidebar:function(){n(".tooltip").remove();var e=this.sidebar.currentView;e.hidden?e.open():e.hide()},onPlay:function(){this.ui.playBtn.isDisabled()||o.execute("playMedia",{items:this.mediaActions.getActionTargets()})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||o.execute("playMedia",{
items:this.mediaActions.getActionTargets(),shuffle:!0})},onSelect:function(){this.mediaActions.set("selecting",!0)},onDeselect:function(){this.mediaActions.set("selecting",!1)},onEdit:function(){if(this.model.server.get("isFullOwnedServer")){var e=this.mediaActions.get("selectedItems");if(e.length){if(e.length>1&&!e[0].server.supports("batchEdit"))return;s.trigger("show:modal",new d({mediaActions:this.mediaActions}))}else s.trigger("show:modal",new h({server:this.model.server,model:this.model}))}
},onRefresh:function(){return this.ui.refreshBtn.isDisabled()?void o.execute("updateLibrary",{section:this.model}):void o.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onAnalyze:function(){return this.ui.analyzeBtn.isDisabled()?void o.execute("analyzeSection",{section:this.model}):void o.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){this.ui.markWatchedBtn.isDisabled()||o.execute("markWatched",{items:this.mediaActions.getActionTargets()
}).then(t.bind(function(){this.mediaActions.updateAll()},this))},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||o.execute("markUnwatched",{items:this.mediaActions.getActionTargets()}).then(t.bind(function(){this.mediaActions.updateAll()},this))},onAddToCollection:function(){this.ui.addToCollectionBtn.isDisabled()||s.trigger("show:modal",new u({items:this.mediaActions.getActionTargets()}))},onAddToPlaylist:function(e){if(!this.ui.addToPlaylistBtn.isDisabled()){var t=this.mediaActions.getActionTargets();
s.trigger("show:modal",new c({model:t[0],items:t,title:this.mediaActions.getActionTargetsTitle()}))}},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),n=t.first(e),i=e.slice(1);o.execute("merge",{item:n,items:i})}},onSync:function(){if(!this.ui.syncBtn.isDisabled()){var e=this.mediaActions.getActionTargets();o.execute("showSyncModal",{item:e[0],items:e})}},onConvert:function(){var e=this.mediaActions.getActionTargets();s.trigger("show:modal",new p({
item:e[0],items:e}))},onDelete:function(){this.ui.deleteBtn.isDisabled()||o.execute("deleteItems",{items:this.mediaActions.getActionTargets(),skipRedirect:!0})}});return m}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1674),n(3),n(9),n(178),n(1092),n(1096),n(1093),n(1094)],r=function(e,t,n,i,r,a,s,o){"use strict";var l={alerts:r,sync:a,conversion:s,nowPlaying:o},u=n.Layout.extend({className:"container",template:e,ui:{conversionBadge:".conversion-btn > .badge",nowPlayingBadge:".now-playing-btn > .badge"
},regions:{container:".activity-container"},initialize:function(e){this.options=e,this.subset=e.subset||"alerts";var t=new i([],{server:this.model,persistInCache:!0});this.subsets={conversion:t,nowPlaying:this.model.get("sessions")},this.listenTo(this.subsets.conversion,"reset add remove",this.updateBadges),this.listenTo(this.subsets.nowPlaying,"reset add remove",this.updateBadges)},serializeData:function(){return{subset:this.subset}},updateBadges:function(){var e={conversion:this.subsets.conversion.length,
nowPlaying:this.subsets.nowPlaying.length};t.each(t.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},onRender:function(){var e=l[this.subset];this.container.show(new e(this.options)),this.updateBadges()}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1675),n(9),n(10),n(6),n(8),n(188),n(1154)],r=function(e,t,n,i,r,a,s){"use strict";var o=t.Layout.extend({className:"alerts-container",template:e,ui:{pageCount:".page-count",
previousBtn:".previous-btn",nextBtn:".next-btn"},regions:{serverDropdown:".filter-bar",list:".alert-list-container"},modelEvents:{"change:shared":"onSharedChange"},collectionEvents:{add:"onAlertAdd"},events:{"click .previous-btn":"onPreviousClick","click .next-btn":"onNextClick"},onlyAfterRender:["onAlertAdd"],initialize:function(){var e=n.resolve("appModel");this.shared=this.model.get("shared"),this.page=1,this.listCollection=this.collection.clone(this.collection.page(this.page,{reverse:!0})),this.listCollection.stopListening(),
e.set("primaryServer",this.model),this.listenTo(e,"change:primaryServer",this.onPrimaryServerChange)},serializeData:function(){var e=this.collection.pages();return{shared:this.shared,page:this.page,pages:e,enablePrevious:this.page>1,enableNext:this.page<e}},updatePages:function(){var e=this.collection.pages();this.ui.pageCount.text(i("{1} of {2}",this.page,e)),this.ui.previousBtn.toggleClass("disabled",this.page<2),this.ui.nextBtn.toggleClass("disabled",this.page>=e)},updateList:function(){this.listCollection.reset(this.collection.page(this.page,{
reverse:!0}))},onRender:function(){this.serverDropdown.append(new a),this.shared||this.list.append(new s({collection:this.listCollection}))},onPrimaryServerChange:function(e,t){t&&r.trigger("navigate","alerts",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},onAlertAdd:function(e,t){this.shared||(this.updatePages(),this.updateList())},onPreviousClick:function(e){e.preventDefault(),this.ui.previousBtn.isDisabled()||(this.page--,this.updatePages(),this.updateList())},onNextClick:function(e){
e.preventDefault(),this.ui.nextBtn.isDisabled()||(this.page++,this.updatePages(),this.updateList())}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1676),n(3),n(9),n(10),n(6),n(8),n(103),n(394),n(717),n(188),n(1163),n(1164)],r=function(e,t,n,i,r,a,s,o,l,u,c,d){"use strict";var h=n.Layout.extend({className:"conversion-container",template:e,ui:{filterBar:".filter-bar",pauseBtn:".pause-btn",resumeBtn:".resume-btn",divider:".conversion-queue-divider"},regions:{filterBar:".filter-bar",
upNextList:".conversion-queue-up-next-list-region",afterUpNextList:".conversion-queue-after-up-next-list-region",emptyRegion:".conversion-queue-empty-region"},events:{"click .pause-btn":"onTogglePauseClick","click .resume-btn":"onTogglePauseClick"},initialize:function(e){var t=i.resolve("appModel");this.playQueue=e.playQueue,this.transcodeJobs=e.transcodeJobs,this.generators=e.generators,this.items=this.playQueue.get("collection"),this.upNextItems=new o(this.items,{playQueue:this.playQueue,includeSelectedItem:!0
}),this.afterUpNextItems=new l(this.items,{playQueue:this.playQueue}),this.settings=this.model.get("settings"),this.pausedSetting=this.settings.get("BackgroundQueueIdlePaused"),t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.upNextItems,"reset add remove",this.onUpNextChange),this.listenTo(this.afterUpNextItems,"reset add remove",this.onAfterUpNextChange)},serializeData:function(){return{serverID:this.model.id,shouldShowList:this.model.supports("streamReady"),
shouldShowDivider:!!this.afterUpNextItems.length,minServerVersion:s.streamReady,hasPausedSetting:!!this.pausedSetting,isPaused:this.pausedSetting&&this.pausedSetting.get("value"),errorMessage:this.getErrorMessage()}},toggleEmptyView:function(){var e=this.upNextItems.length+this.afterUpNextItems.length>0;e?this.emptyRegion.close():this.emptyRegion.show(new d({model:this.model})),this.$el.toggleClass("is-empty",!e),this.ui.filterBar.toggleClass("hide-actions",!e)},getErrorMessage:function(){var e=this.generators.reduce(function(e,t){
var n=t.get("Status");return"failed"===n.state?e+=Math.max(n.itemsCount,1):n.itemsFailedCount&&(e+=n.itemsFailedCount),e},0);if(e)return 1===e?r("There was a problem converting 1 item."):r("There were problems converting {1} items.",e)},onRender:function(){this.filterBar.append(new u);var e={playQueue:this.playQueue},n={playQueue:this.playQueue,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting};this.upNextList.show(new c(t.extend({},e,{collection:this.upNextItems,itemViewOptions:n,
sortableOptions:{sort:!0,group:{name:"upNext",pull:!1,put:["afterUpNext"]}}}))),this.afterUpNextList.show(new c(t.extend({},e,{collection:this.afterUpNextItems,itemViewOptions:t.extend({},n,{hideDragHandle:!0}),sortableOptions:{sort:!1,group:{name:"afterUpNext",pull:!0,put:!1}}}))),this.toggleEmptyView()},onClose:function(){this.upNextItems.destroy(),this.afterUpNextItems.destroy()},onPrimaryServerChange:function(e,t){t&&a.trigger("navigate","conversion",{serverID:t.id})},onUpNextChange:function(){
this.toggleEmptyView()},onAfterUpNextChange:function(){this.ui.divider.toggleClass("hidden",!this.afterUpNextItems.length),this.toggleEmptyView()},onTogglePauseClick:function(e){e.preventDefault();var t=this.pausedSetting.get("value");this.ui.pauseBtn.toggleClass("hidden",!t),this.ui.resumeBtn.toggleClass("hidden",t),this.pausedSetting.set("value",!t),this.settings.first().save(this.pausedSetting.id,t?0:1)}});return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1677),n(9),n(10),n(8),n(103),n(188),n(1156)],
r=function(e,t,n,i,r,a,s){"use strict";var o=t.Layout.extend({className:"now-playing-container",template:e,regions:{filterBar:".filter-bar",list:".sessions-list-container"},modelEvents:{"change:shared":"onSharedChange"},shouldShowList:function(){return!this.shared&&!this.synced&&this.supported},initialize:function(e){var t=n.resolve("appModel");this.shared=this.model.get("shared"),this.synced=!this.model.get("isFullServer"),this.supported=this.model.supports("publicNowPlaying")||this.model.get("myPlexSubscription"),
t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange)},serializeData:function(){return{shouldShowList:this.shouldShowList(),shared:this.shared,synced:this.synced,minServerVersion:r.publicNowPlaying}},onRender:function(){this.filterBar.append(new a),this.shouldShowList()&&this.list.show(new s({collection:this.collection}))},onPrimaryServerChange:function(e,t){t&&i.trigger("navigate","nowPlaying",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,
this.render()}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1678),n(9),n(413),n(1159)],r=function(e,t,n,i){"use strict";var r=t.Layout.extend({className:"sync-device-items-container",template:e,ui:{loading:".row-loading",empty:".sync-empty-message"},regions:{list:".sync-item-list-container"},onlyAfterRender:["onSyncItemsReset"],initialize:function(e){this.server=e.server,this.collection=new n([],{server:this.server,device:this.model});var t=this.model.get("syncItems");
this.listenTo(t,{reset:this.onSyncItemsReset}),this.listenTo(this.collection,{reset:this.onSyncItemsChange,remove:this.onSyncItemsChange}),t.fetch({reset:!0,scope:"page"})},onRender:function(){this.list.show(new i({collection:this.collection,itemViewOptions:{server:this.server}}))},onSyncItemsReset:function(e){this.ui.loading.addClass("hidden"),this.collection.reset(e.filterByServer(this.server.id).models)},onSyncItemsChange:function(){this.ui.empty.toggleClass("hidden",!!this.collection.length)}
});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1679),n(3),n(5),n(9),n(10),n(6),n(8),n(56),n(13),n(188),n(1095)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=i.Layout.extend({className:"sync-container",template:e,transcodeJobDelay:2e3,ui:{devices:".nav a"},regions:{filterBar:".filter-bar",container:".sync-device-container"},modelEvents:{"change:shared":"onSharedChange"},events:{"click .nav a":"onDeviceClick","click .edit-btn":"onEditClick","click .refresh-btn":"onRefreshClick",
"click .cloud-sync-settings-btn":"onCloudSyncSettingsClick"},initialize:function(e){var t=r.resolve("appModel");this.selectedDevice=e.selectedDevice,this.user=t.get("user"),this.shared=this.model.get("shared"),this.transcodeJobs=this.model.get("transcodeJobs"),this.allowSync=this.model.get("allowSync"),this.signedIn="ok"===this.model.get("myPlexSigninState"),t.set("primaryServer",this.model),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.collection.length&&(this.selectedDevice||(this.selectedDevice=this.collection.first()),
this.fetchTranscodeJobs())},serializeData:function(){return{shared:this.shared,hasTouchScreen:o.hasTouchScreen,signedIn:this.signedIn,allowSync:this.allowSync,selectedDevice:this.selectedDevice?this.selectedDevice.toJSON():null,devices:this.collection.toJSON(),plexPassInfo:this.getPlexPassInfo()}},fetchTranscodeJobs:function(){this.transcodeJobs.fetch({reset:!0,scope:"page"}),this.transcodeJobTimeout=setTimeout(t.bind(this.fetchTranscodeJobs,this),this.transcodeJobDelay)},showList:function(){this.selectedDevice?this.container.show(new c({
model:this.selectedDevice,server:this.model})):this.container.close()},getPlexPassInfo:function(){return this.signedIn||this.shared?{url:this.user.server.get("plexPassUrl"),message:a("The server needs a Plex Pass to use sync."),buttonText:a("Learn More"),target:"_blank",showButton:!this.shared}:{url:"#!/settings/server",message:a("The server needs to be signed in with a Plex Pass to use sync."),buttonText:a("Sign In"),target:"_self",showButton:!0}},onRender:function(){this.filterBar.append(new u({
showSharedServers:!0})),this.allowSync&&this.showList()},onClose:function(){clearTimeout(this.transcodeJobTimeout)},onPrimaryServerChange:function(e,t){t&&s.trigger("navigate","sync",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},onDeviceClick:function(e){e.preventDefault();var t=n(e.currentTarget),i=t.data("id");this.ui.devices.removeClass("selected"),t.addClass("selected"),this.selectedDevice=this.collection.get(i),this.showList()},onEditClick:function(e){e.preventDefault(),
n(e.currentTarget).toggleClass("selected"),this.$el.toggleClass("force-hover")},onRefreshClick:function(e){e.preventDefault();var t=l.execute("refreshSyncItems",{server:this.model});this.selectedDevice&&t.always(this.whenRendered(function(){var e=this.selectedDevice.get("syncItems");e.fetch({reset:!0,scope:"page"})}))},onCloudSyncSettingsClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=r.resolve("appModel"),n=t.get("user");window.open(n.server.get("cloudSyncUrl"))}});return d;
}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1682),a=i(r),s=n(3),o=i(s),l=n(860),u=i(l),c=n(186),d=i(c),h=d.default.extend({className:"alert-bar notify",template:a.default,events:o.default.extend({"click .info-link":"onInfoClick"},d.default.prototype.events),initialize:function(){this.listenTo(this.model,"change:read",this.hide)},serializeData:function(){var e=this.model.get("content");return{content:(0,
u.default)(e),url:this.model.get("url")}},onInfoClick:function(e){this.hide(),this.model.markAsRead()},onCloseClick:function(e){d.default.prototype.onCloseClick.apply(this,arguments),this.model.markAsRead()}});t.default=h,e.exports=t.default},function(e,t,n){var i,r;i=[n(1683),n(3),n(10),n(8),n(56),n(31),n(186),n(117)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=s.extend({name:"ClaimServerAlertBarView",className:"claim-server-alert-bar alert-bar notify",template:e,events:t.extend({"click .claim-link":"onClaimClick",
"click .reload-link":"onReloadClick"},s.prototype.events),initialize:function(){s.prototype.initialize.apply(this,arguments);var e=a.get("viewedUnclaimedServers");this.model.id&&e.indexOf(this.model.id)===-1&&(n.resolve("metrics").trackView({page:"unclaimedServer",mode:"banner"},{interaction:!1}),a.save("viewedUnclaimedServers",e.concat(this.model.id)))},serializeData:function(){return{showInsecureMessage:r.isHostedHttps&&!this.model.get("isSecure")}},onClaimClick:function(e){e.preventDefault(),n.resolve("metrics").trackClick({
action:"claim",page:"unclaimedServer",mode:"banner"}),i.trigger("navigate","serverSettings",{serverID:this.model.id}),this.hide()},onReloadClick:function(e){e.preventDefault(),window.location=this.model.resolveUrl("/web",{connection:this.model.get("connections").first()}),this.hide()},onCloseClick:function(e){s.prototype.onCloseClick.apply(this,arguments);var t=a.get("viewedUnclaimedServers");this.model.id&&t.indexOf(this.model.id)===-1&&(n.resolve("metrics").trackClick({action:"dismiss",page:"unclaimedServer",
mode:"banner"}),a.save("dismissedUnclaimedServers",t.concat(this.model.id)))}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1684),n(3),n(10),n(8),n(31),n(13),n(186)],r=function(e,t,n,i,r,a,s){"use strict";var o=s.extend({className:"alert-bar notify",template:e,events:t.extend({"click .download-link":"onDownloadClick","click .install-link":"onInstallClick"},s.prototype.events),initialize:function(){this.server=this.model.server},serializeData:function(){var e=n.resolve("appModel"),t=e.get("user").server;
return{state:this.model.get("state"),downloadURL:this.model.get("downloadURL")||t.get("appsUrl")}},onDownloadClick:function(e){e.preventDefault(),a.execute("checkForServerUpdates",{server:this.server,download:!0,initialState:"downloading"}),i.trigger("navigate","serverSettings",{serverID:this.server.id})},onInstallClick:function(e){e.preventDefault(),this.model.set("shouldInstall",!0),i.trigger("navigate","serverSettings",{serverID:this.server.id})},onCloseClick:function(e){s.prototype.onCloseClick.apply(this,arguments);
var t=this.model.get("shortVersion")||"unknown";r.save("serverUpdateDismissedVersion",t)}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1685),n(3),n(9),n(8)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({className:"alert alert-status transition-out",template:e,coolDown:!1,alertDuration:5e3,coolDownDuration:5e3,ui:{status:".status"},events:{mouseover:"onMouseOver"},onlyAfterRender:["onShowStatus"],initialize:function(e){t.bindAll(this,"hide"),this.listenTo(i,"show:status",this.onShowStatus);
},hide:function(){this.$el.addClass("transition-out")},onShowStatus:function(e,t){this.coolDown||(this.server=e,this.ui.status.text(t),this.$el.removeClass("transition-out"),this.inactivityTimeout=clearTimeout(this.inactivityTimeout),this.inactivityTimeout=setTimeout(this.hide,this.alertDuration))},onMouseOver:function(e){this.inactivityTimeout=clearTimeout(this.inactivityTimeout),this.hide(),this.coolDown=!0,setTimeout(t.bind(function(){this.coolDown=!1},this),this.coolDownDuration)}});return r}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1686),n(3),n(9),n(8),n(170),n(1207)],r=function(e,t,n,i,r,a){"use strict";var s=n.Layout.extend({className:"action-bar alpha-bar",template:e,regions:{list:".alpha-bar-list"},modelEvents:{"change:currentFilters":"onListRefresh","socket:timeline":"onTimeline"},collectionEvents:{reset:"onReset"},initialize:function(e){this.listenTo(i,"resize",this.onResize),this.collection.clear(),this.updateCollection(),this.debouncedUpdateCollection=t.debounce(this.updateCollection,2e3);
},measure:function(){this.updateContainerHeight(),this.updateLineHeight()},updateContainerHeight:function(){this.containerHeight=this.$el.height()},updateLineHeight:function(){var e=this.collection.length;if(e){var t=this.containerHeight/e;this.$el.css("line-height",t+"px")}},updateCollection:function(){this.collection.fetch({reset:!0,scope:"page"})},onRender:function(){this.list.append(new a({collection:this.collection}),this.$el),t.defer(t.bind(this.measure,this))},onListRefresh:function(){this.list.currentView.$el.addClass("hidden"),
this.updateCollection()},onReset:function(e){return e.length<10?(this.$el.addClass("hidden"),void i.trigger("hide:bar","alphabar",{preserve:!0})):(this.containerHeight&&this.updateLineHeight(),this.$el.removeClass("hidden"),this.list.currentView.$el.removeClass("hidden"),void i.trigger("show:bar","alphabar"))},onResize:function(){this.updateContainerHeight(),this.updateLineHeight()},onTimeline:function(e){e.state!==r.CREATED&&e.state!==r.DELETED||this.debouncedUpdateCollection()}});return s}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1687),n(3),n(5),n(9),n(8),n(125),n(234)],r=function(e,t,n,i,r,a,s){"use strict";var o=i.Layout.extend({className:"breadcrumb-bar",template:e,ui:{listSelectedIcons:"#channel-list-dropdown .dropdown-selected-icon"},events:{"click .settings-btn":"onSettingsClick","click .list-btn":"onListClick"},initialize:function(e){this.currentListType=e.currentListType,this.prefsKey=this.model.get("prefsKey"),!this.prefsKey&&this.model.channel&&(this.prefsKey=this.model.channel.get("prefsKey")),
this.shared=this.model.server.get("shared")},serializeData:function(){var e=this.model.channel||this.model,t=e?e.get("title"):this.model.get("title"),n=e?e.id:e.get("identifier"),i="#!/server/"+encodeURIComponent(this.model.server.id);i+="/channel/"+encodeURIComponent(n);var r=this.model.channel?this.model.get("title"):null;return{channelTitle:t,channelUrl:i,title:r,totalSize:this.model.get("metadataList").getCollection().length,showSettings:!!this.prefsKey&&!this.shared,listType:this.currentListType
}},onSettingsClick:function(e){e.preventDefault();var n=new a([],{server:this.model.server,url:this.prefsKey});n.fetch().done(t.bind(function(){r.trigger("show:modal",new s({model:this.model.channel||this.model,collection:n}))},this))},onListClick:function(e){e.preventDefault();var t=n(e.currentTarget),i=t.data("type");this.trigger("change:listType",i),this.ui.listSelectedIcons.addClass("hidden"),t.find(".dropdown-selected-icon").removeClass("hidden")}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1688),n(5),n(9),n(8),n(31),n(55),n(1124)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.Layout.extend({className:"details-breadcrumb-bar breadcrumb-bar",template:e,ui:{previousBtn:".previous-btn",nextBtn:".next-btn",listSelectedIcons:"#section-list-dropdown .dropdown-selected-icon"},regions:{currentItem:".current-item",grandparentItem:".grandparent-item",siblingsDropdown:".siblings-dropdown",parentsDropdown:".parents-dropdown"},events:{"click .playlists-btn":"onPlaylistsClick",
"click .section-btn":"onSectionClick","click .list-btn":"onListClick","click .previous-btn":"onPreviousClick","click .next-btn":"onNextClick"},onlyAfterRender:["onSiblingsPopulate","onParentsPopulate"],initialize:function(e){var t=this.model.get("parentKey");if(!t)return void this.onSiblingsPopulate(!1);var n,i={server:this.model.server,section:this.model.section},r=this.parent=new a({key:t},i),s=r.populate({scope:"page"});s=s.then(function(){return n=r.get("children"),n.populate({scope:"page"})}),
s.done(this.onSiblingsPopulate);var o=this.model.get("grandparentKey");if(o){var l=this.grandparent=new a({key:o},i),u=l.populate({scope:"page"});u=u.then(function(){var e=l.get("children");return e.populate({scope:"page"})}),u.done(this.onParentsPopulate)}},serializeData:function(){var e=this.model.server,t=this.model.section,n=t||this.model.get("playlistType");return{serverID:e.id,showSectionDropdown:n,showPlaylists:this.model.server.supports("playlists"),sections:e.get("sections").toJSON(),section:t?t.toJSON():null,
item:this.model.toJSON(),parent:this.parent?this.parent.toJSON():null,grandparent:this.grandparent?this.grandparent.toJSON():null,listType:this.getListType()}},getListTypeSettingKey:function(){var e="episodeListType",t=this.model.section||this.model.server;return t.getScopedKey(e)},getListType:function(){return"season"===this.model.get("type")?r.get(this.getListTypeSettingKey())||"episode-tile-list":null},previous:function(){this.previousSibling&&i.trigger("navigate","details",{serverID:this.model.server.id,
key:this.previousSibling.get("key")})},next:function(){this.nextSibling&&i.trigger("navigate","details",{serverID:this.model.server.id,key:this.nextSibling.get("key")})},onSiblingsPopulate:function(e){if(!e)return this.currentItem.show(new s({model:this.model,isLeaf:!0})),void this.currentItem.$el.removeClass("hidden");var t=e.get("metadataItems"),n=t.get(this.model.id),i=t.indexOf(n);i>0&&(this.previousSibling=t.at(i-1)),i<t.length-1&&(this.nextSibling=t.at(i+1)),this.ui.previousBtn.toggleClass("disabled",!this.previousSibling),
this.ui.nextBtn.toggleClass("disabled",!this.nextSibling),this.ui.previousBtn.removeClass("hidden"),this.ui.nextBtn.removeClass("hidden"),this.grandparent||(this.grandparentItem.show(new s({model:this.parent})),this.grandparentItem.$el.removeClass("hidden")),this.siblingsDropdown.show(new s({id:"siblings-dropdown",model:this.model,collection:t})),this.siblingsDropdown.$el.removeClass("hidden")},onParentsPopulate:function(e){this.grandparentItem.show(new s({model:this.grandparent})),this.grandparentItem.$el.removeClass("hidden"),
this.parentsDropdown.show(new s({id:"parents-dropdown",model:this.parent,collection:e.get("metadataItems")})),this.parentsDropdown.$el.removeClass("hidden")},onSectionClick:function(e){e.preventDefault();var n=t(e.currentTarget),r=n.data("key");i.trigger("navigate","section",{serverID:this.model.server.id,sectionID:r})},onPlaylistsClick:function(e){e.preventDefault(),i.trigger("navigate","playlists",{serverID:this.model.server.id})},onListClick:function(e){e.preventDefault();var n=t(e.currentTarget),i=n.data("type");
r.save(this.getListTypeSettingKey(),i),this.ui.listSelectedIcons.addClass("hidden"),n.find(".dropdown-selected-icon").removeClass("hidden")},onPreviousClick:function(e){e.preventDefault(),this.previous()},onNextClick:function(e){e.preventDefault(),this.next()}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1689),n(9),n(6),n(8),n(501),n(1127),n(1243)],r=function(e,t,n,i,r,a,s){"use strict";var o=t.Layout.extend({className:"breadcrumb-bar",template:e,ui:{itemsBadge:".items-badge"
},regions:{sectionDropdown:".breadcrumb-dropdown",typeDropdown:".breadcrumb-subset-dropdown"},events:{"click .import-btn":"onImportClick"},initialize:function(){this.listenTo(this.model.get("items").get("playlists"),"reset update",this.onSizeChange);var e=this.model.server.get("isFullOwnedServer"),t=this.model.server.get("sections").where({type:"artist"}).length>0;this.canImportPlaylists=e&&t},serializeData:function(){return{totalSize:this.model.get("items").get("playlists").length,canImportPlaylists:this.canImportPlaylists
}},onRender:function(){this.sectionDropdown.show(new r({title:n("Playlists"),model:this.model,collection:this.model.server.get("sections")})),this.typeDropdown.show(new a({model:this.model}))},onSizeChange:function(){this.ui.itemsBadge.text(this.model.get("items").get("playlists").length)},onImportClick:function(e){this.limited||(e.preventDefault(),i.trigger("show:modal",new s({server:this.model.server})))}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1690),n(5),n(3),n(9),n(6),n(8),n(31),n(13),n(501),n(1129),n(1130),n(117),n(150)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){"use strict";var p=i.Layout.extend({className:"breadcrumb-bar",template:e,ui:{listSelectedIcons:"#section-list-dropdown .dropdown-selected-icon",itemsBadge:".items-badge",updateBtn:".update-btn"},regions:{sectionDropdown:".breadcrumb-dropdown",subsetDropdown:".breadcrumb-subset-dropdown",typeDropdown:".breadcrumb-type-dropdown"},events:{"click .list-btn":"onListClick","click .edit-btn":"onEditClick","click .share-btn":"onShareClick","click .update-btn":"onUpdateClick",
"click .analyze-btn":"onAnalyzeClick","click .force-refresh-btn":"onForceRefreshClick","click .empty-trash-btn":"onEmptyTrashClick","click .delete-btn":"onDeleteClick"},onlyAfterRender:["onTotalSizeChange"],initialize:function(){var e=this.model.get("items");this.refreshing=this.model.get("refreshing"),this.updateTitle=r("Update Library"),this.updateTitleAlt=r("Cancel Update"),this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),this.limited=!(!this.shared&&!this.synced),
this.listenTo(e,"change:totalSize",this.onTotalSizeChange),this.listenTo(this.model,"change:refreshing",this.onRefreshingChange),this.listenTo(this.model,"change:currentType",this.updateListViewDropdown)},serializeData:function(){return{limited:this.limited,totalSize:this.model.get("items").get("totalSize"),listType:s.getInstance().getSectionListType(this.model),refreshing:this.refreshing,updateTitle:this.refreshing?this.updateTitleAlt:this.updateTitle,updateTitleAlt:this.refreshing?this.updateTitle:this.updateTitleAlt
}},updateListViewDropdown:function(e){n.isString(e)||(e=s.getInstance().getSectionListType(this.model)),this.ui.listSelectedIcons.each(function(i,r){var a=t(r),s=a.closest(".list-btn").data("type");a.toggleClass("hidden",!n.isEqual(e,s))})},onRender:function(){this.$el.tooltip({selector:".breadcrumb-actions > a",container:"body",placement:"bottom"}),this.sectionDropdown.show(new l({model:this.model,collection:this.model.server.get("sections")})),this.subsetDropdown.show(new u({model:this.model.get("currentSubset"),
collection:this.model.get("subsets")})),this.typeDropdown.show(new c({model:this.model,collection:this.model.get("types")}))},onTotalSizeChange:function(e,t){var n=null==t?0:t;this.ui.itemsBadge.toggleClass("hidden",0===n),this.ui.itemsBadge.text(n)},onEditClick:function(e){e.preventDefault(),this.limited||a.trigger("show:modal",new d({server:this.model.server,model:this.model}))},onUpdateClick:function(e){e.preventDefault(),this.limited||o.execute("updateLibrary",{section:this.model,cancel:this.model.get("refreshing")
})},onShareClick:function(e){e.preventDefault(),this.limited||a.trigger("show:modal",new h({defaultPaneType:"ownedServer",defaultPaneID:this.model.server.id}))},onAnalyzeClick:function(e){e.preventDefault(),this.limited||o.execute("analyzeSection",{section:this.model})},onForceRefreshClick:function(e){e.preventDefault(),this.limited||o.execute("updateLibrary",{section:this.model,params:{force:!0}})},onEmptyTrashClick:function(e){e.preventDefault(),this.limited||o.execute("emptyTrash",{section:this.model
})},onDeleteClick:function(e){e.preventDefault(),this.onDelete()},onListClick:function(e){e.preventDefault();var n=t(e.currentTarget),i=n.data("type"),r=this.model.get("currentType");s.getInstance().saveListType(r,i),this.updateListViewDropdown(i)},onDelete:function(){if(!this.limited){var e=o.execute("deleteSection",{section:this.model});e.done(function(){a.trigger("navigate","dashboard")})}},onRefreshingChange:function(e,i){var r=this.ui.updateBtn,a=this.ui.updateBtn.attr("data-original-title");
if(this.ui.updateBtn.toggleClass("active",this.model.get("refreshing")),a){var s=t(".tooltip > .tooltip-inner").html();n.contains([this.updateTitle,this.updateTitleAlt],s)&&t(".tooltip > .tooltip-inner").html(r.attr("data-title-alt")),r.attr("data-original-title",r.attr("data-title-alt")),r.attr("data-title-alt",a)}}});return p}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1691),n(9),n(390),n(1166),n(1168)],r=function(e,t,n,i,r){"use strict";var a=t.Layout.extend({className:"container",
template:e,regions:{list:".directory-container"},onlyAfterRender:["onUpdate"],initialize:function(e){this.currentKey=e.currentKey,this.currentPath=e.currentPath,this.currentKey||(this.currentKey=this.collection.first().get("key")),this.currentPath||(this.currentPath=this.currentKey),this.channelList=new n({key:this.currentPath},{server:this.collection.server}),this.channelList.fetch({scope:"page"}).always(this.onUpdate)},serializeData:function(){return{directories:this.collection.toJSON(),serverID:this.collection.server.id,
currentKey:this.currentKey}},onUpdate:function(){var e,t={collection:this.channelList.get("channels"),itemViewOptions:{currentKey:this.currentKey}};e="Store:Info"===this.channelList.get("viewGroup")?new r(t):new i(t),this.list.show(e)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1692),n(9),n(8),n(10),n(22),n(798),n(149),n(1102),n(510),n(508),n(509)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=t.Layout.extend({className:"channel-container",template:e,
regions:{list:".channel-list-container"},initialize:function(e){this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems");var t=this.model.get("header"),r=this.model.get("message");(t||r)&&n.trigger("show:alert",{message:r||t}),this.searchKey=this.model.get("searchKey"),this.searchPlaceholder=this.model.get("title"),!this.searchKey&&this.model.channel&&(this.searchKey=this.model.channel.get("searchKey"),this.searchPlaceholder=this.model.channel.get("title")),this.searchKey&&(i.resolve("appStore").dispatch(s.changeQuickSearchSettings({
serverEntityID:this.model.server.entityID(),type:"channel",placeholder:this.searchPlaceholder})),this.listenTo(n,"search:channel",this.onSearch)),this.listType=a.getListType(this.model);var l=new o({model:this.model,currentListType:this.listType});this.listenTo(l,"change:listType",this.onListTypeChange),n.trigger("show:bar","breadcrumbbar",l),n.trigger("show:background",{model:this.model,dim:!0})},getListConstructor:function(){switch(this.listType){case a.types.tileList:return l;case a.types.detailsList:
return u;default:return c}},onRender:function(){var e=this.getListConstructor();this.list.append(new e({listModel:this.listModel,collection:this.collection,paginated:!1}),this.$el)},onClose:function(){i.resolve("appStore").dispatch(s.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:null,placeholder:null})),n.trigger("hide:bar","breadcrumbbar")},onSearch:function(e){if(e){var t=this.model.channel||this.model,i=t.id?t.id:t.get("identifier"),a=r.join(this.searchKey,{query:e
});n.trigger("navigate","channel",{serverID:this.model.server.id,channelID:i,key:a})}},onListTypeChange:function(e){this.listType=e,this.listModel.scrollPosition=0,this.list.currentView.scrollPosition=0,this.render()}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1693),n(3),n(5),n(9),n(13),n(1170)],r=function(e,t,n,i,r,a){"use strict";var s=i.Layout.extend({className:"container",template:e,ui:{navLinks:".nav a",checkUpdatesBtn:".check-updates-btn"},regions:{list:".channels-container"
},events:{"click .nav a":"onNavClick","click .all-btn":"onAllClick","click .video-btn":"onVideoClick","click .music-btn":"onMusicClick","click .photo-btn":"onPhotoClick","click .check-updates-btn":"onCheckUpdatesClick"},initialize:function(){this.videoCollection=this.collection.filterByType("video"),this.musicCollection=this.collection.filterByType("music"),this.photoCollection=this.collection.filterByType("photos"),this.shared=this.collection.server.get("shared")},serializeData:function(){return{
serverID:this.collection.server.id,allCount:this.collection.length,videoCount:this.videoCollection.length,musicCount:this.musicCollection.length,photoCount:this.photoCollection.length,shared:this.shared}},onRender:function(){this.list.show(new a({collection:this.collection}))},onNavClick:function(e){this.ui.navLinks.removeClass("selected"),n(e.currentTarget).addClass("selected")},onAllClick:function(e){e.preventDefault(),this.list.show(new a({collection:this.collection}))},onVideoClick:function(e){
e.preventDefault(),this.list.show(new a({collection:this.videoCollection}))},onMusicClick:function(e){e.preventDefault(),this.list.show(new a({collection:this.musicCollection}))},onPhotoClick:function(e){e.preventDefault(),this.list.show(new a({collection:this.photoCollection}))},onCheckUpdatesClick:function(e){e.preventDefault();var n=this.ui.checkUpdatesBtn;if(!n.hasClass("active")){n.addClass("active");var i=r.execute("updateChannel",{server:this.collection.server});i.always(t.bind(function(){
n.removeClass("active")},this))}}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(247),n(9),n(7),n(66),n(34),n(10),n(554),n(242),n(244)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=n.createElement(s,null),c=n.createElement(o,null),d=t.Layout.extend({className:"dashboard-page-container",template:e,ui:{sidebar:".sidebar-container",page:".page-container"},initialize:function(){this.$el.addClass(l.dashboardContainer)},serializeData:function(){return{styles:l}},mountReact:function(){
var e=r.Provider,t=a.resolve("appStore");i.render(n.createElement(e,{store:t},c),this.ui.sidebar[0]),i.render(n.createElement(e,{store:t},u),this.ui.page[0])},unmountReact:function(){this.isRendered&&(i.unmountComponentAtNode(this.ui.sidebar[0]),i.unmountComponentAtNode(this.ui.page[0]))},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),a=i(r),s=n(7),o=i(s),l=n(66),u=i(l),c=n(34),d=n(10),h=n(241),p=i(h),f=n(328),m=i(f),v=n(1410),g=i(v),y=n(242),b=i(y),w=n(247),S=i(w),P=n(244),x=i(P),C=o.default.createElement(b.default,null),T=a.default.Layout.extend({className:"dashboard-page-container",template:S.default,ui:{sidebar:".sidebar-container",page:".page-container"},initialize:function(){this.$el.addClass(x.default.dashboardContainer)},serializeData:function(){return{styles:x.default
}},mountReact:function(){var e=(0,d.resolve)("appStore");u.default.render(o.default.createElement(c.Provider,{store:e},C),this.ui.sidebar[0]),u.default.render(o.default.createElement(c.Provider,{store:e},o.default.createElement(p.default,{machineIdentifier:this.options.selectedServerID},o.default.createElement(m.default,null,o.default.createElement(g.default,{machineIdentifier:this.options.selectedServerID,listKey:this.options.key,listTitle:this.options.title,listType:this.options.type})))),this.ui.page[0]);
},unmountReact:function(){this.isRendered&&(u.default.unmountComponentAtNode(this.ui.sidebar[0]),u.default.unmountComponentAtNode(this.ui.page[0]))},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.default=T,e.exports=t.default},function(e,t,n){var i,r;i=[n(247),n(9),n(7),n(66),n(34),n(10),n(59),n(77),n(1396),n(242),n(244)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=n.createElement(u,null),h=t.Layout.extend({
className:"dashboard-page-container",template:e,ui:{sidebar:".sidebar-container",page:".page-container"},initialize:function(){this.$el.addClass(c.dashboardContainer)},serializeData:function(){return{styles:c}},mountReact:function(){var e=r.Provider,t=a.resolve("appStore"),u=o(s.SERVER,this.options.selectedServerID),c=o(s.LIBRARY,this.options.selectedLibraryID,u);i.render(n.createElement(e,{store:t},d),this.ui.sidebar[0]),i.render(n.createElement(e,{store:t},n.createElement(l,{machineIdentifier:this.options.selectedServerID,
libraryEntityID:c})),this.ui.page[0])},unmountReact:function(){this.isRendered&&(i.unmountComponentAtNode(this.ui.sidebar[0]),i.unmountComponentAtNode(this.ui.page[0]))},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1694),n(695),n(114),n(113),n(133),n(47),n(1200)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.extend({mixins:t,className:"album-details-row details-row",
template:e,allowMirror:!0,initialize:function(){n.prototype.initialize.apply(this,arguments),this.ListConstructor=s,this.listItemViewOptions={artistTitle:this.model.get("parentTitle"),mediaActions:this.mediaActions},this.starRatingView=new i({model:this.model}),this.summaryView=new r({model:this.model}),this.posterImage=new a({model:this.model,type:this.model.get("type"),width:this.posterWidth})}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1695),n(3),n(8),n(170),n(696),n(114),n(1122),n(133),n(47),n(1174),n(1172),n(507)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d){"use strict";var h=a.extend({mixins:r,className:"artist-details-row details-row",template:e,allowMirror:!0,ui:t.extend({concertRegion:".concert-region",popularTracksRegion:".popular-tracks-region",extrasRegion:".extras-region",similarArtistsRegion:".similar-artists-region"},a.prototype.ui),regions:t.extend({concert:".concert-region",popularTracksList:".popular-tracks-region",extrasList:".extras-region",similarArtistsList:".similar-artists-region"},a.prototype.regions),
modelEvents:{"socket:timeline":"onTimeline","change:popularLeaves":"showPopularTracks","change:popularLeaves.change:metadataItems.reset change:popularLeaves.change:metadataItems.update":"updatePopularTracks","change:extras.change:metadataItems.reset change:extras.change:metadataItems.update":"updateExtras","change:concerts":"showConcert","change:concerts.reset change:concerts.update":"updateConcerts","change:related":"showSimilarArtistsList","change:related.reset change:related.update":"showSimilarArtistsList"
},initialize:function(){a.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("updateConcerts","showConcert","updatePopularTracks","updateExtras","updateSimilarArtists","showSimilarArtistsList"),this.ListConstructor=c,this.listItemViewOptions={mediaActions:this.mediaActions},this.summaryView=new o({model:this.model}),this.posterImage=new l({model:this.model,type:this.model.get("type"),width:this.posterWidth})},showPopularTracks:function(){var e=this.model.get("popularLeaves"),t=e&&e.get("metadataItems");
t&&this.popularTracksList.append(new u({collection:t})),this.updatePopularTracks()},updatePopularTracks:function(){var e=this.model.get("popularLeaves"),t=e&&e.get("metadataItems");this.ui.popularTracksRegion.toggleClass("hidden",!(t&&t.length))},showExtras:function(){var e=this.model.get("extras"),t=e&&e.get("metadataItems");t&&this.extrasList.append(new d({collection:t})),this.updateExtras()},updateExtras:function(){var e=this.model.get("extras"),t=e&&e.get("metadataItems");this.ui.extrasRegion.toggleClass("hidden",!(t&&t.length));
},updateConcerts:function(){var e=this.model.get("concerts");this.ui.concertRegion.toggleClass("hidden",!(e&&e.length))},showConcert:function(){var e=this.model.get("concerts"),t=e&&e.first();t?this.concert.append(new s({model:t})):this.concert.close(),this.updateConcerts()},updateSimilarArtists:function(){this.ui.similarArtistsRegion.toggleClass("hidden",!(this.similarArtists&&this.similarArtists.get("metadataItems").length))},showSimilarArtistsList:function(){this.similarArtists&&(this.stopListening(this.similarArtists),
this.similarArtists=null);var e=this.model.get("related");if(e){var t=e.get("artist.similar");t&&(this.similarArtists=t.get("metadataList"),this.similarArtistsList.append(new c({collection:this.similarArtists.get("metadataItems")})),this.listenTo(this.similarArtists.get("metadataItems"),"reset update",this.updateSimilarArtists))}this.updateSimilarArtists()},onRender:function(){a.prototype.onRender.apply(this,arguments),this.showPopularTracks(),this.children.populate({scope:"page"}).then(this.whenRendered(function(){
this.showExtras(),this.showConcert(),this.showSimilarArtistsList()}))},onTimeline:function(e){e.state===i.DELETED&&n.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.section.id})}});return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1696),n(10),n(697),n(114),n(113),n(133),n(310),n(47),n(224)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=i.extend({mixins:n,className:"clip-details-row details-row",template:e,allowMirror:!0,initialize:function(){
i.prototype.initialize.apply(this,arguments),this.starRatingView=new r({model:this.model,disabled:!0}),this.summaryView=new a({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new s({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new s({type:"subtitles",model:this.model,media:e}),this.posterImage=new o({model:this.model,type:this.model.get("type"),width:this.posterWidth});var n=this.model.server.get("isCloud"),u=t.resolve("appModel"),c=u.get("primaryServer");(!n||c&&!c.get("isCloudSyncServer"))&&(this.contentRatingFlag=new l({
model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new l({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new l({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new l({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new l({model:this.model,modelAttribute:"studio",
className:"studio-flag",width:200,height:40}))}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1698),n(698),n(114),n(113),n(133),n(310),n(47),n(224)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=n.extend({mixins:t,className:"episode-details-row details-row",template:e,allowMirror:!0,initialize:function(){n.prototype.initialize.apply(this,arguments),this.starRatingView=new i({model:this.model}),this.summaryView=new r({model:this.model});var e=this.getPreferredMedia();
this.audioDropdown=new a({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new a({type:"subtitles",model:this.model,media:e}),this.posterImage=new s({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new o({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new o({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new o({
model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new o({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20})}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1699),n(3),n(699),n(114),n(113),n(133),n(310),n(47),n(224),n(507)],r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c=i.extend({mixins:n,className:"movie-details-row details-row",template:e,allowMirror:!0,ui:t.extend({extrasRegion:".extras-region"
},i.prototype.ui),regions:t.extend({extrasList:".extras-region"},i.prototype.regions),initialize:function(){i.prototype.initialize.apply(this,arguments);var e=this.model.get("extras");this.extras=e&&e.get("metadataItems"),this.extras&&this.listenTo(this.extras,"reset add remove",this.updateExtras),this.starRatingView=new r({model:this.model}),this.summaryView=new a({model:this.model});var t=this.getPreferredMedia();this.audioDropdown=new s({type:"audio",model:this.model,media:t}),this.subtitlesDropdown=new s({
type:"subtitles",model:this.model,media:t}),this.posterImage=new o({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new l({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new l({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new l({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new l({
model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new l({model:this.model,modelAttribute:"studio",className:"studio-flag",width:200,height:40})},updateExtras:function(){this.ui.extrasRegion.toggleClass("hidden",!(this.extras&&this.extras.length))},onRender:function(){i.prototype.onRender.apply(this,arguments),this.extras&&(this.extrasList.append(new u({collection:this.extras})),this.updateExtras())}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1700),n(9),n(7),n(66),n(34),n(10),n(70),n(1401),n(1524)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=t.Layout.extend({className:"photo-album-details",template:e,ui:{photoAlbumPage:".photo-album-page"},serializeData:function(){return{styles:l}},mountReact:function(){var e=r.Provider,t=a.resolve("appStore"),s=this.model.entityID({ratingKey:this.model.get("ratingKey")});i.render(n.createElement(e,{store:t},n.createElement(o,{metadataItemEntityID:s})),this.ui.photoAlbumPage[0]);
},unmountReact:function(){this.isRendered&&i.unmountComponentAtNode(this.ui.photoAlbumPage[0])},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1701),n(3),n(6),n(174),n(218),n(101),n(114),n(233),n(1194)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=s.extend({className:"playlist-details-row details-row",template:e,posterWidth:200,pageSize:50,
compositeOptions:{audio:{media:"art",stripRatio:i.ratios.landscape,posterRatio:i.ratios.square},photo:{media:"thumb",stripRatio:i.ratios.square,posterRatio:i.ratios.square},video:{media:"thumb",stripRatio:i.ratios.portrait,posterRatio:i.ratios.portrait}},ui:t.extend({sideStrip:".item-side-strip"},s.prototype.ui),bindings:t.extend(t.pick(a.defaultBindings,[".item-title",".item-summary"]),{".item-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return e?r(e):0}},".item-count":{
modelAttribute:"leafCount",formatter:function(e){return 0===e?n("This playlist has no items."):1===e?n("1 Item"):n("{1} Items",e)}},".no-items":{modelAttribute:"leafCount",manual:!0,autohide:!0,formatter:function(e){return 0===e}},".loading-container":{model:"progress",modelAttribute:"loading",manual:!0,autohide:!0},".error-text":{model:"progress",modelAttribute:"failed",manual:!0,autohide:!0}}),serializeData:function(){var e=this.model.get("playlistType");return{smart:this.model.get("smart"),hasComposite:"audio"===e||"photo"===e,
type:e}},initialize:function(){s.prototype.initialize.apply(this,arguments),this.ListConstructor=l,this.listItemViewOptions={canEdit:!this.model.get("smart")};var e=this.compositeOptions[this.model.get("playlistType")];this.posterWidth=200,this.sideStripImage=new o({model:this.model,media:e.media,width:this.posterWidth,height:this.posterWidth/e.stripRatio*16,columns:1,rows:16,unique:!0,noPlaceholder:!0}),this.posterImage=new o({model:this.model,width:this.posterWidth,height:this.posterWidth/e.posterRatio,
noPlaceholder:!0})},onRender:function(){s.prototype.onRender.apply(this,arguments),this.sideStripImage.setElement(this.ui.sideStrip)},onClose:function(){return this.posterImage&&this.sideStripImage.close(),s.prototype.onClose.apply(this,arguments)}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1702),n(31),n(114),n(133),n(1182),n(1178),n(1180)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.extend({className:"season-details-row details-row",template:e,allowMirror:!0,
initialize:function(){n.prototype.initialize.apply(this,arguments),this.ListConstructor=this.getListConstructor(),this.summaryView=new i({model:this.model}),this.listenTo(t.getInstance(),"change:"+this.getListTypeSettingKey(),this.onListTypeChange)},getListTypeSettingKey:function(){var e="episodeListType",t=this.model.section||this.model.server;return t.getScopedKey(e)},getListConstructor:function(e){switch(e||(e=t.get(this.getListTypeSettingKey())),e){case"episode-details-list":return a;case"episode-list":
return s;default:return r}},bindings:{".show-title":{modelAttribute:"parentTitle"},".season-title":{modelAttribute:"title"}},onListTypeChange:function(e,t){this.ListConstructor=this.getListConstructor(t),this.render()}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1703),n(700),n(114),n(113),n(133),n(47),n(224),n(1196)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=n.extend({mixins:t,className:"show-details-row details-row",template:e,allowMirror:!0,initialize:function(){
n.prototype.initialize.apply(this,arguments),this.ListConstructor=o,this.starRatingView=new i({model:this.model}),this.summaryView=new r({model:this.model}),this.posterImage=new a({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new s({model:this.model,modelAttribute:"contentRating",className:"show-content-rating content-rating-flag",width:70,height:30}),this.studioFlag=new s({model:this.model,modelAttribute:"studio",className:"show-studio studio-flag",
width:200,height:40})}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1704),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1705),n(3),n(9),n(65)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({className:"concert",template:e,bindings:{".concert-link":{modelAttribute:"url",manual:!0,formatter:function(e,t){t.attr("href",e)}},".concert-month":{
modelAttribute:"at",formatter:function(e){return i.unix(e).format("MMM")}},".concert-day":{modelAttribute:"at",formatter:function(e){return i.unix(e).format("DD")}},".concert-name":{modelAttribute:"tag"},".concert-venue":{modelAttribute:"venue"},".concert-city":{modelAttribute:"city",modelListeners:["city","country"],formatter:function(e){var n=t.compact([e,this.model.get("country")]);return n.join(", ")}}}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1707),n(5),n(9),n(13)],
r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({id:"auto-match-dropdown",tagName:"span",className:"dropdown",template:e,collectionEvents:{reset:"render"},events:{"click .auto-match-agent":"onClick"},serializeData:function(){return{agents:this.collection.toJSON()}},onClick:function(e){e.preventDefault();var n=t(e.currentTarget).data("id"),r=this.collection.get(n);i.execute("autoMatch",{item:this.model,agent:r})}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;
i=[n(1708),n(5),n(9),n(8)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({tagName:"span",className:"details-breadcrumb dropdown",template:e,events:{"click .breadcrumb-btn":"onClick"},initialize:function(e){this.listenTo(this.model,"change:title",this.render),this.isLeaf=e&&e.isLeaf||!1},serializeData:function(){var e=this.collection&&this.collection.length>1;return{id:this.id,item:this.model.toJSON(),items:e?this.collection.toJSON():null,hasDetails:this.isLeaf,showDropdown:e}},onClick:function(e){
e.preventDefault();var n=t(e.currentTarget).data("key");n&&i.trigger("navigate","details",{serverID:this.model.server.id,key:n})}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1710),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({tagName:"li",className:"play-queue-list-item",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1714),n(3),n(5),n(9),n(6),n(8),n(22),n(39),n(13),n(95),n(115),n(193),n(191),n(192)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p){"use strict";var f=i.ItemView.extend({tagName:"ul",className:"dropdown-menu",template:e,ui:{divider:".divider"},events:{"click .play-mix-btn":"onPlayMixClick","click .add-to-playlist-btn":"onAddToPlaylistClick","click .sync-btn":"onSyncClick","click .share-btn":"onShareClick","click .recommend-btn":"onRecommendClick","click .info-btn":"onInfoClick"},initialize:function(e){this.mediaType=o.get(this.model.get("type")),this.mediaActions=new u({},{item:this.model,
playQueue:e.playQueue}),n(".dropdown.open .dropdown-toggle").dropdown("toggle")},serializeData:function(){var e,t;if(this.mediaActions.get("showDownload")){e=this.model.getDownloadUrl();var n=this.model.getFilepath();n&&(t=s.getLastSegment(n))}return{downloadUrl:e,downloadName:t}},bindingsModel:"mediaActions",bindings:{".play-mix-btn":{modelAttribute:"showPlayMix",manual:!0,autohide:!0,formatter:function(e,t){if(e){var n=this.model.get("related"),i=n.findWhere({browse:!1}),a=i.get("title");a&&t.text(r("Queue {1}",a));
}return e}},".add-to-playlist-btn":{modelAttribute:"showAddToPlaylist",manual:!0,autohide:!0},".sync-btn":{modelAttribute:"showSync",manual:!0,autohide:!0},".download-btn":{modelAttribute:"showDownload",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"showShare",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onRender:function(){var e=this.ui.divider,t=e.prevAll(":not(:has(.hidden))").length,n=e.nextAll(":not(:has(.hidden))").length;e.toggleClass("hidden",!t||!n);
},onClose:function(){this.mediaActions.stopListening()},onPlayMixClick:function(e){e.preventDefault();var t=this.model.get("related"),n=t.findWhere({browse:!1});n.set("type","track"),l.execute("queueMedia",{item:n,excludeSeedItem:!0,next:!0})},onAddToPlaylistClick:function(e){return e.preventDefault(),n(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void a.trigger("show:modal",new c({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()
}))},onSyncClick:function(e){e.preventDefault(),l.execute("showSyncModal",{item:this.model})},onShareClick:function(e){e.preventDefault(),a.trigger("show:modal",new d({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),a.trigger("show:modal",new p({model:this.model}))},onInfoClick:function(e){e.preventDefault(),a.trigger("show:modal",new h({model:this.model}))}});return f}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1715),n(3),n(5),n(9)],r=function(e,t,n,i){
"use strict";var r=i.ItemView.extend({id:"playlist-type-dropdown",tagName:"span",className:"dropdown",template:e,events:{"click .type-btn":"onClick"},types:[{key:0,title:"All"},{key:"audio",title:"Music"},{key:"photo",title:"Photo"},{key:"video",title:"Video"}],initialize:function(){this.listenTo(this.model,"change:currentType",this.render)},serializeData:function(){return{currentType:t(this.types).findWhere({key:this.model.get("currentType")}),types:this.types}},onClick:function(e){e.preventDefault();
var t=n(e.currentTarget).data("key");this.model.set("currentType",t)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1717),n(5),n(9),n(10),n(13)],r=function(e,t,n,i,r){"use strict";var a=n.ItemView.extend({tagName:"ul",className:"dropdown-menu pull-right",template:e,events:{"click .local-player-btn":"onLocalPlayerClick","click .plex-player-btn":"onPlexPlayerClick","click .now-playing-btn":"onNowPlayingClick"},initialize:function(e){e||(e={});var t=i.resolve("appModel");
this.showNowPlaying=e.showNowPlaying,this.players=t.get("players")},serializeData:function(){var e=i.resolve("appModel"),t=e.get("primaryPlayer");return{showNowPlaying:this.showNowPlaying,primaryPlayer:t?t.toJSON():null,nowPlaying:t?t.get("nowPlaying").toJSON():null,players:this.players.toJSON()}},onLocalPlayerClick:function(e){e.preventDefault();var t=i.resolve("appModel");t.set("primaryPlayer",null)},onPlexPlayerClick:function(e){e.preventDefault();var n=t(e.currentTarget).data("id"),r=this.players.get(n),a=i.resolve("appModel");
a.set("primaryPlayer",r)},onNowPlayingClick:function(e){e.preventDefault();var n=i.resolve("appModel"),a=n.get("primaryPlayer"),s=a.get("nowPlaying"),o=t(e.currentTarget).data("id"),l=s.get(o);r.execute("playMedia",{item:l})}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1720),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({id:"section-subset-dropdown",tagName:"span",className:"dropdown",template:e,collectionEvents:{reset:"render"},initialize:function(){
this.collection.populate({reset:!0,scope:"page"})},serializeData:function(){var e=this.collection.get(this.model.id)||this.model;return{showDropdown:this.collection.length>1,subsets:this.collection.toJSON(),currentSubset:e.toJSON(),serverID:this.model.server.id,sectionID:this.model.section.id}}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1721),n(9),n(1131)],r=function(e,t,n){"use strict";var i=t.CompositeView.extend({id:"section-type-dropdown",tagName:"span",
className:"dropdown",template:e,itemView:n,itemViewContainer:".dropdown-menu",modelEvents:{"change:currentType":"render","change:currentSubset":"render"},serializeData:function(){return{currentType:this.model.get("currentType").toJSON()}},onRender:function(){var e=this.collection.length<2,t=this.model.get("allowAdvancedFilters"),n="all"!==this.model.get("currentSubset").id;this.$el.toggleClass("hidden",e||!t||n)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1722),n(9)],
r=function(e,t){"use strict";var n=t.ItemView.extend({tagName:"li",template:e,events:{"click a":"onClick"},onClick:function(e){e.preventDefault();var t=this.model.section,n=t.get("currentType");n.set("selected",!1),this.model.set("selected",!0),this.model.section.set("currentType",this.model)}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1652),a=i(r),s=n(9),o=i(s),l=n(1298),u=i(l),c=o.default.Layout.extend({
template:a.default,id:"lyrics-dropdown",className:"dropup",ui:{lyricsBtn:".lyrics-btn"},regions:{lyricsRegion:".lyrics-dropdown"},events:{click:"onClick","click .lyrics-btn":"onLyricsClick","mousewheel .lyrics-dropdown":"onLyricsMouseWheel"},modelEvents:{"change:playQueueItem":"onPlayQueueItemChange","change:showLyrics change:canLyrics":"renderLyricsBtn"},onlyAfterRender:["renderLyrics","renderLyricsBtn"],getLyricsStreams:function(){return this.model.get("playQueueItem").get("lyricsStreams")},renderLyrics:function(){
if(this.$el.hasClass("open")){var e=new u.default({model:this.model});this.lyricsRegion.show(e)}},renderLyricsBtn:function(){this.ui.lyricsBtn.toggleClass("hidden",!this.model.get("showLyrics")).toggleClass("disabled",!this.model.get("canLyrics"))},onRender:function(){this.renderLyricsBtn()},onLyricsSelectedChange:function(e,t){t&&this.renderLyrics()},onPlayQueueItemChange:function(){this.$el.removeClass("open"),this.renderLyricsBtn()},onClick:function(e){e.wasLyricsClick||e.stopPropagation()},onLyricsClick:function(e){
e.wasLyricsClick=!0,this.ui.lyricsBtn.isDisabled()||this.renderLyrics()},onLyricsMouseWheel:function(e){e.stopPropagation()}});t.default=c,e.exports=t.default},function(e,t,n){var i,r;i=[n(1728),n(3),n(5),n(9),n(56),n(55),n(993),n(1176)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=i.Layout.extend({template:e,dragStatus:0,ui:{upload:".upload-artwork-container",urlInput:"input[name=url]"},regions:{list:".artwork-list-container"},events:{dragenter:"onDragEnter",dragleave:"onDragLeave",dragover:"onDragOver",
drop:"onDrop",keydown:"onKeyDown","change .artwork-file-control":"onFileChange","click .upload-url-btn":"onUploadUrlClick","click .cancel-url-btn":"onCancelUrlClick","click .submit-url-btn":"onUrlSubmit","submit #upload-form":"onUrlSubmit","click .upload-back-btn":"onUploadBackClick","click .artwork-option":"onArtworkOptionClick"},initialize:function(e){this.type=e.type,this.metadataItem=this.model.getSingleMetadataItem(),this.changes={},this.collection=new s([],{server:this.model.server,section:this.model.section,
parent:this.metadataItem,artworkType:this.type}),this.collection.fetch()},serializeData:function(){return{showUpload:this.model.server.supports("artworkUpload"),showFileUpload:r.hasFileUpload}},flushChanges:function(){this.model.set(this.changes)},uploadFiles:function(e){if(e&&e.length){this.changes={},this.ui.upload.removeClass("show-success show-error");var i=this.collection.url(),r=t.extend(this.model.server.getXHROptions(i),{type:"POST",processData:!1}),a=[],s=t.bind(function(e){/image\//.test(e.type)&&(r.data=e,
a.push(n.ajax(r)))},this);if(t.each(e,s),!a.length)return void this.ui.upload.addClass("show-error");this.ui.upload.addClass("show-progress"),this.monitorUpload(n.when.apply(n,a))}},uploadUrl:function(e){this.changes={},this.ui.upload.removeClass("show-form"),this.ui.upload.addClass("show-progress"),this.ui.urlInput.val(""),e=this.collection.url()+"?url="+encodeURIComponent(e);var i=t.extend(this.model.server.getXHROptions(e),{type:"POST"});this.monitorUpload(n.ajax(i))},monitorUpload:function(e){
e.done(t.bind(function(){this.isClosed||this.ui.upload.addClass("show-success");var e={server:this.model.server,onlyIfCached:!0},n=new a({key:this.metadataItem.get("key")},e);t.isEmpty(n)||n.fetch(),this.collection.fetch()},this)),e.fail(this.whenRendered(function(){this.ui.upload.addClass("show-error")})),e.always(this.whenRendered(function(){this.ui.upload.removeClass("show-progress")}))},onRender:function(){this.list.show(new o({collection:this.collection,itemViewOptions:{artworkType:this.type
}}))},onDragEnter:function(e){this.dragStatus++,this.ui.upload.addClass("drag-hover")},onDragLeave:function(e){this.dragStatus--,0===this.dragStatus&&this.ui.upload.removeClass("drag-hover")},onDragOver:function(e){e.preventDefault()},onDrop:function(e){e.preventDefault(),e.stopPropagation(),this.dragStatus=0,this.ui.upload.removeClass("drag-hover"),this.uploadFiles(e.originalEvent.dataTransfer.files)},onKeyDown:function(e){27===e.which&&this.ui.upload.hasClass("show-form")&&(e.preventDefault(),this.ui.upload.removeClass("show-form"));
},onFileChange:function(e){this.uploadFiles(e.target.files)},onUploadUrlClick:function(e){e.preventDefault(),this.ui.upload.addClass("show-form"),this.ui.urlInput.focus()},onCancelUrlClick:function(e){e.preventDefault(),this.ui.upload.removeClass("show-form")},onUrlSubmit:function(e){e.preventDefault();var t=this.ui.urlInput.val();t?this.uploadUrl(t):this.ui.upload.removeClass("show-form")},onUploadBackClick:function(e){e.preventDefault(),this.ui.upload.removeClass("show-success show-error")},onArtworkOptionClick:function(e){
e.preventDefault();var t=n(e.currentTarget),i=t.data("ratingKey");this.$(".artwork-option.selected").removeClass("selected"),t.addClass("selected"),this.changes[this.type]=i}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1731),n(3),n(5),n(9),n(55),n(60),n(1135)],r=function(e,t,n,i,r,a,s){"use strict";var o=i.CompositeView.extend({template:e,className:"files",itemView:s,itemViewContainer:"ul",initialize:function(){this.collection=new a,this.populateParts().always(this.whenRendered(function(){
this.$(".loading").addClass("hidden")}))},populateParts:function(){function e(e){var n=e.get("Media");if(n&&n.length)return t.each(n,i),n}function i(e){t.each(e.Part,r)}function r(e){a.push(e)}var a=this.collection,s=this.model.getSingleMetadataItem();if(e(s))return n.Deferred().resolve();var o=s.populate().then(function(){if(!e(s)&&s.has("childrenKey")){var t=s.get("children"),n=t.get("metadataItems");if(!n.length)return t.populate().then(function(){n.each(e)});n.each(e)}});return o},flushChanges:function(){}
});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1732),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({template:e,tagName:"li",className:"well",serializeData:function(){var e={file:this.model.get("file")};return e}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1739),n(3),n(10),n(103),n(504)],r=function(e,t,n,i,r){"use strict";var a=r.extend({templatesByType:{movie:e,show:e,album:e,photo:e},serializeData:function(){var e=n.resolve("appModel"),a=e.get("user"),s=r.prototype.serializeData.apply(this,arguments);
return t.extend(s,{showLabels:this.model.server.supports("labels"),labelsMinVersion:i.labels,hasContentFilterFeature:a.get("subscription").get("features").get("content_filter"),plexPassUrl:a.server.get("plexPassUrl")}),s}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(489)],r=function(e,t,n,i){"use strict";var r=function(r,a){var s=t(a),o=s.attr("name"),l=o.replace(/parentTitle$/,"parentRatingKey");l===o&&(l=null);var u,c=r.model.getQueryAttr(o),d=r.model.getQueryAttrSibling(o),h=c!==o,p=h?"title":o,f=h?"ratingKey":p,m=r.model.get("type");
u=h?c.match(/(^.*)\./)[1]:"title"===p?m:null;var v=s.data("scopeToAttr"),g=s.data("scopeToParam"),y=s.data("ratingKey"),b=!y;y&&(y=y.toString());var w=!h,S={};g&&r.listenTo(r,"reset_selectize:"+g,function(){A.loadedSearches={}});var P,x,C=r.model["original.updateValues."+o];C?(P=C.updateAttr,x=C.altUpdateAttr):(P=r.model.get(o),l&&(x=parseInt(r.model.get(l),10)),r.model["original.updateValues."+o]={updateAttr:P,altUpdateAttr:x});var T=r.model["original.general."+o];if(!T){T=[];var _={};_[p]=P,_.ratingKey=y,
T=[_],r.model["original.general."+o]=T}var E=[r.model.get(l)||r.model.get(o)],k=function(){var e=A.$dropdown_content.children();A.$dropdown.toggleClass("hidden",e.length<=1)},I=function(){e.defer(k)};s.data("autocompleteAttr",p),s.data("updateAttr",o),l&&s.data("altUpdateAttr",l);var A=s.selectize({options:T,items:E,plugins:["restore_on_focus"],delimiter:null,create:!0,maxItems:1,labelField:p,valueField:f,sortField:p,searchField:[p],selectOnTab:!0,hideSelected:!1,highlight:!1,openOnFocus:!0,selectOnBlur:!0,
createOnBlur:!0,persist:!0,addPrecedence:!0,allowEmptyOption:!0,allowCreateEmpty:w,manualInputWidth:!0,loadingClass:"",onFocus:function(){A.preloaded||(A.preloaded=!0,A.onSearchChange(A.$control_input.val()))},createFilter:function(t){S[p]=t;var n=e(this.options).findWhere(S);return!n},load:function(e,t){if(!e.length)return void t();var n={};if(n[c]=e,v){var a=r.model.get(v);if(!a)return void t();n[g]=a}var s=new i([],{server:r.model.server,multiMetadataItem:r.model,query:n});s.fetch().done(function(e){
t(e.map(function(e){return e.toJSON()})),k()})},render:{option:function(e,t){var i,r=l?e.ratingKey===String(x):e[p]===P;return i=r?'<small class="autocomplete-annotate pull-right">('+(u&&!b?n("this {1}",u):n("original value"))+")</small>":"","<div>"+t(e[p])+i+"</div>"},option_create:function(e,t){return e.input?'<div class="create">'+t(e.input)+"</div>":'<div class="create hidden"></div>'}},onDropdownClose:function(){A.$dropdown.addClass("hidden")},onDropdownOpen:function(){A.$dropdown.addClass("hidden"),
I()},onType:e.bind(function(e){if(A.canCreate(e)){var n=t(A.$dropdown_content[0].childNodes[0]);A.setActiveOption(n)}I(),this.onLockableFieldChange({currentTarget:A.$input,force:!0})},r),onOptionAdd:function(t,n){var i=e.pick(n,p,"ratingKey"),r=e.findWhere(T,i);r||T.splice(T.length,0,n)},onChange:function(t){var n=this.options[t];if(n){if(h){var i=n.ratingKey===n[p];s.data("isText",i)}r.flushChanges();var a=r.model.changedAttributes();e.has(a,c)||e.has(a,d)?r.trigger("focusSubmit"):e.defer(function(){
A.onBlur()}),r.trigger("reset_selectize:"+o),k()}}})[0].selectize;A.$dropdown.addClass("hidden")};return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(5),n(6),n(110),n(39),n(209),n(489)],r=function(e,t,n,i,r,a,s){"use strict";var o=function(i,o){var l=t(o),u=l.data("name"),c=l.data("query")||l.data("name"),d=l.data("attr"),h=i.model.get(d).toJSON(),p=e.pluck(h,"tag"),f=i.model["original.tag."+u];f||(f=e.clone(h),i.model["original.tag."+u]=f);var m=e.difference(p,e.pluck(f,"tag"));
if(m.length){var v=e.map(m,function(e){return{tag:e}});v.unshift(f.length,0),f.splice.apply(f,v)}var g=function(t){i.model["original.allTagsRequested."+u]=!0;var n=new a({filter:u,filterType:"string"},{server:i.model.server,section:i.section,type:r.get(i.model.get("type")).id}),s=n.get("options");s.populate().then(e.bind(function(e){i.model["original.allTagsAvailable."+u]=!0,t(e.map(function(e){return{tag:e.attributes.title}}))},i))};l.data("original-value",l.val()),l.selectize({options:f,items:p,
plugins:["remove_button"],create:!0,labelField:"tag",valueField:"tag",sortField:"tag",searchField:["tag"],highlight:!1,createFilter:function(t){var n=e(this.options).findWhere({tag:t});return!n},onChange:function(){i.onLockableFieldChange(l)},onFocus:function(){this.onSearchChange("")},loadingClass:"",load:function(e,t){var n=!(c!==u||e.length&&i.canAutocomplete);if(n)return void(i.model["original.allTagsRequested."+u]?t():g.call(i,t));var r=i.model["original.allTagsAvailable."+u]||0===e.length;if(r)return void t();
var a={};a[c]=e;var o=new s([],{server:i.model.server,multiMetadataItem:i.model,query:a}),l=c===u?function(e){return e.toJSON()}:function(e){return{tag:e.get(c)}};o.fetch().done(function(e){var n=e.map(l);t(n)}).fail(function(){t()})},render:{item:function(e,t){var i=e.tag?t(e.tag):'<span class="autocomplete-annotate">('+n("blank")+")</span>";return'<div class="item">'+i+"</div>"},option:function(e,t){var i;return i=e.tag?t(e.tag):'<small class="autocomplete-annotate">('+n("blank")+")</small>",'<div class="item">'+i+"</div>";
}}})};return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1887),n(3),n(5),n(13),n(131),n(83),n(189),n(1146),n(1140)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=s.extend({template:e,ui:t.extend({sectionAgent:"#edit-section-agent",sectionScanner:"#edit-section-scanner",thumbnailsCheckbox:'input[name="enableBIFGeneration"]',agentGroup:".agent-group",scannerGroup:".scanner-group"},s.prototype.ui),events:{"change #edit-section-agent":"onEditSectionAgentChange","change #edit-section-scanner":"onEditSectionScannerChange",
"click .delete-thumbnails-btn":"onThumbnailsDeleteClick"},regions:{sectionSettingsRegion:".section-settings-region",agentSettingsRegion:".section-agent-settings-region"},onlyAfterRender:["renderSectionAgent","renderSectionScanner","renderSectionSettings","renderSectionAgentSettings"].concat(s.prototype.onlyAfterRender),initialize:function(){this.populateCollections()},onRender:function(){this.model.agents.populate(),this.model.scanners.populate()},validate:function(e){var t=[];return e.get("agent")||t.push("agent"),
e.get("scanner")||t.push("scanner"),t},renderSectionSettings:function(){var e=new o({model:this.model,collection:this.model.settings});this.sectionSettingsRegion.show(e)},renderSectionAgentSettings:function(){var e=new l({model:this.model,collection:this.model.agentSettings});this.agentSettingsRegion.show(e)},populateCollections:function(){var e=this.populateAgents(),i=this.populateScanners(),r=this.populateSectionSettings(),a=this.populateSectionAgentSettings();return this.populateAgentsProxy(),
this.populateScannersProxy(),e.then(t.bind(this.onAgentsPopulate,this)),i.then(t.bind(this.onScannersPopulate,this)),r.then(t.bind(this.renderSectionSettings,this)),a.then(t.bind(this.renderSectionAgentSettings,this)),n.when(e,i,r,a).then(t.bind(this.validate,this,this.model))},renderSectionAgent:function(){var e=this.model.agentsProxy,t=this.createMenuOptions(e.map(function(e){return{label:e.get("name"),value:e.get("identifier")}}),this.model.get("agent"));this.ui.sectionAgent.html(t),e.length>1&&this.ui.agentGroup.removeClass("hidden");
},renderSectionScanner:function(){var e=this.model.scannersProxy,t=this.createMenuOptions(e.map(function(e){return{label:e.get("name"),value:e.get("name")}}),this.model.get("scanner"));this.ui.sectionScanner.html(t),e.length>1&&this.ui.scannerGroup.removeClass("hidden")},onEditSectionAgentChange:function(e){var i=n(e.currentTarget),r=i.val();this.model.set("agent",r),this.agentSettingsRegion.close();var a=this.model.agents.get(r);if(a){var s=a.get("languages"),o=this.model.get("language");s.get(o)||this.model.set("language",s.first().get("code")),
this.model.agentSettings=null,this.populateSectionAgentSettings().then(t.bind(this.renderSectionAgentSettings,this))}this.showValidationResult(this.validate(this.model))},onEditSectionScannerChange:function(e){var t=n(e.currentTarget);this.model.set("scanner",t.val()),this.showValidationResult(this.validate(this.model))},onAgentsPopulate:function(e){this.renderSectionAgent()},onScannersPopulate:function(e){this.renderSectionScanner()},onThumbnailsDeleteClick:function(e){e.preventDefault();var t=i.execute("deleteSectionThumbnails",{
section:this.model});t.done(this.whenRendered(function(){this.ui.thumbnailsCheckbox.prop("checked",!1)}))}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1744),n(3),n(5),n(9)],r=function(e,t,n,i){"use strict";var r=i.ItemView.extend({template:e,events:{"change input[name]":"onInputChange","change select[name]":"onInputChange"},initialize:function(){this.changes={}},serializeData:function(){return{settings:this.collection.toJSON(),agentName:this.model.agents.get(this.model.get("agent")).get("name")
}},onInputChange:function(e){var t=n(e.currentTarget),i=t.is(":checkbox")?t.prop("checked"):t.val(),r=this.collection.findWhere({id:t.attr("name")});r.set("value",i)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1745),n(189)],r=function(e,t){"use strict";var n=t.extend({template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1888),n(3),n(5),n(37),n(8),n(141),n(189),n(1144),n(1238)],r=function(e,t,n,i,r,a,s,o,l){"use strict";
var u=s.extend({template:e,fieldNames:["Location"],regions:{pathsRegion:".paths-region"},events:{"click .add-folder-btn":"onAddFolderClick","change input[name=path]":"onFolderChange"},onlyAfterRender:["renderSectionLocation"].concat(s.prototype.onlyAfterRender),initialize:function(){this.listenTo(this.model.get("locations"),{add:this.onCollectionChange,remove:this.onCollectionChange}),this.renderSectionLocation(),this.showValidationResult(this.validate(this.model))},validate:function(e){var t=[];return e.get("locations").length||t.push("locations"),
t},renderSectionLocation:function(){var e=new o({collection:this.model.get("locations")});this.pathsRegion.show(e)},onCollectionChange:function(){this.showValidationResult(this.validate(this.model))},onAddFolderClick:function(e){e.preventDefault();var t=new l({server:this.model.server});this.listenToOnce(t,"add:folder",this.onAddFolder),r.trigger("show:modal",t)},onAddFolder:function(e){if(e){var t={path:e};this.model.get("locations").findWhere(t)||this.model.get("locations").add(t)}},onFolderChange:function(e){
var t=n(e.currentTarget),i=t.prop("defaultValue"),r=t.val();if(!r)return void t.val(i);var a=this.model.get("locations").findWhere({path:i});a.set("path",r),t.prop("defaultValue",r)}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1889),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({template:e,className:"row",events:{"click .remove-path-btn":"onRemovePathClick"},onRemovePathClick:function(e){e.preventDefault(),this.model.trigger("destroy",this.model,this.model.collection);
}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(9),n(1143)],r=function(e,t){"use strict";var n=e.CollectionView.extend({itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1890),n(5),n(10),n(8),n(189),n(518)],r=function(e,t,n,i,r,a){"use strict";var s=r.extend({template:e,ui:{chooseAgent:".choose-agent"},events:{"click .choose-agent":"onChooseAgentClick"},modelEvents:{"change:agent":"onSectionAgentChange","change:scanner":"onSectionScannerChange"
},onlyAfterRender:["updateSelectedOffering"],initialize:function(){this.hasPremiumMusic=this.model.server.hasOwnerFeature("premium_music_metadata"),this.updateSelectedOffering()},serializeData:function(){var e=n.resolve("appModel"),t=e.get("user"),i={hasPremiumMusic:this.hasPremiumMusic,plexPassUrl:t.server.get("plexPassUrl"),hasLyrics:this.model.server.get("transcoderLyrics")};return i},updateSelectedOffering:function(){var e=this.model.get("agent"),t=this.model.get("scanner");this.ui.chooseAgent.find("input").prop("checked",!1);
var n=this.ui.chooseAgent.filter('[data-agent="'+e+'"][data-scanner="'+t+'"]').find("input");n.length||(n=this.ui.chooseAgent.not("[data-agent][data-scanner]").find("input")),n.prop("checked",!0)},onChooseAgentClick:function(e){var n=t(e.currentTarget),r=n.data("agent"),s=n.data("scanner");return!r&&!s||this.hasPremiumMusic?(this.model.agentSettings=null,void this.model.set({agent:r||this.getSectionType().defaultAgent,scanner:s||this.getSectionType().defaultScanner})):void i.trigger("show:modal",new a({
model:this.model.server}))},onSectionAgentChange:function(){this.updateSelectedOffering()},onSectionScannerChange:function(){this.updateSelectedOffering()}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1891),n(5),n(9)],r=function(e,t,n){"use strict";var i=n.ItemView.extend({template:e,events:{"change [name]":"onEditSectionSettingInputChange"},serializeData:function(){var e=this.model.isNew(),t="music"===this.model.get("type"),n={settings:this.collection.toJSON(),
edit:!e,isNewMusicSection:e&&t&&this.model.server.supports("premiumMusic")};return n},onEditSectionSettingInputChange:function(e){var n=t(e.currentTarget),i=n.attr("name");if("importFromiTunes"===i)return void this.model.set(i,!0);var r=n.is(":checkbox")?n.prop("checked"):n.val(),a=this.collection.findWhere({id:i});a.set("value",r)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1892),n(3),n(5),n(131),n(83),n(130),n(189)],r=function(e,t,n,i,r,a,s){"use strict";var o=s.extend({
template:e,ui:t.extend({sectionTypes:".wizard-block",sectionTitle:"#edit-section-title",sectionLanguage:"#edit-section-language"},s.prototype.ui),modelEvents:{"change:type":"onSectionTypeChange","change:title":"onSectionTitleChange","change:language":"onSectionLanguageChange"},events:{"click .section-type":"onSectionTypeClick","keyup #edit-section-title":"onEditSectionTitleChange","change #edit-section-title":"onEditSectionTitleChange","change #edit-section-language":"onEditSectionLanguageChange"
},onlyAfterRender:["renderSectionLanguage","updateSectionTypesWizardBlocks","updateSectionLanguage","updateSectionTitle"].concat(s.prototype.onlyAfterRender),initialize:function(e){this.populateCollections(),this.isDefaultSection=e.isDefaultSection},serializeData:function(){var e=s.prototype.serializeData.apply(this,arguments);e.sectionTypes=r.getAll();var t=this.getSectionType();t&&(e.currentSectionKey=t.key);var n=this.model.get("updatedAt");return n&&(e.updatedAt=a(n)),e.canChangeType=this.model.isNew()&&!this.isDefaultSection,
e.hasType=!!this.model.get("type"),e},validate:function(e){var t=[];return e.get("type")||t.push("type"),e.get("title")||t.push("title"),e.get("language")||t.push("language"),t},populateCollections:function(){var e=this.populateAgents(),i=this.populateScanners(),r=this.getSectionType(),a=n.when(r,e,i,this.model.server.get("myPlexSubscription")&&this.model.server.supports("premiumMusic"));return this.model.isNew()&&(a=a.then(t.bind(this.model.setAgentAndScanner,this.model))),a=a.then(e).then(t.bind(this.onAgentsPopulate,this)).then(t.bind(function(){
this.showValidationResult(this.validate(this.model))},this))},renderSectionLanguage:function(){var e=this.model.get("language"),t=this.model.agents.get(this.model.get("agent")),n=t.get("languages");if(!n.get(e)){var i=this.model.get("type"),a=r.get(i),s=a.defaultLanguage;this.model.set("language",s,{silent:!0}),e=s}var o=n.map(function(e){return{label:e.get("name"),value:e.id}});this.updateSectionLanguage(),this.ui.sectionLanguage.html(this.createMenuOptions(o,e))},updateSectionTypesWizardBlocks:function(){
this.ui.sectionTypes.removeClass("selected"),this.ui.sectionTypes.filter('[data-key="'+this.model.get("type")+'"]').addClass("selected"),this.$el.addClass("section-type-chosen")},updateSectionLanguage:function(){this.ui.sectionLanguage.val(this.model.get("language"))},updateSectionTitle:function(){var e=this.ui.sectionTitle.val(),t=this.model.get("title");e!==t&&this.ui.sectionTitle.val(t)},onSectionTypeClick:function(e){e.preventDefault();var t=n(e.currentTarget);if(t.hasClass("selectable")){var i=t.data("key"),a={
type:i},s=r.get(i);this.model.get("title")||(a.title=s.title),this.model.set(a)}},onEditSectionTitleChange:function(e){var t=n(e.currentTarget);this.model.set("title",t.val()),this.showValidationResult(this.validate(this.model))},onEditSectionLanguageChange:function(e){var t=n(e.currentTarget);this.model.set("language",t.val()),this.showValidationResult(this.validate(this.model))},onSectionTypeChange:function(e,t){this.updateSectionTypesWizardBlocks();var n=r.get(t);if(!this.model.get("language")){
var i=n.defaultLanguage;this.model.set("language",i)}var a=this.model.get("title"),s=this.model.previous("type"),o=r.get(s),l=o&&o.title;a&&a!==l||this.model.set("title",n.title),this.setSectionType(n),this.model.agents=null,this.model.scanners=null,this.model.settings=null,this.populateCollections()},onSectionTitleChange:function(e,t){this.updateSectionTitle(),this.showValidationResult(this.validate(this.model))},onSectionLanguageChange:function(e,t){this.updateSectionLanguage()},onAgentsPopulate:function(e){
this.renderSectionLanguage()}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(162),n(867)],r=function(e,t){"use strict";var n=t.extend({className:"container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(162),n(869)],r=function(e,t){"use strict";var n=t.extend({className:"container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(162),n(6),n(870)],r=function(e,t,n){"use strict";
var i=n.extend({className:"container",template:e,serializeData:function(){return{title:t("You don't have any media servers yet."),subtitle:t("{1}Download and install{2} one and try again.",'<a href="https://plex.tv/downloads" target="_blank">',"</a>")}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(162),n(871)],r=function(e,t){"use strict";var n=t.extend({className:"container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;
i=[n(162),n(872)],r=function(e,t){"use strict";var n=t.extend({className:"container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1746),n(3),n(9),n(8)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({className:"filter-bar filter-bar-fixed",template:e,events:{"click .clear-filters-btn":"onClearFiltersClick"},serializeData:function(){var e=this.model.get("currentFilters"),n=[];return t.each(e,function(e){n.push(e.titles.join(", "))}),{titles:n.join(", ")
}},onClearFiltersClick:function(e){e.preventDefault();var t=this.model.get("currentFilters");t.length=0,this.model.trigger("change:currentFilters",this.model,t),i.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.id,subset:this.model.get("subset"),trigger:!1})}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1155)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list card-list alert-list",itemView:t,reversed:!0
});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1747),n(3),n(9),n(6)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({tagName:"li",className:"card-collapsed striped-list-item alert-list-item",template:e,serializeData:function(){var e=this.model.toJSON(),n={serverID:this.model.server.id,serverName:t.escape(this.model.server.get("friendlyName")),itemKey:"/library/metadata/"+this.model.get("itemID"),event:e};if(e.label=t.escape(e.label),e.value=t.escape(e.value),
"playing"===e._type&&(e.username=t.escape(e.username),e.title=t.escape(e.title),e.player=t.escape(e.player)),"timeline"===e._type)switch(e.sectionTitle=this.model.get("section")?this.model.get("section").get("title"):"section "+this.model.get("sectionID"),e.mediaTitle=this.model.get("title")||"an item",this.model.get("state")){case 0:e.stateString=i("Created");break;case 1:e.stateString=i("Progress for");break;case 2:e.stateString=i("Matching");break;case 3:e.stateString=i("Downloading metadata for");
break;case 4:e.stateString=i("Loading metadata for");break;case 5:e.stateString=i("Finished processing");break;case 6:e.stateString=i("Analyzing");break;case 9:e.stateString=i("Deleted")}return n}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1158),n(1157)],r=function(e,t,n){"use strict";var i=e.extend({tagName:"ul",className:"tile-list session-tile-list",itemView:t,emptyView:n});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1748),n(9)],
r=function(e,t){"use strict";var n=t.ItemView.extend({template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1749),n(3),n(6),n(438),n(43),n(451),n(460),n(13),n(96),n(47)],r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c=l.extend({className:"poster-item session-tile-list-item",template:e,screenshotPreferredIndex:"hd",screenshotInterval:null,screenshotIntervalDelay:2e3,screenshotCount:0,ui:{poster:".media-poster",posterFade:".media-poster-fade",userPoster:".user-poster"
},events:t.extend({"click .info-btn":"onInfoClick","click .close-btn":"onInfoClick"},l.prototype.events),modelEvents:{"change:viewOffset":"onViewOffsetChange","change:Player":"onPlayerChange"},initialize:function(e){l.prototype.initialize.apply(this,arguments);var n=this.getScreenshotUrl(this.model.get("Media"));this.image=new u({model:this.model,modelAttribute:"ratingKey",type:"clip",getUrl:this.getPosterUrl,width:350,url:n?n:null}),this.userImage=new u({model:this.model,modelAttribute:"User",type:"friend",
getUrl:this.getUserPosterUrl,width:44}),this.posterFade=new u({model:this.model,modelAttribute:"Media",type:"clip",getUrl:t.bind(this.getScreenshotUrl,this),width:350});var i=this.model.get("Player");i&&i.state===r.states.PLAYING&&(this.screenshotInterval=setInterval(t.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)),this.listenTo(this.model,"change:Player",this.onPlayerChange)},getPosterUrl:function(e){var t=this.model;return"photo"===t.get("type")?t.get("thumb"):t.get("art")||t.get("parentArt")||t.get("grandparentArt")||t.get("thumb");
},getUserPosterUrl:function(e){return e.thumb},getScreenshotUrl:function(e){var n=t.first(e);if(n){var i=this.model.get("viewOffset")||0,r=this.screenshotCount*this.screenshotIntervalDelay+i+4e3;return a(n,r,this.screenshotPreferredIndex)}},updateScreenshot:function(){if(this.screenshotCount++,this.posterFade){var e=this.posterFade.screenshotUrl,n=this.getScreenshotUrl(this.model.get("Media"));n&&(this.posterFade.screenshotUrl=n,this.posterFade.load(n).done(this.whenRendered(function(n){this.posterFade.showImage(n),
this.ui.posterFade.removeClass("invisible"),this.posterFadeDelay=t.delay(this.whenRendered(function(){if(this.image.showImage(n),this.ui.posterFade.addClass("invisible"),e){var t=this.posterFade.cache,i=this.image.getTranscodeUrl(e),r=t.get(t.getItemCacheKey({url:i}));r&&t.remove(r)}}),800)})))}},bindings:t.extend({},l.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=l.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments),n=l.prototype.bindings[".media-subtitle-2"].formatter.call(this,this.model.get("index"));
return n?n+" "+t:t}},".device-icon":{modelAttribute:"Player",manual:!0,formatter:function(e,t){var n=i.getIcon(e.platform||e.product);t.addClass("device-icon-"+n)}},".session-player":{modelAttribute:"Player",formatter:function(e){return e.title}},".session-state":{modelAttribute:"Player",formatter:function(e){return s(e.state)}},".session-transcode":{modelAttribute:"TranscodeSession",formatter:function(e){return n(e?"Transcoding":"Direct Play")}},".session-transcode-throttled":{modelAttribute:"TranscodeSession",
autohide:!0,formatter:function(e){return e&&"1"===e.throttled?n("(throttled)"):""}},".session-transcode-video-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var i=!(!e||!e.videoCodec);return t.parent().toggleClass("hidden",!i),i?"copy"===e.videoDecision?n("Direct Stream"):n("Transcode ({1})",e.videoCodec):""}},".session-transcode-audio-decision":{modelAttribute:"TranscodeSession",formatter:function(e,t){var i=!(!e||!e.audioCodec);return t.parent().toggleClass("hidden",!i),i?"copy"===e.audioDecision?n("Direct Stream"):n("Transcode ({1})",e.audioCodec):"";
}},".session-username":{modelAttribute:"User",formatter:function(e){return e.title}}}),onRender:function(){l.prototype.onRender.apply(this,arguments),this.userImage.setElement(this.ui.userPoster),this.posterFade.setElement(this.ui.posterFade)},onClose:function(){l.prototype.onClose.call(this),clearTimeout(this.posterFadeDelay),clearInterval(this.screenshotInterval),this.posterFade&&this.posterFade.close()},onViewOffsetChange:function(e,t){this.screenshotCount=0},onPlayerChange:function(e,n){n&&(n.state!==r.states.PLAYING&&this.screenshotInterval?(this.screenshotInterval=clearInterval(this.screenshotInterval),
this.screenshotCount=0):n.state!==r.states.PLAYING||this.screenshotInterval||(this.screenshotInterval=setInterval(t.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)))},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),o.execute("playMedia",{item:this.model,offset:this.model.get("viewOffset")})},onInfoClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.$el.toggleClass("dim")}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(33),n(1160)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"tile-list media-tile-list sync-tile-list show-context",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1750),n(3),n(37),n(9),n(6),n(8),n(132),n(171),n(13),n(1010),n(47),n(303),n(1249),n(520)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p){"use strict";var f=i.Layout.extend({tagName:"li",className:"poster-item media-tile-list-item sync-tile-list-item",template:e,metadataItemsDelay:5e3,
ui:{poster:".media-poster",transcodeStatus:".sync-status-transcode",transcodeTimeRemaining:".media-context",statusIcons:".sync-status-icon",completeIcon:".sync-complete-icon",waitingIcon:".sync-waiting-icon",processingIcon:".sync-processing-icon",failedIcon:".sync-failed-icon",unknownIcon:".sync-unknown-icon"},regions:{transcodeProgress:".sync-status-transcode"},events:{"click a":"onClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},onlyAfterRender:["onMetadataItemsReset","onMediaChange","onTranscodeJobsReset"],
initialize:function(e){this.server=e.server,this.model.parent=this.server,this.type=this.model.get("metadataType"),this.contentType=this.model.get("contentType");var i=this.type,r=this.contentType,a=150;"episode"===i?i="show":"clip"===i||"userPlaylistItem"===i?a=250:"directory"===i&&(i="audio"===r?"track":"photo"===r?"photo":"movie"),this.$el.addClass(i),this.image=new c({server:this.server,type:i,width:a}),this.progressModel=new n.Model({current:0});var s=this.server.get("transcodeJobs");this.metadataItems=new u([],{
server:this.server,device:this.model.device,syncItemId:this.model.id}),this.listenTo(this.metadataItems,"reset",this.onMetadataItemsReset),this.listenTo(s,"reset",this.onTranscodeJobsReset),this.metadataItems.fetch({reset:!0}),this.server.supports("syncNotifications")?this.listenTo(this.metadataItems,"change:Media",this.onMediaChange):this.metadataItemsInterval=setInterval(t.bind(function(){this.metadataItems.fetch({reset:!0})},this),this.metadataItemsDelay)},serializeData:function(){return{syncItem:this.model.toJSON(),
isCloudSync:this.model.device.get("isCloudSync"),isFailure:!!this.model.get("Status").failure}},getPosterUrl:function(e){var t=e.get("thumb");return this.hasMultipleItems?this.hasSameParents?e.get("parentThumb")||e.get("grandparentThumb")||t:this.hasSameGrandparents?e.get("grandparentThumb")||e.get("parentThumb")||t:void 0:t},updatePoster:function(e){if(this.hasPoster=!0,!e){var t=this.metadataItems.first();if(!t)return;e=this.getPosterUrl(t)}this.image.url!==e&&(this.image.src=null,this.image.url=e,
this.image.render())},analyzeParts:function(e){if(this.model.get("Status").failure)return"failed";var n=e.models,i=n.length;if(!i)return"unknown";for(var r="complete",a=[],o=[],l=0;l<i;l++){var u=n[l],c=u.get("Media");if(a.push(u.get("grandparentKey")),o.push(u.get("parentKey")),c.length||(r="unknown"),"failed"!==r&&"unknown"!==r)for(var d=0,h=c.length;d<h;d++)for(var p=c[d].Part,f=0,m=p.length;f<m;f++){var v=p[f],g=s.getSyncStateFromPart(v);s.failedRegex.test(g)&&(r="failed"),s.processingRegex.test(g)&&(r="processing"),
s.waitingRegex.test(g)&&"processing"!==r&&(r=v.key?"waiting":"processing")}}return this.hasMultipleItems=i>1,this.hasSameGrandparents=1===t.compact(t.uniq(a)).length,this.hasSameParents=1===t.compact(t.uniq(o)).length,this.hasPoster||this.updatePoster(),r},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"rootTitle"}},onRender:function(){this.image.setElement(this.ui.poster),this.transcodeProgress.append(new d({model:this.progressModel,size:56}))},onClose:function(){
clearInterval(this.metadataItemsInterval)},onMetadataItemsReset:function(e){var t=this.analyzeParts(e);if(this.ui.statusIcons.addClass("hidden"),this.ui.transcodeStatus.hasClass("hidden"))switch(t){case"complete":this.ui.completeIcon.removeClass("hidden");break;case"waiting":this.ui.waitingIcon.removeClass("hidden");break;case"processing":this.ui.processingIcon.removeClass("hidden");break;case"failed":this.ui.failedIcon.removeClass("hidden");break;default:this.ui.unknownIcon.removeClass("hidden");
}},onMediaChange:function(e,t){this.onMetadataItemsReset(this.metadataItems)},onTranscodeJobsReset:function(e){var t=e.where({syncItemId:this.model.id});if(!t.length)return this.ui.transcodeStatus.hasClass("hidden")||(this.ui.transcodeStatus.addClass("hidden"),this.ui.waitingIcon.removeClass("hidden")),this.ui.transcodeTimeRemaining.text(""),void this.updatePoster();var n=t[0],i=n.get("progress");if(this.ui.statusIcons.addClass("hidden"),i>0){this.ui.transcodeStatus.removeClass("hidden");var a=n.get("type"),s=o(n.get("remaining"));
if(this.progressModel.set("progress",i),"download"===a)this.progressModel.set("text",i.toString()+"%"),this.ui.transcodeTimeRemaining.text(r("Downloading"));else if("upload"===a)this.progressModel.set("text",i.toString()+"%"),this.ui.transcodeTimeRemaining.text(r("Uploading"));else{var l=n.get("speed");if(l){var u=Math.round(10*n.get("speed"))/10;u>10&&(u=Math.round(u)),this.progressModel.set("text",u.toString()+"x")}else this.progressModel.set("text","");this.ui.transcodeTimeRemaining.text(s)}this.updatePoster(n.get("thumb"));
}else this.ui.transcodeStatus.addClass("hidden"),this.ui.processingIcon.removeClass("hidden")},onClick:function(e){e.preventDefault(),a.trigger("show:modal",new h({model:this.model,collection:this.metadataItems}))},onEditClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),a.trigger("show:modal",new p({model:this.model}))},onDeleteClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),l.execute("deleteSyncItem",{syncItem:this.model,server:this.server})}});return f}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1162)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list sync-status-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1751),n(3),n(9),n(6),n(132),n(171),n(47)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.ItemView.extend({tagName:"li",className:"sync-status-list-item",template:e,ui:{poster:".media-poster"},initialize:function(e){this.syncItem=e.syncItem,this.transcodeJobs=this.model.server.get("transcodeJobs"),
this.$el.addClass(this.model.get("type")),this.image=new s({model:this.model,type:this.model.get("type"),getUrl:this.getPosterUrl,height:50,background:!1}),this.listenTo(this.transcodeJobs,"reset",function(e){this.model.trigger("change:Media",this.model,this.model.get("Media"))})},serializeData:function(){return{isCloudSync:this.model.device.get("isCloudSync")}},getPosterUrl:function(e){return e||this.model.get("parentThumb")||this.model.get("grandparentThumb")},analyzeTranscodeJobs:function(){var e;
if(this.transcodeJobs.each(t.bind(function(t){if(this.syncItem.id===t.get("syncItemId")){var n=this.model.get("thumb"),i=this.model.get("title"),r=t.get("transcodeThumb"),a=t.get("title"),s=a&&a.indexOf(i)>-1,o=!0;if(n&&r){var l=new RegExp("(.+)"+t.get("thumb")+"$");o=l.exec(n)}s&&o&&(e=t)}},this)),e&&e.get("progress")>0){var n=Math.round(10*e.get("speed"))/10,r=a(e.get("remaining"))||i("done"),s=Math.round(10*e.get("progress"))/10;return{active:!0,speed:n,remaining:r,progress:s,isUploading:"upload"===e.get("type")
}}return{active:!1}},analyzeParts:function(){var e="complete",t=this.model.get("Media");if(!t.length)return"unknown";for(var n=0,i=t.length;n<i;n++)for(var a=t[n].Part,s=0,o=a.length;s<o;s++){var l=a[s],u=r.getSyncStateFromPart(l);r.failedRegex.test(u)&&(e=r.getSyncStateContextFromPart(l)),r.processingRegex.test(u)&&(e="downloading"===u?"downloading":"processing"),r.waitingRegex.test(u)&&"processing"!==e&&(e=l.key?"waiting":"processing")}return e},getErrorMessage:function(e){switch(e){case"sourceFileUnavailable":
return i("This media is inaccessible. Please check that the file exists with the correct permissions.");case"sourceFileMetadataError":return i("The metadata for this media is invalid. Please reanalyze the media and try again.");case"clientProfileError":return i("The client profile for the sync target is invalid.");case"ioError":return i("An error occurred processing this media. Please check that the disk is not full.");case"transcoderError":return i("The transcoder was unable to process this media.");
case"mediaAnalysisError":return i("This media was unable to be analyzed.");case"downloadFailed":return i("This media was unable to be downloaded. Please check that it is still available and try again.");case"unknownError":return i("An error occurred while syncing this media.")}return i("An error occurred while syncing this media.")},bindings:{".title":{modelAttribute:"title"},".subtitle":{modelAttribute:"Media",manual:!0,formatter:function(e){var t=this.analyzeParts(),n=this.analyzeTranscodeJobs();
switch(this.$(".subtitle").addClass("hidden"),t){case"complete":this.$(".complete-subtitle").removeClass("hidden");break;case"waiting":this.$(".waiting-subtitle").removeClass("hidden"),n.isUploading&&(this.$(".cloud-sync-waiting").addClass("hidden"),this.$(".cloud-sync-uploading").removeClass("hidden"),this.$(".transcode-progress").text(n.progress));break;case"downloading":n.active?(this.$(".downloading-subtitle").removeClass("hidden"),this.$(".transcode-progress").text(n.progress)):this.$(".processing-subtitle").removeClass("hidden");
break;case"processing":n.active?(this.$(".converting-subtitle").removeClass("hidden"),this.$(".transcode-progress").text(n.progress),this.$(".transcode-remaining").text(n.remaining)):this.$(".processing-subtitle").removeClass("hidden");break;case"unknown":this.$(".unknown-subtitle").removeClass("hidden");break;default:this.$(".failed-subtitle").removeClass("hidden"),this.$(".error-message").text(this.getErrorMessage(t))}}}},onRender:function(){this.image.setElement(this.ui.poster)}});return o}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(3),n(202),n(6),n(8),n(36),n(33),n(1165)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=s.extend({tagName:"ol",className:"list media-list playlist-items",itemView:o,sorted:!0,itemEvents:{sort:"onSort"},initialize:function(){t.bindAll(this,"onItemMove")},onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new n(this.el,t.extend({onAdd:this.onItemMove,onUpdate:this.onItemMove,handle:".sortable-handle",animation:200,
scroll:!0,scrollSensitivity:100,scrollSpeed:2},this.options.sortableOptions))},onClose:function(){this.sortable&&this.sortable.destroy()},onSort:function(){this.render()},onItemMove:function(n){var s=e(n.item).data("queue-item-id"),o=e(n.item).prev().data("queue-item-id"),l=this.options.playQueue;if(o)return void l.moveItem(s,o);var u=l.get("selectedItem").get("title"),c=new a({title:i("Convert Immediately"),message:i("Do you want to start converting this item immediately? Any conversion progress for '{1}' will be lost.",u)
}),d=c.promise;d.done(function(){l.moveItem(s)}),d.fail(t.bind(this.render,this)),r.trigger("show:modal",c)}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1752),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({template:e,serializeData:function(){return{serverID:this.model.id}}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1753),n(3),n(9),n(10),n(6),n(8),n(129),n(173),n(13),n(271),n(179),n(47),n(505)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){
"use strict";var p=n.Layout.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:e,ui:{poster:".media-poster"},events:{"click .promote-btn":"onPromoteClick","click .delete-btn":"onDeleteClick"},regions:{statusRegion:".conversion-status-region"},attributes:function(){return{"data-queue-item-id":this.model.id}},initialize:function(e){this.metadataItem=e.model.get("metadataItem"),this.playQueue=e.playQueue,this.transcodeJobs=e.transcodeJobs,
this.pausedSetting=e.pausedSetting,this.hideDragHandle=e.hideDragHandle,this.type=this.metadataItem.get("type");var t=o[this.type];"movie"===this.type&&(t=o.art);var n="episode"===this.type?"show":this.type;this.image=new d({model:this.metadataItem,type:n,placeholderClass:t,height:60,modelAttribute:"thumb",getUrl:this.getPosterUrl})},bindings:{".generator-title":{model:"metadataItem",modelAttribute:"title",formatter:function(e){return s.title(this.metadataItem)}},".generator-target":{modelAttribute:"target",
formatter:function(e){return this.model.get("syncItemId")?r("Sync"):e}},".sortable-handle":{model:"playQueue",modelAttribute:"playQueueSelectedItemID",manual:!0,autohide:function(e){return this.model.get("playQueueItemID")!==e}},".promote-btn":{modelAttribute:"queueIndex",manual:!0,autohide:function(e){var t=this.playQueue.getCurrentItem();return this.hideDragHandle||e-t.get("queueIndex")>1}}},serializeData:function(){return{hideDragHandle:this.hideDragHandle}},getPosterUrl:function(e){return"episode"===this.model.get("type")?this.model.get("grandparentThumb")||this.model.get("parentThumb")||e:e;
},deleteSyncItem:function(){var e=i.resolve("appModel"),t=new u({id:this.model.get("syncItemId"),clientIdentifier:this.model.get("clientIdentifier")},{server:e.get("user").server});return l.execute("deleteSyncItem",{syncItem:t,server:this.model.server})},deleteGenerator:function(){var e=new c({id:this.model.get("generatorID")},{server:this.model.server,playlistID:this.metadataItem.get("playlistID")});return l.execute("disableVersionGenerator",{generator:e,ratingKey:this.metadataItem.get("ratingKey")
})},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new h({model:this.model,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onClose:function(){this.image.close()},onCollectionSort:function(e){this.trigger("sort")},onPromoteClick:function(e){e.preventDefault();var n=this.playQueue.get("collection");this.listenToOnce(n,"sort",t.debounce(this.onCollectionSort));var i=this.model.get("playQueueItemID"),r=this.playQueue.get("playQueueSelectedItemID");
this.playQueue.moveItem(i,r)},onDeleteClick:function(e){e.preventDefault(),this.model.has("syncItemId")?this.deleteSyncItem():this.deleteGenerator()}});return p}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1167)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list card-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1755),n(3),n(9),n(8),n(13),n(125),n(234)],r=function(e,t,n,i,r,a,s){"use strict";
var o=n.ItemView.extend({tagName:"li",className:"striped-list-item",template:e,events:{"click a":"onClick"},initialize:function(e){this.currentKey=e.currentKey},serializeData:function(){return{channel:this.model.toJSON(),serverID:this.model.server.id,currentKey:this.currentKey}},bindings:{".media-title":{modelAttribute:"title"}},onClick:function(e){if(/\/updates$/.test(this.model.id))e.preventDefault(),r.execute("updateChannel",{server:this.model.server});else if(/\/prefs$/.test(this.model.id)){e.preventDefault();
var n=new a([],{server:this.model.server,url:this.model.id});n.fetch().done(t.bind(function(){i.trigger("show:modal",new s({model:this.model,collection:n}))},this))}}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1169)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"tile-list media-tile-list channel-directory-tile-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1756),n(9),n(6),n(8),n(47),n(1241)],
r=function(e,t,n,i,r,a){"use strict";var s=t.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel-directory-tile-list-item channel",template:e,ui:{poster:".media-poster",subtitle:".media-subtitle-1"},events:{"click a":"onClick"},initialize:function(e){this.closeOnInstall=e.closeOnInstall,this.image=new r({model:this.model,type:"channel",width:150})},bindings:{".media-title":{modelAttribute:"title"},".installed-icon":{modelAttribute:"installed",manual:!0,autohide:!0,formatter:function(e,t){
var i=e?n("Installed"):"";return this.ui.subtitle.text(i),e}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onClick:function(e){e.preventDefault(),i.trigger("show:modal",new a({model:this.model,closeOnInstall:this.closeOnInstall}))}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1171)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"tile-list media-tile-list channel-tile-list",itemView:t
});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1757),n(3),n(9),n(6),n(8),n(13),n(125),n(47),n(234)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=n.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel",template:e,ui:{poster:".media-poster"},events:{"click .settings-btn":"onSettingsClick","click .uninstall-btn":"onUninstallClick"},initialize:function(e){this.skipFirstRender=e.skipFirstRender,this.image=new o({model:this.model,type:"channel",
width:150}),this.shared=this.model.server.get("shared")},serializeData:function(){return{item:this.model.toJSON(),serverID:this.model.server.id,shared:this.shared}},render:function(){return this.skipFirstRender?(this.skipFirstRender=!1,this):(this.visible=!0,void n.ItemView.prototype.render.apply(this,arguments))},show:function(){this.visible||(this.visible=!0,this.render())},hide:function(){this.visible&&(this.image.cancel(),this.visible=!1,this.stopListening(this.model),this.$el.empty())},bindings:{
".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"type",autohide:!0,formatter:function(e){return i("video"===e?"Video":"music"===e?"Music":"photos"===e?"Photo":"Utility")}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onSettingsClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active");var n=new s([],{server:this.model.server,url:this.model.id+"/:/prefs"}),i=n.fetch();i.done(t.bind(function(){
r.trigger("show:modal",new l({model:this.model,collection:n}))},this)),i.always(t.bind(function(){this.$el.removeClass("active")},this))}},onUninstallClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active");var n=a.execute("uninstallChannel",{channel:this.model});n.done(t.bind(function(){this.model.trigger("destroy",this.model,this.model.collection)},this)),n.always(t.bind(function(){this.$el.removeClass("active")},this))}}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(147),n(33),n(1173)],r=function(e,t,n){"use strict";var i=t.extend({mixins:[e],tagName:"ul",className:"tile-list media-tile-list album-tile-list",itemView:n});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1758),n(3),n(96),n(190),n(47)],r=function(e,t,n,i,r){"use strict";var a=n.extend({className:"poster-item media-tile-list-item",template:e,ui:i.prototype.ui,initialize:function(e){n.prototype.initialize.apply(this,arguments),this.image=new r({
model:this.model,type:"album",width:180})},bindings:t.extend({},n.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"year"}}),onMoreClick:function(e){i.prototype.onMoreClick.apply(this,arguments)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(313),n(1175)],r=function(e,t,n){"use strict";var i=t.extend({tagName:"ul",className:"list media-list track-list show-context",itemView:n,itemViewOptions:function(){return{
collection:this.collection}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1759),n(3),n(5),n(9),n(8),n(106),n(13),n(55),n(95),n(187),n(116)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=i.ItemView.extend({tagName:"li",className:"striped-list-item",template:e,ui:{index:".track-index span",actions:".track-actions",dropdown:".track-actions-dropdown"},events:{"click .track-list-inner-item":"onClick","click .track-music-video-btn":"onMusicVideoClick","click .track-more-btn":"onMoreClick",
"hide.bs.dropdown .track-actions-dropdown":"onDropdownHide"},collectionEvents:{sort:"onCollectionSort"},initialize:function(e){t.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new l({},{item:this.model}),this.playQueueManager=this.model.server.get("playQueueManager"),this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),
this.onPlayQueueChange(this.playQueueManager.getFor(this.model)),r.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){return{index:this.getIndex(),selected:this.selected}},getIndex:function(){return this.collection.indexOf(this.model)+1},bindings:{".track-parent-index":{modelAttribute:"parentIndex"},".track-title":{modelAttribute:"title"},".track-subtitle-1":{modelAttribute:"originalTitle",autohide:function(e){var t=e&&this.artistTitle&&e.toLowerCase()!==this.artistTitle.toLowerCase();
return this.$el.toggleClass("show-subtitle",!!t),t}},".track-context":{modelAttribute:"duration",autohide:!0,formatter:function(e){return!!e&&a(e)}},".track-music-video-btn":{model:"mediaActions",modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0}},onRender:function(){var e=this.playQueueManager.getFor(this.model);if(e){var t=e.get("selectedItem");t&&this.model.get("key")===t.get("key")&&this.$(".track-list-item").addClass("current-track")}},onClose:function(){this.dropdown&&this.dropdown.close(),
r.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onCollectionSort:function(){this.ui.index.text(this.getIndex())},onClick:function(e){e.preventDefault(),s.execute("playMedia",{item:this.model,siblings:!0})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var n=this.model.server.getSectionForItem(this.model);if(!t.isEmpty(n)){var i=new o({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:n.get("uuid")
},{server:this.model.server,section:this.model.section});s.execute("playMedia",{item:i})}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new u({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=n(e.currentTarget),i=this.ui.actions.position().top,r=this.dropdown.getPosition(t,this.containerSize,i);this.ui.dropdown.css(r)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),
this.dropdown=null,this.$el.removeClass("force-hover"))},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$(".track-list-item").toggleClass("current-track",n)},onPlayQueueChange:function(e){e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},onRemovePlayQueue:function(e){this.stopListening(e),this.$(".track-list-item").removeClass("current-track")}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;
i=[n(33),n(1177)],r=function(e,t){"use strict";var n=e.extend({className:"artwork-options-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1760),n(9),n(174),n(173),n(78)],r=function(e,t,n,i,r){"use strict";var a=t.Layout.extend({tagName:"span",template:e,regions:{poster:".media-poster"},initialize:function(e){var t=e.artworkType,a=150;"art"===t?a=240:"banner"===t&&(a=520),this.$el.addClass(t),this.image=new r({className:"media-poster-image",model:this.model,
modelAttribute:"thumb",placeholderClass:i[t],width:a,height:n.getPosterHeight(t,a)})},bindings:{".artwork-option":{modelAttribute:"selected",manual:!0,formatter:function(e,t){t.toggleClass("selected",e)}}},onRender:function(){this.poster.show(this.image)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1190),n(1179)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list media-list media-details-list episode-details-list show-context",itemView:t
});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1761),n(3),n(172),n(312),n(47)],r=function(e,t,n,i,r){"use strict";var a=i.extend({className:"striped-list-item media-list-item media-details-list-item episode-details-list-item",template:e,showRating:!0,bypassShowUnwatchedIconsSetting:!0,createImageView:function(){this.image=new r({model:this.model,type:"episode",getUrl:this.getPosterUrl,height:110})},getPosterUrl:function(e){return e},bindings:t.extend({},i.prototype.bindings,{
".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),n({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}}})});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(313),n(1181)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list media-list episode-list show-context",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1762),n(3),n(172),n(96)],r=function(e,t,n,i){"use strict";var r=i.extend({className:"striped-list-item media-list-item episode-list-item",template:e,showRating:!0,bypassShowUnwatchedIconsSetting:!0,regions:{rating:".media-rating"},bindings:t.extend({},i.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),n({episodeIndex:e,date:this.model.get("originallyAvailableAt"),
noLeadingZero:!0})}}})});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(147),n(33),n(1183)],r=function(e,t,n){"use strict";var i=t.extend({mixins:[e],tagName:"ul",className:"tile-list media-tile-list episode-tile-list",itemView:n});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1763),n(3),n(172),n(96),n(190),n(47)],r=function(e,t,n,i,r,a){"use strict";var s=i.extend({className:"poster-item media-tile-list-item episode-tile-list-item",
template:e,ui:r.prototype.ui,bypassShowUnwatchedIconsSetting:!0,initialize:function(e){i.prototype.initialize.apply(this,arguments),this.image=new a({model:this.model,type:"episode",width:250})},bindings:t.extend({},i.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"index",formatter:function(e){return n({episodePrefix:"Episode {1}",episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}},".media-count-badge":{modelAttribute:"Media",
formatter:function(e){return e&&e.length||0},autohide:function(e){return e>1}}}),onMoreClick:function(e){r.prototype.onMoreClick.apply(this,arguments)}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1764),n(6),n(300),n(96),n(190),n(47)],r=function(e,t,n,i,r,a){"use strict";var s=i.extend({className:"poster-item media-tile-list-item extra-tile-list-item",template:e,ui:r.prototype.ui,initialize:function(e){i.prototype.initialize.apply(this,arguments),this.image=new a({
model:this.model,type:"clip",width:250})},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"extraType",formatter:function(e){if(e){var t=n.get(e);return t&&t.title}}}}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1186),n(482)],r=function(e,t,n){"use strict";var i=e.extend({mixins:[n],tagName:"ul",itemView:t,className:"list"});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1765),n(9)],r=function(e,t){
"use strict";var n=t.ItemView.extend({tagName:"li",template:e,className:"striped-list-item",initialize:function(e){this.item=e.item}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1189),n(1188)],r=function(e,t,n){"use strict";var i=e.extend({tagName:"ul",className:"list match-result-list",itemView:t,emptyView:n});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1766),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({
template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1767),n(9),n(13),n(1185)],r=function(e,t,n,i){"use strict";var r=t.Layout.extend({tagName:"li",className:"striped-list-item match-result-list-item row",template:e,ui:{matchExtendedInfo:".match-extended-info"},regions:{childrenRegion:".children-region"},events:{"click .match-result":"onClick"},initialize:function(e){this.item=e.item},onRender:function(){var e=this.model.get("children");if(e){var t=e.first();
t&&"track"===t.get("type")&&(this.ui.matchExtendedInfo.removeClass("hidden"),this.childrenRegion.show(new i({collection:e})))}},onClick:function(e){e.preventDefault(),n.execute("match",{item:this.item,guid:this.model.id,name:this.model.get("name"),children:this.model.get("children")})}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(147),n(33)],r=function(e,t){"use strict";var n=t.extend({mixins:[e]});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1770),n(9),n(449)],r=function(e,t,n){"use strict";var i=t.ItemView.extend({className:"hidden",template:e,bindings:{".media-progress-pct":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var i=this.model,r="track"===i.get("type")?0:n(e,i.get("duration"));r&&t.css("width",r+"%"),this.$el.toggleClass("hidden",!r)}}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1712),n(3),n(9),n(1193)],r=function(e,t,n,i){"use strict";var r=n.Layout.extend({
template:e,tagName:"li",className:"play-queue-list-item",attributes:function(){return{"data-play-queue-id":this.model.get("playQueueItemID")||this.model.get("ratingKey")}},events:{"click a":"onPlayClick","click .delete-btn":"onDeleteClick"},regions:{metadataRegion:".play-queue-metadata-region"},onRender:function(){this.metadataRegion.show(new i({model:this.model.get("metadataItem")}))},onPlayClick:function(e){e.preventDefault(),this.trigger("skip",this.model.get("key"))},onDeleteClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),this.trigger("remove",this.model)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1713),n(3),n(108),n(144),n(506)],r=function(e,t,n,i,r){"use strict";var a=r.extend({template:e,tagName:"div",posterWidth:{video:70},bindings:t.extend({".media-primary-subtitle":{modelAttribute:"grandparentTitle",modelListeners:["grandparentTitle","duration"],formatter:function(e){var t=e;this.model.parent&&(t=t||this.model.parent.get("parentTitle"),
this.model.parent.parent&&(t=this.model.parent.parent.get("title")));var n=this.model.get("duration");return"movie"===this.type&&n&&(t=i(n)),t||""}},".media-secondary-subtitle":{modelAttribute:"parentTitle",modelListeners:["parentTitle","index"],formatter:function(e){var t=e;return this.model.parent&&(t=t||this.model.parent.get("title")),"episode"===this.type&&(t=n({seasonIndex:this.model.get("parentIndex"),episodeIndex:this.model.get("index"),date:this.model.get("originallyAvailableAt")})),t&&(t=" - "+t),
t||""}}},r.prototype.bindings),serializeData:function(){var e=this.model.server.get("playQueueManager"),t=e.getFor(this.model);return{type:this.type,canDelete:!t.get("isRadio")}}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(3),n(202),n(33),n(1195)],r=function(e,t,n,i,r){"use strict";var a=i.extend({tagName:"ol",className:"list media-list playlist-items",itemView:r,sorted:!0,itemEvents:{remove:"onItemRemove"},initialize:function(e){this.canEdit=!this.model.get("smart");
},onRender:function(){this.sortable&&this.sortable.destroy(),this.canEdit&&(this.sortable=new n(this.el,{onUpdate:t.bind(this.onItemMove,this),handle:".sortable-handle",animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2}))},onItemRemove:function(e,t,n){this.model.removeItem(n)},onItemMove:function(t){var n=e(t.item).data("playlist-id"),i=e(t.item).prev().data("playlist-id");this.model.moveItem(n,i)},onClose:function(){this.sortable&&this.sortable.destroy()}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1772),n(3),n(8),n(108),n(143),n(144),n(106),n(13),n(506)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=l.extend({className:"striped-list-item media-list-item playlist-item",template:e,events:{"click .delete-btn":"onDeleteClick","click .playlist-inner-item":"onClick","click .media-details":"onDetailsClick","click .media-primary-subtitle":"onGrandparentClick","click .media-secondary-subtitle":"onParentClick"},posterWidth:{video:103,photo:59},attributes:function(){
return{"data-playlist-id":this.model.get("playlistItemID")}},bindings:t.extend({".media-primary-subtitle":{modelAttribute:"grandparentTitle",formatter:function(e){var t=e;return"movie"===this.type&&(t=""),t||""}},".media-secondary-subtitle":{modelAttribute:"parentTitle",modelListeners:["parentTitle","index","year"],formatter:function(e){var t=e;return"episode"===this.type?t=i({seasonPrefix:"Season {1}",episodePrefix:"Episode {1}",seasonIndex:this.model.get("parentIndex"),episodeIndex:this.model.get("index"),
date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" - "}):"movie"===this.type&&(t=this.model.get("year")),t||""}},".media-duration":{modelAttribute:"duration",formatter:function(e){return"photo"===this.type?r(this.model.get("originallyAvailableAt")):"track"===this.type?s(e):a(e)}}},l.prototype.bindings),initialize:function(e){l.prototype.initialize.apply(this,arguments),this.canEdit=e&&e.canEdit,"track"===this.type&&(this.playQueueManager=this.model.server.get("playQueueManager"),
this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),this.onPlayQueueChange(this.playQueueManager.getFor(this.model)))},serializeData:function(){return{canEdit:this.canEdit,hasDetails:"track"!==this.type&&"photo"!==this.type,type:this.type}},navigateTo:function(e,t){e&&(t.preventDefault(),t.stopPropagation(),n.trigger("navigate","details",{serverID:this.model.server.id,key:e}))},onRender:function(){
if(l.prototype.onRender.apply(this,arguments),"track"===this.type){var e=this.playQueueManager.getFor(this.model);if(!e)return;var t=e.get("selectedItem");t&&this.model.get("key")===t.get("key")&&this.$el.addClass("current-track")}},onClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),o.execute("playMedia",{item:this.model,siblings:!0})},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.trigger("remove",this.model.get("playlistItemID"))},onDetailsClick:function(e){
var t=this.model.get("type");"track"!==t&&"photo"!==t&&this.navigateTo(this.model.get("key"),e)},onParentClick:function(e){this.navigateTo(this.model.get("parentKey"),e)},onGrandparentClick:function(e){this.navigateTo(this.model.get("grandparentKey"),e)},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$el.toggleClass("current-track",n)},onPlayQueueChange:function(e){e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},onRemovePlayQueue:function(e){
this.stopListening(e),this.$el.removeClass("current-track")}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(147),n(33),n(1197)],r=function(e,t,n){"use strict";var i=t.extend({mixins:[e],tagName:"ul",className:"tile-list media-tile-list season-tile-list",itemView:n});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1773),n(3),n(6),n(96),n(190),n(47)],r=function(e,t,n,i,r,a){"use strict";var s=i.extend({className:"poster-item media-tile-list-item",
template:e,ui:r.prototype.ui,initialize:function(e){i.prototype.initialize.apply(this,arguments),this.image=new a({model:this.model,type:"season",width:150})},bindings:t.extend({},i.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"leafCount",formatter:function(e){return null==e?"":1===e?n("{1} episode",e):n("{1} episodes",e)}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){var t=this.model.server.get("shared"),n=this.model.server.get("multiuser");
return!(t&&!n)&&("album"!==this.type&&!!e)}}}),onMoreClick:function(e){r.prototype.onMoreClick.apply(this,arguments)}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1199)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list select-list select-playlist-list minimal-scroll",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1774),n(9),n(233)],r=function(e,t,n){"use strict";var i=t.ItemView.extend({
tagName:"li",className:"striped-list-item select-list-item",template:e,ui:{poster:".playlist-poster"},initialize:function(){this.image=new n({model:this.model,width:40})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(482),n(313),n(1201)],r=function(e,t,n,i){"use strict";var r=n.extend({mixins:[t],initialize:function(){n.prototype.initialize.apply(this,arguments),
this.listenTo(this.collection,"change:parentIndex",e.debounce(this.onParentIndexChange))},tagName:"ul",className:"list media-list track-list show-context",itemView:i,onParentIndexChange:function(e,t){null!=e.previous("parentIndex")&&this.listModel.fetch()}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1775),n(3),n(5),n(9),n(8),n(106),n(13),n(481),n(55),n(95),n(187),n(116)],r=function(e,t,n,i,r,a,s,o,l,u,c,d){"use strict";var h=i.ItemView.extend({mixins:[o],tagName:"li",
template:e,className:"striped-list-item",ui:{actions:".track-actions",container:".track-list-inner-item",dropdown:".track-actions-dropdown"},events:{"mousenter .track-list-inner-item":"onMouseEnter","mouseleave .track-list-inner-item":"onMouseLeave","mousedown .track-list-inner-item":"onMouseDown","click .track-list-inner-item":"onClick","click .track-music-video-btn":"onMusicVideoClick","click .track-edit-btn":"onEditClick","click .track-more-btn":"onMoreClick","hide.bs.dropdown .track-actions-dropdown":"onDropdownHide"
},onlyAfterRender:["select","deselect"],initialize:function(e){t.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new u({},{item:this.model}),this.playQueueManager=this.model.server.get("playQueueManager"),this.listenTo(this.playQueueManager,"change:playQueue:audio",this.onPlayQueueChange),this.listenTo(this.playQueueManager,"remove:playQueue:audio",this.onRemovePlayQueue),this.onPlayQueueChange(this.playQueueManager.getFor(this.model)),
r.trigger("content.subscribe:resize",this.onResize)},serializeData:function(){return this.shared=this.model.server.get("shared"),this.synced=!this.model.server.get("isFullServer"),{showEdit:!this.shared&&!this.synced,selected:this.selected}},bindings:{".track-index span":{modelAttribute:"index",formatter:function(e){return e<1?"":e}},".track-parent-index":{modelAttribute:"parentIndex"},".track-title":{modelAttribute:"title"},".track-subtitle-1":{modelAttribute:"originalTitle",autohide:function(e){
var t=e&&this.artistTitle&&e.toLowerCase()!==this.artistTitle.toLowerCase();return this.$el.toggleClass("show-subtitle",!!t),t}},".track-context":{modelAttribute:"duration",autohide:!0,formatter:function(e){return!!e&&a(e)}},".track-music-video-btn":{model:"mediaActions",modelAttribute:"showPlayMusicVideo",manual:!0,autohide:!0}},onRender:function(){var e=this.playQueueManager.getFor(this.model);if(e){var t=e.get("selectedItem");t&&this.model.get("key")===t.get("key")&&this.$(".track-list-item").addClass("current-track");
}},onClose:function(){this.dropdown&&this.dropdown.close(),r.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onClick:function(e){this.stopTrackingSelecting(e,function(){e.preventDefault(),s.execute("playMedia",{item:this.model,siblings:!0})})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var n=this.model.server.getSectionForItem(this.model);if(!t.isEmpty(n)){var i=new l({key:this.model.get("primaryExtraKey"),type:"clip",
librarySectionUUID:n.get("uuid")},{server:this.model.server,section:this.model.section});s.execute("playMedia",{item:i})}},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),r.trigger("show:modal",new d({mediaActions:this.mediaActions}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new c({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=n(e.currentTarget),i=this.ui.actions.position().top,r=this.dropdown.getPosition(t,this.containerSize,i);
this.ui.dropdown.css(r)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover"))},onPlayQueueSelectedItemChange:function(e,t){var n=!(!t||this.model.get("key")!==t.get("key"));this.$(".track-list-item").toggleClass("current-track",n)},onPlayQueueChange:function(e){e&&this.listenTo(e,"change:selectedItem",this.onPlayQueueSelectedItemChange)},onRemovePlayQueue:function(e){this.stopListening(e),this.$(".track-list-item").removeClass("current-track");
},select:function(){this.ui.container.addClass("selected")},deselect:function(){this.ui.container.removeClass("selected")}});return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(5),n(3),n(202),n(33),n(1204),n(1203)],r=function(e,t,n,i,r,a){"use strict";var s=i.extend({tagName:"ol",className:"list media-list playlist-items",itemView:r,emptyView:a,sorted:!0,onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new n(this.el,{onUpdate:t.bind(this.onItemMove,this),
handle:".sortable-handle",animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2})},onClose:function(){this.sortable&&this.sortable.destroy()},onItemMove:function(t){var n=e(t.item).data("generator-id"),i=e(t.item).prev().data("generator-id");this.collection.parent.moveItem(n,i)}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1776),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1777),n(3),n(9),n(6),n(8),n(174),n(1076),n(13),n(233),n(135),n(1261)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=n.ItemView.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:e,ui:{poster:".media-poster",status:".generator-status"},events:{"click .playlist-inner-item":"onClick","click .retry-btn":"onRetryClick","click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},attributes:function(){return{"data-generator-id":this.model.id
}},initialize:function(e){this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting;var t=60;this.compositeImage=new l({model:this.model,width:a.getPosterWidth("movie",t),height:t,rows:1,columns:1}),this.listenTo(this.transcodeJobs,"reset add remove",this.onTranscodeJobsChange)},resetState:function(){var e=["converting",s.PENDING,s.COMPLETE,s.FAILED];this.ui.status.removeClass(e.join(" "))},getState:function(e){return this.transcodeJobs.findWhere({generatorID:this.model.id})?"converting":e.itemsFailedCount>0?s.FAILED:e.state;
},bindings:{".generator-title":{modelAttribute:"title"},".generator-target":{modelAttribute:"target"},".generator-status":{modelAttribute:"Status",manual:!0,formatter:function(e,t){this.resetState(),t.addClass(this.getState(e))}},".generator-status-failed-message":{modelAttribute:"Status",formatter:function(e){if(e.itemsFailedCount){var t=e.itemsFailedCount;return 1===t?i("1 failed item"):i("{1} failed items",t)}return i("Failed")}},".retry-btn":{modelAttribute:"Status",manual:!0,autohide:function(e){
return this.getState(e)===s.FAILED}}},onRender:function(){this.compositeImage.setElement(this.ui.poster)},onClose:function(){this.compositeImage.close()},onTranscodeJobsChange:function(){var e=this.getState(this.model.get("Status"));this.resetState(),this.ui.status.addClass(e)},onClick:function(e){e.preventDefault(),r.trigger("show:modal",new c({model:this.model,listModel:this.model.get("children"),transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onRetryClick:function(e){e.preventDefault(),
e.stopImmediatePropagation(),o.execute("reprocessVersionGenerator",{generator:this.model})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),r.trigger("show:modal",new u({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),o.execute("deleteVersionGenerator",{generator:this.model})}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1206)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",
className:"list version-generator-metadata-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1778),n(9),n(6),n(108),n(1075),n(13),n(47),n(505)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=t.Layout.extend({tagName:"li",className:"striped-list-item version-generator-metadata-list-item",template:e,ui:{poster:".media-poster"},regions:{statusRegion:".conversion-status-region"},events:{"click .enable-btn":"onEnableClick","click .retry-btn":"onRetryClick"
},modelEvents:{"change:processingState":"onProcessingStateChange"},initialize:function(e){this.generator=e.generator,this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.type=this.model.get("type"),this.image=new s({model:this.model,type:"movie",height:60,modelAttribute:"episode"===this.type?"grandparentThumb":"thumb"})},bindings:{".generator-metadata-title":{modelAttribute:"title",formatter:function(e){return this.model.get("grandparentTitle")||this.model.get("parentTitle")||e;
}},".generator-metadata-episode-index":{modelAttribute:"index",autohide:!0,formatter:function(e){if("episode"===this.type)return i({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "})}},".generator-metadata-year":{modelAttribute:"year",autohide:!0,formatter:function(e){if("movie"===this.type)return e}},".conversion-status-failed-message":{modelAttribute:"processingStateContext",formatter:function(e){return this.getErrorMessage(e);
}}},getErrorMessage:function(e){var t=r.contexts;switch(e){case t.FILE_UNAVAILABLE:return n("File unavailable");case t.METADATA_ERROR:return n("Invalid metadata");case t.PROFILE_ERROR:return n("Invalid profile");case t.ANALYSIS_ERROR:return n("Unable to analyze")}return n("Unable to convert")},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new o({model:this.model,generator:this.generator,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting,initialState:this.model.get("processingState"),
initialErrorMessage:this.getErrorMessage(this.model.get("processingStateContext"))}))},onClose:function(){this.image.close()},onProcessingStateChange:function(e,t){this.statusRegion.currentView&&this.statusRegion.currentView.enterState(t)},onEnableClick:function(e){e.preventDefault(),a.execute("enableVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})},onRetryClick:function(e){e.preventDefault(),a.execute("reprocessVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id
})}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1208)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list alpha-bar-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1779),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({tagName:"li",className:"alpha-bar-list-item",template:e,events:{"click a":"onClick"},onClick:function(e){e.preventDefault(),this.model.section.set("currentFirstCharacter",this.model);
}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1780),n(5),n(9)],r=function(e,t,n){"use strict";var i=n.ItemView.extend({className:"label-list section-current-filters-list",template:e,modelEvents:{"change:currentFilters":"render"},events:{"click .remove-filter-btn":"onRemoveFilterClick"},initialize:function(e){e.disabled&&this.$el.addClass("disabled")},serializeData:function(){return{currentFilters:this.model.get("currentFilters")}},onRemoveFilterClick:function(e){
e.preventDefault();var n=t(e.currentTarget).data("key");this.trigger("removeAllFilters",n)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1211)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list side-bar-list",itemView:t,initialize:function(e){var t=this.collection.section;e.disabled?this.$el.addClass("disabled"):this.listenTo(t,"change:currentType",this.onCurrentTypeChange)},onCurrentTypeChange:function(e,t){this.collection.fetch({
reset:!0,scope:"page"})}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1781),n(3),n(9)],r=function(e,t,n){"use strict";var i=n.ItemView.extend({tagName:"li",template:e,ui:{btn:"a",selectedIcon:".selected-icon"},events:{"click .boolean-btn":"onBooleanFilterClick","click .filter-btn":"onFilterClick"},onlyAfterRender:["onCurrentFiltersChange"],initialize:function(){this.listenTo(this.model.section,"change:currentFilters",this.onCurrentFiltersChange)},serializeData:function(){
return{filter:this.model.toJSON(),selected:this.isCurrentFilter()}},isCurrentFilter:function(){var e=this.model.section.get("currentFilters");return!!t.findWhere(e,{key:this.model.id})},onBooleanFilterClick:function(e){e.preventDefault();var t={key:this.model.id,title:this.model.get("title"),value:1};this.ui.btn.hasClass("selected")?this.trigger("removeFilter",t):this.trigger("addFilter",t)},onFilterClick:function(e){e.preventDefault(),this.trigger("showOptions",this.model)},onCurrentFiltersChange:function(e,t){
var n=this.isCurrentFilter();this.ui.btn.toggleClass("selected",n),this.ui.selectedIcon.toggleClass("hidden",!n)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1782),n(5),n(9),n(1213)],r=function(e,t,n,i){"use strict";var r=n.CompositeView.extend({classname:"filter-option-list-search-container",template:e,itemView:i,itemViewContainer:".side-bar-list",query:"",ui:{searchForm:"#filter-options-search-form",searchInput:"#filter-options-search",loading:"#filter-options-loading"
},events:{"keyup #filter-options-search":"onSearchKeyUp","submit #filter-options-search-form":"onSearchSubmit","click .filter-options-deselect-btn":"onDeselectClick"},initialize:function(){this.originalCollection=this.collection,this.listenToOnce(this.originalCollection,"reset",this.onCollectionReset),this.collection.fetch({reset:!0,scope:"page"})},serializeData:function(){return{showSearch:this.collection.length>20,query:this.query,showLoading:!this.collection.length}},search:function(){this.query=t.trim(this.ui.searchInput.val()),
this.query?this.rebase(this.originalCollection.search(this.query)):this.rebase(this.originalCollection)},selectExactMatch:function(){this.collection.each(function(e){var t=e.get("title");if(t&&t.toLowerCase()===this.query.toLowerCase()){var n={key:e.parent.id,title:t,value:e.id};this.trigger("addFilter",this,n)}},this)},onCollectionReset:function(e){var t=e.length>20;this.ui.searchForm.toggleClass("hidden",!t),this.ui.loading.addClass("hidden")},onSearchKeyUp:function(e){this.search()},onSearchSubmit:function(e){
e.preventDefault(),this.search(),this.query&&this.selectExactMatch()},onDeselectClick:function(e){e.preventDefault(),this.trigger("removeAllFilters",this.collection.parent.id)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1783),n(3),n(9)],r=function(e,t,n){"use strict";var i=n.ItemView.extend({tagName:"li",template:e,ui:{btn:"a",selectedIcon:".selected-icon"},events:{"click a":"onClick"},onlyAfterRender:["onCurrentFiltersChange"],initialize:function(){this.listenTo(this.model.section,"change:currentFilters",this.onCurrentFiltersChange);
},serializeData:function(){return{filterOption:this.model.toJSON(),selected:this.isCurrentFilter()}},isCurrentFilter:function(){var e=this.model.section.get("currentFilters"),n=t.findWhere(e,{key:this.model.parent.id});if(!n)return!1;var i=n.values,r=t.find(i,t.bind(function(e){return e===this.model.get("key")},this));return!!r},onClick:function(e){e.preventDefault();var t={key:this.model.parent.id,title:this.model.get("title"),value:this.model.id};this.ui.btn.hasClass("selected")?this.trigger("removeFilter",t):this.trigger("addFilter",t);
},onCurrentFiltersChange:function(e,t){var n=this.isCurrentFilter();this.ui.btn.toggleClass("selected",n),this.ui.selectedIcon.toggleClass("hidden",!n)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1784),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({tagName:"li",template:e,events:{"click a":"onClick"},initialize:function(){var e=this.model.section.get("currentSort");if(!e){var t=this.model.get("isDefault");t&&(this.model.set("selected",!0),this.model.section.set("currentSort",this.model,{
silent:!0}),this.model.section.trigger("default:currentSort"))}this.listenTo(this.model.section,"change:currentSort",this.onCurrentSortChange)},bindings:{".sort-btn":{modelAttribute:"selected",manual:!0,formatter:function(e,t){t.toggleClass("selected",e)}},".desc-icon":{modelAttribute:"direction",manual:!0,formatter:function(e,t){t.toggleClass("hidden","desc"!==e)}},".asc-icon":{modelAttribute:"direction",manual:!0,formatter:function(e,t){t.toggleClass("hidden","asc"!==e)}}},onCurrentSortChange:function(e,t){
t&&this.model.id!==t.id&&this.model.set({selected:!1})},onClick:function(e){e.preventDefault();var t=this.model.section.get("currentSort");t&&t.id===this.model.id?t.reverseSortDirection():this.model.set({selected:!0}),this.model.section.set("currentSort",this.model,{silent:!0}),this.model.section.trigger("change:currentSort",this.model.section,this.model)}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(9),n(5),n(1216)],r=function(e,t,n){"use strict";var i=e.CollectionView.extend({
tagName:"ul",className:"list browse-directory-list",itemView:n,selectedFilePath:null,events:{"click a":"onDirectoryClick"},collectionEvents:{reset:"onReset"},startLoadingItem:function(e){this.selectedFilePath&&this.unselectItem(this.selectedFilePath),this.selectedFilePath=e;var t=this.children.findByModel(e);t&&t.select(!0)},stopLoadingItem:function(e){var t=this.children.findByModel(e);t&&t.select(!1)},unselectItem:function(e){this.selectedFilePath=null;var t=this.children.findByModel(e);t&&t.unselect();
},onReset:function(){this.parentFilePath&&this.collection.add(this.parentFilePath,{at:0})},onDirectoryClick:function(e){e.preventDefault();var n=t(e.currentTarget),i=n.data("key"),r=this.collection.get(i)||this.parentFilePath;this.trigger("change:path",r),this.options.isRoot||(r.parent?(this.parentFilePath=r.parent.clone(),this.parentFilePath.set({title:".. [Back]",isBackShortcut:!0})):this.parentFilePath=null)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1785),n(9)],
r=function(e,t){"use strict";var n=t.ItemView.extend({tagName:"li",className:"striped-list-item browse-directory-list-item",template:e,ui:{link:"a",spinner:".loading"},serializeData:function(){return{filePath:this.model.toJSON(),isRoot:!this.model.parent}},select:function(e){this.ui.link.addClass("selected"),this.ui.spinner.toggleClass("hidden",!e)},unselect:function(){this.ui.link.removeClass("selected"),this.ui.spinner.addClass("hidden")}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(33),n(1218)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"agents-nav nav nav-pills nav-pills-sm",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1786),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({tagName:"li",template:e,bindings:{a:{modelAttribute:"selected",manual:!0,formatter:function(e){this.$el.toggleClass("active",!!e)}}}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;
i=[n(202),n(33),n(1220)],r=function(e,t,n){"use strict";var i=t.extend({tagName:"ul",className:"list contributor-list",itemView:n,events:{"change input[type=checkbox]":"save",update:"save"},save:function(){var e=[];this.$(":checked").each(function(t){e.push(this.name)}),this.trigger("save",e.join(","))},onRender:function(){this.sortable=new e(this.$el[0],{draggable:".card-sortable",animation:200})},onClose:function(){this.sortable.destroy()}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1787),n(3),n(9),n(8),n(125),n(234),n(1240)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.ItemView.extend({tagName:"li",className:"card card-sortable",template:e,events:{"change input[type=checkbox]":"onEnabledChange","click .settings-btn":"onSettingsClick","click .info-btn":"onInfoClick"},initialize:function(){this.attribution=this.model.get("attribution"),this.attribution.fetch()},bindings:{".info-btn":{model:"attribution",modelAttribute:"content",manual:!0,autohide:!0},".settings-btn":{
modelAttribute:"hasPrefs",manual:!0,autohide:!0}},onEnabledChange:function(e){this.model.set("enabled",e.target.checked)},onSettingsClick:function(e){e.preventDefault();var n=new r([],{server:this.model.server,url:"/:/plugins/"+this.model.id+"/prefs"});n.fetch().done(t.bind(function(){i.trigger("show:modal",new a({model:this.model,collection:n}))},this))},onInfoClick:function(e){e.preventDefault(),i.trigger("show:modal",new s({model:this.model}))}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(33),n(1223),n(1222)],r=function(e,t,n){"use strict";var i=e.extend({tagName:"ul",className:"list card-tile-list",itemView:t,emptyView:n});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1788),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1789),n(9),n(438),n(175),n(130),n(456),n(13)],r=function(e,t,n,i,r,a,s){"use strict";var o=t.ItemView.extend({
tagName:"li",className:"card-tile-list-item card-2-col-item",template:e,ui:{icon:".device-icon",syncInfo:".sync-info"},events:{"click .remove-device-btn":"onRemoveClick"},isMediaServer:function(){if(null==this.isServer){var e=this.model.get("product").toLowerCase();this.isServer="plex media server"===e}return this.isServer},bindings:{".device-icon":{modelAttribute:"platform",manual:!0,formatter:function(e,t){var i=n.getIcon(e);t.addClass("device-icon-"+i)}},".name":{modelAttribute:"name",autohide:!1
},".version":{modelAttribute:"productVersion",autohide:!1},".product":{modelAttribute:"product",autohide:!1},".platform":{modelAttribute:"platform",autohide:function(e){return e&&this.isMediaServer()}},".platform-version":{modelAttribute:"platformVersion",autohide:function(e){return e&&this.isMediaServer()}},".device":{modelAttribute:"device",autohide:!1},".last-seen":{modelAttribute:"lastSeenAt",autohide:!0,formatter:function(e,t){return r(e)}},".sync-count":{modelAttribute:"SyncList",autohide:!1,
formatter:function(e){if(e){var t,n=e.itemsCompleteCount;return n&&n>0&&(t=[n,i("item",n)].join(" "),this.ui.syncInfo.removeClass("hidden")),t}}},".sync-size":{modelAttribute:"SyncList",autohide:!1,formatter:function(e){if(e){var t,n=e.totalSize;return n&&n>0&&(t=["(",a(n),")"].join("")),t}}}},onRemoveClick:function(e){e.preventDefault(),this.isMediaServer()?s.execute("removeServer",{device:this.model}):s.execute("removeDevice",{device:this.model})}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(33),n(1226),n(1225)],r=function(e,t,n){"use strict";var i=e.extend({tagName:"ul",className:"list card-tile-list",itemView:t,emptyView:n,sorted:!0});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1790),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1791),n(9),n(8),n(13),n(94),n(512),n(150)],r=function(e,t,n,i,r,a,s){"use strict";var o=t.Layout.extend({
tagName:"li",className:"card-tile-list-item card-2-col-item",template:e,ui:{poster:".card-poster"},regions:{details:".card-details"},events:{"click .edit-btn":"onEditClick","click .delete-btn":"onDeleteClick"},initialize:function(e){this.serverShares=this.model.get("serverShares"),this.image=new r({model:this.model,type:"friend",width:80})},bindings:{".username":{modelAttribute:"title"}},onRender:function(){this.image.setElement(this.ui.poster),this.details.show(new a({model:this.model}))},onClose:function(){
this.image.close()},onEditClick:function(e){e.preventDefault(),n.trigger("show:modal",new s({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),i.execute("removeFriend",{friend:this.model})}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(513),n(1228)],r=function(e,t,n){"use strict";var i=e.extend({tagName:"ul",className:"list card-tile-list",itemView:t,emptyView:n,sorted:!0,isEmpty:function(e){return!this.collection||this.collection.length<2;
},addChildView:function(t,n,i){this.isEmpty(this.collection)?this.showEmptyView():this._showingEmptyView?this.render():this.children.findByModel(t)||e.prototype.addChildView.apply(this,arguments)},showEmptyView:function(){this._showingEmptyView||this.children.each(function(e){this.removeChildView(e)},this),e.prototype.showEmptyView.apply(this,arguments)}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1793),n(3),n(9),n(10),n(513)],r=function(e,t,n,i,r){"use strict";
var a=n.Layout.extend({template:e,regions:{card:".centered-home-user-container"},initialize:function(e){this.itemViewOptions=e},serializeData:function(){var e=i.resolve("appModel"),t=e.get("user");return{hasHomeFeature:!!t.get("subscription").get("features").get("home"),plexPassUrl:t.server.get("plexPassUrl")}},onRender:function(){var e=i.resolve("appModel"),n=e.get("user"),a=n.get("homeUsers");a.length&&this.card.show(new r(t.extend({},this.itemViewOptions,{model:a.first()})))}});return a}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1795),n(3),n(9),n(6),n(175),n(130),n(13),n(94)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=n.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:e,ui:{poster:".card-poster"},events:{"click .accept-btn":"onAcceptClick","click .delete-btn":"onDeleteClick"},initialize:function(e){this.subset=this.model.collection.subset,this.image=new o({model:this.model,type:"friend",width:80})},serializeData:function(){
return{showAccept:"requests"===this.subset}},bindings:{".username":{modelAttribute:"friendlyName"},".user-summary":{modelAttribute:"Server",autohide:!0,formatter:function(e){if("requested"===this.subset){var n=this.model.get("createdAt");return n?i("invite sent {1}",a(n)):i("invite sent to {1}",this.model.get("email"))}var s=this.model.get("friend"),o=this.model.get("server"),l=this.model.get("home");if(o){var u=t.reduce(e,function(e,t){return e+=t.numLibraries},0),c=r(i("library"),u,i("libraries"));
return l?i("wants you to join their home and share {1} {2} with you",u,c):s?i("wants to be friends and share {1} {2} with you",u,c):i("wants to share {1} {2} with you",u,c)}return i(l?"wants you to join their home":"wants to be friends")}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onAcceptClick:function(e){e.preventDefault(),s.execute("acceptInvite",{invite:this.model})},onDeleteClick:function(e){e.preventDefault(),s.execute("rejectInvite",{
invite:this.model,subset:this.subset})}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1231)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list card-tile-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1796),n(9),n(8),n(13),n(117)],r=function(e,t,n,i,r){"use strict";var a={artist:"music",movie:"film",photo:"picture",show:"display"},s=t.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",
template:e,events:{"click .edit-section-btn":"onEditClick","click .delete-section-btn":"onDeleteClick"},serializeData:function(){var e=this.model.server,t=this.model.toJSON();return{section:t,serverID:e.id,icon:a[t.type]}},bindings:{".section-title":{modelAttribute:"title"}},onEditClick:function(e){e.preventDefault();var t=this.model,i=new r({model:t,server:t.server,isDefaultSection:t.isNew()});t.isNew()&&i.promise.always(function(){t.trigger("destroy",t,t.collection)}),n.trigger("show:modal",i)},
onDeleteClick:function(e){e.preventDefault(),i.execute("deleteSection",{section:this.model})}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1233)],r=function(e,t){"use strict";var n=e.extend({className:"list announcement-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1797),n(9),n(78)],r=function(e,t,n){"use strict";var i=t.ItemView.extend({className:"announcement-list-item",template:e,ui:{thumb:".thumb",
unread:".unread"},initialize:function(){this.image=new n({url:this.model.get("imageUrl")})},onRender:function(){this.image.setElement(this.ui.thumb),this.model.markAsRead()},onClose:function(){this.image.close()}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1235)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"list select-list select-friends-list dark-scrollbar",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1798),n(9),n(94)],r=function(e,t,n){"use strict";var i=t.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",template:e,ui:{poster:".user-poster"},initialize:function(e){this.image=new n({model:this.model,type:"friend",width:80})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1237)],r=function(e,t){"use strict";var n=e.extend({
tagName:"ul",className:"list card-tile-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1799),n(3),n(13),n(312)],r=function(e,t,n,i){"use strict";var r=i.extend({template:e,className:"card-tile-list-item card-2-col-item",events:{"click .play-btn":"onPlayClick","click .mark-watched-btn":"onMarkWatchedClick","click .mark-unwatched-btn":"onMarkUnwatchedClick","click .delete-btn":"onDeleteClick"},serializeData:function(){var e=i.prototype.serializeData.apply(this,arguments);
return e},bindings:t.extend({},i.prototype.bindings,{".media-summary":{autohide:!0,formatter:function(){return this.model.get("message")||this.model.get("summary")}},".mark-unwatched-btn":{modelAttribute:"viewCount",manual:!0,autohide:function(e){return e>0}},".mark-watched-btn":{modelAttribute:"viewCount",manual:!0,autohide:function(e){return 0===e}}}),onPlayClick:function(e){e.preventDefault(),n.execute("playMedia",{item:this.model,siblings:this.canPlaySiblings()})},onMarkWatchedClick:function(e){
e.preventDefault(),n.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),n.execute("markUnwatched",{item:this.model})},onDeleteClick:function(e){e.preventDefault(),this.model.destroy()}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1800),n(3),n(6),n(8),n(111),n(484),n(44),n(1215)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=s.extend({name:"addFolderModal",className:"add-folder-modal modal fade",template:e,events:t.extend({
"submit form":"onSubmitForm"},s.prototype.events),ui:{path:'input[name="path"]'},regions:{rootList:".home-directory-container",childrenList:".path-container"},initialize:function(e){s.prototype.initialize.apply(this,arguments),this.rootPathCollection=new a([],{server:e.server}),this.childrenPathCollection=new a([],{server:e.server}),this.loadRootPaths()},loadRootPaths:function(){this.rootPathCollection.fetch().done(this.whenRendered(function(){var e=this.rootPathCollection.where({home:!0}),n=t.first(e)||this.rootPathCollection.first();
this.rootList.currentView.startLoadingItem(n),this.loadChildrenPaths(n)}))},loadChildrenPaths:function(e){r.abortAll("addFolderModal");var t=e.get("children"),a=t.fetch({scope:"addFolderModal"});a.done(this.whenRendered(function(){this.ui.path.val(e.get("path")),this.childrenPathCollection.reset(t.models)})),a.fail(this.whenRendered(function(){this.childrenList.currentView.unselectItem(e),i.trigger("show:alert",{type:"error",message:n("Unable to load contents of '{1}'",e.get("path"))})})),a.always(this.whenRendered(function(){
this.rootList.currentView.stopLoadingItem(e)}))},onRender:function(){s.prototype.onRender.apply(this,arguments);var e=new o({isRoot:!0,collection:this.rootPathCollection}),t=new o({collection:this.childrenPathCollection});this.listenTo(e,"change:path",this.onRootPathChange),this.listenTo(t,"change:path",this.onChildrenPathChange),this.rootList.show(e),this.childrenList.show(t)},onRootPathChange:function(e){this.childrenList.currentView.parentFilePath=null,this.rootList.currentView.startLoadingItem(e),
this.loadChildrenPaths(e)},onChildrenPathChange:function(e){this.childrenList.currentView.startLoadingItem(e),this.loadChildrenPaths(e)},onSubmitForm:function(e){e.preventDefault(),this.trigger("add:folder",this.ui.path.val()),this.hide()}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1801),n(3),n(5),n(6),n(8),n(209),n(44),n(97)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=o.extend({name:"addToCollectionModal",className:"add-to-collection-modal select-modal modal modal-sm fade",
template:e,ui:{addBtn:".add-btn",message:".message"},events:t.extend({"click .collection":"onCollectionClick","keyup .message":"onMessageKeyUp","click .add-btn":"onAddClick"},s.prototype.events),onlyAfterRender:["onReset"],initialize:function(e){o.prototype.initialize.apply(this,arguments),this.loading=!0,this.models=e.items,this.model=t.first(this.models),this.collectionIDs=[],this.filter=new a({filter:"collection",filterType:"string",type:"filter",title:"Collection"},{server:this.model.server,section:this.model.section,
standalone:!0}),this.collections=this.filter.get("options"),this.collections.fetch().always(t.bind(this.onReset,this))},serializeData:function(){return{loading:this.loading,collections:this.filter.get("options").toJSON()}},toggleAddButton:function(){var e=this.ui.message.val().trim();this.ui.addBtn.toggleClass("disabled",!this.collectionIDs.length&&!e)},onReset:function(){this.loading=!1,this.render()},onCollectionClick:function(e){e.preventDefault();var i=n(e.currentTarget),r=i.data("value");i.hasClass("selected")?this.collectionIDs.splice(t.indexOf(this.collectionIDs,r),1):this.collectionIDs.push(r),
i.toggleClass("selected"),this.toggleAddButton()},onMessageKeyUp:function(){this.toggleAddButton()},onAddClick:function(e){e.preventDefault();var a=this.ui.addBtn;if(!a.isDisabled()){a.addClass("active");var s=this.ui.message.val().trim(),o=[];s&&o.push(this.model.batchAdd(this.models,"collection",s)),t.each(this.collectionIDs,function(e){var t=this.collections.get(e);o.push(this.model.batchAdd(this.models,"collection",t.get("title")))},this);var l=n.when.apply(n,o);l.done(t.bind(this.hide,this)),
l.fail(function(){a.removeClass("active"),r.trigger("show:alert",{type:"error",message:i("There was a problem adding to this collection.")})})}}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1803),n(44),n(78)],r=function(e,t,n){"use strict";var i=t.extend({name:"agentInfoModal",className:"agent-info-modal modal fade",template:e,regions:{icon:".agent-icon-container"},serializeData:function(){return{agent:this.model.toJSON(),attribution:this.model.get("attribution").get("content")
}},onRender:function(){t.prototype.onRender.apply(this,arguments),this.icon.show(new n({model:this.model,url:"/system/agents/attribution/image?identifier="+this.model.id,className:"agent-icon",width:100,height:100}))}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1804),n(3),n(8),n(13),n(44),n(47)],r=function(e,t,n,i,r,a){"use strict";var s=r.extend({name:"channelModal",className:"channel-modal modal fade",template:e,ui:{poster:".media-poster",installBtn:".install-btn",
updateBtn:".update-btn",uninstallBtn:".uninstall-btn"},events:t.extend({"click .browse-btn":"onBrowseClick","click .install-btn":"onInstallClick","click .update-btn":"onUpdateClick","click .restart-btn":"onRestartClick","click .reset-btn":"onResetClick","click .uninstall-btn":"onUninstallClick"},r.prototype.events),initialize:function(e){r.prototype.initialize.apply(this,arguments),this.closeOnInstall=e.closeOnInstall,this.image=new a({model:this.model,type:"channel",width:200})},serializeData:function(){
return{channel:this.model.toJSON(),serverID:this.model.server.id,agent:/com.plexapp.agents./.test(this.model.id)}},bindings:{".installed-actions-container":{modelAttribute:"installed",manual:!0,autohide:!0},".uninstalled-actions-container":{modelAttribute:"installed",manual:!0,autohide:function(e){return!e}}},onRender:function(){r.prototype.onRender.apply(this,arguments),this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onBrowseClick:function(e){e.preventDefault();var i=this.model.get("key"),r=t.last(i.split("/"));
n.trigger("navigate","channel",{serverID:this.model.server.id,channelID:r}),this.hide()},onInstallClick:function(e){e.preventDefault();var n=this.ui.installBtn;if(!n.hasClass("active")){n.addClass("active");var r=i.execute("installChannel",{channel:this.model});r.done(t.bind(function(){this.closeOnInstall&&this.hide()},this)),r.always(function(){n.removeClass("active")})}},onUpdateClick:function(e){e.preventDefault();var t=this.ui.updateBtn;if(!t.hasClass("active")){t.addClass("active");var n=i.execute("updateChannel",{
channel:this.model,skipConfirmation:!0});n.always(function(){t.removeClass("active")})}},onRestartClick:function(e){e.preventDefault(),i.execute("restartChannel",{channel:this.model})},onResetClick:function(e){e.preventDefault(),i.execute("resetChannel",{channel:this.model})},onUninstallClick:function(e){e.preventDefault();var t=this.ui.uninstallBtn;if(!t.hasClass("active")){t.addClass("active");var n=i.execute("uninstallChannel",{channel:this.model,skipConfirmation:!0});n.always(function(){t.removeClass("active");
})}}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1810),n(3),n(36)],r=function(e,t,n){"use strict";var i=n.extend({template:e,initialize:function(e){n.prototype.initialize.apply(this,arguments),this.server=e.server},serializeData:function(){return this.server.toJSON()}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1811),n(3),n(5),n(6),n(8),n(44)],r=function(e,t,n,i,r,a){"use strict";var s=a.extend({name:"importPlaylistsModal",
className:"import-playlists-modal modal fade",template:e,ui:{importBtn:".import-btn",sections:"#section-list",importAll:"#import-all"},events:t.extend({"click .import-btn":"onImportClick"},a.prototype.events),initialize:function(e){a.prototype.initialize.apply(this,arguments),this.server=e.server,this.musicSections=e.server.get("sections").where({type:"artist"})},serializeData:function(){var e=t.map(this.musicSections,function(e){return e.pick("key","title")});return{showSections:e.length>1,sections:e
}},onImportClick:function(e){e.preventDefault();var a=this.ui.importBtn;a.addClass("active");var s=this.ui.sections.val(),o="/playlists/import/itunes?sectionID="+s;this.ui.importAll[0].checked&&(o+="&force=1");var l=t.extend(this.server.getXHROptions(o),{type:"PUT"}),u=n.ajax(l);u.done(t.bind(function(){r.trigger("show:alert",{type:"success",message:i("Playlists have been imported.")}),this.server.get("playlists").get("items").fetch(),this.hide()},this)),u.fail(function(){r.trigger("show:alert",{
type:"error",message:i("There was a problem importing.")})})}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1818),n(44)],r=function(e,t){"use strict";function n(e){return e?e.split("\n"):[]}var i=t.extend({name:"releaseNotesModal",template:e,serializeData:function(){var e=this.model.toJSON();return e.version=e.version.replace(/\-.*/gi,""),e.added=n(e.added),e.fixed=n(e.fixed),e}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1819),n(97)],
r=function(e,t){"use strict";var n=t.extend({name:"selectDeviceModal",template:e,serializeData:function(){return{devices:this.collection.toJSON()}}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1820),n(3),n(97)],r=function(e,t,n){"use strict";var i=n.extend({name:"SelectMediaFileModal",template:e,serializeData:function(){var e=this.model.get("Media");return{medias:e}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1821),n(106),n(97)],
r=function(e,t,n){"use strict";var i=n.extend({name:"selectOffsetModal",template:e,initialize:function(e){n.prototype.initialize.apply(this,arguments),this.offset=e.offset},serializeData:function(){return{offset:this.offset,formattedOffset:t(this.offset)}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1822),n(3),n(61),n(10),n(987),n(44),n(177),n(1082)],r=function(e,t,n,i,r,a,s,o){"use strict";var l={osx:"mac"},u=a.extend({mixins:[s],name:"serverDownloadModal",className:"server-download-modal modal modal-lg fade",
template:e,ui:{downloadBtn:".download-btn",paneTabs:".show-pane-btn",loading:".server-download-loading"},regions:{paneRegion:".pane-region"},events:t.extend({"click .show-pane-btn":"onShowPaneClick","click .download-btn":"onDownloadClick"},a.prototype.events),panesModel:"selectedModel",onlyAfterRender:["showPane"],initialize:function(e){var t=this;a.prototype.initialize.apply(this,arguments);var n=i.resolve("appModel");n.get("primaryServer")||this.listenTo(n,"change:primaryServer",function(e,n){n&&n.id&&t.hide();
}),this.downloadType=e.downloadType;var s=new r([],{server:n.get("cloudServer")}),o=s.populate();o=o.done(function(){t.collection=s.get(t.downloadType).get("platforms"),t.paneSetup(),t.render(),t.ui.loading.addClass("hidden")}),i.resolve("metrics").trackView({page:"downloads",firstRun:!0})},serializeData:function(){return{items:this.collection?this.collection.toJSON():[],selectedPane:this.selectedModel?this.selectedModel.get("id"):null}},selectListItem:function(){var e=this.selectedModel.get("id");
this.ui.paneTabs.removeClass("selected"),this.ui.paneTabs.filter('[data-pane="'+e+'"]').addClass("selected")},paneSetup:function(){this.panes=this.collection.reduce(function(e,t){var n=t.get("id");return e[n]={constructor:o},e},{});var e=n.platformID,t=l[e]||e;this.selectedModel=this.collection.get(t)||this.collection.first(),this.showPane(this.selectedModel.get("id"))},onRender:function(){a.prototype.onRender.apply(this,arguments),this.selectedModel&&this.selectListItem()},onShowPaneClick:function(e){
e.preventDefault();var t=this.$(e.currentTarget),n=t.data("pane");this.selectedModel=this.collection.get(n),this.showPane(n),this.selectListItem()},onDownloadClick:function(e){var t=this.selectedModel.get("id");i.resolve("metrics").trackClick({page:"downloads",firstRun:!0,action:"download",platform:this.downloadType,os:t})}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1824),n(44),n(1161)],r=function(e,t,n){"use strict";var i=t.extend({name:"syncStatusModal",template:e,
regions:{list:".sync-status-list-container"},onRender:function(){t.prototype.onRender.apply(this,arguments),this.list.show(new n({collection:this.collection,itemViewOptions:{syncItem:this.model}}))}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1825),n(3),n(8),n(44)],r=function(e,t,n,i){"use strict";var r=i.extend({name:"termsModal",template:e,isForced:!0,ui:{confirmBtn:".confirm-btn"},events:t.extend({"click .confirm-btn":"onConfirmClick"},i.prototype.events),
onConfirmClick:function(e){e.preventDefault();var i=this.ui.confirmBtn;if(!i.isDisabled()){i.addClass("active");var r=this.collection.first().save({AcceptedEULA:!0});r.always(t.bind(function(){this.hide(),n.trigger("navigate","setupBasic",{serverID:this.collection.server.id})},this))}}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1826),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"modal-body",template:e,events:{"click .try-again-link":"onTryAgainClick"
},serializeData:function(){return{status:this.options.status}},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","loading")}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1827),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"convert-location-container form-group",template:e,events:{"change select[name=storageLocation]":"onLocationChange"},serializeData:function(){return{disableLocation:!this.model.isNew(),selectedLocationID:this.model.get("locationID"),
locations:this.model.section&&this.model.section.get("locations").toJSON()}},onLocationChange:function(e){this.model.set("locationID",parseInt(e.currentTarget.value,10))}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1829),n(3),n(9),n(82)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({className:"convert-target-container form-group",template:e,ui:{targetTitleInput:".convert-target-title"},events:{"change select[name=target]":"onTargetChange","keydown input[name=targetTitle]":"onTitleKeyDown",
"change input[name=targetTitle]":"onTitleChange","change select[name=targetProfile]":"onProfileChange","change select[name=targetQuality]":"onQualityChange"},initialize:function(e){this.targets=e.targets,this.profiles=e.profiles;var n=this.model.get("Device").profile;n?this.selectedProfile=this.profiles.get(n):this.selectedProfile=this.profiles.findWhere({selected:!0}),this.availableCustomQualities=i.getAvailableQualities().reverse();var r=this.model.get("MediaSettings").maxVideoBitrate;if(r){var a=i.getNearestIndexToBitrate(r);
this.selectedCustomQuality=i.getQualityByIndex(a)}else this.selectedCustomQuality=t.first(this.availableCustomQualities);this.model.isNew()||this.model.get("targetTagID")||this.$el.addClass("show-custom-target")},serializeData:function(){return{item:this.model.toJSON(),targets:this.targets.toJSON(),disableTarget:!this.model.isNew(),profiles:this.profiles.toJSON(),selectedProfile:this.selectedProfile.toJSON(),availableCustomQualities:this.availableCustomQualities,selectedCustomQuality:this.selectedCustomQuality
}},updateDeviceProfile:function(e){var t=this.model.get("Device");t.profile=this.selectedProfile.get("title")},updateMediaSettings:function(e){var t=this.model.get("MediaSettings");t.videoQuality=e.videoQuality,t.videoResolution=e.videoResolution,t.maxVideoBitrate=e.bitrate},onTargetChange:function(e){var t=parseInt(e.currentTarget.value,10);t>-1?(this.model.unset("target"),this.model.set({targetTagID:t,MediaSettings:{},Device:{}})):(this.model.set("target",this.ui.targetTitleInput.val()),this.model.unset("targetTagID"),
this.updateDeviceProfile(this.selectedProfile),this.updateMediaSettings(this.selectedCustomQuality)),this.$el.toggleClass("show-custom-target",t===-1)},onTitleKeyDown:function(e){190===e.which&&0===e.currentTarget.selectionStart&&e.preventDefault()},onTitleChange:function(e){this.model.set("target",e.currentTarget.value)},onProfileChange:function(e){this.selectedProfile=this.profiles.findWhere({title:e.currentTarget.value}),this.updateDeviceProfile(this.selectedProfile)},onQualityChange:function(e){
var t=parseInt(e.currentTarget.value,10);this.selectedCustomQuality=i.getQualityByIndex(t),this.updateMediaSettings(this.selectedCustomQuality)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1830),n(3),n(5),n(9),n(6),n(8),n(35),n(129),n(124),n(179),n(519),n(1253),n(1252)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){"use strict";var p=i.Layout.extend({template:e,ui:{submitBtn:".submit-btn"},regions:{policyRegion:".policy-region",targetsRegion:".targets-region",locationRegion:".location-region"
},events:{"change input[name=title]":"onTitleChange","submit #convert-form":"onSubmit"},initialize:function(e){if(this.playlist=e.playlist,this.targets=e.targets,this.profiles=e.profiles,this.model){this.tempModel=this.model.cloneDeep();var n=this.model.get("Location").librarySectionID;if(n){var i=new l({key:n},{server:this.model.server,onlyIfCached:!0});t.isEmpty(i)||(this.tempModel.section=i)}}else{var r,a=e.item,s=e.items,c=a.has("childrenKey")?a.get("children"):a,d=a.server;if(a.get("isSection"))r=a;else{
var h=d.getSectionForItem(a);t.isEmpty(h)||(r=h)}this.tempModel=new u({title:o.title(a,{items:s}),targetTagID:this.targets.first().id,Location:{uri:o.uri(c,{items:s})}},{server:d,section:r})}},serializeData:function(){return{conversionItem:this.tempModel.toJSON(),isNew:this.tempModel.isNew(),showRemuxOnlyWarning:this.tempModel.server.get("transcoderVideoRemuxOnly")}},onRender:function(){this.policyRegion.show(new c({model:this.tempModel,isSync:!1,isCloudSync:!1})),this.targetsRegion.show(new d({model:this.tempModel,
targets:this.targets,profiles:this.profiles})),this.locationRegion.show(new h({model:this.tempModel}))},onTitleChange:function(e){this.tempModel.set("title",e.currentTarget.value)},onSubmit:function(e){e.preventDefault();var t=this.ui.submitBtn;if(!t.hasClass("active")){if(t.addClass("active"),!this.tempModel.get("targetTagID")&&!this.tempModel.get("target")){var n=this.tempModel.get("Device");this.tempModel.set("target",r("Custom: {1}",n.profile))}var i=this.playlist.addContent(this.tempModel);i.done(this.whenRendered(function(){
this.model&&this.model.set(this.tempModel.toJSON()),this.trigger("request:nextState")})),i.fail(this.whenRendered(function(e){var t=e.responseText,n=s.parseXML(t),i=n&&n.status;this.trigger("request:state","error",i)}))}}});return p}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1831),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"modal-body loading-container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1833),n(9),n(8)],
r=function(e,t,n){"use strict";var i=t.ItemView.extend({className:"modal-body",template:e,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),n.trigger("navigate","conversion",{serverID:this.options.server.id})}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1834),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"modal-body",template:e,events:{"click .try-again-link":"onTryAgainClick"
},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","form")}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1835),n(3),n(9),n(39),n(82),n(846),n(847),n(31)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=n.ItemView.extend({className:"sync-quality-container form-group",template:e,events:{"change select[name=videoQuality]":"onVideoQualityChange","change select[name=musicQuality]":"onMusicQualityChange","change select[name=photoQuality]":"onPhotoQualityChange"
},initialize:function(e){this.mediaSettings=this.model.get("MediaSettings"),t.defaults(this.mediaSettings,{audioBoost:o.get("audioBoost"),subtitleSize:o.get("subtitleSize")}),this.initVideoQuality(),this.initMusicQuality(),this.initPhotoQuality()},initVideoQuality:function(){this.availableVideoQualities=r.getAvailableQualities().reverse();var e=this.mediaSettings.maxVideoBitrate,t=e?r.getNearestIndexToBitrate(e):o.get(r.getSyncQualityAttribute());this.updateVideoQuality(r.getQualityByIndex(t))},initMusicQuality:function(){
this.availableMusicQualities=a.getAvailableQualities().reverse();var e=this.mediaSettings.musicBitrate,t=e?a.getNearestIndexToBitrate(e):o.get(a.getSyncQualityAttribute());this.updateMusicQuality(a.getQualityByIndex(t))},initPhotoQuality:function(){this.availablePhotoQualities=s.getAvailableQualities().reverse();var e=this.mediaSettings.photoQuality,t=e?s.getNearestIndexToQuality(e):o.get(s.getSyncQualityAttribute());this.updatePhotoQuality(s.getQualityByIndex(t))},serializeData:function(){var e=this.model.get("metadataType"),t=i.get(e);
return{typeElement:t.element,supportsOriginalQuality:this.model.server.supports("syncOriginalQuality"),availableVideoQualities:this.availableVideoQualities,selectedVideoQuality:this.selectedVideoQuality,availableMusicQualities:this.availableMusicQualities,selectedMusicQuality:this.selectedMusicQuality,availablePhotoQualities:this.availablePhotoQualities,selectedPhotoQuality:this.selectedPhotoQuality}},updateVideoQuality:function(e){this.selectedVideoQuality=e,this.mediaSettings.videoQuality=e.videoQuality,
this.mediaSettings.videoResolution=e.videoResolution,this.mediaSettings.maxVideoBitrate=e.bitrate},updateMusicQuality:function(e){this.selectedMusicQuality=e,this.mediaSettings.musicBitrate=e.bitrate},updatePhotoQuality:function(e){this.selectedPhotoQuality=e,this.mediaSettings.photoQuality=e.photoQuality,this.mediaSettings.photoResolution=e.photoResolution},saveQualityIndex:function(e,t){var n=parseInt(t,10);return o.save(e.getSyncQualityAttribute(),n),e.getQualityByIndex(n)},onVideoQualityChange:function(e){
var t=this.saveQualityIndex(r,e.currentTarget.value);this.updateVideoQuality(t)},onMusicQualityChange:function(e){var t=this.saveQualityIndex(a,e.currentTarget.value);this.updateMusicQuality(t)},onPhotoQualityChange:function(e){var t=this.saveQualityIndex(s,e.currentTarget.value);this.updatePhotoQuality(t)}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1836),n(3),n(9),n(10),n(129),n(39),n(13),n(271),n(519),n(1258)],r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c={
video:"movie",audio:"track",photo:"photo"},d=n.Layout.extend({template:e,ui:{submitBtn:".submit-btn"},regions:{policyRegion:".policy-region",qualityRegion:".quality-region"},events:{"change input[name=title]":"onTitleChange","submit #sync-form":"onSubmit"},initialize:function(e){var t=i.resolve("appModel");if(this.device=e.device,this.model)this.tempModel=this.model.cloneDeep();else{var n,s,l=e.item,u=e.items;l.get("isPlaylist")?(n=l,s=c[l.get("playlistType")]):l.get("isMetadataList")?(n=l,s=a.getChildMediaType(l.get("firstItemType")).typeString):(n=l.has("childrenKey")?l.get("children"):l,
s=a.getChildMediaType(l.get("type")).typeString),this.tempModel=new o({metadataType:s,title:r.title(l,{items:u}),rootTitle:this.getRootTitle(l),machineIdentifier:l.server.id,clientIdentifier:this.device.get("clientIdentifier"),Location:{uri:r.uri(n,{items:u})}},{parent:l.server,server:t.get("user").server,device:this.device})}},serializeData:function(){return{syncItem:this.tempModel.toJSON(),isNew:this.tempModel.isNew()}},getRootTitle:function(e){return e.section?e.section.get("title"):e.channel?e.channel.get("title"):e.get("title");
},onRender:function(){this.policyRegion.show(new l({model:this.tempModel,isSync:!0,isCloudSync:this.device.get("isCloudSync")})),this.qualityRegion.show(new u({model:this.tempModel}))},onTitleChange:function(e){this.tempModel.set("title",e.currentTarget.value)},onSubmit:function(e){e.preventDefault();var n=this.ui.submitBtn;if(!n.hasClass("active")){n.addClass("active");var i=this.tempModel.save();i.done(t.bind(function(){if(this.model){var e=this.model.get("version")||0,t=this.tempModel.toJSON();
t.version=e+1,this.model.set(t)}},this)),i=i.then(t.bind(function(){return s.execute("refreshSyncItems",{server:this.tempModel.parent,silent:!0})},this)),i.done(this.whenRendered(function(){this.trigger("request:nextState")})),i.fail(this.whenRendered(function(){this.trigger("request:state","error")}))}}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1838),n(9),n(8)],r=function(e,t,n){"use strict";var i=t.ItemView.extend({className:"modal-body",template:e,events:{
"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),n.trigger("navigate","sync",{serverID:this.options.server.id,deviceID:this.options.device.id})}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1839),n(3),n(6),n(456),n(148),n(44),n(1205)],r=function(e,t,n,i,r,a,s){"use strict";var o=a.extend({mixins:[r],name:"versionGeneratorMetadataModal",className:"version-generator-metadata-modal modal fade",
template:e,pageSize:20,scrollThreshold:50,ui:{body:".modal-body",loading:".loading",errorMessage:".error-message"},regions:{listRegion:".list-region"},initialize:function(e){this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems"),this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.handleScroll=t.throttle(this.whenRendered(this.onScroll),100)},states:{base:{},loading:{onEnter:function(){this.ui.loading.removeClass("hidden")},onExit:function(){this.ui.loading.addClass("hidden");
}},error:{onEnter:function(){this.ui.errorMessage.removeClass("hidden")},onExit:function(){this.ui.errorMessage.addClass("hidden")}}},bindings:{".generator-title":{modelAttribute:"title"},".generator-items-count":{modelAttribute:"Status",formatter:function(e){var t=e.itemsCount;return 1===t?n("{1} item",t):n("{1} items",t)}},".generator-total-size":{modelAttribute:"Status",formatter:function(e){return e.totalSize?i(e.totalSize):n("0 files")}},".generator-failure-container":{modelAttribute:"Status",
manual:!0,autohide:function(e){return!!e.failure}},".generator-failure-message":{modelAttribute:"Status",formatter:function(e){return e.failure}}},populatePage:function(){this.enterState("loading");var e=this.listModel.populateRange({start:0,end:this.listModel.get("populatedRange").end+this.pageSize});return e.done(this.whenRendered(function(){this.enterState("base")})),e.fail(this.whenRendered(function(){this.enterState("error")})),e},onRender:function(){a.prototype.onRender.apply(this,arguments),
this.ui.body.on("scroll",this.handleScroll),this.model.fetch(),this.populatePage(),this.listRegion.show(new s({collection:this.collection,itemViewOptions:{generator:this.model,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}}))},onClose:function(){this.ui.body.off("scroll",this.handleScroll),this.collection.reset()},onScroll:function(){if("error"!==this.currentState){var e=this.ui.body.prop("scrollHeight")-this.ui.body.innerHeight(),t=e-this.ui.body.scrollTop()<this.scrollThreshold;
t&&this.listModel.get("populatedRange").end<this.listModel.get("totalSize")&&this.populatePage()}}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1842),n(9),n(94)],r=function(e,t,n){"use strict";var i=t.ItemView.extend({template:e,ui:{poster:".media-poster"},events:{"change input":"onInputChange","click .remove-home-btn":"onRemoveHomeClick","click .remove-friend-btn":"onRemoveFriendClick","click .disable-guest-btn":"onGuestDisableClick"},initialize:function(e){this.paneID=e.paneID,
this.homeUser=e.homeUser,this.type=e.type,this.isAdmin=e.isAdmin,this.changes={},this.image=new n({model:this.model,type:"friend",width:60})},serializeData:function(){var e=!this.model.isNew(),t=this.homeUser&&!this.homeUser.isNew();return{friend:this.model.toJSON(),homeUser:this.homeUser&&this.homeUser.toJSON(),canRemoveFriend:e,canRemoveHomeUser:t&&this.isAdmin,showActions:e||t}},flushChanges:function(){this.homeUser&&this.homeUser.set(this.changes)},onRender:function(){this.image.setElement(this.ui.poster);
},onClose:function(){this.image.close()},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked),this.changes[t.name]=n},onRemoveHomeClick:function(e){e.preventDefault(),this.trigger("destroy:homeUser")},onRemoveFriendClick:function(e){e.preventDefault(),this.trigger("destroy:friend")},onGuestDisableClick:function(e){e.preventDefault(),this.trigger("disable:guest")}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1843),n(5),n(9),n(1264)],
r=function(e,t,n,i){"use strict";var r=n.Layout.extend({tagName:"ul",className:"list modal-nav-list",template:e,ui:{sharedHeader:".shared-list-header"},regions:{ownedServerList:".owned-servers-container",sharedServerList:".shared-servers-container"},events:{"click .change-pane-btn":"onChangePaneClick"},onlyAfterRender:["selectItem","toggleDisabled"],initialize:function(){this.serverOverviews=this.model.get("serverOverviews"),this.sharedServerShares=this.model.get("serverShares").filterByShared(),
this.listenTo(this.sharedServerShares,"reset add remove",this.updateHeaders)},setModel:function(e){this.stopListening(),this.model=e,this.initialize(),this.render()},selectItem:function(e){this.$(".change-pane-btn").removeClass("selected"),this.$('[data-pane-id="'+e+'"]').addClass("selected")},toggleDisabled:function(e){this.$(".change-pane-btn").toggleClass("disabled",e),this.$(".modal-nav-list-header").toggleClass("disabled",e)},updateHeaders:function(){this.ui.sharedHeader.toggleClass("hidden",!this.sharedServerShares.length);
},onRender:function(){this.updateHeaders(),this.ownedServerList.show(new i({collection:this.serverOverviews,itemViewOptions:{paneType:"ownedServer"}})),this.sharedServerList.show(new i({collection:this.sharedServerShares,itemViewOptions:{paneType:"sharedServer"}}))},onChangePaneClick:function(e){e.preventDefault();var n=t(e.currentTarget);if(!n.isDisabled()){var i=n.data("pane"),r=n.data("pane-id"),a={};"ownedServer"===i?a.serverOverview=this.model.get("serverOverviews").get(r):"sharedServer"===i&&(a.serverShare=this.model.get("serverShares").get(r)),
this.trigger("change:pane",i,r,a)}}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(1265)],r=function(e,t){"use strict";var n=e.extend({className:"server-nav-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1844),n(9),n(10)],r=function(e,t,n){"use strict";var i=t.ItemView.extend({tagName:"a",className:"btn-gray change-pane-btn disabled",template:e,initialize:function(e){this.$el.attr({href:"#","data-pane":e.paneType,
"data-pane-id":this.model.id});var t=n.resolve("appModel"),i=t.get("servers"),r=i.get(this.model.get("machineIdentifier"));r?this.attachServer(r):this.listenTo(i,"add",this.onServerAdd)},serializeData:function(){var e;return e=this.server&&null!=this.server.get("connected")?this.server.get("connected")?"available":"unavailable":"unknown",{server:this.model.toJSON(),status:e}},attachServer:function(e){this.server=e,this.listenTo(e,"change:connected",this.render)},onServerAdd:function(e){e.id===this.model.get("machineIdentifier")&&(this.attachServer(e),
this.render())}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1845),n(3),n(5),n(9),n(10),n(130),n(1269)],r=function(e,t,n,i,r,a,s){"use strict";var o=i.Layout.extend({template:e,ui:{details:".server-details",lastSeenRow:".server-detail-last-seen-row"},regions:{share:".share-details"},events:{"click .server-status-btn":"onServerStatusClick"},initialize:function(e){var t=r.resolve("appModel");this.paneID=e.paneID,this.serverOverview=e.serverOverview,this.server=t.get("servers").get(this.serverOverview.id);
var n=this.model.get("serverShares");this.serverShare=n.findWhere({machineIdentifier:this.serverOverview.id}),this.changes={}},serializeData:function(){return{server:this.serverOverview.toJSON()}},flushChanges:function(){var e=this.model.get("serverShares"),t=e.findWhere({machineIdentifier:this.serverOverview.id}),n=this.getServerShareAttributes(this.serverOverview);t?t.set(n):e.add(n)},getServerShareAttributes:function(e){var n=e.get("sections"),i=this.$("#"+e.id+"-section-list"),r=i.find(":checked:visible"),a=[],s={
machineIdentifier:e.id,owned:!0,allLibraries:!1};return r.each(function(){return"all"===this.value?(s.allLibraries=!0,!1):void a.push(parseInt(this.value,10))}),s.allLibraries?s.numLibraries=n.length:s.numLibraries=a.length,s.Section=n.map(function(e){var n=e.toJSON();return n.shared=s.allLibraries||t.contains(a,n.id),n}),s},bindings:{".server-title":{model:"serverOverview",modelAttribute:"name"},".server-status-btn":{model:"server",modelAttribute:"connected",manual:!0,formatter:function(e,t){t.removeClass("unknown available unauthorized unavailable"),
null==e?t.addClass("unknown"):e?t.addClass("available"):this.server.get("unauthorized")?t.addClass("unauthorized"):t.addClass("unavailable")}},".server-detail-version":{model:"server",modelAttribute:"shortVersion"},".server-detail-last-seen":{model:"serverShare",modelAttribute:"lastSeenAt",formatter:function(e){var t=a(e);return this.ui.lastSeenRow.toggleClass("hidden",!t),t}},".server-detail-address":{model:"serverOverview",modelAttribute:"address",formatter:function(e){if(e)return e;var t=this.server.get("activeConnection");
return t?t.address:void 0}},".server-detail-port":{model:"serverOverview",modelAttribute:"port",formatter:function(e){if(e)return e;var t=this.server.get("activeConnection");return t?t.port:void 0}}},onRender:function(){this.share.append(new s({model:this.model,serverOverview:this.serverOverview,itemViewOptions:this.itemViewOptions}))},onServerStatusClick:function(e){e.preventDefault();var t=n(e.currentTarget);t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"));
}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1846),n(3),n(5),n(9),n(10),n(83),n(209),n(378)],r=function(e,t,n,i,r,a,s){"use strict";var o=i.ItemView.extend({className:"form-horizontal",template:e,filters:{contentRating:{sectionTypes:["movie","show"],presets:{movie:["G","PG","PG-13","R","NC-17","None"],show:["TV-Y","TV-Y7","TV-G","TV-PG","TV-14","TV-MA","None"]}},label:{sectionTypes:["movie","show","artist","photo"]}},filterByType:{movie:"filterMovies",show:"filterTelevision",
artist:"filterMusic",photo:"filterPhotos"},ui:{tagInputs:".tag-input-hidden"},events:{"change input":"onInputChange"},initialize:function(e){this.paneID=e.paneID,this.type=e.type;var t=r.resolve("appModel"),n=t.get("user");this.hasContentFilterFeature=n.get("subscription").get("features").get("content_filter"),this.plexPassUrl=n.server.get("plexPassUrl"),this.changes={}},serializeData:function(){return{user:this.model.toJSON(),hasContentFilterFeature:this.hasContentFilterFeature,plexPassUrl:this.plexPassUrl,
moviesIcon:a.get("movies").sectionTypeIcon,showsIcon:a.get("tv").sectionTypeIcon,musicIcon:a.get("music").sectionTypeIcon,photosIcon:a.get("photos").sectionTypeIcon}},loadPresets:function(){t.each(this.filters,function(e,n){t.isEmpty(e.presets)||t.each(e.presets,function(e,i){var r=this.getSelectizeInputByFilterName(n,i),a=t.map(e,function(e){return{title:e,key:e}});r.addOption(a)},this)},this)},loadSections:function(){var e=r.resolve("appModel"),n=e.get("servers"),i=this.model.get("serverShares"),a=i.filter(function(e){
return e.isActive()&&e.get("owned")}),s=t.compact(t.map(a,function(e){return n.get(e.get("machineIdentifier"))}));t.each(s,function(e){if(e.get("connected")){var n=e.get("sections");n.populate().done(t.bind(function(){this.loadFilters(n)},this))}},this)},loadFilters:function(e){e.each(function(e){var n=e.get("type");t.each(this.filters,function(i,r){t.contains(i.sectionTypes,n)&&this.loadFilterOptions(e,r)},this)},this)},loadFilterOptions:function(e,n){var i=new s({filter:n,filterType:"string"},{
server:e.server,section:e}),r=i.get("options");r.populate().done(t.bind(function(){var t=this.getSelectizeInputByFilterName(n,e.get("type"));t.addOption(r.toJSON())},this))},getSelectizeInputByFilterName:function(e,t){var n="#filter-"+t+"-"+e;return this.$(n)[0].selectize},resetAllPlaceholders:function(){var e=[];t.each(this.filters,function(n){e=t.union(e,n.sectionTypes)}),t.each(e,function(e){var n=this.model.get(this.filterByType[e]);this.resetPlaceholders(e,{restore:t.isEmpty(n)})},this)},resetPlaceholders:function(e,t){
t||(t={});var n=this.$("input[data-section-type="+e+"]");n.each(function(){var e=t.restore?this.placeholder:"";e?(this.selectize.settings.placeholder=e,this.selectize.updatePlaceholder()):this.selectize.$control_input.attr("placeholder","")})},flushChanges:function(){this.model.set(this.changes)},onRender:function(){return this.hasContentFilterFeature?(this.ui.tagInputs.selectize({plugins:["remove_button"],create:!0,labelField:"title",valueField:"title",sortField:"title",searchField:["title"]}),this.resetAllPlaceholders(),
this.loadSections(),void this.loadPresets()):void this.$el.addClass("no-plex-pass")},onInputChange:function(e){var i=e.currentTarget,r=n(i),a=i.value,s=r.data("filter"),o=r.data("sectionType");if(this.hasContentFilterFeature||"allowChannels"===i.name){if(s){var l=this.changes[i.name]||this.model.get(i.name)||{};a?l[s]=a:l.hasOwnProperty(s)&&delete l[s],this.resetPlaceholders(o,{restore:t.isEmpty(l)}),a=l}else"checkbox"===i.type&&(a=i.checked);this.changes[i.name]=a}}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1847),n(3),n(9),n(83)],r=function(e,t,n,i){"use strict";var r=n.ItemView.extend({tagName:"li",className:"share-section-list-item",template:e,initialize:function(e){this.serverShare=e.serverShare},serializeData:function(){var e={section:this.model.toJSON(),typeIcon:i.get(this.model.get("type")).sectionTypeIcon,isChecked:!1};if(this.serverShare&&!this.serverShare.get("allLibraries")){var n=this.serverShare.get("Section");e.isChecked=!!t.findWhere(n,{id:this.model.id,shared:!0
})}return e}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1848),n(3),n(5),n(9),n(1268)],r=function(e,t,n,i,r){"use strict";var a=i.CompositeView.extend({className:"share-server-container",template:e,itemView:r,itemViewContainer:".share-section-list",ui:{list:".share-section-list"},events:{"change input[name=share-all-libraries-cb]":"onAllLibrariesChange"},initialize:function(e){t.bindAll(this,"render"),this.serverOverview=e.serverOverview,this.collection=this.serverOverview.get("sections");
var i=this.model.get("serverShares");this.serverShare=i.findWhere({machineIdentifier:this.serverOverview.id});var r=[];r.push(this.serverOverview.populate()),this.serverShare&&(this.itemViewOptions={serverShare:this.serverShare},this.serverShare.isNew()||r.push(this.serverShare.populate())),this.listPromise=n.when.apply(n,r),"pending"===this.listPromise.state()&&this.listPromise.always(this.render)},serializeData:function(){var e=this.listPromise.state(),t=!this.serverShare&&this.model.isNew(),n=this.serverShare&&this.serverShare.get("allLibraries");
return{server:this.serverOverview.toJSON(),isPending:"pending"===e,hasFailed:"rejected"===e,hasSections:!!this.serverOverview.get("sections").length,allLibraries:t||n}},onAllLibrariesChange:function(e){this.ui.list.toggleClass("show-libraries",!e.currentTarget.checked)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1849),n(1850),n(3),n(5),n(9),n(10),n(6),n(130),n(83)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=r.ItemView.extend({template:e,ui:{details:".server-details"
},events:{"click .server-status-btn":"onServerStatusClick","click .leave-server-btn":"onLeaveServerClick"},initialize:function(e){this.paneID=e.paneID,this.serverShare=e.serverShare,this.serverShare.populate();var t=a.resolve("appModel"),n=t.get("servers"),i=n.get(this.serverShare.get("machineIdentifier"));i?this.attachServer(i):this.listenTo(n,"add",this.onServerAdd)},flushChanges:function(){},attachServer:function(e){this.server=e,this.listenTo(e,"change:connected",this.render)},bindings:{".server-title":{
model:"serverShare",modelAttribute:"name"},".server-status-btn":{model:"server",modelAttribute:"connected",manual:!0,formatter:function(e,t){t.removeClass("unknown available unauthorized unavailable"),null==e?t.addClass("unknown"):e?t.addClass("available"):this.server.get("unauthorized")?t.addClass("unauthorized"):t.addClass("unavailable")}},".server-detail-version":{model:"server",modelAttribute:"shortVersion"},".server-detail-last-seen":{model:"serverShare",modelAttribute:"lastSeenAt",formatter:function(e){
return o(e)}},".server-detail-address":{model:"server",modelAttribute:"activeConnection",formatter:function(e){return e&&e.address}},".server-detail-port":{model:"server",modelAttribute:"activeConnection",formatter:function(e){return e&&e.port}},".server-restriction-allow-sync":{model:"serverShare",modelAttribute:"allowSync",manual:!0,autohide:!0},".share-section-list":{model:"serverShare",modelAttribute:"Section",isHtml:!0,formatter:function(e){var i;return e.length||"pending"!==this.serverShare.populatePromise.state()?(i="",
n.each(n.where(e,{shared:!0}),function(e){var n={section:e,typeIcon:l.get(e.type).sectionTypeIcon};i+=t(n)})):i=t({section:{title:s("Loading...")},typeIcon:"hidden"}),i}}},onServerAdd:function(e){e.id===this.serverShare.get("machineIdentifier")&&(this.attachServer(e),this.unbindFromModel(),this.bindToModel())},onServerStatusClick:function(e){e.preventDefault();var t=i(e.currentTarget);t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"))},onLeaveServerClick:function(e){
e.preventDefault(),this.trigger("destroy:serverShare",this.serverShare)}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1851),n(3),n(5),n(9),n(13)],r=function(e,t,n,i,r){"use strict";var a=i.ItemView.extend({template:e,focusDelay:200,validationDelay:500,ui:{existingGroup:".existing-user-group",existingBtn:".add-existing-user-btn",restrictedGroup:".restricted-user-group",restrictedBtn:".add-restricted-user-btn"},events:{"keyup input":"onInputChange","change input":"onInputChange",
"click .add-existing-user-btn":"onAddExistingUserClick","click .add-restricted-user-btn":"onAddRestrictedUserClick"},initialize:function(e){this.paneID=e.paneID,this.type=e.type,this.homeUser=e.homeUser,this.changes={},this.validate=t.debounce(this.validate,500)},serializeData:function(){return{type:this.type}},flushChanges:function(){this.model.set(this.changes),this.homeUser&&this.homeUser.set(this.changes)},focusInput:function(){var e;e=this.changes.restricted?this.$("[name=title]"):this.$("[name=username]"),
e.removeClass("hidden"),e.focus()},validate:function(e){if(e){var n=r.execute("validateUsername",{username:e,server:this.model.server});n.done(t.bind(function(){this.$el.addClass("is-valid-username"),this.$el.removeClass("is-invalid-username")},this)),n.fail(t.bind(function(e,t){this.$el.removeClass("is-valid-username"),this.$el.addClass("is-invalid-username"),this.trigger("change:errorMessage",t)},this))}},onRender:function(){"friend"===this.type&&setTimeout(t.bind(this.focusInput,this),this.focusDelay);
},onInputChange:function(e){var t=e.currentTarget,n=t.name,i=t.value;i!==this.changes[n]&&(this.changes[n]=i,this.trigger("change:errorMessage",""),this.trigger("enable:submit",!!i),"username"===n&&this.validate(i))},onAddExistingUserClick:function(e){e.preventDefault();var t=n(e.currentTarget);t.isDisabled()||(t.addClass("hidden"),this.ui.restrictedGroup.addClass("disabled"),this.ui.restrictedBtn.addClass("disabled"),this.focusInput())},onAddRestrictedUserClick:function(e){e.preventDefault();var t=n(e.currentTarget);
t.isDisabled()||(this.changes.restricted=!0,t.addClass("hidden"),this.ui.existingGroup.addClass("disabled"),this.ui.existingBtn.addClass("disabled"),this.focusInput())}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1854),n(186)],r=function(e,t){"use strict";var n=t.extend({className:"user-select-alert-bar",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1855),n(3),n(5),n(9),n(10),n(6),n(8),n(61),n(13),n(522),n(521)],
r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=i.Layout.extend({className:"user-select-modal-pin-container",template:e,ui:{digitContainer:".pin-digit-container",input:".pin-input",digits:".pin-digit",loading:".loading",removeBtn:".remove-btn",saveBtn:".save-btn"},regions:{userList:".user-select-list"},events:{"keydown input":"onKeyDown","keyup input":"onKeyUp","focus input":"onFocus","blur input":"onBlur","change input":"onChange","animationend .pin-input-container":"onInputsAnimationEnd","webkitAnimationEnd .pin-input-container":"onInputsAnimationEnd",
"oAnimationEnd .pin-input-container":"onInputsAnimationEnd","click .back-btn":"onBackClick","click .remove-btn":"onRemoveClick","submit #pin-form":"onSubmit","click .pin-digit":"onPINClick","keydown .save-btn":"onSaveKeyDown"},onlyAfterRender:["confirmUser"],initialize:function(e){var t=r.resolve("appModel");this.isForced=e.isForced,this.isEditing=e.isEditing,this.isEditWarning=e.isEditWarning,this.showBackButton=e.showBackButton,this.focusDelay=e.focusDelay,this.user=t.get("user"),this.isEditConfirmation=this.isEditing&&this.model.get("protected")&&!this.model.get("restricted");
},serializeData:function(){var e=this.isEditing&&!this.isEditConfirmation;return{isEditing:e,isEditWarning:this.isEditWarning,isEditConfirmation:this.isEditConfirmation,hasCurrentPIN:this.model.get("protected"),showBackButton:this.showBackButton}},focusInput:function(){this.ui.input.val(""),this.ui.input.focus()},getPIN:function(){return this.ui.input.val()},editPIN:function(e){if(!this.ui.saveBtn.isDisabled()){this.ui.saveBtn.addClass("disabled");var t=this.savePIN(e);t.fail(this.whenRendered(function(){
this.ui.saveBtn.removeClass("disabled"),s.trigger("show:alert",{type:"error",message:a("This PIN could not be saved.")})}))}},removePIN:function(){if(!this.ui.removeBtn.isDisabled()){this.ui.removeBtn.addClass("disabled");var e=this.savePIN("");e.fail(this.whenRendered(function(){this.ui.removeBtn.removeClass("disabled"),s.trigger("show:alert",{type:"error",message:a("This PIN could not be removed.")})}))}},savePIN:function(e){this.ui.loading.removeClass("hidden");var n={pin:e};this.currentPin&&(n.currentPin=this.currentPin);
var i=this.model.save(n,{wait:!0});return i.done(t.bind(function(){this.model.unset("pin"),this.model.unset("currentPin"),this.model.set("protected",!!e),this.model.id===this.user.id&&(e?this.user.set("pin",this.user.hashPIN(e)):this.user.unset("pin"),this.user.set("home",this.user.hasHome())),this.trigger("resolve",e),e&&this.user.get("homeUsers").length<2&&s.trigger("show:modal",new c({type:"pin"}))},this)),i.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")})),i},confirmUser:function(e){
this.ui.loading.removeClass("hidden");var n=l.execute("switchUser",{homeUser:this.model,pin:e,allowGuestLock:!this.isEditing});n.done(t.bind(function(){this.isEditing?(this.isEditConfirmation=!1,this.currentPin=e,this.render()):this.trigger("resolve",e)},this)),n.fail(this.whenRendered(function(){this.ui.digitContainer.addClass("shake"),this.ui.input.val(""),this.focusInput()})),n.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},renderPIN:function(){var e=this.getPIN(),t=e.length,i=this.isEditing&&!this.isEditConfirmation;
this.ui.digits.each(function(r,a){var s=e[r]||"";s&&!i&&(s="&bull;"),n(a).toggleClass("current",r===t).html(s)})},onRender:function(){this.userList.show(new u({model:this.model,disabled:!0})),o.mobile||setTimeout(t.bind(this.focusInput,this),this.focusDelay)},onKeyDown:function(e){var t=e.which;if(13!==t){var i=n(e.currentTarget);if(8!==t&&46!==t){e.preventDefault();var r=t>=48&&t<=57,a=t>=96&&t<=105;(r||a)&&(a&&(t-=48),i.val(i.val()+String.fromCharCode(t)),4===i.val().length&&(!this.isEditing||this.isEditConfirmation?(i.blur(),
this.confirmUser(this.getPIN())):this.ui.saveBtn.focus()))}}},onKeyUp:function(e){this.renderPIN()},onFocus:function(e){this.renderPIN()},onBlur:function(e){this.renderPIN(),this.ui.digits.removeClass("current")},onChange:function(e){this.renderPIN()},onInputsAnimationEnd:function(e){n(e.currentTarget).removeClass("shake")},onBackClick:function(e){e.preventDefault(),this.trigger("change:pane","users")},onRemoveClick:function(e){e.preventDefault(),this.removePIN()},onSubmit:function(e){e.preventDefault();
var t=this.getPIN();return 4!==t.length?void s.trigger("show:alert",{type:"error",message:a("Please enter a 4 digit PIN.")}):void(this.isEditing&&!this.isEditConfirmation?this.editPIN(t):this.confirmUser(t))},onSaveKeyDown:function(e){var t=e.which;8!==t&&46!==t||(e.preventDefault(),this.ui.input.val(""),this.focusInput())},onPINClick:function(){this.focusInput()}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(33),n(522)],r=function(e,t){"use strict";var n=e.extend({
tagName:"ul",className:"tile-list user-select-list",itemView:t});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1857),n(3),n(5),n(9),n(10),n(8),n(13),n(88),n(126),n(412),n(1274)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=i.Layout.extend({className:"user-select-modal-users-container",template:e,ui:{loading:".loading"},regions:{body:".modal-body"},onlyAfterRender:["onUserPopulated","onHomeUsersPopulated","onError"],initialize:function(e){var n=r.resolve("appModel");
this.user=n.get("user"),this.homeUsers=this.user.get("homeUsers"),this.user.server.populate().done(t.bind(this.onUserPopulated,this)).fail(t.bind(this.onError,this))},showList:function(e){this.ui.loading.addClass("hidden"),this.body.show(new c({collection:e})),this.listenTo(this.body.currentView,"itemview:selectUser",this.onUserSelect)},selectUser:function(e){this.ui.loading.removeClass("hidden");var n=s.execute("switchUser",{homeUser:e,switchUser:!0,allowGuestLock:!0});n.done(t.bind(function(){this.trigger("resolve");
},this)),n.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},onUserPopulated:function(){this.homeUsers.fetch().done(t.bind(this.onHomeUsersPopulated,this)).fail(t.bind(this.onError,this))},onHomeUsersPopulated:function(e){var n=s.execute("lockUser");n.always(t.bind(function(){1===e.length&&e.first().get("protected")?this.trigger("change:pane","pin",{model:e.first(),showBackButton:!1,focusDelay:0}):this.showList(e)},this))},onError:function(){var e=o.getActiveUser();if(e&&e.get("home")){
var t={id:e.id,title:e.get("title"),"protected":!!e.get("pin")};this.showList(new u([t],{server:this.user.server,parent:this.user}))}else this.user.set("lockState",l.lockStates.UNLOCKED),this.trigger("resolve")},onUserSelect:function(e,t){t.get("protected")?this.trigger("change:pane","pin",{model:t,showBackButton:!0,focusDelay:0}):this.selectUser(t)}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1858),n(3),n(9),n(7),n(66),n(34),n(8),n(10),n(31),n(13),n(178),n(1417),n(335),n(1277),n(500)],
r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f){"use strict";var m=a.Provider,v=n.Layout.extend({className:"nav-bar",template:e,sectionSearchDelay:500,ui:{backBtn:".back-btn",plexPassBtn:".plex-pass-btn",activityBtn:".activity-btn",activityBadge:".activity-badge",search:".nav-bar-search-container",modalContainer:".modal-container"},regions:{navDropdown:".nav-bar-right",playerDropdown:".nav-bar-right"},events:{"click .back-btn":"onBackClick","click .activity-btn":"onActivityClick","click .plex-pass-btn":"onPlexPassClick"
},modelEvents:{"change:history":"onHistoryChange","change:primaryServer":"onPrimaryServerChange"},onlyAfterRender:["onSignedInChange","onHistoryChange","onPrimaryServerChange","onActivityChange"],initialize:function(){t.bindAll(this,"onPlexPassModalClose"),this.isPlexPassModalOpen=!1,this.listenTo(this.model.get("user"),{"change:signedIn":this.onSignedInChange,"change:homeSize":this.onHomeSizeChange}),this.listenTo(s,"change:language",this.render),this.setupServerListeners()},setupServerListeners:function(){
this.primaryServer&&(this.stopListening(this.primaryServer),this.stopListening(this.sessions),this.stopListening(this.transcodeJobs),this.sessions=null,this.transcodeJobs=null),this.primaryServer=this.model.get("primaryServer"),this.primaryServer&&(this.sessions=this.primaryServer.get("sessions"),this.transcodeJobs=new c([],{server:this.primaryServer,persistInCache:!0}),this.listenTo(this.sessions,"reset add remove",this.onActivityChange),this.listenTo(this.transcodeJobs,"reset add remove",this.onActivityChange));
},serializeData:function(){var e=this.model.get("user");return{plexPassUrl:e.server.get("plexPassUrl"),hasHistory:this.hasHistory(),canGoPremium:this.canGoPremium(),showActivity:!!this.primaryServer,activityCount:this.getActivityCount()}},mountReact:function(){r.render(i.createElement(m,{store:o.resolve("appStore")},i.createElement(d,{serverEntityID:this.primaryServer?this.primaryServer.entityID():void 0})),this.ui.search[0]),r.render(i.createElement(m,{store:o.resolve("appStore")},i.createElement(h,{
metricsProperties:{context:"navBar"},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose})),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&(r.unmountComponentAtNode(this.ui.search[0]),r.unmountComponentAtNode(this.ui.modalContainer[0]))},getActivityCount:function(){var e=this.sessions?this.sessions.length:0,t=this.transcodeJobs?this.transcodeJobs.length:0;return e+t},hasHistory:function(){var e=this.model.get("history");return e.length>1},canGoPremium:function(){
var e=this.model.get("user");return e.get("canGoPremium")},showOrHidePremiumNotice:function(){this.ui.plexPassBtn.toggleClass("hidden",!this.canGoPremium())},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact(),this.playerDropdown.append(new f({showNowPlaying:!0})),this.navDropdown.append(new p({model:this.model})),this.$el.tooltip({selector:'[data-toggle="tooltip"]',container:"body",placement:"bottom"})},onClose:function(){this.unmountReact()},onSignedInChange:function(e,t){
this.showOrHidePremiumNotice()},onHistoryChange:function(e,t){this.ui.backBtn.toggleClass("hidden",!this.hasHistory())},onPrimaryServerChange:function(e,t){this.setupServerListeners();var n=!!t;this.ui.activityBtn.toggleClass("hidden",!n),this.onActivityChange(),this.mountReact()},onActivityChange:function(){var e=this.getActivityCount();this.ui.activityBtn.parent("li").toggleClass("active",!!e),this.ui.activityBadge.toggleClass("hidden",!e),this.ui.activityBadge.text(e)},onBackClick:function(e){
e.preventDefault(),s.trigger("navigate:back")},onActivityClick:function(e){e.preventDefault(),this.transcodeJobs&&this.transcodeJobs.length?s.trigger("navigate","conversion"):this.sessions&&this.sessions.length?s.trigger("navigate","nowPlaying"):s.trigger("navigate","activity")},onPlexPassClick:function(e){e.preventDefault(),this.isPlexPassModalOpen=!0,this.mountReact()},onPlexPassModalClose:function(){this.isPlexPassModalOpen=!1,this.mountReact()},onHomeSizeChange:function(){this.showOrHidePremiumNotice();
}});return v}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1859),n(3),n(9),n(6),n(8),n(13),n(94),n(126)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=n.ItemView.extend({id:"nav-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:e,ui:{poster:".dropdown-poster-toggle .media-poster",dropdownMenu:".dropdown-menu",switchUserItem:".switch-user-item",totalBadge:".total-badge",invitesBadge:".invites-badge",announcementsBadge:".announcements-badge",announcementsItem:".announcements-item"
},events:{"click .switch-user-btn":"onSwitchUserClick","click .users-btn":"onUsersClick","click .sign-in-btn":"onSignInClick","click .sign-out-btn":"onSignOutClick"},onlyAfterRender:["onSignedInChange","updateBadges"],bindings:{".username-header":{model:"user",modelAttribute:"title"}},initialize:function(){this.user=this.model.get("user"),this.invites=this.user.get("invites"),this.image=new s({model:this.user,type:"friend",width:34});var e=t.debounce(this.updateBadges),n=t.debounce(this.onSignedInChange);
this.listenTo(this.user,{"change:signedIn":n,"change:username":this.onUsernameChange,"change:home":this.onHomeChange,"change:announcements.reset":e,"change:announcements.update":e,"change:announcements.change:read":e}),this.listenTo(this.invites,"reset add remove",e)},serializeData:function(){var e=this.invites.length,t=this.getUnreadAnnouncementsCount();return{signedIn:this.user.get("signedIn"),isRestricted:this.user.get("restricted"),home:this.user.get("home"),isFullUser:this.user.isFullUser(),
invitesCount:e,unreadAnnouncementsCount:t,totalCount:e+t,appsUrl:this.user.server.get("appsUrl"),helpUrl:this.user.server.get("helpUrl"),defaultTarget:"_self"}},getUnreadAnnouncementsCount:function(){var e=this.user.get("announcements").where({read:!1});return e.length},updateBadges:function(){var e=this.invites.length,t=this.getUnreadAnnouncementsCount(),n=e+t;this.ui.totalBadge.toggleClass("hidden",!n),this.ui.totalBadge.text(n),this.ui.invitesBadge.toggleClass("hidden",!e),this.ui.invitesBadge.text(e),
this.ui.announcementsBadge.toggleClass("hidden",!t),this.ui.announcementsBadge.text(t)},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onSignedInChange:function(e,t){this.ui.dropdownMenu.toggleClass("signed-in",!!t),this.ui.announcementsItem.toggleClass("hidden",!!e.get("restricted"))},onUsernameChange:function(e,t){this.ui.dropdownMenu.toggleClass("full-user",!!t)},onHomeChange:function(e,t){this.ui.switchUserItem.toggleClass("hidden",!e.get("home"));
},onSwitchUserClick:function(e){e.preventDefault(),this.user.set("lockState",o.lockStates.LOCKED)},onUsersClick:function(e){e.preventDefault(),r.trigger("navigate","users")},onSignInClick:function(e){e.preventDefault(),r.trigger("navigate","login")},onSignOutClick:function(e){e.preventDefault(),a.execute("signOut").done(t.bind(function(){r.trigger("navigate:refresh:dashboard")},this))}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1867),n(9)],r=function(e,t){"use strict";
var n=t.ItemView.extend({template:e,className:"player mini-player"});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1868),n(10),n(268),n(317),n(318)],r=function(e,t,n,i,r){"use strict";var a=i.extend({template:e,volumeSettingsKey:"musicPlayerVolume",initialize:function(e){i.prototype.initialize.apply(this,arguments),this.controlsView=new r({model:this.playerModel,upNextCollection:new n(null,{parent:this.playerModel})}),this.addListeners()},startPlayback:function(e){
e||(e={});var n=t.resolve("appModel");return this.controller.load({model:this.playerModel,offset:e.offset,autoplay:e.autoplay,fallbackServer:n.get("primaryServer"),silent:this.isNowPlaying()})},getNavigationKey:function(){var e=this.metadataItem.get("parentKey");if(e)return e},onRender:function(){this.controls.append(this.controlsView,this.$el),i.prototype.onRender.apply(this,arguments)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1869),n(317),n(318),n(405)],
r=function(e,t,n,i){"use strict";var r=t.extend({template:e,initialize:function(e){e||(e={}),e.playerModelClass=i,t.prototype.initialize.apply(this,arguments),this.controlsView=new n({model:this.playerModel}),this.addListeners()},addListeners:function(){t.prototype.addListeners.apply(this,arguments),this.listenTo(this.controlsView,"load:poster",this.onPosterLoad)},getNavigationKey:function(){var e=this.metadataItem.get("parentKey");if(e)return e},onRender:function(){this.controls.append(this.controlsView,this.$el),
t.prototype.onRender.apply(this,arguments)},onPrimaryPlayerChange:function(e,n){t.prototype.onPrimaryPlayerChange.apply(this,arguments),this.maximize()},onPosterLoad:function(e){this.playerModel.set("loaded",!0)}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1870),n(3),n(5),n(9),n(13),n(6),n(8),n(43),n(95),n(78),n(116),n(187)],r=function(e,t,n,i,r,a,s,o,l,u,c,d){"use strict";var h=i.Layout.extend({className:"photo-player-container",template:e,ui:{details:".photo-details",
playBtn:".play-btn",pauseBtn:".pause-btn",dropdown:".photo-actions-dropdown",error:".error"},regions:{photo:".photo-details"},events:{"click .edit-btn":"onEditClick","click .more-btn":"onMoreClick","click .play-video-btn":"onPlayClick","hide.bs.dropdown .photo-actions-dropdown":"onDropdownHide"},onlyAfterRender:["onPausedChange"],initialize:function(e){this.playerModel=e.playerModel,this.transition=e.transition,this.mediaActions=new l({},{item:this.model});var t=this.getImageSize();this.imageWidth=t.width,
this.imageHeight=t.height;var n;n="photo"===this.model.get("type")?this.model.getMediaKey():this.model.get("thumb"),this.photoImage=new u({model:this.model,url:n,width:this.imageWidth,height:this.imageHeight,resetOnError:!0}),this.updateImageSize(t),this.transition&&(this.$el.addClass(this.transition.type),this.transition.direction&&(this.$el.addClass(this.transition.direction),"left"===this.transition.direction?this.$el.css("left",this.windowWidth*-1):this.$el.css("left",this.windowWidth))),this.listenTo(s,"resize",this.onResize),
this.listenTo(this.playerModel,{"change:slideshowPaused":this.onPausedChange,"change:errorMessage":this.onErrorMessageChange,"change:showEnterFullscreen":this.onResize}),this.listenTo(this.photoImage,{load:this.onImageLoad,error:this.onImageError}),this.model.get("isLibraryItem")&&this.model.populate()},serializeData:function(){var e=this.collection.availableRange,t=e?e.start:0,n=t+this.collection.indexOf(this.playerModel.get("playQueueItem"))+1,i=this.collection.totalSize||this.collection.length;
return{player:this.playerModel.toJSON(),isVideo:"clip"===this.model.get("type"),index:n,total:i}},getImageSize:function(){return this.windowWidth=n(window).width(),this.windowHeight=n(window).height(),{width:Math.round(.8*this.windowWidth),height:Math.round(.7*this.windowHeight)}},updateImageSize:function(e){this.photoImage.$el.css({"max-width":e.width,"max-height":e.height}),e.width>=this.imageWidth&&e.height>=this.imageHeight&&(this.imageWidth=e.width,this.imageHeight=e.height,this.photoImage.src=null,
this.photoImage.width=this.imageWidth,this.photoImage.height=this.imageHeight,this.photoImage.render())},transitionIn:function(){this.transition&&(this.$el.triggerReflow(),this.$el.removeClass(this.transition.type),this.transition.direction&&this.$el.removeClass(this.transition.direction).css("left",0))},transitionOut:function(e){return e?(this.$el.addClass(e.type),e.direction&&("right"===e.direction?this.$el.addClass("left").css("left",this.windowWidth*-1):this.$el.addClass("right").css("left",this.windowWidth)),
void t.delay(t.bind(this.close,this),1e3)):void this.close()},bindings:{".photo-title":{modelAttribute:"title"},".photo-summary":{modelAttribute:"summary",autohide:!0},".edit-btn":{model:"mediaActions",modelAttribute:"showEdit",manual:!0,autohide:!0},".more-btn":{model:"mediaActions",modelAttribute:"showListDropdown",manual:!0,autohide:!0},".minimize-btn":{model:"playerModel",modelAttribute:"showMinimize",manual:!0,autohide:!0},".enter-fullscreen-btn":{model:"playerModel",modelAttribute:"showEnterFullscreen",
manual:!0,autohide:!0},".exit-fullscreen-btn":{model:"playerModel",modelAttribute:"showExitFullscreen",manual:!0,autohide:!0}},onRender:function(){this.photo.prepend(this.photoImage)},onImageLoad:function(e){this.model===this.playerModel.get("metadataItem")&&this.playerModel.set("loaded",!0)},onImageError:function(){this.model===this.playerModel.get("metadataItem")&&this.playerModel.set({state:o.states.ERROR,errorMessage:a("There was a problem loading '{1}'",this.model.get("title"))})},onPausedChange:function(e,t){
this.ui.playBtn.toggleClass("hidden",!t),this.ui.pauseBtn.toggleClass("hidden",t)},onErrorMessageChange:function(e,t){this.model===this.playerModel.get("metadataItem")&&t&&(this.ui.error.text(t),this.ui.error.removeClass("hidden"),this.ui.details.addClass("hidden"))},onResize:function(){var e=this.getImageSize();this.updateImageSize(e)},onEditClick:function(e){e.preventDefault(),s.trigger("show:modal",new c({mediaActions:this.mediaActions}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),
this.dropdown=new d({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.ui.details.addClass("force-hover")},onPlayClick:function(e){e.preventDefault(),r.execute("playMedia",{item:this.model})},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.ui.details.removeClass("force-hover"))}});return h}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1871),n(3),n(13),n(405),n(316),n(1281)],
r=function(e,t,n,i,r,a){"use strict";var s=r.extend({className:"photo-player dark-scrollbar",template:e,defaultTransition:{type:"fade"},ui:{loading:".loading",previousBtn:".previous-btn",nextBtn:".next-btn"},regions:{details:".photo-player-container"},events:t.extend({"click .player-close-btn":"onCloseClick","click .play-btn":"onPlayClick","click .pause-btn":"onPauseClick","click .previous-btn":"onPreviousClick","click .next-btn":"onNextClick","click .minimize-btn":"onMinimizeClick","click .enter-fullscreen-btn":"onEnterFullscreenClick",
"click .exit-fullscreen-btn":"onExitFullscreenClick"},r.prototype.events),collectionEvents:{destroy:"onItemDestroy"},onlyAfterRender:["onPlayerCanSkipPreviousChange","onPlayerCanSkipNextChange"],initialize:function(e){e||(e={}),e.playerModelClass=i,r.prototype.initialize.call(this,e),this.addListeners()},addListeners:function(){r.prototype.addListeners.apply(this,arguments),this.listenTo(this.playerModel,{"change:loaded":this.onPlayerLoadedChange,"change:error":this.onPlayerErrorChange,"change:canSkipPrevious":this.onPlayerCanSkipPreviousChange,
"change:canSkipNext":this.onPlayerCanSkipNextChange})},startPlayback:function(){var e=this.controller.load({model:this.playerModel,autoplay:this.autoplay});return this.transition(),e},continuePlayback:function(){this.playerModel.set("loaded",!1),this.transition()},transition:function(e){e||(e=this.defaultTransition),this.nextDetails=new a({model:this.metadataItem,collection:this.playQueue.get("collection"),playerModel:this.playerModel,transition:e}),this.ui.loading.removeClass("hidden"),this.$el.addClass("show-photo-loading"),
this.$el.append(this.nextDetails.render().el),this.currentTransition=this.defaultTransition},skipPrevious:function(){this.currentTransition={type:"slide",direction:"left"},this.controller.skipPrevious()},skipNext:function(){this.currentTransition={type:"slide",direction:"right"},this.controller.skipNext()},transitionToNewImage:function(){this.ui.loading.addClass("hidden"),this.$el.removeClass("show-photo-loading"),this.nextDetails.transitionIn(),this.currentDetails&&this.currentDetails.transitionOut(this.nextDetails.transition),
this.currentDetails=this.nextDetails},onClose:function(){r.prototype.onClose.apply(this,arguments),this.currentDetails&&this.currentDetails.close(),this.nextDetails&&this.nextDetails.close()},onPlayerPlayQueueItemChange:function(e,t){this.model=t,this.metadataItem=t.get("metadataItem"),this.transition(this.currentTransition),this.updatePageTitle()},onPlayerLoadedChange:function(e,t){t&&this.transitionToNewImage()},onPlayerErrorChange:function(e,t){t&&this.transitionToNewImage()},onPlayerCanSkipPreviousChange:function(e,t){
this.ui.previousBtn.toggleClass("hidden",!t)},onPlayerCanSkipNextChange:function(e,t){this.ui.nextBtn.toggleClass("hidden",!t)},onItemDestroy:function(e){this.playerModel.get("playQueueItem")===e&&(this.playQueue.get("collection").length?this.skipNext():this.stop())},onCloseClick:function(e){e.preventDefault(),this.stop()},onPlayClick:function(e){e.preventDefault(),this.controller.play()},onPauseClick:function(e){e.preventDefault(),this.controller.pause()},onPreviousClick:function(e){e.preventDefault(),
this.skipPrevious()},onNextClick:function(e){e.preventDefault(),this.skipNext()},onMinimizeClick:function(e){e.preventDefault(),this.minimize()},onEnterFullscreenClick:function(e){e.preventDefault(),this.enterFullscreen()},onExitFullscreenClick:function(e){e.preventDefault(),this.exitFullscreen()}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1872),n(3),n(9),n(704),n(78),n(47),n(303),n(377)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.Layout.extend({mixins:i,
className:"video-post-play",template:e,regions:{countdown:".countdown"},events:{"click .next-btn":"onNextClick","click .replay-btn":"onReplayClick",mousemove:"onMouseMove"},initialize:function(e){e||(e={}),e.countdown&&this.createCountdown(e.countdown),this.previousPlayQueueItem=this.model,this.previousMetadataItem=this.previousPlayQueueItem.get("metadataItem");var t=this.collection.indexOf(this.previousPlayQueueItem)+1;this.nextPlayQueueItem=this.collection.at(t),this.nextMetadataItem=this.nextPlayQueueItem.get("metadataItem");
var n="movie"===this.previousMetadataItem.get("type")?"art":"thumb";this.previousPoster=new a({model:this.previousMetadataItem,modelAttribute:n,type:this.previousMetadataItem.get("type"),height:140}),this.nextPoster=new a({model:this.nextMetadataItem,modelAttribute:n,type:this.nextMetadataItem.get("type"),height:190}),this.backgroundImage=new r({model:this.nextMetadataItem,modelAttribute:"art",width:1280,height:720,background:!0})},onRender:function(){this.previousPoster.setElement(this.ui.previousPoster),
this.nextPoster.setElement(this.ui.nextPoster),this.backgroundImage.setElement(this.ui.background),this.totalSeconds&&this.countdown.append(new s({model:this.progressModel,size:80}))},onNextClick:function(e){e.preventDefault(),this.trigger("next",{manual:!0})},onReplayClick:function(e){e.preventDefault(),this.trigger("replay")},onMouseMove:function(e){this.lastX===e.clientX&&this.lastY===e.clientY||this.totalSeconds&&(this.startTime=0,this.lastX=e.clientX,this.lastY=e.clientY,window.cancelAnimationFrame(this.countdownAnimator),
clearInterval(this.idleTimer),this.idleTimer=setTimeout(t.bind(this.updateCountdown,this),1e3))},onClose:function(){i.onClose.apply(this,arguments),clearInterval(this.idleTimer)}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1873),n(268),n(317),n(318)],r=function(e,t,n,i){"use strict";var r=n.extend({template:e,initialize:function(e){n.prototype.initialize.apply(this,arguments),this.controlsView=new i({model:this.playerModel,upNextCollection:new t(null,{parent:this.playerModel
})}),this.addListeners()},startPlayback:function(e){return e||(e={}),this.controller.load({model:this.playerModel,offset:e.offset,autoplay:e.autoplay,silent:this.isNowPlaying(),mediaElement:e.mediaElement})},continuePlayback:function(){},onRender:function(){this.controls.append(this.controlsView,this.$el),n.prototype.onRender.apply(this,arguments)},onPrimaryPlayerChange:function(e,t){n.prototype.onPrimaryPlayerChange.apply(this,arguments),this.maximize()}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1874),n(3),n(5),n(10),n(6),n(8),n(56),n(61),n(111),n(43),n(300),n(13),n(316),n(36),n(1247),n(1288),n(1283)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v){"use strict";var g=h.extend({className:"video-player dark-scrollbar buffering",template:e,volumeSettingsKey:"videoPlayerVolume",controlsDelay:s.hasTouchScreen?4e3:2e3,ui:{container:".video-container"},regions:{controls:".video-controls-container",postPlay:".video-post-play-container"},events:t.extend({"click .player-close-btn":"onCloseClick",
mousemove:"onMouseMove"},h.prototype.events),postPlayDuration:10,awakeTime:72e5,maximumDurationForAutoadvance:12e5,minimumDurationForPostPlay:3e5,initialize:function(e){this.playQueue=e.playQueue,h.prototype.initialize.apply(this,arguments),this.controlsView=new m({model:this.playerModel}),d.execute("playBackgroundMedia"),this.startSleepProtection(),this.addListeners()},addListeners:function(){h.prototype.addListeners.apply(this,arguments),this.listenTo(this.playerModel,{"change:ready":this.onPlayerReadyChange,
"change:embedHtml":this.onPlayerEmbedHtmlChange}),this.listenTo(this.controlsView,"toggleControls",this.toggleControls)},startPlayback:function(e){if(e||(e={}),this.isNowPlaying())return this.load(t.extend({},e,{silent:!0}));var i=n.Deferred(),r=this.resolveOffset(e);return r.done(this.whenRendered(function(n){this.load(t.extend({},e,{offset:n,silent:!1})).done(t.bind(i.resolve,i)).fail(t.bind(i.reject,i))})),r.fail(t.bind(this.stop,this)).fail(t.bind(i.reject,i)),i.promise()},continuePlayback:function(){
this.controlsView.replaceVideo(this.controller.mediaElement),this.playerModel.get("ready")&&(this.onPlayerReadyChange(this.playerModel,!0),this.onPlayerStateChange(this.playerModel,this.playerModel.get("state")))},resolveOffset:function(e){var i=n.Deferred(),r=e.offset||this.offset;if(t.isNumber(r))return i.resolve(r).promise();var s=this.metadataItem.get("viewOffset");if(!s)return i.resolve(0).promise();var o=new f({offset:s}),l=o.promise;return l.done(function(e){i.resolve(e)}),l.fail(function(){
i.reject()}),a.trigger("show:modal",o),i.promise()},load:function(e){var t=i.resolve("appModel");return this.controller.load({model:this.playerModel,media:this.media,offset:e.offset,autoplay:e.autoplay,postplay:!t.get("primaryPlayer"),silent:e.silent,mediaElement:e.mediaElement||this.controls.currentView.ui.video[0]})},stop:function(){var e,t,s=n.Deferred().resolve().promise(),o=i.resolve("appModel"),l=!o.get("primaryPlayer");if(this.metadataItem&&l&&(e=this.metadataItem.server.get("playQueueManager"),
t=e.getFor(this.metadataItem)),t&&t.get("hasUserAdditions")){var u=new p({title:r("Finish Watching Queue"),message:r("This will clear the contents of your play queue.")});s=u.promise,a.trigger("show:modal",u)}return s.then(function(){a.trigger("hide:player")}),s},canAutoplay:function(e){return!o.mobile&&(null==e||e!==u.states.PAUSED)},showVideo:function(e){this.$el.toggleClass("show-html-video","html"===e),this.$el.toggleClass("show-flash-video","flash"===e),this.$el.toggleClass("show-placeholder-video",!e);
},hideVideo:function(){this.$el.removeClass("show-html-video show-flash-video show-placeholder-video")},toggleControls:function(e){this.controller.model&&this.controller.model.get("ready")&&"flash"!==this.controller.playerType&&(e||(e={}),this.controlsView.visible||this.controlsView.transitionIn(),this.controlsTimeout=clearTimeout(this.controlsTimeout),e.autohide&&(this.controlsTimeout=setTimeout(this.controlsView.transitionOut,this.controlsDelay)))},startSleepProtection:function(){clearTimeout(this.sleepTimeout),
this.isDefinitelyAwake||(this.isPotentiallyAsleep?this.isDefinitelyAwake=!0:this.sleepTimeout=setTimeout(t.bind(this.onSleep,this),this.awakeTime))},onRender:function(){this.controls.show(this.controlsView),h.prototype.onRender.apply(this,arguments)},onClose:function(){h.prototype.onClose.apply(this,arguments),this.controlsTimeout=clearTimeout(this.controlsTimeout),this.sleepTimeout=clearTimeout(this.sleepTimeout),this.controller.model&&!this.isContinuing&&l.abortAll("player")},onPlayerReadyChange:function(e,t){
t?(this.showVideo(this.controller.playerType),this.controller.companion?this.toggleControls():this.toggleControls({autohide:!0})):this.hideVideo()},onPlayerStateChange:function(e,t){h.prototype.onPlayerStateChange.apply(this,arguments),this.controller.companion||(t===u.states.ERROR&&this.hideVideo(),clearTimeout(this.controlsTimeout),this.controlsTimeout=setTimeout(this.controlsView.transitionOut,this.controlsDelay)),this.$el.toggleClass("stopped",e.get("stopped")),this.$el.toggleClass("paused",e.get("paused")),
this.$el.toggleClass("playing",e.get("playing")),this.$el.toggleClass("buffering",e.get("buffering")),this.$el.toggleClass("error",e.get("error"))},onPlayerEmbedHtmlChange:function(e,t){this.ui.container.html(t)},onPlayerFinishedChange:function(e,t){if(t){var n=this.metadataItem.get("duration")<this.minimumDurationForPostPlay,i=this.metadataItem.get("extraType")===c.get("trailer").id;if(this.model===this.playQueue.get("collection").last())this.model.server.get("playQueueManager").remove("video"),
a.trigger("hide:player");else if(n||i)this.controller.skipNext();else{this.hideVideo();var r={model:this.model,collection:this.playQueue.get("collection")},s=this.metadataItem.get("duration")<this.maximumDurationForAutoadvance;(!this.isPotentiallyAsleep||this.isDefinitelyAwake||s)&&(r.countdown=this.postPlayDuration);var o=new v(r);this.listenTo(o,{replay:this.onPostPlayReplay,next:this.onPostPlayNext}),this.postPlay.show(o)}}},onPostPlayReplay:function(){this.startSleepProtection(),this.stopListening(this.postPlay.currentView),
this.postPlay.close(),this.controller.setPosition(0,{autoplay:!0}),this.showVideo(this.controller.playerType)},onPostPlayNext:function(e){e&&e.manual&&this.startSleepProtection(),this.stopListening(this.postPlay.currentView),this.postPlay.close(),this.controller.skipNext()},onSleep:function(){this.isPotentiallyAsleep=!0},onCloseClick:function(e){e.preventDefault(),this.stop()},onMouseMove:function(e){this.lastX===e.clientX&&this.lastY===e.clientY||(this.lastX=e.clientX,this.lastY=e.clientY,this.controller.companion||this.playerModel.get("finished")||this.toggleControls({
autohide:!0}))}});return g}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(498)],r=function(e){"use strict";var t=e.extend({className:"video-player-alert alert alert-sm transition-in",alertDuration:5e3});return t}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1878),n(3),n(9),n(451),n(174),n(106),n(78)],r=function(e,t,n,i,r,a,s){"use strict";var o=n.ItemView.extend({className:"player-scrub-preview",template:e,areThumbnailsAvailable:null,thumbnailPreferredIndex:"sd",
thumbnailWidth:240,ui:{scrubPreviewThumbnail:".player-scrub-preview-thumbnail",scrubPreviewTooltip:".player-scrub-preview-tooltip",scrubPreviewTime:".player-scrub-preview-time"},modelEvents:{"change:metadataItem":"onMetadataItemChange"},initialize:function(){this.throttledShowThumbnail=t.throttle(this.whenRendered(this.showThumbnail),200),this.thumbnailImage=new s({model:this.model.get("metadataItem"),width:this.thumbnailWidth,height:r.getPosterHeight("art",this.thumbnailWidth)})},show:function(){
this.$el.removeClass("hidden")},hide:function(){this.$el.addClass("hidden"),this.ui.scrubPreviewThumbnail.addClass("hidden")},positionContainer:function(){this.$el.css("left",this.position-this.$el.width()/2+"px")},updatePreview:function(e){this.position=e.position,this.ui.scrubPreviewTime.text(a(e.time)),this.positionContainer(),this.areThumbnailsAvailable!==!1&&this.throttledShowThumbnail(e.time)},showThumbnail:function(e){if(this.model.get("media")){var t=this.getScreenshotUrl(e);t?(this.areThumbnailsAvailable=!0,
this.thumbnailImage.load(t).done(this.whenRendered(function(e){this.$el.hasClass("hidden")||(this.thumbnailImage.showImage(e),this.ui.scrubPreviewThumbnail.removeClass("hidden"),this.positionContainer())}))):this.areThumbnailsAvailable=!1}},getScreenshotUrl:function(e){var t=e+6e3;return i(this.model.get("media"),t,this.thumbnailPreferredIndex)},onRender:function(){this.thumbnailImage.setElement(this.ui.scrubPreviewThumbnail)},onClose:function(){this.thumbnailImage.close()},onMetadataItemChange:function(e,t){
this.ui.scrubPreviewThumbnail.addClass("hidden"),this.areThumbnailsAvailable=null,this.thumbnailImage.setModel(t),this.thumbnailImage.src=null}});return o}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1879),n(3),n(5),n(9),n(10),n(6),n(61),n(8),n(56),n(106),n(31),n(268),n(78),n(47),n(864),n(866),n(523),n(236),n(1290),n(1291),n(1289),n(1287),n(1286),n(499),n(193),n(192)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y,b,w,S,P,x,C,T){"use strict";var _=i.Layout.extend({className:"video-controls transition-out",
template:e,visible:!1,muted:!1,mutedVolume:0,ui:{video:"#html-video",poster:".media-poster",background:".video-background",volumeBtn:".volume-btn",errorMessage:".video-error-message",errorSkipMessage:".video-error-skip-message",dropdowns:".player-dropdowns-container",dropups:".player-dropups-container"},regions:{subtitles:".video-subtitles-container",seekBar:".seek-bar-container",volume:".player-volume-slider-container",playQueueDropdown:"#player-play-queue-dropdown",qualityDropdown:"#player-quality-dropdown",
audioDropdown:"#player-subtitles-dropdown",subtitlesDropdown:"#player-audio-dropdown",playerDropdown:"#player-primary-player-dropdown",scrubPreview:".player-scrub-preview-container",imageOverlaysRegion:".video-image-overlays-region",alertRegion:".video-alert-region"},modelEvents:{"change:metadataItem":"onMetadataItemChange","change:subtitlesUrl":"onPlayerSubtitlesUrlChange","change:volume":"onVolumeChange","change:errorMessage":"onErrorMessageChange","change:bufferingMessage":"onBufferingMessageChange",
"change:showQuality":"onShowQualityChange","change:showAudioStream":"onShowAudioStreamChange","change:showSubtitleStream":"onShowSubtitleStreamChange"},events:{"click .volume-btn":"onVolumeClick","click .enter-fullscreen-btn":"onEnterFullscreenClick","click .exit-fullscreen-btn":"onExitFullscreenClick","click .video-overlay-btn":"onOverlayClick","click .share-btn":"onShareClick","click .recommend-btn":"onRecommendClick","click .video-error-message-center":"onErrorMessageClick"},triggers:{"click .play-btn":"play",
"click .pause-btn":"pause","click .previous-btn":"previous","click .next-btn":"next","click .minimize-btn":"minimize"},onlyAfterRender:["onVolumeChange","onErrorMessageChange"],initialize:function(){t.bindAll(this,"onMobileVideoClose"),this.bindAllWhenRendered("transitionIn","transitionOut"),this.metadataItem=this.model.get("metadataItem"),this.upNextCollection=new d(null,{parent:this.model}),this.posterImage=new p({model:this.metadataItem,type:"movie",getUrl:this.getPosterUrl,width:100}),this.backgroundImage=new h({
server:this.metadataItem.server,width:1280,height:720}),this.seekBarView=new v({model:this.model}),this.playQueueDropdownView=new x({model:this.model,collection:this.upNextCollection}),this.volumeSlider=new g({className:"player-volume-slider player-slider",value:this.model.get("volume")}),this.listenTo(this.seekBarView,"change:value",this.onSeekBarValueChange),this.listenTo(this.seekBarView,"hover",this.onSeekBarHover),this.listenTo(this.volumeSlider,"change:value",this.onVolumeSliderValueChange),
this.listenTo(this.playQueueDropdownView,"itemview:skip",this.onSkip),this.listenTo(this.playQueueDropdownView,"itemview:remove",this.onRemove),this.listenTo(this.playQueueDropdownView,"move",this.onMove)},getPosterUrl:function(e){return this.model.get("parentThumb")||this.model.get("grandparentThumb")||e},transitionIn:function(){this.visible=!0,this.$el.removeClass("transition-out")},transitionOut:function(){this.$(".dropdown.open, .dropup.open").length||(this.visible=!1,this.$el.addClass("transition-out"),
this.scrubPreview.currentView.hide())},updateDropdownVisibility:function(e,t){var n=e.currentView;n&&n.$el.toggleClass("hidden",!t)},updateVolumeBtn:function(e){var t=this.ui.volumeBtn;e>50?(this.muted=!1,t.addClass("high"),t.removeClass("low mute")):e<=50&&e>0?(this.muted=!1,t.addClass("low"),t.removeClass("high mute")):(this.muted=!0,t.addClass("mute"),t.removeClass("high low"))},replaceVideo:function(e){var t=n(e);this.ui.video.off("webkitendfullscreen",this.onMobileVideoClose),t.attr("id",this.ui.video.attr("id")),
t.attr("class",this.ui.video.attr("class")),this.ui.video.replaceWith(t),this.ui.video=t,t.on("webkitendfullscreen",this.onMobileVideoClose)},createErrorSkipInterval:function(){this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.errorSkipCounter=5,this.updateErrorSkipMessage(this.errorSkipCounter),this.errorSkipInterval=setInterval(t.bind(this.onErrorSkipInterval,this),1e3)},updateErrorSkipMessage:function(e){this.ui.errorSkipMessage.text(a("Skipping in {1} seconds...",e))},bindings:{
".video-title":{modelAttribute:"metadataItem",autohide:!0,formatter:function(e){return e.get("title")}},".video-background":{modelAttribute:"metadataItem",manual:!0,formatter:function(e,n){var i=e.get("art")||e.channel&&e.channel.get("art");if(n.css("background-image","none"),n.addClass("transition-out"),!i)return this.currentArt=null,void(this.currentArtSrc=null);var r=t.bind(function(e){this.currentArt=i,this.currentArtSrc=e,n.css("background-image","url("+e+")"),n.removeClass("transition-out");
},this);this.currentArt===i?r(this.currentArtSrc):this.backgroundImage.load(i,!0).done(r)}},".play-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),e}},".pause-btn":{modelAttribute:"paused",modelListeners:["paused","canPlayPause"],manual:!0,autohide:!0,formatter:function(e,t){return t.toggleClass("disabled",!this.model.get("canPlayPause")),!e}},".previous-btn":{modelAttribute:"canSkipPrevious",
manual:!0,autohide:function(){var e=this.model.get("playQueue");return e&&e.get("collection").length>1},formatter:function(e,t){t.toggleClass("disabled",!e)}},".next-btn":{modelAttribute:"canSkipNext",manual:!0,autohide:function(){var e=this.model.get("playQueue");return e&&e.get("collection").length>1},formatter:function(e,t){t.toggleClass("disabled",!e)}},".player-position":{modelAttribute:"position",formatter:function(e){return u(e)}},".player-duration":{modelAttribute:"duration",formatter:function(e){
return u(e)}},".volume-btn":{modelAttribute:"canSetVolume",manual:!0,autohide:!0,formatter:function(e,t){return this.$el.toggleClass("show-volume",e),e}},".minimize-btn":{modelAttribute:"showMinimize",manual:!0,autohide:!0},".enter-fullscreen-btn":{modelAttribute:"showEnterFullscreen",manual:!0,autohide:!0},".exit-fullscreen-btn":{modelAttribute:"showExitFullscreen",manual:!0,autohide:!0},".share-btn, .recommend-btn":{modelAttribute:"metadataItem",manual:!0,autohide:function(e){var n=r.resolve("appModel"),i=n.get("user"),a=t.contains(["clip","userPlaylistItem"],e.get("type"));
return e.get("url")&&i.get("signedIn")&&a}},".primary-player-name":{modelAttribute:"friendlyName",autohide:!0,formatter:function(e){if(e)return a("Casting to {1}",e)}}},onRender:function(){this.ui.video.on("webkitendfullscreen",this.onMobileVideoClose),this.posterImage.setElement(this.ui.poster),this.seekBar.append(this.seekBarView),this.volume.show(this.volumeSlider);var e=this.model.get("playQueue");e&&e.get("collection").length>1&&this.playQueueDropdown.append(this.playQueueDropdownView,this.ui.dropups),
this.updateVolumeBtn(this.model.get("volume")),this.scrubPreview.append(new S({model:this.model})),this.qualityDropdown.append(new y({model:this.model}),this.ui.dropdowns),this.audioDropdown.append(new b({model:this.model,type:"audio"}),this.ui.dropdowns),this.subtitlesDropdown.append(new b({model:this.model,type:"subtitles"}),this.ui.dropdowns),this.playerDropdown.append(new w,this.ui.dropdowns),this.imageOverlaysRegion.show(new m({model:this.model})),this.updateDropdownVisibility(this.qualityDropdown,this.model.get("showQuality")),
this.updateDropdownVisibility(this.audioDropdown,this.model.get("showAudioStream")),this.updateDropdownVisibility(this.subtitlesDropdown,this.model.get("showSubtitleStream"))},onClose:function(){this.ui.video.off("webkitendfullscreen",this.onMobileVideoClose),this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.posterImage.close(),this.backgroundImage.close()},onMetadataItemChange:function(e,t){this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.posterImage.src=null,this.posterImage.setModel(t),
this.posterImage.render(),this.backgroundImage.src=null},onPlayerSubtitlesUrlChange:function(e,t){t?this.subtitles.show(new f({model:e,subtitleSize:c.get("subtitleSize"),rendererOptions:{enableSvg:"safari"!==s.id}})):this.subtitles.close()},onVolumeChange:function(e,t){this.volumeSlider.displayValue(t),this.updateVolumeBtn(t)},onErrorMessageChange:function(e,t){var n=r.resolve("appModel"),i=n.has("primaryPlayer");if(this.ui.errorMessage.text(t),this.ui.errorSkipMessage.text(""),t&&!i){var a=e.get("playQueue").get("collection");
if(a.length>1){var s=e.get("playQueueItem"),o=a.at(a.length-1);s.id!==o.id&&this.createErrorSkipInterval()}}},onErrorSkipInterval:function(){this.errorSkipCounter--,this.updateErrorSkipMessage(this.errorSkipCounter),0===this.errorSkipCounter&&(this.errorSkipInterval=clearInterval(this.errorSkipInterval),this.trigger("next"))},onBufferingMessageChange:function(e,t){t?this.alertRegion.show(new P({message:t})):this.alertRegion.close()},onShowQualityChange:function(e,t){this.updateDropdownVisibility(this.qualityDropdown,t);
},onShowAudioStreamChange:function(e,t){this.updateDropdownVisibility(this.audioDropdown,t)},onShowSubtitleStreamChange:function(e,t){this.updateDropdownVisibility(this.subtitlesDropdown,t)},onSeekBarValueChange:function(e){this.trigger("change:position",e)},onSeekBarHover:function(e){e?(this.scrubPreview.currentView.updatePreview(e),this.scrubPreview.currentView.show()):this.scrubPreview.currentView.hide()},onVolumeSliderValueChange:function(e){this.trigger("change:volume",e)},onVolumeClick:function(e){
e.preventDefault(),this.muted?(this.mutedVolume>0?this.trigger("change:volume",this.mutedVolume):this.trigger("change:volume",100),this.muted=!1,this.mutedVolume=0):(this.muted=!0,this.mutedVolume=this.model.get("volume"),this.trigger("change:volume",0))},onEnterFullscreenClick:function(e){e.preventDefault(),this.model.get("forceWebkitVideoFullscreen")?this.ui.video[0].webkitEnterFullscreen():this.trigger("enterFullscreen")},onExitFullscreenClick:function(e){e.preventDefault(),this.trigger("exitFullscreen");
},onMobileVideoClose:function(e){o.trigger("hide:player")},onOverlayClick:function(e){e.preventDefault();var t=this.model.get("playing"),n=t?"pause":"play";return"pause"===n&&l.hasTouchScreen&&!this.visible?void this.trigger("toggleControls",{autohide:!0}):void this.trigger(n)},onShareClick:function(e){e.preventDefault(),o.trigger("show:modal",new C({model:this.metadataItem}))},onRecommendClick:function(e){e.preventDefault(),o.trigger("show:modal",new T({model:this.metadataItem}))},onErrorMessageClick:function(e){
e.preventDefault(),this.errorSkipInterval?this.trigger("next"):o.trigger("hide:player")},onSkip:function(e,t){this.trigger("skip",t)},onRemove:function(e,t){this.trigger("remove",t)},onMove:function(e,t){this.trigger("move",e,t)}});return _}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1880),n(500)],r=function(e,t){"use strict";var n=t.extend({id:"player-primary-player-dropdown",tagName:"span",className:"dropdown",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1881),n(3),n(5),n(9),n(82),n(31)],r=function(e,t,n,i,r,a){"use strict";var s=i.ItemView.extend({id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:e,modelEvents:{"change:transcodeServer":"render","change:qualityIndex":"render","change:media":"render"},events:{"click .dropdown-menu a":"onQualityClick"},serializeData:function(){var e=this.model.get("transcodeServer"),n=this.model.get("media"),i=r.getAvailableQualitiesFor(n,e);if(!i.length||!this.model.get("canSetQuality"))return void this.model.set("showQuality",!1);
this.model.set("showQuality",!0);var a=this.model.get("qualityIndex"),s=t.findWhere(i,{index:a});return s&&(s.selected=!0),{availableQualities:i.reverse(),hasSelectedQuality:!!s}},onQualityClick:function(e){e.preventDefault();var t=n(e.currentTarget);if(!t.hasClass("selected")){var i=r.getQualityAttribute(this.model.get("metadataItem")),s=parseInt(t.data("index"),10);a.save(i,s),this.model.set("qualityIndex",s)}}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1882),n(3),n(5),n(9),n(10),n(92),n(286),n(71),n(13)],
r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=i.ItemView.extend({id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:e,modelEvents:{"change:media":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=o.get(e.type);var t=this.streamType.typeString;this.capabilityAttr="audio"===t?"canSetAudioStream":"canSetSubtitleStream",this.visibilityAttr="audio"===t?"showAudioStream":"showSubtitleStream",this.$el.attr("id",t+"-dropdown-list"),
this.listenTo(this.model,"change:"+this.capabilityAttr,this.render),this.listenTo(this.model,"change:"+this.streamType.key,this.render)},serializeData:function(){var e=this.model.get("media"),t=this.streamType.typeString;if(!e||!this.model.get(this.capabilityAttr))return this.model.set(this.visibilityAttr,!1),{type:t};this.model.get(this.visibilityAttr)&&this.$el.hasClass("hidden")&&this.$el.removeClass("hidden");var n=a(e,{streamType:this.streamType.id});if(n.length<2)return this.model.set(this.visibilityAttr,!1),
{type:t};this.model.set(this.visibilityAttr,!0);var i,r=a(e,{streamType:this.streamType.id,selected:!0});return r.length&&(i=r[0]),{type:t,streams:n,selectedStream:i}},onStreamClick:function(e){e.preventDefault();var i=r.resolve("appModel"),a=n(e.currentTarget),o=a.data("id");if(i.has("primaryPlayer"))s(this.model.get("media"),this.streamType,o),this.model.set(this.streamType.key,o);else{var u=l.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),
streamType:this.streamType,streamID:o});u.done(t.bind(function(){this.model.set(this.streamType.key,o)},this))}}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1653),a=i(r),s=n(9),o=i(s),l=o.default.ItemView.extend({initialize:function(e){this.reason=e.reason},template:a.default,className:"lyrics-error",serializeData:function(){return{reason:this.reason}}});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1654),a=i(r),s=n(9),o=i(s),l=n(1296),u=i(l),c=o.default.CollectionView.extend({initialize:function(){this.collection=this.model.get("spans")},template:a.default,className:function(){return["lyrics-line",0===this.model.get("spans").length?"lyrics-line-blank":""].join(" ")},itemView:u.default});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var i=n(1472).default,r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(1655),s=r(a),o=n(3),l=n(9),u=r(l),c=n(1293),d=r(c),h=n(437),p=r(h);n(643);var f=u.default.CollectionView.extend(i([{key:"initialize",value:function(){this.listenTo(this.collection.parent,"change:follow",this.onFollowChange)}},{key:"template",initializer:function(){return s.default}},{key:"className",initializer:function(){return"lyrics-lines dropup-scrollbar"}},{key:"itemView",initializer:function(){return d.default}},{key:"modelEvents",initializer:function(){return{"change:position":"onPositionChange"
}}},{key:"onlyAfterRender",initializer:function(){return["onPositionChange"]}},{key:"activateSpansAtPosition",value:function(e){if(this.collection.parent.get("timed")){var t=void 0,n=this.shouldFollow();this.collection.eachSpan(function(i){var r=i.isPositionWithin(e);r&&!i.get("active")&&(t=i),i.set("active",n&&r)}),n&&this.scrollToSpan(t)}}},{key:"scrollToSpan",value:function(e){if(e){var t=this.children.findByModel(e.parent);t&&t.$el.scrollIntoView({center:!0})}}},{key:"scrollToActive",value:function(){
if(this.shouldFollow()){var e=void 0;this.collection.eachSpan(function(t){t.get("active")&&(e=t)}),this.scrollToSpan(e)}}},{key:"shouldFollow",value:function(){var e=this.collection.parent;return e.get("timed")&&e.get("follow")}},{key:"onRender",value:function(){this.activateSpansAtPosition(this.model.get("position")),(0,o.defer)((0,o.bind)(this.scrollToActive,this))}},{key:"onPositionChange",decorators:[(0,p.default)(200)],value:function(e,t){this.activateSpansAtPosition(t)}},{key:"onFollowChange",
value:function(e,t){t&&this.scrollToActive()}}]));t.default=f,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1656),a=i(r),s=n(9),o=i(s),l=o.default.ItemView.extend({template:a.default,className:"lyrics-loading"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1657),a=i(r),s=n(9),o=i(s),l=o.default.ItemView.extend({template:a.default,
tagName:"span",className:function(){return["lyrics-span",this.model.get("active")?"highlight":""].join(" ")},modelEvents:{"change:active":"onActiveChange"},onActiveChange:function(e,t){this.$el.toggleClass("highlight",t)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1658),a=i(r),s=n(9),o=i(s),l=o.default.ItemView.extend({template:a.default,tagName:"span",className:"lyrics-streams",ui:{prevLyricsBtn:".prev-lyrics-btn",
nextLyricsBtn:".next-lyrics-btn",timedBtn:".timed-btn",lyricsStreamsControls:".lyrics-controls",lyricsStreamsIndex:".lyrics-streams-index",lyricsStreamsLength:".lyrics-streams-length",lyricfindVendorLogo:".vendor-logo-lyricfind"},events:{"click .prev-lyrics-btn":"onPrevLyricsClick","click .next-lyrics-btn":"onNextLyricsClick","click .timed-btn":"onTimedClick"},modelEvents:{"change:metadataItem":"onMetadataItemChange"},collectionEvents:{"change:selected":"onSelectedChange","change:follow":"onFollowChange",
"change:timed":"onTimedChange"},onlyAfterRender:["renderControls","renderTimedBtn"],initialize:function(){this.collection&&this.listenTo(this.collection,"change:selected",this.onSelectedChange)},getSelectedLyricsIndex:function(){var e=this.collection.findWhere({selected:!0});return this.collection.indexOf(e)},renderControls:function(){var e=this.collection.findWhere({selected:!0}),t=this.collection.indexOf(e);this.ui.prevLyricsBtn.prop("disabled",0===t),this.ui.nextLyricsBtn.prop("disabled",t===this.collection.length-1),
this.ui.lyricsStreamsIndex.text(t+1),this.ui.lyricsStreamsLength.text(this.collection.length),e&&this.ui.lyricfindVendorLogo.toggleClass("hidden","com.plexapp.agents.lyricfind"!==e.get("provider")),this.renderTimedBtn()},renderTimedBtn:function(){var e=this.collection.findWhere({selected:!0}),t=e&&e.get("timed"),n=t&&e&&e.get("follow");this.ui.timedBtn.prop("disabled",!t).toggleClass("activated",!!n)},onRender:function(){this.renderControls()},onMetadataItemChange:function(){this.renderControls();
},onSelectedChange:function(e,t){t&&this.renderControls()},onFollowChange:function(){this.renderTimedBtn()},onPrevLyricsClick:function(){this.ui.prevLyricsBtn.isDisabled()||this.collection.at(this.getSelectedLyricsIndex()-1).set("selected",!0)},onNextLyricsClick:function(){this.ui.nextLyricsBtn.isDisabled()||this.collection.at(this.getSelectedLyricsIndex()+1).set("selected",!0)},onTimedChange:function(){this.renderTimedBtn()},onTimedClick:function(){if(!this.ui.timedBtn.isDisabled()){var e=this.collection.findWhere({
selected:!0});e.set("follow",!e.get("follow"))}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(1659),a=i(r),s=n(5),o=i(s),l=n(9),u=i(l),c=n(6),d=i(c),h=n(1297),p=i(h),f=n(1294),m=i(f),v=n(1292),g=i(v),y=n(1295),b=i(y),w=u.default.Layout.extend({template:a.default,ui:{lyricsLoading:".lyrics-loading"},regions:{streamsRegion:".lyrics-streams-region",lyricsRegion:".lyrics-region"},onlyAfterRender:["renderLyrics","renderLyricsLines","renderLyricsError","renderLyricsLoading"],
getLyricsStreams:function(){return this.model.get("playQueueItem").get("lyricsStreams")},populateLyricsStream:function(){var e=this,t=o.default.Deferred(),n=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection;n&&this.stopListening(n);var i=this.getLyricsStreams();if(!i)return t.reject((0,d.default)("No lyrics available.")).promise();var r=i.findWhere({selected:!0})||i.first();return this.populatingLyricsStream&&this.populatingLyricsStream!==r&&this.populatingLyricsStream.abortPendingPopulate(),
r.populate().always(function(){r.set("selected",!0),e.listenTo(i,"change:selected",e.onLyricsSelectedChange)}).fail(function(){t.reject((0,d.default)("An error occurred loading these lyrics."))}).then(function(){return t.resolve(r)}),this.populatingLyricsStream=r,t.promise()},renderLyrics:function(){var e=this,t=this.getLyricsStreams(),n=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection,i=t!==n,r=this.populateLyricsStream();"pending"===r.state()&&this.renderLyricsLoading(),
r.done(function(t){e.renderLyricsLines(t)}),r.fail(function(t){e.renderLyricsError(t)}),i&&r.always(function(){var t=e.getLyricsStreams();t?e.streamsRegion.show(new p.default({model:e.model,collection:e.getLyricsStreams()})):e.streamsRegion.close()})},renderLyricsLines:function(e){var t=new m.default({model:this.model,collection:e.get("lines")});this.lyricsRegion.show(t),t.scrollToActive()},renderLyricsError:function(e){this.lyricsRegion.show(new g.default({reason:e}))},renderLyricsLoading:function(){
this.lyricsRegion.show(new b.default)},onRender:function(){this.renderLyrics()},onLyricsSelectedChange:function(e,t){t&&this.renderLyrics()},onItemChange:function(){this.close()}});t.default=w,e.exports=t.default},function(e,t,n){var i,r;i=[n(33),n(1300)],r=function(e,t){"use strict";var n=e.extend({tagName:"ul",className:"tile-list media-tile-list playlist-tile-list",itemView:t,modelEvents:{"change:currentSort":"onListRefresh","change:currentType":"onListRefresh"},onListRefresh:function(){var e=this.model.get("items");
e.get("playlists").reset(),e.fetch({scope:"page"})}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1883),n(3),n(5),n(9),n(6),n(8),n(218),n(13),n(233),n(187),n(515)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=i.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item playlist-tile-list-item playlist",template:e,events:{"click .play-btn":"onPlayClick","click .edit-btn":"onEditClick","click .more-btn":"onMoreClick","hide.bs.dropdown .playlist-actions-dropdown":"onDropdownHide"
},ui:{composite:".media-poster",actions:".media-poster-actions",dropdown:".media-actions-dropdown"},bindings:{".playlist-title":{modelAttribute:"title"},".playlist-duration":{modelAttribute:"duration",modelListeners:["duration","leafCount"],formatter:function(e){return e?s(e):1===this.model.get("leafCount")?r("1 Item"):r("{1} Items",this.model.get("leafCount"))}}},initialize:function(){t.bindAll(this,"onResize"),this.compositeImage=new l({model:this.model,width:150}),a.trigger("content.subscribe:resize",this.onResize);
},serializeData:function(){var e="#!/server/"+encodeURIComponent(this.model.server.id);return e+="/playlist/"+this.model.get("ratingKey"),{url:e,smart:this.model.get("smart")}},onRender:function(){this.compositeImage.setElement(this.ui.composite)},onClose:function(){this.compositeImage.close(),a.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),o.execute("playMedia",{item:this.model
})},onEditClick:function(e){e.preventDefault(),a.trigger("show:modal",new c({model:this.model}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new u({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=n(e.currentTarget),i=this.ui.actions.position().top,r=this.dropdown.getPosition(t,this.containerSize,i);this.ui.dropdown.css(r)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),
this.dropdown=null,this.$el.removeClass("force-hover"))}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1884),n(9),n(8),n(1089),n(1104),n(1299)],r=function(e,t,n,i,r,a){"use strict";var s=t.Layout.extend({className:"section-container",template:e,regions:{list:".playlists-container"},initialize:function(){n.trigger("show:bar","actionbar",new i({model:this.model})),n.trigger("show:bar","breadcrumbbar",new r({model:this.model}))},onRender:function(){this.list.append(new a({
model:this.model,collection:this.model.get("items").get("playlists")}),this.$el)},onClose:function(){n.trigger("hide:bar","actionbar"),n.trigger("hide:bar","breadcrumbbar")}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1885),n(9),n(170),n(8),n(31),n(510),n(508),n(509),n(117)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u=t.Layout.extend({className:"section-list-container",template:e,ui:{loading:".section-loading-container",emptyMessageContainer:".empty-message"
},regions:{list:"ul"},modelEvents:{"change:selecting":"onSelectingChange","change:currentType":"onCurrentTypeChange","change:currentFilters":"onListRefresh","change:currentSort":"onListRefresh","change:currentFirstCharacter":"onCurrentFirstCharacterChange","socket:timeline":"onTimeline","change:refreshing":"showEmptyMessage"},events:{"click .add-to-library-link":"onAddToLibraryLinkClick"},onlyAfterRender:["showLoading","hideLoading","showEmptyMessage"],initialize:function(e){this.listenTo(r.getInstance(),"change:listType",this.onListTypeChange),
this.listModel=e.listModel,this.mediaActions=e.mediaActions,this.listenTo(this.listModel,"change:totalSize",this.showEmptyMessage),this.fetchTotalSize()},serializeData:function(){return{canEdit:this.model.server.get("isFullOwnedServer")}},fetchTotalSize:function(){var e=this.list.currentView;e&&(e.isRefreshing=!0),this.listModel.abortPendingPopulate(),this.listModel.resetPopulatePromise(null),this.listModel.set({currentPageStart:null,currentPageSize:null}),this.listModel.getCollection().reset(),this.listModel.fetchRange({
start:0,size:0,scope:"page"}).done(this.whenRendered(function(){this.list.currentView&&(this.list.currentView.isRefreshing=!1,this.list.currentView.onCollectionReset(this.listModel.get("metadataItems"))),this.showEmptyMessage()}))},showLoading:function(e){e||(e={});var t=this.list.currentView,n=t.itemsPerPage,i=this.listModel.getTotalSize();this.ui.loading.toggleClass("has-scrollbar",i>n),this.ui.loading.toggleClass("bottom",!e.prepend),this.ui.loading.removeClass("hidden")},hideLoading:function(){
this.ui.loading.addClass("hidden")},showEmptyMessage:function(){this.ui.emptyMessageContainer.removeClass("folder filter refreshing default");var e=this.listModel.getTotalSize(),t=this.list.currentView;if(!(0!==e||t&&t.isRefreshing)){var n=this.model.get("currentSubset"),i=this.model.get("currentFilters");n&&"folder"===n.id?this.ui.emptyMessageContainer.addClass("folder"):n&&"all"!==n.id?this.ui.emptyMessageContainer.addClass("filter"):i&&i.length?this.ui.emptyMessageContainer.addClass("filter"):this.model.get("refreshing")?this.ui.emptyMessageContainer.addClass("refreshing"):this.ui.emptyMessageContainer.addClass("default");
}},getListConstructor:function(){var e=r.getInstance().getSectionListType(this.model);switch(e){case"media-details-list":return s;case"media-list":return o;default:return a}},onRender:function(){var e=this.getListConstructor();if(e){var t=new e({listModel:this.listModel,collection:this.listModel.get("metadataItems"),paginated:this.model.server.get("isFullServer"),mediaActions:this.mediaActions});this.list.append(t,this.$el),this.listenTo(this.list.currentView,{"change:loading":this.onLoadingChange
})}},onClose:function(){this.listModel.getCollection().reset()},onSelectingChange:function(e,t){this.$el.toggleClass("hide-actions",t)},onCurrentTypeChange:function(){this.onListRefresh();var e=r.getInstance().getSectionListType(this.model),t=r.getInstance().getSectionListType(this.model,this.model.previous("currentType"));e!==t&&this.render()},onListRefresh:function(){this.listModel.scrollPosition=0,this.fetchTotalSize(),this.showLoading()},onListTypeChange:function(e,t){this.list.currentView.scrollPosition=0,
this.listModel.get("populatedRange").start>0&&this.fetchTotalSize(),this.render()},onCurrentFirstCharacterChange:function(e,t){for(var n=e.get("firstCharacters"),i=0,r=0,a=n.length;r<a;r++){var s=n.at(r);if(t.id===s.id)break;i+=s.get("size")}this.list.currentView.scrollToIndex(i)},onTimeline:function(e){if(e.state===n.CREATED||e.state===n.DELETED){var t=this.model.get("currentSubset"),i=this.model.get("currentType");"folder"!==t.id&&e.type!==i.id||this.list.currentView.merge()}},onLoadingChange:function(e,t){
e?this.showLoading(t):this.hideLoading()},onAddToLibraryLinkClick:function(e){e.preventDefault(),i.trigger("show:modal",new l({server:this.model.server,model:this.model,selectedPane:"folders"}))}});return u}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1886),n(3),n(9),n(8),n(10),n(149),n(95),n(729),n(730),n(1090),n(1105),n(1101),n(1302)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){"use strict";var p=n.Layout.extend({className:"section-container",template:e,regions:{list:".section-list-container"
},modelEvents:{"default:currentSort":"toggleAlphaBar","change:currentType":"toggleAlphaBar","change:currentSort":"toggleAlphaBar","change:currentSubset":"onCurrentSubsetChange"},initialize:function(e){r.resolve("appModel").get("primaryServer")===this.model.server&&r.resolve("appStore").dispatch(a.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),sectionID:this.model.id})),this.initViewState(e).always(t.bind(function(){this.model.set("currentFolderKey",e.folderKey),i.trigger("show:bar","actionbar",new u({
model:this.model,mediaActions:this.mediaActions})),i.trigger("show:bar","breadcrumbbar",new c({model:this.model})),this.toggleAlphaBar()},this))},initViewState:function(e){this.viewState=new o({},t.extend({storage:new l({},{section:this.model}),section:this.model,filters:this.model.get("currentFilters")},e));var n=this.model.get("currentSort");n&&n.set("selected",!1);var i=this.viewState.fetch();return i.done(t.bind(function(){var e=this.viewState.getSectionAttrs();this.model.set(e),this.model.get("currentType").set("selected",!0),
this.model.get("currentSubset").set("selected",!0);var t=this.model.get("currentSort");t&&t.set("selected",!0),this.viewState.addListeners()},this)),i.always(t.bind(function(){this.mediaActions=new s({},{section:this.model,showAdvanced:!0})},this)),i.always(this.whenRendered(function(){var e=new h({model:this.model,listModel:this.model.get("items"),mediaActions:this.mediaActions});this.list.append(e,this.$el)})),i},toggleAlphaBar:function(){this.supportsAlphaPagination()?i.trigger("show:bar","alphabar",new d({
model:this.model,collection:this.model.get("firstCharacters")})):i.trigger("hide:bar","alphabar")},supportsAlphaPagination:function(){if(!this.model.get("allowAdvancedFilters")||"all"!==this.model.get("currentSubset").get("key"))return!1;var e=this.model.get("currentType"),t=this.model.get("currentSort");if(!t){var n=/^(season|episode|album|track)$/;return!n.test(e.get("typeString"))}var i=t.get("key"),r=t.get("direction");return"titleSort"===i&&"asc"===r},onCurrentSubsetChange:function(e,t){var n=e.previous("currentSubset"),i=n&&n.id,r=t&&t.id;
i!==r&&(this.model.get("items").scrollPosition=0)},onClose:function(){i.trigger("hide:bar","actionbar"),i.trigger("hide:bar","breadcrumbbar"),i.trigger("hide:bar","alphabar"),r.resolve("appModel").get("primaryServer")===this.model.server&&r.resolve("appStore").dispatch(a.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),sectionID:null})),this.viewState.removeListeners()}});return p}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1893),n(9),n(3),n(180),n(492)],
r=function(e,t,n,i,r){"use strict";function a(e){return n.map(e,function(e){return'<option value="'+e.value+'"'+(e.selected?" selected":"")+">"+e.label+"</option>"}).join("\n")}function s(e,t){return e.map(function(e){return{label:e.get("name"),value:e.get("identifier"),selected:t===e.get("identifier")}})}function o(e,t){if(!e)return[];var n=e.get("languages"),i=n.map(function(e){return{label:e.get("name"),value:e.id,selected:e.id===t}});return i}var l=t.ItemView.extend({template:e,ui:{agentSelect:"#match-search-agent",
languageSelect:"#match-search-language"},events:{"change #match-search-agent":"onAgentSelectChange"},onlyAfterRender:["updateAgents","updateLanguages"],initialize:function(){var e=this.model.section.get("agent"),t=this.setupAgents(e);t.then(n.bind(this.updateAgents,this,e)),t.then(n.bind(this.updateLanguages,this,e))},serializeData:function(){var e=this.model.section.get("agent"),t=this.model.agentsProxy.findWhere({identifier:e}),n={item:this.model.toJSON(),agents:s(this.model.agentsProxy,e),languages:o(t)
};return n},setupAgents:function(e){if(this.model.agentsPromise)return this.model.agentsPromise;var t=this.model.section.getSectionType(),n=new i([],{server:this.model.server,mediaTypeID:t.typeID}),a=t.exclusiveAgents,s=new r(n,a,e);return this.model.agents=n,this.model.agentsProxy=s,this.model.agentsPromise=this.model.agents.populate({reset:!0,cancelable:!0}),this.model.agentsPromise},updateAgents:function(e){this.ui.agentSelect.html(a(s(this.model.agentsProxy,e)))},updateLanguages:function(e){var t=this.model.agentsProxy.findWhere({
identifier:e});if(!e)return void this.ui.languageSelect.empty();var n=this.model.section.get("language");this.ui.languageSelect.html(a(o(t,n)))},onAgentSelectChange:function(e){this.updateLanguages(e.currentTarget.value)},onModalClose:function(){this.model.agents=null,this.model.agentsProxy=null,this.model.agentsPromise=null}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1894),n(3),n(9),n(485),n(1187)],r=function(e,t,n,i,r){"use strict";var a=n.Layout.extend({template:e,
regions:{resultRegion:".result-region"},onlyAfterRender:["updateResults"],initialize:function(){this.setupResults();var e=this.model.section,n={manual:1},i={reset:!0,timeout:0,data:n};/com\.plexapp\.agents\.none\:\/\//.test(this.model.get("guid"))&&t.extend(i,{data:t.extend(n,{agent:e.get("agent"),language:e.get("language")}),processData:!0}),this.model.results.populate(i).then(t.bind(this.updateResults,this))},setupResults:function(){if(!this.model.results){var e=this.model.results||new i([],{server:this.model.server,
parent:this.model});this.model.results=e}},updateResults:function(){this.resultRegion.show(new r({collection:this.model.results,itemViewOptions:{item:this.model}}))},onModalClose:function(){this.model.results=null}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1895),n(3),n(9),n(7),n(66),n(34),n(10),n(1428),n(1386),n(1525)],r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c=i.createElement(l,null),d=i.createElement(o,null),h=a.Provider,p=n.Layout.extend({template:e,
ui:{sidebar:".sidebar-container",page:".page-container"},initialize:function(){this.$el.addClass(u.settingsContainer)},serializeData:function(){return{styles:u}},mountReact:function(){r.render(i.createElement(h,{store:s.resolve("appStore")},d),this.ui.sidebar[0]),r.render(i.createElement(h,{store:s.resolve("appStore")},c),this.ui.page[0])},unmountReact:function(){this.isRendered&&(r.unmountComponentAtNode(this.ui.sidebar[0]),r.unmountComponentAtNode(this.ui.page[0]))},onBeforeRender:function(){this.unmountReact();
},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});return p}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1896),n(3),n(5),n(9),n(1221)],r=function(e,t,n,i,r){"use strict";var a=i.Layout.extend({className:"devices-container row",template:e,regions:{list:".device-list-container"},events:{"click .nav a":"onDeviceTypeClick"},ui:{filters:".nav a"},deviceTypes:[{id:"all",title:"All",ids:["all"]},{id:"web",title:"Web",ids:["Web Client","Plex Web"]
},{id:"pht",title:"Home Theater",ids:["Plex Home Theater","Plex for Home Theater","PlexHomeTheater","Plex Media Center"]},{id:"pmp",title:"Media Player",ids:["Plex Media Player"]},{id:"pms",title:"Server",ids:["Plex Media Server"]},{id:"android",title:"Android",ids:["Plex for Android","Android"]},{id:"ios",title:"iOS",ids:["Plex/iOS","Plex for iOS"]},{id:"samsung",title:"Samsung",ids:["Plex for Samsung"]},{id:"google-tv",title:"Google TV",ids:["Google TV"]},{id:"windows",title:"Windows",ids:["Plex for Windows"]
},{id:"apple-tv",title:"Apple TV",ids:["Plex-ATV","Plex for Apple TV"]},{id:"windows-phone",title:"Windows Phone",ids:["Plex for Windows Phone"]},{id:"plexbmc",title:"PleXBMC",ids:["PleXBMC"]},{id:"cloud-sync",title:"Cloud Sync",ids:["Cloud Sync"]},{id:"roku",title:"Roku",ids:["Plex for Roku"]},{id:"popcorn-hour",title:"Popcorn Hour",ids:["Plex for Popcorn Hour"]},{id:"xbox",title:"Xbox",ids:["Plex for Xbox One","Plex for Xbox 360"]},{id:"other",title:"Other",ids:[]}],initialize:function(){this.products=this.collection.products(),
this.addOtherIds()},serializeData:function(){return{deviceTypes:this.getFilteredDeviceTypes()}},sortDeviceTypes:function(e){var n=t.sortBy(e,function(e){return"all"===e.id?"":e.title.toLowerCase()});return n},getFilteredDeviceTypes:function(){var e=this.deviceTypes.filter(function(e){return"all"===e.id||t.intersection(this.products,e.ids).length>0},this);return this.sortDeviceTypes(e)},addOtherIds:function(){var e=t.flatten(t.map(this.deviceTypes,function(e){return e.ids})),n=t.difference(this.products,e),i=t.find(this.deviceTypes,function(e){
return"other"===e.id});t.each(n,function(e){i.ids.push(e)})},onRender:function(){this.list.show(new r({collection:this.collection}))},onDeviceTypeClick:function(e){e.preventDefault();var i=n(e.currentTarget),a=i.data("id"),s=this.collection;if(this.ui.filters.removeClass("selected"),i.addClass("selected"),"all"!==a){var o=t.findWhere(this.deviceTypes,{id:a});s=this.collection.filterByProducts(o.ids)}this.list.show(new r({collection:s}))}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1898),n(10),n(524),n(514),n(1227)],r=function(e,t,n,i,r){"use strict";var a=n.extend({template:e,initialize:function(){var e=t.resolve("appModel"),n=e.get("user");this.collection=n.get("homeUsers"),this.invites=n.get("invites").filterByHome(),this.sentInvites=n.get("sentInvites").filterByHome(),this.signedInHomeUser=this.collection.get(n.id),this.itemViewOptions={isAdmin:!(!this.signedInHomeUser||!this.signedInHomeUser.get("admin"))},this.addListeners()},addListeners:function(){n.prototype.addListeners.apply(this,arguments),
this.signedInHomeUser&&this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange)},onRender:function(){this.friendList.show(new r({collection:this.collection,itemViewOptions:this.itemViewOptions})),this.inviteList.show(new i({collection:this.invites})),this.pendingList.show(new i({collection:this.sentInvites})),this.updateHeaders()},onAdminChange:function(e,t){this.friendList.currentView&&(this.itemViewOptions.isAdmin=t)}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1899),n(3),n(9),n(10),n(8),n(1311),n(1323),n(1310),n(1307)],r=function(e,t,n,i,r,a,s,o,l){"use strict";var u={web:a,server:s,users:o,devices:l},c=n.Layout.extend({className:"container",template:e,ui:{webNavItem:".web-nav-item",serverNavItem:".server-nav-item",usersNavItem:".users-nav-item",devicesNavItem:".devices-nav-item",usersBadge:".users-btn > .badge"},regions:{container:".settings-container"},onlyAfterRender:["onSignedInChange","onPrimaryServerChange"],initialize:function(e){this.options=e,
this.subset=e.subset||"web";var t=i.resolve("appModel"),n=t.get("user"),a=n.get("invites");this.subsets={users:a},this.listenTo(n,"change:signedIn",this.onSignedInChange),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(a,"reset add remove",this.onInvitesChange),this.listenTo(r,"change:language",this.render)},serializeData:function(){var e=i.resolve("appModel"),t=e.get("user"),n=e.get("primaryServer");return{subset:this.subset,signedIn:t.get("signedIn"),hasPrimaryServer:n&&!n.get("shared")
}},updateBadges:function(){var e={users:this.subsets.users.length};t.each(t.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},onRender:function(){var e=u[this.subset];this.container.show(new e(this.options)),this.updateBadges()},onSignedInChange:function(e,t){this.ui.usersNavItem.toggleClass("hidden",!t),this.ui.devicesNavItem.toggleClass("hidden",!t)},onPrimaryServerChange:function(e,t){var n=t&&!t.get("shared");this.ui.serverNavItem.toggleClass("hidden",!n);
},onInvitesChange:function(){this.updateBadges()}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1900),n(3),n(5),n(9),n(10),n(6),n(8),n(26),n(13),n(1308),n(524),n(150),n(194)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){"use strict";var p={home:u,friends:c},f=i.Layout.extend({className:"users-container",template:e,ui:{navLinks:".nav-cards a",homeBadge:".home-card > .badge",friendsBadge:".friends-card > .badge",leaveHomeBtn:".leave-home-btn",enableGuestBtn:".enable-guest-btn",
disableGuestBtn:".disable-guest-btn",userActions:".user-actions"},regions:{container:".users-row"},events:{"click .nav-cards a":"onNavClick","click .add-user-btn":"onAddUserClick","click .leave-home-btn":"onLeaveHomeClick","click .invite-friend-btn":"onInviteFriendClick","click .enable-guest-btn":"onEnableGuestClick","click .disable-guest-btn":"onDisableGuestClick"},shouldShowUserActions:function(){var e=!!this.user.get("subscription").get("features").get("home");return this.signedInHomeUser.get("admin")&&e;
},shouldShowLeaveHome:function(){return this.home.length>1&&!this.signedInHomeUser.get("restricted")},shouldShowFriends:function(){return!this.signedInHomeUser.get("restricted")},shouldShowEnableGuest:function(){return!(this.homeDetails&&this.homeDetails.get("guestEnabled"))},initialize:function(e){var t=r.resolve("appModel");this.subset=e.usersSubset,this.user=t.get("user"),this.home=this.user.get("homeUsers"),this.invites=this.user.get("invites"),this.signedInHomeUser=this.home.get(this.user.id),
this.homeDetails=this.user.get("homeDetails"),this.proxies={home:this.invites.filterByHome(),friends:this.invites.filterByFriends()},e.promptPIN&&s.trigger("show:modal",new h({model:this.signedInHomeUser,isEditing:!0,isEditWarning:!this.signedInHomeUser.get("protected")})),this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange),this.listenTo(this.home,"reset add remove",this.onHomeChange),this.listenTo(this.invites,"reset add remove",this.onInvitesChange),this.listenTo(this.homeDetails,"change",this.onHomeDetailsChange);
},serializeData:function(){return{subset:this.subset,showUserActions:this.shouldShowUserActions(),showLeaveHome:this.shouldShowLeaveHome(),showFriends:this.shouldShowFriends(),showEnableGuest:this.shouldShowEnableGuest(),showDisableGuest:!this.shouldShowEnableGuest()}},showSubset:function(e){e&&(this.$el.removeClass("show-"+this.subset),this.subset=e),this.$el.addClass("show-"+this.subset);var t=p[this.subset];t?this.container.append(new t):o.warn("Invalid subset: "+this.subset)},updateBadges:function(){
var e={home:this.proxies.home.length,friends:this.proxies.friends.length};t.each(t.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},toggleGuestAccount:function(e,t){e.preventDefault(),l.execute("toggleGuest",{user:this.user,enable:t})},onRender:function(){this.showSubset(),this.updateBadges()},onClose:function(){t.each(this.proxies,function(e){e.destroy()})},onAdminChange:function(){this.ui.userActions.toggleClass("hidden",!this.shouldShowUserActions());
},onHomeChange:function(){this.ui.leaveHomeBtn.toggleClass("hidden",!this.shouldShowLeaveHome())},onInvitesChange:function(){this.updateBadges()},onHomeDetailsChange:function(){this.ui.enableGuestBtn.toggleClass("hidden",!this.shouldShowEnableGuest()),this.ui.disableGuestBtn.toggleClass("hidden",this.shouldShowEnableGuest())},onNavClick:function(e){e.preventDefault();var i=n(e.currentTarget);i.hasClass("selected")||(this.ui.navLinks.removeClass("selected"),i.addClass("selected"),this.showSubset(t.last(e.currentTarget.href.split("/"))),
s.trigger("navigate","users",{subset:this.subset,trigger:!1}))},onAddUserClick:function(e){e.preventDefault();var t=this.user.get("maxHomeSize");t&&this.home.length-1<t?s.trigger("show:modal",new d({type:"home"})):s.trigger("show:alert",{type:"error",message:a("You have reached the {1} person home limit.",t)})},onLeaveHomeClick:function(e){e.preventDefault(),l.execute("removeHomeUser",{homeUser:this.signedInHomeUser,isSignedInUser:!0})},onInviteFriendClick:function(e){e.preventDefault(),s.trigger("show:modal",new d({
type:"friend"}))},onEnableGuestClick:function(e){this.toggleGuestAccount(e,!0)},onDisableGuestClick:function(e){this.toggleGuestAccount(e,!1)}});return f}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1901),n(3),n(5),n(9),n(10),n(6),n(8),n(56),n(131),n(82),n(430),n(169),n(216),n(494),n(1077),n(1074),n(141),n(31),n(13),n(54),n(258),n(517)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y,b,w,S){"use strict";var P=[{value:0,title:"None"},{value:1,title:"1"},{value:2,title:"2"
},{value:3,title:"3"},{value:4,title:"4"},{value:5,title:"5"}],x=i.ItemView.extend({className:"web-settings-container",template:e,ui:{chromecastCustomGroup:"#chromecast-custom-group",submitBtn:".submit-btn",message:".form-message"},events:{"click .toggle-advanced-btn":"onToggleAdvancedClick","click .settings-nav a":"onSettingsGroupClick","click .keyboard-shortcuts-btn":"onKeyboardShortcutsClick","change #chromecastAppID":"onChromecastAppIDChange","change input[id]":"onInputChange","keyup input[type=text]":"onInputChange",
"change select[id]":"onInputChange","submit #web-settings-form":"onSubmit"},onlyAfterRender:["saveChanges"],initialize:function(){this.changes={};var e=r.resolve("appModel"),t=e.get("user");this.listenTo(t,"change:signedIn",this.onSignedInChange),this.listenTo(e,"change:primaryServer",this.render),this.listenTo(s,"shortcut:save",this.saveChanges);var n=g.get("showAdvancedSettings");this.$el.toggleClass("show-advanced",n)},serializeData:function(){var e=[],n=this.model.toJSON(),i=r.resolve("appModel"),a=i.get("user"),s=a.hasPlexPass(),g=a.hasHome(),y=a.isNinja();
return t.each(t.keys(v.getLanguages()),function(t){e.push({value:t,title:l.getLanguageName(t)})}),{settings:n,hasPlexPass:s,hasHome:g,isNinja:y,showExperimentalPlayer:o.hasMediaSource&&b.get("allowFlash"),version:"2.7.0",languages:e,debugLevels:c.settings,subtitlesBurnLevels:d.settings,chromecastAppIDs:p.settings,availableQualities:u.getAvailableQualities().reverse(),subtitleSizes:f.settings,audioBoostLevels:m.settings,httpFallbackOptions:h.settings,extrasPrefixCounts:P}},saveChanges:function(){var e=this.ui.submitBtn,n=this.ui.message;
if(!e.isDisabled()){e.addClass("active");var i=!!this.changes.language,r=this.model.save(this.changes);r.done(t.bind(function(){this.changes={},i||(e.addClass("disabled"),n.text(a("Your changes have been saved.")))},this)),r.fail(t.bind(function(){n.text(a("Your changes could not be saved."))},this)),r.always(t.bind(function(){i||e.removeClass("active")},this))}},onSignedInChange:function(e,t){null!=t&&this.render()},onToggleAdvancedClick:function(e){e.preventDefault();var t=this.$el.hasClass("show-advanced");
t&&this.$(".advanced-setting > .selected").length&&this.$(".nav a:first").click(),this.$el.toggleClass("show-advanced",!t),g.save("showAdvancedSettings",!t)},onSettingsGroupClick:function(e){e.preventDefault();var t=n(e.currentTarget),i=t.attr("href");this.$(".settings-group").removeClass("active"),this.$(i).addClass("active"),this.$(".nav a").removeClass("selected"),t.addClass("selected")},onKeyboardShortcutsClick:function(e){e.preventDefault(),s.trigger("show:modal",new S({shortcuts:w.prop("shortcuts")
}))},onChromecastAppIDChange:function(e){var t=e.currentTarget.value===p.CUSTOM;this.ui.chromecastCustomGroup.toggleClass("hidden",!t)},onInputChange:function(e){var t=n(e.currentTarget),i=e.currentTarget,r=i.value;"checkbox"===i.type&&(r=t.prop("checked")),"int"===t.data("type")&&(r=parseInt(r,10)),this.changes[i.id]=r,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},onSubmit:function(e){e.preventDefault(),this.saveChanges()}});return x}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1902),n(3),n(5),n(9),n(39),n(180),n(1217),n(1219)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=i.Layout.extend({template:e,ui:{agentLabel:".agent-label",typeNavItems:".agent-types-nav li",agentNavItems:".agents-nav li"},regions:{agentsList:".agents-list-container",contributorsList:".contributors-list-container"},events:{"click .agent-types-nav a":"onAgentTypeClick","click .agents-nav a":"onAgentClick"},initialize:function(){this.bindAllWhenRendered("onAgentsReset","onContributorsReset"),
this.agentTypes=[],this.agentTypes.push(r.get("movie")),this.agentTypes.push(r.get("show")),this.agentTypes.push(r.get("artist")),this.agentTypes.push(r.get("album")),this.agentTypes.push(r.get("photo")),this.currentType=t.first(this.agentTypes),this.populateAgents()},serializeData:function(){return{currentType:this.currentType,agentTypes:this.agentTypes}},populateAgents:function(){this.agents=new a([],{server:this.model,mediaTypeID:this.currentType.id});var e=this.agents.populate({reset:!0,scope:"page"
});e.done(t.bind(this.onAgentsReset,this))},selectAgent:function(e){this.currentAgent&&this.currentAgent.set("selected",!1),this.currentAgent=e,e.set("selected",!0),this.ui.agentLabel.text(e.get("name")),this.additionalAgents=new a([],{server:this.model,mediaTypeID:this.currentType.id,relatedAgentID:e.id}),this.contributors=new a([],{server:this.model,mediaTypeID:this.currentType.id,primaryAgentID:e.id}),this.contributorsList.show(new o({collection:this.contributors})),this.listenTo(this.contributorsList.currentView,"save",this.onContributorsSave),
this.populateContributors()},populateContributors:function(){var e=[];e.push(this.additionalAgents.populate({reset:!0,scope:"page"})),e.push(this.contributors.populate({reset:!0,scope:"page"}));var i=n.when.apply(n,e);i.done(t.bind(this.onContributorsReset,this))},onAgentsReset:function(){if(this.agentsList.show(new s({collection:this.agents})),this.agents.length){var e=this.agents.findWhere({selected:!0})||this.agents.first();this.selectAgent(e)}},onContributorsReset:function(){var e=t.bind(function(e){
return e.id===this.currentAgent.id?(e.set("isPrimary",!0),!0):!!this.contributors.get(e.id)},this);this.contributors.reset(this.additionalAgents.filter(e))},onAgentTypeClick:function(e){e.preventDefault();var t=n(e.currentTarget),i=t.data("type");this.currentType=r.get(i),this.populateAgents(),this.ui.typeNavItems.removeClass("active"),t.parent("li").addClass("active")},onAgentClick:function(e){e.preventDefault();var t=n(e.target),i=t.data("identifier"),r=this.agents.get(i);this.selectAgent(r)},onContributorsSave:function(e){
this.currentAgent.url="system/agents/"+this.currentAgent.id+"/config/"+this.currentType.id;var n=this.currentAgent.save({order:e});n.done(t.bind(function(){this.additionalAgents.fetch({silent:!0}),this.contributors.fetch({silent:!0})},this))}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(151)],r=function(e,t){"use strict";var n=t.extend({prefix:"channel.",serializeData:function(){var n=t.prototype.serializeData.apply(this,arguments),i=this.options.channelSettings.toJSON();
return e.each(i,function(e){e.id=this.prefix+e.id},this),n.unshift.apply(n,i),n},updateModel:function(e,n){var i=t.prototype.updateModel.apply(this,arguments);if(i)return i;var r=e.replace(this.prefix,""),a=this.options.channelSettings.get(r);return a?a.set("value",n):void 0}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1903),n(3),n(6),n(151),n(1319),n(1320)],r=function(e,t,n,i,r,a){"use strict";var s=i.extend({template:e,regions:{signIn:".sign-in-region",update:".update-region"
},serializeData:function(){var e=i.prototype.serializeData.apply(this,arguments),n=t.findWhere(e,{id:"FriendlyName"});return n&&(n.placeholder=this.model.get("friendlyName")),e},bindings:{".version":{modelAttribute:"shortVersion",formatter:function(e){return n("Version {1}",e)}}},onRender:function(){i.prototype.onRender.apply(this,arguments),this.signIn.show(new r({model:this.model.get("cloudAccount"),collection:this.collection})),this.update.show(new a({model:this.model.get("update"),collection:this.collection
}))}});return s}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(3),n(6),n(131),n(151)],r=function(e,t,n,i){"use strict";var r=i.extend({prefix:"account.",serializeData:function(){var i=this.options.account,r=[],a=e.map(n.languages,function(e,t){return{value:t,label:e}});return r.push({id:this.prefix+"autoSelectAudio",label:t("Automatically select audio and subtitle tracks"),summary:t("Automatically select audio and subtitle tracks in your preferred language when possible."),
"default":!1,value:i.get("autoSelectAudio"),type:"bool",group:"account.language",advanced:!1,hidden:!1}),r.push({id:this.prefix+"defaultAudioLanguage",label:t("Prefer audio tracks in"),"default":"en",value:i.get("defaultAudioLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:a}),r.push({id:this.prefix+"subtitleMode",label:t("Subtitle mode"),"default":1,value:parseInt(i.get("subtitleMode"),10),type:"int",group:"account.language",advanced:!1,hidden:!1,enumValues:[{value:0,
label:t("Manually selected")},{value:1,label:t("Shown with foreign audio")},{value:2,label:t("Always enabled")}]}),r.push({id:this.prefix+"defaultSubtitleLanguage",label:t("Prefer subtitles in"),"default":"en",value:i.get("defaultSubtitleLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:a}),r},updateModel:function(e,t){var n=i.prototype.updateModel.apply(this,arguments);if(n)return n;var r=e.replace(this.prefix,""),a=this.options.account;return a.has(r)?a.set(r,t):void 0;
}});return r}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(9),n(1317)],r=function(e,t){"use strict";var n=e.CollectionView.extend({tagName:"ul",className:"nav nav-cards",itemView:t,selectGroup:function(e){this.selectedView&&this.selectedView.deselect(),this.selectedView=this.children.findByModel(this.collection.get(e)),this.selectedView.select()},showDecorator:function(e,t){var n=this.children.findByModel(this.collection.get(e));n.showDecorator(t)}});return n}.apply(t,i),
!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1904),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({tagName:"li",className:"server-settings-nav-list-item",template:e,ui:{card:".card"},events:{"click .card":"onClick"},select:function(){this.ui.card.addClass("selected")},deselect:function(){this.ui.card.removeClass("selected")},showDecorator:function(e){this.currentStatus&&this.$el.removeClass(this.currentStatus),this.currentStatus=e,this.$el.addClass(e)},onClick:function(e){
e.preventDefault(),this.ui.card.hasClass("selected")||this.trigger("change:pane",this.model.id)}});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1906),n(3),n(5),n(13),n(151)],r=function(e,t,n,i,r){"use strict";var a=r.extend({className:"remote-access-container",template:e,ui:{manualPortMappingMode:"#ManualPortMappingMode",manualPortMappingPort:"#ManualPortMappingPort"},events:{"change .remote-access-error-container input[id]":"onInputChange","click .sign-in-link":"onSignInClick",
"click .remote-access-enable-btn":"onEnableClick","click .retry-btn":"onRetryClick","click .remote-access-disable-btn":"onDisableClick"},initialize:function(e){this.cloudAccount=e.cloudAccount,this.changes=e.changes,this.listenTo(this.cloudAccount,{"change:signInState":this.render,"change:remoteAccessState":this.render})},serializeData:function(){var e=this.collection.get("PublishServerOnPlexOnlineKey"),t=this.collection.get("ManualPortMappingMode"),n=this.collection.get("ManualPortMappingPort"),i=this.cloudAccount.toJSON(),r=!e.get("value"),a=!i.signedIn,s=r||a;
return{isDisabled:r,isSignedOut:a,isUnavailable:s,hasPrivateAddress:!(!i.privateAddress||!i.privatePort),hasPublicAddress:!(!i.publicAddress||!i.publicPort),cloudAccount:i,hasMappingSettings:!(!t||!n),mappingModeSetting:t?t.toJSON():null,mappingPortSetting:n?n.toJSON():null}},enable:function(){},connect:function(){return i.execute("connectServer",{cloudAccount:this.cloudAccount,value:!0})},disconnect:function(){return i.execute("connectServer",{cloudAccount:this.cloudAccount,value:!1})},reconnect:function(){
return i.execute("reconnectServer",{cloudAccount:this.cloudAccount})},saveChanges:function(){if(t.isEmpty(this.changes))return n.Deferred().resolve().promise();var e=this.collection.first().save(this.changes);return e.done(t.bind(function(){this.changes={}},this)),e},onInputChange:function(e){r.prototype.onInputChange.apply(this,arguments),this.ui.manualPortMappingPort.prop("disabled",!this.ui.manualPortMappingMode.prop("checked"))},onSignInClick:function(e){e.preventDefault(),this.trigger("change:pane","general");
},onEnableClick:function(e){e.preventDefault(),this.connect()},onDisableClick:function(e){e.preventDefault(),this.disconnect()},onRetryClick:function(e){e.preventDefault(),this.cloudAccount.set("remoteAccessState","connecting"),this.saveChanges().always(t.bind(this.reconnect,this))}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r,a=n(11).default;i=[n(1907),n(3),n(5),n(9),n(6),n(10),n(8),n(13),n(94)],r=function(e,t,n,i,r,s,o,l,u){"use strict";var c=i.ItemView.extend({className:"server-account-container",
template:e,ui:{poster:".server-account-poster",signInBtn:".server-sign-in-btn",signOutBtn:".server-sign-out-btn",claimBtn:".server-claim-btn",username:"input[name=username]",password:"input[name=password]"},events:{"submit #server-sign-in-form":"onSubmit","click .server-claim-btn":"onClaimClick","click .server-sign-out-btn":"onSignOutClick"},modelEvents:{"change:signedIn":"updateSignInState","change:username":"updateUserImage"},initialize:function(){var e=s.resolve("appModel");this.user=e.get("user"),
this.image=new u({type:"friend",width:60}),this.listenTo(this.user,"change:isSignedIn",function(){this.isSigningIn||this.render()}),this.isSigningIn=!1,this.claimServerFailed=!1},serializeData:function(){return{showClaimMessage:!this.claimServerFailed&&this.model.server.supports("claimServer")&&this.user.get("isSignedIn")}},updateSignInState:function(){this.$el.toggleClass("signed-in",this.model.get("signedIn"))},updateUserImage:function(){var e=this.model.get("username");e===this.user.get("username")||e===this.user.get("email")?this.image.setModel(this.user):(this.image.setModel(null),
this.image.url=null),this.image.render()},signInServer:function(e){var n=a({cloudAccount:this.model},e),i=l.execute("signInServer",n);return i.done(t.bind(function(){this.model.fetch()},this)),i},signInUser:function(e){return this.user.get("isSignedIn")?n.Deferred().resolve().promise():l.execute("signIn",{username:e.username,password:e.password})},signOut:function(){return this.ui.username.val(""),this.ui.password.val(""),l.execute("signOutServer",{cloudAccount:this.model})},bindings:{".server-account-username":{
modelAttribute:"username"}},onRender:function(){this.image.setElement(this.ui.poster),this.updateSignInState(),this.updateUserImage()},onClose:function(){this.image.close()},onSubmit:function(e){if(e.preventDefault(),!this.ui.signInBtn.isDisabled()){this.isSigningIn=!0,this.ui.signInBtn.addClass("active");var n={username:e.target.username.value,password:e.target.password.value},i=this.signInUser(n);i=i.then(t.bind(function(){return this.signInServer(n)},this)),i.always(this.whenRendered(function(){
this.isSigningIn=!1,this.ui.signInBtn.removeClass("active")},this))}},onSignOutClick:function(e){if(e.preventDefault(),!this.ui.signOutBtn.isDisabled()){this.ui.signOutBtn.addClass("active");var n=this.signOut();n.done(t.bind(function(){this.model.fetch()},this)),n.always(this.whenRendered(function(){this.ui.signOutBtn.removeClass("active")}))}},onClaimClick:function(e){e.preventDefault(),this.ui.claimBtn.addClass("active");var t=s.resolve("metrics"),n=this.signInServer({claim:!0});n.done(function(){
t.trackEvent({event:"client:claimServer",interaction:!0})}),n.fail(this.whenRendered(function(){t.trackEvent({event:"client:claimServerFailure",interaction:!1}),this.claimServerFailed=!0,this.render()})),n.always(this.whenRendered(function(){this.ui.claimBtn.removeClass("active")}))}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1908),n(3),n(9),n(10),n(6),n(8),n(13),n(1244)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=n.ItemView.extend({tagName:"span",className:"check-for-updates-container",
template:e,ui:{checkForUpdatesBtn:".check-for-updates-btn",downloadUpdatesContainer:".downloading-updates-container",downloadProgressContainer:".downloading-progress-container",downloadProgressLabel:".downloading-progress-label",updateProgressLabel:".downloading-updates-label",updateErrorMessage:".update-error-message",installManualLink:".install-manual-link"},modelEvents:{"change:state":"onStateChange","change:progress":"onProgressChange"},events:{"click .check-for-updates-btn":"onCheckForUpdatesClick",
"click .available-updates-btn":"onDownloadUpdatesClick","click .install-updates-btn":"onInstallUpdatesClick","click .release-notes-btn":"onInfoClick"},initialize:function(){this.model.fetch().then(this.whenRendered(function(){var e=this.model.get("state");"downloaded"===e&&this.model.get("shouldInstall")?(this.model.set("shouldInstall",!1),this.installUpdates()):this.canCheckForUpdate(e)&&this.checkForUpdates({download:!1})}))},serializeData:function(){return{canCheckForUpdate:this.canCheckForUpdate(this.model.get("state"))
}},checkForUpdates:function(e){s.execute("checkForServerUpdates",{server:this.model.server,download:e.download,initialState:e.initialState})},installUpdates:function(){s.execute("installServerUpdates",{server:this.model.server})},waitForInstall:function(){this.listenTo(this.model.server,"change:isConnected",this.onServerConnectedChange)},showUpdateState:function(e){this.$el.removeClass(this.model.previous("state"));var t=e;this.model.get("canInstall")||"available"!==e||(t="notify"),this.$el.addClass(t);
var n=!(!this.model.get("added")&&!this.model.get("fixed"));if(this.$el.toggleClass("has-release-notes",n),"installing"===t)this.waitForInstall();else if("error"===t||"notify"===t){var a;this.model.get("error")?(a=this.model.get("error"),this.ui.installManualLink.addClass("hidden")):this.model.get("canInstall")?(a=r("Something went wrong."),this.ui.installManualLink.removeClass("hidden")):(a=r("An update is available."),this.ui.installManualLink.removeClass("hidden"));var s=i.resolve("appModel"),o=s.get("user").server,l=this.model.get("downloadURL")||o.get("appsUrl");
this.ui.installManualLink.attr("href",l),this.ui.updateErrorMessage.text(a)}},canCheckForUpdate:function(e){return"done"===e||"error"===e||"none"===e},onRender:function(){this.showUpdateState(this.model.get("state"))},onStateChange:function(e,t){this.isRendered&&(this.showUpdateState(t),this.ui.checkForUpdatesBtn.toggleClass("active",!this.canCheckForUpdate(t)))},onProgressChange:function(e,n){t.isNumber(n)?(this.ui.downloadUpdatesContainer.css({"background-size":n+"% 100%"}),this.ui.downloadProgressContainer.removeClass("hidden"),
this.ui.downloadProgressLabel.text(n)):this.ui.downloadProgressContainer.addClass("hidden")},onServerConnectedChange:function(e,t){t&&(this.stopListening(e,"change:isConnected",this.onServerConnectedChange),s.execute("checkForServerUpdates",{server:this.model.server}))},onCheckForUpdatesClick:function(e){e.preventDefault(),this.ui.checkForUpdatesBtn.isDisabled()||(this.ui.checkForUpdatesBtn.addClass("active"),this.checkForUpdates({download:!0}))},onDownloadUpdatesClick:function(e){e.preventDefault(),
this.checkForUpdates({download:!0,initialState:"downloading"})},onInstallUpdatesClick:function(e){e.preventDefault(),this.installUpdates()},onInfoClick:function(e){e.preventDefault(),a.trigger("show:modal",new o({model:this.model}))}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1909),n(9),n(103)],r=function(e,t,n){"use strict";var i=t.ItemView.extend({template:e,serializeData:function(){return{isTranscoderRequired:!this.model.get("transcoderVideo"),isUpgradeRequired:!this.model.supports("streamReady"),
minServerVersion:n.streamReady}}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1910),n(3),n(5),n(13),n(148),n(227),n(178),n(496),n(1202),n(151),n(1321)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=u.extend({mixins:[r],className:"versions-container",template:e,ui:{message:".versions-status-message"},regions:{listRegion:".background-processing-list-region"},events:{"click .delete-all-btn":"onDeleteAllVersionsClick"},initialize:function(e){this.pausedSetting=this.collection.get("BackgroundQueueIdlePaused"),
this.playlists=new a([],{server:this.model,allowInCache:!0}),this.transcodeJobs=new s([],{server:this.model,allowInCache:!0})},initialState:"loading",states:{loading:{nextState:"list",onEnter:function(){var e=this.model.supports("streamReady"),i=this.model.get("transcoderVideo");if(this.listRegion.show(new o({inline:!0})),!e||!i)return void this.enterState("error");var r=n.when(this.playlists.populate(),this.transcodeJobs.fetch());r=r.then(t.bind(function(){return this.playlist=this.playlists.first(),
this.playlist?(this.generators=this.playlist.get("children"),this.generators.fetch()):n.Deferred().reject().promise()},this)),r.done(this.whenRendered(function(){this.enterNextState()})),r.fail(this.whenRendered(function(){this.enterState("error")}))}},list:{onEnter:function(){this.toggleMessage(),this.listenTo(this.generators,"reset add remove",this.toggleMessage),this.listRegion.show(new l({collection:this.generators,itemViewOptions:{transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting
}}))},onExit:function(){this.stopListening(this.generators)}},error:{onEnter:function(){this.listRegion.show(new c({model:this.model}))}}},toggleMessage:function(){this.ui.message.toggleClass("hidden",!this.generators.length)},onRender:function(){this.enterNextState()},onDeleteAllVersionsClick:function(e){e.preventDefault(),i.execute("deleteAllVersionGenerators",{server:this.model}).then(t.bind(function(){return this.generators.fetch()},this))}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){
var i,r;i=[n(1911),n(3),n(5),n(37),n(9),n(10),n(6),n(13),n(8),n(22),n(188),n(1316),n(1314),n(1318),n(1322),n(1312),n(1313),n(1315),n(151),n(31),n(134)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,v,g,y,b,w){"use strict";var S=r.Layout.extend({className:"server-settings-container",template:e,remoteAccessDecorators:{connecting:"unknown",disconnecting:"unknown",unreachable:"error",ok:"success"},regions:{serverDropdown:".filter-bar",nav:".nav-region",pane:".pane-region"},events:{"click .toggle-advanced-btn":"onToggleAdvancedClick"
},panes:{general:{constructor:h,group:"general",title:"General",isCustom:!0},remoteAccess:{constructor:p,group:"remoteAccess",title:"Remote Access",isCustom:!0},versions:{constructor:f,group:"versions",title:"Optimized Versions",isCustom:!0},agents:{constructor:m,group:"agents",title:"Agents",isCustom:!0},library:{constructor:y,group:"library",title:"Library"},channels:{constructor:v,group:"channels",title:"Channels",isCustom:!0},network:{constructor:y,group:"network",title:"Network"},transcoder:{
constructor:y,group:"transcoder",title:"Transcoder"},languages:{constructor:g,group:"account.language",title:"Languages",isCustom:!0},dlna:{constructor:y,group:"dlna",title:"DLNA"},bonjour:{constructor:y,group:"bonjour",title:"Network Discovery"},butler:{constructor:y,group:"butler",title:"Scheduled Tasks"},extras:{constructor:y,group:"extras",title:"Extras"}},initialize:function(e){this.defaultGroup=e.group||"general",this.account=e.account,this.cloudAccount=e.cloudAccount,this.channelSettings=e.channelSettings,
this.tempSettings=this.collection.cloneDeep(),this.tempAccount=this.account.clone(),this.tempChannelSettings=this.channelSettings.cloneDeep(),this.changes={};var i=b.get("showAdvancedSettings");if(this.$el.toggleClass("show-advanced",i),this.initGroups(),this.model.supports("reachability")){var r="/myplex/refreshReachability",s=t.extend(this.model.getXHROptions(r),{type:"PUT"});n.ajax(s)}var o=a.resolve("appModel");o.set("primaryServer",this.model),this.listenTo(l,"shortcut:save",this.saveChanges),
this.listenTo(o,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.cloudAccount,"change:remoteAccessState",this.onRemoteAccessStatusChange),this.listenTo(this.model,"change:isClaimed",this.onClaimedChange)},initGroups:function(){var e=t.keys(this.panes),n=t.chain(this.collection.pluck("group")).unique().compact().value();this.groups=new i.Collection,t.each(e,function(e){var i=this.panes[e];(i.isCustom||t.contains(n,e))&&this.addGroup(e,i)},this),t.each(n,function(n){if(!t.contains(e,n)){
var i={constructor:y,group:n,title:n};this.panes[n]=i,this.addGroup(n,i)}},this)},addGroup:function(e,n){var i=t.omit(n,"constructor");i.id=e,this.groups.add(i)},showPane:function(e){if(this.currentPane){if(this.currentPane.isActive)return this.currentPane;this.stopListening(this.currentPane),this.flushChanges()}var t=this.panes[e],n=t.constructor,i=new n({model:this.model,collection:this.tempSettings,account:this.tempAccount,cloudAccount:this.cloudAccount,channelSettings:this.tempChannelSettings,
group:t.group,changes:this.changes});return this.currentPane=i,this.pane.show(i),this.nav.currentView.selectGroup(e),this.listenTo(this.currentPane,{"change:pane":this.showPane,save:this.saveChanges}),l.trigger("navigate","serverSettings",{serverID:this.model.id,group:e,replace:!0,trigger:!1}),i},flushChanges:function(){this.currentPane.changes&&t.extend(this.changes,this.currentPane.changes)},saveChanges:function(){if(this.flushChanges(),!this.currentPane.isDisabled&&!this.currentPane.isActive){
this.currentPane.triggerMethod("before:save");var e=[],i=this.getPrefixedChanges("channel."),r=this.getPrefixedChanges("account.");if(!t.isEmpty(i)){var a=this.channelSettings.first().getSaveParams(i),s=t.result(this.channelSettings,"url"),o=u.join([s,"/set"],a);e.push(n.ajax(this.model.getXHROptions(o)))}t.isEmpty(r)||e.push(this.account.save(r)),t.isEmpty(this.changes)||e.push(this.collection.first().save(this.changes));var l=n.when.apply(n,e);l.done(t.bind(function(){var e=t.keys(this.changes);
t.each(e,function(e){var t=this.tempSettings.get(e),n=this.collection.get(e);n.set("value",t.get("value")),"ButlerUpdateChannel"===e&&this.onButlerUpdateChannelChange()},this),this.changes={},this.currentPane&&(this.currentPane.changes&&(this.currentPane.changes={}),this.currentPane.triggerMethod("after:save",!0))},this)),l.fail(t.bind(function(){this.currentPane&&this.currentPane.triggerMethod("after:save",!1)},this))}},getPrefixedChanges:function(e){var n={};return t.each(this.changes,function(t,i){
var r=0===i.lastIndexOf(e,0);r&&(n[i.substring(e.length)]=t,delete this.changes[i])},this),n},onRender:function(){this.serverDropdown.append(new c);var e=new d({collection:this.groups});this.listenTo(e,"itemview:change:pane",this.onNavItemChangePane),this.nav.show(e);var t=this.remoteAccessDecorators[this.cloudAccount.get("remoteAccessState")];t&&this.nav.currentView.showDecorator("remoteAccess",t),this.model.get("isClaimed")||this.nav.currentView.showDecorator("general","warning"),this.showPane(this.defaultGroup);
},onClose:function(){this.currentPane=null},onNavItemChangePane:function(e,t){this.showPane(t)},onPrimaryServerChange:function(e,t){var n=this.model.get("update");return"installing"===n.get("state")?void this.listenTo(this.model,"change:connected",this.onServerConnectedChange):t?void l.trigger("navigate","serverSettings",{serverID:t.id}):void l.trigger("show:view",new w({title:s("Server settings are unavailable because the server could not be reached.")}))},onRemoteAccessStatusChange:function(e,t){
var n=this.remoteAccessDecorators[t];n&&this.nav.currentView.showDecorator("remoteAccess",n)},onServerConnectedChange:function(e,t){if(t){this.stopListening(e,"change:connected",this.onServerConnectedChange);var n=a.resolve("appModel");n.set("primaryServer",e)}},onClaimedChange:function(e,t){t?this.nav.currentView.showDecorator("general",""):this.nav.currentView.showDecorator("general","warning")},onToggleAdvancedClick:function(e){e.preventDefault();var t=this.$el.hasClass("show-advanced");this.$el.toggleClass("show-advanced",!t),
b.save("showAdvancedSettings",!t)},onButlerUpdateChannelChange:function(){var e=this.collection.get("ButlerTaskCheckForUpdates"),t=e&&e.get("value");t&&o.execute("checkForServerUpdates",{server:this.model,download:!1})}});return S}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1912),n(3),n(5),n(9),n(7),n(66),n(10),n(6),n(8),n(13),n(335)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=i.ItemView.extend({className:"setup-basic-container",template:e,ui:{modalContainer:".modal-container",
connectCheckbox:"#connect",submitBtn:".submit-btn",nextBtn:".next-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange","submit #setup-basic-form":"onSubmit"},initialize:function(){t.bindAll(this,"onPlexPassModalClose"),this.collection=this.model.get("settings"),this.collection.populate({reset:!0}),this.model.isVersionOrNewer("0.9.15.5")?this.changes={PublishServerOnPlexOnlineKey:1}:this.changes={FirstRun:0,PublishServerOnPlexOnlineKey:1};var e=this.model.get("superToken");
e&&(this.changes.PlexOnlineToken=e);var n=s.resolve("appModel");this.isPlexPassModalOpen=!n.get("user").get("hasPlexPass")},serializeData:function(){var e=this.model.toJSON(),t=this.collection.get("FriendlyName"),n=this.collection.get("PublishServerOnPlexOnlineKey");return{server:e,friendlyNameSetting:t?t.toJSON():null,publishSetting:n?n.toJSON():null}},mountReact:function(){a.render(r.createElement(c,{store:s.resolve("appStore"),metricsProperties:{context:"setupWizard",firstRun:!0},isOpen:this.isPlexPassModalOpen,
onModalClose:this.onPlexPassModalClose}),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&a.unmountComponentAtNode(this.ui.modalContainer[0])},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");var n=this.save();n=n.done(t.bind(function(){this.ui.nextBtn.click()},this)),n.always(function(){e.removeClass("active")})}},save:function(){var e=this,i=t.isEmpty(this.changes)?n.Deferred().resolve().promise():this.collection.first().save(this.changes),r=s.resolve("appModel"),a=r.get("user").get("isSignedIn");
return this.model.supports("claimServer")&&!this.model.get("superToken")&&a&&(i=i.then(function(){return e.model.get("isClaimed")?n.Deferred().resolve().promise():u.execute("signInServer",{claim:!0,cloudAccount:e.model.get("cloudAccount")})})),i=i.fail(function(){l.trigger("show:alert",{type:"error",message:o("There was a problem saving these settings.")})})},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()},onInputChange:function(e){
var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked?1:0),this.changes[t.id]=n},onSubmit:function(e){e.preventDefault(),this.submit()},onPlexPassModalClose:function(){this.isPlexPassModalOpen=!1,this.mountReact()}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1913),n(3),n(5),n(9),n(6),n(8),n(294),n(10),n(13),n(1640)],r=function(e,t,n,i,r,a,s,o,l,u){"use strict";var c=i.ItemView.extend({className:"setup-complete-container",template:e,ui:{submitBtn:".submit-btn",
doneBtn:".done-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange","submit #setup-complete-form":"onSubmit"},initialize:function(){this.collection=this.model.get("settings"),this.collection.populate({reset:!0}),this.changes={}},serializeData:function(){var e=this.collection.get("collectUsageData");return{devicesImage:u,collectUsageDataSetting:e?e.toJSON():null}},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");var t=this.save();
t.always(this.whenRendered(function(){this.ui.doneBtn.click(),e.removeClass("active")}))}},save:function(){t.has(this.changes,"collectUsageData")&&!this.changes.collectUsageData&&o.resolve("metrics").trackClick({action:"optOutMetrics",page:"setupWizard",pane:"complete",firstRun:!0});var e=this.collection.first().save(this.changes),i=this.model.get("sections").filter(function(e){return e.isNew()}).map(function(e){return e.save()}),l=n.when(e,s(i));return l.fail(function(){a.trigger("show:alert",{type:"error",
message:r("There was a problem saving these settings.")})}),l},onInputChange:function(e){var t=e.currentTarget,n=t.value;"checkbox"===t.type&&(n=t.checked?1:0),this.changes[t.id]=n},onSubmit:function(e){e.preventDefault(),this.submit()}});return c}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1914),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"setup-error-container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;
i=[n(1915),n(5),n(9),n(8),n(83),n(124),n(263),n(180),n(493),n(1230),n(117)],r=function(e,t,n,i,r,a,s,o,l,u,c){"use strict";var d=n.Layout.extend({className:"setup-library-container",template:e,regions:{list:".setup-section-list-container"},events:{"click .add-section-btn":"onAddSectionClick"},metricsValue:function(){return this.collection.size()},initialize:function(e){var n=this.model,i=n.get("sections"),r=new s([],{server:n,url:"/services/defaultLibraries"});this.collection=i,this.model.supports("defaultSections")&&e.isFirstVisitToSubset&&t.when(r.populate(),i.populate()).done(function(){
i.length||r.forEach(function(e){e.collection=i,i.add(e)})})},onRender:function(){this.list.show(new u({collection:this.collection}))},onAddSectionClick:function(e){e.preventDefault(),i.trigger("show:modal",new c({server:this.model}))}});return d}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1916),n(9)],r=function(e,t){"use strict";var n=t.ItemView.extend({className:"setup-loading-container",template:e});return n}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;
i=[n(1917),n(3),n(5),n(9),n(8),n(26),n(10),n(13),n(180),n(497),n(1328),n(1326),n(1324),n(1327),n(1325)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f){"use strict";var m={setupSignIn:u,setupLoading:c,setupError:d,setupBasic:h,setupLibrary:p,setupComplete:f},v={setupError:"error",setupBasic:"name",setupLibrary:"library",setupComplete:"complete"},g=["com.plexapp.agents.imdb","com.plexapp.agents.thetvdb","com.plexapp.agents.lastfm"],y=i.Layout.extend({className:"container",template:e,maxAttempts:120,ui:{
header:".setup-header"},regions:{container:".setup-container"},events:{"click .segment-btn":"onNavClick","click .next-btn":"onNavClick","click .done-btn":"onDoneClick"},onlyAfterRender:["onAgentsSuccess","onAgentsFail","onUpdatesComplete"],initialize:function(e){t.bindAll(this,"start","onAgentsSuccess","onAgentsFail","onUpdatesComplete"),this.subset=e.subset||"setupLoading",this.attempts=0,this._visitedSubsets={},a.info("Starting the setup wizard")},serializeData:function(){return{subset:this.subset
}},renderSubset:function(){if(this.model.get("shared"))return void this.navigate("setupError");if(this.hasSkippedSignIn)return this.navigate("setupLoading"),void this.start();var e=s.resolve("appModel"),t=e.get("user").server;t.populate().done(this.whenRendered(function(){this.navigate("setupLoading"),this.start()})).fail(this.whenRendered(function(){t.get("isConnected")?this.navigate("setupSignIn"):(this.navigate("setupLoading"),this.start())}))},start:function(){if(this.attempts>=this.maxAttempts)return a.error("Failed to start the setup wizard after "+this.attempts+" attempts"),
void this.navigate("setupError");this.attempts++;var e=this.model.get("startState");if(e)a("Waiting for server to start ("+e+")"),this.model.fetch().done(t.delay(this.start,500));else{var n=new l([],{server:this.model}),i=n.fetch({scope:"page",timeout:0});i.done(this.onAgentsSuccess),i.fail(this.onAgentsFail)}},navigate:function(e){var t="setupSignIn"===e,n=m[e],i=v[e];this.previousSubset=this.subset,this.subset=e,i&&s.resolve("metrics").trackView({page:"setupWizard",pane:i,firstRun:!0});var r=!this._visitedSubsets[e];
this._visitedSubsets[e]=!0;var a=new n({model:this.model,isFirstRun:!0,isFirstVisitToSubset:r});this.container.show(a),t&&this.listenTo(a,"skipSignIn",this.onSignInSkip),this.ui.header.toggleClass("hidden",t),this.$el.addClass(e),this.previousSubset!==e&&this.$el.removeClass(this.previousSubset)},onRender:function(){var e=s.resolve("appModel");e.set("isFirstRun",!0),this.renderSubset()},onClose:function(){var e=s.resolve("appModel");e.set("isFirstRun",!1)},onSignInSkip:function(){this.hasSkippedSignIn=!0,
this.renderSubset()},onAgentsSuccess:function(e){a("Looking for a core agent");for(var t=0,n=g.length;t<n;t++){var i=g[t];if(e.get(i)){a(i+" found");var r=o.execute("updateChannel",{server:this.model,silent:!0});return void r.always(this.onUpdatesComplete)}}a.error("No core agents found"),this.navigate("setupError")},onAgentsFail:function(){a.warn("Unable to request agents"),t.delay(this.start,500)},onUpdatesComplete:function(){this.navigate("setupBasic")},onNavClick:function(e){e.preventDefault();
var t=n(e.currentTarget),i=t.data("subset"),a=t.hasClass("segment-btn")&&"setupBasic"===this.subset;a&&this.container.currentView?(e.preventDefault(),this.container.currentView.submit()):(this.navigate(i),r.trigger("navigate",i,{trigger:!1}))},onDoneClick:function(e){e.preventDefault(),s.resolve("metrics").trackClick({page:"setupWizard",action:"complete",firstRun:!0}),r.trigger("navigate","dashboard")}});return y}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1918),n(9),n(8),n(31),n(511)],
r=function(e,t,n,i,r){"use strict";var a=t.Layout.extend({className:"side-bar",template:e,ui:{sortContainer:".section-sort-container"},regions:{sort:".section-sort-list-container"},initialize:function(){this.hidden=!i.get("sidebarOpen"),this.hidden?this.$el.addClass("transition-out"):n.trigger("show:bar","sidebar")},open:function(){this.hidden=!1,i.save("sidebarOpen",!0),this.$el.removeClass("transition-out"),n.trigger("show:bar","sidebar")},hide:function(){this.hidden=!0,i.save("sidebarOpen",!1),
this.$el.addClass("transition-out"),n.trigger("hide:bar","sidebar")},onRender:function(){this.sort.show(new r({collection:this.model.get("sorts")}))},onClose:function(){n.trigger("hide:bar","sidebar")}});return a}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1919),n(3),n(9),n(6),n(8),n(10),n(31),n(149),n(1153),n(1209),n(1210),n(1212),n(511)],r=function(e,t,n,i,r,a,s,o,l,u,c,d,h){"use strict";var p=n.Layout.extend({className:"side-bar",template:e,ui:{newFilterBtn:".new-filter-icon-btn",
filterOptionsHeader:".filter-options-header",typeContainer:".section-type-container",sortContainer:".section-sort-container"},regions:{currentFilters:".section-current-filters-list-container",filters:".section-filters-list-container",filterOptions:".section-filter-option-list-container",sort:".section-sort-list-container"},modelEvents:{"change:currentFilters":"onCurrentFiltersChange","change:currentType":"onCurrentTypeChange","change:title":"onSectionTitleChange"},events:{"click .new-filter-btn":"onNewFilterClick",
"click .hide-btn":"onHideClick"},initialize:function(e){this.hidden=!s.get("sidebarOpen"),this.advancedFilters=!!this.model.get("allowAdvancedFilters"),this.linearFilters=!this.advancedFilters,this.mediaActions=e.mediaActions,this.supportsQuickSearch=this.model.server.supports("quickSearch"),this.hidden?this.$el.addClass("transition-out"):r.trigger("show:bar","sidebar"),this.supportsQuickSearch||a.resolve("appStore").dispatch(o.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),
type:"section",placeholder:this.model.get("title"),query:this.getSearchValue()})),this.listenTo(r,"search:section",this.onSearch)},serializeData:function(){return{showNewFilterIconBtn:this.advancedFilters&&!!this.model.get("currentFilters").length}},open:function(){this.hidden=!1,s.save("sidebarOpen",!0),this.$el.removeClass("transition-out"),r.trigger("show:bar","sidebar")},hide:function(){this.hidden=!0,s.save("sidebarOpen",!1),this.$el.addClass("transition-out"),r.trigger("hide:bar","sidebar");
},getSearchValue:function(){var e=this.model.get("currentFilters"),n=t.findWhere(e,{key:"title"});return n&&n.values.length?n.values[0]:""},addFilter:function(e,n){n||(n={});var i=this.model.get("currentFilters");this.linearFilters&&i.length&&(i.length=0);var r=t.findWhere(i,{key:e.key});if(r){if(t.indexOf(r.values,e.value)>-1)return;n.replace?(r.titles=[e.title],r.values=[e.value]):(r.titles.push(e.title),r.values.push(e.value))}else i.push({key:e.key,titles:[e.title],values:[e.value]});this.model.trigger("change:currentFilters",this.model,i);
},removeFilter:function(e){var n=this.model.get("currentFilters"),i=t.findWhere(n,{key:e.key});i&&(i.titles=t.reject(i.titles,function(t){return t===e.title}),i.values=t.reject(i.values,function(t){return t===e.value}),i.values.length||n.splice(t.indexOf(n,i),1)),this.model.trigger("change:currentFilters",this.model,n)},removeAllFilters:function(e){var n=this.model.get("currentFilters"),i=t.findWhere(n,{key:e});n.splice(t.indexOf(n,i),1),this.model.trigger("change:currentFilters",this.model,n)},onRender:function(){
var e="all"!==this.model.get("currentSubset").id,n=this.model.get("currentFilters");e&&(n.length=0);var i=new u({model:this.model,disabled:e}),a=new h({collection:this.model.get("sorts"),disabled:e});if(this.listenTo(i,"removeAllFilters",this.onRemoveAllFilters),this.listenToOnce(a,"collection:rendered",this.onSortListRender),this.currentFilters.show(i),this.sort.show(a),!e){var s=this.model.get("filters").populate({reset:!0,scope:"page"});s.done(t.bind(function(t){if(!this.isClosed){var n=this.linearFilters?t.filterBySecondary():t,i=new c({
collection:n,disabled:e});this.listenTo(i,"itemview:addFilter",this.onAddFilter),this.listenTo(i,"itemview:removeFilter",this.onRemoveFilter),this.listenTo(i,"itemview:showOptions",this.onFilterListShowOptions),this.filters.show(i)}},this))}n.length&&r.trigger("show:bar","filterbar",new l({model:this.model}))},onClose:function(){this.supportsQuickSearch||a.resolve("appStore").dispatch(o.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:void 0,placeholder:void 0})),r.trigger("hide:bar","sidebar"),
r.trigger("hide:bar","filterbar")},onCurrentFiltersChange:function(e,t){var n=!!t.length;this.ui.newFilterBtn.toggleClass("hidden",this.linearFilters||!n),this.supportsQuickSearch||a.resolve("appStore").dispatch(o.changeSearchQuery({serverEntityID:this.model.server.entityID(),query:this.getSearchValue()})),n?r.trigger("show:bar","filterbar",new l({model:this.model})):r.trigger("hide:bar","filterbar")},onCurrentTypeChange:function(e,t){this.$el.removeClass("show-filters show-filter-options"),this.removeAllFilters();
},onSectionTitleChange:function(e,t){this.model.server.supports("quickSearch")||a.resolve("appStore").dispatch(o.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),placeholder:t}))},onSearch:function(e){return e?void this.addFilter({key:"title",value:e,title:e},{replace:!0}):void this.removeAllFilters("title")},onAddFilter:function(e,t){this.addFilter(t)},onRemoveFilter:function(e,t){this.removeFilter(t)},onRemoveAllFilters:function(e){this.removeAllFilters(e)},onFilterListShowOptions:function(e,t){
var n=t.get("title");this.$el.addClass("show-filter-options"),this.$el.removeClass("show-filters"),this.ui.filterOptionsHeader.text(n);var i=new d({collection:t.get("options")});this.listenTo(i,"addFilter",this.onAddFilter),this.listenTo(i,"removeAllFilters",this.onRemoveAllFilters),this.listenTo(i,"itemview:addFilter",this.onAddFilter),this.listenTo(i,"itemview:removeFilter",this.onRemoveFilter),this.filterOptions.show(i)},onSortListRender:function(e){this.ui.sortContainer.toggleClass("hidden",!e.collection.length);
var t=e.collection.length;t||this.listenToOnce(e,"before:item:added",this.onSortListItemAdded)},onSortListItemAdded:function(e){this.ui.sortContainer.removeClass("hidden")},onNewFilterClick:function(e){e.preventDefault(),this.$el.addClass("show-filters")},onHideClick:function(e){e.preventDefault(),this.$el.hasClass("show-filter-options")?(this.$el.removeClass("show-filter-options"),this.$el.addClass("show-filters")):this.$el.removeClass("show-filters")}});return p}.apply(t,i),!(void 0!==r&&(e.exports=r));
},function(e,t,n){var i,r;i=[n(1920),n(9),n(1232)],r=function(e,t,n){"use strict";var i=t.Layout.extend({className:"container",template:e,regions:{list:".announcements-container"},onRender:function(){this.list.show(new n({collection:this.collection}))}});return i}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1921),n(3),n(9),n(6),n(61),n(36),n(8)],r=function(e,t,i,r,a,s,o){"use strict";var l=i.ItemView.extend({className:"container queue-help-container",template:e,ui:{queueEmail:".queue-email",
plexitBtn:".btn-plexit"},events:{"focus .queue-email":"onQueueEmailFocus","mouseup .queue-email":"onQueueEmailMouseUp","click .btn-plexit":"onPlexitClick","mousedown .btn-plexit":"onPlexitMouseDown","mouseup .btn-plexit":"onPlexitMouseUp"},initialize:function(e){this.queueEmail=e.queueEmail,"ie"===a.id?(this.stepsImgSrc=n(1637),this.modalText=r('Right click the "Plex It!" button and choose Add to Favorites so you can save videos to Watch Later.'),this.firstStepText=r("Add the button above to your favorites bar.")):(this.stepsImgSrc=n(1638),
this.modalText=r('Drag the "Plex it!" button to your Bookmarks Bar so you can save videos to your Watch Later.'),this.firstStepText=r("Drag the button above to your bookmarks bar."));var i=["OSX","Windows","Linux"];if(t.indexOf(i,a.platform)!==-1){var s=r("OSX"===a.platform?"\u2318 C":"Ctrl C");this.copyCommand=r("{1} to copy",s)}},serializeData:function(){return{queueEmail:this.queueEmail,copyCommand:this.copyCommand,stepsImgSrc:this.stepsImgSrc,emailImgSrc:n(1639),firstStepText:this.firstStepText
}},onRender:function(){this.copyCommand&&this.$el.tooltip({selector:".queue-email",placement:"top",trigger:"focus"})},onQueueEmailFocus:function(e){this.ui.queueEmail.selectText()},onQueueEmailMouseUp:function(e){return!1},onPlexitClick:function(e){e.preventDefault();var t=new s({title:r("Plex It!"),message:this.modalText,confirmLabel:r("OK"),hideCancel:!0});o.trigger("show:modal",t)},onPlexitMouseDown:function(){this.ui.plexitBtn.css("user-select","text")},onPlexitMouseUp:function(){this.ui.plexitBtn.css("user-select","none");
}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){var i,r;i=[n(1922),n(3),n(5),n(9),n(6),n(8),n(31),n(1236)],r=function(e,t,n,i,r,a,s,o){"use strict";var l=i.Layout.extend({className:"container",template:e,ui:{navLinks:".nav a",allBadge:".all-btn > .badge",unwatchedBadge:".unwatched-btn > .badge",watchedBadge:".watched-btn > .badge"},regions:{list:".user-playlist-container"},events:{"click .nav a":"onNavClick"},initialize:function(e){this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems"),
this.initSubset(e),this.subsets={all:this.collection,unwatched:this.listModel.filterUnwatched(),watched:this.listModel.filterWatched()},this.listenTo(this.collection,{add:this.onCollectionChange,remove:this.onCollectionChange,"change:viewCount":this.onCollectionChange})},initSubset:function(e){var t=e.subset,n=this.listModel.get("key")+"!subset";t||(t=s.get(n)),t||(t="unwatched"),s.save(n,t),this.subset=t},serializeData:function(){var e=this.listModel.get("key");return{label:this.listModel.get("label"),
helpRoute:this.listModel.get("helpRoute"),defaultTarget:"_self",filters:[{title:r("All"),key:e,subset:"all"},{title:r("Unwatched"),key:e,subset:"unwatched"},{title:r("Watched"),key:e,subset:"watched"}]}},updateBadges:function(){var e={all:this.subsets.all.length,unwatched:this.subsets.unwatched.length,watched:this.subsets.watched.length};t.each(t.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},onRender:function(){this.list.show(new o({collection:this.subsets[this.subset]
})),this.ui.navLinks.filter('[href*="/'+this.subset+'"]').addClass("selected"),this.updateBadges()},onCollectionChange:function(){this.subsets.unwatched.set(this.listModel.filterUnwatched().models),this.subsets.watched.set(this.listModel.filterWatched().models),this.updateBadges()},onNavClick:function(e){e.preventDefault(),this.ui.navLinks.removeClass("selected"),n(e.currentTarget).addClass("selected"),this.initSubset({subset:t.last(e.currentTarget.href.split("/"))}),this.list.show(new o({collection:this.subsets[this.subset]
})),a.trigger("navigate","userPlaylist",{key:this.listModel.get("key"),subset:this.subset,trigger:!1})}});return l}.apply(t,i),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.name,i=e.width,s=e.height,o=r(e,["className","name","width","height"]),u=n.toUpperCase().split(" "),d=u[0].charAt(0),p=u[u.length-1].charAt(0),f=u.length>1?""+d+p:n.charAt(0),m={fontSize:Math.max(14,Math.min(Math.round(i/4),42)),lineHeight:s+"px"};return l.default.createElement("div",a({
style:m,className:(0,c.default)(t,h.default.anagram)},o),f)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(1526),h=s(d);i.propTypes={className:o.PropTypes.string,width:o.PropTypes.number,height:o.PropTypes.number,name:o.PropTypes.string.isRequired},i.defaultProps={width:13,height:13},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(6),d=o(c),h=n(23),p=n(27),f=o(p),m=n(225),v=o(m),g=n(40),y=o(g),b=n(1528),w=o(b),S=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isCollapsible:!1,isCollapsed:!0}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,f.default)(this,e,t)}},{key:"onTogglePress",decorators:[h.autobind],value:function(){this.setState({isCollapsed:!this.state.isCollapsed
})}},{key:"onMeasure",decorators:[h.autobind],value:function(e){var t=e.height;this.setState({isCollapsible:t>this.props.maximumHeight,actualHeight:t})}},{key:"render",value:function(){var e=this.state,t=e.actualHeight,n=e.isCollapsed,i=e.isCollapsible,r=this.props.maximumHeight,a={maxHeight:n?r:t,overflow:"hidden"};return u.default.createElement("div",null,u.default.createElement("div",{className:w.default.contents,style:a},u.default.createElement(v.default,{onMeasure:this.onMeasure},this.props.children)),i&&u.default.createElement("div",{
className:w.default.divider},u.default.createElement(y.default,{className:w.default.toggle,onPress:this.onTogglePress},n?(0,d.default)("More"):(0,d.default)("Less"))))}}]),t}(l.Component);S.propTypes={children:l.PropTypes.node.isRequired,maximumHeight:l.PropTypes.number},S.defaultProps={maximumHeight:72},t.default=S,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=r(e,["className"]);return l.default.createElement(h.default,a({name:"plex-icon-pp-badge-560",className:(0,
c.default)(f.default.plexPassIcon,t)},n))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(48),h=s(d),p=n(1530),f=s(p);i.propTypes={className:o.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.spinnerSize,s=e.isSpinning,o=r(e,["children","className","spinnerSize","isSpinning"]);return l.default.createElement(m.default,a({className:(0,
c.default)(n,g.default.button,s&&g.default.isSpinning),isDisabled:s},o),l.default.createElement("span",{className:g.default.spinnerContainer},l.default.createElement(p.default,{className:g.default.spinner,size:i})),l.default.createElement("span",{className:g.default.label},t))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(41),h=n(68),p=s(h),f=n(152),m=s(f),v=n(1538),g=s(v);i.propTypes={className:o.PropTypes.string,
children:o.PropTypes.node,isSpinning:o.PropTypes.bool,spinnerSize:o.PropTypes.oneOf(d.sizes.all)},i.defaultProps={isSpinning:!1,spinnerSize:d.sizes.SMALL},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(30),h=l(d),p=n(23),f=n(1539),m=l(f),v=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return r(t,e),a(t,[{key:"onChange",decorators:[p.autobind],value:function(e){var t=e.target.checked,n=t?this.props.checkedValue:this.props.uncheckedValue;this.props.value!==n&&this.props.onChange(n)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.inputClassName,i=e.errorClassName,r=e.checkboxText,a=e.name,s=e.value,l=e.checkedValue,u=e.hasError;o(e,["className","inputClassName","errorClassName","checkboxText","name","value","checkedValue","hasError"]);return c.default.createElement("label",{
className:(0,h.default)(t,u&&i),htmlFor:a},c.default.createElement("input",{id:a,type:"checkbox",className:n,checked:s===l,onChange:this.onChange}),r)}}]),t}(u.Component);v.defaultProps={className:m.default.label,inputClassName:m.default.input,errorClassName:m.default.hasError,value:!1,uncheckedValue:!1,checkedValue:!0,hasError:!1},v.propTypes={className:u.PropTypes.string,inputClassName:u.PropTypes.string,errorClassName:u.PropTypes.string,checkboxText:u.PropTypes.node.isRequired,name:u.PropTypes.string.isRequired,
value:u.PropTypes.oneOfType([u.PropTypes.string,u.PropTypes.bool]),uncheckedValue:u.PropTypes.oneOfType([u.PropTypes.string,u.PropTypes.bool]),checkedValue:u.PropTypes.oneOfType([u.PropTypes.string,u.PropTypes.bool]),hasError:u.PropTypes.bool,onChange:u.PropTypes.func.isRequired},t.default=v,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.labelText,n=e.checkboxText,i=e.showErrors,o=e.errors,l=r(e,["labelText","checkboxText","showErrors","errors"]),c=a(o,1),d=c[0];return u.default.createElement(p.default,null,t&&u.default.createElement(m.default,null,t),u.default.createElement(g.default,s({},l,{
hasError:i,checkboxText:u.default.createElement("span",null,n,i&&d&&" \u2014 "+d)})))}var r=n(14).default,a=n(137).default,s=n(11).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(195),d=o(c),h=n(237),p=o(h),f=n(153),m=o(f),v=n(1339),g=o(v);i.propTypes={labelText:l.PropTypes.node,checkboxText:l.PropTypes.node.isRequired,showErrors:l.PropTypes.bool,errors:l.PropTypes.arrayOf(l.PropTypes.string)},i.defaultProps={showErrors:!1,errors:[]},t.default=(0,d.default)(i),
e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(14).default,u=n(89).default,c=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),h=c(d),p=n(7),f=c(p),m=n(23),v=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={}}return r(t,e),a(t,[{key:"getChildContext",value:function(){return{formState:this.state,onInputChange:this.onInputChange,
onFormReset:this.onFormReset}}},{key:"componentDidUpdate",value:function(e,t){t!==this.state&&this.props.onChange(this.state)}},{key:"onInputChange",decorators:[m.autobind],value:function(e){this.setState(function(t){return o({},t,e)})}},{key:"onFormReset",decorators:[m.autobind],value:function(){var e=u(this.state).reduce(function(e,t){return e[t]=void 0,e},{});this.setState(e)}},{key:"onSubmit",decorators:[m.autobind],value:function(e){var t=this;e.preventDefault(),e.nativeEvent.preventDefault();
var n=u(this.state).some(function(e){var n=t.state[e];return 0!==n.errors.length});if(n){var i=h.default.mapObject(this.state,function(e){return o({},e,{showErrors:0!==e.errors.length})});this.setState(i)}else{var r=h.default.mapObject(this.state,function(e,t){return e.value});this.props.onSubmit(r,this.state)}}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.onChange,l(e,["children","onChange"]));return f.default.createElement("form",o({},n,{onSubmit:this.onSubmit}),t)}}]),t}(p.Component);
v.childContextTypes={formState:p.PropTypes.object,onInputChange:p.PropTypes.func,onFormReset:p.PropTypes.func},v.propTypes={children:p.PropTypes.node,onSubmit:p.PropTypes.func,onChange:p.PropTypes.func},v.defaultProps={onSubmit:function(){},onChange:function(){}},t.default=v,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.onErrorDismiss,n=e.errorMessage;return s.default.createElement("div",{className:f.default.sectionError},s.default.createElement(c.default,{name:"plex-icon-alert-560",
className:f.default.sectionErrorIcon}),n?n:(0,l.default)("There was a problem saving your changes."),s.default.createElement(h.default,{className:f.default.sectionErrorDismiss,onPress:t},m))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(48),c=r(u),d=n(40),h=r(d),p=n(1542),f=r(p),m=s.default.createElement(c.default,{name:"plex-icon-remove-560"});i.propTypes={errorMessage:a.PropTypes.string,onErrorDismiss:a.PropTypes.func},t.default=i,e.exports=t.default;
},function(e,t,n){"use strict";function i(e){var t=e.labelText,n=e.name,i=e.value,a=e.showErrors,s=e.errors,l=e.onChange,c=e.onBlur,d=""===i?null:w[(0,u.default)(i).score],h=r(s,1),p=h[0];return o.default.createElement(m.default,null,o.default.createElement(g.default,{hasError:a,name:n},t,d&&!a&&o.default.createElement("span",null," \u2014 ",o.default.createElement("span",{style:{color:d.color}},d.translateFn())),a&&" \u2014 "+p),o.default.createElement(b.default,{name:n,type:"password",value:i,hasError:a,
onChange:l,onBlur:c}))}var r=n(137).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(375),u=a(l),c=n(6),d=a(c),h=n(195),p=a(h),f=n(237),m=a(f),v=n(153),g=a(v),y=n(531),b=a(y),w={0:{color:"#ff5533",translateFn:function(){return(0,d.default)("Too weak")}},1:{color:"#ee8833",translateFn:function(){return(0,d.default)("Very weak")}},2:{color:"#eebb00",translateFn:function(){return(0,d.default)("Somewhat weak")}},3:{color:"#bbbb33",translateFn:function(){return(0,
d.default)("Somewhat Strong")}},4:{color:"#66bb55",translateFn:function(){return(0,d.default)("Very Strong")}}};i.defaultProps={showErrors:!1},i.propTypes={labelText:s.PropTypes.node.isRequired,name:s.PropTypes.string.isRequired,value:s.PropTypes.string.isRequired,showErrors:s.PropTypes.bool,errors:s.PropTypes.arrayOf(s.PropTypes.string).isRequired,onChange:s.PropTypes.func.isRequired,onBlur:s.PropTypes.func.isRequired},t.default=(0,p.default)(i),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(89).default,c=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=c(d),p=n(30),f=c(p),m=n(23),v=n(1543),g=c(v),y=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"onChange",decorators:[m.autobind],value:function(e){this.props.onChange(e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.errorClassName,i=e.name,r=e.value,a=e.values,s=e.hasError,c=o(e,["className","errorClassName","name","value","values","hasError"]);
return h.default.createElement("select",l({},c,{id:i,name:i,className:(0,f.default)(t,s&&n),value:r,onChange:this.onChange}),u(a).map(function(e){return h.default.createElement("option",{key:e,value:e},a[e])}))}}]),t}(d.Component);y.defaultProps={className:g.default.input,errorClassName:g.default.hasError,hasError:!1},y.propTypes={className:d.PropTypes.string,errorClassName:d.PropTypes.string,name:d.PropTypes.string.isRequired,value:d.PropTypes.string.isRequired,values:d.PropTypes.oneOfType([d.PropTypes.arrayOf(d.PropTypes.string),d.PropTypes.object]),
hasError:d.PropTypes.bool,onChange:d.PropTypes.func.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.name,n=e.value,i=e.values,a=e.labelText,s=e.showErrors,l=e.errors,u=e.onChange,c=e.onBlur,h=r(l,1),f=h[0];return o.default.createElement(d.default,null,o.default.createElement(p.default,{name:t,hasError:s},a,s&&f&&" \u2014 "+f),o.default.createElement(m.default,{name:t,value:n,values:i,onChange:u,onBlur:c,hasError:s}))}var r=n(137).default,a=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(195),u=a(l),c=n(237),d=a(c),h=n(153),p=a(h),f=n(1344),m=a(f);i.propTypes={name:s.PropTypes.string.isRequired,value:s.PropTypes.string.isRequired,values:s.PropTypes.oneOfType([s.PropTypes.arrayOf(s.PropTypes.string),s.PropTypes.object]),labelText:s.PropTypes.node.isRequired,showErrors:s.PropTypes.bool,errors:s.PropTypes.arrayOf(s.PropTypes.string).isRequired,onChange:s.PropTypes.func.isRequired,onBlur:s.PropTypes.func.isRequired
},t.default=(0,u.default)(i),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.type,n=e.name,i=e.value,a=e.labelText,s=e.showErrors,l=e.errors,u=e.onChange,c=e.onBlur,h=r(l,1),f=h[0];return o.default.createElement(d.default,null,o.default.createElement(p.default,{hasError:s,name:n},a,s&&f&&" \u2014 "+f),o.default.createElement(m.default,{name:n,type:t,value:i,onChange:u,onBlur:c,hasError:s}))}var r=n(137).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});
var s=n(7),o=a(s),l=n(195),u=a(l),c=n(237),d=a(c),h=n(153),p=a(h),f=n(531),m=a(f);i.defaultProps={type:"text"},i.propTypes={type:s.PropTypes.oneOf(["text","password"]),name:s.PropTypes.string.isRequired,value:s.PropTypes.string.isRequired,labelText:s.PropTypes.node.isRequired,showErrors:s.PropTypes.bool,errors:s.PropTypes.arrayOf(s.PropTypes.string).isRequired,onChange:s.PropTypes.func.isRequired,onBlur:s.PropTypes.func.isRequired},t.default=(0,u.default)(i),e.exports=t.default},function(e,t,n){"use strict";
function i(e){return o.default.createElement("div",{className:d.default.avatar},o.default.createElement(u.default,r({},e,{background:!0})))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(469),u=a(l),c=n(1545),d=a(c);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=r(e,["children","className"]);return l.default.createElement("div",a({role:"menu",className:(0,c.default)(n,h.default.menu)
},i),t)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(1549),h=s(d);i.propTypes={className:o.PropTypes.string,children:o.PropTypes.node.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return s.default.createElement("div",{className:l.default.separator})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(1551),l=r(o);t.default=i,e.exports=t.default;
},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),c=n(7),d=o(c),h=n(10),p=n(27),f=o(p),m=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"componentDidMount",value:function(){(0,h.resolve)("metrics").trackView(u.default.omit(this.props,"children"))}},{key:"shouldComponentUpdate",value:function(e,t){
return(0,f.default)(this,e,t)}},{key:"render",value:function(){return d.default.Children.only(this.props.children)}}]),t}(c.Component);m.propTypes={children:c.PropTypes.element.isRequired,page:c.PropTypes.string.isRequired},t.default=m,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.className,i=e.target,a=e.attachment,o=e.options,l=e.isOpen,u=(e.onMenuClose,s(e,["children","className","target","attachment","options","isOpen","onMenuClose"]));return c.default.createElement(S.default,{
className:x.default.tooltipPortal,target:i,options:o||E[a],isOpen:l,closeTimeout:C},c.default.createElement(b.default,{isOpen:l,transitionName:T,transitionAppearTimeout:C,transitionEnterTimeout:C,transitionLeaveTimeout:C},l&&c.default.createElement("div",r({className:(0,h.default)(n,x.default.tooltip,x.default[a])},u),t)))}var r=n(11).default,a=n(49).default,s=n(14).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(7),c=o(u),d=n(30),h=o(d),p=n(41),f=n(159),m=o(f),v=n(160),g=o(v),y=n(226),b=o(y),w=n(528),S=o(w),P=n(1561),x=o(P),C=(0,
m.default)(g.default.tooltipSpeed),T={appear:x.default.enter,appearActive:x.default.enterActive,enter:x.default.enter,enterActive:x.default.enterActive,leave:x.default.leave,leaveActive:x.default.leaveActive},_={skipMoveElement:!0,constraints:[{to:"window",attachment:"together",pin:!0}]},E=(l={},a(l,p.tooltipAttachments.TOP_LEFT,r({},_,{attachment:"bottom left",targetAttachment:"top left"})),a(l,p.tooltipAttachments.TOP_CENTER,r({},_,{attachment:"bottom center",targetAttachment:"top center"})),a(l,p.tooltipAttachments.TOP_RIGHT,r({},_,{
attachment:"bottom right",targetAttachment:"top right"})),a(l,p.tooltipAttachments.BOTTOM_LEFT,r({},_,{attachment:"top left",targetAttachment:"bottom left"})),a(l,p.tooltipAttachments.BOTTOM_CENTER,r({},_,{attachment:"top center",targetAttachment:"bottom center"})),a(l,p.tooltipAttachments.BOTTOM_RIGHT,r({},_,{attachment:"top right",targetAttachment:"bottom right"})),a(l,p.tooltipAttachments.MIDDLE_LEFT,r({},_,{attachment:"middle right",targetAttachment:"middle left"})),a(l,p.tooltipAttachments.MIDDLE_RIGHT,r({},_,{
attachment:"middle left",targetAttachment:"middle right"})),l);i.propTypes={children:u.PropTypes.node,className:u.PropTypes.string,target:u.PropTypes.object,attachment:u.PropTypes.string,options:u.PropTypes.object,isOpen:u.PropTypes.bool.isRequired,onMenuClose:u.PropTypes.func},i.defaultProps={attachment:p.tooltipAttachments.BOTTOM_CENTER},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,h.createSelector)((0,f.default)(),(0,v.default)(),function(e,t){var n=l.default.pick(t,"hubIdentifier","title","type","size","more","random");
return a({machineIdentifier:e.machineIdentifier},n,{metadataListEntityID:t.metadataList,containerKey:t.key})})}function r(e){var t=e.title,n=e.hubIdentifier,i=e.type,r=e.containerKey,s=e.machineIdentifier,o=n.indexOf("music.video")!==-1?"musicVideo":i,l="home.continue"===n?y.default.CONTINUE_WATCHING:y.default.LIBRARY,u=encodeURIComponent(s),d=encodeURIComponent(r),h=encodeURIComponent(o),p=encodeURIComponent(t),f=r&&l!==y.default.CONTINUE_WATCHING?"#!/server/"+u+"/list?key="+d+"&type="+h+"&title="+p:null;
return c.default.createElement(w.default,a({listType:o,listContext:l,hubLink:f,component:P.default},e))}var a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(7),c=s(u),d=n(34),h=n(28),p=n(76),f=s(p),m=n(796),v=s(m),g=n(98),y=s(g),b=n(541),w=s(b),S=n(1354),P=s(S);r.propTypes={serverEntityID:u.PropTypes.string.isRequired,hubEntityID:u.PropTypes.string.isRequired,hubIdentifier:u.PropTypes.string.isRequired,type:u.PropTypes.string.isRequired,title:u.PropTypes.string.isRequired,
containerKey:u.PropTypes.string.isRequired,machineIdentifier:u.PropTypes.string.isRequired},t.default=(0,d.connect)(i)(r),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(23),d=n(27),h=o(d),p=n(1352),f=o(p),m={visibility:"hidden"},v={visibility:"visible"},g=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isReady:!1},this._numReadyHubs=0}return r(t,e),a(t,[{key:"componentWillMount",value:function(){this._numInitialHubs=this.props.hubEntityIDs.length}},{key:"shouldComponentUpdate",value:function(e,t){return(0,h.default)(this,e,t)}},{key:"onListReady",decorators:[c.autobind],value:function(){++this._numReadyHubs===this._numInitialHubs&&this.setState({isReady:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.serverEntityID,i=t.hubEntityIDs,r=this.state.isReady;return u.default.createElement("div",{
style:r?v:m},i.map(function(t){return u.default.createElement(f.default,{key:t,serverEntityID:n,hubEntityID:t,onListReady:e.onListReady})}))}}]),t}(l.Component);g.propTypes={serverEntityID:l.PropTypes.string.isRequired,hubEntityIDs:l.PropTypes.array.isRequired},t.default=g,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.metadataItemEntityIDs,n=e.populatedRange,i=r(e,["metadataItemEntityIDs","populatedRange"]);return l.default.createElement(f.default,a({},i,{keyPropName:"metadataItemEntityID",
items:t,itemsOffset:n.start,cellRenderer:(0,h.default)(e,v.default)}))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(475),c=s(u),d=n(563),h=s(d),p=n(540),f=s(p),m=n(543),v=s(m);i.propTypes={metadataItemEntityIDs:o.PropTypes.array.isRequired,populatedRange:c.default},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(7),u=o(l),c=n(27),d=o(c),h=n(336),p=o(h),f=n(40),m=o(f),v=n(320),g=o(v),y=n(319),b=o(y),w=n(1564),S=o(w),P=function(e){function t(){s(this,n),i(Object.getPrototypeOf(n.prototype),"constructor",this).apply(this,arguments)}r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,d.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.cellX,n=e.cellY,i=e.cellWidth,r=e.cellHeight,a=e.metadataKey,s=e.machineIdentifier,o=e.type,l=e.title,c=e.url,d=e.showOffscreenPlaceholder,h="photoAlbum"===o,p=encodeURIComponent(s),f=encodeURIComponent(a);
return u.default.createElement(g.default,{cellX:t,cellY:n,cellWidth:i,cellHeight:r},u.default.createElement("div",{className:S.default.photoContainer},u.default.createElement("div",{className:S.default.photo},u.default.createElement("div",{className:S.default.image},!d&&u.default.createElement(b.default,{key:a,url:c,width:i,height:r})),h?u.default.createElement(m.default,{className:S.default.albumLink,to:"#!/server/"+p+"/details/"+f},u.default.createElement("span",{className:S.default.albumTitle},l)):u.default.createElement(m.default,{
className:S.default.photoLink,onPress:this.props.onPlayPress}))))}}]);var n=t;return t=(0,p.default)(t)||t}(l.Component);P.propTypes={type:l.PropTypes.string.isRequired,title:l.PropTypes.string,metadataKey:l.PropTypes.string.isRequired,machineIdentifier:l.PropTypes.string.isRequired,cellX:l.PropTypes.number.isRequired,cellY:l.PropTypes.number.isRequired,cellWidth:l.PropTypes.number.isRequired,cellHeight:l.PropTypes.number.isRequired,showOffscreenPlaceholder:l.PropTypes.bool,url:l.PropTypes.string,
onPlayPress:l.PropTypes.func},t.default=P,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,p.createSelector)((0,m.default)(),(0,g.default)(),function(e,t){void 0===e&&(e={});var n=t.machineIdentifier,i=e.key,r=e.type,a=e.title,s=e.thumbTranscodeUrl;return{metadataKey:i,type:r,title:a,url:s(),machineIdentifier:n}})}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(34),p=n(28),f=n(274),m=u(f),v=n(76),g=u(v),y=n(23),b=n(228),w=n(1355),S=u(w),P=function(e){
function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"onPlayPress",decorators:[y.autobind],value:function(e){this.props.playMetadataItem({serverEntityID:this.props.serverEntityID,metadataItemEntityID:this.props.metadataItemEntityID})}},{key:"render",value:function(){return d.default.createElement(S.default,l({onPlayPress:this.onPlayPress},this.props))}}]),t}(c.Component);P.propTypes={serverEntityID:c.PropTypes.string.isRequired,
metadataItemEntityID:c.PropTypes.string,playMetadataItem:c.PropTypes.func.isRequired},t.default=(0,h.connect)(i,{playMetadataItem:b.playMetadataItem})(P),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.isMetadataItem,n=r(e,["isMetadataItem"]);return t?l.default.createElement(c.default,a({},n,{showSelect:!1})):l.default.createElement(h.default,a({},n,{isMetadataItem:!1}))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(542),c=s(u),d=n(1358),h=s(d);
i.propTypes={isMetadataItem:o.PropTypes.bool},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(27),p=u(h),f=n(197),m=u(f),v=n(336),g=u(v),y=n(320),b=u(y),w=n(556),S=u(w),P=n(547),x=u(P),C=n(549),T=u(C),_=n(1565),E=u(_),k=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cellX,i=e.cellY,r=e.cellWidth,a=e.cellHeight,s=e.showScrollPlaceholder,u=e.showOffscreenPlaceholder,c=e.listType,h=e.listContext,p=o(e,["className","cellX","cellY","cellWidth","cellHeight","showScrollPlaceholder","showOffscreenPlaceholder","listType","listContext"]),f=this.props.tag,v=(0,m.default)(c,h);return d.default.createElement(b.default,{
className:t,cellX:n,cellY:i,cellWidth:r,cellHeight:a},d.default.createElement("div",{className:E.default.imageContainer},d.default.createElement(T.default,l({className:E.default.imageLink},p)),d.default.createElement(S.default,l({},p,{width:r,title:f,isPlaceholder:s,isOffscreen:u}))),d.default.createElement("div",{className:E.default.titleContainer},v.map(function(e,t){return d.default.createElement(x.default,l({},p,e,{key:t,isSecondary:t>0}))})))}}]),t}(c.Component);k.propTypes={className:c.PropTypes.string,
tag:c.PropTypes.string.isRequired,cellX:c.PropTypes.number.isRequired,cellY:c.PropTypes.number.isRequired,cellWidth:c.PropTypes.number.isRequired,cellHeight:c.PropTypes.number.isRequired,showScrollPlaceholder:c.PropTypes.bool,showOffscreenPlaceholder:c.PropTypes.bool,listType:c.PropTypes.string.isRequired,listContext:c.PropTypes.string.isRequired},t.default=(0,g.default)(k),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(6),h=l(d),p=n(23),f=n(27),m=l(f),v=n(322),g=l(v),y=n(136),b=l(y),w=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{metadataListEntityID:this.props.metadataListEntityID}}},{key:"onPlayAllPress",decorators:[p.autobind],
value:function(e){this.props.playMetadataList(this._getActionPayload())}},{key:"onShufflePress",decorators:[p.autobind],value:function(e){this.props.shuffleMetadataList(this._getActionPayload())}},{key:"onAddToPlaylistPress",decorators:[p.autobind],value:function(e){this.props.addMetadataListToPlaylist(this._getActionPayload())}},{key:"onSyncPress",decorators:[p.autobind],value:function(e){this.props.syncMetadataList(this._getActionPayload())}},{key:"onOptimizePress",decorators:[p.autobind],value:function(e){
this.props.optimizeMetadataList(this._getActionPayload())}},{key:"render",value:function(){var e=this.props,t=e.target,n=e.isOpen,i=e.onMenuClose,r=o(e,["target","isOpen","onMenuClose"]);return c.default.createElement(g.default,{target:t,isOpen:n,onMenuClose:i},r.showPlayAll&&c.default.createElement(b.default,{onPress:this.onPlayAllPress},(0,h.default)("Play All")),r.showShuffle&&c.default.createElement(b.default,{onPress:this.onShufflePress},(0,h.default)("Shuffle")),r.showAddToPlaylist&&c.default.createElement(b.default,{
onPress:this.onAddToPlaylistPress},(0,h.default)("Add to Playlist...")),r.showSync&&c.default.createElement(b.default,{onPress:this.onSyncPress},(0,h.default)("Sync...")),r.showOptimize&&c.default.createElement(b.default,{onPress:this.onOptimizePress},(0,h.default)("Optimize...")))}}]),t}(u.Component);w.propTypes={metadataListEntityID:u.PropTypes.string.isRequired,target:u.PropTypes.object,isOpen:u.PropTypes.bool.isRequired,onMenuClose:u.PropTypes.func.isRequired,showPlayAll:u.PropTypes.bool,showShuffle:u.PropTypes.bool,
showAddToPlaylist:u.PropTypes.bool,showSync:u.PropTypes.bool,showOptimize:u.PropTypes.bool,playMetadataList:u.PropTypes.func,shuffleMetadataList:u.PropTypes.func,addMetadataListToPlaylist:u.PropTypes.func,syncMetadataList:u.PropTypes.func,optimizeMetadataList:u.PropTypes.func},t.default=w,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0
});var c=n(7),d=u(c),h=n(30),p=u(h),f=n(23),m=n(27),v=u(m),g=n(159),y=u(g),b=n(160),w=u(b),S=n(1361),P=u(S),x=n(1566),C=u(x),T="faceFront",_="faceBack",E=(0,y.default)(w.default.posterFlipSpeed),k={transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionAppearTimeout:0,transitionEnterTimeout:0,transitionLeaveTimeout:0},I=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={visibleFace:T,isLoadingFace:!1,
isFlippingFace:!1,previousImageUrl:null}}return r(t,e),a(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props.imageUrl,n=e.imageUrl&&t!==e.imageUrl,i=this.props.metadataKey===e.metadataKey;i&&n&&this._prepareFlip(t)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._cancelFlip()}},{key:"_prepareFlip",value:function(e){this._cancelFlip(),this.setState({isLoadingFace:!0,isFlippingFace:!0,previousImageUrl:e
})}},{key:"_flipCard",value:function(){this.setState({isLoadingFace:!1,visibleFace:this._getInverseFace(this.state.visibleFace)}),this._flipTimeoutID=setTimeout(this.onFlipComplete,E)}},{key:"_cancelFlip",value:function(){this._flipTimeoutID&&(this._flipTimeoutID=clearTimeout(this._flipTimeoutID))}},{key:"_getInverseFace",value:function(e){return e===T?_:T}},{key:"onImageLoad",decorators:[f.autobind],value:function(){this.state.isLoadingFace&&this._flipCard()}},{key:"onImageError",decorators:[f.autobind],
value:function(){this.state.isLoadingFace&&this._flipCard()}},{key:"onFlipComplete",decorators:[f.autobind],value:function(){this.setState({isFlippingFace:!1,previousImageUrl:null})}},{key:"render",value:function(){var e=this.props,t=e.cardWidth,n=e.cardHeight,i=e.isPlaceholder,r=e.metadataKey,a=e.imageUrl,s=e.isSelected,u=e.activeSelectionType,c=o(e,["cardWidth","cardHeight","isPlaceholder","metadataKey","imageUrl","isSelected","activeSelectionType"]),h=this.state,f=h.visibleFace,m=h.isLoadingFace,v=h.isFlippingFace,g=h.previousImageUrl,y=this._getInverseFace(f),b={
width:t,height:n};return i?d.default.createElement("div",{className:(0,p.default)(C.default.poster,s&&C.default.isSelected,!!u&&!s&&C.default.isOtherItemSelected),style:b}):d.default.createElement("div",{key:r,className:C.default.cardContainer},d.default.createElement("div",{className:(0,p.default)(C.default.card,f===_&&C.default.isFlipped),style:b},d.default.createElement(P.default,l({key:f,isSelected:s,activeSelectionType:u,visibleFace:f,cardWidth:t,cardHeight:n,metadataKey:r,imageUrl:m?g:a,imageTransitionProps:v?k:void 0,
onImageLoad:this.onImageLoad,onImageError:this.onImageError},c)),v&&d.default.createElement(P.default,l({key:y,isSelected:s,activeSelectionType:u,visibleFace:y,cardWidth:t,cardHeight:n,metadataKey:r,imageUrl:m?a:g,imageTransitionProps:v?k:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},c))))}}]),t}(c.Component);I.propTypes={cardWidth:c.PropTypes.number,cardHeight:c.PropTypes.number,isPlaceholder:c.PropTypes.bool,metadataKey:c.PropTypes.string,imageUrl:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]),
isSelected:c.PropTypes.bool,activeSelectionType:c.PropTypes.string},t.default=I,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.isSelected,n=e.visibleFace,i=e.cardWidth,s=e.cardHeight,o=e.isOffscreen,u=e.imageUrl,d=e.imageTransitionProps,p=e.onImageLoad,m=e.onImageError,g=r(e,["isSelected","visibleFace","cardWidth","cardHeight","isOffscreen","imageUrl","imageTransitionProps","onImageLoad","onImageError"]);return l.default.createElement("div",{className:(0,c.default)(v.default.face,v.default[n],t&&v.default.isSelected)
},l.default.createElement(h.default,{type:g.type,isOffscreen:o,url:u,width:i,height:s,transitionProps:d,onLoad:p,onError:m}),l.default.createElement(f.default,a({isSelected:t},g)))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(546),h=s(d),p=n(1362),f=s(p),m=n(1567),v=s(m);i.propTypes={isSelected:o.PropTypes.bool,visibleFace:o.PropTypes.string.isRequired,cardWidth:o.PropTypes.number.isRequired,cardHeight:o.PropTypes.number.isRequired,
isOffscreen:o.PropTypes.bool,imageUrl:o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.string]),imageTransitionProps:o.PropTypes.object,onImageLoad:o.PropTypes.func,onImageError:o.PropTypes.func},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default,c=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=u(d),p=n(30),f=u(p),m=n(6),v=u(m),g=n(23),y=n(39),b=u(y),w=n(431),S=c(w),P=n(27),x=u(P),C=n(41),T=n(118),_=u(T),E=n(338),k=u(E),I=n(1454),A=u(I),M=n(48),D=u(M),R=n(68),O=u(R),L=n(40),N=u(L),U=n(539),F=u(U),j=n(530),B=u(j),z=n(544),V=u(z),H=n(1569),q=u(H),W=function(e){
function t(e,t){s(this,n),i(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.state={isActionsMenuOpen:!1}}r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,x.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{serverEntityID:this.props.serverEntityID,metadataItemEntityID:this.props.metadataItemEntityID}}},{key:"onPlayPress",decorators:[g.autobind],value:function(e){this.props.playMetadataItem(this._getActionPayload())}},{key:"onEditPress",
decorators:[g.autobind],value:function(e){this.props.editMetadataItem(this._getActionPayload())}},{key:"onActionsPress",decorators:[g.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen})}},{key:"onActionsMenuClose",decorators:[g.autobind],value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.server,i=e.metadataKey,r=e.type,a=e.title,s=e.duration,u=e.viewCount,c=e.viewOffset,d=e.unviewedLeafCount,p=e.extraType,m=e.metadataState,g=e.mediaState,y=e.deletedAt,w=e.isLibraryItem,P=e.Media,x=e.hasActiveSelection,T=e.isSelected,_=e.isOtherItemSelected,E=e.isConflictingTypeSelected,I=e.isModifierKeyPressed,A=e.onMouseEnter,M=e.onSelectPress,R=e.onDeselectPress,L=o(e,["className","server","metadataKey","type","title","duration","viewCount","viewOffset","unviewedLeafCount","extraType","metadataState","mediaState","deletedAt","isLibraryItem","Media","hasActiveSelection","isSelected","isOtherItemSelected","isConflictingTypeSelected","isModifierKeyPressed","onMouseEnter","onSelectPress","onDeselectPress"]),U=this.state.isActionsMenuOpen,j=(0,
k.default)(this.props),z=encodeURIComponent(n.machineIdentifier),H=encodeURIComponent(i),W=b.default.get(r),K=b.default.getChildMediaType(r),Q=w&&!p&&"video"===W.element,Y=w&&"directory"===W.element&&"video"===K.element,G=Q&&P.length>1,$=m===S.MATCHING,X=m===S.PROCESSING||m===S.LOADING,J=!$&&!X&&!!g,Z=$||X||J,ee=!Z&&!!y,te=c&&c/s*100,ne=!p&&"photo"!==r&&"track"!==r,ie=j.showSelect&&(I||_);return h.default.createElement("div",{className:(0,f.default)(t,q.default.overlay,x&&q.default.hasActiveSelection,T&&q.default.isSelected,_&&q.default.isOtherItemSelected,E&&q.default.isConflictingTypeSelected,j.showSelect&&I&&q.default.isModifierKeyPressed,Z&&q.default.isRefreshing,ee&&q.default.isTrash,U&&q.default.isActionsMenuOpen),
onMouseEnter:A},h.default.createElement("div",{className:q.default.background}),Q&&!u&&!c&&h.default.createElement("div",{className:(0,f.default)(q.default.unwatchedTag)}),Y&&!!d&&h.default.createElement("div",{className:(0,f.default)(q.default.unwatchedBadge)},d),G&&h.default.createElement("div",{className:(0,f.default)(q.default.versionBadge)},h.default.createElement(D.default,{name:"plex-icon-files-560",className:q.default.versionBadgeIcon}),P.length),!!te&&h.default.createElement("div",{className:q.default.progress
},h.default.createElement("div",{className:q.default.progressTrack}),h.default.createElement("div",{style:{width:te+"%"},className:q.default.progressBar})),Z&&h.default.createElement("div",{className:q.default.refreshingSpinnerContainer},h.default.createElement(O.default,{className:q.default.refreshingSpinner})),$&&h.default.createElement("div",{className:(0,f.default)(q.default.refreshingCircle)},h.default.createElement(D.default,{name:"plex-icon-search-560","aria-label":(0,v.default)("Matching")
})),X&&h.default.createElement("div",{className:(0,f.default)(q.default.refreshingCircle)},h.default.createElement(D.default,{name:"plex-icon-tagging-560","aria-label":(0,v.default)("Downloading Metadata")})),J&&h.default.createElement("div",{className:(0,f.default)(q.default.refreshingCircle)},h.default.createElement(D.default,{name:"plex-icon-analyzing-560","aria-label":(0,v.default)("Analyzing")})),ee&&h.default.createElement("div",{className:(0,f.default)(q.default.trashCircle)},h.default.createElement(D.default,{
name:"plex-icon-trash-560","aria-label":(0,v.default)("In Trash")})),ne&&h.default.createElement(N.default,{className:q.default.link,to:"#!/server/"+z+"/details/"+H}),ie&&!E&&h.default.createElement(N.default,{className:q.default.selectCoverButton,onPress:M}),ie&&E&&h.default.createElement(F.default,{className:q.default.selectCoverButton,component:N.default,tooltip:(0,v.default)("A different type is selected"),tooltipAttachment:C.tooltipAttachments.TOP_CENTER,tooltipTarget:this.refs.selectButton,
showOnFocus:!1,hideOnPress:!1}),j.showPlay&&h.default.createElement(B.default,{className:ne?q.default.playButton:q.default.playCoverButton,circleClassName:q.default.playCircle,tabIndex:"-1",title:a,onPress:this.onPlayPress}),j.showEdit&&h.default.createElement(N.default,{className:q.default.editButton,tabIndex:"-1",onPress:this.onEditPress},h.default.createElement(D.default,{name:"plex-icon-edit-560","aria-label":(0,v.default)("Edit {1}",a)})),h.default.createElement(N.default,{ref:"moreButton",className:q.default.moreButton,
tabIndex:"-1","aria-haspopup":!0,onPress:this.onActionsPress},h.default.createElement(D.default,{name:"plex-icon-more-560","aria-label":(0,v.default)("More Actions")})),h.default.createElement(V.default,l({target:this.refs.moreButton,isOpen:U,onMenuClose:this.onActionsMenuClose},L,j,{showPlay:!1,showEdit:!1})),j.showSelect&&h.default.createElement(N.default,{ref:"selectButton",className:q.default.selectButton,isDisabled:E,onPress:M},h.default.createElement("div",{className:q.default.selectCircle}),h.default.createElement("div",{
className:q.default.selectedCircle},h.default.createElement(D.default,{name:"plex-icon-selected-560",className:q.default.selectedIcon,"aria-label":(0,v.default)("Selected")}))),T&&h.default.createElement(N.default,{className:q.default.deselectCoverButton,onPress:R}))}}]);var n=t;return t=(0,A.default)(t)||t}(d.Component);W.propTypes={className:d.PropTypes.string,serverEntityID:d.PropTypes.string.isRequired,metadataItemEntityID:d.PropTypes.string.isRequired,server:_.default.isRequired,metadataKey:d.PropTypes.string,
type:d.PropTypes.string,title:d.PropTypes.string,duration:d.PropTypes.number,viewCount:d.PropTypes.number,viewOffset:d.PropTypes.number,unviewedLeafCount:d.PropTypes.number,extraType:d.PropTypes.number,metadataState:d.PropTypes.string,mediaState:d.PropTypes.string,deletedAt:d.PropTypes.number,isLibraryItem:d.PropTypes.bool,Media:d.PropTypes.array,hasActiveSelection:d.PropTypes.bool,isSelected:d.PropTypes.bool,isOtherItemSelected:d.PropTypes.bool,isConflictingTypeSelected:d.PropTypes.bool,isModifierKeyPressed:d.PropTypes.bool,
showPlay:d.PropTypes.bool,showEdit:d.PropTypes.bool,playMetadataItem:d.PropTypes.func.isRequired,editMetadataItem:d.PropTypes.func.isRequired,onMouseEnter:d.PropTypes.func,onSelectPress:d.PropTypes.func,onDeselectPress:d.PropTypes.func},t.default=W,e.exports=t.default},function(e,t,n){"use strict";function i(e){switch(e){case"artist":return"track";default:return e}}function r(e){var t=e.isOffscreen,n=e.tagType,r=e.librarySectionType,s=e.title,o=e.url,u=e.width,d=e.height,p=e.transitionProps,m=e.onLoad,g=e.onError;
a(e,["isOffscreen","tagType","librarySectionType","title","url","width","height","transitionProps","onLoad","onError"]);if(t)return null;if(o)return l.default.createElement(y.default,{url:o,width:u,height:d,transitionProps:p,backgroundPosition:"top center",onLoad:m,onError:g});var b=h.default.get(n),w=b.typeString;if("actor"===w||"director"===w||"writer"===w)return l.default.createElement(f.default,{name:s,width:u,height:d});var S=c.default.get(r),P=S.typeString,x=i(P);return l.default.createElement(v.default,{
type:x,width:u,height:d})}var a=n(14).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(83),c=s(u),d=n(301),h=s(d),p=n(1335),f=s(p),m=n(545),v=s(m),g=n(319),y=s(g);r.propTypes={title:o.PropTypes.string.isRequired,tagType:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]).isRequired,librarySectionType:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]).isRequired,isOffscreen:o.PropTypes.bool,width:o.PropTypes.number.isRequired,height:o.PropTypes.number.isRequired,
url:o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.string]),transitionProps:o.PropTypes.object,onLoad:o.PropTypes.func,onError:o.PropTypes.func},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.title;return s.default.createElement("span",{className:t},n)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a);i.propTypes={className:a.PropTypes.string,title:a.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){
"use strict";function i(e){var t=e.className,n=e.childCount,i=void 0;return null!=n&&(i=1===n?(0,l.default)("{1} album",n):(0,l.default)("{1} albums",n)),s.default.createElement("span",{className:t},i)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o);i.propTypes={className:a.PropTypes.string,childCount:a.PropTypes.number},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.date;return s.default.createElement("span",{
className:t},(0,l.default)(n))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(143),l=r(o);i.propTypes={className:a.PropTypes.string,date:a.PropTypes.number},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.leafCount,i=void 0;return null!=n&&(i=1===n?(0,l.default)("{1} episode",n):(0,l.default)("{1} episodes",n)),s.default.createElement("span",{className:t},i)}var r=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(7),s=r(a),o=n(6),l=r(o);i.propTypes={className:a.PropTypes.string,leafCount:a.PropTypes.number},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.index,i=e.originallyAvailableAt,r=(0,l.default)({episodePrefix:"Episode {1}",episodeIndex:n,date:i,noLeadingZero:!0});return s.default.createElement("span",{className:t},r)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(172),l=r(o);i.propTypes={
className:a.PropTypes.string,index:a.PropTypes.number,originallyAvailableAt:a.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=r(e,["className"]);return o.default.createElement("span",{className:t},o.default.createElement(d.default,{className:n.isSecondary&&g.default.isSecondary,server:n.server,linkKey:n.metadataKey,linkTitle:n.title}),y,o.default.createElement(m.default,n))}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(7),o=a(s),l=n(118),u=a(l),c=n(324),d=a(c),h=n(325),p=a(h),f=n(548),m=a(f),v=n(583),g=a(v),y=o.default.createElement(p.default,null);i.propTypes={className:s.PropTypes.string,server:u.default,metadataKey:s.PropTypes.string,title:s.PropTypes.string,isSecondary:s.PropTypes.bool},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.leafCount,i=void 0;return null!=n&&(i=1===n?(0,l.default)("{1} item",n):(0,l.default)("{1} items",n)),s.default.createElement("span",{
className:t},i)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o);i.propTypes={className:a.PropTypes.string,leafCount:a.PropTypes.number},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.duration,i=e.viewOffset,r=void 0;if(n&&i){var a=(n-i)/1e3;a&&(r=(0,l.default)(a))}return s.default.createElement("div",{className:t},r)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(171),l=r(o);
i.propTypes={className:a.PropTypes.string,duration:a.PropTypes.number,viewOffset:a.PropTypes.number},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.childCount,i=void 0;return null!=n&&(i=1===n?(0,l.default)("{1} season",n):(0,l.default)("{1} seasons",n)),s.default.createElement("span",{className:t},i)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o);i.propTypes={className:a.PropTypes.string,childCount:a.PropTypes.number
},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tabIndex,i=r(e,["className","tabIndex"]);return o.default.createElement("span",{className:t},o.default.createElement(d.default,{className:i.isSecondary&&m.default.isSecondary,tabIndex:n,server:i.server,linkKey:i.grandparentKey,linkTitle:i.grandparentTitle}),v,o.default.createElement(d.default,{className:i.isSecondary&&m.default.isSecondary,tabIndex:n,server:i.server,linkKey:i.parentKey,linkTitle:i.parentTitle
}))}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(118),u=a(l),c=n(324),d=a(c),h=n(325),p=a(h),f=n(583),m=a(f),v=o.default.createElement(p.default,null);i.propTypes={className:s.PropTypes.string,tabIndex:s.PropTypes.string,server:u.default.isRequired,isSecondary:s.PropTypes.bool},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.year;return s.default.createElement("span",{className:t},n)}var r=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a);i.propTypes={className:a.PropTypes.string,year:a.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(6),p=u(h),f=n(27),m=u(f),v=n(118),g=u(v),y=n(40),b=u(y),w=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.server,i=e.onPress,r=o(e,["className","server","onPress"]);if(!n.friendlyName)return null;var a=encodeURIComponent(n.machineIdentifier);return d.default.createElement("span",{className:t},(0,p.default)("on")," ",d.default.createElement(b.default,l({title:n.friendlyName,to:"#!/server/"+a+"/dashboard",onPress:i},r),n.friendlyName))}}]),
t}(c.Component);w.propTypes={className:c.PropTypes.string,server:g.default.isRequired,onPress:c.PropTypes.func},t.default=w,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return!!d.default.find(e,function(e){return t[e]})}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(3),d=u(c),h=n(7),p=u(h),f=n(6),m=u(f),v=n(23),g=n(27),y=u(g),b=n(538),w=u(b),S=n(1359),P=u(S),x=n(551),C=u(x),T=n(552),_=u(T),E=n(550),k=u(E),I=n(553),A=u(I),M=n(326),D=u(M),R=["showOptimize"],O=function(e){
function t(e,n){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isActionsMenuOpen:!1}}return a(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{metadataListEntityID:this.props.metadataListEntityID}}},{key:"onPlayAllPress",decorators:[v.autobind],value:function(e){this.props.playMetadataList(this._getActionPayload())}},{key:"onShufflePress",decorators:[v.autobind],
value:function(e){this.props.shuffleMetadataList(this._getActionPayload())}},{key:"onAddToPlaylistPress",decorators:[v.autobind],value:function(e){this.props.addMetadataListToPlaylist(this._getActionPayload())}},{key:"onSyncPress",decorators:[v.autobind],value:function(e){this.props.syncMetadataList(this._getActionPayload())}},{key:"onActionsPress",decorators:[v.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen})}},{key:"onActionsMenuClose",decorators:[v.autobind],
value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.showPlayAll,n=e.showShuffle,r=e.showAddToPlaylist,a=e.showSync,s=this.state.isActionsMenuOpen,o=i(R,this.props);return p.default.createElement(w.default,null,t&&p.default.createElement(C.default,{playLabel:(0,m.default)("Play All"),onPress:this.onPlayAllPress}),n&&p.default.createElement(_.default,{onPress:this.onShufflePress}),r&&p.default.createElement(k.default,{onPress:this.onAddToPlaylistPress
}),a&&p.default.createElement(A.default,{onPress:this.onSyncPress}),o&&p.default.createElement(D.default,{ref:"moreButton",icon:"plex-icon-toolbar-more-560",label:(0,m.default)("More..."),isMenuOpen:s,onPress:this.onActionsPress}),p.default.createElement(P.default,l({target:this.refs.moreButton,isOpen:s,onMenuClose:this.onActionsMenuClose},this.props,{showPlayAll:!1,showShuffle:!1,showAddToPlaylist:!1,showSync:!1})))}}]),t}(h.Component);O.propTypes={metadataListEntityID:h.PropTypes.string.isRequired,
showPlayAll:h.PropTypes.bool,showShuffle:h.PropTypes.bool,showAddToPlaylist:h.PropTypes.bool,showSync:h.PropTypes.bool,showOptimize:h.PropTypes.bool,playMetadataList:h.PropTypes.func,shuffleMetadataList:h.PropTypes.func,addMetadataListToPlaylist:h.PropTypes.func,syncMetadataList:h.PropTypes.func,optimizeMetadataList:h.PropTypes.func},t.default=O,e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(p.default,r({tooltip:(0,u.default)("Edit")},e),o.default.createElement(d.default,{
name:"plex-icon-toolbar-edit-560","aria-label":(0,u.default)("Edit")}))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(48),d=a(c),h=n(155),p=a(h);t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(6),h=l(d),p=n(23),f=n(27),m=l(f),v=n(322),g=l(v),y=n(136),b=l(y),w=n(238),S=l(w),P=n(326),x=l(P),C=function(e){
function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isMenuOpen:!1,isMarkWatchedModalOpen:!1,isMarkUnwatchedModalOpen:!1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onMenuButtonPress",decorators:[p.autobind],value:function(e){this.setState({isMenuOpen:!this.state.isMenuOpen})}},{key:"onMenuClose",decorators:[p.autobind],value:function(){this.setState({isMenuOpen:!1})}},{key:"onMarkWatchedPress",
decorators:[p.autobind],value:function(e){this.setState({isMarkWatchedModalOpen:!0})}},{key:"onMarkUnwatchedPress",decorators:[p.autobind],value:function(e){this.setState({isMarkUnwatchedModalOpen:!0})}},{key:"onMarkWatchedConfirm",decorators:[p.autobind],value:function(){this.setState({isMarkWatchedModalOpen:!1}),this.props.onMarkWatchedConfirm()}},{key:"onMarkWatchedCancel",decorators:[p.autobind],value:function(){this.setState({isMarkWatchedModalOpen:!1})}},{key:"onMarkUnwatchedConfirm",decorators:[p.autobind],
value:function(){this.setState({isMarkUnwatchedModalOpen:!1}),this.props.onMarkUnwatchedConfirm()}},{key:"onMarkUnwatchedCancel",decorators:[p.autobind],value:function(){this.setState({isMarkUnwatchedModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.numSelectedItems,n=e.showMarkWatched,i=e.showMarkUnwatched,r=this.state,a=r.isMenuOpen,s=r.isMarkWatchedModalOpen,l=r.isMarkUnwatchedModalOpen;return c.default.createElement(x.default,o({ref:"watchedButton",icon:"plex-icon-toolbar-watched-toggle-560",
label:(0,h.default)("Toggle Watched..."),isMenuOpen:a,onPress:this.onMenuButtonPress},this.props),c.default.createElement(g.default,{target:this.refs.watchedButton,isOpen:a,onMenuClose:this.onMenuClose},n&&c.default.createElement(b.default,{onPress:this.onMarkWatchedPress},(0,h.default)("Mark Watched")),i&&c.default.createElement(b.default,{onPress:this.onMarkUnwatchedPress},(0,h.default)("Mark Unwatched"))),c.default.createElement(S.default,{isOpen:s,metricsPage:"confirmMarkWatched",title:(0,h.default)("Mark Watched"),
message:1===t?(0,h.default)("Are you sure you want to mark this item as watched?"):(0,h.default)("Are you sure you want to mark these {1} items as watched?",t),onConfirm:this.onMarkWatchedConfirm,onCancel:this.onMarkWatchedCancel}),c.default.createElement(S.default,{isOpen:l,metricsPage:"confirmMarkUnwatched",title:(0,h.default)("Mark Unwatched"),message:1===t?(0,h.default)("Are you sure you want to mark this item as unwatched?"):(0,h.default)("Are you sure you want to mark these {1} items as unwatched?",t),
onConfirm:this.onMarkUnwatchedConfirm,onCancel:this.onMarkUnwatchedCancel}))}}]),t}(u.Component);C.propTypes={numSelectedItems:u.PropTypes.number.isRequired,showMarkWatched:u.PropTypes.bool.isRequired,showMarkUnwatched:u.PropTypes.bool.isRequired,onMarkWatchedConfirm:u.PropTypes.func.isRequired,onMarkUnwatchedConfirm:u.PropTypes.func.isRequired},t.default=C,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=r(e,["children"]);return l.default.createElement(c.default,a({
className:h.default.page},n),t)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(84),c=s(u),d=n(1574),h=s(d);i.propTypes={children:o.PropTypes.node},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.machineIdentifier,i=e.isWaitingForPrimaryServer,s=e.primaryServerEntityID,o=r(e,["children","machineIdentifier","isWaitingForPrimaryServer","primaryServerEntityID"]),l=(0,m.default)(p.SERVER,n),c=!l||l===s;
return s&&c?u.default.createElement(x.default,a({serverEntityID:s},o),t):i||!c?u.default.createElement(S.default,null,u.default.createElement(g.default,{label:(0,d.default)("Connecting")})):C}var r=n(14).default,a=n(11).default,s=n(2).default,o=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=s(l),c=n(6),d=s(c),h=n(59),p=o(h),f=n(77),m=s(f),v=n(68),g=s(v),y=n(554),b=s(y),w=n(196),S=s(w),P=n(1383),x=s(P),C=u.default.createElement(b.default,null);i.propTypes={children:l.PropTypes.node.isRequired,
machineIdentifier:l.PropTypes.string,isWaitingForPrimaryServer:l.PropTypes.bool.isRequired,primaryServerEntityID:l.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.showLibrariesSpinner,i=e.showLibrariesError,a=r(e,["children","showLibrariesSpinner","showLibrariesError"]);if(n)return o.default.createElement(p.default,null,o.default.createElement(d.default,{label:(0,u.default)("Loading libraries")}));if(i)return o.default.createElement(m.default,{
title:(0,u.default)("There was an unexpected error loading libraries")});var s=o.default.Children.only(t);return o.default.cloneElement(s,a)}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(68),d=a(c),h=n(196),p=a(h),f=n(331),m=a(f);i.propTypes={children:s.PropTypes.node.isRequired,showLibrariesSpinner:s.PropTypes.bool.isRequired,showLibrariesError:s.PropTypes.bool.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";
function i(e){var t=e.children,n=e.friendlyName,i=e.isConnected,a=e.isUnavailable,s=e.isUnauthorized,l=e.isFullServer,c=e.isFullOwnedServer,h=e.hasHttpsConnections,f=e.requiresFullServer,v=e.requiresFullOwnedServer,y=r(e,["children","friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections","requiresFullServer","requiresFullOwnedServer"]);if(i){if(f&&!l||v&&!c)return o.default.createElement(g.default,{title:(0,u.default)("You're not supposed to be here"),
description:n?(0,u.default)('This page is restricted from the server "{1}"',n):(0,u.default)("This page is restricted from this server")});var b=o.default.Children.only(t);return o.default.cloneElement(b,y)}if(a){var w=void 0;return d.default.isHostedHttps&&!h&&(w=(0,u.default)('Tip: If "Secure connections" in your server\'s network settings is disabled, select "Preferred" to use the secure web app')),o.default.createElement(g.default,{title:n?(0,u.default)('The server "{1}" is unavailable',n):(0,
u.default)("This server is unavailable"),description:(0,u.default)("Plex will automatically try to reconnect to this server"),footer:w})}if(s)return o.default.createElement(g.default,{title:(0,u.default)("No soup for you!"),description:(0,u.default)("You do not have access to this server")});var S=n?(0,u.default)("Connecting to {1}",n):(0,u.default)("Connecting");return o.default.createElement(m.default,null,o.default.createElement(p.default,{label:S}))}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(56),d=a(c),h=n(68),p=a(h),f=n(196),m=a(f),v=n(156),g=a(v);i.propTypes={children:s.PropTypes.node.isRequired,friendlyName:s.PropTypes.string,isConnected:s.PropTypes.bool.isRequired,isUnavailable:s.PropTypes.bool.isRequired,isUnauthorized:s.PropTypes.bool.isRequired,isFullServer:s.PropTypes.bool.isRequired,isFullOwnedServer:s.PropTypes.bool.isRequired,hasHttpsConnections:s.PropTypes.bool.isRequired,requiresFullServer:s.PropTypes.bool,requiresFullOwnedServer:s.PropTypes.bool
},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,d.createSelector)((0,p.default)(),function(e){var t=o.default.pick(e,"friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections");return t})}function r(e){return u.default.createElement(m.default,e)}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(7),u=a(l),c=n(34),d=n(28),h=n(76),p=a(h),f=n(1382),m=a(f);r.propTypes={
serverEntityID:l.PropTypes.string.isRequired},t.default=(0,c.connect)(i)(r),e.exports=t.default},function(e,t,n){"use strict";function i(e){return d.default.createElement(T.default,s({component:"div"},e))}function r(e){var t=e.className,n=e.children;return d.default.createElement("div",{className:t},n)}function a(e){var t=e.children,n=e.closedNode,a=e.title,s=e.isOpen,o=e.updateUserError,l=e.isUpdatingUser,c=e.onSubmit,h=e.onErrorDismiss,f=e.onTogglePress,y=s?r:i;return d.default.createElement("div",{
className:I.default.sectionWrapper},s&&o&&d.default.createElement(x.default,{errorMessage:(0,v.getErrorText)(u.default.first(o.request)),onErrorDismiss:h}),d.default.createElement(y,{onPress:s?null:f,className:(0,p.default)(I.default.section,s?I.default.isOpen:I.default.isClosed)},d.default.createElement(T.default,{className:I.default.sectionEditLink,onPress:f},s?(0,m.default)("Cancel"):(0,m.default)("Edit")),s?d.default.createElement(b.default,{onSubmit:c},t,d.default.createElement("div",{className:I.default.submitButton
},d.default.createElement(E.default,{type:"submit",isSpinning:l,kind:g.PRIMARY},(0,m.default)("Save Changes")))):d.default.createElement("div",{className:I.default.sectionDetails},d.default.createElement(S.default,{className:I.default.sectionLabel},a),n)))}var s=n(11).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),c=n(7),d=o(c),h=n(30),p=o(h),f=n(6),m=o(f),v=n(217),g=n(305),y=n(1341),b=o(y),w=n(153),S=o(w),P=n(1342),x=o(P),C=n(40),T=o(C),_=n(1338),E=o(_),k=n(1577),I=o(k);
r.propTypes={className:c.PropTypes.string,children:c.PropTypes.node},a.propTypes={children:c.PropTypes.node,closedNode:c.PropTypes.node,title:c.PropTypes.string,isOpen:c.PropTypes.bool,isUpdatingUser:c.PropTypes.bool,updateUserError:c.PropTypes.object,onSubmit:c.PropTypes.func,onTogglePress:c.PropTypes.func,onErrorDismiss:c.PropTypes.func},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.hasPlexPass;return t?v.default.createElement("h2",{className:Y.default.header
},(0,y.default)("Account")," \u2014 ",G):v.default.createElement("h2",{className:Y.default.header},(0,y.default)("Account"))}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(11).default,u=n(49).default,c=n(14).default,d=n(2).default,h=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var p=n(3),f=d(p),m=n(7),v=d(m),g=n(6),y=d(g),b=n(131),w=d(b),S=n(23),P=n(217),x=n(1456),C=h(x),T=n(153),_=d(T),E=n(1340),k=d(E),I=n(1346),A=d(I),M=n(1343),D=d(M),R=n(1345),O=d(R),L=n(239),N=d(L),U=n(156),F=d(U),j=n(1347),B=d(j),z=n(1337),V=d(z),H=n(1384),q=d(H),W=n(1387),K=d(W),Q=n(1578),Y=d(Q),G=v.default.createElement(V.default,null);
i.propTypes={hasPlexPass:m.PropTypes.bool.isRequired};var $=function(e){function t(e,n){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={AccountFormSections:{isUsernameOpen:!1,isEmailOpen:!1,isPasswordOpen:!1,isLocaleOpen:!1,isPhotoOpen:!1,isNewsletterOpen:!1}}}return a(t,e),s(t,[{key:"componentWillReceiveProps",value:function(e){if(this.props.isUpdatingUser&&!e.isUpdatingUser&&!e.updateUserError){var t=this.state.AccountFormSections;this.setState({AccountFormSections:f.default.mapObject(t,function(){
return!1})})}}},{key:"onFormSubmit",decorators:[S.autobind],value:function(e){this.props.updateUser(e)}},{key:"onErrorDismiss",decorators:[S.autobind],value:function(e){e.preventDefault(),this.props.clearUpdateUserError()}},{key:"createToggleHandler",decorators:[S.autobind],value:function(e){var t=this;return function(n){n.preventDefault();var i=t.state.AccountFormSections,r=i[e];t.props.updateUserError&&t.props.clearUpdateUserError(),t.setState({AccountFormSections:l({},f.default.mapObject(i,function(){
return!1}),u({},e,!r))})}}},{key:"getAccountFormSectionProps",decorators:[S.autobind],value:function(e,t){return{title:e,onTogglePress:this.createToggleHandler(t),isOpen:this.state.AccountFormSections[t],onSubmit:this.onFormSubmit,onErrorDismiss:this.onErrorDismiss,isUpdatingUser:this.props.isUpdatingUser,updateUserError:this.props.updateUserError}}},{key:"render",value:function(){var e=this.props,t=e.user,n=c(e,["user"]),r=f.default.mapObject(n.updateUserError,function(e){return e.map(function(e){
return(0,P.getErrorText)(e)})}),a=l({"":(0,y.default)("System Default")},w.default.languages);return t.restricted?v.default.createElement(F.default,{title:(0,y.default)("You're not supposed to be here"),description:(0,y.default)("Managed users are restricted from account settings")}):v.default.createElement(N.default,{className:Y.default.page},v.default.createElement("div",{className:Y.default.content},v.default.createElement(i,{hasPlexPass:t.hasPlexPass}),v.default.createElement(q.default,l({},this.getAccountFormSectionProps((0,
y.default)("Photo"),"isPhotoOpen"),{closedNode:v.default.createElement(B.default,{url:this.props.user.thumbTranscodeUrl,width:80,height:80})}),v.default.createElement(_.default,null,(0,y.default)("Photo")),v.default.createElement(K.default,{name:"avatar",width:180,height:180,isDeletingAvatar:this.props.isDeletingAvatar,initialValue:this.props.user.thumb,thumb:this.props.user.thumbTranscodeUrl})),v.default.createElement(q.default,l({},this.getAccountFormSectionProps((0,y.default)("Language"),"isLocaleOpen"),{
closedNode:a[t.locale]}),v.default.createElement(O.default,{labelText:(0,y.default)("Language"),name:"locale",initialValue:t.locale,values:a}),v.default.createElement("p",{className:Y.default.help},(0,y.default)("This sets the default language for Plex applications that do not provide their own language setting."))),v.default.createElement(q.default,l({},this.getAccountFormSectionProps((0,y.default)("Username"),"isUsernameOpen"),{closedNode:t.username}),v.default.createElement(A.default,{labelText:(0,
y.default)("Username"),name:"username",initialValue:t.username,errors:r.username,validations:[C.isUsernameRequired]}),v.default.createElement("p",{className:Y.default.help},(0,y.default)("Your username will be visible to friends with whom you have shared your server.")),v.default.createElement(k.default,{name:"emailOnlyAuth",checkboxText:(0,y.default)("Allow username to be used when signing in"),initialValue:t.emailOnlyAuth,checkedValue:!1,uncheckedValue:!0}),v.default.createElement("p",{className:Y.default.help
},(0,y.default)("Your email address will be required to sign in when username sign-in is not allowed."))),v.default.createElement(q.default,l({},this.getAccountFormSectionProps((0,y.default)("Email Address"),"isEmailOpen"),{closedNode:t.email}),v.default.createElement(A.default,{labelText:(0,y.default)("Email Address"),name:"email",initialValue:t.email,errors:r.email,validations:[C.isEmailRequired]}),v.default.createElement(A.default,{labelText:(0,y.default)("Password"),type:"password",name:"currentPassword",
initialValue:"",validations:[C.isPasswordRequired]})),v.default.createElement(q.default,l({},this.getAccountFormSectionProps((0,y.default)("Password"),"isPasswordOpen"),{closedNode:"**********"}),v.default.createElement(D.default,{labelText:(0,y.default)("New Password"),name:"password",initialValue:"",errors:r.password,validations:[C.isPasswordRequired,C.password]}),v.default.createElement(A.default,{labelText:(0,y.default)("Confirm New Password"),type:"password",name:"passwordConfirmation",initialValue:"",
validations:[C.isConfirmRequired,C.confirmPassword]}),v.default.createElement(A.default,{labelText:(0,y.default)("Current Password"),type:"password",name:"currentPassword",initialValue:"",validations:[C.isCurrentPasswordRequired]}),v.default.createElement(k.default,{checkboxText:(0,y.default)("Sign out connected devices after password change"),name:"resetDevices",initialValue:!1})),v.default.createElement(q.default,l({},this.getAccountFormSectionProps((0,y.default)("Plex News"),"isNewsletterOpen"),{
closedNode:t.mailingListActive?(0,y.default)("You are currently subscribed"):(0,y.default)("You are not subscribed")}),v.default.createElement(k.default,{name:"mailingListActive",initialValue:t.mailingListActive,labelText:(0,y.default)("Plex News"),checkboxText:(0,y.default)("Subscribe to our amazing, but infrequent email newsletter")}))))}}]),t}(m.Component);$.propTypes={isUpdatingUser:m.PropTypes.bool,isDeletingAvatar:m.PropTypes.bool,updateUserError:m.PropTypes.object,user:m.PropTypes.shape({thumb:m.PropTypes.string,
thumbTranscodeUrl:m.PropTypes.func,username:m.PropTypes.string,email:m.PropTypes.string}),updateUser:m.PropTypes.func,clearUpdateUserError:m.PropTypes.func},t.default=$,e.exports=t.default},function(e,t,n){"use strict";function i(e){return l.default.createElement(f.default,e)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),o=n(7),l=r(o),u=n(34),c=n(28),d=n(214),h=r(d),p=n(1385),f=r(p),m=n(309),v=(0,c.createSelector)(h.default,function(e){var t=e.desktop;return{
user:s.default.pick(e,"username","email","emailOnlyAuth","thumb","thumbTranscodeUrl","locked","locale","hasPlexPass","mailingListActive","restricted"),isUpdatingUser:t.isUpdatingUser,updateUserError:t.updateUserError}}),g={updateUser:m.updateUser,clearUpdateUserError:m.clearUpdateUserError};t.default=(0,u.connect)(v,g)(i),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(2).default,u=n(19).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(3),d=l(c),h=n(7),p=l(h),f=n(23),m=n(22),v=u(m),g=n(6),y=l(g),b=n(439),w=l(b),S=n(27),P=l(S),x=n(48),C=l(x),T=n(527),_=l(T),E=n(152),k=l(E),I=n(195),A=l(I),M=n(1579),D=l(M),R=p.default.createElement(C.default,{name:"plex-icon-avatar-crop-min-560"}),O=p.default.createElement(C.default,{name:"plex-icon-avatar-crop-max-560"}),L=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={drag:!1,thumb:d.default.result(this.props,"thumb"),
dragX:0,dragY:0,minScale:.1,maxScale:1,scale:.1,offsetX:0,offsetY:0}}return r(t,e),a(t,[{key:"componentDidMount",value:function(){this.paint(),this.loadImage(this.state.thumb)}},{key:"componentWillReceiveProps",value:function(e){if(this.props.thumb!==e.thumb){var t=d.default.result(this.props,"thumb");this.setState({thumb:t}),this.loadImage(t)}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"componentDidUpdate",value:function(){this.paint()}},{key:"componentWillUnmount",
value:function(){this.stopListeningForDrag()}},{key:"listenForDrag",value:function(e){e?(document.addEventListener("touchmove",this.onTouchMove),document.addEventListener("touchcancel",this.onTouchEnd),document.addEventListener("touchend",this.onTouchEnd)):(document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp))}},{key:"stopListeningForDrag",value:function(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove),
document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("touchcancel",this.onTouchEnd),document.removeEventListener("touchend",this.onTouchEnd)}},{key:"startDrag",value:function(e,t,n){this.listenForDrag(n),this.setState({drag:!0,dragX:e,dragY:t})}},{key:"drag",value:function(e,t){var n=this;this.state.drag&&this.setState(function(i){var r=i.offsetX,a=i.offsetY,s=i.dragX,l=i.dragY,u=i.scale,c=n.image.width*u,d=n.image.height*u,h=n.props.width-c,p=n.props.height-d,f=Math.max(h,Math.min(r-(s-e),0)),m=Math.max(p,Math.min(a-(l-t),0));
return o({},i,{dragX:e,dragY:t,offsetX:f,offsetY:m})})}},{key:"stopDrag",value:function(){var e=this;this.stopListeningForDrag(),this.setState({drag:!1},function(){return e.props.onChange(e.getImage())})}},{key:"loadImage",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?this.props:arguments[1],i=new Image;i.onload=function(){return t.imageOnLoad(i)},/^https?:\/\//.test(e)&&i.setAttribute("crossOrigin","anonymous");var r=e;if(0!==e.indexOf("data:")){var a=(0,w.default)(),s={
width:Math.round(n.width*a),height:Math.round(n.height*a),minSize:1},o=e.indexOf("?");o>-1?(r=v.join(e.substring(0,o),s),r+=r.indexOf("?")===-1?"?":"&",r+=e.substring(o+1)):r=v.join(r,s)}i.src=r}},{key:"imageOnLoad",value:function(e){var t=this;this.image=e;var n=e.width>e.height?e.height:e.width,i=n>this.props.width?this.props.width/n:1,r=n<=this.props.width?2:1;this.setState({drag:!1,dragX:0,dragY:0,minScale:i,maxScale:r,scale:i,offsetX:0,offsetY:0},function(){return t.props.onChange(t.getImage());
})}},{key:"paint",value:function(){var e=this.props,t=e.width,n=e.height,i=this.refs.canvas.getContext("2d");i.clearRect(0,0,t,n),this.image&&this.drawImage(i);var r=document.createElement("canvas");r.width=t,r.height=n;var a=r.getContext("2d");a.fillStyle="rgba(0,0,0,0.6)",a.fillRect(0,0,r.width,r.height),a.globalCompositeOperation="destination-out",a.arc(t/2,n/2,t/2,0,2*Math.PI),a.fill(),i.drawImage(r,0,0)}},{key:"drawImage",decorators:[f.autobind],value:function(e){e.drawImage(this.image,this.state.offsetX,this.state.offsetY,Math.max(this.props.width,this.image.width*this.state.scale),Math.max(this.props.height,this.image.height*this.state.scale));
}},{key:"onMouseDown",decorators:[f.autobind],value:function(e){e.preventDefault(),this.startDrag(e.clientX,e.clientY)}},{key:"onTouchStart",decorators:[f.autobind],value:function(e){e.preventDefault();var t=e.touches.item(0);t&&this.startDrag(t.clientX,t.clientY,!0)}},{key:"onTouchMove",decorators:[f.autobind],value:function(e){var t=e.touches.item(0);t&&this.drag(t.clientX,t.clientY)}},{key:"onMouseMove",decorators:[f.autobind],value:function(e){this.drag(e.clientX,e.clientY)}},{key:"onMouseUp",
decorators:[f.autobind],value:function(){this.stopDrag()}},{key:"onTouchEnd",decorators:[f.autobind],value:function(){this.stopDrag()}},{key:"onFileDrop",decorators:[f.autobind],value:function(e){var t=this;e.stopPropagation(),e.preventDefault();var n=void 0;if(e.dataTransfer&&e.dataTransfer.files.length?n=e.dataTransfer.files[0]:e.target.files&&e.target.files.length&&(n=e.target.files[0]),n){var i=new FileReader;i.onload=function(e){return t.loadImage(e.target.result)},i.readAsDataURL(n)}}},{key:"getImage",
decorators:[f.autobind],value:function(){var e=document.createElement("canvas"),t=e.getContext("2d");e.height=this.props.height,e.width=this.props.width,this.drawImage(t);var n=e.toDataURL();return n}},{key:"onDragOver",value:function(e){var t=e||window.event;t.preventDefault()}},{key:"onSliderChange",decorators:[f.autobind],value:function(e){var t=this,n=e.steppedValue;this.setState(function(e){return o({},e,{scale:n})},function(){return t.props.onChange(t.getImage())})}},{key:"render",value:function(){
return p.default.createElement("div",{className:D.default.avatarContainer,onDrop:this.onFileDrop,onDragOver:this.onDragOver},p.default.createElement("div",{className:D.default.avatarPane},p.default.createElement("canvas",{ref:"canvas",width:this.props.width,height:this.props.height,onTouchStart:this.onTouchStart,onMouseDown:this.onMouseDown}),p.default.createElement("div",{className:D.default.sliderContainer},p.default.createElement("span",{className:D.default.sliderEnd},R),p.default.createElement("span",{
className:D.default.sliderWrapper},p.default.createElement(_.default,{className:D.default.slider,min:this.state.minScale,max:this.state.maxScale,step:.1,value:this.state.scale,onChange:this.onSliderChange})),p.default.createElement("span",{className:D.default.sliderEnd},O))),p.default.createElement("div",{className:D.default.avatarTextPane},p.default.createElement("p",null,p.default.createElement(k.default,{component:"label",className:D.default.avatarActionButtons},(0,y.default)("Choose Photo"),p.default.createElement("input",{
style:{display:"none"},type:"file",onChange:this.onFileDrop,accept:"image/*"}))),p.default.createElement("p",{className:D.default.help},(0,y.default)("You can scale your photo using the slider below, and adjust the crop by dragging it within the circle."))))}}]),t}(h.Component);L.propTypes={thumb:h.PropTypes.oneOfType([h.PropTypes.func,h.PropTypes.string]).isRequired,height:h.PropTypes.number,width:h.PropTypes.number,onChange:h.PropTypes.func},L.defaultProps={height:200,width:200,onChange:function(){}
},t.default=(0,A.default)(L),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(6),d=o(c),h=n(23),p=n(27),f=o(p),m=n(323),v=o(m),g=n(240),y=o(g),b=n(1391),w=o(b),S=n(1390),P=o(S),x=n(1580),C=o(x),T=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isLibrariesMenuOpen:!1}}return r(t,e),
a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,f.default)(this,e,t)}},{key:"onLibrariesMenuButtonPress",decorators:[h.autobind],value:function(e){this.setState({isLibrariesMenuOpen:!this.state.isLibrariesMenuOpen})}},{key:"onLibrariesMenuClose",decorators:[h.autobind],value:function(){this.setState({isLibrariesMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.libraryEntityID,i=e.libraryEntityIDs,r=e.selectedLibraryTitle,a=e.columnAdjustment,s=e.onColumnAdjustmentChange;
return u.default.createElement(y.default,{className:C.default.dashboardHeader},u.default.createElement("div",{className:C.default.titleContainer},(0,d.default)("Discover"),u.default.createElement("span",{className:C.default.separator},"\u2014"),u.default.createElement(w.default,{ref:"librariesMenuButton",hasLibraries:!!i.length,title:r?r:(0,d.default)("All Libraries"),onPress:this.onLibrariesMenuButtonPress}),u.default.createElement(P.default,{target:this.refs.librariesMenuButton,isOpen:this.state.isLibrariesMenuOpen,
selectedLibraryEntityID:n,libraryEntityIDs:i,machineIdentifier:t,onMenuClose:this.onLibrariesMenuClose})),u.default.createElement(v.default,{columnAdjustment:a,onColumnAdjustmentChange:s}))}}]),t}(l.Component);T.propTypes={machineIdentifier:l.PropTypes.string.isRequired,libraryEntityID:l.PropTypes.string,libraryEntityIDs:l.PropTypes.array.isRequired,selectedLibraryTitle:l.PropTypes.string,columnAdjustment:l.PropTypes.number.isRequired,onColumnAdjustmentChange:l.PropTypes.func.isRequired},t.default=T,
e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,p.createSelector)((0,v.default)(),(0,y.default)(),w.default,function(e,t,n){return{machineIdentifier:e.machineIdentifier,libraryEntityIDs:e.desktop.libraries,selectedLibraryTitle:t&&t.title,columnAdjustment:n.columnAdjustment}})}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(34),p=n(28),f=n(23),m=n(76),v=u(m),g=n(212),y=u(g),b=n(184),w=u(b),S=n(72),P=n(1388),x=u(P),C=function(e){
function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"onColumnAdjustmentChange",decorators:[f.autobind],value:function(e){this.props.saveSettings({name:"experienceSettings",settings:{columnAdjustment:e}})}},{key:"render",value:function(){return d.default.createElement(x.default,l({onColumnAdjustmentChange:this.onColumnAdjustmentChange},this.props))}}]),t}(c.Component);C.propTypes={serverEntityID:c.PropTypes.string.isRequired,
libraryEntityID:c.PropTypes.string,saveSettings:c.PropTypes.func.isRequired},t.default=(0,h.connect)(i,{saveSettings:S.saveSettings})(C),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.selectedLibraryEntityID,n=e.libraryEntityIDs,i=e.machineIdentifier,s=r(e,["selectedLibraryEntityID","libraryEntityIDs","machineIdentifier"]),o=encodeURIComponent(i);return l.default.createElement(p.default,a({scrollerProps:w},s),l.default.createElement(m.default,{key:"all",to:"#!/server/"+o+"/dashboard",
isSelected:!t},(0,c.default)("All Libraries")),n.map(function(e){return l.default.createElement(g.default,{key:e,libraryEntityID:e,machineIdentifier:i,isSelected:t===e})}))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(6),c=s(u),d=n(41),h=n(154),p=s(h),f=n(321),m=s(f),v=n(1393),g=s(v),y=n(1581),b=s(y),w={className:b.default.librariesMenuScroller,scrollDirection:d.scrollDirections.VERTICAL,autoScroll:!0};i.propTypes={selectedLibraryEntityID:o.PropTypes.string,
libraryEntityIDs:o.PropTypes.array.isRequired,machineIdentifier:o.PropTypes.string.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(27),h=l(d),p=n(529),f=l(p),m=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",
value:function(e,t){return(0,h.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.hasLibraries,n=e.title,i=o(e,["hasLibraries","title"]);return t?c.default.createElement(f.default,i,n):c.default.createElement("span",null,n)}}]),t}(u.Component);m.propTypes={hasLibraries:u.PropTypes.bool.isRequired,title:u.PropTypes.string.isRequired},t.default=m,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.machineIdentifier,n=e.id,i=e.title,s=r(e,["machineIdentifier","id","title"]),o=encodeURIComponent(t),u=encodeURIComponent(n);
return l.default.createElement(c.default,a({to:"#!/server/"+o+"/dashboard?library="+u},s),i)}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(321),c=s(u);i.propTypes={machineIdentifier:o.PropTypes.string.isRequired,id:o.PropTypes.string.isRequired,title:o.PropTypes.string.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,u.createSelector)((0,d.default)(),function(e){return{id:e.key,
title:e.title}})}function r(e){return o.default.createElement(p.default,e)}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(34),u=n(28),c=n(212),d=a(c),h=n(1392),p=a(h);r.propTypes={libraryEntityID:s.PropTypes.string.isRequired},t.default=(0,l.connect)(i)(r),e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,f.createSelector)((0,v.default)(),function(e){return{libraryKey:e&&e.key}})}var r=n(16).default,a=n(17).default,s=n(46).default,o=n(15).default,l=n(14).default,u=n(11).default,c=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=c(d),p=n(34),f=n(28),m=n(212),v=c(m),g=n(72),y=n(555),b=c(y),w=function(e){function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"componentWillMount",value:function(){this.props.libraryKey||this.props.redirectToRoute({route:"dashboard"})}},{key:"componentWillReceiveProps",value:function(e){e.libraryKey||e.redirectToRoute({route:"dashboard"})}},{key:"render",value:function(){
var e=this.props,t=e.libraryKey,n=l(e,["libraryKey"]);return t?h.default.createElement(b.default,u({hubKey:"/hubs/sections/"+encodeURIComponent(t)},n)):null}}]),t}(d.Component);w.propTypes={serverEntityID:d.PropTypes.string.isRequired,libraryEntityID:d.PropTypes.string.isRequired,libraryKey:d.PropTypes.string,redirectToRoute:d.PropTypes.func.isRequired},t.default=(0,p.connect)(i,{redirectToRoute:g.redirectToRoute})(w),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.libraryEntityID,i=e.activeSelectionType;
r(e,["serverEntityID","libraryEntityID","activeSelectionType"]);return o.default.createElement(c.default,{scrollDirection:l.scrollDirections.NONE},i?o.default.createElement(v.default,{serverEntityID:t}):o.default.createElement(y.default,{serverEntityID:t,libraryEntityID:n}),o.default.createElement(h.default,{innerClassName:P.default.dashboardContent},n?o.default.createElement(w.default,{serverEntityID:t,libraryEntityID:n,activeSelectionType:i}):o.default.createElement(f.default,{serverEntityID:t,
activeSelectionType:i,hubKey:"/hubs"})))}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(41),u=n(239),c=a(u),d=n(327),h=a(d),p=n(555),f=a(p),m=n(559),v=a(m),g=n(1389),y=a(g),b=n(1394),w=a(b),S=n(1582),P=a(S);i.propTypes={serverEntityID:s.PropTypes.string,libraryEntityID:s.PropTypes.string,activeSelectionType:s.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(34),d=n(28),h=n(185),p=o(h),f=n(241),m=o(f),v=n(328),g=o(v),y=n(1395),b=o(y),w=(0,d.createSelector)(p.default,function(e){return{activeSelectionType:e.activeSelectionType}}),S=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.libraryEntityID,i=e.activeSelectionType;return u.default.createElement(m.default,{
machineIdentifier:t},u.default.createElement(g.default,null,u.default.createElement(b.default,{libraryEntityID:n,activeSelectionType:i})))}}]),t}(l.Component);S.propTypes={machineIdentifier:l.PropTypes.string,libraryEntityID:l.PropTypes.string,activeSelectionType:l.PropTypes.string},t.default=(0,c.connect)(function(e){return w(e)})(S),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.summary;return s.default.createElement("div",null,s.default.createElement("div",{className:c.default.title
},t),n&&s.default.createElement("div",{className:c.default.summary},s.default.createElement(l.default,null,n)))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(1336),l=r(o),u=n(1583),c=r(u);i.propTypes={title:a.PropTypes.string,summary:a.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0
});var u=n(7),c=l(u),d=n(6),h=l(d),p=n(23),f=n(471),m=l(f),v=n(225),g=l(v),y=n(1459),b=l(y),w=n(1460),S=l(w),P=n(68),x=l(P),C=n(84),T=l(C),_=n(330),E=l(_),k=n(1356),I=l(k),A=n(1397),M=l(A),D=n(1584),R=l(D),O=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n);var r=e.aspectRatios,a=e.columns,o=e.margin,l=e.cellMargin,u=null;r&&r.length&&(u=this.createLayout(r,a,o,l)),this.state={isHeaderMeasured:!1,headerHeight:null,scrollTop:0,layout:u}}return r(t,e),
a(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.aspectRatios,n=e.columns,i=e.margin,r=e.cellMargin;t===this.props.aspectRatios&&n===this.props.columns||this.setState({layout:this.createLayout(t,n,i,r)})}},{key:"createLayout",value:function(e,t,n,i){var r=(0,S.default)({aspectRatios:e,columns:t});return(0,b.default)({columns:t,rows:r,margin:n,cellMargin:i})}},{key:"onHeaderMeasure",decorators:[p.autobind],value:function(e){var t=e.height;this.setState({isHeaderMeasured:!0,headerHeight:t
})}},{key:"onScrollPositionChange",decorators:[p.autobind],value:function(e){var t=e.scrollTop;this.setState({scrollTop:t})}},{key:"renderCell",decorators:[p.autobind],value:function(e){return c.default.createElement(I.default,o({serverEntityID:this.props.serverEntityID},e))}},{key:"render",value:function(){var e=this.props,t=e.metadataItems,n=e.width,i=e.height,r=e.summary,a=e.title,s=e.serverEntityID,o=e.itemsError,l=e.itemsIsPopulated,u=this.state,d=u.isHeaderMeasured,p=u.headerHeight,f=u.layout,v=u.scrollTop,y=f&&l&&d;
return o?c.default.createElement(E.default,{title:(0,h.default)("There was an unexpected error loading the photo album")}):c.default.createElement(T.default,{className:R.default.scroller,scrollTop:v,onScrollPositionChange:this.onScrollPositionChange},c.default.createElement(g.default,{onMeasure:this.onHeaderMeasure},c.default.createElement(M.default,{title:a,summary:r})),y?c.default.createElement("div",{className:R.default.body},c.default.createElement(m.default,{className:R.default.album,serverEntityID:s,
items:t,keyPropName:"metadataItemEntityID",size:t.length,cellRenderer:this.renderCell,viewportWidth:n,viewportHeight:i,scrollTop:v-p,layout:f})):c.default.createElement("div",{className:R.default.spinner},c.default.createElement(x.default,{label:(0,h.default)("Loading photos")})))}}]),t}(u.Component);O.propTypes={serverEntityID:u.PropTypes.string,title:u.PropTypes.string,summary:u.PropTypes.string,metadataItems:u.PropTypes.array,aspectRatios:u.PropTypes.array,columns:u.PropTypes.number,margin:u.PropTypes.number,
cellMargin:u.PropTypes.number,width:u.PropTypes.number,height:u.PropTypes.number,itemsError:u.PropTypes.object,itemsIsPopulated:u.PropTypes.bool},O.defaultProps={columns:1,margin:35,cellMargin:5},t.default=O,e.exports=t.default},function(e,t,n){"use strict";function i(){var e=(0,y.default)(),t=(0,p.createSelector)(e,P.default,function(e,t){return void 0===e&&(e={}),t[e.children]}),n=(0,p.createSelector)(t,w.default,function(e,t){void 0===e&&(e={});var n=e.metadataItems;return n?n.map(function(e){
var n=t[e],i=n.Media[0];if(!i||!i.Part[0])return 1;var r=i.width,a=i.height,s=l(i.Part,1),o=s[0].orientation;return(0,m.default)(o)?a/r:r/a}):[]});return(0,p.createSelector)(e,t,n,function(e,t,n){void 0===e&&(e={}),void 0===t&&(t={});var i=t.metadataItems,r=t.isPopulated,a=t.error,s=e.title,o=e.summary;return{title:s,summary:o,metadataItems:i,aspectRatios:n,itemsError:a,itemsIsPopulated:r}})}var r=n(16).default,a=n(17).default,s=n(46).default,o=n(15).default,l=n(137).default,u=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(7),d=u(c),h=n(34),p=n(28),f=n(833),m=u(f),v=n(70),g=n(274),y=u(g),b=n(213),w=u(b),S=n(425),P=u(S),x=n(183),C=n(1400),T=u(C),_=function(e){function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.metadataItemEntityID;t&&t!==this.props.metadataItemEntityID&&this._populate(e)}},{key:"_populate",value:function(){
var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,v.scheduleImmediateUpdate)(function(){e.viewItemDetails(e.metadataItemEntityID)})}},{key:"render",value:function(){return d.default.createElement(T.default,this.props)}}]),t}(c.Component);_.propTypes={metadataItemEntityID:c.PropTypes.string.isRequired,viewItemDetails:c.PropTypes.func.isRequired},t.default=(0,h.connect)(i,{viewItemDetails:x.viewItemDetails})(_),e.exports=t.default},function(e,t,n){"use strict";function i(e){
return o.default.createElement(u.default,{className:p.default.container},function(t){var n=t.isMeasured,i=t.width,a=t.height;if(!n)return null;var s=Math.ceil(i/f);return o.default.createElement(d.default,r({className:p.default.album,columns:s,width:i,height:a},e))})}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(225),u=a(l),c=n(1398),d=a(c),h=n(1585),p=a(h),f=400;t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){
return s.default.createElement(c.default,{machineIdentifier:e.machineIdentifier},s.default.createElement(h.default,null,s.default.createElement(l.default,e)))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(1399),l=r(o),u=n(241),c=r(u),d=n(328),h=r(d);i.propTypes={machineIdentifier:a.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return o.default.createElement(m.default,r({title:(0,u.default)("Plex is down for maintenance"),
description:(0,u.default)("Don't worry, it will be back soon")},e),o.default.createElement(p.default,{to:c.SYSTEM_STATUS_URL,target:"_blank",kind:d.kinds.PRIMARY},"status.plex.tv"))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(278),d=n(41),h=n(40),p=a(h),f=n(156),m=a(f);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,n=e.isDownForMaintenance,i=e.hasFailedResources,r=e.hasPlexPass,a=e.isUserRestricted,o=e.onDownloadServer;
return t.length?s.default.createElement(v.default,{outOfDateServers:t}):n?b:i?w:a?s.default.createElement(c.default,{title:(0,l.default)("No shared libraries"),description:(0,l.default)("A user in your home needs to share a library with you")}):s.default.createElement(y.default,{hasPlexPass:r,onDownloadServer:o})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(156),c=r(u),d=n(331),h=r(d),p=n(1402),f=r(p),m=n(1405),v=r(m),g=n(1404),y=r(g),b=s.default.createElement(f.default,null),w=s.default.createElement(h.default,null);
i.propTypes={outOfDateServers:a.PropTypes.array.isRequired,isDownForMaintenance:a.PropTypes.bool.isRequired,hasFailedResources:a.PropTypes.bool.isRequired,hasPlexPass:a.PropTypes.bool.isRequired,isUserRestricted:a.PropTypes.bool.isRequired,onDownloadServer:a.PropTypes.func.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(6),d=o(c),h=n(23),p=n(41),f=n(27),m=o(f),v=n(84),g=o(v),y=n(40),b=o(y),w=n(152),S=o(w),P=n(335),x=o(P),C=n(1588),T=o(C),_=n(1636),E=o(_),k={
context:"serverDownload",firstRun:!0},I=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDownloadStep:!0,isPlexPassModalOpen:!e.hasPlexPass}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onDownloadPress",decorators:[h.autobind],value:function(e){this.setState({isDownloadStep:!1}),this.props.onDownloadServer(e.currentTarget.dataset.type)}},{key:"onPlexPassModalClose",
decorators:[h.autobind],value:function(){this.setState({isPlexPassModalOpen:!1})}},{key:"render",value:function(){var e=this.state,t=e.isDownloadStep,n=e.isPlexPassModalOpen;return u.default.createElement(g.default,{className:T.default.emptyPage},u.default.createElement("div",{className:T.default.content},u.default.createElement("img",{className:T.default.pmsLogo,src:E.default}),u.default.createElement("div",{className:T.default.title},t?(0,d.default)("Get your Plex Media Server"):(0,d.default)("Install your new server")),u.default.createElement("div",{
className:T.default.description},t?(0,d.default)("To get started streaming your media everywhere, download and install Plex Media Server on the computer or device where you keep your media."):(0,d.default)("Excellent. Check your download location for Plex Media Server and install it. Once it's running, check back here and we'll get you set up.")),t&&u.default.createElement(S.default,{className:T.default.button,kind:p.kinds.PRIMARY,size:p.sizes.LARGE,"data-type":"computer",onPress:this.onDownloadPress
},(0,d.default)("Download Plex Media Server")),!t&&u.default.createElement("div",{className:T.default.downloadMessage},(0,d.default)("Need to download different server?")),!t&&u.default.createElement(b.default,{className:T.default.link,kind:p.kinds.PRIMARY,"data-type":"computer",onPress:this.onDownloadPress},(0,d.default)("Download for Computer Platforms")),u.default.createElement(b.default,{className:T.default.link,kind:p.kinds.PRIMARY,"data-type":"nas",onPress:this.onDownloadPress},(0,d.default)("Download for NAS Platforms"))),u.default.createElement(x.default,{
metricsProperties:k,isOpen:n,onModalClose:this.onPlexPassModalClose}))}}]),t}(l.Component);I.propTypes={hasPlexPass:l.PropTypes.bool,onDownloadServer:l.PropTypes.func.isRequired},t.default=I,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,n="/web/index.html#!/settings/server",i="/web/index.html";return o.default.createElement(v.default,{title:(0,u.default)("Update your Plex Media Server"),description:(0,u.default)("This version of the web app requires Plex Media Server {1} or higher. Use one of the links below to open an available server directly.","0.9.16.0")
},o.default.createElement("div",null,t.map(function(e){return o.default.createElement(f.default,{key:e.machineIdentifier,className:y.default.updateLink,to:d.join([e.activeConnection.uri,e.isShared?i:n]),target:"_self",kind:h.kinds.PRIMARY,size:h.sizes.LARGE},e.friendlyName)})))}var r=n(2).default,a=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=r(s),l=n(6),u=r(l),c=n(22),d=a(c),h=n(41),p=n(40),f=r(p),m=n(156),v=r(m),g=n(1589),y=r(g);i.propTypes={outOfDateServers:s.PropTypes.array.isRequired
},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.friendlyName,i=e.isFullServer,r=e.isFullOwnedServer,a=e.hubEntityIDs,o=e.isHubsPending,c=e.hubsError,h=e.isEmpty,f=e.hasLibraries,v=e.onAddLibraryPress;return h?o?s.default.createElement(g.default,null,s.default.createElement(d.default,{label:(0,l.default)("Loading dashboard")})):c&&i?s.default.createElement(b.default,{title:(0,l.default)("There was an unexpected error loading the dashboard")}):c&&!i?s.default.createElement(g.default,{
title:(0,l.default)('The server "{1}" does not support the dashboard',n),description:(0,l.default)("Browse libraries using the sidebar")}):f&&r?s.default.createElement(g.default,{title:(0,l.default)("The dashboard is empty"),description:(0,l.default)("Browse and manage your libraries using the sidebar"),footer:(0,l.default)('Tip: The "Include in dashboard" advanced setting for each library allows content to be displayed here')}):!f&&r?s.default.createElement(g.default,{title:(0,l.default)("The dashboard is empty"),
description:(0,l.default)("Add libraries with your media to make the most of Plex Media Server")},s.default.createElement(p.default,{kind:u.kinds.PRIMARY,size:u.sizes.LARGE,onPress:v},(0,l.default)("Add Library"))):s.default.createElement(g.default,{title:(0,l.default)("The dashboard is empty"),description:(0,l.default)("Browse libraries using the sidebar")}):s.default.createElement(m.default,{serverEntityID:t,hubEntityIDs:a})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(41),c=n(68),d=r(c),h=n(152),p=r(h),f=n(1353),m=r(f),v=n(329),g=r(v),y=n(330),b=r(y);
i.propTypes={serverEntityID:a.PropTypes.string.isRequired,friendlyName:a.PropTypes.string.isRequired,isFullServer:a.PropTypes.bool.isRequired,isFullOwnedServer:a.PropTypes.bool.isRequired,hasLibraries:a.PropTypes.bool.isRequired,hubEntityIDs:a.PropTypes.array.isRequired,isHubsPending:a.PropTypes.bool.isRequired,hubsError:a.PropTypes.object,isEmpty:a.PropTypes.bool.isRequired,onAddLibraryPress:a.PropTypes.func.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){
var t=e.listTitle,n=e.metadataItems,i=e.totalSize,s=e.columnAdjustment,o=e.onColumnAdjustmentChange,u=r(e,["listTitle","metadataItems","totalSize","columnAdjustment","onColumnAdjustmentChange"]),d=(0,c.default)(e);return l.default.createElement(v.default,{className:w.default.metadataListHeader},l.default.createElement("div",{className:w.default.titleContainer},l.default.createElement("div",{className:w.default.title},t),l.default.createElement(y.default,{count:i||n.length})),l.default.createElement(h.default,a({},u,d)),l.default.createElement(f.default,{
columnAdjustment:s,onColumnAdjustmentChange:o}))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(1461),c=s(u),d=n(1376),h=s(d),p=n(323),f=s(p),m=n(240),v=s(m),g=n(525),y=s(g),b=n(1590),w=s(b);i.propTypes={listTitle:o.PropTypes.string.isRequired,metadataItems:o.PropTypes.array.isRequired,totalSize:o.PropTypes.number,columnAdjustment:o.PropTypes.number.isRequired,onColumnAdjustmentChange:o.PropTypes.func.isRequired},t.default=i,
e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,v.createSelector)((0,S.default)(),(0,b.default)(),x.default,function(e,t,n){var i=h.default.pick(t,"metadataItems","totalSize","allowSync","firstItemType","isFirstItemLibraryItem"),a=n.columnAdjustment;return r({},i,{server:e,columnAdjustment:a})})}var r=n(11).default,a=n(16).default,s=n(17).default,o=n(24).default,l=n(15).default,u=n(2).default,c=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),h=u(d),p=n(7),f=u(p),m=n(34),v=n(28),g=n(23),y=n(423),b=u(y),w=n(229),S=u(w),P=n(184),x=u(P),C=n(72),T=n(181),_=c(T),E=n(1407),k=u(E),I=r({
saveSettings:C.saveSettings},_),A=function(e){function t(){l(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onColumnAdjustmentChange",decorators:[g.autobind],value:function(e){this.props.saveSettings({name:"experienceSettings",settings:{columnAdjustment:e}})}},{key:"render",value:function(){return f.default.createElement(k.default,r({onColumnAdjustmentChange:this.onColumnAdjustmentChange},this.props))}}]),t}(p.Component);A.propTypes={
serverEntityID:p.PropTypes.string.isRequired,metadataListEntityID:p.PropTypes.string.isRequired,saveSettings:p.PropTypes.func.isRequired},t.default=(0,m.connect)(i,I)(A),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.metadataListEntityID,i=e.listTitle,a=e.activeSelectionType;return o.default.createElement(c.default,{scrollDirection:l.scrollDirections.NONE},a?o.default.createElement(f.default,{serverEntityID:t}):o.default.createElement(v.default,{serverEntityID:t,
metadataListEntityID:n,listTitle:i}),o.default.createElement(h.default,r({component:y.default,initialSize:50},e)))}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(41),u=n(239),c=a(u),d=n(541),h=a(d),p=n(559),f=a(p),m=n(1408),v=a(m),g=n(1411),y=a(g);i.propTypes={serverEntityID:s.PropTypes.string.isRequired,metadataListEntityID:s.PropTypes.string.isRequired,listTitle:s.PropTypes.string.isRequired,activeSelectionType:s.PropTypes.string},t.default=i,
e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(34),d=n(28),h=n(185),p=o(h),f=n(70),m=n(1068),v=n(1409),g=o(v),y=(0,d.createSelector)(function(e){return e.ui.metadataListPage.metadataList},p.default,function(e,t){return{metadataListEntityID:e,activeSelectionType:t.activeSelectionType}}),b=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return r(t,e),a(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.listKey;t!==this.props.listKey&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.listKey&&(0,f.scheduleImmediateUpdate)(function(){e.initMetadataListPage({serverEntityID:e.serverEntityID,key:e.listKey,title:e.listTitle})})}},{key:"render",value:function(){return this.props.metadataListEntityID?u.default.createElement(g.default,this.props):null;
}}]),t}(l.Component);b.propTypes={serverEntityID:l.PropTypes.string.isRequired,metadataListEntityID:l.PropTypes.string,listKey:l.PropTypes.string.isRequired,listTitle:l.PropTypes.string.isRequired,initMetadataListPage:l.PropTypes.func.isRequired},t.default=(0,c.connect)(function(e){return y(e)},{initMetadataListPage:m.initMetadataListPage})(b),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.listTitle,i=e.listType,r=e.listContext,a=e.metadataItemEntityIDs,o=e.totalSize,u=e.populatedRange,c=e.firstItemType,d=e.isPending,h=e.isPopulated,p=e.error,m=e.columnAdjustment,g=e.onPageRequest,b=o||a.length;
if(h&&b){var S=i||c;return s.default.createElement(w.default,{className:A.default.metadataListPageContent,scrollerClassName:A.default.metadataListScroller,serverEntityID:t,listType:S,listContext:r,scrollPositionStorageKey:"MetadataListPageContent",keyPropName:"metadataItemEntityID",items:a,itemsOffset:u.start,size:b,layout:(0,f.default)(S,r,m),cellRenderer:(0,v.default)(e,P.default),onPageRequest:g})}return d?s.default.createElement(C.default,null,s.default.createElement(_.default,null,s.default.createElement(y.default,{
label:n?(0,l.default)("Loading {1}",n):(0,l.default)("Loading list")}))):p?s.default.createElement(C.default,null,s.default.createElement(k.default,{title:n?(0,l.default)("There was an unexpected error loading {1}",n):(0,l.default)("There was an unexpected error loading this list")})):s.default.createElement(C.default,null,s.default.createElement(_.default,{title:(0,l.default)("Nothing to see here"),description:n?(0,l.default)("There are no items in {1}",n):(0,l.default)("There are no items in this list")
}))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(475),c=r(u),d=n(98),h=r(d),p=n(1458),f=r(p),m=n(563),v=r(m),g=n(68),y=r(g),b=n(532),w=r(b),S=n(543),P=r(S),x=n(327),C=r(x),T=n(329),_=r(T),E=n(330),k=r(E),I=n(1591),A=r(I);i.propTypes={serverEntityID:a.PropTypes.string.isRequired,listTitle:a.PropTypes.string,listType:a.PropTypes.string,listContext:a.PropTypes.string.isRequired,metadataItemEntityIDs:a.PropTypes.array.isRequired,totalSize:a.PropTypes.number,
populatedRange:c.default.isRequired,firstItemType:a.PropTypes.string,isPending:a.PropTypes.bool.isRequired,isPopulated:a.PropTypes.bool.isRequired,error:a.PropTypes.object,columnAdjustment:a.PropTypes.number.isRequired,onPageRequest:a.PropTypes.func},i.defaultProps={listContext:h.default.LIBRARY},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(6),d=o(c),h=n(23),p=n(27),f=o(p),m=n(41),v=n(323),g=o(v),y=n(68),b=o(y),w=n(240),S=o(w),P=n(529),x=o(P),C=n(1415),T=o(C),_=n(1592),E=o(_),k=function(e){
function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isSearchMenuOpen:!1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,f.default)(this,e,t)}},{key:"onSearchMenuButtonPress",decorators:[h.autobind],value:function(e){this.setState({isSearchMenuOpen:!this.state.isSearchMenuOpen})}},{key:"onSearchMenuClose",decorators:[h.autobind],value:function(){this.setState({isSearchMenuOpen:!1})}},{key:"render",value:function(){
var e=this.props,t=e.isSearchPending,n=e.query,i=e.searchAllServers,r=e.columnAdjustment,a=e.onSearchAllChange,s=e.onColumnAdjustmentChange;return u.default.createElement(S.default,{className:E.default.dashboardHeader},u.default.createElement("div",{className:E.default.titleContainer},(0,d.default)("Search"),u.default.createElement("span",{className:E.default.separator},"\u2014"),u.default.createElement(x.default,{ref:"sharedSearchMenuButton",onPress:this.onSearchMenuButtonPress},i?(0,d.default)("All Servers"):(0,
d.default)("This Server")),u.default.createElement(T.default,{onSearchAllChange:a,isSearchAll:i,target:this.refs.sharedSearchMenuButton,isOpen:this.state.isSearchMenuOpen,onMenuClose:this.onSearchMenuClose})),u.default.createElement("div",{className:E.default.resultTitleContainer},u.default.createElement("span",null,t?(0,d.default)('Searching for "{1}"',n):(0,d.default)('Results for "{1}"',n)),t&&u.default.createElement(b.default,{className:E.default.spinner,size:m.sizes.SMALL})),u.default.createElement(g.default,{
columnAdjustment:r,onColumnAdjustmentChange:s}))}}]),t}(l.Component);k.propTypes={isSearchPending:l.PropTypes.bool.isRequired,query:l.PropTypes.string.isRequired,columnAdjustment:l.PropTypes.number.isRequired,searchAllServers:l.PropTypes.bool.isRequired,onSearchAllChange:l.PropTypes.func.isRequired,onColumnAdjustmentChange:l.PropTypes.func.isRequired},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function i(e){return function(t){return c.default.createElement(S.default,s({component:b.default
},e,t))}}function r(e){var t=e.isSearchCapable,n=e.isSearchPopulated,r=e.hubs,a=e.searchAllServers,o=e.columnAdjustment;return t?n&&!r.length?c.default.createElement(E.default,{title:(0,h.default)("No Results"),description:(0,h.default)("Try a different query")}):c.default.createElement(T.default,{innerClassName:M.default.searchContent},r.map(function(e){var t=e.type,n=a?m.default.SEARCH_ALL_SERVERS:m.default.SEARCH;return c.default.createElement(g.default,s({},e,{listType:t,listContext:n,keyPropName:"searchResultEntityID",
size:e.results.length,items:e.results,itemsOffset:0,columnAdjustment:o,key:e.hubIdentifier,cellRenderer:i({listType:t,listContext:n})}))})):c.default.createElement(E.default,{title:(0,h.default)("This server does not support search"),description:(0,h.default)("Browse libraries using the sidebar")})}function a(e){var t=e.isSearchPending,n=e.columnAdjustment,i=e.searchAllServers,a=e.onSearchAllChange,s=e.onColumnAdjustmentChange;o(e,["isSearchPending","columnAdjustment","searchAllServers","onSearchAllChange","onColumnAdjustmentChange"]);
return c.default.createElement(x.default,{scrollDirection:p.scrollDirections.NONE},c.default.createElement(I.default,{isSearchPending:t,query:e.query,columnAdjustment:n,searchAllServers:i,onSearchAllChange:a,onColumnAdjustmentChange:s}),c.default.createElement(r,e))}var s=n(11).default,o=n(14).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(6),h=l(d),p=n(41),f=n(98),m=l(f),v=n(540),g=l(v),y=n(1357),b=l(y),w=n(558),S=l(w),P=n(239),x=l(P),C=n(327),T=l(C),_=n(329),E=l(_),k=n(1412),I=l(k),A=n(1593),M=l(A);
r.propTypes={isSearchCapable:u.PropTypes.bool.isRequired,isSearchPopulated:u.PropTypes.bool.isRequired,hubs:u.PropTypes.arrayOf(u.PropTypes.object),columnAdjustment:u.PropTypes.number.isRequired,searchAllServers:u.PropTypes.bool.isRequired},a.propTypes={isSearchPending:u.PropTypes.bool.isRequired,query:u.PropTypes.string.isRequired,columnAdjustment:u.PropTypes.number.isRequired,searchAllServers:u.PropTypes.bool.isRequired,onSearchAllChange:u.PropTypes.func.isRequired,onColumnAdjustmentChange:u.PropTypes.func.isRequired
},a.defaultProps={hubs:[]},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,S.createSelector)(function(e){return e.servers},function(e,t){var n=t.serverEntityID;return n},I.default,M.default,function(e,t,n,i){var r=i.searchAllServers;return e.reduce(function(e,i){if(i!==t&&!r)return e;var a=n[i],s=b.default.isMatch(a,{isConnected:!0,isFullServer:!0});return s?e.concat(i):e},[])})}function r(){return(0,x.default)(i(),function(e){return e})}function a(){return(0,S.createSelector)(r(),I.default,function(e,t){
return e.reduce(function(e,n){return e[n]=t[n].desktop.search,e},{})})}function s(){return(0,x.default)(a(),function(e){return e})}function o(){return(0,S.createSelector)(s(),function(e){var t=f(e),n=!1,i=!1,r=t.reduce(function(t,r){var a=e[r];return a.isSearchPending&&(n=!0),a.isSearchPopulated&&(i=!0),a.hubs.forEach(function(e){var n=e.results.map(function(e){return{searchResultEntityID:e,serverEntityID:r}}),i=t[e.hubIdentifier];i?(i.size+=e.size,i.results=i.results.concat(n)):t[e.hubIdentifier]={
hubIdentifier:e.hubIdentifier,size:e.size,type:e.type,title:e.title,results:[].concat(n)}}),t},{});return{isSearchCapable:!!t.length,isSearchPopulated:i,isSearchPending:n,hubs:b.default.values(r)}})}function l(){return(0,S.createSelector)(o(),M.default,function(e,t){return u({searchAllServers:t.searchAllServers,columnAdjustment:t.columnAdjustment},e)})}var u=n(11).default,c=n(16).default,d=n(17).default,h=n(24).default,p=n(15).default,f=n(89).default,m=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var v=n(7),g=m(v),y=n(3),b=m(y),w=n(34),S=n(28),P=n(273),x=m(P),C=n(70),T=n(23),_=n(1063),E=n(72),k=n(275),I=m(k),A=n(184),M=m(A),D=n(241),R=m(D),O=n(1413),L=m(O),N=30,U={saveSettings:E.saveSettings,fetchSearch:_.fetchSearch},F=function(e){function t(){p(this,t),c(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return d(t,e),h(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){e.query&&e.query!==this.props.query&&this._populate(e);
}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.isSearchCapable&&(0,C.scheduleImmediateUpdate)(function(){e.fetchSearch({serverEntityID:e.serverEntityID,query:e.query,limit:N})})}},{key:"onColumnAdjustmentChange",decorators:[T.autobind],value:function(e){this.props.saveSettings({name:"experienceSettings",settings:{columnAdjustment:e}})}},{key:"onSearchAllChange",decorators:[T.autobind],value:function(e){this.props.saveSettings({name:"experienceSettings",
settings:{searchAllServers:e}}),this._populate()}},{key:"render",value:function(){return g.default.createElement(R.default,{machineIdentifier:this.props.machineIdentifier},g.default.createElement(L.default,u({},this.props,{onColumnAdjustmentChange:this.onColumnAdjustmentChange,onSearchAllChange:this.onSearchAllChange})))}}]),t}(v.Component);F.propTypes={machineIdentifier:v.PropTypes.string.isRequired,serverEntityID:v.PropTypes.string.isRequired,isSearchCapable:v.PropTypes.bool.isRequired,query:v.PropTypes.string.isRequired,
saveSettings:v.PropTypes.func.isRequired,fetchSearch:v.PropTypes.func.isRequired},t.default=(0,w.connect)(l,U)(F),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(6),h=l(d),p=n(23),f=n(154),m=l(f),v=n(321),g=l(v),y=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),
a(t,[{key:"onThisServerPress",decorators:[p.autobind],value:function(){this.props.onSearchAllChange(!1)}},{key:"onAllServersPress",decorators:[p.autobind],value:function(){this.props.onSearchAllChange(!0)}},{key:"render",value:function(){var e=this.props,t=e.isSearchAll,n=o(e,["isSearchAll"]);return c.default.createElement(m.default,n,c.default.createElement(g.default,{isSelected:!t,onPress:this.onThisServerPress},(0,h.default)("This Server")),c.default.createElement(g.default,{isSelected:t,onPress:this.onAllServersPress
},(0,h.default)("All Servers")))}}]),t}(u.Component);y.propTypes={isOpen:u.PropTypes.bool.isRequired,onSearchAllChange:u.PropTypes.func.isRequired,isSearchAll:u.PropTypes.bool.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default,c=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=u(d),p=n(66),f=u(p),m=n(30),v=u(m),g=n(61),y=u(g),b=n(23),w=n(230),S=c(w),P=n(27),x=u(P),C=n(337),T=c(C),_=n(339),E=u(_),k=n(1419),I=u(k),A=n(1421),M=u(A),D=n(1594),R=u(D),O=parseInt(E.default.searchResultHeight,10),L=function(e){
function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.isTabScoped=!1,this.state={scrollTop:0,isOpen:!1}}return r(t,e),a(t,[{key:"componentWillMount",value:function(){this._listenForPress()}},{key:"componentWillReceiveProps",value:function(e,t){var n=e.selectedResultEntityID,i=e.isSearchPending,r=e.query,a=this.props.query!==r,s=r.trim().length,o=this.state.isOpen;s&&!o&&a?this.setState({isOpen:!0}):!s&&o&&this.setState({isOpen:!1}),(i||null==n)&&this.setState({
scrollTop:0})}},{key:"shouldComponentUpdate",value:function(e,t){return(0,x.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._stopListeningForPress()}},{key:"_listenForPress",value:function(){window.addEventListener("mouseup",this.onWindowPress),window.addEventListener("touchend",this.onWindowPress)}},{key:"_stopListeningForPress",value:function(){window.removeEventListener("mouseup",this.onWindowPress),window.removeEventListener("touchend",this.onWindowPress)}},{key:"onScrollIntoView",
decorators:[b.autobind],value:function(e){var t=e.scrollTop,n=f.default.findDOMNode(this.refs.results),i=n.clientHeight,r=i+this.state.scrollTop,a=t+O>r||t<this.state.scrollTop;this.setState({scrollTop:a?t:this.state.scrollTop})}},{key:"onWindowPress",decorators:[b.autobind],value:function(e){if(this.state.isOpen){var t=f.default.findDOMNode(this.refs.search),n=t&&t.contains(e.target);n||(this.isTabScoped&&(T.resetScopedFocus(),this.isTabScoped=!1),this.setState({isOpen:!1}))}}},{key:"onKeyDown",
decorators:[b.autobind],value:function(e){var t=this.props.serverEntityID,n=this.state.isOpen;switch(e.keyCode){case S.DOWN_ARROW:case S.UP_ARROW:n&&(e.stopPropagation(),e.preventDefault(),e.keyCode===S.UP_ARROW?this.props.selectQuickSearchResult({serverEntityID:t,offset:-1}):this.props.selectQuickSearchResult({serverEntityID:t,offset:1}),this.isTabScoped&&(T.restorePreviousFocus(),this.isTabScoped=!1));break;case S.ENTER:if(n){var i=y.default.platformID,r="osx"===i?e.metaKey:e.ctrlKey,a=e.shiftKey;
T.resetFocus(),this.isTabScoped=!1,r?a?this.props.playQuickSearchItem({serverEntityID:t,shuffle:!0}):this.props.playQuickSearchItem({serverEntityID:t}):this.props.navigateQuickSearchResult({serverEntityID:t})}break;case S.ESCAPE:e.nativeEvent.stopImmediatePropagation(),this.isTabScoped&&(T.restorePreviousFocus(),this.isTabScoped=!1),n?this.setState({isOpen:!1}):this.props.changeQuickSearchQuery({serverEntityID:t,query:""});break;case S.TAB:if(n){if(!this.isTabScoped){var s=f.default.findDOMNode(this.refs.results);
T.startScopedFocus(s),this.isTabScoped=!0}T.scopeTabEvent(e)}}}},{key:"onInputClick",decorators:[b.autobind],value:function(e){this.isTabScoped&&(T.restorePreviousFocus(),this.isTabScoped=!1),this.state.isOpen||""===this.props.query||this.setState({isOpen:!0})}},{key:"onPlayPress",decorators:[b.autobind],value:function(e){var t=this.props,n=t.serverEntityID,i=t.playQuickSearchItem;i({serverEntityID:n,searchResultEntityID:e})}},{key:"onLinkPress",decorators:[b.autobind],value:function(){var e=this.props,t=e.serverEntityID,n=e.resetQuickSearch;
n({serverEntityID:t})}},{key:"onResultFocus",decorators:[b.autobind],value:function(e){var t=this.props,n=t.serverEntityID,i=t.selectQuickSearchResult;i({serverEntityID:n,searchResultEntityID:e})}},{key:"onResultPress",decorators:[b.autobind],value:function(e){var t=this.props,n=t.serverEntityID,i=t.navigateQuickSearchResult;i({serverEntityID:n,searchResultEntityID:e}),this.isTabScoped&&(T.resetFocus(),this.isTabScoped=!1)}},{key:"onScrollPositionChange",decorators:[b.autobind],value:function(e){
var t=e.scrollTop;this.setState({scrollTop:t})}},{key:"onSearch",decorators:[b.autobind],value:function(){var e=this.props,t=e.serverEntityID,n=e.supportsQuickSearch,i=e.isServerUnavailable;n&&!i&&this.props.fetchQuickSearch({serverEntityID:t})}},{key:"onInputChange",decorators:[b.autobind],value:function(e){var t=this.props,n=t.serverEntityID,i=t.changeQuickSearchQuery;i({serverEntityID:n,query:e})}},{key:"render",value:function(){var e=this.props,t=e.query,n=o(e,["query"]);return h.default.createElement("div",{
ref:"search",className:(0,v.default)(R.default.container),onKeyDown:this.onKeyDown},h.default.createElement(I.default,{query:t,onChange:this.onInputChange,onSearch:this.onSearch,onClick:this.onInputClick}),this.state.isOpen&&h.default.createElement(M.default,l({ref:"results",query:t,scrollTop:this.state.scrollTop,onScrollPositionChange:this.onScrollPositionChange,onPlayPress:this.onPlayPress,onLinkPress:this.onLinkPress,onResultFocus:this.onResultFocus,onResultPress:this.onResultPress,onScrollIntoView:this.onScrollIntoView
},n)))}}]),t}(d.Component);L.propTypes={serverEntityID:d.PropTypes.string.isRequired,query:d.PropTypes.string.isRequired,searchType:d.PropTypes.string,searchPlaceholder:d.PropTypes.string,hubs:d.PropTypes.array.isRequired,supportsQuickSearch:d.PropTypes.bool.isRequired,isServerUnavailable:d.PropTypes.bool.isRequired,isSearchPopulated:d.PropTypes.bool.isRequired,isSearchPending:d.PropTypes.bool.isRequired,selectedResultEntityID:d.PropTypes.string,changeQuickSearchQuery:d.PropTypes.func.isRequired,
fetchQuickSearch:d.PropTypes.func.isRequired,navigateQuickSearchResult:d.PropTypes.func.isRequired,playQuickSearchItem:d.PropTypes.func.isRequired,selectQuickSearchResult:d.PropTypes.func.isRequired,resetQuickSearch:d.PropTypes.func.isRequired},t.default=L,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,f.createSelector)((0,v.default)(),y.default,function(e,t){var n=t.searchAllServers;if(!e)return{isWaitingForServer:!0};var i=e.desktop.quickSearch;return r({isWaitingForServer:!1,
supportsQuickSearch:(0,w.default)(e.shortVersion,C.default.quickSearch),isServerUnavailable:e.isUnavailable,searchAllServers:n},i)})}var r=n(11).default,a=n(16).default,s=n(17).default,o=n(46).default,l=n(15).default,u=n(2).default,c=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=u(d),p=n(34),f=n(28),m=n(76),v=u(m),g=n(184),y=u(g),b=n(284),w=u(b),S=n(1416),P=u(S),x=n(103),C=u(x),T=n(149),_=c(T),E=function(e){function t(){l(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return s(t,e),o(t,[{key:"render",value:function(){return this.props.isWaitingForServer?null:h.default.createElement(P.default,this.props)}}]),t}(d.Component);E.propTypes={serverEntityID:d.PropTypes.string,isWaitingForServer:d.PropTypes.bool.isRequired},t.default=(0,p.connect)(i,_)(E),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(27),p=u(h),f=n(558),m=u(f),v=n(1420),g=u(v),y=n(1595),b=u(y),w=function(e){
function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.selectedResultEntityID,i=e.results,r=o(e,["title","selectedResultEntityID","results"]);return d.default.createElement("div",null,d.default.createElement("h5",{className:b.default.hubTitle},t),i.map(function(e,t){return d.default.createElement(m.default,l({},r,{
isSelected:n===e,component:g.default,key:e,searchResultEntityID:e}))}))}}]),t}(c.Component);w.propTypes={title:c.PropTypes.string.isRequired,selectedResultEntityID:c.PropTypes.string,results:c.PropTypes.arrayOf(c.PropTypes.string).isRequired},t.default=w,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(30),d=o(c),h=n(8),p=o(h),f=n(27),m=o(f),v=n(23),g=n(48),y=o(g),b=n(40),w=o(b),S=n(1596),P=o(S),x=function(e){
function t(e){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={isFocused:!1,query:""},this.searchTimeout=null}return r(t,e),a(t,[{key:"componentDidMount",value:function(){p.default.on("shortcut:search",this.focusInput)}},{key:"componentWillReceiveProps",value:function(e){this.state.query!==e.query&&this.setState({query:e.query})}},{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){
p.default.off("shortcut:search",this.focusInput),this.searchTimeout&&clearTimeout(this.searchTimeout)}},{key:"focusInput",decorators:[v.autobind],value:function(){this.refs.input.focus()}},{key:"onClick",decorators:[v.autobind],value:function(e){this.focusInput(),this.props.onClick()}},{key:"onFocus",decorators:[v.autobind],value:function(){this.setState({isFocused:!0})}},{key:"onBlur",decorators:[v.autobind],value:function(){this.setState({isFocused:!1})}},{key:"onInput",decorators:[v.autobind],
value:function(e){var t=this,n=e.target.value;this.searchTimeout&&clearTimeout(this.searchTimeout),this.setState({query:n},function(){t.props.onChange(n),""!==n.trim()&&(t.searchTimeout=setTimeout(t.props.onSearch,100))})}},{key:"onClearPress",decorators:[v.autobind],value:function(e){var t=this;e.stopPropagation(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.setState({query:""},function(){t.props.onChange(""),t.focusInput()})}},{key:"render",value:function(){var e=this.state,t=e.query,n=e.isFocused;
return u.default.createElement("div",{className:(0,d.default)(P.default.container,n&&P.default.focused),onClick:this.onClick},u.default.createElement(y.default,{name:"plex-icon-search-560",className:P.default.searchIcon}),u.default.createElement("input",{ref:"input",className:P.default.searchInput,value:t,type:"text",autoComplete:"off",spellCheck:"false",onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur}),t.length>0&&u.default.createElement(w.default,{onPress:this.onClearPress},u.default.createElement(y.default,{
name:"plex-icon-close-560",className:P.default.closeIcon})))}}]),t}(l.Component);x.propTypes={onChange:l.PropTypes.func,onSearch:l.PropTypes.func,onClick:l.PropTypes.func,onFocus:l.PropTypes.func,onBlur:l.PropTypes.func},x.defaultProps={onClick:l.PropTypes.func},t.default=x,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(7),d=u(c),h=n(66),p=u(h),f=n(30),m=u(f),v=n(23),g=n(27),y=u(g),b=n(98),w=u(b),S=n(243),P=n(197),x=u(P),C=n(338),T=u(C),_=n(48),E=u(_),k=n(40),I=u(k),A=n(544),M=u(A),D=n(556),R=u(D),O=n(1422),L=u(O),N=n(557),U=u(N),F=n(1597),j=u(F),B=function(e){
function t(e){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={isMenuOpen:!1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"componentWillUpdate",value:function(e,t){if(e.isSelected!==this.props.isSelected&&e.isSelected){var n=p.default.findDOMNode(this);this.props.onScrollIntoView({scrollTop:n.offsetTop})}}},{key:"onItemPress",decorators:[v.autobind],value:function(e){e.preventDefault();var t=p.default.findDOMNode(this.refs.menuButton);
t&&t.contains(e.target)||this.props.onResultPress(this.props.searchResultEntityID)}},{key:"onItemFocus",decorators:[v.autobind],value:function(e){this.props.onResultFocus(this.props.searchResultEntityID)}},{key:"onPlayPress",decorators:[v.autobind],value:function(e){e.stopPropagation(),this.props.onPlayPress(this.props.searchResultEntityID)}},{key:"onLinkPress",decorators:[v.autobind],value:function(e){e.stopPropagation(),this.props.onLinkPress()}},{key:"onMenuIconPress",decorators:[v.autobind],value:function(e){
this.setState({isMenuOpen:!this.state.isMenuOpen})}},{key:"onMenuClose",decorators:[v.autobind],value:function(){this.setState({isMenuOpen:!1})}},{key:"render",value:function(){var e=this,t=this.state.isMenuOpen,n=this.props,i=n.tag,r=n.isSelected,a=n.isMetadataItem,s=o(n,["tag","isSelected","isMetadataItem"]),u=s.type,c=s.title,h=void 0===c?i:c,p=s.reasonTitle,f=(0,m.default)(j.default.button,(r||t)&&j.default.selected),v=(0,x.default)(u,w.default.QUICK_SEARCH),g=p&&""!==p;return d.default.createElement(I.default,{
component:"div",tabIndex:"1",className:f,onPress:this.onItemPress,onFocus:this.onItemFocus},d.default.createElement("div",{className:j.default.imageContainer},d.default.createElement(R.default,l({},s,{width:(0,S.getAspectRatio)(u)===S.PORTRAIT?28:36,onPlayPress:this.onPlayPress,title:h,isMetadataItem:a}))),d.default.createElement("div",{className:j.default.titles},v.map(function(t,n){var i=t.component,r=o(t,["component"]),a=n>0;return d.default.createElement(L.default,l({},r,s,{className:a?null:j.default.title,
title:h,key:n,isSecondary:a,component:g&&a?U.default:i,onPress:e.onLinkPress}))})),a&&d.default.createElement(I.default,{ref:"menuButton",tabIndex:"-1",onPress:this.onMenuIconPress,className:j.default.moreButton},d.default.createElement(E.default,{name:"plex-icon-more-560",className:j.default.moreIcon})),a&&d.default.createElement(M.default,l({isOpen:t,target:this.refs.menuButton,onMenuClose:this.onMenuClose},s,(0,T.default)(s),{showPlayTrailer:!1,showPlayPlexMix:!1,showPlayMusicVideo:!1,showEdit:!1,
showRefresh:!1,showAnalyze:!1,showFixMatch:!1,showMatch:!1,showUnmatch:!1,showSplitApart:!1,showSync:!1,showOptimize:!1,showDownload:!1,showWatchLater:!1,showShare:!1,showRecommend:!1,showDelete:!1,showDeleteVersion:!1})))}}]),t}(c.Component);B.propTypes={tag:c.PropTypes.string,title:c.PropTypes.string,type:c.PropTypes.string,isMetadataItem:c.PropTypes.bool,searchResultEntityID:c.PropTypes.string,isSelected:c.PropTypes.bool,onLinkPress:c.PropTypes.func,onPlayPress:c.PropTypes.func,onResultPress:c.PropTypes.func,
onResultFocus:c.PropTypes.func,onScrollIntoView:c.PropTypes.func},B.defaultProps={isMetadataItem:!1},t.default=B,e.exports=t.default},function(e,t,n){"use strict";function i(e,t,n){return t?(0,v.default)("Search in {1}...",t):n?(0,v.default)("Search all servers...",e):(0,v.default)("Show more results...",e)}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(14).default,u=n(11).default,c=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=c(d),p=n(30),f=c(p),m=n(6),v=c(m),g=n(23),y=n(27),b=c(y),w=n(84),S=c(w),P=n(68),x=c(P),C=n(40),T=c(C),_=n(1418),E=c(_),k=n(1598),I=c(k),A=function(e){
function t(e){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={maxHeight:this.getMaxHeight()}}return a(t,e),s(t,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onWindowResize)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,b.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onWindowResize)}},{key:"getMaxHeight",value:function(){return window.innerHeight-150;
}},{key:"onWindowResize",decorators:[g.autobind],value:function(){this.setState({maxHeight:this.getMaxHeight()})}},{key:"onPlaceholderPress",decorators:[g.autobind],value:function(){this.props.onResultPress()}},{key:"onPlaceholderFocus",decorators:[g.autobind],value:function(){this.props.onResultFocus()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.scrollTop,r=e.hubs,a=e.query,s=e.searchAllServers,o=e.placeholder,c=e.selectedResultEntityID,d=e.isSearchPending,p=e.isSearchPopulated,m=e.onScrollPositionChange,v=l(e,["className","scrollTop","hubs","query","searchAllServers","placeholder","selectedResultEntityID","isSearchPending","isSearchPopulated","onScrollPositionChange"]),g=(0,
f.default)(I.default.placeholder,null==c&&I.default.placeholderSelected),y=d&&!p;return h.default.createElement(S.default,{className:(0,f.default)(I.default.container,t),style:this.state,scrollTop:n,onScrollPositionChange:m},y?h.default.createElement("div",{className:I.default.spinnerContainer},h.default.createElement(x.default,{className:I.default.spinner})):h.default.createElement("div",null,h.default.createElement(T.default,{className:g,tabIndex:"1",onPress:this.onPlaceholderPress,onFocus:this.onPlaceholderFocus
},i(a,o,s)),r.map(function(e){return h.default.createElement(E.default,u({},v,{selectedResultEntityID:c,key:e.hubIdentifier,title:e.title,results:e.results}))})))}}]),t}(d.Component);A.propTypes={className:d.PropTypes.string,hubs:d.PropTypes.arrayOf(d.PropTypes.shape({hubIdentifier:d.PropTypes.string.isRequired,title:d.PropTypes.string.isRequired,results:d.PropTypes.arrayOf(d.PropTypes.string).isRequired})).isRequired,query:d.PropTypes.string,searchAllServers:d.PropTypes.bool,isSearchPending:d.PropTypes.bool,
isSearchPopulated:d.PropTypes.bool,placeholder:d.PropTypes.string,selectedResultEntityID:d.PropTypes.string,scrollTop:d.PropTypes.number,onDeckPress:d.PropTypes.func,onResultPress:d.PropTypes.func,onResultFocus:d.PropTypes.func,onScrollPositionChange:d.PropTypes.func},t.default=A,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.component,i=e.selectProps,s=e.isSecondary,o=e.onPress,u=r(e,["className","component","selectProps","isSecondary","onPress"]),d=i?i(u):u;
return l.default.createElement("div",{className:(0,c.default)(t,h.default.title,s&&h.default.isSecondary)},l.default.createElement(n,a({tabIndex:"-1",isSecondary:s,onPress:o},d)))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(1599),h=s(d);i.propTypes={className:o.PropTypes.string,component:o.PropTypes.func,selectProps:o.PropTypes.func,isSecondary:o.PropTypes.bool,onPress:o.PropTypes.func},t.default=i,e.exports=t.default;
},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.isMetadataItem,i=r(e,["title","isMetadataItem"]);return n?l.default.createElement(c.default,i):l.default.createElement(h.default,a({},i,{title:t}))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(546),c=s(u),d=n(1363),h=s(d);i.propTypes={isMetadataItem:o.PropTypes.bool.isRequired,title:o.PropTypes.string.isRequired},t.default=i,e.exports=t.default},function(e,t,n){
"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(14).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(23),h=n(6),p=l(h),f=n(27),m=l(f),v=n(41),g=n(322),y=l(g),b=n(136),w=l(b),S=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onPlaySelectedPress",decorators:[d.autobind],
value:function(e){this.props.playSelectedItems()}},{key:"onShufflePress",decorators:[d.autobind],value:function(e){this.props.shuffleSelectedItems()}},{key:"onAddToPlaylistPress",decorators:[d.autobind],value:function(e){this.props.addSelectedItemsToPlaylist()}},{key:"onMarkWatchedPress",decorators:[d.autobind],value:function(e){this.props.markSelectedItemsWatched()}},{key:"onMarkUnwatchedPress",decorators:[d.autobind],value:function(e){this.props.markSelectedItemsUnwatched()}},{key:"onEditPress",
decorators:[d.autobind],value:function(e){this.props.editSelectedItems()}},{key:"onRefreshPress",decorators:[d.autobind],value:function(e){this.props.refreshSelectedItems()}},{key:"onAnalyzePress",decorators:[d.autobind],value:function(e){this.props.analyzeSelectedItems()}},{key:"onMergePress",decorators:[d.autobind],value:function(e){this.props.mergeSelectedItems()}},{key:"onSyncPress",decorators:[d.autobind],value:function(e){this.props.syncSelectedItems()}},{key:"onOptimizePress",decorators:[d.autobind],
value:function(e){this.props.optimizeSelectedItems()}},{key:"onDeletePress",decorators:[d.autobind],value:function(e){this.props.onDeletePress()}},{key:"render",value:function(){var e=this.props,t=e.target,n=e.isOpen,i=e.onMenuClose,r=o(e,["target","isOpen","onMenuClose"]);return c.default.createElement(y.default,{target:t,isOpen:n,onMenuClose:i},r.showPlaySelected&&c.default.createElement(w.default,{onPress:this.onPlaySelectedPress},(0,p.default)("Play Selected")),r.showShuffle&&c.default.createElement(w.default,{
onPress:this.onShufflePress},(0,p.default)("Shuffle")),r.showAddToPlaylist&&c.default.createElement(w.default,{onPress:this.onAddToPlaylistPress},(0,p.default)("Add to Playlist...")),r.showMarkWatched&&c.default.createElement(w.default,{onPress:this.onMarkWatchedPress},(0,p.default)("Mark Watched")),r.showMarkUnwatched&&c.default.createElement(w.default,{onPress:this.onMarkUnwatchedPress},(0,p.default)("Mark Unwatched")),r.showEdit&&c.default.createElement(w.default,{onPress:this.onEditPress},(0,
p.default)("Edit")),r.showRefresh&&c.default.createElement(w.default,{onPress:this.onRefreshPress},(0,p.default)("Refresh")),r.showAnalyze&&c.default.createElement(w.default,{onPress:this.onAnalyzePress},(0,p.default)("Analyze")),r.showMerge&&c.default.createElement(w.default,{onPress:this.onMergePress},(0,p.default)("Merge")),r.showSync&&c.default.createElement(w.default,{onPress:this.onSyncPress},(0,p.default)("Sync...")),r.showOptimize&&c.default.createElement(w.default,{onPress:this.onOptimizePress
},(0,p.default)("Optimize...")),r.showDelete&&c.default.createElement(w.default,{kind:v.kinds.DANGER,onPress:this.onDeletePress},(0,p.default)("Delete")))}}]),t}(u.Component);S.propTypes={target:u.PropTypes.object,isOpen:u.PropTypes.bool.isRequired,onMenuClose:u.PropTypes.func.isRequired,showPlaySelected:u.PropTypes.bool,showShuffle:u.PropTypes.bool,showAddToPlaylist:u.PropTypes.bool,showMarkWatched:u.PropTypes.bool,showMarkUnwatched:u.PropTypes.bool,showEdit:u.PropTypes.bool,showRefresh:u.PropTypes.bool,
showAnalyze:u.PropTypes.bool,showMerge:u.PropTypes.bool,showSync:u.PropTypes.bool,showOptimize:u.PropTypes.bool,showDelete:u.PropTypes.bool,playSelectedItems:u.PropTypes.func.isRequired,shuffleSelectedItems:u.PropTypes.func.isRequired,addSelectedItemsToPlaylist:u.PropTypes.func.isRequired,markSelectedItemsWatched:u.PropTypes.func.isRequired,markSelectedItemsUnwatched:u.PropTypes.func.isRequired,editSelectedItems:u.PropTypes.func.isRequired,refreshSelectedItems:u.PropTypes.func.isRequired,analyzeSelectedItems:u.PropTypes.func.isRequired,
mergeSelectedItems:u.PropTypes.func.isRequired,syncSelectedItems:u.PropTypes.func.isRequired,optimizeSelectedItems:u.PropTypes.func.isRequired,onDeletePress:u.PropTypes.func.isRequired},t.default=S,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.activeSelectionItems,n=e.onDeselectAllPress,i=r(e,["activeSelectionItems","onDeselectAllPress"]),s=t.length,o=(0,h.default)(e);return l.default.createElement(y.default,{className:P.default.metadataListHeader},l.default.createElement("div",{
className:P.default.titleContainer},l.default.createElement(f.default,{name:"plex-icon-selected-560",className:P.default.icon}),1===s?(0,c.default)("{1} item selected",s):(0,c.default)("{1} items selected",s)),l.default.createElement(w.default,a({numSelectedItems:s},i,o)),l.default.createElement("div",{className:P.default.deselectContainer},l.default.createElement(v.default,{className:P.default.deselectLink,onPress:n},l.default.createElement(f.default,{name:"plex-icon-remove-560",className:P.default.icon
}),(0,c.default)("Deselect All"))))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(6),c=s(u),d=n(1462),h=s(d),p=n(48),f=s(p),m=n(40),v=s(m),g=n(240),y=s(g),b=n(1426),w=s(b),S=n(1601),P=s(S);i.propTypes={activeSelectionItems:o.PropTypes.array.isRequired,activeSelectionType:o.PropTypes.string.isRequired,onDeselectAllPress:o.PropTypes.func.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){
return!!d.default.find(e,function(e){return t[e]})}var r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(11).default,u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(3),d=u(c),h=n(7),p=u(h),f=n(6),m=u(f),v=n(23),g=n(27),y=u(g),b=n(238),w=u(b),S=n(538),P=u(S),x=n(551),C=u(x),T=n(552),_=u(T),E=n(550),k=u(E),I=n(1378),A=u(I),M=n(1377),D=u(M),R=n(553),O=u(R),L=n(326),N=u(L),U=n(1424),F=u(U),j=["showRefresh","showAnalyze","showMerge","showOptimize","showDelete"],B=function(e){
function t(e,n){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isActionsMenuOpen:!1,isDeleteModalOpen:!1}}return a(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"onPlaySelectedPress",decorators:[v.autobind],value:function(e){this.props.playSelectedItems()}},{key:"onShufflePress",decorators:[v.autobind],value:function(e){this.props.shuffleSelectedItems()}},{key:"onAddToPlaylistPress",decorators:[v.autobind],
value:function(e){this.props.addSelectedItemsToPlaylist()}},{key:"onMarkWatchedConfirm",decorators:[v.autobind],value:function(e){this.props.markSelectedItemsWatched()}},{key:"onMarkUnwatchedConfirm",decorators:[v.autobind],value:function(e){this.props.markSelectedItemsUnwatched()}},{key:"onEditPress",decorators:[v.autobind],value:function(e){this.props.editSelectedItems()}},{key:"onSyncPress",decorators:[v.autobind],value:function(e){this.props.syncSelectedItems()}},{key:"onActionsPress",decorators:[v.autobind],
value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen})}},{key:"onActionsMenuClose",decorators:[v.autobind],value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"onDeletePress",decorators:[v.autobind],value:function(e){this.setState({isDeleteModalOpen:!0})}},{key:"onDeleteConfirm",decorators:[v.autobind],value:function(e){this.setState({isDeleteModalOpen:!1}),this.props.deleteSelectedItems()}},{key:"onDeleteCancel",decorators:[v.autobind],value:function(){this.setState({
isDeleteModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.numSelectedItems,n=e.showPlaySelected,r=e.showShuffle,a=e.showAddToPlaylist,s=e.showMarkWatched,o=e.showMarkUnwatched,u=e.showEdit,c=e.showSync,d=this.state,h=d.isActionsMenuOpen,f=d.isDeleteModalOpen,v=i(j,this.props);return p.default.createElement(P.default,null,n&&p.default.createElement(C.default,{playLabel:(0,m.default)("Play Selected"),onPress:this.onPlaySelectedPress}),r&&p.default.createElement(_.default,{onPress:this.onShufflePress
}),a&&p.default.createElement(k.default,{onPress:this.onAddToPlaylistPress}),(s||o)&&p.default.createElement(A.default,{numSelectedItems:t,showMarkWatched:s,showMarkUnwatched:o,onMarkWatchedConfirm:this.onMarkWatchedConfirm,onMarkUnwatchedConfirm:this.onMarkUnwatchedConfirm}),u&&p.default.createElement(D.default,{onPress:this.onEditPress}),c&&p.default.createElement(O.default,{onPress:this.onSyncPress}),v&&p.default.createElement(N.default,{ref:"moreButton",icon:"plex-icon-toolbar-more-560",label:(0,
m.default)("More..."),isMenuOpen:h,onPress:this.onActionsPress}),p.default.createElement(F.default,l({target:this.refs.moreButton,isOpen:h,onMenuClose:this.onActionsMenuClose,onDeletePress:this.onDeletePress},this.props,{showPlaySelected:!1,showShuffle:!1,showAddToPlaylist:!1,showMarkWatched:!1,showMarkUnwatched:!1,showEdit:!1,showSync:!1})),p.default.createElement(w.default,{isOpen:f,metricsPage:"confirmDelete",title:(0,m.default)("Delete"),message:1===t?(0,m.default)("Are you sure you want to delete this item from your filesystem?"):(0,
m.default)("Are you sure you want to delete these {1} items from your filesystem?",t),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel}))}}]),t}(h.Component);B.propTypes={numSelectedItems:h.PropTypes.number.isRequired,showPlaySelected:h.PropTypes.bool,showShuffle:h.PropTypes.bool,showAddToPlaylist:h.PropTypes.bool,showMarkWatched:h.PropTypes.bool,showMarkUnwatched:h.PropTypes.bool,showEdit:h.PropTypes.bool,showRefresh:h.PropTypes.bool,showAnalyze:h.PropTypes.bool,showMerge:h.PropTypes.bool,
showSync:h.PropTypes.bool,showOptimize:h.PropTypes.bool,showDelete:h.PropTypes.bool,playSelectedItems:h.PropTypes.func.isRequired,shuffleSelectedItems:h.PropTypes.func.isRequired,addSelectedItemsToPlaylist:h.PropTypes.func.isRequired,markSelectedItemsWatched:h.PropTypes.func.isRequired,markSelectedItemsUnwatched:h.PropTypes.func.isRequired,editSelectedItems:h.PropTypes.func.isRequired,syncSelectedItems:h.PropTypes.func.isRequired,deleteSelectedItems:h.PropTypes.func.isRequired},t.default=B,e.exports=t.default;
},function(e,t,n){"use strict";function i(e){var t=c.default.get("myPlexScheme")+"://"+c.default.get("myPlexUrl");return s.default.createElement(p.default,{className:b.default.container,autoScroll:!0},s.default.createElement(m.default,{title:e.username},s.default.createElement(g.default,{className:b.default.selected,to:"#!/account",icon:"plex-icon-settings-560"},(0,l.default)("Account")),s.default.createElement(g.default,{to:(0,d.join)([t,"/subscription"]),icon:"plex-icon-settings-560"},(0,l.default)("Subscriptions")),s.default.createElement(g.default,{
to:(0,d.join)([t,"/users/payments"]),icon:"plex-icon-settings-560"},(0,l.default)("Payments")),s.default.createElement(g.default,{to:(0,d.join)([t,"/cloudsync/providers"]),icon:"plex-icon-settings-560"},(0,l.default)("Cloud Sync")),s.default.createElement(g.default,{to:(0,d.join)([t,"/users/profile"]),icon:"plex-icon-settings-560"},(0,l.default)("Global App Settings")),s.default.createElement(g.default,{to:"#!/settings/devices",icon:"plex-icon-settings-560"},(0,l.default)("Authorized Devices"))),s.default.createElement(m.default,{
title:(0,l.default)("Family & Friends")},s.default.createElement(g.default,{to:"#!/settings/users",icon:"plex-icon-settings-560"},(0,l.default)("Plex Home")),s.default.createElement(g.default,{to:"#!/settings/users/friends",icon:"plex-icon-settings-560"},(0,l.default)("Sharing"))))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(54),c=r(u),d=n(22),h=n(84),p=r(h),f=n(333),m=r(f),v=n(157),g=r(v),y=n(1602),b=r(y);i.propTypes={username:a.PropTypes.string
},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){return s.default.createElement(h.default,e)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(34),l=n(28),u=n(214),c=r(u),d=n(1427),h=r(d),p=(0,l.createSelector)(c.default,function(e){return{username:e.username}});t.default=(0,o.connect)(p)(i),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(7),u=o(l),c=n(23),d=n(159),h=o(d),p=n(160),f=o(p),m=n(84),v=o(m),g=n(1439),y=o(g),b=n(1447),w=o(b),S=n(1432),P=o(S),x=n(1437),C=o(x),T=n(1603),_=o(T),E=(0,h.default)(f.default.menuSpeed),k=u.default.createElement(P.default,null),I=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isMenuOpen:!1}}return r(t,e),a(t,[{key:"componentDidUpdate",value:function(e,t){var n=this;!t.isMenuOpen&&this.state.isMenuOpen&&(this._openTimeoutID=setTimeout(function(){
return n.props.onServerMenuOpen()},E))}},{key:"componentWillUnmount",value:function(){this._openTimeoutID&&clearTimeout(this._openTimeoutID)}},{key:"onMenuButtonPress",decorators:[c.autobind],value:function(e){this.setState({isMenuOpen:!this.state.isMenuOpen})}},{key:"onMenuClose",decorators:[c.autobind],value:function(e){this.setState({isMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.primaryServerEntityID,n=e.serverEntityIDs;return u.default.createElement("div",{className:_.default.sidebar
},u.default.createElement(y.default,{ref:"menuButton",hasPrimaryServer:!!t,serverEntityID:t,onPress:this.onMenuButtonPress}),u.default.createElement(v.default,{className:_.default.sidebarScroller,autoScroll:!0},u.default.createElement("div",{className:_.default.sidebarContent},t?u.default.createElement(w.default,{serverEntityID:t}):k)),u.default.createElement(C.default,{target:this.refs.menuButton,isOpen:this.state.isMenuOpen,serverEntityIDs:n,onMenuClose:this.onMenuClose}))}}]),t}(l.Component);I.propTypes={
primaryServerEntityID:l.PropTypes.string,serverEntityIDs:l.PropTypes.array.isRequired,onServerMenuOpen:l.PropTypes.func.isRequired},t.default=I,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.count;return s.default.createElement(l.default,{className:c.default.sidebarListItemBadge,count:t})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(525),l=r(o),u=n(1607),c=r(u);i.propTypes={count:a.PropTypes.number},t.default=i,e.exports=t.default;
},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,n=e.isWaitingForPrimaryServer,i=e.isUserRestricted;return n?m:t.length?s.default.createElement(h.default,{outOfDateServers:t}):i?v:g}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(1433),l=r(o),u=n(1434),c=r(u),d=n(1435),h=r(d),p=n(1436),f=r(p),m=s.default.createElement(f.default,null),v=s.default.createElement(c.default,null),g=s.default.createElement(l.default,null);i.propTypes={outOfDateServers:a.PropTypes.array.isRequired,
isWaitingForPrimaryServer:a.PropTypes.bool.isRequired,isUserRestricted:a.PropTypes.bool.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var r=n(34),a=n(28),s=n(426),o=i(s),l=n(1431),u=i(l),c=(0,a.createStructuredSelector)({outOfDateServers:o.default,isWaitingForPrimaryServer:function(e){return e.isWaitingForPrimaryServer},isUserRestricted:function(e){return!!e.user.restricted}}),d=(0,r.connect)(function(e){
return c(e)})(u.default);t.default=d,e.exports=t.default},function(e,t,n){"use strict";function i(){return s.default.createElement(c.default,{message:(0,l.default)("A server could not be found. Download and install Plex Media Server, and it will appear here.")},s.default.createElement(h.default,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560"},(0,l.default)("Where is my server?")))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(158),c=r(u),d=n(157),h=r(d);
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return s.default.createElement(c.default,{message:(0,l.default)("No one in your home has shared a library with you.")},s.default.createElement(h.default,{to:"https://support.plex.tv/hc/en-us/articles/204234313-Example-Plex-Home-Setup",target:"_blank",icon:"plex-icon-help-560"},(0,l.default)("Learn more")))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(158),c=r(u),d=n(157),h=r(d);
t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.outOfDateServers,n=t.map(function(e){return'"'+e.friendlyName+'"'}),i=(0,c.default)(n),r=void 0;return r=1===t.length?(0,l.default)("The server {1} needs an update.",i):(0,l.default)("The servers {1} need updates.",i),s.default.createElement(h.default,{message:r})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(464),c=r(u),d=n(158),h=r(d);i.propTypes={outOfDateServers:a.PropTypes.array.isRequired
},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return s.default.createElement(c.default,{message:(0,l.default)("Please wait while servers are discovered.")})}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(158),c=r(u);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.target,n=e.isOpen,i=e.serverEntityIDs,r=e.onMenuClose;return s.default.createElement(u.default,{className:p.default.serverMenu,
target:t,isOpen:n,scrollerProps:f,onMenuClose:r},i.map(function(e){return s.default.createElement(d.default,{key:e,serverEntityID:e})}))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(41),l=n(154),u=r(l),c=n(1441),d=r(c),h=n(1609),p=r(h),f={className:p.default.serverMenuScroller,scrollDirection:o.scrollDirections.VERTICAL,autoScroll:!0};i.propTypes={target:a.PropTypes.object,isOpen:a.PropTypes.bool,serverEntityIDs:a.PropTypes.array.isRequired,onMenuClose:a.PropTypes.func.isRequired
},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.hasPrimaryServer,n=s(e,["hasPrimaryServer"]);return t?c.default.createElement(a,n):c.default.createElement(r,n)}function r(e){return c.default.createElement(b.default,o({className:x.default.serverMenuButton,isSelected:!0,isDisabled:!0},e),c.default.createElement("div",{className:x.default.serverMenuButtonContainer},c.default.createElement("span",{className:x.default.serverMenuTitle},(0,h.default)("Looking for servers...")),c.default.createElement(m.default,{
size:p.sizes.SMALL,className:x.default.serverMenuSpinner})))}function a(e){var t=e.friendlyName,n=e.sourceTitle,i=e.isConnected,r=e.isUnavailable,a=e.isSecure,l=s(e,["friendlyName","sourceTitle","isConnected","isUnavailable","isSecure"]);return c.default.createElement(b.default,o({className:x.default.serverMenuButton,"aria-haspopup":!0,isSelected:!0},l),c.default.createElement("div",{className:x.default.serverMenuButtonContainer},c.default.createElement("span",{className:x.default.serverMenuTitle
},c.default.createElement("span",{className:x.default.serverMenuFriendlyNameContainer},c.default.createElement("span",{className:x.default.serverMenuFriendlyName},t),C),n&&c.default.createElement("span",{className:x.default.serverMenuUsername},n)),c.default.createElement(S.default,{className:x.default.icon,isConnected:i,isUnavailable:r,isSecure:a})))}var s=n(14).default,o=n(11).default,l=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),c=l(u),d=n(6),h=l(d),p=n(41),f=n(68),m=l(f),v=n(526),g=l(v),y=n(40),b=l(y),w=n(560),S=l(w),P=n(1610),x=l(P);
i.propTypes={hasPrimaryServer:u.PropTypes.bool.isRequired};var C=c.default.createElement(g.default,{isSelected:!0});a.propTypes={friendlyName:u.PropTypes.string.isRequired,sourceTitle:u.PropTypes.string,isConnected:u.PropTypes.bool.isRequired,isUnavailable:u.PropTypes.bool.isRequired,isSecure:u.PropTypes.bool.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,d.createSelector)((0,p.default)(),function(e){var t=o.default.pick(e,"friendlyName","sourceTitle","isConnected","isUnavailable","isSecure");
return t})}function r(e){return u.default.createElement(m.default,e)}var a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(7),u=a(l),c=n(34),d=n(28),h=n(76),p=a(h),f=n(1438),m=a(f);r.propTypes={serverEntityID:l.PropTypes.string},t.default=(0,c.connect)(i)(r),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.activeConnection,n=!1,i=void 0;return e.isConnected&&t?i=e.isCloudSyncServer?(0,v.default)("Cloud"):e.isOutOfDate?(0,v.default)("Needs Update"):t.isPrivate?(0,
v.default)("Nearby"):(0,v.default)("Remote"):e.isUnavailable?i=(0,v.default)("Unavailable"):(n=!0,i=(0,v.default)("Connecting")),e.sourceTitle&&(i+=" ("+e.sourceTitle+")"),{isDisabled:n,status:i}}var r=n(16).default,a=n(17).default,s=n(46).default,o=n(15).default,l=n(14).default,u=n(11).default,c=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=c(d),p=n(30),f=c(p),m=n(6),v=c(m),g=n(27),y=c(g),b=n(48),w=c(b),S=n(136),P=c(S),x=n(560),C=c(x),T=n(1612),_=c(T),E=function(e){function t(){
o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"render",value:function(){if(!this.props.isPrimaryEligible||!this.props.friendlyName)return null;var e=this.props,t=e.className,n=e.isSelected,r=(e.onPress,l(e,["className","isSelected","onPress"])),a=i(r),s=a.isDisabled,o=a.status;return h.default.createElement(P.default,u({className:(0,f.default)(t,_.default.serverMenuItem,(s||r.isUnavailable)&&_.default.disabledServerMenuItem,n&&_.default.selectedServerMenuItem),
to:"#!/server/"+r.machineIdentifier+"/dashboard",isDisabled:s,onPress:this.onPress},r),h.default.createElement("div",{className:_.default.serverMenuItemContainer},h.default.createElement("div",{className:_.default.serverMenuTitle},h.default.createElement("div",{className:_.default.serverMenuFriendlyName},r.friendlyName),h.default.createElement("div",{className:_.default.serverMenuStatus},o)),h.default.createElement("div",{className:_.default.serverMenuIconContainer},n&&h.default.createElement(w.default,{
name:"plex-icon-selected-560",className:(0,f.default)(_.default.serverMenuIcon,_.default.selectedIcon),"aria-label":(0,v.default)("Selected")}),h.default.createElement(C.default,{className:_.default.serverMenuIcon,isConnected:r.isConnected,isUnavailable:r.isUnavailable,isSecure:r.isSecure}))))}}]),t}(d.Component);E.propTypes={className:d.PropTypes.string,machineIdentifier:d.PropTypes.string,friendlyName:d.PropTypes.string,sourceTitle:d.PropTypes.string,isConnected:d.PropTypes.bool.isRequired,isUnavailable:d.PropTypes.bool.isRequired,
isSecure:d.PropTypes.bool.isRequired,isCloudSyncServer:d.PropTypes.bool.isRequired,isPrimaryEligible:d.PropTypes.bool.isRequired,activeConnection:d.PropTypes.object,isSelected:d.PropTypes.bool.isRequired,onPress:d.PropTypes.func},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,h.createSelector)((0,f.default)(),function(e){return e.primaryServer},function(e,t){var n=l.default.pick(e,"machineIdentifier","friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isCloudSyncServer","isPrimaryEligible","activeConnection","isOutOfDate");
return a({},n,{isSelected:e.entityID===t})})}function r(e){return c.default.createElement(v.default,e)}var a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(7),c=s(u),d=n(34),h=n(28),p=n(76),f=s(p),m=n(1440),v=s(m);r.propTypes={serverEntityID:u.PropTypes.string.isRequired},t.default=(0,d.connect)(i)(r),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(7),u=o(l),c=n(30),d=o(c),h=n(6),p=o(h),f=n(23),m=n(27),v=o(m),g=n(48),y=o(g),b=n(40),w=o(b),S=n(238),P=o(S),x=n(1443),C=o(x),T=n(1613),_=o(T),E=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isActionsMenuOpen:!1,isOptimizeModalOpen:!1,isCleanBundlesModalOpen:!1,isEmptyTrashModalOpen:!1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onActionsPress",
decorators:[f.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen}),this.props.onActionsMenuOpen&&this.props.onActionsMenuOpen()}},{key:"onActionsMenuClose",decorators:[f.autobind],value:function(){this.setState({isActionsMenuOpen:!1}),this.props.onActionsMenuClose&&this.props.onActionsMenuClose()}},{key:"onOptimizeDatabasePress",decorators:[f.autobind],value:function(e){this.setState({isOptimizeModalOpen:!0})}},{key:"onOptimizeConfirm",decorators:[f.autobind],
value:function(){this.setState({isOptimizeModalOpen:!1}),this.props.onOptimizeDatabaseConfirm()}},{key:"onOptimizeCancel",decorators:[f.autobind],value:function(){this.setState({isOptimizeModalOpen:!1})}},{key:"onCleanBundlesPress",decorators:[f.autobind],value:function(e){this.setState({isCleanBundlesModalOpen:!0})}},{key:"onCleanBundlesConfirm",decorators:[f.autobind],value:function(){this.setState({isCleanBundlesModalOpen:!1}),this.props.onCleanBundlesConfirm()}},{key:"onCleanBundlesCancel",decorators:[f.autobind],
value:function(){this.setState({isCleanBundlesModalOpen:!1})}},{key:"onEmptyTrashPress",decorators:[f.autobind],value:function(e){this.setState({isEmptyTrashModalOpen:!0})}},{key:"onEmptyTrashConfirm",decorators:[f.autobind],value:function(){this.setState({isEmptyTrashModalOpen:!1}),this.props.onEmptyTrashConfirm()}},{key:"onEmptyTrashCancel",decorators:[f.autobind],value:function(){this.setState({isEmptyTrashModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.actionClassName,i=e.isLibraryRefreshing;
return u.default.createElement("div",{className:(0,d.default)(t,_.default.librariesActions,this.state.isActionsMenuOpen&&_.default.isActionsMenuOpen),role:"menu"},u.default.createElement(w.default,{className:(0,d.default)(n,_.default.librariesAction),role:"menuitem",onPress:this.props.onAddLibraryPress},u.default.createElement(y.default,{name:"plex-icon-add-560","aria-label":(0,p.default)("Add Library")})),u.default.createElement(w.default,{ref:"actionsMenuButton",className:(0,d.default)(n,_.default.librariesAction),
role:"menuitem","aria-haspopup":!0,onPress:this.onActionsPress},u.default.createElement(y.default,{name:"plex-icon-more-560","aria-label":(0,p.default)("More Actions")})),u.default.createElement(C.default,{target:this.refs.actionsMenuButton,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:i,onMenuClose:this.onActionsMenuClose,onSharePress:this.props.onSharePress,onUpdateLibrariesPress:this.props.onUpdateLibrariesPress,onCancelUpdatePress:this.props.onCancelUpdatePress,onOptimizeDatabasePress:this.onOptimizeDatabasePress,
onCleanBundlesPress:this.onCleanBundlesPress,onEmptyTrashPress:this.onEmptyTrashPress}),u.default.createElement(P.default,{isOpen:this.state.isOptimizeModalOpen,metricsPage:"confirmOptimizeDatabase",title:(0,p.default)("Optimize Database"),message:(0,p.default)("Cleans up the library database and ensures it is operating as quickly as possible. This is especially useful when you've added or removed a large amount of media from the library."),confirmLabel:(0,p.default)("Optimize"),onConfirm:this.onOptimizeConfirm,
onCancel:this.onOptimizeCancel}),u.default.createElement(P.default,{isOpen:this.state.isCleanBundlesModalOpen,metricsPage:"confirmCleanBundles",title:(0,p.default)("Clean Bundles"),message:(0,p.default)("The media server stores information about your media to disk, as well as posters, artwork, and other media resources from the internet. Running this task deletes any bundles which are no longer in use."),confirmLabel:(0,p.default)("Clean"),onConfirm:this.onCleanBundlesConfirm,onCancel:this.onCleanBundlesCancel
}),u.default.createElement(P.default,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:"confirmEmptyTrash",title:(0,p.default)("Empty Trash"),message:(0,p.default)("By default the media server doesn't remove information for media right away. This helps if a drive is temporarily disconnected. When you empty the trash for a section, all information about missing media is deleted."),confirmLabel:(0,p.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}))}}]),t}(l.Component);
E.propTypes={className:l.PropTypes.string,actionClassName:l.PropTypes.string,isLibraryRefreshing:l.PropTypes.bool.isRequired,onActionsMenuOpen:l.PropTypes.func,onActionsMenuClose:l.PropTypes.func,onAddLibraryPress:l.PropTypes.func.isRequired,onSharePress:l.PropTypes.func.isRequired,onUpdateLibrariesPress:l.PropTypes.func.isRequired,onCancelUpdatePress:l.PropTypes.func.isRequired,onOptimizeDatabaseConfirm:l.PropTypes.func.isRequired,onCleanBundlesConfirm:l.PropTypes.func.isRequired,onEmptyTrashConfirm:l.PropTypes.func.isRequired
},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.isLibraryRefreshing,n=e.onSharePress,i=e.onUpdateLibrariesPress,a=e.onCancelUpdatePress,s=e.onOptimizeDatabasePress,l=e.onCleanBundlesPress,c=e.onEmptyTrashPress,h=r(e,["isLibraryRefreshing","onSharePress","onUpdateLibrariesPress","onCancelUpdatePress","onOptimizeDatabasePress","onCleanBundlesPress","onEmptyTrashPress"]);return o.default.createElement(d.default,h,o.default.createElement(p.default,{onPress:n},(0,
u.default)("Share...")),t?o.default.createElement(p.default,{onPress:a},(0,u.default)("Cancel Update")):o.default.createElement(p.default,{onPress:i},(0,u.default)("Update Libraries")),o.default.createElement(p.default,{onPress:s},(0,u.default)("Optimize Database")),o.default.createElement(p.default,{onPress:l},(0,u.default)("Clean Bundles")),o.default.createElement(p.default,{onPress:c},(0,u.default)("Empty Trash")))}var r=n(14).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0
});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(154),d=a(c),h=n(136),p=a(h);i.propTypes={isLibraryRefreshing:s.PropTypes.bool.isRequired,onSharePress:s.PropTypes.func.isRequired,onUpdateLibrariesPress:s.PropTypes.func.isRequired,onCancelUpdatePress:s.PropTypes.func.isRequired,onOptimizeDatabasePress:s.PropTypes.func.isRequired,onCleanBundlesPress:s.PropTypes.func.isRequired,onEmptyTrashPress:s.PropTypes.func.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.id,n=e.type,i=e.agent,a=e.title,s=void 0===a?"":a,l=e.refreshing,c=r(e,["id","type","agent","title","refreshing"]),h="movie"===n&&"com.plexapp.agents.none"===i,f=h?"videos":n,v=encodeURIComponent(c.machineIdentifier),y=encodeURIComponent(t),w=s.trim();
return o.default.createElement(g.default,{className:S.default.libraryItem},o.default.createElement(b.default,{to:"#!/server/"+v+"/section/"+y,icon:d.default.get(f).sectionTypeIcon,className:S.default.libraryLink,showSpinner:c.isFullOwnedServer&&l},w),c.isFullOwnedServer&&o.default.createElement(m.default,{className:S.default.editLibraryLink,onPress:c.onEditLibraryPress},o.default.createElement(p.default,{name:"plex-icon-edit-560","aria-label":(0,u.default)("Edit {1}",w)})))}var r=n(14).default,a=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(7),o=a(s),l=n(6),u=a(l),c=n(83),d=a(c),h=n(48),p=a(h),f=n(40),m=a(f),v=n(334),g=a(v),y=n(332),b=a(y),w=n(1614),S=a(w);i.propTypes={machineIdentifier:s.PropTypes.string,isFullOwnedServer:s.PropTypes.bool,id:s.PropTypes.string,type:s.PropTypes.string,agent:s.PropTypes.string,title:s.PropTypes.string,refreshing:s.PropTypes.bool,onEditLibraryPress:s.PropTypes.func.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(11).default,r=n(16).default,a=n(17).default,s=n(24).default,o=n(15).default,l=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),c=l(u),d=n(7),h=l(d),p=n(34),f=n(28),m=n(23),v=n(212),g=l(v),y=n(1057),b=n(1444),w=l(b),S=function(){return(0,f.createSelector)((0,g.default)(),function(e){var t=c.default.pick(e,"title","type","agent","refreshing");return i({},t,{id:e.key})})},P=function(e){function t(){o(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),s(t,[{key:"onEditLibraryPress",decorators:[m.autobind],value:function(e){
this.props.editLibrary({libraryEntityID:this.props.libraryEntityID})}},{key:"render",value:function(){return h.default.createElement(w.default,i({onEditLibraryPress:this.onEditLibraryPress},this.props))}}]),t}(d.Component);P.propTypes={libraryEntityID:d.PropTypes.string.isRequired,editLibrary:d.PropTypes.func.isRequired},t.default=(0,p.connect)(S,{editLibrary:y.editLibrary})(P),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.machineIdentifier,n=e.allowChannelAccess,i=e.isFullOwnedServer,r=e.isConnected,a=e.isClaimed;
return r?s.default.createElement("div",null,i&&s.default.createElement(h.default,{title:(0,l.default)("Manage")},s.default.createElement(f.default,{key:"status",to:"#!/status",icon:"plex-icon-status-560"},(0,l.default)("Status")),s.default.createElement(f.default,{key:"settings",to:"#!/settings/server",icon:"plex-icon-settings-560"},(0,l.default)("Settings"),!a&&s.default.createElement(c.default,{name:"plex-icon-alert-560",className:P.default.unclaimedIcon,"aria-label":(0,l.default)("Unclaimed")}))),s.default.createElement(y.default,e),s.default.createElement(v.default,{
machineIdentifier:t,showChannels:!(!i&&!n)})):s.default.createElement(w.default,e)}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(6),l=r(o),u=n(48),c=r(u),d=n(333),h=r(d),p=n(157),f=r(p),m=n(1450),v=r(m),g=n(1448),y=r(g),b=n(1451),w=r(b),S=n(1615),P=r(S);i.propTypes={machineIdentifier:a.PropTypes.string.isRequired,isConnected:a.PropTypes.bool.isRequired,isFullOwnedServer:a.PropTypes.bool.isRequired,isClaimed:a.PropTypes.bool,allowChannelAccess:a.PropTypes.bool
},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(){return(0,g.createSelector)((0,x.default)(),function(e){return p.default.some(p.default.pluck(e,"refreshing"))})}function r(){return(0,g.createSelector)((0,S.default)(),i(),function(e,t){var n=p.default.pick(e,"machineIdentifier","friendlyName","promiseState","presence","allowChannelAccess","isConnected","isFullServer","isFullOwnedServer","isBundled","isClaimed","hasHttpsConnections","hasFallbackConnections"),i=p.default.pick(e&&e.desktop,"libraries","isLibrariesPending","librariesError");
return a({},n,i,{isLibraryRefreshing:t})})}var a=n(11).default,s=n(16).default,o=n(17).default,l=n(24).default,u=n(15).default,c=n(2).default,d=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var h=n(3),p=c(h),f=n(7),m=c(f),v=n(34),g=n(28),y=n(23),b=n(70),w=n(76),S=c(w),P=n(795),x=c(P),C=n(72),T=n(182),_=d(T),E=n(1446),k=c(E),I=a({redirectToHttp:C.redirectToHttp},_),A=function(e){function t(){u(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),
l(t,[{key:"componentWillMount",value:function(){var e=this.props.isConnected;e&&this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.serverEntityID,i=t.isConnected,r=e.serverEntityID,a=e.isConnected,s=n!==r,o=i!==a;a&&(s||o)&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,b.scheduleImmediateUpdate)(function(){e.fetchLibraries({serverEntityID:e.serverEntityID})})}},{key:"onReloadHttpPress",
decorators:[y.autobind],value:function(e){this.props.redirectToHttp()}},{key:"onDeleteServerConfirm",decorators:[y.autobind],value:function(){this.props.deleteServer({serverEntityID:this.props.serverEntityID})}},{key:"onAddLibraryPress",decorators:[y.autobind],value:function(e){this.props.addLibrary({serverEntityID:this.props.serverEntityID})}},{key:"onSharePress",decorators:[y.autobind],value:function(e){this.props.shareLibraries({serverEntityID:this.props.serverEntityID})}},{key:"onUpdateLibrariesPress",
decorators:[y.autobind],value:function(e){this.props.startLibraryRefresh({serverEntityID:this.props.serverEntityID})}},{key:"onCancelUpdatePress",decorators:[y.autobind],value:function(e){this.props.cancelLibraryRefresh({serverEntityID:this.props.serverEntityID})}},{key:"onOptimizeDatabaseConfirm",decorators:[y.autobind],value:function(e){this.props.optimizeDatabase({serverEntityID:this.props.serverEntityID})}},{key:"onCleanBundlesConfirm",decorators:[y.autobind],value:function(e){this.props.cleanBundles({
serverEntityID:this.props.serverEntityID})}},{key:"onEmptyTrashConfirm",decorators:[y.autobind],value:function(e){this.props.emptyTrash({serverEntityID:this.props.serverEntityID})}},{key:"onTryAgainPress",decorators:[y.autobind],value:function(e){this.props.testServer({serverEntityID:this.props.serverEntityID})}},{key:"onAllowFallbackPress",decorators:[y.autobind],value:function(e){this.props.enableHttpFallback({serverEntityID:this.props.serverEntityID})}},{key:"render",value:function(){return m.default.createElement(k.default,a({
onReloadHttpPress:this.onReloadHttpPress,onDeleteServerConfirm:this.onDeleteServerConfirm,onAddLibraryPress:this.onAddLibraryPress,onSharePress:this.onSharePress,onUpdateLibrariesPress:this.onUpdateLibrariesPress,onCancelUpdatePress:this.onCancelUpdatePress,onOptimizeDatabaseConfirm:this.onOptimizeDatabaseConfirm,onCleanBundlesConfirm:this.onCleanBundlesConfirm,onEmptyTrashConfirm:this.onEmptyTrashConfirm,onTryAgainPress:this.onTryAgainPress,onAllowFallbackPress:this.onAllowFallbackPress},this.props));
}}]),t}(f.Component);A.propTypes={serverEntityID:f.PropTypes.string.isRequired,isConnected:f.PropTypes.bool.isRequired,redirectToHttp:f.PropTypes.func.isRequired,deleteServer:f.PropTypes.func.isRequired,fetchLibraries:f.PropTypes.func.isRequired,addLibrary:f.PropTypes.func.isRequired,shareLibraries:f.PropTypes.func.isRequired,startLibraryRefresh:f.PropTypes.func.isRequired,cancelLibraryRefresh:f.PropTypes.func.isRequired,optimizeDatabase:f.PropTypes.func.isRequired,cleanBundles:f.PropTypes.func.isRequired,
emptyTrash:f.PropTypes.func.isRequired,testServer:f.PropTypes.func.isRequired,enableHttpFallback:f.PropTypes.func.isRequired},t.default=(0,v.connect)(r,I)(A),e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=(e.serverEntityID,e.isFullServer),n=e.isFullOwnedServer,i=e.libraries,s=r(e,["serverEntityID","isFullServer","isFullOwnedServer","libraries"]),o=s.isLibrariesPending&&!i.length,u=!!s.librariesError&&!i.length,d=n&&!i.length,p=encodeURIComponent(s.machineIdentifier);return o?l.default.createElement(v.default,{
containerClassName:k.default.librariesSpinnerContainer,label:(0,h.default)("Loading libraries")}):l.default.createElement("div",{className:(0,c.default)(k.default.librariesList,f.default.hasTouchScreen&&k.default.touchLibrariesList),role:"navigation"},l.default.createElement("div",{className:k.default.librariesListHeader,role:"header"},l.default.createElement("div",{className:k.default.librariesTitle},(0,h.default)("Libraries")),n&&l.default.createElement(C.default,a({actionClassName:k.default.librariesAction
},s))),t&&l.default.createElement(w.default,{key:"playlists",className:k.default.libraryItem},l.default.createElement(P.default,{to:"#!/server/"+p+"/playlists",icon:"plex-icon-playlists-560",className:k.default.libraryLink},(0,h.default)("Playlists"))),d&&l.default.createElement(w.default,{key:"addLibrary",className:k.default.libraryItem},l.default.createElement(P.default,{icon:"plex-icon-add-560",className:k.default.libraryLink,onPress:s.onAddLibraryPress},(0,h.default)("Add Library"))),u?l.default.createElement(y.default,{
message:(0,h.default)("There was an unexpected error loading libraries.")}):i.map(function(e){return l.default.createElement(_.default,{key:e,libraryEntityID:e,machineIdentifier:s.machineIdentifier,isFullOwnedServer:n})}))}var r=n(14).default,a=n(11).default,s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),l=s(o),u=n(30),c=s(u),d=n(6),h=s(d),p=n(56),f=s(p),m=n(68),v=s(m),g=n(158),y=s(g),b=n(334),w=s(b),S=n(332),P=s(S),x=n(1442),C=s(x),T=n(1445),_=s(T),E=n(1616),k=s(E);i.propTypes={
serverEntityID:o.PropTypes.string.isRequired,machineIdentifier:o.PropTypes.string.isRequired,allowChannelAccess:o.PropTypes.bool,isFullServer:o.PropTypes.bool.isRequired,isFullOwnedServer:o.PropTypes.bool.isRequired,libraries:o.PropTypes.array.isRequired,isLibrariesPending:o.PropTypes.bool.isRequired,librariesError:o.PropTypes.object,onAddLibraryPress:o.PropTypes.func.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(6),d=o(c),h=n(333),p=o(h),f=n(157),m=o(f),v=n(1430),g=o(v),y=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.showChannels,i=e.isUserRestricted,r=e.unwatchedWatchLaterCount,a=e.unwatchedRecommendedCount,s=!i,o=encodeURIComponent(t);return n||s?u.default.createElement(p.default,{
title:(0,d.default)("Online Content")},n&&u.default.createElement(m.default,{key:"channels",to:"#!/server/"+o+"/channels",icon:"plex-icon-channels-560"},(0,d.default)("Channels")),s&&u.default.createElement(m.default,{key:"watchLater",to:"#!/playlist/queue",icon:"plex-icon-watch-later-560"},(0,d.default)("Watch Later"),u.default.createElement(g.default,{count:r})),s&&u.default.createElement(m.default,{key:"recommended",to:"#!/playlist/recommendations",icon:"plex-icon-recommended-560"},(0,d.default)("Recommended"),u.default.createElement(g.default,{
count:a}))):null}}]),t}(l.Component);y.propTypes={machineIdentifier:l.PropTypes.string.isRequired,showChannels:l.PropTypes.bool.isRequired,isUserRestricted:l.PropTypes.bool.isRequired,unwatchedWatchLaterCount:l.PropTypes.number.isRequired,unwatchedRecommendedCount:l.PropTypes.number.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(46).default,s=n(15).default,o=n(2).default,l=n(19).default;Object.defineProperty(t,"__esModule",{value:!0
});var u=n(7),c=o(u),d=n(34),h=n(28),p=n(70),f=n(214),m=o(f),v=n(309),g=l(v),y=n(1449),b=o(y),w=(0,h.createSelector)(m.default,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,isUserRestricted:!!e.restricted,unwatchedWatchLaterCount:t.unwatchedWatchLaterList.metadataItems.length,unwatchedRecommendedCount:t.unwatchedRecommendedList.metadataItems.length}}),S={populateUnwatchedWatchLaterList:g.populateUnwatchedWatchLaterList,populateUnwatchedRecommendedList:g.populateUnwatchedRecommendedList
},P=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"componentWillMount",value:function(){this.props.isSignedIn&&this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.isSignedIn,n=t!==this.props.isSignedIn;t&&n&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,p.scheduleImmediateUpdate)(function(){e.populateUnwatchedWatchLaterList(),
e.populateUnwatchedRecommendedList()})}},{key:"render",value:function(){return c.default.createElement(b.default,this.props)}}]),t}(u.Component);P.propTypes={isSignedIn:u.PropTypes.bool.isRequired,populateUnwatchedWatchLaterList:u.PropTypes.func.isRequired,populateUnwatchedRecommendedList:u.PropTypes.func.isRequired},t.default=(0,d.connect)(function(e){return w(e)},S)(P),e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(2).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(7),u=o(l),c=n(6),d=o(c),h=n(23),p=n(56),f=o(p),m=n(54),v=o(m),g=n(69),y=o(g),b=n(27),w=o(b),S=n(41),P=n(238),x=o(P),C=n(157),T=o(C),_=n(158),E=o(_),k=function(e){function t(e,n){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isRemoveModalOpen:!1}}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"onRemoveServerPress",decorators:[h.autobind],
value:function(e){this.setState({isRemoveModalOpen:!0})}},{key:"onRemoveConfirm",decorators:[h.autobind],value:function(){this.setState({isRemoveModalOpen:!1}),this.props.onDeleteServerConfirm(this.props.machineIdentifier)}},{key:"onRemoveCancel",decorators:[h.autobind],value:function(){this.setState({isRemoveModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.friendlyName,n=e.presence,i=e.promiseState,r=e.isBundled,a=e.isFullServer,s=e.isFullOwnedServer,o=e.hasHttpsConnections,l=e.hasFallbackConnections,c=e.onTryAgainPress,h=e.onReloadHttpPress,p=e.onAllowFallbackPress,m=f.default.isHostedHttps,g=a&&n,b=o&&!l,w=!m||v.default.get("allowMixedContent"),P=!w&&g,C=w&&g&&b,_=P||C,k=_?(0,
d.default)("The selected server cannot be reached securely. An insecure connection may be possible."):(0,d.default)("The selected server is unreachable. Make sure it's running, double check your network, and try again."),I=i===y.default.promiseStates.PENDING,A=I?(0,d.default)("Connecting"):(0,d.default)("Try again");return u.default.createElement(E.default,{message:k},u.default.createElement(T.default,{icon:"plex-icon-reload-560",showSpinner:I,isDisabled:I,onPress:c},A),P&&u.default.createElement(T.default,{
icon:"plex-icon-unlock-560",onPress:h},(0,d.default)("Reload app insecurely")),C&&u.default.createElement(T.default,{icon:"plex-icon-unlock-560",onPress:p},(0,d.default)("Allow insecure connection")),_&&u.default.createElement(T.default,{to:"https://support.plex.tv/hc/en-us/articles/206225077",target:"_blank",icon:"plex-icon-help-560"},(0,d.default)("Learn more")),!_&&u.default.createElement(T.default,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560"},(0,d.default)("Where is my server?")),s&&!r&&u.default.createElement(T.default,{
icon:"plex-icon-remove-560",onPress:this.onRemoveServerPress},(0,d.default)("Remove server")),u.default.createElement(x.default,{isOpen:this.state.isRemoveModalOpen,metricsPage:"confirmRemoveServer",kind:S.kinds.DANGER,title:(0,d.default)('Remove "{1}"',t),message:(0,d.default)("If this server is restarted, it will automatically be added to your account again.",t),confirmLabel:(0,d.default)("Remove"),onConfirm:this.onRemoveConfirm,onCancel:this.onRemoveCancel}))}}]),t}(l.Component);k.propTypes={machineIdentifier:l.PropTypes.string,
friendlyName:l.PropTypes.string,promiseState:l.PropTypes.string,presence:l.PropTypes.bool,isFullServer:l.PropTypes.bool,isFullOwnedServer:l.PropTypes.bool,isBundled:l.PropTypes.bool,hasHttpsConnections:l.PropTypes.bool,hasFallbackConnections:l.PropTypes.bool,onTryAgainPress:l.PropTypes.func.isRequired,onAllowFallbackPress:l.PropTypes.func.isRequired,onReloadHttpPress:l.PropTypes.func.isRequired,onDeleteServerConfirm:l.PropTypes.func.isRequired},t.default=k,e.exports=t.default},function(e,t,n){"use strict";
function i(e){var t=e.img,n=e.title,i=e.description;return s.default.createElement("div",{className:l.default.feature},s.default.createElement("img",{className:l.default.featureImage,src:t}),s.default.createElement("div",{className:l.default.featureContainer},s.default.createElement("div",{className:l.default.featureTitle},n),s.default.createElement("div",{className:l.default.featureDescription},i)))}var r=n(2).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),s=r(a),o=n(1617),l=r(o);
i.propTypes={img:a.PropTypes.string.isRequired,title:a.PropTypes.string.isRequired,description:a.PropTypes.string.isRequired},t.default=i,e.exports=t.default},function(e,t,n){"use strict";var i=n(16).default,r=n(17).default,a=n(24).default,s=n(15).default,o=n(11).default,l=n(14).default,u=n(2).default,c=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),h=u(d),p=n(30),f=u(p),m=n(10),v=n(6),g=u(v),y=n(23),b=n(22),w=c(b),S=n(278),P=c(S),x=n(41),C=n(27),T=u(C),_=n(112),E=u(_),k=n(68),I=u(k),A=n(40),M=u(A),D=n(152),R=u(D),O=n(533),L=u(O),N=n(534),U=u(N),F=n(537),j=u(F),B=n(535),z=u(B),V=n(536),H=u(V),q=n(1452),W=u(q),K=n(1645),Q=u(K),Y=n(1643),G=u(Y),$=n(1646),X=u($),J=n(1641),Z=u(J),ee=n(1642),te=u(ee),ne=n(1644),ie=u(ne),re=n(1618),ae=u(re),se="plexpass",oe=h.default.createElement(I.default,null),le=function(e){
function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,T.default)(this,e,t)}},{key:"onModalClose",decorators:[y.autobind],value:function(){var e=(0,m.resolve)("metrics");e.trackClick(o({},this.props.metricsProperties,{page:se,action:"skip"}))}},{key:"render",value:function(){var e=this.props,t=e.metricsProperties,n=e.plans,i=e.isPlansPending,r=e.isPlansPopulated,a=e.plansError,s=e.onModalClose,u=l(e,["metricsProperties","plans","isPlansPending","isPlansPopulated","plansError","onModalClose"]);
return h.default.createElement(U.default,o({metricsPage:se,metricsProperties:t,onModalClose:(0,E.default)(this.onModalClose,s)},u),h.default.createElement(j.default,{className:ae.default.header},h.default.createElement("div",{className:ae.default.plexPassTitle},(0,g.default)("Plex Pass")),(0,g.default)("Enhance your Plex experience with exclusive premium features")),h.default.createElement(z.default,{bodyClassName:ae.default.body},h.default.createElement(W.default,{img:Q.default,title:(0,g.default)("Mobile Sync"),
description:(0,g.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),h.default.createElement(W.default,{img:G.default,title:(0,g.default)("Exclusive Forum Access"),description:(0,g.default)("Let your voice be heard in special members-only forums")}),h.default.createElement(W.default,{img:X.default,title:(0,g.default)("Trailers & Extras"),description:(0,g.default)("See movie trailers, cast interviews, and other bonus features")}),h.default.createElement(W.default,{img:Z.default,
title:(0,g.default)("Camera Upload"),description:(0,g.default)("Sync photos from your mobile devices to Plex Media Server")}),h.default.createElement(W.default,{img:te.default,title:(0,g.default)("Cloud Sync"),description:(0,g.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),h.default.createElement(W.default,{img:ie.default,title:(0,g.default)("Gracenote Music Magic"),description:(0,g.default)("Song identification, album reviews, artist bios, and Plex Mix playlists")
}),h.default.createElement("div",{className:ae.default.moreFeatures},h.default.createElement(M.default,{className:ae.default.link,to:P.PLEX_PASS_INFO_URL,target:"_self"},(0,g.default)("...plus more exclusive features!")))),h.default.createElement(H.default,{className:ae.default.footer},i&&h.default.createElement("div",{className:ae.default.spinnerContainer},oe),h.default.createElement("div",{className:(0,f.default)(ae.default.plansContainer,i&&ae.default.isPlansPending)},!i&&r&&n.map(function(e){
var n=w.join(P.PLEX_PASS_SUBSCRIBE_URL,{plan:e.id,"continue":window.location.href});return h.default.createElement(L.default,o({key:e.id},t,{page:se,action:"subscribe",plan:e.id}),h.default.createElement(R.default,{className:ae.default.planButton,to:n,target:"_self",kind:x.kinds.PRIMARY,size:x.sizes.LARGE},e.formattedPrice," \u2014 ",e.name))}),!i&&a&&h.default.createElement(L.default,o({},t,{page:se,action:"subscribe",plan:"unknown"}),h.default.createElement(R.default,{className:ae.default.planButton,
to:P.PLEX_PASS_SUBSCRIBE_URL,target:"_self",kind:x.kinds.PRIMARY,size:x.sizes.LARGE},(0,g.default)("Subscribe")))),h.default.createElement("div",null,(0,g.default)("Subscribe today"),h.default.createElement("span",{className:ae.default.linkSeparator},"\u2014"),h.default.createElement(L.default,o({},t,{page:se,action:"gift"}),h.default.createElement(M.default,{className:ae.default.link,to:P.PLEX_PASS_GIFT_URL,target:"_self"},(0,g.default)("or give Plex Pass as a gift!"))))))}}]),t}(d.Component);le.propTypes={
metricsProperties:d.PropTypes.object,plans:d.PropTypes.array.isRequired,isPlansPending:d.PropTypes.bool.isRequired,isPlansPopulated:d.PropTypes.bool.isRequired,plansError:d.PropTypes.object,onModalClose:d.PropTypes.func.isRequired},t.default=le,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=function(t){function n(e,t){l(this,n),a(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.state={pressedModifierKeys:[]}}return s(n,t),o(n,[{key:"componentDidMount",
value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mousedown",this.onMouseDown),document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("dragstart",this.onFocusChange),document.addEventListener("contextmenu",this.onFocusChange),window.addEventListener("blur",this.onFocusChange)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"componentWillUnmount",
value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mousedown",this.onMouseDown),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("dragstart",this.onFocusChange),document.removeEventListener("contextmenu",this.onFocusChange),window.removeEventListener("blur",this.onFocusChange)}},{key:"onKeyDown",decorators:[v.autobind],value:function(e){var t=this.state.pressedModifierKeys;
x[e.which]&&t.indexOf(e.which)===-1&&this.setState({pressedModifierKeys:t.concat(e.which)})}},{key:"onKeyUp",decorators:[v.autobind],value:function(e){var t=this.state.pressedModifierKeys,n=t.indexOf(e.which);n>-1&&this.setState({pressedModifierKeys:t.slice(0,n).concat(t.slice(n+1))})}},{key:"onMouseDown",decorators:[v.autobind],value:function(e){this._isMouseDown=!0}},{key:"onMouseUp",decorators:[v.autobind],value:function(e){this._isMouseDown=!1}},{key:"onFocusChange",decorators:[v.autobind],value:function(e){
this.state.pressedModifierKeys.length&&this.setState({pressedModifierKeys:[]}),this._isMouseDown=!1}},{key:"onMouseEnter",decorators:[v.autobind],value:function(e){var t=this.props,n=t.activeSelectionType,i=t.selectionType;this._isMouseDown&&n&&n===i&&this.onSelectPress(e)}},{key:"onSelectPress",decorators:[v.autobind],value:function(e){var t=this.props,n=t.selectionKey,i=t.selectionType,r=t.isSelected,a=t.onSelectItem;r||a({key:this.props[n],type:i,isRangeSelect:e.shiftKey})}},{key:"onDeselectPress",
decorators:[v.autobind],value:function(e){var t=this.props,n=t.selectionKey,i=t.isSelected,r=t.onDeselectItem;i&&r({key:this.props[n]})}},{key:"render",value:function(){var t=this.props,n=t.activeSelectionType,i=t.selectionType,r=t.isSelected,a=u(t,["activeSelectionType","selectionType","isSelected"]),s=this.state.pressedModifierKeys,o=!!n;return m.default.createElement(e,c({hasActiveSelection:o,isSelected:r,isOtherItemSelected:o&&!r,isConflictingTypeSelected:o&&n!==i,isModifierKeyPressed:s.length>0,
onMouseEnter:this.onMouseEnter,onSelectPress:this.onSelectPress,onDeselectPress:this.onDeselectPress},a))}}]),n}(f.Component);return t.displayName="Selectable("+(0,P.default)(e)+")",t.WrappedComponent=e,t.propTypes={activeSelectionType:f.PropTypes.string,selectionKey:f.PropTypes.string.isRequired,selectionType:f.PropTypes.string.isRequired,isSelected:f.PropTypes.bool.isRequired,onSelectItem:f.PropTypes.func.isRequired,onDeselectItem:f.PropTypes.func.isRequired},t.defaultProps={disableSelection:!1
},t}var r=n(49).default,a=n(16).default,s=n(17).default,o=n(24).default,l=n(15).default,u=n(14).default,c=n(11).default,d=n(2).default,h=n(19).default;Object.defineProperty(t,"__esModule",{value:!0});var p,f=n(7),m=d(f),v=n(23),g=n(230),y=h(g),b=n(27),w=d(b),S=n(304),P=d(S),x=(p={},r(p,y.SHIFT,!0),r(p,y.CONTROL,!0),r(p,y.META_1,!0),r(p,y.META_2,!0),r(p,y.META_3,!0),p);t.default=i,e.exports=t.default},function(e,t,n){"use strict";function i(e){var t=e.tabIndex;return null===t&&(t=void 0),!isNaN(t)&&t>=0&&r(e);
}function r(e){if(!e.offsetParent)return!1;var t=e.nodeName.toLowerCase();return/input|select|textarea|button|object/.test(t)?!e.disabled:"a"!==t||e.href}function a(e){if(!e)return[];var t=[].slice.call(e.getElementsByTagName("*"),0).filter(function(e){return i(e)});return l.default.sortBy(t,function(e){return 0===e.tabIndex?1/0:e.tabIndex})}var s=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var o=n(3),l=s(o);e.exports=t.default},function(e,t,n){"use strict";function i(e){
if(!e)return(0,h.default)("Username is required")}function r(e){if(!e)return(0,h.default)("Email address is required")}function a(e){if(!e)return(0,h.default)("Password is required")}function s(e){if(!e)return(0,h.default)("Password confirmation is required")}function o(e){if(!e)return(0,h.default)("Current password is required")}function l(e){if(e&&e.length<8)return(0,h.default)("Password must be at least 8 characters")}function u(e,t){if(e!==t.password.value)return(0,h.default)("Passwords must match");
}var c=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.isUsernameRequired=i,t.isEmailRequired=r,t.isPasswordRequired=a,t.isConfirmRequired=s,t.isCurrentPasswordRequired=o,t.password=l,t.confirmPassword=u;var d=n(6),h=c(d)},function(e,t,n){"use strict";function i(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];t===d.default.CONTINUE_WATCHING&&n<0&&n++;var i=e+t+n;if(b.hasOwnProperty(i))return b[i];var a=(0,f.getAspectRatio)(e,t),l=parseInt(u.default.posterTitleHeight,10),c=parseInt(u.default.posterTitlePadding,10),h=void 0,m=void 0,g=void 0,w=void 0;
t===d.default.CONTINUE_WATCHING?(h=2,m=300,g=1,w=4,c*=2):(h="mixed"===e?3:(0,p.default)(e,t).length,m=a>1?180:120,g=2,w=11);var S=h*l+c,P=(0,o.default)({direction:s.HORIZONTAL,rows:1,overscan:4,innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:10,outerPaddingRight:5,outerPaddingBottom:5,outerPaddingLeft:5,getCellWidth:function(e){return(0,v.default)(r({},e,{minCellWidth:m,minColumns:g,maxColumns:w,columnAdjustment:n,aspectRatio:a}))},getCellHeight:function(e){return(0,y.default)(r({},e,{
aspectRatio:a,titleHeight:S}))}});return P.cellOptions={minCellWidth:m,minColumns:g,maxColumns:w,columnAdjustment:n,aspectRatio:a,titleHeight:S},b[i]=P,P}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(473),o=a(s),l=n(339),u=a(l),c=n(98),d=a(c),h=n(197),p=a(h),f=n(243),m=n(562),v=a(m),g=n(561),y=a(g),b={};e.exports=t.default},function(e,t,n){"use strict";function i(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],i=e+t+n;if(g.hasOwnProperty(i))return g[i];
var a=(0,h.getAspectRatio)(e,t),l=parseInt(u.default.posterTitleHeight,10),c=parseInt(u.default.posterTitlePadding,10),p="mixed"===e?3:(0,d.default)(e).length,m=p*l+c,y=a>1?180:120,b=2,w=11,S=(0,o.default)({direction:s.VERTICAL,overscan:2,innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:30,outerPaddingRight:60,outerPaddingBottom:30,outerPaddingLeft:60,getCellWidth:function(e){return(0,f.default)(r({},e,{minCellWidth:y,minColumns:b,maxColumns:w,columnAdjustment:n,aspectRatio:a}))},
getCellHeight:function(e){return(0,v.default)(r({},e,{aspectRatio:a,titleHeight:m}))}});return S.cellOptions={minCellWidth:y,minColumns:b,maxColumns:w,columnAdjustment:n,aspectRatio:a,titleHeight:m},g[i]=S,S}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(473),o=a(s),l=n(339),u=a(l),c=n(197),d=a(c),h=n(243),p=n(562),f=a(p),m=n(561),v=a(m),g={};e.exports=t.default},function(e,t,n){"use strict";function i(e){function t(e){S=e.viewportHeight;var t=e.viewportWidth-2*m;
P=t/l;var n=d.reduce(function(e,t){return e+t.height},0);return{height:n*P,width:t}}function n(e){(0,u.default)(void 0!==S,"`getListStyle` must be called before `getPositionForIndex`");var t=o.default.find(y,function(t){var n=t.last;return e<=n}),n=o.default.find(t.cellLayouts,function(t){var n=t.cellIndex;return n===e});return{cellX:Math.round(n.left*P)+g,cellY:Math.round(t.top*P)+g,cellWidth:Math.round(n.width*P)-2*g,cellHeight:Math.round(t.height*P)-2*g}}function i(e){if(e<0)return y[0];var t=o.default.find(y,function(t){
var n=t.bottom;return e<(n+1)*P});return t||o.default.last(y)}function a(e,t,n,r){void 0===e&&(e=0),(0,u.default)(void 0!==S,"`getListStyle` must be called before `getRangesForPosition`");var a=e+S-1,s=e-S,o=a+S,l=i(s).first,c=i(o).last,d=i(e).first,h=i(a).last,p=d,f=h;return{renderStartIndex:l,renderEndIndex:c,visibleStartIndex:d,visibleEndIndex:h,partiallyVisibleStartIndex:p,partiallyVisibleEndIndex:f}}var s=e.columns,l=void 0===s?1:s,c=e.rows,d=void 0===c?[]:c,h=e.offset,p=void 0===h?0:h,f=e.margin,m=void 0===f?0:f,v=e.cellMargin,g=void 0===v?0:v,y=[],b=0,w=p;
d.forEach(function(e){var t=b;b+=e.height;var n=b-1,i=w;w+=e.widths.length;var a=w-1,s=[],o=0;e.widths.forEach(function(e,t){var n=o;o+=e,s.push({width:e,left:n,cellIndex:i+t})}),y.push(r({},e,{top:t,bottom:n,first:i,last:a,cellLayouts:s}))});var S=void 0,P=void 0;return{getListStyle:t,getPositionForIndex:n,getRangesForPosition:a}}var r=n(11).default,a=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var s=n(3),o=a(s),l=n(38),u=a(l);e.exports=t.default},function(e,t){"use strict";
function n(e){return Math.abs(e.actual-e.desired)/e.actual}function i(e){if(0===e.cells.length)return 1/0;var t=e.cells.reduce(function(e,t){return e+n(t)},0),i=t/e.cells.length,r=Math.abs(e.scale-1);return i+r}function r(e,t){var n=e.cells,i=n.reduce(function(e,t){return e+t.desired},0),r=t/i;return{scale:r,cells:n.map(function(e){var t=e.desired;return{desired:t,actual:t*r}})}}function a(e){var t=e.aspectRatios,n=e.columns,a=void 0===n?4:n,s=e.minAspectRatio,o=void 0===s?.4:s,l=e.maxAspectRatio,u=void 0===l?5:l,c=t.map(function(e){
return Math.max(o,Math.min(u,e))}),d=[],h={scale:null,cells:[]};c.forEach(function(e){var t={desired:e},n={scale:0,cells:h.cells.slice(0)};n.cells.push(t),n=r(n,a),i(n)<=i(h)?h=n:(d.push(h),h=r({scale:0,cells:[t]},a))});var p=1/Math.max(1,h.scale);return h.scale=Math.min(1,h.scale),h.cells=h.cells.map(function(e){var t=e.desired,n=e.actual;return{desired:t,actual:n*p}}),d.push(h),d.map(function(e){var t=e.scale,n=e.cells;return{height:t,widths:n.map(function(e){return e.actual})}})}Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a,e.exports=t.default},function(e,t,n){"use strict";function i(e){return!0}function r(e){return!0}function a(e){var t=e.server.isFullServer;return!(!t||!e.isFirstItemLibraryItem)}function s(e){var t=e.server.isFullServer&&e.server.allowSync;return!!(t&&e.isFirstItemLibraryItem&&e.allowSync)}function o(e){var t=e.server.isFullOwnedServer&&e.server.transcoderVideo;return!(!t||!e.isFirstItemLibraryItem)}function l(e){var t=e.firstItemType||"mixed",n=m[t];(0,p.default)(d.default.isArray(n),"getMetadataListActionProps: Invalid type, "+t+", provided");
var i=n.reduce(function(n,i){var r=f[i];return(0,p.default)(d.default.isFunction(r),"getMetadataListActionProps: Invalid action, "+i+", for "+t),d.default.has(e,i)?n[i]=e[i]:n[i]=r(e),n},{});return i}var u=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=n(3),d=u(c),h=n(38),p=u(h),f={showPlayAll:i,showShuffle:r,showAddToPlaylist:a,showSync:s,showOptimize:o},m={mixed:[],movie:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],show:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],
season:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],episode:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"],artist:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],album:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],track:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],photoAlbum:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],photo:["showPlayAll","showShuffle","showAddToPlaylist","showSync"],
clip:["showPlayAll","showShuffle","showAddToPlaylist","showSync","showOptimize"]};e.exports=t.default},function(e,t,n){"use strict";function i(e,t){return x.default.every(t,function(t){return t[e]})}function r(e,t){return x.default.some(t,function(t){return t[e]})}function a(e){var t=e.activeSelectionItems;return t.map(function(e){return e.model.type})}function s(e,t){return i("showPlay",t)}function o(e,t){return i("showPlay",t)}function l(e,t){return i("showAddToPlaylist",t)}function u(e,t){return r("showMarkWatched",t);
}function c(e,t){return r("showMarkUnwatched",t)}function d(e,t){var n=a(e);return!(x.default.uniq(n).length>1)&&i("showEdit",t)}function h(e,t){return i("showRefresh",t)}function p(e,t){return i("showAnalyze",t)}function f(e,t){var n=a(e);return 1!==n.length&&(!(x.default.uniq(n).length>1)&&x.default.every(n,function(e){return A.indexOf(e)!==-1}))}function m(e,t){return i("showSync",t)}function v(e,t){return i("showOptimize",t)}function g(e,t){return i("showDelete",t)}function y(e){var t=e.activeSelectionItems;
return t.map(function(t){return(0,E.default)(w({},e,t.model))})}function b(e){var t=e.activeSelectionType,n=I[t],i=y(e);(0,T.default)(x.default.isArray(n),"getMultiSelectActionProps: Invalid type, "+t+", provided");var r=n.reduce(function(n,r){var a=k[r];return(0,T.default)(x.default.isFunction(a),"getMultiSelectActionProps: Invalid action, "+r+", for "+t),x.default.has(e,r)?n[r]=e[r]:n[r]=a(e,i),n},{});return r}var w=n(11).default,S=n(2).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;
var P=n(3),x=S(P),C=n(38),T=S(C),_=n(338),E=S(_),k={showPlaySelected:s,showShuffle:o,showAddToPlaylist:l,showMarkWatched:u,showMarkUnwatched:c,showEdit:d,showRefresh:h,showAnalyze:p,showMerge:f,showSync:m,showOptimize:v,showDelete:g},I={video:["showPlaySelected","showShuffle","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showMerge","showSync","showOptimize","showDelete"],audio:["showPlaySelected","showShuffle","showAddToPlaylist","showEdit","showRefresh","showAnalyze","showMerge","showSync","showOptimize","showDelete"],
photo:["showPlaySelected","showShuffle","showAddToPlaylist","showEdit","showAnalyze","showSync","showOptimize","showDelete"]},A=["movie","season","artist","album"];e.exports=t.default},function(e,t){"use strict";function n(e,t){if(!e)return!1;if(e===r&&i.hasOwnProperty(t))return i[t];e!==r&&(r=e,i={});var n=e.indexOf(t)!==-1;return i[t]=n,n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var i={},r=void 0;e.exports=t.default},function(e,t,n){e.exports={"default":n(1475),__esModule:!0
}},function(e,t,n){e.exports={"default":n(1476),__esModule:!0}},function(e,t,n){e.exports={"default":n(1477),__esModule:!0}},,,function(e,t,n){e.exports={"default":n(1480),__esModule:!0}},function(e,t,n){e.exports={"default":n(1484),__esModule:!0}},function(e,t,n){e.exports={"default":n(1486),__esModule:!0}},function(e,t,n){"use strict";var i=n(198).default;t.default=function(e){for(var t={},n=0;n<e.length;n++){var r=e[n],a=r.decorators,s=r.key;if(delete r.key,delete r.decorators,r.enumerable=!0,
r.configurable=!0,("value"in r||r.initializer)&&(r.writable=!0),a)for(var o=0;o<a.length;o++){var l=a[o];if("function"!=typeof l)throw new TypeError("The decorator for method "+r.key+" is of the invalid type "+typeof l);r=l(t,s,r)||r}r.initializer&&(r.value=r.initializer.call(t)),i(t,s,r)}return t},t.__esModule=!0},function(e,t,n){"use strict";var i=n(566).default;t.default=function(e){return Array.isArray(e)?e:i(e)},t.__esModule=!0},function(e,t,n){n(351),n(1507),e.exports=n(90).Array.from},function(e,t,n){
n(580),n(351),e.exports=n(1505)},function(e,t,n){n(580),n(351),e.exports=n(1506)},function(e,t,n){n(1509),e.exports=n(90).Number.isInteger},,,function(e,t,n){n(1512),e.exports=n(90).Object.assign},function(e,t,n){var i=n(85);e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){var i=n(85);e.exports=function(e,t,n){return i.setDesc(e,t,n)}},function(e,t,n){var i=n(85);n(1513),e.exports=function(e,t){return i.getDesc(e,t)}},function(e,t,n){var i=n(85);n(1514),e.exports=function(e){return i.getNames(e);
}},,function(e,t,n){n(1516),e.exports=n(90).Object.setPrototypeOf},,function(e,t){e.exports=function(){}},function(e,t,n){e.exports=!n(344)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(349),r=n(85).getNames,a={}.toString,s="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return r(e)}catch(t){return s.slice()}};e.exports.get=function(e){return s&&"[object Window]"==a.call(e)?o(e):r(i(e));
}},function(e,t,n){var i=n(161),r=n(120)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[r]===e)}},function(e,t,n){var i=n(347),r=Math.floor;e.exports=function(e){return!i(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){var i=n(341);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(a){var s=e.return;throw void 0!==s&&i(s.call(e)),a}}},function(e,t,n){"use strict";var i=n(85),r=n(576),a=n(577),s={};n(346)(s,n(120)("iterator"),function(){return this;
}),e.exports=function(e,t,n){e.prototype=i.create(s,{next:r(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var i=n(120)("iterator"),r=!1;try{var a=[7][i]();a.return=function(){r=!0},Array.from(a,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var a=[7],s=a[i]();s.next=function(){n=!0},a[i]=function(){return s},e(a)}catch(o){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t){e.exports=!0},function(e,t,n){var i=n(85),r=n(350),a=n(574);
e.exports=n(344)(function(){var e=Object.assign,t={},n={},i=Symbol(),r="abcdefghijklmnopqrst";return t[i]=7,r.split("").forEach(function(e){n[e]=e}),7!=e({},t)[i]||Object.keys(e({},n)).join("")!=r})?function(e,t){for(var n=r(e),s=arguments,o=s.length,l=1,u=i.getKeys,c=i.getSymbols,d=i.isEnum;o>l;)for(var h,p=a(s[l++]),f=c?u(p).concat(c(p)):u(p),m=f.length,v=0;m>v;)d.call(p,h=f[v++])&&(n[h]=p[h]);return n}:Object.assign},function(e,t,n){e.exports=n(346)},function(e,t,n){var i=n(85).getDesc,r=n(347),a=n(341),s=function(e,t){
if(a(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(342)(Function.call,i(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(a){t=!0}return function(e,n){return s(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:s}},function(e,t,n){var i=n(345),r="__core-js_shared__",a=i[r]||(i[r]={});e.exports=function(e){return a[e]||(a[e]={})}},function(e,t,n){var i=n(578),r=n(343);e.exports=function(e){
return function(t,n){var a,s,o=String(r(t)),l=i(n),u=o.length;return l<0||l>=u?e?"":void 0:(a=o.charCodeAt(l),a<55296||a>56319||l+1===u||(s=o.charCodeAt(l+1))<56320||s>57343?e?o.charAt(l):a:e?o.slice(l,l+2):(a-55296<<10)+(s-56320)+65536)}}},function(e,t,n){var i=n(578),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,n){var i=n(341),r=n(579);
e.exports=n(90).getIterator=function(e){var t=r(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return i(t.call(e))}},function(e,t,n){var i=n(571),r=n(120)("iterator"),a=n(161);e.exports=n(90).isIterable=function(e){var t=Object(e);return void 0!==t[r]||"@@iterator"in t||a.hasOwnProperty(i(t))}},function(e,t,n){"use strict";var i=n(342),r=n(119),a=n(350),s=n(1493),o=n(1491),l=n(1503),u=n(579);r(r.S+r.F*!n(1495)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,c,d=a(e),h="function"==typeof this?this:Array,p=arguments,f=p.length,m=f>1?p[1]:void 0,v=void 0!==m,g=0,y=u(d);
if(v&&(m=i(m,f>2?p[2]:void 0,2)),void 0==y||h==Array&&o(y))for(t=l(d.length),n=new h(t);t>g;g++)n[g]=v?m(d[g],g):d[g];else for(c=y.call(d),n=new h;!(r=c.next()).done;g++)n[g]=v?s(c,m,[r.value,g],!0):r.value;return n.length=g,n}})},function(e,t,n){"use strict";var i=n(1488),r=n(1496),a=n(161),s=n(349);e.exports=n(575)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):"keys"==t?r(0,n):"values"==t?r(0,e[n]):r(0,[n,e[n]]);
},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var i=n(119);i(i.S,"Number",{isInteger:n(1492)})},,,function(e,t,n){var i=n(119);i(i.S+i.F,"Object",{assign:n(1498)})},function(e,t,n){var i=n(349);n(348)("getOwnPropertyDescriptor",function(e){return function(t,n){return e(i(t),n)}})},function(e,t,n){n(348)("getOwnPropertyNames",function(){return n(1490).get})},,function(e,t,n){var i=n(119);i(i.S,"Object",{setPrototypeOf:n(1500).set})},function(e,t,n){"use strict";
var i=n(352),r=n(591).default,a=n(353).default,s=n(354),o=n(1923),l=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=r,e.Exception=a,e.Utils=s,e.VM=o,e.template=function(t){return o.template(t,e)},e},u=l();u.create=l,t.default=u,e.exports=u},function(e,t,n){(function(t){!function(){function e(e,t){return e.name=t}function t(e,t){return e.href=t}function n(e){ye.set(e)}function i(e){return"function"==typeof e}function r(e){return void 0!=e&&-1<(e.constructor+"")[q]("String");
}function a(){return N.round(2147483647*N.random())}function s(e){var t=xe[Y]("img");return t.width=1,t.height=1,t.src=e,t}function o(){}function l(e){return R instanceof Function?R(e):(n(28),e)}function u(e){return l(e)[z](/\(/g,"%28")[z](/\)/g,"%29")}function c(e,t){if(e){var n=xe[Y]("script");n.type="text/javascript",n.async=!0,n.src=e,n.id=t;var i=xe.getElementsByTagName("script")[0];i[me].insertBefore(n,i)}}function d(){var e=""+xe[ie][re];return 0==e[q]("www.")?e[de](4):e}function h(e){var t=xe.referrer;
if(/^https?:\/\//i.test(t)){if(e)return t;e="//"+xe[ie][re];var n=t[q](e);if((5==n||6==n)&&(e=t.charAt(n+e[Z]),"/"==e||"?"==e||""==e||":"==e))return;return t}}function p(e,t){if(1==t[Z]&&null!=t[0]&&"object"==typeof t[0])return t[0];for(var n={},i=N.min(e[Z]+1,t[Z]),r=0;r<i;r++){if("object"==typeof t[r]){for(var a in t[r])t[r].hasOwnProperty(a)&&(n[a]=t[r][a]);break}r<e[Z]&&(n[e[r]]=t[r])}return n}function f(e){if(100!=e.get(mn)&&D(ze(e,rn))%1e4>=100*Ve(e,mn))throw"abort"}function m(e){if(Ce(ze(e,an)))throw"abort";
}function v(){var e=xe[ie][le];if("http:"!=e&&"https:"!=e)throw"abort"}function g(e){e.set(ot,Ve(e,ot)+1);var t=[];je.map(function(n,i){if(i.p){var r=e.get(n);void 0!=r&&r!=i[K]&&("boolean"==typeof r&&(r*=1),t[F](i.p+"="+l(""+r)))}}),t[F]("z="+a()),e.set(st,t[ve]("&"),!0)}function y(e){Re(ze(e,st),e.get(at)),e.set(at,o,!0)}function b(e){var t=Pe.gaData;t&&(t.expId&&e.set(Ut,t.expId),t.expVar&&e.set(Ft,t.expVar))}function w(){if(Pe[fe]&&"preview"==Pe[fe].loadPurpose)throw"abort"}function S(e){var t=Ve(e,Vt);
500<=t&&n(15);var i=ze(e,rt);if("transaction"!=i&&"item"!=i){var i=Ve(e,qt),r=(new Date)[X](),a=Ve(e,Ht);if(0==a&&e.set(Ht,r),a=N.round(2*(r-a)/1e3),0<a&&(i=N.min(i+a,20),e.set(Ht,r)),0>=i)throw"abort";e.set(qt,--i)}e.set(Vt,++t)}function P(){var e=Xn;x("create",e,e.create,3),x("getByName",e,e.j,5),x("getAll",e,e.K,6),e=Vn[ee],x("get",e,e.get,7),x("set",e,e.set,4),x("send",e,e.send,2),e=Fe[ee],x("get",e,e.get),x("set",e,e.set),(Pe.gaplugins=Pe.gaplugins||{}).Linker=On,e=On[ee],Gn.C("linker",On),x("decorate",e,e.Q,20),
x("autoLink",e,e.S,25),Gn.C("displayfeatures",Bn)}function x(e,t,i,r){t[e]=function(){try{return r&&n(r),i[pe](this,arguments)}catch(t){var s=t&&t[$];if(!(1<=100*N.random()||Ce("?"))){var o=["t=error","_e=exc","_v=j15","sr=1"];e&&o[F]("_f="+e),s&&o[F]("_m="+l(s[de](0,100))),o[F]("aip=1"),o[F]("z="+a()),Re(o[ve]("&"))}throw t}}}function C(){var e,t,n;if((n=(n=Pe[fe])?n.plugins:null)&&n[Z])for(var i=0;i<n[Z]&&!t;i++){var r=n[i];-1<r[$][q]("Shockwave Flash")&&(t=r.description)}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),
t=e.GetVariable("$version")}catch(a){}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),t="WIN 6,0,21,0",e.AllowScriptAccess="always",t=e.GetVariable("$version")}catch(s){}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),t=e.GetVariable("$version")}catch(o){}return t&&(e=t[W](/[\d]+/g))&&3<=e[Z]&&(t=e[0]+"."+e[1]+" r"+e[2]),t||void 0}function T(e,t,n){"none"==t&&(t="");var i=[],r=_e(e);e="__utma"==e?6:2;for(var a=0;a<r[Z];a++){var s=(""+r[a])[ne](".");s[Z]>=e&&i[F]({hash:s[0],
R:r[a],O:s})}return 0==i[Z]?void 0:1==i[Z]?i[0]:_(t,i)||_(n,i)||_(null,i)||i[0]}function _(e,t){var n,i;null==e?n=i=1:(n=D(e),i=D(0==e[q](".")?e[de](1):"."+e));for(var r=0;r<t[Z];r++)if(t[r][j]==n||t[r][j]==i)return t[r]}function E(e){e=e.get(rn);var t=k(e,0);return"_ga=1."+l(t+"."+e)}function k(e,t){for(var n=new Date,i=Pe.screen||{},r=Pe[fe],a=r.plugins||[],n=[e,r.userAgent,i.width,i.height,n.getTimezoneOffset(),n.getYear(),n.getDate(),n.getHours(),n.getMinutes()+t],i=0;i<a[Z];++i)n[F](a[i].description);
return D(n[ve]("."))}function I(e,t){if(t==xe[ie][re])return!1;for(var n=0;n<e[Z];n++)if(0<=t[q](e[n]))return!0;return!1}function A(){var e=Pe.gaGlobal=Pe.gaGlobal||{};return e.hid=e.hid||a()}function M(e){function n(e){var t=(e[re]||"")[ne](":")[0][ge](),n=(e[le]||"")[ge](),n=1*e[Q]||("http:"==n?80:"https:"==n?443:"");return e=e.pathname||"",0==e[q]("/")||(e="/"+e),[t,""+n,e]}var i=xe[Y]("a");t(i,xe[ie][ce]);var r=(i[le]||"")[ge](),a=n(i),s=i[ae]||"",o=r+"//"+a[0]+(a[1]?":"+a[1]:"");return 0==e[q]("//")?e=r+e:0==e[q]("/")?e=o+e:e&&0!=e[q]("?")?0>e[ne]("/")[0][q](":")&&(e=o+a[2][de](0,a[2].lastIndexOf("/"))+"/"+e):e=o+a[2]+(e||s),
t(i,e),r=n(i),{protocol:(i[le]||"")[ge](),host:r[0],port:r[1],path:r[2],G:i[ae]||"",url:e||""}}function D(e){var t,n=1,i=0;if(e)for(n=0,t=e[Z]-1;0<=t;t--)i=e.charCodeAt(t),n=(n<<6&268435455)+i+(i<<14),i=266338304&n,n=0!=i?n^i>>21:n;return n}var R=encodeURIComponent,O=window,L=setTimeout,N=Math,U=RegExp,F="push",j="hash",B="slice",z="replace",V="data",H="cookie",q="indexOf",W="match",K="defaultValue",Q="port",Y="createElement",G="setAttribute",$="name",X="getTime",J="host",Z="length",ee="prototype",te="clientWidth",ne="split",ie="location",re="hostname",ae="search",se="target",oe="call",le="protocol",ue="clientHeight",ce="href",de="substring",he="action",pe="apply",fe="navigator",me="parentNode",ve="join",ge="toLowerCase",ye=new function(){
var e=[];this.set=function(t){e[t]=!0},this.M=function(){for(var t=[],n=0;n<e[Z];n++)e[n]&&(t[N.floor(n/6)]=t[N.floor(n/6)]^1<<n%6);for(n=0;n<t[Z];n++)t[n]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(t[n]||0);return t[ve]("")+"~"}},be=function(e,t,i,r){try{e.addEventListener?e.addEventListener(t,i,!!r):e.attachEvent&&e.attachEvent("on"+t,i)}catch(a){n(27)}},we=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},Se=function(){
this.keys=[],this.w={},this.m={}};Se[ee].set=function(e,t,n){this.keys[F](e),n?this.m[":"+e]=t:this.w[":"+e]=t},Se[ee].get=function(e){return this.m.hasOwnProperty(":"+e)?this.m[":"+e]:this.w[":"+e]},Se[ee].map=function(e){for(var t=0;t<this.keys[Z];t++){var n=this.keys[t],i=this.get(n);i&&e(n,i)}};var Pe=O,xe=document,Ce=function(e){var t=Pe._gaUserPrefs;if(t&&t.ioo&&t.ioo()||e&&!0===Pe["ga-disable-"+e])return!0;try{var n=Pe.external;if(n&&n._gaUserPrefs&&"oo"==n._gaUserPrefs)return!0}catch(i){}
return!1},Te=function(e){L(e,100)},_e=function(e){var t=[],n=xe[H][ne](";");e=U("^\\s*"+e+"=\\s*(.*?)\\s*$");for(var i=0;i<n[Z];i++){var r=n[i][W](e);r&&t[F](r[1])}return t},Ee=function(e,t,i,r,a,s){if(a=!Ce(a)&&!(Ie.test(xe[ie][re])||"/"==i&&ke.test(r)),!a)return!1;if(t&&200<t[Z]&&(t=t[de](0,200),n(24)),i=e+"="+t+"; path="+i+"; ",s&&(i+="expires="+new Date((new Date)[X]()+s).toGMTString()+"; "),r&&"none"!=r&&(i+="domain="+r+";"),r=xe[H],xe.cookie=i,!(r=r!=xe[H]))e:{for(e=_e(e),r=0;r<e[Z];r++)if(t==e[r]){
r=!0;break e}r=!1}return r},ke=U(/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/),Ie=U(/(^|\.)doubleclick\.net$/i),Ae=function(){return(et||"https:"==xe[ie][le]?"https:":"http:")+"//www.google-analytics.com"},Me=function(t){e(this,"len"),this.message=t+"-8192"},De=function(t){e(this,"ff2post"),this.message=t+"-2036"},Re=function(e,t){if(t=t||o,2036>=e[Z])Oe(e,t);else{if(!(8192>=e[Z]))throw new Me(e[Z]);var n=t;if(0<=Pe[fe].userAgent[q]("Firefox")&&![].reduce)throw new De(e[Z]);Le(e,n)||Ne(e,n)}},Oe=function(e,t){
var n=s(Ae()+"/collect?"+e);n.onload=n.onerror=function(){n.onload=null,n.onerror=null,t()}},Le=function(e,t){var n,i=Pe.XDomainRequest;if(i?(n=new i,n.open("POST",Ae()+"/collect")):(i=Pe.XMLHttpRequest)&&(i=new i,"withCredentials"in i&&(n=i,n.open("POST",Ae()+"/collect",!0),n.setRequestHeader("Content-Type","text/plain"))),n)return n.onreadystatechange=function(){4==n.readyState&&(t(),n=null)},n.send(e),!0},Ne=function(t,n){if(xe.body){t=R(t);try{var i=xe[Y]('<iframe name="'+t+'"></iframe>')}catch(r){
i=xe[Y]("iframe"),e(i,t)}i.height="0",i.width="0",i.style.display="none",i.style.visibility="hidden";var a=xe[ie],a=Ae()+"/analytics_iframe.html#"+R(a[le]+"//"+a[J]+"/favicon.ico"),s=function(){i.src="",i[me]&&i[me].removeChild(i)};be(Pe,"beforeunload",s);var o=!1,l=0,u=function(){if(!o){try{if(9<l||i.contentWindow[ie][J]==xe[ie][J])return o=!0,s(),we(Pe,"beforeunload",s),void n()}catch(e){}l++,L(u,200)}};be(i,"load",u),xe.body.appendChild(i),i.src=a}else Te(function(){Ne(t,n)})},Ue=function(){this.t=[];
};Ue[ee].add=function(e){this.t[F](e)},Ue[ee].execute=function(e){try{for(var t=0;t<this.t[Z];t++){var n=e.get(this.t[t]);n&&i(n)&&n[oe](Pe,e)}}catch(r){}t=e.get(at),t!=o&&i(t)&&(e.set(at,o,!0),L(t,10))};var Fe=function(){this.data=new Se},je=new Se,Be=[];Fe[ee].get=function(e){var t=Ke(e),n=this[V].get(e);return t&&void 0==n&&(n=i(t[K])?t[K]():t[K]),t&&t.n?t.n(this,e,n):n};var ze=function(e,t){var n=e.get(t);return void 0==n?"":""+n},Ve=function(e,t){var n=e.get(t);return void 0==n||""===n?0:1*n;
};Fe[ee].set=function(e,t,n){if(e)if("object"==typeof e)for(var i in e)e.hasOwnProperty(i)&&qe(this,i,e[i],n);else qe(this,e,t,n)};var He,qe=function(e,t,n,i){var r=Ke(t);r&&r.o?r.o(e,t,n,i):e[V].set(t,n,i)},We=function(t,n,i,r,a){e(this,t),this.p=n,this.n=r,this.o=a,this.defaultValue=i},Ke=function(e){var t=je.get(e);if(!t)for(var n=0;n<Be[Z];n++){var i=Be[n],r=i[0].exec(e);if(r){t=i[1](r),je.set(t[$],t);break}}return t},Qe=function(e){var t;return je.map(function(n,i){i.p==e&&(t=i)}),t&&t[$]},Ye=function(e,t,n,i,r){
return e=new We(e,t,n,i,r),je.set(e[$],e),e[$]},Ge=function(e,t){Be[F]([U("^"+e+"$"),t])},$e=function(e,t,n){return Ye(e,t,n,void 0,Xe)},Xe=function(){};if(He=r(O.GoogleAnalyticsObject)){var Je=O.GoogleAnalyticsObject;He=Je?Je[z](/^[\s\xa0]+|[\s\xa0]+$/g,""):""}var Ze=He||"ga",et=!1,tt=$e("apiVersion","v"),nt=$e("clientVersion","_v");Ye("anonymizeIp","aip");var it=Ye("adSenseId","a"),rt=Ye("hitType","t"),at=Ye("hitCallback"),st=Ye("hitPayload");Ye("nonInteraction","ni"),Ye("currencyCode","cu"),Ye("sessionControl","sc",""),
Ye("queueTime","qt");var ot=Ye("_s","_s");Ye("description","cd");var lt=Ye("location","dl",""),ut=Ye("referrer","dr"),ct=Ye("page","dp","");Ye("hostname","dh");var dt=Ye("language","ul"),ht=Ye("encoding","de");Ye("title","dt",function(){return xe.title||void 0}),Ge("contentGroup([0-9]+)",function(e){return new We(e[0],"cg"+e[1])});var pt=Ye("screenColors","sd"),ft=Ye("screenResolution","sr"),mt=Ye("viewportSize","vp"),vt=Ye("javaEnabled","je"),gt=Ye("flashVersion","fl");Ye("campaignId","ci"),Ye("campaignName","cn"),
Ye("campaignSource","cs"),Ye("campaignMedium","cm"),Ye("campaignKeyword","ck"),Ye("campaignContent","cc");var yt=Ye("eventCategory","ec"),bt=Ye("eventAction","ea"),wt=Ye("eventLabel","el"),St=Ye("eventValue","ev"),Pt=Ye("socialNetwork","sn"),xt=Ye("socialAction","sa"),Ct=Ye("socialTarget","st"),Tt=Ye("l1","plt"),_t=Ye("l2","pdt"),Et=Ye("l3","dns"),kt=Ye("l4","rrt"),It=Ye("l5","srt"),At=Ye("l6","tcp"),Mt=Ye("l7","dit"),Dt=Ye("l8","clt"),Rt=Ye("timingCategory","utc"),Ot=Ye("timingVar","utv"),Lt=Ye("timingLabel","utl"),Nt=Ye("timingValue","utt");
Ye("appName","an"),Ye("appVersion","av",""),Ye("appId","aid",""),Ye("appInstallerId","aiid",""),Ye("exDescription","exd"),Ye("exFatal","exf");var Ut=Ye("expId","xid"),Ft=Ye("expVar","xvar"),jt=Ye("_utma","_utma"),Bt=Ye("_utmz","_utmz"),zt=Ye("_utmht","_utmht"),Vt=Ye("_hc",void 0,0),Ht=Ye("_ti",void 0,0),qt=Ye("_to",void 0,20);Ge("dimension([0-9]+)",function(e){return new We(e[0],"cd"+e[1])}),Ge("metric([0-9]+)",function(e){return new We(e[0],"cm"+e[1])}),Ye("linkerParam",void 0,void 0,E,Xe),Ye("usage","_u",void 0,function(){
return ye.M()},Xe),Ye("forceSSL",void 0,void 0,function(){return et},function(e,t,n){et=!!n});var Wt=Ye("joinId","jid");Ge("\\&(.*)",function(e){var t=new We(e[0],e[1]),n=Qe(e[0][de](1));return n&&(t.n=function(e){return e.get(n)},t.o=function(e,t,i,r){e.set(n,i,r)},t.p=void 0),t});var Kt=$e("oot"),Qt=Ye("previewTask"),Yt=Ye("checkProtocolTask"),Gt=Ye("checkStorageTask"),$t=Ye("historyImportTask"),Xt=Ye("samplerTask"),Jt=$e("rateLimiterTask"),Zt=Ye("buildHitTask"),en=Ye("sendHitTask"),tn=Ye("ceTask"),nn=$e("name"),rn=$e("clientId","cid"),an=$e("trackingId","tid"),sn=$e("cookieName",void 0,"_ga"),on=$e("cookieDomain"),ln=$e("cookiePath",void 0,"/"),un=$e("cookieExpires",void 0,63072e3),cn=$e("legacyCookieDomain"),dn=$e("legacyHistoryImport",void 0,!0),hn=$e("storage",void 0,"cookie"),pn=$e("allowLinker",void 0,!1),fn=$e("allowAnchor",void 0,!0),mn=$e("sampleRate","sf",100),vn=$e("siteSpeedSampleRate",void 0,1),gn=$e("alwaysSendReferrer",void 0,!1),yn=function(e,t){
var n=N.min(Ve(e,vn),100);if(!(D(ze(e,rn))%100>=n)&&(n={},bn(n)||wn(n))){var i=n[Tt];void 0==i||1/0==i||isNaN(i)||(0<i?(Sn(n,Et),Sn(n,At),Sn(n,It),Sn(n,_t),Sn(n,kt),Sn(n,Mt),Sn(n,Dt),t(n)):be(Pe,"load",function(){yn(e,t)},!1))}},bn=function(e){var t=Pe.performance||Pe.webkitPerformance,t=t&&t.timing;if(!t)return!1;var n=t.navigationStart;return 0!=n&&(e[Tt]=t.loadEventStart-n,e[Et]=t.domainLookupEnd-t.domainLookupStart,e[At]=t.connectEnd-t.connectStart,e[It]=t.responseStart-t.requestStart,e[_t]=t.responseEnd-t.responseStart,
e[kt]=t.fetchStart-n,e[Mt]=t.domInteractive-n,e[Dt]=t.domContentLoadedEventStart-n,!0)},wn=function(e){if(Pe.top!=Pe)return!1;var t=Pe.external,n=t&&t.onloadT;return t&&!t.isValidLoadTime&&(n=void 0),2147483648<n&&(n=void 0),0<n&&t.setPageReadyTime(),void 0!=n&&(e[Tt]=n,!0)},Sn=function(e,t){var n=e[t];(isNaN(n)||1/0==n||0>n)&&(e[t]=void 0)},Pn=!1,xn=function(e){if("cookie"==ze(e,hn)){var t=ze(e,sn),i=_n(e),r=An(ze(e,ln)),a=kn(ze(e,on)),s=1e3*Ve(e,un),o=ze(e,an);if("auto"!=a)Ee(t,i,r,a,o,s)&&(Pn=!0);else{
n(32);var l;if(i=[],a=d()[ne]("."),4!=a[Z]||(l=a[a[Z]-1],parseInt(l,10)!=l)){for(l=a[Z]-2;0<=l;l--)i[F](a[B](l)[ve]("."));i[F]("none"),l=i}else l=["none"];for(var u=0;u<l[Z];u++)if(a=l[u],e[V].set(on,a),i=_n(e),Ee(t,i,r,a,o,s))return void(Pn=!0);e[V].set(on,"auto")}}},Cn=function(e){if("cookie"==ze(e,hn)&&!Pn&&(xn(e),!Pn))throw"abort"},Tn=function(e){if(e.get(dn)){var t=ze(e,on),i=ze(e,cn)||d(),r=T("__utma",i,t);r&&(n(19),e.set(zt,(new Date)[X](),!0),e.set(jt,r.R),(t=T("__utmz",i,t))&&r[j]==t[j]&&e.set(Bt,t.R));
}},_n=function(e){var t=u(ze(e,rn)),n=In(ze(e,on));return e=Mn(ze(e,ln)),1<e&&(n+="-"+e),["GA1",n,t][ve](".")},En=function(e,t,n){for(var i,r=[],a=[],s=0;s<e[Z];s++){var o=e[s];o.r[n]==t?r[F](o):void 0==i||o.r[n]<i?(a=[o],i=o.r[n]):o.r[n]==i&&a[F](o)}return 0<r[Z]?r:a},kn=function(e){return 0==e[q](".")?e.substr(1):e},In=function(e){return kn(e)[ne](".")[Z]},An=function(e){return e?(1<e[Z]&&e.lastIndexOf("/")==e[Z]-1&&(e=e.substr(0,e[Z]-1)),0!=e[q]("/")&&(e="/"+e),e):"/"},Mn=function(e){return e=An(e),
"/"==e?1:e[ne]("/")[Z]},Dn=U(/^https?:\/\/([^\/:]+)/),Rn=/(.*)([?&#])(?:_ga=[^&]*)(?:&?)(.*)/,On=function(e){this.target=e,this.T=!1};On[ee].Q=function(e,n){if(e.tagName){if("a"==e.tagName[ge]())return void(e[ce]&&t(e,Ln(this,e[ce],n)));if("form"==e.tagName[ge]())return Nn(this,e)}if("string"==typeof e)return Ln(this,e,n)};var Ln=function(e,t,n){var i=Rn.exec(t);i&&3<=i[Z]&&(t=i[1]+(i[3]?i[2]+i[3]:"")),e=e[se].get("linkerParam");var r=t[q]("?"),i=t[q]("#");return n?t+=(-1==i?"#":"&")+e:(n=-1==r?"?":"&",
t=-1==i?t+(n+e):t[de](0,i)+n+e+t[de](i)),t},Nn=function(e,t){if(t&&t[he]){var n=e[se].get("linkerParam")[ne]("=")[1];if("get"==t.method[ge]()){for(var i=t.childNodes||[],r=0;r<i[Z];r++)if("_ga"==i[r][$])return void i[r][G]("value",n);i=xe[Y]("input"),i[G]("type","hidden"),i[G]("name","_ga"),i[G]("value",n),t.appendChild(i)}else"post"==t.method[ge]()&&(t.action=Ln(e,t[he]))}};On[ee].S=function(e,i,r){function a(r){try{r=r||Pe.event;var a;e:{var o=r[se]||r.srcElement;for(r=100;o&&0<r;){if(o[ce]&&o.nodeName[W](/^a(?:rea)?$/i)){
a=o;break e}o=o[me],r--}a={}}("http:"==a[le]||"https:"==a[le])&&I(e,a[re]||"")&&a[ce]&&t(a,Ln(s,a[ce],i))}catch(l){n(26)}}var s=this;if(this.T||(this.T=!0,be(xe,"mousedown",a,!1),be(xe,"touchstart",a,!1),be(xe,"keyup",a,!1)),r){r=function(t){if(t=t||Pe.event,(t=t[se]||t.srcElement)&&t[he]){var n=t[he][W](Dn);n&&I(e,n[1])&&Nn(s,t)}};for(var o=0;o<xe.forms[Z];o++)be(xe.forms[o],"submit",r)}};var Un,Fn=function(e){return e.get(nn)&&"t0"!=e.get(nn)?"_dc_"+u(e.get(nn)):"_dc"},jn=function(e){if(e.get(Wt)){
var t=new Se,n=function(n){t.set(Ke(n).p,e.get(n))};n(tt),n(nt),n(an),n(rn),n(Wt);var i=Ve(e,"forceSSL")||"https:"==xe[ie][le]?"https:":"http:",i=i+"//stats.g.doubleclick.net/collect?t=dc&aip=1&";t.map(function(e,t){i+=l(e)+"="+l(""+t)+"&"}),i+="z="+a(),s(i),e.set(Wt,"",!0)}},Bn=function(e){n(29),e=e.b;var t=e.get(Zt);e.set(Zt,function(e){return e.get(Wt)||(-1!=xe[H][q](Fn(e)+"=1")?e.set(Wt,"",!0):(Fn(e),Ee(Fn(e),"1",e.get(ln),e.get(on),e.get(an),6e5)?e.set(Wt,""+a(),!0):n(30))),t(e)});var i=e.get(en);
e.set(en,function(e){var t=i(e);return jn(e),t})},zn=function(e,t,n){if(!Un){var i;i=xe[ie][j];var r=Pe[$],s=/^#?gaso=([^&]*)/;(r=(i=(i=i&&i[W](s)||r&&r[W](s))?i[1]:_e("GASO")[0]||"")&&i[W](/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))&&(Ee("GASO",""+i,n,t,e,0),O._udo||(O._udo=t),O._utcp||(O._utcp=n),e=r[1],c("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(e?"prefix="+e+"&":"")+a(),"_gasojs")),Un=!0}},Vn=function(e){function t(e,t){i.b[V].set(e,t)}function n(e,n){t(e,n),i.filters.add(e);
}var i=this;this.b=new Fe,this.filters=new Ue,t(nn,e[nn]),t(an,e[an]),t(sn,e[sn]),t(on,e[on]||d()),t(ln,e[ln]),t(un,e[un]),t(cn,e[cn]),t(dn,e[dn]),t(pn,e[pn]),t(fn,e[fn]),t(mn,e[mn]),t(vn,e[vn]),t(gn,e[gn]),t(hn,e[hn]),t(tt,1),t(nt,"j15"),n(Kt,m),n(Qt,w),n(Yt,v),n(Gt,Cn),n($t,Tn),n(Xt,f),n(Jt,S),n(tn,b),n(Zt,g),n(en,y),Hn(this.b,e[rn]),qn(this.b),this.b.set(it,A()),zn(this.b.get(an),this.b.get(on),this.b.get(ln))},Hn=function(e,t){if("cookie"==ze(e,hn)){Pn=!1;var i;e:{var r=_e(ze(e,sn));if(r&&!(1>r[Z])){
i=[];for(var s=0;s<r[Z];s++){var o;o=r[s][ne](".");var u=o.shift();("GA1"==u||"1"==u)&&1<o[Z]?(u=o.shift()[ne]("-"),1==u[Z]&&(u[1]="1"),u[0]*=1,u[1]*=1,o={r:u,s:o[ve](".")}):o=void 0,o&&i[F](o)}if(1==i[Z]){n(13),i=i[0].s;break e}if(0!=i[Z]){if(n(14),r=In(ze(e,on)),i=En(i,r,0),1==i[Z]){i=i[0].s;break e}r=Mn(ze(e,ln)),i=En(i,r,1),i=i[0]&&i[0].s;break e}n(12)}i=void 0}i||(i=ze(e,on),r=ze(e,cn)||d(),i=T("__utma",r,i),(i=void 0==i?void 0:i.O[1]+"."+i.O[2])&&n(10)),i&&(e[V].set(rn,i),Pn=!0)}if(i=e.get(fn),
(s=(i=xe[ie][i?"href":"search"][W]("(?:&|#|\\?)"+l("_ga")[z](/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==i[Z]?i[1]:"")&&(e.get(pn)?(i=s[q]("."),-1==i?n(22):(r=s[de](i+1),"1"!=s[de](0,i)?n(22):(i=r[q]("."),-1==i?n(22):(s=r[de](0,i),i=r[de](i+1),s!=k(i,0)&&s!=k(i,-1)&&s!=k(i,-2)?n(23):(n(11),e[V].set(rn,i)))))):n(21)),t&&(n(9),e[V].set(rn,l(t))),!e.get(rn))if(i=(i=Pe.gaGlobal&&Pe.gaGlobal.vid)&&-1!=i[ae](/^(?:utma\.)?\d+\.\d+$/)?i:void 0)n(17),e[V].set(rn,i);else{for(n(8),i=Pe[fe],i=i.appName+i.version+i.platform+i.userAgent+(xe[H]?xe[H]:"")+(xe.referrer?xe.referrer:""),
r=i[Z],s=Pe.history[Z];0<s;)i+=s--^r++;e[V].set(rn,[a()^2147483647&D(i),N.round((new Date)[X]()/1e3)][ve]("."))}xn(e)},qn=function(e){var t=Pe[fe],i=Pe.screen,r=xe[ie];if(e.set(ut,h(e.get(gn))),r){var a=r.pathname||"";"/"!=a.charAt(0)&&(n(31),a="/"+a),e.set(lt,r[le]+"//"+r[re]+a+r[ae])}i&&e.set(ft,i.width+"x"+i.height),i&&e.set(pt,i.colorDepth+"-bit");var i=xe.documentElement,s=(a=xe.body)&&a[te]&&a[ue],o=[];if(i&&i[te]&&i[ue]&&("CSS1Compat"===xe.compatMode||!s)?o=[i[te],i[ue]]:s&&(o=[a[te],a[ue]]),
i=0>=o[0]||0>=o[1]?"":o[ve]("x"),e.set(mt,i),e.set(gt,C()),e.set(ht,xe.characterSet||xe.charset),e.set(vt,t&&"function"==typeof t.javaEnabled&&t.javaEnabled()||!1),e.set(dt,(t&&(t.language||t.browserLanguage)||"")[ge]()),r&&e.get(fn)&&(t=xe[ie][j])){for(t=t[de](1),t=t[ne]("&"),r=[],i=0;i<t[Z];++i)0!=t[i][q]("utm_id")&&0!=t[i][q]("utm_campaign")&&0!=t[i][q]("utm_source")&&0!=t[i][q]("utm_medium")&&0!=t[i][q]("utm_term")&&0!=t[i][q]("utm_content")||r[F](t[i]);0<r[Z]&&(t="#"+r[ve]("&"),e.set(lt,e.get(lt)+t));
}};Vn[ee].get=function(e){return this.b.get(e)},Vn[ee].set=function(e,t){this.b.set(e,t)};var Wn={pageview:[ct],event:[yt,bt,wt,St],social:[Pt,xt,Ct],timing:[Rt,Ot,Nt,Lt]};Vn[ee].send=function(e){if(!(1>arguments[Z])){var t,n;"string"==typeof arguments[0]?(t=arguments[0],n=[][B][oe](arguments,1)):(t=arguments[0]&&arguments[0][rt],n=arguments),t&&(n=p(Wn[t]||[],n),n[rt]=t,this.b.set(n,void 0,!0),this.filters.execute(this.b),"pageview"==t&&Kn(this),this.b[V].m={})}};var Kn=function(e){e.I||(e.I=!0,
yn(e.b,function(t){e.send("timing",t)}))},Qn=function(e){return"prerender"!=xe.webkitVisibilityState&&(e(),!0)},Yn=function(e){if(!Qn(e)){n(16);var t=!1,i=function(){!t&&Qn(e)&&(t=!0,we(xe,"webkitvisibilitychange",i))};be(xe,"webkitvisibilitychange",i)}},Gn={F:"/plugins/ua/",D:/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/};Gn.k=new Se,Gn.f=[];var $n=function(e){if(i(e[0]))this.u=e[0];else{var t=Gn.D.exec(e[0]);if(null!=t&&4==t[Z]&&(this.c=t[1]||"t0",this.e=t[2]||"",this.d=t[3],this.a=[][B][oe](e,1),this.e||(this.A="create"==this.d,
this.i="require"==this.d,this.g="provide"==this.d)),!i(e[0])){if(t=e[1],e=e[2],!this.d)throw"abort";if(this.i&&(!r(t)||""==t))throw"abort";if(this.g&&(!r(t)||""==t||!i(e)))throw"abort";if(0<=this.c[q](".")||0<=this.c[q](":")||0<=this.e[q](".")||0<=this.e[q](":"))throw"abort";if(this.g&&"t0"!=this.c)throw"abort"}}};Gn.B=function(e,t,n){var r=Gn.k.get(e);return!!i(r)&&(t.plugins_=t.plugins_||new Se,t.plugins_.set(e,new r(t,n||{})),!0)},Gn.C=function(e,t){Gn.k.set(e,t)},Gn.execute=function(e){var t=Gn.J[pe](Gn,arguments),t=Gn.f.concat(t);
for(Gn.f=[];0<t[Z]&&!Gn.v(t[0])&&(t.shift(),!(0<Gn.f[Z])););Gn.f=Gn.f.concat(t)},Gn.J=function(e){for(var t=[],n=0;n<arguments[Z];n++)try{var r=new $n(arguments[n]);if(r.g)Gn.v(r);else{if(r.i){var a=r.a[1];if(!i(Gn.k.get(r.a[0]))&&!r.H&&a){var s,o=a+"",a=o&&0<=o[q]("/")?o:"//www.google-analytics.com"+Gn.F+o,l=M(""+a),u=l[le],d=xe[ie][le];s="https:"==u||u==d||"http:"==u&&"http:"==d;var h;if(h=s){var o=l,p=M(xe[ie][ce]);if(o.G||0<=o.url[q]("?")||0<=o.path[q]("://"))h=!1;else if(o[J]==p[J]&&o[Q]==p[Q])h=!0;else{
var f="http:"==o[le]?80:443;h="www.google-analytics.com"==o[J]&&(o[Q]||f)==f&&0==o.path[q]("/plugins/")}}h&&(r.H=!!c(l.url))}}t[F](r)}}catch(m){}return t},Gn.v=function(e){try{if(e.u)e.u[oe](Pe,Xn.j("t0"));else if(e.g)Gn.C(e.a[0],e.a[1]);else{var t=e.c==Ze?Xn:Xn.j(e.c);if(e.A)"t0"==e.c&&Xn.create[pe](Xn,e.a);else if(t)if(e.i){if(!Gn.B(e.a[0],t,e.a[2]))return!0}else e.e&&(t=t.plugins_.get(e.e)),t[e.d][pe](t,e.a)}}catch(n){}};var Xn=function(e){n(1),Gn.execute[pe](Gn,[arguments])};Xn.h={},Xn.P=[],Xn.L=0,
Xn.answer=42;var Jn=[an,on,nn];Xn.create=function(e){var t=p(Jn,[][B][oe](arguments));t[nn]||(t[nn]="t0");var n=""+t[nn];return Xn.h[n]?Xn.h[n]:(t=new Vn(t),Xn.h[n]=t,Xn.P[F](t),t)},Xn.j=function(e){return Xn.h[e]},Xn.K=function(){return Xn.P[B](0)},Xn.N=function(){var e=Pe[Ze];if(!e||42!=e.answer){Xn.L=e&&e.l,Xn.loaded=!0,Pe[Ze]=Xn,P();var t=e&&e.q;"[object Array]"==Object[ee].toString[oe](Object(t))&&Yn(function(){Gn.execute[pe](Xn,t)})}},Xn.N()}(window),e.exports=ga}).call(t,n(5))},function(e,t){
!function(){"use strict";var e={};!function(){function t(){i||console.log.apply(console,arguments);for(var e=Math.round(Date.now()-a),t=[],n=0;n<arguments.length;n++){var r=""+arguments[n];"[obj"!=r.slice(0,4)&&t.push(r)}var s=e+": "+t.join(", "),o=document.getElementById("console");o&&(o.value+=s+"\n"),i&&console.log(s)}function n(e){e<=r&&t.apply(null,arguments)}var i=!!(window.console&&window.console.log&&window.console.log.call),r=0,a=(new Date).getTime();e.dlog=n,e.log=t,e.DLOG_LEVEL=r}(),function(){
var t={SMOOTH_STREAMING:"smoothstreaming",DASH:"dash"};e.StreamingType=t}(),function(){var t=function(e){this.ttml_=e,this.frameRate_=30};t.prototype.xmlDecode_=function(e){return e.replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},t.prototype.parseChildElements_=function(e,t,n){var i=[];if(null==n)return i;for(var r=n.firstElementChild;null!=r;r=r.nextElementSibling)r.nodeName==e&&i.push(t.call(this,r));return i},t.prototype.parseAttributes_=function(e,t){
var n={};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));return n},t.prototype.parseTime_=function(e){var t=e.split(":"),n=3600*parseFloat(t[0])+60*parseFloat(t[1])+parseFloat(t[2])+parseFloat(t[3])/this.frameRate_;return n},t.prototype.parseTextTrack_=function(e){var t=this.xmlDecode_(e.replace(/[\r\n]+/g,"").replace(/ {2,}/g," ").replace(/<[^>]+>/g,"").replace(/<br\s*\/>/g,"\n"));return t.trim()},t.prototype.parse_cue_=function(e){var t=this.parseAttributes_({
begin:this.parseTime_.bind(this),end:this.parseTime_.bind(this)},e);return t&&(t.caption=this.parseTextTrack_(e.textContent),t.start=t.begin,delete t.begin),t},t.prototype.parse_div_=function(e){return this.parseChildElements_("p",this.parse_cue_,e)},t.prototype.parse_body_=function(e){var t=this.parseChildElements_("div",this.parse_div_,e);return t[0]},t.prototype.parse_ttml_=function(e){var t=this.parseChildElements_("body",this.parse_body_,e);return t[0]},t.prototype.parse=function(){for(var e=new DOMParser,t=e.parseFromString(this.ttml_,"text/xml"),n=0;n<t.childNodes.length;n++)if("tt"===t.childNodes[n].nodeName)return this.parse_ttml_(t.childNodes[n]);
},e.Ttml=t}(),function(){var t=0,n=1,i=function(e){if(null==e)throw new Error("A url for the close captions location is required");this._url=e,this._callback=null,this._ccInfo=null};i.prototype.ccType=function(){return t},i.prototype.requestCC=function(){var e=new XMLHttpRequest;e.addEventListener("load",this.onCCLoad.bind(this)),e.addEventListener("error",this.onCCError.bind(this)),e.open("GET",this._url),e.send()},i.prototype.load=function(t){if(null==t)throw new Error("A callback is required");
this._callback=t,this.requestCC(),e.dlog(1,"Sent request to get the close captions info")},i.prototype.getCCInfo=function(){return this._ccInfo},i.prototype.onCCError=function(t){var n="Error geting captions from "+this._url;return e.log(n),this._callback(n)},i.prototype.onCCLoad=function(i){e.dlog(2,"Close Captions Info received");var r=null;if(200!==i.target.status||i.target.status>299)return r="HTTP error "+i.target.status+" retrieving close captions from "+this._url,e.log(r),this._callback(r);
switch(this.ccType()){case t:this._ccInfo=new e.Ttml(i.target.responseText).parse();break;case n:throw new Error("VTT parsing not implemented yet")}return null===this._ccInfo?(r="Error parsing the close captions info",e.log(r),this._callback(r)):this._callback(r,this._ccInfo)},e.CloseCaptionsLoader=i}(),function(){function t(e){return e}function n(e){var t=/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/,n=t.exec(e);return n?3600*parseFloat(n[2]||0)+60*parseFloat(n[4]||0)+parseFloat(n[6]||0):parseFloat(e);
}function i(e,t,n){var i=[];if(null==n)return i;for(var r=n.firstElementChild;null!=r;r=r.nextElementSibling)r.nodeName==e&&i.push(t(r));return i}function r(e,t,n){return i(e,t,n)[0]||null}function a(e,t,n){n=n||{};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));return n}function s(e){var t=/([0-9]+)(\/([0-9]+))?/.exec(e);return t?t[3]?parseFloat(t[1])/(parseFloat(t[3])||1):parseFloat(t[1]):1}function o(e){var t=/([0-9]+)-([0-9]+)/.exec(e);if(!t)return null;var n=parseInt(t[1]),i=parseInt(t[2]);
return{start:n,end:i,length:i-n+1}}function l(e){return a(S,e)}function u(e){return e.textContent}function c(e){return o(e.attributes.range.value)}function d(e){var t=a(P,e);return t.initialization=r("Initialization",c,e),t}function h(e){return a(x,e)}function p(e){var t=d(e);return t.timescale&&t.duration?t.durationSeconds=t.duration/t.timescale:t.durationSeconds=t.duration,t.segmentURLs=i("SegmentURL",l,e),t}function f(e){var t=a(T,e);return t.baseURLs=i("BaseURL",u,e),t.segmentBase=r("SegmentBase",d,e),
t.segmentList=r("SegmentList",p,e),t.contentProtection=r("ContentProtection",C,e),t}function m(e){var t=f(e);return a(_,e,t),t}function v(e){var t=f(e);t.representations=i("Representation",m,e),t.segmentTemplate=r("SegmentTemplate",h,e);for(var n=0;n<t.representations.length;n++)t.representations[n].segmentTemplate=t.segmentTemplate;return t}function g(e){var t=f(e);return a(E,e,t),t.adaptationSets=i("AdaptationSet",v,e),t}function y(e){var t={};return a({mediaPresentationDuration:n},e,t),t.periods=i("Period",g,e),
t.baseURLs=i("BaseURL",u,e),t}function b(e,t){e.manifestURL=t,e.duration=e.mediaPresentationDuration,delete e.mediaPresentationDuration,e.adaptationSets=e.periods[0].adaptationSets,delete e.periods;for(var n=0;n<e.adaptationSets.length;n++)e.adaptationSets[n].mimeType?(e.adaptationSets[n].mime=e.adaptationSets[n].mimeType,delete e.adaptationSets[n].mimeType):e.adaptationSets[n].mime=e.adaptationSets[n].representations[0].mimeType,e.adaptationSets[n].codecs||(e.adaptationSets[n].codecs=e.adaptationSets[n].representations[0].codecs);
return e}function w(e,t){var n=new DOMParser,i=n.parseFromString(e,"text/xml");return b(y(i.firstChild),t)}var S={media:t,mediaRange:o,index:t,indexRange:o},P={timescale:parseInt,duration:parseInt,indexRange:o,presentationTimeOffset:parseInt,startNumber:parseInt},x={timescale:parseInt,duration:parseInt,initialization:t,media:t,startNumber:parseInt},C=function(e){var t=e.attributes.schemeIdUri;if(!t||"http://youtube.com/drm/2012/10/10"!=t.textContent)return null;for(var n={},i=e.firstElementChild;null!=i;i=i.nextElementSibling)if("yt:SystemURL"==i.nodeName){
var r=i.attributes.type.textContent;n[r]=i.textContent}return n},T={id:t,profiles:t,width:parseInt,height:parseInt,frameRate:s,audioSamplingRate:parseInt,mimeType:t,codecs:t},_={bandwidth:parseInt,qualityRanking:parseInt},E={id:parseInt,start:n,duration:n};e.parseDASHManifest=w}(),function(){function t(e){for(var t=new DataView(e),n=0;n<e.byteLength;){var i=t.getUint32(n+4,!1);if(1936286840==i||1836019558==i)break;n+=t.getUint32(n,!1)}return new Uint8Array(e.slice(0,n))}function n(e,t){for(var n=new DataView(e),i=0;1936286840!=n.getUint32(i+4,!1);)if(i+=n.getUint32(i,!1),
i>=e.byteLength)throw"Could not find sidx";var r=n.getUint32(i,!1)+i;if(r>e.byteLength)throw"sidx terminates after array buffer";var a=n.getUint8(i+8);i+=12;var s=n.getUint32(i+4,!1);i+=8;var o,l;0==a?(o=n.getUint32(i,!1),l=n.getUint32(i+4,!1),i+=8):(o=(n.getUint32(i,!1)<<32)+n.getUint32(i+4,!1),l=(n.getUint32(i+8,!1)<<32)+n.getUint32(i+12,!1),i+=16),l+=r+(t||0);var u=n.getUint16(i+2,!1);i+=4;for(var c=l,d=o,h=[],p=0;p<u;p++){var f=n.getUint32(i,!1),m=2147483648&f;if(m)throw"Unhandled indirect reference";
f=2147483647&f;var v=n.getUint32(i+4,!1);i+=12,h.push({size:f,offset:c,duration:v/s,time:d/s}),c+=f,d+=v}if(i!=r)throw"Error: final pos "+i+" differs from SIDX end "+r;return h}window.ArrayBuffer&&!window.ArrayBuffer.prototype.slice&&(window.ArrayBuffer.prototype.slice=function(e,t){var n=new Uint8Array(this);null==t&&(t=n.length);for(var i=new ArrayBuffer(t-e),r=new Uint8Array(i),a=0;a<r.length;a++)r[a]=n[a+e];return i}),e.extractInit=t,e.parseSIDX=n}(),function(){function t(e){return e}function n(e){
for(var t=new ArrayBuffer(e.length/2),n=new Uint8Array(t),i=0;i<e.length;i+=2)n[i/2]=parseInt(e.substr(i,2),16);return n}function i(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t}function r(e){return n(e.replace(/[{}-]/g,""))}function a(e,t,n){var i=[];if(null==n)return i;for(var r=n.firstElementChild;null!=r;r=r.nextElementSibling)r.nodeName==e&&i.push(t(r));return i}function s(e,t,n){n=n||{};for(var i in e)null!=t.attributes.getNamedItem(i)&&(n[i]=e[i](t.attributes[i].value));
return n}function o(t){var n={},r=t.split("00000001");return 3!==r.length?(t||(e.log("Warning, Audio codec private data is not specified."),t="1210"),n=i(t)):(n.SPS=i(r[1]),n.PPS=i(r[2])),n}function l(t){return"AACL"==t?"mp4a.40.2":"H264"==t||"AVC1"==t?"avc1.4d40":(e.log("Warning, unsupported FourCC encountered: "+t),"")}function u(e){var t={};return s({Bitrate:parseInt},e,t),s({CodecPrivateData:o},e,t),s({MaxWidth:parseInt},e,t),s({MaxHeight:parseInt},e,t),s({FourCC:l},e,t),t}function c(e){var t={};
return s({Bitrate:parseInt},e,t),s({CodecPrivateData:o},e,t),s({SamplingRate:parseInt},e,t),s({Channels:parseInt},e,t),s({BitsPerSample:parseInt},e,t),s({PacketSize:parseInt},e,t),s({FourCC:l},e,t),t}function d(e){var t=[];if(null==e)return t;for(var n=-1,i=e.firstElementChild;null!=i;i=i.nextElementSibling)if("c"==i.nodeName){var r={};if(n==-1&&(n=null!=i.attributes.getNamedItem("t")?parseInt(i.attributes.t.value):0),r.time=n/1e7,r.timeURL=n,null==i.attributes.getNamedItem("d"))throw"Expected attribute 'd' not found";
var a=parseInt(i.attributes.d.value);r.duration=a/1e7,r.durationURL=a,n+=a,t.push(r)}return t}function h(e){var n={};return s({Type:t},e,n),s({Url:t},e,n),"video"===n.Type?n.QualityLevels=a("QualityLevel",u,e):"audio"==n.Type&&(n.QualityLevels=a("QualityLevel",c,e)),n.Fragments=d(e),n}function p(e,t){for(var n=[],i=[],r=!1,a=!1,s=e.length-1;s>=0&&(a||"video"!==e[s].Type||(i.push(s),a=!0),r||"audio"!==e[s].Type||(i.push(s),r=!0),!a||!r);s--);for(var s=0;s<e.length;s++)if(i.indexOf(s)!==-1){var o={};
switch(o.contentProtection=null,e[s].Type){case"audio":o.mime="audio/mp4";break;case"video":o.mime="video/mp4"}if(e[s].QualityLevels){o.representations=[];for(var l=0;l<e[s].QualityLevels.length;l++){var u={};switch(u.bandwidth=e[s].QualityLevels[l].Bitrate,u.baseURLs=[],u.baseURLs[0]=e[s].Url,u.segmentBase=null,u.segs=e[s].Fragments,e[s].Type){case"audio":u.codecs=e[s].QualityLevels[l].FourCC,u.audio_codec_private_data=e[s].QualityLevels[l].CodecPrivateData,u.audio_sample_rate=e[s].QualityLevels[l].SamplingRate;
break;case"video":u.codecs=e[s].QualityLevels[l].FourCC+e[s].QualityLevels[l].CodecPrivateData.SPS[3].toString(16).toLowerCase(),u.sps=e[s].QualityLevels[l].CodecPrivateData.SPS,u.pps=e[s].QualityLevels[l].CodecPrivateData.PPS,u.width=e[s].QualityLevels[l].MaxWidth,u.height=e[s].QualityLevels[l].MaxHeight}o.representations.push(u)}o.codecs=o.representations[0].codecs}t&&(o.contentProtection=t),n.push(o)}return n}function f(e){for(var t=atob(e.trim()),n=new ArrayBuffer(t.length),i=new Uint8Array(n),r=0;r<t.length;r++)i[r]=t.charCodeAt(r);
return{ab:n,u8:i}}function m(e){for(var t=0,n=[],i=[],r=new Uint16Array(e),a=e.byteLength/2;t<a&&(0===n.length||0===i.length);){for(;t<a&&60!==r[t];)t++;if(75===r[t+1]&&73===r[t+2]&&68===r[t+3]&&62===r[t+4])for(t+=5;t<a&&60!==r[t];)n.push(r[t]),t++;else if(76===r[t+1]&&65===r[t+2]&&95===r[t+3]&&85===r[t+4]&&82===r[t+5]&&76===r[t+6]&&62===r[t+7])for(t+=8;t<a&&60!==r[t];)i.push(r[t]),t++;else t++}return{kid:String.fromCharCode.apply(null,n),url:String.fromCharCode.apply(null,i)}}function v(e){var t={};
s({SystemID:r},e,t);var n=f(e.textContent),i=m(n.ab);return t.KID=f(i.kid).u8,t.url=i.url,t.PrHeader=n.u8,t}function g(e){var t={};return t.ProtectionHeader=a("ProtectionHeader",v,e)[0],t}function y(e){var t={};s({TimeScale:parseInt},e,t),t.TimeScale||(t.TimeScale=1e7),s({Duration:parseInt},e,t),t.StreamIndexes=a("StreamIndex",h,e);var n=a("Protection",g,e);n&&n[0]&&(t.Protection=n[0]),t.duration=t.Duration/t.TimeScale;var i;return t.Protection&&(i={},t.Protection.ProtectionHeader.url?i.playready=t.Protection.ProtectionHeader.url:i.playready="http://playready.directtaps.net/pr/svc/rightsmanager.asmx"),
t.adaptationSets=p(t.StreamIndexes,i),t.Protection&&(t.pr={},t.pr.systemId=t.Protection.ProtectionHeader.SystemID,t.pr.prHeader=t.Protection.ProtectionHeader.PrHeader,t.pr.ivsize=8,t.pr.kid=t.Protection.ProtectionHeader.KID),t}function b(t,n){return t.manifestURL=n,t.type=e.StreamingType.SMOOTH_STREAMING,t}function w(e,t){for(var n,i=new DOMParser,r=i.parseFromString(e,"text/xml"),a=0;a<r.childNodes.length;a++)if("SmoothStreamingMedia"===r.childNodes[a].nodeName){n=r.childNodes[a];break}return b(y(n),t);
}e.parseSSManifest=w}(),function(){function t(e,t,n){e.setUint32(t,n)}function n(e,t,n){for(var i=0;i<4;i++)e.setUint8(t+4+i,n.charCodeAt(i));return 8}function i(e,t,n,i,r){return n.set(r,i),i+r.length}function r(e,i,r,a,s,o){var l=a;return a+=n(i,a,s),o&&(a=o(e,i,r,a)),t(i,l,a-l),a}function a(e,t,n,a,s,o){return r(e,t,n,a,s,function(e,t,n,r){return i(e,t,n,r,o)})}function s(e,t,n,i){return a(e,t,n,i,"smhd",[0,0,0,0,0,0,0,0])}function o(e,t,n,i){return a(e,t,n,i,"vmhd",[0,0,0,1,0,0,0,0,0,0,0,0])}
function l(e,t,n,a){return r(e,t,n,a,"esds",function(e,t,n,r){var a=e.audio_codec_private_data[0],s=e.audio_codec_private_data[1];return r=i(e,t,n,r,[0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,a,s,6,1,2])})}function u(e,t,n,a){return r(e,t,n,a,"avcC",function(e,t,n,r){return r=i(e,t,n,r,[1,77,64,30,255,225]),t.setUint16(r,e.sps.length),r+=2,r=i(e,t,n,r,e.sps),t.setUint8(r,1),r+=1,t.setUint16(r,e.pps.length),r+=2,r=i(e,t,n,r,e.pps)})}function c(e,t,n){for(var i=n-t+1,r=0,a=t;a<t+i/2;a++)r=e[a],
e[a]=e[n-a+t],e[n-a+t]=r}function d(e){var t=new ArrayBuffer(e.length),n=new Uint8Array(t);return n.set(e),c(n,0,3),c(n,4,5),c(n,6,7),n}function h(e,t,n,a){return r(e,t,n,a,"tenc",function(e,t,n,r){r=i(e,t,n,r,[0,0,0,0,0,0,1]),t.setUint8(r,e.pr.ivsize),r++;var a=d(e.pr.kid);return r=i(e,t,n,r,a)})}function p(e,t,n,i){return r(e,t,n,i,"schi",function(e,t,n,i){return i=h(e,t,n,i)})}function f(e,t,n,i){return a(e,t,n,i,"schm",[0,0,0,0,99,101,110,99,0,1,0,0])}function m(e,t,n,i){return"audio/mp4"!==e.mime?a(e,t,n,i,"frma",[97,118,99,49]):a(e,t,n,i,"frma",[109,112,52,97]);
}function v(e,t,n,i){return r(e,t,n,i,"sinf",function(e,t,n,i){return i=m(e,t,n,i),i=f(e,t,n,i),i=p(e,t,n,i)})}function g(e,t,n,a,s){return r(e,t,n,a,s,function(e,t,n,r){var a=e.audio_sample_rate>>8&255,o=255&e.audio_sample_rate;return r=i(e,t,n,r,[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,a,o,0,0]),r=l(e,t,n,r),"enca"===s&&(r=v(e,t,n,r)),r})}function y(e,t,n,a,s){return r(e,t,n,a,s,function(e,t,n,r){return r=i(e,t,n,r,[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t.setUint16(r,e.width),
r+=2,t.setUint16(r,e.height),r+=2,r=i(e,t,n,r,[0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]),r=u(e,t,n,r),"encv"===s&&(r=v(e,t,n,r)),r})}function b(e,t,n,a){return r(e,t,n,a,"stsd",function(e,t,n,r){return r=i(e,t,n,r,[0,0,0,0,0,0,0,1]),"audio/mp4"!==e.mime?(e.pr&&(r=y(e,t,n,r,"encv")),r=y(e,t,n,r,"avc1")):(e.pr&&(r=g(e,t,n,r,"enca")),r=g(e,t,n,r,"mp4a")),r})}function w(e,t,n,a){return r(e,t,n,a,"stbl",function(e,t,n,r){return r=b(e,t,n,r),
r="audio/mp4"!==e.mime?i(e,t,n,r,[0,0,0,16,115,116,116,115,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,99,0,0,0,0,0,0,0,0,0,0,0,16,115,116,99,111,0,0,0,0,0,0,0,0,0,0,0,20,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,115,0,0,0,0,0,0,0,0]):i(e,t,n,r,[0,0,0,16,115,116,116,115,0,0,0,0,0,0,0,0,0,0,0,16,115,116,115,99,0,0,0,0,0,0,0,0,0,0,0,16,115,116,99,111,0,0,0,0,0,0,0,0,0,0,0,20,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,0])})}function S(e,t,n,i){return a(e,t,n,i,"url ",[0,0,0,1])}function P(e,t,n,a){
return r(e,t,n,a,"dref",function(e,t,n,r){return r=i(e,t,n,r,[0,0,0,0,0,0,0,1]),r=S(e,t,n,r)})}function x(e,t,n,i){return r(e,t,n,i,"dinf",function(e,t,n,i){return i=P(e,t,n,i)})}function C(e,t,n,i){return r(e,t,n,i,"minf",function(e,t,n,i){return i=x(e,t,n,i),i=w(e,t,n,i),i="audio/mp4"!==e.mime?o(e,t,n,i):s(e,t,n,i)})}function T(e,t,n,i){return"audio/mp4"!==e.mime?a(e,t,n,i,"hdlr",[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]):a(e,t,n,i,"hdlr",[0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);
}function _(e,t,n,i){return a(e,t,n,i,"mdhd",[0,0,0,0,204,96,118,241,204,96,118,241,0,152,150,128,0,0,0,0,85,196,0,0])}function E(e,t,n,i){return r(e,t,n,i,"mdia",function(e,t,n,i){return i=_(e,t,n,i),i=T(e,t,n,i),i=C(e,t,n,i)})}function k(e,t,n,a){return r(e,t,n,a,"tkhd",function(e,t,n,r){return r=i(e,t,n,r,[0,0,0,3,204,96,118,241,204,96,118,241,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0]),t.setUint32(r,e.width),
r+=4,t.setUint32(r,e.height),r+=4,t.setUint16(r,0),r+=2})}function I(e,t,n,i){return r(e,t,n,i,"trak",function(e,t,n,i){return i=k(e,t,n,i),i=E(e,t,n,i)})}function A(e,t,n,i){return a(e,t,n,i,"trex",[0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}function M(e,t,n,i){return r(e,t,n,i,"mvex",function(e,t,n,i){return i=A(e,t,n,i)})}function D(e,t,n,a){return r(e,t,n,a,"pssh",function(e,t,n,r){return r=i(e,t,n,r,[0,0,0,0]),r=i(e,t,n,r,e.pr.systemId),t.setUint32(r,e.pr.prHeader.length),r+=4,r=i(e,t,n,r,e.pr.prHeader);
})}function R(e,t,n,i){return a(e,t,n,i,"mvhd",[0,0,0,0,204,96,118,241,204,96,118,241,0,152,150,128,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2])}function O(e,t,n,i){return r(e,t,n,i,"moov",function(e,t,n,i){return i=R(e,t,n,i),e.pr&&(i=D(e,t,n,i)),i=M(e,t,n,i),i=I(e,t,n,i)})}function L(e){var t=new ArrayBuffer(2e4),n=new DataView(t),i=new Uint8Array(t),r=0,a=0;r=O(e,n,i,r),
a=r-1;var s={};return s.data=t.slice(0,r),s.init={},s.init.start=0,s.init.end=a,s}function N(e,t,n){for(var i=0,r=t,a=0;a<4;a++)i<<=8,i+=n.charCodeAt(a);for(;e.getUint32(r+4,!1)!=i;)if(r+=e.getUint32(r),r>=e.byteLength)throw"Could not find box: "+n;return r}function U(e,t){var n=N(e,t,"traf");n=N(e,n+8,"tfhd"),e.setUint32(n+12,1)}function F(e,t,n,i){var r=N(e,t,n),a=e.getUint32(r);return e.setUint32(r,a+i),r}function j(e,t,n){var i=0;if(i=F(e,i,"moof",t),i=F(e,i+8,"traf",t),i=N(e,i+8,"trun"),1&e.getUint32(i+8)){
var r=i+16;e.setUint32(r,n)}return i}function B(e,t,n){var i=0;if(i=F(e,i,"moof",t),i=F(e,i+8,"traf",t),i=N(e,i+8,"trun"),1&e.getUint32(i+8)){var r=i+16,a=e.getUint32(r);e.setUint32(r,a+n)}return i}function z(e,t){var n=[0,0,0,20,116,102,100,116,1,0,0,0],i=n.length+8,r=new ArrayBuffer(e.byteLength+i),a=(new Uint8Array(e),new DataView(e)),s=new Uint8Array(r),o=new DataView(r),l=0;return U(a,8),l=B(a,i,i),s.set(new Uint8Array(e,0,l)),s.set(n,l),o.setUint32(l+12,t/4294967295&4294967295),o.setUint32(l+16,4294967295&t),
s.set(new Uint8Array(e,l,e.byteLength-l),l+i),r}function V(e,t,n,i,r){if(!r)return new Uint8Array(0);for(var a=new Uint8Array(n),s=0,o=0,l=t,u=0;u<n;u++)s=e.getUint16(l+i),o=i+2+6*s,a[u]=o,l+=o;return a}function H(e,t,n,a,s,o){return r(e,t,n,a,"mdat",function(e,t,n,r){return r=i(e,t,n,r,s),r=i(e,t,n,r,o)})}function q(e,t,n,a){return r(e,t,n,a,"saio",function(e,t,n,r){r=i(e,t,n,r,[0,0,0,0,0,0,0,1]);var a=r+4+8;return t.setUint32(r,a),r+=4})}function W(e,t,n,a,s,o,l,u){return r(e,t,n,a,"saiz",function(e,t,n,r){
return r=l?i(e,t,n,r,[0,0,0,0,0]):i(e,t,n,r,[0,0,0,0,u]),t.setUint32(r,s),r+=4,n.set(o,r),r+=o.length})}function K(e){var t=new DataView(e),n=0,i=0,r=0,a=t.getUint32(n);n=N(t,n+8,"traf"),n=N(t,n+8,"trun"),i=t.getUint32(n+12),n=N(t,n,"uuid");var s=t.getUint8(n+27),o=!1;if(2!==s&&0!==s)throw"uuid flags expected is 0x02 or 0x00 but found: "+s;2===s&&(o=!0);var l=t.getUint32(n+28);if(i!==l)throw"Samples count does not match "+i+" "+l;var u=t.getUint32(n);r=u-32;var c=200,d=new ArrayBuffer(e.byteLength+c),h=new Uint8Array(d),p=new DataView(d);
h.set(new Uint8Array(e,0,n));var f=n,m=8,v=n+32,g=n+u,y=t.getUint32(g),b=V(t,v,i,m,o);if(f=W(null,p,h,f,i,b,o,m),f=q(null,p,h,f),o){for(var w=0,S=0;S<b.length;S++)w+=b[S];if(w!==r)throw"Samples size does not match "+w+" "+r}else if(m*i!==r)throw"Samples size does not match "+m*i+" "+r;var P=new Uint8Array(e,v,r),x=new Uint8Array(e,g+8,y-8),C=f-a,T=f;return f=H(null,p,h,f,P,x),j(p,C,T+8+r),new Uint8Array(d,0,f)}function Q(e,t,n){var i=z(e,t);return n?K(i):new Uint8Array(i)}e.abtohex=function(e){for(var t=[],n=0;n<e.byteLength;n++)t.push(e[n].toString(16));
return t},e.abtob64=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e)))},e.createSSInit=L,e.process_traf=Q}(),function(){function t(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function n(e){return String.fromCharCode.apply(String,e)}var i=function(e){this.video=e,!e.generateKeyRequest&&e.webkitGenerateKeyRequest&&(e.generateKeyRequest=e.webkitGenerateKeyRequest),!e.addKey&&e.webkitAddKey&&(e.addKey=e.webkitAddKey),this.initDataQueue=[],
this.flavor=null,this.keySystem=null,this.licenseServerURL=null,this.mediaEvents_={},e.generateKeyRequest&&e.addKey&&(this.addMediaEventListener("needkey",this.onNeedKey),this.addMediaEventListener("keymessage",this.onKeyMessage),this.addMediaEventListener("keyerror",this.onKeyError),this.addMediaEventListener("webkitneedkey",this.onNeedKey),this.addMediaEventListener("webkitkeymessage",this.onKeyMessage),this.addMediaEventListener("webkitkeyerror",this.onKeyError))};i.kMime='video/mp4; codecs="avc1.640028"',
i.kFlavorToSystem={clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.youtube.playready","com.microsoft.playready"]},i.prototype.init=function(e,t,n){this.chooseFlavor(i.kMime,e,t),this.isClearKey="clearkey"==this.flavor},i.prototype.destroy=function(){this.removeAllMediaEventListeners(),this.video=null},i.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.video.addEventListener(e,n),this.mediaEvents_[e]=n},i.prototype.removeMediaEventListener=function(e){
this.video.removeEventListener(e,this.mediaEvents_[e]),this.mediaEvents_[e]=null},i.prototype.removeAllMediaEventListeners=function(){for(var e in this.mediaEvents_)e&&this.removeMediaEventListener(e)},i.prototype.chooseFlavor=function(e,t,n){for(var r in t)if(!n||r==n){var a=i.kFlavorToSystem[r];if(a)for(var s in a)if(this.video.canPlayType(e,a[s]))return this.flavor=r,this.keySystem=a[s],void(this.licenseServerURL=t[r])}throw"Could not find a compatible key system"},i.prototype.extractBMFFClearKeyID=function(e){
var t=new ArrayBuffer(e.length),n=new Uint8Array(t);n.set(e);for(var i=new DataView(t),r=0;r<t.byteLength;){var a=i.getUint32(r,!1),s=i.getUint32(r+4,!1);if(1886614376!=s)throw"Box type "+s.toString(16)+' not equal to "pssh"';if(1477738184==i.getUint32(r+12,!1)&&69420633==i.getUint32(r+16,!1)&&2464609580==i.getUint32(r+20,!1)&&1558758348==i.getUint32(r+24,!1)){var o=i.getUint32(r+28,!1);if(16!=o)throw"Unexpected KID size "+o;return new Uint8Array(t.slice(r+32,r+32+o))}if(3991899049==i.getUint32(r+12,!1)&&2044086990==i.getUint32(r+16,!1)&&2747803612==i.getUint32(r+20,!1)&&3575456237==i.getUint32(r+24,!1))return new Uint8Array(t.slice(r+36,r+52));
r+=a}return e},i.prototype.onNeedKey=function(t){if(e.dlog(2,"onNeedKey()"),!this.keySystem)throw"Not initialized! Bad manifest parse?";if(16==t.initData.length)return void e.log("Dropping non-BMFF needKey event");var n=t.initData;this.isClearKey&&(n=this.extractBMFFClearKeyID(t.initData)),this.video.generateKeyRequest(this.keySystem,n),this.initDataQueue.push(n)},i.prototype.onKeyMessage=function(t){e.dlog(2,"onKeyMessage() Sending request: "+this.licenseServerURL+" "+t.sessionId);var n=this.initDataQueue.shift(),i=new XMLHttpRequest;
i.open("POST",this.licenseServerURL),i.setRequestHeader("content-type","text/xml;charset=utf-8"),i.addEventListener("load",this.onLoad.bind(this,n,t.sessionId)),i.responseType="arraybuffer",i.send(t.message)},i.prototype.onKeyError=function(t){e.dlog(2,"onKeyError("+t.keySystem+", "+t.errorCode.code+", "+t.systemCode+")")},i.prototype.onLoad=function(i,r,a){if(e.dlog(2,"onLoad("+this.licenseServerURL+"): "+r),a.target.status<200||a.target.status>299)throw"Bad XHR status: "+a.target.statusText;var s=n(new Uint8Array(a.target.response)).split("\r\n").pop();
this.video.addKey(this.keySystem,t(s),i,r)},e.EMEManager=i}(),function(){var t=function(e,t,n,i,r,a,s){this.url=e,this.bandwidth=t,this.width=n,this.height=i,this.sps=r,this.pps=a,this.codecs=s,this.initFragment=null,this.initRequestData=null,this.indexRequestData=null,this.isInitialized=!1,this.segs=null};e.Representation=t}(),function(){var t={ENOUGH:20},n=function(e,t,n,i,r,a){if(this.sourceBuffer_=t,this.sourceBuffer_.appendBuffer)this.appendBuffer_=this.sourceBuffer_.appendBuffer,this.sourceBuffer_.addEventListener("updateend",this.onUpdateEnd.bind(this));else{
if(!this.sourceBuffer_.append)throw new Error("Unknown SourceBuffer interface");this.appendBuffer_=this.sourceBuffer_.append}this.representations_=n,this.currentRep=0,this.segIndex=null,this.mime=i,this.resetReason=null,this.active=!0,this.type=r,this.pr_=a,this.seekingStartTime=null,this.mediaSrc_=e,this.bitrates=[];for(var s=0;s<this.representations_.length;s++)this.bitrates.push(this.representations_[s].bandwidth);this.deferredAppends_=[],this.segmentQueue=[],this.segmentSize=0,this.segmentLastEndTime=0,
this.waitingForBuffer=!1,this.segmentTimeout=null};n.prototype.destroy=function(){delete this.mediaSrc_},n.prototype.getCurrentTime=function(){var e=window.googledash.player,t=e&&e.getMediaElement();return t?t.currentTime:0},n.prototype.updateBuffer=function(){var t=this.sourceBuffer_.buffered;if(t.length>0){var n=t.end(t.length-1)-this.segmentLastEndTime;e.dlog(3,"["+this.mime+"] Play head: "+this.getCurrentTime()+" Segment size: "+(this.segmentSize/1024/1024).toFixed(2)+" MB Segment duration: "+n),
this.segmentQueue.push({size:this.segmentSize,duration:n,offset:this.segmentLastEndTime})}},n.prototype.reset=function(t){e.dlog(1,"SourceBuffer["+this.mime+"] reset: "+t),this.segIndex=null,this.representations_[this.currentRep].isInitialized=!1,this.resetReason=t||null,this.active=!0,this.segmentQueue=[],this.segmentSize=0,this.segmentLastEndTime=0,this.waitingForBuffer=!1,null!=this.segmentTimeout&&clearTimeout(this.segmentTimeout),"open"==this.mediaSrc_.readyState&&this.sourceBuffer_.abort()},
n.prototype.isInitialized=function(){return this.representations_[this.currentRep].isInitialized},n.prototype.initialize=function(){this.representations_[this.currentRep].isInitialized=!0},n.prototype.updating=function(){return this.sourceBuffer_.updating},n.prototype.onUpdateEnd=function(t){this.updateBuffer(),this.deferredAppends_.length>0&&(e.dlog(2,"SourceBuffer["+this.mime+"] appended deferred data"),this.append(this.deferredAppends_.pop()))},n.prototype.append=function(t){var n=this.sourceBuffer_.buffered;
if(this.segmentSize=t.length,this.segmentLastEndTime=0,n.length>0&&(this.segmentLastEndTime=n.end(n.length-1)),this.sourceBuffer_.updating){if(this.deferredAppends_.length<5)return e.dlog(2,"SourceBuffer["+this.mime+"] deferring append"),void this.deferredAppends_.push(t);e.log("SourceBuffer["+this.mime+"] too many deferrals, aborting"),this.deferredAppends_=[],this.appendBuffer_.abort()}this.appendBuffer_.call(this.sourceBuffer_,t),"appendBuffer"in this.sourceBuffer_||this.updateBuffer()},n.prototype.getCurrentRep=function(){
return this.representations_[this.currentRep]},n.prototype.changeQuality=function(t){if(t===this.currentRep)return!1;e.dlog(2,"Bandwitdth change sourceBuffer["+this.mime+"]: "+this.active),e.dlog(2,"bandwidthChange["+this.mime+"]: "+this.currentRep+" "+t);var n,i=this.representations_[this.currentRep].bandwidth,r=this.representations_[t].bandwidth;e.dlog(2,"bandwidthChange["+this.mime+"]: "+i+" "+r),n=i>r?"rep_down":"rep_up",this.reset(n),this.currentRep=t},n.prototype.getRangesString=function(){
for(var e=this.sourceBuffer_.buffered,t="Ranges["+this.mime+"]:",n=0;n<e.length;n++)t+=" ["+e.start(n)+","+e.end(n)+"]";return t},n.prototype.findRangeForPlaybackTime=function(e){for(var t=this.sourceBuffer_.buffered,n=0;n<t.length;n++)if(t.start(n)<=e&&t.end(n)>=e)return{start:t.start(n),end:t.end(n)};return null},n.prototype.getBufferSize=function(t){e.dlog(4,"Time: "+t+" Ranges in onProgress: "+this.getRangesString());var n=this.findRangeForPlaybackTime(t),i=n&&n.end||0;if(null!==this.segIndex){
var r=this.representations_[this.currentRep].segs[this.segIndex].time;i=r>i?r:i}if(n){var a=Math.abs(n.end-i);a>.001&&e.dlog(2,"Difference in available data: "+n.end+" "+i)}return i-t},n.prototype.findSegmentIndexForTime=function(t){for(var n=this.representations_[this.currentRep].segs,i=0;i<n.length;i++){var r=n[i];if(r.time<=t&&r.time+r.duration>=t)return i==n.length-1&&r.time+r.duration+.5<t?null:i}return e.dlog(5,"Could not find segment for time "+t),null},n.prototype.identifyNextFragment=function(n){
var i=this.findRangeForPlaybackTime(n),r=i&&i.end||n;if(r>n+t.ENOUGH)return e.dlog(3,"Enough buffering currentTime in rage: "+this.mime+" "+n+"  "+r),null;if(1==this.waitingForBuffer)return null;if(null==this.segIndex){if(e.dlog(4,"Non existing index, finding the index for the next request["+this.mime+"]"),this.segIndex=this.findSegmentIndexForTime(r),null===this.segIndex)return this.active=!1,null;e.dlog(4,"New Index["+this.mime+"]: "+r+" "+this.segIndex)}else{null==i&&e.log("Playback head outside of buffer in append-continue state.");
var a=this.representations_[this.currentRep].segs[this.segIndex].time;if(a>n+t.ENOUGH)return e.dlog(3,"Enough buffering: "+this.mime+" "+this.segIndex+" "+n+"  "+a),null}return r},n.prototype.appendData=function(t){for(e.dlog(2,"["+this.mime+"] Time is "+this.getCurrentTime()+", asked to add a "+(t.byteLength/1024/1024).toFixed(2)+" MB segment, see if we can."),this.segmentQueue.length>0&&e.dlog(2,"["+this.mime+"] End of first segment is "+(this.segmentQueue[0].offset+this.segmentQueue[0].duration).toFixed(2));this.segmentQueue.length>0&&this.segmentQueue[0].offset+this.segmentQueue[0].duration<this.getCurrentTime()+2;)e.dlog(2,"["+this.mime+"] Removing collectable segment."),
this.segmentQueue.shift();for(var n=0,i=0;i<this.segmentQueue.length;i++)n+=this.segmentQueue[i].size;e.dlog(2,"["+this.mime+"] Time is "+this.getCurrentTime()+" and there are "+(n/1024/1024).toFixed(2)+" MB uncollectable, bringing the proposed total to "+((n+t.byteLength)/1024/1024).toFixed(2)+" MB."),(n+t.byteLength)/1024/1024>24&&this.segmentQueue.length>0?(e.dlog(2,"["+this.mime+"] Waiting for buffer to have enough room."),this.waitingForBuffer=!0,this.segmentTimeout=setTimeout(function(){this.appendData(t);
}.bind(this),1e3)):(this.reallyAppendData(t),this.waitingForBuffer=!1)},n.prototype.reallyAppendData=function(t){e.dlog(3,"["+this.mime+"] Current Time: "+this.getCurrentTime()+" Ranges in appendData1: "+this.getRangesString());var n,i=this.representations_[this.currentRep].segs[this.segIndex].time,r=i+this.representations_[this.currentRep].segs[this.segIndex].duration;e.dlog(4,"Appending Response ["+this.mime+"] : ["+i+","+r+"]"),n=this.type===e.StreamingType.SMOOTH_STREAMING?process_traf(t,this.representations_[this.currentRep].segs[this.segIndex].timeURL,this.pr_):new Uint8Array(t),
this.append(n),this.segIndex++,this.segIndex>=this.representations_[this.currentRep].segs.length&&(this.active=!1,e.dlog(2,"Source["+this.mime+"] is not active: "+this.segIndex+" "+this.representations_[this.currentRep].segs.length)),e.dlog(3,"Ranges in appendData2: "+this.getRangesString())},e.SourceBufferManager=n}(),function(){var t=function(){this.mediaSrc_=null,this.sourceBufferManagers_=[],this.videoSrcBufIndex_=0,this.emeMgr_=null,this.type=null,this.pr,this.manifest_=null,this.attachedHandlers_={};
};t.prototype.destroy=function(){null!=this.mediaSrc_&&(this.detachAllHandlers_(),this.mediaSrc_=null);var e=this.sourceBufferManagers_;if(e){for(var t=0;t<e.length;t++)e[t].reset(),e[t].destroy();e.length=0}this.sourceBufferManagers_=null,this.emeMgr_&&(this.emeMgr_.destroy(),this.emeMgr_=null),this.revokeObjectURL_(),this.video_=null},t.prototype.getMediaSource=function(){return this.mediaSrc_},t.prototype.getSourceBufferCount=function(){return this.sourceBufferManagers_.length},t.prototype.getVideoSrcBufferIndex=function(){
return this.videoSrcBufIndex_},t.prototype.getLevel=function(e){return this.sourceBufferManagers_[e].currentRep},t.prototype.getSegIndex=function(e){return this.sourceBufferManagers_[e].segIndex},t.prototype.getCurrentRep=function(e){return this.sourceBufferManagers_[e].getCurrentRep()},t.prototype.getBufferSize=function(e,t){return this.sourceBufferManagers_[e].getBufferSize(t)},t.prototype.getLevel=function(e){return this.sourceBufferManagers_[e].currentRep},t.prototype.appendData=function(e,t){
this.mediaSrc_&&"closed"!==this.mediaSrc_.readyState&&this.sourceBufferManagers_[e].appendData(t)},t.prototype.append=function(e,t){this.mediaSrc_&&"closed"!==this.mediaSrc_.readyState&&this.sourceBufferManagers_[e].append(t)},t.prototype.isActive=function(e){return this.sourceBufferManagers_[e].active},t.prototype.isInitialized=function(e){return this.sourceBufferManagers_[e].isInitialized()},t.prototype.initialize=function(e){this.sourceBufferManagers_[e].initialize()},t.prototype.mime=function(e){
return this.sourceBufferManagers_[e].mime},t.prototype.getBitrates=function(e){return this.sourceBufferManagers_[e].bitrates},t.prototype.identifyNextFragment=function(e,t){return this.sourceBufferManagers_[e].identifyNextFragment(t)},t.prototype.resetAll=function(e){for(var t=0;t<this.sourceBufferManagers_.length;t++)this.sourceBufferManagers_[t].reset(e)},t.prototype.reset=function(e,t){this.sourceBufferManagers_[e].reset(t)},t.prototype.changeQuality=function(e,t){return this.sourceBufferManagers_[e].changeQuality(t);
},t.prototype.endOfStream=function(){if(this.mediaSrc_&&"open"===this.mediaSrc_.readyState){for(var t=!1,n=0;n<this.sourceBufferManagers_.length;n++)if(this.sourceBufferManagers_[n].updating()){t=!0;break}t||(e.log("Ending stream"),this.mediaSrc_.endOfStream())}},t.prototype.absolutizeURL=function(e,t){if(void 0===t&&(t=""),t.match(/^[a-z]*:\/\//))return t;var n;return n="/"==t[0]?e.match(/^[a-z]*:\/\/[^\/]*/)[0]:e.replace(/\/[^\/]*$/,"/"),n+t},t.prototype.displaySourceBuffers=function(t){for(var n=0;n<this.mediaSrc_.sourceBuffers.length;n++){
var i=this.mediaSrc_.sourceBuffers[n];e.dlog(5,t+" SourceBuffer["+i.mime+"]: "+i.active)}},t.prototype.normalizeRepresentation=function(t){var n={url:this.absolutizeURL(this.manifest_.manifestURL,t.baseURLs[0]),bandwidth:t.bandwidth,width:t.width,height:t.height,sps:t.sps,pps:t.pps,audio_codec_private_data:t.audio_codec_private_data,audio_sample_rate:t.audio_sample_rate};if(this.type===e.StreamingType.SMOOTH_STREAMING)return n.segs=t.segs,n;var i=null;if(null!=t.segmentList){i=t.segmentList.initialization,
n.segs=[];for(var r=0;r<t.segmentList.segmentURLs.length;r++){var a=t.segmentList.segmentURLs[r],s={start:a.mediaRange.start,end:a.mediaRange.end,index:a.indexRange&&a.indexRange.end||null,time:t.segmentList.durationSeconds*r,duration:t.segmentList.durationSeconds,subsegments:null};n.segs.push(s)}}else if(null!=t.segmentTemplate){n.segs=[];var o=t.segmentTemplate.duration/t.segmentTemplate.timescale,s={url:n.url+t.segmentTemplate.initialization.replace("$RepresentationID$",t.id)};n.segs.push(s);for(var l=0;l*o<this.manifest_.duration;l++){
var s={start:-1,end:-1,index:null,time:l*o,duration:o,subsegments:null,url:n.url+t.segmentTemplate.media.replace("$RepresentationID$",t.id).replace("$Number$",l)};n.segs.push(s)}}else{var s={start:null,end:null,index:null,time:0,duration:this.manifest_.duration,subsegments:null};if(null!=t.segmentBase){var a=t.segmentBase;i=a.initialization,null!=a.indexRange&&(n.indexRequestData=a.indexRange)}n.segs=[s]}return this.type!==e.StreamingType.SMOOTH_STREAMING&&(n.initRequestData={start:i&&i.start||0,
end:i&&i.end||n.segs[0].index||null}),n},t.prototype.onSourceOpen=function(t,n,i){e.dlog(2,"onSourceOpen()");var r,a,s,o,l=this.video_;if(this.mediaSrc_.sourceBuffers.length)for(e.dlog(2,"onSourceOpen(): Target already has buffers, bailing."),s=0;s<this.mediaSrc_.sourceBuffers.length;s++)this.mediaSrc_.sourceBuffers[s].active=!0;else{for(this.mediaSrc_.duration=this.manifest_.duration,this.sourceBufferManagers_=[],this.emeMgr_=new e.EMEManager(l),this.type=this.manifest_.type,this.pr=this.manifest_.pr,
s=0;s<this.manifest_.adaptationSets.length;s++)if(o=this.manifest_.adaptationSets[s],!(o.mime&&o.mime.indexOf("webm")>=0)){o.contentProtection&&this.emeMgr_.init(o.contentProtection,options.flavor),r=o.representations.map(this.normalizeRepresentation.bind(this)),a=this.mediaSrc_.addSourceBuffer(o.mime+'; codecs="'+o.codecs+'"'),e.dlog(2,"Buffer added properly: "+(this.mediaSrc_.sourceBuffers[s]===a));var u=new e.SourceBufferManager(this.mediaSrc_,a,r,o.mime,this.type,this.pr);o.mime.indexOf("video")>=0&&(this.videoSrcBufIndex_=s),
this.sourceBufferManagers_.push(u),e.dlog(2,"onSourceOpen. Initialized SourceBuffer["+o.mime+"]")}n()}},t.prototype.isSupported=function(e){return(null!=window.MediaSource||null!=window.WebKitMediaSource)&&(null==window.MediaSource&&(window.MediaSource=window.WebKitMediaSource),!0)},t.prototype.init=function(){this.mediaSrc_=new MediaSource},t.prototype.attach=function(e,t,n,i){if(!this.mediaSrc_)throw new Error("MediaSourceManager has not been initialized, please call init()");this.manifest_=t,this.video_=e,
this.attachHandler_("sourceopen",this.onSourceOpen.bind(this,n,i)),this.attachHandler_("webkitsourceopen",this.onSourceOpen.bind(this,n,i)),this.createAndSetObjectURL_(e,this.mediaSrc_)},t.prototype.createAndSetObjectURL_=function(e,t){this.revokeObjectURL_(),this.videoURL=window.URL.createObjectURL(t),e.src=this.videoURL},t.prototype.revokeObjectURL_=function(){this.videoURL&&(window.URL.revokeObjectURL(this.videoURL),this.videoURL=null)},t.prototype.attachHandler_=function(e,t){this.attachedHandlers_[e]||(this.attachedHandlers_[e]=[]),
this.attachedHandlers_[e].push(t),this.mediaSrc_.addEventListener(e,t)},t.prototype.detachAllHandlers_=function(){var e,t=this.attachedHandlers_,n=this.mediaSrc_;for(var i in t){e=t[i];for(var r=0;r<e.length;r++)n.removeEventListener(i,e[r]);e.length=0}},e.MediaSourceManager=t}(),function(){var t=0,n=1,i=function(e){if(null==e)throw new Error("A url for the manifest is required");this.url_=e,this.callback_=null,this.manifest_=null};i.prototype.load=function(t){if(null==t)throw new Error("A callback is required");
this.callback_=t,this.requestManifest_(),e.dlog(1,"Sent request to get the manifest")},i.prototype.getManifest=function(){return this.manifest_},i.prototype.manifestType_=function(){return this.url_.lastIndexOf(".mpd")!=-1?t:n},i.prototype.requestManifest_=function(){var e=new XMLHttpRequest;e.addEventListener("load",this.onManifestLoad_.bind(this)),e.addEventListener("error",this.onManifestError_.bind(this)),e.open("GET",this.url_),e.send()},i.prototype.onManifestError_=function(t){var n="Error retrieving manifest from "+this.url_;
return e.log(n),this.callback_(n)},i.prototype.onManifestLoad_=function(i){e.dlog(2,"Manifest received");var r=null;if(i.target.status<200||i.target.status>299)return r="HTTP error "+i.target.status+" retrieving manifest from "+this.url_,e.log(r),this.callback_(r);switch(this.manifestType_()){case t:this.manifest_=e.parseDASHManifest(i.target.responseText,this.url_);break;case n:this.manifest_=e.parseSSManifest(i.target.responseText,this.url_)}return null===this.manifest_?(r="Error parsing the manifest",
e.log(r),this.callback_(r)):this.callback_(r,this.manifest_)},e.ManifestLoader=i}(),function(){var t=.99,n=.98,i=5e5,r=5e5,a=function(e,t,n){this.bitrates_=e,this.levelCount_=this.bitrates_.length,this.algorithm_=t||"adaptive",this.cooldownPeriod_=2,n&&(this.level_=parseInt(n))};a.prototype.onBandwithTracking=function(a){var s=a.target;if(null!=s.lastTime&&a.timeStamp!=s.lastTime){var o=8e3*(a.loaded-s.lastSize)/(a.timeStamp-s.lastTime);i=t*i+(1-t)*o,r=n*r+(1-n)*o}s.lastTime=a.timeStamp,s.lastSize=a.loaded,
e.dlog(5,"Calculated bandwidth: "+i+" "+r)},a.prototype.adapt=function(t){if(!this.bitrates_||this.bitrates_.length<=1)return-1;var n=-1;if("fixed"===this.algorithm_)n=this.level_;else if("random"===this.algorithm_)Math.random()>.5&&(n=Math.floor(Math.random()*this.levelCount_));else if("adaptive"===this.algorithm_)if(this.cooldownPeriod_)this.cooldownPeriod_--;else{var a=0,s=0,o=.85,l=Math.min(i,r);e.dlog(5,"Calculated Bandwidth: "+l+" globalSlowBandwidth: "+i+" globalFastBandwidth: "+r);for(var u=0;u<this.bitrates_.length;u++){
var c=this.bitrates_[u];c>a&&c<o*l-128e3&&(a=c,s=u)}if(s!==t)return e.dlog(2,"Selected new rate "+a+" for bandwidth "+l+" (from "+i+", "+r+")"),this.cooldownPeriod_=8,s}return t!==n&&n!==-1?(e.dlog(2,"Selected new bitrate level: "+n),n):-1},e.AdaptiveManager=a}(),function(){var t=function(e,t,n){this.mediaSrcMgr_=e,this.bufferIndex_=t,this.adaptiveManager_=n,this.fragmentRequest_=null};t.prototype.appendInit=function(){e.dlog(2,"Appending init ["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]: "+this.mediaSrcMgr_.getLevel(this.bufferIndex_)),
this.mediaSrcMgr_.initialize(this.bufferIndex_),this.mediaSrcMgr_.append(this.bufferIndex_,this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment)},t.prototype.onXHRAbort=function(t){e.log("Received abort of XHR.")},t.prototype.onXHRError=function(t){return this.fragmentRequest_!==t.target?void e.log("Received error of untracked XHR."):(e.log("Received error of XHR."),void(this.fragmentRequest_=null))},t.prototype.onXHRLoad=function(t){this.fragmentRequest_!==t.target&&e.log("Error, HTTP response for unknown request");
var n=this.fragmentRequest_;if(this.fragmentRequest_=null,n.readyState==n.DONE)return n.status>=300?void e.log("HTTP Request failure, status="+n.status):(n.is_index&&(e.dlog(2,"Index Response"),this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs=e.parseSIDX(n.response,n.startByte)),n.is_init?(e.dlog(2,"Init Response"),this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(n.response),void(this.mediaSrcMgr_.isInitialized(this.bufferIndex_)||this.appendInit())):void this.mediaSrcMgr_.appendData(this.bufferIndex_,n.response));
},t.prototype.cancelRequests=function(){null!=this.fragmentRequest_&&(this.fragmentRequest_.abort(),this.fragmentRequest_=null)},t.prototype.makeSSXHR=function(){var t=new XMLHttpRequest,n=this.mediaSrcMgr_.getSegIndex(this.bufferIndex_),i=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).url,r=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).bandwidth,a=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[n].timeURL;if(i=i.replace("{bitrate}",r),i=i.replace("{start time}",a),t.open("GET",i),
t.responseType="arraybuffer",t.addEventListener("load",this.onXHRLoad.bind(this)),t.addEventListener("error",this.onXHRError.bind(this)),t.addEventListener("abort",this.onXHRAbort.bind(this)),null==i)throw"Null URL";return t.is_init=!1,t.is_index=!1,t.lastTime=null,t.lastSize=null,t.addEventListener("progress",this.adaptiveManager_.onBandwithTracking.bind(this.adaptiveManager_)),t.send(),e.dlog(2,"Sent XHR: url="+i),t},t.prototype.makeXHR=function(t){var n,i,r=new XMLHttpRequest,a=this.mediaSrcMgr_.getSegIndex(this.bufferIndex_),s=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_),o=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).url,l=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[a],u=!1;
null==a&&(a=0),null!=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[a].url&&(o=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[a].url),t?(n=0,i=s.initRequestData.end,null!=s.indexRequestData&&(i=s.indexRequestData.end,u=!0)):(n=l.offset,i=l.offset+l.size-1);var c=null;null!=n&&null!=i&&(c="bytes="+n+"-"+i);var d=!!/youtube.com/.exec(o);if(c&&d&&(o=o.replace(/&range=[^&]*/,""),o+="&range="+c.substring(6)),r.open("GET",o),r.responseType="arraybuffer",r.startByte=n,null==c||d||r.setRequestHeader("Range",c),
r.addEventListener("load",this.onXHRLoad.bind(this)),null==o)throw"Null URL";return r.is_init=t,r.is_index=u,r.lastTime=null,r.lastSize=null,r.addEventListener("progress",this.adaptiveManager_.onBandwithTracking.bind(this.adaptiveManager_)),r.send(),e.dlog(2,"Sent XHR: url="+o+", range="+c),r},t.prototype.findRangeForPlaybackTime=function(e,t){for(var n=e.buffered,i=0;i<n.length;i++)if(n.start(i)<=t&&n.end(i)>=t)return{start:n.start(i),end:n.end(i)}},t.prototype.initFragmentRequestNeeded=function(){
if(null==this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment){e.dlog(2,"Creating Init segment["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]");var t=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_);if(this.mediaSrcMgr_.type===e.StreamingType.SMOOTH_STREAMING){var n={pps:t.pps,sps:t.sps,width:t.width,height:t.height,mime:this.mediaSrcMgr_.mime(this.bufferIndex_),pr:this.mediaSrcMgr_.pr,audio_codec_private_data:t.audio_codec_private_data,audio_sample_rate:t.audio_sample_rate},i=e.createSSInit(n);
return this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(i.data),this.appendInit(),!1}return this.fragmentRequest_=this.makeXHR(!0),!0}return this.mediaSrcMgr_.isInitialized(this.bufferIndex_)||this.appendInit(),!1},t.prototype.requestNextFragment=function(t,n){this.mediaSrcMgr_.type===e.StreamingType.SMOOTH_STREAMING?this.fragmentRequest_=this.makeSSXHR():this.fragmentRequest_=this.makeXHR(!1),this.fragmentRequest_.expected_time=n},t.prototype.tick=function(t){if(!this.mediaSrcMgr_.isActive(this.bufferIndex_))return e.dlog(4,"Not active["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"]"),
!1;if(this.fragmentRequest_)e.dlog(4,"Will not request next segment["+this.mediaSrcMgr_.mime(this.bufferIndex_)+"] request pending");else if(!this.initFragmentRequestNeeded()){var n=this.mediaSrcMgr_.identifyNextFragment(this.bufferIndex_,t);if(null!==n){var i=-1;this.mediaSrcMgr_.mime(this.bufferIndex_).indexOf("video")>=0&&(i=this.adaptiveManager_.adapt(this.mediaSrcMgr_.getLevel(this.bufferIndex_))),i>=0?(this.cancelRequests(),this.mediaSrcMgr_.changeQuality(this.bufferIndex_,i)):this.requestNextFragment(t,n);
}}return!0},e.FragmentManager=t}(),function(){function t(e){var t=new RegExp("[?&]"+e+"=([^&]*)"),n=t.exec(window.location.search);return null!=n?(n=n[1],/%/.exec(n)&&(n=decodeURIComponent(n)),n):null}function n(){for(var e={},n=["autoplay","algorithm","flavor","level","cc","url"],i=0;i<n.length;i++){var r=t(n[i]);e[n[i]]=r}if(e&&e.url)for(var a in e)e.hasOwnProperty(a)&&(this.options[a]=e[a])}var i={Audio_Type:"audio",Video_Type:"video",Image_Type:"img",MSE_Type:"mse"},r=function(t){t||(t={}),this.options=t,
this.mediaElementType_=null,this.manifestLoader_=null,this.closeCaptionsLoader_=null,this.progressTimer_=null,this.mediaSrcMgr_=new e.MediaSourceManager,this.fragmentManagers_=null,this.showControls_=t.showControls,this.mediaElement_=null,this.imageElement_=null,this.mediaEvents_=new Object,t.mediaElement?this.mediaElement_=t.mediaElement:t.imageElement?this.imageElement_=t.imageElement:this.createMediaElement(),e.player=this},a={AUTO_PAUSE_START:1,PAUSE_RESUME:5};r.prototype.destroy=function(){return this.destroyed_?void e.log("Refusing to destroy a second time"):(this.removeAllMediaEventListeners(),
this.mediaElementType_!==i.Image_Type&&this.mediaElement_.pause(),this.mediaElementType_===i.MSE_Type&&this.stopProgressTimer(),this.mediaSrcMgr_&&this.mediaSrcMgr_.destroy(),delete e.player,delete this.mediaElement_,delete this.imageElement_,void(this.destroyed_=!0))},r.prototype.getMediaElement=function(){return this.mediaElement_},r.prototype.onPause=function(t){e.log("Paused, auto="+this.mediaElement_.autopause_pending),this.mediaElement_.autopaused=this.mediaElement_.autopause_pending,this.mediaElement_.autopause_time=(new Date).getTime(),
this.mediaElement_.autopause_pending=!1},r.prototype.onPlay=function(t){e.log("Playing"),this.mediaElement_.autopause_pending=!1,this.mediaElement_.autopaused=!1,this.mediaElement_.autopause_time=null},r.prototype.onError=function(t){e.log("Error ("+this.mediaElement_.error.code+")")},r.prototype.cancelRequests=function(){for(var e=0;e<this.fragmentManagers_.length;e++)this.fragmentManagers_[e].cancelRequests()},r.prototype.onSeeking=function(t){e.log("Seeking"),this.cancelRequests(),this.mediaSrcMgr_.resetAll("seeking");
},r.prototype.onSeeked=function(t){e.log("Seeked")},r.prototype.onProgress=function(){var t=this.mediaSrcMgr_.getMediaSource();if(!t||"closed"===t.readyState)return void this.stopProgressTimer();var n=this.mediaElement_.currentTime;if(this.mediaElement_.error)return void e.dlog(2,"Video Error: "+this.mediaElement_.error);for(var i=!1,r=0,s=0,o=0;o<this.fragmentManagers_.length;o++)if(this.fragmentManagers_[o].tick(n)){var l=this.mediaSrcMgr_.getBufferSize(o,n);this.mediaElement_.paused?l>=a.PAUSE_RESUME&&s++:l<a.AUTO_PAUSE_START&&(i=!0);
}else r++;return r>0?void(r===this.fragmentManagers_.length&&this.mediaSrcMgr_.endOfStream()):void(this.mediaElement_.paused?this.mediaElement_.autopaused&&s===this.fragmentManagers_.length&&(e.dlog(2,"Autoresuming"),this.mediaElement_.play()):i&&(e.dlog(2,"Autopausing"),this.mediaElement_.autopause_pending=!0,this.mediaElement_.pause()))},r.prototype.createMediaElement=function(){var t=document.getElementById("mediaElement");this.mediaElement_=document.createElement(i.Video_Type),this.imageElement_=document.createElement(i.Image_Type),
t.appendChild(this.mediaElement_),t.appendChild(this.imageElement_),e.me=this.mediaElement_,e.img=this.imageElement_,this.showControls_?this.mediaElement_.hasAttribute("controls")||this.mediaElement_.setAttribute("controls","controls"):this.mediaElement_.hasAttribute("controls")&&this.mediaElement_.removeAttribute("controls")},r.prototype.showMediaElement=function(t){var n=document.getElementById("mediaElement");this.mediaElementType_===i.MSE_Type&&(this.removeMediaEventListener("seeking"),this.removeMediaEventListener("seeked"),
this.removeMediaEventListener("pause"),this.removeMediaEventListener("play"),this.removeMediaEventListener("error"),t!==i.MSE_Type&&(this.stopProgressTimer(),this.mediaSrcMgr_.destroy(),this.mediaSrcMgr_=new e.MediaSourceManager)),this.mediaElementType_!==i.Image_Type&&(this.mediaElement_.play(0),this.mediaElement_.pause());var r=n.children;if(r&&r.length>0)for(var a=0;a<r.length;a++)"VIDEO"===r[a].nodeName&&t!==i.Image_Type?r[a].style.display="block":"IMG"===r[a].nodeName&&t===i.Image_Type?r[a].style.display="block":(r[a].style.display="none",
r[a].src=null);this.mediaElementType_=t},r.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.mediaElement_.addEventListener(e,n),this.mediaEvents_[e]=n},r.prototype.removeMediaEventListener=function(e){this.mediaElement_.removeEventListener(e,this.mediaEvents_[e]),this.mediaEvents_[e]=null},r.prototype.removeAllMediaEventListeners=function(){for(var e in this.mediaEvents_)e&&this.removeMediaEventListener(e)},r.prototype.initMseVideoElement=function(e){e&&this.addCaptionInfo(e),
this.addMediaEventListener("seeking",this.onSeeking),this.addMediaEventListener("seeked",this.onSeeked),this.addMediaEventListener("pause",this.onPause),this.addMediaEventListener("play",this.onPlay),this.addMediaEventListener("error",this.onError),this.mediaElement_.autopause_pending=!1,this.options.autoplay?this.mediaElement_.autopaused=!0:this.mediaElement_.autopaused=!1,this.mediaElement_.seekingStatus="none"},r.prototype.onManifestLoad=function(t){return this.destroyed_?void e.log("Ignoring manifest load after destruction"):t?void e.log("Unable to load manifest"):void(this.options.cc?(this.closeCaptionsLoader_=new e.CloseCaptionsLoader(this.options.cc),
this.closeCaptionsLoader_.load(this.onLoadcloseCaptions.bind(this))):this.onLoadcloseCaptions.call(this))},r.prototype.addCaptionInfo=function(e){var t;t=this.mediaElement_.textTracks.length>0?this.mediaElement_.textTracks[0]:this.mediaElement_.addTextTrack("captions"),t.mode="showing";for(var n=e[0].start,i=e[0].end,r=[],a=0;a<e.length;a++){var s=new TextTrackCue(e[a].start,e[a].end,e[a].caption);if(n===e[a].start&&i===e[a].end&&r.push(s),n!==e[a].start||i!==e[a].end||a===e.length-1){for(var o=r.length-1;o>=0;o--)t.addCue(r[o]);
r.length=0,n=e[a].start,i=e[a].end,a<e.length&&r.push(s)}}},r.prototype.onMediaSourceManagerInitialized=function(t){if(this.destroyed_)return void e.log("Ignoring MediaSourceManager initialization after destruction");this.initMseVideoElement(t);for(var n=0;n<this.mediaSrcMgr_.getSourceBufferCount();n++)this.fragmentManagers_.push(new e.FragmentManager(this.mediaSrcMgr_,n,new e.AdaptiveManager(this.mediaSrcMgr_.getBitrates(n),this.options.algorithm,this.options.level)));this.startProgressTimer()},
r.prototype.initializeMsePlayer=function(e){var t=null;this.closeCaptionsLoader_&&(t=this.closeCaptionsLoader_.getCCInfo()),this.fragmentManagers_=[],this.mediaSrcMgr_.init(),this.mediaSrcMgr_.attach(this.mediaElement_,this.manifestLoader_.getManifest(),t,this.onMediaSourceManagerInitialized.bind(this,t))},r.prototype.stopProgressTimer=function(){null!==this.progressTimer_&&(e.dlog(2,"Deregistering progress timer"),window.clearInterval(this.progressTimer_),this.progressTimer_=null)},r.prototype.startProgressTimer=function(){
null===this.progressTimer_&&(e.dlog(2,"Starting progress timer"),this.progressTimer_=setInterval(this.onProgress.bind(this),250))},r.prototype.initializeSimplePlayer=function(e,t){e!==i.Image_Type?(this.mediaElement_.src=t,this.mediaElement_.play()):this.imageElement_.src=t},r.prototype.onLoadcloseCaptions=function(t){return this.destroyed_?void e.log("Ignoring close captions load after destruction"):t?void e.log("Unable to load close captions"):void this.initializeMsePlayer()},r.prototype.onManifestLoad=function(t){
return this.destroyed_?void e.log("Ignoring manifest load after destruction"):t?void e.log("Unable to load manifest"):void(this.options.cc?(this.closeCaptionsLoader_=new e.CloseCaptionsLoader(this.options.cc),this.closeCaptionsLoader_.load(this.onLoadcloseCaptions.bind(this))):this.onLoadcloseCaptions.call(this))},r.prototype.getMediaType=function(t){var n=t.length;if(n<5)return e.log("Error invalid url"),null;var r=t.substring(t.length-4,t.length);switch(r){case".webm":case".mkv":case".mp4":return i.Video_Type;
case".mp3":return i.Audio_Type;case".jpg":return i.Image_Type;case".mpd":return i.MSE_Type;default:return i.MSE_Type}},r.prototype.init=function(){if(e.log("-------- Initializing --------"),!this.mediaSrcMgr_.isSupported())return e.log("Incompatible browser: Media Source extensions not suported"),!1;if(n(),!this.options.url)return e.log("No manifest URL found, please provide one"),!1;var t=this.getMediaType(this.options.url);this.mediaElementType_=t,this.options.mediaElement||this.options.imageElement||this.showMediaElement(t),
t===i.MSE_Type?(this.manifestLoader_=new e.ManifestLoader(this.options.url),this.manifestLoader_.load(this.onManifestLoad.bind(this))):this.initializeSimplePlayer(t,this.options.url)},e.BasicPlayer=r}(),window.googledash=e}(),e.exports=googledash},function(e,t){"undefined"==typeof jwplayer&&(jwplayer=function(e){if(jwplayer.api)return jwplayer.api.selectPlayer(e)},jwplayer.version="6.8.4616",jwplayer.vid=document.createElement("video"),jwplayer.audio=document.createElement("audio"),jwplayer.source=document.createElement("source"),
function(e){function t(e){return function(){return l(e)}}function n(e,t,n,i,r){return function(){var a,o;if(r)n(e);else{try{if((a=e.responseXML)&&(o=a.firstChild,a.lastChild&&"parsererror"===a.lastChild.nodeName))return void(i&&i("Invalid XML"))}catch(l){}if(a&&o)return n(e);(a=s.parseXML(e.responseText))&&a.firstChild?(e=s.extend({},e,{responseXML:a}),n(e)):i&&i(e.responseText?"Invalid XML":t)}}}var i=document,r=window,a=navigator,s=e.utils=function(){};s.exists=function(e){switch(typeof e){case"string":
return 0<e.length;case"object":return null!==e;case"undefined":return!1}return!0},s.styleDimension=function(e){return e+(0<e.toString().indexOf("%")?"":"px")},s.getAbsolutePath=function(e,t){if(s.exists(t)||(t=i.location.href),s.exists(e)){var n;if(s.exists(e)){n=e.indexOf("://");var r=e.indexOf("?");n=0<n&&(0>r||r>n)}else n=void 0;if(n)return e;n=t.substring(0,t.indexOf("://")+3);var a,r=t.substring(n.length,t.indexOf("/",n.length+1));0===e.indexOf("/")?a=e.split("/"):(a=t.split("?")[0],a=a.substring(n.length+r.length+1,a.lastIndexOf("/")),
a=a.split("/").concat(e.split("/")));for(var o=[],l=0;l<a.length;l++)a[l]&&s.exists(a[l])&&"."!=a[l]&&(".."==a[l]?o.pop():o.push(a[l]));return n+r+"/"+o.join("/")}},s.extend=function(){var e=s.extend.arguments;if(1<e.length){for(var t=1;t<e.length;t++)s.foreach(e[t],function(t,n){try{s.exists(n)&&(e[0][t]=n)}catch(i){}});return e[0]}return null};var o=window.console=window.console||{log:function(){}};s.log=function(){var e=Array.prototype.slice.call(arguments,0);"object"==typeof o.log?o.log(e):o.log.apply(o,e);
};var l=s.userAgentMatch=function(e){return null!==a.userAgent.toLowerCase().match(e)};s.isIE=s.isMSIE=t(/msie/i),s.isFF=t(/firefox/i),s.isChrome=t(/chrome/i),s.isIPod=t(/iP(hone|od)/i),s.isIPad=t(/iPad/i),s.isSafari602=t(/Macintosh.*Mac OS X 10_8.*6\.0\.\d* Safari/i),s.isIETrident=function(e){return e?(e=parseFloat(e).toFixed(1),l(RegExp("msie\\s*"+e+"|trident/.+rv:\\s*"+e,"i"))):l(/msie|trident/i)},s.isSafari=function(){return l(/safari/i)&&!l(/chrome/i)&&!l(/chromium/i)&&!l(/android/i)},s.isIOS=function(e){
return l(e?RegExp("iP(hone|ad|od).+\\sOS\\s"+e,"i"):/iP(hone|ad|od)/i)},s.isAndroid=function(e,t){var n=!t||!l(/chrome\/[23456789]/i);return e?n&&l(RegExp("android.*"+e,"i")):n&&l(/android/i)},s.isMobile=function(){return s.isIOS()||s.isAndroid()},s.saveCookie=function(e,t){i.cookie="jwplayer."+e+"="+t+"; path=/"},s.getCookies=function(){for(var e={},t=i.cookie.split("; "),n=0;n<t.length;n++){var r=t[n].split("=");0===r[0].indexOf("jwplayer.")&&(e[r[0].substring(9,r[0].length)]=r[1])}return e},s.typeOf=function(e){
var t=typeof e;return"object"===t?e?e instanceof Array?"array":t:"null":t},s.translateEventResponse=function(t,n){var i=s.extend({},n);if(t!=e.events.JWPLAYER_FULLSCREEN||i.fullscreen)if("object"==typeof i.data){var r=i.data;delete i.data,i=s.extend(i,r)}else"object"==typeof i.metadata&&s.deepReplaceKeyName(i.metadata,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]);else i.fullscreen="true"==i.message,delete i.message;return s.foreach(["position","duration","offset"],function(e,t){
i[t]&&(i[t]=Math.round(1e3*i[t])/1e3)}),i},s.flashVersion=function(){if(s.isAndroid())return 0;var e,t=a.plugins;try{if("undefined"!==t&&(e=t["Shockwave Flash"]))return parseInt(e.description.replace(/\D+(\d+)\..*/,"$1"),10)}catch(n){}if("undefined"!=typeof r.ActiveXObject)try{if(e=new r.ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseInt(e.GetVariable("$version").split(" ")[1].split(",")[0],10)}catch(i){}return 0},s.getScriptPath=function(e){for(var t=i.getElementsByTagName("script"),n=0;n<t.length;n++){
var r=t[n].src;if(r&&0<=r.indexOf(e))return r.substr(0,r.indexOf(e))}return""},s.deepReplaceKeyName=function(t,n,i){switch(e.utils.typeOf(t)){case"array":for(var r=0;r<t.length;r++)t[r]=e.utils.deepReplaceKeyName(t[r],n,i);break;case"object":s.foreach(t,function(r,a){var s;if(n instanceof Array&&i instanceof Array){if(n.length!=i.length)return;s=n}else s=[n];for(var o=r,l=0;l<s.length;l++)o=o.replace(RegExp(n[l],"g"),i[l]);t[o]=e.utils.deepReplaceKeyName(a,n,i),r!=o&&delete t[r]})}return t};var u=s.pluginPathType={
ABSOLUTE:0,RELATIVE:1,CDN:2};s.getPluginPathType=function(e){if("string"==typeof e){e=e.split("?")[0];var t=e.indexOf("://");if(0<t)return u.ABSOLUTE;var n=e.indexOf("/");return e=s.extension(e),!(0>t&&0>n)||e&&isNaN(e)?u.RELATIVE:u.CDN}},s.getPluginName=function(e){return e.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")},s.getPluginVersion=function(e){return e.replace(/[^-]*-?([^\.]*).*$/,"$1")},s.isYouTube=function(e){return/^(http|\/\/).*(youtube\.com|youtu\.be)\/.+/.test(e)},s.youTubeID=function(e){
try{return/v[=\/]([^?&]*)|youtu\.be\/([^?]*)|^([\w-]*)$/i.exec(e).slice(1).join("").replace("?","")}catch(t){return""}},s.isRtmp=function(e,t){return 0===e.indexOf("rtmp")||"rtmp"==t},s.foreach=function(e,t){var n,i;for(n in e)"function"==s.typeOf(e.hasOwnProperty)?e.hasOwnProperty(n)&&(i=e[n],t(n,i)):(i=e[n],t(n,i))},s.isHTTPS=function(){return 0===r.location.href.indexOf("https")},s.repo=function(){var t="http://p.jwpcdn.com/"+e.version.split(/\W/).splice(0,2).join("/")+"/";try{s.isHTTPS()&&(t=t.replace("http://","https://ssl."));
}catch(n){}return t},s.ajax=function(e,t,i,a){var o;if(0<e.indexOf("#")&&(e=e.replace(/#.*$/,"")),e&&0<=e.indexOf("://")&&e.split("/")[2]!=r.location.href.split("/")[2]&&s.exists(r.XDomainRequest))o=new r.XDomainRequest,o.onload=n(o,e,t,i,a),o.ontimeout=o.onprogress=function(){},o.timeout=5e3;else{if(!s.exists(r.XMLHttpRequest))return i&&i(),o;var l=o=new r.XMLHttpRequest,u=e;o.onreadystatechange=function(){if(4===l.readyState)switch(l.status){case 200:n(l,u,t,i,a)();break;case 404:i("File not found");
}}}return o.overrideMimeType&&o.overrideMimeType("text/xml"),o.onerror=function(){i("Error loading file")},setTimeout(function(){try{o.open("GET",e,!0),o.send()}catch(t){i&&i(e)}},0),o},s.parseXML=function(e){var t;try{if(r.DOMParser){if(t=(new r.DOMParser).parseFromString(e,"text/xml"),t.childNodes&&t.childNodes.length&&"parsererror"==t.childNodes[0].firstChild.nodeName)return}else t=new r.ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)}catch(n){return}return t},s.filterPlaylist=function(e,t){
var n,i,r,a,o=[];for(n=0;n<e.length;n++)if(i=s.extend({},e[n]),i.sources=s.filterSources(i.sources),0<i.sources.length){for(r=0;r<i.sources.length;r++)a=i.sources[r],a.label||(a.label=r.toString());o.push(i)}if(t&&0===o.length)for(n=0;n<e.length;n++)if(i=s.extend({},e[n]),i.sources=s.filterSources(i.sources,!0),0<i.sources.length){for(r=0;r<i.sources.length;r++)a=i.sources[r],a.label||(a.label=r.toString());o.push(i)}return o},s.filterSources=function(t,n){var i,r,a=s.extensionmap;if(t){r=[];for(var o=0;o<t.length;o++){
var l=t[o].type,u=t[o].file;u&&(u=s.trim(u)),l||(l=a.extType(s.extension(u)),t[o].type=l),n?e.embed.flashCanPlay(u,l)&&(i||(i=l),l==i&&r.push(s.extend({},t[o]))):s.canPlayHTML5(l)&&(i||(i=l),l==i&&r.push(s.extend({},t[o])))}}return r},s.canPlayHTML5=function(t){return(!s.isAndroid()||"hls"!=t&&"m3u"!=t&&"m3u8"!=t)&&(t=s.extensionmap.types[t],!!t&&!!e.vid.canPlayType&&e.vid.canPlayType(t))},s.seconds=function(e){e=e.replace(",",".");var t=e.split(":"),n=0;return"s"==e.slice(-1)?n=parseFloat(e):"m"==e.slice(-1)?n=60*parseFloat(e):"h"==e.slice(-1)?n=3600*parseFloat(e):1<t.length?(n=parseFloat(t[t.length-1]),
n+=60*parseFloat(t[t.length-2]),3==t.length&&(n+=3600*parseFloat(t[t.length-3]))):n=parseFloat(e),n},s.serialize=function(e){return null==e?null:"true"==e.toString().toLowerCase()||"false"!=e.toString().toLowerCase()&&(isNaN(Number(e))||5<e.length||0===e.length?e:Number(e))}}(jwplayer),function(e){var t="video/",n=e.foreach,i={mp4:t+"mp4",vorbis:"audio/ogg",ogg:t+"ogg",webm:t+"webm",aac:"audio/mp4",mp3:"audio/mpeg",hls:"application/vnd.apple.mpegurl"},r={mp4:i.mp4,f4v:i.mp4,m4v:i.mp4,mov:i.mp4,m4a:i.aac,
f4a:i.aac,aac:i.aac,mp3:i.mp3,ogv:i.ogg,ogg:i.vorbis,oga:i.vorbis,webm:i.webm,m3u8:i.hls,hls:i.hls},t="video",t={flv:t,f4v:t,mov:t,m4a:t,m4v:t,mp4:t,aac:t,f4a:t,mp3:"sound",smil:"rtmp",m3u8:"hls",hls:"hls"},a=e.extensionmap={};n(r,function(e,t){a[e]={html5:t}}),n(t,function(e,t){a[e]||(a[e]={}),a[e].flash=t}),a.types=i,a.mimeType=function(e){var t;return n(i,function(n,i){!t&&i==e&&(t=n)}),t},a.extType=function(e){return a.mimeType(r[e])}}(jwplayer.utils),function(e){var t=e.loaderstatus={NEW:0,LOADING:1,
ERROR:2,COMPLETE:3},n=document;e.scriptloader=function(i){function r(){s=t.ERROR,l.sendEvent(o.ERROR)}function a(){s=t.COMPLETE,l.sendEvent(o.COMPLETE)}var s=t.NEW,o=jwplayer.events,l=new o.eventdispatcher;e.extend(this,l),this.load=function(){var l=e.scriptloader.loaders[i];if(!l||l.getStatus()!=t.NEW&&l.getStatus()!=t.LOADING){if(e.scriptloader.loaders[i]=this,s==t.NEW){s=t.LOADING;var u=n.createElement("script");u.addEventListener?(u.onload=a,u.onerror=r):u.readyState&&(u.onreadystatechange=function(){
("loaded"==u.readyState||"complete"==u.readyState)&&a()}),n.getElementsByTagName("head")[0].appendChild(u),u.src=i}}else l.addEventListener(o.ERROR,r),l.addEventListener(o.COMPLETE,a)},this.getStatus=function(){return s}},e.scriptloader.loaders={}}(jwplayer.utils),function(e){e.trim=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},e.pad=function(e,t,n){for(n||(n="0");e.length<t;)e=n+e;return e},e.xmlAttribute=function(e,t){for(var n=0;n<e.attributes.length;n++)if(e.attributes[n].name&&e.attributes[n].name.toLowerCase()==t.toLowerCase())return e.attributes[n].value.toString();
return""},e.extension=function(e){return e&&"rtmp"!=e.substr(0,4)?(e=e.substring(e.lastIndexOf("/")+1,e.length).split("?")[0].split("#")[0],-1<e.lastIndexOf(".")?e.substr(e.lastIndexOf(".")+1,e.length).toLowerCase():void 0):""},e.stringToColor=function(e){return e=e.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2"),3==e.length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)}}(jwplayer.utils),function(e){var t="touchmove",n="touchstart";e.touch=function(i){function r(e){
e.type==n?(l=!0,c=s(h.DRAG_START,e)):e.type==t?l&&(d||(a(h.DRAG_START,e,c),d=!0),a(h.DRAG,e)):(l&&(d?a(h.DRAG_END,e):(e.cancelBubble=!0,a(h.TAP,e))),l=d=!1,c=null)}function a(e,t,n){u[e]&&(t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault(),t=n?n:s(e,t))&&u[e](t)}function s(e,t){var n=null;if(t.touches&&t.touches.length?n=t.touches[0]:t.changedTouches&&t.changedTouches.length&&(n=t.changedTouches[0]),!n)return null;var i=o.getBoundingClientRect(),n={type:e,target:o,
x:n.pageX-window.pageXOffset-i.left,y:n.pageY,deltaX:0,deltaY:0};return e!=h.TAP&&c&&(n.deltaX=n.x-c.x,n.deltaY=n.y-c.y),n}var o=i,l=!1,u={},c=null,d=!1,h=e.touchEvents;return document.addEventListener(t,r),document.addEventListener("touchend",function(e){l&&d&&a(h.DRAG_END,e),l=d=!1,c=null}),document.addEventListener("touchcancel",r),i.addEventListener(n,r),i.addEventListener("touchend",r),this.addEventListener=function(e,t){u[e]=t},this.removeEventListener=function(e){delete u[e]},this}}(jwplayer.utils),
function(e){e.touchEvents={DRAG:"jwplayerDrag",DRAG_START:"jwplayerDragStart",DRAG_END:"jwplayerDragEnd",TAP:"jwplayerTap"}}(jwplayer.utils),function(e){e.key=function(t){var n,i,r;this.edition=function(){return r&&r.getTime()<(new Date).getTime()?"invalid":n},this.token=function(){return i},e.exists(t)||(t="");try{t=e.tea.decrypt(t,"36QXq4W@GSBV^teR");var a=t.split("/");(n=a[0])?/^(free|pro|premium|ads)$/i.test(n)?(i=a[1],a[2]&&0<parseInt(a[2])&&(r=new Date,r.setTime(String(a[2])))):n="invalid":n="free";
}catch(s){n="invalid"}}}(jwplayer.utils),function(e){var t=e.tea={};t.encrypt=function(e,r){if(0==e.length)return"";var a=t.strToLongs(i.encode(e));1>=a.length&&(a[1]=0);for(var s,o=t.strToLongs(i.encode(r).slice(0,16)),l=a.length,u=a[l-1],c=a[0],d=Math.floor(6+52/l),h=0;0<d--;){h+=2654435769,s=h>>>2&3;for(var p=0;p<l;p++)c=a[(p+1)%l],u=(u>>>5^c<<2)+(c>>>3^u<<4)^(h^c)+(o[3&p^s]^u),u=a[p]+=u}return a=t.longsToStr(a),n.encode(a)},t.decrypt=function(e,r){if(0==e.length)return"";for(var a,s=t.strToLongs(n.decode(e)),o=t.strToLongs(i.encode(r).slice(0,16)),l=s.length,u=s[l-1],c=s[0],d=2654435769*Math.floor(6+52/l);0!=d;){
a=d>>>2&3;for(var h=l-1;0<=h;h--)u=s[0<h?h-1:l-1],u=(u>>>5^c<<2)+(c>>>3^u<<4)^(d^c)+(o[3&h^a]^u),c=s[h]-=u;d-=2654435769}return s=t.longsToStr(s),s=s.replace(/\0+$/,""),i.decode(s)},t.strToLongs=function(e){for(var t=Array(Math.ceil(e.length/4)),n=0;n<t.length;n++)t[n]=e.charCodeAt(4*n)+(e.charCodeAt(4*n+1)<<8)+(e.charCodeAt(4*n+2)<<16)+(e.charCodeAt(4*n+3)<<24);return t},t.longsToStr=function(e){for(var t=Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(255&e[n],e[n]>>>8&255,e[n]>>>16&255,e[n]>>>24&255);
return t.join("")};var n={code:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e,t){var r,a,s,o,l,u,c=[],d="",h=n.code;if(u=("undefined"==typeof t?0:t)?i.encode(e):e,l=u.length%3,0<l)for(;3>l++;)d+="=",u+="\0";for(l=0;l<u.length;l+=3)r=u.charCodeAt(l),a=u.charCodeAt(l+1),s=u.charCodeAt(l+2),o=r<<16|a<<8|s,r=o>>18&63,a=o>>12&63,s=o>>6&63,o&=63,c[l/3]=h.charAt(r)+h.charAt(a)+h.charAt(s)+h.charAt(o);return c=c.join(""),c=c.slice(0,c.length-d.length)+d},decode:function(e,t){
t="undefined"!=typeof t&&t;var r,a,s,o,l,u,c=[],d=n.code;u=t?i.decode(e):e;for(var h=0;h<u.length;h+=4)r=d.indexOf(u.charAt(h)),a=d.indexOf(u.charAt(h+1)),o=d.indexOf(u.charAt(h+2)),l=d.indexOf(u.charAt(h+3)),s=r<<18|a<<12|o<<6|l,r=s>>>16&255,a=s>>>8&255,s&=255,c[h/4]=String.fromCharCode(r,a,s),64==l&&(c[h/4]=String.fromCharCode(r,a)),64==o&&(c[h/4]=String.fromCharCode(r));return o=c.join(""),t?i.decode(o):o}},i={encode:function(e){return e=e.replace(/[\u0080-\u07ff]/g,function(e){return e=e.charCodeAt(0),
String.fromCharCode(192|e>>6,128|63&e)}),e=e.replace(/[\u0800-\uffff]/g,function(e){return e=e.charCodeAt(0),String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e)})},decode:function(e){return e=e.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(e){return e=(15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2),String.fromCharCode(e)}),e=e.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(e){return e=(31&e.charCodeAt(0))<<6|63&e.charCodeAt(1),String.fromCharCode(e)})}};
}(jwplayer.utils),function(e){e.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_SETUP_ERROR:"jwplayerSetupError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",
JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_MEDIA_LEVELS:"jwplayerMediaLevels",JWPLAYER_MEDIA_LEVEL_CHANGED:"jwplayerMediaLevelChanged",JWPLAYER_CAPTIONS_CHANGED:"jwplayerCaptionsChanged",
JWPLAYER_CAPTIONS_LIST:"jwplayerCaptionsList",JWPLAYER_CAPTIONS_LOADED:"jwplayerCaptionsLoaded",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_PLAYLIST_COMPLETE:"jwplayerPlaylistComplete",JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_CONTROLS:"jwplayerViewControls",JWPLAYER_USER_ACTION:"jwplayerUserAction",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",
JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed",JWPLAYER_AD_TIME:"jwplayerAdTime",JWPLAYER_AD_ERROR:"jwplayerAdError",JWPLAYER_AD_CLICK:"jwplayerAdClicked",JWPLAYER_AD_COMPLETE:"jwplayerAdComplete",JWPLAYER_AD_IMPRESSION:"jwplayerAdImpression",JWPLAYER_AD_COMPANIONS:"jwplayerAdCompanions",JWPLAYER_AD_SKIPPED:"jwplayerAdSkipped"}}(jwplayer),function(e){var t=e.utils;e.events.eventdispatcher=function(n,i){function r(e,n,i){if(e)for(var r=0;r<e.length;r++){var a=e[r];if(a){null!==a.count&&0===--a.count&&delete e[r];
try{a.listener(n)}catch(s){t.log('Error handling "'+i+'" event listener ['+r+"]: "+s.toString(),a.listener,n)}}}}var a,s;this.resetEventListeners=function(){a={},s=[]},this.resetEventListeners(),this.addEventListener=function(e,n,i){try{t.exists(a[e])||(a[e]=[]),"string"==t.typeOf(n)&&(n=new Function("return "+n)()),a[e].push({listener:n,count:i||null})}catch(r){t.log("error",r)}return!1},this.removeEventListener=function(e,n){if(a[e]){try{for(var i=0;i<a[e].length;i++)if(a[e][i].listener.toString()==n.toString()){
a[e].splice(i,1);break}}catch(r){t.log("error",r)}return!1}},this.addGlobalListener=function(e,n){try{"string"==t.typeOf(e)&&(e=new Function("return "+e)()),s.push({listener:e,count:n||null})}catch(i){t.log("error",i)}return!1},this.removeGlobalListener=function(e){if(e){try{for(var n=s.length;n--;)s[n].listener.toString()==e.toString()&&s.splice(n,1)}catch(i){t.log("error",i)}return!1}},this.sendEvent=function(o,l){t.exists(l)||(l={}),t.extend(l,{id:n,version:e.version,type:o}),i&&t.log(o,l),r(a[o],l,o),
r(s,l,o)}}}(window.jwplayer),function(e){var t={},n={};e.plugins=function(){},e.plugins.loadPlugins=function(i,r){return n[i]=new e.plugins.pluginloader(new e.plugins.model(t),r),n[i]},e.plugins.registerPlugin=function(n,i,r,a){var s=e.utils.getPluginName(n);t[s]||(t[s]=new e.plugins.plugin(n)),t[s].registerPlugin(n,i,r,a)}}(jwplayer),function(e){e.plugins.model=function(t){this.addPlugin=function(n){var i=e.utils.getPluginName(n);return t[i]||(t[i]=new e.plugins.plugin(n)),t[i]},this.getPlugins=function(){
return t}}}(jwplayer),function(e){var t=jwplayer.utils,n=jwplayer.events;e.pluginmodes={FLASH:0,JAVASCRIPT:1,HYBRID:2},e.plugin=function(i){function r(){switch(t.getPluginPathType(i)){case t.pluginPathType.ABSOLUTE:return i;case t.pluginPathType.RELATIVE:return t.getAbsolutePath(i,window.location.href)}}function a(){c=setTimeout(function(){d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE)},1e3)}function s(){d=t.loaderstatus.ERROR,h.sendEvent(n.ERROR)}var o,l,u,c,d=t.loaderstatus.NEW,h=new n.eventdispatcher;
t.extend(this,h),this.load=function(){if(d==t.loaderstatus.NEW)if(0<i.lastIndexOf(".swf"))o=i,d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE);else if(t.getPluginPathType(i)==t.pluginPathType.CDN)d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE);else{d=t.loaderstatus.LOADING;var e=new t.scriptloader(r());e.addEventListener(n.COMPLETE,a),e.addEventListener(n.ERROR,s),e.load()}},this.registerPlugin=function(e,i,r,a){c&&(clearTimeout(c),c=void 0),u=i,r&&a?(o=a,l=r):"string"==typeof r?o=r:"function"==typeof r?l=r:!r&&!a&&(o=e),
d=t.loaderstatus.COMPLETE,h.sendEvent(n.COMPLETE)},this.getStatus=function(){return d},this.getPluginName=function(){return t.getPluginName(i)},this.getFlashPath=function(){if(o)switch(t.getPluginPathType(o)){case t.pluginPathType.ABSOLUTE:return o;case t.pluginPathType.RELATIVE:return 0<i.lastIndexOf(".swf")?t.getAbsolutePath(o,window.location.href):t.getAbsolutePath(o,r())}return null},this.getJS=function(){return l},this.getTarget=function(){return u},this.getPluginmode=function(){return"undefined"!=typeof o&&"undefined"!=typeof l?e.pluginmodes.HYBRID:"undefined"!=typeof o?e.pluginmodes.FLASH:"undefined"!=typeof l?e.pluginmodes.JAVASCRIPT:void 0;
},this.getNewInstance=function(e,t,n){return new l(e,t,n)},this.getURL=function(){return i}}}(jwplayer.plugins),function(e){var t=e.utils,n=e.events,i=t.foreach;e.plugins.pluginloader=function(r,a){function s(){d?p.sendEvent(n.ERROR,{message:l}):c||(c=!0,u=t.loaderstatus.COMPLETE,p.sendEvent(n.COMPLETE))}function o(){if(h||s(),!c&&!d){var n=0,i=r.getPlugins();t.foreach(h,function(r){r=t.getPluginName(r);var a=i[r];r=a.getJS();var o=a.getTarget(),a=a.getStatus();a==t.loaderstatus.LOADING||a==t.loaderstatus.NEW?n++:r&&(!o||parseFloat(o)>parseFloat(e.version))&&(d=!0,
l="Incompatible player version",s())}),0==n&&s()}}var l,u=t.loaderstatus.NEW,c=!1,d=!1,h=a,p=new n.eventdispatcher;t.extend(this,p),this.setupPlugins=function(e,n,a){var s={length:0,plugins:{}},o=0,l={},u=r.getPlugins();return i(n.plugins,function(i,r){var c=t.getPluginName(i),d=u[c],h=d.getFlashPath(),p=d.getJS(),f=d.getURL();h&&(s.plugins[h]=t.extend({},r),s.plugins[h].pluginmode=d.getPluginmode(),s.length++);try{if(p&&n.plugins&&n.plugins[f]){var m=document.createElement("div");m.id=e.id+"_"+c,
m.style.position="absolute",m.style.top=0,m.style.zIndex=o+10,l[c]=d.getNewInstance(e,t.extend({},n.plugins[f]),m),o++,e.onReady(a(l[c],m,!0)),e.onResize(a(l[c],m))}}catch(v){t.log("ERROR: Failed to load "+c+".")}}),e.plugins=l,s},this.load=function(){if(!t.exists(a)||"object"==t.typeOf(a)){u=t.loaderstatus.LOADING,i(a,function(e){t.exists(e)&&(e=r.addPlugin(e),e.addEventListener(n.COMPLETE,o),e.addEventListener(n.ERROR,f))});var e=r.getPlugins();i(e,function(e,t){t.load()})}o()};var f=this.pluginFailed=function(){
d||(d=!0,l="File not found",s())};this.getStatus=function(){return u}}}(jwplayer),function(){jwplayer.parsers={localName:function(e){return e?e.localName?e.localName:e.baseName?e.baseName:"":""},textContent:function(e){return e?e.textContent?jwplayer.utils.trim(e.textContent):e.text?jwplayer.utils.trim(e.text):"":""},getChildNode:function(e,t){return e.childNodes[t]},numChildren:function(e){return e.childNodes?e.childNodes.length:0}}}(jwplayer),function(e){var t=e.parsers;(t.jwparser=function(){}).parseEntry=function(n,i){
for(var r=[],a=[],s=e.utils.xmlAttribute,o=0;o<n.childNodes.length;o++){var l=n.childNodes[o];if("jwplayer"==l.prefix){var u=t.localName(l);"source"==u?(delete i.sources,r.push({file:s(l,"file"),"default":s(l,"default"),label:s(l,"label"),type:s(l,"type")})):"track"==u?(delete i.tracks,a.push({file:s(l,"file"),"default":s(l,"default"),kind:s(l,"kind"),label:s(l,"label")})):(i[u]=e.utils.serialize(t.textContent(l)),"file"==u&&i.sources&&delete i.sources)}i.file||(i.file=i.link)}if(r.length)for(i.sources=[],
o=0;o<r.length;o++)0<r[o].file.length&&(r[o].default="true"==r[o].default,r[o].label.length||delete r[o].label,i.sources.push(r[o]));if(a.length)for(i.tracks=[],o=0;o<a.length;o++)0<a[o].file.length&&(a[o].default="true"==a[o].default,a[o].kind=a[o].kind.length?a[o].kind:"captions",a[o].label.length||delete a[o].label,i.tracks.push(a[o]));return i}}(jwplayer),function(e){var t=jwplayer.utils,n=t.xmlAttribute,i=e.localName,r=e.textContent,a=e.numChildren,s=e.mediaparser=function(){};s.parseGroup=function(e,o){
var l,u,c=[];for(u=0;u<a(e);u++)if(l=e.childNodes[u],"media"==l.prefix&&i(l))switch(i(l).toLowerCase()){case"content":n(l,"duration")&&(o.duration=t.seconds(n(l,"duration"))),0<a(l)&&(o=s.parseGroup(l,o)),n(l,"url")&&(o.sources||(o.sources=[]),o.sources.push({file:n(l,"url"),type:n(l,"type"),width:n(l,"width"),label:n(l,"label")}));break;case"title":o.title=r(l);break;case"description":o.description=r(l);break;case"guid":o.mediaid=r(l);break;case"thumbnail":o.image||(o.image=n(l,"url"));break;case"group":
s.parseGroup(l,o);break;case"subtitle":var d={};if(d.file=n(l,"url"),d.kind="captions",0<n(l,"lang").length){var h=d;l=n(l,"lang");var p={zh:"Chinese",nl:"Dutch",en:"English",fr:"French",de:"German",it:"Italian",ja:"Japanese",pt:"Portuguese",ru:"Russian",es:"Spanish"};l=p[l]?p[l]:l,h.label=l}c.push(d)}for(o.hasOwnProperty("tracks")||(o.tracks=[]),u=0;u<c.length;u++)o.tracks.push(c[u]);return o}}(jwplayer.parsers),function(e){function t(t){for(var r={},a=0;a<t.childNodes.length;a++){var o=t.childNodes[a],l=s(o);
if(l)switch(l.toLowerCase()){case"enclosure":r.file=n.xmlAttribute(o,"url");break;case"title":r.title=i(o);break;case"guid":r.mediaid=i(o);break;case"pubdate":r.date=i(o);break;case"description":r.description=i(o);break;case"link":r.link=i(o);break;case"category":r.tags=r.tags?r.tags+i(o):i(o)}}return r=e.mediaparser.parseGroup(t,r),r=e.jwparser.parseEntry(t,r),new jwplayer.playlist.item(r)}var n=jwplayer.utils,i=e.textContent,r=e.getChildNode,a=e.numChildren,s=e.localName;e.rssparser={},e.rssparser.parse=function(e){
for(var n=[],i=0;i<a(e);i++){var o=r(e,i);if("channel"==s(o).toLowerCase())for(var l=0;l<a(o);l++){var u=r(o,l);"item"==s(u).toLowerCase()&&n.push(t(u))}}return n}}(jwplayer.parsers),function(e){e.playlist=function(t){var n=[];if("array"==e.utils.typeOf(t))for(var i=0;i<t.length;i++)n.push(new e.playlist.item(t[i]));else n.push(new e.playlist.item(t));return n}}(jwplayer),function(e){var t=e.item=function(n){var i=jwplayer.utils,r=i.extend({},t.defaults,n);r.tracks=n&&i.exists(n.tracks)?n.tracks:[],
0==r.sources.length&&(r.sources=[new e.source(r)]);for(var a=0;a<r.sources.length;a++){var s=r.sources[a].default;r.sources[a].default=!!s&&"true"==s.toString(),r.sources[a]=new e.source(r.sources[a])}if(r.captions&&!i.exists(n.tracks)){for(n=0;n<r.captions.length;n++)r.tracks.push(r.captions[n]);delete r.captions}for(a=0;a<r.tracks.length;a++)r.tracks[a]=new e.track(r.tracks[a]);return r};t.defaults={description:"",image:"",mediaid:"",title:"",sources:[],tracks:[]}}(jwplayer.playlist),function(e){
var t=jwplayer,n=t.utils,i=t.events,r=t.parsers;e.loader=function(){function t(t){try{var n=t.responseXML.childNodes;t="";for(var a=0;a<n.length&&(t=n[a],!(8!=t.nodeType));a++);if("xml"==r.localName(t)&&(t=t.nextSibling),"rss"!=r.localName(t))s("Not a valid RSS feed");else{var l=new e(r.rssparser.parse(t));o.sendEvent(i.JWPLAYER_PLAYLIST_LOADED,{playlist:l})}}catch(u){s()}}function a(e){s(e.match(/invalid/i)?"Not a valid RSS feed":"")}function s(e){o.sendEvent(i.JWPLAYER_ERROR,{message:e?e:"Error loading file"
})}var o=new i.eventdispatcher;n.extend(this,o),this.load=function(e){n.ajax(e,t,a)}}}(jwplayer.playlist),function(e){var t=jwplayer.utils,n={file:void 0,label:void 0,type:void 0,"default":void 0};e.source=function(e){var i=t.extend({},n);return t.foreach(n,function(n){t.exists(e[n])&&(i[n]=e[n],delete e[n])}),i.type&&0<i.type.indexOf("/")&&(i.type=t.extensionmap.mimeType(i.type)),"m3u8"==i.type&&(i.type="hls"),"smil"==i.type&&(i.type="rtmp"),i}}(jwplayer.playlist),function(e){var t=jwplayer.utils,n={
file:void 0,label:void 0,kind:"captions","default":!1};e.track=function(e){var i=t.extend({},n);return e||(e={}),t.foreach(n,function(n){t.exists(e[n])&&(i[n]=e[n],delete e[n])}),i}}(jwplayer.playlist),function(e){function t(e,t,i){var r=e.style;r.backgroundColor="#000",r.color="#FFF",r.width=n.styleDimension(i.width),r.height=n.styleDimension(i.height),r.display="table",r.opacity=1,i=document.createElement("p"),r=i.style,r.verticalAlign="middle",r.textAlign="center",r.display="table-cell",r.font="15px/20px Arial, Helvetica, sans-serif",
i.innerHTML=t.replace(":",":<br>"),e.innerHTML="",e.appendChild(i)}var n=e.utils,i=e.events,r=!0,a=!1,s=document,o=e.embed=function(l){function u(e,t){n.foreach(t,function(t,n){"function"==typeof e[t]&&e[t].call(e,n)})}function c(){if(!T)if("array"==n.typeOf(b.playlist)&&2>b.playlist.length&&(0==b.playlist.length||!b.playlist[0].sources||0==b.playlist[0].sources.length))p();else if(!C)if("string"==n.typeOf(b.playlist)){var t=new e.playlist.loader;t.addEventListener(i.JWPLAYER_PLAYLIST_LOADED,function(e){
b.playlist=e.playlist,C=a,c()}),t.addEventListener(i.JWPLAYER_ERROR,function(e){C=a,p(e)}),C=r,t.load(b.playlist)}else if(x.getStatus()==n.loaderstatus.COMPLETE){for(t=0;t<b.modes.length;t++)if(b.modes[t].type&&o[b.modes[t].type]){var s=n.extend({},b),h=new o[b.modes[t].type](v,b.modes[t],s,x,l);if(h.supportsConfig())return h.addEventListener(i.ERROR,d),h.embed(),u(l,s.events),l}var m;b.fallback?(m="No suitable players found and fallback enabled",_=setTimeout(function(){f(m,r)},10),n.log(m),new o.download(v,b,p)):(m="No suitable players found and fallback disabled",
f(m,a),n.log(m),v.parentNode.replaceChild(y,v))}}function d(e){m(P+e.message)}function h(e){m("Could not load plugins: "+e.message)}function p(e){m(e&&e.message?"Error loading playlist: "+e.message:P+"No playable sources found")}function f(e,t){_&&(clearTimeout(_),_=null),_=setTimeout(function(){_=null,l.dispatchEvent(i.JWPLAYER_SETUP_ERROR,{message:e,fallback:t})},0)}function m(e){T||(b.fallback?(T=r,t(v,e,b),f(e,r)):f(e,a))}var v,g,y,b=new o.config(l.config),w=b.width,S=b.height,P="Error loading player: ",x=e.plugins.loadPlugins(l.id,b.plugins),C=a,T=a,_=null;
return b.fallbackDiv&&(y=b.fallbackDiv,delete b.fallbackDiv),b.id=l.id,g=s.getElementById(l.id),b.aspectratio?l.config.aspectratio=b.aspectratio:delete l.config.aspectratio,v=s.createElement("div"),v.id=g.id,v.style.width=0<w.toString().indexOf("%")?w:w+"px",v.style.height=0<S.toString().indexOf("%")?S:S+"px",g.parentNode.replaceChild(v,g),this.embed=function(){T||(x.addEventListener(i.COMPLETE,c),x.addEventListener(i.ERROR,h),x.load())},this.errorScreen=m,this};e.embed.errorScreen=t}(jwplayer),function(e){
function t(e){if(e.playlist)for(var t=0;t<e.playlist.length;t++)e.playlist[t]=new r(e.playlist[t]);else{var a={};i.foreach(r.defaults,function(t){n(e,a,t)}),a.sources||(e.levels?(a.sources=e.levels,delete e.levels):(t={},n(e,t,"file"),n(e,t,"type"),a.sources=t.file?[t]:[])),e.playlist=[new r(a)]}}function n(e,t,n){i.exists(e[n])&&(t[n]=e[n],delete e[n])}var i=e.utils,r=e.playlist.item;(e.embed.config=function(n){var r={fallback:!0,height:270,primary:"html5",width:480,base:n.base?n.base:i.getScriptPath("jwplayer.js"),
aspectratio:""};n=i.extend(r,e.defaults,n);var r={type:"html5",src:n.base+"jwplayer.html5.js"},a={type:"flash",src:n.base+"jwplayer.flash.swf"};if(n.modes="flash"==n.primary?[a,r]:[r,a],n.listbar&&(n.playlistsize=n.listbar.size,n.playlistposition=n.listbar.position,n.playlistlayout=n.listbar.layout),n.flashplayer&&(a.src=n.flashplayer),n.html5player&&(r.src=n.html5player),t(n),a=n.aspectratio,"string"==typeof a&&i.exists(a)){var s=a.indexOf(":");-1==s?r=0:(r=parseFloat(a.substr(0,s)),a=parseFloat(a.substr(s+1)),
r=0>=r||0>=a?0:100*(a/r)+"%")}else r=0;return-1==n.width.toString().indexOf("%")?delete n.aspectratio:r?n.aspectratio=r:delete n.aspectratio,n}).addConfig=function(e,n){return t(n),i.extend(e,n)}}(jwplayer),function(e){var t=e.utils,n=document;e.embed.download=function(e,i,r){function a(e,i){for(var r=n.querySelectorAll(e),a=0;a<r.length;a++)t.foreach(i,function(e,t){r[a].style[e]=t})}function s(e,t,i){return e=n.createElement(e),t&&(e.className="jwdownload"+t),i&&i.appendChild(e),e}var o,l=t.extend({},i),u=l.width?l.width:480,c=l.height?l.height:320;
i=i.logo?i.logo:{prefix:t.repo(),file:"logo.png",margin:10};var d,h,p,f,l=l.playlist,m=["mp4","aac","mp3"];if(l&&l.length){for(f=l[0],o=f.sources,l=0;l<o.length;l++){var v=o[l],g=v.type?v.type:t.extensionmap.extType(t.extension(v.file));v.file&&t.foreach(m,function(e){g==m[e]?(d=v.file,h=f.image):t.isYouTube(v.file)&&(p=v.file)})}d?(o=d,r=h,e&&(l=s("a","display",e),s("div","icon",l),s("div","logo",l),o&&l.setAttribute("href",t.getAbsolutePath(o))),l="#"+e.id+" .jwdownload",e.style.width="",e.style.height="",
a(l+"display",{width:t.styleDimension(Math.max(320,u)),height:t.styleDimension(Math.max(180,c)),background:"black center no-repeat "+(r?"url("+r+")":""),backgroundSize:"contain",position:"relative",border:"none",display:"block"}),a(l+"display div",{position:"absolute",width:"100%",height:"100%"}),a(l+"logo",{top:i.margin+"px",right:i.margin+"px",background:"top right no-repeat url("+i.prefix+i.file+")"}),a(l+"icon",{background:"center no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgNJREFUeNrs28lqwkAYB/CZqNVDDj2r6FN41QeIy8Fe+gj6BL275Q08u9FbT8ZdwVfotSBYEPUkxFOoks4EKiJdaDuTjMn3wWBO0V/+sySR8SNSqVRKIR8qaXHkzlqS9jCfzzWcTCYp9hF5o+59sVjsiRzcegSckFzcjT+ruN80TeSlAjCAAXzdJSGPFXRpAAMYwACGZQkSdhG4WCzehMNhqV6vG6vVSrirKVEw66YoSqDb7cqlUilE8JjHd/y1MQefVzqdDmiaJpfLZWHgXMHn8F6vJ1cqlVAkEsGuAn83J4gAd2RZymQygX6/L1erVQt+9ZPWb+CDwcCC2zXGJaewl/DhcHhK3DVj+KfKZrMWvFarcYNLomAv4aPRSFZVlTlcSPA5fDweW/BoNIqFnKV53JvncjkLns/n/cLdS+92O7RYLLgsKfv9/t8XlDn4eDyiw+HA9Jyz2eyt0+kY2+3WFC5hluej0Ha7zQQq9PPwdDq1Et1sNsx/nFBgCqWJ8oAK1aUptNVqcYWewE4nahfU0YQnk4ntUEfGMIU2m01HoLaCKbTRaDgKtaVLk9tBYaBcE/6Artdr4RZ5TB6/dC+9iIe/WgAMYADDpAUJAxjAAAYwgGFZgoS/AtNNTF7Z2bL0BYPBV3Jw5xFwwWcYxgtBP5OkE8i9G7aWGOOCruvauwADALMLMEbKf4SdAAAAAElFTkSuQmCC)"
})):p?(i=p,e=s("iframe","",e),e.src="http://www.youtube.com/embed/"+t.youTubeID(i),e.width=u,e.height=c,e.style.border="none"):r()}}}(jwplayer),function(e){var t=e.utils,n=e.events,i={};(e.embed.flash=function(a,s,o,l,u){function c(e,t,n){var i=document.createElement("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function d(e,t,n){return function(){try{n&&document.getElementById(u.id+"_wrapper").appendChild(t);var i=document.getElementById(u.id).getPluginConfig("display");
"function"==typeof e.resize&&e.resize(i.width,i.height),t.style.left=i.x,t.style.top=i.h}catch(r){}}}function h(e){if(!e)return{};var n={},i=[];return t.foreach(e,function(e,r){var a=t.getPluginName(e);i.push(e),t.foreach(r,function(e,t){n[a+"."+e]=t})}),n.plugins=i.join(","),n}var p=new e.events.eventdispatcher,f=t.flashVersion();t.extend(this,p),this.embed=function(){if(o.id=u.id,10>f)return p.sendEvent(n.ERROR,{message:"Flash version must be 10.0 or greater"}),!1;var e,r,m=u.config.listbar,v=t.extend({},o);
if(a.id+"_wrapper"==a.parentNode.id)e=document.getElementById(a.id+"_wrapper");else{if(e=document.createElement("div"),r=document.createElement("div"),r.style.display="none",r.id=a.id+"_aspect",e.id=a.id+"_wrapper",e.style.position="relative",e.style.display="block",e.style.width=t.styleDimension(v.width),e.style.height=t.styleDimension(v.height),u.config.aspectratio){var g=parseFloat(u.config.aspectratio);r.style.display="block",r.style.marginTop=u.config.aspectratio,e.style.height="auto",e.style.display="inline-block",
m&&("bottom"==m.position?r.style.paddingBottom=m.size+"px":"right"==m.position&&(r.style.marginBottom=-1*m.size*(g/100)+"px"))}a.parentNode.replaceChild(e,a),e.appendChild(a),e.appendChild(r)}for(e=l.setupPlugins(u,v,d),0<e.length?t.extend(v,h(e.plugins)):delete v.plugins,"undefined"!=typeof v["dock.position"]&&"false"==v["dock.position"].toString().toLowerCase()&&(v.dock=v["dock.position"],delete v["dock.position"]),e=v.wmode?v.wmode:v.height&&40>=v.height?"transparent":"opaque",r="height width modes events primary base fallback volume".split(" "),
m=0;m<r.length;m++)delete v[r[m]];r=t.getCookies(),t.foreach(r,function(e,t){"undefined"==typeof v[e]&&(v[e]=t)}),r=window.location.href.split("/"),r.splice(r.length-1,1),r=r.join("/"),v.base=r+"/",i[a.id]=v,t.isIE()?(r='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" " width="100%" height="100%"id="'+a.id+'" name="'+a.id+'" tabindex=0"">',r+='<param name="movie" value="'+s.src+'">',r+='<param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always">',r+='<param name="seamlesstabbing" value="true">',
r+='<param name="wmode" value="'+e+'">',r+='<param name="bgcolor" value="#000000">',r+="</object>",a.outerHTML=r,e=document.getElementById(a.id)):(r=document.createElement("object"),r.setAttribute("type","application/x-shockwave-flash"),r.setAttribute("data",s.src),r.setAttribute("width","100%"),r.setAttribute("height","100%"),r.setAttribute("bgcolor","#000000"),r.setAttribute("id",a.id),r.setAttribute("name",a.id),r.setAttribute("tabindex",0),c(r,"allowfullscreen","true"),c(r,"allowscriptaccess","always"),
c(r,"seamlesstabbing","true"),c(r,"wmode",e),a.parentNode.replaceChild(r,a),e=r),u.config.aspectratio&&(e.style.position="absolute"),u.container=e,u.setPlayer(e,"flash")},this.supportsConfig=function(){if(f){if(!o)return!0;if("string"==t.typeOf(o.playlist))return!0;try{var e=o.playlist[0].sources;if("undefined"==typeof e)return!0;for(var n=0;n<e.length;n++)if(e[n].file&&r(e[n].file,e[n].type))return!0}catch(i){}}return!1}}).getVars=function(e){return i[e]};var r=e.embed.flashCanPlay=function(e,n){
if(t.isYouTube(e)||t.isRtmp(e,n)||"hls"==n)return!0;var i=t.extensionmap[n?n:t.extension(e)];return!!i&&!!i.flash}}(jwplayer),function(e){var t=e.utils,n=t.extensionmap,i=e.events;e.embed.html5=function(r,a,s,o,l){function u(e,t,n){return function(){try{var i=document.querySelector("#"+r.id+" .jwmain");n&&i.appendChild(t),"function"==typeof e.resize&&(e.resize(i.clientWidth,i.clientHeight),setTimeout(function(){e.resize(i.clientWidth,i.clientHeight)},400)),t.left=i.style.left,t.top=i.style.top}catch(a){}
}}function c(e){d.sendEvent(e.type,{message:"HTML5 player not found"})}var d=this,h=new i.eventdispatcher;t.extend(d,h),d.embed=function(){if(e.html5){o.setupPlugins(l,s,u),r.innerHTML="";var n=e.utils.extend({},s);delete n.volume,n=new e.html5.player(n),l.container=document.getElementById(l.id),l.setPlayer(n,"html5")}else n=new t.scriptloader(a.src),n.addEventListener(i.ERROR,c),n.addEventListener(i.COMPLETE,d.embed),n.load()},d.supportsConfig=function(){if(e.vid.canPlayType)try{if("string"==t.typeOf(s.playlist))return!0;
for(var i=s.playlist[0].sources,r=0;r<i.length;r++){var a,o=i[r].file,l=i[r].type;if(null!==navigator.userAgent.match(/BlackBerry/i)||t.isAndroid()&&("m3u"==t.extension(o)||"m3u8"==t.extension(o))||t.isRtmp(o,l))a=!1;else{var u,c=n[l?l:t.extension(o)];if(!c||c.flash&&!c.html5)u=!1;else{var d=c.html5,h=e.vid;if(d)try{u=!!h.canPlayType(d)}catch(p){u=!1}else u=!0}a=u}if(a)return!0}}catch(f){}return!1}}}(jwplayer),function(e){var t=e.embed,n=e.utils,i=/\.(js|swf)$/;e.embed=n.extend(function(r){function a(){
s="Adobe SiteCatalyst Error: Could not find Media Module"}var s,o=n.repo(),l=n.extend({},e.defaults),u=n.extend({},l,r.config),c=r.config,d=u.plugins,h=u.analytics,p=o+"jwpsrv.js",f=o+"sharing.js",m=o+"related.js",v=o+"gapro.js",l=e.key?e.key:l.key,g=new e.utils.key(l).edition(),d=d?d:{};switch("ads"==g&&u.advertising&&(i.test(u.advertising.client)?d[u.advertising.client]=u.advertising:d[o+u.advertising.client+".js"]=u.advertising),delete c.advertising,c.key=l,u.analytics&&i.test(u.analytics.client)&&(p=u.analytics.client),
delete c.analytics,h&&"ads"!==g&&delete h.enabled,"free"!=g&&h&&!1===h.enabled||(d[p]=h?h:{}),delete d.sharing,delete d.related,g){case"ads":if(c.sitecatalyst)try{window.s&&window.s.hasOwnProperty("Media")?new e.embed.sitecatalyst(r):a()}catch(y){a()}case"premium":u.related&&(i.test(u.related.client)&&(m=u.related.client),d[m]=u.related),u.ga&&(i.test(u.ga.client)&&(v=u.ga.client),d[v]=u.ga);case"pro":u.sharing&&(i.test(u.sharing.client)&&(f=u.sharing.client),d[f]=u.sharing),u.skin&&(c.skin=u.skin.replace(/^(beelden|bekle|five|glow|modieus|roundster|stormtrooper|vapor)$/i,n.repo()+"skins/$1.xml"));
}return c.plugins=d,r.config=c,r=new t(r),s&&r.errorScreen(s),r},e.embed)}(jwplayer),function(e){var t=jwplayer.utils;e.sitecatalyst=function(e){function n(e){h.debug&&t.log(e)}function i(e){return e=e.split("/"),e=e[e.length-1],e=e.split("?"),e[0]}function r(){if(!f){f=!0;var e=d.getPosition();n("stop: "+o+" : "+e),s.Media.stop(o,e)}}function a(){m||(r(),m=!0,n("close: "+o),s.Media.close(o),c=!0,u=0)}var o,l,u,c,d=e,h=t.extend({},d.config.sitecatalyst),p={onPlay:function(){if(!c){var e=d.getPosition();
f=!1,n("play: "+o+" : "+e),s.Media.play(o,e)}},onPause:r,onBuffer:r,onIdle:a,onPlaylistItem:function(e){try{c=!0,a(),u=0;var n;if(h.mediaName)n=h.mediaName;else{var r=d.getPlaylistItem(e.index);n=r.title?r.title:r.file?i(r.file):r.sources&&r.sources.length?i(r.sources[0].file):""}o=n,l=h.playerName?h.playerName:d.id}catch(s){t.log(s)}},onTime:function(){if(c){var e=d.getDuration();if(-1==e)return;m=f=c=!1,n("open: "+o+" : "+e+" : "+l),s.Media.open(o,e,l),n("play: "+o+" : 0"),s.Media.play(o,0)}if(e=d.getPosition(),
3<=Math.abs(e-u)){var t=u;n("seek: "+t+" to "+e),n("stop: "+o+" : "+t),s.Media.stop(o,t),n("play: "+o+" : "+e),s.Media.play(o,e)}u=e},onComplete:a},f=!0,m=!0;t.foreach(p,function(e){d[e](p[e])})}}(jwplayer.embed),function(e,t){var n=[],i=e.utils,r=e.events,a=r.state,s=document,o=e.api=function(n){function l(e,t){return function(n){return t(e,n)}}function u(e,t){return g[e]||(g[e]=[],d(r.JWPLAYER_PLAYER_STATE,function(t){var n=t.newstate;if(t=t.oldstate,n==e){var i=g[n];if(i)for(var r=0;r<i.length;r++){
var a=i[r];"function"==typeof a&&a.call(this,{oldstate:t,newstate:n})}}})),g[e].push(t),m}function c(e,t){try{e.jwAddEventListener(t,'function(dat) { jwplayer("'+m.id+'").dispatchEvent("'+t+'", dat); }')}catch(n){i.log("Could not add internal listener")}}function d(e,t){return v[e]||(v[e]=[],p&&y&&c(p,e)),v[e].push(t),m}function h(){if(y){if(p){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if("function"==typeof p[t]){switch(e.length){case 6:return p[t](e[0],e[1],e[2],e[3],e[4],e[5]);case 5:
return p[t](e[0],e[1],e[2],e[3],e[4]);case 4:return p[t](e[0],e[1],e[2],e[3]);case 3:return p[t](e[0],e[1],e[2]);case 2:return p[t](e[0],e[1]);case 1:return p[t](e[0])}return p[t]()}}return null}b.push(arguments)}var p,f,m=this,v={},g={},y=!1,b=[],w={},S={};m.container=n,m.id=n.id,m.getBuffer=function(){return h("jwGetBuffer")},m.getContainer=function(){return m.container},m.addButton=function(e,t,n,r){try{S[r]=n,h("jwDockAddButton",e,t,"jwplayer('"+m.id+"').callback('"+r+"')",r)}catch(a){i.log("Could not add dock button"+a.message);
}},m.removeButton=function(e){h("jwDockRemoveButton",e)},m.callback=function(e){S[e]&&S[e]()},m.forceState=function(e){return h("jwForceState",e),m},m.releaseState=function(){return h("jwReleaseState")},m.getDuration=function(){return h("jwGetDuration")},m.getFullscreen=function(){return h("jwGetFullscreen")},m.getHeight=function(){return h("jwGetHeight")},m.getLockState=function(){return h("jwGetLockState")},m.getMeta=function(){return m.getItemMeta()},m.getMute=function(){return h("jwGetMute")},
m.getPlaylist=function(){var e=h("jwGetPlaylist");return"flash"==m.renderingMode&&i.deepReplaceKeyName(e,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),e},m.getPlaylistItem=function(e){return i.exists(e)||(e=m.getPlaylistIndex()),m.getPlaylist()[e]},m.getPlaylistIndex=function(){return h("jwGetPlaylistIndex")},m.getPosition=function(){return h("jwGetPosition")},m.getRenderingMode=function(){return m.renderingMode},m.getState=function(){return h("jwGetState")},m.getVolume=function(){
return h("jwGetVolume")},m.getWidth=function(){return h("jwGetWidth")},m.setFullscreen=function(e){return i.exists(e)?h("jwSetFullscreen",e):h("jwSetFullscreen",!h("jwGetFullscreen")),m},m.setMute=function(e){return i.exists(e)?h("jwSetMute",e):h("jwSetMute",!h("jwGetMute")),m},m.lock=function(){return m},m.unlock=function(){return m},m.load=function(e){return h("jwLoad",e),m},m.playlistItem=function(e){return h("jwPlaylistItem",parseInt(e,10)),m},m.playlistPrev=function(){return h("jwPlaylistPrev"),
m},m.playlistNext=function(){return h("jwPlaylistNext"),m},m.resize=function(e,t){if("flash"!==m.renderingMode)h("jwResize",e,t);else{var n=s.getElementById(m.id+"_wrapper"),r=s.getElementById(m.id+"_aspect");r&&(r.style.display="none"),n&&(n.style.display="block",n.style.width=i.styleDimension(e),n.style.height=i.styleDimension(t))}return m},m.play=function(e){return e===t?(e=m.getState(),h(e==a.PLAYING||e==a.BUFFERING?"jwPause":"jwPlay")):h("jwPlay",e),m},m.pause=function(e){return e===t?(e=m.getState(),
h(e==a.PLAYING||e==a.BUFFERING?"jwPause":"jwPlay")):h("jwPause",e),m},m.stop=function(){return h("jwStop"),m},m.seek=function(e){return h("jwSeek",e),m},m.setVolume=function(e){return h("jwSetVolume",e),m},m.createInstream=function(){return new o.instream(this,p)},m.setInstream=function(e){return f=e},m.loadInstream=function(e,t){return f=m.setInstream(m.createInstream()).init(t),f.loadItem(e),f},m.getQualityLevels=function(){return h("jwGetQualityLevels")},m.getCurrentQuality=function(){return h("jwGetCurrentQuality");
},m.setCurrentQuality=function(e){h("jwSetCurrentQuality",e)},m.getCaptionsList=function(){return h("jwGetCaptionsList")},m.getCurrentCaptions=function(){return h("jwGetCurrentCaptions")},m.setCurrentCaptions=function(e){h("jwSetCurrentCaptions",e)},m.getControls=function(){return h("jwGetControls")},m.getSafeRegion=function(){return h("jwGetSafeRegion")},m.setControls=function(e){h("jwSetControls",e)},m.destroyPlayer=function(){h("jwPlayerDestroy")},m.playAd=function(t){var n=e(m.id).plugins;n.vast&&n.vast.jwPlayAd(t);
},m.pauseAd=function(){var t=e(m.id).plugins;t.vast?t.vast.jwPauseAd():h("jwPauseAd")};var P={onBufferChange:r.JWPLAYER_MEDIA_BUFFER,onBufferFull:r.JWPLAYER_MEDIA_BUFFER_FULL,onError:r.JWPLAYER_ERROR,onSetupError:r.JWPLAYER_SETUP_ERROR,onFullscreen:r.JWPLAYER_FULLSCREEN,onMeta:r.JWPLAYER_MEDIA_META,onMute:r.JWPLAYER_MEDIA_MUTE,onPlaylist:r.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:r.JWPLAYER_PLAYLIST_ITEM,onPlaylistComplete:r.JWPLAYER_PLAYLIST_COMPLETE,onReady:r.API_READY,onResize:r.JWPLAYER_RESIZE,
onComplete:r.JWPLAYER_MEDIA_COMPLETE,onSeek:r.JWPLAYER_MEDIA_SEEK,onTime:r.JWPLAYER_MEDIA_TIME,onVolume:r.JWPLAYER_MEDIA_VOLUME,onBeforePlay:r.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:r.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:r.JWPLAYER_DISPLAY_CLICK,onControls:r.JWPLAYER_CONTROLS,onQualityLevels:r.JWPLAYER_MEDIA_LEVELS,onQualityChange:r.JWPLAYER_MEDIA_LEVEL_CHANGED,onCaptionsList:r.JWPLAYER_CAPTIONS_LIST,onCaptionsChange:r.JWPLAYER_CAPTIONS_CHANGED,onAdError:r.JWPLAYER_AD_ERROR,onAdClick:r.JWPLAYER_AD_CLICK,
onAdImpression:r.JWPLAYER_AD_IMPRESSION,onAdTime:r.JWPLAYER_AD_TIME,onAdComplete:r.JWPLAYER_AD_COMPLETE,onAdCompanions:r.JWPLAYER_AD_COMPANIONS,onAdSkipped:r.JWPLAYER_AD_SKIPPED};i.foreach(P,function(e){m[e]=l(P[e],d)});var x={onBuffer:a.BUFFERING,onPause:a.PAUSED,onPlay:a.PLAYING,onIdle:a.IDLE};return i.foreach(x,function(e){m[e]=l(x[e],u)}),m.remove=function(){if(!y)throw"Cannot call remove() before player is ready";b=[],o.destroyPlayer(this.id)},m.setup=function(t){if(e.embed){var n=s.getElementById(m.id);
return n&&(t.fallbackDiv=n),n=m,b=[],o.destroyPlayer(n.id),n=e(m.id),n.config=t,new e.embed(n).embed(),n}return m},m.registerPlugin=function(t,n,i,r){e.plugins.registerPlugin(t,n,i,r)},m.setPlayer=function(e,t){p=e,m.renderingMode=t},m.detachMedia=function(){if("html5"==m.renderingMode)return h("jwDetachMedia")},m.attachMedia=function(e){if("html5"==m.renderingMode)return h("jwAttachMedia",e)},m.removeEventListener=function(e,t){var n=v[e];if(n)for(var i=n.length;i--;)n[i]===t&&n.splice(i,1)},m.dispatchEvent=function(e,t){
var n=v[e];if(n)for(var n=n.slice(0),a=i.translateEventResponse(e,t),s=0;s<n.length;s++){var o=n[s];if("function"==typeof o)try{e===r.JWPLAYER_PLAYLIST_LOADED&&i.deepReplaceKeyName(a.playlist,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),o.call(this,a)}catch(l){i.log("There was an error calling back an event handler")}}},m.dispatchInstreamEvent=function(e){f&&f.dispatchEvent(e,arguments)},m.callInternal=h,m.playerReady=function(e){for(y=!0,p||m.setPlayer(s.getElementById(e.id)),
m.container=s.getElementById(m.id),i.foreach(v,function(e){c(p,e)}),d(r.JWPLAYER_PLAYLIST_ITEM,function(){w={}}),d(r.JWPLAYER_MEDIA_META,function(e){i.extend(w,e.metadata)}),m.dispatchEvent(r.API_READY);0<b.length;)h.apply(this,b.shift())},m.getItemMeta=function(){return w},m.isBeforePlay=function(){return h("jwIsBeforePlay")},m.isBeforeComplete=function(){return h("jwIsBeforeComplete")},m};o.selectPlayer=function(e){var t;return i.exists(e)||(e=0),e.nodeType?t=e:"string"==typeof e&&(t=s.getElementById(e)),
t?(e=o.playerById(t.id))?e:o.addPlayer(new o(t)):"number"==typeof e?n[e]:null},o.playerById=function(e){for(var t=0;t<n.length;t++)if(n[t].id==e)return n[t];return null},o.addPlayer=function(e){for(var t=0;t<n.length;t++)if(n[t]==e)return e;return n.push(e),e},o.destroyPlayer=function(e){for(var t,r=-1,a=0;a<n.length;a++)n[a].id==e&&(r=a,t=n[a]);return 0<=r&&(e=t.id,a=s.getElementById(e+("flash"==t.renderingMode?"_wrapper":"")),i.clearCss&&i.clearCss("#"+e),a&&("html5"==t.renderingMode&&t.destroyPlayer(),
t=s.createElement("div"),t.id=e,a.parentNode.replaceChild(t,a)),n.splice(r,1)),null},e.playerReady=function(t){var n=e.api.playerById(t.id);n?n.playerReady(t):e.api.selectPlayer(t.id).playerReady(t)}}(window.jwplayer),function(e){var t=e.events,n=e.utils,i=t.state;e.api.instream=function(e,r){function a(t,n){return u[t]||(u[t]=[],r.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+e.id+'").dispatchInstreamEvent("'+t+'", dat); }')),u[t].push(n),this}function s(e,n){return c[e]||(c[e]=[],a(t.JWPLAYER_PLAYER_STATE,function(t){
var n=t.newstate,i=t.oldstate;if(n==e){var r=c[n];if(r)for(var a=0;a<r.length;a++){var s=r[a];"function"==typeof s&&s.call(this,{oldstate:i,newstate:n,type:t.type})}}})),c[e].push(n),this}var o,l,u={},c={},d=this;d.type="instream",d.init=function(){return e.callInternal("jwInitInstream"),d},d.loadItem=function(t,i){o=t,l=i||{},"array"==n.typeOf(t)?e.callInternal("jwLoadArrayInstream",o,l):e.callInternal("jwLoadItemInstream",o,l)},d.removeEvents=function(){u=c={}},d.removeEventListener=function(e,t){
var n=u[e];if(n)for(var i=n.length;i--;)n[i]===t&&n.splice(i,1)},d.dispatchEvent=function(e,t){var i=u[e];if(i)for(var i=i.slice(0),r=n.translateEventResponse(e,t[1]),a=0;a<i.length;a++){var s=i[a];"function"==typeof s&&s.call(this,r)}},d.onError=function(e){return a(t.JWPLAYER_ERROR,e)},d.onMediaError=function(e){return a(t.JWPLAYER_MEDIA_ERROR,e)},d.onFullscreen=function(e){return a(t.JWPLAYER_FULLSCREEN,e)},d.onMeta=function(e){return a(t.JWPLAYER_MEDIA_META,e)},d.onMute=function(e){return a(t.JWPLAYER_MEDIA_MUTE,e);
},d.onComplete=function(e){return a(t.JWPLAYER_MEDIA_COMPLETE,e)},d.onPlaylistComplete=function(e){return a(t.JWPLAYER_PLAYLIST_COMPLETE,e)},d.onPlaylistItem=function(e){return a(t.JWPLAYER_PLAYLIST_ITEM,e)},d.onTime=function(e){return a(t.JWPLAYER_MEDIA_TIME,e)},d.onBuffer=function(e){return s(i.BUFFERING,e)},d.onPause=function(e){return s(i.PAUSED,e)},d.onPlay=function(e){return s(i.PLAYING,e)},d.onIdle=function(e){return s(i.IDLE,e)},d.onClick=function(e){return a(t.JWPLAYER_INSTREAM_CLICK,e)},
d.onInstreamDestroyed=function(e){return a(t.JWPLAYER_INSTREAM_DESTROYED,e)},d.onAdSkipped=function(e){return a(t.JWPLAYER_AD_SKIPPED,e)},d.play=function(e){r.jwInstreamPlay(e)},d.pause=function(e){r.jwInstreamPause(e)},d.hide=function(){e.callInternal("jwInstreamHide")},d.destroy=function(){d.removeEvents(),e.callInternal("jwInstreamDestroy")},d.setText=function(e){r.jwInstreamSetText(e?e:"")},d.getState=function(){return r.jwInstreamState()},d.setClick=function(e){r.jwInstreamClick&&r.jwInstreamClick(e);
}}}(window.jwplayer),function(e){var t=e.api,n=t.selectPlayer;t.selectPlayer=function(t){return(t=n(t))?t:{registerPlugin:function(t,n,i){e.plugins.registerPlugin(t,n,i)}}}}(jwplayer)),e.exports=jwplayer},function(e,t){var n=function(){function e(){if(!q){try{var e=U.getElementsByTagName("body")[0].appendChild(g("span"));e.parentNode.removeChild(e)}catch(t){return}q=!0;for(var n=B.length,i=0;i<n;i++)B[i]()}}function t(e){q?e():B[B.length]=e}function i(e){if(typeof N.addEventListener!=I)N.addEventListener("load",e,!1);else if(typeof U.addEventListener!=I)U.addEventListener("load",e,!1);else if(typeof N.attachEvent!=I)y(N,"onload",e);else if("function"==typeof N.onload){
var t=N.onload;N.onload=function(){t(),e()}}else N.onload=e}function r(){j?a():s()}function a(){var e=U.getElementsByTagName("body")[0],t=g(A);t.setAttribute("type",R);var n=e.appendChild(t);if(n){var i=0;!function(){if(typeof n.GetVariable!=I){var r=n.GetVariable("$version");r&&(r=r.split(" ")[1].split(","),Q.pv=[parseInt(r[0],10),parseInt(r[1],10),parseInt(r[2],10)])}else if(i<10)return i++,void setTimeout(arguments.callee,10);e.removeChild(t),n=null,s()}()}else s()}function s(){var e=z.length;if(e>0)for(var t=0;t<e;t++){
var n=z[t].id,i=z[t].callbackFn,r={success:!1,id:n};if(Q.pv[0]>0){var a=v(n);if(a)if(!b(z[t].swfVersion)||Q.wk&&Q.wk<312)if(z[t].expressInstall&&l()){var s={};s.data=z[t].expressInstall,s.width=a.getAttribute("width")||"0",s.height=a.getAttribute("height")||"0",a.getAttribute("class")&&(s.styleclass=a.getAttribute("class")),a.getAttribute("align")&&(s.align=a.getAttribute("align"));for(var d={},h=a.getElementsByTagName("param"),p=h.length,f=0;f<p;f++)"movie"!=h[f].getAttribute("name").toLowerCase()&&(d[h[f].getAttribute("name")]=h[f].getAttribute("value"));
u(s,d,n,i)}else c(a),i&&i(r);else S(n,!0),i&&(r.success=!0,r.ref=o(n),i(r))}else if(S(n,!0),i){var m=o(n);m&&typeof m.SetVariable!=I&&(r.success=!0,r.ref=m),i(r)}}}function o(e){var t=null,n=v(e);if(n&&"OBJECT"==n.nodeName)if(typeof n.SetVariable!=I)t=n;else{var i=n.getElementsByTagName(A)[0];i&&(t=i)}return t}function l(){return!W&&b("6.0.65")&&(Q.win||Q.mac)&&!(Q.wk&&Q.wk<312)}function u(e,t,n,i){W=!0,T=i||null,_={success:!1,id:n};var r=v(n);if(r){"OBJECT"==r.nodeName?(x=d(r),C=null):(x=r,C=n),
e.id=O,(typeof e.width==I||!/%$/.test(e.width)&&parseInt(e.width,10)<310)&&(e.width="310"),(typeof e.height==I||!/%$/.test(e.height)&&parseInt(e.height,10)<137)&&(e.height="137"),U.title=U.title.slice(0,47)+" - Flash Player Installation";var a=Q.ie&&Q.win?"ActiveX":"PlugIn",s="MMredirectURL="+N.location.toString().replace(/&/g,"%26")+"&MMplayerType="+a+"&MMdoctitle="+U.title;if(typeof t.flashvars!=I?t.flashvars+="&"+s:t.flashvars=s,Q.ie&&Q.win&&4!=r.readyState){var o=g("div");n+="SWFObjectNew",o.setAttribute("id",n),
r.parentNode.insertBefore(o,r),r.style.display="none",function(){4==r.readyState?r.parentNode.removeChild(r):setTimeout(arguments.callee,10)}()}h(e,t,n)}}function c(e){if(Q.ie&&Q.win&&4!=e.readyState){var t=g("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(d(e),t),e.style.display="none",function(){4==e.readyState?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(d(e),e)}function d(e){var t=g("div");if(Q.win&&Q.ie)t.innerHTML=e.innerHTML;else{
var n=e.getElementsByTagName(A)[0];if(n){var i=n.childNodes;if(i)for(var r=i.length,a=0;a<r;a++)1==i[a].nodeType&&"PARAM"==i[a].nodeName||8==i[a].nodeType||t.appendChild(i[a].cloneNode(!0))}}return t}function h(e,t,n){var i,r=v(n);if(Q.wk&&Q.wk<312)return i;if(r)if(typeof e.id==I&&(e.id=n),Q.ie&&Q.win){var a="";for(var s in e)e[s]!=Object.prototype[s]&&("data"==s.toLowerCase()?t.movie=e[s]:"styleclass"==s.toLowerCase()?a+=' class="'+e[s]+'"':"classid"!=s.toLowerCase()&&(a+=" "+s+'="'+e[s]+'"'));var o="";
for(var l in t)t[l]!=Object.prototype[l]&&(o+='<param name="'+l+'" value="'+t[l]+'" />');r.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+a+">"+o+"</object>",V[V.length]=e.id,i=v(e.id)}else{var u=g(A);u.setAttribute("type",R);for(var c in e)e[c]!=Object.prototype[c]&&("styleclass"==c.toLowerCase()?u.setAttribute("class",e[c]):"classid"!=c.toLowerCase()&&u.setAttribute(c,e[c]));for(var d in t)t[d]!=Object.prototype[d]&&"movie"!=d.toLowerCase()&&p(u,d,t[d]);r.parentNode.replaceChild(u,r),
i=u}return i}function p(e,t,n){var i=g("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function f(e){var t=v(e);t&&"OBJECT"==t.nodeName&&(Q.ie&&Q.win?(t.style.display="none",function(){4==t.readyState?m(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function m(e){var t=v(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function v(e){var t=null;try{t=U.getElementById(e)}catch(n){}return t}function g(e){return U.createElement(e);
}function y(e,t,n){e.attachEvent(t,n),H[H.length]=[e,t,n]}function b(e){var t=Q.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]}function w(e,t,n,i){if(!Q.ie||!Q.mac){var r=U.getElementsByTagName("head")[0];if(r){var a=n&&"string"==typeof n?n:"screen";if(i&&(E=null,k=null),!E||k!=a){var s=g("style");s.setAttribute("type","text/css"),s.setAttribute("media",a),E=r.appendChild(s),Q.ie&&Q.win&&typeof U.styleSheets!=I&&U.styleSheets.length>0&&(E=U.styleSheets[U.styleSheets.length-1]),
k=a}Q.ie&&Q.win?E&&typeof E.addRule==A&&E.addRule(e,t):E&&typeof U.createTextNode!=I&&E.appendChild(U.createTextNode(e+" {"+t+"}"))}}}function S(e,t){if(K){var n=t?"visible":"hidden";q&&v(e)?v(e).style.visibility=n:w("#"+e,"visibility:"+n)}}function P(e){var t=/[\\\"<>\.;]/,n=null!=t.exec(e);return n&&typeof encodeURIComponent!=I?encodeURIComponent(e):e}var x,C,T,_,E,k,I="undefined",A="object",M="Shockwave Flash",D="ShockwaveFlash.ShockwaveFlash",R="application/x-shockwave-flash",O="SWFObjectExprInst",L="onreadystatechange",N=window,U=document,F=navigator,j=!1,B=[r],z=[],V=[],H=[],q=!1,W=!1,K=!0,Q=function(){
var e=typeof U.getElementById!=I&&typeof U.getElementsByTagName!=I&&typeof U.createElement!=I,t=F.userAgent.toLowerCase(),n=F.platform.toLowerCase(),i=n?/win/.test(n):/win/.test(t),r=n?/mac/.test(n):/mac/.test(t),a=!!/webkit/.test(t)&&parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),s=!1,o=[0,0,0],l=null;if(typeof F.plugins!=I&&typeof F.plugins[M]==A)l=F.plugins[M].description,!l||typeof F.mimeTypes!=I&&F.mimeTypes[R]&&!F.mimeTypes[R].enabledPlugin||(j=!0,s=!1,l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),
o[0]=parseInt(l.replace(/^(.*)\..*$/,"$1"),10),o[1]=parseInt(l.replace(/^.*\.(.*)\s.*$/,"$1"),10),o[2]=/[a-zA-Z]/.test(l)?parseInt(l.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof N.ActiveXObject!=I)try{var u=new ActiveXObject(D);u&&(l=u.GetVariable("$version"),l&&(s=!0,l=l.split(" ")[1].split(","),o=[parseInt(l[0],10),parseInt(l[1],10),parseInt(l[2],10)]))}catch(c){}return{w3:e,pv:o,wk:a,ie:s,win:i,mac:r}}();(function(){Q.w3&&((typeof U.readyState!=I&&"complete"==U.readyState||typeof U.readyState==I&&(U.getElementsByTagName("body")[0]||U.body))&&e(),
q||(typeof U.addEventListener!=I&&U.addEventListener("DOMContentLoaded",e,!1),Q.ie&&Q.win&&(U.attachEvent(L,function(){"complete"==U.readyState&&(U.detachEvent(L,arguments.callee),e())}),N==top&&!function(){if(!q){try{U.documentElement.doScroll("left")}catch(t){return void setTimeout(arguments.callee,0)}e()}}()),Q.wk&&!function(){if(!q)return/loaded|complete/.test(U.readyState)?void e():void setTimeout(arguments.callee,0)}(),i(e)))})(),function(){Q.ie&&Q.win&&window.attachEvent("onunload",function(){
for(var e=H.length,t=0;t<e;t++)H[t][0].detachEvent(H[t][1],H[t][2]);for(var i=V.length,r=0;r<i;r++)f(V[r]);for(var a in Q)Q[a]=null;Q=null;for(var s in n)n[s]=null;n=null})}();return{registerObject:function(e,t,n,i){if(Q.w3&&e&&t){var r={};r.id=e,r.swfVersion=t,r.expressInstall=n,r.callbackFn=i,z[z.length]=r,S(e,!1)}else i&&i({success:!1,id:e})},getObjectById:function(e){if(Q.w3)return o(e)},embedSWF:function(e,n,i,r,a,s,o,c,d,p){var f={success:!1,id:n};Q.w3&&!(Q.wk&&Q.wk<312)&&e&&n&&i&&r&&a?(S(n,!1),
t(function(){i+="",r+="";var t={};if(d&&typeof d===A)for(var m in d)t[m]=d[m];t.data=e,t.width=i,t.height=r;var v={};if(c&&typeof c===A)for(var g in c)v[g]=c[g];if(o&&typeof o===A)for(var y in o)typeof v.flashvars!=I?v.flashvars+="&"+y+"="+o[y]:v.flashvars=y+"="+o[y];if(b(a)){var w=h(t,v,n);t.id==n&&S(n,!0),f.success=!0,f.ref=w}else{if(s&&l())return t.data=s,void u(t,v,n,p);S(n,!0)}p&&p(f)})):p&&p(f)},switchOffAutoHideShow:function(){K=!1},ua:Q,getFlashPlayerVersion:function(){return{major:Q.pv[0],
minor:Q.pv[1],release:Q.pv[2]}},hasFlashPlayerVersion:b,createSWF:function(e,t,n){return Q.w3?h(e,t,n):void 0},showExpressInstall:function(e,t,n,i){Q.w3&&l()&&u(e,t,n,i)},removeSWF:function(e){Q.w3&&f(e)},createCSS:function(e,t,n,i){Q.w3&&w(e,t,n,i)},addDomLoadEvent:t,addLoadEvent:i,getQueryParamValue:function(e){var t=U.location.search||U.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return P(t);for(var n=t.split("&"),i=0;i<n.length;i++)if(n[i].substring(0,n[i].indexOf("="))==e)return P(n[i].substring(n[i].indexOf("=")+1));
}return""},expressInstallCallback:function(){if(W){var e=v(O);e&&x&&(e.parentNode.replaceChild(x,e),C&&(S(C,!0),Q.ie&&Q.win&&(x.style.display="block")),T&&T(_)),W=!1}}}}();e.exports=n},function(e,t){},function(e,t){e.exports={container:"Measure-container-1oSok",scrollContainer:"Measure-scrollContainer-XDXhZ",expandContent:"Measure-expandContent-2j6fO",shrinkContent:"Measure-shrinkContent-1ZPYn Measure-expandContent-2j6fO"}},function(e,t){e.exports={page:"PhotoAlbumDetailsView-page-ssOMe"}},function(e,t){
e.exports={settingsContainer:"AccountSettingsView-settingsContainer-3lEFW",sidebarContainer:"AccountSettingsView-sidebarContainer-u02VY resetFont-resetFont-GoU5_",pageContainer:"AccountSettingsView-pageContainer-176-s"}},function(e,t){e.exports={anagram:"Anagram-anagram-39ajt"}},function(e,t){e.exports={badge:"Badge-badge-3ZQoD",isHidden:"Badge-isHidden-3yWIV","default":"Badge-default-112l0",primary:"Badge-primary-3bxe7",success:"Badge-success-3y0xB",danger:"Badge-danger-1rqm4"}},function(e,t){e.exports={
contents:"CollapsibleText-contents-DLstZ",divider:"CollapsibleText-divider-3kXr4",toggle:"CollapsibleText-toggle-3axSt"}},function(e,t){e.exports={disclosureArrow:"DisclosureArrow-disclosureArrow-4Pa5f","default":"DisclosureArrow-default-298Tb",primary:"DisclosureArrow-primary-VQCL_",success:"DisclosureArrow-success-1Q1Xh",danger:"DisclosureArrow-danger-2rmeZ",small:"DisclosureArrow-small-3wfHo",up:"DisclosureArrow-up-1lliy",down:"DisclosureArrow-down-10vJj",right:"DisclosureArrow-right-3eHYd",left:"DisclosureArrow-left-32B9y",
medium:"DisclosureArrow-medium-1-SCw",large:"DisclosureArrow-large-3ef1m",isSelected:"DisclosureArrow-isSelected-1Nyvd"}},function(e,t){e.exports={plexPassIcon:"PlexPassBadge-plexPassIcon-3MIvo"}},function(e,t){e.exports={scroller:"Scroller-scroller-116Av",none:"Scroller-none-3S1mG",vertical:"Scroller-vertical-2IRDv",auto:"Scroller-auto-3EJeK",horizontal:"Scroller-horizontal-3NpG8",omni:"Scroller-omni-1qlEj"}},function(e,t){e.exports={slider:"Slider-slider-K8cT9",thumb:"Slider-thumb-TqUXp Link-link-5rkZv",
isDragging:"Slider-isDragging-2HSnI",hasAutoHideThumb:"Slider-hasAutoHideThumb-1z9FD",track:"Slider-track-2AXv0 absoluteCenter-absoluteCenter-1jDHd",fill:"Slider-fill-1bnYC"}},function(e,t){e.exports={spinner:"Spinner-spinner-3jChT spin-spin-2Djb5",spinnerContainer:"Spinner-spinnerContainer-17f1b",spinnerLabel:"Spinner-spinnerLabel-2oFjm",small:"Spinner-small-2xeXE Spinner-spinner-3jChT spin-spin-2Djb5",medium:"Spinner-medium-wiHhv Spinner-spinner-3jChT spin-spin-2Djb5",large:"Spinner-large-1YoJp Spinner-spinner-3jChT spin-spin-2Djb5"
}},function(e,t){e.exports={button:"Button-button-1kwns Link-link-5rkZv","default":"Button-default-nIbzg",primary:"Button-primary-1_XVl",success:"Button-success-3nLyc",danger:"Button-danger-2L1CF",small:"Button-small-2uQB7",medium:"Button-medium-1khNu",large:"Button-large-1MXVD"}},function(e,t){e.exports={button:"DisclosureArrowButton-button-2Qja4"}},function(e,t){e.exports={link:"Link-link-5rkZv","default":"Link-default-2S6gV",primary:"Link-primary-2CG6h",success:"Link-success-10Cqv",danger:"Link-danger-3Epdw",
small:"Link-small-ULtPk",medium:"Link-medium-SskbP",large:"Link-large-2-nFd",isSelected:"Link-isSelected-2qunu"}},function(e,t){e.exports={playButton:"PlayButton-playButton-1iAGl",playCircle:"PlayButton-playCircle-2IY6H absoluteCenter-absoluteCenter-1jDHd",playIcon:"PlayButton-playIcon-330_d"}},function(e,t){e.exports={button:"SpinnerButton-button-2t-EU Button-button-1kwns Link-link-5rkZv",spinnerContainer:"SpinnerButton-spinnerContainer-37JWu",spinner:"SpinnerButton-spinner-2tJTD Spinner-spinner-3jChT spin-spin-2Djb5",
label:"SpinnerButton-label-3P3t2",isSpinning:"SpinnerButton-isSpinning-cBo4-"}},function(e,t){e.exports={input:"CheckInput-input-2wxri",label:"CheckInput-label-2zld0",hasError:"CheckInput-hasError-1UXbV"}},function(e,t){e.exports={group:"FormGroup-group-gcQ0L"}},function(e,t){e.exports={label:"FormLabel-label-2QnAc",hasError:"FormLabel-hasError-3o2nr"}},function(e,t){e.exports={sectionError:"FormSectionError-sectionError-G9Rg2",sectionErrorIcon:"FormSectionError-sectionErrorIcon-QN8n6",sectionErrorDismiss:"FormSectionError-sectionErrorDismiss-1aZ_N"
}},function(e,t){e.exports={input:"SelectInput-input-OUVuX input-input-32LMp",hasError:"SelectInput-hasError-2W9GF"}},function(e,t){e.exports={input:"TextInput-input-35bjh input-input-32LMp",hasError:"TextInput-hasError-2F31e"}},function(e,t){e.exports={avatar:"AvatarImg-avatar-3xJy6"}},function(e,t){e.exports={imageContainer:"PosterCardImg-imageContainer-1kk64 cover-cover-2a-ek"}},function(e,t){e.exports={scroller:"VirtualListScroller-scroller-2EIJt"}},function(e,t){e.exports={menuPortal:"Menu-menuPortal-20t-X",
menu:"Menu-menu-2EjwW",enter:"Menu-enter-tjdPQ",enterActive:"Menu-enterActive-1Mqj3",leave:"Menu-leave-1w8JO",leaveActive:"Menu-leaveActive-1aZlS"}},function(e,t){e.exports={menu:"MenuContainer-menu-27j2V resetFont-resetFont-GoU5_"}},function(e,t){e.exports={menuItem:"MenuItem-menuItem-MQyxO","default":"MenuItem-default-1vAoF",primary:"MenuItem-primary-vslr-",success:"MenuItem-success-3hvdG",danger:"MenuItem-danger-3nlch"}},function(e,t){e.exports={separator:"MenuSeparator-separator-Urv9r"}},function(e,t){
e.exports={menuItemContainer:"SelectedMenuItem-menuItemContainer-2_Zpb",menuLabel:"SelectedMenuItem-menuLabel-3dKTE",selectedIcon:"SelectedMenuItem-selectedIcon-6QPNd",isSelected:"SelectedMenuItem-isSelected-1P74r"}},function(e,t){e.exports={confirmModal:"ConfirmModal-confirmModal-1Izjf Modal-modal-3X8-5",modalHeader:"ConfirmModal-modalHeader-1bZRv ModalHeader-modalHeader-bWdLM truncate-truncate-2GZ-9",modalBody:"ConfirmModal-modalBody-3a_XE ModalBody-modalBody-1F4VV",accordLabel:"ConfirmModal-accordLabel-2pzsN",
accordInput:"ConfirmModal-accordInput-3BkLJ",modalFooter:"ConfirmModal-modalFooter-2uCEE ModalFooter-modalFooter-2pHcU",cancelButton:"ConfirmModal-cancelButton-19CWm",confirmButton:"ConfirmModal-confirmButton-1Dheg"}},function(e,t){e.exports={modalContainer:"Modal-modalContainer-2mNaA resetFont-resetFont-GoU5_",modalTransitionContainer:"Modal-modalTransitionContainer-X4XFT",modalBackdrop:"Modal-modalBackdrop-1fCs9",modal:"Modal-modal-3X8-5",closeButton:"Modal-closeButton-fnqGz",enter:"Modal-enter-30zlX",
enterActive:"Modal-enterActive-1M0vF",leave:"Modal-leave-1zIVx",leaveActive:"Modal-leaveActive-1whSn"}},function(e,t){e.exports={modalScroller:"ModalBody-modalScroller-3xzMd",modalBody:"ModalBody-modalBody-1F4VV"}},function(e,t){e.exports={modalFooter:"ModalFooter-modalFooter-2pHcU"}},function(e,t){e.exports={modalHeader:"ModalHeader-modalHeader-bWdLM truncate-truncate-2GZ-9"}},function(e,t){e.exports={toolbar:"Toolbar-toolbar-1jObC"}},function(e,t){e.exports={toolbarButton:"ToolbarButton-toolbarButton-3X0Wu",
toolbarTooltip:"ToolbarButton-toolbarTooltip-w3bU4 Tooltip-tooltip-1JcHx resetFont-resetFont-GoU5_"}},function(e,t){e.exports={toolbarMenu:"ToolbarMenu-toolbarMenu-3IGak Menu-menu-2EjwW"}},function(e,t){e.exports={tooltipPortal:"Tooltip-tooltipPortal-2tb29",tooltip:"Tooltip-tooltip-1JcHx resetFont-resetFont-GoU5_",tooltipArrow:"Tooltip-tooltipArrow-8GsfY",tooltipBottomArrow:"Tooltip-tooltipBottomArrow-1a_Nr",tooltipTopArrow:"Tooltip-tooltipTopArrow-1QpMb",tooltipRightArrow:"Tooltip-tooltipRightArrow-Amc3s",
tooltipLeftArrow:"Tooltip-tooltipLeftArrow-2niz8",tooltipCenterAlignArrow:"Tooltip-tooltipCenterAlignArrow-fxDLp",tooltipLeftAlignArrow:"Tooltip-tooltipLeftAlignArrow-1ZQ5K",tooltipRightAlignArrow:"Tooltip-tooltipRightAlignArrow-25Hh7",tooltipMiddleAlignArrow:"Tooltip-tooltipMiddleAlignArrow-Krtyd",topLeft:"Tooltip-topLeft-280T4 Tooltip-tooltipArrow-8GsfY Tooltip-tooltipBottomArrow-1a_Nr Tooltip-tooltipLeftAlignArrow-1ZQ5K",topCenter:"Tooltip-topCenter-2VFFf Tooltip-tooltipArrow-8GsfY Tooltip-tooltipBottomArrow-1a_Nr Tooltip-tooltipCenterAlignArrow-fxDLp",
topRight:"Tooltip-topRight-JBp4f Tooltip-tooltipArrow-8GsfY Tooltip-tooltipBottomArrow-1a_Nr Tooltip-tooltipRightAlignArrow-25Hh7",bottomLeft:"Tooltip-bottomLeft-2PXcI Tooltip-tooltipArrow-8GsfY Tooltip-tooltipTopArrow-1QpMb Tooltip-tooltipLeftAlignArrow-1ZQ5K",bottomCenter:"Tooltip-bottomCenter-iePHM Tooltip-tooltipArrow-8GsfY Tooltip-tooltipTopArrow-1QpMb Tooltip-tooltipCenterAlignArrow-fxDLp",bottomRight:"Tooltip-bottomRight-16uRC Tooltip-tooltipArrow-8GsfY Tooltip-tooltipTopArrow-1QpMb Tooltip-tooltipRightAlignArrow-25Hh7",
middleLeft:"Tooltip-middleLeft-2x5aN Tooltip-tooltipArrow-8GsfY Tooltip-tooltipRightArrow-Amc3s Tooltip-tooltipMiddleAlignArrow-Krtyd",middleRight:"Tooltip-middleRight-3iocO Tooltip-tooltipArrow-8GsfY Tooltip-tooltipLeftArrow-2niz8 Tooltip-tooltipMiddleAlignArrow-Krtyd",enter:"Tooltip-enter-3bcka",enterActive:"Tooltip-enterActive-3RrHV",leave:"Tooltip-leave-2MvR6",leaveActive:"Tooltip-leaveActive-PpgFi"}},function(e,t){e.exports={hubContainer:"HubCell-hubContainer-2t4jR",hubHeader:"HubCell-hubHeader-3EOQP",
hubTitle:"HubCell-hubTitle-18L-k truncate-truncate-2GZ-9",hubLink:"HubCell-hubLink-3ge9X",hubActions:"HubCell-hubActions-3-mux",hubScrollButton:"HubCell-hubScrollButton-2RPNr"}},function(e,t){e.exports={titleContainer:"MetadataPosterCell-titleContainer-1wENc",continueWatchingTitleContainer:"MetadataPosterCell-continueWatchingTitleContainer-3Fh9m"}},function(e,t){e.exports={photoContainer:"PhotoCell-photoContainer-5eAv5",photo:"PhotoCell-photo-2D8H_",image:"PhotoCell-image-1xHJJ",albumLink:"PhotoCell-albumLink-1uyF1 cover-cover-2a-ek",
albumTitle:"PhotoCell-albumTitle-1dyWr absoluteCenter-absoluteCenter-1jDHd",photoLink:"PhotoCell-photoLink-3drN0 cover-cover-2a-ek"}},function(e,t){e.exports={titleContainer:"TagPosterCell-titleContainer-3Oo_k",imageContainer:"TagPosterCell-imageContainer-2pYnK",imageLink:"TagPosterCell-imageLink-v_JEI cover-cover-2a-ek"}},function(e,t){e.exports={cardContainer:"MetadataPosterCard-cardContainer-5LAl5",card:"MetadataPosterCard-card-3wQTg",isFlipped:"MetadataPosterCard-isFlipped-1xXhy",poster:"MetadataPosterCard-poster-2Ha5J",
isSelected:"MetadataPosterCard-isSelected-3rIcO",isOtherItemSelected:"MetadataPosterCard-isOtherItemSelected-3N2sC"}},function(e,t){e.exports={face:"MetadataPosterCardFace-face-1WDd2 cover-cover-2a-ek MetadataPosterCard-poster-2Ha5J",isSelected:"MetadataPosterCardFace-isSelected-1u5LU",faceFront:"MetadataPosterCardFace-faceFront-31JFm",faceBack:"MetadataPosterCardFace-faceBack-CPUrP"}},function(e,t){e.exports={placeholderIcon:"MetadataPosterCardIcon-placeholderIcon-PpNID"}},function(e,t){e.exports={
overlay:"MetadataPosterCardOverlay-overlay-3rrpZ cover-cover-2a-ek",background:"MetadataPosterCardOverlay-background-WgDKv cover-cover-2a-ek",link:"MetadataPosterCardOverlay-link-3HBRY cover-cover-2a-ek",badge:"MetadataPosterCardOverlay-badge-3xslj",versionBadge:"MetadataPosterCardOverlay-versionBadge-3mtqm MetadataPosterCardOverlay-badge-3xslj",versionBadgeIcon:"MetadataPosterCardOverlay-versionBadgeIcon-3uUxX",unwatchedBadge:"MetadataPosterCardOverlay-unwatchedBadge-BaRjO MetadataPosterCardOverlay-badge-3xslj",
unwatchedTag:"MetadataPosterCardOverlay-unwatchedTag-1-kuh MetadataPosterCardOverlay-unwatchedBadge-BaRjO MetadataPosterCardOverlay-badge-3xslj",progress:"MetadataPosterCardOverlay-progress-2xw9N",progressTrack:"MetadataPosterCardOverlay-progressTrack-1xS-M cover-cover-2a-ek",progressBar:"MetadataPosterCardOverlay-progressBar-G7pcw cover-cover-2a-ek",button:"MetadataPosterCardOverlay-button-1tlig",centerCircle:"MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",playButton:"MetadataPosterCardOverlay-playButton-1jjl- absoluteCenter-absoluteCenter-1jDHd PlayButton-playButton-1iAGl MetadataPosterCardOverlay-button-1tlig",
playCoverButton:"MetadataPosterCardOverlay-playCoverButton-2gU0x MetadataPosterCardOverlay-playButton-1jjl- absoluteCenter-absoluteCenter-1jDHd PlayButton-playButton-1iAGl MetadataPosterCardOverlay-button-1tlig",playCircle:"MetadataPosterCardOverlay-playCircle-1i899 PlayButton-playCircle-2IY6H absoluteCenter-absoluteCenter-1jDHd MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",selectButton:"MetadataPosterCardOverlay-selectButton-1h7pl MetadataPosterCardOverlay-button-1tlig",
selectCircle:"MetadataPosterCardOverlay-selectCircle-c0HXe absoluteCenter-absoluteCenter-1jDHd",selectedCircle:"MetadataPosterCardOverlay-selectedCircle-AKc6g absoluteCenter-absoluteCenter-1jDHd",selectedIcon:"MetadataPosterCardOverlay-selectedIcon-B_NxW",coverButton:"MetadataPosterCardOverlay-coverButton-eY337 cover-cover-2a-ek",selectCoverButton:"MetadataPosterCardOverlay-selectCoverButton-TCjUg MetadataPosterCardOverlay-coverButton-eY337 cover-cover-2a-ek",deselectCoverButton:"MetadataPosterCardOverlay-deselectCoverButton-3HjXQ MetadataPosterCardOverlay-coverButton-eY337 cover-cover-2a-ek",
editButton:"MetadataPosterCardOverlay-editButton-2WHy3 MetadataPosterCardOverlay-button-1tlig",moreButton:"MetadataPosterCardOverlay-moreButton-3Sg2r MetadataPosterCardOverlay-button-1tlig",isActionsMenuOpen:"MetadataPosterCardOverlay-isActionsMenuOpen-3ZT-K",isOtherItemSelected:"MetadataPosterCardOverlay-isOtherItemSelected-2t7Y5",hasActiveSelection:"MetadataPosterCardOverlay-hasActiveSelection-2Zb0p",refreshingCircle:"MetadataPosterCardOverlay-refreshingCircle-3fSYW MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",
trashCircle:"MetadataPosterCardOverlay-trashCircle-2NF_c MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",isSelected:"MetadataPosterCardOverlay-isSelected-b8jUT",isConflictingTypeSelected:"MetadataPosterCardOverlay-isConflictingTypeSelected-oafjJ",isModifierKeyPressed:"MetadataPosterCardOverlay-isModifierKeyPressed-29iEX",isRefreshing:"MetadataPosterCardOverlay-isRefreshing-29qfX",isTrash:"MetadataPosterCardOverlay-isTrash-1HRrr",refreshingSpinnerContainer:"MetadataPosterCardOverlay-refreshingSpinnerContainer-2qGOb absoluteCenter-absoluteCenter-1jDHd",
refreshingSpinner:"MetadataPosterCardOverlay-refreshingSpinner-3F2n6",refreshingIcon:"MetadataPosterCardOverlay-refreshingIcon-2JY0W"}},function(e,t){e.exports={sliderContainer:"PosterSizeSlider-sliderContainer-1UnwS",sliderIcon:"PosterSizeSlider-sliderIcon-XKFG9",slider:"PosterSizeSlider-slider-15Exl Slider-slider-K8cT9"}},function(e,t){e.exports={title:"MetadataPosterTitle-title-2j7mN truncate-truncate-2GZ-9",isSecondary:"MetadataPosterTitle-isSecondary-2s6Ip",isSplitLeft:"MetadataPosterTitle-isSplitLeft-2Uj4y",
isSplitRight:"MetadataPosterTitle-isSplitRight-3_Jx6"}},function(e,t){e.exports={isSecondary:"MetadataTitleSeasonEpisodeIndex-isSecondary-1iqH7 MetadataPosterTitle-isSecondary-2s6Ip"}},function(e,t){e.exports={separator:"MetadataTitleSeparator-separator-1XdAO MetadataPosterTitle-isSecondary-2s6Ip"}},function(e,t){e.exports={page:"Page-page-cSwP- resetFont-resetFont-GoU5_"}},function(e,t){e.exports={pageContent:"PageContent-pageContent-1RBiI",innerPageContent:"PageContent-innerPageContent-BWoYT"}},function(e,t){
e.exports={pageHeader:"PageHeader-pageHeader-2N2RK"}},function(e,t){e.exports={sectionWrapper:"AccountFormSection-sectionWrapper-2tLz6",section:"AccountFormSection-section-2b6Aj",isClosed:"AccountFormSection-isClosed-2rLvw",sectionLabel:"AccountFormSection-sectionLabel-1pNg9 FormLabel-label-2QnAc",isOpen:"AccountFormSection-isOpen-3aRX7",sectionEditLink:"AccountFormSection-sectionEditLink-1lfDc",submitButton:"AccountFormSection-submitButton-MgSmz",sectionDetails:"AccountFormSection-sectionDetails-2MQBA",
sectionForm:"AccountFormSection-sectionForm-1gizZ"}},function(e,t){e.exports={page:"AccountSettingsPage-page-2wDnf Page-page-cSwP- resetFont-resetFont-GoU5_",header:"AccountSettingsPage-header-21YCy",content:"AccountSettingsPage-content-NCUTs",help:"AccountSettingsPage-help-1_ScL"}},function(e,t){e.exports={avatarContainer:"AvatarEditor-avatarContainer-ko61E",avatarPane:"AvatarEditor-avatarPane-2LyHz",sliderContainer:"AvatarEditor-sliderContainer-1IUDw",sliderEnd:"AvatarEditor-sliderEnd-16gNu",sliderWrapper:"AvatarEditor-sliderWrapper-b24X9",
slider:"AvatarEditor-slider-1_Kc1 Slider-slider-K8cT9",help:"AvatarEditor-help-2-9CP",avatarTextPane:"AvatarEditor-avatarTextPane-1p4wu",avatarActionButtons:"AvatarEditor-avatarActionButtons-127gy"}},function(e,t){e.exports={dashboardHeader:"DashboardHeader-dashboardHeader-28tSn PageHeader-pageHeader-2N2RK",titleContainer:"DashboardHeader-titleContainer-QuUkF",separator:"DashboardHeader-separator-_KQv2"}},function(e,t){e.exports={librariesMenuScroller:"DashboardLibrariesMenu-librariesMenuScroller-3og0O Scroller-vertical-2IRDv"
}},function(e,t){e.exports={dashboardContent:"DashboardPage-dashboardContent-3TmGe PageContent-innerPageContent-BWoYT"}},function(e,t){e.exports={title:"DetailsHeader-title-3YoKR",summary:"DetailsHeader-summary-2pVzJ"}},function(e,t){e.exports={scroller:"PhotoAlbum-scroller-1g_Mi",body:"PhotoAlbum-body-363x0",album:"PhotoAlbum-album-nSrSB",spinner:"PhotoAlbum-spinner-2OIz5"}},function(e,t){e.exports={container:"PhotoAlbumContainer-container-1PjXY"}},function(e,t){e.exports={emptyPage:"EmptyPage-emptyPage-1JClc resetFont-resetFont-GoU5_",
content:"EmptyPage-content-1Asia",icon:"EmptyPage-icon-2ig_N","default":"EmptyPage-default-1l3EZ",primary:"EmptyPage-primary-23b5c",success:"EmptyPage-success-3Y34O",danger:"EmptyPage-danger-2HrFZ",title:"EmptyPage-title-1twcl",description:"EmptyPage-description-gCbqC",footer:"EmptyPage-footer-3QMNd"}},function(e,t){e.exports={icon:"ErrorPage-icon-2Vezy EmptyPage-icon-2ig_N"}},function(e,t){e.exports={emptyPage:"ServerDownloadRequiredPage-emptyPage-33d02 EmptyPage-emptyPage-1JClc resetFont-resetFont-GoU5_",
content:"ServerDownloadRequiredPage-content-1Fpf9 EmptyPage-content-1Asia",title:"ServerDownloadRequiredPage-title-2T5TE EmptyPage-title-1twcl",description:"ServerDownloadRequiredPage-description-2h0bL EmptyPage-description-gCbqC",pmsLogo:"ServerDownloadRequiredPage-pmsLogo-29BGs",button:"ServerDownloadRequiredPage-button-DVifD",downloadMessage:"ServerDownloadRequiredPage-downloadMessage-3XFQ8"}},function(e,t){e.exports={updateLink:"ServerUpdateRequiredPage-updateLink-WuF3B"}},function(e,t){e.exports={
metadataListHeader:"MetadataListHeader-metadataListHeader-9zIMJ PageHeader-pageHeader-2N2RK",titleContainer:"MetadataListHeader-titleContainer-1CcBG",title:"MetadataListHeader-title-oLd-2 truncate-truncate-2GZ-9"}},function(e,t){e.exports={metadataListPageContent:"MetadataListPageContent-metadataListPageContent-oyJ9H PageContent-pageContent-1RBiI",metadataListScroller:"MetadataListPageContent-metadataListScroller-3TSBt"}},function(e,t){e.exports={dashboardHeader:"SearchHeader-dashboardHeader-u97hv MetadataListHeader-metadataListHeader-9zIMJ PageHeader-pageHeader-2N2RK",
titleContainer:"SearchHeader-titleContainer-1b6yh MetadataListHeader-titleContainer-1CcBG",resultTitleContainer:"SearchHeader-resultTitleContainer-3jhNz",spinner:"SearchHeader-spinner-gQ3FL",separator:"SearchHeader-separator-1pNTN"}},function(e,t){e.exports={searchContent:"SearchPage-searchContent-phVZa PageContent-innerPageContent-BWoYT"}},function(e,t){e.exports={container:"QuickSearch-container-2V8m3 resetFont-resetFont-GoU5_"}},function(e,t){e.exports={hubTitle:"QuickSearchHub-hubTitle-nUJnZ"
}},function(e,t){e.exports={container:"QuickSearchInput-container-KSXwP resetFont-resetFont-GoU5_",focused:"QuickSearchInput-focused-CtYPJ",searchIcon:"QuickSearchInput-searchIcon-rGwJf",closeIcon:"QuickSearchInput-closeIcon-xl5u9",searchInput:"QuickSearchInput-searchInput-wnRxj"}},function(e,t){e.exports={button:"QuickSearchResult-button-xsMFe",title:"QuickSearchResult-title-2dspi",selected:"QuickSearchResult-selected-2JW0R",imageContainer:"QuickSearchResult-imageContainer-24SkC",titles:"QuickSearchResult-titles-XWf3c",
moreButton:"QuickSearchResult-moreButton-y2-Ay",moreIcon:"QuickSearchResult-moreIcon-201py"}},function(e,t){e.exports={container:"QuickSearchResults-container-2v0_M",spinnerContainer:"QuickSearchResults-spinnerContainer-3d7rG",noResults:"QuickSearchResults-noResults-2nuJS",placeholder:"QuickSearchResults-placeholder-1qHj9",placeholderSelected:"QuickSearchResults-placeholderSelected-Cek9W",spinner:"QuickSearchResults-spinner-1JArD"}},function(e,t){e.exports={title:"QuickSearchTitle-title-dH6Qf truncate-truncate-2GZ-9",
isSecondary:"QuickSearchTitle-isSecondary-KmXWZ"}},function(e,t){e.exports={card:"SearchCard-card-1HRU-",poster:"SearchCard-poster-1EmKT",playButton:"SearchCard-playButton-18JPy PlayButton-playButton-1iAGl absoluteCenter-absoluteCenter-1jDHd"}},function(e,t){e.exports={metadataListHeader:"MultiSelectHeader-metadataListHeader-2DFt5 PageHeader-pageHeader-2N2RK",titleContainer:"MultiSelectHeader-titleContainer-BB34B truncate-truncate-2GZ-9",deselectContainer:"MultiSelectHeader-deselectContainer-1ftVM",
deselectLink:"MultiSelectHeader-deselectLink-2xy-1 truncate-truncate-2GZ-9",icon:"MultiSelectHeader-icon-1uzAW"}},function(e,t){e.exports={container:"SettingsSidebar-container-2eDCE",selected:"SettingsSidebar-selected-13x-s"}},function(e,t){e.exports={sidebar:"Sidebar-sidebar-2Wjsb resetFont-resetFont-GoU5_",sidebarScroller:"Sidebar-sidebarScroller-1lsqX",sidebarContent:"Sidebar-sidebarContent-8WmmW"}},function(e,t){e.exports={sidebarLink:"SidebarLink-sidebarLink-2VFCH Link-default-2S6gV",sidebarLinkIcon:"SidebarLink-sidebarLinkIcon-hkeJI",
sidebarLinkSpinner:"SidebarLink-sidebarLinkSpinner-isL9P"}},function(e,t){e.exports={sidebarListHeader:"SidebarList-sidebarListHeader-3okoq truncate-truncate-2GZ-9"}},function(e,t){e.exports={sidebarListItem:"SidebarListItem-sidebarListItem-2tR7j"}},function(e,t){e.exports={sidebarListItemBadge:"SidebarListItemBadge-sidebarListItemBadge-1QAVb"}},function(e,t){e.exports={sidebarMessage:"SidebarMessage-sidebarMessage-c1R1N"}},function(e,t){e.exports={serverMenu:"ServerMenu-serverMenu-2tFgY",serverMenuScroller:"ServerMenu-serverMenuScroller-3cdNz"
}},function(e,t){e.exports={serverMenuButton:"ServerMenuButton-serverMenuButton-3b703",serverMenuButtonContainer:"ServerMenuButton-serverMenuButtonContainer-2uPEL",serverMenuSpinner:"ServerMenuButton-serverMenuSpinner-2GRwh",serverMenuTitle:"ServerMenuButton-serverMenuTitle-QnGXI",serverMenuFriendlyNameContainer:"ServerMenuButton-serverMenuFriendlyNameContainer-3J71A",serverMenuFriendlyName:"ServerMenuButton-serverMenuFriendlyName-2fA1r truncate-truncate-2GZ-9",serverMenuUsername:"ServerMenuButton-serverMenuUsername-28rcn truncate-truncate-2GZ-9",
icon:"ServerMenuButton-icon-2D2mY"}},function(e,t){e.exports={secureIcon:"ServerMenuIcon-secureIcon-1oXbF",alertIcon:"ServerMenuIcon-alertIcon-2CDqq"}},function(e,t){e.exports={serverMenuItem:"ServerMenuItem-serverMenuItem-1HlOA",disabledServerMenuItem:"ServerMenuItem-disabledServerMenuItem-2QRFs",selectedServerMenuItem:"ServerMenuItem-selectedServerMenuItem-bp_0h",serverMenuItemContainer:"ServerMenuItem-serverMenuItemContainer-2WPZp",serverMenuTitle:"ServerMenuItem-serverMenuTitle-2UtQC",serverMenuFriendlyName:"ServerMenuItem-serverMenuFriendlyName-2EZ0S truncate-truncate-2GZ-9",
serverMenuStatus:"ServerMenuItem-serverMenuStatus-3IhIj truncate-truncate-2GZ-9",serverMenuIconContainer:"ServerMenuItem-serverMenuIconContainer-2v7Ec",serverMenuIcon:"ServerMenuItem-serverMenuIcon-3CZzN",selectedIcon:"ServerMenuItem-selectedIcon-1pXXe",secureIcon:"ServerMenuItem-secureIcon-6pJoG"}},function(e,t){e.exports={librariesActions:"SidebarLibrariesActionsContainer-librariesActions-2FXXq",librariesAction:"SidebarLibrariesActionsContainer-librariesAction-F_NfT",isActionsMenuOpen:"SidebarLibrariesActionsContainer-isActionsMenuOpen-Y-2Sj"
}},function(e,t){e.exports={libraryLink:"SidebarLibraryItem-libraryLink-Ov4kW",editLibraryLink:"SidebarLibraryItem-editLibraryLink-_TicF",libraryItem:"SidebarLibraryItem-libraryItem-2OicE"}},function(e,t){e.exports={unclaimedIcon:"SidebarServerContent-unclaimedIcon-2VpOx"}},function(e,t){e.exports={librariesSpinnerContainer:"SidebarServerLibraries-librariesSpinnerContainer-3iNgH",librariesListHeader:"SidebarServerLibraries-librariesListHeader-1bv_F SidebarList-sidebarListHeader-3okoq truncate-truncate-2GZ-9",
librariesTitle:"SidebarServerLibraries-librariesTitle-yIAPk truncate-truncate-2GZ-9",touchLibrariesList:"SidebarServerLibraries-touchLibrariesList-2Jdlf",librariesAction:"SidebarServerLibraries-librariesAction-2etst",librariesList:"SidebarServerLibraries-librariesList-1nFi7"}},function(e,t){e.exports={feature:"PlexPassFeature-feature-1Z1RP",featureImage:"PlexPassFeature-featureImage-19mpe",featureContainer:"PlexPassFeature-featureContainer-3OshN",featureTitle:"PlexPassFeature-featureTitle-EitKV",
featureDescription:"PlexPassFeature-featureDescription-iQBc9"}},function(e,t){e.exports={plexPassTitle:"PlexPassModal-plexPassTitle-3rfVU",header:"PlexPassModal-header-2DxmV ModalHeader-modalHeader-bWdLM truncate-truncate-2GZ-9",body:"PlexPassModal-body-3sRxa ModalBody-modalBody-1F4VV",feature:"PlexPassModal-feature-3MRki",featureImage:"PlexPassModal-featureImage-1t6kv",featureTitle:"PlexPassModal-featureTitle-2D86w",featureDescription:"PlexPassModal-featureDescription-2NBND",moreFeatures:"PlexPassModal-moreFeatures-29fV7",
footer:"PlexPassModal-footer-2yRrA ModalFooter-modalFooter-2pHcU",planButton:"PlexPassModal-planButton-13Cix truncate-truncate-2GZ-9",link:"PlexPassModal-link-354zf",linkSeparator:"PlexPassModal-linkSeparator-1alFe",spinnerContainer:"PlexPassModal-spinnerContainer-3OGok",plansContainer:"PlexPassModal-plansContainer-1VCC1",isPlansPending:"PlexPassModal-isPlansPending-1N8FT"}},function(e,t){e.exports={cell:"virtualized-cell-3CBMa",isMoving:"virtualized-isMoving-1yowd"}},function(e,t){e.exports={appear:"crossFadeTransition-appear-2v290",
enter:"crossFadeTransition-enter-29fpN",appearActive:"crossFadeTransition-appearActive-2ng0_",enterActive:"crossFadeTransition-enterActive-Q5Ff8",leave:"crossFadeTransition-leave-2_da2",leaveActive:"crossFadeTransition-leaveActive-2Zow1"}},function(e,t,n){"use strict";function i(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var i=n.querySelectorAll(t);return Array.prototype.indexOf.call(i,e)!==-1}var r=n(32),a={addClass:function(e,t){return/\s/.test(t)?r(!1):void 0,t&&(e.classList?e.classList.add(t):a.hasClass(e,t)||(e.className=e.className+" "+t)),
e},removeClass:function(e,t){return/\s/.test(t)?r(!1):void 0,t&&(e.classList?e.classList.remove(t):a.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?a.addClass:a.removeClass)(e,t)},hasClass:function(e,t){return/\s/.test(t)?r(!1):void 0,e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1},matchesSelector:function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){
return i(e,t)};return n.call(e,t)}};e.exports=a},function(e,t){"use strict";function n(e){return e.replace(i,function(e,t){return t.toUpperCase()})}var i=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function i(e){return r(e.replace(a,"ms-"))}var r=n(1622),a=/^-ms-/;e.exports=i},function(e,t,n){"use strict";function i(e,t){return!(!e||!t)&&(e===t||!r(e)&&(r(t)?i(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var r=n(1631);e.exports=i;
},function(e,t,n){"use strict";function i(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?s(!1):void 0,"number"!=typeof t?s(!1):void 0,0===t||t-1 in e?void 0:s(!1),"function"==typeof e.callee?s(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var i=Array(t),r=0;r<t;r++)i[r]=e[r];return i}function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e);
}function a(e){return r(e)?Array.isArray(e)?e.slice():i(e):[e]}var s=n(32);e.exports=a},function(e,t,n){"use strict";function i(e){var t=e.match(c);return t&&t[1].toLowerCase()}function r(e,t){var n=u;u?void 0:l(!1);var r=i(e),a=r&&o(r);if(a){n.innerHTML=a[1]+e+a[2];for(var c=a[0];c--;)n=n.lastChild}else n.innerHTML=e;var d=n.getElementsByTagName("script");d.length&&(t?void 0:l(!1),s(d).forEach(t));for(var h=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return h}var a=n(63),s=n(1625),o=n(588),l=n(32),u=a.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;
e.exports=r},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(i,"-$1").toLowerCase()}var i=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function i(e){return r(e).replace(a,"-ms-")}var r=n(1628),a=/^ms-/;e.exports=i},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName));
}e.exports=n},function(e,t,n){"use strict";function i(e){return r(e)&&3==e.nodeType}var r=n(1630);e.exports=i},function(e,t){"use strict";function n(e,t,n){if(!e)return null;var r={};for(var a in e)i.call(e,a)&&(r[a]=t.call(n,e[a],a,e));return r}var i=Object.prototype.hasOwnProperty;e.exports=n},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){"use strict";var i,r=n(63);r.canUseDOM&&(i=window.performance||window.msPerformance||window.webkitPerformance),
e.exports=i||{}},function(e,t,n){"use strict";var i,r=n(1634);i=r.now?function(){return r.now()}:function(){return Date.now()},e.exports=i},function(e,t,n){e.exports=n.p+"img/base/pms-logo.70f6a544befb024685e4a294f6e5505e.svg"},function(e,t,n){e.exports=n.p+"img/desktop/queue/bookmarklet-steps-ie.3cbda4e75b0dd0e186e0c24999ab0d1d.png"},function(e,t,n){e.exports=n.p+"img/desktop/queue/bookmarklet-steps.abc5147d9257f0ec59f7b2257db9cb8f.png"},function(e,t,n){e.exports=n.p+"img/desktop/queue/email-links.f1b12dd82ea85b39a4c0fa07dd6df095.png";
},function(e,t,n){e.exports=n.p+"img/desktop/setup/setup-devices.4c444242863ca1234c65de48ef80a5e8.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-camera-upload.c292737601a4452f02cb86a5ff46cd7f.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-cloud-sync.58594567e630cc4dae0ad42b6573f225.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-forum.a35de654d388b5416cd87ddd45e904f7.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-gracenote.47143d9a798b6044bb41469630e662db.svg";
},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-mobile-sync.6a66674e2cb992f1134481602860f06f.svg"},function(e,t,n){e.exports=n.p+"img/desktop/upsell/upsell-trailers-extras.1ad0852cbe3bde7198f897afd6bc14dd.svg"},function(e,t,n){e.exports=n.p+"mp3/null.2036f08ba858d37814b7f6982d26414a.mp3"},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<svg class="circle-progress-bar" version="1.1" xmlns="http://www.w3.org/2000/svg"> <circle fill="transparent"></circle> </svg> <div class="circle-progress-text"></div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a="";return a})},1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="video-player-image-overlays"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),r=r||{},'<button class="lyrics-btn btn-link dropdown-toggle hidden" data-toggle="dropdown" href="#lyrics-dropdown"> <i class="plex-icon-lyrics"></i> </button> <div class="lyrics-dropdown dropdown-menu pull-center"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return(s=n.reason)?a=s.call(t,{hash:{},data:r}):(s=t&&t.reason,
a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+" "})},1649,1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<span class="loading loading-inline"></span> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return(s=n.text)?a=s.call(t,{
hash:{},data:r}):(s=t&&t.text,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<button class="timed-btn btn-link"> <i class="plex-icon-timer"></i> </button> <button class="prev-lyrics-btn btn-link"> <i class="plex-icon-triangle-left"></i> </button> <span class="lyrics-streams-index"></span> / <span class="lyrics-streams-length"></span> <button class="next-lyrics-btn btn-link"> <i class="plex-icon-triangle-right"></i> </button> <div class="vendor-logo vendor-logo-lyricfind"></div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="lyrics-region"></div> <div class="lyrics-streams-region"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+=o(n(1).call(t,"Your mix will resume shortly",{hash:{},data:a}))+" "});
},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="background transition-out"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div id="content" class="scroll-container dark-scrollbar"></div> <div class="scroll-shadow transition-out"></div> '})},function(e,t,n){var i=n(4);
e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+="<p>"+f(n(1).call(e,"Reqirements",{hash:{},data:t}))+": ",i=e&&e.requirements,i=typeof i===m?i.apply(e):i,(i||0===i)&&(r+=i),r+="</p>"}function o(e,t){var n,i="";return i+="<p>",n=e&&e.info,n=typeof n===m?n.apply(e):n,(n||0===n)&&(i+=n),i+="</p>"}function l(e,t){var r,a="";return a+=' <div class="btn-group dropup download-server-btn-group"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> '+f(n(1).call(e,"Download",{
hash:{},data:t}))+' <span class="caret"></span> </button> <ul class="dropdown-menu"> ',r=i.each.call(e,e&&e.releases,{hash:{},inverse:v.noop,fn:v.program(6,u,t),data:t}),(r||0===r)&&(a+=r),a+=" </ul> </div> "}function u(e,t){var n,i="";return i+=' <li><a href="'+f((n=e&&e.url,typeof n===m?n.apply(e):n))+'" download class="download-btn">'+f((n=e&&e.label,typeof n===m?n.apply(e):n))+"</a></li> "}function c(e,t){var n,r="";return r+=' <div class="download-server-btn-group"> ',n=i.each.call(e,e&&e.releases,{
hash:{},inverse:v.noop,fn:v.program(9,d,t),data:t}),(n||0===n)&&(r+=n),r+=" </div> "}function d(e,t){var n,i="";return i+=' <a href="'+f((n=e&&e.url,typeof n===m?n.apply(e):n))+'" download class="btn btn-primary download-btn">'+f((n=e&&e.label,typeof n===m?n.apply(e):n))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var h,p="",f=this.escapeExpression,m="function",v=this;return p+='<div class="type-'+f((h=t&&t.type,typeof h===m?h.apply(t):h))+" platform-logo platform-"+f((h=t&&t.id,
typeof h===m?h.apply(t):h))+'"></div> <h2><strong>'+f((h=t&&t.name,typeof h===m?h.apply(t):h))+"</strong> "+f(n(1).call(t,"Download",{hash:{},data:a}))+"</h2> <h5>"+f(n(1).call(t,"Version",{hash:{},data:a}))+" "+f((h=t&&t.version,typeof h===m?h.apply(t):h))+"</h5> <h5>"+f(n(440).call(t,t&&t.date,{hash:{},data:a}))+'</h5> <div class="more-info"> ',h=i.if.call(t,t&&t.requirements,{hash:{},inverse:v.noop,fn:v.program(1,s,a),data:a}),(h||0===h)&&(p+=h),p+=" ",h=i.if.call(t,t&&t.info,{hash:{},inverse:v.noop,
fn:v.program(3,o,a),data:a}),(h||0===h)&&(p+=h),p+=" </div> ",h=i.if.call(t,t&&t.shouldUseDropup,{hash:{},inverse:v.program(8,c,a),fn:v.program(5,l,a),data:a}),(h||0===h)&&(p+=h),p+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<button class="like-meh-btn btn-link"><i class="plex-icon-heart plex-icon-heart-empty"></i></button> <button class="dislike-btn btn-link"><i class="plex-icon-heart-strikethrough"></i></button> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"(Plex Pass)"}function o(e,t){var n,i="";return i+=' <p><span class="text-muted">Name:</span> '+h((n=e&&e.primaryServer,n=null==n||n===!1?n:n.friendlyName,typeof n===d?n.apply(e):n))+'</p> <p><span class="text-muted">URL:</span> '+h((n=e&&e.primaryServerUrl,typeof n===d?n.apply(e):n))+'</p> <p><span class="text-muted">Version:</span> '+h((n=e&&e.primaryServer,n=null==n||n===!1?n:n.version,typeof n===d?n.apply(e):n))+'</p> <p><span class="text-muted">Token:</span> '+h((n=e&&e.primaryServer,
n=null==n||n===!1?n:n.accessToken,typeof n===d?n.apply(e):n))+"</p> "}function l(e,t){return' <p><span class="text-muted">none</span></p> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<h3>Browser</h3> <p><span class="text-muted">Host:</span> '+h((u=t&&t.host,typeof u===d?u.apply(t):u))+'</p> <p><span class="text-muted">User Agent:</span> '+h((u=t&&t.userAgent,typeof u===d?u.apply(t):u))+'</p> <p><span class="text-muted">Name:</span> '+h((u=t&&t.browser,
u=null==u||u===!1?u:u.name,typeof u===d?u.apply(t):u))+'</p> <p><span class="text-muted">Version:</span> '+h((u=t&&t.browser,u=null==u||u===!1?u:u.version,typeof u===d?u.apply(t):u))+'</p> <p><span class="text-muted">Platform:</span> '+h((u=t&&t.browser,u=null==u||u===!1?u:u.platform,typeof u===d?u.apply(t):u))+'</p> <p><span class="text-muted">Mobile:</span> '+h(n(281).call(t,(u=t&&t.browser,null==u||u===!1?u:u.mobile),{hash:{},data:a}))+'</p> <h3>User</h3> <p><span class="text-muted">Username:</span> '+h((u=t&&t.user,
u=null==u||u===!1?u:u.username,typeof u===d?u.apply(t):u))+" ",u=i.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='</p> <p><span class="text-muted">Email:</span> '+h((u=t&&t.user,u=null==u||u===!1?u:u.email,typeof u===d?u.apply(t):u))+'</p> <p><span class="text-muted">Token:</span> '+h((u=t&&t.user,u=null==u||u===!1?u:u.accessToken,typeof u===d?u.apply(t):u))+'</p> <h3>plex.tv</h3> <p><span class="text-muted">URL:</span> '+h((u=t&&t.cloudServerUrl,
typeof u===d?u.apply(t):u))+'</p> <p><span class="text-muted">Available:</span> '+h(n(281).call(t,(u=t&&t.cloudServer,null==u||u===!1?u:u.available),{hash:{},data:a}))+'</p> <p><span class="text-muted">Authorized:</span> '+h(n(281).call(t,(u=t&&t.cloudServer,null==u||u===!1?u:u.authorized),{hash:{},data:a}))+"</p> <h3>Primary Server</h3> ",u=i.if.call(t,t&&t.primaryServer,{hash:{},inverse:p.program(5,l,a),fn:p.program(3,o,a),data:a}),(u||0===u)&&(c+=u),c+=" "})},1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<textarea class="form-control">',(s=n.logs)?a=s.call(t,{hash:{},data:r}):(s=t&&t.logs,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+"</textarea> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <div class="remember-group checkbox"> <label class="control-label"> <input type="checkbox" id="remember" checked> '+u(n(1).call(e,"Remember me",{
hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c=this;return l+='<div class="row"> <div class="col-sm-12"> <h2 class="sign-in-header"> <a class="sign-in-btn selected" href="#">'+u(n(1).call(t,"Sign In",{hash:{},data:a}))+'</a> <span class="sign-in-header-divider">'+u(n(1).call(t,"or",{hash:{},data:a}))+'</span> <a class="sign-up-btn" href="#">'+u(n(1).call(t,"Sign Up",{hash:{},data:a}))+'</a> </h2> </div> </div> <div class="username-group form-group"> <label for="username" class="control-label"> '+u(n(1).call(t,"Username",{
hash:{},data:a}))+' <span class="control-error">'+u(n(1).call(t,"Required",{hash:{},data:a}))+'</span> </label> <input type="text" id="username" class="form-control" autocorrect="off" autocapitalize="off"> </div> <div class="email-group form-group"> <label for="email" class="control-label"> '+u(n(1).call(t,"Email",{hash:{},data:a}))+' <span class="control-error">'+u(n(1).call(t,"Required",{hash:{},data:a}))+'</span> </label> <input type="text" id="email" class="form-control" autocorrect="off" autocapitalize="off"> </div> <div class="password-group form-group"> <label for="password" class="control-label"> '+u(n(1).call(t,"Password",{
hash:{},data:a}))+' <span class="control-error">'+u(n(1).call(t,"Required",{hash:{},data:a}))+'</span> </label> <input type="password" id="password" class="form-control"> </div> <div class="confirm-group form-group"> <label for="confirm" class="control-label"> '+u(n(1).call(t,"Confirm Password",{hash:{},data:a}))+' <span class="control-error">'+u(n(1).call(t,"Passwords do not match",{hash:{},data:a}))+'</span> </label> <input type="password" id="confirm" class="form-control"> </div> <div class="age-disclaimer form-group"> '+u(n(1).call(t,"By creating an account, you confirm that you have read and accept the {1}Terms and Conditions{2} and are at least 13 years old.",'<a href="https://plex.tv/terms" target="_blank">',"</a>",{
hash:{},data:a}))+' </div> <div class="form-footer"> <button type="submit" class="btn btn-lg btn-primary btn-loading pull-right"> <div class="loading loading-sm"></div> <span class="sign-in-label btn-label">'+u(n(1).call(t,"Sign In",{hash:{},data:a}))+'</span> <span class="sign-up-label btn-label">'+u(n(1).call(t,"Sign Up",{hash:{},data:a}))+"</span> </button> ",o=i.if.call(t,t&&t.showRememberMe,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=" </div> "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return' <form id="user-account-form"></form> '}function o(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.showWhySignIn,{hash:{},inverse:p.program(6,u,t),fn:p.program(4,l,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function l(e,t){var i="";return i+=" <p>"+h(n(1).call(e,"You must be signed in for Plex to work properly. If you are not signed in:",{hash:{},data:t}))+'</p> <ul class="text-muted"> <li>'+h(n(1).call(e,"Any connections between your media server and players WILL NOT BE SECURE",{
hash:{},data:t}))+"</li> <li>"+h(n(1).call(e,"You may experience degraded streaming performance",{hash:{},data:t}))+"</li> <li>"+h(n(1).call(e,"It will be more difficult, and sometimes impossible, to find your server and discover players",{hash:{},data:t}))+"</li> <li>"+h(n(1).call(e,"You will not be able to access your media server from outside your home",{hash:{},data:t}))+"</li> <li>"+h(n(1).call(e,"You will not be able to access content and many features provided by Plex",{hash:{},data:t}))+'</li> </ul> <div class="skip-sign-in-container"> <p><button type="button" class="back-to-sign-in-btn btn btn-lg btn-primary">'+h(n(1).call(e,"Sign In",{
hash:{},data:t}))+'</button></p> <p><a class="skip-btn" href="#">'+h(n(1).call(e,"Skip and accept limited functionality",{hash:{},data:t}))+"</a></p> </div> "}function u(e,t){var i="";return i+=' <div class="skip-sign-in-container"> <a class="why-sign-in-btn" href="#">'+h(n(1).call(e,"What's this?",{hash:{},data:t}))+"</a> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h=this.escapeExpression,p=this;return d+='<div class="sign-in-logo text-center"> <i class="plex-image logo"></i> </div> <div class="row row-padded"> <div class="col-sm-6 col-sm-offset-3"> ',
c=i.unless.call(t,t&&t.showWhySignIn,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" ",c=i.if.call(t,t&&t.showSkip,{hash:{},inverse:p.noop,fn:p.program(3,o,a),data:a}),(c||0===c)&&(d+=c),d+=" </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){var i,r="";return r+='<span class="star"><i class="star-icon glyphicon ',i=n.if.call(e,e,{hash:{},inverse:c.program(4,o,t),fn:c.program(2,s,t),data:t}),(i||0===i)&&(r+=i),
r+='"></i><span class="empty-icon"></span></span>'}function s(e,t){return"star"}function o(e,t){return"dislikes"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var l,u="",c=this;return l=n.each.call(t,t&&t.stars,{hash:{},inverse:c.noop,fn:c.program(1,a,r),data:r}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return d(n(1).call(e,"Play",{hash:{},data:t}))}function o(e,t){return d(n(1).call(e,"Play All",{
hash:{},data:t}))}function l(e,t){var i,r="";return r+=' <li><a class="download-btn secondary-only" href="'+d((i=e&&e.downloadUrl,typeof i===h?i.apply(e):i))+'" download="'+d((i=e&&e.downloadName,typeof i===h?i.apply(e):i))+'">'+d(n(1).call(e,"Download",{hash:{},data:t}))+"</a></li> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this.escapeExpression,h="function",p=this;return c+='<ul class="nav action-bar-nav"> <li> <a class="play-btn btn-gray" href="#" title="',
u=i.if.call(t,t&&t.isSingleItem,{hash:{},inverse:p.program(3,o,a),fn:p.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-unwatched-btn btn-gray" href="#" title="'+d(n(1).call(t,"Play Unwatched",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+d(n(1).call(t,"Shuffle",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="play-trailer-btn btn-gray" href="#" title="'+d(n(1).call(t,"Play Trailer",{
hash:{},data:a}))+'" data-toggle="tooltip"><i class="plex-icon-play-strip"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+d(n(1).call(t,"Edit",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+d(n(1).call(t,"Add to playlist",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="refresh-btn btn-gray" href="#" title="'+d(n(1).call(t,"Refresh",{
hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon repeat"></i></a> </li> <li> <a class="analyze-btn btn-gray secondary-action" href="#" title="'+d(n(1).call(t,"Analyze",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon magic"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+d(n(1).call(t,"Mark as Watched",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+d(n(1).call(t,"Mark as Unwatched",{
hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+d(n(1).call(t,"Select",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+d(n(1).call(t,"Deselect All",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+d(n(1).call(t,"Sync",{
hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon download"></i></a> </li> <li> <a class="share-btn btn-gray secondary-action" href="#" title="'+d(n(1).call(t,"Share",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon share"></i></a> </li> <li> <a class="recommend-btn btn-gray secondary-action" href="#" title="'+d(n(1).call(t,"Recommend",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon share-alt"></i></a> </li> <li> <a class="delete-btn btn-gray secondary-action" href="#" title="'+d(n(1).call(t,"Delete",{
hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="delete-from-user-playlist-btn btn-gray secondary-action" href="#" title="'+d(n(1).call(t,"Delete",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="info-btn btn-gray secondary-action" href="#" title="'+d(n(1).call(t,"Info",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon circle-info"></i></a> </li> <li class="secondary-actions-dropdown dropdown"> <a class="more-btn btn-gray dropdown-toggle" href="#" data-toggle="dropdown"><i class="glyphicon more"></i></a> <ul class="dropdown-menu"> <li><a class="play-version-btn secondary-only" href="#">'+d(n(1).call(t,"Play Version...",{
hash:{},data:a}))+'</a></li> <li><a class="play-all-btn secondary-only" href="#">',u=i.if.call(t,t&&t.isSingleItem,{hash:{},inverse:p.program(3,o,a),fn:p.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='</a></li> <li><a class="play-next-btn secondary-only" href="#">'+d(n(1).call(t,"Play Next",{hash:{},data:a}))+'</a></li> <li><a class="add-to-queue-btn secondary-only" href="#">'+d(n(1).call(t,"Add to Queue",{hash:{},data:a}))+'</a></li> <li class="secondary-divider divider"></li> <li><a class="convert-btn" href="#">'+d(n(1).call(t,"Optimize...",{
hash:{},data:a}))+'</a></li> <li><a class="analyze-btn" href="#">'+d(n(1).call(t,"Analyze",{hash:{},data:a}))+'</a></li> <li><a class="match-btn secondary-only" href="#">'+d(n(1).call(t,"Match",{hash:{},data:a}))+'</a></li> <li><a class="fix-match-btn secondary-only" href="#">'+d(n(1).call(t,"Fix Incorrect Match",{hash:{},data:a}))+'</a></li> <li><a class="unmatch-btn secondary-only" href="#">'+d(n(1).call(t,"Unmatch",{hash:{},data:a}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+d(n(1).call(t,"Merge",{
hash:{},data:a}))+'</a></li> <li><a class="split-apart-btn secondary-only" href="#">'+d(n(1).call(t,"Split Apart",{hash:{},data:a}))+"</a></li> ",u=i.if.call(t,t&&t.downloadUrl,{hash:{},inverse:p.noop,fn:p.program(5,l,a),data:a}),(u||0===u)&&(c+=u),c+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+d(n(1).call(t,"Watch Later",{hash:{},data:a}))+'</a></li> <li><a class="share-btn" href="#">'+d(n(1).call(t,"Share",{hash:{},data:a}))+'</a></li> <li><a class="recommend-btn" href="#">'+d(n(1).call(t,"Recommend",{
hash:{},data:a}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+d(n(1).call(t,"Delete",{hash:{},data:a}))+'</a></li> <li><a class="delete-versions-btn has-danger secondary-only" href="#">'+d(n(1).call(t,"Delete Versions",{hash:{},data:a}))+'</a></li> <li><a class="delete-from-user-playlist-btn has-danger" href="#">'+d(n(1).call(t,"Delete",{hash:{},data:a}))+'</a></li> <li><a class="info-btn" href="#">'+d(n(1).call(t,"Info",{hash:{},data:a}))+"</a></li> </ul> </li> </ul> "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="action-bar"> <ul class="nav action-bar-nav"> <li> <a class="options-btn btn-gray" href="#" title="'+o(n(1).call(t,"Options",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> </ul> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="action-bar"> <ul class="nav action-bar-nav"> <li> <a class="options-btn btn-gray" href="#" title="'+o(n(1).call(t,"Options",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> <li> <a class="play-btn btn-gray" href="#" title="'+o(n(1).call(t,"Play All",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+o(n(1).call(t,"Shuffle",{
hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+o(n(1).call(t,"Add to playlist",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+o(n(1).call(t,"Select",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+o(n(1).call(t,"Deselect All",{
hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+o(n(1).call(t,"Edit",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+o(n(1).call(t,"Mark as Watched",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+o(n(1).call(t,"Mark as Unwatched",{
hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+o(n(1).call(t,"Sync",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon download"></i></a> </li> <li class="secondary-actions-dropdown dropdown"> <a class="more-btn btn-gray dropdown-toggle" href="#" data-toggle="dropdown"><i class="glyphicon more"></i></a> <ul class="dropdown-menu"> <li><a class="convert-btn secondary-only" href="#">'+o(n(1).call(t,"Optimize...",{
hash:{},data:a}))+'</a></li> <li><a class="refresh-btn secondary-only" href="#">'+o(n(1).call(t,"Refresh",{hash:{},data:a}))+'</a></li> <li><a class="analyze-btn secondary-only" href="#">'+o(n(1).call(t,"Analyze",{hash:{},data:a}))+'</a></li> <li><a class="add-to-collection-btn secondary-only" href="#">'+o(n(1).call(t,"Add to Collection...",{hash:{},data:a}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+o(n(1).call(t,"Merge",{hash:{},data:a}))+'</a></li> <li><a class="delete-btn has-danger secondary-only" href="#">'+o(n(1).call(t,"Delete",{
hash:{},data:a}))+"</a></li> </ul> </li> </ul> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this,c=this.escapeExpression;return l+='<ul class="nav nav-header pull-right"> <li class="alerts-nav-item"><a class="alerts-btn btn-gray ',o=n(12).call(t,t&&t.subset,"alerts",{hash:{},inverse:u.noop,fn:u.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='" href="#!/status/alerts">'+c(n(1).call(t,"Alerts",{
hash:{},data:a}))+'</a></li> <li class="sync-nav-item"><a class="sync-btn btn-gray ',o=n(12).call(t,t&&t.subset,"sync",{hash:{},inverse:u.noop,fn:u.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='" href="#!/status/sync">'+c(n(1).call(t,"Sync",{hash:{},data:a}))+'</a></li> <li class="conversion-nav-item"><a class="conversion-btn btn-gray ',o=n(12).call(t,t&&t.subset,"conversion",{hash:{},inverse:u.noop,fn:u.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='" href="#!/status/conversion">'+c(n(1).call(t,"Conversion",{
hash:{},data:a}))+'<span class="badge"></span></a></li> <li class="now-playing-nav-item"><a class="now-playing-btn btn-gray ',o=n(12).call(t,t&&t.subset,"nowPlaying",{hash:{},inverse:u.noop,fn:u.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='" href="#!/status/playing">'+c(n(1).call(t,"Now Playing",{hash:{},data:a}))+'<span class="badge"></span></a></li> </ul> <h2>'+c(n(1).call(t,"Status",{hash:{},data:a}))+'</h2> <div class="activity-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var r,a="";return a+=' <div class="filter-bar-right"> <span class="page-count">'+h(n(1).call(e,"{1} of {2}",e&&e.page,e&&e.pages,{hash:{},data:t}))+'</span> <a class="previous-btn btn-gray ',r=i.unless.call(e,e&&e.enablePrevious,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='" href="#"> <i class="glyphicon chevron-left"></i> </a> <a class="next-btn btn-gray ',r=i.unless.call(e,e&&e.enableNext,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(r||0===r)&&(a+=r),
a+='" href="#"> <i class="glyphicon chevron-right"></i> </a> </div> '}function o(e,t){return"disabled"}function l(e,t){var i="";return i+=' <div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h4 class="text-muted text-center">'+h(n(1).call(e,"Alerts are restricted from shared users.",{hash:{},data:t}))+"</h4> </div> </div> "}function u(e,t){return' <div class="alert-list-container"></div> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h=this.escapeExpression,p=this;
return d+='<div class="filter-bar"> ',c=i.unless.call(t,t&&t.shared,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" </div> ",c=i.if.call(t,t&&t.shared,{hash:{},inverse:p.program(6,u,a),fn:p.program(4,l,a),data:a}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <div class="filter-bar-right"> <button class="pause-btn btn btn-sm btn-default ',r=i.if.call(e,e&&e.isPaused,{
hash:{},inverse:f.noop,fn:f.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='">'+m(n(1).call(e,"Pause",{hash:{},data:t}))+'</button> <button class="resume-btn btn btn-sm btn-primary ',r=i.unless.call(e,e&&e.isPaused,{hash:{},inverse:f.noop,fn:f.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='">'+m(n(1).call(e,"Resume",{hash:{},data:t}))+"</button> </div> "}function o(e,t){return"hidden"}function l(e,t){var i,r="";return r+=' <p class="conversion-error-message"><i class="conversion-error-icon glyphicon circle-exclamation-mark text-danger"></i> '+m((i=e&&e.errorMessage,
typeof i===v?i.apply(e):i))+" "+m(n(1).call(e,"Check the status in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",e&&e.serverID,{hash:{},data:t}))+"</p> "}function u(e,t){var i="";return i+=' <p class="conversion-status-message">'+m(n(1).call(e,"Manage your completed conversions in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",e&&e.serverID,{hash:{},data:t}))+"</p> "}function c(e,t){var n,r="";return r+=' <div class="conversion-queue-empty-region"></div> <div class="conversion-queue-up-next-list-region"></div> <hr class="conversion-queue-divider ',
n=i.unless.call(e,e&&e.shouldShowDivider,{hash:{},inverse:f.noop,fn:f.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+='"> <div class="conversion-queue-after-up-next-list-region"></div> '}function d(e,t){var i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center"> '+m(n(1).call(e,"This requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" </h4> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var h,p="",f=this,m=this.escapeExpression,v="function";
return p+='<div class="conversion-filter-bar filter-bar"> ',h=i.if.call(t,t&&t.hasPausedSetting,{hash:{},inverse:f.noop,fn:f.program(1,s,a),data:a}),(h||0===h)&&(p+=h),p+=" </div> ",h=i.if.call(t,t&&t.errorMessage,{hash:{},inverse:f.program(6,u,a),fn:f.program(4,l,a),data:a}),(h||0===h)&&(p+=h),p+=" ",h=i.if.call(t,t&&t.shouldShowList,{hash:{},inverse:f.program(10,d,a),fn:f.program(8,c,a),data:a}),(h||0===h)&&(p+=h),p+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){return' <div class="sessions-list-container"></div> '}function o(e,t){var n,r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center"> ',n=i.if.call(e,e&&e.shared,{hash:{},inverse:m.program(6,u,t),fn:m.program(4,l,t),data:t}),(n||0===n)&&(r+=n),r+=" </h4> </div> "}function l(e,t){var i="";return i+=" "+f(n(1).call(e,"Now Playing is restricted from shared users.",{hash:{},data:t}))+" "}function u(e,t){var n;return n=i.if.call(e,e&&e.synced,{hash:{},inverse:m.program(9,d,t),
fn:m.program(7,c,t),data:t}),n||0===n?n:""}function c(e,t){var i="";return i+=" "+f(n(1).call(e,"Now Playing is unavailable with synced servers.",{hash:{},data:t}))+" "}function d(e,t){var i="";return i+=" "+f(n(1).call(e,"Now Playing requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var h,p="",f=this.escapeExpression,m=this;return p+='<div class="filter-bar"></div> ',h=i.if.call(t,t&&t.shouldShowList,{
hash:{},inverse:m.program(3,o,a),fn:m.program(1,s,a),data:a}),(h||0===h)&&(p+=h),p+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="row row-loading"> <div class="loading loading-inline"></div> </div> <div class="sync-empty-message row row-padded hidden"> <h4 class="text-muted text-center"> '+o(n(1).call(t,"Nothing is synced to this device.",{
hash:{},data:a}))+' </h4> </div> <div class="sync-item-list-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return'<a class="edit-btn btn-gray" href="#"><i class="glyphicon pencil"></i></a>'}function o(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.devices,{hash:{},inverse:S.program(14,f,t),fn:S.program(4,l,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function l(e,t){var n,r="";return r+=' <div class="row"> <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',
n=i.each.call(e,e&&e.devices,{hash:{},inverse:S.noop,fn:S.programWithDepth(5,u,t,e),data:t}),(n||0===n)&&(r+=n),r+=' </ul> </div> <div class="sync-device-container col-sm-8 col-md-9"></div> </div> '}function u(e,t,r){var a,s="";return s+=' <li> <a class="card btn-gray ',a=n(12).call(e,(a=r&&r.selectedDevice,null==a||a===!1?a:a.id),e&&e.id,{hash:{},inverse:S.noop,fn:S.program(6,c,t),data:t}),(a||0===a)&&(s+=a),s+='" data-id="'+w((a=e&&e.id,typeof a===b?a.apply(e):a))+'" href="#"> ',a=i.if.call(e,e&&e.name,{
hash:{},inverse:S.program(10,h,t),fn:S.program(8,d,t),data:t}),(a||0===a)&&(s+=a),s+=" ",a=i.if.call(e,e&&e.isCloudSync,{hash:{},inverse:S.noop,fn:S.program(12,p,t),data:t}),(a||0===a)&&(s+=a),s+=" </a> </li> "}function c(e,t){return"selected"}function d(e,t){var n;return w((n=e&&e.name,typeof n===b?n.apply(e):n))}function h(e,t){var n;return w((n=e&&e.device,typeof n===b?n.apply(e):n))}function p(e,t){return'<i class="cloud-sync-icon glyphicon cloud"></i><button class="cloud-sync-settings-btn btn-link btn-gray"><i class="glyphicon cogwheel"></i></button>';
}function f(e,t){var i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+w(n(1).call(e,"You have no sync capable devices.",{hash:{},data:t}))+"</h4> </div> "}function m(e,t){var n,r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+w((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.message,typeof n===b?n.apply(e):n))+'</h4> <p class="text-center ',n=i.unless.call(e,(n=e&&e.plexPassInfo,null==n||n===!1?n:n.showButton),{hash:{},inverse:S.noop,
fn:S.program(17,v,t),data:t}),(n||0===n)&&(r+=n),r+='"> <a class="btn btn-sm btn-primary" href="'+w((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.url,typeof n===b?n.apply(e):n))+'" target="'+w((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.target,typeof n===b?n.apply(e):n))+'">'+w((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.buttonText,typeof n===b?n.apply(e):n))+"</a> </p> </div> "}function v(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var g,y="",b="function",w=this.escapeExpression,S=this;
return y+='<div class="filter-bar"> <div class="filter-bar-right"> ',g=i.if.call(t,t&&t.hasTouchScreen,{hash:{},inverse:S.noop,fn:S.program(1,s,a),data:a}),(g||0===g)&&(y+=g),y+=' <a class="refresh-btn btn-gray" href="#"><i class="glyphicon repeat"></i></a> </div> </div> ',g=i.if.call(t,t&&t.allowSync,{hash:{},inverse:S.program(16,m,a),fn:S.program(3,o,a),data:a}),(g||0===g)&&(y+=g),y+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">',(s=n.message)?a=s.call(t,{hash:{},data:r}):(s=t&&t.message,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+"</span> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"circle-ok"}function o(e,t){return"circle-exclamation-mark"}
this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d="function";return u+='<button class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <i class="alert-icon glyphicon ',l=n(12).call(t,t&&t.type,"success",{hash:{},inverse:c.program(3,o,a),fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='"></i> <h4>',l=t&&t.message,l=typeof l===d?l.apply(t):l,(l||0===l)&&(u+=l),u+="</h4> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var i,r="";return r+=' <a class="info-link link" href="'+c((i=e&&e.url,typeof i===u?i.apply(e):i))+'" target="_blank">'+c(n(1).call(e,"More Info",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u="function",c=this.escapeExpression,d=this;return l+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+c((o=t&&t.content,typeof o===u?o.apply(t):o))+"</span> ",o=i.if.call(t,t&&t.url,{
hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <span class="message">'+c(n(1).call(e,"An insecure media server has been found on your network.",{hash:{},data:t}))+'</span> <a class="reload-link link" href="#">'+c(n(1).call(e,"Reload app insecurely",{hash:{},data:t}))+"</a> "}function o(e,t){var i="";return i+=' <span class="message">'+c(n(1).call(e,"An unclaimed media server has been found on your network.",{
hash:{},data:t}))+'</span> <a class="claim-link link" href="#">'+c(n(1).call(e,"Claim it now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> ',l=i.if.call(t,t&&t.showInsecureMessage,{hash:{},inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var i="";return i+=' <a class="download-link link" href="#">'+h(n(1).call(e,"Download now",{hash:{},data:t}))+"</a> "}function o(e,t){var i;return i=n(12).call(e,e&&e.state,"downloaded",{hash:{},inverse:f.program(6,u,t),fn:f.program(4,l,t),data:t}),i||0===i?i:""}function l(e,t){var i="";return i+=' <a class="install-link link" href="#">'+h(n(1).call(e,"Install now",{hash:{},data:t}))+"</a> "}function u(e,t){var i,r="";return r+=' <a class="link" href="'+h((i=e&&e.downloadURL,typeof i===p?i.apply(e):i))+'" target="_blank">'+h(n(1).call(e,"Download now",{
hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h=this.escapeExpression,p="function",f=this;return d+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+h(n(1).call(t,"A Plex Media Server update is available!",{hash:{},data:a}))+"</span> ",c=n(12).call(t,t&&t.state,"available",{hash:{},inverse:f.program(3,o,a),fn:f.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<i class="alert-icon glyphicon cardio"></i> <span class="status"></span> '})},1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return'<a class="settings-btn btn-gray" href="#"><i class="glyphicon cogwheel"></i></a>'}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};
var l,u="",c=this,d=this.escapeExpression,h="function";return u+='<div class="breadcrumb-actions pull-right"> ',l=i.if.call(t,t&&t.showSettings,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' <span id="channel-list-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#channel-list-dropdown" data-toggle="dropdown"><i class="glyphicon show-thumbnails"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="list-btn" data-type="media-tile-list" href="#">'+d(n(1).call(t,"Posters",{
hash:{},data:a}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(62).call(t,t&&t.listType,"media-tile-list",{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+d(n(1).call(t,"Details",{hash:{},data:a}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(62).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+d(n(1).call(t,"List",{
hash:{},data:a}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(62).call(t,t&&t.listType,"media-list",{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"></i></a></li> </ul> </span> </div> <span class="breadcrumb-dropdown"><a href="'+d((l=t&&t.channelUrl,typeof l===h?l.apply(t):l))+'">'+d((l=t&&t.channelTitle,typeof l===h?l.apply(t):l))+'</a></span> <span class="breadcrumb-subset-dropdown ',l=i.unless.call(t,t&&t.title,{hash:{},inverse:c.noop,fn:c.program(3,o,a),
data:a}),(l||0===l)&&(u+=l),u+='"><span class="dropdown-placeholder">'+d((l=t&&t.title,typeof l===h?l.apply(t):l))+'</span></span> <span class="list-badge badge badge-lg">'+d((l=t&&t.totalSize,typeof l===h?l.apply(t):l))+"</span> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+=' <span id="section-list-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-list-dropdown" data-toggle="dropdown"><i class="glyphicon show-thumbnails"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="list-btn" data-type="episode-tile-list" href="#">'+v(n(1).call(e,"Posters",{
hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',i=n(62).call(e,e&&e.listType,"episode-tile-list",{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i></a></li> <li><a class="list-btn" data-type="episode-details-list" href="#">'+v(n(1).call(e,"Details",{hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',i=n(62).call(e,e&&e.listType,"episode-details-list",{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i></a></li> <li><a class="list-btn" data-type="episode-list" href="#">'+v(n(1).call(e,"List",{
hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',i=n(62).call(e,e&&e.listType,"episode-list",{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i></a></li> </ul> </span> '}function o(e,t){return"hidden"}function l(e,t){var n,r="";return r+=' <span id="section-dropdown" class="details-breadcrumb dropdown"> ',n=i.if.call(e,e&&e.section,{hash:{},inverse:g.program(7,c,t),fn:g.program(5,u,t),data:t}),(n||0===n)&&(r+=n),r+=' <a class="btn-gray dropdown-toggle split-dropdown-toggle" href="#section-dropdown" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',
n=i.if.call(e,e&&e.showPlaylists,{hash:{},inverse:g.noop,fn:g.program(9,d,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.each.call(e,e&&e.sections,{hash:{},inverse:g.noop,fn:g.programWithDepth(12,p,t,e),data:t}),(n||0===n)&&(r+=n),r+=" </ul> </span> "}function u(e,t){var n,i="";return i+=' <a class="section-btn btn-gray" data-key="'+v((n=e&&e.section,n=null==n||n===!1?n:n.key,typeof n===y?n.apply(e):n))+'" href="#">'+v((n=e&&e.section,n=null==n||n===!1?n:n.title,typeof n===y?n.apply(e):n))+"</a> "}function c(e,t){
var i="";return i+=' <a class="playlists-btn btn-gray" href="#">'+v(n(1).call(e,"Playlists",{hash:{},data:t}))+"</a> "}function d(e,t){var r,a="";return a+=' <li><a class="playlists-btn" href="#"><span class="dropdown-truncated-label">'+v(n(1).call(e,"Playlists",{hash:{},data:t}))+"</span>",r=i.unless.call(e,(r=e&&e.section,null==r||r===!1?r:r.key),{hash:{},inverse:g.noop,fn:g.program(10,h,t),data:t}),(r||0===r)&&(a+=r),a+="</a></li> "}function h(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>';
}function p(e,t,i){var r,a="";return a+=' <li><a class="section-btn" data-key="'+v((r=e&&e.key,typeof r===y?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+v((r=e&&e.title,typeof r===y?r.apply(e):r))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',r=n(62).call(e,(r=i&&i.section,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='"></i></a></li> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};
var f,m="",v=this.escapeExpression,g=this,y="function";return m+='<div class="breadcrumb-actions pull-right"> ',f=i.if.call(t,t&&t.listType,{hash:{},inverse:g.noop,fn:g.program(1,s,a),data:a}),(f||0===f)&&(m+=f),m+=' <a class="previous-btn btn-gray hidden" href="#"><i class="glyphicon chevron-left"></i></a> <a class="next-btn btn-gray hidden" href="#"><i class="glyphicon chevron-right"></i></a> </div> ',f=i.if.call(t,t&&t.showSectionDropdown,{hash:{},inverse:g.noop,fn:g.program(4,l,a),data:a}),(f||0===f)&&(m+=f),
m+=' <span class="grandparent-item hidden"></span> <span class="parents-dropdown hidden"></span> <span class="siblings-dropdown hidden"></span> <span class="current-item hidden"></span> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <span id="section-actions-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-actions-dropdown" data-toggle="dropdown"><i class="glyphicon cogwheel"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="import-btn" href="#">'+u(n(1).call(e,"Import from iTunes",{
hash:{},data:t}))+"</a></li> </ul> </span> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c=this,d="function";return l+='<div class="breadcrumb-actions pull-right"> ',o=i.if.call(t,t&&t.canImportPlaylists,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' </div> <span class="breadcrumb-dropdown"></span> <span class="breadcrumb-subset-dropdown"></span> <span class="breadcrumb-items-dropdown"> <span class="items-badge badge badge-lg">'+u((o=t&&t.totalSize,
typeof o===d?o.apply(t):o))+"</span> </span> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <a class="update-btn btn-gray btn-loading btn-loading-replace btn-loading-static ',r=i.if.call(e,e&&e.refreshing,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='" href="#" title="'+p((r=e&&e.updateTitle,typeof r===h?r.apply(e):r))+'" data-title-alt="'+p((r=e&&e.updateTitleAlt,typeof r===h?r.apply(e):r))+'" data-toggle="tooltip"> <span class="loading loading-bc"></span> <i class="btn-label-alt glyphicon ban"></i> <i class="btn-label glyphicon repeat"></i> </a> <span id="section-actions-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-actions-dropdown" data-toggle="dropdown"><i class="glyphicon cogwheel"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="edit-btn btn-gray" href="#">'+p(n(1).call(e,"Edit Library",{
hash:{},data:t}))+'</a></li> <li><a class="share-btn" href="#">'+p(n(1).call(e,"Share...",{hash:{},data:t}))+'</a></li> <li><a class="analyze-btn" href="#">'+p(n(1).call(e,"Analyze",{hash:{},data:t}))+'</a></li> <li><a class="force-refresh-btn" href="#">'+p(n(1).call(e,"Refresh All",{hash:{},data:t}))+'</a></li> <li><a class="empty-trash-btn" href="#">'+p(n(1).call(e,"Empty Trash",{hash:{},data:t}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+p(n(1).call(e,"Delete Library",{hash:{},
data:t}))+"</a></li> </ul> </span> "}function o(e,t){return"active"}function l(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this,h="function",p=this.escapeExpression;return c+='<div class="breadcrumb-actions pull-right"> ',u=i.unless.call(t,t&&t.limited,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+=' <span id="section-list-dropdown" class="dropdown"> <a class="btn-gray dropdown-toggle" href="#section-list-dropdown" data-toggle="dropdown"><i class="glyphicon show-thumbnails"></i> <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu pull-right"> <li><a class="list-btn" data-type="media-tile-list" href="#">'+p(n(1).call(t,"Posters",{
hash:{},data:a}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(62).call(t,t&&t.listType,"media-tile-list",{hash:{},inverse:d.noop,fn:d.program(4,l,a),data:a}),(u||0===u)&&(c+=u),c+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+p(n(1).call(t,"Details",{hash:{},data:a}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(62).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:d.noop,fn:d.program(4,l,a),data:a}),(u||0===u)&&(c+=u),c+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+p(n(1).call(t,"List",{
hash:{},data:a}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(62).call(t,t&&t.listType,"media-list",{hash:{},inverse:d.noop,fn:d.program(4,l,a),data:a}),(u||0===u)&&(c+=u),c+='"></i></a></li> </ul> </span> </div> <span class="breadcrumb-dropdown"></span> <span class="breadcrumb-subset-dropdown"></span> <span class="breadcrumb-type-dropdown"></span> <span class="breadcrumb-items-dropdown"> <span class="items-badge badge badge-lg">'+p((u=t&&t.totalSize,typeof u===h?u.apply(t):u))+"</span> </span> ";
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t,i){var r,a="";return a+=' <li><a class="card btn-gray ',r=n(12).call(e,i&&i.currentKey,e&&e.key,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='" href="#!/server/'+d(n(58).call(e,i&&i.serverID,{hash:{},data:t}))+"/directory/"+d(n(58).call(e,e&&e.key,{hash:{},data:t}))+'">'+d(n(1).call(e,e&&e.title,{hash:{},data:t}))+"</a></li> "}function o(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d=this.escapeExpression;return u+="<h2>"+d(n(1).call(t,"Channel Directory",{hash:{},data:a}))+'</h2> <div class="filter-bar"> <a class="btn btn-sm btn-default pull-right" href="#!/server/'+d(n(58).call(t,t&&t.serverID,{hash:{},data:a}))+'/channels">'+d(n(1).call(t,"Browse Channels",{hash:{},data:a}))+'</a> </div> <div class="row"> <div class="col-md-3"> <ul class="nav nav-cards"> ',l=i.each.call(t,t&&t.directories,{hash:{},inverse:c.noop,fn:c.programWithDepth(1,s,a,t),
data:a}),(l||0===l)&&(u+=l),u+=' </ul> </div> <div class="directory-container col-md-9"></div> </div> '})},1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,i="";return i+='<span class="badge">'+f((n=e&&e.allCount,typeof n===p?n.apply(e):n))+"</span>"}function o(e,t){var n,i="";return i+='<span class="badge">'+f((n=e&&e.videoCount,typeof n===p?n.apply(e):n))+"</span>"}function l(e,t){var n,i="";return i+='<span class="badge">'+f((n=e&&e.musicCount,
typeof n===p?n.apply(e):n))+"</span>"}function u(e,t){var n,i="";return i+='<span class="badge">'+f((n=e&&e.photoCount,typeof n===p?n.apply(e):n))+"</span>"}function c(e,t){var i="";return i+=' <div class="filter-bar"> <a class="btn btn-sm btn-primary pull-right" href="#!/server/'+f(n(58).call(e,e&&e.serverID,{hash:{},data:t}))+'/directory">'+f(n(1).call(e,"Install Channels",{hash:{},data:t}))+'</a> <a class="check-updates-btn btn btn-sm btn-default btn-loading" href="#"> <div class="loading loading-sm"></div> <span class="btn-label">'+f(n(1).call(e,"Check for Updates",{
hash:{},data:t}))+"</span> </a> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p="function",f=this.escapeExpression,m=this;return h+='<ul class="nav nav-header pull-right"> <li><a class="all-btn btn-gray selected" href="#">'+f(n(1).call(t,"All",{hash:{},data:a})),d=i.if.call(t,t&&t.allCount,{hash:{},inverse:m.noop,fn:m.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+='</a></li> <li><a class="video-btn btn-gray" href="#">'+f(n(1).call(t,"Video",{hash:{},data:a})),
d=i.if.call(t,t&&t.videoCount,{hash:{},inverse:m.noop,fn:m.program(3,o,a),data:a}),(d||0===d)&&(h+=d),h+='</a></li> <li><a class="music-btn btn-gray" href="#">'+f(n(1).call(t,"Music",{hash:{},data:a})),d=i.if.call(t,t&&t.musicCount,{hash:{},inverse:m.noop,fn:m.program(5,l,a),data:a}),(d||0===d)&&(h+=d),h+='</a></li> <li><a class="photo-btn btn-gray" href="#">'+f(n(1).call(t,"Photo",{hash:{},data:a})),d=i.if.call(t,t&&t.photoCount,{hash:{},inverse:m.noop,fn:m.program(7,u,a),data:a}),(d||0===d)&&(h+=d),
h+="</a></li> </ul> <h2>"+f(n(1).call(t,"Channels",{hash:{},data:a}))+"</h2> ",d=i.unless.call(t,t&&t.shared,{hash:{},inverse:m.noop,fn:m.program(9,c,a),data:a}),(d||0===d)&&(h+=d),h+=' <div class="channels-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return' <a class="media-poster-container play-btn" href="#"> <div class="album-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> ';
}function s(e,t){return' <div class="album-poster item-poster media-poster"></div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="details-title-container"> <h1><a class="artist-title btn-metadata-link" href="#!/server/',(l=n.serverID)?o=l.call(t,{hash:{},data:r}):(l=t&&t.serverID,o=typeof l===c?l.call(t,{hash:{},data:r}):l),u+=d(o)+"/details/",(l=n.parentKey)?o=l.call(t,{hash:{},data:r}):(l=t&&t.parentKey,
o=typeof l===c?l.call(t,{hash:{},data:r}):l),u+=d(o)+'"></a></h1> <h2 class="album-title"></h2> <h3 class="item-year"></h3> </div> <div class="details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> <span class="rating-container rating-container-inline"></span> </p> <div class="summary-container"></div> <div class="track-list-container details-list-region"></div> </div> <div class="details-poster-container"> ',
o=n.if.call(t,t&&t.canPlay,{hash:{},inverse:h.program(3,s,r),fn:h.program(1,a,r),data:r}),(o||0===o)&&(u+=o),u+=" </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return' <a class="media-poster-container play-btn" href="#"> <div class="artist-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> '}function o(e,t){
return' <div class="artist-poster item-poster media-poster"></div> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="details-title-container"> <h1 class="item-title"></h1> </div> <div class="details-metadata-container"> <div class="artist-details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> </p> <div class="summary-container"></div> </div> <div class="popular-tracks-region hidden"> <h3 class="popular-tracks-header">'+c(n(1).call(t,"Popular Tracks",{
hash:{},data:a}))+'</h3> </div> <div class="albums-region details-list-region"> <h3 class="albums-header">'+c(n(1).call(t,"Albums",{hash:{},data:a}))+'</h3> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+c(n(1).call(t,"Music Videos",{hash:{},data:a}))+'</h3> </div> <div class="concert-region hidden"> <h3 class="concert-region-header">'+c(n(1).call(t,"On Tour",{hash:{},data:a}))+'</h3> </div> <div class="similar-artists-region hidden"> <h3 class="similar-artists-header">'+c(n(1).call(t,"Similar Artists",{
hash:{},data:a}))+'</h3> </div> </div> <div class="details-poster-container"> ',l=i.if.call(t,t&&t.canPlay,{hash:{},inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> </p> <p class="item-tagline metadata-tagline"></p> <div class="item-director metadata-tags"> <span class="metadata-label">'+o(n(1).call(t,"Director",{
hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+o(n(1).call(t,"Writer",{hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+o(n(1).call(t,"Cast",{hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+o(n(1).call(t,"Audio",{
hash:{},data:a}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+o(n(1).call(t,"Subtitles",{hash:{},data:a}))+'</span> </div> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="clip-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> ';
})},1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l="function",u=this.escapeExpression;return o+='<div class="details-title-container"> <h1><a class="show-title btn-metadata-link" href="#!/server/'+u((s=t&&t.serverID,typeof s===l?s.apply(t):s))+"/details/"+u((s=t&&t.grandparentKey,typeof s===l?s.apply(t):s))+'"></a></h1> <h2 class="episode-title"></h2> <h3 class="episode-index"></h3> </div> <div class="details-metadata-container"> <div class="details-progress-container"> <div class="item-progress details-progress"></div> </div> <div class="metadata-right pull-right"> <div class="item-available-at metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="item-unwatched-label label label-primary">'+u(n(1).call(t,"Unwatched",{
hash:{},data:a}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+u(n(1).call(t,"Unavailable",{hash:{},data:a}))+'</a> </p> <div class="item-director metadata-tags"> <span class="metadata-label">'+u(n(1).call(t,"Director",{hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+u(n(1).call(t,"Writer",{hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+u(n(1).call(t,"Cast",{
hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+u(n(1).call(t,"Audio",{hash:{},data:a}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+u(n(1).call(t,"Subtitles",{hash:{},data:a}))+'</span> </div> <div class="summary-container"></div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="episode-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="media-count-badge badge badge-lg hidden"></span> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="movie-details-metadata-container"> <div class="details-progress-container"> <div class="item-progress details-progress"></div> </div> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> <div class="rating-container"></div> <div class="content-rating-flag-container"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="item-unwatched-label label label-primary">'+o(n(1).call(t,"Unwatched",{
hash:{},data:a}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+o(n(1).call(t,"Unavailable",{hash:{},data:a}))+'</a> </p> <p class="item-tagline metadata-tagline"></p> <div class="item-director metadata-tags"> <span class="metadata-label">'+o(n(1).call(t,"Director",{hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+o(n(1).call(t,"Writer",{
hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+o(n(1).call(t,"Cast",{hash:{},data:a}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+o(n(1).call(t,"Audio",{hash:{},data:a}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+o(n(1).call(t,"Subtitles",{hash:{},data:a
}))+'</span> </div> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+o(n(1).call(t,"Extras",{hash:{},data:a}))+'</h3> </div> </div> <div class="details-poster-container"> <a class="media-poster-container play-btn" href="#"> <div class="movie-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="media-count-badge badge badge-lg hidden"></span> </div> </a> <div class="video-audio-flags-container media-flags"></div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s="",o="function",l=this.escapeExpression;return s+='<div class="photo-album-page '+l((a=t&&t.styles,a=null==a||a===!1?a:a.page,typeof a===o?a.apply(t):a))+'"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <div class="playlist-poster item-poster media-poster '+h((n=e&&e.type,
typeof n===d?n.apply(e):n))+'"> ',n=i.if.call(e,e&&e.smart,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" </div> "}function o(e,t){return' <span class="smart-badge badge badge-round"> <i class="icon glyphicon cogwheel"></i> </span> '}function l(e,t){var n,r="";return r+=" ",n=i.unless.call(e,e&&e.hasComposite,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d="function",h=this.escapeExpression,p=this;
return c+='<div class="details-title-container '+h((u=t&&t.type,typeof u===d?u.apply(t):u))+'"> <h1 class="item-title"></h1> </div> <div class="details-metadata-container '+h((u=t&&t.type,typeof u===d?u.apply(t):u))+'"> <div class="playlist-details-metadata-container"> <p class="metadata-right pull-right"> <span class="item-duration metadata-duration"></span> </p> <p class="metadata-labels"> <span class="item-count"></span> </p> <p class="item-summary metadata-summary"></p> </div> <div class="playlist-items-container details-list-region"></div> <h1 class="error-text hidden">'+h(n(1).call(t,"Failed to load items for this playlist.",{
hash:{},data:a}))+'</h1> <div class="loading-container"> <div class="loading loading-inline"></div> </div> </div> <div class="details-poster-container '+h((u=t&&t.type,typeof u===d?u.apply(t):u))+'"> ',u=i.if.call(t,t&&t.hasComposite,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+=' <div class="playlist-side-strip item-side-strip media-poster '+h((u=t&&t.type,typeof u===d?u.apply(t):u))+'"> ',u=i.if.call(t,t&&t.smart,{hash:{},inverse:p.noop,fn:p.program(4,l,a),data:a}),
(u||0===u)&&(c+=u),c+=" </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<div class="details-title-container"> <h1><a class="show-title btn-metadata-link" href="#!/server/',(s=n.serverID)?a=s.call(t,{hash:{},data:r}):(s=t&&t.serverID,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+"/details/",(s=n.parentKey)?a=s.call(t,{
hash:{},data:r}):(s=t&&t.parentKey,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'"></a></h1> <h2 class="season-title"></h2> </div> <div class="details-metadata-container"> <div class="media-actions-container title"></div> <div class="summary-container"></div> <div class="episode-list-container details-list-region"></div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return' <a class="media-poster-container play-btn" href="#"> <div class="show-poster item-poster media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <span class="unwatched-count-badge details-unwatched-count-badge badge badge-lg hidden"></span> </div> </a> ';
}function s(e,t){return' <div class="show-poster item-poster media-poster"> <span class="unwatched-count-badge details-unwatched-count-badge badge badge-lg hidden"></span> </div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,l="",u=this;return l+='<div class="details-title-container"> <h1 class="item-title"></h1> <h2 class="item-year"></h2> </div> <div class="details-metadata-container"> <div class="show-details-metadata-container"> <div class="metadata-right pull-right"> <div class="item-genre metadata-tags"></div> </div> <p class="metadata-labels"> <span class="item-duration metadata-duration"></span> <span class="rating-container rating-container-inline"></span> <span class="content-rating-flag-container content-rating-flag-container-inline"></span> </p> <div class="summary-container"></div> <div class="studio-flag-container"></div> </div> <div class="season-list-container details-list-region"></div> </div> <div class="details-poster-container"> ',
o=n.if.call(t,t&&t.canPlay,{hash:{},inverse:u.program(3,s,r),fn:u.program(1,a,r),data:r}),(o||0===o)&&(l+=o),l+=" </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>'+o(n(1).call(t,"This media type does not have a details page.",{hash:{},data:a}))+"</h1> </div> </div> "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<a class="concert-link" target="_blank"> <div class="concert-calendar"> <div class="concert-month"></div> <div class="concert-day"></div> </div> <div class="concert-details"> <div class="concert-name"></div> <div class="concert-location"> <span class="concert-venue"></span> (<span class="concert-city"></span>) </div> </div> </a> '})},function(e,t,n){var i=n(4);
e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<p class="item-summary metadata-summary"></p> <div class="summary-divider hidden"> <button type="button" class="summary-divider-btn">'+o(n(1).call(t,"More",{hash:{},data:a}))+"</button> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,i="";return i+=' <li><a class="auto-match-agent" href="#" data-id="'+c((n=e&&e.identifier,
typeof n===u?n.apply(e):n))+'">'+c((n=e&&e.name,typeof n===u?n.apply(e):n))+"</a></li> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u="function",c=this.escapeExpression,d=this;return l+='<a class="dropdown-toggle" href="#auto-match-dropdown" data-toggle="dropdown">'+c(n(1).call(t,"Auto Match",{hash:{},data:a}))+' <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu"> ',o=i.each.call(t,t&&t.agents,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a
}),(o||0===o)&&(l+=o),l+=" </ul> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <a class="breadcrumb-btn btn-gray" data-key="'+f((n=e&&e.item,n=null==n||n===!1?n:n.key,typeof n===p?n.apply(e):n))+'" href="#"><span class="breadcrumb-truncated-label">'+f((n=e&&e.item,n=null==n||n===!1?n:n.title,typeof n===p?n.apply(e):n))+'</span></a> <a class="btn-gray dropdown-toggle split-dropdown-toggle" href="#'+f((n=e&&e.id,typeof n===p?n.apply(e):n))+'" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',
n=i.each.call(e,e&&e.items,{hash:{},inverse:m.noop,fn:m.programWithDepth(2,o,t,e),data:t}),(n||0===n)&&(r+=n),r+=" </ul> "}function o(e,t,i){var r,a="";return a+=' <li><a class="breadcrumb-btn" data-key="'+f((r=e&&e.key,typeof r===p?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+f((r=e&&e.title,typeof r===p?r.apply(e):r))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',r=n(62).call(e,(r=i&&i.item,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:m.noop,fn:m.program(3,l,t),
data:t}),(r||0===r)&&(a+=r),a+='"></i></a></li> '}function l(e,t){return"hidden"}function u(e,t){var n,r="";return r+=' <a class="breadcrumb-btn btn-gray" ',n=i.unless.call(e,e&&e.hasDetails,{hash:{},inverse:m.noop,fn:m.program(6,c,t),data:t}),(n||0===n)&&(r+=n),r+=' href="#"> <span class="breadcrumb-truncated-label">'+f((n=e&&e.item,n=null==n||n===!1?n:n.title,typeof n===p?n.apply(e):n))+"</span> </a> "}function c(e,t){var n,i="";return i+='data-key="'+f((n=e&&e.item,n=null==n||n===!1?n:n.key,typeof n===p?n.apply(e):n))+'"';
}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p="function",f=this.escapeExpression,m=this;return d=i.if.call(t,t&&t.showDropdown,{hash:{},inverse:m.program(5,u,a),fn:m.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+='<li><a class="download-btn" href="'+c((i=e&&e.downloadUrl,typeof i===u?i.apply(e):i))+'" download="'+c((i=e&&e.downloadName,typeof i===u?i.apply(e):i))+'" tabindex="-1">'+c(n(1).call(e,"Download",{
hash:{},data:t}))+"</a></li>"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u="function",c=this.escapeExpression,d=this;return l+='<li><a class="play-version-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Play Version...",{hash:{},data:a}))+'</a></li> <li><a class="play-all-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Play All",{hash:{},data:a}))+'</a></li> <li><a class="play-shuffled-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Shuffle",{hash:{},data:a}))+'</a></li> <li><a class="play-next-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Play Next",{
hash:{},data:a}))+'</a></li> <li><a class="add-to-queue-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Add to Queue",{hash:{},data:a}))+'</a></li> <li><a class="play-mix-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Play Plex Mix",{hash:{},data:a}))+'</a></li> <li><a class="play-trailer-btn play-primary-extra-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Play Trailer",{hash:{},data:a}))+'</a></li> <li><a class="play-music-video-btn play-primary-extra-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Play Music Video",{
hash:{},data:a}))+'</a></li> <li><a class="add-to-playlist-btn btn-link" href="#" tabindex="-1">'+c(n(1).call(t,"Add to Playlist...",{hash:{},data:a}))+'</a></li> <li class="divider"></li> <li><a class="refresh-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Refresh",{hash:{},data:a}))+'</a></li> <li><a class="mark-watched-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Mark as Watched",{hash:{},data:a}))+'</a></li> <li><a class="mark-unwatched-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Mark as Unwatched",{
hash:{},data:a}))+'</a></li> <li><a class="sync-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Sync...",{hash:{},data:a}))+'</a></li> <li><a class="convert-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Optimize...",{hash:{},data:a}))+"</a></li> ",o=i.if.call(t,t&&t.downloadUrl,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Watch Later",{hash:{},data:a}))+'</a></li> <li><a class="share-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Share...",{
hash:{},data:a}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Recommend...",{hash:{},data:a}))+'</a></li> <li><a class="delete-btn has-danger" href="#" tabindex="-1">'+c(n(1).call(t,"Delete",{hash:{},data:a}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Info",{hash:{},data:a}))+"</a></li> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),
a=a||{};var s="",o=this.escapeExpression;return s+='<div class="play-queue-empty-message">'+o(n(1).call(t,"Nothing queued",{hash:{},data:a}))+"</div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}function o(e,t){return"readonly"}function l(e,t){return' <button class="btn-gray save-btn" href="#"> <i class="plex-icon-add-to-playlist"></i> </button> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this,h=this.escapeExpression;
return c+='<button class="btn-link dropdown-toggle ',u=i.unless.call(t,t&&t.canEdit,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='" href="#play-queue-dropdown" data-toggle="dropdown"> <i class="glyphicon show-thumbnails-with-lines"></i> </button> <ol class="play-queue-list dropdown-menu pull-right ',u=i.unless.call(t,t&&t.canEdit,{hash:{},inverse:d.noop,fn:d.program(3,o,a),data:a}),(u||0===u)&&(c+=u),c+='"> <li class="dropdown-header play-queue-header"> ',u=i.if.call(t,t&&t.canPlaylist,{
hash:{},inverse:d.noop,fn:d.program(5,l,a),data:a}),(u||0===u)&&(c+=u),c+=' <i class="glyphicon show-thumbnails-with-lines"></i> '+h(n(1).call(t,"Up Next",{hash:{},data:a}))+" </li> </ol> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<a class="play-queue-metadata-region" href="#"></a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){
return' <button class="delete-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var s,o,l="",u="function",c=this.escapeExpression,d=this;return l+='<div class="media-poster ',(o=n.type)?s=o.call(t,{hash:{},data:r}):(o=t&&t.type,s=typeof o===u?o.call(t,{hash:{},data:r}):o),l+=c(s)+'"></div> <div class="media-item"> <div class="media-title"></div> <div class="media-subtitle-1"><span class="media-primary-subtitle"></span><span class="media-secondary-subtitle"></span></div> </div> ',
s=n.if.call(t,t&&t.canDelete,{hash:{},inverse:d.noop,fn:d.program(1,a,r),data:r}),(s||0===s)&&(l+=s),l+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+='<li><a class="download-btn" href="'+c((i=e&&e.downloadUrl,typeof i===u?i.apply(e):i))+'" download="'+c((i=e&&e.downloadName,typeof i===u?i.apply(e):i))+'" tabindex="-1">'+c(n(1).call(e,"Download",{hash:{},data:t}))+"</a></li>"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),
a=a||{};var o,l="",u="function",c=this.escapeExpression,d=this;return l+='<li><a class="play-mix-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Play Plex Mix",{hash:{},data:a}))+'</a></li> <li><a class="add-to-playlist-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Add to Playlist...",{hash:{},data:a}))+'</a></li> <li class="divider"></li> <li><a class="sync-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Sync...",{hash:{},data:a}))+"</a></li> ",o=i.if.call(t,t&&t.downloadUrl,{hash:{},inverse:d.noop,fn:d.program(1,s,a),
data:a}),(o||0===o)&&(l+=o),l+=' <li><a class="share-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Share...",{hash:{},data:a}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Recommend...",{hash:{},data:a}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+c(n(1).call(t,"Info",{hash:{},data:a}))+"</a></li> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t,i){var r,a="";return a+=' <li><a href="#" class="type-btn" data-key="'+d((r=e&&e.key,
typeof r===c?r.apply(e):r))+'">'+d(n(1).call(e,e&&e.title,{hash:{},data:t}))+" ",r=n(12).call(e,(r=i&&i.currentType,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="</a></li> "}function o(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<a class="btn-gray dropdown-toggle" href="#playlist-type-dropdown" data-toggle="dropdown">'+d(n(1).call(t,(l=t&&t.currentType,
null==l||l===!1?l:l.title),{hash:{},data:a}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',l=i.each.call(t,t&&t.types,{hash:{},inverse:h.noop,fn:h.programWithDepth(1,s,a,t),data:a}),(l||0===l)&&(u+=l),u+=" </ul> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){var i,r="";return r+=' <a class="dropdown-toggle ',i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.noop,fn:h.program(2,s,t),data:t}),(i||0===i)&&(r+=i),r+='" href="#primary-player-dropdown" data-toggle="dropdown"> <i class="',
i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.program(6,l,t),fn:h.program(4,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i><i class="caret-icon"></i> </a> '}function s(e,t){return"active"}function o(e,t){return"plex-icon-companion-cast-active"}function l(e,t){return"plex-icon-companion-cast"}function u(e,t){var i,r="";return r+=' <a class="cast-btn ',i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.noop,fn:h.program(2,s,t),data:t}),(i||0===i)&&(r+=i),r+="\" href='#'> <i class=\"",i=n.if.call(e,e&&e.primaryPlayer,{
hash:{},inverse:h.program(6,l,t),fn:h.program(4,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i> </a> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var c,d="",h=this;return c=n.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(8,u,r),fn:h.program(1,a,r),data:r}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <li class="dropdown-header"><span class="dropdown-truncated-label">',
r=i.if.call(e,e&&e.nowPlaying,{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=m((r=e&&e.primaryPlayer,r=null==r||r===!1?r:r.name,typeof r===v?r.apply(e):r))+"</span></li> ",r=i.if.call(e,e&&e.showNowPlaying,{hash:{},inverse:g.noop,fn:g.program(4,l,t),data:t}),(r||0===r)&&(a+=r),a+=' <li> <a class="local-player-btn" href="#"> <i class="glyphicon ban"></i> '+m(n(1).call(e,"Disconnect",{hash:{},data:t}))+" </a> </li> "}function o(e,t){var i="";return i+=m(n(1).call(e,"Casting on",{
hash:{},data:t}))+" "}function l(e,t){var n,r="";return r+=" ",n=i.each.call(e,e&&e.nowPlaying,{hash:{},inverse:g.noop,fn:g.program(5,u,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function u(e,t){var n,i="";return i+=' <li> <a class="now-playing-btn" data-id="'+m((n=e&&e.ratingKey,typeof n===v?n.apply(e):n))+'" href="#"> <i class="glyphicon play"></i> <span class="dropdown-truncated-label">'+m((n=e&&e.title,typeof n===v?n.apply(e):n))+"</span> </a> </li> "}function c(e,t){var n,r="";return r+=" ",n=i.each.call(e,e&&e.players,{
hash:{},inverse:g.noop,fn:g.program(8,d,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function d(e,t){var n,r="";return r+=' <li> <a class="plex-player-btn" data-id="'+m((n=e&&e.machineIdentifier,typeof n===v?n.apply(e):n))+'" href="#"> <i class="dropdown-item-icon plex-icon-companion-plex"></i> <span class="dropdown-truncated-label">'+m((n=e&&e.name,typeof n===v?n.apply(e):n))+"</span> ",n=i.if.call(e,e&&e.selected,{hash:{},inverse:g.noop,fn:g.program(9,h,t),data:t}),(n||0===n)&&(r+=n),r+=" </a> </li> ";
}function h(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var p,f="",m=this.escapeExpression,v="function",g=this;return p=i.if.call(t,t&&t.primaryPlayer,{hash:{},inverse:g.program(7,c,a),fn:g.program(1,s,a),data:a}),(p||0===p)&&(f+=p),f+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <a class="dropdown-toggle" href="#primary-server-dropdown" data-toggle="dropdown"> <span class="dropdown-friendly-name">'+p((n=e&&e.currentServer,
n=null==n||n===!1?n:n.friendlyName,typeof n===h?n.apply(e):n))+'</span> <i class="caret-icon"></i> </a> <ul class="dropdown-menu"> ',n=i.each.call(e,e&&e.servers,{hash:{},inverse:f.noop,fn:f.programWithDepth(2,o,t,e),data:t}),(n||0===n)&&(r+=n),r+=" </ul> "}function o(e,t,i){var r,a="";return a+=' <li><a data-id="'+p((r=e&&e.machineIdentifier,typeof r===h?r.apply(e):r))+'" href="#"><span class="dropdown-truncated-label">'+p((r=e&&e.friendlyName,typeof r===h?r.apply(e):r))+"</span>",r=n(12).call(e,(r=i&&i.currentServer,
null==r||r===!1?r:r.machineIdentifier),e&&e.machineIdentifier,{hash:{},inverse:f.noop,fn:f.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+="</a></li> "}function l(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function u(e,t){var n,i="";return i+=' <span class="dropdown-placeholder"> <span class="dropdown-friendly-name">'+p((n=e&&e.currentServer,n=null==n||n===!1?n:n.friendlyName,typeof n===h?n.apply(e):n))+"</span> </span> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),
a=a||{};var c,d="",h="function",p=this.escapeExpression,f=this;return c=i.if.call(t,t&&t.showDropdown,{hash:{},inverse:f.program(5,u,a),fn:f.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <a class="dropdown-toggle" href="#section-dropdown" data-toggle="dropdown">'+p((n=e&&e.currentSectionTitle,typeof n===m?n.apply(e):n))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',
n=i.if.call(e,e&&e.showPlaylists,{hash:{},inverse:f.noop,fn:f.programWithDepth(2,o,t,e),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.each.call(e,e&&e.sections,{hash:{},inverse:f.noop,fn:f.programWithDepth(5,u,t,e),data:t}),(n||0===n)&&(r+=n),r+=" </ul> "}function o(e,t,r){var a,s="";return s+=' <li><a href="#!/server/'+p(n(58).call(e,r&&r.serverID,{hash:{},data:t}))+'/playlists"><span class="dropdown-truncated-label">'+p(n(1).call(e,"Playlists",{hash:{},data:t}))+"</span>",a=i.unless.call(e,e&&e.currentSectionKey,{
hash:{},inverse:f.noop,fn:f.program(3,l,t),data:t}),(a||0===a)&&(s+=a),s+="</a></li> "}function l(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function u(e,t,i){var r,a="";return a+=' <li><a href="#!/server/'+p(n(58).call(e,i&&i.serverID,{hash:{},data:t}))+"/section/"+p(n(58).call(e,e&&e.key,{hash:{},data:t}))+'"><span class="dropdown-truncated-label">'+p((r=e&&e.title,typeof r===m?r.apply(e):r))+"</span>",r=n(12).call(e,i&&i.currentSectionKey,e&&e.key,{hash:{},inverse:f.noop,
fn:f.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+="</a></li> "}function c(e,t){var n,i="";return i+=" "+p((n=e&&e.currentSectionTitle,typeof n===m?n.apply(e):n))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p=this.escapeExpression,f=this,m="function";return d=i.if.call(t,t&&t.showDropdown,{hash:{},inverse:f.program(7,c,a),fn:f.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var r,a="";return a+=' <a class="btn-gray dropdown-toggle" href="#section-subset-dropdown" data-toggle="dropdown">'+p(n(1).call(e,(r=e&&e.currentSubset,null==r||r===!1?r:r.title),{hash:{},data:t}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',r=i.each.call(e,e&&e.subsets,{hash:{},inverse:f.noop,fn:f.programWithDepth(2,o,t,e),data:t}),(r||0===r)&&(a+=r),a+=" </ul> "}function o(e,t,n){var r,a="";return a+=" ",r=i.if.call(e,e&&e.primary,{hash:{},inverse:f.noop,fn:f.programWithDepth(3,l,t,n),
data:t}),(r||0===r)&&(a+=r),a+=" "}function l(e,t,i){var r,a="";return a+=' <li><a href="#!/server/'+p(n(58).call(e,i&&i.serverID,{hash:{},data:t}))+"/section/"+p(n(58).call(e,i&&i.sectionID,{hash:{},data:t}))+"/"+p(n(58).call(e,e&&e.key,{hash:{},data:t}))+'">'+p(n(1).call(e,e&&e.title,{hash:{},data:t}))+" ",r=n(12).call(e,(r=i&&i.currentSubset,null==r||r===!1?r:r.key),e&&e.key,{hash:{},inverse:f.noop,fn:f.program(4,u,t),data:t}),(r||0===r)&&(a+=r),a+="</a></li> "}function u(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>';
}function c(e,t){var i,r="";return r+=' <span class="dropdown-placeholder">'+p(n(1).call(e,(i=e&&e.currentSubset,null==i||i===!1?i:i.title),{hash:{},data:t}))+"</span> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p=this.escapeExpression,f=this;return d=i.if.call(t,t&&t.showDropdown,{hash:{},inverse:f.program(6,c,a),fn:f.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<a class="btn-gray dropdown-toggle" href="#section-type-dropdown" data-toggle="dropdown">'+l(n(1).call(t,(s=t&&t.currentType,null==s||s===!1?s:s.plural),{hash:{},data:a}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"></ul> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c=this;return l+='<a href="#">'+u(n(1).call(t,t&&t.plural,{hash:{},data:a}))+" ",o=i.if.call(t,t&&t.selected,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+="</a> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <a class="dropdown-toggle" href="#'+p((r=e&&e.type,typeof r===h?r.apply(e):r))+'-dropdown" data-toggle="dropdown"> '+p(n(280).call(e,e&&e.selectedStream,{
hash:{},data:t}))+' <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',r=i.each.call(e,e&&e.streams,{hash:{},inverse:f.noop,fn:f.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=" </ul> "}function o(e,t){var r,a="";return a+=' <li> <a data-id="'+p((r=e&&e.id,typeof r===h?r.apply(e):r))+'" href="#"> '+p(n(280).call(e,e,{hash:{},data:t}))+" ",r=i.if.call(e,e&&e.selected,{hash:{},inverse:f.noop,fn:f.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+=" </a> </li> "}function l(e,t){return' <i class="dropdown-selected-icon glyphicon ok-2"></i> ';
}function u(e,t){var i="";return i+=" "+p(n(280).call(e,e&&e.selectedStream,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h="function",p=this.escapeExpression,f=this;return c=i.if.call(t,t&&t.showDropdown,{hash:{},inverse:f.program(5,u,a),fn:f.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+=' <div class="row"> <div class="col-md-12 selectize"> '+h(n(21).call(e,"autocompleteTextInput",{
hash:{label:"Artist",name:"parentTitle",placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.parentTitle),ratingKey:(i=e&&e.item,null==i||i===!1?i:i.parentRatingKey),title:(i=e&&e.item,null==i||i===!1?i:i.parentTitle)},data:t}))+" </div> </div> "}function o(e,t){var i,r="";return r+=' <div class="col-md-4"> '+h(n(21).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(i=e&&e.item,null==i||i===!1?i:i.year),placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.year),locked:(i=e&&e.locked,
null==i||i===!1?i:i.year),ratingKey:(i=e&&e.item,null==i||i===!1?i:i.ratingKey)},data:t}))+" </div> "}function l(e,t){return"9"}function u(e,t){return"5"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h=this.escapeExpression,p=this;return d+='<form class="edit-metadata-form"> ',c=i.if.call(t,t&&t.canReparent,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=' <div class="row"> <div class="col-md-12 selectize"> '+h(n(21).call(t,"lockableTextInput",{
hash:{label:"Album",name:"title",value:(c=t&&t.item,null==c||c===!1?c:c.title),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.title),locked:(c=t&&t.locked,null==c||c===!1?c:c.title),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey),scopeToAttr:"parentRatingKey",scopeToParam:"artist.id"},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+h(n(21).call(t,"lockableTextInput",{hash:{label:"Sort Album",name:"titleSort",value:(c=t&&t.item,null==c||c===!1?c:c.titleSort),
placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.titleSort),locked:(c=t&&t.locked,null==c||c===!1?c:c.titleSort),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-3"> <label>'+h(n(1).call(t,"Rating",{hash:{},data:a}))+'</label> <div class="rating-region"></div> </div> ',c=i.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:p.noop,fn:p.program(3,o,a),data:a}),(c||0===c)&&(d+=c),d+=' <div class="col-md-',c=i.if.call(t,t&&t.supportsLinkedYears,{
hash:{},inverse:p.program(7,u,a),fn:p.program(5,l,a),data:a}),(c||0===c)&&(d+=c),d+=' "> '+h(n(21).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(c=t&&t.item,null==c||c===!1?c:c.originallyAvailableAt),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.originallyAvailableAt),locked:(c=t&&t.locked,null==c||c===!1?c:c.originallyAvailableAt)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+h(n(21).call(t,"lockableTextInput",{
hash:{label:"Record Label",name:"studio",value:(c=t&&t.item,null==c||c===!1?c:c.studio),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.studio),locked:(c=t&&t.locked,null==c||c===!1?c:c.studio),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+h(n(21).call(t,"lockableTextInput",{hash:{label:"Review",name:"summary",value:(c=t&&t.item,null==c||c===!1?c:c.summary),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.summary),
type:"textarea",rows:"5",locked:(c=t&&t.locked,null==c||c===!1?c:c.summary),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",
attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Artist",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title),
placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.title),locked:(s=t&&t.locked,null==s||s===!1?s:s.title),ratingKey:(s=t&&t.item,null==s||s===!1?s:s.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Sort Artist",name:"titleSort",value:(s=t&&t.item,null==s||s===!1?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.titleSort),locked:(s=t&&t.locked,null==s||s===!1?s:s.titleSort),ratingKey:(s=t&&t.item,
null==s||s===!1?s:s.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Biography",name:"summary",value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||s===!1?s:s.summary)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";
return r+=' <div class="row"> <div class="col-md-12"> '+u(n(21).call(e,"lockableTagInput",{hash:{label:"Similar Artists",name:"similar",attribute:"similar",query:"title",locked:(i=e&&e.locked,null==i||i===!1?i:i.similar)},data:t}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c=this;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+u(n(21).call(t,"lockableTagInput",{hash:{label:"Genres",
name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(n(21).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(o=t&&t.locked,null==o||o===!1?o:o.collection)},data:a}))+" </div> </div> ",o=i.if.call(t,t&&t.canEditSimilarArtists,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=" </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var r,a="";return a+=' <div class="upload-artwork-container"> <div class="upload-prompt"> ',r=i.if.call(e,e&&e.showFileUpload,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=' <a class="upload-url-btn" href="#">'+c(n(1).call(e,"enter a url",{hash:{},data:t}))+'</a> </div> <div class="upload-progress"> '+c(n(1).call(e,"Uploading artwork...",{hash:{},data:t}))+' </div> <div class="upload-success"> '+c(n(1).call(e,"this artwork was uploaded successfully",{hash:{},
data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+c(n(1).call(e,"{1}upload another{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t}))+' </div> <div class="upload-error"> '+c(n(1).call(e,"there was an error uploading this artwork",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+c(n(1).call(e,"{1}try again{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t}))+' </div> <form id="upload-form" class="upload-form"> <input type="text" class="form-control" name="url" placeholder="'+c(n(1).call(e,"Enter a url to upload an image from the web",{
hash:{},data:t}))+'"> <div class="upload-form-help"> <div class="pull-right">'+c(n(1).call(e,"enter to {1}upload{2}",'<a class="submit-url-btn" href="#">',"</a>",{hash:{},data:t}))+'</div> <div class="pull-left">'+c(n(1).call(e,"esc to {1}cancel{2}",'<a class="cancel-url-btn" href="#">',"</a>",{hash:{},data:t}))+"</div> </div> </form> </div> "}function o(e,t){var i="";return i+=' <span class="artwork-file-container"> <input type="file" class="artwork-file-control" multiple> <a href="#">'+c(n(1).call(e,"choose an image",{
hash:{},data:t}))+'</a> </span> <span class="upload-prompt-divider">&middot;</span> '+c(n(1).call(e,"drag and drop",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return l=i.if.call(t,t&&t.showUpload,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' <div class="artwork-list-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.title),locked:(s=t&&t.locked,null==s||s===!1?s:s.title)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTextInput",{
hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||s===!1?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.titleSort),locked:(s=t&&t.locked,null==s||s===!1?s:s.titleSort)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-6"> '+l(n(21).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(s=t&&t.item,null==s||s===!1?s:s.rating),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.rating),locked:(s=t&&t.locked,null==s||s===!1?s:s.rating)
},data:a}))+' </div> <div class="col-md-6"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(s=t&&t.item,null==s||s===!1?s:s.originallyAvailableAt),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.originallyAvailableAt),locked:(s=t&&t.locked,null==s||s===!1?s:s.originallyAvailableAt)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,
null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||s===!1?s:s.summary)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{
hash:{label:"Writers",name:"writer",attribute:"writers",locked:(s=t&&t.locked,null==s||s===!1?s:s.writer)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{hash:{label:"Directors",name:"director",attribute:"directors",locked:(s=t&&t.locked,null==s||s===!1?s:s.director)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),
a=a||{};var s="",o=this.escapeExpression;return s+="<h4>"+o(n(1).call(t,"Files",{hash:{},data:a}))+'</h4> <ul class="media-info-file-list"></ul> <div class="loading-container"><div class="loading"></div></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return(s=n.file)?a=s.call(t,{hash:{},data:r}):(s=t&&t.file,a=typeof s===l?s.call(t,{hash:{},
data:r}):s),o+=u(a)+" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+=" "+p(n(21).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(i=e&&e.item,null==i||i===!1?i:i.originallyAvailableAt),placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.originallyAvailableAt),locked:(i=e&&e.locked,null==i||i===!1?i:i.originallyAvailableAt)},data:t}))+" "}function o(e,t){var i,r="";return r+=" "+p(n(21).call(e,"lockableTextInput",{
hash:{label:"Year",name:"year",value:(i=e&&e.item,null==i||i===!1?i:i.year),placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.year),locked:(i=e&&e.locked,null==i||i===!1?i:i.year)},data:t}))+" "}function l(e,t){return"12"}function u(e,t){return"6"}function c(e,t){var i,r="";return r+=' <div class="col-md-6"> '+p(n(21).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(i=e&&e.item,null==i||i===!1?i:i.originallyAvailableAt),placeholder:(i=e&&e.placeholders,
null==i||i===!1?i:i.originallyAvailableAt),locked:(i=e&&e.locked,null==i||i===!1?i:i.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p=this.escapeExpression,f=this;return h+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(d=t&&t.item,null==d||d===!1?d:d.title),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.title),
locked:(d=t&&t.locked,null==d||d===!1?d:d.title),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(d=t&&t.item,null==d||d===!1?d:d.titleSort),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.titleSort),locked:(d=t&&t.locked,null==d||d===!1?d:d.titleSort),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(21).call(t,"lockableTextInput",{
hash:{label:"Original Title",name:"originalTitle",value:(d=t&&t.item,null==d||d===!1?d:d.originalTitle),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.originalTitle),locked:(d=t&&t.locked,null==d||d===!1?d:d.originalTitle),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',d=i.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.program(3,o,a),fn:f.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=' </div> <div class="col-md-4"> '+p(n(21).call(t,"lockableNumericInput",{
hash:{label:"Rating",name:"rating",value:(d=t&&t.item,null==d||d===!1?d:d.rating),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.rating),locked:(d=t&&t.locked,null==d||d===!1?d:d.rating)},data:a}))+' </div> <div class="col-md-4 selectize"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(d=t&&t.item,null==d||d===!1?d:d.contentRating),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.contentRating),locked:(d=t&&t.locked,null==d||d===!1?d:d.contentRating),
ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-',d=i.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.program(7,u,a),fn:f.program(5,l,a),data:a}),(d||0===d)&&(h+=d),h+=' selectize"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Studio",name:"studio",value:(d=t&&t.item,null==d||d===!1?d:d.studio),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.studio),locked:(d=t&&t.locked,null==d||d===!1?d:d.studio),ratingKey:(d=t&&t.item,
null==d||d===!1?d:d.ratingKey)},data:a}))+" </div> ",d=i.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.noop,fn:f.program(9,c,a),data:a}),(d||0===d)&&(h+=d),h+=' </div> <div class="row"> <div class="col-md-12"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",value:(d=t&&t.item,null==d||d===!1?d:d.tagline),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.tagline),locked:(d=t&&t.locked,null==d||d===!1?d:d.tagline)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+p(n(21).call(t,"lockableTextInput",{
hash:{label:"Summary",name:"summary",value:(d=t&&t.item,null==d||d===!1?d:d.summary),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.summary),type:"textarea",rows:"5",locked:(d=t&&t.locked,null==d||d===!1?d:d.summary)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+l(n(21).call(t,"lockableTagInput",{
hash:{label:"Directors",name:"director",attribute:"directors",locked:(s=t&&t.locked,null==s||s===!1?s:s.director)},data:a}))+' </div> <div class="col-md-6"> '+l(n(21).call(t,"lockableTagInput",{hash:{label:"Country",name:"country",attribute:"countries",locked:(s=t&&t.locked,null==s||s===!1?s:s.country)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)
},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",locked:(s=t&&t.locked,null==s||s===!1?s:s.writer)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||s===!1?s:s.collection)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);
e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.title),locked:(s=t&&t.locked,null==s||s===!1?s:s.title)},data:a}))+' </div> <div class="col-md-6"> '+l(n(21).call(t,"lockableTextInput",{
hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||s===!1?s:s.titleSort),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.titleSort),locked:(s=t&&t.locked,null==s||s===!1?s:s.titleSort)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,
null==s||s===!1?s:s.summary)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-9"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.title),
locked:(s=t&&t.locked,null==s||s===!1?s:s.title)},data:a}))+' </div> <div class="col-md-3"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Year",name:"year",value:(s=t&&t.item,null==s||s===!1?s:s.year),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.year),locked:(s=t&&t.locked,null==s||s===!1?s:s.year)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(s=t&&t.item,null==s||s===!1?s:s.titleSort),
placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.titleSort),locked:(s=t&&t.locked,null==s||s===!1?s:s.titleSort)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||s===!1?s:s.summary)},data:a}))+" </div> </div> </form> "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"textInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"textInput",{hash:{label:"Summary",name:"summary",value:(s=t&&t.item,
null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5"},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",
value:(s=t&&t.item,null==s||s===!1?s:s.summary),placeholder:(s=t&&t.placeholders,null==s||s===!1?s:s.summary),type:"textarea",rows:"5",locked:(s=t&&t.locked,null==s||s===!1?s:s.summary)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> ',n=i.if.call(e,e&&e.showLabels,{hash:{},inverse:p.program(4,l,t),fn:p.program(2,o,t),
data:t}),(n||0===n)&&(r+=n),r+=" </div> </div> </form> "}function o(e,t){var i,r="";return r+=" "+h(n(21).call(e,"lockableTagInput",{hash:{label:"Labels",name:"label",attribute:"labels",locked:(i=e&&e.locked,null==i||i===!1?i:i.label)},data:t}))+" "}function l(e,t){var i="";return i+=' <div class="form-group"> <label>'+h(n(1).call(e,"Labels",{hash:{},data:t}))+"</label> <p>"+h(n(1).call(e,"Labels require Plex Media Server {1} or later.",e&&e.labelsMinVersion,{hash:{},data:t}))+"</p> </div> "}function u(e,t){
var i,r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+h(n(1).call(e,"You need a Plex Pass to use restrictions.",{hash:{},data:t}))+'</h4> <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+h((i=e&&e.plexPassUrl,typeof i===f?i.apply(e):i))+'" target="_blank">'+h(n(1).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h=this.escapeExpression,p=this,f="function";return c=i.if.call(t,t&&t.hasContentFilterFeature,{
hash:{},inverse:p.program(6,u,a),fn:p.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+=" "+p(n(21).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(i=e&&e.item,null==i||i===!1?i:i.originallyAvailableAt),placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.originallyAvailableAt),locked:(i=e&&e.locked,null==i||i===!1?i:i.originallyAvailableAt)
},data:t}))+" "}function o(e,t){var i,r="";return r+=" "+p(n(21).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(i=e&&e.item,null==i||i===!1?i:i.year),placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.year),locked:(i=e&&e.locked,null==i||i===!1?i:i.year)},data:t}))+" "}function l(e,t){return"12"}function u(e,t){return"6"}function c(e,t){var i,r="";return r+=' <div class="col-md-6"> '+p(n(21).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",
value:(i=e&&e.item,null==i||i===!1?i:i.originallyAvailableAt),placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.originallyAvailableAt),locked:(i=e&&e.locked,null==i||i===!1?i:i.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p=this.escapeExpression,f=this;return h+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",
value:(d=t&&t.item,null==d||d===!1?d:d.title),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.title),locked:(d=t&&t.locked,null==d||d===!1?d:d.title),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Sort Title",name:"titleSort",value:(d=t&&t.item,null==d||d===!1?d:d.titleSort),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.titleSort),locked:(d=t&&t.locked,
null==d||d===!1?d:d.titleSort),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',d=i.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.program(3,o,a),fn:f.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=' </div> <div class="col-md-4"> '+p(n(21).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(d=t&&t.item,null==d||d===!1?d:d.rating),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.rating),locked:(d=t&&t.locked,
null==d||d===!1?d:d.rating)},data:a}))+' </div> <div class="col-md-4 selectize"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(d=t&&t.item,null==d||d===!1?d:d.contentRating),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.contentRating),locked:(d=t&&t.locked,null==d||d===!1?d:d.contentRating),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(21).call(t,"lockableTextInput",{
hash:{label:"Original Title",name:"originalTitle",value:(d=t&&t.item,null==d||d===!1?d:d.originalTitle),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.originalTitle),locked:(d=t&&t.locked,null==d||d===!1?d:d.originalTitle),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-',d=i.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.program(7,u,a),fn:f.program(5,l,a),data:a}),(d||0===d)&&(h+=d),h+=' selectize"> '+p(n(21).call(t,"lockableTextInput",{
hash:{label:"Studio",name:"studio",value:(d=t&&t.item,null==d||d===!1?d:d.studio),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.studio),locked:(d=t&&t.locked,null==d||d===!1?d:d.studio),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:a}))+" </div> ",d=i.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:f.noop,fn:f.program(9,c,a),data:a}),(d||0===d)&&(h+=d),h+=' </div> <div class="row"> <div class="col-md-12"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",
value:(d=t&&t.item,null==d||d===!1?d:d.tagline),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.tagline),locked:(d=t&&t.locked,null==d||d===!1?d:d.tagline)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+p(n(21).call(t,"lockableTextInput",{hash:{label:"Summary",name:"summary",value:(d=t&&t.item,null==d||d===!1?d:d.summary),placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.summary),type:"textarea",rows:"5",locked:(d=t&&t.locked,null==d||d===!1?d:d.summary)},data:a}))+" </div> </div> </form> ";
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{
hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||s===!1?s:s.collection)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+=' <div class="row"> <div class="col-md-12 selectize"> '+u(n(21).call(e,"autocompleteTextInput",{hash:{label:"Artist",name:"grandparentTitle",placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.grandparentTitle),ratingKey:(i=e&&e.item,
null==i||i===!1?i:i.grandparentRatingKey),title:(i=e&&e.item,null==i||i===!1?i:i.grandparentTitle)},data:t}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(n(21).call(e,"autocompleteTextInput",{hash:{label:"Album",name:"parentTitle",placeholder:(i=e&&e.placeholders,null==i||i===!1?i:i.parentTitle),ratingKey:(i=e&&e.item,null==i||i===!1?i:i.parentRatingKey),title:(i=e&&e.item,null==i||i===!1?i:i.parentTitle),scopeToAttr:"grandparentRatingKey",scopeToParam:"artist.id"},data:t
}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c=this;return l+='<form class="edit-metadata-form"> ',o=i.if.call(t,t&&t.canReparent,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' <div class="row"> <div class="col-md-12"> '+u(n(21).call(t,"lockableTextInput",{hash:{label:"Title",name:"title",value:(o=t&&t.item,null==o||o===!1?o:o.title),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.title),
locked:(o=t&&t.locked,null==o||o===!1?o:o.title)},data:a}))+' </div> </div> <div class="row"> <div class="col-md-4"> <label>'+u(n(1).call(t,"Rating",{hash:{},data:a}))+'</label> <div class="rating-region"></div> </div> <div class="col-md-4"> '+u(n(21).call(t,"lockableNumericInput",{hash:{label:"Track",name:"index",value:(o=t&&t.item,null==o||o===!1?o:o.index),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.index),locked:(o=t&&t.locked,null==o||o===!1?o:o.index),disabled:t&&t.disableIndices},
data:a}))+' </div> <div class="col-md-4"> '+u(n(21).call(t,"lockableNumericInput",{hash:{label:"Disc",name:"parentIndex",value:(o=t&&t.item,null==o||o===!1?o:o.parentIndex),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.parentIndex),locked:(o=t&&t.locked,null==o||o===!1?o:o.parentIndex),disabled:t&&t.disableIndices},data:a}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(n(21).call(t,"lockableTextInput",{hash:{label:"Track Artist",name:"originalTitle",value:(o=t&&t.item,
null==o||o===!1?o:o.originalTitle),placeholder:(o=t&&t.placeholders,null==o||o===!1?o:o.originalTitle),locked:(o=t&&t.locked,null==o||o===!1?o:o.originalTitle),ratingKey:(o=t&&t.item,null==o||o===!1?o:o.ratingKey)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(21).call(t,"lockableTagInput",{
hash:{label:"Mood",name:"mood",attribute:"moods",locked:(s=t&&t.locked,null==s||s===!1?s:s.mood)},data:a}))+" </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <div class="setup-agent-section"> <div class="setup-agent-title">'+c(n(1).call(e,"{1} Settings",e&&e.agentName,{hash:{},data:t}))+'</div> <p class="setup-agent-disclaimer">'+c(n(1).call(e,"Note: These settings will take effect for all libraries using the {1} agent.",e&&e.agentName,{
hash:{},data:t}))+'</p> <div class="setup-agent-settings"> ',r=i.each.call(e,e&&e.settings,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=" </div> </div> "}function o(e,t){var i="";return i+=" "+c(n(21).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return l=i.if.call(t,t&&t.settings,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" ";
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<form class="edit-section-type-form settings-container"> <p>'+o(n(1).call(t,"There was an error adding this library.",{hash:{},data:a}))+"</p> <p>"+o(n(1).call(t,"You need to {1}follow these instructions{2} to troubleshoot the Plex Media Server.",'<a href="https://support.plex.tv/hc/en-us/articles/201119258-Resetting-System-and-Framework-bundles" target="_blank">',"</a>",{
hash:{},data:a}))+"</p> </form>"})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<div class="filter-bar-right"> <a class="clear-filters-btn btn-gray" href="#"><i class="glyphicon remove-2"></i></a> </div> <h4>',(s=n.titles)?a=s.call(t,{hash:{},data:r}):(s=t&&t.titles,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+"</h4> "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return' <i class="server-alert-icon glyphicon cogwheel"></i> '}function o(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i._type),"status",{hash:{},inverse:z.program(6,u,t),fn:z.program(4,l,t),data:t}),i||0===i?i:""}function l(e,t){return' <i class="server-alert-icon glyphicon bullhorn"></i> '}function u(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i._type),"playing",{hash:{},inverse:z.program(9,d,t),
fn:z.program(7,c,t),data:t}),i||0===i?i:""}function c(e,t){return' <i class="server-alert-icon glyphicon imac"></i> '}function d(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i._type),"websocket",{hash:{},inverse:z.program(13,f,t),fn:z.program(10,h,t),data:t}),i||0===i?i:""}function h(e,t){var n,r="";return r+=" ",n=i.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.opened),{hash:{},inverse:z.program(11,p,t),fn:z.program(4,l,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function p(e,t){return' <i class="server-alert-icon glyphicon warning-sign"></i> ';
}function f(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i.state),0,{hash:{},inverse:z.program(16,v,t),fn:z.program(14,m,t),data:t}),i||0===i?i:""}function m(e,t){return' <i class="server-alert-icon glyphicon plus"></i> '}function v(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i.state),5,{hash:{},inverse:z.program(19,y,t),fn:z.program(17,g,t),data:t}),i||0===i?i:""}function g(e,t){return' <i class="server-alert-icon glyphicon ok-2"></i> '}function y(e,t){var i;
return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i.state),6,{hash:{},inverse:z.program(22,w,t),fn:z.program(20,b,t),data:t}),i||0===i?i:""}function b(e,t){return' <i class="server-alert-icon glyphicon magic"></i> '}function w(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i.state),9,{hash:{},inverse:z.program(25,P,t),fn:z.program(23,S,t),data:t}),i||0===i?i:""}function S(e,t){return' <i class="server-alert-icon glyphicon bin"></i> '}function P(e,t){return' <i class="server-alert-icon glyphicon tags"></i> ';
}function x(e,t){var i,r="";return r+=" "+V(n(1).call(e,"{1} set to {2}.",(i=e&&e.event,null==i||i===!1?i:i.label),(i=e&&e.event,null==i||i===!1?i:i.value),{hash:{},data:t}))+" "}function C(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i._type),"status",{hash:{},inverse:z.program(36,I,t),fn:z.program(30,T,t),data:t}),i||0===i?i:""}function T(e,t){var n,r="";return r+=" ",n=i.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.message),{hash:{},inverse:z.program(33,E,t),fn:z.program(31,_,t),
data:t}),(n||0===n)&&(r+=n),r+=" "}function _(e,t){var i,r="";return r+=" "+V(n(1).call(e,(i=e&&e.event,null==i||i===!1?i:i.message),{hash:{},data:t}))+" "}function E(e,t){var r,a="";return a+=" "+V(n(1).call(e,(r=e&&e.event,null==r||r===!1?r:r.title),{hash:{},data:t})),r=i.if.call(e,(r=e&&e.event,null==r||r===!1?r:r.description),{hash:{},inverse:z.noop,fn:z.program(34,k,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function k(e,t){var i,r="";return r+=": "+V(n(1).call(e,(i=e&&e.event,null==i||i===!1?i:i.description),{
hash:{},data:t}))}function I(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i._type),"timeline",{hash:{},inverse:z.program(39,M,t),fn:z.program(37,A,t),data:t}),i||0===i?i:""}function A(e,t){var i,r="";return r+=" "+V(n(1).call(e,(i=e&&e.event,null==i||i===!1?i:i.stateString),{hash:{},data:t}))+' <a href="#!/server/'+V(n(58).call(e,e&&e.serverID,{hash:{},data:t}))+"/details/"+V(n(58).call(e,e&&e.itemKey,{hash:{},data:t}))+'">'+V((i=e&&e.event,i=null==i||i===!1?i:i.mediaTitle,typeof i===H?i.apply(e):i))+"</a> "+V(n(1).call(e,"in",{
hash:{},data:t}))+' <a href="#!/server/'+V(n(58).call(e,e&&e.serverID,{hash:{},data:t}))+"/section/"+V(n(58).call(e,(i=e&&e.event,null==i||i===!1?i:i.sectionID),{hash:{},data:t}))+'">'+V((i=e&&e.event,i=null==i||i===!1?i:i.sectionTitle,typeof i===H?i.apply(e):i))+"</a> "}function M(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i._type),"playing",{hash:{},inverse:z.program(42,R,t),fn:z.program(40,D,t),data:t}),i||0===i?i:""}function D(e,t){var i,r="";return r+=" "+V(n(1).call(e,"{1} started playing {2} on {3}.",(i=e&&e.event,
null==i||i===!1?i:i.username),(i=e&&e.event,null==i||i===!1?i:i.title),(i=e&&e.event,null==i||i===!1?i:i.player),{hash:{},data:t}))+" "}function R(e,t){var i;return i=n(12).call(e,(i=e&&e.event,null==i||i===!1?i:i._type),"websocket",{hash:{},inverse:z.noop,fn:z.program(43,O,t),data:t}),i||0===i?i:""}function O(e,t){var n,r="";return r+=" ",n=i.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.opened),{hash:{},inverse:z.program(46,N,t),fn:z.program(44,L,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function L(e,t){
var i="";return i+=" "+V(n(1).call(e,"Opened connection to {1}, listening for events.",e&&e.serverName,{hash:{},data:t}))+" "}function N(e,t){var n;return n=i.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.closed),{hash:{},inverse:z.program(49,F,t),fn:z.program(47,U,t),data:t}),n||0===n?n:""}function U(e,t){var i="";return i+=" "+V(n(1).call(e,"Connection to {1} closed.",e&&e.serverName,{hash:{},data:t}))+" "}function F(e,t){var i="";return i+=" "+V(n(1).call(e,"Unable to listen for events on {1}.",e&&e.serverName,{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var j,B="",z=this,V=this.escapeExpression,H="function";return B+='<div class="striped-list-inner-item alert-list-inner-item"> ',j=n(12).call(t,(j=t&&t.event,null==j||j===!1?j:j._type),"setting",{hash:{},inverse:z.program(3,o,a),fn:z.program(1,s,a),data:a}),(j||0===j)&&(B+=j),B+=' <div class="server-alert-details"> <span class="server-alert-time">'+V(n(440).call(t,(j=t&&t.event,null==j||j===!1?j:j.time),"LT",{
hash:{},data:a}))+"</span> ",j=n(12).call(t,(j=t&&t.event,null==j||j===!1?j:j._type),"setting",{hash:{},inverse:z.program(29,C,a),fn:z.program(27,x,a),data:a}),(j||0===j)&&(B+=j),B+=" </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> '+o(n(1).call(t,"Nothing is currently being played.",{
hash:{},data:a}))+" </h4> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hide-actions"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d="function",h=this.escapeExpression;return u+='<a class="media-poster-container ',l=i.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="'+h((l=t&&t.url,typeof l===d?l.apply(t):l))+'"> <div class="media-poster-fade invisible"></div> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-top-overlay"></div> <div class="media-poster-actions ',
l=i.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="info-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon circle-info"></i></button> </div> <button class="close-btn btn-link btn-gray" href="#"><i class="glyphicon remove-2"></i></button> <i class="device-icon"></i> <div class="session-player"></div> <div class="session-state"></div> <div class="session-transcode-details"> <p class="session-transcode-title"> <span class="session-transcode"></span> <span class="session-transcode-throttled"></span> </p> <p class="session-transcode-video"> <span class="session-transcode-label">'+h(n(1).call(t,"Video",{
hash:{},data:a}))+'</span> <span class="session-transcode-video-decision"></span> </p> <p class="session-transcode-audio"> <span class="session-transcode-label">'+h(n(1).call(t,"Audio",{hash:{},data:a}))+'</span> <span class="session-transcode-audio-decision"></span> </p> </div> <div class="media-progress"></div> </div> <div class="session-user pull-right"> <div class="user-poster img-circle"></div> <div class="session-username media-heading secondary"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"cloud-download"}function s(e,t){return"circle-arrow-down"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var l,u="",c=this;return u+='<a class="media-poster-container" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="sync-status"> <div class="sync-status-transcode hidden"></div> <i class="sync-status-icon sync-complete-icon glyphicon ok-2 hidden"></i> <i class="sync-status-icon sync-waiting-icon glyphicon ',
l=n.if.call(t,t&&t.isCloudSync,{hash:{},inverse:c.program(3,s,r),fn:c.program(1,a,r),data:r}),(l||0===l)&&(u+=l),u+=' hidden"></i> <i class="sync-status-icon sync-processing-icon glyphicon more hidden"></i> <i class="sync-status-icon sync-failed-icon glyphicon warning-sign ',l=n.unless.call(t,t&&t.isFailure,{hash:{},inverse:c.noop,fn:c.program(5,o,r),data:r}),(l||0===l)&&(u+=l),u+='"></i> <i class="sync-status-icon sync-unknown-icon glyphicon circle-question-mark ',l=n.if.call(t,t&&t.isFailure,{hash:{},
inverse:c.noop,fn:c.program(5,o,r),data:r}),(l||0===l)&&(u+=l),u+='"></i> </div> <div class="media-poster-actions"> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="delete-btn media-poster-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> <div class="media-context media-heading secondary"></div> </a> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <i class="glyphicon cloud-download"></i> <span class="cloud-sync-waiting">'+c(n(1).call(e,"Waiting to be uploaded",{hash:{},data:t}))+'</span> <span class="cloud-sync-uploading hidden">'+c(n(1).call(e,"Uploading",{hash:{},data:t}))+' &middot; <span class="transcode-progress"></span>%</span> '}function o(e,t){var i="";return i+=' <i class="glyphicon circle-arrow-down"></i> '+c(n(1).call(e,"Waiting to be downloaded",{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="media-poster"></div> <p class="title"></p> <p class="complete-subtitle subtitle hidden"> <i class="glyphicon ok-2"></i> '+c(n(1).call(t,"Synced",{hash:{},data:a}))+' </p> <p class="waiting-subtitle subtitle hidden"> ',l=i.if.call(t,t&&t.isCloudSync,{hash:{},inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' </p> <p class="downloading-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+c(n(1).call(t,"Downloading",{
hash:{},data:a}))+' &middot; <span class="transcode-progress"></span>% </p> <p class="converting-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+c(n(1).call(t,"Converting",{hash:{},data:a}))+' &middot; <span class="transcode-progress"></span>% &middot; <span class="transcode-remaining"></span> </p> <p class="processing-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+c(n(1).call(t,"Waiting to be converted",{hash:{},data:a}))+' </p> <p class="unknown-subtitle subtitle hidden"> <i class="glyphicon circle-question-mark"></i> '+c(n(1).call(t,"Unknown",{
hash:{},data:a}))+' </p> <p class="failed-subtitle subtitle hidden"> <i class="glyphicon warning-sign"></i> <span class="error-message"></span> </p> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+o(n(1).call(t,"Conversions for sync and media optimization will appear here.",{hash:{},
data:a}))+"</p> <p>"+o(n(1).call(t,"Manage your optimized versions in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",t&&t.serverID,{hash:{},data:a}))+"</p> </h4> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return' <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var s,o,l="",u="function",c=this.escapeExpression,d=this;
return l+='<div class="show-actions striped-list-inner-item playlist-inner-item ',(o=n.type)?s=o.call(t,{hash:{},data:r}):(o=t&&t.type,s=typeof o===u?o.call(t,{hash:{},data:r}):o),l+=c(s)+'"> <div class="media-actions media-reorder"> ',s=n.unless.call(t,t&&t.hideDragHandle,{hash:{},inverse:d.noop,fn:d.program(1,a,r),data:r}),(s||0===s)&&(l+=s),l+=' </div> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="media-actions generator-actions"> <button class="promote-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon up-arrow"></i></button> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> <div class="media-item"> <div class="media-details"> <div class="generator-title col-lg"></div> <div class="generator-target col-md col-secondary"></div> <div class="conversion-status-region col-md col-secondary"></div> </div> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression,u="function";return o+='<div class="conversion-status-container conversion-status-converting"> <div class="progress-bar-region"></div> <div class="conversion-status-converting-label-container"> <span class="conversion-status-converting-label">'+l(n(1).call(t,"Converting",{hash:{},data:a}))+'</span> <span class="conversion-status-converting-speed"></span> <div class="conversion-status-converting-progress"> <span class="conversion-status-converting-percentage"></span> <span class="conversion-status-converting-progress-separator">&middot;</span> <span class="conversion-status-converting-remaining"></span> </div> </div> </div> <div class="conversion-status-container conversion-status-processed"> <i class="conversion-status-icon glyphicon ok-2 text-success"></i> '+l(n(1).call(t,"Complete",{
hash:{},data:a}))+' </div> <div class="conversion-status-container conversion-status-disabled"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> '+l(n(1).call(t,"Deleted",{hash:{},data:a}))+' <button class="enable-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> </div> <div class="conversion-status-container conversion-status-error"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="conversion-status-failed-message">'+l((s=t&&t.initialErrorMessage,
typeof s===u?s.apply(t):s))+'</span> <button class="retry-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> </div> <div class="conversion-status-container conversion-status-pending"> <i class="conversion-status-icon glyphicon clock"></i> <span class="conversion-status-pending-label">'+l(n(1).call(t,"Waiting",{hash:{},data:a}))+"</span> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression;return o+='<a class="card-collapsed" href="#!/server/'+l(n(58).call(t,t&&t.serverID,{hash:{},data:a}))+"/directory/"+l(n(58).call(t,t&&t.currentKey,{hash:{},data:a}))+"/"+l(n(58).call(t,(s=t&&t.channel,null==s||s===!1?s:s.key),{hash:{},data:a}))+'"> <span class="media-title media-heading"></span> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
r=r||{},'<a class="media-poster-container" href="#"> <div class="media-poster"> <div class="installed-icon"><i class="glyphicon ok-2"></i></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <div class="media-poster-overlay"></div> <div class="media-poster-actions"> ',n=i.if.call(e,(n=e&&e.item,null==n||n===!1?n:n.hasPrefs),{
hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=' <button class="uninstall-btn media-poster-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> '}function o(e,t){return' <button class="settings-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon cogwheel"></i></button> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d=this.escapeExpression;return u+='<a class="media-poster-container" href="#!/server/'+d(n(58).call(t,t&&t.serverID,{
hash:{},data:a}))+"/channel/"+d(n(58).call(t,(l=t&&t.item,null==l||l===!1?l:l.key),{hash:{},data:a}))+'"> <div class="media-poster"> ',l=i.unless.call(t,t&&t.shared,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' <div class="loading loading-inline"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){
return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,l,u="",c=this,d="function",h=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,a,r),data:r}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:r}):(l=t&&t.url,o=typeof l===d?l.call(t,{hash:{},data:r}):l),u+=h(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',
o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,r),data:r}),(o||0===o)&&(u+=o),u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var s,o,l="",u=this,c="function",d=this.escapeExpression;return l+='<div class="striped-list-inner-item media-list-item track-list-item track"> <a class="track-list-inner-item show-actions ',s=n.if.call(t,t&&t.selected,{hash:{},inverse:u.noop,fn:u.program(1,a,r),data:r}),(s||0===s)&&(l+=s),l+='" href="#"> <div class="track-actions media-actions"> <button class="track-more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="track-index media-index media-heading secondary"> <span>',
(o=n.index)?s=o.call(t,{hash:{},data:r}):(o=t&&t.index,s=typeof o===c?o.call(t,{hash:{},data:r}):o),l+=d(s)+'</span> <i class="glyphicon volume-up"></i> </span> <span class="track-title media-title media-heading"></span> <span class="track-subtitle-1 media-subtitle-1 media-heading secondary"></span> <span class="track-context media-context media-heading secondary"></span> <button class="track-music-video-btn media-action-btn btn-link" tabindex="-1"><i class="plex-icon-shows-560"></i></button> </a> <div class="track-actions-dropdown media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<a class="artwork-option media-poster-container" data-rating-key="',(s=n.ratingKey)?a=s.call(t,{hash:{},data:r}):(s=t&&t.ratingKey,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'" href="#"> <div class="media-poster"></div> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){
function a(e,t){return"show-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,l,u="",c=this,d="function",h=this.escapeExpression;return u+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,a,r),data:r}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:r}):(l=t&&t.url,o=typeof l===d?l.call(t,{hash:{},data:r}):l),u+=h(o)+'"> <div class="media-poster"> <span class="media-count-badge badge hidden"></span> <span class="unwatched-count-badge badge hidden"></span> <div class="media-progress"></div> </div> <div class="media-actions ',
o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,r),data:r}),(o||0===o)&&(u+=o),u+='"> <button class="play-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-index media-heading secondary"></span> <span class="media-title media-heading"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading media-rating"></span> <p class="media-tagline"></p> <p class="media-summary"></p> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"show-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,l,u="",c=this,d="function",h=this.escapeExpression;return u+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,a,r),data:r}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:r}):(l=t&&t.url,
o=typeof l===d?l.call(t,{hash:{},data:r}):l),u+=h(o)+'"> <span class="media-index media-heading secondary"></span> <span class="media-title media-heading"></span> <span class="unwatched-icon"></span> <div class="media-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,r),data:r}),(o||0===o)&&(u+=o),u+='"> <button class="play-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-context media-heading media-rating"></span> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,l,u="",c=this,d="function",h=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,a,r),data:r}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:r}):(l=t&&t.url,o=typeof l===d?l.call(t,{
hash:{},data:r}):l),u+=h(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,r),data:r}),(o||0===o)&&(u+=o),u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-count-badge badge badge-lg hidden"></span> <div class="media-progress"></div> </div> <span class="unwatched-icon"></span> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<a class="media-poster-container play-btn" href="',(s=n.url)?a=s.call(t,{hash:{},data:r}):(s=t&&t.url,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> <div class="media-progress"></div> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"missing"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c="function",d=this;return l+='<div class="row disc-number hidden"> '+u(n(1).call(t,"Disc {1}",t&&t.parentIndex,{hash:{},data:a}))+' </div> <div class="row striped-list-inner-item"> <span class="col-xs-1 match-index"> '+u((o=t&&t.index,typeof o===c?o.apply(t):o))+'. </span> <span class="col-xs-11 match-track-name ',
o=i.unless.call(t,t&&t.matched,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='"> '+u((o=t&&t.name,typeof o===c?o.apply(t):o))+" </span> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="match-empty-message">'+o(n(1).call(t,"No matches found.",{hash:{},data:a}))+"</div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var n,i="";return i+=' <span class="match-name">'+h((n=e&&e.parentName,typeof n===d?n.apply(e):n))+'</span> &ndash; <span class="match-name">'+h((n=e&&e.name,typeof n===d?n.apply(e):n))+"</span> "}function o(e,t){var n,i="";return i+=' <span class="match-name">'+h((n=e&&e.name,typeof n===d?n.apply(e):n))+"</span> "}function l(e,t){var n,i="";return i+=' <span class="match-year">'+h((n=e&&e.year,typeof n===d?n.apply(e):n))+'</span> <span class="match-separator">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<a class="match-result col-xs-12" href="#"> <div class="row"> <div class="col-xs-9 match-title-info"> ',u=i.if.call(t,t&&t.parentName,{hash:{},inverse:p.program(3,o,a),fn:p.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+=' </div> <div class="col-xs-3 match-score-info" title="'+h(n(1).call(t,"Score {1}",t&&t.normalizedScore,{hash:{},data:a}))+'"> ',u=i.if.call(t,t&&t.year,{hash:{},inverse:p.noop,fn:p.program(5,l,a),
data:a}),(u||0===u)&&(c+=u),c+=' <span class="match-score"><i class="match-score-icon glyphicon certificate"></i>'+h((u=t&&t.normalizedScore,typeof u===d?u.apply(t):u))+'</span> </div> </div> <div class="row match-extended-info hidden"> <div class="col-xs-4"> <img class="match-art" src="'+h((u=t&&t.thumb,typeof u===d?u.apply(t):u))+'"/> </div> <div class="col-xs-8 children-region"></div> </div> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){
return"show-actions"}function o(e,t){return"selected"}function l(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function c(e,t){var i;return i=n(12).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,h,t),fn:w.program(10,d,t),data:t}),i||0===i?i:""}function d(e,t){return' <span class="media-available-at"></span> '}function h(e,t){var i;return i=n(12).call(e,e&&e.sort,"rating",{hash:{},inverse:w.program(15,f,t),fn:w.program(13,p,t),data:t}),i||0===i?i:"";
}function p(e,t){return' <span class="media-rating"></span> '}function f(e,t){var i;return i=n(12).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.program(16,m,t),data:t}),i||0===i?i:""}function m(e,t){return' <span class="media-resolution"></span> '}function v(e,t){var i;return i=n(12).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,fn:w.program(19,g,t),data:t}),i||0===i?i:""}function g(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var y,b="",w=this,S="function",P=this.escapeExpression;return b+='<a class="media-list-inner-item ',y=i.if.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,s,a),data:a}),(y||0===y)&&(b+=y),b+=" ",y=i.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,o,a),data:a}),(y||0===y)&&(b+=y),b+='" href="'+P((y=t&&t.url,typeof y===S?y.apply(t):y))+'"> <div class="media-poster"> <span class="media-count-badge badge hidden"></span> <span class="unwatched-count-badge badge hidden"></span> <span class="video-badge badge badge-round hidden"> <i class="glyphicon facetime-video"></i> </span> <div class="media-progress"></div> </div> <div class="media-actions ',
y=i.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(5,l,a),data:a}),(y||0===y)&&(b+=y),b+='"> <button class="play-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-loading btn-loading-static" tabindex="-1"> <i class="btn-label glyphicon pencil"></i> <div class="loading loading-sm"></div> </button> <button class="more-btn media-action-btn" tabindex="-1"><i class="glyphicon more"></i></button> </div> <div class="media-sort media-heading secondary"> ',
y=n(12).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,c,a),fn:w.program(7,u,a),data:a}),(y||0===y)&&(b+=y),b+=' </div> <span class="media-title media-heading"></span> <span class="media-subtitle-2 media-heading secondary"></span> <span class="media-subtitle-1 media-heading secondary"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading secondary"></span> <p class="media-tagline"></p> <p class="media-summary"></p> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"show-actions"}function o(e,t){return"selected"}function l(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function c(e,t){var i;return i=n(12).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,h,t),fn:w.program(10,d,t),data:t}),i||0===i?i:""}function d(e,t){return' <span class="media-available-at"></span> '}function h(e,t){var i;return i=n(12).call(e,e&&e.sort,"rating",{
hash:{},inverse:w.program(15,f,t),fn:w.program(13,p,t),data:t}),i||0===i?i:""}function p(e,t){return' <span class="media-rating"></span> '}function f(e,t){var i;return i=n(12).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.program(16,m,t),data:t}),i||0===i?i:""}function m(e,t){return' <span class="media-resolution"></span> '}function v(e,t){var i;return i=n(12).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,fn:w.program(19,g,t),data:t}),i||0===i?i:""}function g(e,t){return' <span class="media-duration"></span> ';
}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var y,b="",w=this,S="function",P=this.escapeExpression;return b+='<a class="media-list-inner-item ',y=i.if.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,s,a),data:a}),(y||0===y)&&(b+=y),b+=" ",y=i.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,o,a),data:a}),(y||0===y)&&(b+=y),b+='" href="'+P((y=t&&t.url,typeof y===S?y.apply(t):y))+'"> <div class="media-actions ',y=i.unless.call(t,t&&t.showActions,{
hash:{},inverse:w.noop,fn:w.program(5,l,a),data:a}),(y||0===y)&&(b+=y),b+='"> <button class="play-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-action-btn" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-action-btn btn-link btn-loading btn-loading-static" tabindex="-1"> <i class="btn-label glyphicon pencil"></i> <div class="loading loading-sm"></div> </button> <button class="more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-title media-heading"></span> <span class="media-subtitle-2 media-heading secondary"></span> <span class="media-subtitle-1 media-heading secondary"></span> <span class="unwatched-icon"></span> <span class="media-context media-heading secondary"></span> <span class="media-sort media-heading secondary"> ',
y=n(12).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,c,a),fn:w.program(7,u,a),data:a}),(y||0===y)&&(b+=y),b+=' </span> </a> <div class="media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="media-progress-track"></div> <div class="media-progress-pct"></div> '});
},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hide-actions"}function o(e,t){return"selected"}function l(e,t){return"hidden"}function u(e,t){return' <span class="media-added-at"></span> '}function c(e,t){var i;return i=n(12).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:w.program(12,h,t),fn:w.program(10,d,t),data:t}),i||0===i?i:""}function d(e,t){return' <span class="media-available-at"></span> '}function h(e,t){var i;return i=n(12).call(e,e&&e.sort,"rating",{
hash:{},inverse:w.program(15,f,t),fn:w.program(13,p,t),data:t}),i||0===i?i:""}function p(e,t){return' <span class="media-rating"></span> '}function f(e,t){var i;return i=n(12).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:w.program(18,v,t),fn:w.program(16,m,t),data:t}),i||0===i?i:""}function m(e,t){return' <span class="media-resolution"></span> '}function v(e,t){var i;return i=n(12).call(e,e&&e.sort,"duration",{hash:{},inverse:w.noop,fn:w.program(19,g,t),data:t}),i||0===i?i:""}function g(e,t){return' <span class="media-duration"></span> ';
}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var y,b="",w=this,S="function",P=this.escapeExpression;return b+='<a class="media-poster-container ',y=i.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(1,s,a),data:a}),(y||0===y)&&(b+=y),b+=" ",y=i.if.call(t,t&&t.selected,{hash:{},inverse:w.noop,fn:w.program(3,o,a),data:a}),(y||0===y)&&(b+=y),b+='" href="'+P((y=t&&t.url,typeof y===S?y.apply(t):y))+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons with-actions"> <i class="analyzing-icon media-poster-overlay-icon glyphicon magic hidden"></i> <i class="matching-icon media-poster-overlay-icon glyphicon search hidden"></i> <i class="metadata-icon media-poster-overlay-icon glyphicon tags hidden"></i> <i class="trash-icon media-poster-overlay-icon glyphicon bin warning hidden"></i> </div> <div class="media-poster-actions ',
y=i.unless.call(t,t&&t.showActions,{hash:{},inverse:w.noop,fn:w.program(5,l,a),data:a}),(y||0===y)&&(b+=y),b+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="media-count-badge badge badge-lg hidden"></span> <span class="unwatched-count-badge badge badge-lg hidden"></span> <span class="video-badge badge badge-round hidden"> <i class="glyphicon facetime-video"></i> </span> <div class="media-progress"></div> <div class="loading loading-inline"></div> </div> <span class="unwatched-icon"></span> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> <div class="media-subtitle-2 media-heading secondary"></div> <div class="media-context media-heading secondary"></div> <div class="media-sort media-heading secondary"> ',
y=n(12).call(t,t&&t.sort,"addedAt",{hash:{},inverse:w.program(9,c,a),fn:w.program(7,u,a),data:a}),(y||0===y)&&(b+=y),b+=' </div> <div class="media-subtitle-1-fill media-heading hidden"></div> <div class="media-subtitle-2-fill media-heading hidden"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return' <div class="media-actions media-reorder"> <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> </div> ';
}function o(e,t){return' <div class="media-poster-container play-btn"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </div> '}function l(e,t){return' <div class="media-actions media-delete"> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> '}function u(e,t){return"has-actions"}function c(e,t){
return"btn-metadata-link"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p="function",f=this.escapeExpression,m=this;return h+='<a class="show-actions playlist-inner-item '+f((d=t&&t.type,typeof d===p?d.apply(t):d))+'" href="#"> ',d=i.if.call(t,t&&t.canEdit,{hash:{},inverse:m.noop,fn:m.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=' <div class="media-index media-heading secondary"> <i class="glyphicon volume-up"></i> </div> ',d=n(62).call(t,t&&t.type,"track",{hash:{},
inverse:m.noop,fn:m.program(3,o,a),data:a}),(d||0===d)&&(h+=d),h+=" ",d=i.if.call(t,t&&t.canEdit,{hash:{},inverse:m.noop,fn:m.program(5,l,a),data:a}),(d||0===d)&&(h+=d),h+=' <div class="media-item '+f((d=t&&t.type,typeof d===p?d.apply(t):d))+" ",d=i.if.call(t,t&&t.canEdit,{hash:{},inverse:m.noop,fn:m.program(7,u,a),data:a}),(d||0===d)&&(h+=d),h+='"> <div class="media-details"> <div class="media-detail media-heading"> <span class="media-title ',d=i.if.call(t,t&&t.hasDetails,{hash:{},inverse:m.noop,
fn:m.program(9,c,a),data:a}),(d||0===d)&&(h+=d),h+='"></span> </div> <div class="media-detail media-optional media-heading secondary"> <span class="media-primary-subtitle btn-metadata-link"></span> </div> <div class="media-detail media-always media-heading secondary"> <span class="media-secondary-subtitle btn-metadata-link"></span> </div> <div class="media-duration media-heading secondary"></div> </div> </div> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){
function a(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var o,l,u="",c=this,d="function",h=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(1,a,r),data:r}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:r}):(l=t&&t.url,o=typeof l===d?l.call(t,{hash:{},data:r}):l),u+=h(o)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-actions ',
o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:c.noop,fn:c.program(3,s,r),data:r}),(o||0===o)&&(u+=o),u+='"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="play-unwatched-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="unwatched-count-badge badge badge-lg hidden"></span> </div> <div class="media-title media-heading"></div> <div class="media-subtitle-1 media-heading secondary"></div> </a> <div class="media-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<a class="playlist" data-id="',(s=n.ratingKey)?a=s.call(t,{hash:{},data:r}):(s=t&&t.ratingKey,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'" href="#"> <span class="media-poster playlist-poster"></span> ',(s=n.title)?a=s.call(t,{hash:{},data:r}):(s=t&&t.title,a=typeof s===l?s.call(t,{
hash:{},data:r}):s),o+=u(a)+" </a>"})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"selected"}function o(e,t){return' <button class="track-edit-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="disc-number hidden"> '+c(n(1).call(t,"Disc {1}",'<span class="track-parent-index"></span>',{
hash:{},data:a}))+' </div> <div class="striped-list-inner-item media-list-item track-list-item track"> <a class="track-list-inner-item show-actions ',l=i.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#"> <div class="track-actions media-actions"> ',l=i.if.call(t,t&&t.showEdit,{hash:{},inverse:d.noop,fn:d.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+=' <button class="track-more-btn media-action-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> <span class="track-index media-index media-heading secondary"> <span></span> <i class="glyphicon volume-up"></i> </span> <span class="track-title media-title media-heading"></span> <span class="track-subtitle-1 media-subtitle-1 media-heading secondary"></span> <span class="track-context media-context media-heading secondary"></span> <button class="track-music-video-btn media-action-btn btn-link" tabindex="-1"><i class="plex-icon-shows-560"></i></button> </a> <div class="track-actions-dropdown media-actions-dropdown dropdown pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+o(n(1).call(t,'Choose "Optimize..." on items in your library and optimized versions will appear here.',{hash:{},data:a}))+"</p> <p>"+o(n(1).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{
hash:{},data:a}))+"</p> </h4> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l="function",u=this.escapeExpression;return o+='<a class="show-actions playlist-inner-item '+u((s=t&&t.type,typeof s===l?s.apply(t):s))+'" href="#"> <div class="media-actions media-reorder"> <div class="sortable-handle btn-gray-link"><i class="glyphicon show-lines"></i></div> </div> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="media-actions generator-actions"> <button class="retry-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon repeat"></i></button> <button class="edit-btn media-action-btn btn-gray-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="delete-btn media-action-btn btn-gray-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> </div> <div class="media-item"> <div class="media-details"> <div class="generator-title col-lg"></div> <div class="generator-target col-md col-secondary"></div> <div class="generator-status col-md col-secondary"> <div class="generator-status-container generator-status-complete"> <i class="generator-status-icon glyphicon ok-2 text-success"></i> '+u(n(1).call(t,"Complete",{
hash:{},data:a}))+' </div> <div class="generator-status-container generator-status-failed"> <i class="generator-status-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="generator-status-failed-message">'+u(n(1).call(t,"Failed",{hash:{},data:a}))+'</span> </div> <div class="generator-status-container generator-status-converting"> <i class="generator-status-icon glyphicon restart"></i> '+u(n(1).call(t,"Converting",{hash:{},data:a}))+' </div> <div class="generator-status-container generator-status-pending"> <i class="generator-status-icon glyphicon clock"></i> '+u(n(1).call(t,"Waiting",{
hash:{},data:a}))+" </div> </div> </div> </div> </a> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<div class="striped-list-inner-item"> <div class="generator-poster-container"> <div class="media-poster"></div> </div> <div class="conversion-status-region"></div> <div class="generator-metadata-title">',(s=n.title)?a=s.call(t,{hash:{},
data:r}):(s=t&&t.title,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'</div> <div class="generator-metadata-episode-index generator-metadata-subtitle"></div> <div class="generator-metadata-year generator-metadata-subtitle">',(s=n.year)?a=s.call(t,{hash:{},data:r}):(s=t&&t.year,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+"</div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};
var a,s,o="",l="function",u=this.escapeExpression;return o+='<a class="btn-gray" href="#">',(s=n.title)?a=s.call(t,{hash:{},data:r}):(s=t&&t.title,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+"</a> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <div class="label-list-item"> <a class="new-filter-btn label label-btn label-default" href="#"><i class="label-icon glyphicon circle-plus"></i> '+c(n(1).call(e,"New Filter",{
hash:{},data:t}))+"</a> </div> "}function o(e,t){var i,r="";return r+=' <div class="label-list-item"> <a class="remove-filter-btn label label-btn label-primary" data-key="'+c((i=e&&e.key,typeof i===d?i.apply(e):i))+'" href="#"><i class="label-icon glyphicon circle-remove"></i> <span class="label-truncate">'+c(n(808).call(e,e&&e.titles,{hash:{},data:t}))+"</span></a> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d="function",h=this;return l=i.unless.call(t,t&&t.currentFilters,{
hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" ",l=i.each.call(t,t&&t.currentFilters,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"boolean-btn"}function o(e,t){return"filter-btn"}function l(e,t){return"selected"}function u(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h=this,p=this.escapeExpression;
return d+='<a class="',c=n(12).call(t,(c=t&&t.filter,null==c||c===!1?c:c.filterType),"boolean",{hash:{},inverse:h.program(3,o,a),fn:h.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" btn-gray ",c=i.if.call(t,t&&t.selected,{hash:{},inverse:h.noop,fn:h.program(5,l,a),data:a}),(c||0===c)&&(d+=c),d+='" href="#"> '+p(n(1).call(t,(c=t&&t.filter,null==c||c===!1?c:c.title),{hash:{},data:a}))+' <i class="selected-icon glyphicon ok-2 ',c=i.unless.call(t,t&&t.selected,{hash:{},inverse:h.noop,fn:h.program(7,u,a),
data:a}),(c||0===c)&&(d+=c),d+='"></i> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this,c="function",d=this.escapeExpression;return l+='<form id="filter-options-search-form" class="',o=i.unless.call(t,t&&t.showSearch,{hash:{},inverse:u.noop,fn:u.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='"> <div class="form-group form-group-search"> <label class="control-label-search" for="filter-options-search"><i class="glyphicon search"></i></label> <input type="search" id="filter-options-search" class="form-control form-control-search" value="'+d((o=t&&t.query,
typeof o===c?o.apply(t):o))+'"> </div> </form> <div id="filter-options-loading" class="loading ',o=i.unless.call(t,t&&t.showLoading,{hash:{},inverse:u.noop,fn:u.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='"></div> <ul class="list side-bar-list"> <li><a class="filter-options-deselect-btn btn-gray" href="#">'+d(n(1).call(t,"Deselect All",{hash:{},data:a}))+"</a> </ul> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"selected"}function o(e,t){
return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d=this.escapeExpression;return u+='<a class="filter-option-btn btn-gray ',l=i.if.call(t,t&&t.selected,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#"> '+d(n(1).call(t,(l=t&&t.filterOption,null==l||l===!1?l:l.title),{hash:{},data:a}))+' <i class="selected-icon glyphicon ok-2 ',l=i.unless.call(t,t&&t.selected,{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),
(l||0===l)&&(u+=l),u+='"></i> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<a class="sort-btn btn-gray" href="#"> '+o(n(1).call(t,t&&t.title,{hash:{},data:a}))+' <i class="desc-icon caret-icon caret-icon-sm hidden"></i> <i class="asc-icon caret-icon caret-icon-sm caret-icon-reverse hidden"></i> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){
function a(e,t){return"left-arrow"}function s(e,t){var i;return i=n.if.call(e,(i=e&&e.filePath,null==i||i===!1?i:i.home),{hash:{},inverse:m.program(6,l,t),fn:m.program(4,o,t),data:t}),i||0===i?i:""}function o(e,t){return"home"}function l(e,t){var i;return i=n.if.call(e,(i=e&&e.filePath,null==i||i===!1?i:i.network),{hash:{},inverse:m.program(9,c,t),fn:m.program(7,u,t),data:t}),i||0===i?i:""}function u(e,t){return"globe"}function c(e,t){var i;return i=n.if.call(e,e&&e.isRoot,{hash:{},inverse:m.program(12,h,t),
fn:m.program(10,d,t),data:t}),i||0===i?i:""}function d(e,t){return"hdd"}function h(e,t){return"folder-open"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var p,f="",m=this,v="function",g=this.escapeExpression;return f+='<a class="striped-list-item" href="#" data-key="'+g((p=t&&t.filePath,p=null==p||p===!1?p:p.key,typeof p===v?p.apply(t):p))+'"> <i class="folder-icon glyphicon ',p=n.if.call(t,(p=t&&t.filePath,null==p||p===!1?p:p.isBackShortcut),{hash:{},inverse:m.program(3,s,r),
fn:m.program(1,a,r),data:r}),(p||0===p)&&(f+=p),f+='"></i> '+g((p=t&&t.filePath,p=null==p||p===!1?p:p.title,typeof p===v?p.apply(t):p))+' <div class="loading loading-sm loading-inline hidden"></div> </a> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<a class="btn-gray" data-identifier="',(s=n.identifier)?a=s.call(t,{hash:{},data:r}):(s=t&&t.identifier,
a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'" href="#">',(s=n.name)?a=s.call(t,{hash:{},data:r}):(s=t&&t.name,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+"</a> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"checked"}function o(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="card-actions"> <button class="info-btn card-action-btn"><i class="glyphicon circle-info"></i></button> <button class="settings-btn card-action-btn"><i class="glyphicon cogwheel"></i></button> </div> <div class="card-handle"><i class="glyphicon show-lines"></i></div> <label for="'+d((l=t&&t.identifier,
typeof l===c?l.apply(t):l))+'"> <input id="'+d((l=t&&t.identifier,typeof l===c?l.apply(t):l))+'" name="'+d((l=t&&t.identifier,typeof l===c?l.apply(t):l))+'" type="checkbox" ',l=i.if.call(t,t&&t.enabled,{hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" ",l=i.if.call(t,t&&t.isPrimary,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+="> "+d(n(1).call(t,t&&t.name,{hash:{},data:a}))+" </label> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="row-padded"> <h4 class="text-muted text-center">'+o(n(1).call(t,"No devices found",{hash:{},data:a}))+"</h4> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="card card-device"> <i class="card-poster device-icon"></i> <div class="card-actions"> <button class="remove-device-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="name"></h4> <div class="card-details"> <div class="pull-right"> <div class="last-seen text-muted"></div> <span class="sync-info hidden"> <span class="glyphicon circle-arrow-down sync-icon"></span> <span class="sync-count"></span> <span class="sync-size"></span> </span> </div> <span class="version text-muted"></span> <div class="device-info-container"> <div class="product"></div> <div class="device text-muted"></div> <div class="platform-info text-muted"> <span class="platform"></span> <span class="platform-version"></span> </div> </div> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<h4 class="text-muted text-center">'+o(n(1).call(t,"No friends yet. {1}Invite a friend{2} and share your libraries.",'<a class="invite-friend-btn" href="#">',"</a>",{hash:{},data:a}))+"</h4> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),r=r||{},'<div class="card card-user card-friend"> <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> <button class="edit-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="username"></h4> <div class="card-details"></div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){
var n,r="";return r+=' <p class="user-summary"> <i class="server-share-direction-icon glyphicon right-arrow"></i> <a class="server-share-edit-btn server-share-status shared '+v((n=e&&e.shared,n=null==n||n===!1?n:n.status,typeof n===g?n.apply(e):n))+" ",n=i.unless.call(e,e&&e.canEdit,{hash:{},inverse:y.noop,fn:y.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+='" href="#"> <i class="server-share-status-icon available glyphicon circle-ok"></i> <i class="server-share-status-icon unavailable glyphicon circle-exclamation-mark"></i> <i class="server-share-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-share-status-hover-icon glyphicon pencil"></i> </a> ',
n=i.if.call(e,(n=e&&e.shared,null==n||n===!1?n:n.hasActiveShare),{hash:{},inverse:y.program(6,u,t),fn:y.program(4,l,t),data:t}),(n||0===n)&&(r+=n),r+=" </p> "}function o(e,t){return"disabled"}function l(e,t){var i,r="";return r+=" "+v(n(1).call(e,"shares {1} {2} with you",(i=e&&e.shared,null==i||i===!1?i:i.numLibraries),(i=e&&e.shared,null==i||i===!1?i:i.libraryLabel),{hash:{},data:t}))+" "}function u(e,t){var i,r="";return r+=" "+v(n(1).call(e,"wants to share {1} {2} with you",(i=e&&e.shared,null==i||i===!1?i:i.numLibraries),(i=e&&e.shared,
null==i||i===!1?i:i.libraryLabel),{hash:{},data:t}))+" "}function c(e,t){var n,r="";return r+=' <p class="user-summary"> <i class="server-share-direction-icon glyphicon left-arrow"></i> <a class="server-share-edit-btn server-share-status owned '+v((n=e&&e.owned,n=null==n||n===!1?n:n.status,typeof n===g?n.apply(e):n))+" ",n=i.unless.call(e,e&&e.canEdit,{hash:{},inverse:y.noop,fn:y.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+='" href="#"> <i class="server-share-status-icon available glyphicon circle-ok"></i> <i class="server-share-status-icon unavailable glyphicon circle-exclamation-mark"></i> <i class="server-share-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-share-status-hover-icon glyphicon pencil"></i> </a> ',
n=i.if.call(e,(n=e&&e.owned,null==n||n===!1?n:n.hasActiveShare),{hash:{},inverse:y.program(11,h,t),fn:y.program(9,d,t),data:t}),(n||0===n)&&(r+=n),r+=" </p> "}function d(e,t){var i,r="";return r+=" "+v(n(1).call(e,"sharing {1} {2} with this {3}",(i=e&&e.owned,null==i||i===!1?i:i.numLibraries),(i=e&&e.owned,null==i||i===!1?i:i.libraryLabel),(i=e&&e.owned,null==i||i===!1?i:i.friendLabel),{hash:{},data:t}))+" "}function h(e,t){var i,r="";return r+=" "+v(n(1).call(e,"invited to share {1} {2}",(i=e&&e.owned,
null==i||i===!1?i:i.numLibraries),(i=e&&e.owned,null==i||i===!1?i:i.libraryLabel),{hash:{},data:t}))+" "}function p(e,t){var i="";return i+=' <p class="user-summary server-share-empty-message">'+v(n(1).call(e,"no shared libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var f,m="",v=this.escapeExpression,g="function",y=this;return f=i.if.call(t,(f=t&&t.shared,null==f||f===!1?f:f.numLibraries),{hash:{},inverse:y.noop,fn:y.program(1,s,a),data:a}),
(f||0===f)&&(m+=f),m+=" ",f=i.if.call(t,(f=t&&t.owned,null==f||f===!1?f:f.numLibraries),{hash:{},inverse:y.noop,fn:y.program(8,c,a),data:a}),(f||0===f)&&(m+=f),m+=" ",f=i.if.call(t,t&&t.showEmptyMessage,{hash:{},inverse:y.noop,fn:y.program(13,p,a),data:a}),(f||0===f)&&(m+=f),m+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <h4 class="text-muted text-center">'+c(n(1).call(e,"No one else is in your home. {1}Add a user{2} to enable user switching.",'<a class="add-user-btn" href="#">',"</a>",{
hash:{},data:t}))+"</h4> "}function o(e,t){var i,r="";return r+=' <h4 class="text-muted text-center">'+c(n(1).call(e,"You need a Plex Pass to add users to your home.",{hash:{},data:t}))+'</h4> <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+c((i=e&&e.plexPassUrl,typeof i===d?i.apply(e):i))+'" target="_blank">'+c(n(1).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d="function",h=this;
return l=i.if.call(t,t&&t.hasHomeFeature,{hash:{},inverse:h.program(3,o,a),fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' <ul class="list centered-home-user-container"></ul> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return'<div class="selected-user-icon"></div>'}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var s,o="",l=this;return o+='<div class="card card-user card-friend card-home-user"> ',s=n.if.call(t,t&&t.isSignedInUser,{
hash:{},inverse:l.noop,fn:l.program(1,a,r),data:r}),(s||0===s)&&(o+=s),o+=' <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> <button class="pin-btn pin-protected-btn card-action-btn btn-success"><i class="glyphicon lock"></i></button> <button class="pin-btn pin-unprotected-btn card-action-btn"><i class="glyphicon unlock"></i></button> <button class="edit-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4> <i class="admin-icon glyphicon crown"></i> <span class="username"></span> </h4> <div class="card-details"> <div class="user-type text-muted"></div> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return'<button class="accept-btn card-action-btn btn-success"><i class="glyphicon ok-2"></i></button>'}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var s,o="",l=this;return o+='<div class="card card-user"> <div class="card-poster media-poster img-circle"></div> <div class="card-actions"> ',s=n.if.call(t,t&&t.showAccept,{hash:{},inverse:l.noop,fn:l.program(1,a,r),data:r}),(s||0===s)&&(o+=s),
o+=' <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="username"></h4> <div class="card-details"> <p class="user-summary"></p> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<div class="card card-section"> <div class="card-actions"> <button class="edit-section-btn card-action-btn"><i class="glyphicon pencil"></i></button> <button class="delete-section-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <i class="section-icon glyphicon ',
(s=n.icon)?a=s.call(t,{hash:{},data:r}):(s=t&&t.icon,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'"></i> <span class="section-title"></span> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}function o(e,t){var n,i="";return i+=' <h4><a href="'+h((n=e&&e.url,typeof n===d?n.apply(e):n))+'" target="_blank">'+h((n=e&&e.title,typeof n===d?n.apply(e):n))+'</a></h4> <a href="'+h((n=e&&e.url,typeof n===d?n.apply(e):n))+'" target="_blank"> <img class="thumb"/> </a> ';
}function l(e,t){var n,i="";return i+=" <h4>"+h((n=e&&e.title,typeof n===d?n.apply(e):n))+'</h4> <img class="thumb"/> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<div class="card card-announcement"> <div class="unread ',u=i.if.call(t,t&&t.read,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='"></div> ',u=i.if.call(t,t&&t.url,{hash:{},inverse:p.program(5,l,a),fn:p.program(3,o,a),data:a
}),(u||0===u)&&(c+=u),c+=' <div class="date">'+h(n(809).call(t,t&&t.notifyAt,{hash:{},data:a}))+'</div> <div class="description">',u=t&&t.content,u=typeof u===d?u.apply(t):u,(u||0===u)&&(c+=u),c+="</div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l="function",u=this.escapeExpression;return o+='<a class="friend" data-id="'+u((s=t&&t.recommendationsPlaylistId,typeof s===l?s.apply(t):s))+'" href="#"> <span class="media-poster user-poster"></span> '+u(n(282).call(t,t&&t.title,20,{
hash:{},data:a}))+" </a> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<a class="card card-user-playlist" href="',(s=n.url)?a=s.call(t,{hash:{},data:r}):(s=t&&t.url,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'"> <div class="card-poster media-poster"></div> <div class="card-actions"> <button class="play-btn card-action-btn"><i class="glyphicon play"></i></button> <button class="mark-unwatched-btn card-action-btn"><i class="glyphicon circle-minus"></i></button> <button class="mark-watched-btn card-action-btn"><i class="glyphicon circle-ok"></i></button> <button class="delete-btn card-action-btn btn-danger"><i class="glyphicon remove-2"></i></button> </div> <h4 class="media-title"></h4> <div class="card-details"> <span class="media-subtitle-1"></span> <span class="media-context"></span> <p class="media-summary"></p> </div> </a> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="modal-dialog"> <div class="modal-content"> <form name="add-folder-form"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon folder-plus"></i> '+o(n(1).call(t,"Add Folder",{
hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="row"> <div class="col-md-12"> <input type="text" name="path" class="form-control" value=""> </div> </div> <div class="row directory-container-row"> <div class="home-directory-container col-md-5"></div> <div class="path-container col-md-7"></div> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+o(n(1).call(t,"Cancel",{hash:{},
data:a}))+'</button> <button type="submit" class="add-btn btn btn-primary">'+o(n(1).call(t,"Add",{hash:{},data:a}))+"</button> </div> </form> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <ul class="list select-list select-collections-list dark-scrollbar"> ',n=i.each.call(e,e&&e.collections,{hash:{},inverse:m.noop,fn:m.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" </ul> "}function o(e,t){var n,i="";return i+=' <li class="striped-list-item select-list-item"> <a class="collection" data-value="'+f((n=e&&e.key,
typeof n===p?n.apply(e):n))+'" href="#">'+f((n=e&&e.title,typeof n===p?n.apply(e):n))+"</a> </li> "}function l(e,t){var n;return n=i.if.call(e,e&&e.loading,{hash:{},inverse:m.program(7,c,t),fn:m.program(5,u,t),data:t}),n||0===n?n:""}function u(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function c(e,t){var i="";return i+=' <div class="empty-message">'+f(n(1).call(e,"There are no collections in this library.",{hash:{},data:t}))+"</div> "}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var d,h="",p="function",f=this.escapeExpression,m=this;return h+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon folder-plus"></i> '+f(n(1).call(t,"Select a Collection",{hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',d=i.if.call(t,t&&t.collections,{
hash:{},inverse:m.program(4,l,a),fn:m.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=' <div class="message-container"> <input class="message form-control" placeholder="'+f(n(1).call(t,"New collection...",{hash:{},data:a}))+'"> </div> </div> <div class="modal-footer"> <button type="button" class="add-btn btn btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+f(n(1).call(t,"Add",{hash:{},data:a}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return v(n(1).call(e,"Select a Playlist",{hash:{},data:t}))}function o(e,t){return v(n(1).call(e,"Create Playlist",{hash:{},data:t}))}function l(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.hasPlaylists,{hash:{},inverse:g.program(8,c,t),fn:g.program(6,u,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function u(e,t){return' <div class="playlists-container"></div> '}function c(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.loading,{
hash:{},inverse:g.program(11,h,t),fn:g.program(9,d,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function d(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function h(e,t){var i="";return i+=' <div class="empty-message">'+v(n(1).call(e,"There are no playlists on this server.",{hash:{},data:t}))+"</div> "}function p(e,t){return"only-control"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var f,m="",v=this.escapeExpression,g=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon plex-icon-add-to-playlist"></i> ',
f=i.if.call(t,t&&t.showExisting,{hash:{},inverse:g.program(3,o,a),fn:g.program(1,s,a),data:a}),(f||0===f)&&(m+=f),m+=' </h4> </div> <div class="modal-body modal-body-scroll minimal-scroll"> ',f=i.if.call(t,t&&t.showExisting,{hash:{},inverse:g.noop,fn:g.program(5,l,a),data:a}),(f||0===f)&&(m+=f),m+=' <div class="message-container ',f=i.unless.call(t,t&&t.showExisting,{hash:{},inverse:g.noop,fn:g.program(13,p,a),data:a}),(f||0===f)&&(m+=f),m+='"> <input class="message form-control" placeholder="'+v(n(1).call(t,"New playlist...",{
hash:{},data:a}))+'"> </div> </div> <div class="modal-footer"> <button type="button" class="add-btn btn btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+v(n(1).call(t,"Add",{hash:{},data:a}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-info"></i> '+u((a=t&&t.agent,
a=null==a||a===!1?a:a.name,typeof a===l?a.apply(t):a))+' </h4> </div> <div class="modal-body"> <p class="agent-icon-container"></p> <p>',(s=n.attribution)?a=s.call(t,{hash:{},data:r}):(s=t&&t.attribution,a=typeof s===l?s.call(t,{hash:{},data:r}):s),(a||0===a)&&(o+=a),o+="</p> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+='<button class="browse-btn btn btn-primary">'+u(n(1).call(e,"Browse",{hash:{},data:t
}))+"</button>"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c="function",d=this;return l+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title">'+u((o=t&&t.channel,o=null==o||o===!1?o:o.title,typeof o===c?o.apply(t):o))+'</h4> </div> <div class="modal-body"> <div class="channel-poster-container"> <div class="channel-poster media-poster"></div> <div class="installed-actions-container"> ',
o=i.unless.call(t,t&&t.agent,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' <div class="btn-group"> <button type="button" class="update-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(n(1).call(t,"Update",{hash:{},data:a}))+'</span> </button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <i class="caret-icon caret-icon-sm"></i> </button> <ul class="dropdown-menu pull-right"> <li><a class="restart-btn" href="#">'+u(n(1).call(t,"Restart",{
hash:{},data:a}))+'</a></li> <li><a class="reset-btn" href="#">'+u(n(1).call(t,"Reset",{hash:{},data:a}))+'</a></li> </ul> </div> <button class="uninstall-btn btn btn-danger btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(n(1).call(t,"Uninstall",{hash:{},data:a}))+'</span> </button> </div> <div class="uninstalled-actions-container"> <button class="install-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(n(1).call(t,"Install",{
hash:{},data:a}))+'</span> </button> </div> </div> <div class="channel-details"> '+u((o=t&&t.channel,o=null==o||o===!1?o:o.summary,typeof o===c?o.apply(t):o))+" </div> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=" "+d(n(1).call(e,"Directory Settings",{hash:{},data:t}))+" "}function o(e,t){var i="";return i+=" "+d(n(1).call(e,"{1} Settings",e&&e.title,{hash:{},data:t}))+" "}function l(e,t){var i="";return i+=" "+d(n(21).call(e,"setting",{
hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this.escapeExpression,h=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon cogwheel"></i> ',u=n(12).call(t,t&&t.title,"Preferences...",{hash:{},inverse:h.program(3,o,a),fn:h.program(1,s,a),
data:a}),(u||0===u)&&(c+=u),c+=' </h4> </div> <form id="channel-settings-form"> <div class="modal-body settings-container"> ',u=i.each.call(t,t&&t.settings,{hash:{},inverse:h.noop,fn:h.program(5,l,a),data:a}),(u||0===u)&&(c+=u),c+=' </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+d(n(1).call(t,"Cancel",{hash:{},data:a}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(n(1).call(t,"Save",{
hash:{},data:a}))+"</span> </button> </div> </form> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+d(n(1).call(e,e&&e.cancelLabel,{hash:{},data:t}))+"</button> "}function o(e,t){return"btn-danger"}function l(e,t){return"btn-primary"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this.escapeExpression,h="function",p=this;
return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-exclamation-mark"></i> '+d((u=t&&t.title,typeof u===h?u.apply(t):u))+'</h4> </div> <div class="modal-body"> <p class="confirm-message">'+d((u=t&&t.message,typeof u===h?u.apply(t):u))+'</p> <p class="double-confirm-message text-warning"></p> </div> <div class="modal-footer"> ',
u=i.unless.call(t,t&&t.hideCancel,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+=' <button type="button" class="confirm-btn btn btn-lg ',u=i.if.call(t,t&&t.hasDanger,{hash:{},inverse:p.program(5,l,a),fn:p.program(3,o,a),data:a}),(u||0===u)&&(c+=u),c+=' btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(n(1).call(t,t&&t.confirmLabel,{hash:{},data:a}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var n,r="";return r+=' <li class="striped-list-item select-list-item download-list-item"> <a class="media" data-value="'+f((n=null==t||t===!1?t:t.index,typeof n===p?n.apply(e):n))+'" href="'+f((n=e&&e.downloadUrl,typeof n===p?n.apply(e):n))+'" download="'+f((n=e&&e.downloadName,typeof n===p?n.apply(e):n))+'"> ',n=i.if.call(e,e&&e.title,{hash:{},inverse:m.noop,fn:m.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.if.call(e,e&&e.videoResolution,{hash:{},inverse:m.noop,fn:m.program(4,l,t),
data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(7,c,t),data:t}),(n||0===n)&&(r+=n),r+=" </a> </li> "}function o(e,t){var n,i="";return i+=" "+f((n=e&&e.title,typeof n===p?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function l(e,t){var r,a="";return a+=" "+f(n(442).call(e,e&&e.videoResolution,{hash:{},data:t})),r=i.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(5,u,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function u(e,t){
return","}function c(e,t){var i="";return i+=" "+f(n(441).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p="function",f=this.escapeExpression,m=this;return h+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download-alt"></i> '+f(n(1).call(t,"Download a Version",{
hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list download-list"> ',d=i.each.call(t,t&&t.mediaItems,{hash:{},inverse:m.noop,fn:m.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=" </ul> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <i class="modal-icon glyphicon plus"></i> '+y(n(1).call(e,"Add {1} Library",'<span class="section-type-title"></span>',{
hash:{},data:t}))+" "}function o(e,t){var i="";return i+=' <i class="modal-icon glyphicon pencil"></i> '+y(n(1).call(e,"Edit Library",{hash:{},data:t}))+" "}function l(e,t){return" selected"}function u(e,t){var i="";return i+=" "+y(n(1).call(e,"Select type",{hash:{},data:t}))+" "}function c(e,t){var i="";return i+=" "+y(n(1).call(e,"General",{hash:{},data:t}))+" "}function d(e,t){return"disabled"}function h(e,t){var r,a="";return a+=' <li> <a class="btn-gray change-pane-btn create-btn',r=n(12).call(e,e&&e.selectedPane,"create",{
hash:{},inverse:b.noop,fn:b.program(5,l,t),data:t}),(r||0===r)&&(a+=r),a+=" ",r=i.if.call(e,e&&e.add,{hash:{},inverse:b.noop,fn:b.program(11,d,t),data:t}),(r||0===r)&&(a+=r),a+=' hidden" data-pane="create" href="#"> <i class="modal-nav-icon glyphicon magic"></i> '+y(n(1).call(e,"Create",{hash:{},data:t}))+" </a> </li> "}function p(e,t){var i="";return i+=' <button type="button" class="delete-btn btn btn-danger pull-left" data-dismiss="modal">'+y(n(1).call(e,"Delete Library",{hash:{},data:t}))+"</button> ";
}function f(e,t){var i="";return i+=" "+y(n(1).call(e,"Add Library",{hash:{},data:t}))+" "}function m(e,t){var i="";return i+=" "+y(n(1).call(e,"Save Changes",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var v,g="",y=this.escapeExpression,b=this;return g+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> ',
v=i.if.call(t,t&&t.add,{hash:{},inverse:b.program(3,o,a),fn:b.program(1,s,a),data:a}),(v||0===v)&&(g+=v),g+=' </h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar"> <ul class="list modal-nav-list"> <li> <a class="btn-gray change-pane-btn type-btn',v=n(12).call(t,t&&t.selectedPane,"type",{hash:{},inverse:b.noop,fn:b.program(5,l,a),data:a}),(v||0===v)&&(g+=v),g+='" data-pane="type" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> ',
v=i.if.call(t,t&&t.add,{hash:{},inverse:b.program(9,c,a),fn:b.program(7,u,a),data:a}),(v||0===v)&&(g+=v),g+=' </a> </li> <li> <a class="btn-gray change-pane-btn folders-btn',v=n(12).call(t,t&&t.selectedPane,"folders",{hash:{},inverse:b.noop,fn:b.program(5,l,a),data:a}),(v||0===v)&&(g+=v),g+=" ",v=i.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,d,a),data:a}),(v||0===v)&&(g+=v),g+='" data-pane="folders" href="#"> <i class="modal-nav-icon glyphicon folder-open"></i> '+y(n(1).call(t,"Add folders",{
hash:{},data:a}))+" </a> </li> ",v=i.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(13,h,a),data:a}),(v||0===v)&&(g+=v),g+=' <li> <a class="btn-gray change-pane-btn advanced-btn',v=n(12).call(t,t&&t.selectedPane,"advanced",{hash:{},inverse:b.noop,fn:b.program(5,l,a),data:a}),(v||0===v)&&(g+=v),g+=" ",v=i.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,d,a),data:a}),(v||0===v)&&(g+=v),g+='" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+y(n(1).call(t,"Advanced",{
hash:{},data:a}))+' </a> </li> </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> </div> <div class="modal-footer"> ',v=i.if.call(t,t&&t.canDelete,{hash:{},inverse:b.noop,fn:b.program(15,p,a),data:a}),(v||0===v)&&(g+=v),g+=' <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+y(n(1).call(t,"Cancel",{hash:{},data:a}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading ',v=i.if.call(t,t&&t.add,{
hash:{},inverse:b.noop,fn:b.program(11,d,a),data:a}),(v||0===v)&&(g+=v),g+='"> <div class="loading loading-sm"></div> <span class="btn-label"> <span class="save-btn-label-next">'+y(n(1).call(t,"Next",{hash:{},data:a}))+'</span> <span class="save-btn-label-save"> ',v=i.if.call(t,t&&t.add,{hash:{},inverse:b.program(19,m,a),fn:b.program(17,f,a),data:a}),(v||0===v)&&(g+=v),g+=" </span> </span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var i="";return i+=' <div class="match-location"> '+d(n(1).call(e,"Location",{hash:{},data:t}))+": "+d(n(443).call(e,e&&e.location,60,12,{hash:{},data:t}))+" </div> "}function o(e,t){var i="";return i+=' <ul class="list modal-list"> <li class="modal-list-item"><a class="search-options-btn" href="#">'+d(n(1).call(e,"Search Options",{hash:{},data:t}))+'</a></li> <li class="auto-match-dropdown-region modal-list-item"></li> </ul> '}function l(e,t){var i="";return i+=' <button type="submit" class="search-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(n(1).call(e,"Search",{
hash:{},data:t}))+"</span> </button> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this.escapeExpression,h=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <form id="fix-incorrect-match-form"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon nameplate"></i> <span class="modal-title-text"></span></h4> ',u=i.if.call(t,t&&t.location,{
hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+=' </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',u=i.if.call(t,t&&t.showNavigation,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(u||0===u)&&(c+=u),c+=' <div class="pane-region"></div> </div> <div class="modal-footer"> <div class="match-search-actions"> <button type="button" class="cancel-btn btn btn-default">'+d(n(1).call(t,"Cancel",{hash:{},data:a}))+"</button> ",u=i.if.call(t,t&&t.showNavigation,{
hash:{},inverse:h.noop,fn:h.program(5,l,a),data:a}),(u||0===u)&&(c+=u),c+=" </div> </div> </form> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=" "+c(n(1).call(e,"Insecure connections will only be allowed when you're on the same network as the server.",{hash:{},data:t}))+" "}function o(e,t){var i="";return i+=" "+c(n(1).call(e,"Insecure connections will be allowed to any server.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-exclamation-mark"></i> '+c(n(1).call(t,"Server Unreachable",{hash:{},data:a}))+' </h4> </div> <div class="modal-body"> <p> ',l=i.if.call(t,t&&t.publicAddressMatches,{hash:{},
inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" </p> <p>"+c(n(1).call(t,"The Allow Fallback to Insecure Connections setting can be changed in Web Settings. Would you like to allow insecure connections?",{hash:{},data:a}))+'</p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+c(n(1).call(t,"No",{hash:{},data:a}))+'</button> <button type="button" class="confirm-btn btn btn-lg btn-danger">'+c(n(1).call(t,"Yes",{
hash:{},data:a}))+"</button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}function o(e,t){var n,i="";return i+=' <option value="'+d((n=e&&e.key,typeof n===c?n.apply(e):n))+'">'+d((n=e&&e.title,typeof n===c?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon file-import"></i> '+d(n(1).call(t,"Import from iTunes",{
hash:{},data:a}))+' </h4> </div> <div class="modal-body"> <p class="help-block">'+d(n(1).call(t,"Importing from iTunes will import your music playlists. It will also import your ratings, the date you added the music, as well as play and skip counts for tracks in your library. Depending on how many tracks you have, this process can take many minutes to complete.",{hash:{},data:a}))+'</p> <div class="form-group ',l=i.unless.call(t,t&&t.showSections,{hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a
}),(l||0===l)&&(u+=l),u+='"> <label class="control-label"> '+d(n(1).call(t,"Add to library: ",{hash:{},data:a}))+' <select id="section-list"> ',l=i.each.call(t,t&&t.sections,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+=' </select> </label> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="import-all"> '+d(n(1).call(t,"Overwrite existing playlists",{hash:{},data:a}))+' </label> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+d(n(1).call(t,"Cancel",{
hash:{},data:a}))+'</button> <button type="button" class="import-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(n(1).call(t,"Import",{hash:{},data:a}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <h5 class="keyboard-shortcuts-header">'+m((n=e&&e.label,typeof n===f?n.apply(e):n))+'</h5> <ul class="list keyboard-shortcuts-list"> ',
n=i.each.call(e,e&&e.shortcuts,{hash:{},inverse:v.noop,fn:v.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" </ul> "}function o(e,t){var r,a="";return a+=' <li> <span class="keyboard-shortcuts-keys"> ',r=i.each.call(e,e&&e.keys,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+=' </span> <span class="keyboard-shortcuts-label text-muted">'+m(n(1).call(e,e&&e.label,{hash:{},data:t}))+"</span> </li> "}function l(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.plain,{hash:{},inverse:v.noop,
fn:v.program(4,u,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.unless.call(e,e&&e.plain,{hash:{},inverse:v.noop,fn:v.program(6,c,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.if.call(e,e&&e.split,{hash:{},inverse:v.noop,fn:v.program(8,d,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function u(e,t){var n,i="";return i+=' <span class="keyboard-shortcuts-keys-plain">'+m((n=e&&e.s,typeof n===f?n.apply(e):n))+"</span> "}function c(e,t){var n,i="";return i+=' <span class="keyboard-shortcuts-keys-key">'+m((n=e&&e.s,typeof n===f?n.apply(e):n))+"</span> ";
}function d(e,t){return" <br> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var h,p="",f="function",m=this.escapeExpression,v=this;return p+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon keyboard-wireless"></i> '+m(n(1).call(t,"Keyboard Shortcuts",{hash:{},data:a}))+' </h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',
h=i.each.call(t,t&&t.groups,{hash:{},inverse:v.noop,fn:v.program(1,s,a),data:a}),(h||0===h)&&(p+=h),p+=" </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=" "+v(n(1).call(e,"Internet Required",{hash:{},data:t}))+" "}function o(e,t){var i="";return i+=" "+v(n(1).call(e,"Plex Pass Required",{hash:{},data:t}))+" "}function l(e,t){var i="";return i+=" "+v(n(1).call(e,"This server cannot reach the Internet. Please verify connectivity and try again.",{
hash:{},data:t}))+" "}function u(e,t){var i="";return i+=" "+v(n(1).call(e,"This library requires your server be signed in to a Plex Pass account.",{hash:{},data:t}))+" "}function c(e,t){var i="";return i+=' <button type="button" class="confirm-btn btn btn-lg btn-primary">'+v(n(1).call(e,"OK",{hash:{},data:t}))+"</button> "}function d(e,t){var n,r="";return r+=' <a class="confirm-btn btn btn-lg btn-primary" href="#!/settings/server/'+v((n=e&&e.serverID,typeof n===g?n.apply(e):n))+'"> ',n=i.if.call(e,e&&e.isSignedIn,{
hash:{},inverse:y.program(14,p,t),fn:y.program(12,h,t),data:t}),(n||0===n)&&(r+=n),r+=" </a> "}function h(e,t){var i="";return i+=" "+v(n(1).call(e,"Settings",{hash:{},data:t}))+" "}function p(e,t){var i="";return i+=" "+v(n(1).call(e,"Sign In",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var f,m="",v=this.escapeExpression,g="function",y=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-exclamation-mark"></i> ',
f=i.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:y.program(3,o,a),fn:y.program(1,s,a),data:a}),(f||0===f)&&(m+=f),m+=' </h4> </div> <div class="modal-body"> <p class="confirm-message"> ',f=i.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:y.program(7,u,a),fn:y.program(5,l,a),data:a}),(f||0===f)&&(m+=f),m+=' </p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+v(n(1).call(t,"Ignore",{hash:{},data:a}))+"</button> ",f=i.if.call(t,t&&t.hasPlexPass,{
hash:{},inverse:y.program(11,d,a),fn:y.program(9,c,a),data:a}),(f||0===f)&&(m+=f),m+=" </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hide-streams-column"}function o(e,t){var r,a="";return a+=' <div class="files"> <h4>'+D(n(1).call(e,"Files",{hash:{},data:t}))+"</h4> ",r=i.each.call(e,e&&e.media,{hash:{},inverse:O.noop,fn:O.programWithDepth(4,l,t,e),data:t}),(r||0===r)&&(a+=r),a+=" </div> "}function l(e,t,n){var r,a="";
return a+=' <ul class="media-info-file-list well"> ',r=i.if.call(e,n&&n.showDeleteFile,{hash:{},inverse:O.noop,fn:O.program(5,u,t),data:t}),(r||0===r)&&(a+=r),a+=" ",r=i.each.call(e,e&&e.Part,{hash:{},inverse:O.noop,fn:O.programWithDepth(10,h,t,n),data:t}),(r||0===r)&&(a+=r),a+=" </ul> "}function u(e,t){var i,r="";return r+=' <a href="#" data-media-item="'+D((i=null==t||t===!1?t:t.index,typeof i===R?i.apply(e):i))+'" class="delete-btn text-danger pull-right"> <i class="glyphicon bin"></i> ',i=n(12).call(e,(i=e&&e.Part,
null==i||i===!1?i:i.length),"1",{hash:{},inverse:O.program(8,d,t),fn:O.program(6,c,t),data:t}),(i||0===i)&&(r+=i),r+=" </a> "}function c(e,t){var i="";return i+=" "+D(n(1).call(e,"Delete File",{hash:{},data:t}))+" "}function d(e,t){var i="";return i+=" "+D(n(1).call(e,"Delete Files",{hash:{},data:t}))+" "}function h(e,t,n){var r,a="";return a+=" <li> ",r=i.if.call(e,n&&n.showFilepath,{hash:{},inverse:O.program(13,f,t),fn:O.program(11,p,t),data:t}),(r||0===r)&&(a+=r),a+=" ",r=i.unless.call(e,e&&e.accessible,{
hash:{},inverse:O.noop,fn:O.program(15,m,t),data:t}),(r||0===r)&&(a+=r),a+=" </li> "}function p(e,t){var n,i="";return i+=" "+D((n=e&&e.file,typeof n===R?n.apply(e):n))+" "}function f(e,t){var i="";return i+=" "+D(n(814).call(e,e&&e.file,{hash:{},data:t}))+" "}function m(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.exists,{hash:{},inverse:O.program(18,g,t),fn:O.program(16,v,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function v(e,t){var i="";return i+=' <span class="label label-danger" data-toggle="tooltip" title="'+D(n(1).call(e,"Please check the permissions for this file.",{
hash:{},data:t}))+'">'+D(n(1).call(e,"Inaccessible",{hash:{},data:t}))+"</span> "}function g(e,t){var i="";return i+=' <span class="label label-danger" data-toggle="tooltip" title="'+D(n(1).call(e,"Please check that this file exists and the necessary drive is mounted.",{hash:{},data:t}))+'">'+D(n(1).call(e,"Unavailable",{hash:{},data:t}))+"</span> "}function y(e,t,r){var a,s="";return s+=' <div class="media"> <div class="props"> <h4>'+D(n(1).call(e,"Media",{hash:{},data:t}))+"</h4> <ul> ",a=i.each.call(e,e&&e.properties,{
hash:{},inverse:O.noop,fn:O.program(21,b,t),data:t}),(a||0===a)&&(s+=a),s+=" </ul> </div> ",a=i.each.call(e,e&&e.Part,{hash:{},inverse:O.noop,fn:O.programWithDepth(23,w,t,r),data:t}),(a||0===a)&&(s+=a),s+=" </div> "}function b(e,t){var i,r="";return r+=' <li> <span class="detail-label">'+D(n(1).call(e,e&&e.name,{hash:{},data:t}))+'</span> <span class="detail">'+D((i=e&&e.value,typeof i===R?i.apply(e):i))+"</span> </li> "}function w(e,t,r){var a,s="";return s+=' <div class="part"> <div class="props"> <h4>'+D(n(1).call(e,"Part",{
hash:{},data:t}))+"</h4> <ul> ",a=i.each.call(e,e&&e.properties,{hash:{},inverse:O.noop,fn:O.program(21,b,t),data:t}),(a||0===a)&&(s+=a),s+=' </ul> </div> <div class="streams"> ',a=i.each.call(e,e&&e.Stream,{hash:{},inverse:O.noop,fn:O.program(24,S,t),data:t}),(a||0===a)&&(s+=a),s+=" ",a=i.if.call(e,r&&r.loading,{hash:{},inverse:O.noop,fn:O.program(33,E,t),data:t}),(a||0===a)&&(s+=a),s+=" </div> </div> "}function S(e,t){var r,a="";return a+=' <div class="props"> ',r=n(12).call(e,e&&e.streamType,"1",{
hash:{},inverse:O.program(27,x,t),fn:O.program(25,P,t),data:t}),(r||0===r)&&(a+=r),a+=" <ul> ",r=i.each.call(e,e&&e.properties,{hash:{},inverse:O.noop,fn:O.program(21,b,t),data:t}),(r||0===r)&&(a+=r),a+=" </ul> </div> "}function P(e,t){var i="";return i+=" <h4>"+D(n(1).call(e,"Video",{hash:{},data:t}))+"</h4> "}function x(e,t){var i;return i=n(12).call(e,e&&e.streamType,"2",{hash:{},inverse:O.program(30,T,t),fn:O.program(28,C,t),data:t}),i||0===i?i:""}function C(e,t){var i="";return i+=" <h4>"+D(n(1).call(e,"Audio",{
hash:{},data:t}))+"</h4> "}function T(e,t){var i;return i=n(12).call(e,e&&e.streamType,"3",{hash:{},inverse:O.noop,fn:O.program(31,_,t),data:t}),i||0===i?i:""}function _(e,t){var i="";return i+=" <h4>"+D(n(1).call(e,"Subtitles",{hash:{},data:t}))+"</h4> "}function E(e,t){var i="";return i+=' <div class="props"> <h4>'+D(n(1).call(e,"Loading",{hash:{},data:t}))+"...</h4> </div> "}function k(e,t,n){var r;return r=i.if.call(e,n&&n.showFilepath,{hash:{},inverse:O.noop,fn:O.program(36,I,t),data:t}),r||0===r?r:"";
}function I(e,t){var i,r="";return r+=' <div class="modal-footer"> <div class="pull-left"> <a href="'+D((i=e&&e.url,typeof i===R?i.apply(e):i))+'" target="_blank">'+D(n(1).call(e,"View XML",{hash:{},data:t}))+"</a> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var A,M="",D=this.escapeExpression,R="function",O=this;return M+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+D(n(1).call(t,"Media Info",{
hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="position-ref ',A=i.unless.call(t,t&&t.hasStreams,{hash:{},inverse:O.noop,fn:O.program(1,s,a),data:a}),(A||0===A)&&(M+=A),M+='"> ',A=i.if.call(t,t&&t.hasFiles,{hash:{},inverse:O.noop,fn:O.program(3,o,a),data:a}),(A||0===A)&&(M+=A),M+=" ",A=i.each.call(t,t&&t.media,{hash:{},inverse:O.noop,fn:O.programWithDepth(20,y,a,t),data:a}),(A||0===A)&&(M+=A),M+=" </div> </div> ",A=i.if.call(t,t&&t.key,{hash:{},
inverse:O.noop,fn:O.programWithDepth(35,k,a,t),data:a}),(A||0===A)&&(M+=A),M+=" </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+f((n=null==t||t===!1?t:t.index,typeof n===p?n.apply(e):n))+'" href="#"> ',n=i.if.call(e,e&&e.title,{hash:{},inverse:m.noop,fn:m.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.if.call(e,e&&e.videoResolution,{
hash:{},inverse:m.noop,fn:m.program(4,l,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(7,c,t),data:t}),(n||0===n)&&(r+=n),r+=" </a> </li> "}function o(e,t){var n,i="";return i+=" "+f((n=e&&e.title,typeof n===p?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function l(e,t){var r,a="";return a+=" "+f(n(442).call(e,e&&e.videoResolution,{hash:{},data:t})),r=i.if.call(e,e&&e.bitrate,{hash:{},inverse:m.noop,fn:m.program(5,u,t),data:t
}),(r||0===r)&&(a+=r),a+=" "}function u(e,t){return","}function c(e,t){var i="";return i+=" "+f(n(441).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p="function",f=this.escapeExpression,m=this;return h+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon adjust-alt"></i> '+f(n(1).call(t,"Select a Version",{
hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',d=i.each.call(t,t&&t.mediaItems,{hash:{},inverse:m.noop,fn:m.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=" </ul> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <p class="text-muted">'+c(n(1).call(e,"Everything you need to experience the best of Plex. Your subscription gives you premium features and exclusive access to new ones.",{
hash:{},data:t}))+"</p> "}function o(e,t){var i="";return i+=' <p class="text-muted">'+c(n(1).call(e,'The server "{1}" has not been claimed. This server must be claimed by an account with a Plex Pass subscription.',e&&e.friendlyName,{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this,h="function";return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon glyphicon circle-arrow-right"></i> '+c(n(1).call(t,"Go Premium",{
hash:{},data:a}))+' </h4> </div> <div class="modal-body"> <p class="text-center"><i class="plex-image plex-pass"></i></p> <h4 class="text-center">'+c(n(1).call(t,"This feature requires a Plex Pass subscription.",{hash:{},data:a}))+"</h4> ",l=i.if.call(t,t&&t.isClaimed,{hash:{},inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+c((l=t&&t.plexPassUrl,typeof l===h?l.apply(t):l))+'" target="_blank">'+c(n(1).call(t,"Learn More",{
hash:{},data:a}))+"</a> </p> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <div class="friends-container"></div> <div class="message-container invisible"> <textarea class="message form-control" placeholder="'+c(n(1).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}function o(e,t){var i="";return i+=' <div class="empty-message"> '+c(n(1).call(e,"You need {1}friends{2} to recommend media.",'<a class="friends-btn" href="#!/friends">',"</a>",{
hash:{},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon share-alt"></i> '+c(n(1).call(t,"Select Friends",{hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',
l=i.if.call(t,t&&t.hasFriends,{hash:{},inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' </div> <div class="modal-footer"> <span class="characters-remaining"></span> <button type="button" class="send-btn btn btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(1).call(t,"Send",{hash:{},data:a}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t,r){var a,s="";return s+=' <h4 class="update-list-title">'+h(n(1).call(e,"New",{hash:{},data:t}))+"</h4> <ul> ",a=i.each.call(e,r&&r.added,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(a||0===a)&&(s+=a),s+=" </ul> "}function o(e,t){var n="";return n+=" <li>"+h(typeof e===d?e.apply(e):e)+"</li> "}function l(e,t,r){var a,s="";return s+=' <h4 class="update-list-title">'+h(n(1).call(e,"Fixes",{hash:{},data:t}))+"</h4> <ul> ",a=i.each.call(e,r&&r.fixed,{hash:{},inverse:p.noop,fn:p.program(2,o,t),
data:t}),(a||0===a)&&(s+=a),s+=" </ul> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+h(n(1).call(t,"Plex Media Server Release Notes",{hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <span class="text-muted">'+h(n(1).call(t,"Version {1}",t&&t.version,{
hash:{},data:a}))+"</span> ",u=i.if.call(t,t&&t.added,{hash:{},inverse:p.noop,fn:p.programWithDepth(1,s,a,t),data:a}),(u||0===u)&&(c+=u),c+=" ",u=i.if.call(t,t&&t.fixed,{hash:{},inverse:p.noop,fn:p.programWithDepth(4,l,a,t),data:a}),(u||0===u)&&(c+=u),c+=" </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+h((n=e&&e.id,typeof n===p?n.apply(e):n))+'" href="#"> ',
n=i.if.call(e,e&&e.name,{hash:{},inverse:f.program(4,l,t),fn:f.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.if.call(e,e&&e.isCloudSync,{hash:{},inverse:f.noop,fn:f.program(6,u,t),data:t}),(n||0===n)&&(r+=n),r+=" </a> </li> "}function o(e,t){var i="";return i+=" "+h(n(282).call(e,e&&e.name,25,{hash:{},data:t}))+" "}function l(e,t){var i="";return i+=" "+h(n(282).call(e,e&&e.device,25,{hash:{},data:t}))+" "}function u(e,t){return'<i class="cloud-sync-icon glyphicon cloud"></i>'}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var c,d="",h=this.escapeExpression,p="function",f=this;return d+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon iphone"></i> '+h(n(1).call(t,"Choose Destination",{hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',
c=i.each.call(t,t&&t.devices,{hash:{},inverse:f.noop,fn:f.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" </ul> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+c((i=null==t||t===!1?t:t.index,typeof i===u?i.apply(e):i))+'" href="#"> ',i=n(813).call(e,(i=e&&e.Part,i=null==i||i===!1?i:i[0],null==i||i===!1?i:i.file),35,{hash:{},
data:t}),(i||0===i)&&(r+=i),r+=" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u="function",c=this.escapeExpression,d=this;return l+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon file"></i> '+c(n(1).call(t,"Select a File",{hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',
o=i.each.call(t,t&&t.medias,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=" </ul> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression,u="function";return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-arrow-right"></i> '+l(n(1).call(t,"Resume",{
hash:{},data:a}))+'</h4> </div> <div class="modal-body"> <ul class="list select-list"> <li class="striped-list-item select-list-item"><a class="offset" data-value="'+l((s=t&&t.offset,typeof s===u?s.apply(t):s))+'" href="#">'+l(n(1).call(t,"Resume from {1}",t&&t.formattedOffset,{hash:{},data:a}))+'</a></li> <li class="striped-list-item select-list-item"><a class="offset" data-value="0" href="#">'+l(n(1).call(t,"Start from beginning",{hash:{},data:a}))+"</a></li> </ul> </div> </div> </div> "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+=' <li><a class="btn-gray show-pane-btn type-btn',i=n(12).call(e,e&&e.selectedPane,e&&e.id,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(i||0===i)&&(r+=i),r+='" href="#" data-pane="'+h((i=e&&e.id,typeof i===d?i.apply(e):i))+'">'+h((i=e&&e.name,typeof i===d?i.apply(e):i))+"</a></li> "}function o(e,t){return" selected"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d="function",h=this.escapeExpression;
return u+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"> <i class="modal-icon plex-icon-plex-chevron"></i> '+h(n(1).call(t,"Plex Media Server Downloads",{hash:{},data:a}))+' </h4> </div> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar"> <ul class="list modal-nav-list"> ',l=i.each.call(t,t&&t.items,{
hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> </div> <div class="server-download-loading loading loading-inline"></div> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <ul class="list select-list select-networks-list dark-scrollbar"> ',r=i.each.call(e,e&&e.networks,{hash:{},inverse:g.noop,fn:g.programWithDepth(2,o,t,e),
data:t}),(r||0===r)&&(a+=r),a+=' </ul> <div class="message-container ',r=i.unless.call(e,e&&e.autoSelect,{hash:{},inverse:g.noop,fn:g.program(10,h,t),data:t}),(r||0===r)&&(a+=r),a+='"> <textarea class="message form-control" placeholder="'+b(n(1).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}function o(e,t,r){var a,s="";return s+=' <li class="striped-list-item select-list-item"> <a class="network ',a=i.if.call(e,r&&r.autoSelect,{hash:{},inverse:g.noop,fn:g.program(3,l,t),
data:t}),(a||0===a)&&(s+=a),s+='" data-id="'+b((a=e&&e.key,typeof a===y?a.apply(e):a))+'" href="#"> ',a=n(12).call(e,e&&e.key,"facebook",{hash:{},inverse:g.program(7,c,t),fn:g.program(5,u,t),data:t}),(a||0===a)&&(s+=a),s+=" "+b((a=e&&e.title,typeof a===y?a.apply(e):a))+" </a> </li> "}function l(e,t){return"selected"}function u(e,t){return' <i class="network-icon glyphicon glyphicon-social facebook"></i> '}function c(e,t){var i,r="";return r+=" ",i=n(12).call(e,e&&e.key,"twitter",{hash:{},inverse:g.noop,
fn:g.program(8,d,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function d(e,t){return' <i class="network-icon glyphicon glyphicon-social twitter"></i> '}function h(e,t){return"invisible"}function p(e,t){var i="";return i+=' <div class="empty-message"> '+b(n(1).call(e,"You need to {1}link your account{2}.",'<a href="{3}" target="_blank">',"</a>",e&&e.accountUrl,{hash:{},data:t}))+" </div> "}function f(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var m,v="",g=this,y="function",b=this.escapeExpression;
return v+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon share"></i> '+b(n(1).call(t,"Share",{hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',m=i.if.call(t,t&&t.networks,{hash:{},inverse:g.program(12,p,a),fn:g.program(1,s,a),data:a}),(m||0===m)&&(v+=m),v+=' </div> <div class="modal-footer"> <span class="characters-remaining"></span> <button type="button" class="share-btn btn btn-primary btn-loading ',
m=i.unless.call(t,t&&t.autoSelect,{hash:{},inverse:g.noop,fn:g.program(14,f,a),data:a}),(m||0===m)&&(v+=m),v+='"> <div class="loading loading-sm"></div> <span class="btn-label">'+b(n(1).call(t,"Share",{hash:{},data:a}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,i="";return i+=' <p class="text-muted"><i class="glyphicon warning-sign"></i> '+c((n=e&&e.Status,n=null==n||n===!1?n:n.failure,typeof n===u?n.apply(e):n))+"</p> ";
}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u="function",c=this.escapeExpression,d=this;return l+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download"></i> '+c(n(1).call(t,"Sync Status",{hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <h4 class="sync-item-title">'+c((o=t&&t.rootTitle,
typeof o===u?o.apply(t):o))+" &middot; "+c((o=t&&t.title,typeof o===u?o.apply(t):o))+"</h4> ",o=i.if.call(t,(o=t&&t.Status,null==o||o===!1?o:o.failure),{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' <div class="sync-status-list-container"></div> </div> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),r=this.merge(r,e.partials),a=a||{};var s,o="",l=this.escapeExpression,u=this;
return o+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+l(n(1).call(t,"Plex Terms of Service",{hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',s=u.invokePartial(n(1840),"terms",t,i,r,a),(s||0===s)&&(o+=s),o+=' </div> <div class="modal-footer"> <button type="button" class="confirm-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+l(n(1).call(t,"Agree",{
hash:{},data:a}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,i="";return i+=" "+d((n=e&&e.status,typeof n===c?n.apply(e):n))+" "}function o(e,t){var i="";return i+=" "+d(n(1).call(e,"There was a problem preparing for optimization.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-error-icon"><i class="glyphicon circle-exclamation-mark"></i></p> </div> <div class="col-sm-8"> <h4> ',
l=i.if.call(t,t&&t.status,{hash:{},inverse:h.program(3,o,a),fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' </h4> <h4><a class="try-again-link" href="#">'+d(n(1).call(t,"Try again",{hash:{},data:a}))+"</a></h4> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"disabled"}function o(e,t){return"selected"}function l(e,t,i){var r,a="";return a+=' <option value="'+h((r=e&&e.id,typeof r===d?r.apply(e):r))+'" ',r=n(12).call(e,i&&i.selectedLocationID,e&&e.id,{
hash:{},inverse:p.noop,fn:p.program(3,o,t),data:t}),(r||0===r)&&(a+=r),a+=">"+h(n(443).call(e,e&&e.path,50,20,{hash:{},data:t}))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d="function",h=this.escapeExpression,p=this;return c+='<label class="control-label" for="convert-storage-location">'+h(n(1).call(t,"Version storage location",{hash:{},data:a}))+'</label> <select id="convert-storage-location" class="storage-location-select" name="storageLocation" ',
u=i.if.call(t,t&&t.disableLocation,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='> <option value="-1" ',u=n(12).call(t,t&&t.selectedLocationID,-1,{hash:{},inverse:p.noop,fn:p.program(3,o,a),data:a}),(u||0===u)&&(c+=u),c+=">"+h(n(1).call(t,"In folders with original items",{hash:{},data:a}))+"</option> ",u=i.each.call(t,t&&t.locations,{hash:{},inverse:p.noop,fn:p.programWithDepth(5,l,a,t),data:a}),(u||0===u)&&(c+=u),c+=' </select> <p class="help-block">'+h(n(1).call(t,'A "Plex Versions" folder will be created in your chosen location.',{
hash:{},data:a}))+"</p> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}function o(e,t){return"checked"}function l(e,t){var n,i="";return i+='value="'+v((n=e&&e.policy,n=null==n||n===!1?n:n.value,typeof n===m?n.apply(e):n))+'"'}function u(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.isCloudSync,{hash:{},inverse:g.program(10,d,t),fn:g.program(8,c,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function c(e,t){var i="";return i+=" "+v(n(1).call(e,"A large number of sync items may be time-consuming to convert, and the time to upload is dependent on your bandwidth. A large number of high quality items may take a very long time. If you have trouble, try reducing the number of items or your quality setting.",{
hash:{},data:t}))+" "}function d(e,t){var i="";return i+=" "+v(n(1).call(e,"A large number of sync items may be time-consuming to convert and transfer to your device. If you have trouble, try reducing the number of items.",{hash:{},data:t}))+" "}function h(e,t){var i="";return i+=" "+v(n(1).call(e,"A large number of items may be time-consuming to convert. If you have trouble, try reducing the number of items.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};
var p,f="",m="function",v=this.escapeExpression,g=this;return f+='<div class="form-group ',p=i.unless.call(t,t&&t.showUnwatched,{hash:{},inverse:g.noop,fn:g.program(1,s,a),data:a}),(p||0===p)&&(f+=p),f+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-unwatched" name="policyUnwatched" ',p=i.if.call(t,(p=t&&t.policy,null==p||p===!1?p:p.unwatched),{hash:{},inverse:g.noop,fn:g.program(3,o,a),data:a}),(p||0===p)&&(f+=p),f+="> "+v(n(1).call(t,"Unwatched only",{hash:{},data:a
}))+' </label> </div> <div class="form-group ',p=i.unless.call(t,t&&t.isDirectory,{hash:{},inverse:g.noop,fn:g.program(1,s,a),data:a}),(p||0===p)&&(f+=p),f+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-scope" name="policyScope" value="count" ',p=n(12).call(t,(p=t&&t.policy,null==p||p===!1?p:p.scope),"count",{hash:{},inverse:g.noop,fn:g.program(3,o,a),data:a}),(p||0===p)&&(f+=p),f+="> "+v(n(1).call(t,"Limit to",{hash:{},data:a}))+' <input type="number" id="convert-policy-value" name="policyValue" class="policy-value-control form-control" ',
p=i.if.call(t,(p=t&&t.policy,null==p||p===!1?p:p.value),{hash:{},inverse:g.noop,fn:g.program(5,l,a),data:a}),(p||0===p)&&(f+=p),f+="> "+v(n(1).call(t,"items",{hash:{},data:a}))+' </label> <p class="convert-warning help-block ',p=i.unless.call(t,t&&t.showLimitWarning,{hash:{},inverse:g.noop,fn:g.program(1,s,a),data:a}),(p||0===p)&&(f+=p),f+='"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> ',p=i.if.call(t,t&&t.isSync,{hash:{},inverse:g.program(12,h,a),
fn:g.program(7,u,a),data:a}),(p||0===p)&&(f+=p),f+=" </span> </p> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"disabled"}function o(e,t,r){var a,s="";return s+=' <option value="'+f((a=e&&e.id,typeof a===m?a.apply(e):a))+'" ',a=n(12).call(e,(a=r&&r.item,null==a||a===!1?a:a.targetTagID),e&&e.id,{hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(a||0===a)&&(s+=a),s+="> "+f((a=e&&e.tag,typeof a===m?a.apply(e):a)),a=i.if.call(e,(a=e&&e.MediaSettings,
null==a||a===!1?a:a.videoResolution),{hash:{},inverse:v.noop,fn:v.program(6,u,t),data:t}),(a||0===a)&&(s+=a),s+=" </option> "}function l(e,t){return"selected"}function u(e,t){var i="";return i+=" - "+f(n(107).call(e,e&&e.MediaSettings,{hash:{},data:t}))}function c(e,t,i){var r,a="";return a+=' <option value="'+f((r=e&&e.title,typeof r===m?r.apply(e):r))+'" ',r=n(12).call(e,(r=i&&i.selectedProfile,null==r||r===!1?r:r.title),e&&e.title,{hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(r||0===r)&&(a+=r),
a+="> "+f((r=e&&e.title,typeof r===m?r.apply(e):r))+" </option> "}function d(e,t,i){var r,a="";return a+=' <option value="'+f((r=e&&e.index,typeof r===m?r.apply(e):r))+'" ',r=n(12).call(e,(r=i&&i.selectedCustomQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(r||0===r)&&(a+=r),a+="> "+f(n(107).call(e,e,{hash:{},data:t}))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var h,p="",f=this.escapeExpression,m="function",v=this;
return p+='<select class="convert-target-select" name="target" ',h=i.if.call(t,t&&t.disableTarget,{hash:{},inverse:v.noop,fn:v.program(1,s,a),data:a}),(h||0===h)&&(p+=h),p+="> ",h=i.each.call(t,t&&t.targets,{hash:{},inverse:v.noop,fn:v.programWithDepth(3,o,a,t),data:a}),(h||0===h)&&(p+=h),p+=' <option value="-1" ',h=i.unless.call(t,(h=t&&t.item,null==h||h===!1?h:h.targetTagID),{hash:{},inverse:v.noop,fn:v.program(4,l,a),data:a}),(h||0===h)&&(p+=h),p+=">"+f(n(1).call(t,"Custom",{hash:{},data:a}))+'</option> </select> <div class="convert-custom-target-container"> <input type="text" class="convert-target-title form-control" name="targetTitle" class="form-control" value="'+f((h=t&&t.item,
h=null==h||h===!1?h:h.target,typeof h===m?h.apply(t):h))+'" placeholder="'+f(n(1).call(t,"Quality Name",{hash:{},data:a}))+'"> <select class="convert-target-profile-select" name="targetProfile"> ',h=i.each.call(t,t&&t.profiles,{hash:{},inverse:v.noop,fn:v.programWithDepth(8,c,a,t),data:a}),(h||0===h)&&(p+=h),p+=' </select> <select class="convert-target-quality-select" name="targetQuality"> ',h=i.each.call(t,t&&t.availableCustomQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(10,d,a,t),data:a
}),(h||0===h)&&(p+=h),p+=' </select> </div> <p class="help-block">'+f(n(1).call(t,"Plex will convert your media to this quality. Each version will be stored in a separate file.",{hash:{},data:a}))+"</p> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}function o(e,t){return d(n(1).call(e,"Optimize",{hash:{},data:t}))}function l(e,t){return d(n(1).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),
a=a||{};var u,c="",d=this.escapeExpression,h=this,p="function";return c+='<form id="convert-form" class="settings-container"> <div class="modal-body"> <div class="form-group ',u=i.unless.call(t,t&&t.showRemuxOnlyWarning,{hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='"> <p class="convert-warning help-block"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> '+d(n(1).call(t,"Video optimization may take a long time to complete on this server. You'll be able to use Plex normally while you wait.",{
hash:{},data:a}))+' </span> </p> </div> <div class="form-group"> <label class="control-label" for="convert-title">'+d(n(1).call(t,"Title",{hash:{},data:a}))+'</label> <input type="text" id="convert-title" name="title" class="form-control" value="'+d((u=t&&t.conversionItem,u=null==u||u===!1?u:u.title,typeof u===p?u.apply(t):u))+'" placeholder="'+d((u=t&&t.conversionItem,u=null==u||u===!1?u:u.title,typeof u===p?u.apply(t):u))+'"> </div> <div class="policy-region"></div> <div class="targets-region"></div> <div class="location-region"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">'+d(n(1).call(t,"Cancel",{
hash:{},data:a}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',u=i.if.call(t,t&&t.isNew,{hash:{},inverse:h.program(5,l,a),fn:h.program(3,o,a),data:a}),(u||0===u)&&(c+=u),c+="</span> </button> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="loading loading-inline"></div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon restart"></i> '+o(n(1).call(t,"Optimize",{hash:{},data:a}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-success-icon"><i class="glyphicon ok-2"></i></p> </div> <div class="col-sm-8"> <h4>'+o(n(1).call(t,"This media is being converted.",{hash:{},data:a}))+"</h4> <h4>"+o(n(1).call(t,"Watch the status of the conversion {1}here{2}.",'<a class="status-link" href="#">',"</a>",{
hash:{},data:a}))+"</h4> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-error-icon"><i class="glyphicon circle-exclamation-mark"></i></p> </div> <div class="col-sm-8"> <h4>'+o(n(1).call(t,"There was a problem syncing this media.",{hash:{},data:a
}))+'</h4> <h4><a class="try-again-link" href="#">'+o(n(1).call(t,"Try again",{hash:{},data:a}))+"</a></h4> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <select class="sync-quality-select" name="videoQuality"> ',n=i.if.call(e,e&&e.supportsOriginalQuality,{hash:{},inverse:v.noop,fn:v.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.each.call(e,e&&e.availableVideoQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(5,u,t,e),
data:t}),(n||0===n)&&(r+=n),r+=" </select> "}function o(e,t){var i,r="";return r+=' <option value="-1" ',i=n(12).call(e,(i=e&&e.selectedVideoQuality,null==i||i===!1?i:i.index),-1,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(i||0===i)&&(r+=i),r+="> "+g(n(1).call(e,"Original",{hash:{},data:t}))+" </option> "}function l(e,t){return"selected"}function u(e,t,i){var r,a="";return a+=' <option value="'+g((r=e&&e.index,typeof r===y?r.apply(e):r))+'" ',r=n(12).call(e,(r=i&&i.selectedVideoQuality,
null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+="> "+g(n(107).call(e,e,{hash:{},data:t}))+" </option> "}function c(e,t){var n,r="";return r+=' <select class="sync-quality-select" name="musicQuality"> ',n=i.each.call(e,e&&e.availableMusicQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(8,d,t,e),data:t}),(n||0===n)&&(r+=n),r+=" </select> "}function d(e,t,i){var r,a="";return a+=' <option value="'+g((r=e&&e.index,typeof r===y?r.apply(e):r))+'" ',
r=n(12).call(e,(r=i&&i.selectedMusicQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+="> "+g(n(107).call(e,e,{hash:{},data:t}))+" </option> "}function h(e,t){var n,r="";return r+=' <select class="sync-quality-select" name="photoQuality"> ',n=i.each.call(e,e&&e.availablePhotoQualities,{hash:{},inverse:v.noop,fn:v.programWithDepth(11,p,t,e),data:t}),(n||0===n)&&(r+=n),r+=" </select> "}function p(e,t,i){var r,a="";return a+=' <option value="'+g((r=e&&e.index,
typeof r===y?r.apply(e):r))+'" ',r=n(12).call(e,(r=i&&i.selectedPhotoQuality,null==r||r===!1?r:r.index),e&&e.index,{hash:{},inverse:v.noop,fn:v.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+="> "+g((r=e&&e.title,typeof r===y?r.apply(e):r))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var f,m="",v=this,g=this.escapeExpression,y="function";return f=n(12).call(t,t&&t.typeElement,"video",{hash:{},inverse:v.noop,fn:v.program(1,s,a),data:a}),(f||0===f)&&(m+=f),m+=" ",
f=n(12).call(t,t&&t.typeElement,"audio",{hash:{},inverse:v.noop,fn:v.program(7,c,a),data:a}),(f||0===f)&&(m+=f),m+=" ",f=n(12).call(t,t&&t.typeElement,"photo",{hash:{},inverse:v.noop,fn:v.program(10,h,a),data:a}),(f||0===f)&&(m+=f),m+=' <p class="help-block">'+g(n(1).call(t,"Plex will convert your media to this quality and transfer the converted media to your device.",{hash:{},data:a}))+"</p> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return c(n(1).call(e,"Sync",{
hash:{},data:t}))}function o(e,t){return c(n(1).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d="function",h=this;return u+='<form id="sync-form" class="settings-container"> <div class="modal-body"> <div class="form-group"> <label class="control-label" for="sync-title">'+c(n(1).call(t,"Title",{hash:{},data:a}))+'</label> <input type="text" id="sync-title" name="title" class="form-control" value="'+c((l=t&&t.syncItem,
l=null==l||l===!1?l:l.title,typeof l===d?l.apply(t):l))+'" placeholder="'+c((l=t&&t.syncItem,l=null==l||l===!1?l:l.title,typeof l===d?l.apply(t):l))+'"> </div> <div class="policy-region"></div> <div class="quality-region"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">'+c(n(1).call(t,"Cancel",{hash:{},data:a}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',
l=i.if.call(t,t&&t.isNew,{hash:{},inverse:h.program(3,o,a),fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+="</span> </button> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon download"></i> '+o(n(1).call(t,"Sync",{
hash:{},data:a}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="convert-message-container row"> <div class="col-sm-3 text-center"> <p class="convert-success-icon"><i class="glyphicon ok-2"></i></p> </div> <div class="col-sm-8"> <h4>'+o(n(1).call(t,"This media is being synced.",{
hash:{},data:a}))+"</h4> <h4>"+o(n(1).call(t,"Watch the status of the sync {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:a}))+"</h4> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon restart"></i> <span class="generator-title"></span></h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <h4> <span class="generator-failure-container pull-right"> <i class="generator-failure-icon glyphicon circle-exclamation-mark text-danger"></i> <span class="generator-failure-message text-muted"></span> </span> <span class="generator-items-count"></span> &middot; <span class="generator-total-size"></span> </h4> <div class="list-region"></div> <div class="list-feedback-container"> <span class="loading hidden"></span> <span class="error-message text-muted hidden"> '+o(n(1).call(t,"There was a problem loading these items.",{
hash:{},data:a}))+" </span> </div> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<p> Thank you for using Plex! By accessing, using, downloading, or visiting any Plex "Service(s)", which includes the Plex website, Plex software and products described <a href="https://plex.tv/downloads" target="_blank">here</a>, and any other products or materials provided by Plex GmbH, a Swiss company, and its affiliates (together, "Plex"), you agree to the terms ("Terms") listed in this agreement ("Agreement"). Plex reserves the right to amend these Terms at any time and without notice. Any revisions to the Terms will be posted on the Plex website. By continuing to access or use the Services, you accept any changes or revisions to the Terms. </p> <h4>Plex Software</h4> <ol> <li>Plex grants you a personal, non-commercial, worldwide, royalty-free, revocable, non-transferable, non-sublicensable, and non-exclusive license to use the software provided to you by Plex as part of the Services ("Software"). This license is for the sole purpose of enabling you to use and enjoy the benefit of the Services in the manner permitted by these Terms.</li> <li>The Software includes certain executable modules that Plex has licensed from <a href="https://support.plex.tv/hc/en-us/articles/204096476-License-Information" target="_blank">third party providers</a> ("Third Party Components") that may be subject to different end user license terms as specified in the license agreement(s) provided with such Third Party Components.</li> <li>Except as provided in the next section, you may not, or allow anyone else to, directly or indirectly to: (1) copy, modify, distribute, sell, or lease any part of the Software; (2) reverse engineer, disassemble, decompile, or otherwise attempt to discover the source code or structure, sequence, and/or organization of all or any part of the Software, unless laws prohibit those restrictions or you have our written permission; (3) rent, lease, or use the Software for timesharing or service bureau purposes; (4) develop any improvement, modification, or derivative works of the Software, or include any portion thereof in any other product, software, work, equipment, or item (except that you may customize and/or modify the Software only as set forth in the documentation or as authorized in any license agreement of Plex\'s third party licensors and applicable to Third Party Components); or (5) allow the transfer, transmission, export, or re-export of the Software or any portion thereof or any technical data associated with any Software.</li> <li>Plex grants you a personal, non-commercial, worldwide, royalty-free, revocable, non-transferable, non-sublicensable, and non-exclusive license to reproduce the Plex Media Server Software (PMS Software) in copies and distribute the copies to others, provided that: you may not charge a fee for the PMS Software, and you may not individually charge for installing it; you may copy, distribute and install the PMS Software only as others actually need the PMS Software, and not more than five (5) times per calendar day or more than twenty-five (25) times per calendar month; you may not offer the PMS Software to the public for downloading on or in connection with any commercial online site, whether or not a fee is charged for the PMS Software; you shall comply with all other terms and conditions set forth in this document; you agree that Plex may revoke or terminate the license granted to you under this paragraph at any time for any reason in its sole discretion. As an example, this section is intended to permit reasonable copying and distribution of the PMS Software in connection with services such as home theater or home media center installation in which you install the PMS Software on the computers of your customers as a convenience in connection with other services or products that you are providing to them, and/or in Arch Linux repositories and similar distributions.</li> <li>You shall maintain and shall not remove nor obscure any proprietary notices on the Software, and shall reproduce such notices exactly on all permitted copies of the Software.</li> <li>You may reverse engineer the Software solely (1) as permitted by applicable law, or (2) for the purpose of debugging modifications made by you to certain third party files in source code format that are licensed under the GNU Lesser General Public License (LGPL) or under the GNU General Public License version 2 (GPL2) and only provided that you have made, prior to any such reverse engineering permitted under this sentence, unsuccessful prior reasonable good faith efforts to debug such modifications using techniques other than the reverse engineering of the Software.</li> <li>As between the parties and except as otherwise provided in any license agreement for Third Party Components, Plex shall own all title, ownership rights, and intellectual property rights in and to the Software, and any copies or derivative works thereof, except that by downloading the Software, you retain any title that you may own in and to the recording media on which the Software is recorded.</li> <li>You understand that Plex or its licensors may modify or discontinue offering the Services at any time.</li> <li>You shall not make, or assist others in making, any use of data adapters or similar technologies used by or with the Services that are designed to receive and use data from Plex, its third party data providers, and their affiliates and third parties, other than to receive and use such data in accordance with these Terms and your agreement with the third party data providers, and their affiliates and third parties, including without limitation any data passing through the Services or otherwise effectively made available by any Service through an API, a download, a database, or the like.</li> <li>This Agreement does not entitle you to any support, upgrades, patches, enhancements, or \ufb01xes (collectively, "Support") for the Services. Any such Support for the Services that may be made available by Plex, in its sole discretion, shall become part of the Services and will be subject to these Terms.</li> </ol> <h4>Data</h4> <p> Data provided by Plex or other third party data providers may be delayed or unavailable as specified by Plex or such third party data providers. Plex does not verify any data provided by Plex or other third party data providers and disclaims any obligation to do so. Plex, its third party data providers, and each of their affiliates and business partners: (1) expressly disclaim the availability, accuracy, adequacy, or completeness of any data or third party data provider, and (2) shall not be liable for any errors, omissions, or other defects in, unavailability of, delays or interruptions in such data or third party data provider. </p> <h4>Acceptable Use</h4> <ol> <li> You may not, or allow anyone else to, use any of the Services to do the following: <ol> <li>Infringe the intellectual property rights, proprietary rights, or rights of publicity or privacy of any third party;</li> <li>Violate any law, statute, ordinance, or regulation, or perform any other action that would incur civil liability or constitute a crime;</li> <li>Disseminate, transfer or store information or materials in any form or format that is harmful, threatening, abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous, or otherwise objectionable, or that otherwise violate any law or right of any third party; or</li> <li>Disseminate any software viruses or any other computer code, files, programs, or the like that may without limitation interrupt, destroy, or limit the functionality of any computer software or hardware or telecommunications equipment, violate the security of any computer network, or the like.</li> </ol> </li> <li>If the occurrence of any prohibited use comes to our attention, we reserve the right to disable any accounts associated with prohibited use or otherwise terminate your access to the Services.</li> </ol> <h4>Your Content</h4> <ol> <li>You continue to retain any ownership rights you have in content you make available via the Services, or otherwise use in conjunction with the Services. However, by using the Services with particular content, for example by using the Services to share particular content or access particular content, you grant to Plex (and to each of the third parties with whom we work to provide you with the Services) a worldwide license to reproduce, modify, create derivative works, transmit, publish, publicly perform, publicly display, distribute, and otherwise use the particular content and metadata associated with the content, such as images of you or images otherwise associated with your account. The rights you grant us in this license are only for the limited purpose of providing you with our Services. You may not use the Services in connection with any content for which you do not have the right to grant us this license.</li> <li>The Services may include features that allow you to share your content with others. Please be careful when choosing to share content with other users; Plex is not responsible for how others use your content. Additionally, you hereby grant to any user with whom you share content a non-exclusive license to access the content through the Service, and to use, reproduce in copies, distribute, display and perform the shared content as permitted through the functionality of the Service and under this Agreement. You may not share any content with others via the Services if you do not have the right to grant this license to any user with whom you share the content.</li> <li>You understand that Plex may delete any content that you post in or contribute to a message forum or similar service that Plex hosts, in its sole discretion, for any reason.</li> </ol> <h4>Content of Others</h4> <ol> <li>You acknowledge that all content that you access through use of the Software or other Services is accessed at your own risk, and you will be solely responsible for any damage or liability to any party resulting from such access.</li> <li>You understand that by using the Services you may encounter content that you may find offensive, indecent, or objectionable. Plex does not inspect, screen, or otherwise control the content that is posted, shared or made available via the Services, and Plex does not guarantee the accuracy, integrity or quality of such content.</li> <li>You acknowledge that unauthorized use of copyrighted content of others may subject you to civil and criminal penalties, including possible monetary damages, for copyright infringement.</li> </ol> <h4>Developers and Interfacing Software</h4> <ol> <li>"Interfacing Software" means any software that you obtain or provide and that accesses or calls any Software provided by Plex as part of the Services including, but not limited to, plug-ins for the Services, channel plug-ins, metadata agents, and client applications that communicate directly or indirectly with the Services.</li> <li> By making, or assisting others in making, Interfacing Software, you agree to the following terms: <ol> <li>You grant Plex and its affiliates worldwide a worldwide, non-exclusive, and royalty-free right and license to use (including testing, hosting and linking to), copy, publicly perform, publicly display, reproduce in copies for distribution, and distribute the copies of any Interfacing Software made by you or with your assistance. </li> <li>You will include in the source code of the Interfacing Software a copyright notice of the form: Copyright \xa9 &lt;year&gt; &lt;copyright holders&gt;. You grant, and authorize Plex to grant on your behalf if necessary, a license, free of charge, to any person obtaining a copy of the Interfacing Software and associated documentation files from Plex, to deal in the Interfacing Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Interfacing Software, and to permit persons to whom the Interfacing Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Interfacing Software. THE INTERFACING SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE INTERFACING SOFTWARE.</li> <li> You may notify us at legal@plex.tv if you do not wish for Plex to use, distribute, copy, publicly perform, publicly display, reproduce in copies for distribution, or distribute copies of any Interfacing Software that was created by you. Plex will comply with such a request but Plex must be granted a transition period of thirty (30) days after receipt of the request to comply. A request to take down Interfacing Software must include (1) an identification of the Interfacing Software you wish to be removed; (2) your signature in either electronic or physical form; and (3) the following statements: <ul> <li>"I swear under penalty of perjury that I am the owner of the Interfacing Software or I am authorized to act on behalf of the owner of the Interfacing Software."</li> <li>"I swear under penalty of perjury that the information in this notification is accurate."</li> </ul> </li> <li>You shall protect the privacy and legal rights of Plex users. If the users provide, or the Interfacing Software accesses or uses, user names, passwords, or other login information or personal information, you must make the users aware that such information will be available to the Interfacing Software, and you must provide privacy notices and protection for those users in compliance with applicable law. Further, the Interfacing Software may use that information only for the limited purposes for which the user has given you permission to do so. If the Interfacing Software stores personally identifying information of users or information that a reasonable user would consider to be sensitive, then the Interfacing Software must do so securely and only for as long as it is needed. However, if the user has opted or entered into a separate agreement with you that allows you or the Interfacing Software to store or use personally identifying information of users or information that a reasonable user would consider to be sensitive, then the terms of that separate agreement will govern your use of such information. If the user provides the Interfacing Software with Plex account information, the Interfacing Software may only use that information to access the user\'s Plex account when, and for the limited purposes for which, the user has given you permission to do so.</li> <li> Prohibited Uses. Plex prohibits performing certain actions using the Interfacing Software. You shall not make, or assist others in making, any Interfacing Software that: <ol> <li>Knowingly violates a third party\'s terms of service;</li> <li>Violates any applicable laws or regulations;</li> <li>Interferes with, disrupts, damages, harms, or accesses in an unauthorized manner the machines, hardware. devices, servers, networks, data, or other properties or services of any other party including, but not limited to, Plex users, Plex or any network operator;</li> <li>Posts misleading information about an application\'s purpose;</li> <li>Infringes on the intellectual property rights of others; or</li> <li>Performs any other prohibited action listed under "Acceptable Use" above.</li> </ol> </li> <li>You will require your end users to comply with any applicable law and these Terms. You will not knowingly enable your end users to violate applicable law or these Terms.</li> <li>You shall indemnify and hold harmless Plex and its officers, directors, employees, contractors, licensors, suppliers, distributors, contractors, agents, and third party contributors from any claims, damages, liabilities, costs and fees (including reasonable attorney fees) arising from any use of the Interfacing Software or from Plex\'s distribution of the Interfacing Software.</li> <li> Brand Features and Attribution <ol> <li>"Brand Features" is defined as the trade names, trademarks, service marks, logos, domain names, and other distinctive brand features of a party. Except where expressly stated, these terms do not grant either party any right, title, or interest in or to the other party\'s Brand Features. Any use by you of Plex\'s Brand Features (including any goodwill associated therewith) will inure to the benefit of Plex. Plex Brand Features include the Plex Play Logo ("&gt;" in stylized format) and the trademarks, trade names and designs as may be identified from time to time in the Plex Trademark Notice that is posted at <a href="https://plex.tv/legal" target="_blank">plex.tv/legal</a>.</li> <li>You must seek prior written approval from Plex to display Plex\'s Brand Features, including for the purpose of promoting or advertising that your Interfacing Software is for use in conjunction with Plex Services. Plex, in its sole discretion and in a separate writing such as an e-mail from an authorized representative of Plex, may grant you a revocable, non-transferable, nonexclusive license, without right of sub-license, to display Plex\'s Brand Features for the purpose of promoting or advertising that your Interfacing Software is for use in conjunction with Plex Services. You understand and agree that Plex has the sole discretion to determine whether your attribution(s) and use of Plex\'s Brand Features are in accordance with the above requirements and guidelines and that Plex may revoke the license granted herein at any time, or may require you to modify your use of Plex\'s Brand Features, for any reason in its sole discretion.</li> <li>You will not make any statement that suggests a partnership with, sponsorship by, or endorsement by Plex, without Plex\'s express prior written approval.</li> <li>In the course of promoting, marketing, or demonstrating the Services, Plex may produce and distribute incidental depictions, including screenshots, video, or other content from your Interfacing Software, and may use your company or product name. You grant us all necessary rights for the above purposes.</li> </ol> </li> </ol> </li> </ol> <ol> <li>"Interfacing Software" means any software that you obtain or provide and that accesses or calls any Software provided by Plex as part of the Services including, but not limited to, plug-ins for the Services, channel plug-ins, metadata agents, and client applications that communicate directly or indirectly with the Services.</li> <li> By making, or assisting others in making, Interfacing Software, you agree to the following terms: <ol> <li>You grant Plex and its affiliates worldwide a worldwide, non-exclusive, and royalty-free right and license to use (including testing, hosting and linking to), copy, publicly perform, publicly display, reproduce in copies for distribution, and distribute the copies of any Interfacing Software made by you or with your assistance.</li> <li> You may notify us at legal@plex.tv if you do not wish for Plex to use, distribute, copy, publicly perform, publicly display, reproduce in copies for distribution, or distribute copies of any Interfacing Software that was created by you. Plex will comply with such a request but Plex must be granted a transition period of thirty (30) days after receipt of the request to comply. A request to take down Interfacing Software must include (1) an identification of the Interfacing Software you wish to be removed; (2) your signature in either electronic or physical form; and (3) the following statements: <ul> <li>"I swear under penalty of perjury that I am the owner of the Interfacing Software or I am authorized to act on behalf of the owner of the Interfacing Software.\u201d</li> <li>"I swear under penalty of perjury that the information in this notification is accurate.\u201d</li> </ul> </li> <li>You shall protect the privacy and legal rights of Plex users. If the users provide, or the Interfacing Software accesses or uses, user names, passwords, or other login information or personal information, you must make the users aware that such information will be available to the Interfacing Software, and you must provide privacy notices and protection for those users in compliance with applicable law. Further, the Interfacing Software may use that information only for the limited purposes for which the user has given you permission to do so. If the Interfacing Software stores personally identifying information of users or information that a reasonable user would consider to be sensitive, then the Interfacing Software must do so securely and only for as long as it is needed. However, if the user has opted or entered into a separate agreement with you that allows you or the Interfacing Software to store or use personally identifying information of users or information that a reasonable user would consider to be sensitive, then the terms of that separate agreement will govern your use of such information. If the user provides the Interfacing Software with Plex account information, the Interfacing Software may only use that information to access the user\u2019s Plex account when, and for the limited purposes for which, the user has given you permission to do so.</li> <li> Prohibited Uses. Plex prohibits performing certain actions using the Interfacing Software. You shall not make, or assist others in making, any Interfacing Software that: <ol> <li>Knowingly violates a third party\u2019s terms of service;</li> <li>Violates any applicable laws or regulations;</li> <li>Interferes with, disrupts, damages, harms, or accesses in an unauthorized manner the machines, hardware. devices, servers, networks, data, or other properties or services of any other party including, but not limited to, Plex users, Plex or any network operator;</li> <li>Posts misleading information about an application\u2019s purpose;</li> <li>Infringes on the intellectual property rights of others; or</li> <li>Performs any other prohibited action listed under \u201cAcceptable Use\u201d above.</li> </ol> </li> <li>You will require your end users to comply with any applicable law and these Terms. You will not knowingly enable your end users to violate applicable law or these Terms.</li> <li>You shall indemnify and hold harmless Plex and its officers, directors, employees, contractors, licensors, suppliers, distributors, contractors, agents, and third party contributors from any claims, damages, liabilities, costs and fees (including reasonable attorney fees) arising from any use of the Interfacing Software or from Plex\u2019s distribution of the Interfacing Software.</li> <li>Brand Features and Attribution <ol> <li>"Brand Features" is defined as the trade names, trademarks, service marks, logos, domain names, and other distinctive brand features of a party. Except where expressly stated, these terms do not grant either party any right, title, or interest in or to the other party\'s Brand Features. Any use by you of Plex\u2019s Brand Features (including any goodwill associated therewith) will inure to the benefit of Plex. Plex Brand Features include the Plex Play Logo (\u201c>\u201d in stylized format) and the trademarks, trade names and designs as may be identified from time to time in the Plex Trademark Notice that is posted at <a href="https://plex.tv/legal" target="_blank">www.plex.tv/legal</a>.</li> <li>You must seek prior written approval from Plex to display Plex\'s Brand Features, including for the purpose of promoting or advertising that your Interfacing Software is for use in conjunction with Plex Services. Plex, in its sole discretion and in a separate writing such as an e-mail from an authorized representative of Plex, may grant you a revocable, non-transferable, nonexclusive license, without right of sub-license, to display Plex\'s Brand Features for the purpose of promoting or advertising that your Interfacing Software is for use in conjunction with Plex Services. You understand and agree that Plex has the sole discretion to determine whether your attribution(s) and use of Plex\'s Brand Features are in accordance with the above requirements and guidelines and that Plex may revoke the license granted herein at any time, or may require you to modify your use of Plex\u2019s Brand Features, for any reason in its sole discretion.</li> <li>You will not make any statement that suggests a partnership with, sponsorship by, or endorsement by Plex, without Plex\'s express prior written approval.</li> <li>In the course of promoting, marketing, or demonstrating the Services, Plex may produce and distribute incidental depictions, including screenshots, video, or other content from your Interfacing Software, and may use your company or product name. You grant us all necessary rights for the above purposes.</li> </ol> </li> </ol> </li> </ol> <h4>Children</h4> <p> While Plex does distribute products that may be used by children, the Services are not intended to be used by children, without involvement, supervision, and approval of a parent or legal guardian. Therefore, if an account owner sets parental controls or establishes sub-accounts that the account owner intends to permit a child to use, the account owner should not reveal the account password to the child. Plex and its contributors may not provide controls that restrict the maturity level of content available via Plex and an adult account owner has sole responsibility for determining what maturity level is appropriate for or accessible to any children whom the account owner permits to use the Plex service or a sub-account. </p> <h4>NO WARRANTY</h4> <ol> <li>PLEX SERVICES ARE PROVIDED "AS IS". PLEX MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND PLEX EXPRESSLY DISCLAIMS ALL WARRANTIES WITH RESPECT TO THE PLEX SERVICES, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. FURTHER, PLEX DOES NOT WARRANT AGAINST ERRORS, OMISSIONS, RESULTS OF USE, OR THAT PLEX SERVICES ARE BUG FREE OR ERROR FREE OR THAT USE WILL BE UNINTERRUPTED. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THE AGREEMENT. ALL THE FOREGOING DISCLAIMERS ALSO APPLY IN FULL WITH RESPECT TO PLEX\'S LICENSORS, SUPPLIERS, DISTRIBUTORS, CONTRACTORS, AGENTS, AND THIRD PARTY CONTRIBUTORS. SOME STATES DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.</li> <li>You agree that Plex and its officers, directors, employees, and contractors are not responsible for any fault, inaccuracy, error, omission, delay or any other failure of your equipment and/or services caused by Plex\'s hardware, software, cabling, network services, or the like, or arising from Plex\'s use of such equipment and/or services.</li> <li>The above disclaimer of warranty applies to software developed by Plex and any software developed by a third party and provided by Plex including, but not limited to, Interfacing Software developed by any Plex user.</li> </ol> <h4>Limitation of Liability and Damages</h4> <ol> <li>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, INCLUDING, BUT NOT LIMITED TO, TORT, CONTRACT, NEGLIGENCE, STRICT LIABILITY, OR OTHERWISE, SHALL PLEX BE LIABLE TO YOU OR ANY OTHER PERSON OR ENTITY: (I) FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, ACCURACY OF RESULTS, COMPUTER FAILURE OR MALFUNCTION, LOSS OF DATA, OR OTHER DAMAGES RESULTING FROM YOUR USE OF THE SOFTWARE; OR (II) FOR ANY MATTER BEYOND ITS REASONABLE CONTROL. PLEX\'S AGGREGATE LIABILITY FOR DAMAGES OF ANY KIND WHATSOEVER ARISING OUT OF THIS AGREEMENT SHALL BE LIMITED TO THE LESSER OF THE TOTAL FEES PAID BY YOU TO PLEX (IF ANY) FOR THE PORTION OF THE SOFTWARE THAT GAVE RISE TO SUCH DAMAGES OR $100 (U.S.), EXCEPT WHERE NOT PERMITTED BY APPLICABLE LAW, IN WHICH CASE PLEX\'S LIABILITY SHALL BE LIMITED TO THE MINIMUM AMOUNT PERMITTED BY SUCH APPLICABLE LAW. ALL THE FOREGOING LIMITATIONS SHALL APPLY EVEN IF EITHER PARTY HAS BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. ALL THE FOREGOING LIMITATIONS ALSO APPLY WITH RESPECT TO PLEX\'S SUPPLIERS, LICENSORS, DISTRIBUTORS, CONTRACTORS, AGENTS, AND THIRD PARTY CONTRIBUTORS. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION AND EXCLUSION MAY NOT APPLY TO YOU.</li> <li>The above limitations and exclusions apply to software developed by Plex and any software developed by a third party and provided by Plex including, but not limited to, Interfacing Software developed by Plex user.</li> </ol> <h4>Third-Party Materials</h4> <p> This website and other Services may provide links to websites, software, or other materials provided by third parties. Plex does not endorse and is not responsible or liable for the availability, accuracy, safety, or intellectual property rights of or relating to such content. Plex is not liable for any harm caused by any such materials. </p> <h4>Malware</h4> <p> "Malware" means any known, discovered, envisioned, or invented, or any yet to be known, discovered, envisioned, or invented: (i) virus, Trojan horse, or any other harmful, harassing, or malicious software; or (ii) method, use, or means by which any software, firmware, equipment, device, communications medium, person, entity, or the like directly or indirectly engages in or is used for: (a) any unauthorized access; (b) any unauthorized communication; or (c) any cracks, hacks, exploits, or other activity, method, use, or means, that may cause harassment, harm, data loss, data theft, loss of communication, loss of privacy, or the like. You acknowledge that the Internet, Internet service providers, shared or dedicated telecommunication lines, wireless access points and wireless networks, other forms of communication, online resources including websites and cloud computing environments, or other means that you use to connect to the Software may not be secure and may be vulnerable to attack by third parties, and that it is possible to receive Malware by using the Internet, dedicated lines, other forms of communication, or other means. In order to protect the Software, you shall regularly obtain, use, and update appropriate third party software or other means to protect yourself from Malware and to detect and remove Malware that may be downloaded using the Internet, dedicated lines, other forms of communication, or other means. Plex does not warrant that the Software will be free of Malware including, but not limited to, Malware that is introduced by third parties, the Internet, dedicated lines, other forms of communication, or other means. </p> <h4>Waiver and Indemnity</h4> <p> You agree that Plex and its licensors, distributors, contractors, agents, and third party contributors shall have no liability whatsoever for any use you make of the Services. You shall indemnify and hold harmless Plex and its licensors, suppliers, distributors, contractors, agents, and third party contributors from any claims, damages, liabilities, costs and fees (including reasonable attorney fees) arising from your use of the Plex Services as well as from your failure to comply with any of the Terms, or any losses, damages, claims, costs, and/or attorneys\' fees arising from any use of or reliance upon any information received in connection with the Services that comprises or is based upon data provided by Plex or any third party. </p> <h4>Termination of Services</h4> <p> Plex may at any time, with or without cause and with or without prior notice, immediately terminate or suspend your Plex account or otherwise terminate or suspend your access to all or a portion of the Services. Cause for such termination may include: (a) violations of the Terms or any other policies or guidelines that are referenced herein; (b) a request by you to cancel or terminate your account; (c) a request and/or order from law enforcement, a judicial body, or other government agency; (d) where providing the Services to you is or may become unlawful; (e) unexpected technical or security issues or problems; or (f) your participation in fraudulent or illegal activities. Any such termination or suspension shall be made by Plex in its sole discretion and Plex will not be responsible to you or any third party for any damages that may result or arise out of such termination or suspension of your access to the Services. </p> <h4>Miscellaneous</h4> <ol> <li>This Agreement does not give you any rights not expressly and unambiguously granted herein.</li> <li>No agency, partnership, joint venture, or employment is created as a result of this Agreement and you do not have any authority of any kind to bind Plex in any respect whatsoever.</li> <li>If any provision of this Agreement is found to be unenforceable or invalid, that provision shall be limited or eliminated to the minimum extent necessary so that this Agreement shall otherwise remain in full force and effect and enforceable.</li> <li>This Agreement is not assignable, transferable, or sublicensable by you except with Plex\'s prior written consent. Plex may transfer, assign, or delegate this Agreement and its rights and obligations without consent.</li> <li>Plex\'s failure to enforce any right or provisions in this Agreement will not constitute a waiver of such or any other provision.</li> <li>This Agreement shall be governed by and construed in accordance with the laws of the state of California, as if made within California between two residents thereof, and the parties submit to the exclusive jurisdiction of the Superior Court of Santa Clara County and the United States District Court for the Northern District of California. Notwithstanding the foregoing sentence, but without limiting Plex\'s right to seek injunctive or other equitable relief in any court of competent jurisdiction, any disputes arising with respect to this Agreement shall be referred to an arbitrator affiliated with the Judicial Arbitration and Mediation Services, Inc. ("JAMS"). The arbitrator shall be selected by joint agreement of the parties. In the event the parties cannot agree on an arbitrator within thirty (30) days of the initiating party providing the other party with written notice that it plans to seek arbitration, the parties shall each select an arbitrator affiliated with JAMS, which arbitrators shall jointly select a third such arbitrator to resolve the dispute. The written decision of the arbitrator shall be final and binding on the parties. The arbitration proceeding shall be carried on and heard in Santa Clara County, California using the English language and pursuant to the rules of (and administered by) JAMS. In any action or proceeding to enforce rights under this Agreement, the prevailing party will be entitled to recover costs and reasonable attorneys\' fees from the other party. A separate written license agreement or order and signed by Plex and you or your company, employer, or principal may state other terms and conditions that apply to you, including terms relating to price, payment, delivery, confidential information, support services, and the like. You are solely responsible to review such terms or conditions with your company, employer or principal. In the event of any conflict in terms, the terms of the separate license agreement shall supersede the terms of this Agreement.</li> <li>Both parties agree that this Agreement is the complete and exclusive statement of the mutual understanding of the parties and supersedes and cancels all previous written and oral agreements, communications, and other understandings relating to the subject matter of this Agreement.</li> </ol> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,i="";return i+=" "+g((n=e&&e.title,typeof n===v?n.apply(e):n))+" "}function o(e,t){var i,r="";return r+=" ",i=n(12).call(e,e&&e.type,"home",{hash:{},inverse:y.program(6,u,t),fn:y.program(4,l,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function l(e,t){var i="";return i+=" "+g(n(1).call(e,"Add User",{hash:{},data:t}))+" "}function u(e,t){var i="";return i+=" "+g(n(1).call(e,"Invite Friend",{hash:{},
data:t}))+" "}function c(e,t){var i="";return i+=" "+g(n(1).call(e,"Save Changes",{hash:{},data:t}))+" "}function d(e,t){var i,r="";return r+=" ",i=n(12).call(e,e&&e.type,"home",{hash:{},inverse:y.program(13,p,t),fn:y.program(11,h,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function h(e,t){var i="";return i+=" "+g(n(1).call(e,"Add",{hash:{},data:t}))+" "}function p(e,t){var i="";return i+=" "+g(n(1).call(e,"Invite",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};
var f,m="",v="function",g=this.escapeExpression,y=this;return m+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <div class="modal-poster media-poster img-circle placeholder-friend"></div> <h4 class="modal-title"> ',f=i.if.call(t,t&&t.title,{hash:{},inverse:y.program(3,o,a),fn:y.program(1,s,a),data:a}),(f||0===f)&&(m+=f),m+=' </h4> </div> <form id="share-server-form"> <div class="modal-body modal-body-scroll modal-body-with-panes"> <div class="modal-nav-pane dark-scrollbar"></div> <div class="modal-body-pane dark-scrollbar"></div> </div> <div class="modal-footer"> <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+g(n(1).call(t,"Cancel",{
hash:{},data:a}))+'</button> <button type="submit" class="next-btn btn btn-lg btn-primary disabled">'+g(n(1).call(t,"Next",{hash:{},data:a}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading hidden"> <div class="loading loading-sm"></div> <span class="btn-label"> ',f=i.if.call(t,t&&t.title,{hash:{},inverse:y.program(10,d,a),fn:y.program(8,c,a),data:a}),(f||0===f)&&(m+=f),m+=" </span> </button> </div> </form> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var i,r="";return r+=' <div class="restricted-name-group form-group"> <input type="text" id="restricted-title" name="title" class="form-control" placeholder="'+S(n(1).call(e,"Name",{hash:{},data:t}))+'" value="'+S((i=e&&e.homeUser,i=null==i||i===!1?i:i.title,typeof i===P?i.apply(e):i))+'"> </div> '}function o(e,t){var n,r="";return r+=' <h3 class="friend-title"> ',n=i.if.call(e,(n=e&&e.friend,null==n||n===!1?n:n.title),{hash:{},inverse:x.program(6,u,t),fn:x.program(4,l,t),data:t}),
(n||0===n)&&(r+=n),r+=' </h3> <p class="text-muted"> ',n=i.if.call(e,(n=e&&e.friend,null==n||n===!1?n:n.email),{hash:{},inverse:x.program(10,d,t),fn:x.program(8,c,t),data:t}),(n||0===n)&&(r+=n),r+=" </p> "}function l(e,t){var n,i="";return i+=" "+S((n=e&&e.friend,n=null==n||n===!1?n:n.title,typeof n===P?n.apply(e):n))+" "}function u(e,t){var n,i="";return i+=" "+S((n=e&&e.friend,n=null==n||n===!1?n:n.username,typeof n===P?n.apply(e):n))+" "}function c(e,t){var n,i="";return i+=" "+S((n=e&&e.friend,
n=null==n||n===!1?n:n.email,typeof n===P?n.apply(e):n))+" "}function d(e,t){var i="";return i+=" "+S(n(1).call(e,"An invite will be sent to this user.",{hash:{},data:t}))+" "}function h(e,t){var n,r="";return r+=' <div class="edit-friend-footer"> ',n=i.if.call(e,(n=e&&e.homeUser,null==n||n===!1?n:n.restricted),{hash:{},inverse:x.program(18,v,t),fn:x.program(13,p,t),data:t}),(n||0===n)&&(r+=n),r+=" </div> "}function p(e,t){var n,r="";return r+=" ",n=i.if.call(e,(n=e&&e.homeUser,null==n||n===!1?n:n.guest),{
hash:{},inverse:x.program(16,m,t),fn:x.program(14,f,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function f(e,t){var i="";return i+=' <button type="button" class="disable-guest-btn btn btn-sm btn-danger">'+S(n(1).call(e,"Disable guest",{hash:{},data:t}))+"</button> "}function m(e,t){var i="";return i+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+S(n(1).call(e,"Delete user",{hash:{},data:t}))+"</button> "}function v(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.canRemoveFriend,{
hash:{},inverse:x.noop,fn:x.program(19,g,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.if.call(e,e&&e.canRemoveHomeUser,{hash:{},inverse:x.noop,fn:x.program(21,y,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function g(e,t){var i="";return i+=' <button type="button" class="remove-friend-btn btn btn-sm btn-danger">'+S(n(1).call(e,"Remove this friend",{hash:{},data:t}))+"</button> "}function y(e,t){var i="";return i+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+S(n(1).call(e,"Remove from home",{
hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var b,w="",S=this.escapeExpression,P="function",x=this;return w+='<div class="edit-friend-header"> <div class="media-poster img-circle placeholder-friend"></div> ',b=i.if.call(t,(b=t&&t.homeUser,null==b||b===!1?b:b.restricted),{hash:{},inverse:x.program(3,o,a),fn:x.program(1,s,a),data:a}),(b||0===b)&&(w+=b),w+=" </div> ",b=i.if.call(t,t&&t.showActions,{hash:{},inverse:x.noop,fn:x.program(12,h,a),data:a
}),(b||0===b)&&(w+=b),w+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<li> <a class="btn-gray change-pane-btn disabled" data-pane="general" data-pane-id="general" href="#"> <i class="modal-nav-icon glyphicon user"></i> '+o(n(1).call(t,"General",{hash:{},data:a}))+' </a> </li> <li class="owned-list-header modal-nav-list-header">'+o(n(1).call(t,"My Servers",{
hash:{},data:a}))+'</li> <li class="owned-servers-container"></li> <li> <a class="btn-gray change-pane-btn disabled" data-pane="restrictions" data-pane-id="restrictions" href="#"> <i class="modal-nav-icon glyphicon ban"></i> '+o(n(1).call(t,"Restrictions",{hash:{},data:a}))+' </a> </li> <li class="shared-list-header modal-nav-list-header">'+o(n(1).call(t,"Shared With Me",{hash:{},data:a}))+'</li> <li class="shared-servers-container"></li> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<span class="modal-nav-icon friend-server-status ',(s=n.status)?a=s.call(t,{hash:{},data:r}):(s=t&&t.status,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'"> <i class="friend-server-status-icon unknown glyphicon circle-question-mark"></i> <i class="friend-server-status-icon available glyphicon circle-ok"></i> <i class="friend-server-status-icon unavailable glyphicon circle-exclamation-mark"></i> </span> '+u((a=t&&t.server,
a=null==a||a===!1?a:a.name,typeof a===l?a.apply(t):a))+" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="server-header"> <i class="plex-image server server-xs"></i> <h3 class="server-title"></h3> <a class="server-status-btn unknown" href="#"> <span class="server-status-label available">'+o(n(1).call(t,"Available",{hash:{},data:a}))+'</span> <span class="server-status-label unavailable">'+o(n(1).call(t,"Unavailable",{
hash:{},data:a}))+'</span> <span class="server-status-label unauthorized">'+o(n(1).call(t,"Unauthorized",{hash:{},data:a}))+'</span> <span class="server-status-label unknown">'+o(n(1).call(t,"Unknown",{hash:{},data:a}))+'</span> <i class="server-details-open-icon glyphicon chevron-down"></i> <i class="server-details-close-icon glyphicon chevron-up"></i> </a> </div> <div class="server-details transition-out"> <h4>'+o(n(1).call(t,"Info",{hash:{},data:a}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(1).call(t,"Version",{
hash:{},data:a}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row server-detail-last-seen-row hidden"> <div class="server-detail-label">'+o(n(1).call(t,"Last Seen",{hash:{},data:a}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(1).call(t,"Address",{hash:{},data:a}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(1).call(t,"Port",{
hash:{},data:a}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+o(n(1).call(t,"Share",{hash:{},data:a}))+"</h4> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',
r=i.if.call(e,(r=e&&e.user,null==r||r===!1?r:r.allowChannels),{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="> "+h(n(1).call(e,"Allow Channels",{hash:{},data:t}))+' </label> </div> </div> </div> <div class="row"> <h4 class="text-muted plex-pass-restrictions-header"> <span class="plex-pass-restrictions-title">'+h(n(1).call(e,"Plex Pass restrictions",{hash:{},data:t}))+'</span> <a href="'+h((r=e&&e.plexPassUrl,typeof r===p?r.apply(e):r))+'" target="_blank">'+h(n(1).call(e,"Learn More",{
hash:{},data:t}))+'</a> </h4> <p class="text-center"> </p> </div> '}function o(e,t){return"checked"}function l(e,t){var r,a="";return a+=' <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',r=i.if.call(e,(r=e&&e.user,null==r||r===!1?r:r.allowChannels),{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="> "+h(n(1).call(e,"Allow Channels",{hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this,h=this.escapeExpression,p="function";return u=i.unless.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+=' <div class="plex-pass-restrictions"> <div class="overlay"></div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <div class="checkbox"> <label for="allow-sync-cb"> <input type="checkbox" id="allow-sync-cb" name="allowSync" ',u=i.if.call(t,(u=t&&t.user,null==u||u===!1?u:u.allowSync),{
hash:{},inverse:d.noop,fn:d.program(2,o,a),data:a}),(u||0===u)&&(c+=u),c+="> "+h(n(1).call(t,"Allow Sync",{hash:{},data:a}))+' </label> </div> <div class="checkbox"> <label for="allow-camera-upload-images-cb"> <input type="checkbox" id="allow-camera-upload-images-cb" name="allowCameraUpload" ',u=i.if.call(t,(u=t&&t.user,null==u||u===!1?u:u.allowCameraUpload),{hash:{},inverse:d.noop,fn:d.program(2,o,a),data:a}),(u||0===u)&&(c+=u),c+="> "+h(n(1).call(t,"Allow Camera Upload",{hash:{},data:a}))+' </label> <p class="help-block">'+h(n(1).call(t,"Enabling this option will allow this user to upload media to your server.",{
hash:{},data:a}))+"</p> </div> ",u=i.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:d.noop,fn:d.program(4,l,a),data:a}),(u||0===u)&&(c+=u),c+=' </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+h((u=t&&t.moviesIcon,typeof u===p?u.apply(t):u))+'"></i> '+h(n(1).call(t,"Movies",{hash:{},data:a}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+h(n(1).call(t,"Only allow movies matching the ratings or labels below.",{
hash:{},data:a}))+' </div> </div> <div class="form-group"> <label for="filter-movie-contentRating" class="col-sm-3 control-label"> '+h(n(1).call(t,"Ratings",{hash:{},data:a}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-movie-contentRating" class="form-control tag-input-hidden" name="filterMovies" data-filter="contentRating" data-section-type="movie" placeholder="'+h(n(1).call(t,"Allow all ratings",{hash:{},data:a}))+'" value="'+h((u=t&&t.user,u=null==u||u===!1?u:u.filterMovies,
u=null==u||u===!1?u:u.contentRating,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label for="filter-movie-label" class="col-sm-3 control-label"> '+h(n(1).call(t,"Labels",{hash:{},data:a}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-movie-label" class="form-control tag-input-hidden" name="filterMovies" data-filter="label" data-section-type="movie" placeholder="'+h(n(1).call(t,"Allow all labels",{hash:{},data:a}))+'" value="'+h((u=t&&t.user,u=null==u||u===!1?u:u.filterMovies,
u=null==u||u===!1?u:u.label,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+h((u=t&&t.showsIcon,typeof u===p?u.apply(t):u))+'"></i> '+h(n(1).call(t,"TV Shows",{hash:{},data:a}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+h(n(1).call(t,"Only allow TV shows matching the ratings or labels below.",{hash:{},data:a}))+' </div> </div> <div class="form-group"> <label for="filter-show-contentRating" class="col-sm-3 control-label"> '+h(n(1).call(t,"Ratings",{
hash:{},data:a}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-show-contentRating" class="form-control tag-input-hidden" name="filterTelevision" data-filter="contentRating" data-section-type="show" placeholder="'+h(n(1).call(t,"Allow all ratings",{hash:{},data:a}))+'" value="'+h((u=t&&t.user,u=null==u||u===!1?u:u.filterTelevision,u=null==u||u===!1?u:u.contentRating,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label for="filter-show-label" class="col-sm-3 control-label"> '+h(n(1).call(t,"Labels",{
hash:{},data:a}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-show-label" class="form-control tag-input-hidden" name="filterTelevision" data-filter="label" data-section-type="show" placeholder="'+h(n(1).call(t,"Allow all labels",{hash:{},data:a}))+'" value="'+h((u=t&&t.user,u=null==u||u===!1?u:u.filterTelevision,u=null==u||u===!1?u:u.label,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+h((u=t&&t.musicIcon,
typeof u===p?u.apply(t):u))+'"></i> '+h(n(1).call(t,"Albums",{hash:{},data:a}))+' </label> </div> <div class="form-group"> <label for="filter-artist-label" class="col-sm-3 control-label"> '+h(n(1).call(t,"Labels",{hash:{},data:a}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-artist-label" class="form-control tag-input-hidden" name="filterMusic" data-filter="label" data-section-type="artist" placeholder="'+h(n(1).call(t,"Allow all labels",{hash:{},data:a}))+'" value="'+h((u=t&&t.user,
u=null==u||u===!1?u:u.filterMusic,u=null==u||u===!1?u:u.label,typeof u===p?u.apply(t):u))+'"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+h((u=t&&t.photosIcon,typeof u===p?u.apply(t):u))+'"></i> '+h(n(1).call(t,"Photos",{hash:{},data:a}))+' </label> </div> <div class="form-group"> <label for="filter-photo-label" class="col-sm-3 control-label"> '+h(n(1).call(t,"Labels",{hash:{},data:a}))+' </label> <div class="col-sm-9"> <input type="text" id="filter-photo-label" class="form-control tag-input-hidden" name="filterPhotos" data-filter="label" data-section-type="photo" placeholder="'+h(n(1).call(t,"Allow all labels",{
hash:{},data:a}))+'" value="'+h((u=t&&t.user,u=null==u||u===!1?u:u.filterPhotos,u=null==u||u===!1?u:u.label,typeof u===p?u.apply(t):u))+'"> </div> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var s,o,l="",u="function",c=this.escapeExpression,d=this;return l+='<div class="checkbox"> <label for="share-section-'+c((s=t&&t.section,s=null==s||s===!1?s:s.id,
typeof s===u?s.apply(t):s))+'-cb"> <input type="checkbox" id="share-section-'+c((s=t&&t.section,s=null==s||s===!1?s:s.id,typeof s===u?s.apply(t):s))+'-cb" value="'+c((s=t&&t.section,s=null==s||s===!1?s:s.id,typeof s===u?s.apply(t):s))+'" ',s=n.if.call(t,t&&t.isChecked,{hash:{},inverse:d.noop,fn:d.program(1,a,r),data:r}),(s||0===s)&&(l+=s),l+='> <i class="section-type-icon glyphicon ',(o=n.typeIcon)?s=o.call(t,{hash:{},data:r}):(o=t&&t.typeIcon,s=typeof o===u?o.call(t,{hash:{},data:r}):o),l+=c(s)+'"></i> '+c((s=t&&t.section,
s=null==s||s===!1?s:s.title,typeof s===u?s.apply(t):s))+" </label> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"show-libraries"}function o(e,t){var r,a="";return a+=' <li class="share-section-list-item"> <div class="checkbox"> <label for="share-all-libraries-'+g((r=e&&e.server,r=null==r||r===!1?r:r.machineIdentifier,typeof r===v?r.apply(e):r))+'-cb"> <input type="checkbox" id="share-all-libraries-'+g((r=e&&e.server,r=null==r||r===!1?r:r.machineIdentifier,
typeof r===v?r.apply(e):r))+'-cb" name="share-all-libraries-cb" value="all" ',r=i.if.call(e,e&&e.allLibraries,{hash:{},inverse:y.noop,fn:y.program(4,l,t),data:t}),(r||0===r)&&(a+=r),a+="> "+g(n(1).call(e,"All Libraries",{hash:{},data:t}))+" </label> </div> </li> "}function l(e,t){return"checked"}function u(e,t){var i="";return i+=' <p class="text-muted">'+g(n(1).call(e,"Loading...",{hash:{},data:t}))+"</p> "}function c(e,t){var n;return n=i.if.call(e,e&&e.hasFailed,{hash:{},inverse:y.program(11,h,t),
fn:y.program(9,d,t),data:t}),n||0===n?n:""}function d(e,t){var i,r="";return r+=' <p class="text-muted">'+g(n(1).call(e,"We were unable to retrieve libraries for {1}. Please ensure the server is signed in to your Plex account.",(i=e&&e.server,null==i||i===!1?i:i.name),{hash:{},data:t}))+"</p> "}function h(e,t){var n;return n=i.unless.call(e,e&&e.hasSections,{hash:{},inverse:y.noop,fn:y.program(12,p,t),data:t}),n||0===n?n:""}function p(e,t){var i="";return i+=' <p class="text-muted">'+g(n(1).call(e,"No libraries",{
hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var f,m="",v="function",g=this.escapeExpression,y=this;return m+='<ul id="'+g((f=t&&t.server,f=null==f||f===!1?f:f.machineIdentifier,typeof f===v?f.apply(t):f))+'-section-list" class="list share-section-list ',f=i.unless.call(t,t&&t.allLibraries,{hash:{},inverse:y.noop,fn:y.program(1,s,a),data:a}),(f||0===f)&&(m+=f),m+='"> ',f=i.if.call(t,t&&t.hasSections,{hash:{},inverse:y.noop,fn:y.program(3,o,a),data:a
}),(f||0===f)&&(m+=f),m+=" </ul> ",f=i.if.call(t,t&&t.isPending,{hash:{},inverse:y.program(8,c,a),fn:y.program(6,u,a),data:a}),(f||0===f)&&(m+=f),m+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="server-header"> <i class="plex-image server server-xs"></i> <h3 class="server-title"></h3> <a class="server-status-btn unknown" href="#"> <span class="server-status-label available">'+o(n(1).call(t,"Available",{
hash:{},data:a}))+'</span> <span class="server-status-label unavailable">'+o(n(1).call(t,"Unavailable",{hash:{},data:a}))+'</span> <span class="server-status-label unauthorized">'+o(n(1).call(t,"Unauthorized",{hash:{},data:a}))+'</span> <span class="server-status-label unknown">'+o(n(1).call(t,"Unknown",{hash:{},data:a}))+'</span> <i class="server-details-open-icon glyphicon chevron-down"></i> <i class="server-details-close-icon glyphicon chevron-up"></i> </a> </div> <div class="server-details transition-out"> <h4>'+o(n(1).call(t,"Info",{
hash:{},data:a}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(1).call(t,"Version",{hash:{},data:a}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(1).call(t,"Last Seen",{hash:{},data:a}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(1).call(t,"Address",{hash:{},
data:a}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(1).call(t,"Port",{hash:{},data:a}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+o(n(1).call(t,"Sharing",{hash:{},data:a}))+'</h4> <div class="share-server-container"> <div class="server-restriction-allow-sync share-section-list-item no-checkbox"> <i class="section-type-icon glyphicon ok-2"></i> '+o(n(1).call(t,"Sync Allowed",{
hash:{},data:a}))+' </div> <ul class="list share-section-list show-libraries"></ul> </div> </div> <div class="share-details-footer"> <button type="button" class="leave-server-btn btn btn-sm btn-danger">'+o(n(1).call(t,"Leave Server",{hash:{},data:a}))+"</button> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<li class="share-section-list-item no-checkbox"> <i class="section-type-icon glyphicon ',
(s=n.typeIcon)?a=s.call(t,{hash:{},data:r}):(s=t&&t.typeIcon,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'"></i> '+u((a=t&&t.section,a=null==a||a===!1?a:a.title,typeof a===l?a.apply(t):a))+" </li> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <div class="existing-user-group username-group"> <div class="media-poster img-circle placeholder-square"></div> <div class="username-group-input-container"> <i class="validation-success-icon glyphicon circle-ok"></i> <i class="validation-error-icon glyphicon circle-exclamation-mark"></i> <input type="text" class="form-control hidden" name="username" placeholder="'+c(n(1).call(e,"Username or email",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-existing-user-btn btn btn-primary">'+c(n(1).call(e,"Add an Existing Plex User",{hash:{},data:t}))+'</button> <p class="help-block">'+c(n(1).call(e,"Adding a Plex user to your home will allow you to quickly switch accounts. The invited user will be asked to confirm home membership.",{hash:{},data:t}))+'</p> </div> </div> <div class="restricted-user-group username-group"> <div class="media-poster img-circle placeholder-friend"></div> <div class="username-group-input-container"> <input type="text" class="form-control hidden" name="title" placeholder="'+c(n(1).call(e,"Name",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-restricted-user-btn btn btn-primary">'+c(n(1).call(e,"Create a Managed User",{hash:{},data:t}))+'</button> <p class="help-block">'+c(n(1).call(e,"Managed users are only available when signed in with an account in your home. You can choose any name you like and you'll be able to set restrictions on accessible media.",{hash:{},data:t}))+"</p> </div> </div> "}function o(e,t){var i="";return i+=' <div class="friend-group username-group"> <div class="media-poster img-circle placeholder-friend"></div> <div class="username-group-input-container"> <i class="validation-success-icon glyphicon circle-ok"></i> <i class="validation-error-icon glyphicon circle-exclamation-mark"></i> <input type="text" class="form-control" name="username" placeholder="'+c(n(1).call(e,"Username or email",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <p class="help-block">'+c(n(1).call(e,"The invited user will be asked to confirm friendship. If libraries are shared with the user, you'll be able to set restrictions on accessible media.",{hash:{},data:t}))+"</p> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return l=n(12).call(t,t&&t.type,"home",{hash:{},inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),
(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+o(n(1).call(t,"Welcome to Plex Home",{
hash:{},data:a}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <p>'+o(n(1).call(t,"{1}, so we've made a few changes to help keep your media safe.",t&&t.intro,{hash:{},data:a}))+"</p> <ol> <li>"+o(n(1).call(t,"We've increased the security requirements on this server, so anything communicating with it will need to be signed in to a Plex account.",{hash:{},data:a}))+"</li> <li>"+o(n(1).call(t,"We've disabled DLNA to prevent any DLNA-enabled device from browsing and playing media without a password or PIN. You can change this preference in your {1}server settings{2}.",'<a class="server-settings-btn" href="#">',"</a>",{
hash:{},data:a}))+"</li> </ol> <p>"+o(n(1).call(t,"For more information on Plex Home security settings, please see the {1}Plex Home section{2} on our support site.",'<a href="https://support.plex.tv/hc/en-us/sections/200641063" target="_blank">',"</a>",{hash:{},data:a}))+'</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-lg btn-primary" data-dismiss="modal">'+o(n(1).call(t,"OK",{hash:{},data:a}))+"</button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="modal-dialog"> <div class="modal-alert"></div> <div class="modal-content"></div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<span class="message">',(s=n.message)?a=s.call(t,{hash:{},data:r}):(s=t&&t.message,a=typeof s===l?s.call(t,{hash:{},
data:r}):s),o+=u(a)+"</span> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return' <a class="back-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> '}function o(e,t){var i="";return i+=' <i class="modal-icon glyphicon pencil"></i> '+y(n(1).call(e,"Edit PIN",{hash:{},data:t}))+" "}function l(e,t){var n;return n=i.if.call(e,e&&e.isEditConfirmation,{hash:{},inverse:b.program(8,c,t),fn:b.program(6,u,t),data:t}),n||0===n?n:""}function u(e,t){
var i="";return i+=" "+y(n(1).call(e,"Confirm Current PIN",{hash:{},data:t}))+" "}function c(e,t){var i="";return i+=" "+y(n(1).call(e,"Enter PIN",{hash:{},data:t}))+" "}function d(e,t){var i="";return i+=' <p class="help-block"> '+y(n(1).call(e,"You do not currently have a PIN. This will allow any users in this home to switch to your account.",{hash:{},data:t}))+" </p> "}function h(e,t){var r,a="";return a+=' <div class="modal-footer"> ',r=i.if.call(e,e&&e.hasCurrentPIN,{hash:{},inverse:b.noop,fn:b.program(13,p,t),
data:t}),(r||0===r)&&(a+=r),a+=" ",r=i.if.call(e,e&&e.isEditWarning,{hash:{},inverse:b.program(17,m,t),fn:b.program(15,f,t),data:t}),(r||0===r)&&(a+=r),a+=' <button type="submit" class="save-btn btn-link">'+y(n(1).call(e,"Save",{hash:{},data:t}))+"</button> </div> "}function p(e,t){var i="";return i+=' <button type="button" class="remove-btn btn-gray pull-left">'+y(n(1).call(e,"Remove",{hash:{},data:t}))+"</button> "}function f(e,t){var i="";return i+=' <button type="button" class="skip-btn btn-gray" data-dismiss="modal">'+y(n(1).call(e,"Skip",{
hash:{},data:t}))+"</button> "}function m(e,t){var i="";return i+=' <button type="button" class="cancel-btn btn-gray" data-dismiss="modal">'+y(n(1).call(e,"Cancel",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var v,g="",y=this.escapeExpression,b=this;return g+='<div class="modal-header"> <div class="home-user-dropdown-container pull-right"></div> <h4 class="modal-title"> ',v=i.if.call(t,t&&t.showBackButton,{hash:{},inverse:b.noop,fn:b.program(1,s,a),
data:a}),(v||0===v)&&(g+=v),g+=" ",v=i.if.call(t,t&&t.isEditing,{hash:{},inverse:b.program(5,l,a),fn:b.program(3,o,a),data:a}),(v||0===v)&&(g+=v),g+=' <span class="loading loading-sm hidden"></span> </h4> </div> <form id="pin-form"> <div class="modal-body"> <ul class="tile-list user-select-list disabled"></ul> <input type="number" pattern="[0-9]*" class="pin-input"> <div class="pin-digit-container" aria-hidden="true"> <div class="pin-digit"></div> <div class="pin-digit"></div> <div class="pin-digit"></div> <div class="pin-digit"></div> </div> ',
v=i.if.call(t,t&&t.isEditWarning,{hash:{},inverse:b.noop,fn:b.program(10,d,a),data:a}),(v||0===v)&&(g+=v),g+=" </div> ",v=i.if.call(t,t&&t.isEditing,{hash:{},inverse:b.noop,fn:b.program(12,h,a),data:a}),(v||0===v)&&(g+=v),g+=" </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return' <div class="user-select-container"> '}function s(e,t){return' <a class="user-select-container" href="#"> '}function o(e,t){return" </div> "}function l(e,t){
return" </a> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var u,c="",d=this;return u=n.if.call(t,t&&t.disabled,{hash:{},inverse:d.program(3,s,r),fn:d.program(1,a,r),data:r}),(u||0===u)&&(c+=u),c+=' <div class="user-select-top"> <div class="user-poster img-circle"></div> <i class="protected-icon user-icon glyphicon lock"></i> <i class="admin-icon user-icon glyphicon crown"></i> </div> <div class="username"></div> ',u=n.if.call(t,t&&t.disabled,{hash:{},inverse:d.program(7,l,r),
fn:d.program(5,o,r),data:r}),(u||0===u)&&(c+=u),c+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="modal-header"> <h4 class="modal-title"> '+o(n(1).call(t,"Select User",{hash:{},data:a}))+' <span class="loading loading-sm"></span> </h4> </div> <div class="modal-body"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){return"hidden"}function o(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d=this.escapeExpression,h="function";return u+='<ul class="nav nav-bar-nav"> <li><a class="back-btn ',l=i.unless.call(t,t&&t.hasHistory,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#"><i class="glyphicon chevron-left"></i></a></li> <li><a class="home-btn" href="#"><i class="glyphicon home"></i></a></li> </ul> <div class="nav-bar-search-container"></div> <ul class="nav nav-bar-nav nav-bar-right"> <li><a class="plex-pass-btn ',
l=i.unless.call(t,t&&t.canGoPremium,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#"><span class="plex-pass-label label label-primary">'+d(n(1).call(t,"Go Premium",{hash:{},data:a}))+'</span></a></li> <li class="',l=i.if.call(t,t&&t.activityCount,{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"><a class="activity-btn ',l=i.unless.call(t,t&&t.showActivity,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#!/status" title="'+d(n(1).call(t,"Status",{
hash:{},data:a}))+'" data-toggle="tooltip"><span class="activity-badge badge badge-transparent ',l=i.unless.call(t,t&&t.activityCount,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='">'+d((l=t&&t.activityCount,typeof l===h?l.apply(t):l))+'</span><i class="glyphicon cardio"></i></a></li> <li><a class="settings-btn" href="#!/settings" title="'+d(n(1).call(t,"Settings",{hash:{},data:a}))+'" data-toggle="tooltip"><i class="glyphicon settings"></i></a></li> </ul> <div class="modal-container"></div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}function o(e,t){return"signed-in"}function l(e,t){return"full-user"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this,h="function",p=this.escapeExpression;return c+='<a class="dropdown-toggle dropdown-poster-toggle" href="#nav-dropdown" data-toggle="dropdown"> <div class="dropdown-poster-container"> <div class="media-poster img-circle"></div> <i class="caret-icon"></i> </div> <span class="total-badge badge ',
u=i.unless.call(t,t&&t.totalCount,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='">'+p((u=t&&t.totalCount,typeof u===h?u.apply(t):u))+'</span> </a> <ul class="dropdown-menu ',u=i.if.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,o,a),data:a}),(u||0===u)&&(c+=u),c+=" ",u=i.if.call(t,t&&t.isFullUser,{hash:{},inverse:d.noop,fn:d.program(5,l,a),data:a}),(u||0===u)&&(c+=u),c+='"> <li class="signed-in-item dropdown-header username-header"></li> <li class="signed-in-item full-user-item"><a href="#!/account">'+p(n(1).call(t,"Account",{
hash:{},data:a}))+'</a></li> <li class="signed-in-item"><a class="users-btn" href="#">'+p(n(1).call(t,"Users",{hash:{},data:a}))+' <span class="invites-badge badge ',u=i.unless.call(t,t&&t.invitesCount,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='">'+p((u=t&&t.invitesCount,typeof u===h?u.apply(t):u))+'</span></a></li> <li class="signed-in-item full-user-item divider"></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/queue">'+p(n(1).call(t,"Watch Later",{
hash:{},data:a}))+'</a></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/recommendations">'+p(n(1).call(t,"Recommended",{hash:{},data:a}))+'</a></li> <li class="signed-in-item divider"></li> <li class="announcements-item ',u=i.if.call(t,t&&t.isRestricted,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='"><a href="#!/announcements">'+p(n(1).call(t,"Announcements",{hash:{},data:a}))+' <span class="announcements-badge badge ',u=i.unless.call(t,t&&t.unreadAnnouncementsCount,{
hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='">'+p((u=t&&t.unreadAnnouncementsCount,typeof u===h?u.apply(t):u))+'</span></a></li> <li><a href="'+p((u=t&&t.appsUrl,typeof u===h?u.apply(t):u))+'" target="_blank">'+p(n(1).call(t,"Get Plex apps",{hash:{},data:a}))+'</a></li> <li><a href="'+p((u=t&&t.helpUrl,typeof u===h?u.apply(t):u))+'" target="_blank">'+p(n(1).call(t,"Help",{hash:{},data:a}))+'</a></li> <li class="divider"></li> <li class="signed-in-item switch-user-item ',
u=i.unless.call(t,t&&t.home,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='"><a class="switch-user-btn" href="#">'+p(n(1).call(t,"Switch User...",{hash:{},data:a}))+'</a></li> <li class="signed-out-item"><a class="sign-in-btn" href="#">'+p(n(1).call(t,"Sign In",{hash:{},data:a}))+'</a></li> <li class="signed-in-item full-user-item"><a class="sign-out-btn" href="#">'+p(n(1).call(t,"Sign Out",{hash:{},data:a}))+"</a></li> </ul> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var n,i="";return i+='data-scope-to-attr="'+c((n=e&&e.scopeToAttr,typeof n===u?n.apply(e):n))+'" data-scope-to-param="'+c((n=e&&e.scopeToParam,typeof n===u?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u="function",c=this.escapeExpression,d=this;return l+='<div class="form-group" data-attr="'+c((o=t&&t.name,typeof o===u?o.apply(t):o))+'"> <label for="text-'+c((o=t&&t.name,typeof o===u?o.apply(t):o))+'" class="control-label">'+c(n(1).call(t,t&&t.label,{
hash:{},data:a}))+'<span class="control-error"></span></label> <div class="input-group selectize-group"> <input type="text" id="text-'+c((o=t&&t.name,typeof o===u?o.apply(t):o))+'" class="form-control text-field" name="'+c((o=t&&t.name,typeof o===u?o.apply(t):o))+'" placeholder="'+c((o=t&&t.placeholder,typeof o===u?o.apply(t):o))+'" data-rating-key="'+c((o=t&&t.ratingKey,typeof o===u?o.apply(t):o))+'" data-title="'+c((o=t&&t.title,typeof o===u?o.apply(t):o))+'" ',o=i.if.call(t,t&&t.scopeToAttr,{hash:{},
inverse:d.noop,fn:d.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+="> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <h4 class="server-connect-error-header">'+p(n(1).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(1).call(e,"Plex was unable to authenticate your server. Please sign your server out and try again.",{hash:{},data:t}))+"</p> "}function o(e,t){var i,r="";return i=n(12).call(e,e&&e.mappingError,"myplexgone",{
hash:{},inverse:f.program(6,u,t),fn:f.program(4,l,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function l(e,t){var i="";return i+=' <h4 class="server-connect-error-header">'+p(n(1).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(1).call(e,"Your server was unable to reach Plex. Please ensure that the computer or device running your server can access the internet.",{hash:{},data:t}))+"</p> "}function u(e,t){var i="";return i+=' <h4 class="server-connect-error-header">'+p(n(1).call(e,"Signed in to Plex",{
hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(1).call(e,"You have successfully signed your server in to Plex, but we were unable to reach it from outside your network.",{hash:{},data:t}))+"</p> "}function c(e,t){var i="";return i+=' <p class="text-muted">'+p(n(1).call(e,"If you skip this step you will not be able to share or stream media outside your home. If you change your mind later, you can adjust this in Settings.",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),
a=a||{};var d,h="",p=this.escapeExpression,f=this;return d=n(12).call(t,t&&t.mappingError,"badauth",{hash:{},inverse:f.program(3,o,a),fn:f.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=" ",d=n(62).call(t,t&&t.context,"settings",{hash:{},inverse:f.noop,fn:f.program(8,c,a),data:a}),(d||0===d)&&(h+=d),h+=' <p class="text-muted">'+p(n(1).call(t,"If you would like to enable this now, you will need to configure your router or firewall to allow Plex to contact your server. Please refer to our {1}Connecting a Server{2} article for more information.",'<a href="http://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server" target="_blank">',"</a>",{
hash:{},data:a}))+"</p> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"locked"}function o(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="form-group"> <label for="lockable-'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'">'+d(n(1).call(t,t&&t.label,{hash:{},data:a}))+'</label> <div class="input-group"> <a href="#" data-field="'+d((l=t&&t.name,
typeof l===c?l.apply(t):l))+'" class="input-group-addon edit-lock-addon ',l=i.if.call(t,t&&t.locked,{hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" ",l=i.if.call(t,t&&t.disabled,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='" tabindex="-1"><i class="glyphicon lock"></i></a> <input type="number" id="lockable-'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'" class="form-control lockable-field" name="'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'" value="'+d((l=t&&t.value,
typeof l===c?l.apply(t):l))+'" placeholder="'+d((l=t&&t.placeholder,typeof l===c?l.apply(t):l))+'" ',l=i.if.call(t,t&&t.disabled,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+="> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return" locked"}function o(e,t){var n,i="";return i+='data-query="'+d((n=e&&e.query,typeof n===c?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};
var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="form-group"> <label for="lockable-'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'">'+d(n(1).call(t,t&&t.label,{hash:{},data:a}))+'</label> <div class="input-group selectize-group"> <a href="#" data-field="'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'" class="input-group-addon edit-lock-addon',l=i.if.call(t,t&&t.locked,{hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='"><i class="glyphicon lock"></i></a> <input type="text" id="lockable-'+d((l=t&&t.name,
typeof l===c?l.apply(t):l))+'" class="form-control lockable-field tag-input-hidden" data-name="'+d((l=t&&t.name,typeof l===c?l.apply(t):l))+'" data-attr="'+d((l=t&&t.attribute,typeof l===c?l.apply(t):l))+'" ',l=i.if.call(t,t&&t.query,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+="> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return" locked"}function o(e,t){var n,r="";return r+=' <textarea class="form-control lockable-field" id="lockable-'+m((n=e&&e.name,
typeof n===f?n.apply(e):n))+'" name="'+m((n=e&&e.name,typeof n===f?n.apply(e):n))+'"',n=i.if.call(e,e&&e.rows,{hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(n||0===n)&&(r+=n),r+=' placeholder="'+m((n=e&&e.placeholder,typeof n===f?n.apply(e):n))+'">'+m((n=e&&e.value,typeof n===f?n.apply(e):n))+"</textarea> "}function l(e,t){var n,i="";return i+=' rows="'+m((n=e&&e.rows,typeof n===f?n.apply(e):n))+'"'}function u(e,t){var n,r="";return r+=' <input type="text" id="lockable-'+m((n=e&&e.name,typeof n===f?n.apply(e):n))+'" class="form-control lockable-field" name="'+m((n=e&&e.name,
typeof n===f?n.apply(e):n))+'" value="'+m((n=e&&e.value,typeof n===f?n.apply(e):n))+'" placeholder="'+m((n=e&&e.placeholder,typeof n===f?n.apply(e):n))+'" ',n=i.if.call(e,e&&e.scopeToAttr,{hash:{},inverse:v.noop,fn:v.program(7,c,t),data:t}),(n||0===n)&&(r+=n),r+=" ",n=i.if.call(e,e&&e.ratingKey,{hash:{},inverse:v.noop,fn:v.program(9,d,t),data:t}),(n||0===n)&&(r+=n),r+="> "}function c(e,t){var n,i="";return i+='data-scope-to-attr="'+m((n=e&&e.scopeToAttr,typeof n===f?n.apply(e):n))+'" data-scope-to-param="'+m((n=e&&e.scopeToParam,
typeof n===f?n.apply(e):n))+'"'}function d(e,t){var n,i="";return i+='data-rating-key="'+m((n=e&&e.ratingKey,typeof n===f?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var h,p="",f="function",m=this.escapeExpression,v=this;return p+='<div class="form-group selectize-group" data-attr="'+m((h=t&&t.name,typeof h===f?h.apply(t):h))+'"> <label for="lockable-'+m((h=t&&t.name,typeof h===f?h.apply(t):h))+'">'+m(n(1).call(t,t&&t.label,{hash:{},data:a}))+'</label> <div class="input-group"> <a href="#" data-field="'+m((h=t&&t.name,
typeof h===f?h.apply(t):h))+'" class="input-group-addon edit-lock-addon',h=i.if.call(t,t&&t.locked,{hash:{},inverse:v.noop,fn:v.program(1,s,a),data:a}),(h||0===h)&&(p+=h),p+='" tabindex="-1"><i class="glyphicon lock"></i></a> ',h=n(12).call(t,t&&t.type,"textarea",{hash:{},inverse:v.program(6,u,a),fn:v.program(3,o,a),data:a}),(h||0===h)&&(p+=h),p+=" </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"advanced-setting"}function o(e,t){
var r,a="";return a+=' <label class="control-label" for="input_'+w((r=e&&e.id,typeof r===S?r.apply(e):r))+w((r=e&&e.idSuffix,typeof r===S?r.apply(e):r))+'"> <input type="checkbox" id="input_'+w((r=e&&e.id,typeof r===S?r.apply(e):r))+w((r=e&&e.idSuffix,typeof r===S?r.apply(e):r))+'" name="'+w((r=e&&e.id,typeof r===S?r.apply(e):r))+'" value="1" ',r=i.if.call(e,e&&e.value,{hash:{},inverse:P.noop,fn:P.program(4,l,t),data:t}),(r||0===r)&&(a+=r),a+="> "+w(n(1).call(e,e&&e.label,{hash:{},data:t}))+" </label> ",
r=i.if.call(e,e&&e.summary,{hash:{},inverse:P.noop,fn:P.program(6,u,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function l(e,t){return"checked"}function u(e,t){var i="";return i+=' <p class="help-block">'+w(n(1).call(e,e&&e.summary,{hash:{},data:t}))+"</p> "}function c(e,t){var r,a="";return a+=' <label class="control-label" for="input_'+w((r=e&&e.id,typeof r===S?r.apply(e):r))+w((r=e&&e.idSuffix,typeof r===S?r.apply(e):r))+'">'+w(n(1).call(e,e&&e.label,{hash:{},data:t}))+"</label> ",r=i.if.call(e,e&&e.enumValues,{
hash:{},inverse:P.program(13,f,t),fn:P.program(9,d,t),data:t}),(r||0===r)&&(a+=r),a+=" ",r=i.if.call(e,e&&e.summary,{hash:{},inverse:P.noop,fn:P.program(6,u,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function d(e,t){var n,r="";return r+=' <select id="input_'+w((n=e&&e.id,typeof n===S?n.apply(e):n))+w((n=e&&e.idSuffix,typeof n===S?n.apply(e):n))+'" name="'+w((n=e&&e.id,typeof n===S?n.apply(e):n))+'"> ',n=i.each.call(e,e&&e.enumValues,{hash:{},inverse:P.noop,fn:P.programWithDepth(10,h,t,e),data:t}),(n||0===n)&&(r+=n),
r+=" </select> "}function h(e,t,i){var r,a="";return a+=' <option value="'+w((r=e&&e.value,typeof r===S?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.value,i&&i.value,{hash:{},inverse:P.noop,fn:P.program(11,p,t),data:t}),(r||0===r)&&(a+=r),a+=">"+w(n(1).call(e,e&&e.label,{hash:{},data:t}))+"</option> "}function p(e,t){return'selected="selected"'}function f(e,t){var r,a="";return a+=' <input type="',r=n(12).call(e,e&&e.option,"hidden",{hash:{},inverse:P.program(16,v,t),fn:P.program(14,m,t),data:t}),(r||0===r)&&(a+=r),
a+='" id="input_'+w((r=e&&e.id,typeof r===S?r.apply(e):r))+w((r=e&&e.idSuffix,typeof r===S?r.apply(e):r))+'" class="form-control" name="'+w((r=e&&e.id,typeof r===S?r.apply(e):r))+'" value="'+w((r=e&&e.value,typeof r===S?r.apply(e):r))+'" ',r=i.if.call(e,e&&e.placeholder,{hash:{},inverse:P.noop,fn:P.program(18,g,t),data:t}),(r||0===r)&&(a+=r),a+="> "}function m(e,t){return"password"}function v(e,t){return"text"}function g(e,t){var n,i="";return i+='placeholder="'+w((n=e&&e.placeholder,typeof n===S?n.apply(e):n))+'"';
}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var y,b="",w=this.escapeExpression,S="function",P=this;return b+='<div class="form-group ',y=i.if.call(t,t&&t.advanced,{hash:{},inverse:P.noop,fn:P.program(1,s,a),data:a}),(y||0===y)&&(b+=y),b+='"> ',y=n(12).call(t,t&&t.type,"bool",{hash:{},inverse:P.program(8,c,a),fn:P.program(3,o,a),data:a}),(y||0===y)&&(b+=y),b+=" </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";
return r+=' <textarea class="form-control text-field" id="text-'+p((n=e&&e.name,typeof n===h?n.apply(e):n))+'" name="'+p((n=e&&e.name,typeof n===h?n.apply(e):n))+'"',n=i.if.call(e,e&&e.rows,{hash:{},inverse:f.noop,fn:f.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=' placeholder="'+p((n=e&&e.placeholder,typeof n===h?n.apply(e):n))+'">'+p((n=e&&e.value,typeof n===h?n.apply(e):n))+"</textarea> "}function o(e,t){var n,i="";return i+=' rows="'+p((n=e&&e.rows,typeof n===h?n.apply(e):n))+'"'}function l(e,t){
var n,r="";return r+=' <input type="text" id="text-'+p((n=e&&e.name,typeof n===h?n.apply(e):n))+'" class="form-control text-field" name="'+p((n=e&&e.name,typeof n===h?n.apply(e):n))+'" value="'+p((n=e&&e.value,typeof n===h?n.apply(e):n))+'" placeholder="'+p((n=e&&e.placeholder,typeof n===h?n.apply(e):n))+'" ',n=i.if.call(e,e&&e.excludeParam,{hash:{},inverse:f.noop,fn:f.program(5,u,t),data:t}),(n||0===n)&&(r+=n),r+="> "}function u(e,t){var n,i="";return i+='data-exclude-param="'+p((n=e&&e.excludeParam,
typeof n===h?n.apply(e):n))+'" data-exclude-value="'+p((n=e&&e.excludeValue,typeof n===h?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="form-group"> <label for="text-'+p((c=t&&t.name,typeof c===h?c.apply(t):c))+'">'+p(n(1).call(t,t&&t.label,{hash:{},data:a}))+"</label> ",c=n(12).call(t,t&&t.type,"textarea",{hash:{},inverse:f.program(4,l,a),fn:f.program(1,s,a),data:a}),(c||0===c)&&(d+=c),
d+=" </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="mini-controls"> <div class="loading loading-inline"></div> </div> '})},1649,1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return' <a class="play-video-btn btn-gray" href=""> <div class="photo-video-overlay"> <span class="video-badge badge badge-round"> <i class="glyphicon facetime-video"></i> </span> </div> </a> ';
}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d=this.escapeExpression;return u+='<div class="photo-details-container"> <div class="error hidden"></div> <div class="photo-details"> <div class="photo-loading-overlay"></div> ',l=i.if.call(t,t&&t.isVideo,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' <div class="photo-details-info"> <div class="media-actions"> <button class="play-btn media-action-btn btn-link ',
l=i.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.slideshowPaused),{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+=" ",l=i.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.canPlayPause),{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"><i class="glyphicon play"></i></button> <button class="pause-btn media-action-btn btn-link ',l=i.if.call(t,(l=t&&t.player,null==l||l===!1?l:l.slideshowPaused),{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a
}),(l||0===l)&&(u+=l),u+=" ",l=i.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.canPlayPause),{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"><i class="glyphicon pause"></i></button> <button class="edit-btn media-action-btn btn-link hidden"><i class="glyphicon pencil"></i></button> <button class="more-btn media-action-btn btn-link hidden"><i class="glyphicon more"></i></button> <button class="minimize-btn media-action-btn btn-link hidden"><i class="glyphicon chevron-down"></i></button> <button class="enter-fullscreen-btn media-action-btn btn-link hidden"><i class="glyphicon resize-full"></i></button> <button class="exit-fullscreen-btn media-action-btn btn-link hidden"><i class="glyphicon resize-small"></i></button> <div class="photo-actions-dropdown media-actions-dropdown dropup pull-right"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> </div> <h4 class="photo-title"></h4> <span class="photo-subtitle">'+d(n(1).call(t,"{1} of {2}",t&&t.index,t&&t.total,{
hash:{},data:a}))+'</span> <div class="photo-summary"></div> </div> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<a class="player-close-btn btn-gray" href="#"> <i class="glyphicon remove-2"></i> </a> <div class="loading loading-inline"></div> <div class="photo-player-controls"> <a class="previous-btn btn-gray hidden" href="#"> <i class="previous-icon glyphicon chevron-left"></i> </a> <a class="next-btn btn-gray hidden" href="#"> <i class="next-icon glyphicon chevron-right"></i> </a> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression,u="function";return o+='<div class="post-play-background background"></div> <div class="post-play-footer"> <div class="item-previous"> <div class="item-poster"> <h1>'+l(n(1).call(t,"Previous",{hash:{},data:a}))+'</h1> <a class="media-poster-container replay-btn play-btn" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon refresh"></i> </div> </div> </a> </div> <div class="item-summary"> <h1 class="media-title">'+l((s=t&&t.previous,
s=null==s||s===!1?s:s.title,typeof s===u?s.apply(t):s))+'</h1> <h2 class="media-subtitle-1">',s=t&&t.previous,s=null==s||s===!1?s:s.subtitle,s=typeof s===u?s.apply(t):s,(s||0===s)&&(o+=s),o+='</h2> </div> </div> <div class="item-next"> <div class="item-poster"> <h1>'+l(n(1).call(t,"Playing Next",{hash:{},data:a}))+'</h1> <a class="media-poster-container next-btn play-btn" href="#"> <div class="media-poster"> <div class="media-poster-overlay"></div> <div class="countdown"></div> <div class="media-poster-overlay-icons"> <i class="media-poster-overlay-icon glyphicon play"></i> </div> </div> </a> </div> <div class="item-summary"> <h1 class="media-title">'+l((s=t&&t.next,
s=null==s||s===!1?s:s.title,typeof s===u?s.apply(t):s))+'</h1> <h2 class="media-subtitle-1">'+l((s=t&&t.next,s=null==s||s===!1?s:s.subtitle,typeof s===u?s.apply(t):s))+'</h2> <h3 class="media-subtitle-2">',s=t&&t.next,s=null==s||s===!1?s:s.index,s=typeof s===u?s.apply(t):s,(s||0===s)&&(o+=s),o+="</h3> <p>"+l((s=t&&t.next,s=null==s||s===!1?s:s.summary,typeof s===u?s.apply(t):s))+"</p> </div> </div> </div> "})},1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),r=r||{},'<div class="video-container"> <div class="video-controls-container"></div> <div class="video-post-play-container"></div> <div class="video-details-container"></div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="mini-controls"> <div class="seek-bar-container"></div> <div class="mini-controls-left"> <a class="media-poster-container" href="#"><div class="media-poster"></div></a> </div> <div class="mini-player-scrub-preview persistent-tooltip top fade"> <div class="tooltip-arrow"></div> <div class="tooltip-inner"></div> </div> <div class="mini-controls-right"> <div class="mini-controls-below-track-segment media-title"> <div class="grandparent-title-container"> <button class="grandparent-title btn-link btn-metadata-link"></button> </div> <div class="title-container"> <button class="item-title btn-link btn-metadata-link"></button> </div> </div> <div class="mini-controls-below-track-segment mini-controls-numeric-progress"> <span class="player-position"></span><span class="separator"></span><span class="player-duration"></span> </div> <div class="mini-controls-below-track-segment"> <button class="previous-btn btn-link"><i class="glyphicon fast-backward"></i></button> <button class="play-btn btn-link btn-link-lg hidden"><i class="glyphicon play"></i></button> <button class="pause-btn btn-link btn-link-lg hidden"><i class="glyphicon pause"></i></button> <button class="stop-btn btn-link btn-link-lg hidden"><i class="glyphicon stop"></i></button> <button class="next-btn btn-link"><i class="glyphicon fast-forward"></i></button> <span id="player-actions-dropdown" class="dropup"> <button class="more-btn btn-link dropdown-toggle" href="#player-actions-dropdown" data-toggle="dropdown"><i class="glyphicon more"></i></button> </span> </div> <div class="mini-controls-below-track-segment player-dropdowns-container rating-container"> </div> <div class="mini-controls-below-track-segment ancillary-btns"> <span class="player-lyrics-container"></span> <button class="shuffle-btn btn-link"><i class="plex-icon-osd-shuffle"></i></button> <button class="repeat-btn btn-link"> <i class="repeat-one plex-icon-osd-repeat-one"></i> <i class="repeat plex-icon-osd-repeat"></i> </button> </div> <div class="mini-controls-below-track-segment"> <button class="volume-btn btn-link hidden"> <i class="glyphicon volume-up"></i> <i class="glyphicon volume-down"></i> <i class="glyphicon mute"></i> </button> <span class="player-volume-slider-container"></span> <button class="enter-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-full"></i></button> <button class="exit-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-small"></i></button> <button class="maximize-btn btn-link"><i class="glyphicon chevron-up"></i></button> <span class="player-play-queue-container"></span> </div> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="player-slider-track"> <div class="player-slider-buffer"></div> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="player-slider-track"> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<img class="player-scrub-preview-thumbnail hidden"> <div class="tooltip top player-scrub-preview-tooltip"> <div class="tooltip-inner player-scrub-preview-time"></div> <div class="tooltip-arrow"></div> </div>'})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
r=r||{},'<div class="video-background"></div> <video id="html-video" class="html-video"></video> <div class="video-subtitles-container"></div> <div class="flash-video"> <div id="flash-video-placeholder"></div> </div> <div class="video-image-overlays-region"></div> <div class="video-loading loading loading-inline"></div> <div class="alert-player alert-paused"><i class="glyphicon play"></i></div> <button class="video-overlay-btn"></button> <button class="player-close-btn btn-gray"><i class="glyphicon remove-2"></i></button> <div class="video-error-message-container"> <div class="video-error-message-center"> <div class="video-error-message"></div> <div class="video-error-skip-message btn-link"></div> </div> </div> <div class="video-controls-overlay video-controls-overlay-top"> <div class="video-controls-left"> <span class="video-title"></span> </div> <div class="player-dropdowns-container video-controls-right"> <button class="player-close-btn btn-link"><i class="glyphicon remove-2"></i></button> <button class="btn-link share-btn pull-left"><i class="glyphicon share"></i></button> <button class="btn-link recommend-btn pull-left"><i class="glyphicon share-alt"></i></button> </div> </div> <div class="player-primary-player-name-container"> <span class="primary-player-name"></span> </div> <div class="player-scrub-preview-container"></div> <div class="video-controls-overlay video-controls-overlay-bottom"> <div class="video-controls-left"> <button class="previous-btn btn-link hidden"><i class="glyphicon fast-backward"></i></button> <button class="play-btn btn-link hidden"><i class="glyphicon play"></i></button> <button class="pause-btn btn-link hidden"><i class="glyphicon pause"></i></button> <button class="next-btn btn-link hidden"><i class="glyphicon fast-forward"></i></button> </div> <div class="player-dropups-container video-controls-right"> <button class="volume-btn btn-link btn-link-lg hidden"> <i class="glyphicon volume-up"></i> <i class="glyphicon volume-down"></i> <i class="glyphicon mute"></i> </button> <div class="player-volume-slider-container"></div> <button class="enter-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-full"></i></button> <button class="exit-fullscreen-btn fullscreen-btn btn-link hidden"><i class="glyphicon resize-small"></i></button> <button class="minimize-btn btn-link"><i class="glyphicon chevron-down"></i></button> </div> <div class="video-controls-center-wrapper"> <div class="video-controls-center"> <span class="player-position"></span> <div class="seek-bar-container"></div> <span class="player-duration"></span> </div> </div> </div> <div class="video-player-poster media-poster"></div> <div class="video-alert-region"></div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){var i,r="";return r+=' <button class="btn-link dropdown-toggle ',i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.noop,fn:h.program(2,s,t),data:t}),(i||0===i)&&(r+=i),r+='" href="#player-primary-player-dropdown" data-toggle="dropdown"> <i class="',i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.program(6,l,t),fn:h.program(4,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i> </button> '}function s(e,t){
return"active"}function o(e,t){return"plex-icon-companion-cast-active"}function l(e,t){return"plex-icon-companion-cast"}function u(e,t){var i,r="";return r+=' <button class="btn-link cast-btn ',i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.noop,fn:h.program(2,s,t),data:t}),(i||0===i)&&(r+=i),r+="\" href='#'> <i class=\"",i=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:h.program(6,l,t),fn:h.program(4,o,t),data:t}),(i||0===i)&&(r+=i),r+='"></i> </button> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
r=r||{};var c,d="",h=this;return c=n.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(8,u,r),fn:h.program(1,a,r),data:r}),(c||0===c)&&(d+=c),d+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"selected"}function o(e,t){var r,a="";return a+=' <li> <a class="',r=i.if.call(e,e&&e.selected,{hash:{},inverse:c.noop,fn:c.program(1,s,t),data:t}),(r||0===r)&&(a+=r),a+='" data-index="'+h((r=e&&e.index,typeof r===d?r.apply(e):r))+'" href="#"> '+h(n(107).call(e,e,{
hash:{},data:t}))+' <i class="player-dropdown-selected-icon dropdown-selected-icon glyphicon ok-2"></i> </a> </li> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d="function",h=this.escapeExpression;return u+='<button class="btn-link dropdown-toggle" href="#player-quality-dropdown" data-toggle="dropdown"> <i class="glyphicon adjust-alt"></i> </button> <ul class="dropdown-menu pull-right"> <li> <a class="',l=i.unless.call(t,t&&t.hasSelectedQuality,{hash:{},inverse:c.noop,
fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" data-index="-1" href="#"> '+h(n(1).call(t,"Original",{hash:{},data:a}))+' <i class="player-dropdown-selected-icon selected-icon glyphicon ok-2"></i> </a> </li> ',l=i.each.call(t,t&&t.availableQualities,{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+=" </ul> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"plex-icon-audio"}function o(e,t){return"plex-icon-subtitles-alt";
}function l(e,t,r){var a,s="";return s+=' <li><a class="',a=i.if.call(e,e&&e.selected,{hash:{},inverse:S.noop,fn:S.program(6,u,t),data:t}),(a||0===a)&&(s+=a),s+='" data-id="'+w((a=e&&e.id,typeof a===b?a.apply(e):a))+'" href="#">',a=i.if.call(e,e&&e.language,{hash:{},inverse:S.program(10,d,t),fn:S.program(8,c,t),data:t}),(a||0===a)&&(s+=a),a=n(12).call(e,r&&r.type,"subtitles",{hash:{},inverse:S.noop,fn:S.program(12,h,t),data:t}),(a||0===a)&&(s+=a),a=n(12).call(e,r&&r.type,"audio",{hash:{},inverse:S.noop,
fn:S.program(16,m,t),data:t}),(a||0===a)&&(s+=a),s+=' <i class="player-dropdown-selected-icon dropdown-selected-icon glyphicon ok-2"></i></a></li> '}function u(e,t){return"selected"}function c(e,t){var n;return w((n=e&&e.language,typeof n===b?n.apply(e):n))}function d(e,t){return w(n(1).call(e,"Unknown",{hash:{},data:t}))}function h(e,t){var n;return n=i.if.call(e,e&&e.format,{hash:{},inverse:S.noop,fn:S.program(13,p,t),data:t}),n||0===n?n:""}function p(e,t){var r,a="";return a+=" ("+w(n(812).call(e,e&&e.format,{
hash:{},data:t})),r=i.if.call(e,e&&e.forced,{hash:{},inverse:S.noop,fn:S.program(14,f,t),data:t}),(r||0===r)&&(a+=r),a+=")"}function f(e,t){var i="";return i+=" "+w(n(1).call(e,"Forced",{hash:{},data:t}))}function m(e,t){var n;return n=i.if.call(e,e&&e.codec,{hash:{},inverse:S.noop,fn:S.program(17,v,t),data:t}),n||0===n?n:""}function v(e,t){var i="";return i+=" ("+w(n(811).call(e,e&&e.codec,{hash:{},data:t}))+" "+w(n(810).call(e,e&&e.channels,{hash:{},data:t}))+")"}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var g,y="",b="function",w=this.escapeExpression,S=this;return y+='<button class="btn-link dropdown-toggle" href="#player-'+w((g=t&&t.type,typeof g===b?g.apply(t):g))+'-dropdown" data-toggle="dropdown"> <i class="',g=n(12).call(t,t&&t.type,"audio",{hash:{},inverse:S.program(3,o,a),fn:S.program(1,s,a),data:a}),(g||0===g)&&(y+=g),y+='"></i> </button> <ul class="dropdown-menu pull-right"> ',g=i.each.call(t,t&&t.streams,{hash:{},inverse:S.noop,fn:S.programWithDepth(5,l,a,t),
data:a}),(g||0===g)&&(y+=g),y+=" </ul> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){function a(e,t){return' <span class="smart-badge badge badge-round"> <i class="icon glyphicon cogwheel"></i> </span> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{};var s,o,l="",u="function",c=this.escapeExpression,d=this;return l+='<a class="media-poster-container" href="',(o=n.url)?s=o.call(t,{hash:{},data:r}):(o=t&&t.url,s=typeof o===u?o.call(t,{hash:{},
data:r}):o),l+=c(s)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> ',s=n.if.call(t,t&&t.smart,{hash:{},inverse:d.noop,fn:d.program(1,a,r),data:r}),(s||0===s)&&(l+=s),l+=' <div class="media-poster-actions"> <button class="play-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon play"></i></button> <button class="edit-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon pencil"></i></button> <button class="more-btn media-poster-btn btn-link" tabindex="-1"><i class="glyphicon more"></i></button> </div> </div> <div class="media-subtitle-1-fill media-heading playlist-title"></div> <div class="media-subtitle-2-fill media-heading secondary playlist-duration"></div> </a> <div class="media-actions-dropdown playlist-actions-dropdown dropdown"> <div class="dropdown-toggle" data-toggle="dropdown"></div> </div> ';
})},1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=" "+u(n(1).call(e,"Click {1}here{2} to add content to the library.",'<a href="#" class="add-to-library-link">',"</a>",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c=this;return l+='<div class="section-loading-container hidden"> <div class="loading loading-inline"></div> </div> <h4 class="empty-message text-muted text-center"> <span class="empty-default"> '+u(n(1).call(t,"The library has no content yet.",{
hash:{},data:a}))+" ",o=i.if.call(t,t&&t.canEdit,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' </span> <span class="empty-refreshing"> '+u(n(1).call(t,"The library is still being refreshed. Hang on while we look for your content.",{hash:{},data:a}))+' </span> <span class="empty-filter"> '+u(n(1).call(t,"There is no content matching your active filter.",{hash:{},data:a}))+' </span> <span class="empty-folder"> '+u(n(1).call(t,"There is no content in the selected folder.",{
hash:{},data:a}))+" </span> </h4> "})},1649,function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l="function",u=this.escapeExpression;return o+='<form class="edit-section-advanced-form settings-container"> <div class="language-group"> <input type="hidden" name="language" value="'+u((s=t&&t.section,s=null==s||s===!1?s:s.language,typeof s===l?s.apply(t):s))+'"> </div> <div class="row"> <div class="col-md-12 section-settings-region"></div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group scanner-group hidden"> <label for="edit-section-scanner" class="control-label"> '+u(n(1).call(t,"Scanner",{
hash:{},data:a}))+' <span class="control-error">'+u(n(1).call(t,"A scanner is required.",{hash:{},data:a}))+'</span> </label> <select id="edit-section-scanner" name="scanner"></select> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group agent-group hidden"> <label for="edit-section-agent" class="control-label"> '+u(n(1).call(t,"Agent",{hash:{},data:a}))+' <span class="control-error">'+u(n(1).call(t,"An agent is required.",{hash:{},data:a}))+'</span> </label> <select id="edit-section-agent" name="agent"></select> </div> </div> </div> <div class="row"> <div class="col-md-12 section-agent-settings-region"></div> </div> </form> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<form class="edit-section-folders-form settings-container"> <label> '+o(n(1).call(t,"Add folders to your library",{hash:{},data:a}))+' </label> <div class="form-group Location-group"> <div class="paths-region"></div> <p class="add-folder-container"> <button type="button" class="add-folder-btn btn btn-icon-label btn-default"><i class="glyphicon folder-plus"></i> '+o(n(1).call(t,"Browse for media folder",{
hash:{},data:a}))+'</button> </p> <p class="control-error">'+o(n(1).call(t,"At least one folder is required.",{hash:{},data:a}))+'</p> </div> <p class="help-block">'+o(n(1).call(t,"Help us out by following {1}our guide{2} to naming and organizing your media.",'<a href="http://support.plex.tv/hc/en-us/categories/200028098-Media-Preparation" target="_blank">',"</a>",{hash:{},data:a}))+"</p> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),r=r||{};var a,s,o="",l="function",u=this.escapeExpression;return o+='<div class="col-md-12"> <div class="form-group path-group"> <input type="text" name="path" class="form-control" value="',(s=n.path)?a=s.call(t,{hash:{},data:r}):(s=t&&t.path,a=typeof s===l?s.call(t,{hash:{},data:r}):s),o+=u(a)+'"> <div class="path-actions"> <a href="#" class="remove-path-btn btn-link btn-gray"><i class="glyphicon remove-2"></i></a> </div> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
function s(e,t){var i="";return i+=' <p class="help-block"> '+c(n(1).call(e,"Note: An active Plex Pass is required for this service. Don't have a Plex Pass? {1}Subscribe here{2}",'<a href="{3}" target="_blank">',"</a>",e&&e.plexPassUrl,{hash:{},data:t}))+" </p> "}function o(e,t){return'<div class="vendor-logo vendor-logo-lyricfind"></div>'}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="choose-agent use-premium-agent" data-agent="com.plexapp.agents.plexmusic" data-scanner="Plex Premium Music Scanner"> <div class="row"> <div class="col-xs-12"> <div class="row use-agent-header use-premium-agent-header"> <div class="col-xs-12"> <input type="radio"> <span class="header-text"> '+c(n(1).call(t,"Create a premium Plex music library!",{
hash:{},data:a}))+' </span> </div> </div> <div class="row use-premium-agent-body"> <div class="col-xs-8"> <ul> <li>'+c(n(1).call(t,"Access to the best artwork, artist bios, album reviews, and more",{hash:{},data:a}))+"</li> <li>"+c(n(1).call(t,"Smart mixes based on track or mood",{hash:{},data:a}))+"</li> <li>"+c(n(1).call(t,"Improved music recognition and matching",{hash:{},data:a}))+"</li> </ul> ",l=i.unless.call(t,t&&t.hasPremiumMusic,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),
u+=' </div> <div class="col-xs-4 vendor-logos"> ',l=i.if.call(t,t&&t.hasLyrics,{hash:{},inverse:d.noop,fn:d.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+=' <div class="vendor-logo vendor-logo-gracenote"></div> <div class="vendor-logo vendor-logo-plex-pass"></div> </div> </div> </div> </div> </div> <div class="choose-agent use-basic-agent"> <div class="row use-agent-header"> <div class="col-xs-12"> <input type="radio"> '+c(n(1).call(t,"Create a basic music library",{hash:{},data:a}))+" </div> </div> </div> ";
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <div class="form-group"> <label class="control-label" for="input_importFromItunes_c"> <input type="checkbox" id="input_importFromItunes_c" name="importFromiTunes" value="1" ',r=i.if.call(e,e&&e.value,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="> "+f(n(1).call(e,"Import from iTunes",{hash:{},data:t}))+' </label> <p class="help-block">'+f(n(1).call(e,"Importing from iTunes will import your music playlists. It will also import your ratings, the date you added the music, as well as play and skip counts for tracks in your library.",{
hash:{},data:t}))+"</p> </div> "}function o(e,t){return"checked"}function l(e,t,r){var a,s="";return s+=" "+f(n(21).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" ",a=i.if.call(e,r&&r.edit,{hash:{},inverse:p.noop,fn:p.program(5,u,t),data:t}),(a||0===a)&&(s+=a),s+=" "}function u(e,t){var i,r="";return r+=" ",i=n(12).call(e,e&&e.id,"enableBIFGeneration",{hash:{},inverse:p.noop,fn:p.program(6,c,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function c(e,t){var i="";return i+=' <div class="form-group"> <button type="button" class="delete-thumbnails-btn btn btn-sm btn-danger">'+f(n(1).call(e,"Delete Preview Thumbnails",{
hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var d,h="",p=this,f=this.escapeExpression;return d=i.if.call(t,t&&t.isNewMusicSection,{hash:{},inverse:p.noop,fn:p.program(1,s,a),data:a}),(d||0===d)&&(h+=d),h+=" ",d=i.each.call(t,t&&t.settings,{hash:{},inverse:p.noop,fn:p.programWithDepth(4,l,a,t),data:a}),(d||0===d)&&(h+=d),h+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"section-type-chosen";
}function o(e,t){var i="";return i+=' <p class="prompt">'+g(n(1).call(e,"Select your library type",{hash:{},data:t}))+"</p> "}function l(e,t){var i="";return i+=" <label>"+g(n(1).call(e,"Library type",{hash:{},data:t}))+"</label> "}function u(e,t,r){var a,s="";return s+=' <a class="wizard-block section-type ',a=i.if.call(e,r&&r.canChangeType,{hash:{},inverse:y.noop,fn:y.program(8,c,t),data:t}),(a||0===a)&&(s+=a),s+=" ",a=n(12).call(e,r&&r.currentSectionKey,e&&e.key,{hash:{},inverse:y.noop,fn:y.program(10,d,t),
data:t}),(a||0===a)&&(s+=a),s+='" data-key="'+g((a=e&&e.key,typeof a===b?a.apply(e):a))+'" href="#"> <i class="wizard-block-icon '+g((a=e&&e.sectionTypeIcon,typeof a===b?a.apply(e):a))+'"></i> '+g((a=e&&e.title,typeof a===b?a.apply(e):a))+" </a> "}function c(e,t){return"selectable"}function d(e,t){return"selected"}function h(e,t){var i="";return i+=' <div class="row"> <div class="col-xs-12"> <p class="prompt">'+g(n(1).call(e,"Name your library and choose language.",{hash:{},data:t}))+"</p> </div> </div> ";
}function p(e,t){var i="";return i+=" "+g(n(1).call(e,"Last updated {1}",e&&e.updatedAt,{hash:{},data:t}))+" "}function f(e,t){var i="";return i+=" "+g(n(1).call(e,"Each library should only contain one type of media.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var m,v="",g=this.escapeExpression,y=this,b="function";return v+='<form class="edit-section-type-form settings-container ',m=i.if.call(t,(m=t&&t.section,null==m||m===!1?m:m.type),{hash:{},inverse:y.noop,
fn:y.program(1,s,a),data:a}),(m||0===m)&&(v+=m),v+='"> ',m=i.if.call(t,t&&t.add,{hash:{},inverse:y.program(5,l,a),fn:y.program(3,o,a),data:a}),(m||0===m)&&(v+=m),v+=' <div class="wizard-blocks-group form-group type-group"> ',m=i.each.call(t,t&&t.sectionTypes,{hash:{},inverse:y.noop,fn:y.programWithDepth(7,u,a,t),data:a}),(m||0===m)&&(v+=m),v+=' <label class="control-label"> <span class="control-error">'+g(n(1).call(t,"You must select a media type.",{hash:{},data:a}))+'</span> </label> </div> <div class="visible-once-section-type-chosen"> ',
m=i.if.call(t,t&&t.hasType,{hash:{},inverse:y.noop,fn:y.program(12,h,a),data:a}),(m||0===m)&&(v+=m),v+=' <div class="row"> <div class="col-md-7"> <div class="form-group title-group"> <div> <label for="edit-section-title" class="control-label"> '+g(n(1).call(t,"Name",{hash:{},data:a}))+' <span class="control-error">'+g(n(1).call(t,"A library name is required.",{hash:{},data:a}))+'</span> </label> </div> <input type="text" id="edit-section-title" name="title" class="form-control" value="'+g((m=t&&t.section,
m=null==m||m===!1?m:m.title,typeof m===b?m.apply(t):m))+'"> </div> </div> <div class="col-md-5"> <div class="form-group language-group"> <div> <label for="edit-section-language" class="control-label"> '+g(n(1).call(t,"Language",{hash:{},data:a}))+' <span class="control-error">'+g(n(1).call(t,"A language is required.",{hash:{},data:a}))+'</span> </label> </div> <select id="edit-section-language" name="language"></select> </div> </div> </div> <div class="row"> <div class="col-md-12"> <span class="text-muted"> ',
m=i.if.call(t,t&&t.updatedAt,{hash:{},inverse:y.program(16,f,a),fn:y.program(14,p,a),data:a}),(m||0===m)&&(v+=m),v+=" </span> </div> </div> </div> </form> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=' <option value="'+p((n=e&&e.value,typeof n===h?n.apply(e):n))+'" ',n=i.if.call(e,e&&e.selected,{hash:{},inverse:f.noop,fn:f.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=">"+p((n=e&&e.label,typeof n===h?n.apply(e):n))+"</option> ";
}function o(e,t){return"selected"}function l(e,t){var i="";return i+=' <option value="">'+p(n(1).call(e,"Loading...",{hash:{},data:t}))+"</option> "}function u(e,t){var n,i="";return i+=' <option value="'+p((n=e&&e.value,typeof n===h?n.apply(e):n))+'">'+p((n=e&&e.label,typeof n===h?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h="function",p=this.escapeExpression,f=this;return d+='<div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-title">'+p(n(1).call(t,"Title",{
hash:{},data:a}))+'</label> <input type="text" id="match-search-title" name="title" class="form-control" value="'+p((c=t&&t.item,c=null==c||c===!1?c:c.title,typeof c===h?c.apply(t):c))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-agent">'+p(n(1).call(t,"Agent",{hash:{},data:a}))+'</label> <select id="match-search-agent" name="agent"> ',c=i.each.call(t,t&&t.agents,{hash:{},inverse:f.program(4,l,a),fn:f.program(1,s,a),data:a}),(c||0===c)&&(d+=c),
d+=' </select> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-year">'+p(n(1).call(t,"Year",{hash:{},data:a}))+'</label> <input type="text" id="match-search-year" name="year" class="form-control" value="'+p((c=t&&t.item,c=null==c||c===!1?c:c.year,typeof c===h?c.apply(t):c))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-language">'+p(n(1).call(t,"Language",{
hash:{},data:a}))+'</label> <select id="match-search-language" name="language"> ',c=i.each.call(t,t&&t.languages,{hash:{},inverse:f.program(4,l,a),fn:f.program(6,u,a),data:a}),(c||0===c)&&(d+=c),d+=" </select> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,n,i,r){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),r=r||{},'<div class="result-region"> <div class="loading loading-inline"></div> </div> '})},247,function(e,t,n){var i=n(4);
e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,r="";return r+=" ",n=i.if.call(e,e&&e.title,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(n||0===n)&&(r+=n),r+=" "}function o(e,t){var i,r="";return r+=' <li> <a class="card btn-gray ',i=n(12).call(e,e&&e.id,"all",{hash:{},inverse:d.noop,fn:d.program(3,l,t),data:t}),(i||0===i)&&(r+=i),r+='" data-id="'+p((i=e&&e.id,typeof i===h?i.apply(e):i))+'" href="#">'+p(n(1).call(e,e&&e.title,{hash:{},data:t}))+"</a> </li> "}function l(e,t){
return"selected"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this,h="function",p=this.escapeExpression;return c+='<div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',u=i.each.call(t,t&&t.deviceTypes,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+=' </ul> </div> <div class="device-list-container col-sm-8 col-md-9"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<h3 class="invite-list-header top">'+o(n(1).call(t,"Invites",{hash:{},data:a}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+o(n(1).call(t,"Friends",{hash:{},data:a}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+o(n(1).call(t,"Pending",{hash:{},data:a}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<h3 class="invite-list-header top">'+o(n(1).call(t,"Invites",{hash:{},data:a}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+o(n(1).call(t,"My Home",{hash:{},data:a}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+o(n(1).call(t,"Pending",{hash:{},data:a}))+'</h3> <div class="pending-list-container"></div> </div> '});
},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"selected"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d=this.escapeExpression;return u+='<ul class="nav nav-header pull-right"> <li class="web-nav-item"><a class="web-btn btn-gray ',l=n(12).call(t,t&&t.subset,"web",{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#!/settings/web">'+d(n(1).call(t,"Web",{
hash:{},data:a}))+'</a></li> <li class="server-nav-item ',l=i.unless.call(t,t&&t.hasPrimaryServer,{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"><a class="server-btn btn-gray ',l=n(12).call(t,t&&t.subset,"server",{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#!/settings/server">'+d(n(1).call(t,"Server",{hash:{},data:a}))+'</a></li> <li class="users-nav-item ',l=i.unless.call(t,t&&t.signedIn,{hash:{},inverse:c.noop,fn:c.program(3,o,a),
data:a}),(l||0===l)&&(u+=l),u+='"><a class="users-btn btn-gray ',l=n(12).call(t,t&&t.subset,"users",{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#!/settings/users">'+d(n(1).call(t,"Users",{hash:{},data:a}))+'<span class="badge"></span></a></li> <li class="devices-nav-item ',l=i.unless.call(t,t&&t.signedIn,{hash:{},inverse:c.noop,fn:c.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+='"><a class="devices-btn btn-gray ',l=n(12).call(t,t&&t.subset,"devices",{hash:{},
inverse:c.noop,fn:c.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+='" href="#!/settings/devices">'+d(n(1).call(t,"Devices",{hash:{},data:a}))+"</a></li> </ul> <h2>"+d(n(1).call(t,"Settings",{hash:{},data:a}))+'</h2> <div class="settings-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}function o(e,t){return"selected"}function l(e,t){var i,r="";return r+=' <li> <a class="friends-card card btn-gray ',i=n(12).call(e,e&&e.subset,"friends",{
hash:{},inverse:d.noop,fn:d.program(3,o,t),data:t}),(i||0===i)&&(r+=i),r+='" href="#!/settings/users/friends"> <span class="badge"></span> '+h(n(1).call(e,"Friends",{hash:{},data:t}))+" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var u,c="",d=this,h=this.escapeExpression;return c+='<div class="filter-bar"> <div class="filter-bar-right"> <span class="user-actions ',u=i.unless.call(t,t&&t.showUserActions,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),
c+='"> <button class="add-user-btn btn btn-sm btn-default">'+h(n(1).call(t,"Add User",{hash:{},data:a}))+'</button> <button class="enable-guest-btn btn btn-sm btn-default ',u=i.unless.call(t,t&&t.showEnableGuest,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='">'+h(n(1).call(t,"Enable Guest",{hash:{},data:a}))+'</button> <button class="disable-guest-btn btn btn-sm btn-danger ',u=i.unless.call(t,t&&t.showDisableGuest,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),
(u||0===u)&&(c+=u),c+='">'+h(n(1).call(t,"Disable Guest",{hash:{},data:a}))+'</button> </span> <button class="leave-home-btn btn btn-sm btn-danger ',u=i.unless.call(t,t&&t.showLeaveHome,{hash:{},inverse:d.noop,fn:d.program(1,s,a),data:a}),(u||0===u)&&(c+=u),c+='">'+h(n(1).call(t,"Leave Home",{hash:{},data:a}))+'</button> <button class="invite-friend-btn btn btn-sm btn-default">'+h(n(1).call(t,"Invite Friend",{hash:{},data:a}))+'</button> </div> </div> <div class="users-row row"> <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> <li> <a class="home-card card btn-gray ',
u=n(12).call(t,t&&t.subset,"home",{hash:{},inverse:d.noop,fn:d.program(3,o,a),data:a}),(u||0===u)&&(c+=u),c+='" href="#!/settings/users/home"> <span class="badge"></span> '+h(n(1).call(t,"My Home",{hash:{},data:a}))+" </a> </li> ",u=i.if.call(t,t&&t.showFriends,{hash:{},inverse:d.noop,fn:d.program(5,l,a),data:a}),(u||0===u)&&(c+=u),c+=" </ul> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.value,
typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.value,(r=i&&i.settings,null==r||r===!1?r:r.language),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="> "+_((r=e&&e.title,typeof r===T?r.apply(e):r))+" </option> "}function o(e,t){return"selected"}function l(e,t){var r,a="";return a+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="autoLogin" ',r=i.if.call(e,(r=e&&e.settings,null==r||r===!1?r:r.autoLogin),{hash:{},inverse:E.noop,fn:E.program(5,u,t),
data:t}),(r||0===r)&&(a+=r),a+="> "+_(n(1).call(e,"Automatically Sign In",{hash:{},data:t}))+' </label> <p class="help-block">'+_(n(1).call(e,"Do not prompt to select a user or enter a PIN during startup on this device.",{hash:{},data:t}))+"</p> </div> "}function u(e,t){return"checked"}function c(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.value,typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.value,(r=i&&i.settings,null==r||r===!1?r:r.allowHttpFallback),{hash:{},inverse:E.noop,fn:E.program(2,o,t),
data:t}),(r||0===r)&&(a+=r),a+=">"+_(n(1).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function d(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.value,typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.value,(r=i&&i.settings,null==r||r===!1?r:r.debugLevel),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=">"+_(n(1).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function h(e,t){var r,a="";return a+=' <div class="form-group"> <label for="chromecastAppID">Chromecast Receiver</label> <select id="chromecastAppID"> ',
r=i.each.call(e,e&&e.chromecastAppIDs,{hash:{},inverse:E.noop,fn:E.programWithDepth(12,p,t,e),data:t}),(r||0===r)&&(a+=r),a+=' </select> <p class="help-block">Refresh after saving this setting for it to take effect.</p> </div> <div id="chromecast-custom-group" class="form-group ',r=n(62).call(e,(r=e&&e.settings,null==r||r===!1?r:r.chromecastAppID),"custom",{hash:{},inverse:E.noop,fn:E.program(14,f,t),data:t}),(r||0===r)&&(a+=r),a+='"> <label for="chromecastCustomAppID">Custom Chromecast Application ID</label> <input type="text" id="chromecastCustomAppID" class="form-control" placeholder="Application ID" value="'+_((r=e&&e.settings,
r=null==r||r===!1?r:r.chromecastCustomAppID,typeof r===T?r.apply(e):r))+'"> <p class="help-block">Refresh after saving this setting for it to take effect.</p> </div> <div class="form-group"> <label for="myPlexScheme">Plex.tv Scheme</label> <input type="text" id="myPlexScheme" class="form-control" placeholder="https" value="'+_((r=e&&e.settings,r=null==r||r===!1?r:r.myPlexScheme,typeof r===T?r.apply(e):r))+'"> </div> <div class="form-group"> <label for="myPlexUrl">Plex.tv Address</label> <input type="text" id="myPlexUrl" class="form-control" placeholder="plex.tv" value="'+_((r=e&&e.settings,
r=null==r||r===!1?r:r.myPlexUrl,typeof r===T?r.apply(e):r))+'"> </div> '}function p(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.value,typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.value,(r=i&&i.settings,null==r||r===!1?r:r.chromecastAppID),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=">"+_(n(1).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function f(e,t){return"hidden"}function m(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.index,
typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.index,(r=i&&i.settings,null==r||r===!1?r:r.localQuality),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="> "+_(n(107).call(e,e,{hash:{},data:t}))+" </option> "}function v(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.index,typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.index,(r=i&&i.settings,null==r||r===!1?r:r.remoteQuality),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="> "+_(n(107).call(e,e,{
hash:{},data:t}))+" </option> "}function g(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.index,typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.index,(r=i&&i.settings,null==r||r===!1?r:r.channelQuality),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="> "+_(n(107).call(e,e,{hash:{},data:t}))+" </option> "}function y(e,t){var r,a="";return a+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="dash" ',r=i.if.call(e,(r=e&&e.settings,
null==r||r===!1?r:r.dash),{hash:{},inverse:E.noop,fn:E.program(5,u,t),data:t}),(r||0===r)&&(a+=r),a+="> "+_(n(1).call(e,"HTML5 Player",{hash:{},data:t}))+' </label> <p class="help-block">'+_(n(1).call(e,"Prefer the HTML5 video player over the Flash player.",{hash:{},data:t}))+"</p> </div> "}function b(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.value,typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.value,(r=i&&i.settings,null==r||r===!1?r:r.audioBoost),{hash:{},inverse:E.noop,fn:E.program(2,o,t),
data:t}),(r||0===r)&&(a+=r),a+=">"+_(n(1).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function w(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.value,typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.value,(r=i&&i.settings,null==r||r===!1?r:r.subtitleSize),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=">"+_(n(1).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function S(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.value,typeof r===T?r.apply(e):r))+'" ',
r=n(12).call(e,e&&e.value,(r=i&&i.settings,null==r||r===!1?r:r.subtitlesBurnLevel),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=">"+_(n(1).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function P(e,t,i){var r,a="";return a+=' <option value="'+_((r=e&&e.value,typeof r===T?r.apply(e):r))+'" ',r=n(12).call(e,e&&e.value,(r=i&&i.settings,null==r||r===!1?r:r.extrasPrefixCount),{hash:{},inverse:E.noop,fn:E.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+=">"+_(n(1).call(e,e&&e.title,{
hash:{},data:t}))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var x,C="",T="function",_=this.escapeExpression,E=this;return C+='<div class="filter-bar"> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right basic-setting">'+_(n(1).call(t,"Show Advanced",{hash:{},data:a}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right advanced-setting">'+_(n(1).call(t,"Hide Advanced",{hash:{},data:a}))+'</button> </div> <div class="row"> <div class="col-sm-4 col-md-3"> <ul class="settings-nav nav nav-cards"> <li><a class="card btn-gray selected" href="#general-web-group">'+_(n(1).call(t,"General",{
hash:{},data:a}))+'</a></li> <li class="advanced-setting"><a class="card btn-gray" href="#debug-web-group">'+_(n(1).call(t,"Debug",{hash:{},data:a}))+'</a></li> <li><a class="card btn-gray" href="#player-web-group">'+_(n(1).call(t,"Player",{hash:{},data:a}))+'</a></li> </ul> </div> <div class="col-sm-8 col-md-9"> <form id="web-settings-form"> <div id="general-web-group" class="settings-group active"> <h4 class="version-title"> '+_(n(1).call(t,"Version",{hash:{},data:a}))+" "+_((x=t&&t.version,typeof x===T?x.apply(t):x))+' </h4> <div class="form-group"> <label for="language">'+_(n(1).call(t,"Language",{
hash:{},data:a}))+'</label> <select id="language"> ',x=i.each.call(t,t&&t.languages,{hash:{},inverse:E.noop,fn:E.programWithDepth(1,s,a,t),data:a}),(x||0===x)&&(C+=x),C+=' </select> <p class="help-block">'+_(n(1).call(t,"Help us translate Plex/Web into your language {1}here{2}.",'<a href="https://getlocalization.com/plexweb" target="_blank">',"</a>",{hash:{},data:a}))+"</p> </div> ",x=i.if.call(t,t&&t.hasHome,{hash:{},inverse:E.noop,fn:E.program(4,l,a),data:a}),(x||0===x)&&(C+=x),C+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="playThemeMusic" ',
x=i.if.call(t,(x=t&&t.settings,null==x||x===!1?x:x.playThemeMusic),{hash:{},inverse:E.noop,fn:E.program(5,u,a),data:a}),(x||0===x)&&(C+=x),C+="> "+_(n(1).call(t,"Play Theme Music",{hash:{},data:a}))+' </label> <p class="help-block">'+_(n(1).call(t,"Automatically play theme music in the background when available.",{hash:{},data:a}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="showUnwatchedIcons" ',x=i.if.call(t,(x=t&&t.settings,null==x||x===!1?x:x.showUnwatchedIcons),{
hash:{},inverse:E.noop,fn:E.program(5,u,a),data:a}),(x||0===x)&&(C+=x),C+="> "+_(n(1).call(t,"Show Unwatched Icons",{hash:{},data:a}))+' </label> <p class="help-block">'+_(n(1).call(t,"Show unwatched icons in list items.",{hash:{},data:a}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="keyboardShortcuts" ',x=i.if.call(t,(x=t&&t.settings,null==x||x===!1?x:x.keyboardShortcuts),{hash:{},inverse:E.noop,fn:E.program(5,u,a),data:a}),(x||0===x)&&(C+=x),C+="> "+_(n(1).call(t,"Enable Keyboard Shortcuts",{
hash:{},data:a}))+' </label> <p class="help-block">'+_(n(1).call(t,"Press ? to view the list of {1}available shortcuts{2}.",'<a class="keyboard-shortcuts-btn" href="#">',"</a>",{hash:{},data:a}))+'</p> </div> <div class="form-group"> <label for="allowHttpFallback">'+_(n(1).call(t,"Allow Fallback to Insecure Connections",{hash:{},data:a}))+'</label> <select id="allowHttpFallback"> ',x=i.each.call(t,t&&t.httpFallbackOptions,{hash:{},inverse:E.noop,fn:E.programWithDepth(7,c,a,t),data:a}),(x||0===x)&&(C+=x),
C+=' </select> <p class="help-block">'+_(n(1).call(t,"Allow this browser to make insecure connections to Plex Media Server if secure connections fail.",{hash:{},data:a}))+'</p> </div> </div> <div id="debug-web-group" class="settings-group"> <div class="form-group"> <label for="debugLevel">'+_(n(1).call(t,"Debug Level",{hash:{},data:a}))+'</label> <select id="debugLevel" data-type="int"> ',x=i.each.call(t,t&&t.debugLevels,{hash:{},inverse:E.noop,fn:E.programWithDepth(9,d,a,t),data:a}),(x||0===x)&&(C+=x),
C+=' </select> <p class="help-block">'+_(n(1).call(t,"You can view the debug logs {1}here{2}.",'<a href="#!/logs">',"</a>",{hash:{},data:a}))+"</p> </div> ",x=i.if.call(t,t&&t.isNinja,{hash:{},inverse:E.noop,fn:E.program(11,h,a),data:a}),(x||0===x)&&(C+=x),C+=' </div> <div id="player-web-group" class="settings-group"> <h4 class="settings-header">'+_(n(1).call(t,"Streaming Quality",{hash:{},data:a}))+'</h4> <div class="form-group"> <label for="localQuality">'+_(n(1).call(t,"Local Quality",{hash:{},
data:a}))+'</label> <select id="localQuality" data-type="int"> <option value="-1">'+_(n(1).call(t,"Original",{hash:{},data:a}))+"</option> ",x=i.each.call(t,t&&t.availableQualities,{hash:{},inverse:E.noop,fn:E.programWithDepth(16,m,a,t),data:a}),(x||0===x)&&(C+=x),C+=' </select> </div> <div class="form-group"> <label for="remoteQuality">'+_(n(1).call(t,"Remote Quality",{hash:{},data:a}))+'</label> <select id="remoteQuality" data-type="int"> <option value="-1">'+_(n(1).call(t,"Original",{hash:{},data:a
}))+"</option> ",x=i.each.call(t,t&&t.availableQualities,{hash:{},inverse:E.noop,fn:E.programWithDepth(18,v,a,t),data:a}),(x||0===x)&&(C+=x),C+=' </select> </div> <div class="form-group"> <label for="channelQuality">'+_(n(1).call(t,"Online Quality",{hash:{},data:a}))+'</label> <select id="channelQuality" data-type="int"> <option value="-1">'+_(n(1).call(t,"Original",{hash:{},data:a}))+"</option> ",x=i.each.call(t,t&&t.availableQualities,{hash:{},inverse:E.noop,fn:E.programWithDepth(20,g,a,t),data:a
}),(x||0===x)&&(C+=x),C+=" </select> </div> ",x=i.if.call(t,t&&t.showExperimentalPlayer,{hash:{},inverse:E.noop,fn:E.program(22,y,a),data:a}),(x||0===x)&&(C+=x),C+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directPlay" ',x=i.if.call(t,(x=t&&t.settings,null==x||x===!1?x:x.directPlay),{hash:{},inverse:E.noop,fn:E.program(5,u,a),data:a}),(x||0===x)&&(C+=x),C+="> "+_(n(1).call(t,"Direct Play",{hash:{},data:a}))+' </label> <p class="help-block">'+_(n(1).call(t,"Allows the player to play compatible media without any conversion. In most browsers, direct play supports MP4 videos with h264 video and AAC audio. Videos with subtitles cannot be played directly.",{
hash:{},data:a}))+'</p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directStream" ',x=i.if.call(t,(x=t&&t.settings,null==x||x===!1?x:x.directStream),{hash:{},inverse:E.noop,fn:E.program(5,u,a),data:a}),(x||0===x)&&(C+=x),C+="> "+_(n(1).call(t,"Direct Stream",{hash:{},data:a}))+' </label> <p class="help-block">'+_(n(1).call(t,"Allows the server to copy compatible audio and video streams without converting them.",{hash:{},data:a}))+'</p> </div> <h4 class="settings-header">'+_(n(1).call(t,"Audio & Subtitles",{
hash:{},data:a}))+'</h4> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="allowAC3" ',x=i.if.call(t,(x=t&&t.settings,null==x||x===!1?x:x.allowAC3),{hash:{},inverse:E.noop,fn:E.program(5,u,a),data:a}),(x||0===x)&&(C+=x),C+="> "+_(n(1).call(t,"Allow Direct Play of AC3 Audio",{hash:{},data:a}))+' </label> <p class="help-block">'+_(n(1).call(t,"Allow MP4 videos with AC3 audio to be played directly. Browser support for AC3 audio is limited.",{hash:{},data:a
}))+'</p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="preferAAC" ',x=i.if.call(t,(x=t&&t.settings,null==x||x===!1?x:x.preferAAC),{hash:{},inverse:E.noop,fn:E.program(5,u,a),data:a}),(x||0===x)&&(C+=x),C+="> "+_(n(1).call(t,"Prefer AAC Audio",{hash:{},data:a}))+' </label> <p class="help-block">'+_(n(1).call(t,"Prefer AAC over MP3 when transcoding audio. Some devices, like the Wii U, only support HLS with AAC audio.",{hash:{},data:a}))+'</p> </div> <div class="form-group"> <label for="audioBoost">'+_(n(1).call(t,"Multi-Channel Audio Boost",{
hash:{},data:a}))+'</label> <select id="audioBoost" data-type="int"> ',x=i.each.call(t,t&&t.audioBoostLevels,{hash:{},inverse:E.noop,fn:E.programWithDepth(24,b,a,t),data:a}),(x||0===x)&&(C+=x),C+=' </select> <p class="help-block">'+_(n(1).call(t,"Boost volume when converting multi-channel audio to stereo.",{hash:{},data:a}))+'</p> </div> <div class="form-group"> <label for="subtitleSize">'+_(n(1).call(t,"Subtitle Size",{hash:{},data:a}))+'</label> <select id="subtitleSize" data-type="int"> ',x=i.each.call(t,t&&t.subtitleSizes,{
hash:{},inverse:E.noop,fn:E.programWithDepth(26,w,a,t),data:a}),(x||0===x)&&(C+=x),C+=' </select> </div> <div class="form-group"> <label for="subtitlesBurnLevel">'+_(n(1).call(t,"Burn Subtitles",{hash:{},data:a}))+'</label> <select id="subtitlesBurnLevel"> ',x=i.each.call(t,t&&t.subtitlesBurnLevels,{hash:{},inverse:E.noop,fn:E.programWithDepth(28,S,a,t),data:a}),(x||0===x)&&(C+=x),C+=' </select> <p class="help-block">'+_(n(1).call(t,"Determines if the server should burn in subtitles when converting video depending on the subtitles format. Avoiding burn in improves server performance and is only supported by the HTML5 player.",{
hash:{},data:a}))+'</p> </div> <h4 class="settings-header">'+_(n(1).call(t,"Extras",{hash:{},data:a}))+'</h4> <div class="form-group"> <label for="extrasPrefixCount">'+_(n(1).call(t,"Cinema Trailers to Play Before Movies",{hash:{},data:a}))+'</label> <select id="extrasPrefixCount" data-type="int"> ',x=i.each.call(t,t&&t.extrasPrefixCounts,{hash:{},inverse:E.noop,fn:E.programWithDepth(30,P,a,t),data:a}),(x||0===x)&&(C+=x),C+=' </select> </div> </div> <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+_(n(1).call(t,"Save Changes",{
hash:{},data:a}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t,i){var r,a="";return a+=' <li class="',r=n(12).call(e,(r=i&&i.currentType,null==r||r===!1?r:r.id),e&&e.id,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='"> <a class="btn-gray" data-type="'+h((r=e&&e.typeString,typeof r===d?r.apply(e):r))+'" href="#">'+h(n(1).call(e,e&&e.plural,{
hash:{},data:t}))+"</a> </li> "}function o(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this,d="function",h=this.escapeExpression;return u+='<ul class="agent-types-nav nav nav-pills"> ',l=i.each.call(t,t&&t.agentTypes,{hash:{},inverse:c.noop,fn:c.programWithDepth(1,s,a,t),data:a}),(l||0===l)&&(u+=l),u+=' </ul> <div class="agents-list-container"></div> <p class="help-block sortable-help-block">'+h(n(1).call(t,"Select which additional agents should contribute to metadata from {1}, and drag them to change the order of preference.",'<span class="agent-label"></span>',{
hash:{},data:a}))+'</p> <div class="contributors-list-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=" "+u(n(21).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c=this;return l+='<div class="sign-in-region"></div> <hr> <form id="server-settings-form"> <div class="form-group"> <h4 class="version-header"><span class="version"></span> <span class="update-region"></span></h4> </div> ',
o=i.each.call(t,t,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(n(1).call(t,"Save Changes",{hash:{},data:a}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var s,o="",l="function",u=this.escapeExpression;return o+='<a class="card btn-gray" href="#" data-group="'+u((s=t&&t.id,typeof s===l?s.apply(t):s))+'"> <span class="modal-nav-icon"> <i class="server-settings-status-icon unknown glyphicon circle-question-mark"></i> <i class="server-settings-status-icon error glyphicon circle-exclamation-mark"></i> <i class="server-settings-status-icon success glyphicon circle-ok"></i> <i class="server-settings-status-icon warning plex-icon-alert-560"></i> </span> '+u(n(1).call(t,t&&t.title,{
hash:{},data:a}))+" </a> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=" "+u(n(21).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this.escapeExpression,c=this;return l+='<form id="server-settings-form"> ',o=i.each.call(t,t,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' <div class="form-footer"> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading disabled"> <div class="loading loading-sm"></div> <span class="btn-label">'+u(n(1).call(t,"Save Changes",{
hash:{},data:a}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+N(n(1).call(e,"Connecting server...",{hash:{},data:t}))+" </h4> "}function o(e,t){var i;return i=n(12).call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.remoteAccessState),"disconnecting",{hash:{},inverse:U.program(6,u,t),
fn:U.program(4,l,t),data:t}),i||0===i?i:""}function l(e,t){var i="";return i+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+N(n(1).call(e,"Disconnecting server...",{hash:{},data:t}))+" </h4> "}function u(e,t){var n;return n=i.if.call(e,e&&e.isUnavailable,{hash:{},inverse:U.program(12,p,t),fn:U.program(7,c,t),data:t}),n||0===n?n:""}function c(e,t){var r,a="";return a+=' <h4 class="status-header text-danger">'+N(n(1).call(e,"Not available outside your network",{
hash:{},data:t}))+"</h4> ",r=i.if.call(e,e&&e.isSignedOut,{hash:{},inverse:U.program(10,h,t),fn:U.program(8,d,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function d(e,t){var i="";return i+=' <span class="status-description help-block">'+N(n(1).call(e,"First {1}sign in{2} to access your server from anywhere.",'<a class="sign-in-link" href="#">',"</a>",{hash:{},data:t}))+"</span> "}function h(e,t){var i="";return i+=' <span class="status-description help-block">'+N(n(1).call(e,"Enable to access your server from anywhere.",{
hash:{},data:t}))+'</span> <button class="remote-access-enable-btn btn btn-sm btn-primary">'+N(n(1).call(e,"Enable Remote Access",{hash:{},data:t}))+"</button> "}function p(e,t){var r,a="";return a+=" ",r=n(12).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"unreachable",{hash:{},inverse:U.program(19,y,t),fn:U.program(13,f,t),data:t}),(r||0===r)&&(a+=r),a+=' <button class="remote-access-disable-btn btn btn-sm btn-default">'+N(n(1).call(e,"Disable Remote Access",{hash:{},data:t
}))+"</button> ",r=i.if.call(e,(r=e&&e.mappingModeSetting,null==r||r===!1?r:r.value),{hash:{},inverse:U.noop,fn:U.program(21,b,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function f(e,t){var i,r="";return r+=' <h4 class="status-header text-danger">'+N(n(1).call(e,"Not available outside your network",{hash:{},data:t}))+'</h4> <span class="unreachable-description status-description help-block">'+N(n(1).call(e,"Your server is signed in to Plex, but is not reachable from outside your network. {1}Learn more{2}",'<a href="https://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server" target="_blank">',"</a>",{
hash:{},data:t}))+"</span> ",i=n(12).call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.mappingError),"jumboframes",{hash:{},inverse:U.program(16,v,t),fn:U.program(14,m,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function m(e,t){var i="";return i+=' <span class="jumbo-frames-description status-details help-block"> <span class="help-tip">'+N(n(1).call(e,"Tip:",{hash:{},data:t}))+"</span> "+N(n(1).call(e,'It looks like the devices between your server and the internet have "jumbo frames" enabled which can cause issues with remote access. Disable jumbo frames on at least one device and try again.',{
hash:{},data:t}))+" </span> "}function v(e,t){var i;return i=n(12).call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.mappingError),"doublenat",{hash:{},inverse:U.noop,fn:U.program(17,g,t),data:t}),i||0===i?i:""}function g(e,t){var i="";return i+=' <span class="double-nat-description status-details help-block"> <span class="help-tip">'+N(n(1).call(e,"Tip:",{hash:{},data:t}))+"</span> "+N(n(1).call(e,'It looks like your server may be connected to the internet through multiple routers or other network devices. Try connecting it directly to your primary device, or visit our support site for more information about troubleshooting this "Double-NAT" scenario. {1}Learn more{2}','<a href="https://support.plex.tv/hc/en-us/articles/200931138" target="_blank">',"</a>",{
hash:{},data:t}))+" </span> "}function y(e,t){var i="";return i+=' <h4 class="status-header status-header-single text-success">'+N(n(1).call(e,"Fully accessible outside your network",{hash:{},data:t}))+"</h4> "}function b(e,t){var i="";return i+=' <p class="remote-access-disable-message help-block"> <i class="remote-access-disable-warning-icon glyphicon circle-exclamation-mark"></i> '+N(n(1).call(e,"You currently have Remote Access enabled through a manually-specified port. If you wish to disable Remote Access, you will need to remove your manual port forwarding from your router.",{
hash:{},data:t}))+" </p> "}function w(e,t){var i,r="";return r+=" ",i=n(62).call(e,(i=e&&e.cloudAccount,null==i||i===!1?i:i.remoteAccessState),"disconnecting",{hash:{},inverse:U.noop,fn:U.program(24,S,t),data:t}),(i||0===i)&&(r+=i),r+=" "}function S(e,t){var r,a="";return a+=' <div class="remote-access-advanced"> <div class="remote-access-mapping-container ',r=i.unless.call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.mappingError),{hash:{},inverse:U.noop,fn:U.program(25,P,t),data:t}),(r||0===r)&&(a+=r),
a+='"> <hr> <h4 class="mapping-header">'+N(n(1).call(e,"Server Mapping",{hash:{},data:t}))+'</h4> <i class="plex-image server server-xs server-logo"></i> <div class="remote-access-mapping"> <span class="mapping-label text-muted">'+N(n(1).call(e,"Private",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',r=i.if.call(e,e&&e.hasPrivateAddress,{hash:{},inverse:U.program(29,C,t),fn:U.program(27,x,t),data:t}),(r||0===r)&&(a+=r),a+=" </span> ",r=i.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:U.program(33,_,t),
fn:U.program(31,T,t),data:t}),(r||0===r)&&(a+=r),a+=' <span class="mapping-label text-muted">'+N(n(1).call(e,"Public",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',r=i.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:U.program(29,C,t),fn:U.program(35,E,t),data:t}),(r||0===r)&&(a+=r),a+=" </span> ",r=n(12).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"ok",{hash:{},inverse:U.program(33,_,t),fn:U.program(31,T,t),data:t}),(r||0===r)&&(a+=r),a+=' <span class="mapping-internet ',
r=n(62).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"ok",{hash:{},inverse:U.noop,fn:U.program(37,k,t),data:t}),(r||0===r)&&(a+=r),a+='"> <i class="mapping-internet-icon glyphicon globe text-muted"></i> '+N(n(1).call(e,"Internet",{hash:{},data:t}))+" </span> </div> </div> ",r=i.if.call(e,e&&e.hasMappingSettings,{hash:{},inverse:U.noop,fn:U.program(39,I,t),data:t}),(r||0===r)&&(a+=r),a+=" </div> "}function P(e,t){return"advanced-setting"}function x(e,t){var i,r="";return r+=' <span class="mapping-value">'+N((i=e&&e.cloudAccount,
i=null==i||i===!1?i:i.privateAddress,typeof i===F?i.apply(e):i))+'</span> <span class="mapping-separator text-muted">'+N(n(1).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+N((i=e&&e.cloudAccount,i=null==i||i===!1?i:i.privatePort,typeof i===F?i.apply(e):i))+"</span> "}function C(e,t){var i="";return i+=' <span class="mapping-empty-value">'+N(n(1).call(e,"Unknown IP",{hash:{},data:t}))+"</span> "}function T(e,t){return' <i class="mapping-icon glyphicon left-arrow text-success"></i> ';
}function _(e,t){return' <i class="mapping-icon glyphicon remove-2 text-danger"></i> '}function E(e,t){var i,r="";return r+=' <span class="mapping-value">'+N((i=e&&e.cloudAccount,i=null==i||i===!1?i:i.publicAddress,typeof i===F?i.apply(e):i))+'</span> <span class="mapping-separator text-muted">'+N(n(1).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+N((i=e&&e.cloudAccount,i=null==i||i===!1?i:i.publicPort,typeof i===F?i.apply(e):i))+"</span> "}function k(e,t){return"unreachable";
}function I(e,t){var r,a="";return a+=' <div class="remote-access-error-container ',r=i.unless.call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.mappingError),{hash:{},inverse:U.noop,fn:U.program(25,P,t),data:t}),(r||0===r)&&(a+=r),a+='"> <div class="form-inline"> <div class="checkbox"> <label> <input type="checkbox" id="'+N((r=e&&e.mappingModeSetting,r=null==r||r===!1?r:r.id,typeof r===F?r.apply(e):r))+'" name="'+N((r=e&&e.mappingModeSetting,r=null==r||r===!1?r:r.id,typeof r===F?r.apply(e):r))+'" value="1" ',
r=i.if.call(e,(r=e&&e.mappingModeSetting,null==r||r===!1?r:r.value),{hash:{},inverse:U.noop,fn:U.program(40,A,t),data:t}),(r||0===r)&&(a+=r),a+="> "+N(n(1).call(e,"Manually specify public port",{hash:{},data:t}))+' </label> </div> <div class="form-group"> <input type="text" id="'+N((r=e&&e.mappingPortSetting,r=null==r||r===!1?r:r.id,typeof r===F?r.apply(e):r))+'" name="'+N((r=e&&e.mappingPortSetting,r=null==r||r===!1?r:r.id,typeof r===F?r.apply(e):r))+'" class="form-control" value="'+N((r=e&&e.mappingPortSetting,
r=null==r||r===!1?r:r.value,typeof r===F?r.apply(e):r))+'" ',r=i.unless.call(e,(r=e&&e.mappingModeSetting,null==r||r===!1?r:r.value),{hash:{},inverse:U.noop,fn:U.program(42,M,t),data:t}),(r||0===r)&&(a+=r),a+='> </div> <button class="retry-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',r=n(12).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"unreachable",{hash:{},inverse:U.program(46,R,t),fn:U.program(44,D,t),data:t}),(r||0===r)&&(a+=r),
a+='</span> </button> </div> <p class="help-block">'+N(n(1).call(e,"You may need to enable this to establish a direct connection from outside your network. You may also need to configure your router. Detailed instructions are available {1}here{2}.",'<a href="http://support.plex.tv/hc/en-us/articles/200931138-Troubleshooting-myPlex-Server-connections" target="_blank">',"</a>",{hash:{},data:t}))+"</p> </div> "}function A(e,t){return"checked"}function M(e,t){return"disabled"}function D(e,t){return N(n(1).call(e,"Retry",{
hash:{},data:t}))}function R(e,t){return N(n(1).call(e,"Apply",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var O,L="",N=this.escapeExpression,U=this,F="function";return L+='<i class="remote-access-status-icon glyphicon globe"></i> <div class="remote-access-status-message"> ',O=n(12).call(t,(O=t&&t.cloudAccount,null==O||O===!1?O:O.remoteAccessState),"connecting",{hash:{},inverse:U.program(3,o,a),fn:U.program(1,s,a),data:a}),(O||0===O)&&(L+=O),L+=" </div> ",
O=n(62).call(t,(O=t&&t.cloudAccount,null==O||O===!1?O:O.remoteAccessState),"connecting",{hash:{},inverse:U.noop,fn:U.program(23,w,a),data:a}),(O||0===O)&&(L+=O),L+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <div class="server-claim-container"> <div class="server-claim-info"> <h4>'+c(n(1).call(e,"This server is unclaimed and not secure",{hash:{},data:t}))+'</h4> <p class="help-block"> '+c(n(1).call(e,"Claiming this server will associate it with your Plex account. {1} This helps your devices find each other and helps keep your media safe.","<br>",{
hash:{},data:t}))+' </p> </div> <button class="server-claim-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(1).call(e,"Claim Server",{hash:{},data:t}))+"</span> </button> </div> "}function o(e,t){var i="";return i+=' <form id="server-sign-in-form" class="form-inline"> <div class="form-group"> <input type="text" class="form-control" name="username" placeholder="'+c(n(1).call(e,"Username or email",{hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> </div> <div class="form-group"> <input type="password" class="form-control" name="password" placeholder="'+c(n(1).call(e,"Password",{
hash:{},data:t}))+'"> </div> <button type="submit" class="server-sign-in-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(1).call(e,"Sign In",{hash:{},data:t}))+'</span> </button> <p class="help-block">'+c(n(1).call(e,"Sign in with your Plex account to help your devices find this server, access your media remotely, and more. {1}Learn more{2}",'<a href="https://support.plex.tv/hc/en-us/articles/200484543-Connecting-a-Server">',"</a>",{hash:{},data:t
}))+"</p> </form> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="server-account-poster user-poster img-circle placeholder-friend"> <i class="server-signedout-icon plex-icon-alert-560"></i> </div> <div class="server-account-info"> <div class="server-account-user"> <div class="server-account-label">'+c(n(1).call(t,"Server signed in as",{hash:{},data:a}))+'</div> <div class="server-account-username"></div> </div> <button class="server-sign-out-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(1).call(t,"Sign Out",{
hash:{},data:a}))+"</span> </button> </div> ",l=i.if.call(t,t&&t.showClaimMessage,{hash:{},inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this,c=this.escapeExpression;return l+='<a href="#" class="check-for-updates-btn label label-btn label-primary ',o=i.unless.call(t,t&&t.canCheckForUpdate,{
hash:{},inverse:u.noop,fn:u.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='"> <i class="label-icon glyphicon upload"></i> '+c(n(1).call(t,"Check for Updates",{hash:{},data:a}))+' </a> <a href="#" class="checking-for-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+c(n(1).call(t,"Checking for Updates",{hash:{},data:a}))+' </a> <a href="#" class="available-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+c(n(1).call(t,"Download Updates",{
hash:{},data:a}))+' </a> <span class="downloading-updates-container label label-btn label-progress active"> <i class="label-icon glyphicon download"></i> '+c(n(1).call(t,"Downloading Update",{hash:{},data:a}))+' <span class="downloading-progress-container hidden">(<span class="downloading-progress-label"></span>%)</span ></span> <a href="#" class="install-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+c(n(1).call(t,"Install Update",{hash:{},data:a}))+' </a> <a href="#" class="installing-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+c(n(1).call(t,"Installing",{
hash:{},data:a}))+' </a> <span class="install-info-label up-to-date-label"> <i class="success-icon glyphicon ok-2"></i> '+c(n(1).call(t,"Up to date",{hash:{},data:a}))+' </span> <span class="install-info-label install-error-label"> <i class="failure-icon glyphicon circle-exclamation-mark"></i> <span class="update-error-message"></span> <a class="install-manual-link" href="https://plex.tv/downloads" target="_blank">'+c(n(1).call(t,"Please install manually.",{hash:{},data:a}))+'</a> </span> <a href="#" class="release-notes-btn label label-btn label-default"> <i class="label-icon glyphicon circle-info"></i> '+c(n(1).call(t,"What's New",{
hash:{},data:a}))+" </a> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=" "+h(n(1).call(e,"Optimized Versions requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" "}function o(e,t){var n;return n=i.if.call(e,e&&e.isTranscoderRequired,{hash:{},inverse:p.program(6,u,t),fn:p.program(4,l,t),data:t}),n||0===n?n:""}function l(e,t){var i="";return i+=" "+h(n(1).call(e,"This Plex Media Server platform is not capable of converting video.",{
hash:{},data:t}))+" "}function u(e,t){var i="";return i+=" "+h(n(1).call(e,"There was a problem requesting media versions from this server.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var c,d="",h=this.escapeExpression,p=this;return d+='<div class="row row-padded"> <h4 class="text-muted text-center"> ',c=i.if.call(t,t&&t.isUpgradeRequired,{hash:{},inverse:p.program(3,o,a),fn:p.program(1,s,a),data:a}),(c||0===c)&&(d+=c),d+=" </h4> </div> "})},function(e,t,n){
var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<p class="versions-status-message hidden"> <button class="delete-all-btn btn btn-sm btn-danger pull-right">'+o(n(1).call(t,"Delete All Versions",{hash:{},data:a}))+"</button> "+o(n(1).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{hash:{},data:a}))+' </p> <div class="background-processing-list-region"></div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=' <div class="filter-bar-right"> <button class="toggle-advanced-btn btn btn-sm btn-default basic-setting">'+u(n(1).call(e,"Show Advanced",{hash:{},data:t}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default advanced-setting">'+u(n(1).call(e,"Hide Advanced",{hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};
var o,l="",u=this.escapeExpression,c=this;return l+='<div class="filter-bar"> ',o=i.unless.call(t,t&&t.shared,{hash:{},inverse:c.noop,fn:c.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+=' </div> <div class="settings-row row"> <div class="nav-region col-sm-4 col-md-3"></div> <div class="pane-region col-sm-8 col-md-9"></div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i,r="";return r+=' <div class="setup-basic-form-group form-group"> <p class="text-muted"> '+c(n(1).call(e,"Give it a friendly name to help identify it in Plex apps and on your network.",{
hash:{},data:t}))+' </p> <input type="text" id="'+c((i=e&&e.friendlyNameSetting,i=null==i||i===!1?i:i.id,typeof i===d?i.apply(e):i))+'" class="form-control" value="'+c((i=e&&e.friendlyNameSetting,i=null==i||i===!1?i:i.value,typeof i===d?i.apply(e):i))+'" placeholder="'+c((i=e&&e.server,i=null==i||i===!1?i:i.friendlyName,typeof i===d?i.apply(e):i))+'"> </div> '}function o(e,t){var i,r="";return r+=' <div class="setup-basic-form-group form-group"> <div class="publish-checkbox checkbox"> <label for="'+c((i=e&&e.publishSetting,
i=null==i||i===!1?i:i.id,typeof i===d?i.apply(e):i))+'"> <input type="checkbox" id="'+c((i=e&&e.publishSetting,i=null==i||i===!1?i:i.id,typeof i===d?i.apply(e):i))+'" checked> '+c(n(1).call(e,"Allow me to access my media outside my home",{hash:{},data:t}))+' </label> </div> <p class="text-muted"> '+c(n(1).call(e,"Plex will attempt to automatically configure your network to allow access to your Plex Media Server from Plex apps outside your home.",{hash:{},data:t}))+" </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],
i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d="function",h=this;return u+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+c(n(1).call(t,"Great, we found a server!",{hash:{},data:a}))+'</h4> <form id="setup-basic-form" class="settings-container"> ',l=i.if.call(t,t&&t.friendlyNameSetting,{hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" ",l=i.if.call(t,t&&t.publishSetting,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(l||0===l)&&(u+=l),
u+=' <div class="setup-footer"> <button type="submit" class="submit-btn btn btn-primary btn-loading btn-lg"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(1).call(t,"Next",{hash:{},data:a}))+'</span> </button> <button class="next-btn hidden" data-subset="setupLibrary"></button> </div> </form> </div> </div> <div class="modal-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var r,a="";return a+=' <div class="checkbox"> <label for="'+d((r=e&&e.collectUsageDataSetting,
r=null==r||r===!1?r:r.id,typeof r===c?r.apply(e):r))+'"> <input type="checkbox" id="'+d((r=e&&e.collectUsageDataSetting,r=null==r||r===!1?r:r.id,typeof r===c?r.apply(e):r))+'" name="'+d((r=e&&e.collectUsageDataSetting,r=null==r||r===!1?r:r.id,typeof r===c?r.apply(e):r))+'" value="1" ',r=i.if.call(e,(r=e&&e.collectUsageDataSetting,null==r||r===!1?r:r.value),{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+="> "+d(n(1).call(e,"Send anonymous usage data to Plex",{hash:{},data:t
}))+' </label> </div> <p class="setup-complete-help text-muted"> '+d(n(1).call(e,"Help us improve everyone's Plex experience by sending anonymous usage data.",{hash:{},data:t}))+" </p> "}function o(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c="function",d=this.escapeExpression,h=this;return u+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <div class="setup-apps-container"> <img class="setup-apps-image" src="'+d((l=t&&t.devicesImage,
typeof l===c?l.apply(t):l))+'"> <a href="https://plex.tv/downloads" target="_blank" class="btn btn-default btn-lg">'+d(n(1).call(t,"Get Plex Apps",{hash:{},data:a}))+'</a> </div> <p class="text-muted">'+d(n(1).call(t,"All set! Your Plex Media Server is working hard to find your media and make it beautiful. Grab the Plex app for all your favorite devices to get the most out of Plex and start streaming everywhere!",{hash:{},data:a}))+'</p> <form id="setup-complete-form" class="settings-container"> ',
l=i.if.call(t,t&&t.collectUsageDataSetting,{hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=' <div class="setup-footer setup-done-footer"> <button class="next-btn btn btn-default btn-lg" data-subset="setupLibrary">'+d(n(1).call(t,"Back",{hash:{},data:a}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading btn-lg"> <div class="loading loading-sm"></div> <span class="btn-label">'+d(n(1).call(t,"Done",{hash:{},data:a}))+'</span> </button> <button class="done-btn btn btn-primary btn-lg hidden"></button> </div> </form> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var i="";return i+=" <h1>"+c(n(1).call(e,"Setup is not allowed for shared servers.",{hash:{},data:t}))+"</h1> "}function o(e,t){var i="";return i+=" <h1>"+c(n(1).call(e,"A problem has been detected with a core component of Plex Media Server.",{hash:{},data:t}))+'</h1> <h2 class="text-muted">'+c(n(1).call(e,"Please visit the {1}forums{2} and provide your logs, as described {3}here{4}.",'<a href="https://forums.plex.tv" target="_blank">',"</a>",'<a href="http://support.plex.tv/hc/en-us/articles/200250417-Log-File-Locations" target="_blank">',"</a>",{
hash:{},data:t}))+"</h2> "}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c=this.escapeExpression,d=this;return u+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> ',l=i.if.call(t,t&&t.shared,{hash:{},inverse:d.program(3,o,a),fn:d.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;
return s+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+o(n(1).call(t,"Organize Your Media",{hash:{},data:a}))+'</h4> <p class="text-muted">'+o(n(1).call(t,"Plex organizes your media into libraries. You can add as many libraries as you want, and you can have multiple libraries with the same type.",{hash:{},data:a}))+'</p> <p class="setup-add-section-container"> <button class="add-section-btn btn btn-default">'+o(n(1).call(t,"Add Library",{hash:{},data:a}))+'</button> </p> <div class="setup-section-list-container"></div> <div class="setup-footer"> <button class="next-btn btn btn-default btn-lg" data-subset="setupBasic">'+o(n(1).call(t,"Back",{
hash:{},data:a}))+'</button> <button class="next-btn btn btn-primary btn-lg" data-subset="setupComplete">'+o(n(1).call(t,"Next",{hash:{},data:a}))+"</button> </div> </div> </div> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="loading loading-inline"></div> <p class="loading-title">'+o(n(1).call(t,"Please wait a moment while Plex starts.",{
hash:{},data:a}))+"</p> "})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="setup-header row hidden"> <div class="col-sm-6 col-sm-offset-3"> <div class="sign-in-logo text-center"> <i class="plex-image logo"></i> </div> <h2>'+o(n(1).call(t,"Server Setup",{hash:{},data:a}))+'</h2> <div class="setup-progress"> <div class="basic-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupBasic" href="#">'+o(n(1).call(t,"Name",{
hash:{},data:a}))+'</a> </div> <div class="library-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupLibrary" href="#">'+o(n(1).call(t,"Media Library",{hash:{},data:a}))+'</a> </div> <div class="complete-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupComplete" href="#">'+o(n(1).call(t,"Finish",{hash:{},data:a}))+'</a> </div> </div> </div> </div> <div class="setup-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){
this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+='<div class="side-bar-page main-page minimal-scroll"> <div class="section-sort-container"> <h5>'+o(n(1).call(t,"Sort",{hash:{},data:a}))+'</h5> <div class="section-sort-list-container"></div> </div> </div>'})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var o,l="",u=this,c=this.escapeExpression;
return l+='<div class="side-bar-page main-page dark-scrollbar"> <div class="section-current-filters-container"> <div class="side-bar-actions"> <a class="new-filter-icon-btn new-filter-btn btn-gray ',o=i.unless.call(t,t&&t.showNewFilterIconBtn,{hash:{},inverse:u.noop,fn:u.program(1,s,a),data:a}),(o||0===o)&&(l+=o),l+='" href="#"><i class="glyphicon plus"></i></a> </div> <h5>'+c(n(1).call(t,"Filters",{hash:{},data:a}))+'</h5> <div class="section-current-filters-list-container"></div> </div> <div class="section-sort-container hidden"> <h5>'+c(n(1).call(t,"Sort",{
hash:{},data:a}))+'</h5> <div class="section-sort-list-container"></div> </div> </div> <div class="side-bar-page filters-page dark-scrollbar"> <div class="section-filters-container"> <div class="side-bar-actions"> <a class="hide-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> </div> <h5>'+c(n(1).call(t,"Select A Filter",{hash:{},data:a}))+'</h5> <div class="section-filters-list-container"></div> </div> </div> <div class="side-bar-page filter-options-page dark-scrollbar"> <div class="section-filter-options-container"> <div class="side-bar-actions"> <a class="hide-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> </div> <h5 class="filter-options-header"></h5> <div class="section-filter-option-list-container"></div> </div> </div> ';
})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s="",o=this.escapeExpression;return s+="<h2>"+o(n(1).call(t,"Announcements",{hash:{},data:a}))+'</h2> <div class="announcements-container"></div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var s,o="",l=this.escapeExpression,u="function";
return o+="<h2>"+l(n(1).call(t,"Watch Later Help",{hash:{},data:a}))+'</h2> <div class="filter-bar"> <h4>'+l(n(1).call(t,"Add videos from your browser",{hash:{},data:a}))+'</h4> </div> <div class="row text-muted"> <div class="col-md-5"> <div class="text-center"> <a class="btn btn-primary btn-lg btn-plexit" href="javascript:(function(d){var s=d.createElement(\'script\');s.type=\'text/javascript\';s.src=\'//plex.tv/queue/bookmarklet_payload\';var h=d.getElementsByTagName(\'head\')[0];h.appendChild(s);}(document))"><span class="plexit-hidden">\u276f</span> Plex It!</a> </div> <ol class="steps-list"> <li>'+l((s=t&&t.firstStepText,
typeof s===u?s.apply(t):s))+"</li> <li>"+l(n(1).call(t,'To save a video to Watch Later, click "Plex It!" in your Bookmarks Bar.',{hash:{},data:a}))+"</li> <li>"+l(n(1).call(t,"A panel will appear on the left side of the page to let you know the video has been saved.",{hash:{},data:a}))+"</li> <li>"+l(n(1).call(t,'You can also recommend the video to friends or "fling" it to a Plex player and watch it there.',{hash:{},data:a}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="plexit-img" src="'+l((s=t&&t.stepsImgSrc,
typeof s===u?s.apply(t):s))+'"/> </div> </div> <div class="filter-bar"> <h4>'+l(n(1).call(t,"Add videos by email",{hash:{},data:a}))+'</h4> </div> <div class="row text-muted"> <div class="col-md-5"> <div class="queue-email form-control input-lg disabled" title="'+l((s=t&&t.copyCommand,typeof s===u?s.apply(t):s))+'" tabindex="-1">'+l((s=t&&t.queueEmail,typeof s===u?s.apply(t):s))+'</div> <ol class="steps-list"> <li>'+l(n(1).call(t,"Send an email to the address above with any link(s) you want added to Watch Later.",{
hash:{},data:a}))+"</li> <li>"+l(n(1).call(t,"Add this to your address book so you can easily email links from your iPhone, iPad, Android, or any other device.",{hash:{},data:a}))+'</li> </ol> </div> <div class="col-md-7 text-right"> <img class="email-links" src="'+l((s=t&&t.emailImgSrc,typeof s===u?s.apply(t):s))+'"/> </div> </div> '})},function(e,t,n){var i=n(4);e.exports=(i.default||i).template(function(e,t,i,r,a){function s(e,t){var n,i="";return i+=' <li><a class="'+d((n=e&&e.subset,typeof n===c?n.apply(e):n))+'-btn btn-gray" href="#!/playlist/'+d((n=e&&e.key,
typeof n===c?n.apply(e):n))+"/"+d((n=e&&e.subset,typeof n===c?n.apply(e):n))+'">'+d((n=e&&e.title,typeof n===c?n.apply(e):n))+'<span class="badge"></span></a></li> '}function o(e,t){var n,i="";return i+=' <a class="user-playlist-help" href="'+d((n=e&&e.helpRoute,typeof n===c?n.apply(e):n))+'" target="'+d((n=e&&e.defaultTarget,typeof n===c?n.apply(e):n))+'"><i class="glyphicon circle-question-mark"></i></a> '}this.compilerInfo=[4,">= 1.0.0"],i=this.merge(i,e.helpers),a=a||{};var l,u="",c="function",d=this.escapeExpression,h=this;
return u+='<ul class="nav nav-header pull-right"> ',l=i.each.call(t,t&&t.filters,{hash:{},inverse:h.noop,fn:h.program(1,s,a),data:a}),(l||0===l)&&(u+=l),u+=" </ul> <h2> "+d(n(1).call(t,t&&t.label,{hash:{},data:a}))+" ",l=i.if.call(t,t&&t.helpRoute,{hash:{},inverse:h.noop,fn:h.program(3,o,a),data:a}),(l||0===l)&&(u+=l),u+=' </h2> <div class="user-playlist-container"></div> '})},function(e,t,n){"use strict";function i(e){var t=e&&e[0]||1,n=d;if(t!==n){if(t<n){var i=h[n],r=h[t];throw new c("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+r+").");
}throw new c("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function r(e,t){if(!t)throw new c("No environment passed to template");var n=function(e,n,i,r,a,s){var o=t.VM.invokePartial.apply(this,arguments);if(null!=o)return o;if(t.compile){var l={helpers:r,partials:a,data:s};return a[n]=t.compile(e,{data:void 0!==s},t),a[n](i,l)}throw new c("The partial "+n+" could not be compiled when running in runtime-only mode");
},i={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var i=this.programs[e];return n?i=s(e,t,n):i||(i=this.programs[e]=s(e,t)),i},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},u.extend(n,t),u.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,r){r=r||{};var a,s,o=r.partial?r:t;r.partial||(a=r.helpers,s=r.partials);var l=e.call(i,o,n,a,s,r.data);return r.partial||t.VM.checkRevision(i.compilerInfo),
l}}function a(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=function(e,r){return r=r||{},t.apply(this,[e,r.data||n].concat(i))};return r.program=e,r.depth=i.length,r}function s(e,t,n){var i=function(e,i){return i=i||{},t(e,i.data||n)};return i.program=e,i.depth=0,i}function o(e,t,n,i,r,a){var s={partial:!0,helpers:i,partials:r,data:a};if(void 0===e)throw new c("The partial "+t+" could not be found");if(e instanceof Function)return e(n,s)}function l(){return""}var u=n(354),c=n(353).default,d=n(352).COMPILER_REVISION,h=n(352).REVISION_CHANGES;
t.checkRevision=i,t.template=r,t.programWithDepth=a,t.program=s,t.invokePartial=o,t.noop=l},function(e,t){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var r=Object.getOwnPropertyNames(t),a=0;a<r.length;++a)n[r[a]]||i[r[a]]||(e[r[a]]=t[r[a]]);return e}},function(e,t){(function(){window.Modernizr=function(e,t,n){
function i(e){g.cssText=e}function r(e,t){return typeof e===t}function a(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var i in e){var r=e[i];if(!a(r,"-")&&g[r]!==n)return"pfx"!=t||r}return!1}function o(e,t,i){for(var a in e){var s=t[e[a]];if(s!==n)return i===!1?e[a]:r(s,"function")?s.bind(i||t):s}return!1}function l(e,t,n){var i=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+w.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?s(a,t):(a=(e+" "+S.join(i+" ")+i).split(" "),o(a,t,n));
}var u,c,d,h="2.8.3",p={},f=t.documentElement,m="modernizr",v=t.createElement(m),g=v.style,y=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),b="Webkit Moz O ms",w=b.split(" "),S=b.toLowerCase().split(" "),P={},x=[],C=x.slice,T=function(e,n,i,r){var a,s,o,l,u=t.createElement("div"),c=t.body,d=c||t.createElement("body");if(parseInt(i,10))for(;i--;)o=t.createElement("div"),o.id=r?r[i]:m+(i+1),u.appendChild(o);return a=["&#173;",'<style id="s',m,'">',e,"</style>"].join(""),u.id=m,(c?u:d).innerHTML+=a,
d.appendChild(u),c||(d.style.background="",d.style.overflow="hidden",l=f.style.overflow,f.style.overflow="hidden",f.appendChild(d)),s=n(u,e),c?u.parentNode.removeChild(u):(d.parentNode.removeChild(d),f.style.overflow=l),!!s},_={}.hasOwnProperty;d=r(_,"undefined")||r(_.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(e,t){return _.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;
var n=C.call(arguments,1),i=function(){if(this instanceof i){var r=function(){};r.prototype=t.prototype;var a=new r,s=t.apply(a,n.concat(C.call(arguments)));return Object(s)===s?s:a}return t.apply(e,n.concat(C.call(arguments)))};return i}),P.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in f.style&&T("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=9===t.offsetLeft&&3===t.offsetHeight}),e};for(var E in P)d(P,E)&&(c=E.toLowerCase(),
p[c]=P[E](),x.push((p[c]?"":"no-")+c));return p.addTest=function(e,t){if("object"==typeof e)for(var i in e)d(e,i)&&p.addTest(i,e[i]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof enableClasses&&enableClasses&&(f.className+=" "+(t?"":"no-")+e),p[e]=t}return p},i(""),v=u=null,p._version=h,p._prefixes=y,p._domPrefixes=S,p._cssomPrefixes=w,p.testProp=function(e){return s([e])},p.testAllProps=l,p.testStyles=T,p}(this,this.document),e.exports=window.Modernizr;
}).call(window)},function(e,t){(function(n){var i={},r="undefined"!=typeof e&&e.exports&&"undefined"!=typeof n?n:this||i;(r._gsQueue||(r._gsQueue=[])).push(function(){"use strict";r._gsDefine("easing.Back",["easing.Ease"],function(e){var t,n,i,a=r.GreenSockGlobals||r,s=a.com.greensock,o=2*Math.PI,l=Math.PI/2,u=s._class,c=function(t,n){var i=u("easing."+t,function(){},!0),r=i.prototype=new e;return r.constructor=i,r.getRatio=n,i},d=e.register||function(){},h=function(e,t,n,i,r){var a=u("easing."+e,{
easeOut:new t,easeIn:new n,easeInOut:new i},!0);return d(a,e),a},p=function(e,t,n){this.t=e,this.v=t,n&&(this.next=n,n.prev=this,this.c=n.v-t,this.gap=n.t-e)},f=function(t,n){var i=u("easing."+t,function(e){this._p1=e||0===e?e:1.70158,this._p2=1.525*this._p1},!0),r=i.prototype=new e;return r.constructor=i,r.getRatio=n,r.config=function(e){return new i(e)},i},m=h("Back",f("BackOut",function(e){return(e-=1)*e*((this._p1+1)*e+this._p1)+1}),f("BackIn",function(e){return e*e*((this._p1+1)*e-this._p1)}),f("BackInOut",function(e){
return(e*=2)<1?.5*e*e*((this._p2+1)*e-this._p2):.5*((e-=2)*e*((this._p2+1)*e+this._p2)+2)})),v=u("easing.SlowMo",function(e,t,n){t=t||0===t?t:.7,null==e?e=.7:e>1&&(e=1),this._p=1!==e?t:0,this._p1=(1-e)/2,this._p2=e,this._p3=this._p1+this._p2,this._calcEnd=n===!0},!0),g=v.prototype=new e;return g.constructor=v,g.getRatio=function(e){var t=e+(.5-e)*this._p;return e<this._p1?this._calcEnd?1-(e=1-e/this._p1)*e:t-(e=1-e/this._p1)*e*e*e*t:e>this._p3?this._calcEnd?1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcEnd?1:t;
},v.ease=new v(.7,.7),g.config=v.config=function(e,t,n){return new v(e,t,n)},t=u("easing.SteppedEase",function(e){e=e||1,this._p1=1/e,this._p2=e+1},!0),g=t.prototype=new e,g.constructor=t,g.getRatio=function(e){return e<0?e=0:e>=1&&(e=.999999999),(this._p2*e>>0)*this._p1},g.config=t.config=function(e){return new t(e)},n=u("easing.RoughEase",function(t){t=t||{};for(var n,i,r,a,s,o,l=t.taper||"none",u=[],c=0,d=0|(t.points||20),h=d,f=t.randomize!==!1,m=t.clamp===!0,v=t.template instanceof e?t.template:null,g="number"==typeof t.strength?.4*t.strength:.4;--h>-1;)n=f?Math.random():1/d*h,
i=v?v.getRatio(n):n,"none"===l?r=g:"out"===l?(a=1-n,r=a*a*g):"in"===l?r=n*n*g:n<.5?(a=2*n,r=a*a*.5*g):(a=2*(1-n),r=a*a*.5*g),f?i+=Math.random()*r-.5*r:h%2?i+=.5*r:i-=.5*r,m&&(i>1?i=1:i<0&&(i=0)),u[c++]={x:n,y:i};for(u.sort(function(e,t){return e.x-t.x}),o=new p(1,1,null),h=d;--h>-1;)s=u[h],o=new p(s.x,s.y,o);this._prev=new p(0,0,0!==o.t?o:o.next)},!0),g=n.prototype=new e,g.constructor=n,g.getRatio=function(e){var t=this._prev;if(e>t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&e<=t.t;)t=t.prev;
return this._prev=t,t.v+(e-t.t)/t.gap*t.c},g.config=function(e){return new n(e)},n.ease=new n,h("Bounce",c("BounceOut",function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),c("BounceIn",function(e){return(e=1-e)<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),c("BounceInOut",function(e){var t=e<.5;return e=t?1-2*e:2*e-1,
e=e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,t?.5*(1-e):.5*e+.5})),h("Circ",c("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),c("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),c("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),i=function(t,n,i){var r=u("easing."+t,function(e,t){this._p1=e>=1?e:1,this._p2=(t||i)/(e<1?e:1),this._p3=this._p2/o*(Math.asin(1/this._p1)||0),
this._p2=o/this._p2},!0),a=r.prototype=new e;return a.constructor=r,a.getRatio=n,a.config=function(e,t){return new r(e,t)},r},h("Elastic",i("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),i("ElasticIn",function(e){return-(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2))},.3),i("ElasticInOut",function(e){return(e*=2)<1?-.5*(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(e-=1))*Math.sin((e-this._p3)*this._p2)*.5+1;
},.45)),h("Expo",c("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),c("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),c("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),h("Sine",c("SineOut",function(e){return Math.sin(e*l)}),c("SineIn",function(e){return-Math.cos(e*l)+1}),c("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),u("easing.EaseLookup",{find:function(t){return e.map[t]}},!0),d(a.SlowMo,"SlowMo","ease,"),d(n,"RoughEase","ease,"),
d(t,"SteppedEase","ease,"),m},!0)}),r._gsDefine&&r._gsQueue.pop()(),t.Power1=Power1,t.Power2=Power2,t.Power3=Power3}).call(t,function(){return this}())},function(e,t,n){var i,r;(function(a){var s={};/*!
	 * VERSION: 1.18.1
	 * DATE: 2015-12-11
	 * UPDATES AND DOCS AT: http://greensock.com
	 *
	 * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
	 * This work is subject to the terms at http://greensock.com/standard-license or for
	 * Club GreenSock members, the software agreement that was issued with your membership.
	 *
	 * @author: Jack Doyle, jack@greensock.com
	 */
!function(a,s){"use strict";var o=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!o.TweenLite){var l,u,c,d,h,p=function(e){var t,n=e.split("."),i=o;for(t=0;t<n.length;t++)i[n[t]]=i=i[n[t]]||{};return i},f=p("com.greensock"),m=1e-10,v=function(e){var t,n=[],i=e.length;for(t=0;t!==i;n.push(e[t++]));return n},g=function(){},y=function(){var e=Object.prototype.toString,t=e.call([]);return function(n){return null!=n&&(n instanceof Array||"object"==typeof n&&!!n.push&&e.call(n)===t)}}(),b={},w=function(a,l,u,c){
this.sc=b[a]?b[a].sc:[],b[a]=this,this.gsClass=null,this.func=u;var d=[];this.check=function(h){for(var f,m,v,g,y,S=l.length,P=S;--S>-1;)(f=b[l[S]]||new w(l[S],[])).gsClass?(d[S]=f.gsClass,P--):h&&f.sc.push(this);if(0===P&&u)for(m=("com.greensock."+a).split("."),v=m.pop(),g=p(m.join("."))[v]=this.gsClass=u.apply(u,d),c&&(o[v]=g,y="undefined"!=typeof e&&e.exports,!y&&n(2014)?(i=[],r=function(){return g}.apply(t,i),!(void 0!==r&&(e.exports=r))):a===s&&y&&(e.exports=g)),S=0;S<this.sc.length;S++)this.sc[S].check();
},this.check(!0)},S=a._gsDefine=function(e,t,n,i){return new w(e,t,n,i)},P=f._class=function(e,t,n){return t=t||function(){},S(e,[],function(){return t},n),t};S.globals=o;var x=[0,0,1,1],C=[],T=P("easing.Ease",function(e,t,n,i){this._func=e,this._type=n||0,this._power=i||0,this._params=t?x.concat(t):x},!0),_=T.map={},E=T.register=function(e,t,n,i){for(var r,a,s,o,l=t.split(","),u=l.length,c=(n||"easeIn,easeOut,easeInOut").split(",");--u>-1;)for(a=l[u],r=i?P("easing."+a,null,!0):f.easing[a]||{},s=c.length;--s>-1;)o=c[s],
_[a+"."+o]=_[o+a]=r[o]=e.getRatio?e:e[o]||new e};for(c=T.prototype,c._calcEnd=!1,c.getRatio=function(e){if(this._func)return this._params[0]=e,this._func.apply(null,this._params);var t=this._type,n=this._power,i=1===t?1-e:2===t?e:e<.5?2*e:2*(1-e);return 1===n?i*=i:2===n?i*=i*i:3===n?i*=i*i*i:4===n&&(i*=i*i*i*i),1===t?1-i:2===t?i:e<.5?i/2:1-i/2},l=["Linear","Quad","Cubic","Quart","Quint,Strong"],u=l.length;--u>-1;)c=l[u]+",Power"+u,E(new T(null,null,1,u),c,"easeOut",!0),E(new T(null,null,2,u),c,"easeIn"+(0===u?",easeNone":"")),
E(new T(null,null,3,u),c,"easeInOut");_.linear=f.easing.Linear.easeIn,_.swing=f.easing.Quad.easeInOut;var k=P("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});c=k.prototype,c.addEventListener=function(e,t,n,i,r){r=r||0;var a,s,o=this._listeners[e],l=0;for(null==o&&(this._listeners[e]=o=[]),s=o.length;--s>-1;)a=o[s],a.c===t&&a.s===n?o.splice(s,1):0===l&&a.pr<r&&(l=s+1);o.splice(l,0,{c:t,s:n,up:i,pr:r}),this!==d||h||d.wake()},c.removeEventListener=function(e,t){var n,i=this._listeners[e];
if(i)for(n=i.length;--n>-1;)if(i[n].c===t)return void i.splice(n,1)},c.dispatchEvent=function(e){var t,n,i,r=this._listeners[e];if(r)for(t=r.length,n=this._eventTarget;--t>-1;)i=r[t],i&&(i.up?i.c.call(i.s||n,{type:e,target:n}):i.c.call(i.s||n))};var I=a.requestAnimationFrame,A=a.cancelAnimationFrame,M=Date.now||function(){return(new Date).getTime()},D=M();for(l=["ms","moz","webkit","o"],u=l.length;--u>-1&&!I;)I=a[l[u]+"RequestAnimationFrame"],A=a[l[u]+"CancelAnimationFrame"]||a[l[u]+"CancelRequestAnimationFrame"];
P("Ticker",function(e,t){var n,i,r,a,s,o=this,l=M(),u=!(t===!1||!I)&&"auto",c=500,p=33,f="tick",v=function(e){var t,u,d=M()-D;d>c&&(l+=d-p),D+=d,o.time=(D-l)/1e3,t=o.time-s,(!n||t>0||e===!0)&&(o.frame++,s+=t+(t>=a?.004:a-t),u=!0),e!==!0&&(r=i(v)),u&&o.dispatchEvent(f)};k.call(o),o.time=o.frame=0,o.tick=function(){v(!0)},o.lagSmoothing=function(e,t){c=e||1/m,p=Math.min(t,c,0)},o.sleep=function(){null!=r&&(u&&A?A(r):clearTimeout(r),i=g,r=null,o===d&&(h=!1))},o.wake=function(e){null!==r?o.sleep():e?l+=-D+(D=M()):o.frame>10&&(D=M()-c+5),
i=0===n?g:u&&I?I:function(e){return setTimeout(e,1e3*(s-o.time)+1|0)},o===d&&(h=!0),v(2)},o.fps=function(e){return arguments.length?(n=e,a=1/(n||60),s=this.time+a,void o.wake()):n},o.useRAF=function(e){return arguments.length?(o.sleep(),u=e,void o.fps(n)):u},o.fps(e),setTimeout(function(){"auto"===u&&o.frame<5&&"hidden"!==document.visibilityState&&o.useRAF(!1)},1500)}),c=f.Ticker.prototype=new f.events.EventDispatcher,c.constructor=f.Ticker;var R=P("core.Animation",function(e,t){if(this.vars=t=t||{},
this._duration=this._totalDuration=e||0,this._delay=Number(t.delay)||0,this._timeScale=1,this._active=t.immediateRender===!0,this.data=t.data,this._reversed=t.reversed===!0,J){h||d.wake();var n=this.vars.useFrames?X:J;n.add(this,n._time),this.vars.paused&&this.paused(!0)}});d=R.ticker=new f.Ticker,c=R.prototype,c._dirty=c._gc=c._initted=c._paused=!1,c._totalTime=c._time=0,c._rawPrevTime=-1,c._next=c._last=c._onUpdate=c._timeline=c.timeline=null,c._paused=!1;var O=function(){h&&M()-D>2e3&&d.wake(),
setTimeout(O,2e3)};O(),c.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},c.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},c.resume=function(e,t){return null!=e&&this.seek(e,t),this.paused(!1)},c.seek=function(e,t){return this.totalTime(Number(e),t!==!1)},c.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,t!==!1,!0)},c.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1);
},c.render=function(e,t,n){},c.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},c.isActive=function(){var e,t=this._timeline,n=this._startTime;return!t||!this._gc&&!this._paused&&t.isActive()&&(e=t.rawTime())>=n&&e<n+this.totalDuration()/this._timeScale},c._enabled=function(e,t){return h||d.wake(),this._gc=!e,this._active=this.isActive(),t!==!0&&(e&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!e&&this.timeline&&this._timeline._remove(this,!0)),
!1},c._kill=function(e,t){return this._enabled(!1,!1)},c.kill=function(e,t){return this._kill(e,t),this},c._uncache=function(e){for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},c._swapSelfInParams=function(e){for(var t=e.length,n=e.concat();--t>-1;)"{self}"===e[t]&&(n[t]=this);return n},c._callback=function(e){var t=this.vars;t[e].apply(t[e+"Scope"]||t.callbackScope||this,t[e+"Params"]||C)},c.eventCallback=function(e,t,n,i){if("on"===(e||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[e];
null==t?delete r[e]:(r[e]=t,r[e+"Params"]=y(n)&&n.join("").indexOf("{self}")!==-1?this._swapSelfInParams(n):n,r[e+"Scope"]=i),"onUpdate"===e&&(this._onUpdate=t)}return this},c.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},c.duration=function(e){return arguments.length?(this._duration=this._totalDuration=e,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==e&&this.totalTime(this._totalTime*(e/this._duration),!0),
this):(this._dirty=!1,this._duration)},c.totalDuration=function(e){return this._dirty=!1,arguments.length?this.duration(e):this._totalDuration},c.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},c.totalTime=function(e,t,n){if(h||d.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!n&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var i=this._totalDuration,r=this._timeline;
if(e>i&&!n&&(e=i),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?i-e:e)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===e&&0!==this._duration||(j.length&&ee(),this.render(e,t,!1),j.length&&ee())}return this},c.progress=c.totalProgress=function(e,t){var n=this.duration();return arguments.length?this.totalTime(n*e,t):n?this._time/n:this.ratio;
},c.startTime=function(e){return arguments.length?(e!==this._startTime&&(this._startTime=e,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,e-this._delay)),this):this._startTime},c.endTime=function(e){return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},c.timeScale=function(e){if(!arguments.length)return this._timeScale;if(e=e||m,this._timeline&&this._timeline.smoothChildTiming){var t=this._pauseTime,n=t||0===t?t:this._timeline.totalTime();this._startTime=n-(n-this._startTime)*this._timeScale/e;
}return this._timeScale=e,this._uncache(!1)},c.reversed=function(e){return arguments.length?(e!=this._reversed&&(this._reversed=e,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},c.paused=function(e){if(!arguments.length)return this._paused;var t,n,i=this._timeline;return e!=this._paused&&i&&(h||e||d.wake(),t=i.rawTime(),n=t-this._pauseTime,!e&&i.smoothChildTiming&&(this._startTime+=n,this._uncache(!1)),
this._pauseTime=e?t:null,this._paused=e,this._active=this.isActive(),!e&&0!==n&&this._initted&&this.duration()&&(t=i.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,this.render(t,t===this._totalTime,!0))),this._gc&&!e&&this._enabled(!0,!1),this};var L=P("core.SimpleTimeline",function(e){R.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});c=L.prototype=new R,c.constructor=L,c.kill()._gc=!1,c._first=c._last=c._recent=null,c._sortChildren=!1,c.add=c.insert=function(e,t,n,i){
var r,a;if(e._startTime=Number(t||0)+e._delay,e._paused&&this!==e._timeline&&(e._pauseTime=e._startTime+(this.rawTime()-e._startTime)/e._timeScale),e.timeline&&e.timeline._remove(e,!0),e.timeline=e._timeline=this,e._gc&&e._enabled(!0,!0),r=this._last,this._sortChildren)for(a=e._startTime;r&&r._startTime>a;)r=r._prev;return r?(e._next=r._next,r._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=r,this._recent=e,this._timeline&&this._uncache(!0),this},c._remove=function(e,t){
return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},c.render=function(e,t,n){var i,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;r;)i=r._next,(r._active||e>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,n):r.render((e-r._startTime)*r._timeScale,t,n)),
r=i},c.rawTime=function(){return h||d.wake(),this._totalTime};var N=P("TweenLite",function(e,t,n){if(R.call(this,t,n),this.render=N.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:N.selector(e)||e;var i,r,s,o=e.jquery||e.length&&e!==a&&e[0]&&(e[0]===a||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?$[N.defaultOverwrite]:"number"==typeof l?l>>0:$[l],(o||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=s=v(e),
this._propLookup=[],this._siblings=[],i=0;i<s.length;i++)r=s[i],r?"string"!=typeof r?r.length&&r!==a&&r[0]&&(r[0]===a||r[0].nodeType&&r[0].style&&!r.nodeType)?(s.splice(i--,1),this._targets=s=s.concat(v(r))):(this._siblings[i]=te(r,this,!1),1===l&&this._siblings[i].length>1&&ie(r,this,null,1,this._siblings[i])):(r=s[i--]=N.selector(r),"string"==typeof r&&s.splice(i+1,1)):s.splice(i--,1);else this._propLookup={},this._siblings=te(e,this,!1),1===l&&this._siblings.length>1&&ie(e,this,null,1,this._siblings);
(this.vars.immediateRender||0===t&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(-this._delay))},!0),U=function(e){return e&&e.length&&e!==a&&e[0]&&(e[0]===a||e[0].nodeType&&e[0].style&&!e.nodeType)},F=function(e,t){var n,i={};for(n in e)G[n]||n in t&&"transform"!==n&&"x"!==n&&"y"!==n&&"width"!==n&&"height"!==n&&"className"!==n&&"border"!==n||!(!K[n]||K[n]&&K[n]._autoCSS)||(i[n]=e[n],delete e[n]);e.css=i};c=N.prototype=new R,c.constructor=N,c.kill()._gc=!1,c.ratio=0,
c._firstPT=c._targets=c._overwrittenProps=c._startAt=null,c._notifyPluginsOfEnabled=c._lazy=!1,N.version="1.18.1",N.defaultEase=c._ease=new T(null,null,1,1),N.defaultOverwrite="auto",N.ticker=d,N.autoSleep=120,N.lagSmoothing=function(e,t){d.lagSmoothing(e,t)},N.selector=a.$||a.jQuery||function(e){var t=a.$||a.jQuery;return t?(N.selector=t,t(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var j=[],B={},z=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,V=function(e){
for(var t,n=this._firstPT,i=1e-6;n;)t=n.blob?e?this.join(""):this.start:n.c*e+n.s,n.r?t=Math.round(t):t<i&&t>-i&&(t=0),n.f?n.fp?n.t[n.p](n.fp,t):n.t[n.p](t):n.t[n.p]=t,n=n._next},H=function(e,t,n,i){var r,a,s,o,l,u,c,d=[e,t],h=0,p="",f=0;for(d.start=e,n&&(n(d),e=d[0],t=d[1]),d.length=0,r=e.match(z)||[],a=t.match(z)||[],i&&(i._next=null,i.blob=1,d._firstPT=i),l=a.length,o=0;o<l;o++)c=a[o],u=t.substr(h,t.indexOf(c,h)-h),p+=u||!o?u:",",h+=u.length,f?f=(f+1)%5:"rgba("===u.substr(-5)&&(f=1),c===r[o]||r.length<=o?p+=c:(p&&(d.push(p),
p=""),s=parseFloat(r[o]),d.push(s),d._firstPT={_next:d._firstPT,t:d,p:d.length-1,s:s,c:("="===c.charAt(1)?parseInt(c.charAt(0)+"1",10)*parseFloat(c.substr(2)):parseFloat(c)-s)||0,f:0,r:f&&f<4}),h+=c.length;return p+=t.substr(h),p&&d.push(p),d.setRatio=V,d},q=function(e,t,n,i,r,a,s,o){var l,u,c="get"===n?e[t]:n,d=typeof e[t],h="string"==typeof i&&"="===i.charAt(1),p={t:e,p:t,s:c,f:"function"===d,pg:0,n:r||t,r:a,pr:0,c:h?parseInt(i.charAt(0)+"1",10)*parseFloat(i.substr(2)):parseFloat(i)-c||0};if("number"!==d&&("function"===d&&"get"===n&&(u=t.indexOf("set")||"function"!=typeof e["get"+t.substr(3)]?t:"get"+t.substr(3),
p.s=c=s?e[u](s):e[u]()),"string"==typeof c&&(s||isNaN(c))?(p.fp=s,l=H(c,i,o||N.defaultStringFilter,p),p={t:l,p:"setRatio",s:0,c:1,f:2,pg:0,n:r||t,pr:0}):h||(p.s=parseFloat(c),p.c=parseFloat(i)-p.s||0)),p.c)return(p._next=this._firstPT)&&(p._next._prev=p),this._firstPT=p,p},W=N._internals={isArray:y,isSelector:U,lazyTweens:j,blobDif:H},K=N._plugins={},Q=W.tweenLookup={},Y=0,G=W.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,
onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1},$={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},X=R._rootFramesTimeline=new L,J=R._rootTimeline=new L,Z=30,ee=W.lazyRender=function(){
var e,t=j.length;for(B={};--t>-1;)e=j[t],e&&e._lazy!==!1&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);j.length=0};J._startTime=d.time,X._startTime=d.frame,J._active=X._active=!0,setTimeout(ee,1),R._updateRoot=N.render=function(){var e,t,n;if(j.length&&ee(),J.render((d.time-J._startTime)*J._timeScale,!1,!1),X.render((d.frame-X._startTime)*X._timeScale,!1,!1),j.length&&ee(),d.frame>=Z){Z=d.frame+(parseInt(N.autoSleep,10)||120);for(n in Q){for(t=Q[n].tweens,e=t.length;--e>-1;)t[e]._gc&&t.splice(e,1);
0===t.length&&delete Q[n]}if(n=J._first,(!n||n._paused)&&N.autoSleep&&!X._first&&1===d._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||d.sleep()}}},d.addEventListener("tick",R._updateRoot);var te=function(e,t,n){var i,r,a=e._gsTweenID;if(Q[a||(e._gsTweenID=a="t"+Y++)]||(Q[a]={target:e,tweens:[]}),t&&(i=Q[a].tweens,i[r=i.length]=t,n))for(;--r>-1;)i[r]===t&&i.splice(r,1);return Q[a].tweens},ne=function(e,t,n,i){var r,a,s=e.vars.onOverwrite;return s&&(r=s(e,t,n,i)),s=N.onOverwrite,s&&(a=s(e,t,n,i)),
r!==!1&&a!==!1},ie=function(e,t,n,i,r){var a,s,o,l;if(1===i||i>=4){for(l=r.length,a=0;a<l;a++)if((o=r[a])!==t)o._gc||o._kill(null,e,t)&&(s=!0);else if(5===i)break;return s}var u,c=t._startTime+m,d=[],h=0,p=0===t._duration;for(a=r.length;--a>-1;)(o=r[a])===t||o._gc||o._paused||(o._timeline!==t._timeline?(u=u||re(t,0,p),0===re(o,u,p)&&(d[h++]=o)):o._startTime<=c&&o._startTime+o.totalDuration()/o._timeScale>c&&((p||!o._initted)&&c-o._startTime<=2e-10||(d[h++]=o)));for(a=h;--a>-1;)if(o=d[a],2===i&&o._kill(n,e,t)&&(s=!0),
2!==i||!o._firstPT&&o._initted){if(2!==i&&!ne(o,t))continue;o._enabled(!1,!1)&&(s=!0)}return s},re=function(e,t,n){for(var i=e._timeline,r=i._timeScale,a=e._startTime;i._timeline;){if(a+=i._startTime,r*=i._timeScale,i._paused)return-100;i=i._timeline}return a/=r,a>t?a-t:n&&a===t||!e._initted&&a-t<2*m?m:(a+=e.totalDuration()/e._timeScale/r)>t+m?0:a-t-m};c._init=function(){var e,t,n,i,r,a=this.vars,s=this._overwrittenProps,o=this._duration,l=!!a.immediateRender,u=a.ease;if(a.startAt){this._startAt&&(this._startAt.render(-1,!0),
this._startAt.kill()),r={};for(i in a.startAt)r[i]=a.startAt[i];if(r.overwrite=!1,r.immediateRender=!0,r.lazy=l&&a.lazy!==!1,r.startAt=r.delay=null,this._startAt=N.to(this.target,0,r),l)if(this._time>0)this._startAt=null;else if(0!==o)return}else if(a.runBackwards&&0!==o)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(l=!1),n={};for(i in a)G[i]&&"autoCSS"!==i||(n[i]=a[i]);if(n.overwrite=0,n.data="isFromStart",n.lazy=l&&a.lazy!==!1,n.immediateRender=l,
this._startAt=N.to(this.target,0,n),l){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=u=u?u instanceof T?u:"function"==typeof u?new T(u,a.easeParams):_[u]||N.defaultEase:N.defaultEase,a.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(e=this._targets.length;--e>-1;)this._initProps(this._targets[e],this._propLookup[e]={},this._siblings[e],s?s[e]:null)&&(t=!0);else t=this._initProps(this.target,this._propLookup,this._siblings,s);
if(t&&N._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=a.onUpdate,this._initted=!0},c._initProps=function(e,t,n,i){var r,s,o,l,u,c;if(null==e)return!1;B[e._gsTweenID]&&ee(),this.vars.css||e.style&&e!==a&&e.nodeType&&K.css&&this.vars.autoCSS!==!1&&F(this.vars,e);for(r in this.vars)if(c=this.vars[r],G[r])c&&(c instanceof Array||c.push&&y(c))&&c.join("").indexOf("{self}")!==-1&&(this.vars[r]=c=this._swapSelfInParams(c,this));else if(K[r]&&(l=new K[r])._onInitTween(e,this.vars[r],this)){
for(this._firstPT=u={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:r,pg:1,pr:l._priority},s=l._overwriteProps.length;--s>-1;)t[l._overwriteProps[s]]=this._firstPT;(l._priority||l._onInitAllProps)&&(o=!0),(l._onDisable||l._onEnable)&&(this._notifyPluginsOfEnabled=!0),u._next&&(u._next._prev=u)}else t[r]=q.call(this,e,r,"get",c,r,0,null,this.vars.stringFilter);return i&&this._kill(i,e)?this._initProps(e,t,n,i):this._overwrite>1&&this._firstPT&&n.length>1&&ie(e,this,t,this._overwrite,n)?(this._kill(t,e),
this._initProps(e,t,n,i)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(B[e._gsTweenID]=!0),o)},c.render=function(e,t,n){var i,r,a,s,o=this._time,l=this._duration,u=this._rawPrevTime;if(e>=l-1e-7)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(i=!0,r="onComplete",n=n||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||n)&&(this._startTime===this._timeline._duration&&(e=0),(u<0||e<=0&&e>=-1e-7||u===m&&"isPause"!==this.data)&&u!==e&&(n=!0,
u>m&&(r="onReverseComplete")),this._rawPrevTime=s=!t||e||u===e?e:m);else if(e<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&u>0)&&(r="onReverseComplete",i=this._reversed),e<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||n)&&(u>=0&&(u!==m||"isPause"!==this.data)&&(n=!0),this._rawPrevTime=s=!t||e||u===e?e:m)),this._initted||(n=!0);else if(this._totalTime=this._time=e,this._easeType){var c=e/l,d=this._easeType,h=this._easePower;(1===d||3===d&&c>=.5)&&(c=1-c),
3===d&&(c*=2),1===h?c*=c:2===h?c*=c*c:3===h?c*=c*c*c:4===h&&(c*=c*c*c*c),1===d?this.ratio=1-c:2===d?this.ratio=c:e/l<.5?this.ratio=c/2:this.ratio=1-c/2}else this.ratio=this._ease.getRatio(e/l);if(this._time!==o||n){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!n&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=u,j.push(this),void(this._lazy=[e,t]);this._time&&!i?this.ratio=this._ease.getRatio(this._time/l):i&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1));
}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&e>=0&&(this._active=!0),0===o&&(this._startAt&&(e>=0?this._startAt.render(e,t,n):r||(r="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||t||this._callback("onStart"))),a=this._firstPT;a;)a.f?a.t[a.p](a.c*this.ratio+a.s):a.t[a.p]=a.c*this.ratio+a.s,a=a._next;this._onUpdate&&(e<0&&this._startAt&&e!==-1e-4&&this._startAt.render(e,t,n),t||(this._time!==o||i)&&this._callback("onUpdate")),r&&(this._gc&&!n||(e<0&&this._startAt&&!this._onUpdate&&e!==-1e-4&&this._startAt.render(e,t,n),
i&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[r]&&this._callback(r),0===l&&this._rawPrevTime===m&&s!==m&&(this._rawPrevTime=0)))}},c._kill=function(e,t,n){if("all"===e&&(e=null),null==e&&(null==t||t===this.target))return this._lazy=!1,this._enabled(!1,!1);t="string"!=typeof t?t||this._targets||this.target:N.selector(t)||t;var i,r,a,s,o,l,u,c,d,h=n&&this._time&&n._startTime===this._startTime&&this._timeline===n._timeline;if((y(t)||U(t))&&"number"!=typeof t[0])for(i=t.length;--i>-1;)this._kill(e,t[i],n)&&(l=!0);else{
if(this._targets){for(i=this._targets.length;--i>-1;)if(t===this._targets[i]){o=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],r=this._overwrittenProps[i]=e?this._overwrittenProps[i]||{}:"all";break}}else{if(t!==this.target)return!1;o=this._propLookup,r=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(o){if(u=e||o,c=e!==r&&"all"!==r&&e!==o&&("object"!=typeof e||!e._tempKill),n&&(N.onOverwrite||this.vars.onOverwrite)){for(a in u)o[a]&&(d||(d=[]),d.push(a));if((d||!e)&&!ne(this,n,t,d))return!1;
}for(a in u)(s=o[a])&&(h&&(s.f?s.t[s.p](s.s):s.t[s.p]=s.s,l=!0),s.pg&&s.t._kill(u)&&(l=!0),s.pg&&0!==s.t._overwriteProps.length||(s._prev?s._prev._next=s._next:s===this._firstPT&&(this._firstPT=s._next),s._next&&(s._next._prev=s._prev),s._next=s._prev=null),delete o[a]),c&&(r[a]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},c.invalidate=function(){return this._notifyPluginsOfEnabled&&N._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,
this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],R.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(-this._delay)),this},c._enabled=function(e,t){if(h||d.wake(),e&&this._gc){var n,i=this._targets;if(i)for(n=i.length;--n>-1;)this._siblings[n]=te(i[n],this,!0);else this._siblings=te(this.target,this,!0)}return R.prototype._enabled.call(this,e,t),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&N._onPluginEvent(e?"_onEnable":"_onDisable",this);
},N.to=function(e,t,n){return new N(e,t,n)},N.from=function(e,t,n){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,new N(e,t,n)},N.fromTo=function(e,t,n,i){return i.startAt=n,i.immediateRender=0!=i.immediateRender&&0!=n.immediateRender,new N(e,t,i)},N.delayedCall=function(e,t,n,i,r){return new N(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:i,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,lazy:!1,useFrames:r,overwrite:0})},N.set=function(e,t){return new N(e,0,t);
},N.getTweensOf=function(e,t){if(null==e)return[];e="string"!=typeof e?e:N.selector(e)||e;var n,i,r,a;if((y(e)||U(e))&&"number"!=typeof e[0]){for(n=e.length,i=[];--n>-1;)i=i.concat(N.getTweensOf(e[n],t));for(n=i.length;--n>-1;)for(a=i[n],r=n;--r>-1;)a===i[r]&&i.splice(n,1)}else for(i=te(e).concat(),n=i.length;--n>-1;)(i[n]._gc||t&&!i[n].isActive())&&i.splice(n,1);return i},N.killTweensOf=N.killDelayedCallsTo=function(e,t,n){"object"==typeof t&&(n=t,t=!1);for(var i=N.getTweensOf(e,t),r=i.length;--r>-1;)i[r]._kill(n,e);
};var ae=P("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),this._propName=this._overwriteProps[0],this._priority=t||0,this._super=ae.prototype},!0);if(c=ae.prototype,ae.version="1.18.0",ae.API=2,c._firstPT=null,c._addTween=q,c.setRatio=V,c._kill=function(e){var t,n=this._overwriteProps,i=this._firstPT;if(null!=e[this._propName])this._overwriteProps=[];else for(t=n.length;--t>-1;)null!=e[n[t]]&&n.splice(t,1);for(;i;)null!=e[i.n]&&(i._next&&(i._next._prev=i._prev),i._prev?(i._prev._next=i._next,
i._prev=null):this._firstPT===i&&(this._firstPT=i._next)),i=i._next;return!1},c._roundProps=function(e,t){for(var n=this._firstPT;n;)(e[this._propName]||null!=n.n&&e[n.n.split(this._propName+"_").join("")])&&(n.r=t),n=n._next},N._onPluginEvent=function(e,t){var n,i,r,a,s,o=t._firstPT;if("_onInitAllProps"===e){for(;o;){for(s=o._next,i=r;i&&i.pr>o.pr;)i=i._next;(o._prev=i?i._prev:a)?o._prev._next=o:r=o,(o._next=i)?i._prev=o:a=o,o=s}o=t._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[e]&&o.t[e]()&&(n=!0),
o=o._next;return n},ae.activate=function(e){for(var t=e.length;--t>-1;)e[t].API===ae.API&&(K[(new e[t])._propName]=e[t]);return!0},S.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,n=e.propName,i=e.priority||0,r=e.overwriteProps,a={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},s=P("plugins."+n.charAt(0).toUpperCase()+n.substr(1)+"Plugin",function(){ae.call(this,n,i),this._overwriteProps=r||[]},e.global===!0),o=s.prototype=new ae(n);
o.constructor=s,s.API=e.API;for(t in a)"function"==typeof e[t]&&(o[a[t]]=e[t]);return s.version=e.version,ae.activate([s]),s},l=a._gsQueue){for(u=0;u<l.length;u++)l[u]();for(c in b)b[c].func||a.console.log("GSAP encountered missing dependency: com.greensock."+c)}h=!1}}("undefined"!=typeof e&&e.exports&&"undefined"!=typeof a?a:this||s,"TweenLite"),e.exports=TweenLite}).call(t,function(){return this}())},function(e,t,n){"use strict";var i=function(e,t,n,i,r,a,s,o){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{
var u=[n,i,r,a,s,o],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=i},function(e,t,n){var i,r,a;/*!
	 * jQuery Mousewheel 3.1.13
	 *
	 * Copyright jQuery Foundation and other contributors
	 * Released under the MIT license
	 * http://jquery.org/license
	 */
!function(s){r=[n(5)],i=s,a="function"==typeof i?i.apply(t,r):i,!(void 0!==a&&(e.exports=a))}(function(e){function t(t){var s=t||window.event,o=l.call(arguments,1),u=0,d=0,h=0,p=0,f=0,m=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(h=s.detail*-1),"wheelDelta"in s&&(h=s.wheelDelta),"wheelDeltaY"in s&&(h=s.wheelDeltaY),"wheelDeltaX"in s&&(d=s.wheelDeltaX*-1),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=h*-1,h=0),u=0===h?d:h,"deltaY"in s&&(h=s.deltaY*-1,u=h),"deltaX"in s&&(d=s.deltaX,0===h&&(u=d*-1)),
0!==h||0!==d){if(1===s.deltaMode){var v=e.data(this,"mousewheel-line-height");u*=v,h*=v,d*=v}else if(2===s.deltaMode){var g=e.data(this,"mousewheel-page-height");u*=g,h*=g,d*=g}if(p=Math.max(Math.abs(h),Math.abs(d)),(!a||p<a)&&(a=p,i(s,p)&&(a/=40)),i(s,p)&&(u/=40,d/=40,h/=40),u=Math[u>=1?"floor":"ceil"](u/a),d=Math[d>=1?"floor":"ceil"](d/a),h=Math[h>=1?"floor":"ceil"](h/a),c.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,m=t.clientY-y.top;
}return t.deltaX=d,t.deltaY=h,t.deltaFactor=a,t.offsetX=f,t.offsetY=m,t.deltaMode=0,o.unshift(t,u,d,h),r&&clearTimeout(r),r=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,o)}}function n(){a=null}function i(e,t){return c.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var r,a,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;
if(e.event.fixHooks)for(var u=s.length;u;)e.event.fixHooks[s[--u]]=e.event.mouseHooks;var c=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=o.length;n;)this.addEventListener(o[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",c.getLineHeight(this)),e.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=o.length;n;)this.removeEventListener(o[--n],t,!1);else this.onmousewheel=null;
e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e);
}})})},function(e,t,n){var i,r;!function(n,a){var s=this;i=[],r=function(){return a(s)}.apply(t,i),!(void 0!==r&&(e.exports=r))}(this,function(e){"use strict";return function(e){function t(i){if(n[i])return n[i];var r=n[i]=Object.create(null);return e[i](r,t),r}var n=Object.create(null);return t(0)}([function(e,t){var n=t(23),i=t(23);e.debugMode=i.debugMode,e.verboseMode=i.verboseMode;var r=t(33),a=t(33);e.Set=a.Set;var s=t(30),o=t(30);e.Map=o.Map;var l=t(32),u=t(32);e.Promise=u.Promise,e.DeferredPromise=u.DeferredPromise;
var c=t(37);e.webworker=c;var d=t(8);e.parts=d;var h=t(1);e.parser=h;var p=t(14);e.renderers=p;var f=t(24);e.ASS=f.ASS;var m=t(25);e.Attachment=m.Attachment,e.AttachmentType=m.AttachmentType;var v=t(26);e.Dialogue=v.Dialogue;var g=t(28);e.ScriptProperties=g.ScriptProperties;var y=t(29);e.Style=y.Style;var b=t(27);e.BorderStyle=b.BorderStyle,e.Format=b.Format,e.WrappingStyle=b.WrappingStyle,Object.defineProperties(e,{debugMode:{get:function(){return n.debugMode},set:n.setDebugMode},verboseMode:{get:function(){
return n.verboseMode},set:n.setVerboseMode},Set:{get:function(){return r.Set},set:r.setImplementation},Map:{get:function(){return s.Map},set:s.setImplementation},Promise:{get:function(){return l.Promise},set:l.setImplementation}})},function(e,t){var n=t(3);e.parse=n.parse;var i=t(5);e.BrowserReadableStream=i.BrowserReadableStream,e.StringStream=i.StringStream,e.XhrStream=i.XhrStream;var r=t(4);e.StreamParser=r.StreamParser,e.SrtStreamParser=r.SrtStreamParser},function(e,t){function n(e){var t=e.indexOf(":");
if(t===-1)return null;var n=e.substr(0,t),i=e.substr(t+1).replace(/^\s+/,"");return{name:n,value:i}}function i(e,t){var i=n(e);if(null===i)return null;var a=i.value.split(",");a.length>t.length&&(a[t.length-1]=a.slice(t.length-1).join(","));var s=new r.Map;return t.forEach(function(e,t){s.set(e,a[t])}),{type:i.name,template:s}}var r=t(30);e.parseLineIntoProperty=n,e.parseLineIntoTypedTemplate=i},function(e,t){function n(e,t){var n=new l(e,t);if(null===n.result||n.result.end!==e.length)throw a.debugMode&&console.error("Parse failed. %s %s %o",t,e,n.result),
new Error("Parse failed.");return n.result.value}function i(e,t,n,i){l.prototype["parse_tag_"+e]=function(r){var a=this,s=new h(r);if(null===a.read(s,e))return r.pop(),null;var o=n.call(a,s);if(null!==o)s.value=new t(o.value);else{if(i)return r.pop(),null;s.value=new t(null)}return s}}var r=t(8),a=t(23),s=t(30),o=new s.Map;e.parse=n;var l=function(){function e(e,t){this._input=e,this._parseTree=new h(null),this._result=o.get(t).call(this,this._parseTree)}return Object.defineProperty(e.prototype,"result",{
get:function(){return this._result},enumerable:!0,configurable:!0}),e.prototype.parse_dialogueParts=function(e){var t,i=new h(e);for(i.value=[];this._haveMore();){var a=this.parse_enclosedTags(i);if(null!==a)(t=i.value).push.apply(t,a.value);else{var s=this.parse_newline(i)||this.parse_hardspace(i)||this.parse_text(i);if(null===s)return e.pop(),null;if(s.value instanceof r.Text&&i.value[i.value.length-1]instanceof r.Text){var o=i.value[i.value.length-1];i.value[i.value.length-1]=new r.Text(o.value+s.value.value);
}else i.value.push(s.value)}}var l=!1;return i.value.forEach(function(e,t){e instanceof r.DrawingMode?l=0!==e.scale:e instanceof r.Text&&l&&(i.value[t]=new r.DrawingInstructions(n(e.value,"drawingInstructions")))}),i},e.prototype.parse_enclosedTags=function(e){var t=new h(e);if(t.value=[],null===this.read(t,"{"))return e.pop(),null;for(var n=this._peek();this._haveMore()&&"}"!==n;n=this._peek()){var i=null;if(null!==this.read(t,"\\")&&(i=this.parse_tag_alpha(t)||this.parse_tag_iclip(t)||this.parse_tag_xbord(t)||this.parse_tag_ybord(t)||this.parse_tag_xshad(t)||this.parse_tag_yshad(t)||this.parse_tag_blur(t)||this.parse_tag_bord(t)||this.parse_tag_clip(t)||this.parse_tag_fade(t)||this.parse_tag_fscx(t)||this.parse_tag_fscy(t)||this.parse_tag_move(t)||this.parse_tag_shad(t)||this.parse_tag_fad(t)||this.parse_tag_fax(t)||this.parse_tag_fay(t)||this.parse_tag_frx(t)||this.parse_tag_fry(t)||this.parse_tag_frz(t)||this.parse_tag_fsp(t)||this.parse_tag_fsplus(t)||this.parse_tag_fsminus(t)||this.parse_tag_org(t)||this.parse_tag_pbo(t)||this.parse_tag_pos(t)||this.parse_tag_an(t)||this.parse_tag_be(t)||this.parse_tag_fn(t)||this.parse_tag_fr(t)||this.parse_tag_fs(t)||this.parse_tag_kf(t)||this.parse_tag_ko(t)||this.parse_tag_1a(t)||this.parse_tag_1c(t)||this.parse_tag_2a(t)||this.parse_tag_2c(t)||this.parse_tag_3a(t)||this.parse_tag_3c(t)||this.parse_tag_4a(t)||this.parse_tag_4c(t)||this.parse_tag_a(t)||this.parse_tag_b(t)||this.parse_tag_c(t)||this.parse_tag_i(t)||this.parse_tag_k(t)||this.parse_tag_K(t)||this.parse_tag_p(t)||this.parse_tag_q(t)||this.parse_tag_r(t)||this.parse_tag_s(t)||this.parse_tag_t(t)||this.parse_tag_u(t),
null===i&&t.pop()),null===i&&(i=this.parse_comment(t)),null===i)return e.pop(),null;i.value instanceof r.Comment&&t.value[t.value.length-1]instanceof r.Comment?t.value[t.value.length-1]=new r.Comment(t.value[t.value.length-1].value+i.value.value):t.value.push(i.value)}return null===this.read(t,"}")?(e.pop(),null):t},e.prototype.parse_newline=function(e){var t=new h(e);return null===this.read(t,"\\N")?(e.pop(),null):(t.value=new r.NewLine,t)},e.prototype.parse_hardspace=function(e){var t=new h(e);return null===this.read(t,"\\h")?(e.pop(),
null):(t.value=new r.Text("\xa0"),t)},e.prototype.parse_text=function(e){var t=this._peek(),n=new h(e),i=new h(n,t);return n.value=new r.Text(i.value),n},e.prototype.parse_comment=function(e){var t=this._peek(),n=new h(e),i=new h(n,t);return n.value=new r.Comment(i.value),n},e.prototype.parse_tag_a=function(e){var t=new h(e);if(null===this.read(t,"a"))return e.pop(),null;var n=this._peek();switch(n){case"1":var i=this._peek(2);switch(i){case"10":case"11":n=i}break;case"2":case"3":case"5":case"6":
case"7":case"9":break;default:return e.pop(),null}var a=new h(t,n),s=null;switch(a.value){case"1":s=1;break;case"2":s=2;break;case"3":s=3;break;case"5":s=7;break;case"6":s=8;break;case"7":s=9;break;case"9":s=4;break;case"10":s=5;break;case"11":s=6}return t.value=new r.Alignment(s),t},e.prototype.parse_tag_alpha=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_an=function(e){var t=new h(e);if(null===this.read(t,"an"))return e.pop(),null;var n=this._peek();if(n<"1"||n>"9")return e.pop(),
null;var i=new h(t,n);return t.value=new r.Alignment(parseInt(i.value)),t},e.prototype.parse_tag_b=function(e){var t=new h(e);if(null===this.read(t,"b"))return e.pop(),null;var n=null,i=this._peek();return i>="1"&&i<="9"&&(i=this._peek(3),"00"===i.substr(1)&&(n=new h(t,i),n.value=parseInt(n.value))),null===n&&(n=this.parse_enableDisable(t)),null!==n?t.value=new r.Bold(n.value):t.value=new r.Bold(null),t},e.prototype.parse_tag_be=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_blur=function(){
throw new Error("Method not implemented.")},e.prototype.parse_tag_bord=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_clip=function(e){return this._parse_tag_clip_or_iclip("clip",e)},e.prototype.parse_tag_fad=function(e){var t=new h(e);if(null===this.read(t,"fad"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),
null;var i=this.parse_decimal(t);return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new r.Fade(n.value/1e3,i.value/1e3),t)},e.prototype.parse_tag_fade=function(e){var t=new h(e);if(null===this.read(t,"fade"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);if(null===i)return e.pop(),null;if(null===this.read(t,","))return e.pop(),
null;var a=this.parse_decimal(t);if(null===a)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var s=this.parse_decimal(t);if(null===s)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var o=this.parse_decimal(t);if(null===o)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var l=this.parse_decimal(t);if(null===l)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var u=this.parse_decimal(t);return null===u?(e.pop(),null):null===this.read(t,")")?(e.pop(),
null):(t.value=new r.ComplexFade(1-n.value/255,1-i.value/255,1-a.value/255,s.value/1e3,o.value/1e3,l.value/1e3,u.value/1e3),t)},e.prototype.parse_tag_fax=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fay=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fn=function(e){var t=new h(e);if(null===this.read(t,"fn"))return e.pop(),null;for(var n=new h(t,""),i=this._peek();this._haveMore()&&"\\"!==i&&"}"!==i;i=this._peek())n.value+=i;return n.value.length>0?t.value=new r.FontName(n.value):t.value=new r.FontName(null),
t},e.prototype.parse_tag_fr=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_frx=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fry=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_frz=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fs=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_fsplus=function(e){var t=new h(e);if(null===this.read(t,"fs+"))return e.pop(),
null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new r.FontSizePlus(n.value),t)},e.prototype.parse_tag_fsminus=function(e){var t=new h(e);if(null===this.read(t,"fs-"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new r.FontSizeMinus(n.value),t)},e.prototype.parse_tag_fscx=function(e){var t=new h(e);if(null===this.read(t,"fscx"))return e.pop(),null;var n=this.parse_decimal(t);return null!==n?t.value=new r.FontScaleX(n.value/100):t.value=new r.FontScaleX(null),
t},e.prototype.parse_tag_fscy=function(e){var t=new h(e);if(null===this.read(t,"fscy"))return e.pop(),null;var n=this.parse_decimal(t);return null!==n?t.value=new r.FontScaleY(n.value/100):t.value=new r.FontScaleY(null),t},e.prototype.parse_tag_fsp=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_i=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_iclip=function(e){return this._parse_tag_clip_or_iclip("iclip",e)},e.prototype.parse_tag_k=function(e){
var t=new h(e);if(null===this.read(t,"k"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new r.ColorKaraoke(n.value/100),t)},e.prototype.parse_tag_K=function(e){var t=new h(e);if(null===this.read(t,"K"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new r.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_kf=function(e){var t=new h(e);if(null===this.read(t,"kf"))return e.pop(),null;var n=this.parse_decimal(t);
return null===n?(e.pop(),null):(t.value=new r.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_ko=function(e){var t=new h(e);if(null===this.read(t,"ko"))return e.pop(),null;var n=this.parse_decimal(t);return null===n?(e.pop(),null):(t.value=new r.OutlineKaraoke(n.value/100),t)},e.prototype.parse_tag_move=function(e){var t=new h(e);if(null===this.read(t,"move"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),
null;var i=this.parse_decimal(t);if(null===i)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var a=this.parse_decimal(t);if(null===a)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var s=this.parse_decimal(t);if(null===s)return e.pop(),null;var o=null,l=null;if(null!==this.read(t,",")){if(o=this.parse_decimal(t),null===o)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;if(l=this.parse_decimal(t),null===l)return e.pop(),null}return null===this.read(t,")")?(e.pop(),
null):(t.value=new r.Move(n.value,i.value,a.value,s.value,null!==o?o.value/1e3:null,null!==l?l.value/1e3:null),t)},e.prototype.parse_tag_org=function(e){var t=new h(e);if(null===this.read(t,"org"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new r.RotationOrigin(n.value,i.value),
t)},e.prototype.parse_tag_p=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_pbo=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_pos=function(e){var t=new h(e);if(null===this.read(t,"pos"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=this.parse_decimal(t);if(null===n)return e.pop(),null;if(null===this.read(t,","))return e.pop(),null;var i=this.parse_decimal(t);return null===i?(e.pop(),null):null===this.read(t,")")?(e.pop(),
null):(t.value=new r.Position(n.value,i.value),t)},e.prototype.parse_tag_q=function(e){var t=new h(e);if(null===this.read(t,"q"))return e.pop(),null;var n=this._peek();if(n<"0"||n>"3")return e.pop(),null;var i=new h(t,n);return t.value=new r.WrappingStyle(parseInt(i.value)),t},e.prototype.parse_tag_r=function(e){var t=new h(e);if(null===this.read(t,"r"))return e.pop(),null;for(var n=new h(t,""),i=this._peek();this._haveMore()&&"\\"!==i&&"}"!==i;i=this._peek())n.value+=i;return n.value.length>0?t.value=new r.Reset(n.value):t.value=new r.Reset(null),
t},e.prototype.parse_tag_s=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_shad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_t=function(e){var t=new h(e);if(null===this.read(t,"t"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=null,i=null,a=null,s=this.parse_decimal(t);if(null!==s){if(null===this.read(t,","))return e.pop(),null;var o=this.parse_decimal(t);if(null!==o){if(n=s,i=o,null===this.read(t,","))return e.pop(),
null;var l=this.parse_decimal(t);if(null!==l&&(a=l,null===this.read(t,",")))return e.pop(),null}else if(a=s,null===this.read(t,","))return e.pop(),null}for(var u=[],c=this._peek();this._haveMore()&&")"!==c&&"}"!==c;c=this._peek()){var d=null;if(null!==this.read(t,"\\")&&(d=this.parse_tag_alpha(t)||this.parse_tag_iclip(t)||this.parse_tag_xbord(t)||this.parse_tag_ybord(t)||this.parse_tag_xshad(t)||this.parse_tag_yshad(t)||this.parse_tag_blur(t)||this.parse_tag_bord(t)||this.parse_tag_clip(t)||this.parse_tag_fscx(t)||this.parse_tag_fscy(t)||this.parse_tag_shad(t)||this.parse_tag_fax(t)||this.parse_tag_fay(t)||this.parse_tag_frx(t)||this.parse_tag_fry(t)||this.parse_tag_frz(t)||this.parse_tag_fsp(t)||this.parse_tag_fsplus(t)||this.parse_tag_fsminus(t)||this.parse_tag_be(t)||this.parse_tag_fr(t)||this.parse_tag_fs(t)||this.parse_tag_1a(t)||this.parse_tag_1c(t)||this.parse_tag_2a(t)||this.parse_tag_2c(t)||this.parse_tag_3a(t)||this.parse_tag_3c(t)||this.parse_tag_4a(t)||this.parse_tag_4c(t)||this.parse_tag_c(t),
null===d&&t.pop()),null===d&&(d=this.parse_comment(t)),null===d)return e.pop(),null;d.value instanceof r.Comment&&u[u.length-1]instanceof r.Comment?u[u.length-1]=new r.Comment(u[u.length-1].value+d.value.value):u.push(d.value)}return this.read(t,")"),t.value=new r.Transform(null!==n?n.value/1e3:null,null!==i?i.value/1e3:null,null!==a?a.value/1e3:null,u),t},e.prototype.parse_tag_u=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_xbord=function(){throw new Error("Method not implemented.");
},e.prototype.parse_tag_xshad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_ybord=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_yshad=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_1a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_1c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_2a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_2c=function(){
throw new Error("Method not implemented.")},e.prototype.parse_tag_3a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_3c=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_4a=function(){throw new Error("Method not implemented.")},e.prototype.parse_tag_4c=function(){throw new Error("Method not implemented.")},e.prototype.parse_drawingInstructions=function(e){var t=new h(e),n=null,i=[];for(t.value=[];this._haveMore();){for(;null!==this.read(t," "););
if(!this._haveMore())break;if(null!==n){var a=this.parse_decimal(t);if(null!==a){i.push(a),"m"===n&&2===i.length?(t.value.push(new r.drawing.MoveInstruction(i[0].value,i[1].value)),i.splice(0,i.length)):"l"===n&&2===i.length?(t.value.push(new r.drawing.LineInstruction(i[0].value,i[1].value)),i.splice(0,i.length)):"b"===n&&6===i.length&&(t.value.push(new r.drawing.CubicBezierCurveInstruction(i[0].value,i[1].value,i[2].value,i[3].value,i[4].value,i[5].value)),i.splice(0,i.length));continue}}var s=this.parse_text(t);
if(null===s)break;var o=s.value.value;switch(o){case"m":case"l":case"b":n=o,i.splice(0,i.length)}}for(;null!==this.read(t," "););return t},e.prototype.parse_decimalInt32=function(e){for(var t=new h(e),n=null!==this.read(t,"-"),i=new h(t,""),r=this._peek();this._haveMore()&&r>="0"&&r<="9";r=this._peek())i.value+=r;if(0===i.value.length)return e.pop(),null;var a=parseInt(i.value);return a>=4294967295?a=4294967295:n&&(a=-a),t.value=a,t},e.prototype.parse_hexInt32=function(e){for(var t=new h(e),n=null!==this.read(t,"-"),i=new h(t,""),r=this._peek();this._haveMore()&&(r>="0"&&r<="9"||r>="a"&&r<="f"||r>="A"&&r<="F");r=this._peek())i.value+=r;
if(0===i.value.length)return e.pop(),null;var a=parseInt(i.value,16);return a>=4294967295?a=4294967295:n&&(a=-a),t.value=a,t},e.prototype.parse_decimalOrHexInt32=function(e){var t=new h(e),n=null!==this.read(t,"&H")||null!==this.read(t,"&h")?this.parse_hexInt32(t):this.parse_decimalInt32(t);return null===n?(e.pop(),null):(t.value=n.value,t)},e.prototype.parse_decimal=function(e){var t=new h(e),n=null!==this.read(t,"-"),i=this.parse_unsignedDecimal(t);return null===i?(e.pop(),null):(t.value=i.value,
n&&(t.value=-t.value),t)},e.prototype.parse_unsignedDecimal=function(e){for(var t=new h(e),n=new h(t,""),i=null,r=this._peek();this._haveMore()&&r>="0"&&r<="9";r=this._peek())n.value+=r;if(0===n.value.length)return e.pop(),null;if(null!==this.read(t,".")){i=new h(t,"");for(var r=this._peek();this._haveMore()&&r>="0"&&r<="9";r=this._peek())i.value+=r;if(0===i.value.length)return e.pop(),null}return t.value=parseFloat(n.value+(null!==i?"."+i.value:"")),t},e.prototype.parse_enableDisable=function(e){
var t=this._peek();if("0"===t||"1"===t){var n=new h(e,t);return n.value="1"===n.value,n}return null},e.prototype.parse_color=function(e){for(var t=new h(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);if(null===n)return e.pop(),null;var i=n.value;for(t.value=new r.Color(255&i,i>>8&255,i>>16&255);null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_alpha=function(e){for(var t=new h(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);
if(null===n)return e.pop(),null;var i=n.value;for(t.value=1-(255&i)/255;null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_colorWithAlpha=function(e){var t=new h(e),n=this.parse_decimalOrHexInt32(t);if(null===n)return e.pop(),null;var i=n.value;return t.value=new r.Color(255&i,i>>8&255,i>>16&255,1-(i>>24&255)/255),t},e.prototype.read=function(e,t){return this._peek(t.length)!==t?null:new h(e,t)},e.prototype._peek=function(e){return void 0===e&&(e=1),1===e?this._input[this._parseTree.end]:this._input.substr(this._parseTree.end,e);
},e.prototype._haveMore=function(){return this._parseTree.end<this._input.length},e.prototype._parse_tag_clip_or_iclip=function(e,t){var i=new h(t);if(null===this.read(i,e))return t.pop(),null;if(null===this.read(i,"("))return t.pop(),null;var a=null,s=null,o=null,l=null,u=null,c=null,d=this.parse_decimal(i);if(null!==d){if(null===this.read(i,","))return t.pop(),null;var p=this.parse_decimal(i);null!==p?(a=d,o=p):u=d}if(null!==a&&null!==o){if(null===this.read(i,","))return t.pop(),null;if(s=this.parse_decimal(i),
null===this.read(i,","))return t.pop(),null;l=this.parse_decimal(i),i.value=new r.RectangularClip(a.value,o.value,s.value,l.value,"clip"===e)}else{c=new h(i,"");for(var f=this._peek();this._haveMore()&&")"!==f&&"}"!==f;f=this._peek())c.value+=f;i.value=new r.VectorClip(null!==u?u.value:1,n(c.value,"drawingInstructions"),"clip"===e)}return null===this.read(i,")")?(t.pop(),null):i},e}();i("alpha",r.Alpha,l.prototype.parse_alpha,!1),i("be",r.Blur,l.prototype.parse_decimal,!1),i("blur",r.GaussianBlur,l.prototype.parse_decimal,!1),
i("bord",r.Border,l.prototype.parse_decimal,!1),i("c",r.PrimaryColor,l.prototype.parse_color,!1),i("fax",r.SkewX,l.prototype.parse_decimal,!1),i("fay",r.SkewY,l.prototype.parse_decimal,!1),i("fr",r.RotateZ,l.prototype.parse_decimal,!1),i("frx",r.RotateX,l.prototype.parse_decimal,!1),i("fry",r.RotateY,l.prototype.parse_decimal,!1),i("frz",r.RotateZ,l.prototype.parse_decimal,!1),i("fs",r.FontSize,l.prototype.parse_decimal,!1),i("fsp",r.LetterSpacing,l.prototype.parse_decimal,!1),i("i",r.Italic,l.prototype.parse_enableDisable,!1),
i("p",r.DrawingMode,l.prototype.parse_decimal,!0),i("pbo",r.DrawingBaselineOffset,l.prototype.parse_decimal,!0),i("s",r.StrikeThrough,l.prototype.parse_enableDisable,!1),i("shad",r.Shadow,l.prototype.parse_decimal,!1),i("u",r.Underline,l.prototype.parse_enableDisable,!1),i("xbord",r.BorderX,l.prototype.parse_decimal,!1),i("xshad",r.ShadowX,l.prototype.parse_decimal,!1),i("ybord",r.BorderY,l.prototype.parse_decimal,!1),i("yshad",r.ShadowY,l.prototype.parse_decimal,!1),i("1a",r.PrimaryAlpha,l.prototype.parse_alpha,!1),
i("1c",r.PrimaryColor,l.prototype.parse_color,!1),i("2a",r.SecondaryAlpha,l.prototype.parse_alpha,!1),i("2c",r.SecondaryColor,l.prototype.parse_color,!1),i("3a",r.OutlineAlpha,l.prototype.parse_alpha,!1),i("3c",r.OutlineColor,l.prototype.parse_color,!1),i("4a",r.ShadowAlpha,l.prototype.parse_alpha,!1),i("4c",r.ShadowColor,l.prototype.parse_color,!1);for(var u=0,c=Object.keys(l.prototype);u<c.length;u++){var d=c[u];0===d.indexOf("parse_")&&"function"==typeof l.prototype[d]&&o.set(d.substr("parse_".length),l.prototype[d]);
}var h=function(){function e(e,t){void 0===t&&(t=null),this._parent=e,this._children=[],null!==e&&e.children.push(this),this._start=null!==e?e.end:0,this._end=this._start,this.value=t}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,null!==this._value&&this._value.constructor===String&&0===this._children.length&&this._setEnd(this._start+this._value.length)},enumerable:!0,configurable:!0}),e.prototype.pop=function(){this._children.splice(this._children.length-1,1),this._children.length>0?this._setEnd(this._children[this._children.length-1].end):this._setEnd(this.start);
},e.prototype._setEnd=function(e){this._end=e,null!==this._parent&&this._parent.end!==this._end&&this._parent._setEnd(this._end)},e}(),p=t(32),f=t(36),m=t(38);m.registerWorkerCommand(f.WorkerCommands.Parse,function(e){return new p.Promise(function(t){t(n(e.input,e.rule))})})},function(e,t){function n(e){for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n)-33;if(i<0||i>63)throw new Error("Out-of-range character code "+i+" at index "+n+" in string "+e);t+=i<26?String.fromCharCode("A".charCodeAt(0)+i):i<52?String.fromCharCode("a".charCodeAt(0)+i-26):i<62?String.fromCharCode("0".charCodeAt(0)+i-52):62===i?"+":"/";
}return t}var i,r=t(23),a=t(24),s=t(29),o=t(26),l=t(25),u=t(30),c=t(32),d=t(2);!function(e){e[e.ScriptInfo=0]="ScriptInfo",e[e.Styles=1]="Styles",e[e.Events=2]="Events",e[e.Fonts=3]="Fonts",e[e.Graphics=4]="Graphics",e[e.Other=5]="Other",e[e.EOF=6]="EOF"}(i||(i={}));var h=function(){function e(e){var t=this;this._stream=e,this._ass=new a.ASS,this._minimalDeferred=new c.DeferredPromise,this._deferred=new c.DeferredPromise,this._shouldSwallowBom=!0,this._currentSection=i.ScriptInfo,this._currentAttachment=null,
this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._minimalDeferred.reject(e),t._deferred.reject(e)})}return Object.defineProperty(e.prototype,"minimalASS",{get:function(){return this._minimalDeferred.promise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ass",{get:function(){return this._deferred.promise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentSection",{get:function(){return this._currentSection},set:function(e){
if(null!==this._currentAttachment&&(this._ass.addAttachment(this._currentAttachment),this._currentAttachment=null),this._currentSection===i.ScriptInfo&&e!==i.ScriptInfo&&this._minimalDeferred.resolve(this._ass),e===i.EOF){var t=this._ass.properties;void 0===t.resolutionX||void 0===t.resolutionY?(this._minimalDeferred.reject("Malformed ASS script."),this._deferred.reject("Malformed ASS script.")):(this._minimalDeferred.resolve(this._ass),this._deferred.resolve(this._ass))}this._currentSection=e},enumerable:!0,
configurable:!0}),e.prototype._onNextLine=function(e){var t=this;if(null===e)return void(this.currentSection=i.EOF);if("\r"===e[e.length-1]&&(e=e.substr(0,e.length-1)),65279===e.charCodeAt(0)&&this._shouldSwallowBom&&(e=e.substr(1)),this._shouldSwallowBom=!1,""===e);else if(";"===e[0]&&null===this._currentAttachment);else if("[Script Info]"===e)this.currentSection=i.ScriptInfo;else if("[V4+ Styles]"===e||"[V4 Styles]"===e)this.currentSection=i.Styles;else if("[Events]"===e)this.currentSection=i.Events;else if("[Fonts]"===e)this.currentSection=i.Fonts;else if("[Graphics]"===e)this.currentSection=i.Graphics;else switch(null===this._currentAttachment&&"["===e[0]&&"]"===e[e.length-1]&&(this.currentSection=i.Other),
this.currentSection){case i.ScriptInfo:var a=d.parseLineIntoProperty(e);if(null!==a)switch(a.name){case"PlayResX":this._ass.properties.resolutionX=parseInt(a.value);break;case"PlayResY":this._ass.properties.resolutionY=parseInt(a.value);break;case"WrapStyle":this._ass.properties.wrappingStyle=parseInt(a.value);break;case"ScaledBorderAndShadow":this._ass.properties.scaleBorderAndShadow="yes"===a.value}break;case i.Styles:if(null===this._ass.stylesFormatSpecifier){var s=d.parseLineIntoProperty(e);null!==s&&"Format"===s.name&&(this._ass.stylesFormatSpecifier=s.value.split(",").map(function(e){
return e.trim()}))}else try{this._ass.addStyle(e)}catch(o){r.debugMode&&console.error("Could not parse style from line "+e+" - "+(o.stack||o))}break;case i.Events:if(null===this._ass.dialoguesFormatSpecifier){var u=d.parseLineIntoProperty(e);null!==u&&"Format"===u.name&&(this._ass.dialoguesFormatSpecifier=u.value.split(",").map(function(e){return e.trim()}))}else try{this._ass.addEvent(e)}catch(o){r.debugMode&&console.error("Could not parse event from line "+e+" - "+(o.stack||o))}break;case i.Fonts:
case i.Graphics:var c=this.currentSection===i.Fonts?/^fontname:(.+)/:/^filename:(.+)/,h=c.exec(e);if(null!==h)null!==this._currentAttachment&&(this._ass.addAttachment(this._currentAttachment),this._currentAttachment=null),this._currentAttachment=new l.Attachment(h[1].trim(),this.currentSection===i.Fonts?l.AttachmentType.Font:l.AttachmentType.Graphic);else if(null!==this._currentAttachment)try{this._currentAttachment.contents+=n(e)}catch(o){r.debugMode&&console.error("Encountered error while reading font "+this._currentAttachment.filename+": %o",o),
this._currentAttachment=null}break;case i.Other:break;default:throw new Error("Unhandled state "+this.currentSection)}this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._minimalDeferred.reject(e),t._deferred.reject(e)})},e}();e.StreamParser=h;var p=function(){function e(e){var t=this;this._stream=e,this._ass=new a.ASS,this._deferred=new c.DeferredPromise,this._shouldSwallowBom=!0,this._currentDialogueNumber=null,this._currentDialogueStart=null,this._currentDialogueEnd=null,
this._currentDialogueText=null,this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._deferred.reject(e)}),this._ass.properties.resolutionX=1280,this._ass.properties.resolutionY=720,this._ass.properties.wrappingStyle=1,this._ass.properties.scaleBorderAndShadow=!0;var n=new s.Style(new u.Map([["Name","Default"],["FontSize","36"]]));this._ass.styles.set(n.name,n)}return Object.defineProperty(e.prototype,"ass",{get:function(){return this._deferred.promise},enumerable:!0,configurable:!0
}),e.prototype._onNextLine=function(e){var t=this;if(null===e)return null!==this._currentDialogueNumber&&null!==this._currentDialogueStart&&null!==this._currentDialogueEnd&&null!==this._currentDialogueText&&this._ass.dialogues.push(new o.Dialogue(new u.Map([["Style","Default"],["Start",this._currentDialogueStart],["End",this._currentDialogueEnd],["Text",this._currentDialogueText]]),this._ass)),void this._deferred.resolve(this._ass);if("\r"===e[e.length-1]&&(e=e.substr(0,e.length-1)),65279===e.charCodeAt(0)&&this._shouldSwallowBom&&(e=e.substr(1)),
this._shouldSwallowBom=!1,""===e)null!==this._currentDialogueNumber&&null!==this._currentDialogueStart&&null!==this._currentDialogueEnd&&null!==this._currentDialogueText&&this._ass.dialogues.push(new o.Dialogue(new u.Map([["Style","Default"],["Start",this._currentDialogueStart],["End",this._currentDialogueEnd],["Text",this._currentDialogueText]]),this._ass)),this._currentDialogueNumber=this._currentDialogueStart=this._currentDialogueEnd=this._currentDialogueText=null;else if(null===this._currentDialogueNumber)/^\d+$/.test(e)&&(this._currentDialogueNumber=e);else if(null===this._currentDialogueStart&&null===this._currentDialogueEnd){
var n=/^(\d\d:\d\d:\d\d,\d\d\d) --> (\d\d:\d\d:\d\d,\d\d\d)/.exec(e);null!==n&&(this._currentDialogueStart=n[1].replace(",","."),this._currentDialogueEnd=n[2].replace(",","."))}else e=e.replace(/<b>/g,"{\\b1}").replace(/\{b\}/g,"{\\b1}").replace(/<\/b>/g,"{\\b0}").replace(/\{\/b\}/g,"{\\b0}").replace(/<i>/g,"{\\i1}").replace(/\{i\}/g,"{\\i1}").replace(/<\/i>/g,"{\\i0}").replace(/\{\/i\}/g,"{\\i0}").replace(/<u>/g,"{\\u1}").replace(/\{u\}/g,"{\\u1}").replace(/<\/u>/g,"{\\u0}").replace(/\{\/u\}/g,"{\\u0}").replace(/<font color="#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})">/g,function(e,t,n,i){
return"{c&H"+i+n+t+"&}"}).replace(/<\/font>/g,"{\\c}"),null!==this._currentDialogueText?this._currentDialogueText+="\\N"+e:this._currentDialogueText=e;this._stream.nextLine().then(function(e){return t._onNextLine(e)},function(e){t._deferred.reject(e)})},e}();e.SrtStreamParser=p},function(t,n){var i=n(32),r=function(){function e(e){this._str=e,this._readTill=0}return e.prototype.nextLine=function(){var e=null;if(this._readTill<this._str.length){var t=this._str.indexOf("\n",this._readTill);t!==-1?(e=i.Promise.resolve(this._str.substring(this._readTill,t)),
this._readTill=t+1):(e=i.Promise.resolve(this._str.substr(this._readTill)),this._readTill=this._str.length)}else e=i.Promise.resolve(null);return e},e}();t.StringStream=r;var a=function(){function e(e){var t=this;this._xhr=e,this._readTill=0,this._pendingDeferred=null,this._failedError=null,e.addEventListener("progress",function(){return t._onXhrProgress()},!1),e.addEventListener("load",function(){return t._onXhrLoad()},!1),e.addEventListener("error",function(e){return t._onXhrError(e)},!1)}return e.prototype.nextLine=function(){
if(null!==this._pendingDeferred)throw new Error("XhrStream only supports one pending unfulfilled read at a time.");var e=this._pendingDeferred=new i.DeferredPromise;return this._tryResolveNextLine(),e.promise},e.prototype._onXhrProgress=function(){null!==this._pendingDeferred&&this._xhr.readyState!==XMLHttpRequest.DONE&&this._tryResolveNextLine()},e.prototype._onXhrLoad=function(){null!==this._pendingDeferred&&this._tryResolveNextLine()},e.prototype._onXhrError=function(e){this._failedError=e,null!==this._pendingDeferred&&this._tryResolveNextLine();
},e.prototype._tryResolveNextLine=function(){if(null!==this._failedError)return void this._pendingDeferred.reject(this._failedError);var e=this._xhr.responseText,t=e.indexOf("\n",this._readTill);t!==-1?(this._pendingDeferred.resolve(e.substring(this._readTill,t)),this._readTill=t+1,this._pendingDeferred=null):this._xhr.readyState===XMLHttpRequest.DONE&&(null!==this._failedError?this._pendingDeferred.reject(this._failedError):this._readTill<e.length?(this._pendingDeferred.resolve(e.substr(this._readTill)),
this._readTill=e.length):this._pendingDeferred.resolve(null),this._pendingDeferred=null)},e}();t.XhrStream=a;var s=function(){function t(t,n){this._buffer="",this._pendingDeferred=null,this._reader=t.getReader(),this._decoder=new e.TextDecoder(n,{ignoreBOM:!0})}return t.prototype.nextLine=function(){if(null!==this._pendingDeferred)throw new Error("BrowserReadableStream only supports one pending unfulfilled read at a time.");var e=this._pendingDeferred=new i.DeferredPromise;return this._tryResolveNextLine(),
e.promise},t.prototype._tryResolveNextLine=function(){var e=this,t=this._buffer.indexOf("\n");t!==-1?(this._pendingDeferred.resolve(this._buffer.substr(0,t)),this._buffer=this._buffer.substr(t+1),this._pendingDeferred=null):this._reader.read().then(function(t){var n=t.value,i=t.done;i?(0===e._buffer.length?e._pendingDeferred.resolve(null):(e._pendingDeferred.resolve(e._buffer),e._buffer=""),e._pendingDeferred=null):(e._buffer+=e._decoder.decode(n,{stream:!0}),e._tryResolveNextLine())})},t}();t.BrowserReadableStream=s;
},function(e,t){function n(e){for(var t=atob(e.contents),n=new Uint8Array(new ArrayBuffer(t.length)),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);for(var r={dataView:new DataView(n.buffer),position:0},a=c.read(r),s=null,i=0;i<a.numTables;i++){var o=d.read(r);if(o.c1+o.c2+o.c3+o.c4==="name"){s=o;break}}r.position=s.offset;for(var u=h.read(r),f=new l.Set,i=0;i<u.count;i++){var m=p.read(r);switch(m.nameId){case 1:case 4:case 6:var v=s.offset+u.stringOffset+m.offset,g=n.subarray(v,v+m.length);switch(m.platformId){
case 1:for(var y="",b=0;b<g.length;b++)y+=String.fromCharCode(g[b]);f.add(y);break;case 3:for(var w="",b=0;b<g.length;b+=2)w+=String.fromCharCode((g[b]<<8)+g[b+1]);f.add(w)}}}return f}function i(e){var t=e.__fields;return e.read=function(n){for(var i=new e,r=0;r<t.length;r++){var s=t[r],o=void 0;switch(s.type){case a.Char:o=String.fromCharCode(n.dataView.getInt8(n.position)),n.position+=1;break;case a.Uint16:o=n.dataView.getUint16(n.position),n.position+=2;break;case a.Uint32:o=n.dataView.getUint32(n.position),
n.position+=4}i[s.field]=o}return i},e}function r(e){var t=u.get(e);return void 0===t&&(t=function(t,n){var i=t.constructor;void 0===i.__fields&&(i.__fields=[]),i.__fields.push({type:e,field:n})},u.set(e,t)),t}var a,s=t(34).__decorate,o=t(30),l=t(33);!function(e){e[e.Char=0]="Char",e[e.Uint16=1]="Uint16",e[e.Uint32=2]="Uint32"}(a||(a={}));var u=new o.Map,c=function(){function e(){}return s([r(a.Uint16)],e.prototype,"majorVersion",void 0),s([r(a.Uint16)],e.prototype,"minorVersion",void 0),s([r(a.Uint16)],e.prototype,"numTables",void 0),
s([r(a.Uint16)],e.prototype,"searchRange",void 0),s([r(a.Uint16)],e.prototype,"entrySelector",void 0),s([r(a.Uint16)],e.prototype,"rangeShift",void 0),e=s([i],e)}(),d=function(){function e(){}return s([r(a.Char)],e.prototype,"c1",void 0),s([r(a.Char)],e.prototype,"c2",void 0),s([r(a.Char)],e.prototype,"c3",void 0),s([r(a.Char)],e.prototype,"c4",void 0),s([r(a.Uint32)],e.prototype,"checksum",void 0),s([r(a.Uint32)],e.prototype,"offset",void 0),s([r(a.Uint32)],e.prototype,"length",void 0),e=s([i],e);
}(),h=function(){function e(){}return s([r(a.Uint16)],e.prototype,"formatSelector",void 0),s([r(a.Uint16)],e.prototype,"count",void 0),s([r(a.Uint16)],e.prototype,"stringOffset",void 0),e=s([i],e)}(),p=function(){function e(){}return s([r(a.Uint16)],e.prototype,"platformId",void 0),s([r(a.Uint16)],e.prototype,"encodingId",void 0),s([r(a.Uint16)],e.prototype,"languageId",void 0),s([r(a.Uint16)],e.prototype,"nameId",void 0),s([r(a.Uint16)],e.prototype,"length",void 0),s([r(a.Uint16)],e.prototype,"offset",void 0),
e=s([i],e)}();e.getTtfNames=n},function(e){var t=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.MoveInstruction=t;var n=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{
get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.LineInstruction=n;var i=function(){function e(e,t,n,i,r,a){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._x3=r,this._y3=a}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},enumerable:!0,configurable:!0
}),Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x3",{get:function(){return this._x3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y3",{get:function(){return this._y3},enumerable:!0,configurable:!0}),e}();e.CubicBezierCurveInstruction=i},function(e,t){var n=t(7);e.drawing=n;var i=function(){function e(e,t,n,i){void 0===i&&(i=1),this._red=e,this._green=t,this._blue=n,this._alpha=i}return Object.defineProperty(e.prototype,"red",{
get:function(){return this._red},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"green",{get:function(){return this._green},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blue",{get:function(){return this._blue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},enumerable:!0,configurable:!0}),e.prototype.withAlpha=function(t){return null!==t?new e(this._red,this._green,this._blue,t):this},e.prototype.toString=function(){
return"rgba("+this._red+", "+this._green+", "+this._blue+", "+this._alpha.toFixed(3)+")"},e.prototype.interpolate=function(t,n){return new e(this._red+n*(t.red-this._red),this._green+n*(t.green-this._green),this._blue+n*(t.blue-this._blue),this._alpha+n*(t.alpha-this._alpha))},e}();e.Color=i;var r=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Comment=r;var a=function(){function e(e){
this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"Text { value: "+this._value.replace(/\u00A0/g,"\\h")+" }"},e}();e.Text=a;var s=function(){function e(){}return e}();e.NewLine=s;var o=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Italic=o;var l=function(){function e(e){
this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Bold=l;var u=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Underline=u;var c=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.StrikeThrough=c;
var d=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Border=d;var h=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.BorderX=h;var p=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,
configurable:!0}),e}();e.BorderY=p;var f=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Shadow=f;var m=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowX=m;var v=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){
return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowY=v;var g=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Blur=g;var y=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.GaussianBlur=y;var b=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontName=b;var w=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontSize=w;var S=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontSizePlus=S;var P=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontSizeMinus=P;var x=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontScaleX=x;var C=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.FontScaleY=C;var T=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.LetterSpacing=T;var _=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.RotateX=_;var E=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.RotateY=E;var k=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.RotateZ=k;var I=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SkewX=I;var A=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SkewY=A;var M=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{
get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.PrimaryColor=M;var D=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SecondaryColor=D;var R=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.OutlineColor=R;var O=function(){function e(e){this._value=e;
}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.ShadowColor=O;var L=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Alpha=L;var N=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.PrimaryAlpha=N;var U=function(){
function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.SecondaryAlpha=U;var F=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.OutlineAlpha=F;var j=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0
}),e}();e.ShadowAlpha=j;var B=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Alignment=B;var z=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}();e.ColorKaraoke=z;var V=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){
return this._duration},enumerable:!0,configurable:!0}),e}();e.SweepingColorKaraoke=V;var H=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}();e.OutlineKaraoke=H;var q=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.WrappingStyle=q;var W=function(){function e(e){this._value=e;
}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.Reset=W;var K=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.Position=K;var Q=function(){function e(e,t,n,i,r,a){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._t1=r,
this._t2=a}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t1",{get:function(){return this._t1;
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t2",{get:function(){return this._t2},enumerable:!0,configurable:!0}),e}();e.Move=Q;var Y=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e}();e.RotationOrigin=Y;var G=function(){function e(e,t){this._start=e,this._end=t}return Object.defineProperty(e.prototype,"start",{
get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),e}();e.Fade=G;var $=function(){function e(e,t,n,i,r,a,s){this._a1=e,this._a2=t,this._a3=n,this._t1=i,this._t2=r,this._t3=a,this._t4=s}return Object.defineProperty(e.prototype,"a1",{get:function(){return this._a1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"a2",{get:function(){return this._a2},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"a3",{get:function(){return this._a3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t1",{get:function(){return this._t1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t2",{get:function(){return this._t2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t3",{get:function(){return this._t3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"t4",{get:function(){return this._t4;
},enumerable:!0,configurable:!0}),e}();e.ComplexFade=$;var X=function(){function e(e,t,n,i){this._start=e,this._end=t,this._accel=n,this._tags=i}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accel",{get:function(){return this._accel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tags",{
get:function(){return this._tags},enumerable:!0,configurable:!0}),e}();e.Transform=X;var J=function(){function e(e,t,n,i,r){this._x1=e,this._y1=t,this._x2=n,this._y2=i,this._inside=r}return Object.defineProperty(e.prototype,"x1",{get:function(){return this._x1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this._y1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){return this._x2},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"y2",{get:function(){return this._y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inside",{get:function(){return this._inside},enumerable:!0,configurable:!0}),e}();e.RectangularClip=J;var Z=function(){function e(e,t,n){this._scale=e,this._instructions=t,this._inside=n}return Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instructions",{get:function(){
return this._instructions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inside",{get:function(){return this._inside},enumerable:!0,configurable:!0}),e}();e.VectorClip=Z;var ee=function(){function e(e){this._scale=e}return Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!0,configurable:!0}),e}();e.DrawingMode=ee;var te=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value;
},enumerable:!0,configurable:!0}),e}();e.DrawingBaselineOffset=te;var ne=function(){function e(e){this._instructions=e}return Object.defineProperty(e.prototype,"instructions",{get:function(){return this._instructions},enumerable:!0,configurable:!0}),e}();e.DrawingInstructions=ne;for(var ie=function(e,t){if(!e.prototype.hasOwnProperty("toString")){var n=Object.getOwnPropertyNames(e.prototype).filter(function(e){return"constructor"!==e});e.prototype.toString=function(){var e=this;return t+" { "+n.map(function(t){
return t+": "+e[t]}).join(", ")+(n.length>0?" ":"")+"}"}}},re=t(38),ae=0,se=Object.keys(e);ae<se.length;ae++){var oe=se[ae],le=e[oe];le instanceof Function&&(ie(le,oe),re.registerClassPrototype(le.prototype))}for(var ue=0,ce=Object.keys(n);ue<ce.length;ue++){var oe=ce[ue],le=n[oe];le instanceof Function&&(ie(le,"Drawing"+oe),re.registerClassPrototype(le.prototype))}},function(e,t){var n=t(23),i=t(11),r=function(){function e(e,t){this._getCurrentTime=e,this._autoPauseAfter=t,this._manualClock=new i.ManualClock,
this._nextAnimationFrameRequestId=null,this._lastKnownExternalTime=null,this._lastKnownExternalTimeObtainedAt=null}return e.prototype.play=function(){this._manualClock.enabled&&(this._startTicking(),this._manualClock.play())},e.prototype.pause=function(){if(this._manualClock.enabled){if(null===this._nextAnimationFrameRequestId)return void(n.debugMode&&console.warn("AutoClock.pause: Abnormal state detected. AutoClock._nextAnimationFrameRequestId should not have been null."));this._stopTicking(),this._manualClock.pause();
}},e.prototype.seeking=function(){this._manualClock.seek(this._getCurrentTime())},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._manualClock.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._manualClock.enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._manualClock.paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rate",{
get:function(){return this._manualClock.rate},enumerable:!0,configurable:!0}),e.prototype.setRate=function(e){this._manualClock.setRate(e)},e.prototype.enable=function(){return!!this._manualClock.enable()&&(this._startTicking(),!0)},e.prototype.disable=function(){return!!this._manualClock.disable()&&(this._stopTicking(),!0)},e.prototype.toggle=function(){this._manualClock.enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){return e?this.enable():this.disable()},e.prototype.addEventListener=function(e,t){
this._manualClock.addEventListener(e,t)},e.prototype._onTimerTick=function(e){var t=this;if(!this._manualClock.enabled)return void(n.debugMode&&console.warn("AutoClock._onTimerTick: Called when disabled."));var i=this._manualClock.currentTime,r=this._getCurrentTime();this._manualClock.paused?i!==r&&(this._lastKnownExternalTime=r,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(r)):null!==this._lastKnownExternalTime&&r===this._lastKnownExternalTime?e-this._lastKnownExternalTimeObtainedAt>this._autoPauseAfter?(this._lastKnownExternalTimeObtainedAt=null,
this._manualClock.pause()):this._manualClock.tick((e-this._lastKnownExternalTimeObtainedAt)/1e3*this._manualClock.rate+this._lastKnownExternalTime):(this._lastKnownExternalTime=r,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(r)),this._nextAnimationFrameRequestId=requestAnimationFrame(function(e){return t._onTimerTick(e)})},e.prototype._startTicking=function(){var e=this;null===this._nextAnimationFrameRequestId&&(this._nextAnimationFrameRequestId=requestAnimationFrame(function(t){
return e._onTimerTick(t)}))},e.prototype._stopTicking=function(){null!==this._nextAnimationFrameRequestId&&(cancelAnimationFrame(this._nextAnimationFrameRequestId),this._nextAnimationFrameRequestId=null)},e}();e.AutoClock=r},function(e){var t=function(){function e(){}return e.prototype.addEventListener=function(e,t){var n=this._eventListeners.get(e);void 0===n&&this._eventListeners.set(e,n=[]),n.push(t)},e.prototype._dispatchEvent=function(e,t){var n=this._eventListeners.get(e);if(void 0!==n)for(var i=0;i<n.length;i++){
var r=n[i];r.apply(this,t)}},e}();e.EventSource=t,function(e){e[e.Play=0]="Play",e[e.Tick=1]="Tick",e[e.Pause=2]="Pause",e[e.Stop=3]="Stop",e[e.RateChange=4]="RateChange"}(e.ClockEvent||(e.ClockEvent={}))},function(e,t){var n=t(31),i=t(30),r=t(10),a=function(){function e(){this._currentTime=-1,this._rate=1,this._enabled=!0,this._paused=!0,this._eventListeners=new i.Map}return e.prototype.play=function(){this._enabled&&this._paused&&(this._paused=!1,this._dispatchEvent(r.ClockEvent.Play,[]))},e.prototype.tick=function(e){
this._enabled&&this._currentTime!==e&&(this.play(),this._currentTime=e,this._dispatchEvent(r.ClockEvent.Tick,[]))},e.prototype.seek=function(e){this._enabled&&(this.pause(),this._currentTime!==e&&(this.stop(),this.tick(e),this.pause()))},e.prototype.pause=function(){this._enabled&&(this._paused||(this._paused=!0,this._dispatchEvent(r.ClockEvent.Pause,[])))},e.prototype.stop=function(){this._dispatchEvent(r.ClockEvent.Stop,[])},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._currentTime;
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rate",{get:function(){return this._rate},enumerable:!0,configurable:!0}),e.prototype.setRate=function(e){this._rate!==e&&(this._rate=e,this._dispatchEvent(r.ClockEvent.RateChange,[]))},e.prototype.enable=function(){
return!this._enabled&&(this._enabled=!0,!0)},e.prototype.disable=function(){return!!this._enabled&&(this.pause(),this.stop(),this._enabled=!1,!0)},e.prototype.toggle=function(){this._enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){return e?this.enable():this.disable()},e}();e.ManualClock=a,n.mixin(a,[r.EventSource])},function(e,t){var n=t(9),i=function(){function e(e){var t=this;this._autoClock=new n.AutoClock(function(){return e.currentTime},100),e.addEventListener("playing",function(){
return t._autoClock.play()},!1),e.addEventListener("pause",function(){return t._autoClock.pause()},!1),e.addEventListener("seeking",function(){return t._autoClock.seeking()},!1),e.addEventListener("ratechange",function(){return t._autoClock.setRate(e.playbackRate)},!1)}return Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._autoClock.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._autoClock.enabled},
enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._autoClock.paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rate",{get:function(){return this._autoClock.rate},enumerable:!0,configurable:!0}),e.prototype.enable=function(){return this._autoClock.enable()},e.prototype.disable=function(){return this._autoClock.disable()},e.prototype.toggle=function(){this._autoClock.enabled?this.disable():this.enable()},e.prototype.setEnabled=function(e){
return e?this.enable():this.disable()},e.prototype.addEventListener=function(e,t){this._autoClock.addEventListener(e,t)},e}();e.VideoClock=i},function(e,t){var n=t(34).__extends,i=t(12),r=t(21),a=function(e){function t(t,n,r){e.call(this,n,new i.VideoClock(t),document.createElement("div"),r),this._video=t,this._video.parentElement.replaceChild(this.libjassSubsWrapper,this._video),this.libjassSubsWrapper.insertBefore(this._video,this.libjassSubsWrapper.firstElementChild)}return n(t,e),t.prototype.resize=function(){
var t=this._video.videoWidth,n=this._video.videoHeight,i=this._video.offsetWidth,r=this._video.offsetHeight,a=Math.min(i/t,r/n),s=t*a,o=n*a,l=(i-s)/2,u=(r-o)/2;e.prototype.resize.call(this,s,o,l,u)},t.prototype.resizeVideo=function(){console.warn("`DefaultRenderer.resizeVideo(width, height)` has been deprecated. Use `DefaultRenderer.resize()` instead."),this.resize()},t.prototype._ready=function(){this.resize(),e.prototype._ready.call(this)},t}(r.WebRenderer);e.DefaultRenderer=a},function(e,t){var n=t(10);
e.ClockEvent=n.ClockEvent,e.EventSource=n.EventSource;var i=t(9);e.AutoClock=i.AutoClock;var r=t(11);e.ManualClock=r.ManualClock;var a=t(12);e.VideoClock=a.VideoClock;var s=t(13);e.DefaultRenderer=s.DefaultRenderer;var o=t(15);e.NullRenderer=o.NullRenderer;var l=t(21);e.WebRenderer=l.WebRenderer;var u=t(16);e.RendererSettings=u.RendererSettings},function(e,t){var n=t(10),i=t(16),r=t(23),a=function(){function e(t,r,a){var s=this;this._ass=t,this._clock=r,this._id=++e._lastRendererId,this._settings=i.RendererSettings.from(a),
this._clock.addEventListener(n.ClockEvent.Play,function(){return s._onClockPlay()}),this._clock.addEventListener(n.ClockEvent.Tick,function(){return s._onClockTick()}),this._clock.addEventListener(n.ClockEvent.Pause,function(){return s._onClockPause()}),this._clock.addEventListener(n.ClockEvent.Stop,function(){return s._onClockStop()}),this._clock.addEventListener(n.ClockEvent.RateChange,function(){return s._onClockRateChange()})}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id;
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ass",{get:function(){return this._ass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clock",{get:function(){return this._clock},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"settings",{get:function(){return this._settings},enumerable:!0,configurable:!0}),e.prototype.preRender=function(){},e.prototype.draw=function(){},e.prototype.enable=function(){return this._clock.enable()},e.prototype.disable=function(){
return this._clock.disable()},e.prototype.toggle=function(){this._clock.toggle()},e.prototype.setEnabled=function(e){return this._clock.setEnabled(e)},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._clock.enabled},enumerable:!0,configurable:!0}),e.prototype._onClockPlay=function(){r.verboseMode&&console.log("NullRenderer._onClockPlay")},e.prototype._onClockTick=function(){var e=this._clock.currentTime;r.verboseMode&&console.log("NullRenderer._onClockTick: currentTime = "+e);
for(var t=0,n=this._ass.dialogues;t<n.length;t++){var i=n[t];i.end>e&&(i.start<=e?this.draw(i):i.start<=e+this._settings.preRenderTime&&this.preRender(i))}},e.prototype._onClockPause=function(){r.verboseMode&&console.log("NullRenderer._onClockPause")},e.prototype._onClockStop=function(){r.verboseMode&&console.log("NullRenderer._onClockStop")},e.prototype._onClockRateChange=function(){r.verboseMode&&console.log("NullRenderer._onClockRateChange")},e._lastRendererId=-1,e}();e.NullRenderer=a},function(e,t){
function n(e){return e.type===CSSRule.FONT_FACE_RULE}var i=t(30),r=function(){function e(){}return e.makeFontMapFromStyleElement=function(e){for(var t=new i.Map,r=e.sheet,a=0;a<r.cssRules.length;a++){var s=r.cssRules[a];if(n(s)){var o=s.style.getPropertyValue("font-family").match(/^["']?(.*?)["']?$/)[1],l=s.style.getPropertyValue("src");l||(l=s.cssText.split("\n").map(function(e){return e.match(/src:\s*([^;]+?)\s*;/)}).filter(function(e){return null!==e}).map(function(e){return e[1]})[0]),t.set(o,l);
}}return t},e.from=function(t){void 0!==t&&null!==t||(t={});var n=t,i=n.fontMap,r=void 0===i?null:i,a=n.preRenderTime,s=void 0===a?5:a,o=n.preciseOutlines,l=void 0!==o&&o,u=n.enableSvg,c=void 0===u||u,d=n.fallbackFonts,h=void 0===d?'Arial, Helvetica, sans-serif, "Segoe UI Symbol"':d,p=n.useAttachedFonts,f=void 0!==p&&p,m=new e;return m.fontMap=r,m.preRenderTime=s,m.preciseOutlines=l,m.enableSvg=c,m.fallbackFonts=h,m.useAttachedFonts=f,m},e}();e.RendererSettings=r},function(e,t){var n=t(30),i=function(){
function e(t,i){this._style=i,this._animationStyle="",this._animationDelays=new n.Map,this._numAnimations=0,this._id=t.id+"-"+e._nextId++,this._rate=t.clock.rate}return Object.defineProperty(e.prototype,"animationStyle",{get:function(){return this._animationStyle},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationDelays",{get:function(){return this._animationDelays},enumerable:!0,configurable:!0}),e.prototype.add=function(e,t){for(var n=null,i=null,r=0;r<t.length;r++){var a=t[r];
null===n&&(n=a.time),i=a.time}for(var s="",o=0;o<t.length;o++){var a=t[o];s+="\t"+(100*(i-n===0?1:(a.time-n)/(i-n))).toFixed(3)+"% {\n",a.properties.forEach(function(e,t){s+="\t\t"+t+": "+e+";\n"}),s+="\t}\n"}var l="animation-"+this._id+"-"+this._numAnimations++;this._style.appendChild(document.createTextNode("@-webkit-keyframes "+l+" {\n"+s+"\n}")),this._style.appendChild(document.createTextNode("@keyframes "+l+" {\n"+s+"\n}")),""!==this._animationStyle&&(this._animationStyle+=","),this._animationStyle+=l+" "+((i-n)/this._rate).toFixed(3)+"s "+e,
this._animationDelays.set(l,n)},e._nextId=0,e}();e.AnimationCollection=i},function(e,t){var n=t(8),i=function(){function e(e,t){this._outputScaleX=e,this._outputScaleY=t,this._scale=1,this._baselineOffset=0}return Object.defineProperty(e.prototype,"scale",{set:function(e){this._scale=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baselineOffset",{set:function(e){this._baselineOffset=e},enumerable:!0,configurable:!0}),e.prototype.toSVG=function(e,t){for(var i=Math.pow(2,this._scale-1),r=this._outputScaleX/i,a=this._outputScaleY/i,s=document.createElementNS("http://www.w3.org/2000/svg","path"),o=0,l=0,u=0,c=e.instructions;u<c.length;u++){
var d=c[u];d instanceof n.drawing.MoveInstruction?(s.pathSegList.appendItem(s.createSVGPathSegMovetoAbs(d.x,d.y+this._baselineOffset)),o=Math.max(o,d.x),l=Math.max(l,d.y+this._baselineOffset)):d instanceof n.drawing.LineInstruction?(s.pathSegList.appendItem(s.createSVGPathSegLinetoAbs(d.x,d.y+this._baselineOffset)),o=Math.max(o,d.x),l=Math.max(l,d.y+this._baselineOffset)):d instanceof n.drawing.CubicBezierCurveInstruction&&(s.pathSegList.appendItem(s.createSVGPathSegCurvetoCubicAbs(d.x3,d.y3+this._baselineOffset,d.x1,d.y1+this._baselineOffset,d.x2,d.y2+this._baselineOffset)),
o=Math.max(o,d.x1,d.x2,d.x3),l=Math.max(l,d.y1+this._baselineOffset,d.y2+this._baselineOffset,d.y3+this._baselineOffset))}var h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("version","1.1"),h.width.baseVal.valueAsString=(o*r).toFixed(3)+"px",h.height.baseVal.valueAsString=(l*a).toFixed(3)+"px";var p=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(p),p.setAttribute("transform","scale("+r.toFixed(3)+" "+a.toFixed(3)+")"),p.appendChild(s),
s.setAttribute("fill",t.toString()),h},e}();e.DrawingStyles=i},function(e,t){function n(e,t,n,i){var r='"'+e+'"';""!==n&&(r+=", "+n),i.style.fontFamily=r,i.style.fontSize=t+"px"}function i(e,t,i,r){return n(e,t,i,r),new u.Promise(function(e){return setTimeout(function(){return e(r.offsetHeight)},1e3)})}function r(e,t,i,r){return n(e,t,i,r),r.offsetHeight}function a(e,t){return[e,180/(t-e)]}function s(e,t,n){return i(e,180,t,n).then(function(r){return i(e,360,t,n).then(function(e){return a(r,e)})});
}function o(e,t,n){return 180+(e-t)*n}function l(e,t,n,i,s){var l=s.get(e);if(void 0===l){var u=r(e,180,n,i),c=r(e,360,n,i);s.set(e,l=a(u,c))}var d=l[0],h=l[1];return o(t,d,h)}var u=t(32);e.calculateFontMetrics=s,e.fontSizeForLineHeight=l},function(e){var t=function(){function e(e,t){this._time=e,this._properties=t}return Object.defineProperty(e.prototype,"time",{get:function(){return this._time},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties;
},enumerable:!0,configurable:!0}),e}();e.Keyframe=t},function(t,n){var i=n(34).__extends,r=n(17),a=n(18),s=n(19),o=n(20),l=n(22),u=n(10),c=n(15),d=n(6),h=n(8),p=n(23),f=n(25),m=n(27),v=n(31),g=n(30),y=n(32),b=/^(url|local)\(["']?(.+?)["']?\)$/,w=function(t){function n(n,i,r,a){var s=this;t.call(this,n,i,function(){if(!(r instanceof HTMLDivElement)){var e=a;a=r,r=e,console.warn("WebRenderer's constructor now takes libjassSubsWrapper as the third parameter and settings as the fourth parameter. Please update the caller.");
}return a}()),this._libjassSubsWrapper=r,this._layerWrappers=[],this._layerAlignmentWrappers=[],this._fontMetricsCache=new g.Map,this._currentSubs=new g.Map,this._preRenderedSubs=new g.Map,this._eventListeners=new g.Map,this._libjassSubsWrapper.classList.add("libjass-wrapper"),this._subsWrapper=document.createElement("div"),this._libjassSubsWrapper.appendChild(this._subsWrapper),this._subsWrapper.className="libjass-subs",this._fontSizeElement=document.createElement("div"),this._libjassSubsWrapper.appendChild(this._fontSizeElement),
this._fontSizeElement.className="libjass-font-measure",this._fontSizeElement.appendChild(document.createTextNode("M")),p.debugMode&&console.log("Preloading fonts...");var o=[],l=new g.Map,u=null===this.settings.fontMap?new g.Map:this.settings.fontMap,c=new g.Map;this.settings.useAttachedFonts&&n.attachments.forEach(function(e){if(e.type===f.AttachmentType.Font){var t=null;try{t=d.getTtfNames(e)}catch(n){return void console.error(n)}var i="data:application/x-font-ttf;base64,"+e.contents;t.forEach(function(e){
var t=u.get(e);if(void 0!==t)if("string"!=typeof t)t.push(i);else{var n=c.get(e);void 0===n&&c.set(e,n=[]),n.push(i)}else u.set(e,[i])})}}),u.forEach(function(t,n){var i;if(e.document.fonts&&e.document.fonts.add){var r="string"==typeof t?t:t.map(function(e){return null!==e.match(b)?e:'url("'+e+'")'}).join(", "),a=c.get(n);if(void 0!==a)for(var u=0;u<a.length;u++){var d=a[u];r+=', url("'+d+'")'}var h=[];e.document.fonts.forEach(function(e){e.family!==n&&e.family!=='"'+n+'"'||h.push(e)});var f;if(0===h.length){
var m=new FontFace(n,r),v=new FontFace('"'+n+'"',r);e.document.fonts.add(m),e.document.fonts.add(v),f=y.any([m.load(),v.load()])}else f=y.any(h.map(function(e){return e.load()}));i=s._calculateFontMetricsAfterFetch(n,f.catch(function(e){return console.warn("Fetching fonts for "+n+" at "+r+" failed: %o",e),null}))}else{var g=("string"==typeof t?t.split(/,/):t).map(function(e){return e.trim()}).map(function(e){var t=e.match(b);return null===t?e:"local"===t[1]?null:t[2]}).filter(function(e){return null!==e;
}),a=c.get(n);void 0!==a&&(g=g.concat(a));var w=g.map(function(e){var t=l.get(e);return void 0===t&&(t=new y.Promise(function(t,n){var i=new XMLHttpRequest;i.addEventListener("load",function(){p.debugMode&&console.log("Preloaded "+e+"."),t(null)}),i.addEventListener("error",function(e){n(e)}),i.open("GET",e,!0),i.send()}),l.set(e,t)),t}),S=0===w.length?y.Promise.resolve(null):y.first(w).catch(function(e){return console.warn("Fetching fonts for "+n+" at "+g.join(", ")+" failed: %o",e),null});i=s._calculateFontMetricsAfterFetch(n,S);
}o.push(i.then(function(e){return s._fontMetricsCache.set(n,e)}))}),y.Promise.all(o).then(function(){p.debugMode&&console.log("All fonts have been preloaded."),s._ready()})}return i(n,t),Object.defineProperty(n.prototype,"libjassSubsWrapper",{get:function(){return this._libjassSubsWrapper},enumerable:!0,configurable:!0}),n.prototype.resize=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0),this._removeAllSubs(),this._subsWrapper.style.width=e.toFixed(3)+"px",this._subsWrapper.style.height=t.toFixed(3)+"px",
this._subsWrapper.style.left=n.toFixed(3)+"px",this._subsWrapper.style.top=i.toFixed(3)+"px",this._subsWrapperWidth=e,this._scaleX=e/this.ass.properties.resolutionX,this._scaleY=t/this.ass.properties.resolutionY,this._preRenderedSubs.clear(),this.clock.currentTime!==-1&&this._onClockTick()},n.prototype.preRender=function(e){var t=this,i=this._preRenderedSubs.get(e.id);if(i)return i;var s=this.clock.currentTime-e.start;if(e.containsTransformTag&&s<0)return null;var u=document.createElement("div");u.style.marginLeft=(this._scaleX*e.style.marginLeft).toFixed(3)+"px",
u.style.marginRight=(this._scaleX*e.style.marginRight).toFixed(3)+"px",u.style.marginTop=u.style.marginBottom=(this._scaleY*e.style.marginVertical).toFixed(3)+"px",u.style.minWidth=(this._subsWrapperWidth-this._scaleX*(e.style.marginLeft+e.style.marginRight)).toFixed(3)+"px";var c=document.createElement("style");c.id="libjass-animation-styles-"+this.id+"-"+e.id,c.type="text/css";var d=new r.AnimationCollection(this,c),f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("version","1.1"),
f.setAttribute("class","libjass-filters"),f.width.baseVal.valueAsString="0",f.height.baseVal.valueAsString="0";var v=document.createElementNS("http://www.w3.org/2000/svg","defs");f.appendChild(v);var y=null,b=new l.SpanStyles(this,e,this._scaleX,this._scaleY,this.settings,this._fontSizeElement,v,this._fontMetricsCache),w=null,S=!1,P=function(e){null!==y&&y.hasChildNodes()&&u.appendChild(b.setStylesOnSpan(y,w)),null!==w&&w.animationDelays.forEach(function(e,t){return d.animationDelays.set(t,e)}),e&&(S?u.appendChild(b.makeNewLine()):u.appendChild(document.createElement("br"))),
y=document.createElement("span"),w=new r.AnimationCollection(t,c),S=e};P(!1);for(var x=new a.DrawingStyles(this._scaleX,this._scaleY),C=this.ass.properties.wrappingStyle,T=0,_=0,E=e.parts;_<E.length;_++){var k=E[_];if(k instanceof h.Italic)b.italic=k.value;else if(k instanceof h.Bold)b.bold=k.value;else if(k instanceof h.Underline)b.underline=k.value;else if(k instanceof h.StrikeThrough)b.strikeThrough=k.value;else if(k instanceof h.Border)b.outlineWidth=k.value,b.outlineHeight=k.value;else if(k instanceof h.BorderX)b.outlineWidth=k.value;else if(k instanceof h.BorderY)b.outlineHeight=k.value;else if(k instanceof h.Shadow)b.shadowDepthX=k.value,
b.shadowDepthY=k.value;else if(k instanceof h.ShadowX)b.shadowDepthX=k.value;else if(k instanceof h.ShadowY)b.shadowDepthY=k.value;else if(k instanceof h.Blur)b.blur=k.value;else if(k instanceof h.GaussianBlur)b.gaussianBlur=k.value;else if(k instanceof h.FontName)b.fontName=k.value;else if(k instanceof h.FontSize)b.fontSize=k.value;else if(k instanceof h.FontSizePlus)b.fontSize+=k.value;else if(k instanceof h.FontSizeMinus)b.fontSize-=k.value;else if(k instanceof h.FontScaleX)b.fontScaleX=k.value;else if(k instanceof h.FontScaleY)b.fontScaleY=k.value;else if(k instanceof h.LetterSpacing)b.letterSpacing=k.value;else if(k instanceof h.RotateX)b.rotationX=k.value;else if(k instanceof h.RotateY)b.rotationY=k.value;else if(k instanceof h.RotateZ)b.rotationZ=k.value;else if(k instanceof h.SkewX)b.skewX=k.value;else if(k instanceof h.SkewY)b.skewY=k.value;else if(k instanceof h.PrimaryColor)b.primaryColor=k.value;else if(k instanceof h.SecondaryColor)b.secondaryColor=k.value;else if(k instanceof h.OutlineColor)b.outlineColor=k.value;else if(k instanceof h.ShadowColor)b.shadowColor=k.value;else if(k instanceof h.Alpha)b.primaryAlpha=k.value,
b.secondaryAlpha=k.value,b.outlineAlpha=k.value,b.shadowAlpha=k.value;else if(k instanceof h.PrimaryAlpha)b.primaryAlpha=k.value;else if(k instanceof h.SecondaryAlpha)b.secondaryAlpha=k.value;else if(k instanceof h.OutlineAlpha)b.outlineAlpha=k.value;else if(k instanceof h.ShadowAlpha)b.shadowAlpha=k.value;else if(k instanceof h.Alignment);else if(k instanceof h.ColorKaraoke)P(!1),w.add("step-end",[new o.Keyframe(0,new g.Map([["color",b.secondaryColor.withAlpha(b.secondaryAlpha).toString()]])),new o.Keyframe(T,new g.Map([["color",b.primaryColor.withAlpha(b.primaryAlpha).toString()]]))]),
T+=k.duration;else if(k instanceof h.WrappingStyle)C=k.value;else if(k instanceof h.Reset)b.reset(this.ass.styles.get(k.value));else if(k instanceof h.Position)u.style.position="absolute",u.style.left=(this._scaleX*k.x).toFixed(3)+"px",u.style.top=(this._scaleY*k.y).toFixed(3)+"px";else if(k instanceof h.Move)u.style.position="absolute",d.add("linear",[new o.Keyframe(0,new g.Map([["left",(this._scaleX*k.x1).toFixed(3)+"px"],["top",(this._scaleY*k.y1).toFixed(3)+"px"]])),new o.Keyframe(k.t1,new g.Map([["left",(this._scaleX*k.x1).toFixed(3)+"px"],["top",(this._scaleY*k.y1).toFixed(3)+"px"]])),new o.Keyframe(k.t2,new g.Map([["left",(this._scaleX*k.x2).toFixed(3)+"px"],["top",(this._scaleY*k.y2).toFixed(3)+"px"]])),new o.Keyframe(e.end-e.start,new g.Map([["left",(this._scaleX*k.x2).toFixed(3)+"px"],["top",(this._scaleY*k.y2).toFixed(3)+"px"]]))]);else if(k instanceof h.Fade)d.add("linear",[new o.Keyframe(0,new g.Map([["opacity","0"]])),new o.Keyframe(k.start,new g.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start-k.end,new g.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start,new g.Map([["opacity","0"]]))]);else if(k instanceof h.ComplexFade)d.add("linear",[new o.Keyframe(0,new g.Map([["opacity",k.a1.toFixed(3)]])),new o.Keyframe(k.t1,new g.Map([["opacity",k.a1.toFixed(3)]])),new o.Keyframe(k.t2,new g.Map([["opacity",k.a2.toFixed(3)]])),new o.Keyframe(k.t3,new g.Map([["opacity",k.a2.toFixed(3)]])),new o.Keyframe(k.t4,new g.Map([["opacity",k.a3.toFixed(3)]])),new o.Keyframe(e.end-e.start,new g.Map([["opacity",k.a3.toFixed(3)]]))]);else if(k instanceof h.Transform)for(var I=s<=k.start?0:s>=k.end?1:Math.pow((s-k.start)/(k.end-k.start),k.accel),A=0,M=k.tags;A<M.length;A++){
var D=M[A];D instanceof h.Border?(b.outlineWidth+=I*(D.value-b.outlineWidth),b.outlineHeight+=I*(D.value-b.outlineHeight)):D instanceof h.BorderX?b.outlineWidth+=I*(D.value-b.outlineWidth):D instanceof h.BorderY?b.outlineHeight+=I*(D.value-b.outlineHeight):D instanceof h.Shadow?(b.shadowDepthX+=I*(D.value-b.shadowDepthX),b.shadowDepthY+=I*(D.value-b.shadowDepthY)):D instanceof h.ShadowX?b.shadowDepthX+=I*(D.value-b.shadowDepthX):D instanceof h.ShadowY?b.shadowDepthY+=I*(D.value-b.shadowDepthY):D instanceof h.Blur?b.blur+=I*(D.value-b.blur):D instanceof h.GaussianBlur?b.gaussianBlur+=I*(D.value-b.gaussianBlur):D instanceof h.FontSize?b.fontSize+=I*(D.value-b.fontSize):D instanceof h.FontSizePlus?b.fontSize+=I*D.value:D instanceof h.FontSizeMinus?b.fontSize-=I*D.value:D instanceof h.FontScaleX?b.fontScaleX+=I*(D.value-b.fontScaleX):D instanceof h.FontScaleY?b.fontScaleY+=I*(D.value-b.fontScaleY):D instanceof h.LetterSpacing?b.letterSpacing+=I*(D.value-b.letterSpacing):D instanceof h.RotateX?b.rotationX+=I*(D.value-b.rotationX):D instanceof h.RotateY?b.rotationY+=I*(D.value-b.rotationY):D instanceof h.RotateZ?b.rotationZ+=I*(D.value-b.rotationZ):D instanceof h.SkewX?b.skewX+=I*(D.value-b.skewX):D instanceof h.SkewY?b.skewY+=I*(D.value-b.skewY):D instanceof h.PrimaryColor?b.primaryColor=b.primaryColor.interpolate(D.value,I):D instanceof h.SecondaryColor?b.secondaryColor=b.secondaryColor.interpolate(D.value,I):D instanceof h.OutlineColor?b.outlineColor=b.outlineColor.interpolate(D.value,I):D instanceof h.ShadowColor?b.shadowColor=b.shadowColor.interpolate(D.value,I):D instanceof h.Alpha?(b.primaryAlpha+=I*(D.value-b.primaryAlpha),
b.secondaryAlpha+=I*(D.value-b.secondaryAlpha),b.outlineAlpha+=I*(D.value-b.outlineAlpha),b.shadowAlpha+=I*(D.value-b.shadowAlpha)):D instanceof h.PrimaryAlpha?b.primaryAlpha+=I*(D.value-b.primaryAlpha):D instanceof h.SecondaryAlpha?b.secondaryAlpha+=I*(D.value-b.secondaryAlpha):D instanceof h.OutlineAlpha?b.outlineAlpha+=I*(D.value-b.outlineAlpha):D instanceof h.ShadowAlpha&&(b.shadowAlpha+=I*(D.value-b.shadowAlpha))}else k instanceof h.DrawingMode?0!==k.scale&&(x.scale=k.scale):k instanceof h.DrawingBaselineOffset?x.baselineOffset=k.value:k instanceof h.DrawingInstructions?(y.appendChild(x.toSVG(k,b.primaryColor.withAlpha(b.primaryAlpha))),
P(!1)):k instanceof h.Text?(y.appendChild(document.createTextNode(k.value+"\u200c")),P(!1)):p.debugMode&&k instanceof h.Comment?(y.appendChild(document.createTextNode(k.value)),P(!1)):k instanceof h.NewLine&&P(!0)}for(var R=0,O=e.parts;R<O.length;R++){var k=O[R];if(k instanceof h.Position||k instanceof h.Move){var L=n._transformOrigins[e.alignment],N="translate("+-L[0]+"%, "+-L[1]+"%) translate(-"+u.style.marginLeft+", -"+u.style.marginTop+")",U=L[0]+"% "+L[1]+"%";u.style.webkitTransform=N,u.style.webkitTransformOrigin=U,
u.style.transform=N,u.style.transformOrigin=U;break}}switch(C){case m.WrappingStyle.EndOfLineWrapping:u.style.whiteSpace="pre-wrap";break;case m.WrappingStyle.NoLineWrapping:u.style.whiteSpace="pre";break;case m.WrappingStyle.SmartWrappingWithWiderTopLine:case m.WrappingStyle.SmartWrappingWithWiderBottomLine:u.style.whiteSpace="pre-wrap"}if(""!==u.style.position)switch(e.alignment){case 1:case 4:case 7:u.style.textAlign="left";break;case 2:case 5:case 8:u.style.textAlign="center";break;case 3:case 6:
case 9:u.style.textAlign="right"}u.style.webkitAnimation=d.animationStyle,u.style.animation=d.animationStyle,u.setAttribute("data-dialogue-id",this.id+"-"+e.id),""!==c.textContent&&u.appendChild(c),v.hasChildNodes()&&u.appendChild(f);var F={sub:u,animationDelays:d.animationDelays};return e.containsTransformTag||this._preRenderedSubs.set(e.id,F),F},n.prototype.draw=function(e){var t=this;if(!this._currentSubs.has(e)||e.containsTransformTag){p.debugMode&&console.log(e.toString());var n=this._preRenderedSubs.get(e.id);
void 0===n&&(n=this.preRender(e),p.debugMode&&console.log(e.toString()));var i=n.sub.cloneNode(!0),r=function(i){var r=i.style.animationName||i.style.webkitAnimationName;if(void 0!==r&&""!==r){var a=r.split(",").map(function(i){i=i.trim();var r=n.animationDelays.get(i);return((r+e.start-t.clock.currentTime)/t.clock.rate).toFixed(3)+"s"}).join(", ");i.style.webkitAnimationDelay=a,i.style.animationDelay=a}};r(i);for(var a=i.querySelectorAll('[style*="animation:"]'),s=0;s<a.length;s++)r(a[s]);var o=e.layer,l="absolute"===i.style.position?0:e.alignment;
if(void 0===this._layerWrappers[o]){var u=document.createElement("div");u.className="layer layer"+o;for(var c=null,d=o+1;d<this._layerWrappers.length&&null===c;d++)void 0!==this._layerWrappers[d]&&(c=this._layerWrappers[d]);this._subsWrapper.insertBefore(u,c),this._layerWrappers[o]=u,this._layerAlignmentWrappers[o]=[]}if(void 0===this._layerAlignmentWrappers[o][l]){var h=document.createElement("div");h.className="an an"+l;for(var u=this._layerWrappers[o],c=null,f=l+1;f<this._layerAlignmentWrappers[o].length&&null===c;f++)void 0!==this._layerAlignmentWrappers[o][f]&&(c=this._layerAlignmentWrappers[o][f]);
u.insertBefore(h,c),this._layerAlignmentWrappers[o][l]=h}this._layerAlignmentWrappers[o][l].appendChild(i);var m=i.getElementsByTagName("style")[0];if(void 0!==m){var v=m.sheet;0===v.cssRules.length&&(v.cssText=m.textContent)}this._currentSubs.set(e,i)}},n.prototype._onClockPlay=function(){t.prototype._onClockPlay.call(this),this._removeAllSubs(),this._subsWrapper.style.display="",this._subsWrapper.classList.remove("paused")},n.prototype._onClockTick=function(){var e=this,n=this.clock.currentTime;
this._currentSubs.forEach(function(t,i){(i.start>n||i.end<n||i.containsTransformTag)&&(e._currentSubs.delete(i),e._removeSub(t))}),t.prototype._onClockTick.call(this)},n.prototype._onClockPause=function(){t.prototype._onClockPause.call(this),this._subsWrapper.classList.add("paused")},n.prototype._onClockStop=function(){t.prototype._onClockStop.call(this),this._subsWrapper.style.display="none"},n.prototype._onClockRateChange=function(){t.prototype._onClockRateChange.call(this),this._preRenderedSubs.clear();
},n.prototype._ready=function(){this._dispatchEvent("ready",[])},n.prototype._calculateFontMetricsAfterFetch=function(e,t){var n=this;return t.then(function(){var t=n._fontSizeElement.cloneNode(!0);return n._libjassSubsWrapper.appendChild(t),y.lastly(s.calculateFontMetrics(e,n.settings.fallbackFonts,t),function(){n._libjassSubsWrapper.removeChild(t)})})},n.prototype._removeSub=function(e){e.parentNode.removeChild(e)},n.prototype._removeAllSubs=function(){var e=this;this._currentSubs.forEach(function(t){
return e._removeSub(t)}),this._currentSubs.clear()},n._transformOrigins=[null,[0,100],[50,100],[100,100],[0,50],[50,50],[100,50],[0,0],[50,0],[100,0]],n}(c.NullRenderer);t.WebRenderer=w,v.mixin(w,[u.EventSource])},function(e,t){var n=t(19),i=function(){function e(e,t,n,i,r,a,s,o){this._scaleX=n,this._scaleY=i,this._settings=r,this._fontSizeElement=a,this._svgDefsElement=s,this._fontMetricsCache=o,this._nextFilterId=0,this._id=e.id+"-"+t.id,this._defaultStyle=t.style,this.reset(null)}return e.prototype.reset=function(e){
void 0!==e&&null!==e||(e=this._defaultStyle),this.italic=e.italic,this.bold=e.bold,this.underline=e.underline,this.strikeThrough=e.strikeThrough,this.outlineWidth=e.outlineThickness,this.outlineHeight=e.outlineThickness,this.shadowDepthX=e.shadowDepth,this.shadowDepthY=e.shadowDepth,this.fontName=e.fontName,this.fontSize=e.fontSize,this.fontScaleX=e.fontScaleX,this.fontScaleY=e.fontScaleY,this.letterSpacing=e.letterSpacing,this._rotationX=null,this._rotationY=null,this._rotationZ=e.rotationZ,this._skewX=null,
this._skewY=null,this.primaryColor=e.primaryColor,this.secondaryColor=e.secondaryColor,this.outlineColor=e.outlineColor,this.shadowColor=e.shadowColor,this.primaryAlpha=e.primaryColor.alpha,this.secondaryAlpha=e.secondaryColor.alpha,this.outlineAlpha=e.outlineColor.alpha,this.shadowAlpha=e.shadowColor.alpha,this.blur=null,this.gaussianBlur=null},e.prototype.setStylesOnSpan=function(t,i){var r=t.childNodes[0]instanceof Text,a="";this._italic&&(a+="italic "),this._bold===!0?a+="bold ":this._bold!==!1&&(a+=this._bold+" ");
var s=(this._scaleY*n.fontSizeForLineHeight(this._fontName,this._fontSize*(r?this._fontScaleX:1),this._settings.fallbackFonts,this._fontSizeElement,this._fontMetricsCache)).toFixed(3),o=(this._scaleY*this._fontSize).toFixed(3),l=this._fontName;switch(l){case"cursive":case"fantasy":case"monospace":case"sans-serif":case"serif":break;default:l='"'+l+'"'}""!==this._settings.fallbackFonts&&(l+=", "+this._settings.fallbackFonts),t.style.font=""+a+s+"px/"+o+"px "+l;var u="";this._underline&&(u="underline"),
this._strikeThrough&&(u+=" line-through"),t.style.textDecoration=u.trim();var c="";if(r?this._fontScaleY!==this._fontScaleX&&(c+="scaleY("+(this._fontScaleY/this._fontScaleX).toFixed(3)+") "):(1!==this._fontScaleX&&(c+="scaleX("+this._fontScaleX+") "),1!==this._fontScaleY&&(c+="scaleY("+this._fontScaleY+") ")),null!==this._rotationY&&(c+="rotateY("+this._rotationY+"deg) "),null!==this._rotationX&&(c+="rotateX("+this._rotationX+"deg) "),0!==this._rotationZ&&(c+="rotateZ("+-1*this._rotationZ+"deg) "),
null!==this._skewX||null!==this._skewY){var d=e._valueOrDefault(this._skewX,0),h=e._valueOrDefault(this._skewY,0);c+="matrix(1, "+h+", "+d+", 1, 0, 0) "}""!==c&&(t.style.webkitTransform=c,t.style.webkitTransformOrigin="50% 50%",t.style.transform=c,t.style.transformOrigin="50% 50%",t.style.display="inline-block"),t.style.letterSpacing=(this._scaleX*this._letterSpacing).toFixed(3)+"px";var p=this._scaleX*this._outlineWidth,f=this._scaleY*this._outlineHeight,m=document.createElement("span");m.appendChild(t);
var v=this._primaryColor.withAlpha(this._primaryAlpha),g=this._outlineColor.withAlpha(this._outlineAlpha),y=this._shadowColor.withAlpha(this._shadowAlpha);if(this._settings.enableSvg||(0!==p||0!==f)&&g.alpha!==v.alpha||(0!==this._shadowDepthX||0!==this._shadowDepthY)&&y.alpha!==v.alpha||(v=this._primaryColor.withAlpha(1),g=this._outlineColor.withAlpha(1),y=this._shadowColor.withAlpha(1),t.style.opacity=this._primaryAlpha.toFixed(3)),t.style.color=v.toString(),this._settings.enableSvg?this._setSvgOutlineOnSpan(m,p,f,g,this._primaryAlpha):this._setTextShadowOutlineOnSpan(t,p,f,g),
0!==this._shadowDepthX||0!==this._shadowDepthY){var b=y.toString()+" "+(this._shadowDepthX*this._scaleX).toFixed(3)+"px "+(this._shadowDepthY*this._scaleY).toFixed(3)+"px 0px";""===t.style.textShadow?t.style.textShadow=b:t.style.textShadow+=", "+b}return 0===this._rotationX&&0===this._rotationY||(m.style.display="inline-block"),t.style.webkitAnimation=i.animationStyle,t.style.animation=i.animationStyle,m},e.prototype._setSvgOutlineOnSpan=function(e,t,n,i,r){var a="svg-filter-"+this._id+"-"+this._nextFilterId++,s=document.createElementNS("http://www.w3.org/2000/svg","filter");
if(s.id=a,s.x.baseVal.valueAsString="-50%",s.width.baseVal.valueAsString="200%",s.y.baseVal.valueAsString="-50%",s.height.baseVal.valueAsString="200%",t>0||n>0){var o=0,l=!this._settings.preciseOutlines&&this._gaussianBlur>0?this._gaussianBlur:1;!function(e){if(t<=n)if(t>0){var i;for(i=0;i<=t;i+=l)e(i,n/t*Math.sqrt(t*t-i*i));i!==t+l&&e(t,0)}else e(0,n);else if(n>0){var r;for(r=0;r<=n;r+=l)e(t/n*Math.sqrt(n*n-r*r),r);r!==n+l&&e(0,n)}else e(t,0)}(function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","feMorphology");
s.appendChild(n),n.in1.baseVal="source",n.operator.baseVal=SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE,n.radiusX.baseVal=e,n.radiusY.baseVal=t,n.result.baseVal="outline"+o,o++});var u=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");s.insertBefore(u,s.firstElementChild),u.in1.baseVal="SourceAlpha",u.result.baseVal="source";var c=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");u.appendChild(c),c.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,
c.slope.baseVal=0===r?1:1/r,c.intercept.baseVal=0;var d=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(d);for(var h=0;h<o;h++){var p=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");d.appendChild(p),p.in1.baseVal="outline"+h}var f=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");s.appendChild(f),f.setAttribute("color-interpolation-filters","sRGB");var m=document.createElementNS("http://www.w3.org/2000/svg","feFuncR");f.appendChild(m),
m.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,m.slope.baseVal=0,m.intercept.baseVal=i.red/255*i.alpha;var v=document.createElementNS("http://www.w3.org/2000/svg","feFuncG");f.appendChild(v),v.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,v.slope.baseVal=0,v.intercept.baseVal=i.green/255*i.alpha;var g=document.createElementNS("http://www.w3.org/2000/svg","feFuncB");f.appendChild(g),g.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,
g.slope.baseVal=0,g.intercept.baseVal=i.blue/255*i.alpha;var y=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");if(f.appendChild(y),y.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,y.slope.baseVal=i.alpha,y.intercept.baseVal=0,this._gaussianBlur>0){var b=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");s.appendChild(b),b.stdDeviationX.baseVal=this._gaussianBlur,b.stdDeviationY.baseVal=this._gaussianBlur}for(var h=0;h<this._blur;h++){
var w=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(w),w.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),w.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}var S=document.createElementNS("http://www.w3.org/2000/svg","feComposite");s.appendChild(S),S.in2.baseVal="source",S.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT;var P=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(P);var x=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");
P.appendChild(x);var C=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");P.appendChild(C),C.in1.baseVal="SourceGraphic"}else{if(this._gaussianBlur>0){var b=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur");s.appendChild(b),b.stdDeviationX.baseVal=this._gaussianBlur,b.stdDeviationY.baseVal=this._gaussianBlur}for(var h=0;h<this._blur;h++){var w=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(w),w.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),
w.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}}s.childElementCount>0&&(this._svgDefsElement.appendChild(s),e.style.webkitFilter='url("#'+a+'")',e.style.filter='url("#'+a+'")')},e.prototype._setTextShadowOutlineOnSpan=function(e,t,n,i){var r=this;if(t>0||n>0){var a="";!function(e){for(var i=0;i<=t;i++)for(var r=0===t?n:n*Math.sqrt(1-i*i/(t*t)),a=0;a<=r;a++)e(i,a),0!==i&&e(-i,a),0!==a&&e(i,-a),0!==i&&0!==a&&e(-i,-a)}(function(e,t){a+=", "+i.toString()+" "+e+"px "+t+"px "+r._gaussianBlur.toFixed(3)+"px";
}),e.style.textShadow=a.substr(", ".length)}},e.prototype.makeNewLine=function(){var e=document.createElement("br");return e.style.lineHeight=(this._scaleY*this._fontSize).toFixed(3)+"px",e},Object.defineProperty(e.prototype,"italic",{set:function(t){this._italic=e._valueOrDefault(t,this._defaultStyle.italic)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bold",{set:function(t){this._bold=e._valueOrDefault(t,this._defaultStyle.bold)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"underline",{
set:function(t){this._underline=e._valueOrDefault(t,this._defaultStyle.underline)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strikeThrough",{set:function(t){this._strikeThrough=e._valueOrDefault(t,this._defaultStyle.strikeThrough)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineWidth",{get:function(){return this._outlineWidth},set:function(t){this._outlineWidth=e._valueOrDefault(t,this._defaultStyle.outlineThickness)},enumerable:!0,configurable:!0
}),Object.defineProperty(e.prototype,"outlineHeight",{get:function(){return this._outlineWidth},set:function(t){this._outlineHeight=e._valueOrDefault(t,this._defaultStyle.outlineThickness)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowDepthX",{get:function(){return this._shadowDepthX},set:function(t){this._shadowDepthX=e._valueOrDefault(t,this._defaultStyle.shadowDepth)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowDepthY",{get:function(){return this._shadowDepthY;
},set:function(t){this._shadowDepthY=e._valueOrDefault(t,this._defaultStyle.shadowDepth)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blur},set:function(t){this._blur=e._valueOrDefault(t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gaussianBlur",{get:function(){return this._gaussianBlur},set:function(t){this._gaussianBlur=e._valueOrDefault(t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{
set:function(t){this._fontName=e._valueOrDefault(t,this._defaultStyle.fontName)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize=e._valueOrDefault(t,this._defaultStyle.fontSize)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleX",{get:function(){return this._fontScaleX},set:function(t){this._fontScaleX=e._valueOrDefault(t,this._defaultStyle.fontScaleX)},enumerable:!0,configurable:!0
}),Object.defineProperty(e.prototype,"fontScaleY",{get:function(){return this._fontScaleY},set:function(t){this._fontScaleY=e._valueOrDefault(t,this._defaultStyle.fontScaleY)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing=e._valueOrDefault(t,this._defaultStyle.letterSpacing)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationX",{get:function(){return this._rotationX;
},set:function(e){this._rotationX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationY",{get:function(){return this._rotationY},set:function(e){this._rotationY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationZ",{get:function(){return this._rotationZ},set:function(t){this._rotationZ=e._valueOrDefault(t,this._defaultStyle.rotationZ)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skewX",{get:function(){return this._skewX},
set:function(e){this._skewX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skewY",{get:function(){return this._skewY},set:function(e){this._skewY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryColor",{get:function(){return this._primaryColor},set:function(t){this._primaryColor=e._valueOrDefault(t,this._defaultStyle.primaryColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryColor",{get:function(){return this._secondaryColor;
},set:function(t){this._secondaryColor=e._valueOrDefault(t,this._defaultStyle.secondaryColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineColor",{get:function(){return this._outlineColor},set:function(t){this._outlineColor=e._valueOrDefault(t,this._defaultStyle.outlineColor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return this._shadowColor},set:function(t){this._shadowColor=e._valueOrDefault(t,this._defaultStyle.shadowColor);
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryAlpha",{get:function(){return this._primaryAlpha},set:function(t){this._primaryAlpha=e._valueOrDefault(t,this._defaultStyle.primaryColor.alpha)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryAlpha",{get:function(){return this._secondaryAlpha},set:function(t){this._secondaryAlpha=e._valueOrDefault(t,this._defaultStyle.secondaryColor.alpha)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineAlpha",{
get:function(){return this._outlineAlpha},set:function(t){this._outlineAlpha=e._valueOrDefault(t,this._defaultStyle.outlineColor.alpha)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowAlpha",{get:function(){return this._shadowAlpha},set:function(t){this._shadowAlpha=e._valueOrDefault(t,this._defaultStyle.shadowColor.alpha)},enumerable:!0,configurable:!0}),e._valueOrDefault=function(e,t){return null!==e?e:t},e}();e.SpanStyles=i},function(e){function t(t){e.debugMode=t}function n(t){
e.verboseMode=t}e.debugMode=!1,e.verboseMode=!1,e.setDebugMode=t,e.setVerboseMode=n},function(t,n){var i=n(26),r=n(29),a=n(28),s=n(27),o=n(23),l=n(1),u=n(2),c=n(30),d=n(32),h=function(){function t(){if(this._properties=new a.ScriptProperties,this._styles=new c.Map,this._dialogues=[],this._attachments=[],this._stylesFormatSpecifier=null,this._dialoguesFormatSpecifier=null,1===arguments.length)throw new Error("Constructor `new ASS(rawASS)` has been deprecated. Use `ASS.fromString(rawASS)` instead.");
this._styles.set("Default",new r.Style(new c.Map([["Name","Default"]])))}return Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styles",{get:function(){return this._styles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dialogues",{get:function(){return this._dialogues},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attachments",{get:function(){return this._attachments;
},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stylesFormatSpecifier",{get:function(){return this._stylesFormatSpecifier},set:function(e){this._stylesFormatSpecifier=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dialoguesFormatSpecifier",{get:function(){return this._dialoguesFormatSpecifier},set:function(e){this._dialoguesFormatSpecifier=e},enumerable:!0,configurable:!0}),t.prototype.addStyle=function(e){var t=u.parseLineIntoTypedTemplate(e,this._stylesFormatSpecifier);
if(null!==t&&"Style"===t.type){var n=t.template;if(o.verboseMode){var i="";n.forEach(function(e,t){return i+=t+" = "+e+", "}),console.log("Read style: "+i)}var a=new r.Style(n);this._styles.set(a.name,a)}},t.prototype.addEvent=function(e){var t=u.parseLineIntoTypedTemplate(e,this._dialoguesFormatSpecifier);if(null!==t&&"Dialogue"===t.type){var n=t.template;if(o.verboseMode){var r="";n.forEach(function(e,t){return r+=t+" = "+e+", "}),console.log("Read dialogue: "+r)}this.dialogues.push(new i.Dialogue(n,this));
}},t.prototype.addAttachment=function(e){this._attachments.push(e)},t.fromString=function(e,n){return void 0===n&&(n=s.Format.ASS),t.fromStream(new l.StringStream(e),n)},t.fromStream=function(e,t){switch(void 0===t&&(t=s.Format.ASS),t){case s.Format.ASS:return new l.StreamParser(e).ass;case s.Format.SRT:return new l.SrtStreamParser(e).ass;default:throw new Error("Illegal value of type: "+t)}},t.fromUrl=function(n,i){void 0===i&&(i=s.Format.ASS);var r;return r="function"==typeof e.fetch&&"function"==typeof e.ReadableStream&&"function"==typeof e.ReadableStream.prototype.getReader&&"function"==typeof e.TextDecoder?e.fetch(n).then(function(e){
if(e.ok===!1||void 0===e.ok&&(e.status<200||e.status>299))throw new Error("HTTP request for "+n+" failed with status code "+e.status);return t.fromReadableStream(e.body,"utf-8",i)}):d.Promise.reject(new Error("Not supported.")),r.catch(function(e){console.warn("fetch() failed, falling back to XHR: %o",e);var r=new XMLHttpRequest,a=t.fromStream(new l.XhrStream(r),i);return r.open("GET",n,!0),r.send(),a})},t.fromReadableStream=function(e,n,i){return void 0===n&&(n="utf-8"),void 0===i&&(i=s.Format.ASS),
t.fromStream(new l.BrowserReadableStream(e,n),i)},t}();t.ASS=h},function(e){!function(e){e[e.Font=0]="Font",e[e.Graphic=1]="Graphic"}(e.AttachmentType||(e.AttachmentType={}));var t=function(){function e(e,t){this._filename=e,this._type=t,this._contents=""}return Object.defineProperty(e.prototype,"filename",{get:function(){return this._filename},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contents",{
get:function(){return this._contents},set:function(e){this._contents=e},enumerable:!0,configurable:!0}),e}();e.Attachment=t},function(e,t){var n=t(27),i=t(3),r=t(8),a=t(23),s=t(30),o=function(){function e(t,i){this._parts=null,this._containsTransformTag=!1;var r=new s.Map;t.forEach(function(e,t){r.set(t.toLowerCase(),e)}),t=r,this._id=++e._lastDialogueId;var o=t.get("style");if(void 0!==o&&null!==o&&o.constructor===String&&(o=o.replace(/^\*+/,""),null!==o.match(/^Default$/i)&&(o="Default")),this._style=i.styles.get(o),
void 0===this._style&&(a.debugMode&&console.warn("Unrecognized style "+o+'. Falling back to "Default"'),this._style=i.styles.get("Default")),void 0===this._style)throw new Error("Unrecognized style "+o);if(this._start=e._toTime(t.get("start")),this._end=e._toTime(t.get("end")),this._layer=Math.max(n.valueOrDefault(t,"layer",parseInt,function(e){return!isNaN(e)},"0"),0),this._rawPartsString=t.get("text"),void 0===this._rawPartsString||null===this._rawPartsString||this._rawPartsString.constructor!==String)throw new Error("Dialogue doesn't have any text.");
}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return null===this._parts&&this._parsePartsString(),
this._alignment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layer",{get:function(){return this._layer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parts",{get:function(){return null===this._parts&&this._parsePartsString(),this._parts},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"containsTransformTag",{get:function(){return null===this._parts&&this._parsePartsString(),this._containsTransformTag},enumerable:!0,configurable:!0}),e.prototype.toString=function(){
return"#"+this._id+" ["+this._start.toFixed(3)+"-"+this._end.toFixed(3)+"] "+(null!==this._parts?this._parts.join(", "):this._rawPartsString)},e.prototype._parsePartsString=function(){var e=this;if(this._parts=i.parse(this._rawPartsString,"dialogueParts"),this._alignment=this._style.alignment,this._parts.forEach(function(t,n){t instanceof r.Alignment?e._alignment=t.value:t instanceof r.Move?null!==t.t1&&null!==t.t2||(e._parts[n]=new r.Move(t.x1,t.y1,t.x2,t.y2,0,e._end-e._start)):t instanceof r.Transform&&(null!==t.start&&null!==t.end&&null!==t.accel||(e._parts[n]=new r.Transform(null===t.start?0:t.start,null===t.end?e._end-e._start:t.end,null===t.accel?1:t.accel,t.tags)),
e._containsTransformTag=!0)}),a.debugMode){var t=this._parts.filter(function(e){return e instanceof r.Comment&&e.value.indexOf("\\")!==-1});t.length>0&&console.warn("Possible incorrect parse:\n"+this._rawPartsString+"\nwas parsed as\n"+this.toString()+"\nThe possibly incorrect parses are:\n"+t.join("\n"))}},e._toTime=function(e){return e.split(":").reduce(function(e,t){return 60*e+parseFloat(t)},0)},e._lastDialogueId=-1,e}();e.Dialogue=o},function(e){function t(e,t,n,i,r){var a=e.get(t);if(void 0===a)return n(r);
try{var s=n(a);if(null!==i&&!i(s))throw new Error("Validation failed.");return s}catch(o){throw new Error("Property "+t+" has invalid value "+a+" - "+o.stack)}}!function(e){e[e.ASS=0]="ASS",e[e.SRT=1]="SRT"}(e.Format||(e.Format={})),function(e){e[e.SmartWrappingWithWiderTopLine=0]="SmartWrappingWithWiderTopLine",e[e.SmartWrappingWithWiderBottomLine=3]="SmartWrappingWithWiderBottomLine",e[e.EndOfLineWrapping=1]="EndOfLineWrapping",e[e.NoLineWrapping=2]="NoLineWrapping"}(e.WrappingStyle||(e.WrappingStyle={})),
function(e){e[e.Outline=1]="Outline",e[e.OpaqueBox=3]="OpaqueBox"}(e.BorderStyle||(e.BorderStyle={})),e.valueOrDefault=t},function(e){var t=function(){function e(){}return Object.defineProperty(e.prototype,"resolutionX",{get:function(){return this._resolutionX},set:function(e){this._resolutionX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resolutionY",{get:function(){return this._resolutionY},set:function(e){this._resolutionY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrappingStyle",{
get:function(){return this._wrappingStyle},set:function(e){this._wrappingStyle=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleBorderAndShadow",{get:function(){return this._scaleBorderAndShadow},set:function(e){this._scaleBorderAndShadow=e},enumerable:!0,configurable:!0}),e}();e.ScriptProperties=t},function(e,t){var n=t(27),i=t(3),r=t(30),a=function(){function e(e){var t=new r.Map;if(e.forEach(function(e,n){t.set(n.toLowerCase(),e)}),e=t,this._name=e.get("name"),void 0===this._name||null===this._name||this._name.constructor!==String)throw new Error("Style doesn't have a name.");
this._name=this._name.replace(/^\*+/,""),this._italic=!!n.valueOrDefault(e,"italic",parseFloat,function(e){return!isNaN(e)},"0"),this._bold=!!n.valueOrDefault(e,"bold",parseFloat,function(e){return!isNaN(e)},"0"),this._underline=!!n.valueOrDefault(e,"underline",parseFloat,function(e){return!isNaN(e)},"0"),this._strikeThrough=!!n.valueOrDefault(e,"strikeout",parseFloat,function(e){return!isNaN(e)},"0"),this._fontName=n.valueOrDefault(e,"fontname",function(e){return e},function(e){return e.constructor===String;
},"sans-serif"),this._fontSize=n.valueOrDefault(e,"fontsize",parseFloat,function(e){return!isNaN(e)},"18"),this._fontScaleX=n.valueOrDefault(e,"scalex",parseFloat,function(e){return e>=0},"100")/100,this._fontScaleY=n.valueOrDefault(e,"scaley",parseFloat,function(e){return e>=0},"100")/100,this._letterSpacing=n.valueOrDefault(e,"spacing",parseFloat,function(e){return e>=0},"0"),this._rotationZ=n.valueOrDefault(e,"angle",parseFloat,function(e){return!isNaN(e)},"0"),this._primaryColor=n.valueOrDefault(e,"primarycolour",function(e){
return i.parse(e,"colorWithAlpha")},null,"&H00FFFFFF"),this._secondaryColor=n.valueOrDefault(e,"secondarycolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H00FFFF00"),this._outlineColor=n.valueOrDefault(e,"outlinecolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H00000000"),this._shadowColor=n.valueOrDefault(e,"backcolour",function(e){return i.parse(e,"colorWithAlpha")},null,"&H80000000"),this._outlineThickness=n.valueOrDefault(e,"outline",parseFloat,function(e){return e>=0;
},"2"),this._borderStyle=n.valueOrDefault(e,"borderstyle",parseInt,function(e){return n.BorderStyle[n.BorderStyle[e]]===e},"1"),this._shadowDepth=n.valueOrDefault(e,"shadow",parseFloat,function(e){return e>=0},"3"),this._alignment=n.valueOrDefault(e,"alignment",parseInt,function(e){return e>=1&&e<=9},"2"),this._marginLeft=n.valueOrDefault(e,"marginl",parseFloat,function(e){return!isNaN(e)},"20"),this._marginRight=n.valueOrDefault(e,"marginr",parseFloat,function(e){return!isNaN(e)},"20"),this._marginVertical=n.valueOrDefault(e,"marginv",parseFloat,function(e){
return!isNaN(e)},"20")}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"italic",{get:function(){return this._italic},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bold",{get:function(){return this._bold},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"underline",{get:function(){return this._underline},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strikeThrough",{
get:function(){return this._strikeThrough},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleX",{get:function(){return this._fontScaleX},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontScaleY",{get:function(){return this._fontScaleY;
},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationZ",{get:function(){return this._rotationZ},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryColor",{get:function(){return this._primaryColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryColor",{get:function(){return this._secondaryColor},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"outlineColor",{get:function(){return this._outlineColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return this._shadowColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outlineThickness",{get:function(){return this._outlineThickness},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borderStyle",{get:function(){return this._borderStyle},enumerable:!0,configurable:!0
}),Object.defineProperty(e.prototype,"shadowDepth",{get:function(){return this._shadowDepth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this._alignment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginLeft",{get:function(){return this._marginLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginRight",{get:function(){return this._marginRight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marginVertical",{
get:function(){return this._marginVertical},enumerable:!0,configurable:!0}),e}();e.Style=a},function(t){function n(e){null!==e?t.Map=e:t.Map=i}t.Map=e.Map;var i=function(){function e(e){if(this.clear(),void 0!==e){if(!Array.isArray(e))throw new Error("Non-array iterables are not supported by the SimpleMap constructor.");for(var t=0;t<e.length;t++){var n=e[t];this.set(n[0],n[1])}}}return e.prototype.get=function(e){var t=this._keyToProperty(e);if(null!==t)return this._values[t]},e.prototype.has=function(e){
var t=this._keyToProperty(e);return null!==t&&t in this._keys},e.prototype.set=function(e,t){var n=this._keyToProperty(e);if(null===n)throw new Error("This Map implementation only supports Number and String keys, or keys with an id property.");return n in this._keys||this._size++,this._keys[n]=e,this._values[n]=t,this},e.prototype.delete=function(e){var t=this._keyToProperty(e);if(null===t)return!1;var n=t in this._keys;return n&&(delete this._keys[t],delete this._values[t],this._size--),n},e.prototype.clear=function(){
this._keys=Object.create(null),this._values=Object.create(null),this._size=0},e.prototype.forEach=function(e,t){for(var n=0,i=Object.keys(this._keys);n<i.length;n++){var r=i[n];e.call(t,this._values[r],this._keys[r],this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype._keyToProperty=function(e){return"number"==typeof e?"#"+e:"string"==typeof e?"'"+e:void 0!==e.id?"!"+e.id:null},e}();(void 0===t.Map||"function"!=typeof t.Map.prototype.forEach||function(){
try{return 2!==new t.Map([[1,"foo"],[2,"bar"]]).size}catch(e){return!0}}())&&(t.Map=i),t.setImplementation=n},function(e){function t(e,t){for(var n=0;n<t.length;n++)for(var i=t[n],r=0,a=Object.getOwnPropertyNames(i.prototype);r<a.length;r++){var s=a[r];e.prototype[s]=i.prototype[s]}}e.mixin=t},function(t){function n(e){null!==e?t.Promise=e:t.Promise=l}function i(e){return r(e,[])}function r(e,n){if(0===e.length)return t.Promise.reject(n);var i=e[0],a=e.slice(1);return i.catch(function(e){return r(a,n.concat(e));
})}function a(e){return new t.Promise(function(n,i){return t.Promise.all(e.map(function(e){return e.then(n,function(e){return e})})).then(i)})}function s(e,t){return e.then(function(e){return t(),e},function(e){throw t(),e})}t.Promise=e.Promise;var o=function(){var t=e.MutationObserver||e.WebkitMutationObserver;if(void 0!==e.process&&"function"==typeof e.process.nextTick)return function(t){e.process.nextTick(t)};if(void 0!==t){var n=[],i=!1,r=document.createElement("div"),a=new t(function(){for(var e=n.splice(0,n.length),t=0;t<e.length;t++){
var a=e[t];a()}i=!1,n.length>0&&(r.classList.toggle("foo"),i=!0)});return a.observe(r,{attributes:!0}),function(e){n.push(e),i||(r.classList.toggle("foo"),i=!0)}}return function(e){return setTimeout(e,0)}}(),l=function(){function e(e){if(this._state=u.PENDING,this._fulfillReactions=[],this._rejectReactions=[],this._fulfilledValue=null,this._rejectedReason=null,"function"!=typeof e)throw new TypeError('typeof executor !== "function"');var t=this._createResolvingFunctions(),n=t.resolve,i=t.reject;try{
e(n,i)}catch(r){i(r)}}return e.prototype.then=function(e,t){var n=new c;"function"!=typeof e&&(e=function(e){return e}),"function"!=typeof t&&(t=function(e){throw e});var i={capabilities:n,handler:e},r={capabilities:n,handler:t};switch(this._state){case u.PENDING:this._fulfillReactions.push(i),this._rejectReactions.push(r);break;case u.FULFILLED:this._enqueueFulfilledReactionJob(i,this._fulfilledValue);break;case u.REJECTED:this._enqueueRejectedReactionJob(r,this._rejectedReason)}return n.promise;
},e.prototype.catch=function(e){return this.then(null,e)},e.resolve=function(n){return n instanceof e?n:new t.Promise(function(e){return e(n)})},e.reject=function(e){return new t.Promise(function(t,n){return n(e)})},e.all=function(e){return new t.Promise(function(n,i){var r=[],a=e.length;return 0===a?void n(r):void e.forEach(function(e,s){return t.Promise.resolve(e).then(function(e){r[s]=e,a--,0===a&&n(r)},i)})})},e.race=function(e){return new t.Promise(function(n,i){for(var r=0;r<e.length;r++){var a=e[r];
t.Promise.resolve(a).then(n,i)}})},e.prototype._createResolvingFunctions=function(){var e=this,t=!1,n=function(n){if(!t){if(t=!0,n===e)return void e._reject(new TypeError("resolution === this"));if(null===n||"object"!=typeof n&&"function"!=typeof n)return void e._fulfill(n);try{var i=n.then}catch(r){return void e._reject(r)}return"function"!=typeof i?void e._fulfill(n):void o(function(){return e._resolveWithThenable(n,i)})}},i=function(n){t||(t=!0,e._reject(n))};return{resolve:n,reject:i}},e.prototype._resolveWithThenable=function(e,t){
var n=this._createResolvingFunctions(),i=n.resolve,r=n.reject;try{t.call(e,i,r)}catch(a){r(a)}},e.prototype._fulfill=function(e){var t=this._fulfillReactions;this._fulfilledValue=e,this._fulfillReactions=void 0,this._rejectReactions=void 0,this._state=u.FULFILLED;for(var n=0;n<t.length;n++){var i=t[n];this._enqueueFulfilledReactionJob(i,e)}},e.prototype._reject=function(e){var t=this._rejectReactions;this._rejectedReason=e,this._fulfillReactions=void 0,this._rejectReactions=void 0,this._state=u.REJECTED;
for(var n=0;n<t.length;n++){var i=t[n];this._enqueueRejectedReactionJob(i,e)}},e.prototype._enqueueFulfilledReactionJob=function(e,t){o(function(){var n,i=e.capabilities,r=i.resolve,a=i.reject,s=e.handler;try{n=s(t)}catch(o){return void a(o)}r(n)})},e.prototype._enqueueRejectedReactionJob=function(e,t){o(function(){var n,i=e.capabilities,r=i.resolve,a=i.reject,s=e.handler;try{n=s(t)}catch(o){return void a(o)}r(n)})},e}();void 0===t.Promise&&(t.Promise=l);var u;!function(e){e[e.PENDING=0]="PENDING",
e[e.FULFILLED=1]="FULFILLED",e[e.REJECTED=2]="REJECTED"}(u||(u={})),t.setImplementation=n;var c=function(){function e(){var e=this;this._promise=new t.Promise(function(t,n){Object.defineProperties(e,{resolve:{value:t,enumerable:!0},reject:{value:n,enumerable:!0}})})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!0,configurable:!0}),e}();t.DeferredPromise=c,t.first=i,t.any=a,t.lastly=s},function(t){function n(e){null!==e?t.Set=e:t.Set=i}t.Set=e.Set;
var i=function(){function e(e){if(this.clear(),void 0!==e){if(!Array.isArray(e))throw new Error("Non-array iterables are not supported by the SimpleSet constructor.");for(var t=0;t<e.length;t++){var n=e[t];this.add(n)}}}return e.prototype.add=function(e){var t=this._toProperty(e);if(null===t)throw new Error("This Set implementation only supports Number and String values.");return t in this._elements||this._size++,this._elements[t]=e,this},e.prototype.clear=function(){this._elements=Object.create(null),
this._size=0},e.prototype.has=function(e){var t=this._toProperty(e);return null!==t&&t in this._elements},e.prototype.forEach=function(e,t){for(var n=0,i=Object.keys(this._elements);n<i.length;n++){var r=i[n],a=this._elements[r];e.call(t,a,a,this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype._toProperty=function(e){return"number"==typeof e?"#"+e:"string"==typeof e?"'"+e:null},e}();(void 0===t.Set||"function"!=typeof t.Set.prototype.forEach||function(){
try{return 2!==new t.Set([1,2]).size}catch(e){return!0}}())&&(t.Set=i),t.setImplementation=n},function(e){function t(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n}function n(e,t,n){return arguments.length<3?i(e.reverse(),t):void r(e.reverse(),t,n)}function i(e,t){for(var n=0;n<e.length;n++){var i=e[n];t=i(t)||t}return t}function r(e,t,n){for(var i=0;i<e.length;i++){var r=e[i];r(t,n)}}e.__extends=t,e.__decorate=n},function(e,t){
var n=t(30),i=t(32),r=t(36),a=t(38),s=function(){function e(e){var t=this;this._comm=e,this._pendingRequests=new n.Map,this._comm.addEventListener("message",function(e){return t._onMessage(e.data)},!1)}return e.prototype.request=function(t,n){var r=new i.DeferredPromise,s=++e._lastRequestId;this._pendingRequests.set(s,r);var o={requestId:s,command:t,parameters:n};return this._comm.postMessage(a.serialize(o)),r.promise},e.prototype.cancelRequest=function(e){var t=this._pendingRequests.get(e);void 0!==t&&(this._pendingRequests.delete(e),
t.reject(new Error("Cancelled.")))},e.prototype._respond=function(e){var t=e.requestId,n=e.error,i=e.result;n instanceof Error&&(n={message:n.message,stack:n.stack}),this._comm.postMessage(a.serialize({command:r.WorkerCommands.Response,requestId:t,error:n,result:i}))},e.prototype._onMessage=function(e){var t=this,n=a.deserialize(e);if(n.command===r.WorkerCommands.Response){var i=n,s=this._pendingRequests.get(i.requestId);void 0!==s&&(this._pendingRequests.delete(i.requestId),null===i.error?s.resolve(i.result):s.reject(i.error));
}else{var o=n,l=o.requestId,u=a.getWorkerCommandHandler(o.command);if(void 0===u)return void this._respond({requestId:l,error:new Error("No handler registered for command "+o.command),result:null});u(o.parameters).then(function(e){return{requestId:l,error:null,result:e}},function(e){return{requestId:l,error:e,result:null}}).then(function(e){return t._respond(e)})}},e._lastRequestId=-1,e}();e.WorkerChannelImpl=s,a.registerWorkerCommand(r.WorkerCommands.Ping,function(){return new i.Promise(function(e){
return e(null)})})},function(e){!function(e){e[e.Response=0]="Response",e[e.Parse=1]="Parse",e[e.Ping=2]="Ping"}(e.WorkerCommands||(e.WorkerCommands={}))},function(t,n){function i(e){return void 0===e&&(e=s.src),new r.WorkerChannelImpl(new Worker(e))}var r=n(35),a=n(36);t.WorkerCommands=a.WorkerCommands,t.supported="undefined"!=typeof Worker;var s="undefined"!=typeof document&&void 0!==document.currentScript?document.currentScript:null;t.createWorker=i,"undefined"!=typeof WorkerGlobalScope&&e instanceof WorkerGlobalScope&&new r.WorkerChannelImpl(e);
},function(e,t){function n(e,t){l.set(e,t)}function i(e){return l.get(e)}function r(e){e._classTag=u.size,u.set(e._classTag,e)}function a(e){return JSON.stringify(e,function(e,t){return t&&void 0!==t._classTag&&(t._classTag=t._classTag),t})}function s(e){return JSON.parse(e,function(e,t){if(t&&void 0!==t._classTag){for(var n=Object.create(u.get(t._classTag)),i=0,r=Object.keys(t);i<r.length;i++){var a=r[i];"_classTag"!==a&&(n[a]=t[a])}t=n}return t})}var o=t(30),l=new o.Map,u=new o.Map;e.registerWorkerCommand=n,
e.getWorkerCommandHandler=i,e.registerClassPrototype=r,e.serialize=a,e.deserialize=s}])})},function(e,t){function n(e){return i(Object(e))}var i=Object.getPrototypeOf;e.exports=n},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){var i;!function(r,a,s){function o(e,t,n){return e.addEventListener?void e.addEventListener(t,n,!1):void e.attachEvent("on"+t,n);
}function l(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return S[e.which]?S[e.which]:P[e.which]?P[e.which]:String.fromCharCode(e.which).toLowerCase()}function u(e,t){return e.sort().join(",")===t.sort().join(",")}function c(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function d(e){return e.preventDefault?void e.preventDefault():void(e.returnValue=!1)}function h(e){
return e.stopPropagation?void e.stopPropagation():void(e.cancelBubble=!0)}function p(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function f(){if(!w){w={};for(var e in S)e>95&&e<112||S.hasOwnProperty(e)&&(w[S[e]]=e)}return w}function m(e,t,n){return n||(n=f()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function v(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"))}function g(e,t){var n,i,r,a=[];for(n=v(e),r=0;r<n.length;++r)i=n[r],C[i]&&(i=C[i]),t&&"keypress"!=t&&x[i]&&(i=x[i],
a.push("shift")),p(i)&&a.push(i);return t=m(i,a,t),{key:i,modifiers:a,action:t}}function y(e,t){return null!==e&&e!==a&&(e===t||y(e.parentNode,t))}function b(e){function t(e){e=e||{};var t,n=!1;for(t in w)e[t]?n=!0:w[t]=0;n||(x=!1)}function n(e,t,n,i,r,a){var s,o,l=[],c=n.type;if(!v._callbacks[e])return[];for("keyup"==c&&p(e)&&(t=[e]),s=0;s<v._callbacks[e].length;++s)if(o=v._callbacks[e][s],(i||!o.seq||w[o.seq]==o.level)&&c==o.action&&("keypress"==c&&!n.metaKey&&!n.ctrlKey||u(t,o.modifiers))){var d=!i&&o.combo==r,h=i&&o.seq==i&&o.level==a;
(d||h)&&v._callbacks[e].splice(s,1),l.push(o)}return l}function i(e,t,n,i){v.stopCallback(t,t.target||t.srcElement,n,i)||e(t,n)===!1&&(d(t),h(t))}function r(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=l(e);if(t)return"keyup"==e.type&&S===t?void(S=!1):void v.handleKey(t,c(e),e)}function s(){clearTimeout(y),y=setTimeout(t,1e3)}function f(e,n,r,a){function o(t){return function(){x=t,++w[e],s()}}function u(n){i(r,n,e),"keyup"!==a&&(S=l(n)),setTimeout(t,10)}w[e]=0;for(var c=0;c<n.length;++c){
var d=c+1===n.length,h=d?u:o(a||g(n[c+1]).action);m(n[c],h,a,e,c)}}function m(e,t,i,r,a){v._directMap[e+":"+i]=t,e=e.replace(/\s+/g," ");var s,o=e.split(" ");return o.length>1?void f(e,o,t,i):(s=g(e,i),v._callbacks[s.key]=v._callbacks[s.key]||[],n(s.key,s.modifiers,{type:s.action},r,e,a),void v._callbacks[s.key][r?"unshift":"push"]({callback:t,modifiers:s.modifiers,action:s.action,seq:r,level:a,combo:e}))}var v=this;if(e=e||a,!(v instanceof b))return new b(e);v.target=e,v._callbacks={},v._directMap={};
var y,w={},S=!1,P=!1,x=!1;v._handleKey=function(e,r,a){var s,o=n(e,r,a),l={},u=0,c=!1;for(s=0;s<o.length;++s)o[s].seq&&(u=Math.max(u,o[s].level));for(s=0;s<o.length;++s)if(o[s].seq){if(o[s].level!=u)continue;c=!0,l[o[s].seq]=1,i(o[s].callback,a,o[s].combo,o[s].seq)}else c||i(o[s].callback,a,o[s].combo);var d="keypress"==a.type&&P;a.type!=x||p(e)||d||t(l),P=c&&"keydown"==a.type},v._bindMultiple=function(e,t,n){for(var i=0;i<e.length;++i)m(e[i],t,n)},o(e,"keypress",r),o(e,"keydown",r),o(e,"keyup",r);
}for(var w,S={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},P={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},x={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",
">":".","?":"/","|":"\\"},C={option:"alt",command:"meta","return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},T=1;T<20;++T)S[111+T]="f"+T;for(T=0;T<=9;++T)S[T+96]=T;b.prototype.bind=function(e,t,n){var i=this;return e=e instanceof Array?e:[e],i._bindMultiple.call(i,e,t,n),i},b.prototype.unbind=function(e,t){var n=this;return n.bind.call(n,e,function(){},t)},b.prototype.trigger=function(e,t){var n=this;return n._directMap[e+":"+t]&&n._directMap[e+":"+t]({},e),
n},b.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},b.prototype.stopCallback=function(e,t){var n=this;return!((" "+t.className+" ").indexOf(" mousetrap ")>-1)&&(!y(t,n.target)&&("INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable))},b.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},b.init=function(){var e=b(a);for(var t in e)"_"!==t.charAt(0)&&(b[t]=function(t){return function(){return e[t].apply(e,arguments);
}}(t))},b.init(),r.Mousetrap=b,"undefined"!=typeof e&&e.exports&&(e.exports=b),i=function(){return b}.call(t,n,t,e),!(i!==s&&(e.exports=i))}(window,document)},,,,function(e,t){"use strict";function n(e){this.name="RavenConfigError",this.message=e}n.prototype=new Error,n.prototype.constructor=n,e.exports=n},function(e,t,n){(function(t){"use strict";function i(){return+new Date}function r(){this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument="undefined"!=typeof document,this._lastCapturedException=null,
this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:100},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalConsole=window.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=i();for(var e in this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e];
}var a=n(1940),s=n(1938),o=n(594),l=o.isFunction,u=o.isUndefined,c=o.isError,d=o.isEmptyObject,h=o.hasKey,p=o.joinRegExp,f=o.each,m=o.objectMerge,v=o.truncate,g=o.urlencode,y=o.uuid4,b="source protocol user pass host port path".split(" "),w=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;r.prototype={VERSION:"2.0.5",debug:!1,TraceKit:a,config:function(e,t){var n=this;if(this._globalServer)return this._logDebug("error","Error: Raven has already been configured"),this;if(!e)return this;
var i=this._parseDSN(e),r=i.path.lastIndexOf("/"),s=i.path.substr(1,r);return t&&f(t,function(e,t){"tags"==e||"extra"==e?n._globalContext[e]=t:n._globalOptions[e]=t}),this._globalOptions.ignoreErrors.push(/^Script error\.?$/),this._globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this._globalOptions.ignoreErrors=p(this._globalOptions.ignoreErrors),this._globalOptions.ignoreUrls=!!this._globalOptions.ignoreUrls.length&&p(this._globalOptions.ignoreUrls),this._globalOptions.whitelistUrls=!!this._globalOptions.whitelistUrls.length&&p(this._globalOptions.whitelistUrls),
this._globalOptions.includePaths=p(this._globalOptions.includePaths),this._globalKey=i.user,this._globalProject=i.path.substr(r+1),this._globalServer="//"+i.host+(i.port?":"+i.port:"")+"/"+s+"api/"+this._globalProject+"/store/",i.protocol&&(this._globalServer=i.protocol+":"+this._globalServer),this._globalOptions.fetchContext&&(a.remoteFetching=!0),this._globalOptions.linesOfContext&&(a.linesOfContext=this._globalOptions.linesOfContext),a.collectWindowErrors=!!this._globalOptions.collectWindowErrors,
this},install:function(){var e=this;return this.isSetup()&&!this._isRavenInstalled&&(a.report.subscribe(function(){e._ignoreOnError||e._handleStackInfo.apply(e,arguments)}),this._wrapBuiltIns(),this._drainPlugins(),this._isRavenInstalled=!0),this},context:function(e,t,n){return l(e)&&(n=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,n)},wrap:function(e,t){function n(){for(var n=[],r=arguments.length,a=!e||e&&e.deep!==!1;r--;)n[r]=a?i.wrap(e,arguments[r]):arguments[r];try{return t.apply(this,n)}catch(s){
throw i._ignoreNextOnError(),i.captureException(s,e),s}}var i=this;if(u(t)&&!l(e))return e;if(l(e)&&(t=e,e=void 0),!l(t))return t;if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__;for(var r in t)h(t,r)&&(n[r]=t[r]);return t.__raven_wrapper__=n,n.prototype=t.prototype,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return a.report.uninstall(),this._isRavenInstalled=!1,this},captureException:function(e,t){if(!c(e))return this.captureMessage(e,t);this._lastCapturedException=e;
try{var n=a.computeStackTrace(e);this._handleStackInfo(n,t)}catch(i){if(e!==i)throw i}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e))return this._send(m({message:e+""},t)),this},addPlugin:function(e){var t=Array.prototype.slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){
return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(JSON.stringify(this._globalContext))},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){return this._globalOptions.dataCallback=e,this},setShouldSendCallback:function(e){return this._globalOptions.shouldSendCallback=e,this},setTransport:function(e){
return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||this._logDebug("error","Error: Raven has not been configured."),this.ravenNotConfiguredError=!0,!1))},afterLoad:function(){var e=window.RavenConfig;e&&this.config(e.dsn,e.config).install()},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,
setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var n,i;if(this._hasDocument){t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),document.createEvent?(n=document.createEvent("HTMLEvents"),n.initEvent(e,!0,!0)):(n=document.createEventObject(),n.eventType=e);for(i in t)h(t,i)&&(n[i]=t[i]);if(document.createEvent)document.dispatchEvent(n);else try{document.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(r){}}},_wrapBuiltIns:function(){function e(e,t,n){var i=e[t];e[t]=n(i);
}function n(e){return function(t,n){var r=[].slice.call(arguments),a=r[0];return"function"==typeof a&&(r[0]=i.wrap(a)),e.apply?e.apply(this,r):e(r[0],r[1])}}var i=this;e(window,"setTimeout",n),e(window,"setInterval",n),window.requestAnimationFrame&&e(window,"requestAnimationFrame",function(e){return function(t){return e(i.wrap(t))}}),"EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload".replace(/\w+/g,function(t){
var n=window[t]&&window[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(e(n,"addEventListener",function(e){return function(t,n,r,a){try{n&&n.handleEvent&&(n.handleEvent=i.wrap(n.handleEvent))}catch(s){}return e.call(this,t,i.wrap(n),r,a)}}),e(n,"removeEventListener",function(e){return function(t,n,i,r){return n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n),e.call(this,t,n,i,r)}}))});var r;"XMLHttpRequest"in window&&(r=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(t){
var n=this;"onreadystatechange onload onerror onprogress".replace(/\w+/g,function(t){t in n&&"[object Function]"===Object.prototype.toString.call(n[t])&&e(n,t,function(e){return i.wrap(e)})}),r.apply(this,arguments)});var a,s=t||window.$;s&&s.fn&&s.fn.ready&&(a=s.fn.ready,s.fn.ready=function(e){return a.call(this,i.wrap(e))})},_drainPlugins:function(){var e=this;f(this._plugins,function(t,n){var i=n[0],r=n[1];i.apply(e,[e].concat(r))})},_parseDSN:function(e){var t=w.exec(e),n={},i=7;try{for(;i--;)n[b[i]]=t[i]||"";
}catch(r){throw new s("Invalid DSN: "+e)}if(n.pass)throw new s("Do not specify your private key in the DSN!");return n},_handleStackInfo:function(e,t){var n=this,i=[];e.stack&&e.stack.length&&f(e.stack,function(e,t){var r=n._normalizeFrame(t);r&&i.push(r)}),this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,i,t)},_normalizeFrame:function(e){if(e.url){var t,n={filename:e.url,lineno:e.line,colno:e.column,"function":e.func||"?"},i=this._extractContextFromFrame(e);
if(i){var r=["pre_context","context_line","post_context"];for(t=3;t--;)n[r[t]]=i[t]}return n.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n.function)||/raven\.(min\.)?js$/.test(n.filename)),n}},_extractContextFromFrame:function(e){if(e.context&&this._globalOptions.fetchContext){for(var t=e.context,n=~~(t.length/2),i=t.length,r=!1;i--;)if(t[i].length>300){r=!0;break}if(r){if(u(e.column))return;return[[],t[n].substr(e.column,50),[]];
}return[t.slice(0,n),t[n],t.slice(n+1)]}},_processException:function(e,t,n,i,r,a){var s,o;if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t))&&(t+="",t=v(t,this._globalOptions.maxMessageLength),o=e+": "+t,o=v(o,this._globalOptions.maxMessageLength),r&&r.length?(n=r[0].filename||n,r.reverse(),s={frames:r}):n&&(s={frames:[{filename:n,lineno:i,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n)))){
var l=m({exception:{values:[{type:e,value:t,stacktrace:s}]},culprit:n,message:o},a);this._send(l)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message=v(e.message,t),e.exception){var n=e.exception.values[0];n.value=v(n.value,t)}return e},_getHttpData:function(){if(this._hasDocument&&document.location&&document.location.href){var e={headers:{"User-Agent":navigator.userAgent}};return e.url=document.location.href,document.referrer&&(e.headers.Referer=document.referrer),e;
}},_send:function(e){var t=this,n=this._globalOptions,r={project:this._globalProject,logger:n.logger,platform:"javascript"},a=this._getHttpData();a&&(r.request=a),e=m(r,e),e.tags=m(m({},this._globalContext.tags),e.tags),e.extra=m(m({},this._globalContext.extra),e.extra),e.extra["session:duration"]=i()-this._startTime,d(e.tags)&&delete e.tags,this._globalContext.user&&(e.user=this._globalContext.user),n.release&&(e.release=n.release),n.serverName&&(e.server_name=n.serverName),n.release&&(e.release=n.release),
l(n.dataCallback)&&(e=n.dataCallback(e)||e),e&&!d(e)&&(l(n.shouldSendCallback)&&!n.shouldSendCallback(e)||(this._lastEventId=e.event_id||(e.event_id=y()),e=this._trimPacket(e),this._logDebug("debug","Raven about to send:",e),this.isSetup()&&(n.transport||this._makeRequest).call(this,{url:this._globalServer,auth:{sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey},data:e,options:n,onSuccess:function(){t._triggerEvent("success",{data:e,src:t._globalServer})},onError:function(){
t._triggerEvent("failure",{data:e,src:t._globalServer})}})))},_makeImageRequest:function(e){e.auth.sentry_data=JSON.stringify(e.data);var t=this._newImage(),n=e.url+"?"+g(e.auth),i=e.options.crossOrigin;(i||""===i)&&(t.crossOrigin=i),t.onload=e.onSuccess,t.onerror=t.onabort=e.onError,t.src=n},_makeXhrRequest:function(e){function t(){200===n.status?e.onSuccess&&e.onSuccess():e.onError&&e.onError()}var n,i=e.url;n=new XMLHttpRequest,"withCredentials"in n?n.onreadystatechange=function(){4===n.readyState&&t();
}:(n=new XDomainRequest,i=i.replace(/^https?:/,""),n.onload=t),n.open("POST",i+"?"+g(e.auth)),n.send(JSON.stringify(e.data))},_makeRequest:function(e){var t="withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest;return(t?this._makeXhrRequest:this._makeImageRequest)(e)},_newImage:function(){return document.createElement("img")},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&this._originalConsoleMethods[e].apply(this._originalConsole,[].slice.call(arguments,1));
},_mergeContext:function(e,t){u(t)?delete this._globalContext[e]:this._globalContext[e]=m(this._globalContext[e]||{},t)}},r.prototype.setUser=r.prototype.setUserContext,r.prototype.setReleaseContext=r.prototype.setRelease,e.exports=r}).call(t,n(5))},function(e,t,n){"use strict";function i(){return"undefined"==typeof document?"":document.location.href}var r=n(594),a=r.hasKey,s=r.isString,o=r.isUndefined,l={remoteFetching:!1,collectWindowErrors:!0,linesOfContext:7,debug:!1},u=[].slice,c="?";l.report=function(){
function e(e){o(),m.push(e)}function t(e){for(var t=m.length-1;t>=0;--t)m[t]===e&&m.splice(t,1)}function n(){c(),m=[]}function r(e,t){var n=null;if(!t||l.collectWindowErrors){for(var i in m)if(a(m,i))try{m[i].apply(null,[e].concat(u.call(arguments,2)))}catch(r){n=r}if(n)throw n}}function s(e,t,n,a,s){var o=null;if(y)l.computeStackTrace.augmentStackTraceWithInitialElement(y,t,n,e),d();else if(s)o=l.computeStackTrace(s),r(o,!0);else{var u={url:t,line:n,column:a};u.func=l.computeStackTrace.guessFunctionName(u.url,u.line),
u.context=l.computeStackTrace.gatherContext(u.url,u.line),o={message:e,url:i(),stack:[u]},r(o,!0)}return!!p&&p.apply(this,arguments)}function o(){f||(p=window.onerror,window.onerror=s,f=!0)}function c(){f&&(window.onerror=p,f=!1,p=void 0)}function d(){var e=y,t=v;v=null,y=null,g=null,r.apply(null,[e,!1].concat(t))}function h(e,t){var n=u.call(arguments,1);if(y){if(g===e)return;d()}var i=l.computeStackTrace(e);if(y=i,g=e,v=n,window.setTimeout(function(){g===e&&d()},i.incomplete?2e3:0),t!==!1)throw e;
}var p,f,m=[],v=null,g=null,y=null;return h.subscribe=e,h.unsubscribe=t,h.uninstall=n,h}(),l.computeStackTrace=function(){function e(e){if(!l.remoteFetching)return"";try{var t=function(){try{return new window.XMLHttpRequest}catch(e){return new window.ActiveXObject("Microsoft.XMLHTTP")}},n=t();return n.open("GET",e,!1),n.send(""),n.responseText}catch(i){return""}}function t(t){if(!s(t))return[];if(!a(S,t)){var n="",i="";try{i=document.domain}catch(r){}t.indexOf(i)!==-1&&(n=e(t)),S[t]=n?n.split("\n"):[];
}return S[t]}function n(e,n){var i,r=/function ([^(]*)\(([^)]*)\)/,a=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,s="",l=10,u=t(e);if(!u.length)return c;for(var d=0;d<l;++d)if(s=u[n-d]+s,!o(s)){if(i=a.exec(s))return i[1];if(i=r.exec(s))return i[1]}return c}function r(e,n){var i=t(e);if(!i.length)return null;var r=[],a=Math.floor(l.linesOfContext/2),s=a+l.linesOfContext%2,u=Math.max(0,n-a-1),c=Math.min(i.length,n+s-1);n-=1;for(var d=u;d<c;++d)o(i[d])||r.push(i[d]);return r.length>0?r:null;
}function u(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function d(e){return u(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function h(e,n){for(var i,r,a=0,s=n.length;a<s;++a)if((i=t(n[a])).length&&(i=i.join("\n"),r=e.exec(i)))return{url:n[a],line:i.substring(0,r.index).split("\n").length,column:r.index-i.lastIndexOf("\n",r.index)-1};return null}function p(e,n,i){var r,a=t(n),s=new RegExp("\\b"+u(e)+"\\b");
return i-=1,a&&a.length>i&&(r=s.exec(a[i]))?r.index:null}function f(e){if("undefined"!=typeof document){for(var t,n,i,r,a=[window.location.href],s=document.getElementsByTagName("script"),o=""+e,l=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,c=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,p=0;p<s.length;++p){var f=s[p];f.src&&a.push(f.src)}if(i=l.exec(o)){var m=i[1]?"\\s+"+i[1]:"",v=i[2].split(",").join("\\s*,\\s*");t=u(i[3]).replace(/;$/,";?"),n=new RegExp("function"+m+"\\s*\\(\\s*"+v+"\\s*\\)\\s*{\\s*"+t+"\\s*}");
}else n=new RegExp(u(o).replace(/\s+/g,"\\s+"));if(r=h(n,a))return r;if(i=c.exec(o)){var g=i[1];if(t=d(i[2]),n=new RegExp("on"+g+"=[\\'\"]\\s*"+t+"\\s*[\\'\"]","i"),r=h(n,a[0]))return r;if(n=new RegExp(t),r=h(n,a))return r}return null}}function m(e){if(!o(e.stack)&&e.stack){for(var t,a,s=/^\s*at (.*?) ?\(?((?:(?:file|https?|chrome-extension):.*?)|<anonymous>):(\d+)(?::(\d+))?\)?\s*$/i,l=/^\s*(.*?)(?:\((.*?)\))?@((?:file|https?|chrome).*?):(\d+)(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,d=e.stack.split("\n"),h=[],f=/^(.*) is undefined$/.exec(e.message),m=0,v=d.length;m<v;++m){
if(t=l.exec(d[m]))a={url:t[3],func:t[1]||c,args:t[2]?t[2].split(","):"",line:+t[4],column:t[5]?+t[5]:null};else if(t=s.exec(d[m]))a={url:t[2],func:t[1]||c,line:+t[3],column:t[4]?+t[4]:null};else{if(!(t=u.exec(d[m])))continue;a={url:t[2],func:t[1]||c,line:+t[3],column:t[4]?+t[4]:null}}!a.func&&a.line&&(a.func=n(a.url,a.line)),a.line&&(a.context=r(a.url,a.line)),h.push(a)}return h.length?(h[0].line&&!h[0].column&&f?h[0].column=p(f[1],h[0].url,h[0].line):h[0].column||o(e.columnNumber)||(h[0].column=e.columnNumber+1),
{name:e.name,message:e.message,url:i(),stack:h}):null}}function v(e){var t=e.stacktrace;if(!o(e.stacktrace)&&e.stacktrace){for(var a,s=/ line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,l=t.split("\n"),u=[],c=0,d=l.length;c<d;c+=2)if(a=s.exec(l[c])){var h={line:+a[1],column:+a[2],func:a[3]||a[4],args:a[5]?a[5].split(","):[],url:a[6]};if(!h.func&&h.line&&(h.func=n(h.url,h.line)),h.line)try{h.context=r(h.url,h.line)}catch(p){}h.context||(h.context=[l[c+1]]),
u.push(h)}return u.length?{name:e.name,message:e.message,url:i(),stack:u}:null}}function g(e){var s=e.message.split("\n");if(s.length<4)return null;var o,l,u,c,p=/^\s*Line (\d+) of linked script ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,f=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,m=/^\s*Line (\d+) of function script\s*$/i,v=[],g=document.getElementsByTagName("script"),y=[];for(l in g)a(g,l)&&!g[l].src&&y.push(g[l]);for(l=2,u=s.length;l<u;l+=2){
var b=null;if(o=p.exec(s[l]))b={url:o[2],func:o[3],line:+o[1]};else if(o=f.exec(s[l])){b={url:o[3],func:o[4]};var w=+o[1],S=y[o[2]-1];if(S&&(c=t(b.url))){c=c.join("\n");var P=c.indexOf(S.innerText);P>=0&&(b.line=w+c.substring(0,P).split("\n").length)}}else if(o=m.exec(s[l])){var x=window.location.href.replace(/#.*$/,""),C=o[1],T=new RegExp(d(s[l+1]));c=h(T,[x]),b={url:x,line:c?c.line:C,func:""}}if(b){b.func||(b.func=n(b.url,b.line));var _=r(b.url,b.line),E=_?_[Math.floor(_.length/2)]:null;_&&E.replace(/^\s*/,"")===s[l+1].replace(/^\s*/,"")?b.context=_:b.context=[s[l+1]],
v.push(b)}}return v.length?{name:e.name,message:s[0],url:i(),stack:v}:null}function y(e,t,i,a){var s={url:t,line:i};if(s.url&&s.line){e.incomplete=!1,s.func||(s.func=n(s.url,s.line)),s.context||(s.context=r(s.url,s.line));var o=/ '([^']+)' /.exec(a);if(o&&(s.column=p(o[1],s.url,s.line)),e.stack.length>0&&e.stack[0].url===s.url){if(e.stack[0].line===s.line)return!1;if(!e.stack[0].line&&e.stack[0].func===s.func)return e.stack[0].line=s.line,e.stack[0].context=s.context,!1}return e.stack.unshift(s),
e.partial=!0,!0}return e.incomplete=!0,!1}function b(e,t){for(var r,a,s,o=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,u=[],d={},h=!1,m=b.caller;m&&!h;m=m.caller)if(m!==w&&m!==l.report){if(a={url:null,func:c,line:null,column:null},m.name?a.func=m.name:(r=o.exec(m.toString()))&&(a.func=r[1]),"undefined"==typeof a.func)try{a.func=r.input.substring(0,r.input.indexOf("{"))}catch(v){}if(s=f(m)){a.url=s.url,a.line=s.line,a.func===c&&(a.func=n(a.url,a.line));var g=/ '([^']+)' /.exec(e.message||e.description);
g&&(a.column=p(g[1],s.url,s.line))}d[""+m]?h=!0:d[""+m]=!0,u.push(a)}t&&u.splice(0,t);var S={name:e.name,message:e.message,url:i(),stack:u};return y(S,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),S}function w(e,t){var n=null;t=null==t?0:+t;try{if(n=v(e))return n}catch(r){if(l.debug)throw r}try{if(n=m(e))return n}catch(r){if(l.debug)throw r}try{if(n=g(e))return n}catch(r){if(l.debug)throw r}try{if(n=b(e,t+1))return n}catch(r){if(l.debug)throw r}return{name:e.name,message:e.message,
url:i()}}var S={};return w.augmentStackTraceWithInitialElement=y,w.computeStackTraceFromStackProp=m,w.guessFunctionName=n,w.gatherContext=r,w}(),e.exports=l},function(e,t,n){e.exports=n(1954)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t;
}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.default=void 0;var o=n(7),l=n(595),u=i(l),c=function(e){function t(n,i){r(this,t);var s=a(this,e.call(this,n,i));return s.store=n.store,s}return s(t,e),t.prototype.getChildContext=function(){
return{store:this.store}},t.prototype.render=function(){var e=this.props.children;return o.Children.only(e)},t}(o.Component);t.default=c,c.propTypes={store:u.default.isRequired,children:o.PropTypes.element.isRequired},c.childContextTypes={store:u.default.isRequired}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e){return e.displayName||e.name||"Component"}function l(e,t){return(0,x.default)((0,b.default)(e),"`%sToProps` must return an object. Instead received %s.",t?"mapDispatch":"mapState",e),
e}function u(e,t,n){function i(e,t,n){var i=y(e,t,n);return(0,x.default)((0,b.default)(i),"`mergeProps` must return an object. Instead received %s.",i),i}var u=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],h=Boolean(e),f=e||C,v=(0,b.default)(t)?(0,g.default)(t):t||T,y=n||_,w=u.pure,P=void 0===w||w,k=u.withRef,I=void 0!==k&&k,A=P&&y!==_,M=E++;return function(e){var t=function(t){function n(e,i){r(this,n);var s=a(this,t.call(this,e,i));s.version=M,s.store=e.store||i.store,(0,x.default)(s.store,'Could not find "store" in either the context or '+('props of "'+s.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+s.constructor.displayName+'".'));
var o=s.store.getState();return s.state={storeState:o},s.clearCache(),s}return s(n,t),n.prototype.shouldComponentUpdate=function(){return!P||this.haveOwnPropsChanged||this.hasStoreStateChanged},n.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),i=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return l(i)},n.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),i="function"==typeof n;
return this.finalMapStateToProps=i?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,i?this.computeStateProps(e,t):l(n)},n.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,i=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return l(i,!0)},n.prototype.configureFinalMapDispatch=function(e,t){var n=v(e.dispatch,t),i="function"==typeof n;
return this.finalMapDispatchToProps=i?n:v,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,i?this.computeDispatchProps(e,t):l(n,!0)},n.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,m.default)(e,this.stateProps))&&(this.stateProps=e,!0)},n.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,m.default)(e,this.dispatchProps))&&(this.dispatchProps=e,
!0)},n.prototype.updateMergedPropsIfNeeded=function(){var e=i(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&A&&(0,m.default)(e,this.mergedProps))&&(this.mergedProps=e,!0)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){h&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),
this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillReceiveProps=function(e){P&&(0,m.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},n.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null,this.finalMapDispatchToProps=null,
this.finalMapStateToProps=null},n.prototype.handleChange=function(){if(this.unsubscribe){var e=this.state.storeState,t=this.store.getState();P&&e===t||(this.hasStoreStateChanged=!0,this.setState({storeState:t}))}},n.prototype.getWrappedInstance=function(){return(0,x.default)(I,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},n.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,i=this.renderedElement;
this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var r=!0,a=!0;P&&i&&(r=n||t&&this.doStatePropsDependOnOwnProps,a=t&&this.doDispatchPropsDependOnOwnProps);var s=!1,o=!1;r&&(s=this.updateStatePropsIfNeeded()),a&&(o=this.updateDispatchPropsIfNeeded());var l=!0;return l=!!(s||o||t)&&this.updateMergedPropsIfNeeded(),!l&&i?i:(I?this.renderedElement=(0,d.createElement)(e,c({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,d.createElement)(e,this.mergedProps),this.renderedElement);
},n}(d.Component);return t.displayName="Connect("+o(e)+")",t.WrappedComponent=e,t.contextTypes={store:p.default},t.propTypes={store:p.default},(0,S.default)(t,e)}}var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.__esModule=!0,t.default=u;var d=n(7),h=n(595),p=i(h),f=n(1944),m=i(f),v=n(1945),g=i(v),y=n(355),b=i(y),w=n(1924),S=i(w),P=n(1928),x=i(P),C=function(e){return{}},T=function(e){
return{dispatch:e}},_=function(e,t,n){return c({},n,e,t)},E=0},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=Object.prototype.hasOwnProperty,a=0;a<n.length;a++)if(!r.call(t,n[a])||e[n[a]]!==t[n[a]])return!1;return!0}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function i(e){return function(t){return(0,r.bindActionCreators)(e,t)}}t.__esModule=!0,t.default=i;var r=n(2012)},function(e,t,n){"use strict";
var i=n(57),r=n(586),a={focusDOMComponent:function(){r(i.getNodeFromInstance(this))}};e.exports=a},function(e,t,n){"use strict";function i(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function r(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function a(e){switch(e){case k.topCompositionStart:return I.compositionStart;case k.topCompositionEnd:return I.compositionEnd;case k.topCompositionUpdate:return I.compositionUpdate;
}}function s(e,t){return e===k.topKeyDown&&t.keyCode===S}function o(e,t){switch(e){case k.topKeyUp:return w.indexOf(t.keyCode)!==-1;case k.topKeyDown:return t.keyCode!==S;case k.topKeyPress:case k.topMouseDown:case k.topBlur:return!0;default:return!1}}function l(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function u(e,t,n,i){var r,u;if(P?r=a(e):M?o(e,n)&&(r=I.compositionEnd):s(e,n)&&(r=I.compositionStart),!r)return null;T&&(M||r!==I.compositionStart?r===I.compositionEnd&&M&&(u=M.getData()):M=v.getPooled(i));
var c=g.getPooled(r,t,n,i);if(u)c.data=u;else{var d=l(n);null!==d&&(c.data=d)}return f.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case k.topCompositionEnd:return l(t);case k.topKeyPress:var n=t.which;return n!==_?null:(A=!0,E);case k.topTextInput:var i=t.data;return i===E&&A?null:i;default:return null}}function d(e,t){if(M){if(e===k.topCompositionEnd||o(e,t)){var n=M.getData();return v.release(M),M=null,n}return null}switch(e){case k.topPaste:return null;case k.topKeyPress:return t.which&&!r(t)?String.fromCharCode(t.which):null;
case k.topCompositionEnd:return T?null:t.data;default:return null}}function h(e,t,n,i){var r;if(r=C?c(e,n):d(e,n),!r)return null;var a=y.getPooled(I.beforeInput,t,n,i);return a.data=r,f.accumulateTwoPhaseDispatches(a),a}var p=n(99),f=n(200),m=n(63),v=n(1952),g=n(1994),y=n(1997),b=n(121),w=[9,13,27,32],S=229,P=m.canUseDOM&&"CompositionEvent"in window,x=null;m.canUseDOM&&"documentMode"in document&&(x=document.documentMode);var C=m.canUseDOM&&"TextEvent"in window&&!x&&!i(),T=m.canUseDOM&&(!P||x&&x>8&&x<=11),_=32,E=String.fromCharCode(_),k=p.topLevelTypes,I={
beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[k.topCompositionEnd,k.topKeyPress,k.topTextInput,k.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[k.topBlur,k.topCompositionEnd,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null
})},dependencies:[k.topBlur,k.topCompositionStart,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[k.topBlur,k.topCompositionUpdate,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]}},A=!1,M=null,D={eventTypes:I,extractEvents:function(e,t,n,i){return[u(e,t,n,i),h(e,t,n,i)]}};e.exports=D},function(e,t,n){"use strict";function i(e){var t=e.nodeName&&e.nodeName.toLowerCase();
return"select"===t||"input"===t&&"file"===e.type}function r(e){var t=C.getPooled(A.change,D,e,T(e));w.accumulateTwoPhaseDispatches(t),x.batchedUpdates(a,t)}function a(e){b.enqueueEvents(e),b.processEventQueue(!1)}function s(e,t){M=e,D=t,M.attachEvent("onchange",r)}function o(){M&&(M.detachEvent("onchange",r),M=null,D=null)}function l(e,t){if(e===I.topChange)return t}function u(e,t,n){e===I.topFocus?(o(),s(t,n)):e===I.topBlur&&o()}function c(e,t){M=e,D=t,R=e.value,O=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),
Object.defineProperty(M,"value",U),M.attachEvent?M.attachEvent("onpropertychange",h):M.addEventListener("propertychange",h,!1)}function d(){M&&(delete M.value,M.detachEvent?M.detachEvent("onpropertychange",h):M.removeEventListener("propertychange",h,!1),M=null,D=null,R=null,O=null)}function h(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==R&&(R=t,r(e))}}function p(e,t){if(e===I.topInput)return t}function f(e,t,n){e===I.topFocus?(d(),c(t,n)):e===I.topBlur&&d()}function m(e,t){if((e===I.topSelectionChange||e===I.topKeyUp||e===I.topKeyDown)&&M&&M.value!==R)return R=M.value,
D}function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t){if(e===I.topClick)return t}var y=n(99),b=n(199),w=n(200),S=n(63),P=n(57),x=n(91),C=n(100),T=n(368),_=n(370),E=n(627),k=n(121),I=y.topLevelTypes,A={change:{phasedRegistrationNames:{bubbled:k({onChange:null}),captured:k({onChangeCapture:null})},dependencies:[I.topBlur,I.topChange,I.topClick,I.topFocus,I.topInput,I.topKeyDown,I.topKeyUp,I.topSelectionChange]}},M=null,D=null,R=null,O=null,L=!1;
S.canUseDOM&&(L=_("change")&&(!("documentMode"in document)||document.documentMode>8));var N=!1;S.canUseDOM&&(N=_("input")&&(!("documentMode"in document)||document.documentMode>11));var U={get:function(){return O.get.call(this)},set:function(e){R=""+e,O.set.call(this,e)}},F={eventTypes:A,extractEvents:function(e,t,n,r){var a,s,o=t?P.getNodeFromInstance(t):window;if(i(o)?L?a=l:s=u:E(o)?N?a=p:(a=m,s=f):v(o)&&(a=g),a){var c=a(e,t);if(c){var d=C.getPooled(A.change,c,n,r);return d.type="change",w.accumulateTwoPhaseDispatches(d),
d}}s&&s(e,o,t)}};e.exports=F},function(e,t,n){"use strict";function i(e){return e.substring(1,e.indexOf(" "))}var r=n(163),a=n(63),s=n(1626),o=n(79),l=n(588),u=n(32),c=/^(<[^ \/>]+)/,d="data-danger-index",h={dangerouslyRenderMarkup:function(e){a.canUseDOM?void 0:u(!1);for(var t,n={},r=0;r<e.length;r++)e[r]?void 0:u(!1),t=i(e[r]),t=l(t)?t:"*",n[t]=n[t]||[],n[t][r]=e[r];var h=[],p=0;for(t in n)if(n.hasOwnProperty(t)){var f,m=n[t];for(f in m)if(m.hasOwnProperty(f)){var v=m[f];m[f]=v.replace(c,"$1 "+d+'="'+f+'" ');
}for(var g=s(m.join(""),o),y=0;y<g.length;++y){var b=g[y];b.hasAttribute&&b.hasAttribute(d)&&(f=+b.getAttribute(d),b.removeAttribute(d),h.hasOwnProperty(f)?u(!1):void 0,h[f]=b,p+=1)}}return p!==h.length?u(!1):void 0,h.length!==e.length?u(!1):void 0,h},dangerouslyReplaceNodeWithMarkup:function(e,t){if(a.canUseDOM?void 0:u(!1),t?void 0:u(!1),"HTML"===e.nodeName?u(!1):void 0,"string"==typeof t){var n=s(t,o)[0];e.parentNode.replaceChild(n,e)}else r.replaceChildWithTree(e,t)}};e.exports=h},function(e,t,n){
"use strict";var i=n(121),r=[i({ResponderEventPlugin:null}),i({SimpleEventPlugin:null}),i({TapEventPlugin:null}),i({EnterLeaveEventPlugin:null}),i({ChangeEventPlugin:null}),i({SelectEventPlugin:null}),i({BeforeInputEventPlugin:null})];e.exports=r},function(e,t,n){"use strict";var i=n(99),r=n(200),a=n(57),s=n(254),o=n(121),l=i.topLevelTypes,u={mouseEnter:{registrationName:o({onMouseEnter:null}),dependencies:[l.topMouseOut,l.topMouseOver]},mouseLeave:{registrationName:o({onMouseLeave:null}),dependencies:[l.topMouseOut,l.topMouseOver]
}},c={eventTypes:u,extractEvents:function(e,t,n,i){if(e===l.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==l.topMouseOut&&e!==l.topMouseOver)return null;var o;if(i.window===i)o=i;else{var c=i.ownerDocument;o=c?c.defaultView||c.parentWindow:window}var d,h;if(e===l.topMouseOut){d=t;var p=n.relatedTarget||n.toElement;h=p?a.getClosestInstanceFromNode(p):null}else d=null,h=t;if(d===h)return null;var f=null==d?o:a.getNodeFromInstance(d),m=null==h?o:a.getNodeFromInstance(h),v=s.getPooled(u.mouseLeave,d,n,i);
v.type="mouseleave",v.target=f,v.relatedTarget=m;var g=s.getPooled(u.mouseEnter,h,n,i);return g.type="mouseenter",g.target=m,g.relatedTarget=f,r.accumulateEnterLeaveDispatches(v,g,d,h),[v,g]}};e.exports=c},function(e,t,n){"use strict";function i(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var r=n(51),a=n(122),s=n(624);r(i.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[s()];
},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,i=n.length,r=this.getText(),a=r.length;for(e=0;e<i&&n[e]===r[e];e++);var s=i-e;for(t=1;t<=s&&n[i-t]===r[a-t];t++);var o=t>1?1-t:void 0;return this._fallbackText=r.slice(e,o),this._fallbackText}}),a.addPoolingTo(i),e.exports=i},function(e,t,n){"use strict";var i=n(138),r=i.injection.MUST_USE_PROPERTY,a=i.injection.HAS_BOOLEAN_VALUE,s=i.injection.HAS_SIDE_EFFECTS,o=i.injection.HAS_NUMERIC_VALUE,l=i.injection.HAS_POSITIVE_NUMERIC_VALUE,u=i.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={
isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+i.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:a,allowTransparency:0,alt:0,async:a,autoComplete:0,autoPlay:a,capture:a,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:r|a,cite:0,classID:0,className:0,cols:l,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:a,coords:0,crossOrigin:0,data:0,dateTime:0,"default":a,defer:a,dir:0,disabled:a,download:u,draggable:0,
encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:a,formTarget:0,frameBorder:0,headers:0,height:0,hidden:a,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:a,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:r|a,muted:r|a,name:0,nonce:0,noValidate:a,open:a,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,
radioGroup:0,readOnly:a,rel:0,required:a,reversed:a,role:0,rows:l,rowSpan:o,sandbox:0,scope:0,scoped:a,scrolling:0,seamless:a,selected:r|a,shape:0,size:l,sizes:0,span:l,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:o,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:r|s,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:a,itemType:0,itemID:0,itemRef:0,
results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=c},function(e,t,n){"use strict";function i(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to ReactCSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");
if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}}}var r=n(51),a=n(250),s=n(1988),o=n(1955),l=a.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:o.propTypes.name,transitionAppear:a.PropTypes.bool,transitionEnter:a.PropTypes.bool,transitionLeave:a.PropTypes.bool,transitionAppearTimeout:i("Appear"),transitionEnterTimeout:i("Enter"),transitionLeaveTimeout:i("Leave")},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,
transitionLeave:!0}},_wrapChild:function(e){return a.createElement(o,{name:this.props.transitionName,appear:this.props.transitionAppear,enter:this.props.transitionEnter,leave:this.props.transitionLeave,appearTimeout:this.props.transitionAppearTimeout,enterTimeout:this.props.transitionEnterTimeout,leaveTimeout:this.props.transitionLeaveTimeout},e)},render:function(){return a.createElement(s,r({},this.props,{childFactory:this._wrapChild}))}});e.exports=l},function(e,t,n){"use strict";var i=n(250),r=n(604),a=n(1621),s=n(1987),o=n(628),l=17,u=i.createClass({
displayName:"ReactCSSTransitionGroupChild",propTypes:{name:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.shape({enter:i.PropTypes.string,leave:i.PropTypes.string,active:i.PropTypes.string}),i.PropTypes.shape({enter:i.PropTypes.string,enterActive:i.PropTypes.string,leave:i.PropTypes.string,leaveActive:i.PropTypes.string,appear:i.PropTypes.string,appearActive:i.PropTypes.string})]).isRequired,appear:i.PropTypes.bool,enter:i.PropTypes.bool,leave:i.PropTypes.bool,appearTimeout:i.PropTypes.number,
enterTimeout:i.PropTypes.number,leaveTimeout:i.PropTypes.number},transition:function(e,t,n){var i=r.findDOMNode(this);if(!i)return void(t&&t());var o=this.props.name[e]||this.props.name+"-"+e,l=this.props.name[e+"Active"]||o+"-active",u=null,c=function(e){e&&e.target!==i||(clearTimeout(u),a.removeClass(i,o),a.removeClass(i,l),s.removeEndEventListener(i,c),t&&t())};a.addClass(i,o),this.queueClass(l),n?(u=setTimeout(c,n),this.transitionTimeouts.push(u)):s.addEndEventListener(i,c)},queueClass:function(e){
this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,l))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(a.addClass.bind(a,r.findDOMNode(this))),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[],this.transitionTimeouts=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)})},componentWillAppear:function(e){
this.props.appear?this.transition("appear",e,this.props.appearTimeout):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e,this.props.enterTimeout):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e,this.props.leaveTimeout):e()},render:function(){return o(this.props.children)}});e.exports=u},function(e,t,n){"use strict";function i(e,t,n){var i=void 0===e[n];null!=t&&i&&(e[n]=a(t))}var r=n(164),a=n(626),s=(n(359),n(372)),o=n(373),l=(n(42),{instantiateChildren:function(e,t,n){
if(null==e)return null;var r={};return o(e,i,r),r},updateChildren:function(e,t,n,i,o){if(t||e){var l,u;for(l in t)if(t.hasOwnProperty(l)){u=e&&e[l];var c=u&&u._currentElement,d=t[l];if(null!=u&&s(c,d))r.receiveComponent(u,d,i,o),t[l]=u;else{u&&(n[l]=r.getNativeNode(u),r.unmountComponent(u,!1));var h=a(d);t[l]=h}}for(l in e)!e.hasOwnProperty(l)||t&&t.hasOwnProperty(l)||(u=e[l],n[l]=r.getNativeNode(u),r.unmountComponent(u,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];
r.unmountComponent(i,t)}}});e.exports=l},function(e,t,n){"use strict";function i(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function r(e){}function a(e,t){}function s(e){return e.prototype&&e.prototype.isReactComponent}var o=n(51),l=n(361),u=n(123),c=n(86),d=n(362),h=n(363),p=(n(80),n(614)),f=n(253),m=(n(252),n(164)),v=n(617),g=n(245),y=n(32),b=n(372);n(42);r.prototype.render=function(){var e=h.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);
return a(e,t),t};var w=1,S={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._nativeParent=null,this._nativeContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,i){
this._context=i,this._mountOrder=w++,this._nativeParent=t,this._nativeContainerInfo=n;var o,l=this._processProps(this._currentElement.props),u=this._processContext(i),d=this._currentElement.type,p=this._constructComponent(l,u);s(d)||null!=p&&null!=p.render||(o=p,a(d,o),null===p||p===!1||c.isValidElement(p)?void 0:y(!1),p=new r(d));p.props=l,p.context=u,p.refs=g,p.updater=v,this._instance=p,h.set(p,this);var f=p.state;void 0===f&&(p.state=f=null),"object"!=typeof f||Array.isArray(f)?y(!1):void 0,this._pendingStateQueue=null,
this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var m;return m=p.unstable_handleError?this.performInitialMountWithErrorHandling(o,t,n,e,i):this.performInitialMount(o,t,n,e,i),p.componentDidMount&&e.getReactMountReady().enqueue(p.componentDidMount,p),m},_constructComponent:function(e,t){return this._constructComponentWithoutOwner(e,t)},_constructComponentWithoutOwner:function(e,t){var n,i=this._currentElement.type;return n=s(i)?new i(e,t,v):i(e,t,v)},performInitialMountWithErrorHandling:function(e,t,n,i,r){
var a,s=i.checkpoint();try{a=this.performInitialMount(e,t,n,i,r)}catch(o){i.rollback(s),this._instance.unstable_handleError(o),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),s=i.checkpoint(),this._renderedComponent.unmountComponent(!0),i.rollback(s),a=this.performInitialMount(e,t,n,i,r)}return a},performInitialMount:function(e,t,n,i,r){var a=this._instance;a.componentWillMount&&(a.componentWillMount(),this._pendingStateQueue&&(a.state=this._processPendingState(a.props,a.context))),
void 0===e&&(e=this._renderValidatedComponent()),this._renderedNodeType=p.getType(e),this._renderedComponent=this._instantiateReactComponent(e);var s=m.mountComponent(this._renderedComponent,i,t,n,this._processChildContext(r));return s},getNativeNode:function(){return m.getNativeNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";
d.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(m.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,h.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;
if(!n)return g;var i={};for(var r in n)i[r]=e[r];return i},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,i=n.getChildContext&&n.getChildContext();if(i){"object"!=typeof t.childContextTypes?y(!1):void 0;for(var r in i)r in t.childContextTypes?void 0:y(!1);return o({},e,i)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var r=this.getName();for(var a in e)if(e.hasOwnProperty(a)){
var s;try{"function"!=typeof e[a]?y(!1):void 0,s=e[a](t,a,r,n)}catch(o){s=o}if(s instanceof Error){i(this);n===f.prop}}},receiveComponent:function(e,t,n){var i=this._currentElement,r=this._context;this._pendingElement=null,this.updateComponent(t,i,e,r,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?m.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null;
},updateComponent:function(e,t,n,i,r){var a,s,o=this._instance,l=!1;this._context===r?a=o.context:(a=this._processContext(r),l=!0),t===n?s=n.props:(s=this._processProps(n.props),l=!0),l&&o.componentWillReceiveProps&&o.componentWillReceiveProps(s,a);var u=this._processPendingState(s,a),c=!0;!this._pendingForceUpdate&&o.shouldComponentUpdate&&(c=o.shouldComponentUpdate(s,u,a)),this._updateBatchNumber=null,c?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,s,u,a,e,r)):(this._currentElement=n,
this._context=r,o.props=s,o.state=u,o.context=a)},_processPendingState:function(e,t){var n=this._instance,i=this._pendingStateQueue,r=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!i)return n.state;if(r&&1===i.length)return i[0];for(var a=o({},r?i[0]:n.state),s=r?1:0;s<i.length;s++){var l=i[s];o(a,"function"==typeof l?l.call(n,a,e,t):l)}return a},_performComponentUpdate:function(e,t,n,i,r,a){var s,o,l,u=this._instance,c=Boolean(u.componentDidUpdate);c&&(s=u.props,
o=u.state,l=u.context),u.componentWillUpdate&&u.componentWillUpdate(t,n,i),this._currentElement=e,this._context=a,u.props=t,u.state=n,u.context=i,this._updateRenderedComponent(r,a),c&&r.getReactMountReady().enqueue(u.componentDidUpdate.bind(u,s,o,l),u)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,i=n._currentElement,r=this._renderValidatedComponent();if(b(i,r))m.receiveComponent(n,r,e,this._processChildContext(t));else{var a=m.getNativeNode(n);m.unmountComponent(n,!1),this._renderedNodeType=p.getType(r),
this._renderedComponent=this._instantiateReactComponent(r);var s=m.mountComponent(this._renderedComponent,e,this._nativeParent,this._nativeContainerInfo,this._processChildContext(t));this._replaceNodeWithMarkup(a,s,n)}},_replaceNodeWithMarkup:function(e,t,n){l.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;u.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext();
}finally{u.current=null}return null===e||e===!1||c.isValidElement(e)?void 0:y(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?y(!1):void 0;var i=t.getPublicInstance(),r=n.refs===g?n.refs={}:n.refs;r[e]=i},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;
return e instanceof r?null:e},_instantiateReactComponent:null},P={Mixin:S};e.exports=P},function(e,t,n){"use strict";var i=n(248),r={getNativeProps:i.getNativeProps};e.exports=r},function(e,t,n){"use strict";function i(e,t){t&&(G[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?O(!1):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?O(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&H in t.dangerouslySetInnerHTML?void 0:O(!1)),null!=t.style&&"object"!=typeof t.style?O(!1):void 0);
}function r(e,t,n,i){if(!(i instanceof D)){var r=e._nativeContainerInfo,s=r._node&&r._node.nodeType===W,o=s?r._node:r._ownerDocument;j(t,o),i.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;w.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;k.postMountWrapper(e)}function o(){var e=this;e._rootNodeID?void 0:O(!1);var t=F(e);switch(t?void 0:O(!1),e._tag){case"iframe":case"object":e._wrapperState.listeners=[P.trapBubbledEvent(b.topLevelTypes.topLoad,"load",t)];
break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in K)K.hasOwnProperty(n)&&e._wrapperState.listeners.push(P.trapBubbledEvent(b.topLevelTypes[n],K[n],t));break;case"img":e._wrapperState.listeners=[P.trapBubbledEvent(b.topLevelTypes.topError,"error",t),P.trapBubbledEvent(b.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[P.trapBubbledEvent(b.topLevelTypes.topReset,"reset",t),P.trapBubbledEvent(b.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":
case"textarea":e._wrapperState.listeners=[P.trapBubbledEvent(b.topLevelTypes.topInvalid,"invalid",t)]}}function l(){I.postUpdateWrapper(this)}function u(e){J.call(X,e)||($.test(e)?void 0:O(!1),X[e]=!0)}function c(e,t){return e.indexOf("-")>=0||null!=t.is}function d(e){var t=e.type;u(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._nativeNode=null,this._nativeParent=null,this._rootNodeID=null,
this._domID=null,this._nativeContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var h=n(51),p=n(1946),f=n(597),m=n(163),v=n(599),g=n(138),y=n(357),b=n(99),w=n(199),S=n(249),P=n(251),x=n(603),C=n(1958),T=n(605),_=n(57),E=n(1966),k=n(1968),I=n(606),A=n(1971),M=(n(80),n(1981)),D=n(1985),R=(n(79),n(256)),O=n(32),L=(n(370),n(121)),N=(n(589),n(374),n(42),T),U=w.deleteListener,F=_.getNodeFromInstance,j=P.listenTo,B=S.registrationNameModules,z={string:!0,number:!0},V=L({style:null
}),H=L({__html:null}),q={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},W=11,K={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",
topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},Q={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Y={listing:!0,pre:!0,textarea:!0},G=h({menuitem:!0},Q),$=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,X={},J={}.hasOwnProperty,Z=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=Z++,this._domID=n._idCounter++,
this._nativeParent=t,this._nativeContainerInfo=n;var a=this._currentElement.props;switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(o,this);break;case"button":a=C.getNativeProps(this,a,t);break;case"input":E.mountWrapper(this,a,t),a=E.getNativeProps(this,a),e.getReactMountReady().enqueue(o,this);break;case"option":k.mountWrapper(this,a,t),a=k.getNativeProps(this,a);break;case"select":I.mountWrapper(this,a,t),
a=I.getNativeProps(this,a),e.getReactMountReady().enqueue(o,this);break;case"textarea":A.mountWrapper(this,a,t),a=A.getNativeProps(this,a),e.getReactMountReady().enqueue(o,this)}i(this,a);var l,u;null!=t?(l=t._namespaceURI,u=t._tag):n._tag&&(l=n._namespaceURI,u=n._tag),(null==l||l===v.svg&&"foreignobject"===u)&&(l=v.html),l===v.html&&("svg"===this._tag?l=v.svg:"math"===this._tag&&(l=v.mathml)),this._namespaceURI=l;var c;if(e.useCreateElement){var d,h=n._ownerDocument;if(l===v.html)if("script"===this._tag){
var f=h.createElement("div"),g=this._currentElement.type;f.innerHTML="<"+g+"></"+g+">",d=f.removeChild(f.firstChild)}else d=h.createElement(this._currentElement.type,a.is||null);else d=h.createElementNS(l,this._currentElement.type);_.precacheNode(this,d),this._flags|=N.hasCachedChildNodes,this._nativeParent||y.setAttributeForRoot(d),this._updateDOMProperties(null,a,e);var b=m(d);this._createInitialChildren(e,a,r,b),c=b}else{var w=this._createOpenTagMarkupAndPutListeners(e,a),S=this._createContentMarkup(e,a,r);
c=!S&&Q[this._tag]?w+"/>":w+">"+S+"</"+this._currentElement.type+">"}switch(this._tag){case"button":case"input":case"select":case"textarea":a.autoFocus&&e.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(s,this)}return c},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];if(null!=a)if(B.hasOwnProperty(i))a&&r(this,i,a,e);else{i===V&&(a&&(a=this._previousStyleCopy=h({},t.style)),
a=f.createMarkupForStyles(a,this));var s=null;null!=this._tag&&c(this._tag,t)?q.hasOwnProperty(i)||(s=y.createMarkupForCustomAttribute(i,a)):s=y.createMarkupForProperty(i,a),s&&(n+=" "+s)}}return e.renderToStaticMarkup?n:(this._nativeParent||(n+=" "+y.createMarkupForRoot()),n+=" "+y.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var i="",r=t.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&(i=r.__html);else{var a=z[typeof t.children]?t.children:null,s=null!=a?null:t.children;
if(null!=a)i=R(a);else if(null!=s){var o=this.mountChildren(s,e,n);i=o.join("")}}return Y[this._tag]&&"\n"===i.charAt(0)?"\n"+i:i},_createInitialChildren:function(e,t,n,i){var r=t.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&m.queueHTML(i,r.__html);else{var a=z[typeof t.children]?t.children:null,s=null!=a?null:t.children;if(null!=a)m.queueText(i,a);else if(null!=s)for(var o=this.mountChildren(s,e,n),l=0;l<o.length;l++)m.queueChild(i,o[l])}},receiveComponent:function(e,t,n){var i=this._currentElement;
this._currentElement=e,this.updateComponent(t,i,e,n)},updateComponent:function(e,t,n,r){var a=t.props,s=this._currentElement.props;switch(this._tag){case"button":a=C.getNativeProps(this,a),s=C.getNativeProps(this,s);break;case"input":E.updateWrapper(this),a=E.getNativeProps(this,a),s=E.getNativeProps(this,s);break;case"option":a=k.getNativeProps(this,a),s=k.getNativeProps(this,s);break;case"select":a=I.getNativeProps(this,a),s=I.getNativeProps(this,s);break;case"textarea":A.updateWrapper(this),a=A.getNativeProps(this,a),
s=A.getNativeProps(this,s)}i(this,s),this._updateDOMProperties(a,s,e),this._updateDOMChildren(a,s,e,r),"select"===this._tag&&e.getReactMountReady().enqueue(l,this)},_updateDOMProperties:function(e,t,n){var i,a,s;for(i in e)if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&null!=e[i])if(i===V){var o=this._previousStyleCopy;for(a in o)o.hasOwnProperty(a)&&(s=s||{},s[a]="");this._previousStyleCopy=null}else B.hasOwnProperty(i)?e[i]&&U(this,i):(g.properties[i]||g.isCustomAttribute(i))&&y.deleteValueForProperty(F(this),i);
for(i in t){var l=t[i],u=i===V?this._previousStyleCopy:null!=e?e[i]:void 0;if(t.hasOwnProperty(i)&&l!==u&&(null!=l||null!=u))if(i===V)if(l?l=this._previousStyleCopy=h({},l):this._previousStyleCopy=null,u){for(a in u)!u.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(s=s||{},s[a]="");for(a in l)l.hasOwnProperty(a)&&u[a]!==l[a]&&(s=s||{},s[a]=l[a])}else s=l;else if(B.hasOwnProperty(i))l?r(this,i,l,n):u&&U(this,i);else if(c(this._tag,t))q.hasOwnProperty(i)||y.setValueForAttribute(F(this),i,l);else if(g.properties[i]||g.isCustomAttribute(i)){
var d=F(this);null!=l?y.setValueForProperty(d,i,l):y.deleteValueForProperty(d,i)}}s&&f.setValueForStyles(F(this),s,this)},_updateDOMChildren:function(e,t,n,i){var r=z[typeof e.children]?e.children:null,a=z[typeof t.children]?t.children:null,s=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,o=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,l=null!=r?null:e.children,u=null!=a?null:t.children,c=null!=r||null!=s,d=null!=a||null!=o;null!=l&&null==u?this.updateChildren(null,n,i):c&&!d&&this.updateTextContent(""),
null!=a?r!==a&&this.updateTextContent(""+a):null!=o?s!==o&&this.updateMarkup(""+o):null!=u&&this.updateChildren(u,n,i)},getNativeNode:function(){return F(this)},unmountComponent:function(e){switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":O(!1)}this.unmountChildren(e),_.uncacheNode(this),w.deleteAllListeners(this),x.unmountIDFromEnvironment(this._rootNodeID),
this._rootNodeID=null,this._domID=null,this._wrapperState=null},getPublicInstance:function(){return F(this)}},h(d.prototype,d.Mixin,M.Mixin),e.exports=d},function(e,t,n){"use strict";function i(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===r?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var r=(n(374),9);e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i,r,a){}var r=n(1973),a=(n(42),[]),s={addDevtool:function(e){
a.push(e)},removeDevtool:function(e){for(var t=0;t<a.length;t++)a[t]===e&&(a.splice(t,1),t--)},onCreateMarkupForProperty:function(e,t){i("onCreateMarkupForProperty",e,t)},onSetValueForProperty:function(e,t,n){i("onSetValueForProperty",e,t,n)},onDeleteValueForProperty:function(e,t){i("onDeleteValueForProperty",e,t)}};s.addDevtool(r),e.exports=s},function(e,t,n){"use strict";var i=n(51),r=n(163),a=n(57),s=function(e){this._currentElement=null,this._nativeNode=null,this._nativeParent=null,this._nativeContainerInfo=null,
this._domID=null};i(s.prototype,{mountComponent:function(e,t,n,i){var s=n._idCounter++;this._domID=s,this._nativeParent=t,this._nativeContainerInfo=n;var o=" react-empty: "+this._domID+" ";if(e.useCreateElement){var l=n._ownerDocument,u=l.createComment(o);return a.precacheNode(this,u),r(u)}return e.renderToStaticMarkup?"":"<!--"+o+"-->"},receiveComponent:function(){},getNativeNode:function(){return a.getNodeFromInstance(this)},unmountComponent:function(){a.uncacheNode(this)}}),e.exports=s},function(e,t,n){
"use strict";function i(e){return r.createFactory(e)}var r=n(86),a=(n(607),n(1632)),s=a({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",
embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",
option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",
circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},i);e.exports=s},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var i=n(356),r=n(57),a={dangerouslyProcessChildrenUpdates:function(e,t){var n=r.getNodeFromInstance(e);
i.processUpdates(n,t)}};e.exports=a},function(e,t,n){"use strict";function i(){this._rootNodeID&&h.updateWrapper(this)}function r(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);c.asap(i,this);var r=t.name;if("radio"===t.type&&null!=r){for(var a=u.getNodeFromInstance(this),s=a;s.parentNode;)s=s.parentNode;for(var o=s.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),h=0;h<o.length;h++){var p=o[h];if(p!==a&&p.form===a.form){var f=u.getInstanceFromNode(p);f?void 0:d(!1),
c.asap(i,f)}}}return n}var a=n(51),s=n(248),o=n(357),l=n(360),u=n(57),c=n(91),d=n(32),h=(n(42),{getNativeProps:function(e,t){var n=l.getValue(t),i=l.getChecked(t),r=a({type:void 0},s.getNativeProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=i?i:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return r},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,
listeners:null,onChange:r.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&o.setValueForProperty(u.getNodeFromInstance(e),"checked",n||!1);var i=l.getValue(t);null!=i&&o.setValueForProperty(u.getNodeFromInstance(e),"value",""+i)}});e.exports=h},function(e,t,n){"use strict";var i=n(1961);e.exports={debugTool:i}},function(e,t,n){"use strict";var i=n(51),r=n(600),a=n(57),s=n(606),o=(n(42),{mountWrapper:function(e,t,n){var i=null;if(null!=n){var r=n;"optgroup"===r._tag&&(r=r._nativeParent),
null!=r&&"select"===r._tag&&(i=s.getSelectValueContext(r))}var a=null;if(null!=i)if(a=!1,Array.isArray(i)){for(var o=0;o<i.length;o++)if(""+i[o]==""+t.value){a=!0;break}}else a=""+i==""+t.value;e._wrapperState={selected:a}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=a.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getNativeProps:function(e,t){var n=i({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);
var a="";return r.forEach(t.children,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(a+=e))}),a&&(n.children=a),n}});e.exports=o},function(e,t,n){"use strict";function i(e,t,n,i){return e===n&&t===i}function r(e){var t=document.selection,n=t.createRange(),i=n.text.length,r=n.duplicate();r.moveToElementText(e),r.setEndPoint("EndToStart",n);var a=r.text.length,s=a+i;return{start:a,end:s}}function a(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;
var n=t.anchorNode,r=t.anchorOffset,a=t.focusNode,s=t.focusOffset,o=t.getRangeAt(0);try{o.startContainer.nodeType,o.endContainer.nodeType}catch(l){return null}var u=i(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=u?0:o.toString().length,d=o.cloneRange();d.selectNodeContents(e),d.setEnd(o.startContainer,o.startOffset);var h=i(d.startContainer,d.startOffset,d.endContainer,d.endOffset),p=h?0:d.toString().length,f=p+c,m=document.createRange();m.setStart(n,r),m.setEnd(a,s);var v=m.collapsed;
return{start:v?f:p,end:v?p:f}}function s(e,t){var n,i,r=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,i=n):t.start>t.end?(n=t.end,i=t.start):(n=t.start,i=t.end),r.moveToElementText(e),r.moveStart("character",n),r.setEndPoint("EndToStart",r),r.moveEnd("character",i-n),r.select()}function o(e,t){if(window.getSelection){var n=window.getSelection(),i=e[c()].length,r=Math.min(t.start,i),a=void 0===t.end?r:Math.min(t.end,i);if(!n.extend&&r>a){var s=a;a=r,r=s}var o=u(e,r),l=u(e,a);
if(o&&l){var d=document.createRange();d.setStart(o.node,o.offset),n.removeAllRanges(),r>a?(n.addRange(d),n.extend(l.node,l.offset)):(d.setEnd(l.node,l.offset),n.addRange(d))}}}var l=n(63),u=n(2006),c=n(624),d=l.canUseDOM&&"selection"in document&&!("getSelection"in window),h={getOffsets:d?r:a,setOffsets:d?s:o};e.exports=h},function(e,t,n){"use strict";var i=n(51),r=n(356),a=n(163),s=n(57),o=(n(80),n(256)),l=n(32),u=(n(374),function(e){this._currentElement=e,this._stringText=""+e,this._nativeNode=null,
this._nativeParent=null,this._domID=null,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(u.prototype,{mountComponent:function(e,t,n,i){var r=n._idCounter++,l=" react-text: "+r+" ",u=" /react-text ";if(this._domID=r,this._nativeParent=t,e.useCreateElement){var c=n._ownerDocument,d=c.createComment(l),h=c.createComment(u),p=a(c.createDocumentFragment());return a.queueChild(p,a(d)),this._stringText&&a.queueChild(p,a(c.createTextNode(this._stringText))),a.queueChild(p,a(h)),s.precacheNode(this,d),
this._closingComment=h,p}var f=o(this._stringText);return e.renderToStaticMarkup?f:"<!--"+l+"-->"+f+"<!--"+u+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var i=this.getNativeNode();r.replaceDelimitedText(i[0],i[1],n)}}},getNativeNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?l(!1):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){
this._closingComment=n;break}n=n.nextSibling}return e=[this._nativeNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=u},function(e,t,n){"use strict";function i(){this._rootNodeID&&h.updateWrapper(this)}function r(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);return c.asap(i,this),n}var a=n(51),s=n(248),o=n(357),l=n(360),u=n(57),c=n(91),d=n(32),h=(n(42),{getNativeProps:function(e,t){
null!=t.dangerouslySetInnerHTML?d(!1):void 0;var n=a({},s.getNativeProps(e,t),{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=t.defaultValue,i=t.children;null!=i&&(null!=n?d(!1):void 0,Array.isArray(i)&&(i.length<=1?void 0:d(!1),i=i[0]),n=""+i),null==n&&(n="");var a=l.getValue(t);e._wrapperState={initialValue:""+(null!=a?a:n),listeners:null,onChange:r.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getValue(t);
null!=n&&o.setValueForProperty(u.getNodeFromInstance(e),"value",""+n)}});e.exports=h},function(e,t,n){"use strict";function i(e,t){"_nativeNode"in e?void 0:l(!1),"_nativeNode"in t?void 0:l(!1);for(var n=0,i=e;i;i=i._nativeParent)n++;for(var r=0,a=t;a;a=a._nativeParent)r++;for(;n-r>0;)e=e._nativeParent,n--;for(;r-n>0;)t=t._nativeParent,r--;for(var s=n;s--;){if(e===t)return e;e=e._nativeParent,t=t._nativeParent}return null}function r(e,t){"_nativeNode"in e?void 0:l(!1),"_nativeNode"in t?void 0:l(!1);
for(;t;){if(t===e)return!0;t=t._nativeParent}return!1}function a(e){return"_nativeNode"in e?void 0:l(!1),e._nativeParent}function s(e,t,n){for(var i=[];e;)i.push(e),e=e._nativeParent;var r;for(r=i.length;r-- >0;)t(i[r],!1,n);for(r=0;r<i.length;r++)t(i[r],!0,n)}function o(e,t,n,r,a){for(var s=e&&t?i(e,t):null,o=[];e&&e!==s;)o.push(e),e=e._nativeParent;for(var l=[];t&&t!==s;)l.push(t),t=t._nativeParent;var u;for(u=0;u<o.length;u++)n(o[u],!0,r);for(u=l.length;u-- >0;)n(l[u],!1,a)}var l=n(32);e.exports={
isAncestor:r,getLowestCommonAncestor:i,getParentInstance:a,traverseTwoPhase:s,traverseEnterLeave:o}},function(e,t,n){"use strict";var i,r=(n(138),n(249),n(42),{onCreateMarkupForProperty:function(e,t){i(e)},onSetValueForProperty:function(e,t,n){i(t)},onDeleteValueForProperty:function(e,t){i(t)}});e.exports=r},function(e,t,n){"use strict";function i(e,t,n,i,r,a){}function r(e){}var a=(n(63),n(1635),n(42),[]),s={addDevtool:function(e){a.push(e)},removeDevtool:function(e){for(var t=0;t<a.length;t++)a[t]===e&&(a.splice(t,1),
t--)},beginProfiling:function(){},endProfiling:function(){},getFlushHistory:function(){},onBeginFlush:function(){i("onBeginFlush")},onEndFlush:function(){i("onEndFlush")},onBeginLifeCycleTimer:function(e,t){r(e),i("onBeginLifeCycleTimer",e,t)},onEndLifeCycleTimer:function(e,t){r(e),i("onEndLifeCycleTimer",e,t)},onBeginReconcilerTimer:function(e,t){r(e),i("onBeginReconcilerTimer",e,t)},onEndReconcilerTimer:function(e,t){r(e),i("onEndReconcilerTimer",e,t)},onBeginProcessingChildContext:function(){i("onBeginProcessingChildContext");
},onEndProcessingChildContext:function(){i("onEndProcessingChildContext")},onNativeOperation:function(e,t,n){r(e),i("onNativeOperation",e,t,n)},onSetState:function(){i("onSetState")},onSetDisplayName:function(e,t){r(e),i("onSetDisplayName",e,t)},onSetChildren:function(e,t){r(e),i("onSetChildren",e,t)},onSetOwner:function(e,t){r(e),i("onSetOwner",e,t)},onSetText:function(e,t){r(e),i("onSetText",e,t)},onMountRootComponent:function(e){r(e),i("onMountRootComponent",e)},onMountComponent:function(e){r(e),
i("onMountComponent",e)},onUpdateComponent:function(e){r(e),i("onUpdateComponent",e)},onUnmountComponent:function(e){r(e),i("onUnmountComponent",e)}};e.exports=s},function(e,t,n){"use strict";function i(){this.reinitializeTransaction()}var r=n(51),a=n(91),s=n(255),o=n(79),l={initialize:o,close:function(){h.isBatchingUpdates=!1}},u={initialize:o,close:a.flushBatchedUpdates.bind(a)},c=[u,l];r(i.prototype,s.Mixin,{getTransactionWrappers:function(){return c}});var d=new i,h={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,i,r,a){
var s=h.isBatchingUpdates;h.isBatchingUpdates=!0,s?e(t,n,i,r,a):d.perform(e,null,t,n,i,r,a)}};e.exports=h},function(e,t,n){"use strict";function i(){P||(P=!0,g.EventEmitter.injectReactEventListener(v),g.EventPluginHub.injectEventPluginOrder(s),g.EventPluginUtils.injectComponentTree(d),g.EventPluginUtils.injectTreeTraversal(p),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:S,EnterLeaveEventPlugin:o,ChangeEventPlugin:a,SelectEventPlugin:w,BeforeInputEventPlugin:r}),g.NativeComponent.injectGenericComponentClass(c),
g.NativeComponent.injectTextComponentClass(f),g.DOMProperty.injectDOMPropertyConfig(l),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new h(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(m),g.Component.injectEnvironment(u))}var r=n(1947),a=n(1948),s=n(1950),o=n(1951),l=n(1953),u=n(603),c=n(1959),d=n(57),h=n(1962),p=n(1972),f=n(1970),m=n(1975),v=n(1978),g=n(1979),y=n(1983),b=n(1989),w=n(1990),S=n(1991),P=!1;e.exports={
inject:i}},function(e,t,n){"use strict";function i(e){r.enqueueEvents(e),r.processEventQueue(!1)}var r=n(199),a={handleTopLevel:function(e,t,n,a){var s=r.extractEvents(e,t,n,a);i(s)}};e.exports=a},function(e,t,n){"use strict";function i(e){for(;e._nativeParent;)e=e._nativeParent;var t=d.getNodeFromInstance(e),n=t.parentNode;return d.getClosestInstanceFromNode(n)}function r(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function a(e){var t=p(e.nativeEvent),n=d.getClosestInstanceFromNode(t),r=n;
do e.ancestors.push(r),r=r&&i(r);while(r);for(var a=0;a<e.ancestors.length;a++)n=e.ancestors[a],m._handleTopLevel(e.topLevelType,n,e.nativeEvent,p(e.nativeEvent))}function s(e){var t=f(window);e(t)}var o=n(51),l=n(585),u=n(63),c=n(122),d=n(57),h=n(91),p=n(368),f=n(1627);o(r.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(r,c.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(e){
m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var i=n;return i?l.listen(i,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var i=n;return i?l.capture(i,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=s.bind(null,e);l.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=r.getPooled(e,t);try{h.batchedUpdates(a,n)}finally{r.release(n)}}}};e.exports=m;
},function(e,t,n){"use strict";var i=n(138),r=n(199),a=n(358),s=n(361),o=n(601),l=n(608),u=n(251),c=n(613),d=n(91),h={Component:s.injection,Class:o.injection,DOMProperty:i.injection,EmptyComponent:l.injection,EventPluginHub:r.injection,EventPluginUtils:a.injection,EventEmitter:u.injection,NativeComponent:c.injection,Updates:d.injection};e.exports=h},function(e,t,n){"use strict";var i=n(2002),r=/\/?>/,a=/^<\!\-\-/,s={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=i(e);
return a.test(e)?e:e.replace(r," "+s.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(s.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var r=i(e);return r===n}};e.exports=s},function(e,t,n){"use strict";function i(e,t,n){return{type:d.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function r(e,t,n){return{type:d.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:h.getNativeNode(e),toIndex:n,afterNode:t}}function a(e,t){return{type:d.REMOVE_NODE,
content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function s(e){return{type:d.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function o(e){return{type:d.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function l(e,t){return t&&(e=e||[],e.push(t)),e}function u(e,t){c.processChildrenUpdates(e,t)}var c=n(361),d=(n(80),n(612)),h=(n(123),n(164)),p=n(1956),f=(n(79),n(621)),m=n(32),v={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){
return p.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,i,r){var a;return a=f(t),p.updateChildren(e,a,n,i,r),a},mountChildren:function(e,t,n){var i=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=i;var r=[],a=0;for(var s in i)if(i.hasOwnProperty(s)){var o=i[s],l=h.mountComponent(o,t,this,this._nativeContainerInfo,n);o._mountIndex=a++,r.push(l)}return r},updateTextContent:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&m(!1);
var i=[o(e)];u(this,i)},updateMarkup:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&m(!1);var i=[s(e)];u(this,i)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var i=this._renderedChildren,r={},a=this._reconcilerUpdateChildren(i,e,r,t,n);if(a||i){var s,o=null,c=0,d=0,p=null;for(s in a)if(a.hasOwnProperty(s)){var f=i&&i[s],m=a[s];f===m?(o=l(o,this.moveChild(f,p,d,c)),c=Math.max(f._mountIndex,c),f._mountIndex=d):(f&&(c=Math.max(f._mountIndex,c)),
o=l(o,this._mountChildAtIndex(m,p,d,t,n))),d++,p=h.getNativeNode(m)}for(s in r)r.hasOwnProperty(s)&&(o=l(o,this._unmountChild(i[s],r[s])));o&&u(this,o),this._renderedChildren=a}},unmountChildren:function(e){var t=this._renderedChildren;p.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,i){if(e._mountIndex<i)return r(e,t,n)},createChild:function(e,t,n){return i(n,t,e._mountIndex)},removeChild:function(e,t){return a(e,t)},_mountChildAtIndex:function(e,t,n,i,r){var a=h.mountComponent(e,i,this,this._nativeContainerInfo,r);
return e._mountIndex=n,this.createChild(e,t,a)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}};e.exports=v},function(e,t,n){"use strict";var i=n(32),r={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){r.isValidOwner(n)?void 0:i(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r.isValidOwner(n)?void 0:i(!1);var a=n.getPublicInstance();a&&a.refs[t]===e.getPublicInstance()&&n.detachRef(t);
}};e.exports=r},function(e,t,n){"use strict";function i(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=a.getPooled(null),this.useCreateElement=e}var r=n(51),a=n(598),s=n(122),o=n(251),l=n(610),u=n(255),c={initialize:l.getSelectionInformation,close:l.restoreSelection},d={initialize:function(){var e=o.isEnabled();return o.setEnabled(!1),e},close:function(e){o.setEnabled(e)}},h={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll();
}},p=[c,d,h],f={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){a.release(this.reactMountReady),this.reactMountReady=null}};r(i.prototype,u.Mixin,f),s.addPoolingTo(i),e.exports=i},function(e,t,n){"use strict";function i(e,t,n){"function"==typeof e?e(t.getPublicInstance()):a.addComponentAsRefTo(t,e,n)}function r(e,t,n){
"function"==typeof e?e(null):a.removeComponentAsRefFrom(t,e,n)}var a=n(1982),s={};s.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&i(n,e,t._owner)}},s.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,i=null===t||t===!1;return n||i||t._owner!==e._owner||t.ref!==e.ref},s.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},e.exports=s},function(e,t,n){"use strict";function i(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1;
}var r=n(51),a=n(122),s=n(255),o=[],l={enqueue:function(){}},u={getTransactionWrappers:function(){return o},getReactMountReady:function(){return l},destructor:function(){},checkpoint:function(){},rollback:function(){}};r(i.prototype,s.Mixin,u),a.addPoolingTo(i),e.exports=i},function(e,t,n){"use strict";var i=n(621),r={getChildMapping:function(e){return e?i(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var i={},r=[];for(var a in e)t.hasOwnProperty(a)?r.length&&(i[a]=r,
r=[]):r.push(a);var s,o={};for(var l in t){if(i.hasOwnProperty(l))for(s=0;s<i[l].length;s++){var u=i[l][s];o[i[l][s]]=n(u)}o[l]=n(l)}for(s=0;s<r.length;s++)o[r[s]]=n(r[s]);return o}};e.exports=r},function(e,t,n){"use strict";function i(){var e=o("animationend"),t=o("transitionend");e&&l.push(e),t&&l.push(t)}function r(e,t,n){e.addEventListener(t,n,!1)}function a(e,t,n){e.removeEventListener(t,n,!1)}var s=n(63),o=n(625),l=[];s.canUseDOM&&i();var u={addEndEventListener:function(e,t){return 0===l.length?void window.setTimeout(t,0):void l.forEach(function(n){
r(e,n,t)})},removeEndEventListener:function(e,t){0!==l.length&&l.forEach(function(n){a(e,n,t)})}};e.exports=u},function(e,t,n){"use strict";var i=n(51),r=n(250),a=n(1986),s=n(79),o=r.createClass({displayName:"ReactTransitionGroup",propTypes:{component:r.PropTypes.any,childFactory:r.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:s.thatReturnsArgument}},getInitialState:function(){return{children:a.getChildMapping(this.props.children)}},componentWillMount:function(){
this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidMount:function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},componentWillReceiveProps:function(e){var t=a.getChildMapping(e.children),n=this.state.children;this.setState({children:a.mergeChildMappings(n,t)});var i;for(i in t){var r=n&&n.hasOwnProperty(i);!t[i]||r||this.currentlyTransitioningKeys[i]||this.keysToEnter.push(i)}for(i in n){var s=t&&t.hasOwnProperty(i);!n[i]||s||this.currentlyTransitioningKeys[i]||this.keysToLeave.push(i);
}},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performAppear:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)},_handleDoneAppearing:function(e){var t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e];
var n=a.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=a.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e);
},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=a.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)?this.performEnter(e):this.setState(function(t){var n=i({},t.children);return delete n[e],{children:n}})},render:function(){
var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(r.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}return r.createElement(this.props.component,this.props,e)}});e.exports=o},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},i={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",
ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",
contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",
focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",
ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",
mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",
pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",
speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",
surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",
vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",
xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},r={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(i).forEach(function(e){r.Properties[e]=0,i[e]&&(r.DOMAttributeNames[e]=i[e])}),e.exports=r},function(e,t,n){"use strict";
function i(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function r(e,t){if(S||null==y||y!==d())return null;var n=i(y);if(!w||!f(w,n)){
w=n;var r=c.getPooled(g.select,b,e,t);return r.type="select",r.target=y,s.accumulateTwoPhaseDispatches(r),r}return null}var a=n(99),s=n(200),o=n(63),l=n(57),u=n(610),c=n(100),d=n(587),h=n(627),p=n(121),f=n(589),m=a.topLevelTypes,v=o.canUseDOM&&"documentMode"in document&&document.documentMode<=11,g={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[m.topBlur,m.topContextMenu,m.topFocus,m.topKeyDown,m.topMouseDown,m.topMouseUp,m.topSelectionChange]
}},y=null,b=null,w=null,S=!1,P=!1,x=p({onSelect:null}),C={eventTypes:g,extractEvents:function(e,t,n,i){if(!P)return null;var a=t?l.getNodeFromInstance(t):window;switch(e){case m.topFocus:(h(a)||"true"===a.contentEditable)&&(y=a,b=t,w=null);break;case m.topBlur:y=null,b=null,w=null;break;case m.topMouseDown:S=!0;break;case m.topContextMenu:case m.topMouseUp:return S=!1,r(n,i);case m.topSelectionChange:if(v)break;case m.topKeyDown:case m.topKeyUp:return r(n,i)}return null},didPutListener:function(e,t,n){
t===x&&(P=!0)}};e.exports=C},function(e,t,n){"use strict";var i=n(99),r=n(585),a=n(200),s=n(57),o=n(1992),l=n(1993),u=n(100),c=n(1996),d=n(1998),h=n(254),p=n(1995),f=n(1999),m=n(2e3),v=n(201),g=n(2001),y=n(79),b=n(366),w=n(32),S=n(121),P=i.topLevelTypes,x={abort:{phasedRegistrationNames:{bubbled:S({onAbort:!0}),captured:S({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:S({onAnimationEnd:!0}),captured:S({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{
bubbled:S({onAnimationIteration:!0}),captured:S({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:S({onAnimationStart:!0}),captured:S({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:S({onBlur:!0}),captured:S({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:S({onCanPlay:!0}),captured:S({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:S({onCanPlayThrough:!0}),captured:S({onCanPlayThroughCapture:!0})}},
click:{phasedRegistrationNames:{bubbled:S({onClick:!0}),captured:S({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:S({onContextMenu:!0}),captured:S({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:S({onCopy:!0}),captured:S({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:S({onCut:!0}),captured:S({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:S({onDoubleClick:!0}),captured:S({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{
bubbled:S({onDrag:!0}),captured:S({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:S({onDragEnd:!0}),captured:S({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:S({onDragEnter:!0}),captured:S({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:S({onDragExit:!0}),captured:S({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:S({onDragLeave:!0}),captured:S({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:S({
onDragOver:!0}),captured:S({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:S({onDragStart:!0}),captured:S({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:S({onDrop:!0}),captured:S({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:S({onDurationChange:!0}),captured:S({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:S({onEmptied:!0}),captured:S({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:S({
onEncrypted:!0}),captured:S({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:S({onEnded:!0}),captured:S({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:S({onError:!0}),captured:S({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:S({onFocus:!0}),captured:S({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:S({onInput:!0}),captured:S({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:S({onInvalid:!0}),captured:S({onInvalidCapture:!0
})}},keyDown:{phasedRegistrationNames:{bubbled:S({onKeyDown:!0}),captured:S({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:S({onKeyPress:!0}),captured:S({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:S({onKeyUp:!0}),captured:S({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:S({onLoad:!0}),captured:S({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:S({onLoadedData:!0}),captured:S({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{
bubbled:S({onLoadedMetadata:!0}),captured:S({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:S({onLoadStart:!0}),captured:S({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:S({onMouseDown:!0}),captured:S({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:S({onMouseMove:!0}),captured:S({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:S({onMouseOut:!0}),captured:S({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{
bubbled:S({onMouseOver:!0}),captured:S({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:S({onMouseUp:!0}),captured:S({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:S({onPaste:!0}),captured:S({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:S({onPause:!0}),captured:S({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:S({onPlay:!0}),captured:S({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:S({onPlaying:!0}),captured:S({
onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:S({onProgress:!0}),captured:S({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:S({onRateChange:!0}),captured:S({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:S({onReset:!0}),captured:S({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:S({onScroll:!0}),captured:S({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:S({onSeeked:!0}),captured:S({onSeekedCapture:!0})
}},seeking:{phasedRegistrationNames:{bubbled:S({onSeeking:!0}),captured:S({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:S({onStalled:!0}),captured:S({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:S({onSubmit:!0}),captured:S({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:S({onSuspend:!0}),captured:S({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:S({onTimeUpdate:!0}),captured:S({onTimeUpdateCapture:!0})}},touchCancel:{
phasedRegistrationNames:{bubbled:S({onTouchCancel:!0}),captured:S({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:S({onTouchEnd:!0}),captured:S({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:S({onTouchMove:!0}),captured:S({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:S({onTouchStart:!0}),captured:S({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:S({onTransitionEnd:!0}),captured:S({onTransitionEndCapture:!0
})}},volumeChange:{phasedRegistrationNames:{bubbled:S({onVolumeChange:!0}),captured:S({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:S({onWaiting:!0}),captured:S({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:S({onWheel:!0}),captured:S({onWheelCapture:!0})}}},C={topAbort:x.abort,topAnimationEnd:x.animationEnd,topAnimationIteration:x.animationIteration,topAnimationStart:x.animationStart,topBlur:x.blur,topCanPlay:x.canPlay,topCanPlayThrough:x.canPlayThrough,
topClick:x.click,topContextMenu:x.contextMenu,topCopy:x.copy,topCut:x.cut,topDoubleClick:x.doubleClick,topDrag:x.drag,topDragEnd:x.dragEnd,topDragEnter:x.dragEnter,topDragExit:x.dragExit,topDragLeave:x.dragLeave,topDragOver:x.dragOver,topDragStart:x.dragStart,topDrop:x.drop,topDurationChange:x.durationChange,topEmptied:x.emptied,topEncrypted:x.encrypted,topEnded:x.ended,topError:x.error,topFocus:x.focus,topInput:x.input,topInvalid:x.invalid,topKeyDown:x.keyDown,topKeyPress:x.keyPress,topKeyUp:x.keyUp,
topLoad:x.load,topLoadedData:x.loadedData,topLoadedMetadata:x.loadedMetadata,topLoadStart:x.loadStart,topMouseDown:x.mouseDown,topMouseMove:x.mouseMove,topMouseOut:x.mouseOut,topMouseOver:x.mouseOver,topMouseUp:x.mouseUp,topPaste:x.paste,topPause:x.pause,topPlay:x.play,topPlaying:x.playing,topProgress:x.progress,topRateChange:x.rateChange,topReset:x.reset,topScroll:x.scroll,topSeeked:x.seeked,topSeeking:x.seeking,topStalled:x.stalled,topSubmit:x.submit,topSuspend:x.suspend,topTimeUpdate:x.timeUpdate,
topTouchCancel:x.touchCancel,topTouchEnd:x.touchEnd,topTouchMove:x.touchMove,topTouchStart:x.touchStart,topTransitionEnd:x.transitionEnd,topVolumeChange:x.volumeChange,topWaiting:x.waiting,topWheel:x.wheel};for(var T in C)C[T].dependencies=[T];var _=S({onClick:null}),E={},k={eventTypes:x,extractEvents:function(e,t,n,i){var r=C[e];if(!r)return null;var s;switch(e){case P.topAbort:case P.topCanPlay:case P.topCanPlayThrough:case P.topDurationChange:case P.topEmptied:case P.topEncrypted:case P.topEnded:
case P.topError:case P.topInput:case P.topInvalid:case P.topLoad:case P.topLoadedData:case P.topLoadedMetadata:case P.topLoadStart:case P.topPause:case P.topPlay:case P.topPlaying:case P.topProgress:case P.topRateChange:case P.topReset:case P.topSeeked:case P.topSeeking:case P.topStalled:case P.topSubmit:case P.topSuspend:case P.topTimeUpdate:case P.topVolumeChange:case P.topWaiting:s=u;break;case P.topKeyPress:if(0===b(n))return null;case P.topKeyDown:case P.topKeyUp:s=d;break;case P.topBlur:case P.topFocus:
s=c;break;case P.topClick:if(2===n.button)return null;case P.topContextMenu:case P.topDoubleClick:case P.topMouseDown:case P.topMouseMove:case P.topMouseOut:case P.topMouseOver:case P.topMouseUp:s=h;break;case P.topDrag:case P.topDragEnd:case P.topDragEnter:case P.topDragExit:case P.topDragLeave:case P.topDragOver:case P.topDragStart:case P.topDrop:s=p;break;case P.topTouchCancel:case P.topTouchEnd:case P.topTouchMove:case P.topTouchStart:s=f;break;case P.topAnimationEnd:case P.topAnimationIteration:
case P.topAnimationStart:s=o;break;case P.topTransitionEnd:s=m;break;case P.topScroll:s=v;break;case P.topWheel:s=g;break;case P.topCopy:case P.topCut:case P.topPaste:s=l}s?void 0:w(!1);var y=s.getPooled(r,t,n,i);return a.accumulateTwoPhaseDispatches(y),y},didPutListener:function(e,t,n){if(t===_){var i=e._rootNodeID,a=s.getNodeFromInstance(e);E[i]||(E[i]=r.listen(a,"click",y))}},willDeleteListener:function(e,t){if(t===_){var n=e._rootNodeID;E[n].remove(),delete E[n]}}};e.exports=k},function(e,t,n){
"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(100),a={animationName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(i,a),e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(100),a={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};r.augmentClass(i,a),e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(100),a={data:null};r.augmentClass(i,a),
e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(254),a={dataTransfer:null};r.augmentClass(i,a),e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(201),a={relatedTarget:null};r.augmentClass(i,a),e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(100),a={data:null};r.augmentClass(i,a),e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i);
}var r=n(201),a=n(366),s=n(2005),o=n(367),l={key:s,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:o,charCode:function(e){return"keypress"===e.type?a(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?a(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};r.augmentClass(i,l),e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}
var r=n(201),a=n(367),s={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:a};r.augmentClass(i,s),e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(100),a={propertyName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(i,a),e.exports=i},function(e,t,n){"use strict";function i(e,t,n,i){return r.call(this,e,t,n,i)}var r=n(254),a={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0;
},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(i,a),e.exports=i},function(e,t){"use strict";function n(e){for(var t=1,n=0,r=0,a=e.length,s=a&-4;r<s;){for(var o=Math.min(r+4096,s);r<o;r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=i,n%=i}for(;r<a;r++)n+=t+=e.charCodeAt(r);return t%=i,n%=i,t|n<<16}var i=65521;e.exports=n},function(e,t,n){
"use strict";function i(e,t,n){var i=null==t||"boolean"==typeof t||""===t;if(i)return"";var r=isNaN(t);if(r||0===t||a.hasOwnProperty(e)&&a[e])return""+t;if("string"==typeof t){t=t.trim()}return t+"px"}var r=n(596),a=(n(42),r.isUnitlessNumber);e.exports=i},function(e,t,n){"use strict";function i(e){if(null==e)return null;if(1===e.nodeType)return e;var t=a.get(e);return t?(t=s(t),t?r.getNodeFromInstance(t):null):void o(("function"==typeof e.render,!1))}var r=(n(123),n(57)),a=n(363),s=n(623),o=n(32);
n(42);e.exports=i},function(e,t,n){"use strict";function i(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?s[e.keyCode]||"Unidentified":""}var r=n(366),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s={
8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=i},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e;
}function i(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function r(e,t){for(var r=n(e),a=0,s=0;r;){if(3===r.nodeType){if(s=a+r.textContent.length,a<=t&&s>=t)return{node:r,offset:t-a};a=s}r=n(i(r))}}e.exports=r},function(e,t,n){"use strict";function i(e){return'"'+r(e)+'"'}var r=n(256);e.exports=i},function(e,t,n){"use strict";var i=n(611);e.exports=i.renderSubtreeIntoContainer},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];
return function(e){return function(n,i,r){var s=e(n,i,r),l=s.dispatch,u=[],c={getState:s.getState,dispatch:function(e){return l(e)}};return u=t.map(function(e){return e(c)}),l=o.default.apply(void 0,u)(s.dispatch),a({},s,{dispatch:l})}}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=r;var s=n(630),o=i(s)},function(e,t){"use strict";function n(e,t){return function(){
return t(e.apply(void 0,arguments))}}function i(e,t){if("function"==typeof e)return n(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var i=Object.keys(e),r={},a=0;a<i.length;a++){var s=i[a],o=e[s];"function"==typeof o&&(r[s]=n(o,t))}return r}t.__esModule=!0,t.default=i},function(e,t,n){"use strict";
function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){var n=t&&t.type,i=n&&'"'+n.toString()+'"'||"an action";return"Given action "+i+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function a(e){Object.keys(e).forEach(function(t){var n=e[t],i=n(void 0,{type:o.ActionTypes.INIT});if("undefined"==typeof i)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');
var r="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:r}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+o.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.");
})}function s(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var s=t[i];"function"==typeof e[s]&&(n[s]=e[s])}var o,l=Object.keys(n);try{a(n)}catch(u){o=u}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(o)throw o;for(var i=!1,a={},s=0;s<l.length;s++){var u=l[s],c=n[u],d=e[u],h=c(d,t);if("undefined"==typeof h){var p=r(u,t);throw new Error(p)}a[u]=h,i=i||h!==d}return i?a:e}}t.__esModule=!0,t.default=s;var o=n(631),l=n(355),u=(i(l),n(632));i(u);
},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var r=n(631),a=i(r),s=n(2011),o=i(s),l=n(2010),u=i(l),c=n(2009),d=i(c),h=n(630),p=i(h),f=n(632);i(f);t.createStore=a.default,t.combineReducers=o.default,t.bindActionCreators=u.default,t.applyMiddleware=d.default,t.compose=p.default},function(e,t,n){var i,r;/*! tether 1.3.0 */
!function(a,s){i=s,r="function"==typeof i?i.call(t,n,t,e):i,!(void 0!==r&&(e.exports=r))}(this,function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){var t=getComputedStyle(e)||{},n=t.position,i=[];if("fixed"===n)return[e];for(var r=e;(r=r.parentNode)&&r&&1===r.nodeType;){var a=void 0;try{a=getComputedStyle(r)}catch(s){}if("undefined"==typeof a||null===a)return i.push(r),i;var o=a,l=o.overflow,u=o.overflowX,c=o.overflowY;
/(auto|scroll)/.test(l+c+u)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(a.position)>=0)&&i.push(r)}return i.push(document.body),i}function a(){document.body.removeChild(C),C=void 0}function s(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var n=t.documentElement,i={},r=e.getBoundingClientRect();for(var a in r)i[a]=r[a];var s=E();return i.top-=s.top,i.left-=s.left,"undefined"==typeof i.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeof i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),
i.top=i.top-n.clientTop,i.left=i.left-n.clientLeft,i.right=t.body.clientWidth-i.width-i.left,i.bottom=t.body.clientHeight-i.height-i.top,i}function o(e){return e.offsetParent||document.documentElement}function l(){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");u(t.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);
var n=e.offsetWidth;t.style.overflow="scroll";var i=e.offsetWidth;n===i&&(i=t.clientWidth),document.body.removeChild(t);var r=n-i;return{width:r,height:r}}function u(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach(function(t){if(t)for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function c(e,t){if("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.remove(t)});else{
var n=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),i=p(e).replace(n," ");f(e,i)}}function d(e,t){if("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.add(t)});else{c(e,t);var n=p(e)+(" "+t);f(e,n)}}function h(e,t){if("undefined"!=typeof e.classList)return e.classList.contains(t);var n=p(e);return new RegExp("(^| )"+t+"( |$)","gi").test(n)}function p(e){return e.className instanceof SVGAnimatedString?e.className.baseVal:e.className}function f(e,t){e.setAttribute("class",t);
}function m(e,t,n){n.forEach(function(n){t.indexOf(n)===-1&&h(e,n)&&c(e,n)}),t.forEach(function(t){h(e,t)||d(e,t)})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t);
}function g(e,t){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return e+n>=t&&t>=e-n}function y(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function b(){for(var e={top:0,left:0},t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach(function(t){var n=t.top,i=t.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof i&&(i=parseFloat(i,10)),e.top+=n,e.left+=i}),e}function w(e,t){return"string"==typeof e.left&&e.left.indexOf("%")!==-1&&(e.left=parseFloat(e.left,10)/100*t.width),
"string"==typeof e.top&&e.top.indexOf("%")!==-1&&(e.top=parseFloat(e.top,10)/100*t.height),e}function S(e,t){return"scrollParent"===t?t=e.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),"undefined"!=typeof t.nodeType&&!function(){var e=s(t),n=e,i=getComputedStyle(t);t=[n.left,n.top,e.width+n.left,e.height+n.top],Q.forEach(function(e,n){e=e[0].toUpperCase()+e.substr(1),"Top"===e||"Left"===e?t[n]+=parseFloat(i["border"+e+"Width"]):t[n]-=parseFloat(i["border"+e+"Width"]);
})}(),t}var P=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),x=void 0;"undefined"==typeof x&&(x={modules:[]});var C=null,T=function(){var e=0;return function(){return++e}}(),_={},E=function(){var e=C;e||(e=document.createElement("div"),e.setAttribute("data-tether-id",T()),u(e.style,{top:0,left:0,position:"absolute"
}),document.body.appendChild(e),C=e);var t=e.getAttribute("data-tether-id");if("undefined"==typeof _[t]){_[t]={};var n=e.getBoundingClientRect();for(var i in n)_[t][i]=n[i];I(function(){delete _[t]})}return _[t]},k=[],I=function(e){k.push(e)},A=function(){for(var e=void 0;e=k.pop();)e()},M=function(){function e(){i(this,e)}return P(e,[{key:"on",value:function(e,t,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[e]&&(this.bindings[e]=[]),
this.bindings[e].push({handler:t,ctx:n,once:i})}},{key:"once",value:function(e,t,n){this.on(e,t,n,!0)}},{key:"off",value:function(e,t){if("undefined"==typeof this.bindings||"undefined"==typeof this.bindings[e])if("undefined"==typeof t)delete this.bindings[e];else for(var n=0;n<this.bindings[e].length;)this.bindings[e][n].handler===t?this.bindings[e].splice(n,1):++n}},{key:"trigger",value:function(e){if("undefined"!=typeof this.bindings&&this.bindings[e]){for(var t=0,n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];
for(;t<this.bindings[e].length;){var a=this.bindings[e][t],s=a.handler,o=a.ctx,l=a.once,u=o;"undefined"==typeof u&&(u=this),s.apply(u,i),l?this.bindings[e].splice(t,1):++t}}}}]),e}();x.Utils={getScrollParents:r,getBounds:s,getOffsetParent:o,extend:u,addClass:d,removeClass:c,hasClass:h,updateClasses:m,defer:I,flush:A,uniqueId:T,Evented:M,getScrollBarSize:l,removeUtilElements:a};var D=function(){function e(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),
!t||n.length!==t);i=!0);}catch(l){r=!0,a=l}finally{try{!i&&o.return&&o.return()}finally{if(r)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),
i&&e(t,i),t}}(),R=function(e,t,n){for(var i=!0;i;){var r=e,a=t,s=n;i=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=a,n=s,i=!0,o=u=void 0}};if("undefined"==typeof x)throw new Error("You must include the utils.js file before tether.js");var O=x.Utils,r=O.getScrollParents,s=O.getBounds,o=O.getOffsetParent,u=O.extend,d=O.addClass,c=O.removeClass,m=O.updateClasses,I=O.defer,A=O.flush,l=O.getScrollBarSize,a=O.removeUtilElements,L=function(){
if("undefined"==typeof document)return"";for(var e=document.createElement("div"),t=["transform","webkitTransform","OTransform","MozTransform","msTransform"],n=0;n<t.length;++n){var i=t[n];if(void 0!==e.style[i])return i}}(),N=[],U=function(){N.forEach(function(e){e.position(!1)}),A()};!function(){var e=null,t=null,n=null,i=function r(){return"undefined"!=typeof t&&t>16?(t=Math.min(t-16,250),void(n=setTimeout(r,250))):void("undefined"!=typeof e&&y()-e<10||("undefined"!=typeof n&&(clearTimeout(n),n=null),
e=y(),U(),t=y()-e))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(e){window.addEventListener(e,i)})}();var F={center:"center",left:"right",right:"left"},j={middle:"middle",top:"bottom",bottom:"top"},B={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},z=function(e,t){var n=e.left,i=e.top;return"auto"===n&&(n=F[t.left]),"auto"===i&&(i=j[t.top]),{left:n,top:i}},V=function(e){var t=e.left,n=e.top;return"undefined"!=typeof B[e.left]&&(t=B[e.left]),
"undefined"!=typeof B[e.top]&&(n=B[e.top]),{left:t,top:n}},H=function(e){var t=e.split(" "),n=D(t,2),i=n[0],r=n[1];return{top:i,left:r}},q=H,W=function(e){function t(e){var n=this;i(this,t),R(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.position=this.position.bind(this),N.push(this),this.history=[],this.setOptions(e,!1),x.modules.forEach(function(e){"undefined"!=typeof e.initialize&&e.initialize.call(n)}),this.position()}return v(t,e),P(t,[{key:"getClass",value:function(){
var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return"undefined"!=typeof t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+"-"+e:e}},{key:"setOptions",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=u(i,e);var a=this.options,s=a.element,o=a.target,l=a.targetModifier;if(this.element=s,this.target=o,
this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(e){if("undefined"==typeof t[e])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),d(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&d(this.target,this.getClass("target")),
!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=q(this.options.targetAttachment),this.attachment=q(this.options.attachment),this.offset=H(this.options.offset),this.targetOffset=H(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),this.options.enabled!==!1&&this.enable(n)}},{key:"getTargetBounds",value:function(){
if("undefined"==typeof this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var e=s(this.target),t={height:e.height,width:e.width,top:e.top,left:e.left};return t.height=Math.min(t.height,e.height-(pageYOffset-e.top)),t.height=Math.min(t.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),t.height=Math.min(innerHeight,t.height),t.height-=2,t.width=Math.min(t.width,e.width-(pageXOffset-e.left)),
t.width=Math.min(t.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),t.width=Math.min(innerWidth,t.width),t.width-=2,t.top<pageYOffset&&(t.top=pageYOffset),t.left<pageXOffset&&(t.left=pageXOffset),t}if("scroll-handle"===this.targetModifier){var e=void 0,n=this.target;n===document.body?(n=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=s(n);var i=getComputedStyle(n),r=n.scrollWidth>n.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,a=0;
r&&(a=15);var o=e.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-a,t={width:15,height:.975*o*(o/n.scrollHeight),left:e.left+e.width-parseFloat(i.borderLeftWidth)-15},l=0;o<408&&this.target===document.body&&(l=-11e-5*Math.pow(o,2)-.00727*o+22.58),this.target!==document.body&&(t.height=Math.max(t.height,24));var u=this.target.scrollTop/(n.scrollHeight-o);return t.top=u*(o-t.height-l)+e.top+parseFloat(i.borderTopWidth),this.target===document.body&&(t.height=Math.max(t.height,24)),
t}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(e,t){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:"enable",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.options.addTargetClasses!==!1&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(t){
t!==document&&t.addEventListener("scroll",e.position)}),t&&this.position()}},{key:"disable",value:function(){var e=this;c(this.target,this.getClass("enabled")),c(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.position)})}},{key:"destroy",value:function(){var e=this;this.disable(),N.forEach(function(t,n){t===e&&N.splice(n,1)}),0===N.length&&a()}},{key:"updateAttachClasses",value:function(e,t){
var n=this;e=e||this.attachment,t=t||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var r=this._addAttachClasses;e.top&&r.push(this.getClass("element-attached")+"-"+e.top),e.left&&r.push(this.getClass("element-attached")+"-"+e.left),t.top&&r.push(this.getClass("target-attached")+"-"+t.top),
t.left&&r.push(this.getClass("target-attached")+"-"+t.left);var a=[];i.forEach(function(e){a.push(n.getClass("element-attached")+"-"+e),a.push(n.getClass("target-attached")+"-"+e)}),I(function(){"undefined"!=typeof n._addAttachClasses&&(m(n.element,n._addAttachClasses,a),n.options.addTargetClasses!==!1&&m(n.target,n._addAttachClasses,a),delete n._addAttachClasses)})}},{key:"position",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();
var n=z(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return s(e.element)}),r=i.width,a=i.height;if(0===r&&0===a&&"undefined"!=typeof this.lastSize){var u=this.lastSize;r=u.width,a=u.height}else this.lastSize={width:r,height:a};var c=this.cache("target-bounds",function(){return e.getTargetBounds()}),d=c,h=w(V(this.attachment),{width:r,height:a}),p=w(V(n),d),f=w(this.offset,{width:r,height:a}),m=w(this.targetOffset,d);
h=b(h,f),p=b(p,m);for(var v=c.left+p.left-h.left,g=c.top+p.top-h.top,y=0;y<x.modules.length;++y){var S=x.modules[y],P=S.position.call(this,{left:v,top:g,targetAttachment:n,targetPos:c,elementPos:i,offset:h,targetOffset:p,manualOffset:f,manualTargetOffset:m,scrollbarSize:T,attachment:this.attachment});if(P===!1)return!1;"undefined"!=typeof P&&"object"==typeof P&&(g=P.top,v=P.left)}var C={page:{top:g,left:v},viewport:{top:g-pageYOffset,bottom:pageYOffset-g-a+innerHeight,left:v-pageXOffset,right:pageXOffset-v-r+innerWidth
}},T=void 0;return document.body.scrollWidth>window.innerWidth&&(T=this.cache("scrollbar-size",l),C.viewport.bottom-=T.height),document.body.scrollHeight>window.innerHeight&&(T=this.cache("scrollbar-size",l),C.viewport.right-=T.width),["","static"].indexOf(document.body.style.position)!==-1&&["","static"].indexOf(document.body.parentElement.style.position)!==-1||(C.page.bottom=document.body.scrollHeight-g-a,C.page.right=document.body.scrollWidth-v-r),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){
var t=e.cache("target-offsetparent",function(){return o(e.target)}),n=e.cache("target-offsetparent-bounds",function(){return s(t)}),i=getComputedStyle(t),r=n,a={};if(["Top","Left","Bottom","Right"].forEach(function(e){a[e.toLowerCase()]=parseFloat(i["border"+e+"Width"])}),n.right=document.body.scrollWidth-n.left-r.width+a.right,n.bottom=document.body.scrollHeight-n.top-r.height+a.bottom,C.page.top>=n.top+a.top&&C.page.bottom>=n.bottom&&C.page.left>=n.left+a.left&&C.page.right>=n.right){var l=t.scrollTop,u=t.scrollLeft;
C.offset={top:C.page.top-n.top+l-a.top,left:C.page.left-n.left+u-a.left}}}(),this.move(C),this.history.unshift(C),this.history.length>3&&this.history.pop(),t&&A(),!0}}},{key:"move",value:function(e){var t=this;if("undefined"!=typeof this.element.parentNode){var n={};for(var i in e){n[i]={};for(var r in e[i]){for(var a=!1,s=0;s<this.history.length;++s){var l=this.history[s];if("undefined"!=typeof l[i]&&!g(l[i][r],e[i][r])){a=!0;break}}a||(n[i][r]=!0)}}var c={top:"",left:"",right:"",bottom:""},d=function(e,n){
var i="undefined"!=typeof t.options.optimizations,r=i?t.options.optimizations.gpu:null;if(r!==!1){var a=void 0,s=void 0;e.top?(c.top=0,a=n.top):(c.bottom=0,a=-n.bottom),e.left?(c.left=0,s=n.left):(c.right=0,s=-n.right),c[L]="translateX("+Math.round(s)+"px) translateY("+Math.round(a)+"px)","msTransform"!==L&&(c[L]+=" translateZ(0)")}else e.top?c.top=n.top+"px":c.bottom=n.bottom+"px",e.left?c.left=n.left+"px":c.right=n.right+"px"},h=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(c.position="absolute",
d(n.page,e.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(c.position="fixed",d(n.viewport,e.viewport)):"undefined"!=typeof n.offset&&n.offset.top&&n.offset.left?!function(){c.position="absolute";var i=t.cache("target-offsetparent",function(){return o(t.target)});o(t.element)!==i&&I(function(){t.element.parentNode.removeChild(t.element),i.appendChild(t.element)}),d(n.offset,e.offset),h=!0}():(c.position="absolute",d({top:!0,left:!0},e.page)),!h){for(var p=!0,f=this.element.parentNode;f&&1===f.nodeType&&"BODY"!==f.tagName;){
if("static"!==getComputedStyle(f).position){p=!1;break}f=f.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}var m={},v=!1;for(var r in c){var y=c[r],b=this.element.style[r];b!==y&&(v=!0,m[r]=y)}v&&I(function(){u(t.element.style,m)})}}}]),t}(M);W.modules=[],x.position=U;var K=u(W,x),D=function(){function e(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(l){
r=!0,a=l}finally{try{!i&&o.return&&o.return()}finally{if(r)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=x.Utils,s=O.getBounds,u=O.extend,m=O.updateClasses,I=O.defer,Q=["left","top","right","bottom"];x.modules.push({position:function(e){var t=this,n=e.top,i=e.left,r=e.targetAttachment;if(!this.options.constraints)return!0;var a=this.cache("element-bounds",function(){
return s(t.element)}),o=a.height,l=a.width;if(0===l&&0===o&&"undefined"!=typeof this.lastSize){var c=this.lastSize;l=c.width,o=c.height}var d=this.cache("target-bounds",function(){return t.getTargetBounds()}),h=d.height,p=d.width,f=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,n=e.pinnedClass;t&&f.push(t),n&&f.push(n)}),f.forEach(function(e){["left","top","right","bottom"].forEach(function(t){f.push(e+"-"+t)})});var v=[],g=u({},r),y=u({},this.attachment);
return this.options.constraints.forEach(function(e){var a=e.to,s=e.attachment,u=e.pin;"undefined"==typeof s&&(s="");var c=void 0,d=void 0;if(s.indexOf(" ")>=0){var f=s.split(" "),m=D(f,2);d=m[0],c=m[1]}else c=d=s;var b=S(t,a);"target"!==d&&"both"!==d||(n<b[1]&&"top"===g.top&&(n+=h,g.top="bottom"),n+o>b[3]&&"bottom"===g.top&&(n-=h,g.top="top")),"together"===d&&("top"===g.top&&("bottom"===y.top&&n<b[1]?(n+=h,g.top="bottom",n+=o,y.top="top"):"top"===y.top&&n+o>b[3]&&n-(o-h)>=b[1]&&(n-=o-h,g.top="bottom",
y.top="bottom")),"bottom"===g.top&&("top"===y.top&&n+o>b[3]?(n-=h,g.top="top",n-=o,y.top="bottom"):"bottom"===y.top&&n<b[1]&&n+(2*o-h)<=b[3]&&(n+=o-h,g.top="top",y.top="top")),"middle"===g.top&&(n+o>b[3]&&"top"===y.top?(n-=o,y.top="bottom"):n<b[1]&&"bottom"===y.top&&(n+=o,y.top="top"))),"target"!==c&&"both"!==c||(i<b[0]&&"left"===g.left&&(i+=p,g.left="right"),i+l>b[2]&&"right"===g.left&&(i-=p,g.left="left")),"together"===c&&(i<b[0]&&"left"===g.left?"right"===y.left?(i+=p,g.left="right",i+=l,y.left="left"):"left"===y.left&&(i+=p,
g.left="right",i-=l,y.left="right"):i+l>b[2]&&"right"===g.left?"left"===y.left?(i-=p,g.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=p,g.left="left",i+=l,y.left="left"):"center"===g.left&&(i+l>b[2]&&"left"===y.left?(i-=l,y.left="right"):i<b[0]&&"right"===y.left&&(i+=l,y.left="left"))),"element"!==d&&"both"!==d||(n<b[1]&&"bottom"===y.top&&(n+=o,y.top="top"),n+o>b[3]&&"top"===y.top&&(n-=o,y.top="bottom")),"element"!==c&&"both"!==c||(i<b[0]&&("right"===y.left?(i+=l,y.left="left"):"center"===y.left&&(i+=l/2,
y.left="left")),i+l>b[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(e){return e.trim()}):u===!0&&(u=["top","left","right","bottom"]),u=u||[];var w=[],P=[];n<b[1]&&(u.indexOf("top")>=0?(n=b[1],w.push("top")):P.push("top")),n+o>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-o,w.push("bottom")):P.push("bottom")),i<b[0]&&(u.indexOf("left")>=0?(i=b[0],w.push("left")):P.push("left")),i+l>b[2]&&(u.indexOf("right")>=0?(i=b[2]-l,
w.push("right")):P.push("right")),w.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),v.push(e),w.forEach(function(t){v.push(e+"-"+t)})}(),P.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),v.push(e),P.forEach(function(t){v.push(e+"-"+t)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=g.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=g.top=!1),
g.top===r.top&&g.left===r.left&&y.top===t.attachment.top&&y.left===t.attachment.left||(t.updateAttachClasses(y,g),t.trigger("update",{attachment:y,targetAttachment:g}))}),I(function(){t.options.addTargetClasses!==!1&&m(t.target,v,f),m(t.element,v,f)}),{top:n,left:i}}});var O=x.Utils,s=O.getBounds,m=O.updateClasses,I=O.defer;x.modules.push({position:function(e){var t=this,n=e.top,i=e.left,r=this.cache("element-bounds",function(){return s(t.element)}),a=r.height,o=r.width,l=this.getTargetBounds(),u=n+a,c=i+o,d=[];
n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(e){var t=l[e];t!==i&&t!==c||d.push(e)}),i<=l.right&&c>=l.left&&["top","bottom"].forEach(function(e){var t=l[e];t!==n&&t!==u||d.push(e)});var h=[],p=[],f=["left","top","right","bottom"];return h.push(this.getClass("abutted")),f.forEach(function(e){h.push(t.getClass("abutted")+"-"+e)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(e){p.push(t.getClass("abutted")+"-"+e)}),I(function(){t.options.addTargetClasses!==!1&&m(t.target,p,h),
m(t.element,p,h)}),!0}});var D=function(){function e(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(l){r=!0,a=l}finally{try{!i&&o.return&&o.return()}finally{if(r)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(e){var t=e.top,n=e.left;
if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:t,left:n}));var r=void 0,a=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=i,o=D(s,2);r=o[0],a=o[1],r=parseFloat(r,10),a=parseFloat(a,10)}else r=i.top,a=i.left;return t+=r,n+=a,{top:t,left:n}}}}),K})},function(e,t){(function(t){e.exports=t}).call(t,{})}]);